@mohasinac/appkit 3.0.0 → 3.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_internal/client/features/layout/SidebarCollapseToggle.js +1 -5
- package/dist/_internal/server/features/auctions/actions.js +0 -1
- package/dist/_internal/server/features/auctions/og.js +0 -1
- package/dist/_internal/server/features/auctions/service.js +0 -4
- package/dist/_internal/server/features/auth/capabilities.js +0 -1
- package/dist/_internal/server/features/blog/actions.js +0 -2
- package/dist/_internal/server/features/brands/actions.js +0 -2
- package/dist/_internal/server/features/cart/actions.js +0 -3
- package/dist/_internal/server/features/checkout/actions.js +11 -20
- package/dist/_internal/server/features/events/actions.js +0 -3
- package/dist/_internal/server/features/events/og.js +0 -1
- package/dist/_internal/server/features/events/service.js +0 -2
- package/dist/_internal/server/features/grouped/data.js +0 -2
- package/dist/_internal/server/features/orders/actions.js +0 -4
- package/dist/_internal/server/features/pre-orders/actions.js +0 -1
- package/dist/_internal/server/features/pre-orders/og.js +0 -1
- package/dist/_internal/server/features/pre-orders/service.js +0 -1
- package/dist/_internal/server/features/products/actions.js +0 -6
- package/dist/_internal/server/features/products/service.js +0 -1
- package/dist/_internal/server/features/promotions/actions.js +0 -3
- package/dist/_internal/server/features/reviews/actions.js +0 -3
- package/dist/_internal/server/functions/https.js +0 -6
- package/dist/_internal/server/functions/manifest.js +0 -1
- package/dist/_internal/server/jobs/core/cleanupRtdbEvents.js +1 -1
- package/dist/_internal/server/jobs/core/wrapJobHandler.js +0 -1
- package/dist/_internal/shared/listing-types/action-tracker.js +1 -1
- package/dist/_internal/shared/serialization/index.js +0 -4
- package/dist/_internal/shared/styles/themed.js +0 -3
- package/dist/client/api/ApiError.js +1 -4
- package/dist/client/api/surface-error.js +0 -1
- package/dist/client/api/useApiQuery.js +0 -1
- package/dist/configs/next.js +0 -1
- package/dist/configs/tailwind.js +0 -1
- package/dist/contracts/field-ops.js +0 -2
- package/dist/core/EventBus.js +0 -2
- package/dist/core/Logger.js +0 -6
- package/dist/core/Queue.js +0 -2
- package/dist/core/hooks/useSyncManager.js +4 -4
- package/dist/core/mutation-events.js +0 -1
- package/dist/core/newsletter.repository.js +2 -6
- package/dist/errors/api-error.js +0 -1
- package/dist/errors/authentication-error.js +0 -1
- package/dist/errors/authorization-error.js +0 -1
- package/dist/errors/base-error.js +1 -3
- package/dist/errors/database-error.js +0 -1
- package/dist/errors/error-handler.js +1 -5
- package/dist/errors/error-mapping.js +1 -6
- package/dist/errors/normalize.js +0 -4
- package/dist/errors/not-found-error.js +0 -1
- package/dist/errors/razorpay-unreachable.js +0 -1
- package/dist/errors/validation-error.js +0 -1
- package/dist/features/about/components/FAQPageView.js +1 -3
- package/dist/features/about/components/FeesView.js +1 -3
- package/dist/features/about/components/HelpPageView.js +1 -3
- package/dist/features/about/components/PublicProfileView.js +4 -4
- package/dist/features/account/components/AddressBook.js +1 -3
- package/dist/features/account/components/AddressForm.js +0 -1
- package/dist/features/account/components/AddressesIndexListing.js +0 -1
- package/dist/features/account/components/MessagesView.js +1 -3
- package/dist/features/account/components/NotificationBell.js +3 -14
- package/dist/features/account/components/NotificationPreferencesPanel.js +1 -1
- package/dist/features/account/components/UserOffersPanel.js +0 -2
- package/dist/features/account/components/UserSidebar.js +1 -3
- package/dist/features/admin/components/AdminBlogEditorView.js +0 -1
- package/dist/features/admin/components/AdminBundleEditorView.js +0 -1
- package/dist/features/admin/components/AdminBundlesView.js +0 -1
- package/dist/features/admin/components/AdminCarouselEditorView.js +1 -5
- package/dist/features/admin/components/AdminCarouselView.js +1 -4
- package/dist/features/admin/components/AdminCartsView.js +0 -1
- package/dist/features/admin/components/AdminMediaView.js +1 -3
- package/dist/features/admin/components/AdminPayoutsView.js +0 -1
- package/dist/features/admin/components/AdminProductsView.js +1 -3
- package/dist/features/admin/components/AdminSidebar.js +1 -3
- package/dist/features/admin/components/AdminSiteSettingsView.js +1 -5
- package/dist/features/admin/components/AdminSupportTicketDetailView.js +7 -13
- package/dist/features/admin/components/DashboardStats.js +1 -7
- package/dist/features/admin/components/DataListingView.js +1 -5
- package/dist/features/admin/components/DataTable.js +1 -3
- package/dist/features/admin/components/analytics/AdminAnalyticsCharts.js +1 -3
- package/dist/features/admin/components/analytics/AdminStatCard.js +1 -7
- package/dist/features/admin/components/analytics/AdminTopProductsTable.js +1 -3
- package/dist/features/admin/components/sections/adminSectionsBuildParse.js +0 -5
- package/dist/features/admin/hooks/useAdminListingData.js +0 -5
- package/dist/features/admin/hooks/useChat.js +0 -3
- package/dist/features/admin/repository/chat.repository.js +0 -1
- package/dist/features/admin/repository/notification.repository.js +1 -4
- package/dist/features/auctions/components/AuctionBidsTable.js +1 -7
- package/dist/features/auctions/components/AuctionDetailPageView.js +1 -6
- package/dist/features/auctions/components/MarketplaceAuctionCard.js +3 -15
- package/dist/features/auctions/components/PlaceBidFormClient.js +0 -3
- package/dist/features/auctions/repository/bid.repository.js +0 -1
- package/dist/features/auth/components/ForgotPasswordView.js +0 -1
- package/dist/features/auth/components/LoginForm.js +0 -1
- package/dist/features/auth/components/RegisterForm.js +0 -1
- package/dist/features/auth/components/ResetPasswordView.js +0 -1
- package/dist/features/auth/hooks/useAuth.js +0 -1
- package/dist/features/auth/repository/session.repository.js +0 -1
- package/dist/features/auth/repository/token.repository.js +0 -2
- package/dist/features/auth/repository/user.repository.js +0 -1
- package/dist/features/blog/api/[slug]/route.js +1 -1
- package/dist/features/blog/components/BlogFeaturedCard.js +1 -5
- package/dist/features/blog/components/BlogIndexListing.js +0 -1
- package/dist/features/blog/components/BlogListView.js +1 -5
- package/dist/features/blog/components/BlogPostView.js +1 -3
- package/dist/features/cart/components/CartDrawer.js +2 -6
- package/dist/features/cart/repository/cart.repository.js +0 -1
- package/dist/features/categories/api/route.js +0 -1
- package/dist/features/categories/components/BrandDetailPageView.js +1 -13
- package/dist/features/categories/components/BundleDetailView.js +1 -5
- package/dist/features/categories/components/BundleItemsPicker.js +1 -5
- package/dist/features/categories/components/CategoriesIndexListing.js +0 -1
- package/dist/features/categories/components/CategoriesIndexPageView.js +0 -1
- package/dist/features/categories/components/CategoryBundlesListing.js +1 -3
- package/dist/features/categories/components/CategoryDetailPageView.js +1 -16
- package/dist/features/categories/components/CategoryGrid.js +1 -5
- package/dist/features/categories/components/CategorySelectorCreate.js +0 -1
- package/dist/features/categories/components/CategoryTableColumns.js +2 -6
- package/dist/features/categories/components/CategoryTree.js +1 -3
- package/dist/features/categories/components/ConcernCard.js +1 -3
- package/dist/features/collections/components/CollectionCard.js +1 -5
- package/dist/features/contact/email.js +0 -1
- package/dist/features/events/actions/event-actions.js +0 -1
- package/dist/features/events/api/[id]/route.js +0 -1
- package/dist/features/events/components/AdminEventEditorView.js +1 -2
- package/dist/features/events/components/EventCard.js +2 -8
- package/dist/features/events/components/EventRaffleEntryForm.js +1 -3
- package/dist/features/events/components/EventRaffleWinnerView.js +1 -3
- package/dist/features/events/components/EventRafflesSection.js +0 -1
- package/dist/features/events/components/EventsIndexListing.js +0 -1
- package/dist/features/events/hooks/useBulkEvent.js +0 -1
- package/dist/features/events/repository/event-entry.repository.js +0 -1
- package/dist/features/faq/components/ContactCTA.js +1 -3
- package/dist/features/faq/components/FAQAccordion.js +1 -3
- package/dist/features/faq/components/FAQCategorySidebar.js +1 -3
- package/dist/features/faq/components/RelatedFAQs.js +1 -5
- package/dist/features/filters/AsyncFacetSection.js +1 -3
- package/dist/features/filters/FilterFacetSection.js +4 -14
- package/dist/features/forms/Checkbox.js +1 -3
- package/dist/features/forms/Slider.js +1 -3
- package/dist/features/history/hooks/useHistory.js +0 -1
- package/dist/features/history/repository/user-history.repository.js +0 -2
- package/dist/features/homepage/actions/carousel-actions.js +0 -1
- package/dist/features/homepage/actions/homepage-section-actions.js +1 -3
- package/dist/features/homepage/api/carousel/route.js +0 -1
- package/dist/features/homepage/api/route.js +0 -1
- package/dist/features/homepage/components/AdSlot.js +3 -9
- package/dist/features/homepage/components/AdvertisementBanner.js +2 -12
- package/dist/features/homepage/components/BeforeAfterCard.js +1 -5
- package/dist/features/homepage/components/CharacterHotspotForm.js +2 -10
- package/dist/features/homepage/components/CollectionCardsSection.js +1 -3
- package/dist/features/homepage/components/CustomCardsSection.js +1 -5
- package/dist/features/homepage/components/FeaturedResultsSection.js +1 -3
- package/dist/features/homepage/components/GoogleReviewsSection.js +1 -3
- package/dist/features/homepage/components/HeroCarousel.js +5 -26
- package/dist/features/homepage/components/HeroSection.js +2 -6
- package/dist/features/homepage/components/HowItWorksSection.js +2 -8
- package/dist/features/homepage/components/MarketplaceHomepageView.js +0 -8
- package/dist/features/homepage/components/NewsletterBanner.js +2 -10
- package/dist/features/homepage/components/PromoGrid.js +1 -3
- package/dist/features/homepage/components/SecurityHighlightsSection.js +2 -6
- package/dist/features/homepage/components/ShopByCategorySection.js +2 -6
- package/dist/features/homepage/components/SocialPostCard.js +1 -3
- package/dist/features/homepage/components/StatsCounterSection.js +1 -5
- package/dist/features/homepage/components/TrustBadges.js +1 -3
- package/dist/features/homepage/components/TrustFeaturesSection.js +1 -3
- package/dist/features/homepage/components/WelcomeSection.js +2 -16
- package/dist/features/homepage/components/WhatsAppCommunitySection.js +1 -5
- package/dist/features/homepage/lib/social-feed-fetcher.js +0 -8
- package/dist/features/layout/AppLayoutShell.js +1 -3
- package/dist/features/layout/BottomNavbar.js +1 -11
- package/dist/features/media/MediaAudio.js +2 -6
- package/dist/features/media/MediaImage.js +0 -1
- package/dist/features/media/MediaLightbox.js +3 -9
- package/dist/features/media/MediaVideo.js +2 -8
- package/dist/features/media/upload/MediaUploadField.js +1 -3
- package/dist/features/messages/hooks/useConversation.js +0 -2
- package/dist/features/messages/hooks/useConversations.js +0 -1
- package/dist/features/messages/repository/conversations.repository.js +0 -1
- package/dist/features/orders/api/track/[trackingId]/route.js +0 -1
- package/dist/features/orders/components/OrdersList.js +1 -3
- package/dist/features/orders/components/RefundHistoryTable.js +1 -3
- package/dist/features/orders/repository/orders.repository.js +0 -2
- package/dist/features/payments/repository/payout.repository.js +0 -1
- package/dist/features/pre-orders/components/MarketplacePreorderCard.js +2 -6
- package/dist/features/pre-orders/components/PreOrderActionsClient.js +0 -1
- package/dist/features/pre-orders/components/PreOrderBadge.js +1 -3
- package/dist/features/pre-orders/components/PreOrderDetailPageView.js +1 -5
- package/dist/features/products/api/route.js +1 -3
- package/dist/features/products/components/CompareOverlay.js +1 -6
- package/dist/features/products/components/FeatureBadge.js +1 -3
- package/dist/features/products/components/MakeOfferButton.js +0 -2
- package/dist/features/products/components/MarketplaceBundleCard.js +1 -3
- package/dist/features/products/components/MarketplacePrizeDrawCard.js +1 -3
- package/dist/features/products/components/PrizeDrawDetailPageView.js +0 -2
- package/dist/features/products/components/PrizeDrawItemsEditor.js +1 -3
- package/dist/features/products/components/PrizeDrawsSection.js +1 -3
- package/dist/features/products/components/ProductDetailPageView.js +0 -6
- package/dist/features/products/components/ProductFeatureBadges.js +1 -3
- package/dist/features/products/components/ProductFeaturesSelector.js +0 -1
- package/dist/features/products/components/ProductGrid.js +5 -15
- package/dist/features/products/components/ShareButton.js +1 -1
- package/dist/features/products/components/ShowGroupSection.js +3 -7
- package/dist/features/products/components/SublistingCarouselSection.js +2 -4
- package/dist/features/products/repository/product-features.repository.js +0 -1
- package/dist/features/products/repository/products.repository.js +0 -1
- package/dist/features/promotions/components/CouponCard.js +2 -5
- package/dist/features/promotions/repository/coupons.repository.js +0 -1
- package/dist/features/reviews/api/route.js +0 -1
- package/dist/features/reviews/components/ReviewDetailShell.js +3 -13
- package/dist/features/reviews/components/ReviewModal.js +1 -5
- package/dist/features/reviews/components/ReviewSummary.js +2 -6
- package/dist/features/reviews/components/ReviewsIndexListing.js +0 -1
- package/dist/features/reviews/components/ReviewsList.js +1 -7
- package/dist/features/reviews/repository/reviews.repository.js +0 -3
- package/dist/features/scams/actions/scam-actions.js +1 -1
- package/dist/features/scams/components/ScamProfileView.js +1 -3
- package/dist/features/search/components/Search.js +2 -8
- package/dist/features/search/components/SearchFiltersRow.js +1 -3
- package/dist/features/seller/components/PhysicalLocationModal.js +1 -5
- package/dist/features/seller/components/SellerAddressesView.js +1 -6
- package/dist/features/seller/components/SellerAnalyticsAlertsView.js +1 -4
- package/dist/features/seller/components/SellerBidsView.js +1 -3
- package/dist/features/seller/components/SellerBundlesView.js +0 -1
- package/dist/features/seller/components/SellerCouponEditorView.js +1 -3
- package/dist/features/seller/components/SellerFeaturesView.js +0 -1
- package/dist/features/seller/components/SellerGoogleReviewsView.js +1 -1
- package/dist/features/seller/components/SellerLiveView.js +1 -3
- package/dist/features/seller/components/SellerOffersPanel.js +0 -2
- package/dist/features/seller/components/SellerOrdersView.js +1 -6
- package/dist/features/seller/components/SellerPayoutMethodsView.js +0 -1
- package/dist/features/seller/components/SellerPayoutRequestView.js +1 -1
- package/dist/features/seller/components/SellerPayoutSettingsView.js +1 -1
- package/dist/features/seller/components/SellerProductShell.js +2 -4
- package/dist/features/seller/components/SellerProductsCards.js +1 -3
- package/dist/features/seller/components/SellerProductsView.js +1 -7
- package/dist/features/seller/components/SellerReviewsView.js +1 -4
- package/dist/features/seller/components/SellerShippingConfigsView.js +1 -4
- package/dist/features/seller/components/SellerShippingView.js +1 -1
- package/dist/features/seller/components/SellerSidebar.js +4 -12
- package/dist/features/seller/components/SellerStoreCategoriesView.js +0 -2
- package/dist/features/seller/components/SellerTemplatesView.js +0 -1
- package/dist/features/seller/components/analytics/SellerRevenueChart.js +1 -3
- package/dist/features/seller/components/analytics/SellerTopProducts.js +1 -3
- package/dist/features/seller/hooks/useSellerListingData.js +0 -5
- package/dist/features/seller/repository/offer.repository.js +0 -1
- package/dist/features/shell/FormShell.js +2 -15
- package/dist/features/shell/QuickFormDrawer.js +1 -5
- package/dist/features/site-settings/components/NavPermissionsManager.js +1 -3
- package/dist/features/site-settings/components/ThemeManagerView.js +0 -1
- package/dist/features/stores/api/[storeSlug]/reviews/route.js +0 -1
- package/dist/features/stores/components/StoreHeader.js +1 -7
- package/dist/features/stores/components/StoreReviewsListing.js +0 -1
- package/dist/features/stores/components/StoresIndexListing.js +0 -1
- package/dist/features/stores/repository/store.repository.js +0 -2
- package/dist/features/support/repository/support.repository.js +0 -1
- package/dist/features/wishlist/components/WishlistPage.js +1 -3
- package/dist/features/wishlist/hooks/useWishlistCount.js +1 -1
- package/dist/features/wishlist/repository/user-wishlist.repository.js +0 -2
- package/dist/http/ApiClient.js +4 -12
- package/dist/index.js +0 -1
- package/dist/monitoring/client-logger.js +7 -22
- package/dist/monitoring/error-tracking.js +0 -1
- package/dist/monitoring/performance.js +0 -1
- package/dist/monitoring/server-logger.js +11 -33
- package/dist/next/api/api-response.js +1 -4
- package/dist/next/api/apiHandler.js +1 -5
- package/dist/next/api/errorHandler.js +0 -3
- package/dist/next/api/parseJsonBody.js +0 -1
- package/dist/next/api/routeHandler.js +1 -6
- package/dist/next/cache-middleware.js +1 -3
- package/dist/next/middleware/chain.js +0 -1
- package/dist/next/middleware/pii-scrubber.js +0 -2
- package/dist/providers/auth-firebase/provider.js +0 -1
- package/dist/providers/db-firebase/admin.js +0 -1
- package/dist/providers/db-firebase/base.js +0 -4
- package/dist/providers/db-firebase/base.repository.js +0 -3
- package/dist/providers/db-firebase/field-ops.js +0 -2
- package/dist/providers/db-firebase/helpers.js +0 -4
- package/dist/providers/db-firebase/realtime.js +3 -15
- package/dist/providers/db-firebase/sieve.js +2 -8
- package/dist/providers/payment-razorpay/index.js +0 -3
- package/dist/providers/shipping-shiprocket/index.js +0 -1
- package/dist/providers/storage-firebase/client.js +0 -4
- package/dist/react/contexts/SessionContext.js +0 -1
- package/dist/react/hooks/useCountdown.js +0 -1
- package/dist/security/authorization.js +0 -1
- package/dist/security/pii-encrypt.js +0 -4
- package/dist/security/pii-redact.js +0 -3
- package/dist/seed/manifest.js +1 -6
- package/dist/seed/runner.js +0 -2
- package/dist/ui/DataTable.js +2 -6
- package/dist/ui/components/Anchor.js +0 -1
- package/dist/ui/components/AvatarDisplay.js +1 -3
- package/dist/ui/components/BackgroundRenderer.js +2 -6
- package/dist/ui/components/BaseListingCard.js +0 -1
- package/dist/ui/components/Button.js +0 -3
- package/dist/ui/components/Card.js +2 -6
- package/dist/ui/components/Details.js +2 -8
- package/dist/ui/components/Dialog.js +0 -1
- package/dist/ui/components/FallbackShell.js +5 -17
- package/dist/ui/components/Fieldset.js +2 -6
- package/dist/ui/components/HorizontalRule.js +0 -1
- package/dist/ui/components/HotspotMarker.js +1 -3
- package/dist/ui/components/IconBox.js +0 -1
- package/dist/ui/components/Iframe.js +0 -1
- package/dist/ui/components/ImageGallery.js +1 -3
- package/dist/ui/components/ImageLightbox.js +1 -5
- package/dist/ui/components/Kbd.js +0 -1
- package/dist/ui/components/Motion.js +1 -3
- package/dist/ui/components/NavbarChevron.js +0 -1
- package/dist/ui/components/PasswordStrengthIndicator.js +1 -3
- package/dist/ui/components/Progress.js +2 -6
- package/dist/ui/components/Quote.js +1 -4
- package/dist/ui/components/Responsive.js +0 -4
- package/dist/ui/components/RowActionMenu.js +1 -3
- package/dist/ui/components/Scrim.js +0 -1
- package/dist/ui/components/SiteLogo.js +1 -9
- package/dist/ui/components/Skeleton.js +1 -3
- package/dist/ui/components/Slider.js +1 -3
- package/dist/ui/components/StickyToolbar.js +0 -1
- package/dist/ui/components/TabStrip.js +1 -3
- package/dist/ui/components/Toast.js +1 -3
- package/dist/ui/components/Tooltip.js +1 -4
- package/dist/ui/components/UnsavedChangesModal.js +1 -3
- package/dist/ui/rich-text/RichText.js +1 -1
- package/dist/utils/action-response.js +0 -1
- package/dist/utils/date.formatter.js +0 -1
- package/dist/utils/object.helper.js +0 -2
- package/dist/utils/schema-ui.js +1 -3
- package/dist/validation/input.validator.js +0 -1
- package/dist/validation/schemas.js +1 -3
- package/package.json +5 -2
- package/scripts/bundle-css.mjs +47 -0
- package/scripts/copy-assets.mjs +34 -0
- package/scripts/dedupe-peer-deps.mjs +81 -0
|
@@ -121,7 +121,6 @@ export function Button({ variant, size = "md", className = "", isLoading = false
|
|
|
121
121
|
const wrapAsync = useCallback((fn) => (event) => {
|
|
122
122
|
if (!fn)
|
|
123
123
|
return;
|
|
124
|
-
// audit-unknown-ok: ReactElement props — generic component props
|
|
125
124
|
let returned;
|
|
126
125
|
try {
|
|
127
126
|
returned = fn(event);
|
|
@@ -135,7 +134,6 @@ export function Button({ variant, size = "md", className = "", isLoading = false
|
|
|
135
134
|
throw err;
|
|
136
135
|
}
|
|
137
136
|
if (returned && typeof returned.then === "function") {
|
|
138
|
-
// audit-unknown-ok: error-handler entry point — accepts thrown values of any shape
|
|
139
137
|
returned.catch((err) => {
|
|
140
138
|
if (toast) {
|
|
141
139
|
surfaceError(err, { showToast: toast.showToast });
|
|
@@ -162,7 +160,6 @@ export function Button({ variant, size = "md", className = "", isLoading = false
|
|
|
162
160
|
wrapAsync(userOnClick)(event);
|
|
163
161
|
}, [userOnClick, wrapAsync]);
|
|
164
162
|
if (asChild && React.isValidElement(resolvedChildren)) {
|
|
165
|
-
// audit-unknown-ok: ReactElement props — generic component props
|
|
166
163
|
const child = resolvedChildren;
|
|
167
164
|
return React.cloneElement(child, {
|
|
168
165
|
...props,
|
|
@@ -65,13 +65,9 @@ export function Card({ children, variant = "flat", padding = "md", spacing, hove
|
|
|
65
65
|
const whileTap = animate === "pressScale" || animate === "both"
|
|
66
66
|
? { scale: 0.97 }
|
|
67
67
|
: undefined;
|
|
68
|
-
return (_jsx(motion.div, { className: cls,
|
|
69
|
-
// audit-inline-style-ok: pass-through style prop
|
|
70
|
-
style: style, onClick: onClick, whileHover: whileHover, whileTap: whileTap, transition: SPRING_SNAPPY, "data-section": "card-div-463", children: children }));
|
|
68
|
+
return (_jsx(motion.div, { className: cls, style: style, onClick: onClick, whileHover: whileHover, whileTap: whileTap, transition: SPRING_SNAPPY, "data-section": "card-div-463", children: children }));
|
|
71
69
|
}
|
|
72
|
-
return (_jsx("div", { className: cls,
|
|
73
|
-
// audit-inline-style-ok: pass-through style prop
|
|
74
|
-
style: style, onClick: onClick, "data-section": "card-div-463", children: children }));
|
|
70
|
+
return (_jsx("div", { className: cls, style: style, onClick: onClick, "data-section": "card-div-463", children: children }));
|
|
75
71
|
}
|
|
76
72
|
export function CardHeader({ children, className = "" }) {
|
|
77
73
|
return (_jsx("div", { className: ["appkit-card__header", className].filter(Boolean).join(" "), "data-section": "card-div-464", children: children }));
|
|
@@ -15,14 +15,8 @@ export function Details({ children, defaultOpen, open, onToggle, tone = "default
|
|
|
15
15
|
return (_jsx("details", { open: open ?? defaultOpen, onToggle: (event) => {
|
|
16
16
|
if (onToggle)
|
|
17
17
|
onToggle(event.currentTarget.open);
|
|
18
|
-
}, name: name,
|
|
19
|
-
// audit-variant-ok: Details is the catalogued primitive for <details>.
|
|
20
|
-
className: `${TONE_CLS[tone]} ${PADDING_CLS[padding]}${className ? ` ${className}` : ""}`.trim(),
|
|
21
|
-
// audit-inline-style-ok: style is a pass-through prop for the catalogued <details> primitive
|
|
22
|
-
style: style, children: children }));
|
|
18
|
+
}, name: name, className: `${TONE_CLS[tone]} ${PADDING_CLS[padding]}${className ? ` ${className}` : ""}`.trim(), style: style, children: children }));
|
|
23
19
|
}
|
|
24
20
|
export function Summary({ children, className }) {
|
|
25
|
-
return (_jsx("summary", {
|
|
26
|
-
// audit-variant-ok: Summary is the catalogued primitive for <summary>.
|
|
27
|
-
className: `cursor-pointer select-none font-medium text-[var(--appkit-color-text)] list-none [&::-webkit-details-marker]:hidden focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--appkit-color-focus-ring)] rounded${className ? ` ${className}` : ""}`, children: children }));
|
|
21
|
+
return (_jsx("summary", { className: `cursor-pointer select-none font-medium text-[var(--appkit-color-text)] list-none [&::-webkit-details-marker]:hidden focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--appkit-color-focus-ring)] rounded${className ? ` ${className}` : ""}`, children: children }));
|
|
28
22
|
}
|
|
@@ -36,7 +36,6 @@ export function Dialog({ open, onClose, children, padding = "md", nonModal = fal
|
|
|
36
36
|
if (event.target === dialogRef.current)
|
|
37
37
|
onClose();
|
|
38
38
|
},
|
|
39
|
-
// audit-variant-ok: Dialog is the catalogued primitive for <dialog>.
|
|
40
39
|
// padding comes from the typed enum.
|
|
41
40
|
className: `rounded-xl bg-[var(--appkit-color-surface)] text-[var(--appkit-color-text)] shadow-xl border border-[var(--appkit-color-border)] ${PADDING_CLS[padding]} backdrop:bg-black/40 backdrop:backdrop-blur-sm`, children: children }));
|
|
42
41
|
}
|
|
@@ -16,9 +16,7 @@ const TONE_TEXT = {
|
|
|
16
16
|
warning: "var(--appkit-color-warning)",
|
|
17
17
|
};
|
|
18
18
|
export function FallbackShell({ title, description, details, actions, tone = "neutral", }) {
|
|
19
|
-
return (_jsx("div", { role: "alert",
|
|
20
|
-
// audit-inline-style-ok: FallbackShell ships its own critical CSS so it renders before/without Tailwind. Source-of-truth fallback surface.
|
|
21
|
-
style: {
|
|
19
|
+
return (_jsx("div", { role: "alert", style: {
|
|
22
20
|
minHeight: "100vh",
|
|
23
21
|
display: "flex",
|
|
24
22
|
alignItems: "center",
|
|
@@ -28,26 +26,18 @@ export function FallbackShell({ title, description, details, actions, tone = "ne
|
|
|
28
26
|
fontFamily: "ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif",
|
|
29
27
|
color: TONE_TEXT[tone],
|
|
30
28
|
textAlign: "center",
|
|
31
|
-
}, children: _jsxs("div", {
|
|
32
|
-
// audit-inline-style-ok: FallbackShell critical-CSS container — see parent above.
|
|
33
|
-
style: { maxWidth: "32rem", width: "100%" }, children: [_jsx("h1", {
|
|
34
|
-
// audit-inline-style-ok: FallbackShell critical CSS — see container above.
|
|
35
|
-
style: {
|
|
29
|
+
}, children: _jsxs("div", { style: { maxWidth: "32rem", width: "100%" }, children: [_jsx("h1", { style: {
|
|
36
30
|
margin: 0,
|
|
37
31
|
fontSize: "1.875rem",
|
|
38
32
|
lineHeight: 1.15,
|
|
39
33
|
fontWeight: 700,
|
|
40
34
|
color: TONE_TITLE[tone],
|
|
41
35
|
letterSpacing: "-0.02em",
|
|
42
|
-
}, children: title }), description ? (_jsx("p", {
|
|
43
|
-
// audit-inline-style-ok: FallbackShell critical CSS — see container above.
|
|
44
|
-
style: {
|
|
36
|
+
}, children: title }), description ? (_jsx("p", { style: {
|
|
45
37
|
margin: "0.75rem 0 0",
|
|
46
38
|
fontSize: "1rem",
|
|
47
39
|
lineHeight: 1.5,
|
|
48
|
-
}, children: description })) : null, details ? (_jsx("pre", {
|
|
49
|
-
// audit-inline-style-ok: FallbackShell critical CSS — see container above.
|
|
50
|
-
style: {
|
|
40
|
+
}, children: description })) : null, details ? (_jsx("pre", { style: {
|
|
51
41
|
margin: "1.25rem 0 0",
|
|
52
42
|
padding: "0.75rem 1rem",
|
|
53
43
|
fontSize: "0.75rem",
|
|
@@ -59,9 +49,7 @@ export function FallbackShell({ title, description, details, actions, tone = "ne
|
|
|
59
49
|
whiteSpace: "pre-wrap",
|
|
60
50
|
wordBreak: "break-word",
|
|
61
51
|
overflowX: "auto",
|
|
62
|
-
}, children: details })) : null, actions ? (_jsx("div", {
|
|
63
|
-
// audit-inline-style-ok: FallbackShell critical CSS — see container above.
|
|
64
|
-
style: {
|
|
52
|
+
}, children: details })) : null, actions ? (_jsx("div", { style: {
|
|
65
53
|
marginTop: "1.5rem",
|
|
66
54
|
display: "flex",
|
|
67
55
|
flexWrap: "wrap",
|
|
@@ -13,14 +13,10 @@ const PADDING_CLS = {
|
|
|
13
13
|
lg: "p-6",
|
|
14
14
|
};
|
|
15
15
|
export function Fieldset({ children, tone = "default", padding = "md", disabled, form, name, }) {
|
|
16
|
-
return (_jsx("fieldset", { disabled: disabled, form: form, name: name,
|
|
17
|
-
// audit-variant-ok: Fieldset is the catalogued primitive for <fieldset>.
|
|
18
|
-
className: `rounded-lg ${TONE_BORDER[tone]} ${PADDING_CLS[padding]}`, children: children }));
|
|
16
|
+
return (_jsx("fieldset", { disabled: disabled, form: form, name: name, className: `rounded-lg ${TONE_BORDER[tone]} ${PADDING_CLS[padding]}`, children: children }));
|
|
19
17
|
}
|
|
20
18
|
export function Legend({ children, srOnly = false }) {
|
|
21
|
-
return (_jsx("legend", {
|
|
22
|
-
// audit-variant-ok: Legend is the catalogued primitive for <legend>.
|
|
23
|
-
className: srOnly
|
|
19
|
+
return (_jsx("legend", { className: srOnly
|
|
24
20
|
? "sr-only"
|
|
25
21
|
: "px-1 text-sm font-semibold text-[var(--appkit-color-text)]", children: children }));
|
|
26
22
|
}
|
|
@@ -15,7 +15,6 @@ const SPACING_CLS = {
|
|
|
15
15
|
export function HorizontalRule({ tone = "default", spacing = "comfortable", dashed = false, role = "separator", "aria-orientation": ariaOrientation = "horizontal", }) {
|
|
16
16
|
const dashedCls = dashed && tone !== "accent" ? " border-dashed" : "";
|
|
17
17
|
return (_jsx("hr", { role: role, "aria-orientation": ariaOrientation,
|
|
18
|
-
// audit-variant-ok: HorizontalRule is the catalogued primitive for <hr>.
|
|
19
18
|
// tone + spacing + dashed come from typed enums.
|
|
20
19
|
className: `${TONE_CLS[tone]}${dashedCls} ${SPACING_CLS[spacing]}` }));
|
|
21
20
|
}
|
|
@@ -55,9 +55,7 @@ function buildShapeStyle(shape, sizePx) {
|
|
|
55
55
|
export function HotspotMarker({ xPct, yPct, size = "md", tone = "brand", shape = "dot", children, onClick, positionMode = "absolute", ...rest }) {
|
|
56
56
|
const sizePx = SIZE_PX[size];
|
|
57
57
|
const baseTransform = shape === "pin" ? undefined : "translate(-50%, -50%)";
|
|
58
|
-
return (_jsx("button", { type: "button", onClick: onClick, "aria-label": rest["aria-label"], "data-shape": shape, "data-tone": tone,
|
|
59
|
-
// audit-inline-style-ok: HotspotMarker is the catalogued primitive for dynamic xPct/yPct positioning. Consumer code uses this primitive instead of authoring its own `style={{ left, top }}`.
|
|
60
|
-
style: {
|
|
58
|
+
return (_jsx("button", { type: "button", onClick: onClick, "aria-label": rest["aria-label"], "data-shape": shape, "data-tone": tone, style: {
|
|
61
59
|
position: positionMode,
|
|
62
60
|
left: `${clampPct(xPct)}%`,
|
|
63
61
|
top: `${clampPct(yPct)}%`,
|
|
@@ -26,7 +26,6 @@ const TONE_CLS = {
|
|
|
26
26
|
export function IconBox({ children, size = "md", tone = "brand", rounded = "xl", as = "div", ...rest }) {
|
|
27
27
|
const Tag = as;
|
|
28
28
|
return (_jsx(Tag, { "aria-label": rest["aria-label"],
|
|
29
|
-
// audit-variant-ok: IconBox is the catalogued primitive for the
|
|
30
29
|
// square-icon-container pattern. size + tone + rounded come from typed enums.
|
|
31
30
|
className: `inline-flex flex-shrink-0 items-center justify-center ${SIZE_CLS[size]} ${ROUNDED_CLS[rounded]} ${TONE_CLS[tone]}`, children: children }));
|
|
32
31
|
}
|
|
@@ -15,7 +15,6 @@ const ROUNDED_CLS = {
|
|
|
15
15
|
};
|
|
16
16
|
export function Iframe({ src, title, aspect = "video", rounded = "lg", sandbox = "allow-same-origin allow-scripts allow-popups allow-forms", loading = "lazy", ...rest }) {
|
|
17
17
|
return (_jsx("iframe", { src: src, title: title, loading: loading, sandbox: sandbox,
|
|
18
|
-
// audit-variant-ok: Iframe is the catalogued primitive for embedded
|
|
19
18
|
// third-party content. Aspect + rounded come from typed enums.
|
|
20
19
|
className: `block w-full border-0 ${ASPECT_CLS[aspect]} ${ROUNDED_CLS[rounded]}`, ...rest }));
|
|
21
20
|
}
|
|
@@ -99,9 +99,7 @@ export default function ImageGallery({ images, initialIndex = 0, showThumbnails
|
|
|
99
99
|
if (images.length === 0) {
|
|
100
100
|
return (_jsx("div", { className: `appkit-image-gallery ${flex.center} p-8 ${themed.bgTertiary} rounded-lg ${className}`, "data-section": "imagegallery-div-515", children: _jsx(Text, { className: themed.textMuted, children: "No images to display" }) }));
|
|
101
101
|
}
|
|
102
|
-
return (_jsxs("div", { className: `appkit-image-gallery ${className}`, "data-section": "imagegallery-div-516", children: [_jsxs("div", { ref: imageContainerRef, className: `appkit-image-gallery__viewport ${themed.bgSecondary}`, "data-section": "imagegallery-div-517", children: [_jsxs("div", { className: "appkit-image-gallery__image-frame", "data-section": "imagegallery-div-518", children: [_jsx("div", { role: "img", "aria-label": currentImage.alt, className: "appkit-image-gallery__image",
|
|
103
|
-
// audit-inline-style-ok: dynamic CSS
|
|
104
|
-
style: {
|
|
102
|
+
return (_jsxs("div", { className: `appkit-image-gallery ${className}`, "data-section": "imagegallery-div-516", children: [_jsxs("div", { ref: imageContainerRef, className: `appkit-image-gallery__viewport ${themed.bgSecondary}`, "data-section": "imagegallery-div-517", children: [_jsxs("div", { className: "appkit-image-gallery__image-frame", "data-section": "imagegallery-div-518", children: [_jsx("div", { role: "img", "aria-label": currentImage.alt, className: "appkit-image-gallery__image", style: {
|
|
105
103
|
backgroundImage: `url(${currentImage.src})`,
|
|
106
104
|
transform: `scale(${scale})`,
|
|
107
105
|
cursor: allowZoom
|
|
@@ -89,11 +89,7 @@ export function ImageLightbox({ images, activeIndex, onClose, onNavigate, showTh
|
|
|
89
89
|
const image = images[currentIndex];
|
|
90
90
|
const hasMultiple = images.length > 1;
|
|
91
91
|
const iconBtnClass = "w-10 h-10 p-0 !min-h-0 rounded-full bg-white/15 hover:bg-white/30 text-white flex items-center justify-center";
|
|
92
|
-
return createPortal(_jsxs("div", { ref: overlayRef, tabIndex: -1, className: "appkit-lightbox", role: "dialog", "aria-modal": "true", "aria-label": "Image lightbox", onKeyDown: handleKeyDown, onWheel: handleWheel, children: [_jsxs("div", { className: "absolute top-0 left-0 right-0 z-10 flex items-center justify-between px-4 py-3 bg-gradient-to-b from-black/60 to-transparent", children: [_jsx(Span, { size: "sm", weight: "medium", className: "text-white/70", children: hasMultiple ? `${currentIndex + 1} / ${images.length}` : "" }), _jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Button, { variant: "ghost", size: "sm", type: "button", onClick: () => adjustZoom(-ZOOM_STEP), className: iconBtnClass, "aria-label": "Zoom out", disabled: zoom <= MIN_ZOOM, children: _jsx(ZoomOut, { className: "w-4 h-4" }) }), _jsxs("button", { type: "button", onClick: () => { setZoom(100); setRotation(0); }, className: "text-white/70 hover:text-white text-xs font-mono min-w-[3rem] text-center", "aria-label": "Reset zoom", children: [zoom, "%"] }), _jsx(Button, { variant: "ghost", size: "sm", type: "button", onClick: () => adjustZoom(ZOOM_STEP), className: iconBtnClass, "aria-label": "Zoom in", disabled: zoom >= MAX_ZOOM, children: _jsx(ZoomIn, { className: "w-4 h-4" }) }), _jsx(Button, { variant: "ghost", size: "sm", type: "button", onClick: () => setRotation((r) => (r + 90) % 360), className: iconBtnClass, "aria-label": "Rotate 90\u00B0", children: _jsx(RotateCw, { className: "w-4 h-4" }) }), _jsx(Button, { variant: "ghost", size: "sm", type: "button", onClick: () => { setZoom(100); setRotation(0); }, className: iconBtnClass, "aria-label": "Reset", children: _jsx(Maximize2, { className: "w-4 h-4" }) }), _jsx(Button, { variant: "ghost", size: "sm", type: "button", onClick: onClose, className: CLS_CLOSE_BTN, "aria-label": "Close lightbox", children: _jsx(X, { className: "w-5 h-5" }) })] })] }), hasMultiple && (_jsx(Button, { variant: "ghost", size: "sm", type: "button", onClick: () => navigate(-1), className: "absolute left-4 top-1/2 -translate-y-1/2 w-12 h-12 p-0 !min-h-0 rounded-full bg-white/15 hover:bg-white/30 text-white z-10 flex items-center justify-center", "aria-label": "Previous image", children: _jsx(ChevronLeft, { className: "w-7 h-7" }) })), _jsxs("div", { className: "appkit-lightbox__image-wrap",
|
|
93
|
-
// audit-inline-style-ok: dynamic CSS
|
|
94
|
-
style: { cursor: zoom > 100 ? "grab" : "default" }, children: [_jsx("img", { src: image.src, alt: image.alt ?? "", className: "appkit-lightbox__img", draggable: false,
|
|
95
|
-
// audit-inline-style-ok: dynamic CSS
|
|
96
|
-
style: {
|
|
92
|
+
return createPortal(_jsxs("div", { ref: overlayRef, tabIndex: -1, className: "appkit-lightbox", role: "dialog", "aria-modal": "true", "aria-label": "Image lightbox", onKeyDown: handleKeyDown, onWheel: handleWheel, children: [_jsxs("div", { className: "absolute top-0 left-0 right-0 z-10 flex items-center justify-between px-4 py-3 bg-gradient-to-b from-black/60 to-transparent", children: [_jsx(Span, { size: "sm", weight: "medium", className: "text-white/70", children: hasMultiple ? `${currentIndex + 1} / ${images.length}` : "" }), _jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Button, { variant: "ghost", size: "sm", type: "button", onClick: () => adjustZoom(-ZOOM_STEP), className: iconBtnClass, "aria-label": "Zoom out", disabled: zoom <= MIN_ZOOM, children: _jsx(ZoomOut, { className: "w-4 h-4" }) }), _jsxs("button", { type: "button", onClick: () => { setZoom(100); setRotation(0); }, className: "text-white/70 hover:text-white text-xs font-mono min-w-[3rem] text-center", "aria-label": "Reset zoom", children: [zoom, "%"] }), _jsx(Button, { variant: "ghost", size: "sm", type: "button", onClick: () => adjustZoom(ZOOM_STEP), className: iconBtnClass, "aria-label": "Zoom in", disabled: zoom >= MAX_ZOOM, children: _jsx(ZoomIn, { className: "w-4 h-4" }) }), _jsx(Button, { variant: "ghost", size: "sm", type: "button", onClick: () => setRotation((r) => (r + 90) % 360), className: iconBtnClass, "aria-label": "Rotate 90\u00B0", children: _jsx(RotateCw, { className: "w-4 h-4" }) }), _jsx(Button, { variant: "ghost", size: "sm", type: "button", onClick: () => { setZoom(100); setRotation(0); }, className: iconBtnClass, "aria-label": "Reset", children: _jsx(Maximize2, { className: "w-4 h-4" }) }), _jsx(Button, { variant: "ghost", size: "sm", type: "button", onClick: onClose, className: CLS_CLOSE_BTN, "aria-label": "Close lightbox", children: _jsx(X, { className: "w-5 h-5" }) })] })] }), hasMultiple && (_jsx(Button, { variant: "ghost", size: "sm", type: "button", onClick: () => navigate(-1), className: "absolute left-4 top-1/2 -translate-y-1/2 w-12 h-12 p-0 !min-h-0 rounded-full bg-white/15 hover:bg-white/30 text-white z-10 flex items-center justify-center", "aria-label": "Previous image", children: _jsx(ChevronLeft, { className: "w-7 h-7" }) })), _jsxs("div", { className: "appkit-lightbox__image-wrap", style: { cursor: zoom > 100 ? "grab" : "default" }, children: [_jsx("img", { src: image.src, alt: image.alt ?? "", className: "appkit-lightbox__img", draggable: false, style: {
|
|
97
93
|
transform: `scale(${zoom / 100}) rotate(${rotation}deg)`,
|
|
98
94
|
transition: "transform 0.2s ease",
|
|
99
95
|
} }), image.badge && (_jsx(Div, { className: "absolute left-3 top-3 rounded bg-black/70 px-2 py-1 text-xs font-semibold text-white pointer-events-none", children: image.badge }))] }), (image.caption || image.sub) && (_jsxs("div", { className: "flex-shrink-0 text-center px-8 pb-2", children: [image.caption && (_jsx(Text, { size: "sm", variant: "secondary", className: "!text-white/80", children: image.caption })), image.sub && (_jsx(Text, { size: "sm", variant: "secondary", className: "!text-white/50", children: image.sub }))] })), showThumbnails && images.length > 1 && (_jsx("div", { className: "flex-shrink-0 flex gap-2 overflow-x-auto px-4 pb-3 justify-center", children: images.map((thumb, i) => (_jsx("button", { type: "button", onClick: () => {
|
|
@@ -11,7 +11,6 @@ const TONE_CLS = {
|
|
|
11
11
|
};
|
|
12
12
|
export function Kbd({ children, size = "sm", tone = "default" }) {
|
|
13
13
|
return (_jsx("kbd", {
|
|
14
|
-
// audit-variant-ok: Kbd is the catalogued primitive for <kbd>.
|
|
15
14
|
// size + tone come from typed enums.
|
|
16
15
|
className: `inline-flex items-center font-mono font-semibold border shadow-sm ${SIZE_CLS[size]} ${TONE_CLS[tone]}`, children: children }));
|
|
17
16
|
}
|
|
@@ -6,9 +6,7 @@ import { MOTION_PRESETS, SPRING_SNAPPY, EASE_OUT } from "../../tokens/motion";
|
|
|
6
6
|
// Re-export AnimatePresence for consumer convenience
|
|
7
7
|
export const AnimatePresence = MotionAnimatePresence;
|
|
8
8
|
// ── Reduced motion helper ────────────────────────────────────────────────────
|
|
9
|
-
function useMotionProps(
|
|
10
|
-
// audit-unknown-ok: Motion props passthrough — framer-motion props arbitrary
|
|
11
|
-
props) {
|
|
9
|
+
function useMotionProps(props) {
|
|
12
10
|
const reduced = useReducedMotion();
|
|
13
11
|
if (!reduced)
|
|
14
12
|
return props;
|
|
@@ -5,7 +5,6 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
5
5
|
* fade so the chevron icon stays legible over scrolling content underneath.
|
|
6
6
|
*/
|
|
7
7
|
import { ChevronLeft, ChevronRight } from "lucide-react";
|
|
8
|
-
// audit-variant-ok: NavbarChevron is the catalogued primitive for the
|
|
9
8
|
// navbar's overflow-scroll fade — the gradient classes implement the
|
|
10
9
|
// edge-fade affordance, not consumer styling.
|
|
11
10
|
const BASE_CLS = "absolute top-0 bottom-0 z-10 flex items-center justify-center w-8 text-zinc-500 dark:text-zinc-400 hover:text-zinc-900 dark:hover:text-white transition-colors";
|
|
@@ -30,7 +30,5 @@ export function PasswordStrengthIndicator({ password, minLength = 8, showRequire
|
|
|
30
30
|
: strength <= 75
|
|
31
31
|
? "bg-warning-surface"
|
|
32
32
|
: "bg-success-surface";
|
|
33
|
-
return (_jsxs("div", { className: "appkit-password-strength", "aria-live": "polite", "aria-atomic": "true", "data-section": "passwordstrengthindicator-div-567", children: [_jsxs(Row, { gap: "sm", className: "mb-2", children: [_jsx("div", { className: "appkit-password-strength__track", "data-section": "passwordstrengthindicator-div-568", children: _jsx("div", { className: `appkit-password-strength__fill ${strengthColor}`,
|
|
34
|
-
// audit-inline-style-ok: computed percentage
|
|
35
|
-
style: { width: `${strength}%` }, role: "progressbar", "aria-valuenow": Math.round(strength), "aria-valuemin": 0, "aria-valuemax": 100, "aria-label": `Password strength: ${strengthLabel}` }) }), _jsx(Span, { className: "appkit-password-strength__label", children: strengthLabel })] }), showRequirements ? (_jsx(Ul, { className: "appkit-password-strength__requirements", children: requirements.map((req) => (_jsxs(Li, { className: `appkit-password-strength__requirement ${req.met ? "appkit-password-strength__requirement--met" : ""}`, children: [_jsx(Span, { className: "sr-only", children: req.met ? "Met: " : "Not met: " }), req.label] }, req.label))) })) : null] }));
|
|
33
|
+
return (_jsxs("div", { className: "appkit-password-strength", "aria-live": "polite", "aria-atomic": "true", "data-section": "passwordstrengthindicator-div-567", children: [_jsxs(Row, { gap: "sm", className: "mb-2", children: [_jsx("div", { className: "appkit-password-strength__track", "data-section": "passwordstrengthindicator-div-568", children: _jsx("div", { className: `appkit-password-strength__fill ${strengthColor}`, style: { width: `${strength}%` }, role: "progressbar", "aria-valuenow": Math.round(strength), "aria-valuemin": 0, "aria-valuemax": 100, "aria-label": `Password strength: ${strengthLabel}` }) }), _jsx(Span, { className: "appkit-password-strength__label", children: strengthLabel })] }), showRequirements ? (_jsx(Ul, { className: "appkit-password-strength__requirements", children: requirements.map((req) => (_jsxs(Li, { className: `appkit-password-strength__requirement ${req.met ? "appkit-password-strength__requirement--met" : ""}`, children: [_jsx(Span, { className: "sr-only", children: req.met ? "Met: " : "Not met: " }), req.label] }, req.label))) })) : null] }));
|
|
36
34
|
}
|
|
@@ -13,9 +13,7 @@ export function Progress({ value, max = 100, variant = "primary", size = "md", l
|
|
|
13
13
|
warning: "appkit-progress__bar--warning",
|
|
14
14
|
error: "appkit-progress__bar--error",
|
|
15
15
|
};
|
|
16
|
-
return (_jsxs("div", { className: `appkit-progress ${className}`, "data-section": "progress-div-569", children: [(label || showValue) && (_jsxs("div", { className: "appkit-progress__meta", "data-section": "progress-div-570", children: [label && _jsx(Span, { className: "appkit-progress__label", children: label }), showValue && (_jsxs(Span, { className: "appkit-progress__value", children: [Math.round(percentage), "%"] }))] })), _jsx("div", { className: `appkit-progress__track ${sizeClasses[size]}`, role: "progressbar", "aria-valuenow": value, "aria-valuemin": 0, "aria-valuemax": max, "aria-label": label || `Progress: ${Math.round(percentage)}%`, "data-section": "progress-div-571", children: _jsx("div", { className: `appkit-progress__bar ${variantClasses[variant]}`,
|
|
17
|
-
// audit-inline-style-ok: computed percentage
|
|
18
|
-
style: { width: `${percentage}%` } }) })] }));
|
|
16
|
+
return (_jsxs("div", { className: `appkit-progress ${className}`, "data-section": "progress-div-569", children: [(label || showValue) && (_jsxs("div", { className: "appkit-progress__meta", "data-section": "progress-div-570", children: [label && _jsx(Span, { className: "appkit-progress__label", children: label }), showValue && (_jsxs(Span, { className: "appkit-progress__value", children: [Math.round(percentage), "%"] }))] })), _jsx("div", { className: `appkit-progress__track ${sizeClasses[size]}`, role: "progressbar", "aria-valuenow": value, "aria-valuemin": 0, "aria-valuemax": max, "aria-label": label || `Progress: ${Math.round(percentage)}%`, "data-section": "progress-div-571", children: _jsx("div", { className: `appkit-progress__bar ${variantClasses[variant]}`, style: { width: `${percentage}%` } }) })] }));
|
|
19
17
|
}
|
|
20
18
|
export function IndeterminateProgress({ variant = "primary", size = "md", label, className = "", }) {
|
|
21
19
|
const sizeClasses = {
|
|
@@ -29,7 +27,5 @@ export function IndeterminateProgress({ variant = "primary", size = "md", label,
|
|
|
29
27
|
warning: "appkit-progress__bar--warning",
|
|
30
28
|
error: "appkit-progress__bar--error",
|
|
31
29
|
};
|
|
32
|
-
return (_jsxs("div", { className: `appkit-progress ${className}`, "data-section": "progress-div-572", children: [label && (_jsx(Span, { className: "appkit-progress__label appkit-progress__label--block", children: label })), _jsx("div", { className: `appkit-progress__track appkit-progress__track--indeterminate ${sizeClasses[size]}`, role: "progressbar", "aria-label": label || "Loading...", "data-section": "progress-div-573", children: _jsx("div", { className: `appkit-progress__bar appkit-progress__bar--indeterminate ${variantClasses[variant]}`,
|
|
33
|
-
// audit-inline-style-ok: dynamic CSS
|
|
34
|
-
style: { width: "40%" } }) })] }));
|
|
30
|
+
return (_jsxs("div", { className: `appkit-progress ${className}`, "data-section": "progress-div-572", children: [label && (_jsx(Span, { className: "appkit-progress__label appkit-progress__label--block", children: label })), _jsx("div", { className: `appkit-progress__track appkit-progress__track--indeterminate ${sizeClasses[size]}`, role: "progressbar", "aria-label": label || "Loading...", "data-section": "progress-div-573", children: _jsx("div", { className: `appkit-progress__bar appkit-progress__bar--indeterminate ${variantClasses[variant]}`, style: { width: "40%" } }) })] }));
|
|
35
31
|
}
|
|
@@ -8,11 +8,8 @@ const TONE_CLS = {
|
|
|
8
8
|
export function Quote({ children, cite, tone = "default", block = false }) {
|
|
9
9
|
if (block) {
|
|
10
10
|
return (_jsx("blockquote", { cite: cite,
|
|
11
|
-
// audit-variant-ok: Quote(block) is the catalogued primitive for
|
|
12
11
|
// <blockquote>. tone comes from typed enum.
|
|
13
12
|
className: `border-l-4 border-[var(--appkit-color-border)] pl-4 italic ${TONE_CLS[tone]}`, children: children }));
|
|
14
13
|
}
|
|
15
|
-
return (_jsx("q", { cite: cite,
|
|
16
|
-
// audit-variant-ok: Quote is the catalogued primitive for <q>.
|
|
17
|
-
className: TONE_CLS[tone], children: children }));
|
|
14
|
+
return (_jsx("q", { cite: cite, className: TONE_CLS[tone], children: children }));
|
|
18
15
|
}
|
|
@@ -60,20 +60,16 @@ function buildHideClass(above, below, inline) {
|
|
|
60
60
|
export function Show({ children, above, below, inline = false }) {
|
|
61
61
|
const Tag = inline ? "span" : "div";
|
|
62
62
|
return (_jsx(Tag
|
|
63
|
-
// audit-variant-ok: Show is the catalogued primitive for responsive
|
|
64
63
|
// conditional render. above/below come from typed enums.
|
|
65
64
|
, {
|
|
66
|
-
// audit-variant-ok: Show is the catalogued primitive for responsive
|
|
67
65
|
// conditional render. above/below come from typed enums.
|
|
68
66
|
className: buildShowClass(above, below, inline), children: children }));
|
|
69
67
|
}
|
|
70
68
|
export function Hide({ children, above, below, inline = false }) {
|
|
71
69
|
const Tag = inline ? "span" : "div";
|
|
72
70
|
return (_jsx(Tag
|
|
73
|
-
// audit-variant-ok: Hide is the catalogued primitive for responsive
|
|
74
71
|
// conditional render. above/below come from typed enums.
|
|
75
72
|
, {
|
|
76
|
-
// audit-variant-ok: Hide is the catalogued primitive for responsive
|
|
77
73
|
// conditional render. above/below come from typed enums.
|
|
78
74
|
className: buildHideClass(above, below, inline), children: children }));
|
|
79
75
|
}
|
|
@@ -38,9 +38,7 @@ export function RowActionMenu({ actions, align = "right", }) {
|
|
|
38
38
|
setOpen((v) => !v);
|
|
39
39
|
}, [open, align]);
|
|
40
40
|
const dropdown = open && pos && mounted
|
|
41
|
-
? createPortal(_jsx("div", { ref: dropdownRef, role: "menu", className: "appkit-row-action-menu__dropdown",
|
|
42
|
-
// audit-inline-style-ok: dynamic CSS
|
|
43
|
-
style: {
|
|
41
|
+
? createPortal(_jsx("div", { ref: dropdownRef, role: "menu", className: "appkit-row-action-menu__dropdown", style: {
|
|
44
42
|
position: "fixed",
|
|
45
43
|
zIndex: "var(--appkit-z-modal)",
|
|
46
44
|
top: pos.top,
|
|
@@ -12,7 +12,6 @@ const INTENSITY_CLS = {
|
|
|
12
12
|
strong: "from-black/80 via-black/30 to-transparent",
|
|
13
13
|
};
|
|
14
14
|
export function Scrim({ direction = "bottom-up", intensity = "medium", multiply = false, className = "", }) {
|
|
15
|
-
// audit-variant-ok: Scrim is the catalogued primitive for dark fade overlays.
|
|
16
15
|
// direction + intensity come from typed enums; the gradient classes are the
|
|
17
16
|
// primitive's internal CSS, not consumer-authored utilities.
|
|
18
17
|
return (_jsx("div", { "aria-hidden": "true", className: [
|
|
@@ -35,20 +35,12 @@ export function SiteLogo({ size = "md", tone = "brand", title = "LetItRip.in", s
|
|
|
35
35
|
const heightCls = SIZE_HEIGHTS[size];
|
|
36
36
|
if (src) {
|
|
37
37
|
return (_jsx(MediaImage, { src: src, alt: title, size: "thumbnail", objectFit: "contain",
|
|
38
|
-
// audit-variant-ok: SiteLogo uses a fixed-height responsive class set
|
|
39
38
|
// backed by the catalogued `size` enum; no consumer-provided overrides.
|
|
40
39
|
className: `block w-auto ${heightCls}` }));
|
|
41
40
|
}
|
|
42
41
|
const fill = resolveFill(tone);
|
|
43
42
|
const isGradient = tone === "brand";
|
|
44
43
|
return (_jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 214 56", role: "img", "aria-label": title, "data-testid": "site-logo",
|
|
45
|
-
// audit-variant-ok: SiteLogo uses a fixed-height responsive class set
|
|
46
44
|
// backed by the catalogued `size` enum; no consumer-provided overrides.
|
|
47
|
-
className: `block w-auto ${heightCls}`, children: [_jsx("title", { children: title }), isGradient && (_jsx("defs", { children: _jsxs("linearGradient", { id: GRADIENT_ID, x1: "0%", y1: "0%", x2: "100%", y2: "0%", children: [_jsx("stop", { offset: "0%",
|
|
48
|
-
// audit-inline-style-ok: SVG gradient stop must be inline
|
|
49
|
-
style: { stopColor: "var(--appkit-color-primary-700)" } }), _jsx("stop", { offset: "55%",
|
|
50
|
-
// audit-inline-style-ok: SVG gradient stop must be inline
|
|
51
|
-
style: { stopColor: "var(--appkit-color-primary-500)" } }), _jsx("stop", { offset: "100%",
|
|
52
|
-
// audit-inline-style-ok: SVG gradient stop must be inline
|
|
53
|
-
style: { stopColor: "var(--appkit-color-secondary-400)" } })] }) })), _jsx("text", { x: "0", y: "44", fontFamily: "ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif", fontWeight: "800", fontSize: "44", letterSpacing: "-1.5", fill: fill, children: "LetItRip" }), _jsx("rect", { x: "169", y: "5", width: "43", height: "21", rx: "10.5", fill: fill, opacity: "0.12" }), _jsx("text", { x: "174", y: "21", fontFamily: "ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif", fontWeight: "700", fontSize: "15", letterSpacing: "0.2", fill: fill, children: ".in" })] }));
|
|
45
|
+
className: `block w-auto ${heightCls}`, children: [_jsx("title", { children: title }), isGradient && (_jsx("defs", { children: _jsxs("linearGradient", { id: GRADIENT_ID, x1: "0%", y1: "0%", x2: "100%", y2: "0%", children: [_jsx("stop", { offset: "0%", style: { stopColor: "var(--appkit-color-primary-700)" } }), _jsx("stop", { offset: "55%", style: { stopColor: "var(--appkit-color-primary-500)" } }), _jsx("stop", { offset: "100%", style: { stopColor: "var(--appkit-color-secondary-400)" } })] }) })), _jsx("text", { x: "0", y: "44", fontFamily: "ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif", fontWeight: "800", fontSize: "44", letterSpacing: "-1.5", fill: fill, children: "LetItRip" }), _jsx("rect", { x: "169", y: "5", width: "43", height: "21", rx: "10.5", fill: fill, opacity: "0.12" }), _jsx("text", { x: "174", y: "21", fontFamily: "ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif", fontWeight: "700", fontSize: "15", letterSpacing: "0.2", fill: fill, children: ".in" })] }));
|
|
54
46
|
}
|
|
@@ -17,7 +17,5 @@ export function Skeleton({ variant = "text", width, height, className = "", anim
|
|
|
17
17
|
width: width ?? defaultSize.width,
|
|
18
18
|
height: height ?? defaultSize.height,
|
|
19
19
|
};
|
|
20
|
-
return (_jsx("div", { className: `appkit-skeleton ${variantClass} ${animationClass} ${className}`,
|
|
21
|
-
// audit-inline-style-ok: pass-through style prop
|
|
22
|
-
style: style, role: "status", "aria-label": "Loading", "data-section": "skeleton-div-606", children: _jsx("span", { className: "appkit-sr-only", children: "Loading..." }) }));
|
|
20
|
+
return (_jsx("div", { className: `appkit-skeleton ${variantClass} ${animationClass} ${className}`, style: style, role: "status", "aria-label": "Loading", "data-section": "skeleton-div-606", children: _jsx("span", { className: "appkit-sr-only", children: "Loading..." }) }));
|
|
23
21
|
}
|
|
@@ -30,9 +30,7 @@ export function Slider({ value: controlledValue, defaultValue = 0, min = 0, max
|
|
|
30
30
|
].join(" "), "data-section": "slider-div-610", children: _jsx("div", { className: [
|
|
31
31
|
"h-full rounded-full bg-lime-600 dark:bg-pink-500",
|
|
32
32
|
SIZE_CLASSES[size],
|
|
33
|
-
].join(" "),
|
|
34
|
-
// audit-inline-style-ok: computed percentage
|
|
35
|
-
style: { width: `${Math.max(0, Math.min(100, percentage))}%` } }) }), _jsx("input", { id: inputId, type: "range", min: min, max: max, step: step, value: value, disabled: disabled, onChange: handleChange, onMouseUp: handleChangeEnd, onTouchEnd: handleChangeEnd, className: [
|
|
33
|
+
].join(" "), style: { width: `${Math.max(0, Math.min(100, percentage))}%` } }) }), _jsx("input", { id: inputId, type: "range", min: min, max: max, step: step, value: value, disabled: disabled, onChange: handleChange, onMouseUp: handleChangeEnd, onTouchEnd: handleChangeEnd, className: [
|
|
36
34
|
"appkit-slider relative z-10 bg-transparent",
|
|
37
35
|
disabled ? "appkit-slider--disabled" : "cursor-pointer",
|
|
38
36
|
SIZE_CLASSES[size],
|
|
@@ -27,7 +27,6 @@ export function StickyToolbar({ children, offset = "header", tone = "translucent
|
|
|
27
27
|
const borderCls = border ? "border-b border-[var(--appkit-color-border)]" : "";
|
|
28
28
|
const zCls = z === "above-content" ? "z-10" : "z-[5]";
|
|
29
29
|
return (_jsx("div", { role: role,
|
|
30
|
-
// audit-sticky-offset-ok: StickyToolbar is the catalogued primitive
|
|
31
30
|
// for the translucent sticky-toolbar pattern. The header offset is
|
|
32
31
|
// sourced from --header-height (set by AppLayoutShell at runtime).
|
|
33
32
|
className: `sticky ${offsetCls} ${zCls} ${TONE_CLS[tone]} ${borderCls} ${PADDING_CLS[padding]}`, children: children }));
|
|
@@ -42,9 +42,7 @@ export function TabStrip({ tabs, activeKey, onChange, minTabWidth = FLUID_GRID_M
|
|
|
42
42
|
}
|
|
43
43
|
}, [activeKey, scrollOffset, visibleCount, tabs, setScrollOffset]);
|
|
44
44
|
const visible = tabs.slice(scrollOffset, scrollOffset + visibleCount);
|
|
45
|
-
return (_jsxs("div", { ref: containerRef, role: "tablist", className: ["appkit-tab-strip", className ?? ""].join(" ").trim(), children: [hasOverflow && (_jsx("button", { type: "button", onClick: scrollLeft, disabled: !canScrollLeft, "aria-label": "Previous tabs", className: "appkit-tab-strip__arrow", children: "\u2039" })), visible.map((tab) => (_jsxs("button", { type: "button", role: "tab", "aria-selected": tab.key === activeKey, "aria-disabled": tab.disabled, onClick: () => !tab.disabled && onChange(tab.key),
|
|
46
|
-
// audit-inline-style-ok: computed pixel offset
|
|
47
|
-
style: { minWidth: `${minTabWidth}px` }, className: [
|
|
45
|
+
return (_jsxs("div", { ref: containerRef, role: "tablist", className: ["appkit-tab-strip", className ?? ""].join(" ").trim(), children: [hasOverflow && (_jsx("button", { type: "button", onClick: scrollLeft, disabled: !canScrollLeft, "aria-label": "Previous tabs", className: "appkit-tab-strip__arrow", children: "\u2039" })), visible.map((tab) => (_jsxs("button", { type: "button", role: "tab", "aria-selected": tab.key === activeKey, "aria-disabled": tab.disabled, onClick: () => !tab.disabled && onChange(tab.key), style: { minWidth: `${minTabWidth}px` }, className: [
|
|
48
46
|
"appkit-tab-strip__tab",
|
|
49
47
|
tab.key === activeKey
|
|
50
48
|
? "appkit-tab-strip__tab--active"
|
|
@@ -79,9 +79,7 @@ function ToastRow({ toast, onClose, }) {
|
|
|
79
79
|
error: _jsx("span", { "aria-hidden": "true", children: "!" }),
|
|
80
80
|
warning: _jsx("span", { "aria-hidden": "true", children: "!" }),
|
|
81
81
|
info: _jsx("span", { "aria-hidden": "true", children: "i" }),
|
|
82
|
-
loading: (_jsx("span", { "aria-hidden": "true", className: "inline-block animate-spin",
|
|
83
|
-
// audit-inline-style-ok: built-in CSS spinner geometry, no Tailwind class produces the equivalent border-right-transparent ring without extra config.
|
|
84
|
-
style: { width: "1em", height: "1em", border: "2px solid currentColor", borderRightColor: "transparent", borderRadius: "9999px" } })),
|
|
82
|
+
loading: (_jsx("span", { "aria-hidden": "true", className: "inline-block animate-spin", style: { width: "1em", height: "1em", border: "2px solid currentColor", borderRightColor: "transparent", borderRadius: "9999px" } })),
|
|
85
83
|
};
|
|
86
84
|
return (_jsxs(motion.div, { role: "alert", "data-testid": "toast", className: [UI_TOAST.row, UI_TOAST.variants[toast.variant]].join(" "), layout: true, initial: reduced ? false : { opacity: 0, x: 24, scale: 0.95 }, animate: { opacity: 1, x: 0, scale: 1 }, exit: { opacity: 0, x: 24, scale: 0.95 }, transition: SPRING_SNAPPY, "data-section": "toast-div-624", children: [_jsx("div", { className: UI_TOAST.icon, "data-section": "toast-div-625", children: iconMap[toast.variant] }), _jsx(Text, { as: "div", size: "sm", weight: "medium", className: "flex-1 pr-1", children: toast.message }), toast.action && (_jsx(Button, { type: "button", variant: "ghost", size: "sm", onClick: () => { toast.action.onClick(); onClose(toast.id); }, className: "min-h-0 shrink-0 px-2 py-1 font-semibold underline", children: toast.action.label })), _jsx(Button, { type: "button", variant: "ghost", size: "sm", onClick: () => onClose(toast.id), className: "min-h-0 shrink-0 px-2 py-1", "aria-label": "Close notification", children: "\u00D7" })] }));
|
|
87
85
|
}
|
|
@@ -66,11 +66,8 @@ export function Tooltip({ label, children, side = "top", delay = 400, mobileShee
|
|
|
66
66
|
return () => document.removeEventListener("keydown", handler);
|
|
67
67
|
}, [mobileOpen]);
|
|
68
68
|
// Clone child to inject aria-label + mouse/focus/touch handlers
|
|
69
|
-
// audit-unknown-ok: ReactElement props clone — children props arbitrary
|
|
70
69
|
const existingProps = children.props;
|
|
71
|
-
const child = React.cloneElement(
|
|
72
|
-
// audit-unknown-ok: ReactElement props clone — children props arbitrary
|
|
73
|
-
children, {
|
|
70
|
+
const child = React.cloneElement(children, {
|
|
74
71
|
"aria-label": existingProps["aria-label"] ?? label,
|
|
75
72
|
onMouseEnter: (e) => {
|
|
76
73
|
if (typeof existingProps.onMouseEnter === "function")
|
|
@@ -16,9 +16,7 @@ export function UnsavedChangesModal({ labels = {} }) {
|
|
|
16
16
|
const [isOpen, setIsOpen] = useState(false);
|
|
17
17
|
const [resolve, setResolve] = useState(null);
|
|
18
18
|
useEffect(() => {
|
|
19
|
-
const subscription = eventBus.on(UNSAVED_CHANGES_EVENT,
|
|
20
|
-
// audit-unknown-ok: ...args spread — caller-defined handler signature
|
|
21
|
-
(...args) => {
|
|
19
|
+
const subscription = eventBus.on(UNSAVED_CHANGES_EVENT, (...args) => {
|
|
22
20
|
const resolveFn = args[0];
|
|
23
21
|
setResolve(() => resolveFn);
|
|
24
22
|
setIsOpen(true);
|
|
@@ -151,7 +151,7 @@ function attachCopyButtons(container) {
|
|
|
151
151
|
btn.textContent = "Copy";
|
|
152
152
|
}, 1800);
|
|
153
153
|
})
|
|
154
|
-
.catch(() => { });
|
|
154
|
+
.catch(() => { });
|
|
155
155
|
});
|
|
156
156
|
pre.appendChild(btn);
|
|
157
157
|
});
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { serverLogger } from "../monitoring";
|
|
2
2
|
import { AuthorizationError, NotFoundError, ValidationError, } from "../errors";
|
|
3
|
-
// audit-unknown-ok: type-narrowing entry point — accepts any value, narrows by typeof/Array.isArray
|
|
4
3
|
export function handleActionError(err) {
|
|
5
4
|
const devDebug = process.env.NODE_ENV === "development"
|
|
6
5
|
? { stack: err instanceof Error ? err.stack : String(err) }
|
|
@@ -6,7 +6,6 @@ import { getDefaultLocale } from "../core/baseline-resolver";
|
|
|
6
6
|
* Resolve any date-like value (Date, ISO string, number, or Firestore Timestamp JSON)
|
|
7
7
|
* into a native Date object. Returns null for falsy or unparseable input.
|
|
8
8
|
*/
|
|
9
|
-
// audit-unknown-ok: type-narrowing entry point — accepts any value, narrows by typeof/Array.isArray
|
|
10
9
|
export function resolveDate(value) {
|
|
11
10
|
if (!value)
|
|
12
11
|
return null;
|
|
@@ -44,7 +44,6 @@ export function deepClone(obj) {
|
|
|
44
44
|
if (obj === null || typeof obj !== "object")
|
|
45
45
|
return obj;
|
|
46
46
|
if (Array.isArray(obj))
|
|
47
|
-
// audit-unknown-ok: TS structural escape — generic param
|
|
48
47
|
return obj.map((item) => deepClone(item));
|
|
49
48
|
const cloned = {};
|
|
50
49
|
const objectRecord = obj;
|
|
@@ -53,7 +52,6 @@ export function deepClone(obj) {
|
|
|
53
52
|
});
|
|
54
53
|
return cloned;
|
|
55
54
|
}
|
|
56
|
-
// audit-unknown-ok: type-narrowing entry point — accepts any value, narrows by typeof/Array.isArray
|
|
57
55
|
export function isEqual(obj1, obj2) {
|
|
58
56
|
if (obj1 === obj2)
|
|
59
57
|
return true;
|
package/dist/utils/schema-ui.js
CHANGED
|
@@ -112,9 +112,7 @@ const DEFAULT_OMIT = ["id", "createdAt", "updatedAt", "deletedAt"];
|
|
|
112
112
|
* @param options Optional config: `omit`, `include`.
|
|
113
113
|
* @returns Array of `DerivedField` descriptors, one per schema property.
|
|
114
114
|
*/
|
|
115
|
-
export function deriveFormFields(
|
|
116
|
-
// audit-unknown-ok: Zod schema UI introspection — schema is caller-defined
|
|
117
|
-
schema, options = {}) {
|
|
115
|
+
export function deriveFormFields(schema, options = {}) {
|
|
118
116
|
const zodLike = schema;
|
|
119
117
|
// Unwrap ZodEffects to reach the ZodObject
|
|
120
118
|
const unwrapped = unwrapZodType(zodLike);
|
|
@@ -185,9 +185,7 @@ export const trimDataSchema = z
|
|
|
185
185
|
// ============================================
|
|
186
186
|
// REQUEST VALIDATION HELPERS
|
|
187
187
|
// ============================================
|
|
188
|
-
export function validateRequestBody(schema,
|
|
189
|
-
// audit-unknown-ok: callback entry point — accepts arbitrary payload value
|
|
190
|
-
body) {
|
|
188
|
+
export function validateRequestBody(schema, body) {
|
|
191
189
|
const result = schema.safeParse(body);
|
|
192
190
|
if (result.success) {
|
|
193
191
|
return { success: true, data: result.data };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mohasinac/appkit",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -124,7 +124,10 @@
|
|
|
124
124
|
"scripts/init-config.mjs",
|
|
125
125
|
"scripts/labels-extract.mjs",
|
|
126
126
|
"scripts/seed-cli.mjs",
|
|
127
|
-
"scripts/seed-cli-loader.mjs"
|
|
127
|
+
"scripts/seed-cli-loader.mjs",
|
|
128
|
+
"scripts/dedupe-peer-deps.mjs",
|
|
129
|
+
"scripts/copy-assets.mjs",
|
|
130
|
+
"scripts/bundle-css.mjs"
|
|
128
131
|
],
|
|
129
132
|
"bin": {
|
|
130
133
|
"appkit-sieve-audit": "./scripts/sieve-audit.mjs",
|