@open-dy/vibecoding-sdk-taro 0.0.1-beta.4 → 0.0.1-beta.6
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/adapters/interest-card/eslint/eslint-plugin-custom-navigation.mjs +2 -290
- package/dist/adapters/interest-card/eslint/taro.mjs +8 -42
- package/dist/build/plugins/vite-tt-components-entry.d.ts +10 -0
- package/dist/build/plugins/vite-tt-components-entry.js +32 -0
- package/dist/build/plugins/vite-tt-components-entry.js.map +1 -0
- package/dist/build/taro.js +3 -1
- package/dist/build/taro.js.map +1 -1
- package/dist/components/miniapp-open-card.d.ts +46 -1
- package/dist/components/miniapp-open-card.js +14 -1
- package/dist/components/miniapp-open-card.js.map +1 -1
- package/dist/eslint/eslint-plugin-custom-navigation.mjs +290 -0
- package/dist/eslint/taro.mjs +11 -0
- package/dist/reference/llms.txt +76 -34
- package/dist/reference/sdk-api/build/taro/BuildContext.md +7 -2
- package/dist/reference/sdk-api/build/taro/CreateMicroappTaroConfigOptions.md +1 -2
- package/dist/reference/sdk-api/build/taro/createMicroappTaroConfig.md +1 -2
- package/dist/reference/sdk-api/components/miniapp-open-card/MiniappOpenCard.md +109 -0
- package/dist/reference/sdk-api/components/miniapp-open-card/MiniappOpenCardEnvVersion.md +38 -0
- package/dist/reference/sdk-api/components/miniapp-open-card/MiniappOpenCardErrorDetail.md +52 -0
- package/dist/reference/sdk-api/components/miniapp-open-card/MiniappOpenCardProps.md +76 -0
- package/dist/reference/sdk-api/components/miniapp-open-card/index.md +12 -0
- package/dist/reference/sdk-api/libraries/lucide-taro.md +151 -0
- package/dist/reference/sdk-api/runtime/CreateMicroappClientOptions.md +7 -2
- package/dist/reference/sdk-api/runtime/createMicroappClient.md +8 -3
- package/dist/reference/sdk-api/ui/accordion/Accordion.md +114 -0
- package/dist/reference/sdk-api/ui/accordion/AccordionContent.md +100 -0
- package/dist/reference/sdk-api/ui/accordion/AccordionItem.md +107 -0
- package/dist/reference/sdk-api/ui/accordion/AccordionTrigger.md +100 -0
- package/dist/reference/sdk-api/ui/accordion/index.md +12 -0
- package/dist/reference/sdk-api/ui/alert/Alert.md +106 -0
- package/dist/reference/sdk-api/ui/alert/AlertAction.md +100 -0
- package/dist/reference/sdk-api/ui/alert/AlertDescription.md +100 -0
- package/dist/reference/sdk-api/ui/alert/AlertTitle.md +100 -0
- package/dist/reference/sdk-api/ui/alert/index.md +12 -0
- package/dist/reference/sdk-api/ui/alert-dialog/AlertDialog.md +58 -0
- package/dist/reference/sdk-api/ui/alert-dialog/AlertDialogAction.md +107 -0
- package/dist/reference/sdk-api/ui/alert-dialog/AlertDialogCancel.md +107 -0
- package/dist/reference/sdk-api/ui/alert-dialog/AlertDialogContent.md +106 -0
- package/dist/reference/sdk-api/ui/alert-dialog/AlertDialogDescription.md +100 -0
- package/dist/reference/sdk-api/ui/alert-dialog/AlertDialogFooter.md +100 -0
- package/dist/reference/sdk-api/ui/alert-dialog/AlertDialogHeader.md +100 -0
- package/dist/reference/sdk-api/ui/alert-dialog/AlertDialogOverlay.md +100 -0
- package/dist/reference/sdk-api/ui/alert-dialog/AlertDialogPortal.md +55 -0
- package/dist/reference/sdk-api/ui/alert-dialog/AlertDialogTitle.md +100 -0
- package/dist/reference/sdk-api/ui/alert-dialog/AlertDialogTrigger.md +118 -0
- package/dist/reference/sdk-api/ui/alert-dialog/index.md +19 -0
- package/dist/reference/sdk-api/ui/aspect-ratio/AspectRatio.md +106 -0
- package/dist/reference/sdk-api/ui/aspect-ratio/index.md +9 -0
- package/dist/reference/sdk-api/ui/avatar/Avatar.md +106 -0
- package/dist/reference/sdk-api/ui/avatar/AvatarBadge.md +100 -0
- package/dist/reference/sdk-api/ui/avatar/AvatarFallback.md +100 -0
- package/dist/reference/sdk-api/ui/avatar/AvatarGroup.md +100 -0
- package/dist/reference/sdk-api/ui/avatar/AvatarGroupCount.md +100 -0
- package/dist/reference/sdk-api/ui/avatar/AvatarImage.md +108 -0
- package/dist/reference/sdk-api/ui/avatar/index.md +14 -0
- package/dist/reference/sdk-api/ui/badge/Badge.md +114 -0
- package/dist/reference/sdk-api/ui/badge/badgeVariants.md +70 -0
- package/dist/reference/sdk-api/ui/badge/index.md +10 -0
- package/dist/reference/sdk-api/ui/button/Button.md +210 -0
- package/dist/reference/sdk-api/ui/button/ButtonProps.md +188 -0
- package/dist/reference/sdk-api/ui/button/buttonVariants.md +84 -0
- package/dist/reference/sdk-api/ui/button/index.md +11 -0
- package/dist/reference/sdk-api/ui/button-group/ButtonGroup.md +106 -0
- package/dist/reference/sdk-api/ui/button-group/ButtonGroupSeparator.md +106 -0
- package/dist/reference/sdk-api/ui/button-group/ButtonGroupText.md +106 -0
- package/dist/reference/sdk-api/ui/button-group/buttonGroupVariants.md +70 -0
- package/dist/reference/sdk-api/ui/button-group/index.md +12 -0
- package/dist/reference/sdk-api/ui/calendar/Calendar.md +144 -0
- package/dist/reference/sdk-api/ui/calendar/CalendarProps.md +118 -0
- package/dist/reference/sdk-api/ui/calendar/index.md +10 -0
- package/dist/reference/sdk-api/ui/card/Card.md +106 -0
- package/dist/reference/sdk-api/ui/card/CardAction.md +100 -0
- package/dist/reference/sdk-api/ui/card/CardContent.md +100 -0
- package/dist/reference/sdk-api/ui/card/CardDescription.md +100 -0
- package/dist/reference/sdk-api/ui/card/CardFooter.md +100 -0
- package/dist/reference/sdk-api/ui/card/CardHeader.md +100 -0
- package/dist/reference/sdk-api/ui/card/CardTitle.md +100 -0
- package/dist/reference/sdk-api/ui/card/index.md +15 -0
- package/dist/reference/sdk-api/ui/carousel/Carousel.md +108 -0
- package/dist/reference/sdk-api/ui/carousel/CarouselContent.md +100 -0
- package/dist/reference/sdk-api/ui/carousel/CarouselItem.md +100 -0
- package/dist/reference/sdk-api/ui/carousel/CarouselNext.md +219 -0
- package/dist/reference/sdk-api/ui/carousel/CarouselPrevious.md +219 -0
- package/dist/reference/sdk-api/ui/carousel/index.md +14 -0
- package/dist/reference/sdk-api/ui/carousel/useCarousel.md +46 -0
- package/dist/reference/sdk-api/ui/checkbox/Checkbox.md +109 -0
- package/dist/reference/sdk-api/ui/checkbox/index.md +9 -0
- package/dist/reference/sdk-api/ui/collapsible/Collapsible.md +108 -0
- package/dist/reference/sdk-api/ui/collapsible/CollapsibleContent.md +100 -0
- package/dist/reference/sdk-api/ui/collapsible/CollapsibleTrigger.md +119 -0
- package/dist/reference/sdk-api/ui/collapsible/index.md +11 -0
- package/dist/reference/sdk-api/ui/combobox/Combobox.md +124 -0
- package/dist/reference/sdk-api/ui/combobox/ComboboxChip.md +107 -0
- package/dist/reference/sdk-api/ui/combobox/ComboboxChips.md +100 -0
- package/dist/reference/sdk-api/ui/combobox/ComboboxChipsInput.md +107 -0
- package/dist/reference/sdk-api/ui/combobox/ComboboxCollection.md +100 -0
- package/dist/reference/sdk-api/ui/combobox/ComboboxContent.md +106 -0
- package/dist/reference/sdk-api/ui/combobox/ComboboxEmpty.md +100 -0
- package/dist/reference/sdk-api/ui/combobox/ComboboxGroup.md +100 -0
- package/dist/reference/sdk-api/ui/combobox/ComboboxInput.md +113 -0
- package/dist/reference/sdk-api/ui/combobox/ComboboxItem.md +106 -0
- package/dist/reference/sdk-api/ui/combobox/ComboboxLabel.md +100 -0
- package/dist/reference/sdk-api/ui/combobox/ComboboxList.md +105 -0
- package/dist/reference/sdk-api/ui/combobox/ComboboxSeparator.md +100 -0
- package/dist/reference/sdk-api/ui/combobox/ComboboxTrigger.md +100 -0
- package/dist/reference/sdk-api/ui/combobox/ComboboxValue.md +105 -0
- package/dist/reference/sdk-api/ui/combobox/index.md +24 -0
- package/dist/reference/sdk-api/ui/combobox/useComboboxAnchor.md +43 -0
- package/dist/reference/sdk-api/ui/dialog/Dialog.md +58 -0
- package/dist/reference/sdk-api/ui/dialog/DialogClose.md +100 -0
- package/dist/reference/sdk-api/ui/dialog/DialogContent.md +107 -0
- package/dist/reference/sdk-api/ui/dialog/DialogDescription.md +100 -0
- package/dist/reference/sdk-api/ui/dialog/DialogFooter.md +100 -0
- package/dist/reference/sdk-api/ui/dialog/DialogHeader.md +100 -0
- package/dist/reference/sdk-api/ui/dialog/DialogOverlay.md +100 -0
- package/dist/reference/sdk-api/ui/dialog/DialogPortal.md +55 -0
- package/dist/reference/sdk-api/ui/dialog/DialogTitle.md +100 -0
- package/dist/reference/sdk-api/ui/dialog/DialogTrigger.md +106 -0
- package/dist/reference/sdk-api/ui/dialog/index.md +18 -0
- package/dist/reference/sdk-api/ui/drawer/Drawer.md +59 -0
- package/dist/reference/sdk-api/ui/drawer/DrawerClose.md +100 -0
- package/dist/reference/sdk-api/ui/drawer/DrawerContent.md +100 -0
- package/dist/reference/sdk-api/ui/drawer/DrawerDescription.md +100 -0
- package/dist/reference/sdk-api/ui/drawer/DrawerFooter.md +100 -0
- package/dist/reference/sdk-api/ui/drawer/DrawerHeader.md +100 -0
- package/dist/reference/sdk-api/ui/drawer/DrawerOverlay.md +100 -0
- package/dist/reference/sdk-api/ui/drawer/DrawerPortal.md +55 -0
- package/dist/reference/sdk-api/ui/drawer/DrawerTitle.md +100 -0
- package/dist/reference/sdk-api/ui/drawer/DrawerTrigger.md +100 -0
- package/dist/reference/sdk-api/ui/drawer/index.md +18 -0
- package/dist/reference/sdk-api/ui/dropdown-menu/DropdownMenu.md +58 -0
- package/dist/reference/sdk-api/ui/dropdown-menu/DropdownMenuCheckboxItem.md +107 -0
- package/dist/reference/sdk-api/ui/dropdown-menu/DropdownMenuContent.md +106 -0
- package/dist/reference/sdk-api/ui/dropdown-menu/DropdownMenuGroup.md +100 -0
- package/dist/reference/sdk-api/ui/dropdown-menu/DropdownMenuItem.md +107 -0
- package/dist/reference/sdk-api/ui/dropdown-menu/DropdownMenuLabel.md +106 -0
- package/dist/reference/sdk-api/ui/dropdown-menu/DropdownMenuPortal.md +55 -0
- package/dist/reference/sdk-api/ui/dropdown-menu/DropdownMenuRadioGroup.md +100 -0
- package/dist/reference/sdk-api/ui/dropdown-menu/DropdownMenuRadioItem.md +106 -0
- package/dist/reference/sdk-api/ui/dropdown-menu/DropdownMenuSeparator.md +100 -0
- package/dist/reference/sdk-api/ui/dropdown-menu/DropdownMenuShortcut.md +100 -0
- package/dist/reference/sdk-api/ui/dropdown-menu/DropdownMenuSub.md +58 -0
- package/dist/reference/sdk-api/ui/dropdown-menu/DropdownMenuSubContent.md +100 -0
- package/dist/reference/sdk-api/ui/dropdown-menu/DropdownMenuSubTrigger.md +106 -0
- package/dist/reference/sdk-api/ui/dropdown-menu/DropdownMenuTrigger.md +119 -0
- package/dist/reference/sdk-api/ui/dropdown-menu/index.md +23 -0
- package/dist/reference/sdk-api/ui/empty/Empty.md +100 -0
- package/dist/reference/sdk-api/ui/empty/EmptyContent.md +100 -0
- package/dist/reference/sdk-api/ui/empty/EmptyDescription.md +100 -0
- package/dist/reference/sdk-api/ui/empty/EmptyHeader.md +100 -0
- package/dist/reference/sdk-api/ui/empty/EmptyMedia.md +106 -0
- package/dist/reference/sdk-api/ui/empty/EmptyTitle.md +100 -0
- package/dist/reference/sdk-api/ui/empty/index.md +14 -0
- package/dist/reference/sdk-api/ui/field/Field.md +106 -0
- package/dist/reference/sdk-api/ui/field/FieldContent.md +100 -0
- package/dist/reference/sdk-api/ui/field/FieldDescription.md +100 -0
- package/dist/reference/sdk-api/ui/field/FieldError.md +112 -0
- package/dist/reference/sdk-api/ui/field/FieldGroup.md +100 -0
- package/dist/reference/sdk-api/ui/field/FieldLabel.md +85 -0
- package/dist/reference/sdk-api/ui/field/FieldLegend.md +106 -0
- package/dist/reference/sdk-api/ui/field/FieldSeparator.md +105 -0
- package/dist/reference/sdk-api/ui/field/FieldSet.md +100 -0
- package/dist/reference/sdk-api/ui/field/FieldTitle.md +100 -0
- package/dist/reference/sdk-api/ui/field/index.md +18 -0
- package/dist/reference/sdk-api/ui/helpers/collectDataIconState.md +66 -0
- package/dist/reference/sdk-api/ui/helpers/index.md +9 -0
- package/dist/reference/sdk-api/ui/index.md +57 -0
- package/dist/reference/sdk-api/ui/input/Input.md +141 -0
- package/dist/reference/sdk-api/ui/input/index.md +9 -0
- package/dist/reference/sdk-api/ui/input-group/InputGroup.md +100 -0
- package/dist/reference/sdk-api/ui/input-group/InputGroupAddon.md +109 -0
- package/dist/reference/sdk-api/ui/input-group/InputGroupButton.md +220 -0
- package/dist/reference/sdk-api/ui/input-group/InputGroupInput.md +135 -0
- package/dist/reference/sdk-api/ui/input-group/InputGroupText.md +100 -0
- package/dist/reference/sdk-api/ui/input-group/InputGroupTextarea.md +126 -0
- package/dist/reference/sdk-api/ui/input-group/index.md +14 -0
- package/dist/reference/sdk-api/ui/input-otp/InputOTP.md +111 -0
- package/dist/reference/sdk-api/ui/input-otp/InputOTPGroup.md +100 -0
- package/dist/reference/sdk-api/ui/input-otp/InputOTPSeparator.md +100 -0
- package/dist/reference/sdk-api/ui/input-otp/InputOTPSlot.md +107 -0
- package/dist/reference/sdk-api/ui/input-otp/index.md +12 -0
- package/dist/reference/sdk-api/ui/item/Item.md +115 -0
- package/dist/reference/sdk-api/ui/item/ItemActions.md +100 -0
- package/dist/reference/sdk-api/ui/item/ItemContent.md +100 -0
- package/dist/reference/sdk-api/ui/item/ItemDescription.md +100 -0
- package/dist/reference/sdk-api/ui/item/ItemFooter.md +100 -0
- package/dist/reference/sdk-api/ui/item/ItemGroup.md +100 -0
- package/dist/reference/sdk-api/ui/item/ItemHeader.md +100 -0
- package/dist/reference/sdk-api/ui/item/ItemMedia.md +106 -0
- package/dist/reference/sdk-api/ui/item/ItemSeparator.md +106 -0
- package/dist/reference/sdk-api/ui/item/ItemTitle.md +100 -0
- package/dist/reference/sdk-api/ui/item/index.md +18 -0
- package/dist/reference/sdk-api/ui/label/Label.md +85 -0
- package/dist/reference/sdk-api/ui/label/index.md +9 -0
- package/dist/reference/sdk-api/ui/menubar/Menubar.md +100 -0
- package/dist/reference/sdk-api/ui/menubar/MenubarCheckboxItem.md +111 -0
- package/dist/reference/sdk-api/ui/menubar/MenubarContent.md +108 -0
- package/dist/reference/sdk-api/ui/menubar/MenubarGroup.md +100 -0
- package/dist/reference/sdk-api/ui/menubar/MenubarItem.md +109 -0
- package/dist/reference/sdk-api/ui/menubar/MenubarLabel.md +106 -0
- package/dist/reference/sdk-api/ui/menubar/MenubarMenu.md +55 -0
- package/dist/reference/sdk-api/ui/menubar/MenubarPortal.md +55 -0
- package/dist/reference/sdk-api/ui/menubar/MenubarRadioGroup.md +108 -0
- package/dist/reference/sdk-api/ui/menubar/MenubarRadioItem.md +110 -0
- package/dist/reference/sdk-api/ui/menubar/MenubarSeparator.md +100 -0
- package/dist/reference/sdk-api/ui/menubar/MenubarShortcut.md +100 -0
- package/dist/reference/sdk-api/ui/menubar/MenubarSub.md +58 -0
- package/dist/reference/sdk-api/ui/menubar/MenubarSubContent.md +108 -0
- package/dist/reference/sdk-api/ui/menubar/MenubarSubTrigger.md +107 -0
- package/dist/reference/sdk-api/ui/menubar/MenubarTrigger.md +100 -0
- package/dist/reference/sdk-api/ui/menubar/index.md +24 -0
- package/dist/reference/sdk-api/ui/navigation-menu/NavigationMenu.md +100 -0
- package/dist/reference/sdk-api/ui/navigation-menu/NavigationMenuContent.md +106 -0
- package/dist/reference/sdk-api/ui/navigation-menu/NavigationMenuIndicator.md +100 -0
- package/dist/reference/sdk-api/ui/navigation-menu/NavigationMenuItem.md +106 -0
- package/dist/reference/sdk-api/ui/navigation-menu/NavigationMenuLink.md +106 -0
- package/dist/reference/sdk-api/ui/navigation-menu/NavigationMenuList.md +100 -0
- package/dist/reference/sdk-api/ui/navigation-menu/NavigationMenuPositioner.md +100 -0
- package/dist/reference/sdk-api/ui/navigation-menu/NavigationMenuTrigger.md +120 -0
- package/dist/reference/sdk-api/ui/navigation-menu/index.md +17 -0
- package/dist/reference/sdk-api/ui/navigation-menu/navigationMenuTriggerStyle.md +64 -0
- package/dist/reference/sdk-api/ui/pagination/Pagination.md +100 -0
- package/dist/reference/sdk-api/ui/pagination/PaginationContent.md +100 -0
- package/dist/reference/sdk-api/ui/pagination/PaginationEllipsis.md +100 -0
- package/dist/reference/sdk-api/ui/pagination/PaginationItem.md +100 -0
- package/dist/reference/sdk-api/ui/pagination/PaginationLink.md +107 -0
- package/dist/reference/sdk-api/ui/pagination/PaginationNext.md +121 -0
- package/dist/reference/sdk-api/ui/pagination/PaginationPrevious.md +121 -0
- package/dist/reference/sdk-api/ui/pagination/index.md +15 -0
- package/dist/reference/sdk-api/ui/popover/Popover.md +58 -0
- package/dist/reference/sdk-api/ui/popover/PopoverAnchor.md +100 -0
- package/dist/reference/sdk-api/ui/popover/PopoverContent.md +108 -0
- package/dist/reference/sdk-api/ui/popover/PopoverDescription.md +100 -0
- package/dist/reference/sdk-api/ui/popover/PopoverHeader.md +100 -0
- package/dist/reference/sdk-api/ui/popover/PopoverTitle.md +100 -0
- package/dist/reference/sdk-api/ui/popover/PopoverTrigger.md +119 -0
- package/dist/reference/sdk-api/ui/popover/index.md +15 -0
- package/dist/reference/sdk-api/ui/portal/Portal.md +55 -0
- package/dist/reference/sdk-api/ui/portal/index.md +9 -0
- package/dist/reference/sdk-api/ui/progress/Progress.md +109 -0
- package/dist/reference/sdk-api/ui/progress/ProgressIndicator.md +107 -0
- package/dist/reference/sdk-api/ui/progress/ProgressLabel.md +100 -0
- package/dist/reference/sdk-api/ui/progress/ProgressTrack.md +100 -0
- package/dist/reference/sdk-api/ui/progress/ProgressValue.md +105 -0
- package/dist/reference/sdk-api/ui/progress/index.md +13 -0
- package/dist/reference/sdk-api/ui/radio-group/RadioGroup.md +108 -0
- package/dist/reference/sdk-api/ui/radio-group/RadioGroupItem.md +107 -0
- package/dist/reference/sdk-api/ui/radio-group/index.md +10 -0
- package/dist/reference/sdk-api/ui/resizable/ResizableHandle.md +107 -0
- package/dist/reference/sdk-api/ui/resizable/ResizablePanel.md +108 -0
- package/dist/reference/sdk-api/ui/resizable/ResizablePanelGroup.md +107 -0
- package/dist/reference/sdk-api/ui/resizable/index.md +11 -0
- package/dist/reference/sdk-api/ui/scroll-area/ScrollArea.md +159 -0
- package/dist/reference/sdk-api/ui/scroll-area/ScrollBar.md +106 -0
- package/dist/reference/sdk-api/ui/scroll-area/index.md +10 -0
- package/dist/reference/sdk-api/ui/select/Select.md +80 -0
- package/dist/reference/sdk-api/ui/select/SelectContent.md +106 -0
- package/dist/reference/sdk-api/ui/select/SelectGroup.md +100 -0
- package/dist/reference/sdk-api/ui/select/SelectItem.md +106 -0
- package/dist/reference/sdk-api/ui/select/SelectLabel.md +100 -0
- package/dist/reference/sdk-api/ui/select/SelectScrollDownButton.md +100 -0
- package/dist/reference/sdk-api/ui/select/SelectScrollUpButton.md +100 -0
- package/dist/reference/sdk-api/ui/select/SelectSeparator.md +100 -0
- package/dist/reference/sdk-api/ui/select/SelectTrigger.md +106 -0
- package/dist/reference/sdk-api/ui/select/SelectValue.md +106 -0
- package/dist/reference/sdk-api/ui/select/index.md +18 -0
- package/dist/reference/sdk-api/ui/separator/Separator.md +106 -0
- package/dist/reference/sdk-api/ui/separator/index.md +9 -0
- package/dist/reference/sdk-api/ui/sheet/Sheet.md +58 -0
- package/dist/reference/sdk-api/ui/sheet/SheetClose.md +100 -0
- package/dist/reference/sdk-api/ui/sheet/SheetContent.md +113 -0
- package/dist/reference/sdk-api/ui/sheet/SheetDescription.md +100 -0
- package/dist/reference/sdk-api/ui/sheet/SheetFooter.md +100 -0
- package/dist/reference/sdk-api/ui/sheet/SheetHeader.md +100 -0
- package/dist/reference/sdk-api/ui/sheet/SheetOverlay.md +100 -0
- package/dist/reference/sdk-api/ui/sheet/SheetPortal.md +55 -0
- package/dist/reference/sdk-api/ui/sheet/SheetTitle.md +100 -0
- package/dist/reference/sdk-api/ui/sheet/SheetTrigger.md +100 -0
- package/dist/reference/sdk-api/ui/sheet/index.md +18 -0
- package/dist/reference/sdk-api/ui/skeleton/Skeleton.md +100 -0
- package/dist/reference/sdk-api/ui/skeleton/index.md +9 -0
- package/dist/reference/sdk-api/ui/slider/Slider.md +116 -0
- package/dist/reference/sdk-api/ui/slider/index.md +9 -0
- package/dist/reference/sdk-api/ui/sonner/Toaster.md +43 -0
- package/dist/reference/sdk-api/ui/sonner/index.md +10 -0
- package/dist/reference/sdk-api/ui/sonner/toast.md +58 -0
- package/dist/reference/sdk-api/ui/spinner/Spinner.md +100 -0
- package/dist/reference/sdk-api/ui/spinner/index.md +9 -0
- package/dist/reference/sdk-api/ui/switch/Switch.md +110 -0
- package/dist/reference/sdk-api/ui/switch/index.md +9 -0
- package/dist/reference/sdk-api/ui/table/Table.md +100 -0
- package/dist/reference/sdk-api/ui/table/TableBody.md +100 -0
- package/dist/reference/sdk-api/ui/table/TableCaption.md +100 -0
- package/dist/reference/sdk-api/ui/table/TableCell.md +106 -0
- package/dist/reference/sdk-api/ui/table/TableFooter.md +100 -0
- package/dist/reference/sdk-api/ui/table/TableHead.md +106 -0
- package/dist/reference/sdk-api/ui/table/TableHeader.md +100 -0
- package/dist/reference/sdk-api/ui/table/TableRow.md +100 -0
- package/dist/reference/sdk-api/ui/table/index.md +16 -0
- package/dist/reference/sdk-api/ui/tabs/Tabs.md +109 -0
- package/dist/reference/sdk-api/ui/tabs/TabsContent.md +106 -0
- package/dist/reference/sdk-api/ui/tabs/TabsList.md +106 -0
- package/dist/reference/sdk-api/ui/tabs/TabsTrigger.md +107 -0
- package/dist/reference/sdk-api/ui/tabs/index.md +13 -0
- package/dist/reference/sdk-api/ui/tabs/tabsListVariants.md +70 -0
- package/dist/reference/sdk-api/ui/textarea/Textarea.md +126 -0
- package/dist/reference/sdk-api/ui/textarea/index.md +9 -0
- package/dist/reference/sdk-api/ui/toggle/Toggle.md +118 -0
- package/dist/reference/sdk-api/ui/toggle/index.md +10 -0
- package/dist/reference/sdk-api/ui/toggle/toggleVariants.md +71 -0
- package/dist/reference/sdk-api/ui/toggle-group/ToggleGroup.md +122 -0
- package/dist/reference/sdk-api/ui/toggle-group/ToggleGroupItem.md +116 -0
- package/dist/reference/sdk-api/ui/toggle-group/index.md +10 -0
- package/dist/reference/sdk-api.json +74470 -146
- package/dist/reference/sdk-api.md +62 -3
- package/dist/ui/accordion.d.ts +48 -0
- package/dist/ui/accordion.js +40 -0
- package/dist/ui/accordion.js.map +1 -1
- package/dist/ui/alert-dialog.d.ts +123 -0
- package/dist/ui/alert-dialog.js +114 -0
- package/dist/ui/alert-dialog.js.map +1 -1
- package/dist/ui/alert.d.ts +41 -0
- package/dist/ui/alert.js +41 -0
- package/dist/ui/alert.js.map +1 -1
- package/dist/ui/aspect-ratio.d.ts +11 -0
- package/dist/ui/aspect-ratio.js +10 -0
- package/dist/ui/aspect-ratio.js.map +1 -1
- package/dist/ui/avatar.d.ts +65 -0
- package/dist/ui/avatar.js +63 -0
- package/dist/ui/avatar.js.map +1 -1
- package/dist/ui/badge.d.ts +22 -0
- package/dist/ui/badge.js +22 -0
- package/dist/ui/badge.js.map +1 -1
- package/dist/ui/button-group.d.ts +45 -0
- package/dist/ui/button-group.js +43 -0
- package/dist/ui/button-group.js.map +1 -1
- package/dist/ui/button.d.ts +52 -0
- package/dist/ui/button.js +30 -0
- package/dist/ui/button.js.map +1 -1
- package/dist/ui/calendar.d.ts +44 -0
- package/dist/ui/calendar.js +19 -0
- package/dist/ui/calendar.js.map +1 -1
- package/dist/ui/card.d.ts +71 -0
- package/dist/ui/card.js +70 -0
- package/dist/ui/card.js.map +1 -1
- package/dist/ui/carousel.d.ts +71 -0
- package/dist/ui/carousel.js +66 -0
- package/dist/ui/carousel.js.map +1 -1
- package/dist/ui/checkbox.d.ts +14 -0
- package/dist/ui/checkbox.js +10 -0
- package/dist/ui/checkbox.js.map +1 -1
- package/dist/ui/collapsible.d.ts +37 -0
- package/dist/ui/collapsible.js +30 -0
- package/dist/ui/collapsible.js.map +1 -1
- package/dist/ui/combobox.d.ts +190 -0
- package/dist/ui/combobox.js +167 -0
- package/dist/ui/combobox.js.map +1 -1
- package/dist/ui/dialog.d.ts +109 -0
- package/dist/ui/dialog.js +100 -0
- package/dist/ui/dialog.js.map +1 -1
- package/dist/ui/drawer.d.ts +106 -0
- package/dist/ui/drawer.js +100 -0
- package/dist/ui/drawer.js.map +1 -1
- package/dist/ui/dropdown-menu.d.ts +171 -0
- package/dist/ui/dropdown-menu.js +150 -0
- package/dist/ui/dropdown-menu.js.map +1 -1
- package/dist/ui/empty.d.ts +61 -0
- package/dist/ui/empty.js +61 -0
- package/dist/ui/empty.js.map +1 -1
- package/dist/ui/field.d.ts +105 -0
- package/dist/ui/field.js +101 -0
- package/dist/ui/field.js.map +1 -1
- package/dist/ui/helpers.d.ts +11 -0
- package/dist/ui/helpers.js +11 -0
- package/dist/ui/helpers.js.map +1 -1
- package/dist/ui/input-group.d.ts +65 -0
- package/dist/ui/input-group.js +65 -0
- package/dist/ui/input-group.js.map +1 -1
- package/dist/ui/input-otp.d.ts +48 -0
- package/dist/ui/input-otp.js +40 -0
- package/dist/ui/input-otp.js.map +1 -1
- package/dist/ui/input.d.ts +24 -2
- package/dist/ui/input.js +20 -0
- package/dist/ui/input.js.map +1 -1
- package/dist/ui/item.d.ts +103 -0
- package/dist/ui/item.js +103 -0
- package/dist/ui/item.js.map +1 -1
- package/dist/ui/label.d.ts +10 -0
- package/dist/ui/label.js +10 -0
- package/dist/ui/label.js.map +1 -1
- package/dist/ui/menubar.d.ts +193 -0
- package/dist/ui/menubar.js +160 -0
- package/dist/ui/menubar.js.map +1 -1
- package/dist/ui/navigation-menu.d.ts +98 -0
- package/dist/ui/navigation-menu.js +90 -0
- package/dist/ui/navigation-menu.js.map +1 -1
- package/dist/ui/pagination.d.ts +76 -0
- package/dist/ui/pagination.js +73 -0
- package/dist/ui/pagination.js.map +1 -1
- package/dist/ui/popover.d.ts +81 -0
- package/dist/ui/popover.js +70 -0
- package/dist/ui/popover.js.map +1 -1
- package/dist/ui/portal.d.ts +11 -0
- package/dist/ui/portal.js +10 -0
- package/dist/ui/portal.js.map +1 -1
- package/dist/ui/progress.d.ts +53 -26
- package/dist/ui/progress.js +50 -26
- package/dist/ui/progress.js.map +1 -1
- package/dist/ui/radio-group.d.ts +25 -0
- package/dist/ui/radio-group.js +20 -0
- package/dist/ui/radio-group.js.map +1 -1
- package/dist/ui/resizable.d.ts +37 -0
- package/dist/ui/resizable.js +30 -0
- package/dist/ui/resizable.js.map +1 -1
- package/dist/ui/scroll-area.d.ts +22 -0
- package/dist/ui/scroll-area.js +21 -0
- package/dist/ui/scroll-area.js.map +1 -1
- package/dist/ui/select.d.ts +122 -0
- package/dist/ui/select.js +108 -0
- package/dist/ui/select.js.map +1 -1
- package/dist/ui/separator.d.ts +11 -0
- package/dist/ui/separator.js +10 -0
- package/dist/ui/separator.js.map +1 -1
- package/dist/ui/sheet.d.ts +107 -0
- package/dist/ui/sheet.js +101 -0
- package/dist/ui/sheet.js.map +1 -1
- package/dist/ui/skeleton.d.ts +10 -0
- package/dist/ui/skeleton.js +10 -0
- package/dist/ui/skeleton.js.map +1 -1
- package/dist/ui/slider.d.ts +21 -0
- package/dist/ui/slider.js +14 -0
- package/dist/ui/slider.js.map +1 -1
- package/dist/ui/sonner.d.ts +23 -0
- package/dist/ui/sonner.js +21 -0
- package/dist/ui/sonner.js.map +1 -1
- package/dist/ui/spinner.d.ts +10 -0
- package/dist/ui/spinner.js +10 -0
- package/dist/ui/spinner.js.map +1 -1
- package/dist/ui/switch.d.ts +15 -0
- package/dist/ui/switch.js +10 -0
- package/dist/ui/switch.js.map +1 -1
- package/dist/ui/table.d.ts +81 -0
- package/dist/ui/table.js +80 -0
- package/dist/ui/table.js.map +1 -1
- package/dist/ui/tabs.d.ts +59 -0
- package/dist/ui/tabs.js +51 -0
- package/dist/ui/tabs.js.map +1 -1
- package/dist/ui/textarea.d.ts +13 -0
- package/dist/ui/textarea.js +13 -0
- package/dist/ui/textarea.js.map +1 -1
- package/dist/ui/toggle-group.d.ts +34 -0
- package/dist/ui/toggle-group.js +24 -0
- package/dist/ui/toggle-group.js.map +1 -1
- package/dist/ui/toggle.d.ts +28 -0
- package/dist/ui/toggle.js +24 -0
- package/dist/ui/toggle.js.map +1 -1
- package/package.json +4 -2
- package/release-provenance.json +15 -0
- package/src/adapters/interest-card/eslint/eslint-plugin-custom-navigation.mjs +2 -0
- package/src/adapters/interest-card/eslint/taro.mjs +21 -0
- package/src/adapters/interest-card/runtime/microapp.ts +11 -0
- package/src/adapters/interest-card/types/taro.d.ts +28 -0
- package/src/build/config-overrides.ts +39 -0
- package/src/build/index.ts +5 -0
- package/src/build/plugins/app-config.ts +47 -0
- package/src/build/plugins/depend-card/analyze.ts +122 -0
- package/src/build/plugins/depend-card/source.ts +97 -0
- package/src/build/plugins/vite-depend-card.ts +168 -0
- package/src/build/plugins/vite-image-asset-import.ts +178 -0
- package/src/build/plugins/vite-inline-json.ts +149 -0
- package/src/build/plugins/vite-taro-source-location.ts +224 -0
- package/src/build/plugins/vite-tt-components-entry.ts +33 -0
- package/src/build/taro.ts +830 -0
- package/src/components/miniapp-open-card.ts +94 -0
- package/src/components/native-miniapp-open-card.ts +7 -0
- package/src/eslint/eslint-plugin-custom-navigation.mjs +290 -0
- package/src/eslint/eslint-plugin-microapp-pages.mjs +659 -0
- package/src/eslint/server.mjs +69 -0
- package/src/eslint/taro.mjs +564 -0
- package/src/index.ts +2 -0
- package/src/internal/runtime/douyin-open-button.d.ts +29 -0
- package/src/internal/runtime/iframe-auth/identity.ts +236 -0
- package/src/internal/runtime/iframe-auth/index.ts +2 -0
- package/src/internal/runtime/iframe-auth/sync.ts +37 -0
- package/src/internal/vendor-modules.d.ts +8 -0
- package/src/lib/measure.ts +115 -0
- package/src/lib/platform.ts +11 -0
- package/src/lib/utils.ts +6 -0
- package/src/runtime/client.ts +246 -0
- package/src/runtime/default-client.ts +26 -0
- package/src/runtime/default-iframe-auth.ts +13 -0
- package/src/runtime/douyin-container-request.ts +367 -0
- package/src/runtime/douyin-login-request.ts +514 -0
- package/src/runtime/globals.d.ts +342 -0
- package/src/runtime/index.ts +4 -0
- package/src/runtime/network-url.ts +63 -0
- package/src/ui/accordion.tsx +226 -0
- package/src/ui/alert-dialog.tsx +407 -0
- package/src/ui/alert.tsx +149 -0
- package/src/ui/aspect-ratio.tsx +37 -0
- package/src/ui/avatar.tsx +238 -0
- package/src/ui/badge.tsx +77 -0
- package/src/ui/button-group.tsx +173 -0
- package/src/ui/button.tsx +215 -0
- package/src/ui/calendar.tsx +353 -0
- package/src/ui/card.tsx +217 -0
- package/src/ui/carousel.tsx +259 -0
- package/src/ui/checkbox.tsx +62 -0
- package/src/ui/collapsible.tsx +148 -0
- package/src/ui/combobox.tsx +650 -0
- package/src/ui/dialog.tsx +290 -0
- package/src/ui/drawer.tsx +272 -0
- package/src/ui/dropdown-menu.tsx +547 -0
- package/src/ui/empty.tsx +166 -0
- package/src/ui/field.tsx +427 -0
- package/src/ui/helpers.tsx +39 -0
- package/src/ui/index.ts +47 -0
- package/src/ui/input-group.tsx +320 -0
- package/src/ui/input-otp.tsx +189 -0
- package/src/ui/input.tsx +60 -0
- package/src/ui/item.tsx +338 -0
- package/src/ui/label.tsx +31 -0
- package/src/ui/menubar.tsx +835 -0
- package/src/ui/navigation-menu.tsx +341 -0
- package/src/ui/pagination.tsx +195 -0
- package/src/ui/popover.tsx +363 -0
- package/src/ui/portal.tsx +31 -0
- package/src/ui/progress.tsx +182 -0
- package/src/ui/radio-group.tsx +111 -0
- package/src/ui/resizable.tsx +410 -0
- package/src/ui/scroll-area.tsx +102 -0
- package/src/ui/select.tsx +471 -0
- package/src/ui/separator.tsx +37 -0
- package/src/ui/sheet.tsx +289 -0
- package/src/ui/skeleton.tsx +25 -0
- package/src/ui/slider.tsx +176 -0
- package/src/ui/sonner.tsx +40 -0
- package/src/ui/spinner.tsx +23 -0
- package/src/ui/switch.tsx +94 -0
- package/src/ui/table.tsx +240 -0
- package/src/ui/tabs.tsx +233 -0
- package/src/ui/tailwind.css +2 -0
- package/src/ui/textarea.tsx +49 -0
- package/src/ui/theme.css +234 -0
- package/src/ui/toggle-group.tsx +215 -0
- package/src/ui/toggle.tsx +113 -0
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# MiniappOpenCardErrorDetail
|
|
2
|
+
|
|
3
|
+
<!-- Generated by build/src/sdk-reference/skill-reference.ts. Do not edit. -->
|
|
4
|
+
|
|
5
|
+
导入路径:`@open-dy/vibecoding-sdk-taro/components/miniapp-open-card`
|
|
6
|
+
源码:实际安装的 `@open-dy/vibecoding-sdk-taro` 包内 `src/components/miniapp-open-card.ts`(仅补缺或排错时读取)。
|
|
7
|
+
|
|
8
|
+
#### 说明
|
|
9
|
+
|
|
10
|
+
内嵌卡加载错误的事件 detail;可选错误字段由平台提供。
|
|
11
|
+
|
|
12
|
+
示例:
|
|
13
|
+
|
|
14
|
+
```ts
|
|
15
|
+
const detail: MiniappOpenCardErrorDetail = { errMsg: '卡片加载失败' }
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
#### AI 使用约束
|
|
19
|
+
|
|
20
|
+
| 规则 | 内容 |
|
|
21
|
+
| --- | --- |
|
|
22
|
+
| 意图 | 识别内嵌卡加载失败的事件字段。 |
|
|
23
|
+
| 适用时机 | 宿主需要通过 onError 展示错误或记录诊断信息时。 |
|
|
24
|
+
| 避免 | 不要假设可选错误编号或类型一定存在。 |
|
|
25
|
+
|
|
26
|
+
#### 声明
|
|
27
|
+
|
|
28
|
+
```ts
|
|
29
|
+
export interface MiniappOpenCardErrorDetail {
|
|
30
|
+
errMsg: string;
|
|
31
|
+
errNo?: number;
|
|
32
|
+
errorCode?: number;
|
|
33
|
+
errorType?: string;
|
|
34
|
+
}
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### MiniappOpenCardErrorDetail 的类型契约
|
|
38
|
+
|
|
39
|
+
#### 类型
|
|
40
|
+
|
|
41
|
+
```ts
|
|
42
|
+
MiniappOpenCardErrorDetail
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
#### 字段
|
|
46
|
+
|
|
47
|
+
| 字段 | 类型 | 说明 |
|
|
48
|
+
| --- | --- | --- |
|
|
49
|
+
| errMsg | `string` | 平台返回的错误消息。 |
|
|
50
|
+
| errNo? | `number \| undefined` | 平台错误编号;平台未提供时省略。 |
|
|
51
|
+
| errorCode? | `number \| undefined` | 平台错误码;平台未提供时省略。 |
|
|
52
|
+
| errorType? | `string \| undefined` | 平台错误类型;平台未提供时省略。 |
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# MiniappOpenCardProps
|
|
2
|
+
|
|
3
|
+
<!-- Generated by build/src/sdk-reference/skill-reference.ts. Do not edit. -->
|
|
4
|
+
|
|
5
|
+
导入路径:`@open-dy/vibecoding-sdk-taro/components/miniapp-open-card`
|
|
6
|
+
源码:实际安装的 `@open-dy/vibecoding-sdk-taro` 包内 `src/components/miniapp-open-card.ts`(仅补缺或排错时读取)。
|
|
7
|
+
|
|
8
|
+
#### 说明
|
|
9
|
+
|
|
10
|
+
普通 Taro 宿主的内嵌卡属性;沿用 StandardProps,但不接受 children 或 envVersion。
|
|
11
|
+
|
|
12
|
+
示例:
|
|
13
|
+
|
|
14
|
+
```ts
|
|
15
|
+
const props: MiniappOpenCardProps = { appId: OPEN_CARD_ID, path: 'pages/index/index', initData: {} }
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
#### AI 使用约束
|
|
19
|
+
|
|
20
|
+
| 规则 | 内容 |
|
|
21
|
+
| --- | --- |
|
|
22
|
+
| 意图 | 配置宿主实际承载的 OpenCard 页面。 |
|
|
23
|
+
| 适用时机 | 普通小程序或兴趣卡落地页需要渲染内嵌卡时。 |
|
|
24
|
+
| 避免 | 不要传小程序 APP_ID、未确认的页面路径或私域结果作为 initData。 |
|
|
25
|
+
|
|
26
|
+
#### 声明
|
|
27
|
+
|
|
28
|
+
```ts
|
|
29
|
+
export interface MiniappOpenCardProps extends Omit<StandardProps, 'children'> {
|
|
30
|
+
appId: string;
|
|
31
|
+
path: string;
|
|
32
|
+
initData?: Record<string, unknown>;
|
|
33
|
+
onLoad?: BaseEventOrigFunction<Record<string, never>>;
|
|
34
|
+
onError?: BaseEventOrigFunction<MiniappOpenCardErrorDetail>;
|
|
35
|
+
}
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### MiniappOpenCardProps 的类型契约
|
|
39
|
+
|
|
40
|
+
#### 类型
|
|
41
|
+
|
|
42
|
+
```ts
|
|
43
|
+
MiniappOpenCardProps
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
#### 字段
|
|
47
|
+
|
|
48
|
+
| 字段 | 类型 | 说明 |
|
|
49
|
+
| --- | --- | --- |
|
|
50
|
+
| appId | `string` | 已确认的目标 OpenCard 标识;承载当前工程时使用非空 OPEN_CARD_ID,不使用小程序 APP_ID。 |
|
|
51
|
+
| path | `string` | 目标卡片的真实页面路径,例如 pages/index/index。 |
|
|
52
|
+
| initData? | `Record<string, unknown> \| undefined` | 卡片初始化对象;省略时传空对象。禁止传 null、数组或 JSON 字符串。 |
|
|
53
|
+
| onLoad? | `BaseEventOrigFunction<Record<string, never>> \| undefined` | 卡片加载成功时调用;event.detail 为空对象。 |
|
|
54
|
+
| onError? | `BaseEventOrigFunction<MiniappOpenCardErrorDetail> \| undefined` | 卡片加载失败时调用;读取 event.detail 中的错误消息与平台可选错误字段。 |
|
|
55
|
+
| style? | `string \| React.CSSProperties \| undefined` | 组件的内联样式, 可以动态设置的内联样式 |
|
|
56
|
+
| id? | `string \| undefined` | 组件的唯一标示, 保持整个页面唯一 |
|
|
57
|
+
| className? | `string \| undefined` | 同 `class`,在 React/Preact 里一般使用 `className` 作为 `class` 的代称 |
|
|
58
|
+
| key? | `string \| number \| undefined` | 如果列表中项目的位置会动态改变或者有新的项目添加到列表中, 需要使用 `wx:key` 来指定列表中项目的唯一的标识符。 |
|
|
59
|
+
| hidden? | `boolean \| undefined` | 组件是否显示, 所有组件默认显示 |
|
|
60
|
+
| animation? | `TaroGeneral.IAnyObject \| { actions: TaroGeneral.IAnyObject[]; } \| undefined` | 动画属性 |
|
|
61
|
+
| ref? | `React.LegacyRef<any> \| undefined` | 引用 |
|
|
62
|
+
| dangerouslySetInnerHTML? | `{ __html: string; } \| undefined` | 渲染 HTML |
|
|
63
|
+
| compileMode? | `string \| boolean \| undefined` | 是否开启编译模式 或者 是否是编译模式的子渲染函数 |
|
|
64
|
+
| harmonyDirection? | `"row" \| "column" \| "flex" \| undefined` | 自定义容器组件的方向 |
|
|
65
|
+
| onTouchStart? | `((event: ITouchEvent) => void) \| undefined` | 手指触摸动作开始 |
|
|
66
|
+
| onTouchMove? | `((event: ITouchEvent) => void) \| undefined` | 手指触摸后移动 |
|
|
67
|
+
| onTouchCancel? | `((event: ITouchEvent) => void) \| undefined` | 手指触摸动作被打断,如来电提醒,弹窗 |
|
|
68
|
+
| onTouchEnd? | `((event: ITouchEvent) => void) \| undefined` | 手指触摸动作结束 |
|
|
69
|
+
| onClick? | `((event: ITouchEvent) => void) \| undefined` | 手指触摸后马上离开 |
|
|
70
|
+
| onLongPress? | `((event: CommonEvent) => void) \| undefined` | 手指触摸后,超过350ms再离开,如果指定了事件回调函数并触发了这个事件,tap事件将不被触发 |
|
|
71
|
+
| onLongClick? | `((event: CommonEvent) => void) \| undefined` | 手指触摸后,超过350ms再离开(推荐使用 longpress 事件代替) |
|
|
72
|
+
| onTransitionEnd? | `((event: CommonEvent) => void) \| undefined` | 会在 WXSS transition 或 Taro.createAnimation 动画结束后触发 |
|
|
73
|
+
| onAnimationStart? | `((event: CommonEvent) => void) \| undefined` | 会在一个 WXSS animation 动画开始时触发 |
|
|
74
|
+
| onAnimationIteration? | `((event: CommonEvent) => void) \| undefined` | 会在一个 WXSS animation 一次迭代结束时触发 |
|
|
75
|
+
| onAnimationEnd? | `((event: CommonEvent) => void) \| undefined` | 会在一个 WXSS animation 动画完成时触发 |
|
|
76
|
+
| onTouchForceChange? | `((event: CommonEvent) => void) \| undefined` | 在支持 3D Touch 的 iPhone 设备,重按时会触发 |
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# components/miniapp-open-card
|
|
2
|
+
|
|
3
|
+
<!-- Generated by build/src/sdk-reference/skill-reference.ts. Do not edit. -->
|
|
4
|
+
|
|
5
|
+
导入路径前缀:`@open-dy/vibecoding-sdk-taro/components/miniapp-open-card`
|
|
6
|
+
|
|
7
|
+
| API | 说明 | 文档 |
|
|
8
|
+
| --- | --- | --- |
|
|
9
|
+
| `MiniappOpenCard` | 承载同一 OpenCard;SDK 选择环境版本并为空初始化参数提供对象,错误类型直接报错。 | [查看](./MiniappOpenCard.md) |
|
|
10
|
+
| `MiniappOpenCardProps` | 普通 Taro 宿主的内嵌卡属性;沿用 StandardProps,但不接受 children 或 envVersion。 | [查看](./MiniappOpenCardProps.md) |
|
|
11
|
+
| `MiniappOpenCardErrorDetail` | 内嵌卡加载错误的事件 detail;可选错误字段由平台提供。 | [查看](./MiniappOpenCardErrorDetail.md) |
|
|
12
|
+
| `MiniappOpenCardEnvVersion` | SDK 根据宿主环境选择的卡片版本;不是业务组件的可配置属性。 | [查看](./MiniappOpenCardEnvVersion.md) |
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
<!-- Generated from packages/lucide-taro/README.md. Do not edit. -->
|
|
2
|
+
|
|
3
|
+
> 本文收录配套图标库的文档;图标包是工程的独立依赖,不由 SDK 重新导出。业务从 `@open-dy/lucide-taro` 导入,Feed OpenCard 不使用。实际版本和可用图标以当前工程安装的图标包及其公开导出为准。
|
|
4
|
+
|
|
5
|
+
# @open-dy/lucide-taro
|
|
6
|
+
|
|
7
|
+
面向 Taro 小程序的 Lucide 图标组件库,并提供生成小程序 TabBar PNG 图标的命令行工具。
|
|
8
|
+
|
|
9
|
+
## 安装
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
pnpm add @open-dy/lucide-taro
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
项目需要同时安装兼容版本的 React 与 `@tarojs/components`。
|
|
16
|
+
|
|
17
|
+
## 使用图标组件
|
|
18
|
+
|
|
19
|
+
图标名和常用 API 与 `lucide-react` 保持一致,业务代码必须从 `@open-dy/lucide-taro` 导入:
|
|
20
|
+
|
|
21
|
+
```tsx
|
|
22
|
+
import { House, Search, Settings } from '@open-dy/lucide-taro'
|
|
23
|
+
import { View } from '@tarojs/components'
|
|
24
|
+
|
|
25
|
+
export function Actions() {
|
|
26
|
+
return (
|
|
27
|
+
<View className="flex items-center gap-3">
|
|
28
|
+
<House size={24} color="#1677ff" strokeWidth={2} />
|
|
29
|
+
<Search size="20" color="#111827" />
|
|
30
|
+
<Settings size={20} color="#6b7280" />
|
|
31
|
+
</View>
|
|
32
|
+
)
|
|
33
|
+
}
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### 图标属性
|
|
37
|
+
|
|
38
|
+
| 属性 | 类型 | 默认值 | 说明 |
|
|
39
|
+
| --- | --- | --- | --- |
|
|
40
|
+
| `size` | `string \| number` | `24` | 图标宽高 |
|
|
41
|
+
| `color` | `string` | `currentColor` | 描边颜色;小程序中建议始终显式传入 |
|
|
42
|
+
| `strokeWidth` | `string \| number` | `2` | 描边宽度 |
|
|
43
|
+
| `filled` | `boolean` | `false` | 使用 `color` 填充图标 |
|
|
44
|
+
| `absoluteStrokeWidth` | `boolean` | `false` | 缩放尺寸时保持视觉描边宽度 |
|
|
45
|
+
| `className` | `string` | - | 添加到外层 Taro `Image` |
|
|
46
|
+
| `style` | `CSSProperties` | - | 添加到外层 Taro `Image` |
|
|
47
|
+
|
|
48
|
+
原生小程序不能直接渲染内联 SVG。本包会把图标序列化为 SVG data URI,并通过 Taro `Image` 组件显示。因此:
|
|
49
|
+
|
|
50
|
+
- `className` 和 `style` 只影响外层 `Image`,不会把 CSS `color` 传入 SVG。
|
|
51
|
+
- 不要依赖 `currentColor` 或 `text-*` class 改变图标笔画,始终显式传递 `color`。
|
|
52
|
+
- 图标所在的按钮或容器应提供明确宽高和居中布局。
|
|
53
|
+
|
|
54
|
+
## 全局默认属性
|
|
55
|
+
|
|
56
|
+
可以使用 `LucideProvider` 为子树设置默认值:
|
|
57
|
+
|
|
58
|
+
```tsx
|
|
59
|
+
import {
|
|
60
|
+
Bell,
|
|
61
|
+
LucideProvider,
|
|
62
|
+
MessageCircle,
|
|
63
|
+
} from '@open-dy/lucide-taro'
|
|
64
|
+
|
|
65
|
+
export function IconGroup() {
|
|
66
|
+
return (
|
|
67
|
+
<LucideProvider size={20} color="#475569" strokeWidth={2}>
|
|
68
|
+
<Bell />
|
|
69
|
+
<MessageCircle color="#1677ff" />
|
|
70
|
+
</LucideProvider>
|
|
71
|
+
)
|
|
72
|
+
}
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
组件自身的属性会覆盖 Provider 默认值。`useLucideContext()` 可读取当前默认配置。
|
|
76
|
+
|
|
77
|
+
## 查找可用图标
|
|
78
|
+
|
|
79
|
+
包会导出 Lucide 的 PascalCase 图标名及常见兼容别名。不要猜测图标是否存在,使用前搜索类型声明:
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
rg "declare const House" node_modules/@open-dy/lucide-taro/dist/lucide-taro.d.ts
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
常见命名形态包括 `House`、`HouseIcon` 和部分历史别名。准确导出列表以 `dist/lucide-taro.d.ts` 为准。
|
|
86
|
+
|
|
87
|
+
## 生成 TabBar PNG
|
|
88
|
+
|
|
89
|
+
小程序 TabBar 不支持 SVG 或 data URI,需要使用本地 PNG。安装 `sharp` 后,可使用包内命令生成普通态和选中态图标:
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
pnpm add -D sharp
|
|
93
|
+
|
|
94
|
+
pnpm exec generate-tabbar-png House Search User \
|
|
95
|
+
-o ./src/assets/tabbar \
|
|
96
|
+
-c "#999999" \
|
|
97
|
+
-a "#1677ff"
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
生成结果:
|
|
101
|
+
|
|
102
|
+
```text
|
|
103
|
+
src/assets/tabbar/
|
|
104
|
+
├── House.png
|
|
105
|
+
├── House-active.png
|
|
106
|
+
├── Search.png
|
|
107
|
+
├── Search-active.png
|
|
108
|
+
├── User.png
|
|
109
|
+
└── User-active.png
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
### CLI 参数
|
|
113
|
+
|
|
114
|
+
| 参数 | 说明 |
|
|
115
|
+
| --- | --- |
|
|
116
|
+
| `<icon...>` | 一个或多个 PascalCase 图标名 |
|
|
117
|
+
| `-o, --out <dir>` | 输出目录,必填 |
|
|
118
|
+
| `--output <name>` | 单图模式的输出文件名前缀 |
|
|
119
|
+
| `-s, --size <n>` | PNG 尺寸,默认 `81` |
|
|
120
|
+
| `-c, --color <hex>` | 普通态颜色,默认 `#999999` |
|
|
121
|
+
| `-a, --active-color <hex>` | 选中态颜色;传入后额外生成 `-active.png` |
|
|
122
|
+
| `-w, --stroke-width <n>` | 描边宽度,默认 `2` |
|
|
123
|
+
| `-h, --help` | 显示帮助 |
|
|
124
|
+
|
|
125
|
+
单图自定义文件名示例:
|
|
126
|
+
|
|
127
|
+
```bash
|
|
128
|
+
pnpm exec generate-tabbar-png House \
|
|
129
|
+
-o ./src/assets/tabbar \
|
|
130
|
+
--output home \
|
|
131
|
+
-c "#999999" \
|
|
132
|
+
-a "#1677ff"
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
## 当前能力
|
|
136
|
+
|
|
137
|
+
- 以 Taro `Image` 渲染 Lucide 图标,支持 H5 与小程序构建。
|
|
138
|
+
- 提供完整 TypeScript 图标类型与常见 Lucide 命名别名。
|
|
139
|
+
- 支持单图属性和 `LucideProvider` 全局默认属性。
|
|
140
|
+
- 支持通过 CLI 批量生成 TabBar 普通态与选中态 PNG。
|
|
141
|
+
- 支持尺寸、颜色、描边宽度和单图输出文件名配置。
|
|
142
|
+
|
|
143
|
+
## 开发与验证
|
|
144
|
+
|
|
145
|
+
```bash
|
|
146
|
+
pnpm build
|
|
147
|
+
pnpm test
|
|
148
|
+
pnpm pack:local
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
`dist/` 是该包直接发布的源码产物。修改图标导出或 TabBar 工具后,需要同步验证 `dist/lucide-taro.mjs`、`dist/lucide-taro.d.ts`、`dist/iconNodes.mjs` 与 `dist/generate-tabbar-png.mjs`。
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<!-- Generated by build/src/sdk-reference/skill-reference.ts. Do not edit. -->
|
|
4
4
|
|
|
5
5
|
导入路径:`@open-dy/vibecoding-sdk-taro/runtime`
|
|
6
|
-
|
|
6
|
+
源码:实际安装的 `@open-dy/vibecoding-sdk-taro` 包内 `src/runtime/client.ts`(仅补缺或排错时读取)。
|
|
7
7
|
|
|
8
8
|
#### 说明
|
|
9
9
|
|
|
@@ -22,7 +22,12 @@ const options = { platformChannel: 'ext' as const }
|
|
|
22
22
|
| 意图 | 配置普通小程序 Network 的平台渠道。 |
|
|
23
23
|
| 适用时机 | 需要让普通小程序请求携带内场或外场渠道标识时。 |
|
|
24
24
|
| 避免 | 不要在业务页面直接拼接渠道请求头。 |
|
|
25
|
-
|
|
25
|
+
|
|
26
|
+
示例:
|
|
27
|
+
|
|
28
|
+
```ts
|
|
29
|
+
{ platformChannel: 'ext' }
|
|
30
|
+
```
|
|
26
31
|
|
|
27
32
|
#### 声明
|
|
28
33
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<!-- Generated by build/src/sdk-reference/skill-reference.ts. Do not edit. -->
|
|
4
4
|
|
|
5
5
|
导入路径:`@open-dy/vibecoding-sdk-taro/runtime`
|
|
6
|
-
|
|
6
|
+
源码:实际安装的 `@open-dy/vibecoding-sdk-taro` 包内 `src/runtime/default-client.ts`(仅补缺或排错时读取)。
|
|
7
7
|
|
|
8
8
|
#### 说明
|
|
9
9
|
|
|
@@ -33,7 +33,12 @@ const response = await Network.request({ url: '/api/products', method: 'GET' })
|
|
|
33
33
|
| 意图 | 创建绑定默认 Taro 实例的普通小程序 Network。 |
|
|
34
34
|
| 适用时机 | 业务代码需要统一调用普通小程序的 request、uploadFile、downloadFile 或 streamSse 时。 |
|
|
35
35
|
| 避免 | 不要在页面中直接调用 Taro.request,也不要传入 OpenCard 的 taro 实例。 |
|
|
36
|
-
|
|
36
|
+
|
|
37
|
+
示例:
|
|
38
|
+
|
|
39
|
+
```ts
|
|
40
|
+
const Network = createMicroappClient({ platformChannel: 'ext' })
|
|
41
|
+
```
|
|
37
42
|
|
|
38
43
|
#### 声明
|
|
39
44
|
|
|
@@ -56,7 +61,7 @@ function createMicroappClient(options?: CreateMicroappClientOptions);
|
|
|
56
61
|
|
|
57
62
|
| 参数 | 类型 | 说明 |
|
|
58
63
|
| --- | --- | --- |
|
|
59
|
-
| options | `CreateMicroappClientOptions` | 平台渠道配置;默认使用内场渠道。 |
|
|
64
|
+
| options? | `CreateMicroappClientOptions` | 平台渠道配置;默认使用内场渠道。 |
|
|
60
65
|
|
|
61
66
|
##### options 字段
|
|
62
67
|
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
# Accordion
|
|
2
|
+
|
|
3
|
+
<!-- Generated by build/src/sdk-reference/skill-reference.ts. Do not edit. -->
|
|
4
|
+
|
|
5
|
+
导入路径:`@open-dy/vibecoding-sdk-taro/ui/accordion`
|
|
6
|
+
源码:实际安装的 `@open-dy/vibecoding-sdk-taro` 包内 `src/ui/accordion.tsx`(仅补缺或排错时读取)。
|
|
7
|
+
|
|
8
|
+
#### 说明
|
|
9
|
+
|
|
10
|
+
手风琴折叠面板组件。
|
|
11
|
+
|
|
12
|
+
参数:
|
|
13
|
+
|
|
14
|
+
| 名称 | 说明 |
|
|
15
|
+
| --- | --- |
|
|
16
|
+
| `props` | 组件属性;自有字段的用途及默认行为见下表,继承属性另列。 |
|
|
17
|
+
|
|
18
|
+
返回:组件渲染结果;类型见返回值契约。
|
|
19
|
+
|
|
20
|
+
示例:
|
|
21
|
+
|
|
22
|
+
```tsx
|
|
23
|
+
import { Accordion } from '@open-dy/vibecoding-sdk-taro/ui/accordion'
|
|
24
|
+
<Accordion />
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
#### AI 使用约束
|
|
28
|
+
|
|
29
|
+
| 规则 | 内容 |
|
|
30
|
+
| --- | --- |
|
|
31
|
+
| 意图 | 普通小程序或兴趣卡落地页:手风琴折叠面板组件。 |
|
|
32
|
+
| 适用时机 | 普通小程序或兴趣卡落地页需要该 UI 模块时,按模块示例组合使用。 |
|
|
33
|
+
| 避免 | 不要用于 Feed OpenCard。属性与组合方式以本页类型和示例为准。 |
|
|
34
|
+
|
|
35
|
+
#### 声明
|
|
36
|
+
|
|
37
|
+
```ts
|
|
38
|
+
declare function Accordion(props: ViewProps & { type?: "single" | "multiple"; value?: string | string[]; defaultValue?: string | string[]; disabled?: boolean; multiple?: boolean; onValueChange?: (value: string | string[]) => void; }): React.JSX.Element;
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
#### 参数
|
|
42
|
+
|
|
43
|
+
- `props`
|
|
44
|
+
|
|
45
|
+
```ts
|
|
46
|
+
ViewProps & { type?: "single" | "multiple"; value?: string | string[]; defaultValue?: string | string[]; disabled?: boolean; multiple?: boolean; onValueChange?: (value: string | string[]) => void; }
|
|
47
|
+
```
|
|
48
|
+
说明:组件属性;自有字段的用途及默认行为见下表,继承属性另列。
|
|
49
|
+
|
|
50
|
+
##### props 组件属性
|
|
51
|
+
|
|
52
|
+
| 字段 | 类型 | 说明 |
|
|
53
|
+
| --- | --- | --- |
|
|
54
|
+
| type? | `"single" \| "multiple" \| undefined` | 展开模式:single 仅展开一项、multiple 可展开多项,默认 single;multiple 为 true 时强制多项展开。 |
|
|
55
|
+
| value? | `string \| string[] \| undefined` | 受控展开项的标识;字符串表示单项,数组表示多项。传入后需在 onValueChange 中同步,省略时由内部状态管理。 |
|
|
56
|
+
| defaultValue? | `string \| string[] \| undefined` | 非受控模式的初始展开项;默认全部收起,字符串表示单项、数组表示多项。仅初始化时读取,传入 value 后不生效。 |
|
|
57
|
+
| disabled? | `boolean \| undefined` | 是否禁止整组切换,默认 false;禁用后各项不能通过内部操作改变选中状态。 |
|
|
58
|
+
| multiple? | `boolean \| undefined` | 多选快捷开关,默认 false;为 true 时优先于 type,允许同时选中多项。 |
|
|
59
|
+
| onValueChange? | `((value: string \| string[]) => void) \| undefined` | 用户展开或收起项目时调用;单项模式返回字符串(全部收起为空字符串),多项模式返回字符串数组(全部收起为空数组)。 |
|
|
60
|
+
|
|
61
|
+
<details>
|
|
62
|
+
|
|
63
|
+
<summary>继承的 Taro / React 属性</summary>
|
|
64
|
+
|
|
65
|
+
以下字段沿用上游类型;组件有特殊处理时,以本页组件属性说明为准。
|
|
66
|
+
|
|
67
|
+
##### 继承属性
|
|
68
|
+
|
|
69
|
+
| 字段 | 类型 | 说明 |
|
|
70
|
+
| --- | --- | --- |
|
|
71
|
+
| hoverClass? | `string \| undefined` | 指定按下去的样式类。当 `hover-class="none"` 时,没有点击态效果 |
|
|
72
|
+
| hoverStyle? | `any` | 由于 RN 不支持 hoverClass,故 RN 端的 View 组件实现了 `hoverStyle`属性,写法和 style 类似,只不过 `hoverStyle` 的样式是指定按下去的样式。 |
|
|
73
|
+
| hoverStopPropagation? | `boolean \| undefined` | 指定是否阻止本节点的祖先节点出现点击态 |
|
|
74
|
+
| hoverStartTime? | `number \| undefined` | 按住后多久出现点击态,单位毫秒 |
|
|
75
|
+
| hoverStayTime? | `number \| undefined` | 手指松开后点击态保留时间,单位毫秒 |
|
|
76
|
+
| disableScroll? | `boolean \| undefined` | 是否阻止区域内滚动页面。 说明: 如果 view 中嵌套 view,外层 view 设置 disable-scroll 为 true 时禁止内部的滚动。 |
|
|
77
|
+
| hidden? | `boolean \| undefined` | 是否隐藏。 |
|
|
78
|
+
| animation? | `TaroGeneral.IAnyObject \| undefined` | 用于动画,详见 my.createAnimation 。使用 my.createAnimation 生成的动画是通过过渡(Transition)实现的,只会触发 onTransitionEnd,不会触发 onAnimationStart, onAnimationIteration, onAnimationEnd。 |
|
|
79
|
+
| role? | `string \| undefined` | 表示组件的语义角色。设置为 img 时,组件聚焦后读屏软件会朗读出 图像 ;设置为 button 时,聚焦后读屏软件会朗读出 按钮 。详情请参见 aria-component。 |
|
|
80
|
+
| ariaRole? | `string \| undefined` | 无障碍访问,(角色)标识元素的作用 |
|
|
81
|
+
| ariaLabel? | `string \| undefined` | 无障碍访问,(属性)元素的额外描述 |
|
|
82
|
+
| onTap? | `CommonEventFunction \| undefined` | 点击。 |
|
|
83
|
+
| onTouchStart? | `CommonEventFunction \| undefined` | 触摸动作开始。 |
|
|
84
|
+
| onTouchMove? | `CommonEventFunction \| undefined` | 触摸后移动。 |
|
|
85
|
+
| onTouchEnd? | `CommonEventFunction \| undefined` | 触摸动作结束。 |
|
|
86
|
+
| onTouchCancel? | `CommonEventFunction \| undefined` | 触摸动作被打断,如来电提醒,弹窗。 |
|
|
87
|
+
| onLongTap? | `CommonEventFunction \| undefined` | 长按 500ms 之后触发,触发了长按事件后进行移动将不会触发屏幕的滚动。 |
|
|
88
|
+
| onTransitionEnd? | `CommonEventFunction \| undefined` | 过渡(Transition)结束时触发。 |
|
|
89
|
+
| onAnimationIteration? | `CommonEventFunction \| undefined` | 每开启一次新的动画过程时触发。(第一次不触发) |
|
|
90
|
+
| onAnimationStart? | `CommonEventFunction \| undefined` | 动画开始时触发。 |
|
|
91
|
+
| onAnimationEnd? | `CommonEventFunction \| undefined` | 动画结束时触发。 |
|
|
92
|
+
| onAppear? | `CommonEventFunction \| undefined` | 当前元素可见面积超过50%时触发。 |
|
|
93
|
+
| onDisappear? | `CommonEventFunction \| undefined` | 当前元素不可见面积超过50%时触发。 |
|
|
94
|
+
| onFirstAppear? | `CommonEventFunction \| undefined` | 当前元素首次可见面积达到50%时触发。 |
|
|
95
|
+
| catchMove? | `boolean \| undefined` | 是否以 catch 的形式绑定 touchmove 事件 |
|
|
96
|
+
| id? | `string \| undefined` | 组件的唯一标示, 保持整个页面唯一 |
|
|
97
|
+
| className? | `string \| undefined` | 同 `class`,在 React/Preact 里一般使用 `className` 作为 `class` 的代称 |
|
|
98
|
+
| style? | `string \| React.CSSProperties \| undefined` | 组件的内联样式, 可以动态设置的内联样式 |
|
|
99
|
+
| children? | `React.ReactNode` | 子节点 |
|
|
100
|
+
| key? | `string \| number \| undefined` | 如果列表中项目的位置会动态改变或者有新的项目添加到列表中, 需要使用 `wx:key` 来指定列表中项目的唯一的标识符。 |
|
|
101
|
+
| ref? | `React.LegacyRef<any> \| undefined` | 引用 |
|
|
102
|
+
| dangerouslySetInnerHTML? | `{ __html: string; } \| undefined` | 渲染 HTML |
|
|
103
|
+
| compileMode? | `string \| boolean \| undefined` | 是否开启编译模式 或者 是否是编译模式的子渲染函数 |
|
|
104
|
+
| harmonyDirection? | `"row" \| "column" \| "flex" \| undefined` | 自定义容器组件的方向 |
|
|
105
|
+
| onClick? | `((event: ITouchEvent) => void) \| undefined` | 手指触摸后马上离开 |
|
|
106
|
+
| onLongPress? | `((event: CommonEvent) => void) \| undefined` | 手指触摸后,超过350ms再离开,如果指定了事件回调函数并触发了这个事件,tap事件将不被触发 |
|
|
107
|
+
| onLongClick? | `((event: CommonEvent) => void) \| undefined` | 手指触摸后,超过350ms再离开(推荐使用 longpress 事件代替) |
|
|
108
|
+
| onTouchForceChange? | `((event: CommonEvent) => void) \| undefined` | 在支持 3D Touch 的 iPhone 设备,重按时会触发 |
|
|
109
|
+
|
|
110
|
+
</details>
|
|
111
|
+
|
|
112
|
+
#### 返回值
|
|
113
|
+
|
|
114
|
+
- 类型:`React.JSX.Element`
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
# AccordionContent
|
|
2
|
+
|
|
3
|
+
<!-- Generated by build/src/sdk-reference/skill-reference.ts. Do not edit. -->
|
|
4
|
+
|
|
5
|
+
导入路径:`@open-dy/vibecoding-sdk-taro/ui/accordion`
|
|
6
|
+
源码:实际安装的 `@open-dy/vibecoding-sdk-taro` 包内 `src/ui/accordion.tsx`(仅补缺或排错时读取)。
|
|
7
|
+
|
|
8
|
+
#### 说明
|
|
9
|
+
|
|
10
|
+
手风琴折叠面板内容容器。
|
|
11
|
+
|
|
12
|
+
参数:
|
|
13
|
+
|
|
14
|
+
| 名称 | 说明 |
|
|
15
|
+
| --- | --- |
|
|
16
|
+
| `props` | 组件属性;自有字段的用途及默认行为见下表,继承属性另列。 |
|
|
17
|
+
|
|
18
|
+
返回:组件渲染结果;类型见返回值契约。
|
|
19
|
+
|
|
20
|
+
示例:
|
|
21
|
+
|
|
22
|
+
```tsx
|
|
23
|
+
import { Accordion, AccordionItem, AccordionContent } from '@open-dy/vibecoding-sdk-taro/ui/accordion'
|
|
24
|
+
<Accordion><AccordionItem value="details"><AccordionContent /></AccordionItem></Accordion>
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
#### AI 使用约束
|
|
28
|
+
|
|
29
|
+
| 规则 | 内容 |
|
|
30
|
+
| --- | --- |
|
|
31
|
+
| 意图 | 普通小程序或兴趣卡落地页:手风琴折叠面板内容容器。 |
|
|
32
|
+
| 适用时机 | 普通小程序或兴趣卡落地页需要该 UI 模块时,按模块示例组合使用。 |
|
|
33
|
+
| 避免 | 不要用于 Feed OpenCard。属性与组合方式以本页类型和示例为准。 |
|
|
34
|
+
|
|
35
|
+
#### 声明
|
|
36
|
+
|
|
37
|
+
```ts
|
|
38
|
+
declare function AccordionContent(props: ViewProps): React.JSX.Element | null;
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
#### 参数
|
|
42
|
+
|
|
43
|
+
| 参数 | 类型 | 说明 |
|
|
44
|
+
| --- | --- | --- |
|
|
45
|
+
| props | `ViewProps` | 组件属性;自有字段的用途及默认行为见下表,继承属性另列。 |
|
|
46
|
+
|
|
47
|
+
<details>
|
|
48
|
+
|
|
49
|
+
<summary>继承的 Taro / React 属性</summary>
|
|
50
|
+
|
|
51
|
+
以下字段沿用上游类型;组件有特殊处理时,以本页组件属性说明为准。
|
|
52
|
+
|
|
53
|
+
##### 继承属性
|
|
54
|
+
|
|
55
|
+
| 字段 | 类型 | 说明 |
|
|
56
|
+
| --- | --- | --- |
|
|
57
|
+
| hoverClass? | `string \| undefined` | 指定按下去的样式类。当 `hover-class="none"` 时,没有点击态效果 |
|
|
58
|
+
| hoverStyle? | `any` | 由于 RN 不支持 hoverClass,故 RN 端的 View 组件实现了 `hoverStyle`属性,写法和 style 类似,只不过 `hoverStyle` 的样式是指定按下去的样式。 |
|
|
59
|
+
| hoverStopPropagation? | `boolean \| undefined` | 指定是否阻止本节点的祖先节点出现点击态 |
|
|
60
|
+
| hoverStartTime? | `number \| undefined` | 按住后多久出现点击态,单位毫秒 |
|
|
61
|
+
| hoverStayTime? | `number \| undefined` | 手指松开后点击态保留时间,单位毫秒 |
|
|
62
|
+
| disableScroll? | `boolean \| undefined` | 是否阻止区域内滚动页面。 说明: 如果 view 中嵌套 view,外层 view 设置 disable-scroll 为 true 时禁止内部的滚动。 |
|
|
63
|
+
| hidden? | `boolean \| undefined` | 是否隐藏。 |
|
|
64
|
+
| animation? | `TaroGeneral.IAnyObject \| undefined` | 用于动画,详见 my.createAnimation 。使用 my.createAnimation 生成的动画是通过过渡(Transition)实现的,只会触发 onTransitionEnd,不会触发 onAnimationStart, onAnimationIteration, onAnimationEnd。 |
|
|
65
|
+
| role? | `string \| undefined` | 表示组件的语义角色。设置为 img 时,组件聚焦后读屏软件会朗读出 图像 ;设置为 button 时,聚焦后读屏软件会朗读出 按钮 。详情请参见 aria-component。 |
|
|
66
|
+
| ariaRole? | `string \| undefined` | 无障碍访问,(角色)标识元素的作用 |
|
|
67
|
+
| ariaLabel? | `string \| undefined` | 无障碍访问,(属性)元素的额外描述 |
|
|
68
|
+
| onTap? | `CommonEventFunction \| undefined` | 点击。 |
|
|
69
|
+
| onTouchStart? | `CommonEventFunction \| undefined` | 触摸动作开始。 |
|
|
70
|
+
| onTouchMove? | `CommonEventFunction \| undefined` | 触摸后移动。 |
|
|
71
|
+
| onTouchEnd? | `CommonEventFunction \| undefined` | 触摸动作结束。 |
|
|
72
|
+
| onTouchCancel? | `CommonEventFunction \| undefined` | 触摸动作被打断,如来电提醒,弹窗。 |
|
|
73
|
+
| onLongTap? | `CommonEventFunction \| undefined` | 长按 500ms 之后触发,触发了长按事件后进行移动将不会触发屏幕的滚动。 |
|
|
74
|
+
| onTransitionEnd? | `CommonEventFunction \| undefined` | 过渡(Transition)结束时触发。 |
|
|
75
|
+
| onAnimationIteration? | `CommonEventFunction \| undefined` | 每开启一次新的动画过程时触发。(第一次不触发) |
|
|
76
|
+
| onAnimationStart? | `CommonEventFunction \| undefined` | 动画开始时触发。 |
|
|
77
|
+
| onAnimationEnd? | `CommonEventFunction \| undefined` | 动画结束时触发。 |
|
|
78
|
+
| onAppear? | `CommonEventFunction \| undefined` | 当前元素可见面积超过50%时触发。 |
|
|
79
|
+
| onDisappear? | `CommonEventFunction \| undefined` | 当前元素不可见面积超过50%时触发。 |
|
|
80
|
+
| onFirstAppear? | `CommonEventFunction \| undefined` | 当前元素首次可见面积达到50%时触发。 |
|
|
81
|
+
| catchMove? | `boolean \| undefined` | 是否以 catch 的形式绑定 touchmove 事件 |
|
|
82
|
+
| id? | `string \| undefined` | 组件的唯一标示, 保持整个页面唯一 |
|
|
83
|
+
| className? | `string \| undefined` | 同 `class`,在 React/Preact 里一般使用 `className` 作为 `class` 的代称 |
|
|
84
|
+
| style? | `string \| React.CSSProperties \| undefined` | 组件的内联样式, 可以动态设置的内联样式 |
|
|
85
|
+
| children? | `React.ReactNode` | 子节点 |
|
|
86
|
+
| key? | `string \| number \| undefined` | 如果列表中项目的位置会动态改变或者有新的项目添加到列表中, 需要使用 `wx:key` 来指定列表中项目的唯一的标识符。 |
|
|
87
|
+
| ref? | `React.LegacyRef<any> \| undefined` | 引用 |
|
|
88
|
+
| dangerouslySetInnerHTML? | `{ __html: string; } \| undefined` | 渲染 HTML |
|
|
89
|
+
| compileMode? | `string \| boolean \| undefined` | 是否开启编译模式 或者 是否是编译模式的子渲染函数 |
|
|
90
|
+
| harmonyDirection? | `"row" \| "column" \| "flex" \| undefined` | 自定义容器组件的方向 |
|
|
91
|
+
| onClick? | `((event: ITouchEvent) => void) \| undefined` | 手指触摸后马上离开 |
|
|
92
|
+
| onLongPress? | `((event: CommonEvent) => void) \| undefined` | 手指触摸后,超过350ms再离开,如果指定了事件回调函数并触发了这个事件,tap事件将不被触发 |
|
|
93
|
+
| onLongClick? | `((event: CommonEvent) => void) \| undefined` | 手指触摸后,超过350ms再离开(推荐使用 longpress 事件代替) |
|
|
94
|
+
| onTouchForceChange? | `((event: CommonEvent) => void) \| undefined` | 在支持 3D Touch 的 iPhone 设备,重按时会触发 |
|
|
95
|
+
|
|
96
|
+
</details>
|
|
97
|
+
|
|
98
|
+
#### 返回值
|
|
99
|
+
|
|
100
|
+
- 类型:`React.JSX.Element | null`
|