@meeovi/layer-social 1.0.3
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/README.md +79 -0
- package/app/assets/bootstrap/css/bootstrap-grid.min.css +6 -0
- package/app/assets/bootstrap/css/bootstrap-reboot.min.css +7 -0
- package/app/assets/bootstrap/css/bootstrap.min.css +11696 -0
- package/app/assets/bootstrap/js/bootstrap.bundle.min.js +6 -0
- package/app/assets/bootstrap/js/bootstrap.min.js +7 -0
- package/app/assets/commerce/css/bootstrap.css +8878 -0
- package/app/assets/commerce/css/bootstrap.css.map +7 -0
- package/app/assets/commerce/css/responsive.css +105 -0
- package/app/assets/commerce/css/responsive.css.map +7 -0
- package/app/assets/commerce/css/ui.css +1277 -0
- package/app/assets/commerce/css/ui.css.map +7 -0
- package/app/assets/commerce/fonts/fontawesome/css/all.css +4335 -0
- package/app/assets/commerce/fonts/fontawesome/css/all.min.css +5 -0
- package/app/assets/commerce/fonts/fontawesome/css/brands.css +14 -0
- package/app/assets/commerce/fonts/fontawesome/css/brands.min.css +5 -0
- package/app/assets/commerce/fonts/fontawesome/css/fontawesome.css +4302 -0
- package/app/assets/commerce/fonts/fontawesome/css/fontawesome.min.css +5 -0
- package/app/assets/commerce/fonts/fontawesome/css/regular.css +15 -0
- package/app/assets/commerce/fonts/fontawesome/css/regular.min.css +5 -0
- package/app/assets/commerce/fonts/fontawesome/css/solid.css +16 -0
- package/app/assets/commerce/fonts/fontawesome/css/solid.min.css +5 -0
- package/app/assets/commerce/fonts/fontawesome/css/svg-with-js.css +346 -0
- package/app/assets/commerce/fonts/fontawesome/css/svg-with-js.min.css +5 -0
- package/app/assets/commerce/fonts/fontawesome/css/v4-shims.css +2166 -0
- package/app/assets/commerce/fonts/fontawesome/css/v4-shims.min.css +5 -0
- package/app/assets/commerce/fonts/fontawesome/webfonts/fa-brands-400.eot +0 -0
- package/app/assets/commerce/fonts/fontawesome/webfonts/fa-brands-400.svg +3452 -0
- package/app/assets/commerce/fonts/fontawesome/webfonts/fa-brands-400.ttf +0 -0
- package/app/assets/commerce/fonts/fontawesome/webfonts/fa-brands-400.woff +0 -0
- package/app/assets/commerce/fonts/fontawesome/webfonts/fa-brands-400.woff2 +0 -0
- package/app/assets/commerce/fonts/fontawesome/webfonts/fa-regular-400.eot +0 -0
- package/app/assets/commerce/fonts/fontawesome/webfonts/fa-regular-400.svg +803 -0
- package/app/assets/commerce/fonts/fontawesome/webfonts/fa-regular-400.ttf +0 -0
- package/app/assets/commerce/fonts/fontawesome/webfonts/fa-regular-400.woff +0 -0
- package/app/assets/commerce/fonts/fontawesome/webfonts/fa-regular-400.woff2 +0 -0
- package/app/assets/commerce/fonts/fontawesome/webfonts/fa-solid-900.eot +0 -0
- package/app/assets/commerce/fonts/fontawesome/webfonts/fa-solid-900.svg +4527 -0
- package/app/assets/commerce/fonts/fontawesome/webfonts/fa-solid-900.ttf +0 -0
- package/app/assets/commerce/fonts/fontawesome/webfonts/fa-solid-900.woff +0 -0
- package/app/assets/commerce/fonts/fontawesome/webfonts/fa-solid-900.woff2 +0 -0
- package/app/assets/commerce/fonts/roboto/Roboto-Bold.ttf +0 -0
- package/app/assets/commerce/fonts/roboto/Roboto-Light.ttf +0 -0
- package/app/assets/commerce/fonts/roboto/Roboto-Medium.ttf +0 -0
- package/app/assets/commerce/fonts/roboto/Roboto-Regular.ttf +0 -0
- package/app/assets/commerce/fonts/roboto/Roboto-Thin.ttf +0 -0
- package/app/assets/commerce/fonts/roboto/font.css +23 -0
- package/app/assets/commerce/images/avatars/avatar1.jpg +0 -0
- package/app/assets/commerce/images/avatars/avatar2.jpg +0 -0
- package/app/assets/commerce/images/avatars/avatar3.jpg +0 -0
- package/app/assets/commerce/images/banners/ad-sm.png +0 -0
- package/app/assets/commerce/images/banners/ad.png +0 -0
- package/app/assets/commerce/images/banners/banner-item1.jpg +0 -0
- package/app/assets/commerce/images/banners/banner-item2.jpg +0 -0
- package/app/assets/commerce/images/banners/banner-item3.jpg +0 -0
- package/app/assets/commerce/images/banners/banner1.jpg +0 -0
- package/app/assets/commerce/images/banners/banner2.jpg +0 -0
- package/app/assets/commerce/images/banners/banner3.jpg +0 -0
- package/app/assets/commerce/images/banners/banner4.jpg +0 -0
- package/app/assets/commerce/images/banners/banner5.jpg +0 -0
- package/app/assets/commerce/images/banners/banner6.jpg +0 -0
- package/app/assets/commerce/images/banners/banner7.jpg +0 -0
- package/app/assets/commerce/images/banners/banner8.jpg +0 -0
- package/app/assets/commerce/images/banners/banner9.jpg +0 -0
- package/app/assets/commerce/images/banners/slide1.jpg +0 -0
- package/app/assets/commerce/images/banners/slide2.jpg +0 -0
- package/app/assets/commerce/images/banners/slide3.jpg +0 -0
- package/app/assets/commerce/images/favicon.ico +0 -0
- package/app/assets/commerce/images/icons/flags/AU.png +0 -0
- package/app/assets/commerce/images/icons/flags/AU@2x.png +0 -0
- package/app/assets/commerce/images/icons/flags/CN.png +0 -0
- package/app/assets/commerce/images/icons/flags/CN@2x.png +0 -0
- package/app/assets/commerce/images/icons/flags/DE.png +0 -0
- package/app/assets/commerce/images/icons/flags/DE@2x.png +0 -0
- package/app/assets/commerce/images/icons/flags/GB.png +0 -0
- package/app/assets/commerce/images/icons/flags/GB@2x.png +0 -0
- package/app/assets/commerce/images/icons/flags/IN.png +0 -0
- package/app/assets/commerce/images/icons/flags/IN@2x.png +0 -0
- package/app/assets/commerce/images/icons/flags/RU.png +0 -0
- package/app/assets/commerce/images/icons/flags/RU@2x.png +0 -0
- package/app/assets/commerce/images/icons/flags/TR.png +0 -0
- package/app/assets/commerce/images/icons/flags/TR@2x.png +0 -0
- package/app/assets/commerce/images/icons/flags/US.png +0 -0
- package/app/assets/commerce/images/icons/flags/US@2x.png +0 -0
- package/app/assets/commerce/images/icons/flags/UZ.png +0 -0
- package/app/assets/commerce/images/icons/flags/UZ@2x.png +0 -0
- package/app/assets/commerce/images/icons/pay-american-ex.png +0 -0
- package/app/assets/commerce/images/icons/pay-bank.png +0 -0
- package/app/assets/commerce/images/icons/pay-mastercard.png +0 -0
- package/app/assets/commerce/images/icons/pay-visa-el.png +0 -0
- package/app/assets/commerce/images/icons/pay-visa.png +0 -0
- package/app/assets/commerce/images/items/1.jpg +0 -0
- package/app/assets/commerce/images/items/10.jpg +0 -0
- package/app/assets/commerce/images/items/11.jpg +0 -0
- package/app/assets/commerce/images/items/12.jpg +0 -0
- package/app/assets/commerce/images/items/13.jpg +0 -0
- package/app/assets/commerce/images/items/14.jpg +0 -0
- package/app/assets/commerce/images/items/15-1.jpg +0 -0
- package/app/assets/commerce/images/items/15-2.jpg +0 -0
- package/app/assets/commerce/images/items/15.jpg +0 -0
- package/app/assets/commerce/images/items/2.jpg +0 -0
- package/app/assets/commerce/images/items/3.jpg +0 -0
- package/app/assets/commerce/images/items/4.jpg +0 -0
- package/app/assets/commerce/images/items/5.jpg +0 -0
- package/app/assets/commerce/images/items/6.jpg +0 -0
- package/app/assets/commerce/images/items/7.jpg +0 -0
- package/app/assets/commerce/images/items/8.jpg +0 -0
- package/app/assets/commerce/images/items/9.jpg +0 -0
- package/app/assets/commerce/images/logo-white.png +0 -0
- package/app/assets/commerce/images/logo.png +0 -0
- package/app/assets/commerce/images/logo.svg +16 -0
- package/app/assets/commerce/images/misc/appstore.png +0 -0
- package/app/assets/commerce/images/misc/payments.png +0 -0
- package/app/assets/commerce/images/misc/playmarket.png +0 -0
- package/app/assets/commerce/images/posts/1.jpg +0 -0
- package/app/assets/commerce/images/posts/2.jpg +0 -0
- package/app/assets/commerce/images/posts/3.jpg +0 -0
- package/app/assets/commerce/images/posts/4.jpg +0 -0
- package/app/assets/commerce/js/bootstrap.bundle.min.js +7 -0
- package/app/assets/commerce/js/jquery-2.0.0.min.js +6 -0
- package/app/assets/commerce/js/script.js +30 -0
- package/app/assets/commerce/sass/_variables-custom.scss +1102 -0
- package/app/assets/commerce/sass/bootstrap-assets/_alert.scss +51 -0
- package/app/assets/commerce/sass/bootstrap-assets/_badge.scss +54 -0
- package/app/assets/commerce/sass/bootstrap-assets/_bootstrap.scss +44 -0
- package/app/assets/commerce/sass/bootstrap-assets/_breadcrumb.scss +40 -0
- package/app/assets/commerce/sass/bootstrap-assets/_button-group.scss +163 -0
- package/app/assets/commerce/sass/bootstrap-assets/_buttons.scss +137 -0
- package/app/assets/commerce/sass/bootstrap-assets/_card.scss +289 -0
- package/app/assets/commerce/sass/bootstrap-assets/_carousel.scss +197 -0
- package/app/assets/commerce/sass/bootstrap-assets/_close.scss +41 -0
- package/app/assets/commerce/sass/bootstrap-assets/_code.scss +48 -0
- package/app/assets/commerce/sass/bootstrap-assets/_custom-forms.scss +507 -0
- package/app/assets/commerce/sass/bootstrap-assets/_dropdown.scss +191 -0
- package/app/assets/commerce/sass/bootstrap-assets/_forms.scss +330 -0
- package/app/assets/commerce/sass/bootstrap-assets/_functions.scss +86 -0
- package/app/assets/commerce/sass/bootstrap-assets/_grid.scss +52 -0
- package/app/assets/commerce/sass/bootstrap-assets/_images.scss +42 -0
- package/app/assets/commerce/sass/bootstrap-assets/_input-group.scss +193 -0
- package/app/assets/commerce/sass/bootstrap-assets/_jumbotron.scss +17 -0
- package/app/assets/commerce/sass/bootstrap-assets/_list-group.scss +149 -0
- package/app/assets/commerce/sass/bootstrap-assets/_media.scss +8 -0
- package/app/assets/commerce/sass/bootstrap-assets/_mixins.scss +47 -0
- package/app/assets/commerce/sass/bootstrap-assets/_modal.scss +229 -0
- package/app/assets/commerce/sass/bootstrap-assets/_nav.scss +119 -0
- package/app/assets/commerce/sass/bootstrap-assets/_navbar.scss +295 -0
- package/app/assets/commerce/sass/bootstrap-assets/_pagination.scss +73 -0
- package/app/assets/commerce/sass/bootstrap-assets/_popover.scss +171 -0
- package/app/assets/commerce/sass/bootstrap-assets/_print.scss +141 -0
- package/app/assets/commerce/sass/bootstrap-assets/_progress.scss +43 -0
- package/app/assets/commerce/sass/bootstrap-assets/_reboot.scss +483 -0
- package/app/assets/commerce/sass/bootstrap-assets/_root.scss +19 -0
- package/app/assets/commerce/sass/bootstrap-assets/_spinners.scss +55 -0
- package/app/assets/commerce/sass/bootstrap-assets/_tables.scss +185 -0
- package/app/assets/commerce/sass/bootstrap-assets/_toasts.scss +44 -0
- package/app/assets/commerce/sass/bootstrap-assets/_tooltip.scss +115 -0
- package/app/assets/commerce/sass/bootstrap-assets/_transitions.scss +20 -0
- package/app/assets/commerce/sass/bootstrap-assets/_type.scss +125 -0
- package/app/assets/commerce/sass/bootstrap-assets/_utilities.scss +17 -0
- package/app/assets/commerce/sass/bootstrap-assets/_variables.scss +1123 -0
- package/app/assets/commerce/sass/bootstrap-assets/mixins/_alert.scss +13 -0
- package/app/assets/commerce/sass/bootstrap-assets/mixins/_background-variant.scss +21 -0
- package/app/assets/commerce/sass/bootstrap-assets/mixins/_badge.scss +17 -0
- package/app/assets/commerce/sass/bootstrap-assets/mixins/_border-radius.scss +63 -0
- package/app/assets/commerce/sass/bootstrap-assets/mixins/_box-shadow.scss +20 -0
- package/app/assets/commerce/sass/bootstrap-assets/mixins/_breakpoints.scss +123 -0
- package/app/assets/commerce/sass/bootstrap-assets/mixins/_buttons.scss +107 -0
- package/app/assets/commerce/sass/bootstrap-assets/mixins/_caret.scss +62 -0
- package/app/assets/commerce/sass/bootstrap-assets/mixins/_clearfix.scss +7 -0
- package/app/assets/commerce/sass/bootstrap-assets/mixins/_deprecate.scss +10 -0
- package/app/assets/commerce/sass/bootstrap-assets/mixins/_float.scss +14 -0
- package/app/assets/commerce/sass/bootstrap-assets/mixins/_forms.scss +192 -0
- package/app/assets/commerce/sass/bootstrap-assets/mixins/_gradients.scss +45 -0
- package/app/assets/commerce/sass/bootstrap-assets/mixins/_grid-framework.scss +66 -0
- package/app/assets/commerce/sass/bootstrap-assets/mixins/_grid.scss +51 -0
- package/app/assets/commerce/sass/bootstrap-assets/mixins/_hover.scss +37 -0
- package/app/assets/commerce/sass/bootstrap-assets/mixins/_image.scss +36 -0
- package/app/assets/commerce/sass/bootstrap-assets/mixins/_list-group.scss +21 -0
- package/app/assets/commerce/sass/bootstrap-assets/mixins/_lists.scss +7 -0
- package/app/assets/commerce/sass/bootstrap-assets/mixins/_nav-divider.scss +10 -0
- package/app/assets/commerce/sass/bootstrap-assets/mixins/_pagination.scss +22 -0
- package/app/assets/commerce/sass/bootstrap-assets/mixins/_reset-text.scss +17 -0
- package/app/assets/commerce/sass/bootstrap-assets/mixins/_resize.scss +6 -0
- package/app/assets/commerce/sass/bootstrap-assets/mixins/_screen-reader.scss +33 -0
- package/app/assets/commerce/sass/bootstrap-assets/mixins/_size.scss +7 -0
- package/app/assets/commerce/sass/bootstrap-assets/mixins/_table-row.scss +39 -0
- package/app/assets/commerce/sass/bootstrap-assets/mixins/_text-emphasis.scss +16 -0
- package/app/assets/commerce/sass/bootstrap-assets/mixins/_text-hide.scss +11 -0
- package/app/assets/commerce/sass/bootstrap-assets/mixins/_text-truncate.scss +8 -0
- package/app/assets/commerce/sass/bootstrap-assets/mixins/_transition.scss +16 -0
- package/app/assets/commerce/sass/bootstrap-assets/mixins/_visibility.scss +8 -0
- package/app/assets/commerce/sass/bootstrap-assets/utilities/_align.scss +8 -0
- package/app/assets/commerce/sass/bootstrap-assets/utilities/_background.scss +19 -0
- package/app/assets/commerce/sass/bootstrap-assets/utilities/_borders.scss +75 -0
- package/app/assets/commerce/sass/bootstrap-assets/utilities/_clearfix.scss +3 -0
- package/app/assets/commerce/sass/bootstrap-assets/utilities/_display.scss +26 -0
- package/app/assets/commerce/sass/bootstrap-assets/utilities/_embed.scss +39 -0
- package/app/assets/commerce/sass/bootstrap-assets/utilities/_flex.scss +51 -0
- package/app/assets/commerce/sass/bootstrap-assets/utilities/_float.scss +11 -0
- package/app/assets/commerce/sass/bootstrap-assets/utilities/_overflow.scss +5 -0
- package/app/assets/commerce/sass/bootstrap-assets/utilities/_position.scss +32 -0
- package/app/assets/commerce/sass/bootstrap-assets/utilities/_screenreaders.scss +11 -0
- package/app/assets/commerce/sass/bootstrap-assets/utilities/_shadows.scss +6 -0
- package/app/assets/commerce/sass/bootstrap-assets/utilities/_sizing.scss +20 -0
- package/app/assets/commerce/sass/bootstrap-assets/utilities/_spacing.scss +73 -0
- package/app/assets/commerce/sass/bootstrap-assets/utilities/_stretched-link.scss +19 -0
- package/app/assets/commerce/sass/bootstrap-assets/utilities/_text.scss +72 -0
- package/app/assets/commerce/sass/bootstrap-assets/utilities/_visibility.scss +13 -0
- package/app/assets/commerce/sass/bootstrap-assets/vendor/_rfs.scss +204 -0
- package/app/assets/commerce/sass/bootstrap.scss +9 -0
- package/app/assets/commerce/sass/responsive.scss +114 -0
- package/app/assets/commerce/sass/ui-assets/components/_buttons.scss +23 -0
- package/app/assets/commerce/sass/ui-assets/components/_cards-item.scss +113 -0
- package/app/assets/commerce/sass/ui-assets/components/_elements.scss +72 -0
- package/app/assets/commerce/sass/ui-assets/components/_forms.scss +19 -0
- package/app/assets/commerce/sass/ui-assets/components/_items.scss +25 -0
- package/app/assets/commerce/sass/ui-assets/components/_lists.scss +90 -0
- package/app/assets/commerce/sass/ui-assets/components/_menu.scss +25 -0
- package/app/assets/commerce/sass/ui-assets/components/_plugin-styles.scss +1 -0
- package/app/assets/commerce/sass/ui-assets/helpers/_bg.scss +53 -0
- package/app/assets/commerce/sass/ui-assets/helpers/_helper-classes.scss +110 -0
- package/app/assets/commerce/sass/ui-assets/helpers/_mixins.scss +50 -0
- package/app/assets/commerce/sass/ui-assets/helpers/_typography.scss +44 -0
- package/app/assets/commerce/sass/ui-assets/pages/_page-account.scss +0 -0
- package/app/assets/commerce/sass/ui-assets/pages/_page-base.scss +10 -0
- package/app/assets/commerce/sass/ui-assets/pages/_page-detail.scss +30 -0
- package/app/assets/commerce/sass/ui-assets/pages/_page-home.scss +92 -0
- package/app/assets/commerce/sass/ui-assets/pages/_page-listing.scss +1 -0
- package/app/assets/commerce/sass/ui-assets/pages/_page-order.scss +9 -0
- package/app/assets/commerce/sass/ui-assets/sections/_footer.scss +26 -0
- package/app/assets/commerce/sass/ui-assets/sections/_header.scss +64 -0
- package/app/assets/commerce/sass/ui-assets/sections/_sidebar.scss +0 -0
- package/app/assets/commerce/sass/ui.scss +51 -0
- package/app/assets/embla/embla.min.js +1 -0
- package/app/assets/embla/script.js +7 -0
- package/app/assets/images/apachelogo.png +0 -0
- package/app/assets/images/backgraund-trend.jpg +0 -0
- package/app/assets/images/background10.jpg +0 -0
- package/app/assets/images/background2.jpg +0 -0
- package/app/assets/images/graphqllogo.png +0 -0
- package/app/assets/images/group1.svg +1 -0
- package/app/assets/images/grpclogo.png +0 -0
- package/app/assets/images/hashes.json +1 -0
- package/app/assets/images/image1.jpg +0 -0
- package/app/assets/images/image10.jpg +0 -0
- package/app/assets/images/image11.jpg +0 -0
- package/app/assets/images/image13.jpg +0 -0
- package/app/assets/images/image14.jpg +0 -0
- package/app/assets/images/image15.jpg +0 -0
- package/app/assets/images/image2.jpg +0 -0
- package/app/assets/images/image3.jpg +0 -0
- package/app/assets/images/image5.jpg +0 -0
- package/app/assets/images/image7.jpg +0 -0
- package/app/assets/images/image8.jpg +0 -0
- package/app/assets/images/image9.jpg +0 -0
- package/app/assets/images/jsonlogo.png +0 -0
- package/app/assets/images/logo5.png +0 -0
- package/app/assets/images/mbr.jpg +0 -0
- package/app/assets/images/mongodblogo.png +0 -0
- package/app/assets/images/mysqllogo.png +0 -0
- package/app/assets/images/neo4jlogo.png +0 -0
- package/app/assets/images/odatalogo.png +0 -0
- package/app/assets/images/openapilogo.png +0 -0
- package/app/assets/images/postgraphqllogo.png +0 -0
- package/app/assets/images/quadr.svg +42 -0
- package/app/assets/images/shop1.jpg +0 -0
- package/app/assets/images/shop2.jpg +0 -0
- package/app/assets/images/shop3.jpg +0 -0
- package/app/assets/images/shop4.jpg +0 -0
- package/app/assets/images/soaplogo.png +0 -0
- package/app/assets/images/sqlitelogo.png +0 -0
- package/app/assets/images/team1.jpg +0 -0
- package/app/assets/images/team2.jpg +0 -0
- package/app/assets/images/team3.jpg +0 -0
- package/app/assets/images/trend12.jpg +0 -0
- package/app/assets/images/trend13.jpg +0 -0
- package/app/assets/images/trend14.jpg +0 -0
- package/app/assets/images/trend15.jpg +0 -0
- package/app/assets/images/trend18.jpg +0 -0
- package/app/assets/images/triangle-blue-transp.svg +69 -0
- package/app/assets/images/triangle-purpl-transp.svg +92 -0
- package/app/assets/mobirise/css/mbr-additional.css +1678 -0
- package/app/assets/parallax/jarallax.css +15 -0
- package/app/assets/parallax/jarallax.js +45 -0
- package/app/assets/parallax/jarallax.min.js +7 -0
- package/app/assets/playervimeo/vimeo_player.js +39 -0
- package/app/assets/popper/popper.min.js +4 -0
- package/app/assets/smoothscroll/smooth-scroll.js +29 -0
- package/app/assets/styles/mobile.css +349 -0
- package/app/assets/styles/styles.css +26 -0
- package/app/assets/tether/tether.min.css +1 -0
- package/app/assets/tether/tether.min.js +1 -0
- package/app/assets/theme/css/style.css +934 -0
- package/app/assets/theme/js/script.js +54 -0
- package/app/assets/web/assets/jquery/jquery.min.js +2 -0
- package/app/assets/web/assets/mobirise-icons2/mobirise2.css +498 -0
- package/app/assets/web/assets/mobirise-icons2/mobirise2.eot +0 -0
- package/app/assets/web/assets/mobirise-icons2/mobirise2.svg +167 -0
- package/app/assets/web/assets/mobirise-icons2/mobirise2.ttf +0 -0
- package/app/assets/web/assets/mobirise-icons2/mobirise2.woff +0 -0
- package/app/assets/ytplayer/index.js +24 -0
- package/app/components/blocks/LeafletMap.vue +151 -0
- package/app/components/blocks/comments.vue +79 -0
- package/app/components/blocks/copyright.vue +43 -0
- package/app/components/blocks/events/about.vue +147 -0
- package/app/components/blocks/flag.vue +84 -0
- package/app/components/blocks/groups/about.vue +102 -0
- package/app/components/blocks/groups/feeds.vue +16 -0
- package/app/components/blocks/groups/lists.vue +11 -0
- package/app/components/blocks/groups/media.vue +28 -0
- package/app/components/blocks/groups/members.vue +9 -0
- package/app/components/blocks/groups/products.vue +9 -0
- package/app/components/blocks/groups/spaceLists.vue +9 -0
- package/app/components/blocks/reactions.vue +42 -0
- package/app/components/blocks/repost.vue +9 -0
- package/app/components/blocks/share.vue +25 -0
- package/app/components/blocks/stickers.vue +11 -0
- package/app/components/blocks/video.vue +44 -0
- package/app/components/features/account/addresses.vue +279 -0
- package/app/components/features/account/dashboard.vue +104 -0
- package/app/components/features/account/downloads.vue +146 -0
- package/app/components/features/account/reviews.vue +320 -0
- package/app/components/features/account/setting/accessibility.vue +57 -0
- package/app/components/features/account/setting/account.vue +133 -0
- package/app/components/features/account/setting/communications.vue +125 -0
- package/app/components/features/account/setting/language.vue +93 -0
- package/app/components/features/account/setting/payments.vue +130 -0
- package/app/components/features/account/setting/personalization.vue +152 -0
- package/app/components/features/account/setting/privacy.vue +90 -0
- package/app/components/features/account/setting/security.vue +84 -0
- package/app/components/features/account/settings.vue +255 -0
- package/app/components/features/addresses/add-address.vue +191 -0
- package/app/components/features/addresses/update-address.vue +320 -0
- package/app/components/features/birthdays.vue +140 -0
- package/app/components/features/event/yourEvents.vue +158 -0
- package/app/components/features/events.vue +107 -0
- package/app/components/features/feed/add-post.vue +45 -0
- package/app/components/features/feed/posts.vue +56 -0
- package/app/components/features/feed/relatedposts.vue +37 -0
- package/app/components/features/feed/update-post.vue +279 -0
- package/app/components/features/feeds.vue +148 -0
- package/app/components/features/friends.vue +131 -0
- package/app/components/features/hashtags.vue +101 -0
- package/app/components/features/media/video.vue +0 -0
- package/app/components/features/media.vue +143 -0
- package/app/components/features/members.vue +59 -0
- package/app/components/features/memories.vue +66 -0
- package/app/components/features/radio.vue +59 -0
- package/app/components/features/spaceSections/audioSpaces.vue +84 -0
- package/app/components/features/spaceSections/crud/add-space.vue +52 -0
- package/app/components/features/spaceSections/crud/update-space.vue +224 -0
- package/app/components/features/spaceSections/defaultSpaces.vue +85 -0
- package/app/components/features/spaceSections/imageSpaces.vue +84 -0
- package/app/components/features/spaceSections/textSpaces.vue +84 -0
- package/app/components/features/spaceSections/videoSpaces.vue +84 -0
- package/app/components/features/spaces.vue +127 -0
- package/app/components/features/vibeSections/add-live.vue +47 -0
- package/app/components/features/vibeSections/relatedshorts.vue +35 -0
- package/app/components/features/vibeSections/shorts.vue +207 -0
- package/app/components/features/vibeSections/update-short.vue +266 -0
- package/app/components/features/vibez.vue +221 -0
- package/app/components/menus/lowerbar.vue +37 -0
- package/app/components/related/memberList.vue +38 -0
- package/app/components/related/post.vue +119 -0
- package/app/components/related/radio.vue +36 -0
- package/app/components/related/relatedposts.vue +30 -0
- package/app/components/related/relatedshorts.vue +30 -0
- package/app/components/related/relatedspaces.vue +30 -0
- package/app/components/related/relatedusers.vue +34 -0
- package/app/components/related/short.vue +68 -0
- package/app/components/related/space.vue +47 -0
- package/app/components/related/tag.vue +21 -0
- package/app/composables/cache.ts +44 -0
- package/app/composables/charts/createChart.js +33 -0
- package/app/composables/charts/deleteChart.js +15 -0
- package/app/composables/charts/updateChart.js +15 -0
- package/app/composables/config.ts +20 -0
- package/app/composables/contacts/createContact.js +64 -0
- package/app/composables/contacts/deleteContact.js +15 -0
- package/app/composables/contacts/updateContact.js +15 -0
- package/app/composables/errors.ts +16 -0
- package/app/composables/metrics.ts +52 -0
- package/app/composables/posts/createPost.js +40 -0
- package/app/composables/posts/deletePost.js +15 -0
- package/app/composables/posts/updatePost.js +15 -0
- package/app/composables/posts/usePosts.ts +22 -0
- package/app/composables/providers/atproto.ts +75 -0
- package/app/composables/providers/mastodon.ts +45 -0
- package/app/composables/rateLimit.ts +41 -0
- package/app/composables/registry.ts +13 -0
- package/app/composables/retry.ts +40 -0
- package/app/composables/settings/useAccessibilitySettings.js +43 -0
- package/app/composables/shorts/createShort.js +33 -0
- package/app/composables/shorts/deleteShort.js +15 -0
- package/app/composables/shorts/updateShort.js +15 -0
- package/app/composables/social/getActivity.js +33 -0
- package/app/composables/social/getGroups.js +33 -0
- package/app/composables/spaces/createSpace.js +29 -0
- package/app/composables/spaces/deleteSpace.js +15 -0
- package/app/composables/spaces/updateSpace.js +15 -0
- package/app/composables/spaces/useSpaceRegistry.ts +49 -0
- package/app/composables/stations/createStation.js +33 -0
- package/app/composables/stations/deleteStation.js +15 -0
- package/app/composables/stations/updateStation.js +15 -0
- package/app/composables/swr.ts +22 -0
- package/app/composables/types/BlueSkyTypes.ts +108 -0
- package/app/composables/types.ts +28 -0
- package/app/composables/useSocial.ts +25 -0
- package/app/composables/utils.ts +99 -0
- package/app/layouts/spaces-audio.vue +9 -0
- package/app/layouts/spaces-dating.vue +9 -0
- package/app/layouts/spaces-forum.vue +9 -0
- package/app/layouts/spaces-video.vue +9 -0
- package/app/pages/connect/event/[...slug].vue +96 -0
- package/app/pages/connect/hashtag/[...slug].vue +110 -0
- package/app/pages/connect/post/[...slug].vue +232 -0
- package/app/pages/connect/space/[...slug].vue +170 -0
- package/app/pages/connect/vibe/[...id].vue +204 -0
- package/app/pages/connect/vibe/preview.vue +100 -0
- package/app/pages/connect/vibe/upload.vue +115 -0
- package/app/pages/profile/[...slug].vue +91 -0
- package/app/plugins/rocketchat-api.js +105 -0
- package/app/stores/index.ts +0 -0
- package/app/stores/reactions.ts +206 -0
- package/app/stores/useCommentsStore.js +20 -0
- package/nuxt.config.ts +11 -0
- package/package.json +23 -0
- package/tsconfig.json +14 -0
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { ref, watch } from 'vue'
|
|
2
|
+
|
|
3
|
+
export function useAccessibilitySettings() {
|
|
4
|
+
const highContrast = ref(false)
|
|
5
|
+
const fontSize = ref(16)
|
|
6
|
+
|
|
7
|
+
// Load settings from localStorage on initialization
|
|
8
|
+
if (process.client) {
|
|
9
|
+
const savedSettings = localStorage.getItem('accessibilitySettings')
|
|
10
|
+
if (savedSettings) {
|
|
11
|
+
const { highContrast: savedHighContrast, fontSize: savedFontSize } = JSON.parse(savedSettings)
|
|
12
|
+
highContrast.value = savedHighContrast
|
|
13
|
+
fontSize.value = savedFontSize
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
// Watch for changes and save to localStorage
|
|
18
|
+
watch([highContrast, fontSize], () => {
|
|
19
|
+
if (process.client) {
|
|
20
|
+
localStorage.setItem('accessibilitySettings', JSON.stringify({
|
|
21
|
+
highContrast: highContrast.value,
|
|
22
|
+
fontSize: fontSize.value
|
|
23
|
+
}))
|
|
24
|
+
}
|
|
25
|
+
}, { deep: true })
|
|
26
|
+
|
|
27
|
+
// Apply settings to the document
|
|
28
|
+
const applySettings = () => {
|
|
29
|
+
if (process.client) {
|
|
30
|
+
document.body.style.fontSize = `${fontSize.value}px`
|
|
31
|
+
document.body.classList.toggle('high-contrast', highContrast.value)
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
// Call applySettings initially and whenever settings change
|
|
36
|
+
watch([highContrast, fontSize], applySettings, { immediate: true })
|
|
37
|
+
|
|
38
|
+
return {
|
|
39
|
+
highContrast,
|
|
40
|
+
fontSize,
|
|
41
|
+
applySettings
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
// composables/cms/shorts/createSpace.js
|
|
2
|
+
import { createItem } from '@directus/sdk';
|
|
3
|
+
|
|
4
|
+
export default async function createSpace(shortData) {
|
|
5
|
+
const { $directus } = useNuxtApp();
|
|
6
|
+
|
|
7
|
+
try {
|
|
8
|
+
const short = await $directus.request(createItem('shorts', {
|
|
9
|
+
name: shortData.name,
|
|
10
|
+
description: shortData.description,
|
|
11
|
+
status: shortData.status,
|
|
12
|
+
type: shortData.type,
|
|
13
|
+
video: shortData.video,
|
|
14
|
+
video_url: shortData.video_url,
|
|
15
|
+
age_restriction: shortData.age_restriction,
|
|
16
|
+
duration: shortData.duration,
|
|
17
|
+
thumbnailFile: shortData.thumbnailFile,
|
|
18
|
+
videoFile: shortData.videoFile,
|
|
19
|
+
creator: shortData.creator,
|
|
20
|
+
// Match the structure from your GraphQL query
|
|
21
|
+
departments: {
|
|
22
|
+
create: [{
|
|
23
|
+
departments_id: shortData.departments
|
|
24
|
+
}]
|
|
25
|
+
}
|
|
26
|
+
}));
|
|
27
|
+
|
|
28
|
+
return short;
|
|
29
|
+
} catch (error) {
|
|
30
|
+
console.error('Error creating short:', error);
|
|
31
|
+
throw error;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// composables/deleteShort.js
|
|
2
|
+
import { deleteItem } from '@directus/sdk';
|
|
3
|
+
|
|
4
|
+
export default async function deleteShort(shortId) {
|
|
5
|
+
const { $directus } = useNuxtApp();
|
|
6
|
+
|
|
7
|
+
try {
|
|
8
|
+
$directus.request(deleteItem('shorts', shortId));
|
|
9
|
+
console.log('Short deleted successfully');
|
|
10
|
+
} catch (error) {
|
|
11
|
+
console.error('Error deleting short:', error);
|
|
12
|
+
throw error;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// composables/updateShort.js
|
|
2
|
+
import { updateItem } from '@directus/sdk';
|
|
3
|
+
|
|
4
|
+
export default async function updateShort(shortId, shortData) {
|
|
5
|
+
const { $directus } = useNuxtApp();
|
|
6
|
+
|
|
7
|
+
try {
|
|
8
|
+
const short = await $directus.request(updateItem('shorts', shortId));
|
|
9
|
+
return short;
|
|
10
|
+
} catch (error) {
|
|
11
|
+
console.error('Error updating short:', error);
|
|
12
|
+
throw error;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { useRuntimeConfig } from 'nuxt/config';
|
|
2
|
+
|
|
3
|
+
export const getActivity = async () => {
|
|
4
|
+
const config = useRuntimeConfig();
|
|
5
|
+
try {
|
|
6
|
+
const activities = await $fetch(`${config.public.wordpressUrl}/wp-json/buddypress/v1/activity`, {
|
|
7
|
+
headers: {
|
|
8
|
+
'Content-Type': 'application/json',
|
|
9
|
+
'Authorization': `Bearer ${config.public.wordpressToken}`
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
return activities;
|
|
13
|
+
} catch (error) {
|
|
14
|
+
console.error('Error fetching activities:', error);
|
|
15
|
+
return [];
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export const getActivityById = async (id) => {
|
|
20
|
+
const config = useRuntimeConfig();
|
|
21
|
+
try {
|
|
22
|
+
const activity = await $fetch(`${config.public.wordpressUrl}/wp-json/buddypress/v1/activity/${id}`, {
|
|
23
|
+
headers: {
|
|
24
|
+
'Content-Type': 'application/json',
|
|
25
|
+
'Authorization': `Bearer ${config.public.wordpressToken}`
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
return activity;
|
|
29
|
+
} catch (error) {
|
|
30
|
+
console.error('Error fetching activity:', error);
|
|
31
|
+
return [];
|
|
32
|
+
}
|
|
33
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { useRuntimeConfig } from 'nuxt/config';
|
|
2
|
+
|
|
3
|
+
export const getGroups = async () => {
|
|
4
|
+
const config = useRuntimeConfig();
|
|
5
|
+
try {
|
|
6
|
+
const groups = await $fetch(`${config.public.wordpressUrl}/wp-json/buddypress/v1/groups`, {
|
|
7
|
+
headers: {
|
|
8
|
+
'Content-Type': 'application/json',
|
|
9
|
+
'Authorization': `Bearer ${config.public.wordpressToken}`
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
return groups;
|
|
13
|
+
} catch (error) {
|
|
14
|
+
console.error('Error fetching groups:', error);
|
|
15
|
+
return [];
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export const getGroupById = async (id) => {
|
|
20
|
+
const config = useRuntimeConfig();
|
|
21
|
+
try {
|
|
22
|
+
const group = await $fetch(`${config.public.wordpressUrl}/wp-json/buddypress/v1/groups/${id}`, {
|
|
23
|
+
headers: {
|
|
24
|
+
'Content-Type': 'application/json',
|
|
25
|
+
'Authorization': `Bearer ${config.public.wordpressToken}`
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
return group;
|
|
29
|
+
} catch (error) {
|
|
30
|
+
console.error('Error fetching group:', error);
|
|
31
|
+
return [];
|
|
32
|
+
}
|
|
33
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
// composables/cms/spaces/createSpace.js
|
|
2
|
+
import { createItem } from '@directus/sdk';
|
|
3
|
+
|
|
4
|
+
export default async function createSpace(spaceData) {
|
|
5
|
+
const { $directus } = useNuxtApp();
|
|
6
|
+
|
|
7
|
+
try {
|
|
8
|
+
const space = await $directus.request(createItem('spaces', {
|
|
9
|
+
name: spaceData.name,
|
|
10
|
+
description: spaceData.description,
|
|
11
|
+
status: spaceData.status,
|
|
12
|
+
type: spaceData.type,
|
|
13
|
+
coverFile: spaceData.coverFile,
|
|
14
|
+
avatarFile: spaceData.avatarFile,
|
|
15
|
+
creator: spaceData.creator,
|
|
16
|
+
// Match the structure from your GraphQL query
|
|
17
|
+
departments: {
|
|
18
|
+
create: [{
|
|
19
|
+
departments_id: spaceData.departments
|
|
20
|
+
}]
|
|
21
|
+
}
|
|
22
|
+
}));
|
|
23
|
+
|
|
24
|
+
return space;
|
|
25
|
+
} catch (error) {
|
|
26
|
+
console.error('Error creating space:', error);
|
|
27
|
+
throw error;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// composables/deleteSpace.js
|
|
2
|
+
import { deleteItem } from '@directus/sdk';
|
|
3
|
+
|
|
4
|
+
export default async function deleteSpace(spaceId) {
|
|
5
|
+
const { $directus } = useNuxtApp();
|
|
6
|
+
|
|
7
|
+
try {
|
|
8
|
+
$directus.request(deleteItem('spaces', spaceId));
|
|
9
|
+
console.log('Space deleted successfully');
|
|
10
|
+
} catch (error) {
|
|
11
|
+
console.error('Error deleting space:', error);
|
|
12
|
+
throw error;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// composables/updatePost.js
|
|
2
|
+
import { updateItem } from '@directus/sdk';
|
|
3
|
+
|
|
4
|
+
export default async function updatePost(spaceId, spaceData) {
|
|
5
|
+
const { $directus } = useNuxtApp();
|
|
6
|
+
|
|
7
|
+
try {
|
|
8
|
+
const space = await $directus.request(updateItem('spaces', spaceId));
|
|
9
|
+
return space;
|
|
10
|
+
} catch (error) {
|
|
11
|
+
console.error('Error updating space:', error);
|
|
12
|
+
throw error;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
// composables/useSpaceRegistry.ts
|
|
2
|
+
type ReadItemsFn = (collection: string, options?: { fields?: string[]; filter?: Record<string, any> }) => Promise<Array<Record<string, any>>>
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Pure fetcher: builds the registry using a provided Nuxt app instance.
|
|
6
|
+
* Use this when you are outside of a Vue setup function (for example in a page
|
|
7
|
+
* async loader where you already have access to `useNuxtApp()` or in a plugin).
|
|
8
|
+
*/
|
|
9
|
+
export async function fetchSpaceRegistry(nuxtApp: { $readItems?: ReadItemsFn }) {
|
|
10
|
+
if (!nuxtApp || typeof nuxtApp.$readItems !== 'function') {
|
|
11
|
+
throw new Error('fetchSpaceRegistry requires a Nuxt app instance with `$readItems`')
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
const { $readItems } = nuxtApp
|
|
15
|
+
|
|
16
|
+
const spaces = await $readItems('space_type', {
|
|
17
|
+
fields: ['slug', 'component_path', 'layout_name'],
|
|
18
|
+
filter: { enabled: { _eq: true } }
|
|
19
|
+
})
|
|
20
|
+
|
|
21
|
+
const registry: Record<string, {
|
|
22
|
+
layout: string
|
|
23
|
+
component: () => Promise<any>
|
|
24
|
+
}> = {}
|
|
25
|
+
|
|
26
|
+
for (const space of spaces) {
|
|
27
|
+
registry[space.slug] = {
|
|
28
|
+
layout: space.layout_name,
|
|
29
|
+
component: () => import(/* @vite-ignore */ space.component_path)
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
return registry
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Composable wrapper: convenience function for use inside Vue `setup()`.
|
|
38
|
+
* If you call this outside of a setup/plugin/middleware you MUST pass a
|
|
39
|
+
* Nuxt app instance explicitly to avoid the "called outside" error.
|
|
40
|
+
*/
|
|
41
|
+
export const useSpaceRegistry = async (nuxtApp?: { $readItems?: ReadItemsFn }) => {
|
|
42
|
+
const nuxt = nuxtApp ?? (typeof useNuxtApp === 'function' ? useNuxtApp() : undefined)
|
|
43
|
+
|
|
44
|
+
if (!nuxt) {
|
|
45
|
+
throw new Error('useSpaceRegistry must be called inside a Vue setup() or you must pass a Nuxt app instance as the first argument')
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
return fetchSpaceRegistry(nuxt as { $readItems?: ReadItemsFn })
|
|
49
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
// composables/createStation.js
|
|
2
|
+
import { createItem } from '@directus/sdk';
|
|
3
|
+
|
|
4
|
+
export default async function createStation(stationData) {
|
|
5
|
+
const route = useRoute();
|
|
6
|
+
|
|
7
|
+
const id = route.params.id;
|
|
8
|
+
const { $directus } = useNuxtApp();
|
|
9
|
+
|
|
10
|
+
try {
|
|
11
|
+
const station = await $directus.request(createItem('radios', [
|
|
12
|
+
{
|
|
13
|
+
name: stationData.name,
|
|
14
|
+
description: stationData.description,
|
|
15
|
+
status: stationData.status,
|
|
16
|
+
type: stationData.type,
|
|
17
|
+
image: stationData.image,
|
|
18
|
+
media: stationData.media,
|
|
19
|
+
video: stationData.video,
|
|
20
|
+
document: stationData.document,
|
|
21
|
+
color: stationData.color,
|
|
22
|
+
coverFile: null,
|
|
23
|
+
avatarFile: null,
|
|
24
|
+
creator: stationData.creator,
|
|
25
|
+
}
|
|
26
|
+
]));
|
|
27
|
+
return station;
|
|
28
|
+
} catch (error) {
|
|
29
|
+
console.error('Error creating station:', error);
|
|
30
|
+
throw error;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// composables/deleteStation.js
|
|
2
|
+
import { deleteItem } from '@directus/sdk';
|
|
3
|
+
|
|
4
|
+
export default async function deleteStation(stationId) {
|
|
5
|
+
const { $directus } = useNuxtApp();
|
|
6
|
+
|
|
7
|
+
try {
|
|
8
|
+
$directus.request(deleteItem('radios', stationId));
|
|
9
|
+
console.log('Station deleted successfully');
|
|
10
|
+
} catch (error) {
|
|
11
|
+
console.error('Error deleting station:', error);
|
|
12
|
+
throw error;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// composables/updateStation.js
|
|
2
|
+
import { updateItem } from '@directus/sdk';
|
|
3
|
+
|
|
4
|
+
export default async function updateStation(stationId, stationData) {
|
|
5
|
+
const { $directus } = useNuxtApp();
|
|
6
|
+
|
|
7
|
+
try {
|
|
8
|
+
const station = await $directus.request(updateItem('radios', stationId));
|
|
9
|
+
return station;
|
|
10
|
+
} catch (error) {
|
|
11
|
+
console.error('Error updating station:', error);
|
|
12
|
+
throw error;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { getSocialCache } from './cache'
|
|
2
|
+
|
|
3
|
+
const refreshQueue = new Map<string, Promise<any>>()
|
|
4
|
+
|
|
5
|
+
export function scheduleBackgroundRefresh(
|
|
6
|
+
key: string,
|
|
7
|
+
fn: () => Promise<any>,
|
|
8
|
+
ttlMs: number
|
|
9
|
+
) {
|
|
10
|
+
if (refreshQueue.has(key)) return
|
|
11
|
+
|
|
12
|
+
const promise = fn()
|
|
13
|
+
.then((fresh) => {
|
|
14
|
+
const cache = getSocialCache()
|
|
15
|
+
cache.set(key, fresh, ttlMs)
|
|
16
|
+
})
|
|
17
|
+
.finally(() => {
|
|
18
|
+
refreshQueue.delete(key)
|
|
19
|
+
})
|
|
20
|
+
|
|
21
|
+
refreshQueue.set(key, promise)
|
|
22
|
+
}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
export type Thread = {
|
|
2
|
+
thread: ThreadViewPost;
|
|
3
|
+
};
|
|
4
|
+
|
|
5
|
+
export type ThreadViewPost = {
|
|
6
|
+
$type: string;
|
|
7
|
+
post: Post;
|
|
8
|
+
replies: ThreadViewPost[];
|
|
9
|
+
};
|
|
10
|
+
export type DisplayThread = {
|
|
11
|
+
isReply: boolean;
|
|
12
|
+
post: Post;
|
|
13
|
+
replies: DisplayThread[];
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export type Post = {
|
|
17
|
+
uri: string;
|
|
18
|
+
cid: string;
|
|
19
|
+
author: Author;
|
|
20
|
+
record: Record;
|
|
21
|
+
embed?: EmbedView;
|
|
22
|
+
replyCount: number;
|
|
23
|
+
repostCount: number;
|
|
24
|
+
likeCount: number;
|
|
25
|
+
quoteCount: number;
|
|
26
|
+
indexedAt: string;
|
|
27
|
+
labels: Label[];
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export type Author = {
|
|
31
|
+
did: string;
|
|
32
|
+
handle: string;
|
|
33
|
+
displayName: string;
|
|
34
|
+
avatar?: string;
|
|
35
|
+
labels: Label[];
|
|
36
|
+
createdAt: string;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
export type Record = {
|
|
40
|
+
$type: string;
|
|
41
|
+
createdAt: string;
|
|
42
|
+
embed?: EmbedImages;
|
|
43
|
+
facets?: Facet[];
|
|
44
|
+
text: string;
|
|
45
|
+
langs?: string[];
|
|
46
|
+
reply?: Reply;
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
export type EmbedImages = {
|
|
50
|
+
$type: string;
|
|
51
|
+
images: Image[];
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
export type EmbedView = {
|
|
55
|
+
$type: string;
|
|
56
|
+
images: ImageView[];
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
export type Image = {
|
|
60
|
+
alt: string;
|
|
61
|
+
image: Blob;
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
export type ImageView = {
|
|
65
|
+
thumb: string;
|
|
66
|
+
fullsize: string;
|
|
67
|
+
alt: string;
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
export type Blob = {
|
|
71
|
+
$type: string;
|
|
72
|
+
ref: Link;
|
|
73
|
+
mimeType: string;
|
|
74
|
+
size: number;
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
export type Link = {
|
|
78
|
+
$link: string;
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
export type Facet = {
|
|
82
|
+
$type?: string;
|
|
83
|
+
features: Feature[];
|
|
84
|
+
index: Index;
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
export type Feature = {
|
|
88
|
+
$type: string;
|
|
89
|
+
uri?: string;
|
|
90
|
+
did?: string;
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
export type Index = {
|
|
94
|
+
byteStart: number;
|
|
95
|
+
byteEnd: number;
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
export type Reply = {
|
|
99
|
+
parent: ReplyReference;
|
|
100
|
+
root: ReplyReference;
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
export type ReplyReference = {
|
|
104
|
+
cid: string;
|
|
105
|
+
uri: string;
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
export type Label = {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export interface SocialProfile {
|
|
2
|
+
id: string
|
|
3
|
+
username: string
|
|
4
|
+
displayName?: string
|
|
5
|
+
avatarUrl?: string
|
|
6
|
+
url?: string
|
|
7
|
+
[key: string]: any
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export interface SocialPost {
|
|
11
|
+
id: string
|
|
12
|
+
content: string
|
|
13
|
+
createdAt: string
|
|
14
|
+
author: SocialProfile
|
|
15
|
+
url?: string
|
|
16
|
+
[key: string]: any
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface SocialActivity extends SocialPost {
|
|
20
|
+
provider: string
|
|
21
|
+
source?: string
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export interface SocialProvider {
|
|
25
|
+
getProfile(handle: string): Promise<SocialProfile>
|
|
26
|
+
listPosts(handle: string, options?: Record<string, any>): Promise<SocialPost[]>
|
|
27
|
+
createPost?(content: string, options?: Record<string, any>): Promise<SocialPost>
|
|
28
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { getSocialConfig } from './config'
|
|
2
|
+
import { getSocialProvider } from './registry'
|
|
3
|
+
import type { SocialActivity } from './types'
|
|
4
|
+
|
|
5
|
+
export function useSocial() {
|
|
6
|
+
const { provider } = getSocialConfig()
|
|
7
|
+
const socialProvider = getSocialProvider(provider)
|
|
8
|
+
|
|
9
|
+
async function getActivityFeed(handle: string, options?: Record<string, any>): Promise<SocialActivity[]> {
|
|
10
|
+
const posts = await socialProvider.listPosts(handle, options)
|
|
11
|
+
|
|
12
|
+
return posts.map((post) => ({
|
|
13
|
+
...post,
|
|
14
|
+
provider,
|
|
15
|
+
source: provider
|
|
16
|
+
}))
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
return {
|
|
20
|
+
getProfile: socialProvider.getProfile,
|
|
21
|
+
listPosts: socialProvider.listPosts,
|
|
22
|
+
createPost: socialProvider.createPost,
|
|
23
|
+
getActivityFeed
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
// utils.ts
|
|
2
|
+
|
|
3
|
+
import { RateLimitError, SocialError } from './errors'
|
|
4
|
+
import { getSocialCache } from './cache'
|
|
5
|
+
import { withRetry } from './retry'
|
|
6
|
+
import { scheduleBackgroundRefresh } from './swr'
|
|
7
|
+
import { checkRateLimit } from './rateLimit'
|
|
8
|
+
import {
|
|
9
|
+
recordRequest,
|
|
10
|
+
recordSuccess,
|
|
11
|
+
recordFailure,
|
|
12
|
+
recordCacheHit,
|
|
13
|
+
recordCacheMiss
|
|
14
|
+
} from './metrics'
|
|
15
|
+
|
|
16
|
+
export interface RequestOptions {
|
|
17
|
+
cacheKey?: string
|
|
18
|
+
ttlMs?: number
|
|
19
|
+
retry?: boolean
|
|
20
|
+
swr?: boolean
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Core wrapper for all provider requests.
|
|
25
|
+
* Handles:
|
|
26
|
+
* - caching
|
|
27
|
+
* - SWR background refresh
|
|
28
|
+
* - retry/backoff
|
|
29
|
+
* - provider-specific rate limits
|
|
30
|
+
* - unified error handling
|
|
31
|
+
* - analytics hooks
|
|
32
|
+
*/
|
|
33
|
+
export async function wrapSocialRequest<T>(
|
|
34
|
+
provider: string,
|
|
35
|
+
fn: () => Promise<T>,
|
|
36
|
+
opts: RequestOptions = {}
|
|
37
|
+
): Promise<T> {
|
|
38
|
+
const cache = getSocialCache()
|
|
39
|
+
|
|
40
|
+
// Track request attempt
|
|
41
|
+
recordRequest(provider)
|
|
42
|
+
|
|
43
|
+
// Provider-specific rate limit enforcement
|
|
44
|
+
checkRateLimit(provider)
|
|
45
|
+
|
|
46
|
+
// 1. Cache check
|
|
47
|
+
if (opts.cacheKey) {
|
|
48
|
+
const cached = cache.get<T>(opts.cacheKey)
|
|
49
|
+
|
|
50
|
+
if (cached) {
|
|
51
|
+
recordCacheHit(provider)
|
|
52
|
+
|
|
53
|
+
// SWR: return cached immediately, refresh in background
|
|
54
|
+
if (opts.swr && opts.ttlMs) {
|
|
55
|
+
scheduleBackgroundRefresh(opts.cacheKey, fn, opts.ttlMs)
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
return cached
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
recordCacheMiss(provider)
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
// 2. Execute request (with optional retry/backoff)
|
|
65
|
+
let result: T
|
|
66
|
+
|
|
67
|
+
try {
|
|
68
|
+
result = await (opts.retry ? withRetry(fn) : fn())
|
|
69
|
+
recordSuccess(provider)
|
|
70
|
+
} catch (err: any) {
|
|
71
|
+
recordFailure(provider)
|
|
72
|
+
|
|
73
|
+
const status = err?.status || err?.response?.status
|
|
74
|
+
const retryAfterHeader = err?.response?.headers?.['retry-after']
|
|
75
|
+
const retryAfter = retryAfterHeader ? Number(retryAfterHeader) : undefined
|
|
76
|
+
|
|
77
|
+
if (status === 429) {
|
|
78
|
+
throw new RateLimitError(
|
|
79
|
+
`Rate limit exceeded for provider "${provider}"`,
|
|
80
|
+
provider,
|
|
81
|
+
retryAfter,
|
|
82
|
+
err
|
|
83
|
+
)
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
throw new SocialError(
|
|
87
|
+
`Social provider "${provider}" request failed`,
|
|
88
|
+
provider,
|
|
89
|
+
err
|
|
90
|
+
)
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
// 3. Cache fresh result
|
|
94
|
+
if (opts.cacheKey && opts.ttlMs) {
|
|
95
|
+
cache.set(opts.cacheKey, result, opts.ttlMs)
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
return result
|
|
99
|
+
}
|