@commonpub/layer 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +661 -0
- package/app.vue +7 -0
- package/components/AnnouncementBand.vue +117 -0
- package/components/AppToast.vue +108 -0
- package/components/AuthorCard.vue +119 -0
- package/components/AuthorRow.vue +81 -0
- package/components/CommentSection.vue +330 -0
- package/components/ContentCard.vue +340 -0
- package/components/ContentPicker.vue +240 -0
- package/components/ContentStarterForm.vue +214 -0
- package/components/ContentTypeBadge.vue +46 -0
- package/components/CountdownTimer.vue +68 -0
- package/components/CpubEditor.vue +87 -0
- package/components/DiscussionItem.vue +191 -0
- package/components/EditorPropertiesPanel.vue +393 -0
- package/components/EngagementBar.vue +131 -0
- package/components/FederatedContentCard.vue +291 -0
- package/components/FeedItem.vue +283 -0
- package/components/FilterChip.vue +21 -0
- package/components/HeatmapGrid.vue +92 -0
- package/components/ImageUpload.vue +219 -0
- package/components/MemberCard.vue +163 -0
- package/components/MessageThread.vue +120 -0
- package/components/NotificationItem.vue +103 -0
- package/components/ProgressTracker.vue +41 -0
- package/components/PublishErrorsModal.vue +116 -0
- package/components/RemoteActorCard.vue +206 -0
- package/components/RemoteUserSearch.vue +117 -0
- package/components/SearchFilters.vue +188 -0
- package/components/SearchSidebar.vue +181 -0
- package/components/SectionHeader.vue +17 -0
- package/components/ShareToHubModal.vue +189 -0
- package/components/SiteLogo.vue +21 -0
- package/components/SkillBar.vue +57 -0
- package/components/SortSelect.vue +30 -0
- package/components/StatBar.vue +14 -0
- package/components/TOCNav.vue +69 -0
- package/components/TimelineItem.vue +82 -0
- package/components/VideoCard.vue +106 -0
- package/components/blocks/BlockBuildStepView.vue +92 -0
- package/components/blocks/BlockCalloutView.vue +82 -0
- package/components/blocks/BlockCheckpointView.vue +50 -0
- package/components/blocks/BlockCodeView.vue +212 -0
- package/components/blocks/BlockContentRenderer.vue +143 -0
- package/components/blocks/BlockDividerView.vue +11 -0
- package/components/blocks/BlockDownloadsView.vue +126 -0
- package/components/blocks/BlockEmbedView.vue +61 -0
- package/components/blocks/BlockGalleryView.vue +57 -0
- package/components/blocks/BlockHeadingView.vue +29 -0
- package/components/blocks/BlockImageView.vue +34 -0
- package/components/blocks/BlockMarkdownView.vue +118 -0
- package/components/blocks/BlockMathView.vue +45 -0
- package/components/blocks/BlockPartsListView.vue +104 -0
- package/components/blocks/BlockQuizView.vue +239 -0
- package/components/blocks/BlockQuoteView.vue +41 -0
- package/components/blocks/BlockSectionHeaderView.vue +58 -0
- package/components/blocks/BlockSliderView.vue +236 -0
- package/components/blocks/BlockTextView.vue +41 -0
- package/components/blocks/BlockToolListView.vue +87 -0
- package/components/blocks/BlockVideoView.vue +89 -0
- package/components/editors/ArticleEditor.vue +545 -0
- package/components/editors/BlockCanvas.vue +487 -0
- package/components/editors/BlockInsertZone.vue +84 -0
- package/components/editors/BlockPicker.vue +285 -0
- package/components/editors/BlockWrapper.vue +192 -0
- package/components/editors/BlogEditor.vue +567 -0
- package/components/editors/EditorBlocks.vue +248 -0
- package/components/editors/EditorSection.vue +81 -0
- package/components/editors/EditorShell.vue +168 -0
- package/components/editors/EditorTagInput.vue +114 -0
- package/components/editors/EditorVisibility.vue +110 -0
- package/components/editors/ExplainerEditor.vue +503 -0
- package/components/editors/MarkdownImportDialog.vue +249 -0
- package/components/editors/ProjectEditor.vue +446 -0
- package/components/editors/blocks/BuildStepBlock.vue +102 -0
- package/components/editors/blocks/CalloutBlock.vue +122 -0
- package/components/editors/blocks/CheckpointBlock.vue +27 -0
- package/components/editors/blocks/CodeBlock.vue +177 -0
- package/components/editors/blocks/DividerBlock.vue +22 -0
- package/components/editors/blocks/DownloadsBlock.vue +41 -0
- package/components/editors/blocks/EmbedBlock.vue +20 -0
- package/components/editors/blocks/GalleryBlock.vue +236 -0
- package/components/editors/blocks/HeadingBlock.vue +96 -0
- package/components/editors/blocks/ImageBlock.vue +271 -0
- package/components/editors/blocks/MarkdownBlock.vue +258 -0
- package/components/editors/blocks/MathBlock.vue +37 -0
- package/components/editors/blocks/PartsListBlock.vue +358 -0
- package/components/editors/blocks/QuizBlock.vue +47 -0
- package/components/editors/blocks/QuoteBlock.vue +101 -0
- package/components/editors/blocks/SectionHeaderBlock.vue +130 -0
- package/components/editors/blocks/SliderBlock.vue +318 -0
- package/components/editors/blocks/TextBlock.vue +201 -0
- package/components/editors/blocks/ToolListBlock.vue +70 -0
- package/components/editors/blocks/VideoBlock.vue +22 -0
- package/components/hub/HubDiscussions.vue +47 -0
- package/components/hub/HubFeed.vue +199 -0
- package/components/hub/HubHero.vue +185 -0
- package/components/hub/HubLayout.vue +103 -0
- package/components/hub/HubMembers.vue +40 -0
- package/components/hub/HubProducts.vue +93 -0
- package/components/hub/HubProjects.vue +207 -0
- package/components/hub/HubSidebar.vue +12 -0
- package/components/hub/HubSidebarCard.vue +35 -0
- package/components/views/ArticleView.vue +771 -0
- package/components/views/BlogView.vue +667 -0
- package/components/views/ExplainerView.vue +688 -0
- package/components/views/ProjectView.vue +1500 -0
- package/composables/useApiError.ts +39 -0
- package/composables/useAuth.ts +87 -0
- package/composables/useBlockEditor.ts +187 -0
- package/composables/useContentSave.ts +253 -0
- package/composables/useContentTypes.ts +37 -0
- package/composables/useEngagement.ts +196 -0
- package/composables/useFeatures.ts +33 -0
- package/composables/useFederation.ts +72 -0
- package/composables/useJsonLd.ts +183 -0
- package/composables/useMarkdownImport.ts +77 -0
- package/composables/useMirrorContent.ts +105 -0
- package/composables/useNotifications.ts +73 -0
- package/composables/usePublishValidation.ts +65 -0
- package/composables/useSanitize.ts +34 -0
- package/composables/useSiteName.ts +4 -0
- package/composables/useTheme.ts +34 -0
- package/composables/useToast.ts +35 -0
- package/error.vue +129 -0
- package/layouts/admin.vue +213 -0
- package/layouts/auth.vue +63 -0
- package/layouts/default.vue +269 -0
- package/layouts/editor.vue +129 -0
- package/middleware/auth.ts +6 -0
- package/nuxt.config.ts +83 -0
- package/package.json +59 -0
- package/pages/[type]/[slug]/edit.vue +676 -0
- package/pages/[type]/[slug]/index.vue +313 -0
- package/pages/[type]/index.vue +118 -0
- package/pages/about.vue +100 -0
- package/pages/admin/audit.vue +66 -0
- package/pages/admin/content.vue +116 -0
- package/pages/admin/federation.vue +446 -0
- package/pages/admin/index.vue +62 -0
- package/pages/admin/reports.vue +88 -0
- package/pages/admin/settings.vue +167 -0
- package/pages/admin/users.vue +145 -0
- package/pages/auth/forgot-password.vue +103 -0
- package/pages/auth/login.vue +216 -0
- package/pages/auth/oauth/authorize.vue +178 -0
- package/pages/auth/register.vue +246 -0
- package/pages/auth/reset-password.vue +124 -0
- package/pages/auth/verify-email.vue +80 -0
- package/pages/cert/[code].vue +154 -0
- package/pages/contests/[slug]/edit.vue +153 -0
- package/pages/contests/[slug]/index.vue +556 -0
- package/pages/contests/[slug]/judge.vue +160 -0
- package/pages/contests/create.vue +192 -0
- package/pages/contests/index.vue +69 -0
- package/pages/create.vue +219 -0
- package/pages/dashboard.vue +521 -0
- package/pages/docs/[siteSlug]/[...pagePath].vue +704 -0
- package/pages/docs/[siteSlug]/edit.vue +480 -0
- package/pages/docs/[siteSlug]/index.vue +380 -0
- package/pages/docs/create.vue +60 -0
- package/pages/docs/index.vue +181 -0
- package/pages/explore.vue +422 -0
- package/pages/federated-hubs/[id]/index.vue +385 -0
- package/pages/federated-hubs/[id]/posts/[postId].vue +309 -0
- package/pages/federation/index.vue +157 -0
- package/pages/federation/search.vue +43 -0
- package/pages/federation/users/[handle].vue +221 -0
- package/pages/feed.vue +135 -0
- package/pages/hubs/[slug]/index.vue +513 -0
- package/pages/hubs/[slug]/members.vue +134 -0
- package/pages/hubs/[slug]/posts/[postId].vue +352 -0
- package/pages/hubs/[slug]/settings.vue +254 -0
- package/pages/hubs/create.vue +201 -0
- package/pages/hubs/index.vue +207 -0
- package/pages/index.vue +1005 -0
- package/pages/learn/[slug]/[lessonSlug]/edit.vue +413 -0
- package/pages/learn/[slug]/[lessonSlug]/index.vue +438 -0
- package/pages/learn/[slug]/edit.vue +414 -0
- package/pages/learn/[slug]/index.vue +341 -0
- package/pages/learn/create.vue +71 -0
- package/pages/learn/index.vue +360 -0
- package/pages/messages/[conversationId].vue +113 -0
- package/pages/messages/index.vue +303 -0
- package/pages/mirror/[id].vue +115 -0
- package/pages/notifications.vue +91 -0
- package/pages/products/[slug].vue +128 -0
- package/pages/products/index.vue +122 -0
- package/pages/search.vue +692 -0
- package/pages/settings/account.vue +170 -0
- package/pages/settings/appearance.vue +80 -0
- package/pages/settings/index.vue +81 -0
- package/pages/settings/notifications.vue +68 -0
- package/pages/settings/profile.vue +838 -0
- package/pages/tags/[slug].vue +111 -0
- package/pages/tags/index.vue +73 -0
- package/pages/u/[username]/followers.vue +86 -0
- package/pages/u/[username]/following.vue +94 -0
- package/pages/u/[username]/index.vue +837 -0
- package/pages/videos/[id].vue +212 -0
- package/pages/videos/index.vue +327 -0
- package/pages/videos/submit.vue +112 -0
- package/plugins/auth.ts +23 -0
- package/server/api/admin/audit.get.ts +17 -0
- package/server/api/admin/content/[id].delete.ts +15 -0
- package/server/api/admin/content/[id].patch.ts +37 -0
- package/server/api/admin/federation/activity.get.ts +31 -0
- package/server/api/admin/federation/clients.get.ts +9 -0
- package/server/api/admin/federation/clients.post.ts +16 -0
- package/server/api/admin/federation/hub-mirrors/index.get.ts +10 -0
- package/server/api/admin/federation/hub-mirrors/index.post.ts +42 -0
- package/server/api/admin/federation/mirrors/[id]/backfill.post.ts +39 -0
- package/server/api/admin/federation/mirrors/[id].delete.ts +11 -0
- package/server/api/admin/federation/mirrors/[id].get.ts +15 -0
- package/server/api/admin/federation/mirrors/[id].put.ts +22 -0
- package/server/api/admin/federation/mirrors/index.get.ts +9 -0
- package/server/api/admin/federation/mirrors/index.post.ts +30 -0
- package/server/api/admin/federation/pending.get.ts +22 -0
- package/server/api/admin/federation/refederate.post.ts +92 -0
- package/server/api/admin/federation/repair-types.post.ts +57 -0
- package/server/api/admin/federation/retry.post.ts +41 -0
- package/server/api/admin/federation/stats.get.ts +26 -0
- package/server/api/admin/reports/[id]/resolve.post.ts +12 -0
- package/server/api/admin/reports.get.ts +17 -0
- package/server/api/admin/settings.get.ts +22 -0
- package/server/api/admin/settings.put.ts +11 -0
- package/server/api/admin/stats.get.ts +9 -0
- package/server/api/admin/users/[id]/role.put.ts +12 -0
- package/server/api/admin/users/[id]/status.put.ts +12 -0
- package/server/api/admin/users/[id].delete.ts +10 -0
- package/server/api/admin/users.get.ts +18 -0
- package/server/api/auth/federated/callback.get.ts +67 -0
- package/server/api/auth/federated/login.post.ts +60 -0
- package/server/api/auth/oauth2/authorize.get.ts +30 -0
- package/server/api/auth/oauth2/authorize.post.ts +51 -0
- package/server/api/auth/oauth2/register.post.ts +41 -0
- package/server/api/auth/oauth2/token.post.ts +48 -0
- package/server/api/cert/[code].get.ts +13 -0
- package/server/api/content/[id]/build.post.ts +9 -0
- package/server/api/content/[id]/fork.post.ts +10 -0
- package/server/api/content/[id]/index.delete.ts +18 -0
- package/server/api/content/[id]/index.get.ts +15 -0
- package/server/api/content/[id]/index.put.ts +23 -0
- package/server/api/content/[id]/products/[productId].delete.ts +28 -0
- package/server/api/content/[id]/products-sync.post.ts +29 -0
- package/server/api/content/[id]/products.get.ts +9 -0
- package/server/api/content/[id]/products.post.ts +31 -0
- package/server/api/content/[id]/publish.post.ts +17 -0
- package/server/api/content/[id]/report.post.ts +17 -0
- package/server/api/content/[id]/versions.get.ts +9 -0
- package/server/api/content/[id]/view.post.ts +34 -0
- package/server/api/content/index.get.ts +23 -0
- package/server/api/content/index.post.ts +11 -0
- package/server/api/contests/[slug]/entries.get.ts +18 -0
- package/server/api/contests/[slug]/entries.post.ts +23 -0
- package/server/api/contests/[slug]/index.delete.ts +21 -0
- package/server/api/contests/[slug]/index.get.ts +11 -0
- package/server/api/contests/[slug]/index.put.ts +15 -0
- package/server/api/contests/[slug]/judge.post.ts +12 -0
- package/server/api/contests/[slug]/transition.post.ts +24 -0
- package/server/api/contests/index.get.ts +10 -0
- package/server/api/contests/index.post.ts +28 -0
- package/server/api/docs/[siteSlug]/index.delete.ts +14 -0
- package/server/api/docs/[siteSlug]/index.get.ts +17 -0
- package/server/api/docs/[siteSlug]/index.put.ts +20 -0
- package/server/api/docs/[siteSlug]/nav.get.ts +26 -0
- package/server/api/docs/[siteSlug]/pages/[pageId].delete.ts +14 -0
- package/server/api/docs/[siteSlug]/pages/[pageId].get.ts +31 -0
- package/server/api/docs/[siteSlug]/pages/[pageId].put.ts +15 -0
- package/server/api/docs/[siteSlug]/pages/index.get.ts +34 -0
- package/server/api/docs/[siteSlug]/pages/index.post.ts +28 -0
- package/server/api/docs/[siteSlug]/pages/reorder.post.ts +26 -0
- package/server/api/docs/[siteSlug]/search.get.ts +20 -0
- package/server/api/docs/[siteSlug]/versions.post.ts +11 -0
- package/server/api/docs/index.get.ts +6 -0
- package/server/api/docs/index.post.ts +10 -0
- package/server/api/federated-hubs/[id]/posts/[postId].get.ts +16 -0
- package/server/api/federated-hubs/[id]/posts.get.ts +15 -0
- package/server/api/federated-hubs/[id].get.ts +16 -0
- package/server/api/federation/boost.post.ts +21 -0
- package/server/api/federation/content/[id].get.ts +15 -0
- package/server/api/federation/follow.post.ts +16 -0
- package/server/api/federation/health.get.ts +56 -0
- package/server/api/federation/hub-follow.post.ts +27 -0
- package/server/api/federation/hub-post-like.post.ts +115 -0
- package/server/api/federation/hub-post-likes.get.ts +24 -0
- package/server/api/federation/hub-post-reply.post.ts +42 -0
- package/server/api/federation/hub-post.post.ts +33 -0
- package/server/api/federation/like.post.ts +21 -0
- package/server/api/federation/remote-actor.get.ts +22 -0
- package/server/api/federation/reply.post.ts +22 -0
- package/server/api/federation/search.post.ts +17 -0
- package/server/api/federation/timeline.get.ts +22 -0
- package/server/api/federation/unfollow.post.ts +17 -0
- package/server/api/files/[id].delete.ts +35 -0
- package/server/api/files/mine.get.ts +31 -0
- package/server/api/files/upload-from-url.post.ts +68 -0
- package/server/api/files/upload.post.ts +105 -0
- package/server/api/health.get.ts +4 -0
- package/server/api/hubs/[slug]/bans/[userId].delete.ts +13 -0
- package/server/api/hubs/[slug]/bans.get.ts +20 -0
- package/server/api/hubs/[slug]/bans.post.ts +23 -0
- package/server/api/hubs/[slug]/feed.xml.get.ts +60 -0
- package/server/api/hubs/[slug]/gallery.get.ts +21 -0
- package/server/api/hubs/[slug]/index.delete.ts +18 -0
- package/server/api/hubs/[slug]/index.get.ts +14 -0
- package/server/api/hubs/[slug]/index.put.ts +22 -0
- package/server/api/hubs/[slug]/invites.get.ts +20 -0
- package/server/api/hubs/[slug]/invites.post.ts +27 -0
- package/server/api/hubs/[slug]/join.post.ts +17 -0
- package/server/api/hubs/[slug]/leave.post.ts +13 -0
- package/server/api/hubs/[slug]/members/[userId].delete.ts +13 -0
- package/server/api/hubs/[slug]/members/[userId].put.ts +16 -0
- package/server/api/hubs/[slug]/members.get.ts +20 -0
- package/server/api/hubs/[slug]/posts/[postId]/like.post.ts +21 -0
- package/server/api/hubs/[slug]/posts/[postId]/lock.post.ts +17 -0
- package/server/api/hubs/[slug]/posts/[postId]/pin.post.ts +17 -0
- package/server/api/hubs/[slug]/posts/[postId]/replies.get.ts +16 -0
- package/server/api/hubs/[slug]/posts/[postId]/replies.post.ts +21 -0
- package/server/api/hubs/[slug]/posts/[postId].delete.ts +23 -0
- package/server/api/hubs/[slug]/posts/[postId].get.ts +16 -0
- package/server/api/hubs/[slug]/posts/index.get.ts +16 -0
- package/server/api/hubs/[slug]/posts/index.post.ts +36 -0
- package/server/api/hubs/[slug]/products.get.ts +26 -0
- package/server/api/hubs/[slug]/products.post.ts +18 -0
- package/server/api/hubs/[slug]/share.post.ts +39 -0
- package/server/api/hubs/index.get.ts +15 -0
- package/server/api/hubs/index.post.ts +11 -0
- package/server/api/image-proxy.get.ts +91 -0
- package/server/api/learn/[slug]/[lessonSlug]/complete.post.ts +13 -0
- package/server/api/learn/[slug]/[lessonSlug]/index.get.ts +68 -0
- package/server/api/learn/[slug]/enroll.post.ts +12 -0
- package/server/api/learn/[slug]/index.delete.ts +12 -0
- package/server/api/learn/[slug]/index.get.ts +14 -0
- package/server/api/learn/[slug]/index.put.ts +19 -0
- package/server/api/learn/[slug]/lessons/[lessonId].delete.ts +14 -0
- package/server/api/learn/[slug]/lessons/[lessonId].put.ts +24 -0
- package/server/api/learn/[slug]/lessons.post.ts +10 -0
- package/server/api/learn/[slug]/modules/[moduleId].delete.ts +14 -0
- package/server/api/learn/[slug]/modules/[moduleId].put.ts +15 -0
- package/server/api/learn/[slug]/modules.post.ts +14 -0
- package/server/api/learn/[slug]/publish.post.ts +13 -0
- package/server/api/learn/[slug]/unenroll.post.ts +12 -0
- package/server/api/learn/certificates.get.ts +9 -0
- package/server/api/learn/enrollments.get.ts +9 -0
- package/server/api/learn/index.get.ts +17 -0
- package/server/api/learn/index.post.ts +11 -0
- package/server/api/me.get.ts +13 -0
- package/server/api/messages/[conversationId]/info.get.ts +43 -0
- package/server/api/messages/[conversationId]/stream.get.ts +73 -0
- package/server/api/messages/[conversationId].get.ts +13 -0
- package/server/api/messages/[conversationId].post.ts +12 -0
- package/server/api/messages/index.get.ts +39 -0
- package/server/api/messages/index.post.ts +58 -0
- package/server/api/notifications/[id].delete.ts +11 -0
- package/server/api/notifications/count.get.ts +10 -0
- package/server/api/notifications/index.get.ts +24 -0
- package/server/api/notifications/read.post.ts +15 -0
- package/server/api/notifications/stream.get.ts +59 -0
- package/server/api/openapi.get.ts +5 -0
- package/server/api/products/[id].delete.ts +15 -0
- package/server/api/products/[id].put.ts +18 -0
- package/server/api/products/[slug]/content.get.ts +21 -0
- package/server/api/products/[slug].get.ts +16 -0
- package/server/api/products/index.get.ts +28 -0
- package/server/api/profile.get.ts +15 -0
- package/server/api/profile.put.ts +24 -0
- package/server/api/resolve-identity.post.ts +34 -0
- package/server/api/search/index.get.ts +24 -0
- package/server/api/search/trending.get.ts +22 -0
- package/server/api/social/bookmark.get.ts +16 -0
- package/server/api/social/bookmark.post.ts +15 -0
- package/server/api/social/bookmarks.get.ts +16 -0
- package/server/api/social/comments/[id].delete.ts +13 -0
- package/server/api/social/comments.get.ts +18 -0
- package/server/api/social/comments.post.ts +11 -0
- package/server/api/social/like.get.ts +17 -0
- package/server/api/social/like.post.ts +35 -0
- package/server/api/stats.get.ts +8 -0
- package/server/api/user/hubs.get.ts +22 -0
- package/server/api/users/[username]/content.get.ts +21 -0
- package/server/api/users/[username]/feed.xml.get.ts +65 -0
- package/server/api/users/[username]/follow.delete.ts +15 -0
- package/server/api/users/[username]/follow.post.ts +15 -0
- package/server/api/users/[username]/followers.get.ts +22 -0
- package/server/api/users/[username]/following.get.ts +22 -0
- package/server/api/users/[username]/learning.get.ts +18 -0
- package/server/api/users/[username].get.ts +25 -0
- package/server/api/users/index.get.ts +78 -0
- package/server/api/videos/[id].get.ts +18 -0
- package/server/api/videos/categories/[id].delete.ts +15 -0
- package/server/api/videos/categories/[id].put.ts +17 -0
- package/server/api/videos/categories.get.ts +7 -0
- package/server/api/videos/categories.post.ts +11 -0
- package/server/api/videos/index.get.ts +20 -0
- package/server/api/videos/index.post.ts +11 -0
- package/server/middleware/auth.ts +180 -0
- package/server/middleware/features.ts +31 -0
- package/server/middleware/security.ts +54 -0
- package/server/plugins/auto-admin.ts +69 -0
- package/server/plugins/federation-delivery.ts +74 -0
- package/server/routes/.well-known/nodeinfo.ts +15 -0
- package/server/routes/.well-known/webfinger.ts +86 -0
- package/server/routes/actor/followers.ts +34 -0
- package/server/routes/actor/following.ts +34 -0
- package/server/routes/actor/outbox.ts +31 -0
- package/server/routes/actor.ts +30 -0
- package/server/routes/feed.xml.ts +59 -0
- package/server/routes/hubs/[slug]/followers.ts +39 -0
- package/server/routes/hubs/[slug]/inbox.ts +35 -0
- package/server/routes/hubs/[slug]/outbox.ts +43 -0
- package/server/routes/hubs/[slug]/posts/[postId].ts +63 -0
- package/server/routes/hubs/[slug].ts +29 -0
- package/server/routes/inbox.ts +34 -0
- package/server/routes/nodeinfo/2.1.ts +27 -0
- package/server/routes/robots.txt.ts +19 -0
- package/server/routes/sitemap.xml.ts +105 -0
- package/server/routes/users/[username]/followers.ts +33 -0
- package/server/routes/users/[username]/following.ts +33 -0
- package/server/routes/users/[username]/inbox.ts +34 -0
- package/server/routes/users/[username]/outbox.ts +35 -0
- package/server/routes/users/[username].ts +62 -0
- package/server/utils/auth.ts +36 -0
- package/server/utils/db.ts +34 -0
- package/server/utils/errors.ts +24 -0
- package/server/utils/inbox.ts +122 -0
- package/server/utils/validate.ts +82 -0
- package/theme/base.css +283 -0
- package/theme/components.css +322 -0
- package/theme/dark.css +87 -0
- package/theme/editor-panels.css +63 -0
- package/theme/forms.css +216 -0
- package/theme/generics.css +68 -0
- package/theme/layouts.css +415 -0
- package/theme/prose.css +342 -0
- package/types/hub.ts +61 -0
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* API route validation helpers.
|
|
3
|
+
*
|
|
4
|
+
* Eliminates Zod .safeParse + createError boilerplate from 42+ route files.
|
|
5
|
+
*/
|
|
6
|
+
import type { H3Event } from 'h3';
|
|
7
|
+
import type { ZodType } from 'zod';
|
|
8
|
+
|
|
9
|
+
const UUID_REGEX = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
10
|
+
const SLUG_REGEX = /^[a-z0-9][a-z0-9-]*$/;
|
|
11
|
+
|
|
12
|
+
type ParamType = 'uuid' | 'slug' | 'string';
|
|
13
|
+
|
|
14
|
+
/** Parse and validate request body against a Zod schema. Throws 400 on failure. */
|
|
15
|
+
export async function parseBody<T>(event: H3Event, schema: ZodType<T>): Promise<T> {
|
|
16
|
+
const body = await readBody(event);
|
|
17
|
+
const parsed = schema.safeParse(body);
|
|
18
|
+
if (!parsed.success) {
|
|
19
|
+
throw createError({
|
|
20
|
+
statusCode: 400,
|
|
21
|
+
statusMessage: 'Validation failed',
|
|
22
|
+
data: { errors: parsed.error.flatten().fieldErrors },
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
return parsed.data;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/** Parse and validate query string against a Zod schema. Throws 400 on failure. */
|
|
29
|
+
export function parseQueryParams<T>(event: H3Event, schema: ZodType<T>): T {
|
|
30
|
+
const query = getQuery(event);
|
|
31
|
+
const parsed = schema.safeParse(query);
|
|
32
|
+
if (!parsed.success) {
|
|
33
|
+
throw createError({
|
|
34
|
+
statusCode: 400,
|
|
35
|
+
statusMessage: 'Invalid query parameters',
|
|
36
|
+
data: { errors: parsed.error.flatten().fieldErrors },
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
return parsed.data;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/** Require a feature flag to be enabled. Throws 404 if disabled. */
|
|
43
|
+
export function requireFeature(feature: string): void {
|
|
44
|
+
const config = useConfig();
|
|
45
|
+
const flags = config.features as unknown as Record<string, boolean>;
|
|
46
|
+
if (!flags[feature]) {
|
|
47
|
+
throw createError({ statusCode: 404, statusMessage: 'Not Found' });
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Extract and validate route parameters.
|
|
53
|
+
*
|
|
54
|
+
* @example
|
|
55
|
+
* const { id } = parseParams(event, { id: 'uuid' });
|
|
56
|
+
* const { slug } = parseParams(event, { slug: 'slug' });
|
|
57
|
+
* const { siteSlug, pageId } = parseParams(event, { siteSlug: 'string', pageId: 'uuid' });
|
|
58
|
+
*/
|
|
59
|
+
export function parseParams<T extends Record<string, ParamType>>(
|
|
60
|
+
event: H3Event,
|
|
61
|
+
spec: T,
|
|
62
|
+
): { [K in keyof T]: string } {
|
|
63
|
+
const result = {} as { [K in keyof T]: string };
|
|
64
|
+
|
|
65
|
+
for (const [name, type] of Object.entries(spec)) {
|
|
66
|
+
const value = getRouterParam(event, name);
|
|
67
|
+
if (!value) {
|
|
68
|
+
throw createError({ statusCode: 400, statusMessage: `Missing parameter: ${name}` });
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
if (type === 'uuid' && !UUID_REGEX.test(value)) {
|
|
72
|
+
throw createError({ statusCode: 400, statusMessage: `Invalid ${name} format` });
|
|
73
|
+
}
|
|
74
|
+
if (type === 'slug' && !SLUG_REGEX.test(value)) {
|
|
75
|
+
throw createError({ statusCode: 400, statusMessage: `Invalid ${name} format` });
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
(result as Record<string, string>)[name] = value;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
return result;
|
|
82
|
+
}
|
package/theme/base.css
ADDED
|
@@ -0,0 +1,283 @@
|
|
|
1
|
+
@layer commonpub {
|
|
2
|
+
/* ===========================================
|
|
3
|
+
CommonPub Token Contract — base.css
|
|
4
|
+
Design: unified-v2 aesthetic + hack.build readability
|
|
5
|
+
Sharp corners, 2px borders, offset shadows,
|
|
6
|
+
JetBrains Mono labels, blue accent.
|
|
7
|
+
=========================================== */
|
|
8
|
+
|
|
9
|
+
:root {
|
|
10
|
+
/* === SURFACES === */
|
|
11
|
+
--bg: #fafaf9;
|
|
12
|
+
--surface: #ffffff;
|
|
13
|
+
--surface2: #f4f4f2;
|
|
14
|
+
--surface3: #eaeae7;
|
|
15
|
+
|
|
16
|
+
/* Aliases for backwards compat */
|
|
17
|
+
--color-surface: var(--surface);
|
|
18
|
+
--color-surface-alt: var(--surface2);
|
|
19
|
+
--color-surface-raised: var(--surface);
|
|
20
|
+
--color-surface-overlay: rgba(0, 0, 0, 0.5);
|
|
21
|
+
--color-surface-overlay-light: rgba(0, 0, 0, 0.4);
|
|
22
|
+
--color-surface-scrim: rgba(250, 250, 249, 0.75);
|
|
23
|
+
--color-surface-hover: var(--surface2);
|
|
24
|
+
--color-bg-subtle: var(--bg);
|
|
25
|
+
|
|
26
|
+
/* === TEXT === */
|
|
27
|
+
--text: #1a1a1a;
|
|
28
|
+
--text-dim: #6b6b66;
|
|
29
|
+
--text-faint: #a3a39e;
|
|
30
|
+
|
|
31
|
+
--color-text: var(--text);
|
|
32
|
+
--color-text-secondary: var(--text-dim);
|
|
33
|
+
--color-text-muted: var(--text-faint);
|
|
34
|
+
--color-text-inverse: #ffffff;
|
|
35
|
+
|
|
36
|
+
/* === BORDERS === */
|
|
37
|
+
--border: #1a1a1a;
|
|
38
|
+
--border2: #d4d4d0;
|
|
39
|
+
|
|
40
|
+
--color-border: var(--border2);
|
|
41
|
+
--color-border-strong: var(--border);
|
|
42
|
+
--color-border-focus: var(--accent);
|
|
43
|
+
|
|
44
|
+
/* === ACCENT (blue) === */
|
|
45
|
+
--accent: #5b9cf6;
|
|
46
|
+
--accent-bg: rgba(91, 156, 246, 0.08);
|
|
47
|
+
--accent-bg-strong: rgba(91, 156, 246, 0.2);
|
|
48
|
+
--accent-bg-heavy: rgba(91, 156, 246, 0.4);
|
|
49
|
+
--accent-bg-solid: rgba(91, 156, 246, 0.6);
|
|
50
|
+
--accent-border: rgba(91, 156, 246, 0.25);
|
|
51
|
+
--accent-focus-ring: 0 0 0 3px rgba(91, 156, 246, 0.12);
|
|
52
|
+
|
|
53
|
+
--color-primary: var(--accent);
|
|
54
|
+
--color-primary-hover: #4a8be5;
|
|
55
|
+
--color-primary-text: #ffffff;
|
|
56
|
+
--color-on-primary: #ffffff;
|
|
57
|
+
--color-accent: var(--accent);
|
|
58
|
+
--color-accent-hover: #4a8be5;
|
|
59
|
+
--color-accent-text: #ffffff;
|
|
60
|
+
--color-on-accent: #ffffff;
|
|
61
|
+
--color-accent-bg: var(--accent-bg);
|
|
62
|
+
--color-accent-border: var(--accent-border);
|
|
63
|
+
|
|
64
|
+
/* === SEMANTIC COLORS === */
|
|
65
|
+
--green: #22c55e;
|
|
66
|
+
--green-bg: rgba(34, 197, 94, 0.08);
|
|
67
|
+
--green-border: rgba(34, 197, 94, 0.25);
|
|
68
|
+
|
|
69
|
+
--yellow: #f59e0b;
|
|
70
|
+
--yellow-bg: rgba(245, 158, 11, 0.08);
|
|
71
|
+
--yellow-border: rgba(245, 158, 11, 0.25);
|
|
72
|
+
|
|
73
|
+
--red: #ef4444;
|
|
74
|
+
--red-bg: rgba(239, 68, 68, 0.08);
|
|
75
|
+
--red-border: rgba(239, 68, 68, 0.25);
|
|
76
|
+
|
|
77
|
+
--purple: #8b5cf6;
|
|
78
|
+
--purple-bg: rgba(139, 92, 246, 0.08);
|
|
79
|
+
--purple-border: rgba(139, 92, 246, 0.25);
|
|
80
|
+
|
|
81
|
+
--teal: #14b8a6;
|
|
82
|
+
--teal-bg: rgba(20, 184, 166, 0.08);
|
|
83
|
+
--teal-border: rgba(20, 184, 166, 0.25);
|
|
84
|
+
|
|
85
|
+
--pink: #ec4899;
|
|
86
|
+
--pink-bg: rgba(236, 72, 153, 0.08);
|
|
87
|
+
--pink-border: rgba(236, 72, 153, 0.25);
|
|
88
|
+
|
|
89
|
+
--color-success: var(--green);
|
|
90
|
+
--color-warning: var(--yellow);
|
|
91
|
+
--color-error: var(--red);
|
|
92
|
+
--color-info: var(--accent);
|
|
93
|
+
--color-success-bg: var(--green-bg);
|
|
94
|
+
--color-warning-bg: var(--yellow-bg);
|
|
95
|
+
--color-error-bg: var(--red-bg);
|
|
96
|
+
--color-info-bg: var(--accent-bg);
|
|
97
|
+
|
|
98
|
+
/* === OVERLAYS === */
|
|
99
|
+
--color-badge-overlay: rgba(0, 0, 0, 0.75);
|
|
100
|
+
|
|
101
|
+
/* === INTERACTIVE === */
|
|
102
|
+
--color-link: var(--accent);
|
|
103
|
+
--color-link-hover: #4a8be5;
|
|
104
|
+
|
|
105
|
+
/* === TYPOGRAPHY === */
|
|
106
|
+
--font-sans: system-ui, -apple-system, sans-serif;
|
|
107
|
+
--font-mono: 'JetBrains Mono', ui-monospace, monospace;
|
|
108
|
+
|
|
109
|
+
--font-heading: var(--font-sans);
|
|
110
|
+
--font-body: var(--font-sans);
|
|
111
|
+
|
|
112
|
+
/* Font Sizes — bumped +2px from unified-v2 mockup for readability */
|
|
113
|
+
--text-xs: 0.75rem; /* 12px (was 10px) */
|
|
114
|
+
--text-sm: 0.875rem; /* 14px (was 12px) */
|
|
115
|
+
--text-base: 1rem; /* 16px (was 14px) */
|
|
116
|
+
--text-md: 1.125rem; /* 18px */
|
|
117
|
+
--text-lg: 1.25rem; /* 20px */
|
|
118
|
+
--text-xl: 1.375rem; /* 22px */
|
|
119
|
+
--text-2xl: 1.75rem; /* 28px */
|
|
120
|
+
--text-3xl: 2.25rem; /* 36px */
|
|
121
|
+
--text-4xl: 3rem; /* 48px */
|
|
122
|
+
--text-5xl: 3.75rem; /* 60px */
|
|
123
|
+
--text-6xl: 4.5rem; /* 72px */
|
|
124
|
+
--text-label: 0.6875rem; /* 11px — monospace UI labels */
|
|
125
|
+
|
|
126
|
+
/* Font Weights */
|
|
127
|
+
--font-weight-normal: 400;
|
|
128
|
+
--font-weight-medium: 500;
|
|
129
|
+
--font-weight-semibold: 600;
|
|
130
|
+
--font-weight-bold: 700;
|
|
131
|
+
|
|
132
|
+
/* Line Heights — increased for readability */
|
|
133
|
+
--leading-tight: 1.2;
|
|
134
|
+
--leading-snug: 1.4;
|
|
135
|
+
--leading-normal: 1.7; /* was 1.5, bumped for hack.build readability */
|
|
136
|
+
--leading-relaxed: 1.9;
|
|
137
|
+
|
|
138
|
+
/* Letter Spacing */
|
|
139
|
+
--tracking-tight: -0.02em;
|
|
140
|
+
--tracking-normal: 0;
|
|
141
|
+
--tracking-wide: 0.04em;
|
|
142
|
+
--tracking-wider: 0.08em;
|
|
143
|
+
--tracking-widest: 0.12em; /* for uppercase mono labels */
|
|
144
|
+
|
|
145
|
+
/* === SPACING (4px base) === */
|
|
146
|
+
--space-1: 0.25rem;
|
|
147
|
+
--space-2: 0.5rem;
|
|
148
|
+
--space-3: 0.75rem;
|
|
149
|
+
--space-4: 1rem;
|
|
150
|
+
--space-5: 1.25rem;
|
|
151
|
+
--space-6: 1.5rem; /* 24px — card body padding (increased from 20px) */
|
|
152
|
+
--space-8: 2rem;
|
|
153
|
+
--space-10: 2.5rem;
|
|
154
|
+
--space-12: 3rem; /* 48px section padding */
|
|
155
|
+
--space-16: 4rem;
|
|
156
|
+
--space-20: 5rem;
|
|
157
|
+
--space-24: 6rem; /* 72px section spacing */
|
|
158
|
+
|
|
159
|
+
/* === SHAPE === */
|
|
160
|
+
--radius: 0px; /* sharp corners — the commonpub signature */
|
|
161
|
+
--radius-none: 0;
|
|
162
|
+
--radius-sm: 2px;
|
|
163
|
+
--radius-md: 0; /* override: sharp corners */
|
|
164
|
+
--radius-lg: 0;
|
|
165
|
+
--radius-xl: 0;
|
|
166
|
+
--radius-2xl: 0;
|
|
167
|
+
--radius-full: 50%; /* avatars only */
|
|
168
|
+
|
|
169
|
+
--border-width-thin: 1px;
|
|
170
|
+
--border-width-default: 2px; /* strong 2px borders — the commonpub signature */
|
|
171
|
+
--border-width-thick: 3px;
|
|
172
|
+
|
|
173
|
+
/* === SHADOWS (offset, no blur — the commonpub signature) === */
|
|
174
|
+
--shadow-sm: 2px 2px 0 var(--border);
|
|
175
|
+
--shadow-md: 4px 4px 0 var(--border);
|
|
176
|
+
--shadow-lg: 6px 6px 0 var(--border);
|
|
177
|
+
--shadow-xl: 8px 8px 0 var(--border);
|
|
178
|
+
--shadow-accent: 4px 4px 0 var(--accent);
|
|
179
|
+
|
|
180
|
+
/* === TRANSITIONS === */
|
|
181
|
+
--transition-fast: 0.1s ease;
|
|
182
|
+
--transition-default: 0.15s ease;
|
|
183
|
+
--transition-slow: 0.3s ease;
|
|
184
|
+
|
|
185
|
+
/* === Z-INDEX SCALE === */
|
|
186
|
+
--z-dropdown: 100;
|
|
187
|
+
--z-sticky: 200;
|
|
188
|
+
--z-fixed: 500;
|
|
189
|
+
--z-modal-backdrop: 900;
|
|
190
|
+
--z-modal: 1000;
|
|
191
|
+
--z-toast: 1050;
|
|
192
|
+
--z-tooltip: 1100;
|
|
193
|
+
|
|
194
|
+
/* === LAYOUT === */
|
|
195
|
+
--nav-height: 3rem; /* 48px topbar */
|
|
196
|
+
--subnav-height: 2.75rem;
|
|
197
|
+
--sidebar-width: 12.5rem; /* 200px fixed sidebar */
|
|
198
|
+
--content-max-width: 60rem; /* 960px */
|
|
199
|
+
--content-wide-max-width: 75rem;
|
|
200
|
+
|
|
201
|
+
/* === FOCUS === */
|
|
202
|
+
--focus-ring: var(--shadow-accent);
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
/* === BASE STYLES === */
|
|
206
|
+
body {
|
|
207
|
+
font-family: var(--font-body);
|
|
208
|
+
font-size: var(--text-base);
|
|
209
|
+
line-height: var(--leading-normal);
|
|
210
|
+
color: var(--text);
|
|
211
|
+
background-color: var(--bg);
|
|
212
|
+
-webkit-font-smoothing: antialiased;
|
|
213
|
+
-moz-osx-font-smoothing: grayscale;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
*,
|
|
217
|
+
*::before,
|
|
218
|
+
*::after {
|
|
219
|
+
box-sizing: border-box;
|
|
220
|
+
border-radius: var(--radius);
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
/* === ACCESSIBILITY === */
|
|
224
|
+
|
|
225
|
+
/* Skip-to-content link */
|
|
226
|
+
.cpub-skip-link {
|
|
227
|
+
position: absolute;
|
|
228
|
+
top: -100%;
|
|
229
|
+
left: var(--space-4);
|
|
230
|
+
z-index: var(--z-tooltip);
|
|
231
|
+
padding: var(--space-2) var(--space-4);
|
|
232
|
+
background: var(--accent);
|
|
233
|
+
color: var(--color-on-accent);
|
|
234
|
+
font-family: var(--font-mono);
|
|
235
|
+
font-size: var(--text-sm);
|
|
236
|
+
font-weight: var(--font-weight-bold);
|
|
237
|
+
text-decoration: none;
|
|
238
|
+
border: var(--border-width-default) solid var(--border);
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
.cpub-skip-link:focus {
|
|
242
|
+
top: var(--space-2);
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
/* Focus-visible ring for all interactive elements */
|
|
246
|
+
:focus-visible {
|
|
247
|
+
outline: 2px solid var(--accent);
|
|
248
|
+
outline-offset: 2px;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
/* Reduced motion */
|
|
252
|
+
@media (prefers-reduced-motion: reduce) {
|
|
253
|
+
*,
|
|
254
|
+
*::before,
|
|
255
|
+
*::after {
|
|
256
|
+
animation-duration: 0.01ms !important;
|
|
257
|
+
animation-iteration-count: 1 !important;
|
|
258
|
+
transition-duration: 0.01ms !important;
|
|
259
|
+
scroll-behavior: auto !important;
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
/* Screen reader only utility */
|
|
264
|
+
.cpub-sr-only {
|
|
265
|
+
position: absolute;
|
|
266
|
+
width: 1px;
|
|
267
|
+
height: 1px;
|
|
268
|
+
padding: 0;
|
|
269
|
+
margin: -1px;
|
|
270
|
+
overflow: hidden;
|
|
271
|
+
clip: rect(0, 0, 0, 0);
|
|
272
|
+
white-space: nowrap;
|
|
273
|
+
border-width: 0;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
/* === CONTENT TYPE BADGE COLORS === */
|
|
277
|
+
[data-content-type="article"] { --badge-color: var(--accent); --badge-bg: var(--accent-bg); }
|
|
278
|
+
[data-content-type="blog"] { --badge-color: var(--green); --badge-bg: var(--green-bg); }
|
|
279
|
+
[data-content-type="project"] { --badge-color: var(--purple); --badge-bg: var(--purple-bg); }
|
|
280
|
+
[data-content-type="explainer"] { --badge-color: var(--teal); --badge-bg: var(--teal-bg); }
|
|
281
|
+
[data-content-type="video"] { --badge-color: var(--red); --badge-bg: var(--red-bg); }
|
|
282
|
+
[data-content-type="tutorial"] { --badge-color: var(--yellow); --badge-bg: var(--yellow-bg); }
|
|
283
|
+
}
|
|
@@ -0,0 +1,322 @@
|
|
|
1
|
+
@layer commonpub {
|
|
2
|
+
/* ═══ CommonPub Shared Component Styles ═══
|
|
3
|
+
* Canonical definitions for primitives used across all pages.
|
|
4
|
+
* Imported globally via nuxt.config.ts — DO NOT duplicate in scoped styles.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
/* ─── BUTTONS ─── */
|
|
8
|
+
.cpub-btn {
|
|
9
|
+
font-family: var(--font-mono);
|
|
10
|
+
font-size: 12px;
|
|
11
|
+
padding: 6px 14px;
|
|
12
|
+
border: var(--border-width-default) solid var(--border);
|
|
13
|
+
background: var(--surface);
|
|
14
|
+
color: var(--text);
|
|
15
|
+
cursor: pointer;
|
|
16
|
+
display: inline-flex;
|
|
17
|
+
align-items: center;
|
|
18
|
+
gap: 6px;
|
|
19
|
+
text-decoration: none;
|
|
20
|
+
white-space: nowrap;
|
|
21
|
+
transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.cpub-btn:hover { background: var(--surface2); }
|
|
25
|
+
.cpub-btn:disabled { opacity: 0.5; cursor: not-allowed; }
|
|
26
|
+
|
|
27
|
+
.cpub-btn-primary {
|
|
28
|
+
background: var(--accent);
|
|
29
|
+
color: var(--color-text-inverse);
|
|
30
|
+
box-shadow: 4px 4px 0 var(--border);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.cpub-btn-primary:hover {
|
|
34
|
+
box-shadow: 2px 2px 0 var(--border);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.cpub-btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
|
|
38
|
+
|
|
39
|
+
.cpub-btn-sm { padding: 4px 10px; font-size: 11px; min-height: 44px; }
|
|
40
|
+
.cpub-btn-lg { padding: 12px 24px; font-size: 14px; font-weight: 600; }
|
|
41
|
+
|
|
42
|
+
.cpub-btn-ghost {
|
|
43
|
+
background: transparent;
|
|
44
|
+
border-color: transparent;
|
|
45
|
+
color: var(--text-faint);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.cpub-btn-ghost:hover { color: var(--text-dim); background: transparent; }
|
|
49
|
+
|
|
50
|
+
/* ─── TAGS ─── */
|
|
51
|
+
.cpub-tag {
|
|
52
|
+
display: inline-flex;
|
|
53
|
+
align-items: center;
|
|
54
|
+
font-size: var(--text-xs, 12px);
|
|
55
|
+
font-family: var(--font-mono);
|
|
56
|
+
padding: 2px 8px;
|
|
57
|
+
border: 1px solid var(--border2);
|
|
58
|
+
color: var(--text-dim);
|
|
59
|
+
background: var(--surface2);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.cpub-tag-accent { border-color: var(--accent-border); color: var(--accent); background: var(--accent-bg); }
|
|
63
|
+
.cpub-tag-green { border-color: var(--green-border); color: var(--green); background: var(--green-bg); }
|
|
64
|
+
.cpub-tag-red { border-color: var(--red-border); color: var(--red); background: var(--red-bg); }
|
|
65
|
+
.cpub-tag-yellow { border-color: var(--yellow-border); color: var(--yellow); background: var(--yellow-bg); }
|
|
66
|
+
.cpub-tag-purple { border-color: var(--purple-border); color: var(--purple); background: var(--purple-bg); }
|
|
67
|
+
.cpub-tag-teal { border-color: var(--teal-border); color: var(--teal); background: var(--teal-bg); }
|
|
68
|
+
|
|
69
|
+
.cpub-tag-row { display: flex; gap: 6px; flex-wrap: wrap; }
|
|
70
|
+
|
|
71
|
+
/* ─── EMPTY STATES ─── */
|
|
72
|
+
.cpub-empty-state { text-align: center; padding: 48px 16px; }
|
|
73
|
+
.cpub-empty-state-icon { font-size: 32px; color: var(--text-faint); margin-bottom: 12px; }
|
|
74
|
+
.cpub-empty-state-title { font-size: 14px; font-weight: 600; color: var(--text-dim); margin-bottom: 6px; }
|
|
75
|
+
.cpub-empty-state-desc { font-size: 12px; color: var(--text-faint); }
|
|
76
|
+
|
|
77
|
+
/* ─── SIDEBAR CARDS ─── */
|
|
78
|
+
.cpub-sb-card {
|
|
79
|
+
background: var(--surface);
|
|
80
|
+
border: var(--border-width-default) solid var(--border);
|
|
81
|
+
padding: 16px;
|
|
82
|
+
margin-bottom: 12px;
|
|
83
|
+
box-shadow: 4px 4px 0 var(--border);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.cpub-sb-title {
|
|
87
|
+
font-size: 10px;
|
|
88
|
+
font-weight: 600;
|
|
89
|
+
text-transform: uppercase;
|
|
90
|
+
letter-spacing: 0.1em;
|
|
91
|
+
color: var(--text-faint);
|
|
92
|
+
font-family: var(--font-mono);
|
|
93
|
+
margin-bottom: 12px;
|
|
94
|
+
padding-bottom: 8px;
|
|
95
|
+
border-bottom: 1px solid var(--border2);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/* ─── SECTION HEADERS ─── */
|
|
99
|
+
.cpub-section-head,
|
|
100
|
+
.cpub-sec-head {
|
|
101
|
+
display: flex;
|
|
102
|
+
align-items: center;
|
|
103
|
+
gap: 12px;
|
|
104
|
+
margin-bottom: 16px;
|
|
105
|
+
padding-bottom: 10px;
|
|
106
|
+
border-bottom: var(--border-width-default) solid var(--border);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.cpub-section-head h2,
|
|
110
|
+
.cpub-section-head h3,
|
|
111
|
+
.cpub-sec-head h2 {
|
|
112
|
+
font-size: 13px;
|
|
113
|
+
font-weight: 600;
|
|
114
|
+
text-transform: uppercase;
|
|
115
|
+
letter-spacing: 0.08em;
|
|
116
|
+
font-family: var(--font-mono);
|
|
117
|
+
color: var(--text-dim);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/* ─── SECTION TITLE (large) ─── */
|
|
121
|
+
.cpub-section-title-lg {
|
|
122
|
+
font-size: 22px;
|
|
123
|
+
font-weight: 700;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
/* ─── PAGINATION ─── */
|
|
127
|
+
.cpub-pagination {
|
|
128
|
+
display: flex;
|
|
129
|
+
align-items: center;
|
|
130
|
+
justify-content: center;
|
|
131
|
+
gap: 4px;
|
|
132
|
+
margin-top: 24px;
|
|
133
|
+
margin-bottom: 16px;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.cpub-page-btn {
|
|
137
|
+
min-width: 44px;
|
|
138
|
+
min-height: 44px;
|
|
139
|
+
border: var(--border-width-default) solid var(--border);
|
|
140
|
+
background: var(--surface);
|
|
141
|
+
color: var(--text-dim);
|
|
142
|
+
font-size: 12px;
|
|
143
|
+
font-family: var(--font-mono);
|
|
144
|
+
cursor: pointer;
|
|
145
|
+
display: flex;
|
|
146
|
+
align-items: center;
|
|
147
|
+
justify-content: center;
|
|
148
|
+
transition: all 0.15s;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.cpub-page-btn:hover:not(:disabled) { color: var(--text); background: var(--surface2); }
|
|
152
|
+
.cpub-page-btn:disabled { opacity: 0.4; cursor: not-allowed; }
|
|
153
|
+
|
|
154
|
+
.cpub-page-btn.active {
|
|
155
|
+
border-color: var(--accent);
|
|
156
|
+
background: var(--accent-bg);
|
|
157
|
+
color: var(--accent);
|
|
158
|
+
box-shadow: 2px 2px 0 var(--border);
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
.cpub-page-ellipsis {
|
|
162
|
+
width: 32px;
|
|
163
|
+
height: 32px;
|
|
164
|
+
display: flex;
|
|
165
|
+
align-items: center;
|
|
166
|
+
justify-content: center;
|
|
167
|
+
font-size: 12px;
|
|
168
|
+
color: var(--text-faint);
|
|
169
|
+
font-family: var(--font-mono);
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
/* ─── LINKS ─── */
|
|
173
|
+
.cpub-link { color: var(--accent); text-decoration: none; }
|
|
174
|
+
.cpub-link:hover { text-decoration: underline; }
|
|
175
|
+
|
|
176
|
+
/* ─── BACK LINK ─── */
|
|
177
|
+
.cpub-back-link {
|
|
178
|
+
font-size: 11px;
|
|
179
|
+
font-family: var(--font-mono);
|
|
180
|
+
color: var(--text-faint);
|
|
181
|
+
text-decoration: none;
|
|
182
|
+
display: inline-flex;
|
|
183
|
+
align-items: center;
|
|
184
|
+
gap: 6px;
|
|
185
|
+
margin-bottom: 16px;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.cpub-back-link:hover { color: var(--accent); }
|
|
189
|
+
|
|
190
|
+
/* ─── HERO EYEBROW ─── */
|
|
191
|
+
.cpub-hero-eyebrow {
|
|
192
|
+
font-size: 10px;
|
|
193
|
+
font-family: var(--font-mono);
|
|
194
|
+
color: var(--accent);
|
|
195
|
+
letter-spacing: 0.12em;
|
|
196
|
+
text-transform: uppercase;
|
|
197
|
+
margin-bottom: 10px;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
/* ─── SECTION SUB / HEAD RIGHT ─── */
|
|
201
|
+
.cpub-sec-sub { font-size: 11px; color: var(--text-dim); font-family: var(--font-mono); }
|
|
202
|
+
.cpub-sec-head-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
|
|
203
|
+
|
|
204
|
+
/* ─── FORM LAYOUT ─── */
|
|
205
|
+
.cpub-form-error {
|
|
206
|
+
padding: 10px 14px;
|
|
207
|
+
background: var(--red-bg);
|
|
208
|
+
color: var(--red);
|
|
209
|
+
border: var(--border-width-default) solid var(--red);
|
|
210
|
+
font-size: 12px;
|
|
211
|
+
font-family: var(--font-mono);
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
.cpub-form-group {
|
|
215
|
+
display: flex;
|
|
216
|
+
flex-direction: column;
|
|
217
|
+
gap: 6px;
|
|
218
|
+
margin-bottom: 16px;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
.cpub-form-label {
|
|
222
|
+
font-size: 11px;
|
|
223
|
+
font-weight: 600;
|
|
224
|
+
font-family: var(--font-mono);
|
|
225
|
+
text-transform: uppercase;
|
|
226
|
+
letter-spacing: 0.06em;
|
|
227
|
+
color: var(--text-dim);
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
.cpub-form-hint {
|
|
231
|
+
font-size: 10px;
|
|
232
|
+
color: var(--text-faint);
|
|
233
|
+
font-family: var(--font-mono);
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
.cpub-input {
|
|
237
|
+
padding: 8px 12px;
|
|
238
|
+
border: var(--border-width-default) solid var(--border);
|
|
239
|
+
background: var(--surface);
|
|
240
|
+
color: var(--text);
|
|
241
|
+
font-size: 13px;
|
|
242
|
+
font-family: var(--font-sans);
|
|
243
|
+
outline: none;
|
|
244
|
+
transition: border-color 0.15s;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
.cpub-input:focus { border-color: var(--accent); }
|
|
248
|
+
.cpub-input::placeholder { color: var(--text-faint); }
|
|
249
|
+
|
|
250
|
+
.cpub-textarea {
|
|
251
|
+
padding: 8px 12px;
|
|
252
|
+
border: var(--border-width-default) solid var(--border);
|
|
253
|
+
background: var(--surface);
|
|
254
|
+
color: var(--text);
|
|
255
|
+
font-size: 13px;
|
|
256
|
+
font-family: var(--font-sans);
|
|
257
|
+
outline: none;
|
|
258
|
+
resize: vertical;
|
|
259
|
+
min-height: 60px;
|
|
260
|
+
line-height: 1.5;
|
|
261
|
+
transition: border-color 0.15s;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
.cpub-textarea:focus { border-color: var(--accent); }
|
|
265
|
+
.cpub-textarea::placeholder { color: var(--text-faint); }
|
|
266
|
+
|
|
267
|
+
/* ─── LOADING STATE ─── */
|
|
268
|
+
.cpub-loading {
|
|
269
|
+
display: flex;
|
|
270
|
+
align-items: center;
|
|
271
|
+
justify-content: center;
|
|
272
|
+
gap: 10px;
|
|
273
|
+
padding: 64px 16px;
|
|
274
|
+
color: var(--text-faint);
|
|
275
|
+
font-size: 13px;
|
|
276
|
+
font-family: var(--font-mono);
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
.cpub-loading::before {
|
|
280
|
+
content: '';
|
|
281
|
+
width: 16px;
|
|
282
|
+
height: 16px;
|
|
283
|
+
border: var(--border-width-default) solid var(--border);
|
|
284
|
+
border-top-color: var(--accent);
|
|
285
|
+
animation: cpub-spin 0.6s linear infinite;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
@keyframes cpub-spin {
|
|
289
|
+
to { transform: rotate(360deg); }
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
/* ─── ERROR STATE ─── */
|
|
293
|
+
.cpub-fetch-error {
|
|
294
|
+
text-align: center;
|
|
295
|
+
padding: 48px 16px;
|
|
296
|
+
color: var(--red);
|
|
297
|
+
font-size: 13px;
|
|
298
|
+
font-family: var(--font-mono);
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
.cpub-fetch-error-icon {
|
|
302
|
+
font-size: 24px;
|
|
303
|
+
margin-bottom: 12px;
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
.cpub-fetch-error-msg {
|
|
307
|
+
margin-bottom: 12px;
|
|
308
|
+
color: var(--text-dim);
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
.cpub-fetch-error .cpub-btn {
|
|
312
|
+
margin-top: 8px;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
/* ─── DELETE BUTTON ─── */
|
|
316
|
+
.cpub-delete-btn { background: none; border: none; color: var(--text-faint); cursor: pointer; padding: 4px 6px; font-size: 12px; }
|
|
317
|
+
.cpub-delete-btn:hover { color: var(--red); }
|
|
318
|
+
.cpub-delete-btn-sm { font-size: 10px; padding: 2px 4px; }
|
|
319
|
+
|
|
320
|
+
/* ─── DIVIDERS ─── */
|
|
321
|
+
.cpub-divider { border: none; border-top: var(--border-width-default) solid var(--border); }
|
|
322
|
+
}
|