@funhub/platform 0.2.31 → 0.2.32
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/_virtual/_rolldown/runtime.mjs +1 -18
- package/dist/assets/icons/channel-list/channel-active-indicator.mjs +1 -31
- package/dist/assets/icons/clear.mjs +1 -17
- package/dist/assets/icons/close-icon.mjs +1 -18
- package/dist/assets/icons/close.mjs +1 -14
- package/dist/assets/icons/common/collect_nor.mjs +1 -21
- package/dist/assets/icons/common/collect_sel.mjs +1 -21
- package/dist/assets/icons/common/follow_sel.mjs +1 -17
- package/dist/assets/icons/common/follow_user.mjs +1 -17
- package/dist/assets/icons/common/full_screen.mjs +1 -17
- package/dist/assets/icons/common/god_comment.mjs +1 -17
- package/dist/assets/icons/common/header-menu.mjs +1 -29
- package/dist/assets/icons/common/header-search-icon.mjs +1 -17
- package/dist/assets/icons/common/heart-like.mjs +1 -31
- package/dist/assets/icons/common/heart-unlike.mjs +1 -18
- package/dist/assets/icons/common/qq.mjs +1 -32
- package/dist/assets/icons/common/right_arrow.mjs +1 -14
- package/dist/assets/icons/common/right_arrow_thin.mjs +1 -17
- package/dist/assets/icons/common/share.mjs +1 -17
- package/dist/assets/icons/common/solid-arrow.mjs +1 -17
- package/dist/assets/icons/common/video_play.mjs +1 -18
- package/dist/assets/icons/common/wechat-friends.mjs +1 -40
- package/dist/assets/icons/common/wechat.mjs +1 -39
- package/dist/assets/icons/detail/check-ok.mjs +1 -17
- package/dist/assets/icons/detail/comment.mjs +1 -19
- package/dist/assets/icons/detail/commet_at.mjs +1 -53
- package/dist/assets/icons/detail/give_like.mjs +1 -20
- package/dist/assets/icons/detail/give_like_sel.mjs +1 -27
- package/dist/assets/icons/detail/min-collection.mjs +1 -38
- package/dist/assets/icons/detail/publish_pic.mjs +1 -27
- package/dist/assets/icons/detail/publish_video.mjs +1 -30
- package/dist/assets/icons/detail/un_like.mjs +1 -20
- package/dist/assets/icons/detail/un_like_sel.mjs +1 -27
- package/dist/assets/icons/detail/video_flag.mjs +1 -17
- package/dist/assets/icons/detail/video_play.mjs +1 -18
- package/dist/assets/icons/dislike.mjs +1 -20
- package/dist/assets/icons/dislike_sel.mjs +1 -27
- package/dist/assets/icons/empty/img-empty-adduser.mjs +1 -463
- package/dist/assets/icons/empty/img-empty-nodata.mjs +1 -194
- package/dist/assets/icons/eye-icon.mjs +1 -21
- package/dist/assets/icons/eye-off-icon.mjs +1 -24
- package/dist/assets/icons/filter_dark.mjs +1 -17
- package/dist/assets/icons/follow_nor.mjs +1 -44
- package/dist/assets/icons/follow_sel.mjs +1 -31
- package/dist/assets/icons/left-arrow-icon.mjs +1 -18
- package/dist/assets/icons/left_arrow.mjs +1 -14
- package/dist/assets/icons/like.mjs +1 -20
- package/dist/assets/icons/like_sel.mjs +1 -27
- package/dist/assets/icons/marquee-close.mjs +1 -29
- package/dist/assets/icons/marquee-enter.mjs +1 -17
- package/dist/assets/icons/marquee-speaker.mjs +1 -22
- package/dist/assets/icons/publish/publish_add.mjs +1 -17
- package/dist/assets/icons/publish/publish_at.mjs +1 -53
- package/dist/assets/icons/publish/publish_collection.mjs +1 -28
- package/dist/assets/icons/publish/publish_pic.mjs +1 -27
- package/dist/assets/icons/publish/publish_video.mjs +1 -30
- package/dist/assets/icons/refresh.mjs +1 -18
- package/dist/assets/icons/search/filter.mjs +1 -17
- package/dist/assets/icons/search.mjs +1 -23
- package/dist/assets/icons/share/share-link.mjs +1 -39
- package/dist/assets/icons/tabs/follow.mjs +1 -20
- package/dist/assets/icons/tabs/follow_active.mjs +1 -17
- package/dist/assets/icons/tabs/home.mjs +1 -17
- package/dist/assets/icons/tabs/home_active.mjs +1 -17
- package/dist/assets/icons/tabs/mine.mjs +1 -26
- package/dist/assets/icons/tabs/mine_active.mjs +1 -17
- package/dist/assets/icons/view.mjs +1 -17
- package/dist/assets/images/add.mjs +1 -5
- package/dist/assets/images/default_avatar.mjs +1 -5
- package/dist/assets/images/default_collection_cover.mjs +1 -5
- package/dist/assets/images/empty/img_empty_adduser.mjs +1 -463
- package/dist/assets/images/empty/img_empty_message.mjs +1 -408
- package/dist/assets/images/empty/img_empty_network.mjs +1 -168
- package/dist/assets/images/empty/img_empty_nodata.mjs +1 -194
- package/dist/assets/images/empty/img_empty_picture.mjs +1 -59
- package/dist/assets/images/empty/img_empty_search.mjs +1 -250
- package/dist/assets/images/frame.mjs +1 -5
- package/dist/assets/images/less.mjs +1 -5
- package/dist/assets/images/logo.mjs +1 -5
- package/dist/assets/images/shortcut-grid/shortcut-grid-card-bg-primary.mjs +1 -29
- package/dist/assets/images/subscript.mjs +1 -5
- package/dist/assets/images/user/default_avatar.mjs +1 -5
- package/dist/biz.mjs +1 -169
- package/dist/cli/init/create-client.mjs +1 -12
- package/dist/cli/init/create-sdk.mjs +1 -12
- package/dist/cli/init/shared/command.mjs +1 -31
- package/dist/cli/init/shared/constants.mjs +1 -24
- package/dist/cli/init/shared/create-project.mjs +2 -58
- package/dist/cli/init/shared/file.mjs +1 -21
- package/dist/cli/init/shared/package-manager.mjs +1 -42
- package/dist/cli/init/shared/prompts.mjs +1 -107
- package/dist/cli/init/shared/template.mjs +1 -66
- package/dist/cli.mjs +2 -128
- package/dist/common.mjs +1 -51
- package/dist/components/biz/basics/card-item/defaults/default-props.mjs +1 -10
- package/dist/components/biz/basics/card-item/runtime/client.mjs +1 -83
- package/dist/components/biz/basics/card-item/runtime/corners.mjs +1 -33
- package/dist/components/biz/basics/card-item/schema/component.mjs +1 -14
- package/dist/components/biz/basics/card-item/schema/data.schema.mjs +1 -8
- package/dist/components/biz/basics/card-item/schema/event.schema.mjs +1 -8
- package/dist/components/biz/basics/card-item/schema/index.mjs +1 -17
- package/dist/components/biz/basics/card-item/schema/props.schema.mjs +1 -18
- package/dist/components/biz/basics/card-item/schema/style.schema.mjs +1 -7
- package/dist/components/biz/basics/card-layout/defaults/default-props.mjs +1 -13
- package/dist/components/biz/basics/card-layout/runtime/client.mjs +1 -38
- package/dist/components/biz/basics/card-layout/schema/component.mjs +1 -14
- package/dist/components/biz/basics/card-layout/schema/data.schema.mjs +1 -8
- package/dist/components/biz/basics/card-layout/schema/event.schema.mjs +1 -5
- package/dist/components/biz/basics/card-layout/schema/index.mjs +1 -17
- package/dist/components/biz/basics/card-layout/schema/props.schema.mjs +1 -28
- package/dist/components/biz/basics/card-layout/schema/style.schema.mjs +1 -7
- package/dist/components/biz/basics/fullscreen-feed/basic-fullscreen.mjs +1 -268
- package/dist/components/biz/basics/fullscreen-feed/defaults/default-props.mjs +1 -11
- package/dist/components/biz/basics/fullscreen-feed/index.mjs +1 -12
- package/dist/components/biz/basics/fullscreen-feed/runtime/adapters.mjs +1 -97
- package/dist/components/biz/basics/fullscreen-feed/runtime/bottom-info.mjs +1 -125
- package/dist/components/biz/basics/fullscreen-feed/runtime/client.mjs +1 -390
- package/dist/components/biz/basics/fullscreen-feed/runtime/comment-modal.mjs +1 -107
- package/dist/components/biz/basics/fullscreen-feed/runtime/interaction-sync.mjs +1 -134
- package/dist/components/biz/basics/fullscreen-feed/runtime/post-slide.mjs +1 -232
- package/dist/components/biz/basics/fullscreen-feed/runtime/styles.module.mjs +152 -25
- package/dist/components/biz/basics/fullscreen-feed/runtime/use-mixed-feed-controller.mjs +1 -193
- package/dist/components/biz/basics/fullscreen-feed/runtime/use-series-feed-controller.mjs +1 -212
- package/dist/components/biz/basics/fullscreen-feed/runtime/user-action.mjs +1 -270
- package/dist/components/biz/basics/fullscreen-feed/runtime/video-slide.mjs +1 -376
- package/dist/components/biz/basics/fullscreen-feed/schema/component.mjs +1 -14
- package/dist/components/biz/basics/fullscreen-feed/schema/data.schema.mjs +1 -11
- package/dist/components/biz/basics/fullscreen-feed/schema/event.schema.mjs +1 -13
- package/dist/components/biz/basics/fullscreen-feed/schema/index.mjs +1 -17
- package/dist/components/biz/basics/fullscreen-feed/schema/props.schema.mjs +1 -20
- package/dist/components/biz/basics/fullscreen-feed/schema/style.schema.mjs +1 -5
- package/dist/components/biz/basics/logo/variants/basic-logo/defaults/default-props.mjs +1 -19
- package/dist/components/biz/basics/logo/variants/basic-logo/index.mjs +1 -9
- package/dist/components/biz/basics/logo/variants/basic-logo/runtime/client.mjs +1 -171
- package/dist/components/biz/basics/logo/variants/basic-logo/schema/component.mjs +1 -14
- package/dist/components/biz/basics/logo/variants/basic-logo/schema/data.schema.mjs +1 -9
- package/dist/components/biz/basics/logo/variants/basic-logo/schema/event.schema.mjs +1 -23
- package/dist/components/biz/basics/logo/variants/basic-logo/schema/index.mjs +1 -17
- package/dist/components/biz/basics/logo/variants/basic-logo/schema/props.schema.mjs +1 -78
- package/dist/components/biz/basics/logo/variants/basic-logo/schema/style.schema.mjs +1 -7
- package/dist/components/biz/basics/search/shared/components/search-box.mjs +1 -56
- package/dist/components/biz/basics/search/shared/config/default-data.mjs +1 -15
- package/dist/components/biz/basics/search/shared/config/schema.mjs +1 -50
- package/dist/components/biz/basics/search/variants/basic-search/defaults/default-props.mjs +1 -10
- package/dist/components/biz/basics/search/variants/basic-search/index.mjs +1 -12
- package/dist/components/biz/basics/search/variants/basic-search/runtime/client.mjs +1 -33
- package/dist/components/biz/basics/search/variants/basic-search/schema/component.mjs +1 -14
- package/dist/components/biz/basics/search/variants/basic-search/schema/data.schema.mjs +1 -8
- package/dist/components/biz/basics/search/variants/basic-search/schema/event.schema.mjs +1 -7
- package/dist/components/biz/basics/search/variants/basic-search/schema/index.mjs +1 -17
- package/dist/components/biz/basics/search/variants/basic-search/schema/props.schema.mjs +1 -7
- package/dist/components/biz/basics/search/variants/basic-search/schema/style.schema.mjs +1 -7
- package/dist/components/biz/basics/search/variants/filter-search/defaults/default-props.mjs +1 -14
- package/dist/components/biz/basics/search/variants/filter-search/index.mjs +1 -12
- package/dist/components/biz/basics/search/variants/filter-search/runtime/client.mjs +1 -63
- package/dist/components/biz/basics/search/variants/filter-search/schema/component.mjs +1 -14
- package/dist/components/biz/basics/search/variants/filter-search/schema/data.schema.mjs +1 -8
- package/dist/components/biz/basics/search/variants/filter-search/schema/event.schema.mjs +1 -7
- package/dist/components/biz/basics/search/variants/filter-search/schema/index.mjs +1 -17
- package/dist/components/biz/basics/search/variants/filter-search/schema/props.schema.mjs +1 -22
- package/dist/components/biz/basics/search/variants/filter-search/schema/style.schema.mjs +1 -7
- package/dist/components/biz/basics/search/variants/simple-search/defaults/default-props.mjs +1 -10
- package/dist/components/biz/basics/search/variants/simple-search/index.mjs +1 -9
- package/dist/components/biz/basics/search/variants/simple-search/runtime/client.mjs +1 -37
- package/dist/components/biz/basics/search/variants/simple-search/schema/component.mjs +1 -14
- package/dist/components/biz/basics/search/variants/simple-search/schema/data.schema.mjs +1 -8
- package/dist/components/biz/basics/search/variants/simple-search/schema/event.schema.mjs +1 -7
- package/dist/components/biz/basics/search/variants/simple-search/schema/index.mjs +1 -17
- package/dist/components/biz/basics/search/variants/simple-search/schema/props.schema.mjs +1 -7
- package/dist/components/biz/basics/search/variants/simple-search/schema/style.schema.mjs +1 -7
- package/dist/components/biz/basics/search/variants/tag-search/defaults/default-props.mjs +1 -18
- package/dist/components/biz/basics/search/variants/tag-search/index.mjs +1 -9
- package/dist/components/biz/basics/search/variants/tag-search/runtime/client.mjs +1 -67
- package/dist/components/biz/basics/search/variants/tag-search/schema/component.mjs +1 -14
- package/dist/components/biz/basics/search/variants/tag-search/schema/data.schema.mjs +1 -8
- package/dist/components/biz/basics/search/variants/tag-search/schema/event.schema.mjs +1 -7
- package/dist/components/biz/basics/search/variants/tag-search/schema/index.mjs +1 -17
- package/dist/components/biz/basics/search/variants/tag-search/schema/props.schema.mjs +1 -37
- package/dist/components/biz/basics/search/variants/tag-search/schema/style.schema.mjs +1 -7
- package/dist/components/biz/business/advertisement/ad-match.mjs +1 -142
- package/dist/components/biz/business/advertisement/ad-provider.mjs +1 -50
- package/dist/components/biz/business/advertisement/ad-query.mjs +1 -39
- package/dist/components/biz/business/advertisement/ad-runtime-provider.mjs +1 -21
- package/dist/components/biz/business/advertisement/banner-ad/client.mjs +1 -274
- package/dist/components/biz/business/advertisement/banner-ad/material.mjs +1 -21
- package/dist/components/biz/business/advertisement/banner-ad/schema.mjs +1 -55
- package/dist/components/biz/business/advertisement/banner-ad/server.mjs +1 -24
- package/dist/components/biz/business/advertisement/feed-ad/index.mjs +1 -36
- package/dist/components/biz/business/advertisement/floating-ad/client.mjs +1 -109
- package/dist/components/biz/business/advertisement/floating-ad/material.mjs +1 -21
- package/dist/components/biz/business/advertisement/floating-ad/schema.mjs +1 -11
- package/dist/components/biz/business/advertisement/floating-ad/server.mjs +1 -24
- package/dist/components/biz/business/advertisement/icon-ad/client.mjs +1 -187
- package/dist/components/biz/business/advertisement/icon-ad/material.mjs +1 -21
- package/dist/components/biz/business/advertisement/icon-ad/schema.mjs +1 -42
- package/dist/components/biz/business/advertisement/icon-ad/server.mjs +1 -24
- package/dist/components/biz/business/advertisement/popup-ad/client.mjs +2 -203
- package/dist/components/biz/business/advertisement/popup-ad/material.mjs +1 -21
- package/dist/components/biz/business/advertisement/popup-ad/schema.mjs +1 -48
- package/dist/components/biz/business/advertisement/popup-ad/server.mjs +1 -24
- package/dist/components/biz/business/advertisement/text-ad/client.mjs +1 -370
- package/dist/components/biz/business/advertisement/text-ad/material.mjs +1 -21
- package/dist/components/biz/business/advertisement/text-ad/schema.mjs +1 -34
- package/dist/components/biz/business/advertisement/text-ad/server.mjs +1 -24
- package/dist/components/biz/business/banner/variants/basic-banner/defaults/default-props.mjs +1 -15
- package/dist/components/biz/business/banner/variants/basic-banner/index.mjs +1 -12
- package/dist/components/biz/business/banner/variants/basic-banner/inspector-schema.mjs +1 -62
- package/dist/components/biz/business/banner/variants/basic-banner/material.mjs +1 -21
- package/dist/components/biz/business/banner/variants/basic-banner/runtime/client.mjs +1 -140
- package/dist/components/biz/business/banner/variants/basic-banner/schema/component.mjs +1 -14
- package/dist/components/biz/business/banner/variants/basic-banner/schema/data.schema.mjs +1 -53
- package/dist/components/biz/business/banner/variants/basic-banner/schema/event.schema.mjs +1 -5
- package/dist/components/biz/business/banner/variants/basic-banner/schema/index.mjs +1 -17
- package/dist/components/biz/business/banner/variants/basic-banner/schema/props.schema.mjs +1 -40
- package/dist/components/biz/business/banner/variants/basic-banner/schema/style.schema.mjs +1 -7
- package/dist/components/biz/business/banner/variants/basic-banner/server.mjs +1 -25
- package/dist/components/biz/business/banner-carousel/client.mjs +1 -133
- package/dist/components/biz/business/banner-carousel/default-props.mjs +1 -15
- package/dist/components/biz/business/banner-carousel/material.mjs +1 -22
- package/dist/components/biz/business/banner-carousel/schema.mjs +1 -94
- package/dist/components/biz/business/banner-carousel/server.mjs +1 -87
- package/dist/components/biz/business/card-grid/variants/card-grid-2x3/defaults/default-props.mjs +1 -8
- package/dist/components/biz/business/card-grid/variants/card-grid-2x3/index.mjs +1 -9
- package/dist/components/biz/business/card-grid/variants/card-grid-2x3/runtime/client.mjs +1 -41
- package/dist/components/biz/business/card-grid/variants/card-grid-2x3/schema/component.mjs +1 -14
- package/dist/components/biz/business/card-grid/variants/card-grid-2x3/schema/data.schema.mjs +1 -8
- package/dist/components/biz/business/card-grid/variants/card-grid-2x3/schema/event.schema.mjs +1 -5
- package/dist/components/biz/business/card-grid/variants/card-grid-2x3/schema/index.mjs +1 -17
- package/dist/components/biz/business/card-grid/variants/card-grid-2x3/schema/props.schema.mjs +1 -12
- package/dist/components/biz/business/card-grid/variants/card-grid-2x3/schema/style.schema.mjs +1 -7
- package/dist/components/biz/business/card-grid/variants/card-grid-2x3-infinite/defaults/default-props.mjs +1 -8
- package/dist/components/biz/business/card-grid/variants/card-grid-2x3-infinite/index.mjs +1 -9
- package/dist/components/biz/business/card-grid/variants/card-grid-2x3-infinite/runtime/client.mjs +1 -106
- package/dist/components/biz/business/card-grid/variants/card-grid-2x3-infinite/schema/component.mjs +1 -14
- package/dist/components/biz/business/card-grid/variants/card-grid-2x3-infinite/schema/data.schema.mjs +1 -8
- package/dist/components/biz/business/card-grid/variants/card-grid-2x3-infinite/schema/event.schema.mjs +1 -5
- package/dist/components/biz/business/card-grid/variants/card-grid-2x3-infinite/schema/index.mjs +1 -17
- package/dist/components/biz/business/card-grid/variants/card-grid-2x3-infinite/schema/props.schema.mjs +1 -12
- package/dist/components/biz/business/card-grid/variants/card-grid-2x3-infinite/schema/style.schema.mjs +1 -7
- package/dist/components/biz/business/card-grid/variants/card-grid-2x4/defaults/default-props.mjs +1 -8
- package/dist/components/biz/business/card-grid/variants/card-grid-2x4/index.mjs +1 -9
- package/dist/components/biz/business/card-grid/variants/card-grid-2x4/runtime/client.mjs +1 -41
- package/dist/components/biz/business/card-grid/variants/card-grid-2x4/schema/component.mjs +1 -14
- package/dist/components/biz/business/card-grid/variants/card-grid-2x4/schema/data.schema.mjs +1 -8
- package/dist/components/biz/business/card-grid/variants/card-grid-2x4/schema/event.schema.mjs +1 -5
- package/dist/components/biz/business/card-grid/variants/card-grid-2x4/schema/index.mjs +1 -17
- package/dist/components/biz/business/card-grid/variants/card-grid-2x4/schema/props.schema.mjs +1 -12
- package/dist/components/biz/business/card-grid/variants/card-grid-2x4/schema/style.schema.mjs +1 -7
- package/dist/components/biz/business/card-grid/variants/card-grid-3x3/defaults/default-props.mjs +1 -8
- package/dist/components/biz/business/card-grid/variants/card-grid-3x3/index.mjs +1 -9
- package/dist/components/biz/business/card-grid/variants/card-grid-3x3/runtime/client.mjs +1 -41
- package/dist/components/biz/business/card-grid/variants/card-grid-3x3/schema/component.mjs +1 -14
- package/dist/components/biz/business/card-grid/variants/card-grid-3x3/schema/data.schema.mjs +1 -8
- package/dist/components/biz/business/card-grid/variants/card-grid-3x3/schema/event.schema.mjs +1 -5
- package/dist/components/biz/business/card-grid/variants/card-grid-3x3/schema/index.mjs +1 -17
- package/dist/components/biz/business/card-grid/variants/card-grid-3x3/schema/props.schema.mjs +1 -12
- package/dist/components/biz/business/card-grid/variants/card-grid-3x3/schema/style.schema.mjs +1 -7
- package/dist/components/biz/business/card-grid/variants/card-grid-3x3-infinite/defaults/default-props.mjs +1 -8
- package/dist/components/biz/business/card-grid/variants/card-grid-3x3-infinite/index.mjs +1 -9
- package/dist/components/biz/business/card-grid/variants/card-grid-3x3-infinite/runtime/client.mjs +1 -106
- package/dist/components/biz/business/card-grid/variants/card-grid-3x3-infinite/schema/component.mjs +1 -14
- package/dist/components/biz/business/card-grid/variants/card-grid-3x3-infinite/schema/data.schema.mjs +1 -8
- package/dist/components/biz/business/card-grid/variants/card-grid-3x3-infinite/schema/event.schema.mjs +1 -5
- package/dist/components/biz/business/card-grid/variants/card-grid-3x3-infinite/schema/index.mjs +1 -17
- package/dist/components/biz/business/card-grid/variants/card-grid-3x3-infinite/schema/props.schema.mjs +1 -12
- package/dist/components/biz/business/card-grid/variants/card-grid-3x3-infinite/schema/style.schema.mjs +1 -7
- package/dist/components/biz/business/channel-list/channel-filter-dialog.mjs +1 -190
- package/dist/components/biz/business/channel-list/client.mjs +1 -157
- package/dist/components/biz/business/channel-list/default-props.mjs +1 -13
- package/dist/components/biz/business/channel-list/material.mjs +1 -21
- package/dist/components/biz/business/channel-list/schema.mjs +1 -40
- package/dist/components/biz/business/comment/comment-input.mjs +5 -772
- package/dist/components/biz/business/comment/comment-item.mjs +1 -182
- package/dist/components/biz/business/comment/comment-list.mjs +1 -722
- package/dist/components/biz/business/comment/comment-media.mjs +1 -57
- package/dist/components/biz/business/comment/comment-rich-text.mjs +1 -69
- package/dist/components/biz/business/comment/reply-detail.mjs +1 -969
- package/dist/components/biz/business/comment/time-display.mjs +1 -20
- package/dist/components/biz/business/comment/use-keyboard-handler.mjs +1 -142
- package/dist/components/biz/business/contact/contact-item.mjs +1 -45
- package/dist/components/biz/business/contact/contact-list.mjs +1 -212
- package/dist/components/biz/business/contact/contact-search.mjs +1 -128
- package/dist/components/biz/business/detail/shared/detail-follow-action.mjs +1 -114
- package/dist/components/biz/business/detail/shared/detail-info-tags.mjs +1 -33
- package/dist/components/biz/business/detail/shared/detail-info-title.mjs +1 -84
- package/dist/components/biz/business/detail/shared/detail-operate.mjs +1 -432
- package/dist/components/biz/business/detail/shared/detail-structured-data.mjs +1 -63
- package/dist/components/biz/business/detail/shared/editor-preview.mjs +1 -67
- package/dist/components/biz/business/detail/shared/material-route-context.mjs +1 -44
- package/dist/components/biz/business/detail/shared/metadata-utils.mjs +1 -21
- package/dist/components/biz/business/detail/shared/post-recommend-list.mjs +1 -184
- package/dist/components/biz/business/detail/shared/registry.mjs +1 -55
- package/dist/components/biz/business/detail/shared/runtime-context-provider.mjs +1 -225
- package/dist/components/biz/business/detail/shared/seo-config.mjs +1 -28
- package/dist/components/biz/business/detail/shared/use-video-detail-webview-bridge.mjs +1 -320
- package/dist/components/biz/business/detail/shared/video-detail-server-data.mjs +1 -46
- package/dist/components/biz/business/detail/shared/video-hero.mjs +1 -902
- package/dist/components/biz/business/detail/video-detail-actions/client.mjs +1 -97
- package/dist/components/biz/business/detail/video-detail-actions/material.mjs +1 -18
- package/dist/components/biz/business/detail/video-detail-actions/schema.mjs +1 -11
- package/dist/components/biz/business/detail/video-detail-actions/server.mjs +1 -47
- package/dist/components/biz/business/detail/video-detail-info/client.mjs +1 -201
- package/dist/components/biz/business/detail/video-detail-info/material.mjs +1 -18
- package/dist/components/biz/business/detail/video-detail-info/schema.mjs +1 -14
- package/dist/components/biz/business/detail/video-detail-info/server.mjs +1 -45
- package/dist/components/biz/business/detail/video-detail-info-title-tags-episodes/client.mjs +1 -51
- package/dist/components/biz/business/detail/video-detail-info-title-tags-episodes/material.mjs +1 -18
- package/dist/components/biz/business/detail/video-detail-info-title-tags-episodes/schema.mjs +1 -14
- package/dist/components/biz/business/detail/video-detail-info-title-tags-episodes/server.mjs +1 -45
- package/dist/components/biz/business/detail/video-detail-player/client.mjs +1 -136
- package/dist/components/biz/business/detail/video-detail-player/material.mjs +1 -18
- package/dist/components/biz/business/detail/video-detail-player/schema.mjs +1 -11
- package/dist/components/biz/business/detail/video-detail-player/server.mjs +1 -17
- package/dist/components/biz/business/detail/video-detail-player-bridge-only/client.mjs +1 -17
- package/dist/components/biz/business/detail/video-detail-player-bridge-only/material.mjs +1 -18
- package/dist/components/biz/business/detail/video-detail-player-bridge-only/schema.mjs +1 -13
- package/dist/components/biz/business/detail/video-detail-player-bridge-only/server.mjs +1 -17
- package/dist/components/biz/business/detail/video-detail-recommend/client.mjs +1 -89
- package/dist/components/biz/business/detail/video-detail-recommend/material.mjs +1 -18
- package/dist/components/biz/business/detail/video-detail-recommend/schema.mjs +1 -35
- package/dist/components/biz/business/detail/video-detail-recommend/server.mjs +1 -35
- package/dist/components/biz/business/detail/video-detail-recommend/shared.mjs +1 -548
- package/dist/components/biz/business/detail/video-detail-recommend/utils.mjs +1 -60
- package/dist/components/biz/business/feature-grid/variants/basic-feature-grid/defaults/default-props.mjs +1 -12
- package/dist/components/biz/business/feature-grid/variants/basic-feature-grid/index.mjs +1 -9
- package/dist/components/biz/business/feature-grid/variants/basic-feature-grid/runtime/client.mjs +1 -66
- package/dist/components/biz/business/feature-grid/variants/basic-feature-grid/schema/component.mjs +1 -14
- package/dist/components/biz/business/feature-grid/variants/basic-feature-grid/schema/data.schema.mjs +1 -43
- package/dist/components/biz/business/feature-grid/variants/basic-feature-grid/schema/event.schema.mjs +1 -5
- package/dist/components/biz/business/feature-grid/variants/basic-feature-grid/schema/index.mjs +1 -17
- package/dist/components/biz/business/feature-grid/variants/basic-feature-grid/schema/props.schema.mjs +1 -32
- package/dist/components/biz/business/feature-grid/variants/basic-feature-grid/schema/style.schema.mjs +1 -7
- package/dist/components/biz/business/floating-ball/client.mjs +1 -31
- package/dist/components/biz/business/floating-ball/material.mjs +1 -18
- package/dist/components/biz/business/floating-ball/schema.mjs +1 -20
- package/dist/components/biz/business/floating-ball/server.mjs +1 -17
- package/dist/components/biz/business/fullscreen-feed/variants/fullscreen-post-feed/defaults/default-props.mjs +1 -11
- package/dist/components/biz/business/fullscreen-feed/variants/fullscreen-post-feed/index.mjs +1 -9
- package/dist/components/biz/business/fullscreen-feed/variants/fullscreen-post-feed/runtime/client.mjs +1 -71
- package/dist/components/biz/business/fullscreen-feed/variants/fullscreen-post-feed/schema/component.mjs +1 -14
- package/dist/components/biz/business/fullscreen-feed/variants/fullscreen-post-feed/schema/data.schema.mjs +1 -11
- package/dist/components/biz/business/fullscreen-feed/variants/fullscreen-post-feed/schema/index.mjs +1 -17
- package/dist/components/biz/business/fullscreen-feed/variants/fullscreen-video-feed/defaults/default-props.mjs +1 -11
- package/dist/components/biz/business/fullscreen-feed/variants/fullscreen-video-feed/index.mjs +1 -9
- package/dist/components/biz/business/fullscreen-feed/variants/fullscreen-video-feed/runtime/client.mjs +1 -64
- package/dist/components/biz/business/fullscreen-feed/variants/fullscreen-video-feed/schema/component.mjs +1 -14
- package/dist/components/biz/business/fullscreen-feed/variants/fullscreen-video-feed/schema/data.schema.mjs +1 -11
- package/dist/components/biz/business/fullscreen-feed/variants/fullscreen-video-feed/schema/index.mjs +1 -17
- package/dist/components/biz/business/fullscreen-feed/variants/shared/runtime-compat.mjs +1 -522
- package/dist/components/biz/business/header-search/header-avatar-icon/client.mjs +1 -21
- package/dist/components/biz/business/header-search/header-avatar-icon/material.mjs +1 -18
- package/dist/components/biz/business/header-search/header-avatar-icon/schema.mjs +1 -11
- package/dist/components/biz/business/header-search/header-avatar-icon/server.mjs +1 -17
- package/dist/components/biz/business/header-search/header-avatar-logo-search/client.mjs +1 -142
- package/dist/components/biz/business/header-search/header-avatar-logo-search/material.mjs +1 -18
- package/dist/components/biz/business/header-search/header-avatar-logo-search/schema.mjs +1 -23
- package/dist/components/biz/business/header-search/header-avatar-logo-search/server.mjs +1 -17
- package/dist/components/biz/business/header-search/header-avatar-logo-search-icon/client.mjs +1 -38
- package/dist/components/biz/business/header-search/header-avatar-logo-search-icon/material.mjs +1 -18
- package/dist/components/biz/business/header-search/header-avatar-logo-search-icon/schema.mjs +1 -20
- package/dist/components/biz/business/header-search/header-avatar-logo-search-icon/server.mjs +1 -17
- package/dist/components/biz/business/header-search/header-logo-search/client.mjs +1 -32
- package/dist/components/biz/business/header-search/header-logo-search/material.mjs +1 -18
- package/dist/components/biz/business/header-search/header-logo-search/schema.mjs +1 -22
- package/dist/components/biz/business/header-search/header-logo-search/server.mjs +1 -17
- package/dist/components/biz/business/header-search/header-search/client.mjs +1 -19
- package/dist/components/biz/business/header-search/header-search/material.mjs +1 -18
- package/dist/components/biz/business/header-search/header-search/schema.mjs +1 -11
- package/dist/components/biz/business/header-search/header-search/server.mjs +1 -17
- package/dist/components/biz/business/header-search/shared/avatar.mjs +1 -53
- package/dist/components/biz/business/header-search/shared/header-action.mjs +1 -29
- package/dist/components/biz/business/header-search/shared/header-search-icon.mjs +1 -26
- package/dist/components/biz/business/header-search/shared/header-shell.mjs +1 -21
- package/dist/components/biz/business/header-search/shared/logo.mjs +1 -25
- package/dist/components/biz/business/header-search/shared/search.mjs +1 -47
- package/dist/components/biz/business/home-recommend/home-recommend-grid/client.mjs +1 -48
- package/dist/components/biz/business/home-recommend/home-recommend-grid/index.mjs +1 -14
- package/dist/components/biz/business/home-recommend/home-recommend-grid/inspector-schema.mjs +1 -229
- package/dist/components/biz/business/home-recommend/home-recommend-grid/material.mjs +1 -18
- package/dist/components/biz/business/home-recommend/home-recommend-grid/schema.mjs +1 -24
- package/dist/components/biz/business/home-recommend/home-recommend-grid/server.mjs +1 -48
- package/dist/components/biz/business/home-recommend/home-recommend-waterfall/client.mjs +1 -47
- package/dist/components/biz/business/home-recommend/home-recommend-waterfall/index.mjs +1 -14
- package/dist/components/biz/business/home-recommend/home-recommend-waterfall/inspector-schema.mjs +1 -211
- package/dist/components/biz/business/home-recommend/home-recommend-waterfall/material.mjs +1 -18
- package/dist/components/biz/business/home-recommend/home-recommend-waterfall/schema.mjs +1 -24
- package/dist/components/biz/business/home-recommend/home-recommend-waterfall/server.mjs +1 -42
- package/dist/components/biz/business/home-recommend/shared/home-recommend-base.mjs +1 -890
- package/dist/components/biz/business/home-recommend/shared/home-recommend-default-config.mjs +1 -24
- package/dist/components/biz/business/home-recommend/shared/home-recommend-play-count.mjs +1 -31
- package/dist/components/biz/business/home-recommend/shared/home-recommend-preview.mjs +1 -178
- package/dist/components/biz/business/home-recommend/shared/home-recommend-runtime-props.mjs +1 -47
- package/dist/components/biz/business/home-recommend/shared/home-recommend-server-data.mjs +1 -336
- package/dist/components/biz/business/home-recommend/shared/home-recommend-smart-layout.mjs +1 -73
- package/dist/components/biz/business/home-recommend/shared/home-recommend-smart-tag.mjs +1 -21
- package/dist/components/biz/business/home-recommend/shared/home-recommend-video-detail.mjs +1 -73
- package/dist/components/biz/business/image-text-recommend/client.mjs +1 -436
- package/dist/components/biz/business/image-text-recommend/material.mjs +1 -21
- package/dist/components/biz/business/image-text-recommend/schema.mjs +1 -79
- package/dist/components/biz/business/image-text-recommend/server.mjs +1 -53
- package/dist/components/biz/business/image-text-recommend/shared/query.mjs +1 -33
- package/dist/components/biz/business/large-feature-grid/card-item.mjs +1 -106
- package/dist/components/biz/business/large-feature-grid/client.mjs +1 -256
- package/dist/components/biz/business/large-feature-grid/material.mjs +1 -21
- package/dist/components/biz/business/large-feature-grid/schema.mjs +1 -127
- package/dist/components/biz/business/large-feature-grid/server.mjs +1 -16
- package/dist/components/biz/business/marquee/client.mjs +1 -303
- package/dist/components/biz/business/marquee/material.mjs +1 -21
- package/dist/components/biz/business/marquee/schema.mjs +1 -86
- package/dist/components/biz/business/marquee/server.mjs +1 -17
- package/dist/components/biz/business/nav-bar/variants/basic-nav-bar/defaults/default-props.mjs +1 -21
- package/dist/components/biz/business/nav-bar/variants/basic-nav-bar/index.mjs +1 -9
- package/dist/components/biz/business/nav-bar/variants/basic-nav-bar/runtime/channel-filter-dialog.mjs +1 -180
- package/dist/components/biz/business/nav-bar/variants/basic-nav-bar/runtime/client.mjs +1 -159
- package/dist/components/biz/business/nav-bar/variants/basic-nav-bar/schema/component.mjs +1 -14
- package/dist/components/biz/business/nav-bar/variants/basic-nav-bar/schema/data.schema.mjs +1 -9
- package/dist/components/biz/business/nav-bar/variants/basic-nav-bar/schema/event.schema.mjs +1 -27
- package/dist/components/biz/business/nav-bar/variants/basic-nav-bar/schema/index.mjs +1 -17
- package/dist/components/biz/business/nav-bar/variants/basic-nav-bar/schema/props.schema.mjs +1 -92
- package/dist/components/biz/business/nav-bar/variants/basic-nav-bar/schema/style.schema.mjs +1 -7
- package/dist/components/biz/business/post-card/variants/basic-post-card/defaults/default-props.mjs +1 -8
- package/dist/components/biz/business/post-card/variants/basic-post-card/index.mjs +1 -9
- package/dist/components/biz/business/post-card/variants/basic-post-card/runtime/client.mjs +1 -119
- package/dist/components/biz/business/post-card/variants/basic-post-card/schema/component.mjs +1 -14
- package/dist/components/biz/business/post-card/variants/basic-post-card/schema/data.schema.mjs +1 -8
- package/dist/components/biz/business/post-card/variants/basic-post-card/schema/event.schema.mjs +1 -5
- package/dist/components/biz/business/post-card/variants/basic-post-card/schema/index.mjs +1 -17
- package/dist/components/biz/business/post-card/variants/basic-post-card/schema/props.schema.mjs +1 -5
- package/dist/components/biz/business/post-card/variants/basic-post-card/schema/style.schema.mjs +1 -7
- package/dist/components/biz/business/profile/profile-header/client.mjs +1 -343
- package/dist/components/biz/business/profile/profile-header/material.mjs +1 -59
- package/dist/components/biz/business/profile/profile-header/schema.mjs +1 -11
- package/dist/components/biz/business/profile/profile-header/user-profile-avatar.mjs +1 -262
- package/dist/components/biz/business/profile/profile-header/user-profile-cover-background.mjs +1 -182
- package/dist/components/biz/business/profile/profile-main/client.mjs +1 -235
- package/dist/components/biz/business/profile/profile-main/empty-state.mjs +1 -43
- package/dist/components/biz/business/profile/profile-main/material.mjs +1 -18
- package/dist/components/biz/business/profile/profile-main/schema.mjs +1 -11
- package/dist/components/biz/business/profile/profile-main/server.mjs +1 -13
- package/dist/components/biz/business/profile/profile-main/shell.mjs +1 -275
- package/dist/components/biz/business/profile/profile-main/tabs/collect-tab/client.mjs +1 -747
- package/dist/components/biz/business/profile/profile-main/tabs/collect-tab/server.mjs +1 -13
- package/dist/components/biz/business/profile/profile-main/tabs/collect-tab/video-waterfall.mjs +1 -178
- package/dist/components/biz/business/profile/profile-main/tabs/history-tab/client.mjs +1 -259
- package/dist/components/biz/business/profile/profile-main/tabs/history-tab/server.mjs +1 -13
- package/dist/components/biz/business/profile/profile-main/tabs/like-tab/client.mjs +1 -258
- package/dist/components/biz/business/profile/profile-main/tabs/like-tab/server.mjs +1 -13
- package/dist/components/biz/business/profile/profile-main/tabs/publish-tab/client.mjs +1 -149
- package/dist/components/biz/business/profile/profile-main/tabs/publish-tab/server.mjs +1 -13
- package/dist/components/biz/business/profile/profile-main/utils.mjs +1 -266
- package/dist/components/biz/business/profile/profile-main/variants.mjs +1 -40
- package/dist/components/biz/business/profile/tracking.mjs +1 -19
- package/dist/components/biz/business/recommended-users/variants/basic-recommended-users/defaults/default-props.mjs +1 -15
- package/dist/components/biz/business/recommended-users/variants/basic-recommended-users/index.mjs +1 -9
- package/dist/components/biz/business/recommended-users/variants/basic-recommended-users/runtime/client.mjs +1 -168
- package/dist/components/biz/business/recommended-users/variants/basic-recommended-users/runtime/recommended-users-skeleton.mjs +1 -119
- package/dist/components/biz/business/recommended-users/variants/basic-recommended-users/schema/component.mjs +1 -14
- package/dist/components/biz/business/recommended-users/variants/basic-recommended-users/schema/data.schema.mjs +1 -9
- package/dist/components/biz/business/recommended-users/variants/basic-recommended-users/schema/event.schema.mjs +1 -17
- package/dist/components/biz/business/recommended-users/variants/basic-recommended-users/schema/index.mjs +1 -17
- package/dist/components/biz/business/recommended-users/variants/basic-recommended-users/schema/props.schema.mjs +1 -54
- package/dist/components/biz/business/recommended-users/variants/basic-recommended-users/schema/style.schema.mjs +1 -7
- package/dist/components/biz/business/search-bar/variants/basic-search-bar/defaults/default-props.mjs +1 -15
- package/dist/components/biz/business/search-bar/variants/basic-search-bar/index.mjs +1 -9
- package/dist/components/biz/business/search-bar/variants/basic-search-bar/runtime/client.mjs +1 -54
- package/dist/components/biz/business/search-bar/variants/basic-search-bar/schema/component.mjs +1 -14
- package/dist/components/biz/business/search-bar/variants/basic-search-bar/schema/data.schema.mjs +1 -9
- package/dist/components/biz/business/search-bar/variants/basic-search-bar/schema/event.schema.mjs +1 -5
- package/dist/components/biz/business/search-bar/variants/basic-search-bar/schema/index.mjs +1 -17
- package/dist/components/biz/business/search-bar/variants/basic-search-bar/schema/props.schema.mjs +1 -117
- package/dist/components/biz/business/search-bar/variants/basic-search-bar/schema/style.schema.mjs +1 -7
- package/dist/components/biz/business/search-bar/variants/detail-search-bar/defaults/default-props.mjs +1 -22
- package/dist/components/biz/business/search-bar/variants/detail-search-bar/index.mjs +1 -9
- package/dist/components/biz/business/search-bar/variants/detail-search-bar/runtime/client.mjs +1 -53
- package/dist/components/biz/business/search-bar/variants/detail-search-bar/schema/component.mjs +1 -14
- package/dist/components/biz/business/search-bar/variants/detail-search-bar/schema/data.schema.mjs +1 -9
- package/dist/components/biz/business/search-bar/variants/detail-search-bar/schema/event.schema.mjs +1 -5
- package/dist/components/biz/business/search-bar/variants/detail-search-bar/schema/index.mjs +1 -17
- package/dist/components/biz/business/search-bar/variants/detail-search-bar/schema/props.schema.mjs +1 -117
- package/dist/components/biz/business/search-bar/variants/detail-search-bar/schema/style.schema.mjs +1 -7
- package/dist/components/biz/business/search-bar/variants/filter-search-bar/defaults/default-props.mjs +1 -15
- package/dist/components/biz/business/search-bar/variants/filter-search-bar/index.mjs +1 -9
- package/dist/components/biz/business/search-bar/variants/filter-search-bar/runtime/client.mjs +1 -52
- package/dist/components/biz/business/search-bar/variants/filter-search-bar/schema/component.mjs +1 -14
- package/dist/components/biz/business/search-bar/variants/filter-search-bar/schema/data.schema.mjs +1 -9
- package/dist/components/biz/business/search-bar/variants/filter-search-bar/schema/event.schema.mjs +1 -25
- package/dist/components/biz/business/search-bar/variants/filter-search-bar/schema/index.mjs +1 -17
- package/dist/components/biz/business/search-bar/variants/filter-search-bar/schema/props.schema.mjs +1 -128
- package/dist/components/biz/business/search-bar/variants/filter-search-bar/schema/style.schema.mjs +1 -7
- package/dist/components/biz/business/search-bar/variants/tag-search-bar/defaults/default-props.mjs +1 -15
- package/dist/components/biz/business/search-bar/variants/tag-search-bar/index.mjs +1 -12
- package/dist/components/biz/business/search-bar/variants/tag-search-bar/runtime/client.mjs +1 -58
- package/dist/components/biz/business/search-bar/variants/tag-search-bar/schema/component.mjs +1 -14
- package/dist/components/biz/business/search-bar/variants/tag-search-bar/schema/data.schema.mjs +1 -9
- package/dist/components/biz/business/search-bar/variants/tag-search-bar/schema/event.schema.mjs +1 -38
- package/dist/components/biz/business/search-bar/variants/tag-search-bar/schema/index.mjs +1 -17
- package/dist/components/biz/business/search-bar/variants/tag-search-bar/schema/props.schema.mjs +1 -144
- package/dist/components/biz/business/search-bar/variants/tag-search-bar/schema/style.schema.mjs +1 -7
- package/dist/components/biz/business/search-history/client.mjs +1 -182
- package/dist/components/biz/business/search-history/material.mjs +1 -18
- package/dist/components/biz/business/search-history/schema.mjs +1 -16
- package/dist/components/biz/business/search-history/server.mjs +1 -17
- package/dist/components/biz/business/search-input/client.mjs +1 -115
- package/dist/components/biz/business/search-input/material.mjs +1 -18
- package/dist/components/biz/business/search-input/schema.mjs +1 -11
- package/dist/components/biz/business/search-input/server.mjs +1 -17
- package/dist/components/biz/business/shortcut-grid/client.mjs +1 -86
- package/dist/components/biz/business/shortcut-grid/material.mjs +1 -18
- package/dist/components/biz/business/shortcut-grid/schema.mjs +1 -65
- package/dist/components/biz/business/shortcut-grid/server.mjs +1 -17
- package/dist/components/biz/business/tab-bar/client.mjs +1 -157
- package/dist/components/biz/business/tab-bar/material.mjs +1 -21
- package/dist/components/biz/business/tab-bar/schema.mjs +1 -11
- package/dist/components/biz/business/tab-bar/server.mjs +1 -17
- package/dist/components/biz/business/text-recommend/client.mjs +1 -104
- package/dist/components/biz/business/text-recommend/material.mjs +1 -18
- package/dist/components/biz/business/text-recommend/schema.mjs +1 -25
- package/dist/components/biz/business/text-recommend/server.mjs +1 -18
- package/dist/components/biz/example/button/client.mjs +1 -43
- package/dist/components/biz/example/button/material.mjs +1 -18
- package/dist/components/biz/example/button/schema.mjs +1 -44
- package/dist/components/biz/example/button/server.mjs +1 -32
- package/dist/components/biz/example/button/variants.mjs +1 -22
- package/dist/components/biz/renderer/renderer.mjs +1 -73
- package/dist/components/biz/utils/constants/card-spec.mjs +1 -48
- package/dist/components/biz/utils/helpers/get-channel-list.mjs +1 -14
- package/dist/components/biz/utils/helpers/url.mjs +1 -16
- package/dist/components/biz/utils/schema/data.mjs +1 -22
- package/dist/components/biz/utils/styles/helpers.mjs +1 -84
- package/dist/components/biz/utils/styles/schema.mjs +1 -306
- package/dist/components/biz/utils/transformers/card-grid.mjs +1 -67
- package/dist/components/biz/utils/transformers/data.mjs +1 -171
- package/dist/components/common/analytics-init/analytics-init.mjs +1 -75
- package/dist/components/common/analytics-init/page-lifecycle-tracker.mjs +1 -248
- package/dist/components/common/analytics-init/sensor-init.mjs +1 -126
- package/dist/components/common/at-element/index.mjs +1 -47
- package/dist/components/common/background-preview-modal/background-preview-modal.mjs +1 -73
- package/dist/components/common/blocked-dialog/blocked-dialog.mjs +1 -54
- package/dist/components/common/cards/mini-three-card.mjs +1 -55
- package/dist/components/common/cards/style.module.mjs +24 -12
- package/dist/components/common/collection-popup/create-collection-sheet.mjs +1 -271
- package/dist/components/common/collection-popup/index.mjs +1 -293
- package/dist/components/common/debug-locale-switcher/index.mjs +1 -59
- package/dist/components/common/delete-confirm-dialog/delete-confirm-dialog.mjs +1 -66
- package/dist/components/common/empty/index.mjs +1 -51
- package/dist/components/common/follow-button/index.mjs +1 -133
- package/dist/components/common/follow-button/unfollow-confirm-dialog.mjs +1 -23
- package/dist/components/common/funhub-provider/funhub-provider.mjs +1 -50
- package/dist/components/common/header-nav/client.mjs +1 -51
- package/dist/components/common/icons/add.mjs +1 -21
- package/dist/components/common/icons/comment.mjs +1 -30
- package/dist/components/common/icons/delete.mjs +1 -32
- package/dist/components/common/icons/left-arrow.mjs +1 -15
- package/dist/components/common/icons/more.mjs +1 -30
- package/dist/components/common/icons/right-arrow.mjs +1 -19
- package/dist/components/common/icons/setting.mjs +1 -27
- package/dist/components/common/icons/share.mjs +1 -20
- package/dist/components/common/icons/video.mjs +1 -22
- package/dist/components/common/image-crop-modal/image-crop-modal.mjs +2 -128
- package/dist/components/common/info-card/card-header.mjs +1 -71
- package/dist/components/common/info-card/card-text.mjs +1 -49
- package/dist/components/common/interaction-animations.module.mjs +84 -14
- package/dist/components/common/intl-provider/intl-provider.mjs +1 -21
- package/dist/components/common/keep-scroll-position/index.mjs +1 -39
- package/dist/components/common/list/collection-list/collection-list-item.mjs +1 -139
- package/dist/components/common/list/collection-list/collection-list.mjs +1 -27
- package/dist/components/common/list/collection-list/collection-select-icon.mjs +1 -53
- package/dist/components/common/list/post-list/post-list-item.mjs +1 -54
- package/dist/components/common/list/post-list/post-list.mjs +1 -143
- package/dist/components/common/list/user-activity-list/user-activity-list-actions.mjs +1 -269
- package/dist/components/common/list/user-activity-list/user-activity-list-item.mjs +1 -469
- package/dist/components/common/list/user-activity-list/user-activity-list.mjs +1 -143
- package/dist/components/common/list/video-list/video-list-item.mjs +1 -100
- package/dist/components/common/list/video-list/video-list.mjs +1 -152
- package/dist/components/common/list/waterfall-recommend/recommend-badge-style.mjs +1 -18
- package/dist/components/common/list/waterfall-recommend/waterfall-recommend-display.mjs +1 -26
- package/dist/components/common/list/waterfall-recommend/waterfall-recommend.mjs +1 -183
- package/dist/components/common/locale-sync/locale-sync.mjs +1 -62
- package/dist/components/common/login-dialog/login-dialog.mjs +1 -46
- package/dist/components/common/media-preview/index.mjs +1 -162
- package/dist/components/common/media-preview/video-play.mjs +1 -237
- package/dist/components/common/page-loading/index.mjs +1 -20
- package/dist/components/common/page-skeleton/page-skeleton.mjs +1 -7
- package/dist/components/common/photo-grid/common-photo-grid.mjs +1 -321
- package/dist/components/common/photo-grid/index.mjs +1 -226
- package/dist/components/common/photo-preview/common-photo-preview.mjs +1 -97
- package/dist/components/common/photo-preview/decrypt-loading.mjs +2 -66
- package/dist/components/common/photo-preview/index.mjs +1 -64
- package/dist/components/common/photo-preview/style.mjs +19 -7
- package/dist/components/common/picker/gender-picker/gender-picker.mjs +1 -66
- package/dist/components/common/picker/picker-drawer/picker-drawer.mjs +1 -78
- package/dist/components/common/popup-video/index.mjs +1 -98
- package/dist/components/common/popup-video/popup-video.module.mjs +16 -7
- package/dist/components/common/series-episodes/index.mjs +1 -826
- package/dist/components/common/share-popup/share-content.mjs +1 -155
- package/dist/components/common/share-popup/share-drawer.mjs +1 -100
- package/dist/components/common/share-popup/share-popup.mjs +1 -326
- package/dist/components/common/skeleton/post-list-item-skeleton.mjs +1 -99
- package/dist/components/common/skeleton/user-activity-list-item-skeleton.mjs +1 -146
- package/dist/components/common/skeleton/video-list-item-skeleton.mjs +1 -110
- package/dist/components/common/tab-bar/index.mjs +1 -150
- package/dist/components/common/theme-sync/index.mjs +1 -22
- package/dist/components/common/top-nav-bar/client.mjs +1 -70
- package/dist/components/common/top-nav-bar/fullscreen.mjs +1 -27
- package/dist/components/common/top-nav-bar/index.mjs +1 -29
- package/dist/components/common/top-nav-bar/normal.mjs +1 -20
- package/dist/components/common/user-info-initializer/index.mjs +1 -37
- package/dist/components/common/video-player/create-video.mjs +2 -27
- package/dist/components/common/video-player/index.mjs +5 -700
- package/dist/components/common/video-player/playing-videos.mjs +1 -73
- package/dist/components/common/video-player/preroll-skip-button-content.mjs +1 -20
- package/dist/components/common/video-player/process-m3u8-cache.mjs +1 -281
- package/dist/components/common/video-player/style.module.mjs +260 -7
- package/dist/components/common/video-player/video-blind-ad-overlay.mjs +1 -155
- package/dist/components/common/video-player/video-player-ref-context.mjs +1 -18
- package/dist/components/common/video-player/video-preroll-ad-overlay.mjs +1 -167
- package/dist/components/common/video-player/video-preroll-ad.mjs +1 -187
- package/dist/components/common/wait-loading.mjs +1 -119
- package/dist/components/pages/(follow)/_components/follow-button/index.mjs +1 -80
- package/dist/components/pages/(follow)/_components/header-nav/index.mjs +1 -13
- package/dist/components/pages/(follow)/_components/interaction-tabs/index.mjs +1 -44
- package/dist/components/pages/(follow)/_components/user-list/index.mjs +1 -139
- package/dist/components/pages/(follow)/_components/user-list/user-list-item.mjs +1 -46
- package/dist/components/pages/(follow)/fans/index.mjs +1 -10
- package/dist/components/pages/(follow)/fans/page.mjs +1 -95
- package/dist/components/pages/(follow)/followed/index.mjs +1 -10
- package/dist/components/pages/(follow)/followed/page.mjs +1 -95
- package/dist/components/pages/collection-add/index.mjs +1 -10
- package/dist/components/pages/collection-add/page.mjs +1 -164
- package/dist/components/pages/collection-create/form.mjs +1 -164
- package/dist/components/pages/collection-create/index.mjs +1 -10
- package/dist/components/pages/collection-create/page.mjs +1 -28
- package/dist/components/pages/collection-detail/_components/collection-detail-card.mjs +1 -183
- package/dist/components/pages/collection-detail/_components/collection-detail-video-card.mjs +1 -135
- package/dist/components/pages/collection-detail/detail.mjs +1 -539
- package/dist/components/pages/collection-detail/index.mjs +1 -10
- package/dist/components/pages/collection-detail/page.mjs +1 -18
- package/dist/components/pages/edit/index.mjs +1 -10
- package/dist/components/pages/edit/page.mjs +1 -683
- package/dist/components/pages/feed-series/feed-series-client.mjs +1 -383
- package/dist/components/pages/feed-series/page.mjs +1 -97
- package/dist/components/pages/feedback/_components/feedback-form.mjs +1 -271
- package/dist/components/pages/feedback/index.mjs +1 -10
- package/dist/components/pages/feedback/page.mjs +1 -10
- package/dist/components/pages/fullscreen-feed/index.mjs +1 -10
- package/dist/components/pages/fullscreen-feed/page.mjs +1 -105
- package/dist/components/pages/home/channel-matcher.mjs +1 -30
- package/dist/components/pages/home/client.mjs +1 -149
- package/dist/components/pages/home/index.mjs +1 -59
- package/dist/components/pages/login/agreement-dialog.mjs +1 -104
- package/dist/components/pages/login/auth-guard.mjs +1 -37
- package/dist/components/pages/login/auth-page-styles.mjs +2 -17
- package/dist/components/pages/login/forgot.mjs +1 -136
- package/dist/components/pages/login/index.mjs +1 -107
- package/dist/components/pages/login/login-client.mjs +1 -233
- package/dist/components/pages/login/password.mjs +1 -186
- package/dist/components/pages/login/register.mjs +1 -204
- package/dist/components/pages/login/reset-password.mjs +1 -193
- package/dist/components/pages/login/tracking.mjs +1 -32
- package/dist/components/pages/login/verify.mjs +1 -243
- package/dist/components/pages/post-detail/page.mjs +1 -28
- package/dist/components/pages/post-detail/post-detail-client.mjs +1 -516
- package/dist/components/pages/profile/index.mjs +1 -10
- package/dist/components/pages/profile/page.mjs +1 -28
- package/dist/components/pages/publish/components/collection-card.mjs +1 -49
- package/dist/components/pages/publish/components/collection-popup.mjs +1 -81
- package/dist/components/pages/publish/components/collection.mjs +1 -97
- package/dist/components/pages/publish/components/cover-item.mjs +1 -46
- package/dist/components/pages/publish/components/editor.mjs +1 -208
- package/dist/components/pages/publish/components/header.mjs +1 -31
- package/dist/components/pages/publish/components/material-grid.mjs +1 -52
- package/dist/components/pages/publish/components/material-item.mjs +1 -68
- package/dist/components/pages/publish/components/toolbar.mjs +1 -39
- package/dist/components/pages/publish/components/upload-progress.mjs +1 -53
- package/dist/components/pages/publish/components/video-item.mjs +1 -36
- package/dist/components/pages/publish/constants.mjs +1 -8
- package/dist/components/pages/publish/hooks/use-file-upload.mjs +1 -162
- package/dist/components/pages/publish/page-client.mjs +1 -345
- package/dist/components/pages/publish/page.mjs +1 -11
- package/dist/components/pages/publish/utils/file-upload.mjs +1 -155
- package/dist/components/pages/publish/utils/publish-utils.mjs +1 -11
- package/dist/components/pages/search/hot-recommend.mjs +1 -192
- package/dist/components/pages/search/hot-search.mjs +1 -70
- package/dist/components/pages/search/index.mjs +1 -17
- package/dist/components/pages/search/page-client.mjs +1 -211
- package/dist/components/pages/search/search-result/index.mjs +1 -31
- package/dist/components/pages/search/search-result/search-all.mjs +1 -167
- package/dist/components/pages/search/search-result/search-user.mjs +1 -306
- package/dist/components/pages/search/search-result/search-video-info.mjs +1 -134
- package/dist/components/pages/search/search-result/shared.mjs +1 -114
- package/dist/components/pages/search/style.module.mjs +85 -12
- package/dist/components/pages/search/top-header.mjs +1 -131
- package/dist/components/pages/search/tracking.mjs +1 -51
- package/dist/components/pages/search-result/page-client.mjs +1 -130
- package/dist/components/pages/search-result/search-all.mjs +1 -180
- package/dist/components/pages/search-result/search-empty.mjs +1 -52
- package/dist/components/pages/search-result/search-tab.mjs +1 -95
- package/dist/components/pages/search-result/search-user.mjs +1 -315
- package/dist/components/pages/search-result/search-video-info.mjs +1 -195
- package/dist/components/pages/search-result/shared.mjs +1 -46
- package/dist/components/pages/search-result/top-header.mjs +1 -105
- package/dist/components/pages/search-result/tracking.mjs +1 -39
- package/dist/components/pages/settings/_components/reset-password-drawer.mjs +1 -381
- package/dist/components/pages/settings/_components/settings.mjs +1 -192
- package/dist/components/pages/settings/index.mjs +1 -10
- package/dist/components/pages/settings/page.mjs +1 -13
- package/dist/components/pages/user-follow/_components/follow-no-login.mjs +1 -34
- package/dist/components/pages/user-follow/_components/follow-top-header.mjs +1 -25
- package/dist/components/pages/user-follow/_components/post-tab.mjs +1 -96
- package/dist/components/pages/user-follow/index.mjs +1 -10
- package/dist/components/pages/user-follow/page.mjs +1 -106
- package/dist/components/pages/user-follow/skeleton.mjs +1 -62
- package/dist/components/pages/video-detail/page.mjs +1 -47
- package/dist/components/pages/video-detail/video-detail-client.mjs +1 -395
- package/dist/components/pages/video-list/index.mjs +1 -61
- package/dist/components/pages/video-list/types.mjs +1 -16
- package/dist/components/pages/video-list/video-list-client.mjs +1 -144
- package/dist/components/pages/video-list/video-list-recommend-item.mjs +1 -94
- package/dist/components/pages/video-list/video-list-skeleton.mjs +1 -91
- package/dist/components/ui/accordion.mjs +1 -62
- package/dist/components/ui/alert-dialog.mjs +1 -114
- package/dist/components/ui/alert.mjs +1 -50
- package/dist/components/ui/aspect-ratio.mjs +1 -17
- package/dist/components/ui/avatar.mjs +1 -107
- package/dist/components/ui/badge.d.mts +1 -1
- package/dist/components/ui/badge.mjs +1 -38
- package/dist/components/ui/box.mjs +1 -17
- package/dist/components/ui/breadcrumb.mjs +1 -84
- package/dist/components/ui/button-group.mjs +1 -49
- package/dist/components/ui/button.d.mts +1 -1
- package/dist/components/ui/button.mjs +1 -50
- package/dist/components/ui/card.mjs +1 -65
- package/dist/components/ui/carousel.mjs +1 -142
- package/dist/components/ui/checkbox.mjs +1 -25
- package/dist/components/ui/collapsible.mjs +1 -31
- package/dist/components/ui/combobox.mjs +1 -185
- package/dist/components/ui/context-menu.mjs +1 -150
- package/dist/components/ui/dialog.mjs +1 -109
- package/dist/components/ui/drawer.mjs +1 -91
- package/dist/components/ui/dropdown-menu.mjs +1 -154
- package/dist/components/ui/empty-icons.mjs +7 -96
- package/dist/components/ui/empty.mjs +1 -95
- package/dist/components/ui/field.mjs +1 -131
- package/dist/components/ui/hover-card.mjs +1 -43
- package/dist/components/ui/image.mjs +1 -257
- package/dist/components/ui/infinite-scroll.mjs +1 -168
- package/dist/components/ui/input-group.mjs +1 -90
- package/dist/components/ui/input.mjs +1 -19
- package/dist/components/ui/item.mjs +1 -137
- package/dist/components/ui/kbd.mjs +1 -24
- package/dist/components/ui/label.mjs +1 -18
- package/dist/components/ui/legacy/badge.mjs +1 -80
- package/dist/components/ui/legacy/button.mjs +1 -55
- package/dist/components/ui/legacy/input.mjs +1 -22
- package/dist/components/ui/legacy/popover.mjs +1 -69
- package/dist/components/ui/link.mjs +1 -52
- package/dist/components/ui/list.mjs +5 -221
- package/dist/components/ui/loading.mjs +1 -44
- package/dist/components/ui/mask.mjs +1 -17
- package/dist/components/ui/menubar.mjs +1 -154
- package/dist/components/ui/native-select.mjs +1 -43
- package/dist/components/ui/pagination.mjs +1 -90
- package/dist/components/ui/popover.mjs +1 -73
- package/dist/components/ui/popup.mjs +1 -44
- package/dist/components/ui/progress.mjs +1 -53
- package/dist/components/ui/radio-group.mjs +1 -34
- package/dist/components/ui/rate.mjs +1 -69
- package/dist/components/ui/scroll-area.mjs +1 -43
- package/dist/components/ui/select.mjs +1 -113
- package/dist/components/ui/separator.mjs +1 -20
- package/dist/components/ui/sheet.mjs +1 -109
- package/dist/components/ui/skeleton.mjs +1 -16
- package/dist/components/ui/slider.mjs +1 -46
- package/dist/components/ui/sonner.mjs +1 -34
- package/dist/components/ui/spinner.mjs +1 -18
- package/dist/components/ui/switch.mjs +1 -65
- package/dist/components/ui/table.mjs +1 -78
- package/dist/components/ui/tabs.mjs +1 -54
- package/dist/components/ui/text.mjs +1 -20
- package/dist/components/ui/textarea.mjs +1 -16
- package/dist/components/ui/time.mjs +1 -91
- package/dist/components/ui/toggle-group.mjs +1 -59
- package/dist/components/ui/toggle.mjs +1 -41
- package/dist/components/ui/tooltip.mjs +1 -49
- package/dist/components/ui/wheel-picker.mjs +1 -28
- package/dist/constants/event-key.mjs +1 -18
- package/dist/constants/query-key.mjs +1 -32
- package/dist/constants/revalidate.mjs +1 -9
- package/dist/constants/site.mjs +1 -11
- package/dist/constants/url-prefix.mjs +1 -11
- package/dist/hooks/image-text-recommend.mjs +1 -71
- package/dist/hooks/query/hydration-boundary.mjs +1 -34
- package/dist/hooks/query/use-query.mjs +1 -114
- package/dist/hooks/use-auth.mjs +1 -198
- package/dist/hooks/use-browse-report.mjs +1 -489
- package/dist/hooks/use-card-decoration.mjs +1 -96
- package/dist/hooks/use-content-operate.mjs +1 -526
- package/dist/hooks/use-first-row-height.mjs +1 -105
- package/dist/hooks/use-follow.mjs +1 -69
- package/dist/hooks/use-fullscreen-gestures.mjs +1 -144
- package/dist/hooks/use-interaction-animation.mjs +1 -26
- package/dist/hooks/use-is-client.mjs +1 -20
- package/dist/hooks/use-keyboard-open.mjs +1 -56
- package/dist/hooks/use-like-dislike.mjs +1 -40
- package/dist/hooks/use-min-duration-loading.mjs +1 -63
- package/dist/hooks/use-search-history.mjs +1 -53
- package/dist/hooks/use-sticky.mjs +1 -50
- package/dist/hooks.mjs +1 -17
- package/dist/i18n/locales/en.mjs +3 -836
- package/dist/i18n/locales/zh-CN.mjs +3 -836
- package/dist/i18n/messages.mjs +1 -20
- package/dist/i18n/translator.mjs +1 -38
- package/dist/i18n.mjs +1 -165
- package/dist/materials.mjs +1 -73
- package/dist/node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.mjs +1 -17
- package/dist/pages.mjs +1 -23
- package/dist/seo/build-metadata.mjs +1 -163
- package/dist/seo/config/index.mjs +1 -22
- package/dist/seo/config/page.mjs +6 -301
- package/dist/seo/config/site.mjs +1 -25
- package/dist/seo/constants.mjs +1 -31
- package/dist/seo/helpers.mjs +1 -120
- package/dist/seo/resource-hints.mjs +1 -60
- package/dist/seo/robots.mjs +1 -36
- package/dist/seo/sitemap.mjs +1 -44
- package/dist/seo/structured-data/article.mjs +1 -51
- package/dist/seo/structured-data/common.mjs +1 -60
- package/dist/seo/structured-data/video.mjs +1 -41
- package/dist/seo/viewport.mjs +1 -31
- package/dist/seo.mjs +1 -15
- package/dist/service/advertisement.mjs +1 -88
- package/dist/service/generated/client.mjs +1 -1281
- package/dist/service/generated/tanstack.mjs +1 -1179
- package/dist/service/register-by-verify-email-code.mjs +1 -17
- package/dist/service.mjs +1 -6
- package/dist/store/create-store.mjs +1 -25
- package/dist/store/modules/app-config-store.mjs +1 -28
- package/dist/store/modules/blind-spot-ad-store.mjs +1 -95
- package/dist/store/modules/blocked-modal-store.mjs +1 -30
- package/dist/store/modules/follow-ids-store.mjs +1 -12
- package/dist/store/modules/login-modal-store.mjs +1 -155
- package/dist/store/modules/media-preview-store.mjs +1 -54
- package/dist/store/modules/publish-store.mjs +1 -31
- package/dist/store/modules/use-demo-store.mjs +1 -17
- package/dist/store/modules/user-store.mjs +1 -133
- package/dist/store/modules/video-player-ref-store.mjs +1 -13
- package/dist/store.mjs +1 -12
- package/dist/theme-tokens.mjs +1 -82
- package/dist/types/safe-at-user.mjs +1 -15
- package/dist/types/safe-comment.mjs +1 -30
- package/dist/types/safe-grid.mjs +1 -36
- package/dist/types/safe-replay.mjs +1 -43
- package/dist/types/share.mjs +1 -16
- package/dist/ui.mjs +1 -58
- package/dist/utils/api-collect.mjs +1 -14
- package/dist/utils/browser-fingerprint.mjs +1 -53
- package/dist/utils/channel-storage.mjs +1 -57
- package/dist/utils/cn.mjs +1 -15
- package/dist/utils/common.mjs +1 -311
- package/dist/utils/db.mjs +1 -80
- package/dist/utils/decrypt-image-client.mjs +1 -325
- package/dist/utils/decrypt.worker.mjs +2 -20
- package/dist/utils/device-id.mjs +1 -20
- package/dist/utils/email-validator.mjs +1 -108
- package/dist/utils/event-bus.mjs +1 -33
- package/dist/utils/follow-service.mjs +1 -87
- package/dist/utils/get-res-url.mjs +1 -94
- package/dist/utils/helper.mjs +1 -33
- package/dist/utils/http.mjs +1 -202
- package/dist/utils/image-compression.mjs +1 -59
- package/dist/utils/image-crop.mjs +1 -63
- package/dist/utils/loaders.mjs +1 -51
- package/dist/utils/login-modal-bridge.mjs +1 -65
- package/dist/utils/media.mjs +1 -128
- package/dist/utils/password-validator.mjs +1 -86
- package/dist/utils/request-user-id.mjs +1 -16
- package/dist/utils/s3-uploader.mjs +1 -40
- package/dist/utils/schema/material.mjs +1 -24
- package/dist/utils/schema/schema.mjs +1 -207
- package/dist/utils/schema/utils.mjs +1 -27
- package/dist/utils/share-manager.mjs +1 -183
- package/dist/utils/tools.mjs +1 -92
- package/dist/utils/tracking.mjs +1 -183
- package/dist/utils/uint8.mjs +1 -46
- package/dist/utils/upload-file.mjs +1 -429
- package/dist/utils/use-compatible-router.mjs +1 -84
- package/dist/utils.mjs +1 -27
- package/package.json +1 -1
- package/theme.css +1 -1
|
@@ -1,970 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
'use client';
|
|
3
|
-
|
|
4
|
-
import { debounceFun, formatCompactCount, getCurrentSecondTime, parseTextAtUserIds, replaceAtUserElement } from "../../../../utils/common.mjs";
|
|
5
|
-
import { cn } from "../../../../utils/cn.mjs";
|
|
6
|
-
import { useFollowIdsState } from "../../../../store/modules/follow-ids-store.mjs";
|
|
7
|
-
import { useUserStore } from "../../../../store/modules/user-store.mjs";
|
|
8
|
-
import { gCommunityGetComments, pCommunityCreateComment, pCommunityDislikeComment, pCommunityLikeComment, pInteractionFollow, pInteractionUnfollow } from "../../../../service/generated/client.mjs";
|
|
9
|
-
import { checkFollowStatus } from "../../../../utils/follow-service.mjs";
|
|
10
|
-
import { useRouter } from "../../../../utils/use-compatible-router.mjs";
|
|
11
|
-
import { Image } from "../../../ui/image.mjs";
|
|
12
|
-
import { Dialog, DialogContent } from "../../../ui/dialog.mjs";
|
|
13
|
-
import { InfiniteScroll } from "../../../ui/infinite-scroll.mjs";
|
|
14
|
-
import { useLikeDislike } from "../../../../hooks/use-like-dislike.mjs";
|
|
15
|
-
import { useKeepAliveState } from "../../../common/keep-scroll-position/index.mjs";
|
|
16
|
-
import SvgClose from "../../../../assets/icons/close.mjs";
|
|
17
|
-
import SvgFollowSel from "../../../../assets/icons/common/follow_sel.mjs";
|
|
18
|
-
import SvgFollowUser from "../../../../assets/icons/common/follow_user.mjs";
|
|
19
|
-
import { UnfollowConfirmDialog } from "../../../common/follow-button/unfollow-confirm-dialog.mjs";
|
|
20
|
-
import SvgGiveLike from "../../../../assets/icons/detail/give_like.mjs";
|
|
21
|
-
import SvgGiveLikeSel from "../../../../assets/icons/detail/give_like_sel.mjs";
|
|
22
|
-
import CommentInput from "./comment-input.mjs";
|
|
23
|
-
import SvgUnLike from "../../../../assets/icons/detail/un_like.mjs";
|
|
24
|
-
import SvgUnLikeSel from "../../../../assets/icons/detail/un_like_sel.mjs";
|
|
25
|
-
import { CommentMedia } from "./comment-media.mjs";
|
|
26
|
-
import { CommentRichText } from "./comment-rich-text.mjs";
|
|
27
|
-
import { TimeDisplay } from "./time-display.mjs";
|
|
28
|
-
import { CommentItem } from "./comment-item.mjs";
|
|
29
|
-
import { mapApiReplayToReplay } from "../../../../types/safe-replay.mjs";
|
|
30
|
-
import { toast } from "sonner";
|
|
31
|
-
import { memo, useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
32
|
-
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
33
|
-
import { useTranslations } from "next-intl";
|
|
34
|
-
|
|
35
|
-
//#region components/biz/business/comment/reply-detail.tsx
|
|
36
|
-
/**
|
|
37
|
-
* 将接口时间字段转换为秒级时间戳,兼容秒/毫秒/ISO 字符串。
|
|
38
|
-
*/
|
|
39
|
-
function parseToSecondTimestamp(value) {
|
|
40
|
-
if (value === void 0 || value === null) return 0;
|
|
41
|
-
const numericValue = typeof value === "number" ? value : Number(value);
|
|
42
|
-
if (!Number.isNaN(numericValue) && numericValue > 0) {
|
|
43
|
-
if (numericValue > 0xe8d4a51000) return Math.floor(numericValue / 1e3);
|
|
44
|
-
return Math.floor(numericValue);
|
|
45
|
-
}
|
|
46
|
-
const parsed = Date.parse(String(value));
|
|
47
|
-
if (Number.isNaN(parsed)) return 0;
|
|
48
|
-
return Math.floor(parsed / 1e3);
|
|
49
|
-
}
|
|
50
|
-
/**
|
|
51
|
-
* 将评论媒体转换为 SafeNineGridInfoType 数组(优先 medias)。
|
|
52
|
-
*/
|
|
53
|
-
function convertMediaArrayToNineGridInfo(images, videos, medias) {
|
|
54
|
-
const result = [];
|
|
55
|
-
if (Array.isArray(medias) && medias.length > 0) {
|
|
56
|
-
medias.forEach((media) => {
|
|
57
|
-
const isVideo = Boolean(media?.is_video);
|
|
58
|
-
const mediaUrl = String(media?.media_url || "");
|
|
59
|
-
const coverImage = String(media?.cover_image || "");
|
|
60
|
-
if (!mediaUrl && !coverImage) return;
|
|
61
|
-
result.push({
|
|
62
|
-
cover_image: coverImage,
|
|
63
|
-
cover_image_thumbnail: coverImage,
|
|
64
|
-
cover_image_radio: 1,
|
|
65
|
-
cover_image_resolution: String(media?.cover_image_resolution || ""),
|
|
66
|
-
image_url: isVideo ? "" : mediaUrl,
|
|
67
|
-
image_thumbnail: isVideo ? "" : mediaUrl,
|
|
68
|
-
image_radio: 1,
|
|
69
|
-
image_resolution: String(media?.image_resolution || ""),
|
|
70
|
-
is_video: isVideo,
|
|
71
|
-
resolution: String(media?.video_resolution || ""),
|
|
72
|
-
video_duration: Number(media?.video_duration || 0),
|
|
73
|
-
video_url: isVideo ? mediaUrl : "",
|
|
74
|
-
video_size: Number(media?.video_size || 0),
|
|
75
|
-
video_codec_info: {
|
|
76
|
-
hls_info: [],
|
|
77
|
-
video_codec_deal: false
|
|
78
|
-
}
|
|
79
|
-
});
|
|
80
|
-
});
|
|
81
|
-
return result;
|
|
82
|
-
}
|
|
83
|
-
if (images?.length) images.forEach((imageUrl) => {
|
|
84
|
-
result.push({
|
|
85
|
-
cover_image: "",
|
|
86
|
-
cover_image_thumbnail: "",
|
|
87
|
-
cover_image_radio: 1,
|
|
88
|
-
cover_image_resolution: "",
|
|
89
|
-
image_url: imageUrl,
|
|
90
|
-
image_thumbnail: imageUrl,
|
|
91
|
-
image_radio: 1,
|
|
92
|
-
image_resolution: "",
|
|
93
|
-
is_video: false,
|
|
94
|
-
resolution: "",
|
|
95
|
-
video_duration: 0,
|
|
96
|
-
video_url: "",
|
|
97
|
-
video_size: 0,
|
|
98
|
-
video_codec_info: {
|
|
99
|
-
hls_info: [],
|
|
100
|
-
video_codec_deal: false
|
|
101
|
-
}
|
|
102
|
-
});
|
|
103
|
-
});
|
|
104
|
-
if (videos?.length) videos.forEach((videoUrl) => {
|
|
105
|
-
result.push({
|
|
106
|
-
cover_image: "",
|
|
107
|
-
cover_image_thumbnail: "",
|
|
108
|
-
cover_image_radio: 1,
|
|
109
|
-
cover_image_resolution: "",
|
|
110
|
-
image_url: "",
|
|
111
|
-
image_thumbnail: "",
|
|
112
|
-
image_radio: 1,
|
|
113
|
-
image_resolution: "",
|
|
114
|
-
is_video: true,
|
|
115
|
-
resolution: "",
|
|
116
|
-
video_duration: 0,
|
|
117
|
-
video_url: videoUrl,
|
|
118
|
-
video_size: 0,
|
|
119
|
-
video_codec_info: {
|
|
120
|
-
hls_info: [],
|
|
121
|
-
video_codec_deal: false
|
|
122
|
-
}
|
|
123
|
-
});
|
|
124
|
-
});
|
|
125
|
-
return result;
|
|
126
|
-
}
|
|
127
|
-
/**
|
|
128
|
-
* 将 Community 评论结构映射到 SafeParentReplayType。
|
|
129
|
-
*/
|
|
130
|
-
function mapCommunityCommentToParentReply(comment) {
|
|
131
|
-
const mentionedUsers = mapCommunityMentionedUsers(comment.mentioned_users);
|
|
132
|
-
const resolvedAtUsers = mentionedUsers.length > 0 ? mentionedUsers : parseAtUsersFromHtml(comment.content || "");
|
|
133
|
-
return {
|
|
134
|
-
id: String(comment.comment_id ?? comment.id ?? ""),
|
|
135
|
-
user_name: comment.user?.nickname || comment.user?.username || "",
|
|
136
|
-
text: comment.content || "",
|
|
137
|
-
type: "4",
|
|
138
|
-
files: [],
|
|
139
|
-
at_users: resolvedAtUsers,
|
|
140
|
-
cover_image: "",
|
|
141
|
-
nine_grid_content_info: convertMediaArrayToNineGridInfo(comment?.images, comment?.videos, comment?.medias)
|
|
142
|
-
};
|
|
143
|
-
}
|
|
144
|
-
/**
|
|
145
|
-
* 将 Community 评论结构映射到 SafeReplayType
|
|
146
|
-
*/
|
|
147
|
-
function mapCommunityCommentToSafeReply(comment, parentComment) {
|
|
148
|
-
const likeFlag = comment.is_liked ? "1" : comment.is_dislike ? "2" : "0";
|
|
149
|
-
const mentionedUsers = mapCommunityMentionedUsers(comment.mentioned_users);
|
|
150
|
-
const resolvedAtUsers = mentionedUsers.length > 0 ? mentionedUsers : parseAtUsersFromHtml(comment.content || "");
|
|
151
|
-
const resolvedId = String(comment.comment_id ?? comment.id ?? "");
|
|
152
|
-
const rawLikeCnt = typeof comment.like_count === "number" ? comment.like_count : 0;
|
|
153
|
-
const reply = mapApiReplayToReplay({
|
|
154
|
-
id: resolvedId,
|
|
155
|
-
like_cnt: (comment.is_liked && rawLikeCnt === 0 ? 1 : rawLikeCnt).toString(),
|
|
156
|
-
dislike_cnt: (comment.dislike_count || 0).toString(),
|
|
157
|
-
created_at: parseToSecondTimestamp(comment.create_time),
|
|
158
|
-
text: comment.content || "",
|
|
159
|
-
type: "4",
|
|
160
|
-
like_flag: likeFlag,
|
|
161
|
-
user_id: comment.user_id || "",
|
|
162
|
-
user_name: comment.user?.nickname || comment.user?.username || "",
|
|
163
|
-
avatar: comment.user?.avatar_url || "",
|
|
164
|
-
reply_cnt: (comment.reply_count || 0).toString(),
|
|
165
|
-
nine_grid_content_info: convertMediaArrayToNineGridInfo(comment?.images, comment?.videos, comment?.medias),
|
|
166
|
-
at_users: resolvedAtUsers,
|
|
167
|
-
parent_reply: void 0
|
|
168
|
-
});
|
|
169
|
-
if (parentComment) reply.parent_reply = mapCommunityCommentToParentReply(parentComment);
|
|
170
|
-
return reply;
|
|
171
|
-
}
|
|
172
|
-
/**
|
|
173
|
-
* 将评论里的 @ 用户信息转换为 SafeAtUserType。
|
|
174
|
-
*/
|
|
175
|
-
function mapCommunityMentionedUsers(mentionedUsers) {
|
|
176
|
-
if (!Array.isArray(mentionedUsers)) return [];
|
|
177
|
-
return mentionedUsers.map((user) => ({
|
|
178
|
-
user_id: user.user_id || "",
|
|
179
|
-
name: user.nickname || user.username || "",
|
|
180
|
-
avatar: user.avatar_url || "",
|
|
181
|
-
birthday: "",
|
|
182
|
-
signature: user.signature || ""
|
|
183
|
-
}));
|
|
184
|
-
}
|
|
185
|
-
/**
|
|
186
|
-
* 从富文本中解析 @mention 信息,用于本地新增回复的高亮展示。
|
|
187
|
-
*/
|
|
188
|
-
function parseAtUsersFromHtml(text) {
|
|
189
|
-
if (!text) return [];
|
|
190
|
-
const result = /* @__PURE__ */ new Map();
|
|
191
|
-
const mentionRegex = /<span[^>]*class=['"]mention['"][^>]*data-id=['"]([^'"]+)['"][^>]*>@([^<]*)<\/span>/g;
|
|
192
|
-
let match;
|
|
193
|
-
while ((match = mentionRegex.exec(text)) !== null) {
|
|
194
|
-
const id = match[1] ? String(match[1]) : "";
|
|
195
|
-
const name = (match[2] ? String(match[2]) : "").replace(/^@/, "") || id;
|
|
196
|
-
if (!id || result.has(id)) continue;
|
|
197
|
-
result.set(id, {
|
|
198
|
-
user_id: id,
|
|
199
|
-
name,
|
|
200
|
-
avatar: "",
|
|
201
|
-
birthday: "",
|
|
202
|
-
signature: ""
|
|
203
|
-
});
|
|
204
|
-
}
|
|
205
|
-
if (result.size > 0) return Array.from(result.values());
|
|
206
|
-
const placeholderRegex = /<@_user>(\w+)<\/@_user>/g;
|
|
207
|
-
while ((match = placeholderRegex.exec(text)) !== null) {
|
|
208
|
-
const id = match[1] ? String(match[1]) : "";
|
|
209
|
-
if (!id || result.has(id)) continue;
|
|
210
|
-
result.set(id, {
|
|
211
|
-
user_id: id,
|
|
212
|
-
name: id,
|
|
213
|
-
avatar: "",
|
|
214
|
-
birthday: "",
|
|
215
|
-
signature: ""
|
|
216
|
-
});
|
|
217
|
-
}
|
|
218
|
-
return Array.from(result.values());
|
|
219
|
-
}
|
|
220
|
-
/**
|
|
221
|
-
* 将评论附件转换为 createComment 的 medias 结构。
|
|
222
|
-
*/
|
|
223
|
-
function buildCommentMedias(list) {
|
|
224
|
-
if (!Array.isArray(list) || list.length === 0) return [];
|
|
225
|
-
return list.map((item) => {
|
|
226
|
-
const isVideo = Boolean(item.is_video);
|
|
227
|
-
const mediaUrl = isVideo ? String(item.video_url || "") : String(item.image_url || item.cover_image || "");
|
|
228
|
-
const coverImage = String(item.cover_image || item.image_url || "");
|
|
229
|
-
return {
|
|
230
|
-
media_url: mediaUrl,
|
|
231
|
-
is_video: isVideo,
|
|
232
|
-
image_resolution: String(item.image_resolution || ""),
|
|
233
|
-
cover_image: coverImage,
|
|
234
|
-
cover_image_resolution: String(item.cover_image_resolution || ""),
|
|
235
|
-
video_resolution: String(item.resolution || ""),
|
|
236
|
-
video_duration: Number(item.video_duration || 0),
|
|
237
|
-
video_size: Number(item.video_size || 0)
|
|
238
|
-
};
|
|
239
|
-
}).filter((media) => Boolean(media.media_url));
|
|
240
|
-
}
|
|
241
|
-
/**
|
|
242
|
-
* 将 Community 评论列表扁平化,包含 sub_comments。
|
|
243
|
-
*/
|
|
244
|
-
function flattenCommunityCommentReplies(comments, parentComment) {
|
|
245
|
-
const result = [];
|
|
246
|
-
comments.forEach((item) => {
|
|
247
|
-
result.push(mapCommunityCommentToSafeReply(item, parentComment));
|
|
248
|
-
if (item.sub_comments?.length) result.push(...flattenCommunityCommentReplies(item.sub_comments, item));
|
|
249
|
-
});
|
|
250
|
-
return result;
|
|
251
|
-
}
|
|
252
|
-
/**
|
|
253
|
-
* 回复详情点赞节流。
|
|
254
|
-
*/
|
|
255
|
-
const replyDetailLikeDebounce = debounceFun((reply, _informationId, _commentId) => {
|
|
256
|
-
try {
|
|
257
|
-
if (!reply?.id) return;
|
|
258
|
-
pCommunityLikeComment({
|
|
259
|
-
comment_id: reply.id,
|
|
260
|
-
is_like: reply.like_flag !== "1"
|
|
261
|
-
}, { revalidate: false });
|
|
262
|
-
} catch (error) {
|
|
263
|
-
console.error("点赞回复失败:", error);
|
|
264
|
-
}
|
|
265
|
-
}, 200);
|
|
266
|
-
/**
|
|
267
|
-
* 回复详情点踩节流。
|
|
268
|
-
*/
|
|
269
|
-
const replyDetailDislikeDebounce = debounceFun((reply, _informationId, _commentId) => {
|
|
270
|
-
try {
|
|
271
|
-
if (!reply?.id) return;
|
|
272
|
-
pCommunityDislikeComment({
|
|
273
|
-
comment_id: reply.id,
|
|
274
|
-
is_dislike: reply.like_flag !== "2"
|
|
275
|
-
}, { revalidate: false });
|
|
276
|
-
} catch (error) {
|
|
277
|
-
console.error("点踩回复失败:", error);
|
|
278
|
-
}
|
|
279
|
-
}, 200);
|
|
280
|
-
/**
|
|
281
|
-
* 回复详情顶部评论区。
|
|
282
|
-
*/
|
|
283
|
-
const ReplyDetailHeader = memo(({ comment, updateFollow, onRequireLogin }) => {
|
|
284
|
-
const { userInfo, userId, isLogin } = useUserStore();
|
|
285
|
-
const resolvedUserId = userInfo?.userId || userInfo?.user_id || userId || "";
|
|
286
|
-
return /* @__PURE__ */ jsx("div", {
|
|
287
|
-
className: "w-full bg-bg1",
|
|
288
|
-
children: /* @__PURE__ */ jsx(CommentItem, {
|
|
289
|
-
comment,
|
|
290
|
-
variant: "light",
|
|
291
|
-
isLogin,
|
|
292
|
-
onRequireLogin,
|
|
293
|
-
rightSlot: useMemo(() => Boolean(resolvedUserId) && String(resolvedUserId) === String(comment.user_id || ""), [comment.user_id, resolvedUserId]) ? /* @__PURE__ */ jsx(Fragment$1, {}) : /* @__PURE__ */ jsx(ReplyFollowButton, {
|
|
294
|
-
userId: comment.user_id,
|
|
295
|
-
hasFollow: comment.is_follow,
|
|
296
|
-
onChange: updateFollow,
|
|
297
|
-
onRequireLogin
|
|
298
|
-
}),
|
|
299
|
-
showReplyButton: false
|
|
300
|
-
})
|
|
301
|
-
});
|
|
302
|
-
});
|
|
303
|
-
/**
|
|
304
|
-
* 回复详情关注按钮。
|
|
305
|
-
*/
|
|
306
|
-
function ReplyFollowButton({ userId: followUserId, hasFollow = false, onChange, onRequireLogin }) {
|
|
307
|
-
const t = useTranslations("components.biz.business.comment");
|
|
308
|
-
const { isLogin, userInfo, userId } = useUserStore();
|
|
309
|
-
const { followIds } = useFollowIdsState();
|
|
310
|
-
const [isFollow, setIsFollow] = useState(hasFollow);
|
|
311
|
-
const [confirmOpen, setConfirmOpen] = useState(false);
|
|
312
|
-
const resolvedUserId = userInfo?.userId || userInfo?.user_id || userId || "";
|
|
313
|
-
const isSelf = useMemo(() => Boolean(resolvedUserId) && String(resolvedUserId) === String(followUserId || ""), [followUserId, resolvedUserId]);
|
|
314
|
-
const isHasFollowedStatus = useMemo(() => hasFollow || followIds.includes(followUserId), [
|
|
315
|
-
followIds,
|
|
316
|
-
hasFollow,
|
|
317
|
-
followUserId
|
|
318
|
-
]);
|
|
319
|
-
useEffect(() => {
|
|
320
|
-
setIsFollow(isHasFollowedStatus);
|
|
321
|
-
}, [isHasFollowedStatus]);
|
|
322
|
-
/**
|
|
323
|
-
* 改变关注状态。
|
|
324
|
-
*/
|
|
325
|
-
const changeFollowStatus = useCallback(async () => {
|
|
326
|
-
try {
|
|
327
|
-
if (!resolvedUserId || !followUserId || followUserId === "0") {
|
|
328
|
-
toast.error(t("replyDetail.loginRequired"));
|
|
329
|
-
return;
|
|
330
|
-
}
|
|
331
|
-
if (isFollow) {
|
|
332
|
-
const res = await pInteractionUnfollow({
|
|
333
|
-
follower_id: String(resolvedUserId),
|
|
334
|
-
followee_id: followUserId
|
|
335
|
-
});
|
|
336
|
-
if (res.code !== 0) {
|
|
337
|
-
toast.error(res.message || t("replyDetail.unfollowFailed"));
|
|
338
|
-
return;
|
|
339
|
-
}
|
|
340
|
-
} else {
|
|
341
|
-
const res = await pInteractionFollow({
|
|
342
|
-
follower_id: String(resolvedUserId),
|
|
343
|
-
followee_id: followUserId
|
|
344
|
-
});
|
|
345
|
-
if (res.code !== 0) {
|
|
346
|
-
toast.error(res.message || t("replyDetail.followFailed"));
|
|
347
|
-
return;
|
|
348
|
-
}
|
|
349
|
-
}
|
|
350
|
-
window.sensors?.track("detail_follow_click", {
|
|
351
|
-
object_id: "",
|
|
352
|
-
action: isFollow ? "取消关注" : "关注",
|
|
353
|
-
author_id: followUserId
|
|
354
|
-
});
|
|
355
|
-
sessionStorage.setItem("user_page_refresh", "1");
|
|
356
|
-
} catch (error) {
|
|
357
|
-
console.error("关注或取消关注失败:", error);
|
|
358
|
-
toast.error(isFollow ? t("replyDetail.unfollowFailed") : t("replyDetail.followFailed"));
|
|
359
|
-
return;
|
|
360
|
-
}
|
|
361
|
-
const nextFollow = !isFollow;
|
|
362
|
-
onChange?.(nextFollow);
|
|
363
|
-
setIsFollow(nextFollow);
|
|
364
|
-
const { followIds: prevIds, setFollowIds } = useFollowIdsState.getState();
|
|
365
|
-
const next = new Set(prevIds);
|
|
366
|
-
if (nextFollow) next.add(followUserId);
|
|
367
|
-
else next.delete(followUserId);
|
|
368
|
-
setFollowIds(Array.from(next));
|
|
369
|
-
}, [
|
|
370
|
-
followUserId,
|
|
371
|
-
isFollow,
|
|
372
|
-
onChange,
|
|
373
|
-
resolvedUserId,
|
|
374
|
-
t
|
|
375
|
-
]);
|
|
376
|
-
/**
|
|
377
|
-
* 点击关注按钮。
|
|
378
|
-
*/
|
|
379
|
-
const followHandler = useCallback(() => {
|
|
380
|
-
if (!isLogin) {
|
|
381
|
-
onRequireLogin?.();
|
|
382
|
-
return;
|
|
383
|
-
}
|
|
384
|
-
if (isFollow) {
|
|
385
|
-
setConfirmOpen(true);
|
|
386
|
-
return;
|
|
387
|
-
}
|
|
388
|
-
changeFollowStatus();
|
|
389
|
-
}, [
|
|
390
|
-
changeFollowStatus,
|
|
391
|
-
isFollow,
|
|
392
|
-
isLogin,
|
|
393
|
-
onRequireLogin
|
|
394
|
-
]);
|
|
395
|
-
function handleConfirmUnfollow() {
|
|
396
|
-
setConfirmOpen(false);
|
|
397
|
-
changeFollowStatus();
|
|
398
|
-
}
|
|
399
|
-
function handleCancelUnfollow() {
|
|
400
|
-
setConfirmOpen(false);
|
|
401
|
-
}
|
|
402
|
-
if (isSelf || !followUserId || followUserId === "0") return null;
|
|
403
|
-
return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("div", {
|
|
404
|
-
className: cn("h-[28px] rounded-[14px] px-[8px] border border-solid cursor-pointer flex items-center justify-center", !isFollow ? "border-theme5" : "border-text3"),
|
|
405
|
-
onClick: followHandler,
|
|
406
|
-
children: !isFollow ? /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(SvgFollowUser, { className: "block w-[12px] h-[12px] text-theme5 shrink-0" }), /* @__PURE__ */ jsx("span", {
|
|
407
|
-
className: "block text-theme5 text-[12px] leading-[18px] ml-[4px] shrink-0",
|
|
408
|
-
children: t("replyDetail.follow")
|
|
409
|
-
})] }) : /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(SvgFollowSel, { className: "w-[12px] h-[12px] text-text3 shrink-0" }), /* @__PURE__ */ jsx("span", {
|
|
410
|
-
className: "text-text3 text-[12px] leading-[18px] ml-[4px] shrink-0",
|
|
411
|
-
children: t("replyDetail.followed")
|
|
412
|
-
})] })
|
|
413
|
-
}), /* @__PURE__ */ jsx(UnfollowConfirmDialog, {
|
|
414
|
-
open: confirmOpen,
|
|
415
|
-
onOpenChange: setConfirmOpen,
|
|
416
|
-
onCancel: handleCancelUnfollow,
|
|
417
|
-
onConfirm: handleConfirmUnfollow
|
|
418
|
-
})] });
|
|
419
|
-
}
|
|
420
|
-
/**
|
|
421
|
-
* 0ms 节流:用于输入框失焦时先重置状态。
|
|
422
|
-
*/
|
|
423
|
-
const replyDetailDebounce0 = debounceFun((callback) => {
|
|
424
|
-
callback();
|
|
425
|
-
}, 0);
|
|
426
|
-
/**
|
|
427
|
-
* 跟随列表滚动位置变化,自动保存/恢复滚动位置。
|
|
428
|
-
*/
|
|
429
|
-
function useScrollPositionEffect(containerRef, scrollTop, onScrollTopChange, key) {
|
|
430
|
-
const restoredRef = useRef(false);
|
|
431
|
-
useEffect(() => {
|
|
432
|
-
restoredRef.current = false;
|
|
433
|
-
}, [key]);
|
|
434
|
-
useEffect(() => {
|
|
435
|
-
const container = containerRef.current;
|
|
436
|
-
if (!container) return;
|
|
437
|
-
if (!restoredRef.current && scrollTop > 0) {
|
|
438
|
-
container.scrollTop = scrollTop;
|
|
439
|
-
restoredRef.current = true;
|
|
440
|
-
}
|
|
441
|
-
const handleScroll = () => {
|
|
442
|
-
restoredRef.current = true;
|
|
443
|
-
onScrollTopChange(container.scrollTop);
|
|
444
|
-
};
|
|
445
|
-
container.addEventListener("scroll", handleScroll, { passive: true });
|
|
446
|
-
return () => container.removeEventListener("scroll", handleScroll);
|
|
447
|
-
}, [
|
|
448
|
-
containerRef,
|
|
449
|
-
onScrollTopChange,
|
|
450
|
-
scrollTop,
|
|
451
|
-
key
|
|
452
|
-
]);
|
|
453
|
-
}
|
|
454
|
-
/**
|
|
455
|
-
* 回复列表。
|
|
456
|
-
*/
|
|
457
|
-
const ReplyList = memo(({ commentId, informationId, handleReplyComment, onReplyListUpdate }) => {
|
|
458
|
-
const t = useTranslations("components.biz.business.comment");
|
|
459
|
-
const [replyList, setReplyList] = useKeepAliveState(`replay-detail-list-${commentId}`, []);
|
|
460
|
-
const [hasMore, setHasMore] = useKeepAliveState(`replay-detail-has-more-${commentId}`, true);
|
|
461
|
-
const [page, setPage] = useKeepAliveState(`replay-detail-page-${commentId}`, 1);
|
|
462
|
-
const { getLikedListData, getDislikedListData } = useLikeDislike();
|
|
463
|
-
const fetchInProgressRef = useRef(false);
|
|
464
|
-
/**
|
|
465
|
-
* 获取回复列表。
|
|
466
|
-
*/
|
|
467
|
-
const fetchReplyList = useCallback(async () => {
|
|
468
|
-
if (!commentId || !informationId) return;
|
|
469
|
-
if (fetchInProgressRef.current) return;
|
|
470
|
-
fetchInProgressRef.current = true;
|
|
471
|
-
try {
|
|
472
|
-
const result = await gCommunityGetComments({
|
|
473
|
-
content_id: informationId,
|
|
474
|
-
parent_id: commentId,
|
|
475
|
-
page,
|
|
476
|
-
page_size: 20,
|
|
477
|
-
sort_by: "latest"
|
|
478
|
-
});
|
|
479
|
-
if (result.code !== 0) throw new Error(result.message || t("replyDetail.fetchRepliesFailed"));
|
|
480
|
-
const list = result.data?.data?.comments ?? [];
|
|
481
|
-
const data = flattenCommunityCommentReplies(list);
|
|
482
|
-
if ((result.data?.data?.has_more ?? false) === false || list.length < 20) setHasMore(false);
|
|
483
|
-
setReplyList((prevList) => {
|
|
484
|
-
const existingIds = new Set(prevList.map((item) => item.id));
|
|
485
|
-
const filteredData = data.filter((item) => !existingIds.has(item.id));
|
|
486
|
-
return [...prevList, ...filteredData];
|
|
487
|
-
});
|
|
488
|
-
if (data.length > 0) setPage(page + 1);
|
|
489
|
-
} catch (error) {
|
|
490
|
-
console.error("获取回复列表失败:", error);
|
|
491
|
-
setHasMore(false);
|
|
492
|
-
} finally {
|
|
493
|
-
fetchInProgressRef.current = false;
|
|
494
|
-
}
|
|
495
|
-
}, [
|
|
496
|
-
commentId,
|
|
497
|
-
informationId,
|
|
498
|
-
page,
|
|
499
|
-
setReplyList,
|
|
500
|
-
setHasMore,
|
|
501
|
-
setPage,
|
|
502
|
-
t
|
|
503
|
-
]);
|
|
504
|
-
/**
|
|
505
|
-
* 更新回复列表。
|
|
506
|
-
*/
|
|
507
|
-
const updateReplyList = useCallback((newReply) => {
|
|
508
|
-
setReplyList((prevList) => [newReply, ...prevList]);
|
|
509
|
-
}, [setReplyList]);
|
|
510
|
-
useEffect(() => {
|
|
511
|
-
onReplyListUpdate(updateReplyList);
|
|
512
|
-
}, [onReplyListUpdate, updateReplyList]);
|
|
513
|
-
/**
|
|
514
|
-
* 当评论ID改变时,重置状态并加载第一页数据。
|
|
515
|
-
*/
|
|
516
|
-
useEffect(() => {
|
|
517
|
-
if (commentId && informationId) {
|
|
518
|
-
setReplyList((prev) => prev.length === 0 ? prev : []);
|
|
519
|
-
setHasMore((prev) => prev === true ? prev : true);
|
|
520
|
-
setPage((prev) => prev === 1 ? prev : 1);
|
|
521
|
-
}
|
|
522
|
-
}, [
|
|
523
|
-
commentId,
|
|
524
|
-
informationId,
|
|
525
|
-
setReplyList,
|
|
526
|
-
setHasMore,
|
|
527
|
-
setPage
|
|
528
|
-
]);
|
|
529
|
-
/**
|
|
530
|
-
* 点赞回复。
|
|
531
|
-
*/
|
|
532
|
-
const handleLikeReply = useCallback((reply) => {
|
|
533
|
-
setReplyList((prevList) => getLikedListData(prevList, reply.id));
|
|
534
|
-
replyDetailLikeDebounce(reply, informationId, commentId);
|
|
535
|
-
}, [
|
|
536
|
-
commentId,
|
|
537
|
-
getLikedListData,
|
|
538
|
-
informationId,
|
|
539
|
-
setReplyList
|
|
540
|
-
]);
|
|
541
|
-
/**
|
|
542
|
-
* 点踩回复。
|
|
543
|
-
*/
|
|
544
|
-
const handleDislikeReply = useCallback((reply) => {
|
|
545
|
-
if (reply.like_flag !== "2") toast.message(t("replyDetail.dislikeHint"));
|
|
546
|
-
setReplyList((prevList) => getDislikedListData(prevList, reply.id));
|
|
547
|
-
replyDetailDislikeDebounce(reply, informationId, commentId);
|
|
548
|
-
}, [
|
|
549
|
-
commentId,
|
|
550
|
-
getDislikedListData,
|
|
551
|
-
informationId,
|
|
552
|
-
setReplyList,
|
|
553
|
-
t
|
|
554
|
-
]);
|
|
555
|
-
const [scrollTop, setScrollTop] = useKeepAliveState(`replay-detail-scroll-top-${commentId}`, 0);
|
|
556
|
-
const containerRef = useRef(null);
|
|
557
|
-
useScrollPositionEffect(containerRef, scrollTop, setScrollTop, commentId);
|
|
558
|
-
useEffect(() => {
|
|
559
|
-
if (!commentId || !informationId) return;
|
|
560
|
-
if (replyList.length === 0 && hasMore) fetchReplyList();
|
|
561
|
-
}, [
|
|
562
|
-
commentId,
|
|
563
|
-
informationId,
|
|
564
|
-
fetchReplyList,
|
|
565
|
-
replyList.length,
|
|
566
|
-
hasMore
|
|
567
|
-
]);
|
|
568
|
-
/**
|
|
569
|
-
* 加载更多。
|
|
570
|
-
*/
|
|
571
|
-
const handleLoadMore = useCallback(async () => {
|
|
572
|
-
await fetchReplyList();
|
|
573
|
-
}, [fetchReplyList]);
|
|
574
|
-
return /* @__PURE__ */ jsxs("div", {
|
|
575
|
-
ref: containerRef,
|
|
576
|
-
className: "w-full pb-[66px]",
|
|
577
|
-
children: [replyList.map((item, index) => /* @__PURE__ */ jsx(ReplyCommentItem, {
|
|
578
|
-
replyItem: item,
|
|
579
|
-
replyComment: handleReplyComment,
|
|
580
|
-
onLikeReply: handleLikeReply,
|
|
581
|
-
onDislikeReply: handleDislikeReply
|
|
582
|
-
}, `${item.id}-${index}`)), /* @__PURE__ */ jsx(InfiniteScroll, {
|
|
583
|
-
loadMore: handleLoadMore,
|
|
584
|
-
hasMore
|
|
585
|
-
})]
|
|
586
|
-
});
|
|
587
|
-
});
|
|
588
|
-
/**
|
|
589
|
-
* 回复列表项。
|
|
590
|
-
*/
|
|
591
|
-
function ReplyCommentItem({ replyItem, replyComment, onLikeReply, onDislikeReply }) {
|
|
592
|
-
const t = useTranslations("components.biz.business.comment");
|
|
593
|
-
const router = useRouter();
|
|
594
|
-
const isUnderReview = replyItem.status === "0";
|
|
595
|
-
/**
|
|
596
|
-
* 点赞回复。
|
|
597
|
-
*/
|
|
598
|
-
function handleLikeClick() {
|
|
599
|
-
onLikeReply?.(replyItem);
|
|
600
|
-
}
|
|
601
|
-
/**
|
|
602
|
-
* 点踩回复。
|
|
603
|
-
*/
|
|
604
|
-
function handleDislikeClick() {
|
|
605
|
-
onDislikeReply?.(replyItem);
|
|
606
|
-
}
|
|
607
|
-
/**
|
|
608
|
-
* 回复该回复。
|
|
609
|
-
*/
|
|
610
|
-
function handleReplyClick() {
|
|
611
|
-
replyComment(replyItem);
|
|
612
|
-
}
|
|
613
|
-
return /* @__PURE__ */ jsxs("div", {
|
|
614
|
-
className: "p-[16px] flex flex-col",
|
|
615
|
-
children: [/* @__PURE__ */ jsxs("div", {
|
|
616
|
-
className: "flex flex-row justify-between",
|
|
617
|
-
children: [/* @__PURE__ */ jsxs("button", {
|
|
618
|
-
type: "button",
|
|
619
|
-
className: "flex flex-row items-center text-left",
|
|
620
|
-
onClick: () => {
|
|
621
|
-
router.push(`/profile/${replyItem.user_id}`);
|
|
622
|
-
},
|
|
623
|
-
children: [/* @__PURE__ */ jsx("div", {
|
|
624
|
-
className: "w-[38px] h-[38px] rounded-full overflow-hidden relative bg-bg2",
|
|
625
|
-
children: replyItem.avatar && /* @__PURE__ */ jsx(Image, {
|
|
626
|
-
src: replyItem.avatar,
|
|
627
|
-
fill: true,
|
|
628
|
-
objectFit: "cover",
|
|
629
|
-
alt: "avatar"
|
|
630
|
-
})
|
|
631
|
-
}), /* @__PURE__ */ jsxs("div", {
|
|
632
|
-
className: "ml-[12px] flex flex-col",
|
|
633
|
-
children: [/* @__PURE__ */ jsx("span", {
|
|
634
|
-
className: "text-text2 text-[14px] leading-[14px] max-w-[180px] text-ellipsis overflow-hidden whitespace-nowrap",
|
|
635
|
-
children: replyItem.user_name
|
|
636
|
-
}), /* @__PURE__ */ jsx("span", {
|
|
637
|
-
className: "mt-[8px] text-text3 text-[12px] leading-[12px]",
|
|
638
|
-
children: /* @__PURE__ */ jsx(TimeDisplay, { timestamp: replyItem.created_at })
|
|
639
|
-
})]
|
|
640
|
-
})]
|
|
641
|
-
}), isUnderReview ? /* @__PURE__ */ jsx("div", {
|
|
642
|
-
className: "px-[8px] py-[4px] bg-text3/10 rounded-[12px]",
|
|
643
|
-
children: /* @__PURE__ */ jsx("span", {
|
|
644
|
-
className: "text-text3 text-[12px] leading-[12px]",
|
|
645
|
-
children: t("replyDetail.underReview")
|
|
646
|
-
})
|
|
647
|
-
}) : /* @__PURE__ */ jsxs("div", {
|
|
648
|
-
className: "flex flex-row items-center",
|
|
649
|
-
children: [/* @__PURE__ */ jsxs("div", {
|
|
650
|
-
className: "px-[4px] flex flex-col items-center",
|
|
651
|
-
onClick: handleLikeClick,
|
|
652
|
-
children: [replyItem.like_flag === "1" ? /* @__PURE__ */ jsx(SvgGiveLikeSel, { className: "w-[14px] h-[14px]" }) : /* @__PURE__ */ jsx(SvgGiveLike, { className: "w-[14px] h-[14px] text-text3" }), /* @__PURE__ */ jsx("span", {
|
|
653
|
-
className: "mt-[4px] text-text3 text-[12px] leading-[12px]",
|
|
654
|
-
children: replyItem.like_cnt === "0" ? t("replyDetail.like") : formatCompactCount(replyItem.like_cnt)
|
|
655
|
-
})]
|
|
656
|
-
}), /* @__PURE__ */ jsxs("div", {
|
|
657
|
-
className: "ml-[12px] px-[4px] flex flex-col items-center",
|
|
658
|
-
onClick: handleDislikeClick,
|
|
659
|
-
children: [replyItem.like_flag === "2" ? /* @__PURE__ */ jsx(SvgUnLikeSel, { className: "w-[14px] h-[14px]" }) : /* @__PURE__ */ jsx(SvgUnLike, { className: "w-[14px] h-[14px] text-text3" }), /* @__PURE__ */ jsx("span", {
|
|
660
|
-
className: "mt-[4px] text-text3 text-[12px] leading-[12px]",
|
|
661
|
-
children: replyItem.dislike_cnt === "0" ? t("replyDetail.dislike") : formatCompactCount(replyItem.dislike_cnt)
|
|
662
|
-
})]
|
|
663
|
-
})]
|
|
664
|
-
})]
|
|
665
|
-
}), /* @__PURE__ */ jsxs("div", {
|
|
666
|
-
className: "mt-[4px] pl-[50px] flex flex-col",
|
|
667
|
-
children: [
|
|
668
|
-
replyItem.text && /* @__PURE__ */ jsx(CommentRichText, {
|
|
669
|
-
className: "text-text1 text-[14px] leading-[22px] break-all",
|
|
670
|
-
text: replyItem.text,
|
|
671
|
-
atUsers: replyItem.at_users
|
|
672
|
-
}),
|
|
673
|
-
/* @__PURE__ */ jsx(CommentMedia, {
|
|
674
|
-
list: replyItem.nine_grid_content_info,
|
|
675
|
-
disabled: isUnderReview,
|
|
676
|
-
hasText: Boolean(replyItem.text),
|
|
677
|
-
playerId: replyItem.id
|
|
678
|
-
}),
|
|
679
|
-
replyItem.parent_reply && replyItem.parent_reply.text && /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsxs("div", {
|
|
680
|
-
className: "mt-[4px] flex flex-row items-center text-[14px] leading-[22px] relative pl-[8px]",
|
|
681
|
-
children: [/* @__PURE__ */ jsx("div", { className: "w-[2px] h-full bg-line1 mr-[8px] absolute left-0 top-0 bottom-0 m-auto" }), /* @__PURE__ */ jsxs("span", {
|
|
682
|
-
className: "text-theme1",
|
|
683
|
-
children: [
|
|
684
|
-
replyItem.parent_reply.user_name,
|
|
685
|
-
":",
|
|
686
|
-
replyItem.parent_reply.text && /* @__PURE__ */ jsx("span", {
|
|
687
|
-
className: "text-text1",
|
|
688
|
-
children: /* @__PURE__ */ jsx(CommentRichText, {
|
|
689
|
-
text: replyItem.parent_reply.text,
|
|
690
|
-
atUsers: replyItem.parent_reply.at_users
|
|
691
|
-
})
|
|
692
|
-
})
|
|
693
|
-
]
|
|
694
|
-
})]
|
|
695
|
-
}), /* @__PURE__ */ jsx("div", {
|
|
696
|
-
className: "mt-1",
|
|
697
|
-
children: /* @__PURE__ */ jsx(CommentMedia, {
|
|
698
|
-
list: replyItem.parent_reply.nine_grid_content_info,
|
|
699
|
-
disabled: isUnderReview,
|
|
700
|
-
hasText: Boolean(replyItem.parent_reply.text),
|
|
701
|
-
playerId: replyItem.parent_reply.id
|
|
702
|
-
})
|
|
703
|
-
})] }),
|
|
704
|
-
/* @__PURE__ */ jsx("div", {
|
|
705
|
-
className: "mt-[4px] w-[fit-content] h-[30px] px-[12px] text-text1 text-[14px] leading-[22px] flex flex-row items-center bg-bg1 rounded-[15px]",
|
|
706
|
-
onClick: handleReplyClick,
|
|
707
|
-
children: /* @__PURE__ */ jsx("span", { children: t("replyDetail.reply") })
|
|
708
|
-
})
|
|
709
|
-
]
|
|
710
|
-
})]
|
|
711
|
-
});
|
|
712
|
-
}
|
|
713
|
-
/**
|
|
714
|
-
* 回复详情弹层。
|
|
715
|
-
*/
|
|
716
|
-
function ReplyDetail({ comment, information, contentType, visible, onClose, onReplyComment, onReplyAdded, onRequireLogin }) {
|
|
717
|
-
const t = useTranslations("components.biz.business.comment");
|
|
718
|
-
const commentRef = useRef(null);
|
|
719
|
-
const [replyComment, setReplyComment] = useState(() => mapApiReplayToReplay({}));
|
|
720
|
-
const [isClickReplyButton, setIsClickReplyButton] = useState(false);
|
|
721
|
-
const { userInfo, userId: storeUserId } = useUserStore();
|
|
722
|
-
const { followIds, setFollowIds } = useFollowIdsState();
|
|
723
|
-
const resolvedUserId = userInfo?.userId || userInfo?.user_id || storeUserId || "";
|
|
724
|
-
const resolvedUserName = userInfo?.name || userInfo?.nick_name || userInfo?.nickname || userInfo?.user_name || "";
|
|
725
|
-
const resolvedUserAvatar = userInfo?.avatar || userInfo?.avatar_url || "";
|
|
726
|
-
const followCheckRef = useRef({
|
|
727
|
-
commentId: "",
|
|
728
|
-
userId: ""
|
|
729
|
-
});
|
|
730
|
-
/**
|
|
731
|
-
* CreateComment 接口 data 字段在不同端/版本里可能是:
|
|
732
|
-
* - { comment_id: '123' }
|
|
733
|
-
* - ['123']
|
|
734
|
-
* - { data: ['123'] }
|
|
735
|
-
* 统一兜底解析,避免拿不到 comment_id 后本地用时间戳/0 作为 id,进一步把 parent_id 传错(深层回复会放大这个问题)。
|
|
736
|
-
*/
|
|
737
|
-
function resolveCreatedCommentId(data) {
|
|
738
|
-
if (!data) return "";
|
|
739
|
-
if (Array.isArray(data)) return String(data[0] || "");
|
|
740
|
-
if (typeof data === "object") {
|
|
741
|
-
if (Object.prototype.hasOwnProperty.call(data, "comment_id")) return String(data.comment_id ?? "");
|
|
742
|
-
if (Array.isArray(data.data)) return String(data.data[0] || "");
|
|
743
|
-
}
|
|
744
|
-
return "";
|
|
745
|
-
}
|
|
746
|
-
/**
|
|
747
|
-
* 弹窗打开时刷新关注状态(同步 followIds/评论头部按钮)。
|
|
748
|
-
*/
|
|
749
|
-
useEffect(() => {
|
|
750
|
-
if (!visible) return;
|
|
751
|
-
if (!resolvedUserId || !comment.user_id) return;
|
|
752
|
-
if (comment.user_id === "0") return;
|
|
753
|
-
if (String(resolvedUserId) === String(comment.user_id)) return;
|
|
754
|
-
if (followCheckRef.current.commentId === comment.id && followCheckRef.current.userId === resolvedUserId) return;
|
|
755
|
-
followCheckRef.current = {
|
|
756
|
-
commentId: comment.id,
|
|
757
|
-
userId: resolvedUserId
|
|
758
|
-
};
|
|
759
|
-
(async () => {
|
|
760
|
-
const result = await checkFollowStatus({
|
|
761
|
-
app_id: 0,
|
|
762
|
-
follower_id: resolvedUserId,
|
|
763
|
-
followee_ids: [comment.user_id]
|
|
764
|
-
});
|
|
765
|
-
if (!result.success || !result.data?.is_following_map) return;
|
|
766
|
-
const isFollowed = Boolean(result.data.is_following_map[comment.user_id]);
|
|
767
|
-
comment.is_follow = isFollowed;
|
|
768
|
-
const next = new Set(followIds);
|
|
769
|
-
if (isFollowed) next.add(comment.user_id);
|
|
770
|
-
else next.delete(comment.user_id);
|
|
771
|
-
setFollowIds(Array.from(next));
|
|
772
|
-
})();
|
|
773
|
-
}, [
|
|
774
|
-
comment,
|
|
775
|
-
followIds,
|
|
776
|
-
resolvedUserId,
|
|
777
|
-
setFollowIds,
|
|
778
|
-
visible
|
|
779
|
-
]);
|
|
780
|
-
/**
|
|
781
|
-
* 回复回复:定位到输入框。
|
|
782
|
-
*/
|
|
783
|
-
const handleReplyComment = useCallback((reply) => {
|
|
784
|
-
setReplyComment(reply);
|
|
785
|
-
setTimeout(() => {
|
|
786
|
-
setIsClickReplyButton(true);
|
|
787
|
-
commentRef.current?.focus();
|
|
788
|
-
}, 10);
|
|
789
|
-
}, []);
|
|
790
|
-
/**
|
|
791
|
-
* 输入框失焦:重置回复态。
|
|
792
|
-
*/
|
|
793
|
-
function handleInputBlur() {
|
|
794
|
-
replyDetailDebounce0(() => {
|
|
795
|
-
setIsClickReplyButton(false);
|
|
796
|
-
});
|
|
797
|
-
}
|
|
798
|
-
/**
|
|
799
|
-
* 回复评论(统一入口)。
|
|
800
|
-
*/
|
|
801
|
-
async function handlePublishComment({ text, imageVideoInfoList }) {
|
|
802
|
-
/**
|
|
803
|
-
* 统一处理发布失败提示。
|
|
804
|
-
*/
|
|
805
|
-
const handlePublishFailure = (result) => {
|
|
806
|
-
if (result.success) return result;
|
|
807
|
-
toast.error(result.message || t("replyDetail.publishReplyFailed"));
|
|
808
|
-
return {
|
|
809
|
-
...result,
|
|
810
|
-
toastHandled: true
|
|
811
|
-
};
|
|
812
|
-
};
|
|
813
|
-
if (isClickReplyButton) {
|
|
814
|
-
const result = await publishReplyReply({
|
|
815
|
-
text,
|
|
816
|
-
imageVideoInfoList
|
|
817
|
-
});
|
|
818
|
-
setIsClickReplyButton(false);
|
|
819
|
-
return handlePublishFailure(result);
|
|
820
|
-
} else {
|
|
821
|
-
const result = await publishReplyComment({
|
|
822
|
-
text,
|
|
823
|
-
imageVideoInfoList
|
|
824
|
-
});
|
|
825
|
-
setIsClickReplyButton(false);
|
|
826
|
-
return handlePublishFailure(result);
|
|
827
|
-
}
|
|
828
|
-
}
|
|
829
|
-
/**
|
|
830
|
-
* 发布回复评论(直接回复评论)。
|
|
831
|
-
*/
|
|
832
|
-
async function publishReplyComment({ text, imageVideoInfoList }) {
|
|
833
|
-
return await onReplyComment?.({
|
|
834
|
-
text,
|
|
835
|
-
imageVideoInfoList,
|
|
836
|
-
callback: (replyId) => {
|
|
837
|
-
const localAtUsers = parseAtUsersFromHtml(text);
|
|
838
|
-
if (!replyId || replyId === "0") return;
|
|
839
|
-
const newReply = mapApiReplayToReplay({
|
|
840
|
-
id: replyId,
|
|
841
|
-
user_id: resolvedUserId,
|
|
842
|
-
user_name: resolvedUserName,
|
|
843
|
-
avatar: resolvedUserAvatar,
|
|
844
|
-
text,
|
|
845
|
-
created_at: getCurrentSecondTime(),
|
|
846
|
-
type: "4",
|
|
847
|
-
nine_grid_content_info: imageVideoInfoList,
|
|
848
|
-
at_users: localAtUsers
|
|
849
|
-
});
|
|
850
|
-
updateReplyListFn?.(newReply);
|
|
851
|
-
}
|
|
852
|
-
}) ?? { success: true };
|
|
853
|
-
}
|
|
854
|
-
/**
|
|
855
|
-
* 发布回复回复(回复某条回复)。
|
|
856
|
-
*/
|
|
857
|
-
async function publishReplyReply({ text, imageVideoInfoList }) {
|
|
858
|
-
if (!replyComment?.id || replyComment.id === "0") return {
|
|
859
|
-
success: false,
|
|
860
|
-
message: t("replyDetail.invalidReplyTarget")
|
|
861
|
-
};
|
|
862
|
-
const medias = buildCommentMedias(imageVideoInfoList);
|
|
863
|
-
const mentionedUserIds = parseTextAtUserIds(text);
|
|
864
|
-
const resolvedSourceType = contentType === "video" ? 1 : 2;
|
|
865
|
-
try {
|
|
866
|
-
const result = await pCommunityCreateComment({
|
|
867
|
-
content_id: information.id,
|
|
868
|
-
content: replaceAtUserElement(text),
|
|
869
|
-
medias,
|
|
870
|
-
mentioned_users: mentionedUserIds,
|
|
871
|
-
parent_id: replyComment.id,
|
|
872
|
-
source_type: resolvedSourceType
|
|
873
|
-
}, { revalidate: false });
|
|
874
|
-
if (result.code !== 0) return {
|
|
875
|
-
success: false,
|
|
876
|
-
message: result.message || t("replyDetail.publishReplyFailed")
|
|
877
|
-
};
|
|
878
|
-
const replyId = resolveCreatedCommentId(result.data);
|
|
879
|
-
if (!replyId || replyId === "0") return {
|
|
880
|
-
success: false,
|
|
881
|
-
message: t("replyDetail.publishReplyFailed")
|
|
882
|
-
};
|
|
883
|
-
const newReply = mapApiReplayToReplay({
|
|
884
|
-
id: replyId,
|
|
885
|
-
user_id: resolvedUserId,
|
|
886
|
-
user_name: resolvedUserName,
|
|
887
|
-
avatar: resolvedUserAvatar,
|
|
888
|
-
text,
|
|
889
|
-
created_at: getCurrentSecondTime(),
|
|
890
|
-
type: "4",
|
|
891
|
-
nine_grid_content_info: imageVideoInfoList,
|
|
892
|
-
at_users: parseAtUsersFromHtml(text)
|
|
893
|
-
});
|
|
894
|
-
newReply.parent_reply = replyComment;
|
|
895
|
-
updateReplyListFn?.(newReply);
|
|
896
|
-
onReplyAdded?.();
|
|
897
|
-
return { success: true };
|
|
898
|
-
} catch (error) {
|
|
899
|
-
console.error("发布回复回复失败:", error);
|
|
900
|
-
return {
|
|
901
|
-
success: false,
|
|
902
|
-
message: t("replyDetail.publishReplyFailed")
|
|
903
|
-
};
|
|
904
|
-
}
|
|
905
|
-
}
|
|
906
|
-
const [updateReplyListFn, setUpdateReplyListFn] = useState(null);
|
|
907
|
-
/**
|
|
908
|
-
* 处理更新回复列表的函数。
|
|
909
|
-
*/
|
|
910
|
-
const handleReplyListUpdate = useCallback((updateFn) => {
|
|
911
|
-
setUpdateReplyListFn(() => updateFn);
|
|
912
|
-
}, []);
|
|
913
|
-
/**
|
|
914
|
-
* 评论输入框占位符。
|
|
915
|
-
*/
|
|
916
|
-
const inputPlaceholder = isClickReplyButton ? `回复@${replyComment.user_name}` : "";
|
|
917
|
-
/**
|
|
918
|
-
* 弹窗开关回调。
|
|
919
|
-
*/
|
|
920
|
-
function handleDialogOpenChange(next) {
|
|
921
|
-
if (!next) onClose();
|
|
922
|
-
}
|
|
923
|
-
return /* @__PURE__ */ jsx(Dialog, {
|
|
924
|
-
open: visible,
|
|
925
|
-
onOpenChange: handleDialogOpenChange,
|
|
926
|
-
children: /* @__PURE__ */ jsxs(DialogContent, {
|
|
927
|
-
showCloseButton: false,
|
|
928
|
-
className: "fixed left-0 right-0 bottom-0 top-[84px] z-[1000] h-auto w-full max-w-none translate-x-0 translate-y-0 rounded-none bg-bg2 p-0 text-text1 !flex !flex-col !gap-0",
|
|
929
|
-
children: [/* @__PURE__ */ jsxs("div", {
|
|
930
|
-
className: "w-full h-[60px] bg-bg1 flex items-center justify-center relative",
|
|
931
|
-
children: [/* @__PURE__ */ jsx("button", {
|
|
932
|
-
type: "button",
|
|
933
|
-
className: "w-[48px] focus-within:outline-none focus-within:border-none focus-within:ring-0 h-full flex items-center justify-center absolute left-0 top-0",
|
|
934
|
-
onClick: onClose,
|
|
935
|
-
children: /* @__PURE__ */ jsx(SvgClose, { className: "w-[16px] h-[16px] text-text1" })
|
|
936
|
-
}), /* @__PURE__ */ jsx("span", {
|
|
937
|
-
className: "text-[18px] font-bold",
|
|
938
|
-
children: t("replyDetail.commentDetail")
|
|
939
|
-
})]
|
|
940
|
-
}), /* @__PURE__ */ jsxs("div", {
|
|
941
|
-
className: "flex-1 min-h-0 w-full overflow-y-auto bg-bg2",
|
|
942
|
-
children: [
|
|
943
|
-
/* @__PURE__ */ jsx(ReplyDetailHeader, {
|
|
944
|
-
comment,
|
|
945
|
-
updateFollow: (hasFollow) => {
|
|
946
|
-
comment.is_follow = hasFollow;
|
|
947
|
-
},
|
|
948
|
-
onRequireLogin
|
|
949
|
-
}),
|
|
950
|
-
/* @__PURE__ */ jsx(ReplyList, {
|
|
951
|
-
commentId: comment.id,
|
|
952
|
-
informationId: information.id,
|
|
953
|
-
handleReplyComment,
|
|
954
|
-
onReplyListUpdate: handleReplyListUpdate
|
|
955
|
-
}),
|
|
956
|
-
/* @__PURE__ */ jsx(CommentInput, {
|
|
957
|
-
placeholder: inputPlaceholder,
|
|
958
|
-
onInputBlur: handleInputBlur,
|
|
959
|
-
onPublish: handlePublishComment,
|
|
960
|
-
onRequireLogin,
|
|
961
|
-
ref: commentRef
|
|
962
|
-
})
|
|
963
|
-
]
|
|
964
|
-
})]
|
|
965
|
-
})
|
|
966
|
-
});
|
|
967
|
-
}
|
|
968
|
-
|
|
969
|
-
//#endregion
|
|
970
|
-
export { ReplyDetail as default };
|
|
2
|
+
"use client";import{debounceFun as e,formatCompactCount as t,getCurrentSecondTime as n,parseTextAtUserIds as r,replaceAtUserElement as i}from"../../../../utils/common.mjs";import{cn as a}from"../../../../utils/cn.mjs";import{useFollowIdsState as o}from"../../../../store/modules/follow-ids-store.mjs";import{useUserStore as s}from"../../../../store/modules/user-store.mjs";import{gCommunityGetComments as c,pCommunityCreateComment as l,pCommunityDislikeComment as u,pCommunityLikeComment as d,pInteractionFollow as f,pInteractionUnfollow as p}from"../../../../service/generated/client.mjs";import{checkFollowStatus as m}from"../../../../utils/follow-service.mjs";import{useRouter as h}from"../../../../utils/use-compatible-router.mjs";import{Image as g}from"../../../ui/image.mjs";import{Dialog as _,DialogContent as v}from"../../../ui/dialog.mjs";import{InfiniteScroll as y}from"../../../ui/infinite-scroll.mjs";import{useLikeDislike as b}from"../../../../hooks/use-like-dislike.mjs";import{useKeepAliveState as x}from"../../../common/keep-scroll-position/index.mjs";import S from"../../../../assets/icons/close.mjs";import C from"../../../../assets/icons/common/follow_sel.mjs";import w from"../../../../assets/icons/common/follow_user.mjs";import{UnfollowConfirmDialog as T}from"../../../common/follow-button/unfollow-confirm-dialog.mjs";import E from"../../../../assets/icons/detail/give_like.mjs";import D from"../../../../assets/icons/detail/give_like_sel.mjs";import O from"./comment-input.mjs";import k from"../../../../assets/icons/detail/un_like.mjs";import A from"../../../../assets/icons/detail/un_like_sel.mjs";import{CommentMedia as j}from"./comment-media.mjs";import{CommentRichText as M}from"./comment-rich-text.mjs";import{TimeDisplay as N}from"./time-display.mjs";import{CommentItem as P}from"./comment-item.mjs";import{mapApiReplayToReplay as F}from"../../../../types/safe-replay.mjs";import{toast as I}from"sonner";import{memo as L,useCallback as R,useEffect as z,useMemo as B,useRef as V,useState as H}from"react";import{Fragment as U,jsx as W,jsxs as G}from"react/jsx-runtime";import{useTranslations as K}from"next-intl";function q(e){if(e==null)return 0;let t=typeof e==`number`?e:Number(e);if(!Number.isNaN(t)&&t>0)return t>0xe8d4a51000?Math.floor(t/1e3):Math.floor(t);let n=Date.parse(String(e));return Number.isNaN(n)?0:Math.floor(n/1e3)}function J(e,t,n){let r=[];return Array.isArray(n)&&n.length>0?(n.forEach(e=>{let t=!!e?.is_video,n=String(e?.media_url||``),i=String(e?.cover_image||``);!n&&!i||r.push({cover_image:i,cover_image_thumbnail:i,cover_image_radio:1,cover_image_resolution:String(e?.cover_image_resolution||``),image_url:t?``:n,image_thumbnail:t?``:n,image_radio:1,image_resolution:String(e?.image_resolution||``),is_video:t,resolution:String(e?.video_resolution||``),video_duration:Number(e?.video_duration||0),video_url:t?n:``,video_size:Number(e?.video_size||0),video_codec_info:{hls_info:[],video_codec_deal:!1}})}),r):(e?.length&&e.forEach(e=>{r.push({cover_image:``,cover_image_thumbnail:``,cover_image_radio:1,cover_image_resolution:``,image_url:e,image_thumbnail:e,image_radio:1,image_resolution:``,is_video:!1,resolution:``,video_duration:0,video_url:``,video_size:0,video_codec_info:{hls_info:[],video_codec_deal:!1}})}),t?.length&&t.forEach(e=>{r.push({cover_image:``,cover_image_thumbnail:``,cover_image_radio:1,cover_image_resolution:``,image_url:``,image_thumbnail:``,image_radio:1,image_resolution:``,is_video:!0,resolution:``,video_duration:0,video_url:e,video_size:0,video_codec_info:{hls_info:[],video_codec_deal:!1}})}),r)}function Y(e){let t=Z(e.mentioned_users),n=t.length>0?t:Q(e.content||``);return{id:String(e.comment_id??e.id??``),user_name:e.user?.nickname||e.user?.username||``,text:e.content||``,type:`4`,files:[],at_users:n,cover_image:``,nine_grid_content_info:J(e?.images,e?.videos,e?.medias)}}function X(e,t){let n=e.is_liked?`1`:e.is_dislike?`2`:`0`,r=Z(e.mentioned_users),i=r.length>0?r:Q(e.content||``),a=String(e.comment_id??e.id??``),o=typeof e.like_count==`number`?e.like_count:0,s=F({id:a,like_cnt:(e.is_liked&&o===0?1:o).toString(),dislike_cnt:(e.dislike_count||0).toString(),created_at:q(e.create_time),text:e.content||``,type:`4`,like_flag:n,user_id:e.user_id||``,user_name:e.user?.nickname||e.user?.username||``,avatar:e.user?.avatar_url||``,reply_cnt:(e.reply_count||0).toString(),nine_grid_content_info:J(e?.images,e?.videos,e?.medias),at_users:i,parent_reply:void 0});return t&&(s.parent_reply=Y(t)),s}function Z(e){return Array.isArray(e)?e.map(e=>({user_id:e.user_id||``,name:e.nickname||e.username||``,avatar:e.avatar_url||``,birthday:``,signature:e.signature||``})):[]}function Q(e){if(!e)return[];let t=new Map,n=/<span[^>]*class=['"]mention['"][^>]*data-id=['"]([^'"]+)['"][^>]*>@([^<]*)<\/span>/g,r;for(;(r=n.exec(e))!==null;){let e=r[1]?String(r[1]):``,n=(r[2]?String(r[2]):``).replace(/^@/,``)||e;!e||t.has(e)||t.set(e,{user_id:e,name:n,avatar:``,birthday:``,signature:``})}if(t.size>0)return Array.from(t.values());let i=/<@_user>(\w+)<\/@_user>/g;for(;(r=i.exec(e))!==null;){let e=r[1]?String(r[1]):``;!e||t.has(e)||t.set(e,{user_id:e,name:e,avatar:``,birthday:``,signature:``})}return Array.from(t.values())}function ee(e){return!Array.isArray(e)||e.length===0?[]:e.map(e=>{let t=!!e.is_video,n=t?String(e.video_url||``):String(e.image_url||e.cover_image||``),r=String(e.cover_image||e.image_url||``);return{media_url:n,is_video:t,image_resolution:String(e.image_resolution||``),cover_image:r,cover_image_resolution:String(e.cover_image_resolution||``),video_resolution:String(e.resolution||``),video_duration:Number(e.video_duration||0),video_size:Number(e.video_size||0)}}).filter(e=>!!e.media_url)}function $(e,t){let n=[];return e.forEach(e=>{n.push(X(e,t)),e.sub_comments?.length&&n.push(...$(e.sub_comments,e))}),n}const te=e((e,t,n)=>{try{if(!e?.id)return;d({comment_id:e.id,is_like:e.like_flag!==`1`},{revalidate:!1})}catch(e){console.error(`点赞回复失败:`,e)}},200),ne=e((e,t,n)=>{try{if(!e?.id)return;u({comment_id:e.id,is_dislike:e.like_flag!==`2`},{revalidate:!1})}catch(e){console.error(`点踩回复失败:`,e)}},200),re=L(({comment:e,updateFollow:t,onRequireLogin:n})=>{let{userInfo:r,userId:i,isLogin:a}=s(),o=r?.userId||r?.user_id||i||``;return W(`div`,{className:`w-full bg-bg1`,children:W(P,{comment:e,variant:`light`,isLogin:a,onRequireLogin:n,rightSlot:B(()=>!!o&&String(o)===String(e.user_id||``),[e.user_id,o])?W(U,{}):W(ie,{userId:e.user_id,hasFollow:e.is_follow,onChange:t,onRequireLogin:n}),showReplyButton:!1})})});function ie({userId:e,hasFollow:t=!1,onChange:n,onRequireLogin:r}){let i=K(`components.biz.business.comment`),{isLogin:c,userInfo:l,userId:u}=s(),{followIds:d}=o(),[m,h]=H(t),[g,_]=H(!1),v=l?.userId||l?.user_id||u||``,y=B(()=>!!v&&String(v)===String(e||``),[e,v]),b=B(()=>t||d.includes(e),[d,t,e]);z(()=>{h(b)},[b]);let x=R(async()=>{try{if(!v||!e||e===`0`){I.error(i(`replyDetail.loginRequired`));return}if(m){let t=await p({follower_id:String(v),followee_id:e});if(t.code!==0){I.error(t.message||i(`replyDetail.unfollowFailed`));return}}else{let t=await f({follower_id:String(v),followee_id:e});if(t.code!==0){I.error(t.message||i(`replyDetail.followFailed`));return}}window.sensors?.track(`detail_follow_click`,{object_id:``,action:m?`取消关注`:`关注`,author_id:e}),sessionStorage.setItem(`user_page_refresh`,`1`)}catch(e){console.error(`关注或取消关注失败:`,e),I.error(i(m?`replyDetail.unfollowFailed`:`replyDetail.followFailed`));return}let t=!m;n?.(t),h(t);let{followIds:r,setFollowIds:a}=o.getState(),s=new Set(r);t?s.add(e):s.delete(e),a(Array.from(s))},[e,m,n,v,i]),S=R(()=>{if(!c){r?.();return}if(m){_(!0);return}x()},[x,m,c,r]);function E(){_(!1),x()}function D(){_(!1)}return y||!e||e===`0`?null:G(U,{children:[W(`div`,{className:a(`h-[28px] rounded-[14px] px-[8px] border border-solid cursor-pointer flex items-center justify-center`,m?`border-text3`:`border-theme5`),onClick:S,children:m?G(U,{children:[W(C,{className:`w-[12px] h-[12px] text-text3 shrink-0`}),W(`span`,{className:`text-text3 text-[12px] leading-[18px] ml-[4px] shrink-0`,children:i(`replyDetail.followed`)})]}):G(U,{children:[W(w,{className:`block w-[12px] h-[12px] text-theme5 shrink-0`}),W(`span`,{className:`block text-theme5 text-[12px] leading-[18px] ml-[4px] shrink-0`,children:i(`replyDetail.follow`)})]})}),W(T,{open:g,onOpenChange:_,onCancel:D,onConfirm:E})]})}const ae=e(e=>{e()},0);function oe(e,t,n,r){let i=V(!1);z(()=>{i.current=!1},[r]),z(()=>{let r=e.current;if(!r)return;!i.current&&t>0&&(r.scrollTop=t,i.current=!0);let a=()=>{i.current=!0,n(r.scrollTop)};return r.addEventListener(`scroll`,a,{passive:!0}),()=>r.removeEventListener(`scroll`,a)},[e,n,t,r])}const se=L(({commentId:e,informationId:t,handleReplyComment:n,onReplyListUpdate:r})=>{let i=K(`components.biz.business.comment`),[a,o]=x(`replay-detail-list-${e}`,[]),[s,l]=x(`replay-detail-has-more-${e}`,!0),[u,d]=x(`replay-detail-page-${e}`,1),{getLikedListData:f,getDislikedListData:p}=b(),m=V(!1),h=R(async()=>{if(!(!e||!t)&&!m.current){m.current=!0;try{let n=await c({content_id:t,parent_id:e,page:u,page_size:20,sort_by:`latest`});if(n.code!==0)throw Error(n.message||i(`replyDetail.fetchRepliesFailed`));let r=n.data?.data?.comments??[],a=$(r);((n.data?.data?.has_more??!1)===!1||r.length<20)&&l(!1),o(e=>{let t=new Set(e.map(e=>e.id)),n=a.filter(e=>!t.has(e.id));return[...e,...n]}),a.length>0&&d(u+1)}catch(e){console.error(`获取回复列表失败:`,e),l(!1)}finally{m.current=!1}}},[e,t,u,o,l,d,i]),g=R(e=>{o(t=>[e,...t])},[o]);z(()=>{r(g)},[r,g]),z(()=>{e&&t&&(o(e=>e.length===0?e:[]),l(e=>e===!0?e:!0),d(e=>e===1?e:1))},[e,t,o,l,d]);let _=R(n=>{o(e=>f(e,n.id)),te(n,t,e)},[e,f,t,o]),v=R(n=>{n.like_flag!==`2`&&I.message(i(`replyDetail.dislikeHint`)),o(e=>p(e,n.id)),ne(n,t,e)},[e,p,t,o,i]),[S,C]=x(`replay-detail-scroll-top-${e}`,0),w=V(null);oe(w,S,C,e),z(()=>{!e||!t||a.length===0&&s&&h()},[e,t,h,a.length,s]);let T=R(async()=>{await h()},[h]);return G(`div`,{ref:w,className:`w-full pb-[66px]`,children:[a.map((e,t)=>W(ce,{replyItem:e,replyComment:n,onLikeReply:_,onDislikeReply:v},`${e.id}-${t}`)),W(y,{loadMore:T,hasMore:s})]})});function ce({replyItem:e,replyComment:n,onLikeReply:r,onDislikeReply:i}){let a=K(`components.biz.business.comment`),o=h(),s=e.status===`0`;function c(){r?.(e)}function l(){i?.(e)}function u(){n(e)}return G(`div`,{className:`p-[16px] flex flex-col`,children:[G(`div`,{className:`flex flex-row justify-between`,children:[G(`button`,{type:`button`,className:`flex flex-row items-center text-left`,onClick:()=>{o.push(`/profile/${e.user_id}`)},children:[W(`div`,{className:`w-[38px] h-[38px] rounded-full overflow-hidden relative bg-bg2`,children:e.avatar&&W(g,{src:e.avatar,fill:!0,objectFit:`cover`,alt:`avatar`})}),G(`div`,{className:`ml-[12px] flex flex-col`,children:[W(`span`,{className:`text-text2 text-[14px] leading-[14px] max-w-[180px] text-ellipsis overflow-hidden whitespace-nowrap`,children:e.user_name}),W(`span`,{className:`mt-[8px] text-text3 text-[12px] leading-[12px]`,children:W(N,{timestamp:e.created_at})})]})]}),s?W(`div`,{className:`px-[8px] py-[4px] bg-text3/10 rounded-[12px]`,children:W(`span`,{className:`text-text3 text-[12px] leading-[12px]`,children:a(`replyDetail.underReview`)})}):G(`div`,{className:`flex flex-row items-center`,children:[G(`div`,{className:`px-[4px] flex flex-col items-center`,onClick:c,children:[e.like_flag===`1`?W(D,{className:`w-[14px] h-[14px]`}):W(E,{className:`w-[14px] h-[14px] text-text3`}),W(`span`,{className:`mt-[4px] text-text3 text-[12px] leading-[12px]`,children:e.like_cnt===`0`?a(`replyDetail.like`):t(e.like_cnt)})]}),G(`div`,{className:`ml-[12px] px-[4px] flex flex-col items-center`,onClick:l,children:[e.like_flag===`2`?W(A,{className:`w-[14px] h-[14px]`}):W(k,{className:`w-[14px] h-[14px] text-text3`}),W(`span`,{className:`mt-[4px] text-text3 text-[12px] leading-[12px]`,children:e.dislike_cnt===`0`?a(`replyDetail.dislike`):t(e.dislike_cnt)})]})]})]}),G(`div`,{className:`mt-[4px] pl-[50px] flex flex-col`,children:[e.text&&W(M,{className:`text-text1 text-[14px] leading-[22px] break-all`,text:e.text,atUsers:e.at_users}),W(j,{list:e.nine_grid_content_info,disabled:s,hasText:!!e.text,playerId:e.id}),e.parent_reply&&e.parent_reply.text&&G(U,{children:[G(`div`,{className:`mt-[4px] flex flex-row items-center text-[14px] leading-[22px] relative pl-[8px]`,children:[W(`div`,{className:`w-[2px] h-full bg-line1 mr-[8px] absolute left-0 top-0 bottom-0 m-auto`}),G(`span`,{className:`text-theme1`,children:[e.parent_reply.user_name,`:`,e.parent_reply.text&&W(`span`,{className:`text-text1`,children:W(M,{text:e.parent_reply.text,atUsers:e.parent_reply.at_users})})]})]}),W(`div`,{className:`mt-1`,children:W(j,{list:e.parent_reply.nine_grid_content_info,disabled:s,hasText:!!e.parent_reply.text,playerId:e.parent_reply.id})})]}),W(`div`,{className:`mt-[4px] w-[fit-content] h-[30px] px-[12px] text-text1 text-[14px] leading-[22px] flex flex-row items-center bg-bg1 rounded-[15px]`,onClick:u,children:W(`span`,{children:a(`replyDetail.reply`)})})]})]})}function le({comment:e,information:t,contentType:a,visible:c,onClose:u,onReplyComment:d,onReplyAdded:f,onRequireLogin:p}){let h=K(`components.biz.business.comment`),g=V(null),[y,b]=H(()=>F({})),[x,C]=H(!1),{userInfo:w,userId:T}=s(),{followIds:E,setFollowIds:D}=o(),k=w?.userId||w?.user_id||T||``,A=w?.name||w?.nick_name||w?.nickname||w?.user_name||``,j=w?.avatar||w?.avatar_url||``,M=V({commentId:``,userId:``});function N(e){if(!e)return``;if(Array.isArray(e))return String(e[0]||``);if(typeof e==`object`){if(Object.prototype.hasOwnProperty.call(e,`comment_id`))return String(e.comment_id??``);if(Array.isArray(e.data))return String(e.data[0]||``)}return``}z(()=>{c&&(!k||!e.user_id||e.user_id!==`0`&&String(k)!==String(e.user_id)&&(M.current.commentId===e.id&&M.current.userId===k||(M.current={commentId:e.id,userId:k},(async()=>{let t=await m({app_id:0,follower_id:k,followee_ids:[e.user_id]});if(!t.success||!t.data?.is_following_map)return;let n=!!t.data.is_following_map[e.user_id];e.is_follow=n;let r=new Set(E);n?r.add(e.user_id):r.delete(e.user_id),D(Array.from(r))})())))},[e,E,k,D,c]);let P=R(e=>{b(e),setTimeout(()=>{C(!0),g.current?.focus()},10)},[]);function L(){ae(()=>{C(!1)})}async function B({text:e,imageVideoInfoList:t}){let n=e=>e.success?e:(I.error(e.message||h(`replyDetail.publishReplyFailed`)),{...e,toastHandled:!0});if(x){let r=await q({text:e,imageVideoInfoList:t});return C(!1),n(r)}else{let r=await U({text:e,imageVideoInfoList:t});return C(!1),n(r)}}async function U({text:e,imageVideoInfoList:t}){return await d?.({text:e,imageVideoInfoList:t,callback:r=>{let i=Q(e);if(!r||r===`0`)return;let a=F({id:r,user_id:k,user_name:A,avatar:j,text:e,created_at:n(),type:`4`,nine_grid_content_info:t,at_users:i});J?.(a)}})??{success:!0}}async function q({text:e,imageVideoInfoList:o}){if(!y?.id||y.id===`0`)return{success:!1,message:h(`replyDetail.invalidReplyTarget`)};let s=ee(o),c=r(e),u=a===`video`?1:2;try{let r=await l({content_id:t.id,content:i(e),medias:s,mentioned_users:c,parent_id:y.id,source_type:u},{revalidate:!1});if(r.code!==0)return{success:!1,message:r.message||h(`replyDetail.publishReplyFailed`)};let a=N(r.data);if(!a||a===`0`)return{success:!1,message:h(`replyDetail.publishReplyFailed`)};let d=F({id:a,user_id:k,user_name:A,avatar:j,text:e,created_at:n(),type:`4`,nine_grid_content_info:o,at_users:Q(e)});return d.parent_reply=y,J?.(d),f?.(),{success:!0}}catch(e){return console.error(`发布回复回复失败:`,e),{success:!1,message:h(`replyDetail.publishReplyFailed`)}}}let[J,Y]=H(null),X=R(e=>{Y(()=>e)},[]),Z=x?`回复@${y.user_name}`:``;function $(e){e||u()}return W(_,{open:c,onOpenChange:$,children:G(v,{showCloseButton:!1,className:`fixed left-0 right-0 bottom-0 top-[84px] z-[1000] h-auto w-full max-w-none translate-x-0 translate-y-0 rounded-none bg-bg2 p-0 text-text1 !flex !flex-col !gap-0`,children:[G(`div`,{className:`w-full h-[60px] bg-bg1 flex items-center justify-center relative`,children:[W(`button`,{type:`button`,className:`w-[48px] focus-within:outline-none focus-within:border-none focus-within:ring-0 h-full flex items-center justify-center absolute left-0 top-0`,onClick:u,children:W(S,{className:`w-[16px] h-[16px] text-text1`})}),W(`span`,{className:`text-[18px] font-bold`,children:h(`replyDetail.commentDetail`)})]}),G(`div`,{className:`flex-1 min-h-0 w-full overflow-y-auto bg-bg2`,children:[W(re,{comment:e,updateFollow:t=>{e.is_follow=t},onRequireLogin:p}),W(se,{commentId:e.id,informationId:t.id,handleReplyComment:P,onReplyListUpdate:X}),W(O,{placeholder:Z,onInputBlur:L,onPublish:B,onRequireLogin:p,ref:g})]})]})})}export{le as default};
|