@mohasinac/appkit 2.7.57 → 2.7.59
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/DashboardLayoutClient.d.ts +7 -1
- package/dist/_internal/client/features/layout/DashboardLayoutClient.js +8 -2
- package/dist/_internal/server/features/scams/og.js +1 -1
- package/dist/_internal/shared/actions/bulk-helpers.d.ts +3 -0
- package/dist/_internal/shared/actions/bulk-helpers.js +19 -0
- package/dist/_internal/shared/config/schema.d.ts +4 -4
- package/dist/client.d.ts +4 -1
- package/dist/client.js +3 -1
- package/dist/configs/next.js +11 -0
- package/dist/configs/tailwind.d.ts +16 -3
- package/dist/configs/tailwind.js +18 -5
- package/dist/features/account/components/AddressBook.js +1 -1
- package/dist/features/account/components/AddressesIndexListing.js +3 -4
- package/dist/features/account/components/BuyerAccountGuideView.js +7 -7
- package/dist/features/account/components/BuyerAuctionsGuideView.js +7 -7
- package/dist/features/account/components/BuyerOrdersGuideView.js +6 -6
- package/dist/features/account/components/BuyerShoppingGuideView.js +7 -7
- package/dist/features/account/components/UserOffersPanel.js +1 -1
- package/dist/features/account/components/UserSidebar.js +14 -10
- package/dist/features/account/components/UserSupportView.js +4 -4
- package/dist/features/admin/components/AdminAdsView.js +1 -1
- package/dist/features/admin/components/AdminAllEventEntriesView.js +4 -10
- package/dist/features/admin/components/AdminAnalyticsGuideView.js +3 -3
- package/dist/features/admin/components/AdminBidsView.js +3 -9
- package/dist/features/admin/components/AdminBlogView.js +4 -9
- package/dist/features/admin/components/AdminBrandEditorView.js +14 -17
- package/dist/features/admin/components/AdminBrandsView.js +4 -9
- package/dist/features/admin/components/AdminBundlesView.js +40 -59
- package/dist/features/admin/components/AdminCarouselView.js +8 -21
- package/dist/features/admin/components/AdminCartsView.js +3 -4
- package/dist/features/admin/components/AdminCatalogGuideView.js +5 -5
- package/dist/features/admin/components/AdminCategoriesView.js +4 -9
- package/dist/features/admin/components/AdminCategoryEditorView.js +1 -5
- package/dist/features/admin/components/AdminContactEditorView.js +2 -2
- package/dist/features/admin/components/AdminContactView.js +7 -25
- package/dist/features/admin/components/AdminContentGuideView.js +6 -6
- package/dist/features/admin/components/AdminCouponEditorView.js +14 -17
- package/dist/features/admin/components/AdminCouponsView.js +8 -16
- package/dist/features/admin/components/AdminFaqEditorView.js +14 -17
- package/dist/features/admin/components/AdminFaqsView.js +18 -69
- package/dist/features/admin/components/AdminFeatureEditorView.js +7 -9
- package/dist/features/admin/components/AdminFeatureFlagsView.js +1 -1
- package/dist/features/admin/components/AdminFeaturesView.js +1 -1
- package/dist/features/admin/components/AdminGuideHubView.js +1 -1
- package/dist/features/admin/components/AdminHistoryView.js +1 -1
- package/dist/features/admin/components/AdminListingScaffold.js +1 -1
- package/dist/features/admin/components/AdminNewsletterView.js +5 -15
- package/dist/features/admin/components/AdminNotificationsView.js +3 -9
- package/dist/features/admin/components/AdminOrdersGuideView.js +5 -5
- package/dist/features/admin/components/AdminOrdersView.js +3 -9
- package/dist/features/admin/components/AdminPayoutsView.js +3 -9
- package/dist/features/admin/components/AdminPrizeDrawsView.js +4 -9
- package/dist/features/admin/components/AdminProductEditorView.js +1 -5
- package/dist/features/admin/components/AdminProductsView.js +5 -10
- package/dist/features/admin/components/AdminReturnRequestsView.js +1 -1
- package/dist/features/admin/components/AdminReviewsView.js +3 -9
- package/dist/features/admin/components/AdminScammerEditorView.js +3 -3
- package/dist/features/admin/components/AdminScammersView.js +6 -12
- package/dist/features/admin/components/AdminSectionsView.js +1 -1
- package/dist/features/admin/components/AdminSessionsView.js +3 -9
- package/dist/features/admin/components/AdminSiteSettingsView.js +1 -1
- package/dist/features/admin/components/AdminStoreAddressesView.js +1 -1
- package/dist/features/admin/components/AdminStoresGuideView.js +6 -6
- package/dist/features/admin/components/AdminStoresView.js +3 -9
- package/dist/features/admin/components/AdminSublistingCategoriesView.js +3 -7
- package/dist/features/admin/components/AdminSublistingCategoryEditorView.js +17 -20
- package/dist/features/admin/components/AdminSupportTicketDetailView.js +4 -4
- package/dist/features/admin/components/AdminSupportTicketsView.js +9 -15
- package/dist/features/admin/components/AdminTeamGuideView.js +4 -4
- package/dist/features/admin/components/AdminTeamView.js +6 -15
- package/dist/features/admin/components/AdminTrustGuideView.js +5 -5
- package/dist/features/admin/components/AdminUserEditorView.js +1 -1
- package/dist/features/admin/components/AdminUsersGuideView.js +5 -5
- package/dist/features/admin/components/AdminUsersView.js +3 -9
- package/dist/features/admin/components/AdminViewCards.js +1 -1
- package/dist/features/admin/components/AdminWishlistsView.js +1 -1
- package/dist/features/admin/components/DataTable.js +1 -1
- package/dist/features/admin/hooks/useAdminListing.d.ts +58 -0
- package/dist/features/admin/hooks/useAdminListing.js +71 -0
- package/dist/features/auctions/components/AuctionBidsTable.js +1 -1
- package/dist/features/auctions/components/AuctionDetailPageView.js +2 -2
- package/dist/features/auctions/components/MarketplaceAuctionCard.js +2 -2
- package/dist/features/auctions/components/PlaceBidFormClient.js +1 -1
- package/dist/features/auth/components/VerifyEmailView.js +1 -1
- package/dist/features/auth/schemas/firestore.d.ts +1 -0
- package/dist/features/blog/components/BlogIndexListing.js +3 -6
- package/dist/features/blog/components/BlogListView.js +1 -1
- package/dist/features/blog/components/BlogPostView.js +1 -1
- package/dist/features/cart/components/CartDrawer.js +1 -1
- package/dist/features/categories/components/CategoriesIndexListing.js +3 -6
- package/dist/features/categories/components/CategoryDetailPageView.js +1 -1
- package/dist/features/checkout/components/CheckoutStepper.js +1 -1
- package/dist/features/collections/components/CollectionCard.js +1 -1
- package/dist/features/copilot/components/AdminCopilotView.js +2 -2
- package/dist/features/events/components/AdminEventsView.js +4 -4
- package/dist/features/events/components/EventPollWidget.js +2 -2
- package/dist/features/events/components/EventStatusBadge.js +4 -4
- package/dist/features/events/components/EventsIndexListing.js +3 -4
- package/dist/features/events/components/SpinWheelView.js +1 -1
- package/dist/features/faq/components/FAQAccordion.js +2 -2
- package/dist/features/forms/Input.js +3 -3
- package/dist/features/forms/Select.js +2 -2
- package/dist/features/forms/Textarea.js +2 -2
- package/dist/features/forms/utils.d.ts +1 -1
- package/dist/features/forms/utils.js +1 -1
- package/dist/features/homepage/components/AnnouncementBar.d.ts +4 -1
- package/dist/features/homepage/components/AnnouncementBar.js +51 -4
- package/dist/features/homepage/components/CharacterHotspotForm.js +2 -2
- package/dist/features/homepage/components/MarketplaceHomepageView.d.ts +3 -1
- package/dist/features/homepage/components/MarketplaceHomepageView.js +2 -2
- package/dist/features/homepage/components/index.d.ts +1 -1
- package/dist/features/homepage/components/index.js +1 -1
- package/dist/features/homepage/lib/section-renderer.d.ts +2 -2
- package/dist/features/homepage/lib/section-renderer.js +2 -2
- package/dist/features/layout/BottomActions.js +2 -2
- package/dist/features/layout/ListingLayout.js +3 -3
- package/dist/features/layout/TitleBarLayout.js +1 -1
- package/dist/features/media/index.d.ts +2 -0
- package/dist/features/media/index.js +1 -0
- package/dist/features/media/modals/ImageCropModal.js +1 -1
- package/dist/features/media/modals/ImageEditor.d.ts +12 -0
- package/dist/features/media/modals/ImageEditor.js +73 -0
- package/dist/features/media/upload/ImageUpload.d.ts +5 -1
- package/dist/features/media/upload/ImageUpload.js +33 -8
- package/dist/features/media/upload/MediaUploadField.d.ts +5 -1
- package/dist/features/media/upload/MediaUploadField.js +26 -12
- package/dist/features/orders/components/OrdersList.js +7 -7
- package/dist/features/orders/components/RefundHistoryTable.js +2 -2
- package/dist/features/orders/components/RefundRequestView.js +3 -3
- package/dist/features/orders/repository/orders.repository.d.ts +0 -1
- package/dist/features/orders/repository/orders.repository.js +0 -1
- package/dist/features/orders/server.d.ts +1 -1
- package/dist/features/orders/server.js +1 -1
- package/dist/features/pre-orders/components/PreOrderActionsClient.js +1 -1
- package/dist/features/pre-orders/components/PreOrderBadge.js +4 -4
- package/dist/features/pre-orders/components/PreOrderDetailPageView.js +1 -1
- package/dist/features/pre-orders/components/PreorderCard.js +2 -2
- package/dist/features/products/components/CustomSectionsEditor.js +1 -1
- package/dist/features/products/components/GroupSettingsPanel.js +64 -48
- package/dist/features/products/components/MakeOfferButton.js +2 -2
- package/dist/features/products/components/PrizeDrawDetailPageView.js +2 -2
- package/dist/features/products/components/PrizeDrawItemsEditor.js +3 -3
- package/dist/features/products/components/PrizeRevealModal.js +3 -3
- package/dist/features/products/components/ProductDetailPageView.js +4 -4
- package/dist/features/products/components/ProductFeaturesSelector.js +1 -1
- package/dist/features/products/components/ProductGrid.js +3 -3
- package/dist/features/products/repository/products.repository.d.ts +0 -2
- package/dist/features/products/repository/products.repository.js +0 -2
- package/dist/features/products/server.d.ts +1 -1
- package/dist/features/products/server.js +1 -1
- package/dist/features/promotions/components/CouponCard.js +7 -7
- package/dist/features/promotions/components/CouponsIndexListing.js +3 -2
- package/dist/features/promotions/components/PromotionsView.js +1 -1
- package/dist/features/reviews/components/ReviewDetailShell.js +2 -2
- package/dist/features/reviews/components/ReviewsIndexListing.js +3 -4
- package/dist/features/reviews/components/ReviewsList.js +1 -1
- package/dist/features/reviews/repository/reviews.repository.d.ts +0 -1
- package/dist/features/reviews/repository/reviews.repository.js +0 -1
- package/dist/features/reviews/server.d.ts +1 -1
- package/dist/features/reviews/server.js +1 -1
- package/dist/features/seller/components/SellerAddressesView.js +11 -21
- package/dist/features/seller/components/SellerAnalyticsAlertsView.js +2 -2
- package/dist/features/seller/components/SellerAuctionsView.js +14 -23
- package/dist/features/seller/components/SellerBidsView.js +6 -6
- package/dist/features/seller/components/SellerBundlesView.js +13 -21
- package/dist/features/seller/components/SellerClassifiedView.js +14 -22
- package/dist/features/seller/components/SellerCouponEditorView.js +2 -2
- package/dist/features/seller/components/SellerCouponsView.js +14 -20
- package/dist/features/seller/components/SellerDigitalCodesView.js +13 -21
- package/dist/features/seller/components/SellerFeaturesView.js +1 -1
- package/dist/features/seller/components/SellerGroupedListingsView.js +6 -10
- package/dist/features/seller/components/SellerLiveView.js +15 -23
- package/dist/features/seller/components/SellerOffersPanel.js +2 -2
- package/dist/features/seller/components/SellerOffersView.js +4 -5
- package/dist/features/seller/components/SellerOrdersView.js +9 -23
- package/dist/features/seller/components/SellerPayoutMethodsView.js +13 -25
- package/dist/features/seller/components/SellerPayoutsView.js +4 -5
- package/dist/features/seller/components/SellerPreOrdersView.js +13 -22
- package/dist/features/seller/components/SellerPrizeDrawsView.js +13 -22
- package/dist/features/seller/components/SellerProductsCards.js +1 -1
- package/dist/features/seller/components/SellerProductsFilterDrawer.d.ts +1 -1
- package/dist/features/seller/components/SellerProductsFilterDrawer.js +3 -6
- package/dist/features/seller/components/SellerProductsView.js +10 -23
- package/dist/features/seller/components/SellerReviewsView.js +1 -1
- package/dist/features/seller/components/SellerShippingConfigsView.js +14 -26
- package/dist/features/seller/components/SellerStoreCategoriesView.js +16 -35
- package/dist/features/seller/components/SellerTemplatesView.js +27 -43
- package/dist/features/seller/components/analytics/SellerTopProducts.js +1 -1
- package/dist/features/stores/components/StoreFinanceGuideView.js +2 -2
- package/dist/features/stores/components/StoreHeader.js +1 -1
- package/dist/features/stores/components/StoreListingsGuideView.js +3 -3
- package/dist/features/stores/components/StoreOrdersGuideView.js +4 -4
- package/dist/features/stores/components/StoreReviewsListing.js +3 -4
- package/dist/features/stores/components/StoreSettingsGuideView.js +2 -2
- package/dist/features/stores/components/StoresIndexListing.js +3 -4
- package/dist/features/whatsapp-bot/components/SellerWhatsAppSettingsView.js +4 -4
- package/dist/features/wishlist/components/WishlistPage.js +1 -1
- package/dist/index.d.ts +4 -6
- package/dist/index.js +6 -12
- package/dist/react/contexts/SessionContext.d.ts +2 -0
- package/dist/react/contexts/SessionContext.js +2 -0
- package/dist/react/hooks/useEntityDelete.d.ts +15 -0
- package/dist/react/hooks/useEntityDelete.js +39 -0
- package/dist/react/index.d.ts +2 -0
- package/dist/react/index.js +2 -0
- package/dist/repositories/index.d.ts +3 -3
- package/dist/repositories/index.js +3 -3
- package/dist/styles.css +286 -3
- package/dist/tailwind-utilities.css +1 -1
- package/dist/tokens/motion.d.ts +162 -0
- package/dist/tokens/motion.js +89 -0
- package/dist/ui/DataTable.js +3 -2
- package/dist/ui/components/Accordion.js +2 -1
- package/dist/ui/components/Card.d.ts +5 -2
- package/dist/ui/components/Card.js +29 -11
- package/dist/ui/components/Div.d.ts +2 -16
- package/dist/ui/components/Div.js +2 -16
- package/dist/ui/components/Layout.d.ts +9 -19
- package/dist/ui/components/Layout.js +9 -7
- package/dist/ui/components/ListingFilterDrawer.d.ts +10 -0
- package/dist/ui/components/ListingFilterDrawer.js +8 -0
- package/dist/ui/components/Modal.js +7 -4
- package/dist/ui/components/Motion.d.ts +75 -0
- package/dist/ui/components/Motion.js +122 -0
- package/dist/ui/components/Semantic.d.ts +81 -14
- package/dist/ui/components/Semantic.js +75 -10
- package/dist/ui/components/Semantic.style.css +261 -2
- package/dist/ui/components/SideDrawer.d.ts +1 -1
- package/dist/ui/components/SideDrawer.js +8 -6
- package/dist/ui/components/SideModal.d.ts +1 -1
- package/dist/ui/components/SideModal.js +11 -9
- package/dist/ui/components/StackedViewShell.js +6 -1
- package/dist/ui/components/Toast.js +5 -2
- package/dist/ui/components/Typography.d.ts +44 -3
- package/dist/ui/components/Typography.js +15 -30
- package/dist/ui/components/Typography.style.css +24 -0
- package/dist/ui/components/VacationBanner.js +2 -1
- package/dist/ui/components/surface-tokens.d.ts +70 -0
- package/dist/ui/components/surface-tokens.js +68 -0
- package/dist/ui/forms/FormShell.d.ts +6 -1
- package/dist/ui/forms/FormShell.js +32 -4
- package/dist/ui/index.d.ts +11 -2
- package/dist/ui/index.js +5 -2
- package/dist/validation/schemas.d.ts +28 -28
- package/package.json +3 -1
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Surface & layout tokens — shared prop maps for all layout primitives.
|
|
3
|
+
*
|
|
4
|
+
* These maps power the Bootstrap/MUI-style props (`surface`, `padding`,
|
|
5
|
+
* `rounded`, `border`, `shadow`) on Stack, Row, Grid, Container, Section,
|
|
6
|
+
* Article, Main, Aside, Div, BlockHeader, and BlockFooter.
|
|
7
|
+
*/
|
|
8
|
+
export declare const SURFACE_MAP: {
|
|
9
|
+
readonly none: "";
|
|
10
|
+
readonly default: "bg-white dark:bg-slate-900";
|
|
11
|
+
readonly muted: "bg-zinc-50 dark:bg-slate-950";
|
|
12
|
+
readonly subtle: "bg-zinc-100 dark:bg-slate-900";
|
|
13
|
+
readonly inset: "bg-zinc-200 dark:bg-slate-800";
|
|
14
|
+
readonly card: "bg-white dark:bg-slate-900 border border-zinc-200 dark:border-slate-700 rounded-xl shadow-sm";
|
|
15
|
+
readonly elevated: "bg-white dark:bg-slate-900 border border-zinc-200 dark:border-slate-700 rounded-2xl shadow-md";
|
|
16
|
+
readonly interactive: "bg-white dark:bg-slate-900 border border-zinc-200 dark:border-slate-700 rounded-xl shadow-sm hover:shadow-md hover:border-primary-300/60 dark:hover:border-secondary-500/60 transition-all cursor-pointer";
|
|
17
|
+
readonly glass: "backdrop-blur-md bg-white/85 dark:bg-slate-900/85 border border-zinc-200/60 dark:border-slate-700/40 rounded-2xl shadow-lg";
|
|
18
|
+
readonly form: "bg-white dark:bg-slate-900 rounded-2xl border border-zinc-200 dark:border-slate-700 shadow-sm";
|
|
19
|
+
};
|
|
20
|
+
export type SurfaceKey = keyof typeof SURFACE_MAP;
|
|
21
|
+
export declare const PADDING_MAP: {
|
|
22
|
+
readonly none: "";
|
|
23
|
+
readonly xs: "p-2";
|
|
24
|
+
readonly sm: "p-3";
|
|
25
|
+
readonly md: "p-4";
|
|
26
|
+
readonly lg: "p-6";
|
|
27
|
+
readonly xl: "p-8";
|
|
28
|
+
readonly card: "p-5 sm:p-6 lg:p-8";
|
|
29
|
+
readonly section: "py-10 sm:py-14 xl:py-20";
|
|
30
|
+
readonly sectionSm: "py-6 sm:py-10";
|
|
31
|
+
readonly page: "py-6 sm:py-8 lg:py-10";
|
|
32
|
+
readonly inline: "px-4 py-3";
|
|
33
|
+
readonly inlineSm: "px-3 py-2";
|
|
34
|
+
readonly inlineLg: "px-6 py-4";
|
|
35
|
+
};
|
|
36
|
+
export type PaddingKey = keyof typeof PADDING_MAP;
|
|
37
|
+
export declare const ROUNDED_MAP: {
|
|
38
|
+
readonly none: "";
|
|
39
|
+
readonly sm: "rounded-sm";
|
|
40
|
+
readonly md: "rounded-md";
|
|
41
|
+
readonly lg: "rounded-lg";
|
|
42
|
+
readonly xl: "rounded-xl";
|
|
43
|
+
readonly "2xl": "rounded-2xl";
|
|
44
|
+
readonly full: "rounded-full";
|
|
45
|
+
};
|
|
46
|
+
export type RoundedKey = keyof typeof ROUNDED_MAP;
|
|
47
|
+
export declare const BORDER_MAP: {
|
|
48
|
+
readonly none: "";
|
|
49
|
+
readonly default: "border border-zinc-200 dark:border-slate-700";
|
|
50
|
+
readonly subtle: "border border-zinc-100 dark:border-slate-800/60";
|
|
51
|
+
readonly strong: "border border-zinc-300 dark:border-slate-600";
|
|
52
|
+
readonly dashed: "border border-dashed border-zinc-300 dark:border-slate-600";
|
|
53
|
+
};
|
|
54
|
+
export type BorderKey = keyof typeof BORDER_MAP;
|
|
55
|
+
export declare const SHADOW_MAP: {
|
|
56
|
+
readonly none: "";
|
|
57
|
+
readonly sm: "shadow-sm";
|
|
58
|
+
readonly md: "shadow-md";
|
|
59
|
+
readonly lg: "shadow-lg";
|
|
60
|
+
readonly xl: "shadow-xl";
|
|
61
|
+
};
|
|
62
|
+
export type ShadowKey = keyof typeof SHADOW_MAP;
|
|
63
|
+
export interface SurfaceProps {
|
|
64
|
+
surface?: SurfaceKey;
|
|
65
|
+
padding?: PaddingKey;
|
|
66
|
+
rounded?: RoundedKey;
|
|
67
|
+
border?: BorderKey;
|
|
68
|
+
shadow?: ShadowKey;
|
|
69
|
+
}
|
|
70
|
+
export declare function buildSurfaceClasses(props: SurfaceProps): string;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Surface & layout tokens — shared prop maps for all layout primitives.
|
|
3
|
+
*
|
|
4
|
+
* These maps power the Bootstrap/MUI-style props (`surface`, `padding`,
|
|
5
|
+
* `rounded`, `border`, `shadow`) on Stack, Row, Grid, Container, Section,
|
|
6
|
+
* Article, Main, Aside, Div, BlockHeader, and BlockFooter.
|
|
7
|
+
*/
|
|
8
|
+
export const SURFACE_MAP = {
|
|
9
|
+
none: "",
|
|
10
|
+
default: "bg-white dark:bg-slate-900",
|
|
11
|
+
muted: "bg-zinc-50 dark:bg-slate-950",
|
|
12
|
+
subtle: "bg-zinc-100 dark:bg-slate-900",
|
|
13
|
+
inset: "bg-zinc-200 dark:bg-slate-800",
|
|
14
|
+
card: "bg-white dark:bg-slate-900 border border-zinc-200 dark:border-slate-700 rounded-xl shadow-sm",
|
|
15
|
+
elevated: "bg-white dark:bg-slate-900 border border-zinc-200 dark:border-slate-700 rounded-2xl shadow-md",
|
|
16
|
+
interactive: "bg-white dark:bg-slate-900 border border-zinc-200 dark:border-slate-700 rounded-xl shadow-sm hover:shadow-md hover:border-primary-300/60 dark:hover:border-secondary-500/60 transition-all cursor-pointer",
|
|
17
|
+
glass: "backdrop-blur-md bg-white/85 dark:bg-slate-900/85 border border-zinc-200/60 dark:border-slate-700/40 rounded-2xl shadow-lg",
|
|
18
|
+
form: "bg-white dark:bg-slate-900 rounded-2xl border border-zinc-200 dark:border-slate-700 shadow-sm",
|
|
19
|
+
};
|
|
20
|
+
export const PADDING_MAP = {
|
|
21
|
+
none: "",
|
|
22
|
+
xs: "p-2",
|
|
23
|
+
sm: "p-3",
|
|
24
|
+
md: "p-4",
|
|
25
|
+
lg: "p-6",
|
|
26
|
+
xl: "p-8",
|
|
27
|
+
card: "p-5 sm:p-6 lg:p-8",
|
|
28
|
+
section: "py-10 sm:py-14 xl:py-20",
|
|
29
|
+
sectionSm: "py-6 sm:py-10",
|
|
30
|
+
page: "py-6 sm:py-8 lg:py-10",
|
|
31
|
+
inline: "px-4 py-3",
|
|
32
|
+
inlineSm: "px-3 py-2",
|
|
33
|
+
inlineLg: "px-6 py-4",
|
|
34
|
+
};
|
|
35
|
+
export const ROUNDED_MAP = {
|
|
36
|
+
none: "",
|
|
37
|
+
sm: "rounded-sm",
|
|
38
|
+
md: "rounded-md",
|
|
39
|
+
lg: "rounded-lg",
|
|
40
|
+
xl: "rounded-xl",
|
|
41
|
+
"2xl": "rounded-2xl",
|
|
42
|
+
full: "rounded-full",
|
|
43
|
+
};
|
|
44
|
+
export const BORDER_MAP = {
|
|
45
|
+
none: "",
|
|
46
|
+
default: "border border-zinc-200 dark:border-slate-700",
|
|
47
|
+
subtle: "border border-zinc-100 dark:border-slate-800/60",
|
|
48
|
+
strong: "border border-zinc-300 dark:border-slate-600",
|
|
49
|
+
dashed: "border border-dashed border-zinc-300 dark:border-slate-600",
|
|
50
|
+
};
|
|
51
|
+
export const SHADOW_MAP = {
|
|
52
|
+
none: "",
|
|
53
|
+
sm: "shadow-sm",
|
|
54
|
+
md: "shadow-md",
|
|
55
|
+
lg: "shadow-lg",
|
|
56
|
+
xl: "shadow-xl",
|
|
57
|
+
};
|
|
58
|
+
export function buildSurfaceClasses(props) {
|
|
59
|
+
return [
|
|
60
|
+
props.surface ? SURFACE_MAP[props.surface] : "",
|
|
61
|
+
props.padding ? PADDING_MAP[props.padding] : "",
|
|
62
|
+
props.rounded ? ROUNDED_MAP[props.rounded] : "",
|
|
63
|
+
props.border ? BORDER_MAP[props.border] : "",
|
|
64
|
+
props.shadow ? SHADOW_MAP[props.shadow] : "",
|
|
65
|
+
]
|
|
66
|
+
.filter(Boolean)
|
|
67
|
+
.join(" ");
|
|
68
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React, { type ReactNode } from "react";
|
|
2
|
+
import type { ZodType } from "zod";
|
|
2
3
|
export interface FormShellStep {
|
|
3
4
|
id: string;
|
|
4
5
|
label: string;
|
|
@@ -32,6 +33,10 @@ export interface FormShellProps {
|
|
|
32
33
|
onPublish: (values: Record<string, unknown>) => Promise<void>;
|
|
33
34
|
/** Current form values — caller owns state */
|
|
34
35
|
values: Record<string, unknown>;
|
|
36
|
+
/** Zod schema for auto-validation on publish. Errors are mapped to field names. */
|
|
37
|
+
schema?: ZodType;
|
|
38
|
+
/** When true + schema provided, validate on every value change (not just publish). */
|
|
39
|
+
validateOnChange?: boolean;
|
|
35
40
|
/** Whether any values differ from the persisted state */
|
|
36
41
|
isDirty?: boolean;
|
|
37
42
|
draftId?: string;
|
|
@@ -63,4 +68,4 @@ export interface FormShellProviderProps {
|
|
|
63
68
|
values?: Record<string, unknown>;
|
|
64
69
|
}
|
|
65
70
|
export declare function FormShellProvider({ children, onSaveDraft, isDirty, autoSaveDelayMs, values, }: FormShellProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
66
|
-
export declare function FormShell({ steps, onSaveDraft, onPublish, values, isDirty, autoSaveDelayMs, publishLabel, saveDraftLabel, title, className, mobileAccordion, }: FormShellProps): import("react/jsx-runtime").JSX.Element;
|
|
71
|
+
export declare function FormShell({ steps, onSaveDraft, onPublish, values, schema, validateOnChange, isDirty, autoSaveDelayMs, publishLabel, saveDraftLabel, title, className, mobileAccordion, }: FormShellProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { createContext, useCallback, useContext, useEffect, useMemo, useRef, useState, } from "react";
|
|
4
4
|
import { Button } from "../components/Button";
|
|
5
|
-
import { Heading, Text } from "../components/Typography";
|
|
5
|
+
import { Heading, Span, Text } from "../components/Typography";
|
|
6
6
|
// ─── Context ──────────────────────────────────────────────────────────────────
|
|
7
7
|
export const FormShellContext = createContext(null);
|
|
8
8
|
export function useFormShell() {
|
|
@@ -61,7 +61,7 @@ function ErrorSummary({ errors, visible }) {
|
|
|
61
61
|
const entries = Object.entries(errors).filter(([, v]) => v);
|
|
62
62
|
if (!visible || entries.length === 0)
|
|
63
63
|
return null;
|
|
64
|
-
return (_jsxs("div", { className: "appkit-formshell__error-summary", role: "alert", "aria-live": "assertive", children: [_jsxs(Text, { size: "sm", variant: "error", className: "appkit-formshell__error-summary__title", children: ["Please fix ", entries.length, " error", entries.length !== 1 ? "s" : "", " before publishing."] }), _jsx("ul", { className: "appkit-formshell__error-summary__list", children: entries.map(([field, msg]) => (_jsx("li", { children: _jsxs(Text, { size: "sm", variant: "error", children: [_jsx("
|
|
64
|
+
return (_jsxs("div", { className: "appkit-formshell__error-summary", role: "alert", "aria-live": "assertive", children: [_jsxs(Text, { size: "sm", variant: "error", className: "appkit-formshell__error-summary__title", children: ["Please fix ", entries.length, " error", entries.length !== 1 ? "s" : "", " before publishing."] }), _jsx("ul", { className: "appkit-formshell__error-summary__list", children: entries.map(([field, msg]) => (_jsx("li", { children: _jsxs(Text, { size: "sm", variant: "error", children: [_jsx(Span, { weight: "bold", children: field }), ": ", msg] }) }, field))) })] }));
|
|
65
65
|
}
|
|
66
66
|
export function FormShellProvider({ children, onSaveDraft, isDirty = false, autoSaveDelayMs = 2000, values = {}, }) {
|
|
67
67
|
const [errors, setErrors] = useState({});
|
|
@@ -122,8 +122,25 @@ export function FormShellProvider({ children, onSaveDraft, isDirty = false, auto
|
|
|
122
122
|
}), [errors, touched, setFieldError, setFieldTouched, clearFieldError, isDirty]);
|
|
123
123
|
return _jsx(FormShellContext.Provider, { value: ctx, children: children });
|
|
124
124
|
}
|
|
125
|
+
// ─── Schema validation helper ────────────────────────────────────────────────
|
|
126
|
+
function validateSchema(schema, values, setFieldError, setErrors) {
|
|
127
|
+
const result = schema.safeParse(values);
|
|
128
|
+
if (result.success) {
|
|
129
|
+
setErrors({});
|
|
130
|
+
return true;
|
|
131
|
+
}
|
|
132
|
+
const newErrors = {};
|
|
133
|
+
for (const issue of result.error.issues) {
|
|
134
|
+
const path = issue.path.join(".");
|
|
135
|
+
if (path && !newErrors[path]) {
|
|
136
|
+
newErrors[path] = issue.message;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
setErrors(newErrors);
|
|
140
|
+
return false;
|
|
141
|
+
}
|
|
125
142
|
// ─── FormShell ────────────────────────────────────────────────────────────────
|
|
126
|
-
export function FormShell({ steps, onSaveDraft, onPublish, values, isDirty = false, autoSaveDelayMs = 2000, publishLabel = "Publish", saveDraftLabel = "Save Draft", title, className = "", mobileAccordion = true, }) {
|
|
143
|
+
export function FormShell({ steps, onSaveDraft, onPublish, values, schema, validateOnChange = false, isDirty = false, autoSaveDelayMs = 2000, publishLabel = "Publish", saveDraftLabel = "Save Draft", title, className = "", mobileAccordion = true, }) {
|
|
127
144
|
const [errors, setErrors] = useState({});
|
|
128
145
|
const [touched, setTouched] = useState({});
|
|
129
146
|
const [currentStep, setCurrentStep] = useState(0);
|
|
@@ -198,8 +215,19 @@ export function FormShell({ steps, onSaveDraft, onPublish, values, isDirty = fal
|
|
|
198
215
|
setIsSubmitting(false);
|
|
199
216
|
}
|
|
200
217
|
}, [onSaveDraft, values]);
|
|
218
|
+
// Schema-driven live validation on value changes
|
|
219
|
+
useEffect(() => {
|
|
220
|
+
if (!schema || !validateOnChange)
|
|
221
|
+
return;
|
|
222
|
+
validateSchema(schema, values, setFieldError, setErrors);
|
|
223
|
+
}, [schema, validateOnChange, values, setFieldError]);
|
|
201
224
|
const handlePublish = useCallback(async () => {
|
|
202
225
|
setShowErrorSummary(true);
|
|
226
|
+
if (schema) {
|
|
227
|
+
const valid = validateSchema(schema, values, setFieldError, setErrors);
|
|
228
|
+
if (!valid)
|
|
229
|
+
return;
|
|
230
|
+
}
|
|
203
231
|
if (!isPublishReady)
|
|
204
232
|
return;
|
|
205
233
|
setIsSubmitting(true);
|
|
@@ -209,7 +237,7 @@ export function FormShell({ steps, onSaveDraft, onPublish, values, isDirty = fal
|
|
|
209
237
|
finally {
|
|
210
238
|
setIsSubmitting(false);
|
|
211
239
|
}
|
|
212
|
-
}, [isPublishReady, onPublish, values]);
|
|
240
|
+
}, [isPublishReady, onPublish, values, schema, setFieldError]);
|
|
213
241
|
const ctx = useMemo(() => ({
|
|
214
242
|
errors,
|
|
215
243
|
touched,
|
package/dist/ui/index.d.ts
CHANGED
|
@@ -10,10 +10,11 @@ export type { FieldCheckboxProps } from "./forms";
|
|
|
10
10
|
export { FieldCheckbox } from "./forms";
|
|
11
11
|
export { buildColumns, createColumnBuilder, renderBoolean, renderCurrency, renderCurrencyCompact, renderCount, renderNullable, renderRating, } from "./columns";
|
|
12
12
|
export type { BooleanRenderOpts, RatingMode, RatingRenderOpts, } from "./columns";
|
|
13
|
-
export type { SectionProps, ArticleProps, MainProps, AsideProps, NavProps, BlockHeaderProps, BlockFooterProps, HeaderProps, FooterProps, UlProps, OlProps, LiProps, } from "./components/Semantic";
|
|
14
|
-
export { Section, Article, Main, Aside, Nav, BlockHeader, BlockFooter, Header, Footer, Ul, Ol, Li, } from "./components/Semantic";
|
|
13
|
+
export type { SectionProps, ArticleProps, MainProps, AsideProps, NavProps, BlockHeaderProps, BlockFooterProps, HeaderProps, FooterProps, UlProps, OlProps, LiProps, TableProps, TheadProps, TbodyProps, TrProps, ThProps, TdProps, CodeProps, PreProps, BlockquoteProps, FigureProps, FigcaptionProps, DlProps, DtProps, DdProps, } from "./components/Semantic";
|
|
14
|
+
export { Section, Article, Main, Aside, Nav, BlockHeader, BlockFooter, Header, Footer, Ul, Ol, Li, Table, Thead, Tbody, Tr, Th, Td, Code, Pre, Blockquote, Figure, Figcaption, Dl, Dt, Dd, } from "./components/Semantic";
|
|
15
15
|
export type { DivProps } from "./components/Div";
|
|
16
16
|
export { Div } from "./components/Div";
|
|
17
|
+
export type { ColorVariant } from "./components/Typography";
|
|
17
18
|
export { Heading, Text, Label, Caption, Span } from "./components/Typography";
|
|
18
19
|
export { FilterChipGroup } from "./components/FilterChipGroup";
|
|
19
20
|
export type { FilterChipGroupProps, FilterChipGroupTab, } from "./components/FilterChipGroup";
|
|
@@ -158,6 +159,8 @@ export type { ActiveFilter, ActiveFilterChipsProps, } from "./components/ActiveF
|
|
|
158
159
|
export { ActiveFilterChips } from "./components/ActiveFilterChips";
|
|
159
160
|
export type { SortOption, SortDropdownProps } from "./components/SortDropdown";
|
|
160
161
|
export { SortDropdown } from "./components/SortDropdown";
|
|
162
|
+
export type { ListingFilterDrawerProps } from "./components/ListingFilterDrawer";
|
|
163
|
+
export { ListingFilterDrawer } from "./components/ListingFilterDrawer";
|
|
161
164
|
export type { ListingToolbarProps, ListingToolbarSortOption, ListingToolbarLabels, ListingToolbarToggle } from "./components/ListingToolbar";
|
|
162
165
|
export { ListingToolbar } from "./components/ListingToolbar";
|
|
163
166
|
export type { TablePaginationProps, TablePaginationLabels, } from "./components/TablePagination";
|
|
@@ -166,6 +169,8 @@ export type { DataTableProps, DataTableColumn } from "./DataTable";
|
|
|
166
169
|
export { DataTable } from "./DataTable";
|
|
167
170
|
export type { TableConfig, TableViewMode, PaginationConfig, StickyConfig, } from "../contracts";
|
|
168
171
|
export { DEFAULT_TABLE_CONFIG, DEFAULT_PAGINATION_CONFIG, DEFAULT_STICKY_CONFIG, mergeTableConfig, } from "../contracts";
|
|
172
|
+
export type { SurfaceKey, PaddingKey, RoundedKey, BorderKey, ShadowKey, SurfaceProps, } from "./components/surface-tokens";
|
|
173
|
+
export { SURFACE_MAP, PADDING_MAP, ROUNDED_MAP, BORDER_MAP, SHADOW_MAP, buildSurfaceClasses, } from "./components/surface-tokens";
|
|
169
174
|
export type { GapKey, ContainerSize, GridCols, ViewPortal, ContainerProps, StackProps, RowProps, GridProps, } from "./components/Layout";
|
|
170
175
|
export { Container, Stack, Row, Grid, GRID_MAP } from "./components/Layout";
|
|
171
176
|
export { classNames, mergeTailwindClasses } from "./style.helper";
|
|
@@ -203,3 +208,7 @@ export type { FormActionBarProps, FormActionBarBreadcrumb } from "./components/F
|
|
|
203
208
|
export { FormActionBar } from "./components/FormActionBar";
|
|
204
209
|
export type { ConfirmDeleteModalProps } from "./components/ConfirmDeleteModal";
|
|
205
210
|
export { ConfirmDeleteModal } from "./components/ConfirmDeleteModal";
|
|
211
|
+
export type { FadeInProps, SlideUpProps, SlideInProps, ScaleInProps, CollapseProps, PressScaleProps, HoverLiftProps, AnimatedListProps, AnimatedDivProps, AnimatedStackProps, AnimatedRowProps, DraggableProps, SwipeableProps, } from "./components/Motion";
|
|
212
|
+
export { FadeIn, SlideUp, SlideIn, ScaleIn, Collapse, PressScale, HoverLift, AnimatedList, AnimatedDiv, AnimatedStack, AnimatedRow, Draggable, Swipeable, AnimatePresence, } from "./components/Motion";
|
|
213
|
+
export type { MotionPreset } from "../tokens/motion";
|
|
214
|
+
export { MOTION_PRESETS, SPRING_SNAPPY, SPRING_GENTLE, EASE_OUT, } from "../tokens/motion";
|
package/dist/ui/index.js
CHANGED
|
@@ -6,9 +6,8 @@ export { FieldSelect } from "./forms";
|
|
|
6
6
|
export { FieldCheckbox } from "./forms";
|
|
7
7
|
// --- Column utilities ---------------------------------------------------------
|
|
8
8
|
export { buildColumns, createColumnBuilder, renderBoolean, renderCurrency, renderCurrencyCompact, renderCount, renderNullable, renderRating, } from "./columns";
|
|
9
|
-
export { Section, Article, Main, Aside, Nav, BlockHeader, BlockFooter, Header, Footer, Ul, Ol, Li, } from "./components/Semantic";
|
|
9
|
+
export { Section, Article, Main, Aside, Nav, BlockHeader, BlockFooter, Header, Footer, Ul, Ol, Li, Table, Thead, Tbody, Tr, Th, Td, Code, Pre, Blockquote, Figure, Figcaption, Dl, Dt, Dd, } from "./components/Semantic";
|
|
10
10
|
export { Div } from "./components/Div";
|
|
11
|
-
// --- Typography primitives ----------------------------------------------------
|
|
12
11
|
export { Heading, Text, Label, Caption, Span } from "./components/Typography";
|
|
13
12
|
// --- Filter chip group (SB10-C completion, S8 2026-05-13) --------------------
|
|
14
13
|
export { FilterChipGroup } from "./components/FilterChipGroup";
|
|
@@ -83,10 +82,12 @@ export { AvatarDisplay } from "./components/AvatarDisplay";
|
|
|
83
82
|
export { DashboardStatsCard } from "./components/DashboardStatsCard";
|
|
84
83
|
export { ActiveFilterChips } from "./components/ActiveFilterChips";
|
|
85
84
|
export { SortDropdown } from "./components/SortDropdown";
|
|
85
|
+
export { ListingFilterDrawer } from "./components/ListingFilterDrawer";
|
|
86
86
|
export { ListingToolbar } from "./components/ListingToolbar";
|
|
87
87
|
export { TablePagination } from "./components/TablePagination";
|
|
88
88
|
export { DataTable } from "./DataTable";
|
|
89
89
|
export { DEFAULT_TABLE_CONFIG, DEFAULT_PAGINATION_CONFIG, DEFAULT_STICKY_CONFIG, mergeTableConfig, } from "../contracts";
|
|
90
|
+
export { SURFACE_MAP, PADDING_MAP, ROUNDED_MAP, BORDER_MAP, SHADOW_MAP, buildSurfaceClasses, } from "./components/surface-tokens";
|
|
90
91
|
export { Container, Stack, Row, Grid, GRID_MAP } from "./components/Layout";
|
|
91
92
|
// --- UI Helpers ---------------------------------------------------------------
|
|
92
93
|
export { classNames, mergeTailwindClasses } from "./style.helper";
|
|
@@ -107,3 +108,5 @@ export { default as ImageGallery } from "./components/ImageGallery";
|
|
|
107
108
|
export { SideDrawer } from "./components/SideDrawer";
|
|
108
109
|
export { FormActionBar } from "./components/FormActionBar";
|
|
109
110
|
export { ConfirmDeleteModal } from "./components/ConfirmDeleteModal";
|
|
111
|
+
export { FadeIn, SlideUp, SlideIn, ScaleIn, Collapse, PressScale, HoverLift, AnimatedList, AnimatedDiv, AnimatedStack, AnimatedRow, Draggable, Swipeable, AnimatePresence, } from "./components/Motion";
|
|
112
|
+
export { MOTION_PRESETS, SPRING_SNAPPY, SPRING_GENTLE, EASE_OUT, } from "../tokens/motion";
|
|
@@ -122,104 +122,104 @@ export declare const cropDataSchema: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.Zo
|
|
|
122
122
|
x: number;
|
|
123
123
|
y: number;
|
|
124
124
|
sourceUrl: string;
|
|
125
|
+
aspectRatio?: string | undefined;
|
|
125
126
|
minHeight?: number | undefined;
|
|
126
|
-
rotation?: number | undefined;
|
|
127
127
|
minWidth?: number | undefined;
|
|
128
|
+
rotation?: number | undefined;
|
|
128
129
|
quality?: number | undefined;
|
|
129
|
-
aspectRatio?: string | undefined;
|
|
130
|
-
outputFolder?: string | undefined;
|
|
131
130
|
outputFormat?: "webp" | "png" | "jpeg" | undefined;
|
|
131
|
+
outputFolder?: string | undefined;
|
|
132
132
|
}, {
|
|
133
133
|
height: number;
|
|
134
134
|
width: number;
|
|
135
135
|
x: number;
|
|
136
136
|
y: number;
|
|
137
137
|
sourceUrl: string;
|
|
138
|
+
aspectRatio?: string | undefined;
|
|
138
139
|
minHeight?: number | undefined;
|
|
139
|
-
rotation?: number | undefined;
|
|
140
140
|
minWidth?: number | undefined;
|
|
141
|
+
rotation?: number | undefined;
|
|
141
142
|
quality?: number | undefined;
|
|
142
|
-
aspectRatio?: string | undefined;
|
|
143
|
-
outputFolder?: string | undefined;
|
|
144
143
|
outputFormat?: "webp" | "png" | "jpeg" | undefined;
|
|
144
|
+
outputFolder?: string | undefined;
|
|
145
145
|
}>, {
|
|
146
146
|
height: number;
|
|
147
147
|
width: number;
|
|
148
148
|
x: number;
|
|
149
149
|
y: number;
|
|
150
150
|
sourceUrl: string;
|
|
151
|
+
aspectRatio?: string | undefined;
|
|
151
152
|
minHeight?: number | undefined;
|
|
152
|
-
rotation?: number | undefined;
|
|
153
153
|
minWidth?: number | undefined;
|
|
154
|
+
rotation?: number | undefined;
|
|
154
155
|
quality?: number | undefined;
|
|
155
|
-
aspectRatio?: string | undefined;
|
|
156
|
-
outputFolder?: string | undefined;
|
|
157
156
|
outputFormat?: "webp" | "png" | "jpeg" | undefined;
|
|
157
|
+
outputFolder?: string | undefined;
|
|
158
158
|
}, {
|
|
159
159
|
height: number;
|
|
160
160
|
width: number;
|
|
161
161
|
x: number;
|
|
162
162
|
y: number;
|
|
163
163
|
sourceUrl: string;
|
|
164
|
+
aspectRatio?: string | undefined;
|
|
164
165
|
minHeight?: number | undefined;
|
|
165
|
-
rotation?: number | undefined;
|
|
166
166
|
minWidth?: number | undefined;
|
|
167
|
+
rotation?: number | undefined;
|
|
167
168
|
quality?: number | undefined;
|
|
168
|
-
aspectRatio?: string | undefined;
|
|
169
|
-
outputFolder?: string | undefined;
|
|
170
169
|
outputFormat?: "webp" | "png" | "jpeg" | undefined;
|
|
170
|
+
outputFolder?: string | undefined;
|
|
171
171
|
}>, {
|
|
172
172
|
height: number;
|
|
173
173
|
width: number;
|
|
174
174
|
x: number;
|
|
175
175
|
y: number;
|
|
176
176
|
sourceUrl: string;
|
|
177
|
+
aspectRatio?: string | undefined;
|
|
177
178
|
minHeight?: number | undefined;
|
|
178
|
-
rotation?: number | undefined;
|
|
179
179
|
minWidth?: number | undefined;
|
|
180
|
+
rotation?: number | undefined;
|
|
180
181
|
quality?: number | undefined;
|
|
181
|
-
aspectRatio?: string | undefined;
|
|
182
|
-
outputFolder?: string | undefined;
|
|
183
182
|
outputFormat?: "webp" | "png" | "jpeg" | undefined;
|
|
183
|
+
outputFolder?: string | undefined;
|
|
184
184
|
}, {
|
|
185
185
|
height: number;
|
|
186
186
|
width: number;
|
|
187
187
|
x: number;
|
|
188
188
|
y: number;
|
|
189
189
|
sourceUrl: string;
|
|
190
|
+
aspectRatio?: string | undefined;
|
|
190
191
|
minHeight?: number | undefined;
|
|
191
|
-
rotation?: number | undefined;
|
|
192
192
|
minWidth?: number | undefined;
|
|
193
|
+
rotation?: number | undefined;
|
|
193
194
|
quality?: number | undefined;
|
|
194
|
-
aspectRatio?: string | undefined;
|
|
195
|
-
outputFolder?: string | undefined;
|
|
196
195
|
outputFormat?: "webp" | "png" | "jpeg" | undefined;
|
|
196
|
+
outputFolder?: string | undefined;
|
|
197
197
|
}>, {
|
|
198
198
|
height: number;
|
|
199
199
|
width: number;
|
|
200
200
|
x: number;
|
|
201
201
|
y: number;
|
|
202
202
|
sourceUrl: string;
|
|
203
|
+
aspectRatio?: string | undefined;
|
|
203
204
|
minHeight?: number | undefined;
|
|
204
|
-
rotation?: number | undefined;
|
|
205
205
|
minWidth?: number | undefined;
|
|
206
|
+
rotation?: number | undefined;
|
|
206
207
|
quality?: number | undefined;
|
|
207
|
-
aspectRatio?: string | undefined;
|
|
208
|
-
outputFolder?: string | undefined;
|
|
209
208
|
outputFormat?: "webp" | "png" | "jpeg" | undefined;
|
|
209
|
+
outputFolder?: string | undefined;
|
|
210
210
|
}, {
|
|
211
211
|
height: number;
|
|
212
212
|
width: number;
|
|
213
213
|
x: number;
|
|
214
214
|
y: number;
|
|
215
215
|
sourceUrl: string;
|
|
216
|
+
aspectRatio?: string | undefined;
|
|
216
217
|
minHeight?: number | undefined;
|
|
217
|
-
rotation?: number | undefined;
|
|
218
218
|
minWidth?: number | undefined;
|
|
219
|
+
rotation?: number | undefined;
|
|
219
220
|
quality?: number | undefined;
|
|
220
|
-
aspectRatio?: string | undefined;
|
|
221
|
-
outputFolder?: string | undefined;
|
|
222
221
|
outputFormat?: "webp" | "png" | "jpeg" | undefined;
|
|
222
|
+
outputFolder?: string | undefined;
|
|
223
223
|
}>;
|
|
224
224
|
export declare const trimDataSchema: z.ZodEffects<z.ZodObject<{
|
|
225
225
|
sourceUrl: z.ZodEffects<z.ZodString, string, string>;
|
|
@@ -233,29 +233,29 @@ export declare const trimDataSchema: z.ZodEffects<z.ZodObject<{
|
|
|
233
233
|
endTime: number;
|
|
234
234
|
sourceUrl: string;
|
|
235
235
|
quality?: "medium" | "high" | "low" | undefined;
|
|
236
|
-
outputFolder?: string | undefined;
|
|
237
236
|
outputFormat?: "mp4" | "webm" | undefined;
|
|
237
|
+
outputFolder?: string | undefined;
|
|
238
238
|
}, {
|
|
239
239
|
startTime: number;
|
|
240
240
|
endTime: number;
|
|
241
241
|
sourceUrl: string;
|
|
242
242
|
quality?: "medium" | "high" | "low" | undefined;
|
|
243
|
-
outputFolder?: string | undefined;
|
|
244
243
|
outputFormat?: "mp4" | "webm" | undefined;
|
|
244
|
+
outputFolder?: string | undefined;
|
|
245
245
|
}>, {
|
|
246
246
|
startTime: number;
|
|
247
247
|
endTime: number;
|
|
248
248
|
sourceUrl: string;
|
|
249
249
|
quality?: "medium" | "high" | "low" | undefined;
|
|
250
|
-
outputFolder?: string | undefined;
|
|
251
250
|
outputFormat?: "mp4" | "webm" | undefined;
|
|
251
|
+
outputFolder?: string | undefined;
|
|
252
252
|
}, {
|
|
253
253
|
startTime: number;
|
|
254
254
|
endTime: number;
|
|
255
255
|
sourceUrl: string;
|
|
256
256
|
quality?: "medium" | "high" | "low" | undefined;
|
|
257
|
-
outputFolder?: string | undefined;
|
|
258
257
|
outputFormat?: "mp4" | "webm" | undefined;
|
|
258
|
+
outputFolder?: string | undefined;
|
|
259
259
|
}>;
|
|
260
260
|
export declare function validateRequestBody<T>(schema: z.ZodSchema<T>, body: unknown): {
|
|
261
261
|
success: true;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mohasinac/appkit",
|
|
3
|
-
"version": "2.7.
|
|
3
|
+
"version": "2.7.59",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -155,6 +155,8 @@
|
|
|
155
155
|
},
|
|
156
156
|
"dependencies": {
|
|
157
157
|
"@mohasinac/sievejs": "^1.0.0",
|
|
158
|
+
"motion": "^12.40.0",
|
|
159
|
+
"react-advanced-cropper": "^0.20.1",
|
|
158
160
|
"tailwind-merge": "^3.3.0",
|
|
159
161
|
"zod": "^3.24.0",
|
|
160
162
|
"zustand": "^5.0.13"
|