From 620b11f2ce7636f331d519d1f4b467adb8d5a2d7 Mon Sep 17 00:00:00 2001 From: Col0ring <1561999073@qq.com> Date: Fri, 13 Sep 2024 19:39:51 +0800 Subject: [PATCH 01/51] feat: integrate ant design --- .husky/commit-msg | 5 +- .husky/pre-commit | 5 +- backend/modelscope_studio/__init__.py | 7 +- .../modelscope_studio/components/__init__.py | 6 - .../components/antd/__init__.py | 142 + .../components/antd/affix/__init__.py | 58 + .../components/antd/alert/__init__.py | 63 + .../antd/alert/error_boundary/__init__.py | 61 + .../components/antd/anchor/__init__.py | 66 + .../components/antd/anchor/item/__init__.py | 54 + .../components/antd/auto_complete/__init__.py | 88 + .../antd/auto_complete/option/__init__.py | 61 + .../components/antd/avatar/__init__.py | 66 + .../components/antd/avatar/group/__init__.py | 52 + .../components/antd/badge/__init__.py | 62 + .../components/antd/badge/ribbon/__init__.py | 52 + .../components/antd/breadcrumb/__init__.py | 57 + .../antd/breadcrumb/item/__init__.py | 98 + .../components/antd/button/__init__.py | 136 + .../components/antd/button/group/__init__.py | 50 + .../components/antd/calendar/__init__.py | 70 + .../components/antd/card/__init__.py | 129 + .../components/antd/card/grid/__init__.py | 64 + .../components/antd/card/meta/__init__.py | 65 + .../components/antd/carousel/__init__.py | 53 + .../components/antd/cascader/__init__.py | 101 + .../components/antd/cascader/constants.py | 2 + .../antd/cascader/option/__init__.py | 61 + .../antd/cascader/panel/__init__.py | 84 + .../components/antd/checkbox/__init__.py | 67 + .../antd/checkbox/group/__init__.py | 91 + .../antd/checkbox/group/option/__init__.py | 63 + .../components/antd/collapse/__init__.py | 88 + .../components/antd/collapse/item/__init__.py | 63 + .../components/antd/color_picker/__init__.py | 85 + .../antd/color_picker/preset/__init__.py | 61 + .../antd/config_provider/__init__.py | 53 + .../components/antd/date_picker/__init__.py | 107 + .../antd/date_picker/preset/__init__.py | 59 + .../antd/date_picker/range_picker/__init__.py | 98 + .../components/antd/descriptions/__init__.py | 60 + .../antd/descriptions/item/__init__.py | 57 + .../components/antd/divider/__init__.py | 82 + .../components/antd/drawer/__init__.py | 66 + .../components/antd/dropdown/__init__.py | 76 + .../antd/dropdown/button/__init__.py | 82 + .../components/antd/empty/__init__.py | 55 + .../components/antd/flex/__init__.py | 79 + .../components/antd/float_button/__init__.py | 63 + .../antd/float_button/back_top/__init__.py | 60 + .../antd/float_button/group/__init__.py | 63 + .../components/antd/form/__init__.py | 82 + .../components/antd/form/item/__init__.py | 61 + .../antd/form/item/rule/__init__.py | 49 + .../components/antd/grid/col/__init__.py | 102 + .../components/antd/grid/row/__init__.py | 78 + .../components/antd/icon/__init__.py | 65 + .../antd/icon/iconfont_provider/__init__.py | 49 + .../components/antd/image/__init__.py | 72 + .../antd/image/preview_group/__init__.py | 66 + .../components/antd/input/__init__.py | 84 + .../components/antd/input/otp/__init__.py | 67 + .../antd/input/password/__init__.py | 82 + .../components/antd/input/search/__init__.py | 83 + .../antd/input/textarea/__init__.py | 73 + .../components/antd/input_number/__init__.py | 84 + .../components/antd/layout/__init__.py | 68 + .../antd/layout/content/__init__.py | 58 + .../components/antd/layout/footer/__init__.py | 58 + .../components/antd/layout/header/__init__.py | 58 + .../components/antd/layout/sider/__init__.py | 64 + .../components/antd/list/__init__.py | 65 + .../components/antd/list/item/__init__.py | 59 + .../antd/list/item/meta/__init__.py | 55 + .../components/antd/mentions/__init__.py | 88 + .../antd/mentions/option/__init__.py | 65 + .../components/antd/menu/__init__.py | 84 + .../components/antd/menu/item/__init__.py | 63 + .../components/antd/message/__init__.py | 64 + .../components/antd/modal/__init__.py | 74 + .../components/antd/notification/__init__.py | 66 + .../components/antd/pagination/__init__.py | 80 + .../components/antd/popconfirm/__init__.py | 77 + .../components/antd/popover/__init__.py | 61 + .../components/antd/progress/__init__.py | 54 + .../components/antd/qr_code/__init__.py | 60 + .../components/antd/radio/__init__.py | 77 + .../components/antd/radio/button/__init__.py | 73 + .../components/antd/radio/group/__init__.py | 81 + .../antd/radio/group/option/__init__.py | 67 + .../components/antd/rate/__init__.py | 80 + .../components/antd/result/__init__.py | 53 + .../components/antd/segmented/__init__.py | 75 + .../antd/segmented/option/__init__.py | 57 + .../components/antd/select/__init__.py | 122 + .../components/antd/select/option/__init__.py | 63 + .../components/antd/skeleton/__init__.py | 60 + .../antd/skeleton/avatar/__init__.py | 50 + .../antd/skeleton/button/__init__.py | 50 + .../antd/skeleton/image/__init__.py | 50 + .../antd/skeleton/input/__init__.py | 50 + .../components/antd/skeleton/node/__init__.py | 50 + .../components/antd/slider/__init__.py | 89 + .../components/antd/slider/mark/__init__.py | 65 + .../components/antd/space/__init__.py | 56 + .../components/antd/space/compact/__init__.py | 49 + .../components/antd/spin/__init__.py | 53 + .../components/antd/statistic/__init__.py | 58 + .../antd/statistic/countdown/__init__.py | 66 + .../components/antd/steps/__init__.py | 61 + .../components/antd/steps/item/__init__.py | 53 + .../components/antd/switch/__init__.py | 71 + .../components/antd/table/__init__.py | 91 + .../components/antd/table/column/__init__.py | 64 + .../antd/table/column_group/__init__.py | 57 + .../components/antd/table/constants.py | 5 + .../antd/table/expandable/__init__.py | 73 + .../antd/table/row_selection/__init__.py | 104 + .../table/row_selection/selection/__init__.py | 69 + .../components/antd/tabs/__init__.py | 82 + .../components/antd/tabs/item/__init__.py | 53 + .../components/antd/tag/__init__.py | 66 + .../antd/tag/checkable_tag/__init__.py | 69 + .../components/antd/time_picker/__init__.py | 83 + .../antd/time_picker/range_picker/__init__.py | 98 + .../components/antd/timeline/__init__.py | 55 + .../components/antd/timeline/item/__init__.py | 53 + .../components/antd/tooltip/__init__.py | 61 + .../components/antd/tour/__init__.py | 77 + .../components/antd/tour/step/__init__.py | 68 + .../components/antd/transfer/__init__.py | 101 + .../components/antd/tree/__init__.py | 115 + .../antd/tree/directory_tree/__init__.py | 111 + .../antd/tree/tree_node/__init__.py | 57 + .../components/antd/tree_select/__init__.py | 99 + .../antd/tree_select/tree_node/__init__.py | 59 + .../components/antd/typography/__init__.py | 11 + .../antd/typography/link/__init__.py | 85 + .../antd/typography/paragraph/__init__.py | 97 + .../antd/typography/text/__init__.py | 94 + .../antd/typography/title/__init__.py | 97 + .../components/antd/upload/__init__.py | 154 + .../antd/upload/dragger/__init__.py | 151 + .../components/antd/watermark/__init__.py | 52 + .../components/base/__init__.py | 8 + .../components/base/application/__init__.py | 43 + .../components/base/div/__init__.py | 91 + .../components/base/each/__init__.py | 70 + .../components/base/filter/__init__.py | 42 + .../components/base/fragment/__init__.py | 48 + .../components/base/slot/__init__.py | 51 + .../components/base/span/__init__.py | 91 + .../components/base/text/__init__.py | 62 + .../{ => legacy}/Chatbot/__init__.py | 8 +- .../Chatbot/llm_thinking_presets.py | 0 .../components/{ => legacy}/Flow/__init__.py | 5 +- .../components/{ => legacy}/Flow/edge.py | 0 .../components/{ => legacy}/Flow/node.py | 0 .../{ => legacy}/Flow/node_schema.py | 0 .../{ => legacy}/Lifecycle/__init__.py | 4 +- .../{ => legacy}/Markdown/__init__.py | 6 +- .../{ => legacy}/MultimodalInput/__init__.py | 4 +- .../{ => legacy}/WaterfallGallery/__init__.py | 4 +- .../components/legacy/__init__.py | 6 + backend/modelscope_studio/external.py | 3 +- .../utils/{ => dev}/__init__.py | 6 +- .../modelscope_studio/utils/dev/component.py | 149 + .../utils/{ => dev}/process_links.py | 0 .../utils/dev/resolve_frontend_dir.py | 15 + config/changelog/package.json | 6 +- config/lint-config/configs/eslint/basic.mjs | 2 +- config/lint-config/configs/eslint/react.mjs | 2 +- config/lint-config/configs/eslint/svelte.mjs | 3 +- .../lint-config/configs/eslint/typescript.mjs | 16 +- config/lint-config/eslint.mjs | 2 +- config/lint-config/package.json | 22 +- docs/components/Chatbot/demos/accordion.py | 1 - docs/components/Chatbot/demos/basic.py | 1 - docs/components/Chatbot/demos/chart.py | 1 - .../Chatbot/demos/message_config.py | 1 - docs/components/Chatbot/demos/multi_bots.py | 1 - docs/components/Chatbot/demos/multimodal.py | 1 - docs/components/Chatbot/demos/select-box.py | 1 - docs/components/Docs.py | 1 - docs/components/Flow/demos/basic.py | 1 - .../Flow/demos/component_options.py | 1 - .../components/Flow/demos/custom_node_type.py | 1 - docs/components/Lifecycle/demos/basic.py | 1 - .../Lifecycle/demos/language_adaptation.py | 1 - .../Lifecycle/demos/theme_adaptation.py | 1 - docs/components/Markdown/demos/accordion.py | 1 - docs/components/Markdown/demos/basic.py | 1 - docs/components/Markdown/demos/chart.py | 1 - docs/components/Markdown/demos/custom-tag.py | 1 - docs/components/Markdown/demos/custom-tag2.py | 1 - docs/components/Markdown/demos/custom-tag3.py | 1 - docs/components/Markdown/demos/custom-tag4.py | 1 - .../custom_tags/accordion/accordion-title.py | 1 - .../demos/custom_tags/accordion/basic.py | 1 - .../Markdown/demos/custom_tags/chart/basic.py | 1 - .../demos/custom_tags/select-box/basic.py | 1 - .../custom_tags/select-box/card_shape.py | 1 - .../select-box/card_shape_width_auto.py | 1 - .../custom_tags/select-box/python_events.py | 1 - docs/components/Markdown/demos/multimodal.py | 1 - docs/components/Markdown/demos/select-box.py | 1 - .../components/MultimodalInput/demos/basic.py | 1 - .../MultimodalInput/demos/config_buttons.py | 1 - .../MultimodalInput/demos/upload_sources.py | 1 - .../MultimodalInput/demos/with_chatbot.py | 1 - .../WaterfallGallery/demos/basic.py | 1 - .../demos/like_click_feedback.py | 1 - .../WaterfallGallery/demos/load_more.py | 1 - .../demos/responsive_columns.py | 1 - frontend/CHANGELOG.md | 21 - frontend/Chatbot/gradio.config.js | 6 - frontend/Chatbot/package.json | 27 - frontend/Flow/gradio.config.js | 6 - frontend/Markdown/gradio.config.js | 6 - frontend/MultimodalInput/gradio.config.js | 6 - frontend/MultimodalInput/package.json | 29 - frontend/WaterfallGallery/gradio.config.js | 6 - frontend/WaterfallGallery/package.json | 28 - frontend/antd/affix/Index.svelte | 70 + frontend/antd/affix/affix.tsx | 13 + frontend/antd/affix/gradio.config.js | 3 + frontend/antd/affix/package.json | 8 + frontend/antd/alert/Index.svelte | 70 + frontend/antd/alert/alert.tsx | 40 + .../antd/alert/error-boundary/Index.svelte | 75 + .../error-boundary/alert.error-boundary.tsx | 27 + .../alert/error-boundary/gradio.config.js | 3 + .../antd/alert/error-boundary/package.json | 8 + frontend/antd/alert/gradio.config.js | 3 + frontend/antd/alert/package.json | 8 + frontend/antd/anchor/Index.svelte | 74 + frontend/antd/anchor/anchor.tsx | 45 + frontend/antd/anchor/context.ts | 6 + frontend/antd/anchor/gradio.config.js | 3 + frontend/antd/anchor/item/Index.svelte | 78 + frontend/antd/anchor/item/gradio.config.js | 3 + frontend/antd/anchor/item/package.json | 8 + frontend/antd/anchor/package.json | 8 + frontend/antd/auto-complete/Index.svelte | 80 + frontend/antd/auto-complete/auto-complete.tsx | 106 + frontend/antd/auto-complete/context.ts | 6 + frontend/antd/auto-complete/gradio.config.js | 3 + .../antd/auto-complete/option/Index.svelte | 91 + .../auto-complete/option/gradio.config.js | 3 + .../antd/auto-complete/option/package.json | 8 + frontend/antd/auto-complete/package.json | 8 + frontend/antd/avatar/Index.svelte | 75 + frontend/antd/avatar/avatar.tsx | 23 + frontend/antd/avatar/gradio.config.js | 3 + frontend/antd/avatar/group/Index.svelte | 71 + frontend/antd/avatar/group/avatar.group.tsx | 44 + frontend/antd/avatar/group/gradio.config.js | 3 + frontend/antd/avatar/group/package.json | 8 + frontend/antd/avatar/package.json | 8 + frontend/antd/badge/Index.svelte | 81 + frontend/antd/badge/badge.tsx | 20 + frontend/antd/badge/gradio.config.js | 3 + frontend/antd/badge/package.json | 8 + frontend/antd/badge/ribbon/Index.svelte | 74 + frontend/antd/badge/ribbon/badge.ribbon.tsx | 21 + frontend/antd/badge/ribbon/gradio.config.js | 3 + frontend/antd/badge/ribbon/package.json | 8 + frontend/antd/breadcrumb/Index.svelte | 74 + frontend/antd/breadcrumb/breadcrumb.tsx | 36 + frontend/antd/breadcrumb/context.ts | 6 + frontend/antd/breadcrumb/gradio.config.js | 3 + .../breadcrumb/item/BreadcrumbItem.svelte | 137 + frontend/antd/breadcrumb/item/Index.svelte | 42 + .../antd/breadcrumb/item/gradio.config.js | 3 + frontend/antd/breadcrumb/item/package.json | 8 + frontend/antd/breadcrumb/package.json | 8 + frontend/antd/button/Index.svelte | 141 + frontend/antd/button/button.tsx | 17 + frontend/antd/button/gradio.config.js | 3 + frontend/antd/button/group/Index.svelte | 71 + frontend/antd/button/group/button.group.less | 20 + frontend/antd/button/group/button.group.tsx | 26 + frontend/antd/button/group/gradio.config.js | 3 + frontend/antd/button/group/package.json | 8 + frontend/antd/button/package.json | 8 + frontend/antd/calendar/Index.svelte | 75 + frontend/antd/calendar/calendar.tsx | 69 + frontend/antd/calendar/gradio.config.js | 3 + frontend/antd/calendar/package.json | 8 + frontend/antd/card/Index.svelte | 129 + frontend/antd/card/card.tsx | 41 + frontend/antd/card/gradio.config.js | 3 + frontend/antd/card/grid/Index.svelte | 69 + frontend/antd/card/grid/card.grid.tsx | 6 + frontend/antd/card/grid/gradio.config.js | 3 + frontend/antd/card/grid/package.json | 8 + frontend/antd/card/meta/Index.svelte | 79 + frontend/antd/card/meta/card.meta.tsx | 27 + frontend/antd/card/meta/gradio.config.js | 3 + frontend/antd/card/meta/package.json | 8 + frontend/antd/card/package.json | 8 + frontend/antd/carousel/Index.svelte | 70 + frontend/antd/carousel/carousel.tsx | 30 + frontend/antd/carousel/gradio.config.js | 3 + frontend/antd/carousel/package.json | 8 + frontend/antd/cascader/Index.svelte | 80 + frontend/antd/cascader/cascader.tsx | 144 + frontend/antd/cascader/context.ts | 6 + frontend/antd/cascader/gradio.config.js | 3 + frontend/antd/cascader/option/Index.svelte | 87 + .../antd/cascader/option/gradio.config.js | 3 + frontend/antd/cascader/option/package.json | 8 + frontend/antd/cascader/package.json | 8 + frontend/antd/cascader/panel/Index.svelte | 82 + .../antd/cascader/panel/cascader.panel.tsx | 66 + frontend/antd/cascader/panel/gradio.config.js | 3 + frontend/antd/cascader/panel/package.json | 8 + frontend/antd/checkbox/Index.svelte | 76 + frontend/antd/checkbox/checkbox.tsx | 21 + frontend/antd/checkbox/context.ts | 6 + frontend/antd/checkbox/gradio.config.js | 3 + frontend/antd/checkbox/group/Index.svelte | 82 + .../antd/checkbox/group/checkbox.group.tsx | 47 + frontend/antd/checkbox/group/gradio.config.js | 3 + .../antd/checkbox/group/option/Index.svelte | 92 + .../checkbox/group/option/gradio.config.js | 3 + .../antd/checkbox/group/option/package.json | 8 + frontend/antd/checkbox/group/package.json | 8 + frontend/antd/checkbox/package.json | 8 + frontend/antd/collapse/Index.svelte | 81 + frontend/antd/collapse/collapse.tsx | 58 + frontend/antd/collapse/context.ts | 6 + frontend/antd/collapse/gradio.config.js | 3 + frontend/antd/collapse/item/Index.svelte | 90 + frontend/antd/collapse/item/gradio.config.js | 3 + frontend/antd/collapse/item/package.json | 8 + frontend/antd/collapse/package.json | 8 + frontend/antd/color-picker/Index.svelte | 82 + frontend/antd/color-picker/color-picker.tsx | 70 + frontend/antd/color-picker/context.ts | 6 + frontend/antd/color-picker/gradio.config.js | 3 + frontend/antd/color-picker/package.json | 8 + .../antd/color-picker/preset/Index.svelte | 92 + .../antd/color-picker/preset/gradio.config.js | 3 + .../antd/color-picker/preset/package.json | 8 + frontend/antd/config-provider/Index.svelte | 61 + .../antd/config-provider/config-provider.tsx | 124 + .../antd/config-provider/gradio.config.js | 3 + frontend/antd/config-provider/locales.ts | 74 + frontend/antd/config-provider/package.json | 8 + frontend/antd/date-picker/Index.svelte | 79 + frontend/antd/date-picker/context.ts | 6 + frontend/antd/date-picker/date-picker.tsx | 207 + frontend/antd/date-picker/gradio.config.js | 3 + frontend/antd/date-picker/package.json | 8 + frontend/antd/date-picker/preset/Index.svelte | 88 + .../antd/date-picker/preset/gradio.config.js | 3 + frontend/antd/date-picker/preset/package.json | 8 + .../date-picker/range-picker/Index.svelte | 84 + .../range-picker/date-picker.range-picker.tsx | 227 + .../date-picker/range-picker/gradio.config.js | 3 + .../date-picker/range-picker/package.json | 8 + frontend/antd/descriptions/Index.svelte | 78 + frontend/antd/descriptions/context.ts | 6 + frontend/antd/descriptions/descriptions.tsx | 37 + frontend/antd/descriptions/gradio.config.js | 3 + frontend/antd/descriptions/item/Index.svelte | 90 + .../antd/descriptions/item/gradio.config.js | 3 + frontend/antd/descriptions/item/package.json | 8 + frontend/antd/descriptions/package.json | 8 + frontend/antd/divider/Index.svelte | 107 + frontend/antd/divider/divider.tsx | 10 + frontend/antd/divider/gradio.config.js | 3 + frontend/antd/divider/package.json | 8 + frontend/antd/drawer/Index.svelte | 70 + frontend/antd/drawer/drawer.tsx | 32 + frontend/antd/drawer/gradio.config.js | 3 + frontend/antd/drawer/package.json | 8 + frontend/antd/dropdown/Index.svelte | 77 + frontend/antd/dropdown/button/Index.svelte | 83 + .../antd/dropdown/button/dropdown.button.tsx | 62 + .../antd/dropdown/button/gradio.config.js | 3 + frontend/antd/dropdown/button/package.json | 8 + frontend/antd/dropdown/dropdown.tsx | 66 + frontend/antd/dropdown/gradio.config.js | 3 + frontend/antd/dropdown/package.json | 8 + frontend/antd/empty/Index.svelte | 70 + frontend/antd/empty/empty.tsx | 28 + frontend/antd/empty/gradio.config.js | 3 + frontend/antd/empty/package.json | 8 + frontend/antd/flex/Index.svelte | 98 + frontend/antd/flex/flex.tsx | 8 + frontend/antd/flex/gradio.config.js | 3 + frontend/antd/flex/package.json | 8 + frontend/antd/float-button/Index.svelte | 67 + .../antd/float-button/back-top/Index.svelte | 73 + .../back-top/float-button.back-top.tsx | 42 + .../float-button/back-top/gradio.config.js | 3 + .../antd/float-button/back-top/package.json | 8 + frontend/antd/float-button/float-button.tsx | 42 + frontend/antd/float-button/gradio.config.js | 3 + frontend/antd/float-button/group/Index.svelte | 75 + .../group/float-button.group.less | 30 + .../float-button/group/float-button.group.tsx | 54 + .../antd/float-button/group/gradio.config.js | 3 + frontend/antd/float-button/group/package.json | 8 + frontend/antd/float-button/package.json | 8 + frontend/antd/form/Index.svelte | 76 + frontend/antd/form/context.ts | 7 + frontend/antd/form/form.tsx | 28 + frontend/antd/form/gradio.config.js | 3 + frontend/antd/form/item/Index.svelte | 80 + frontend/antd/form/item/form.item.tsx | 117 + frontend/antd/form/item/gradio.config.js | 3 + frontend/antd/form/item/package.json | 8 + frontend/antd/form/item/rule/Index.svelte | 64 + frontend/antd/form/item/rule/global.css | 3 + frontend/antd/form/item/rule/gradio.config.js | 3 + frontend/antd/form/item/rule/package.json | 8 + frontend/antd/form/package.json | 8 + frontend/antd/grid/col/Index.svelte | 128 + frontend/antd/grid/col/gradio.config.js | 3 + frontend/antd/grid/col/package.json | 8 + frontend/antd/grid/context.ts | 6 + frontend/antd/grid/row/Index.svelte | 90 + frontend/antd/grid/row/gradio.config.js | 3 + frontend/antd/grid/row/package.json | 8 + frontend/antd/grid/row/row.tsx | 30 + frontend/antd/icon/Index.svelte | 74 + frontend/antd/icon/gradio.config.js | 3 + frontend/antd/icon/icon.tsx | 26 + .../antd/icon/iconfont-provider/Index.svelte | 56 + .../antd/icon/iconfont-provider/context.ts | 37 + .../icon/iconfont-provider/create-iconfont.ts | 3 + .../icon/iconfont-provider/gradio.config.js | 3 + .../antd/icon/iconfont-provider/package.json | 8 + frontend/antd/icon/package.json | 8 + frontend/antd/image/Index.svelte | 74 + frontend/antd/image/gradio.config.js | 3 + frontend/antd/image/image.tsx | 58 + frontend/antd/image/package.json | 8 + .../antd/image/preview-group/Index.svelte | 79 + .../antd/image/preview-group/gradio.config.js | 3 + .../preview-group/image.preview-group.tsx | 54 + .../antd/image/preview-group/package.json | 8 + frontend/antd/input-number/Index.svelte | 76 + frontend/antd/input-number/gradio.config.js | 3 + frontend/antd/input-number/input-number.tsx | 85 + frontend/antd/input-number/package.json | 8 + frontend/antd/input/Index.svelte | 76 + frontend/antd/input/gradio.config.js | 3 + frontend/antd/input/input.tsx | 84 + frontend/antd/input/otp/Index.svelte | 74 + frontend/antd/input/otp/gradio.config.js | 3 + frontend/antd/input/otp/input.otp.tsx | 24 + frontend/antd/input/otp/package.json | 8 + frontend/antd/input/package.json | 8 + frontend/antd/input/password/Index.svelte | 78 + frontend/antd/input/password/gradio.config.js | 3 + .../antd/input/password/input.password.tsx | 85 + frontend/antd/input/password/package.json | 8 + frontend/antd/input/search/Index.svelte | 76 + frontend/antd/input/search/gradio.config.js | 3 + frontend/antd/input/search/input.search.tsx | 99 + frontend/antd/input/search/package.json | 8 + frontend/antd/input/textarea/Index.svelte | 78 + frontend/antd/input/textarea/gradio.config.js | 3 + .../antd/input/textarea/input.textarea.tsx | 65 + frontend/antd/input/textarea/package.json | 8 + frontend/antd/layout/Base.svelte | 71 + frontend/antd/layout/Index.svelte | 10 + frontend/antd/layout/content/Index.svelte | 10 + frontend/antd/layout/content/gradio.config.js | 3 + frontend/antd/layout/content/package.json | 8 + frontend/antd/layout/footer/Index.svelte | 10 + frontend/antd/layout/footer/gradio.config.js | 3 + frontend/antd/layout/footer/package.json | 8 + frontend/antd/layout/gradio.config.js | 3 + frontend/antd/layout/header/Index.svelte | 10 + frontend/antd/layout/header/gradio.config.js | 3 + frontend/antd/layout/header/package.json | 8 + frontend/antd/layout/layout.base.tsx | 39 + frontend/antd/layout/package.json | 8 + frontend/antd/layout/sider/Index.svelte | 71 + frontend/antd/layout/sider/gradio.config.js | 3 + frontend/antd/layout/sider/layout.sider.tsx | 20 + frontend/antd/layout/sider/package.json | 8 + frontend/antd/list/Index.svelte | 70 + frontend/antd/list/gradio.config.js | 3 + frontend/antd/list/item/Index.svelte | 65 + frontend/antd/list/item/gradio.config.js | 3 + frontend/antd/list/item/list.item.tsx | 28 + frontend/antd/list/item/meta/Index.svelte | 65 + frontend/antd/list/item/meta/gradio.config.js | 3 + .../antd/list/item/meta/list.item.meta.tsx | 28 + frontend/antd/list/item/meta/package.json | 8 + frontend/antd/list/item/package.json | 8 + frontend/antd/list/list.tsx | 22 + frontend/antd/list/package.json | 8 + frontend/antd/mentions/Index.svelte | 80 + frontend/antd/mentions/context.ts | 6 + frontend/antd/mentions/gradio.config.js | 3 + frontend/antd/mentions/mentions.tsx | 68 + frontend/antd/mentions/option/Index.svelte | 96 + .../antd/mentions/option/gradio.config.js | 3 + frontend/antd/mentions/option/package.json | 8 + frontend/antd/mentions/package.json | 8 + frontend/antd/menu/Index.svelte | 92 + frontend/antd/menu/context.ts | 6 + frontend/antd/menu/gradio.config.js | 3 + frontend/antd/menu/item/Index.svelte | 89 + frontend/antd/menu/item/gradio.config.js | 3 + frontend/antd/menu/item/package.json | 8 + frontend/antd/menu/menu.tsx | 82 + frontend/antd/menu/package.json | 8 + frontend/antd/message/Index.svelte | 77 + frontend/antd/message/gradio.config.js | 3 + frontend/antd/message/message.tsx | 49 + frontend/antd/message/package.json | 8 + frontend/antd/modal/Index.svelte | 70 + frontend/antd/modal/gradio.config.js | 3 + frontend/antd/modal/modal.tsx | 90 + frontend/antd/modal/package.json | 8 + frontend/antd/notification/Index.svelte | 77 + frontend/antd/notification/gradio.config.js | 3 + frontend/antd/notification/notification.tsx | 82 + frontend/antd/notification/package.json | 8 + frontend/antd/pagination/Index.svelte | 88 + frontend/antd/pagination/gradio.config.js | 3 + frontend/antd/pagination/package.json | 8 + frontend/antd/pagination/pagination.tsx | 44 + frontend/antd/popconfirm/Index.svelte | 73 + frontend/antd/popconfirm/gradio.config.js | 3 + frontend/antd/popconfirm/package.json | 8 + frontend/antd/popconfirm/popconfirm.tsx | 64 + frontend/antd/popover/Index.svelte | 72 + frontend/antd/popover/gradio.config.js | 3 + frontend/antd/popover/package.json | 8 + frontend/antd/popover/popover.tsx | 30 + frontend/antd/progress/Index.svelte | 70 + frontend/antd/progress/gradio.config.js | 3 + frontend/antd/progress/package.json | 8 + frontend/antd/progress/progress.tsx | 12 + frontend/antd/qr-code/Index.svelte | 70 + frontend/antd/qr-code/gradio.config.js | 3 + frontend/antd/qr-code/package.json | 8 + frontend/antd/qr-code/qr-code.tsx | 8 + frontend/antd/radio/Index.svelte | 89 + frontend/antd/radio/button/Index.svelte | 89 + frontend/antd/radio/button/gradio.config.js | 3 + frontend/antd/radio/button/package.json | 8 + frontend/antd/radio/button/radio.button.tsx | 29 + frontend/antd/radio/context.ts | 6 + frontend/antd/radio/gradio.config.js | 3 + frontend/antd/radio/group/Index.svelte | 80 + frontend/antd/radio/group/gradio.config.js | 3 + frontend/antd/radio/group/option/Index.svelte | 100 + .../antd/radio/group/option/gradio.config.js | 3 + frontend/antd/radio/group/option/package.json | 8 + frontend/antd/radio/group/package.json | 8 + frontend/antd/radio/group/radio.group.less | 20 + frontend/antd/radio/group/radio.group.tsx | 53 + frontend/antd/radio/package.json | 8 + frontend/antd/radio/radio.tsx | 21 + frontend/antd/rate/Index.svelte | 76 + frontend/antd/rate/gradio.config.js | 3 + frontend/antd/rate/package.json | 8 + frontend/antd/rate/rate.tsx | 40 + frontend/antd/result/Index.svelte | 70 + frontend/antd/result/gradio.config.js | 3 + frontend/antd/result/package.json | 8 + frontend/antd/result/result.tsx | 23 + frontend/antd/segmented/Index.svelte | 80 + frontend/antd/segmented/context.ts | 6 + frontend/antd/segmented/gradio.config.js | 3 + frontend/antd/segmented/option/Index.svelte | 81 + .../antd/segmented/option/gradio.config.js | 3 + frontend/antd/segmented/option/package.json | 8 + frontend/antd/segmented/package.json | 8 + frontend/antd/segmented/segmented.tsx | 35 + frontend/antd/select/Index.svelte | 80 + frontend/antd/select/context.ts | 6 + frontend/antd/select/gradio.config.js | 3 + frontend/antd/select/option/Index.svelte | 100 + frontend/antd/select/option/gradio.config.js | 3 + frontend/antd/select/option/package.json | 8 + frontend/antd/select/package.json | 8 + frontend/antd/select/select.tsx | 128 + frontend/antd/skeleton/Index.svelte | 70 + frontend/antd/skeleton/avatar/Index.svelte | 72 + .../antd/skeleton/avatar/gradio.config.js | 3 + frontend/antd/skeleton/avatar/package.json | 8 + .../antd/skeleton/avatar/skeleton.avatar.tsx | 8 + frontend/antd/skeleton/button/Index.svelte | 72 + .../antd/skeleton/button/gradio.config.js | 3 + frontend/antd/skeleton/button/package.json | 8 + .../antd/skeleton/button/skeleton.button.tsx | 8 + frontend/antd/skeleton/gradio.config.js | 3 + frontend/antd/skeleton/image/Index.svelte | 72 + frontend/antd/skeleton/image/gradio.config.js | 3 + frontend/antd/skeleton/image/package.json | 8 + .../antd/skeleton/image/skeleton.image.tsx | 8 + frontend/antd/skeleton/input/Index.svelte | 72 + frontend/antd/skeleton/input/gradio.config.js | 3 + frontend/antd/skeleton/input/package.json | 8 + .../antd/skeleton/input/skeleton.input.tsx | 8 + frontend/antd/skeleton/node/Index.svelte | 70 + frontend/antd/skeleton/node/gradio.config.js | 3 + frontend/antd/skeleton/node/package.json | 8 + frontend/antd/skeleton/node/skeleton.node.tsx | 8 + frontend/antd/skeleton/package.json | 8 + frontend/antd/skeleton/skeleton.tsx | 6 + frontend/antd/slider/Index.svelte | 80 + frontend/antd/slider/context.ts | 6 + frontend/antd/slider/gradio.config.js | 3 + frontend/antd/slider/mark/Index.svelte | 91 + frontend/antd/slider/mark/gradio.config.js | 3 + frontend/antd/slider/mark/package.json | 8 + frontend/antd/slider/package.json | 8 + frontend/antd/slider/slider.tsx | 82 + frontend/antd/space/Index.svelte | 69 + frontend/antd/space/compact/Index.svelte | 70 + frontend/antd/space/compact/gradio.config.js | 3 + frontend/antd/space/compact/package.json | 8 + frontend/antd/space/compact/space.compact.tsx | 23 + frontend/antd/space/gradio.config.js | 3 + frontend/antd/space/package.json | 8 + frontend/antd/space/space.tsx | 28 + frontend/antd/spin/Index.svelte | 70 + frontend/antd/spin/gradio.config.js | 3 + frontend/antd/spin/package.json | 8 + frontend/antd/spin/spin.tsx | 23 + frontend/antd/statistic/Index.svelte | 68 + .../antd/statistic/countdown/Index.svelte | 73 + .../antd/statistic/countdown/gradio.config.js | 3 + .../antd/statistic/countdown/package.json | 8 + .../countdown/statistic.countdown.tsx | 26 + frontend/antd/statistic/gradio.config.js | 3 + frontend/antd/statistic/package.json | 8 + frontend/antd/statistic/statistic.tsx | 28 + frontend/antd/steps/Index.svelte | 74 + frontend/antd/steps/context.ts | 6 + frontend/antd/steps/gradio.config.js | 3 + frontend/antd/steps/item/Index.svelte | 73 + frontend/antd/steps/item/gradio.config.js | 3 + frontend/antd/steps/item/package.json | 8 + frontend/antd/steps/package.json | 8 + frontend/antd/steps/steps.tsx | 36 + frontend/antd/switch/Index.svelte | 75 + frontend/antd/switch/gradio.config.js | 3 + frontend/antd/switch/package.json | 8 + frontend/antd/switch/switch.tsx | 41 + frontend/antd/table/Index.svelte | 83 + frontend/antd/table/column-group/Index.svelte | 83 + .../antd/table/column-group/gradio.config.js | 3 + frontend/antd/table/column-group/package.json | 8 + frontend/antd/table/column/Index.svelte | 142 + frontend/antd/table/column/gradio.config.js | 3 + frontend/antd/table/column/package.json | 8 + frontend/antd/table/context.ts | 27 + .../antd/table/expandable/Expandable.svelte | 105 + frontend/antd/table/expandable/Index.svelte | 42 + .../antd/table/expandable/gradio.config.js | 3 + frontend/antd/table/expandable/package.json | 8 + frontend/antd/table/gradio.config.js | 3 + frontend/antd/table/package.json | 8 + .../antd/table/row-selection/Index.svelte | 42 + .../table/row-selection/RowSelection.svelte | 101 + .../antd/table/row-selection/gradio.config.js | 3 + .../antd/table/row-selection/package.json | 8 + .../row-selection/selection/Index.svelte | 93 + .../row-selection/selection/gradio.config.js | 3 + .../row-selection/selection/package.json | 8 + frontend/antd/table/table.tsx | 195 + frontend/antd/tabs/Index.svelte | 80 + frontend/antd/tabs/context.ts | 6 + frontend/antd/tabs/gradio.config.js | 3 + frontend/antd/tabs/item/Index.svelte | 82 + frontend/antd/tabs/item/gradio.config.js | 3 + frontend/antd/tabs/item/package.json | 8 + frontend/antd/tabs/package.json | 8 + frontend/antd/tabs/tabs.tsx | 106 + frontend/antd/tag/Index.svelte | 80 + frontend/antd/tag/checkable-tag/Index.svelte | 89 + .../antd/tag/checkable-tag/gradio.config.js | 3 + frontend/antd/tag/checkable-tag/package.json | 8 + .../tag/checkable-tag/tag.checkable-tag.tsx | 21 + frontend/antd/tag/gradio.config.js | 3 + frontend/antd/tag/package.json | 8 + frontend/antd/tag/tag.tsx | 24 + frontend/antd/time-picker/Index.svelte | 75 + frontend/antd/time-picker/gradio.config.js | 3 + frontend/antd/time-picker/package.json | 8 + .../time-picker/range-picker/Index.svelte | 80 + .../time-picker/range-picker/gradio.config.js | 3 + .../time-picker/range-picker/package.json | 8 + .../range-picker/time-picker.range-picker.tsx | 199 + frontend/antd/time-picker/time-picker.tsx | 187 + frontend/antd/timeline/Index.svelte | 73 + frontend/antd/timeline/context.ts | 6 + frontend/antd/timeline/gradio.config.js | 3 + frontend/antd/timeline/item/Index.svelte | 82 + frontend/antd/timeline/item/gradio.config.js | 3 + frontend/antd/timeline/item/package.json | 8 + frontend/antd/timeline/package.json | 8 + frontend/antd/timeline/timeline.tsx | 43 + frontend/antd/tooltip/Index.svelte | 72 + frontend/antd/tooltip/gradio.config.js | 3 + frontend/antd/tooltip/package.json | 8 + frontend/antd/tooltip/tooltip.tsx | 26 + frontend/antd/tour/Index.svelte | 84 + frontend/antd/tour/context.ts | 6 + frontend/antd/tour/gradio.config.js | 3 + frontend/antd/tour/package.json | 8 + frontend/antd/tour/step/Index.svelte | 75 + frontend/antd/tour/step/gradio.config.js | 3 + frontend/antd/tour/step/package.json | 8 + frontend/antd/tour/tour.tsx | 71 + frontend/antd/transfer/Index.svelte | 76 + frontend/antd/transfer/gradio.config.js | 3 + frontend/antd/transfer/package.json | 8 + frontend/antd/transfer/transfer.tsx | 99 + frontend/antd/tree-select/Index.svelte | 79 + frontend/antd/tree-select/context.ts | 6 + frontend/antd/tree-select/gradio.config.js | 3 + frontend/antd/tree-select/package.json | 8 + .../antd/tree-select/tree-node/Index.svelte | 87 + .../tree-select/tree-node/gradio.config.js | 3 + .../antd/tree-select/tree-node/package.json | 8 + frontend/antd/tree-select/tree-select.tsx | 119 + frontend/antd/tree/Index.svelte | 95 + frontend/antd/tree/context.ts | 6 + .../antd/tree/directory-tree/Index.svelte | 96 + .../antd/tree/directory-tree/gradio.config.js | 3 + .../antd/tree/directory-tree/package.json | 8 + frontend/antd/tree/gradio.config.js | 3 + frontend/antd/tree/package.json | 8 + frontend/antd/tree/tree-node/Index.svelte | 83 + frontend/antd/tree/tree-node/gradio.config.js | 3 + frontend/antd/tree/tree-node/package.json | 8 + frontend/antd/tree/tree.tsx | 134 + frontend/antd/typography/Base.svelte | 81 + frontend/antd/typography/link/Index.svelte | 12 + .../antd/typography/link/gradio.config.js | 3 + frontend/antd/typography/link/package.json | 8 + .../antd/typography/paragraph/Index.svelte | 12 + .../typography/paragraph/gradio.config.js | 3 + .../antd/typography/paragraph/package.json | 8 + frontend/antd/typography/text/Index.svelte | 12 + .../antd/typography/text/gradio.config.js | 3 + frontend/antd/typography/text/package.json | 8 + frontend/antd/typography/title/Index.svelte | 12 + .../antd/typography/title/gradio.config.js | 3 + frontend/antd/typography/title/package.json | 8 + frontend/antd/typography/typography.base.tsx | 152 + frontend/antd/upload/Index.svelte | 83 + frontend/antd/upload/dragger/Index.svelte | 85 + frontend/antd/upload/dragger/gradio.config.js | 3 + frontend/antd/upload/dragger/package.json | 8 + .../antd/upload/dragger/upload.dragger.tsx | 146 + frontend/antd/upload/gradio.config.js | 3 + frontend/antd/upload/package.json | 8 + frontend/antd/upload/upload.tsx | 146 + frontend/antd/watermark/Index.svelte | 73 + frontend/antd/watermark/gradio.config.js | 3 + frontend/antd/watermark/package.json | 8 + frontend/antd/watermark/watermark.tsx | 5 + frontend/base/application/Index.svelte | 30 + frontend/base/application/gradio.config.js | 3 + frontend/base/application/package.json | 8 + frontend/base/div/Index.svelte | 104 + frontend/base/div/gradio.config.js | 3 + frontend/base/div/package.json | 8 + frontend/base/each/Each.svelte | 18 + frontend/base/each/Index.svelte | 42 + frontend/base/each/gradio.config.js | 3 + frontend/base/each/package.json | 8 + frontend/base/filter/Index.svelte | 50 + frontend/base/filter/gradio.config.js | 3 + frontend/base/filter/package.json | 8 + frontend/base/fragment/Index.svelte | 38 + frontend/base/fragment/ShowFragment.svelte | 15 + frontend/base/fragment/fragment.tsx | 10 + frontend/base/fragment/gradio.config.js | 3 + frontend/base/fragment/package.json | 9 + frontend/base/slot/Index.svelte | 77 + frontend/base/slot/gradio.config.js | 3 + frontend/base/slot/package.json | 8 + frontend/base/span/Index.svelte | 104 + frontend/base/span/gradio.config.js | 3 + frontend/base/span/package.json | 8 + frontend/base/text/Index.svelte | 36 + frontend/base/text/global.css | 3 + frontend/base/text/gradio.config.js | 3 + frontend/base/text/package.json | 8 + frontend/compiled/tsconfig.build.json | 26 - frontend/compiled/tsconfig.json | 25 - frontend/compiled/tsconfig.node.json | 11 - frontend/compiled/vite.config.ts | 72 - frontend/defineConfig.js | 18 + fixtures.d.ts => frontend/fixtures.d.ts | 9 +- frontend/{ => legacy}/Chatbot/CHANGELOG.md | 0 frontend/{ => legacy}/Chatbot/Index.svelte | 2 +- frontend/legacy/Chatbot/gradio.config.js | 3 + .../Chatbot}/package.json | 9 +- .../Chatbot/shared/ChatBot.svelte | 2 +- .../{ => legacy}/Chatbot/shared/Copy.svelte | 0 .../Chatbot/shared/FlushingMarkdown.svelte | 0 .../Chatbot/shared/LikeDislike.svelte | 0 .../Chatbot/shared/Pending.svelte | 0 .../Chatbot/shared/llm-thinking-presets.ts | 0 frontend/{ => legacy}/Chatbot/shared/utils.ts | 0 frontend/{ => legacy}/Flow/CHANGELOG.md | 0 frontend/{ => legacy}/Flow/Index.svelte | 2 +- frontend/legacy/Flow/gradio.config.js | 3 + frontend/{ => legacy}/Flow/package.json | 15 +- frontend/{ => legacy}/Flow/schema.json | 0 frontend/{ => legacy}/Flow/schema.ts | 0 frontend/{ => legacy}/Flow/shared/Flow.svelte | 2 +- frontend/{ => legacy}/Flow/shared/utils.ts | 0 frontend/{ => legacy}/Lifecycle/CHANGELOG.md | 0 frontend/legacy/Lifecycle/gradio.config.js | 3 + frontend/{ => legacy}/Lifecycle/index.svelte | 0 frontend/legacy/Lifecycle/package.json | 16 + .../{ => legacy}/Lifecycle/shared/utils.ts | 0 frontend/{ => legacy}/Markdown/CHANGELOG.md | 0 frontend/{ => legacy}/Markdown/Example.svelte | 0 frontend/{ => legacy}/Markdown/Index.svelte | 0 frontend/legacy/Markdown/gradio.config.js | 3 + frontend/{ => legacy}/Markdown/package.json | 11 +- .../Markdown/shared/Markdown.svelte | 0 .../{ => legacy}/MultimodalInput/CHANGELOG.md | 0 .../MultimodalInput/Example.svelte | 0 .../{ => legacy}/MultimodalInput/Index.svelte | 2 +- .../legacy/MultimodalInput/gradio.config.js | 3 + frontend/legacy/MultimodalInput/package.json | 19 + .../shared/AudioRecorder.svelte | 0 .../MultimodalInput/shared/FilePreview.svelte | 0 .../MultimodalInput/shared/Input.svelte | 0 .../MultimodalInput/shared/Loader.svelte | 0 .../MultimodalInput/shared/RemoveIcon.svelte | 0 .../shared/SubmitButton.svelte | 0 .../shared/UploadButton.svelte | 0 .../MultimodalInput/shared/UploadIcon.svelte | 0 .../MultimodalInput/shared/Webcam.svelte | 0 .../MultimodalInput/shared/context.ts | 0 .../MultimodalInput/shared/global.d.ts | 0 .../MultimodalInput/shared/utils.ts | 0 .../WaterfallGallery/CHANGELOG.md | 0 .../WaterfallGallery/Index.svelte | 0 .../legacy/WaterfallGallery/gradio.config.js | 3 + .../WaterfallGallery}/package.json | 9 +- .../WaterfallGallery/shared/Dislike.svelte | 0 .../WaterfallGallery/shared/Gallery.svelte | 2 +- .../WaterfallGallery/shared/Image.svelte | 0 .../shared/Waterfall/createWaterfall.ts | 0 .../shared/Waterfall/index.ts | 0 .../shared/Waterfall/layout.ts | 0 .../WaterfallGallery/shared/utils.ts | 0 frontend/{ => legacy}/compiled/CHANGELOG.md | 0 .../compiled/components/FileView/index.svelte | 0 .../FileView/shared/FileView.svelte | 2 +- .../compiled/components/Flow/index.svelte | 2 +- .../compiled/components/Markdown/index.svelte | 2 +- .../compiled/components/ReactComponent.svelte | 2 +- frontend/{ => legacy}/compiled/global.d.ts | 0 frontend/{ => legacy}/compiled/index.ts | 2 +- frontend/{ => legacy}/compiled/package.json | 38 +- .../compiled/src/ComponentConfigProvider.tsx | 0 .../compiled/src/FileView/Pdf.tsx | 0 .../compiled/src/FileView/hooks/usePreview.ts | 0 .../compiled/src/FileView/index.less | 0 .../compiled/src/FileView/index.tsx | 0 .../compiled/src/Flow/FlowContext.ts | 0 .../src/Flow/components/CustomComponent.tsx | 0 .../src/Flow/components/FileUpload.tsx | 0 .../Flow/components/FormListItemWrapper.tsx | 0 .../Flow/flow-components/ConnectionHandle.tsx | 0 .../Flow/flow-components/ConnectionLine.tsx | 0 .../src/Flow/flow-components/Controls.tsx | 0 .../src/Flow/flow-components/Edge.tsx | 0 .../src/Flow/flow-components/Node.tsx | 0 .../src/Flow/flow-components/Sidebar.tsx | 0 .../{ => legacy}/compiled/src/Flow/i18n.ts | 0 .../{ => legacy}/compiled/src/Flow/index.less | 0 .../{ => legacy}/compiled/src/Flow/index.tsx | 0 .../{ => legacy}/compiled/src/Flow/type.ts | 0 .../{ => legacy}/compiled/src/Flow/utils.ts | 0 .../src/Markdown/components/Anchor.tsx | 0 .../src/Markdown/components/Audio.tsx | 0 .../compiled/src/Markdown/components/Code.tsx | 0 .../Markdown/components/CustomComponent.tsx | 0 .../src/Markdown/components/Heading.tsx | 0 .../src/Markdown/components/Image.tsx | 0 .../src/Markdown/components/Video.tsx | 0 .../Markdown/components/custom/Accordion.tsx | 0 .../src/Markdown/components/custom/Chart.tsx | 0 .../src/Markdown/components/custom/File.tsx | 0 .../components/custom/FlushingEnd.tsx | 0 .../Markdown/components/custom/SelectBox.tsx | 0 .../compiled/src/Markdown/context.ts | 0 .../src/Markdown/hooks/useCustomProps.ts | 0 .../compiled/src/Markdown/index.less | 0 .../compiled/src/Markdown/index.tsx | 0 .../compiled/src/Markdown/react-markdown.d.ts | 0 .../rehype-Inline-code-property.ts | 0 .../rehype-plugins/rehype-sanitize/index.d.ts | 0 .../rehype-plugins/rehype-sanitize/index.js | 0 .../rehype-plugins/rehype-sanitize/schema.js | 0 .../remark-plugins/remark-directive-rehype.ts | 0 .../compiled/src/Markdown/type.ts | 0 .../compiled/src/defineComponent.tsx | 0 frontend/{ => legacy}/compiled/src/index.ts | 0 frontend/{ => legacy}/compiled/src/mount.tsx | 0 .../{ => legacy}/compiled/src/polyfills.ts | 0 .../src/shared/hooks/useCustomComponent.ts | 0 .../src/shared/hooks/useMemoizedEqualValue.ts | 0 .../compiled/src/shared/hooks/useRefValue.ts | 0 .../{ => legacy}/compiled/src/shared/index.ts | 0 .../{ => legacy}/compiled/src/shared/type.ts | 0 frontend/{ => legacy}/compiled/src/utils.ts | 0 frontend/package.json | 46 +- frontend/plugin.js | 168 + frontend/shared/CHANGELOG.md | 23 - frontend/svelte-preprocess-react/component.ts | 94 + frontend/svelte-preprocess-react/context.ts | 16 + .../events-polyfills.ts | 114 + frontend/svelte-preprocess-react/index.ts | 8 + frontend/svelte-preprocess-react/inject.ts | 95 + .../internal/Bridge.ts | 92 + .../svelte-preprocess-react/internal/Child.ts | 23 + .../internal/ReactWrapper.svelte | 59 + .../svelte-preprocess-react/internal/types.ts | 67 + frontend/svelte-preprocess-react/polyfills.ts | 4 + .../svelte-preprocess-react/react-slot.tsx | 121 + frontend/svelte-preprocess-react/slot.ts | 170 + frontend/svelte-preprocess-react/sveltify.ts | 88 + frontend/svelte-preprocess-react/useStore.ts | 37 + frontend/tsconfig.json | 7 + frontend/utils/createFunction.ts | 11 + frontend/utils/createItemsContext.tsx | 86 + frontend/utils/hooks/useFunction.ts | 9 + frontend/utils/hooks/useTargets.ts | 43 + frontend/utils/omitUndefinedProps.ts | 10 + frontend/utils/renderItems.tsx | 79 + frontend/utils/renderSlot.tsx | 6 + frontend/utils/styleObject2String.ts | 66 + .../{shared/src/index.ts => utils/upload.ts} | 0 package.json | 39 +- pnpm-lock.yaml | 5471 +++++++---------- pnpm-workspace.yaml | 4 +- pyproject.toml | 161 +- tsconfig.json | 20 +- 953 files changed, 33733 insertions(+), 3675 deletions(-) delete mode 100644 backend/modelscope_studio/components/__init__.py create mode 100644 backend/modelscope_studio/components/antd/__init__.py create mode 100644 backend/modelscope_studio/components/antd/affix/__init__.py create mode 100644 backend/modelscope_studio/components/antd/alert/__init__.py create mode 100644 backend/modelscope_studio/components/antd/alert/error_boundary/__init__.py create mode 100644 backend/modelscope_studio/components/antd/anchor/__init__.py create mode 100644 backend/modelscope_studio/components/antd/anchor/item/__init__.py create mode 100644 backend/modelscope_studio/components/antd/auto_complete/__init__.py create mode 100644 backend/modelscope_studio/components/antd/auto_complete/option/__init__.py create mode 100644 backend/modelscope_studio/components/antd/avatar/__init__.py create mode 100644 backend/modelscope_studio/components/antd/avatar/group/__init__.py create mode 100644 backend/modelscope_studio/components/antd/badge/__init__.py create mode 100644 backend/modelscope_studio/components/antd/badge/ribbon/__init__.py create mode 100644 backend/modelscope_studio/components/antd/breadcrumb/__init__.py create mode 100644 backend/modelscope_studio/components/antd/breadcrumb/item/__init__.py create mode 100644 backend/modelscope_studio/components/antd/button/__init__.py create mode 100644 backend/modelscope_studio/components/antd/button/group/__init__.py create mode 100644 backend/modelscope_studio/components/antd/calendar/__init__.py create mode 100644 backend/modelscope_studio/components/antd/card/__init__.py create mode 100644 backend/modelscope_studio/components/antd/card/grid/__init__.py create mode 100644 backend/modelscope_studio/components/antd/card/meta/__init__.py create mode 100644 backend/modelscope_studio/components/antd/carousel/__init__.py create mode 100644 backend/modelscope_studio/components/antd/cascader/__init__.py create mode 100644 backend/modelscope_studio/components/antd/cascader/constants.py create mode 100644 backend/modelscope_studio/components/antd/cascader/option/__init__.py create mode 100644 backend/modelscope_studio/components/antd/cascader/panel/__init__.py create mode 100644 backend/modelscope_studio/components/antd/checkbox/__init__.py create mode 100644 backend/modelscope_studio/components/antd/checkbox/group/__init__.py create mode 100644 backend/modelscope_studio/components/antd/checkbox/group/option/__init__.py create mode 100644 backend/modelscope_studio/components/antd/collapse/__init__.py create mode 100644 backend/modelscope_studio/components/antd/collapse/item/__init__.py create mode 100644 backend/modelscope_studio/components/antd/color_picker/__init__.py create mode 100644 backend/modelscope_studio/components/antd/color_picker/preset/__init__.py create mode 100644 backend/modelscope_studio/components/antd/config_provider/__init__.py create mode 100644 backend/modelscope_studio/components/antd/date_picker/__init__.py create mode 100644 backend/modelscope_studio/components/antd/date_picker/preset/__init__.py create mode 100644 backend/modelscope_studio/components/antd/date_picker/range_picker/__init__.py create mode 100644 backend/modelscope_studio/components/antd/descriptions/__init__.py create mode 100644 backend/modelscope_studio/components/antd/descriptions/item/__init__.py create mode 100644 backend/modelscope_studio/components/antd/divider/__init__.py create mode 100644 backend/modelscope_studio/components/antd/drawer/__init__.py create mode 100644 backend/modelscope_studio/components/antd/dropdown/__init__.py create mode 100644 backend/modelscope_studio/components/antd/dropdown/button/__init__.py create mode 100644 backend/modelscope_studio/components/antd/empty/__init__.py create mode 100644 backend/modelscope_studio/components/antd/flex/__init__.py create mode 100644 backend/modelscope_studio/components/antd/float_button/__init__.py create mode 100644 backend/modelscope_studio/components/antd/float_button/back_top/__init__.py create mode 100644 backend/modelscope_studio/components/antd/float_button/group/__init__.py create mode 100644 backend/modelscope_studio/components/antd/form/__init__.py create mode 100644 backend/modelscope_studio/components/antd/form/item/__init__.py create mode 100644 backend/modelscope_studio/components/antd/form/item/rule/__init__.py create mode 100644 backend/modelscope_studio/components/antd/grid/col/__init__.py create mode 100644 backend/modelscope_studio/components/antd/grid/row/__init__.py create mode 100644 backend/modelscope_studio/components/antd/icon/__init__.py create mode 100644 backend/modelscope_studio/components/antd/icon/iconfont_provider/__init__.py create mode 100644 backend/modelscope_studio/components/antd/image/__init__.py create mode 100644 backend/modelscope_studio/components/antd/image/preview_group/__init__.py create mode 100644 backend/modelscope_studio/components/antd/input/__init__.py create mode 100644 backend/modelscope_studio/components/antd/input/otp/__init__.py create mode 100644 backend/modelscope_studio/components/antd/input/password/__init__.py create mode 100644 backend/modelscope_studio/components/antd/input/search/__init__.py create mode 100644 backend/modelscope_studio/components/antd/input/textarea/__init__.py create mode 100644 backend/modelscope_studio/components/antd/input_number/__init__.py create mode 100644 backend/modelscope_studio/components/antd/layout/__init__.py create mode 100644 backend/modelscope_studio/components/antd/layout/content/__init__.py create mode 100644 backend/modelscope_studio/components/antd/layout/footer/__init__.py create mode 100644 backend/modelscope_studio/components/antd/layout/header/__init__.py create mode 100644 backend/modelscope_studio/components/antd/layout/sider/__init__.py create mode 100644 backend/modelscope_studio/components/antd/list/__init__.py create mode 100644 backend/modelscope_studio/components/antd/list/item/__init__.py create mode 100644 backend/modelscope_studio/components/antd/list/item/meta/__init__.py create mode 100644 backend/modelscope_studio/components/antd/mentions/__init__.py create mode 100644 backend/modelscope_studio/components/antd/mentions/option/__init__.py create mode 100644 backend/modelscope_studio/components/antd/menu/__init__.py create mode 100644 backend/modelscope_studio/components/antd/menu/item/__init__.py create mode 100644 backend/modelscope_studio/components/antd/message/__init__.py create mode 100644 backend/modelscope_studio/components/antd/modal/__init__.py create mode 100644 backend/modelscope_studio/components/antd/notification/__init__.py create mode 100644 backend/modelscope_studio/components/antd/pagination/__init__.py create mode 100644 backend/modelscope_studio/components/antd/popconfirm/__init__.py create mode 100644 backend/modelscope_studio/components/antd/popover/__init__.py create mode 100644 backend/modelscope_studio/components/antd/progress/__init__.py create mode 100644 backend/modelscope_studio/components/antd/qr_code/__init__.py create mode 100644 backend/modelscope_studio/components/antd/radio/__init__.py create mode 100644 backend/modelscope_studio/components/antd/radio/button/__init__.py create mode 100644 backend/modelscope_studio/components/antd/radio/group/__init__.py create mode 100644 backend/modelscope_studio/components/antd/radio/group/option/__init__.py create mode 100644 backend/modelscope_studio/components/antd/rate/__init__.py create mode 100644 backend/modelscope_studio/components/antd/result/__init__.py create mode 100644 backend/modelscope_studio/components/antd/segmented/__init__.py create mode 100644 backend/modelscope_studio/components/antd/segmented/option/__init__.py create mode 100644 backend/modelscope_studio/components/antd/select/__init__.py create mode 100644 backend/modelscope_studio/components/antd/select/option/__init__.py create mode 100644 backend/modelscope_studio/components/antd/skeleton/__init__.py create mode 100644 backend/modelscope_studio/components/antd/skeleton/avatar/__init__.py create mode 100644 backend/modelscope_studio/components/antd/skeleton/button/__init__.py create mode 100644 backend/modelscope_studio/components/antd/skeleton/image/__init__.py create mode 100644 backend/modelscope_studio/components/antd/skeleton/input/__init__.py create mode 100644 backend/modelscope_studio/components/antd/skeleton/node/__init__.py create mode 100644 backend/modelscope_studio/components/antd/slider/__init__.py create mode 100644 backend/modelscope_studio/components/antd/slider/mark/__init__.py create mode 100644 backend/modelscope_studio/components/antd/space/__init__.py create mode 100644 backend/modelscope_studio/components/antd/space/compact/__init__.py create mode 100644 backend/modelscope_studio/components/antd/spin/__init__.py create mode 100644 backend/modelscope_studio/components/antd/statistic/__init__.py create mode 100644 backend/modelscope_studio/components/antd/statistic/countdown/__init__.py create mode 100644 backend/modelscope_studio/components/antd/steps/__init__.py create mode 100644 backend/modelscope_studio/components/antd/steps/item/__init__.py create mode 100644 backend/modelscope_studio/components/antd/switch/__init__.py create mode 100644 backend/modelscope_studio/components/antd/table/__init__.py create mode 100644 backend/modelscope_studio/components/antd/table/column/__init__.py create mode 100644 backend/modelscope_studio/components/antd/table/column_group/__init__.py create mode 100644 backend/modelscope_studio/components/antd/table/constants.py create mode 100644 backend/modelscope_studio/components/antd/table/expandable/__init__.py create mode 100644 backend/modelscope_studio/components/antd/table/row_selection/__init__.py create mode 100644 backend/modelscope_studio/components/antd/table/row_selection/selection/__init__.py create mode 100644 backend/modelscope_studio/components/antd/tabs/__init__.py create mode 100644 backend/modelscope_studio/components/antd/tabs/item/__init__.py create mode 100644 backend/modelscope_studio/components/antd/tag/__init__.py create mode 100644 backend/modelscope_studio/components/antd/tag/checkable_tag/__init__.py create mode 100644 backend/modelscope_studio/components/antd/time_picker/__init__.py create mode 100644 backend/modelscope_studio/components/antd/time_picker/range_picker/__init__.py create mode 100644 backend/modelscope_studio/components/antd/timeline/__init__.py create mode 100644 backend/modelscope_studio/components/antd/timeline/item/__init__.py create mode 100644 backend/modelscope_studio/components/antd/tooltip/__init__.py create mode 100644 backend/modelscope_studio/components/antd/tour/__init__.py create mode 100644 backend/modelscope_studio/components/antd/tour/step/__init__.py create mode 100644 backend/modelscope_studio/components/antd/transfer/__init__.py create mode 100644 backend/modelscope_studio/components/antd/tree/__init__.py create mode 100644 backend/modelscope_studio/components/antd/tree/directory_tree/__init__.py create mode 100644 backend/modelscope_studio/components/antd/tree/tree_node/__init__.py create mode 100644 backend/modelscope_studio/components/antd/tree_select/__init__.py create mode 100644 backend/modelscope_studio/components/antd/tree_select/tree_node/__init__.py create mode 100644 backend/modelscope_studio/components/antd/typography/__init__.py create mode 100644 backend/modelscope_studio/components/antd/typography/link/__init__.py create mode 100644 backend/modelscope_studio/components/antd/typography/paragraph/__init__.py create mode 100644 backend/modelscope_studio/components/antd/typography/text/__init__.py create mode 100644 backend/modelscope_studio/components/antd/typography/title/__init__.py create mode 100644 backend/modelscope_studio/components/antd/upload/__init__.py create mode 100644 backend/modelscope_studio/components/antd/upload/dragger/__init__.py create mode 100644 backend/modelscope_studio/components/antd/watermark/__init__.py create mode 100644 backend/modelscope_studio/components/base/__init__.py create mode 100644 backend/modelscope_studio/components/base/application/__init__.py create mode 100644 backend/modelscope_studio/components/base/div/__init__.py create mode 100644 backend/modelscope_studio/components/base/each/__init__.py create mode 100644 backend/modelscope_studio/components/base/filter/__init__.py create mode 100644 backend/modelscope_studio/components/base/fragment/__init__.py create mode 100644 backend/modelscope_studio/components/base/slot/__init__.py create mode 100644 backend/modelscope_studio/components/base/span/__init__.py create mode 100644 backend/modelscope_studio/components/base/text/__init__.py rename backend/modelscope_studio/components/{ => legacy}/Chatbot/__init__.py (98%) rename backend/modelscope_studio/components/{ => legacy}/Chatbot/llm_thinking_presets.py (100%) rename backend/modelscope_studio/components/{ => legacy}/Flow/__init__.py (97%) rename backend/modelscope_studio/components/{ => legacy}/Flow/edge.py (100%) rename backend/modelscope_studio/components/{ => legacy}/Flow/node.py (100%) rename backend/modelscope_studio/components/{ => legacy}/Flow/node_schema.py (100%) rename backend/modelscope_studio/components/{ => legacy}/Lifecycle/__init__.py (96%) rename backend/modelscope_studio/components/{ => legacy}/Markdown/__init__.py (96%) rename backend/modelscope_studio/components/{ => legacy}/MultimodalInput/__init__.py (98%) rename backend/modelscope_studio/components/{ => legacy}/WaterfallGallery/__init__.py (99%) create mode 100644 backend/modelscope_studio/components/legacy/__init__.py rename backend/modelscope_studio/utils/{ => dev}/__init__.py (69%) create mode 100644 backend/modelscope_studio/utils/dev/component.py rename backend/modelscope_studio/utils/{ => dev}/process_links.py (100%) create mode 100644 backend/modelscope_studio/utils/dev/resolve_frontend_dir.py delete mode 100644 frontend/CHANGELOG.md delete mode 100644 frontend/Chatbot/gradio.config.js delete mode 100644 frontend/Chatbot/package.json delete mode 100644 frontend/Flow/gradio.config.js delete mode 100644 frontend/Markdown/gradio.config.js delete mode 100644 frontend/MultimodalInput/gradio.config.js delete mode 100644 frontend/MultimodalInput/package.json delete mode 100644 frontend/WaterfallGallery/gradio.config.js delete mode 100644 frontend/WaterfallGallery/package.json create mode 100644 frontend/antd/affix/Index.svelte create mode 100644 frontend/antd/affix/affix.tsx create mode 100644 frontend/antd/affix/gradio.config.js create mode 100644 frontend/antd/affix/package.json create mode 100644 frontend/antd/alert/Index.svelte create mode 100644 frontend/antd/alert/alert.tsx create mode 100644 frontend/antd/alert/error-boundary/Index.svelte create mode 100644 frontend/antd/alert/error-boundary/alert.error-boundary.tsx create mode 100644 frontend/antd/alert/error-boundary/gradio.config.js create mode 100644 frontend/antd/alert/error-boundary/package.json create mode 100644 frontend/antd/alert/gradio.config.js create mode 100644 frontend/antd/alert/package.json create mode 100644 frontend/antd/anchor/Index.svelte create mode 100644 frontend/antd/anchor/anchor.tsx create mode 100644 frontend/antd/anchor/context.ts create mode 100644 frontend/antd/anchor/gradio.config.js create mode 100644 frontend/antd/anchor/item/Index.svelte create mode 100644 frontend/antd/anchor/item/gradio.config.js create mode 100644 frontend/antd/anchor/item/package.json create mode 100644 frontend/antd/anchor/package.json create mode 100644 frontend/antd/auto-complete/Index.svelte create mode 100644 frontend/antd/auto-complete/auto-complete.tsx create mode 100644 frontend/antd/auto-complete/context.ts create mode 100644 frontend/antd/auto-complete/gradio.config.js create mode 100644 frontend/antd/auto-complete/option/Index.svelte create mode 100644 frontend/antd/auto-complete/option/gradio.config.js create mode 100644 frontend/antd/auto-complete/option/package.json create mode 100644 frontend/antd/auto-complete/package.json create mode 100644 frontend/antd/avatar/Index.svelte create mode 100644 frontend/antd/avatar/avatar.tsx create mode 100644 frontend/antd/avatar/gradio.config.js create mode 100644 frontend/antd/avatar/group/Index.svelte create mode 100644 frontend/antd/avatar/group/avatar.group.tsx create mode 100644 frontend/antd/avatar/group/gradio.config.js create mode 100644 frontend/antd/avatar/group/package.json create mode 100644 frontend/antd/avatar/package.json create mode 100644 frontend/antd/badge/Index.svelte create mode 100644 frontend/antd/badge/badge.tsx create mode 100644 frontend/antd/badge/gradio.config.js create mode 100644 frontend/antd/badge/package.json create mode 100644 frontend/antd/badge/ribbon/Index.svelte create mode 100644 frontend/antd/badge/ribbon/badge.ribbon.tsx create mode 100644 frontend/antd/badge/ribbon/gradio.config.js create mode 100644 frontend/antd/badge/ribbon/package.json create mode 100644 frontend/antd/breadcrumb/Index.svelte create mode 100644 frontend/antd/breadcrumb/breadcrumb.tsx create mode 100644 frontend/antd/breadcrumb/context.ts create mode 100644 frontend/antd/breadcrumb/gradio.config.js create mode 100644 frontend/antd/breadcrumb/item/BreadcrumbItem.svelte create mode 100644 frontend/antd/breadcrumb/item/Index.svelte create mode 100644 frontend/antd/breadcrumb/item/gradio.config.js create mode 100644 frontend/antd/breadcrumb/item/package.json create mode 100644 frontend/antd/breadcrumb/package.json create mode 100644 frontend/antd/button/Index.svelte create mode 100644 frontend/antd/button/button.tsx create mode 100644 frontend/antd/button/gradio.config.js create mode 100644 frontend/antd/button/group/Index.svelte create mode 100644 frontend/antd/button/group/button.group.less create mode 100644 frontend/antd/button/group/button.group.tsx create mode 100644 frontend/antd/button/group/gradio.config.js create mode 100644 frontend/antd/button/group/package.json create mode 100644 frontend/antd/button/package.json create mode 100644 frontend/antd/calendar/Index.svelte create mode 100644 frontend/antd/calendar/calendar.tsx create mode 100644 frontend/antd/calendar/gradio.config.js create mode 100644 frontend/antd/calendar/package.json create mode 100644 frontend/antd/card/Index.svelte create mode 100644 frontend/antd/card/card.tsx create mode 100644 frontend/antd/card/gradio.config.js create mode 100644 frontend/antd/card/grid/Index.svelte create mode 100644 frontend/antd/card/grid/card.grid.tsx create mode 100644 frontend/antd/card/grid/gradio.config.js create mode 100644 frontend/antd/card/grid/package.json create mode 100644 frontend/antd/card/meta/Index.svelte create mode 100644 frontend/antd/card/meta/card.meta.tsx create mode 100644 frontend/antd/card/meta/gradio.config.js create mode 100644 frontend/antd/card/meta/package.json create mode 100644 frontend/antd/card/package.json create mode 100644 frontend/antd/carousel/Index.svelte create mode 100644 frontend/antd/carousel/carousel.tsx create mode 100644 frontend/antd/carousel/gradio.config.js create mode 100644 frontend/antd/carousel/package.json create mode 100644 frontend/antd/cascader/Index.svelte create mode 100644 frontend/antd/cascader/cascader.tsx create mode 100644 frontend/antd/cascader/context.ts create mode 100644 frontend/antd/cascader/gradio.config.js create mode 100644 frontend/antd/cascader/option/Index.svelte create mode 100644 frontend/antd/cascader/option/gradio.config.js create mode 100644 frontend/antd/cascader/option/package.json create mode 100644 frontend/antd/cascader/package.json create mode 100644 frontend/antd/cascader/panel/Index.svelte create mode 100644 frontend/antd/cascader/panel/cascader.panel.tsx create mode 100644 frontend/antd/cascader/panel/gradio.config.js create mode 100644 frontend/antd/cascader/panel/package.json create mode 100644 frontend/antd/checkbox/Index.svelte create mode 100644 frontend/antd/checkbox/checkbox.tsx create mode 100644 frontend/antd/checkbox/context.ts create mode 100644 frontend/antd/checkbox/gradio.config.js create mode 100644 frontend/antd/checkbox/group/Index.svelte create mode 100644 frontend/antd/checkbox/group/checkbox.group.tsx create mode 100644 frontend/antd/checkbox/group/gradio.config.js create mode 100644 frontend/antd/checkbox/group/option/Index.svelte create mode 100644 frontend/antd/checkbox/group/option/gradio.config.js create mode 100644 frontend/antd/checkbox/group/option/package.json create mode 100644 frontend/antd/checkbox/group/package.json create mode 100644 frontend/antd/checkbox/package.json create mode 100644 frontend/antd/collapse/Index.svelte create mode 100644 frontend/antd/collapse/collapse.tsx create mode 100644 frontend/antd/collapse/context.ts create mode 100644 frontend/antd/collapse/gradio.config.js create mode 100644 frontend/antd/collapse/item/Index.svelte create mode 100644 frontend/antd/collapse/item/gradio.config.js create mode 100644 frontend/antd/collapse/item/package.json create mode 100644 frontend/antd/collapse/package.json create mode 100644 frontend/antd/color-picker/Index.svelte create mode 100644 frontend/antd/color-picker/color-picker.tsx create mode 100644 frontend/antd/color-picker/context.ts create mode 100644 frontend/antd/color-picker/gradio.config.js create mode 100644 frontend/antd/color-picker/package.json create mode 100644 frontend/antd/color-picker/preset/Index.svelte create mode 100644 frontend/antd/color-picker/preset/gradio.config.js create mode 100644 frontend/antd/color-picker/preset/package.json create mode 100644 frontend/antd/config-provider/Index.svelte create mode 100644 frontend/antd/config-provider/config-provider.tsx create mode 100644 frontend/antd/config-provider/gradio.config.js create mode 100644 frontend/antd/config-provider/locales.ts create mode 100644 frontend/antd/config-provider/package.json create mode 100644 frontend/antd/date-picker/Index.svelte create mode 100644 frontend/antd/date-picker/context.ts create mode 100644 frontend/antd/date-picker/date-picker.tsx create mode 100644 frontend/antd/date-picker/gradio.config.js create mode 100644 frontend/antd/date-picker/package.json create mode 100644 frontend/antd/date-picker/preset/Index.svelte create mode 100644 frontend/antd/date-picker/preset/gradio.config.js create mode 100644 frontend/antd/date-picker/preset/package.json create mode 100644 frontend/antd/date-picker/range-picker/Index.svelte create mode 100644 frontend/antd/date-picker/range-picker/date-picker.range-picker.tsx create mode 100644 frontend/antd/date-picker/range-picker/gradio.config.js create mode 100644 frontend/antd/date-picker/range-picker/package.json create mode 100644 frontend/antd/descriptions/Index.svelte create mode 100644 frontend/antd/descriptions/context.ts create mode 100644 frontend/antd/descriptions/descriptions.tsx create mode 100644 frontend/antd/descriptions/gradio.config.js create mode 100644 frontend/antd/descriptions/item/Index.svelte create mode 100644 frontend/antd/descriptions/item/gradio.config.js create mode 100644 frontend/antd/descriptions/item/package.json create mode 100644 frontend/antd/descriptions/package.json create mode 100644 frontend/antd/divider/Index.svelte create mode 100644 frontend/antd/divider/divider.tsx create mode 100644 frontend/antd/divider/gradio.config.js create mode 100644 frontend/antd/divider/package.json create mode 100644 frontend/antd/drawer/Index.svelte create mode 100644 frontend/antd/drawer/drawer.tsx create mode 100644 frontend/antd/drawer/gradio.config.js create mode 100644 frontend/antd/drawer/package.json create mode 100644 frontend/antd/dropdown/Index.svelte create mode 100644 frontend/antd/dropdown/button/Index.svelte create mode 100644 frontend/antd/dropdown/button/dropdown.button.tsx create mode 100644 frontend/antd/dropdown/button/gradio.config.js create mode 100644 frontend/antd/dropdown/button/package.json create mode 100644 frontend/antd/dropdown/dropdown.tsx create mode 100644 frontend/antd/dropdown/gradio.config.js create mode 100644 frontend/antd/dropdown/package.json create mode 100644 frontend/antd/empty/Index.svelte create mode 100644 frontend/antd/empty/empty.tsx create mode 100644 frontend/antd/empty/gradio.config.js create mode 100644 frontend/antd/empty/package.json create mode 100644 frontend/antd/flex/Index.svelte create mode 100644 frontend/antd/flex/flex.tsx create mode 100644 frontend/antd/flex/gradio.config.js create mode 100644 frontend/antd/flex/package.json create mode 100644 frontend/antd/float-button/Index.svelte create mode 100644 frontend/antd/float-button/back-top/Index.svelte create mode 100644 frontend/antd/float-button/back-top/float-button.back-top.tsx create mode 100644 frontend/antd/float-button/back-top/gradio.config.js create mode 100644 frontend/antd/float-button/back-top/package.json create mode 100644 frontend/antd/float-button/float-button.tsx create mode 100644 frontend/antd/float-button/gradio.config.js create mode 100644 frontend/antd/float-button/group/Index.svelte create mode 100644 frontend/antd/float-button/group/float-button.group.less create mode 100644 frontend/antd/float-button/group/float-button.group.tsx create mode 100644 frontend/antd/float-button/group/gradio.config.js create mode 100644 frontend/antd/float-button/group/package.json create mode 100644 frontend/antd/float-button/package.json create mode 100644 frontend/antd/form/Index.svelte create mode 100644 frontend/antd/form/context.ts create mode 100644 frontend/antd/form/form.tsx create mode 100644 frontend/antd/form/gradio.config.js create mode 100644 frontend/antd/form/item/Index.svelte create mode 100644 frontend/antd/form/item/form.item.tsx create mode 100644 frontend/antd/form/item/gradio.config.js create mode 100644 frontend/antd/form/item/package.json create mode 100644 frontend/antd/form/item/rule/Index.svelte create mode 100644 frontend/antd/form/item/rule/global.css create mode 100644 frontend/antd/form/item/rule/gradio.config.js create mode 100644 frontend/antd/form/item/rule/package.json create mode 100644 frontend/antd/form/package.json create mode 100644 frontend/antd/grid/col/Index.svelte create mode 100644 frontend/antd/grid/col/gradio.config.js create mode 100644 frontend/antd/grid/col/package.json create mode 100644 frontend/antd/grid/context.ts create mode 100644 frontend/antd/grid/row/Index.svelte create mode 100644 frontend/antd/grid/row/gradio.config.js create mode 100644 frontend/antd/grid/row/package.json create mode 100644 frontend/antd/grid/row/row.tsx create mode 100644 frontend/antd/icon/Index.svelte create mode 100644 frontend/antd/icon/gradio.config.js create mode 100644 frontend/antd/icon/icon.tsx create mode 100644 frontend/antd/icon/iconfont-provider/Index.svelte create mode 100644 frontend/antd/icon/iconfont-provider/context.ts create mode 100644 frontend/antd/icon/iconfont-provider/create-iconfont.ts create mode 100644 frontend/antd/icon/iconfont-provider/gradio.config.js create mode 100644 frontend/antd/icon/iconfont-provider/package.json create mode 100644 frontend/antd/icon/package.json create mode 100644 frontend/antd/image/Index.svelte create mode 100644 frontend/antd/image/gradio.config.js create mode 100644 frontend/antd/image/image.tsx create mode 100644 frontend/antd/image/package.json create mode 100644 frontend/antd/image/preview-group/Index.svelte create mode 100644 frontend/antd/image/preview-group/gradio.config.js create mode 100644 frontend/antd/image/preview-group/image.preview-group.tsx create mode 100644 frontend/antd/image/preview-group/package.json create mode 100644 frontend/antd/input-number/Index.svelte create mode 100644 frontend/antd/input-number/gradio.config.js create mode 100644 frontend/antd/input-number/input-number.tsx create mode 100644 frontend/antd/input-number/package.json create mode 100644 frontend/antd/input/Index.svelte create mode 100644 frontend/antd/input/gradio.config.js create mode 100644 frontend/antd/input/input.tsx create mode 100644 frontend/antd/input/otp/Index.svelte create mode 100644 frontend/antd/input/otp/gradio.config.js create mode 100644 frontend/antd/input/otp/input.otp.tsx create mode 100644 frontend/antd/input/otp/package.json create mode 100644 frontend/antd/input/package.json create mode 100644 frontend/antd/input/password/Index.svelte create mode 100644 frontend/antd/input/password/gradio.config.js create mode 100644 frontend/antd/input/password/input.password.tsx create mode 100644 frontend/antd/input/password/package.json create mode 100644 frontend/antd/input/search/Index.svelte create mode 100644 frontend/antd/input/search/gradio.config.js create mode 100644 frontend/antd/input/search/input.search.tsx create mode 100644 frontend/antd/input/search/package.json create mode 100644 frontend/antd/input/textarea/Index.svelte create mode 100644 frontend/antd/input/textarea/gradio.config.js create mode 100644 frontend/antd/input/textarea/input.textarea.tsx create mode 100644 frontend/antd/input/textarea/package.json create mode 100644 frontend/antd/layout/Base.svelte create mode 100644 frontend/antd/layout/Index.svelte create mode 100644 frontend/antd/layout/content/Index.svelte create mode 100644 frontend/antd/layout/content/gradio.config.js create mode 100644 frontend/antd/layout/content/package.json create mode 100644 frontend/antd/layout/footer/Index.svelte create mode 100644 frontend/antd/layout/footer/gradio.config.js create mode 100644 frontend/antd/layout/footer/package.json create mode 100644 frontend/antd/layout/gradio.config.js create mode 100644 frontend/antd/layout/header/Index.svelte create mode 100644 frontend/antd/layout/header/gradio.config.js create mode 100644 frontend/antd/layout/header/package.json create mode 100644 frontend/antd/layout/layout.base.tsx create mode 100644 frontend/antd/layout/package.json create mode 100644 frontend/antd/layout/sider/Index.svelte create mode 100644 frontend/antd/layout/sider/gradio.config.js create mode 100644 frontend/antd/layout/sider/layout.sider.tsx create mode 100644 frontend/antd/layout/sider/package.json create mode 100644 frontend/antd/list/Index.svelte create mode 100644 frontend/antd/list/gradio.config.js create mode 100644 frontend/antd/list/item/Index.svelte create mode 100644 frontend/antd/list/item/gradio.config.js create mode 100644 frontend/antd/list/item/list.item.tsx create mode 100644 frontend/antd/list/item/meta/Index.svelte create mode 100644 frontend/antd/list/item/meta/gradio.config.js create mode 100644 frontend/antd/list/item/meta/list.item.meta.tsx create mode 100644 frontend/antd/list/item/meta/package.json create mode 100644 frontend/antd/list/item/package.json create mode 100644 frontend/antd/list/list.tsx create mode 100644 frontend/antd/list/package.json create mode 100644 frontend/antd/mentions/Index.svelte create mode 100644 frontend/antd/mentions/context.ts create mode 100644 frontend/antd/mentions/gradio.config.js create mode 100644 frontend/antd/mentions/mentions.tsx create mode 100644 frontend/antd/mentions/option/Index.svelte create mode 100644 frontend/antd/mentions/option/gradio.config.js create mode 100644 frontend/antd/mentions/option/package.json create mode 100644 frontend/antd/mentions/package.json create mode 100644 frontend/antd/menu/Index.svelte create mode 100644 frontend/antd/menu/context.ts create mode 100644 frontend/antd/menu/gradio.config.js create mode 100644 frontend/antd/menu/item/Index.svelte create mode 100644 frontend/antd/menu/item/gradio.config.js create mode 100644 frontend/antd/menu/item/package.json create mode 100644 frontend/antd/menu/menu.tsx create mode 100644 frontend/antd/menu/package.json create mode 100644 frontend/antd/message/Index.svelte create mode 100644 frontend/antd/message/gradio.config.js create mode 100644 frontend/antd/message/message.tsx create mode 100644 frontend/antd/message/package.json create mode 100644 frontend/antd/modal/Index.svelte create mode 100644 frontend/antd/modal/gradio.config.js create mode 100644 frontend/antd/modal/modal.tsx create mode 100644 frontend/antd/modal/package.json create mode 100644 frontend/antd/notification/Index.svelte create mode 100644 frontend/antd/notification/gradio.config.js create mode 100644 frontend/antd/notification/notification.tsx create mode 100644 frontend/antd/notification/package.json create mode 100644 frontend/antd/pagination/Index.svelte create mode 100644 frontend/antd/pagination/gradio.config.js create mode 100644 frontend/antd/pagination/package.json create mode 100644 frontend/antd/pagination/pagination.tsx create mode 100644 frontend/antd/popconfirm/Index.svelte create mode 100644 frontend/antd/popconfirm/gradio.config.js create mode 100644 frontend/antd/popconfirm/package.json create mode 100644 frontend/antd/popconfirm/popconfirm.tsx create mode 100644 frontend/antd/popover/Index.svelte create mode 100644 frontend/antd/popover/gradio.config.js create mode 100644 frontend/antd/popover/package.json create mode 100644 frontend/antd/popover/popover.tsx create mode 100644 frontend/antd/progress/Index.svelte create mode 100644 frontend/antd/progress/gradio.config.js create mode 100644 frontend/antd/progress/package.json create mode 100644 frontend/antd/progress/progress.tsx create mode 100644 frontend/antd/qr-code/Index.svelte create mode 100644 frontend/antd/qr-code/gradio.config.js create mode 100644 frontend/antd/qr-code/package.json create mode 100644 frontend/antd/qr-code/qr-code.tsx create mode 100644 frontend/antd/radio/Index.svelte create mode 100644 frontend/antd/radio/button/Index.svelte create mode 100644 frontend/antd/radio/button/gradio.config.js create mode 100644 frontend/antd/radio/button/package.json create mode 100644 frontend/antd/radio/button/radio.button.tsx create mode 100644 frontend/antd/radio/context.ts create mode 100644 frontend/antd/radio/gradio.config.js create mode 100644 frontend/antd/radio/group/Index.svelte create mode 100644 frontend/antd/radio/group/gradio.config.js create mode 100644 frontend/antd/radio/group/option/Index.svelte create mode 100644 frontend/antd/radio/group/option/gradio.config.js create mode 100644 frontend/antd/radio/group/option/package.json create mode 100644 frontend/antd/radio/group/package.json create mode 100644 frontend/antd/radio/group/radio.group.less create mode 100644 frontend/antd/radio/group/radio.group.tsx create mode 100644 frontend/antd/radio/package.json create mode 100644 frontend/antd/radio/radio.tsx create mode 100644 frontend/antd/rate/Index.svelte create mode 100644 frontend/antd/rate/gradio.config.js create mode 100644 frontend/antd/rate/package.json create mode 100644 frontend/antd/rate/rate.tsx create mode 100644 frontend/antd/result/Index.svelte create mode 100644 frontend/antd/result/gradio.config.js create mode 100644 frontend/antd/result/package.json create mode 100644 frontend/antd/result/result.tsx create mode 100644 frontend/antd/segmented/Index.svelte create mode 100644 frontend/antd/segmented/context.ts create mode 100644 frontend/antd/segmented/gradio.config.js create mode 100644 frontend/antd/segmented/option/Index.svelte create mode 100644 frontend/antd/segmented/option/gradio.config.js create mode 100644 frontend/antd/segmented/option/package.json create mode 100644 frontend/antd/segmented/package.json create mode 100644 frontend/antd/segmented/segmented.tsx create mode 100644 frontend/antd/select/Index.svelte create mode 100644 frontend/antd/select/context.ts create mode 100644 frontend/antd/select/gradio.config.js create mode 100644 frontend/antd/select/option/Index.svelte create mode 100644 frontend/antd/select/option/gradio.config.js create mode 100644 frontend/antd/select/option/package.json create mode 100644 frontend/antd/select/package.json create mode 100644 frontend/antd/select/select.tsx create mode 100644 frontend/antd/skeleton/Index.svelte create mode 100644 frontend/antd/skeleton/avatar/Index.svelte create mode 100644 frontend/antd/skeleton/avatar/gradio.config.js create mode 100644 frontend/antd/skeleton/avatar/package.json create mode 100644 frontend/antd/skeleton/avatar/skeleton.avatar.tsx create mode 100644 frontend/antd/skeleton/button/Index.svelte create mode 100644 frontend/antd/skeleton/button/gradio.config.js create mode 100644 frontend/antd/skeleton/button/package.json create mode 100644 frontend/antd/skeleton/button/skeleton.button.tsx create mode 100644 frontend/antd/skeleton/gradio.config.js create mode 100644 frontend/antd/skeleton/image/Index.svelte create mode 100644 frontend/antd/skeleton/image/gradio.config.js create mode 100644 frontend/antd/skeleton/image/package.json create mode 100644 frontend/antd/skeleton/image/skeleton.image.tsx create mode 100644 frontend/antd/skeleton/input/Index.svelte create mode 100644 frontend/antd/skeleton/input/gradio.config.js create mode 100644 frontend/antd/skeleton/input/package.json create mode 100644 frontend/antd/skeleton/input/skeleton.input.tsx create mode 100644 frontend/antd/skeleton/node/Index.svelte create mode 100644 frontend/antd/skeleton/node/gradio.config.js create mode 100644 frontend/antd/skeleton/node/package.json create mode 100644 frontend/antd/skeleton/node/skeleton.node.tsx create mode 100644 frontend/antd/skeleton/package.json create mode 100644 frontend/antd/skeleton/skeleton.tsx create mode 100644 frontend/antd/slider/Index.svelte create mode 100644 frontend/antd/slider/context.ts create mode 100644 frontend/antd/slider/gradio.config.js create mode 100644 frontend/antd/slider/mark/Index.svelte create mode 100644 frontend/antd/slider/mark/gradio.config.js create mode 100644 frontend/antd/slider/mark/package.json create mode 100644 frontend/antd/slider/package.json create mode 100644 frontend/antd/slider/slider.tsx create mode 100644 frontend/antd/space/Index.svelte create mode 100644 frontend/antd/space/compact/Index.svelte create mode 100644 frontend/antd/space/compact/gradio.config.js create mode 100644 frontend/antd/space/compact/package.json create mode 100644 frontend/antd/space/compact/space.compact.tsx create mode 100644 frontend/antd/space/gradio.config.js create mode 100644 frontend/antd/space/package.json create mode 100644 frontend/antd/space/space.tsx create mode 100644 frontend/antd/spin/Index.svelte create mode 100644 frontend/antd/spin/gradio.config.js create mode 100644 frontend/antd/spin/package.json create mode 100644 frontend/antd/spin/spin.tsx create mode 100644 frontend/antd/statistic/Index.svelte create mode 100644 frontend/antd/statistic/countdown/Index.svelte create mode 100644 frontend/antd/statistic/countdown/gradio.config.js create mode 100644 frontend/antd/statistic/countdown/package.json create mode 100644 frontend/antd/statistic/countdown/statistic.countdown.tsx create mode 100644 frontend/antd/statistic/gradio.config.js create mode 100644 frontend/antd/statistic/package.json create mode 100644 frontend/antd/statistic/statistic.tsx create mode 100644 frontend/antd/steps/Index.svelte create mode 100644 frontend/antd/steps/context.ts create mode 100644 frontend/antd/steps/gradio.config.js create mode 100644 frontend/antd/steps/item/Index.svelte create mode 100644 frontend/antd/steps/item/gradio.config.js create mode 100644 frontend/antd/steps/item/package.json create mode 100644 frontend/antd/steps/package.json create mode 100644 frontend/antd/steps/steps.tsx create mode 100644 frontend/antd/switch/Index.svelte create mode 100644 frontend/antd/switch/gradio.config.js create mode 100644 frontend/antd/switch/package.json create mode 100644 frontend/antd/switch/switch.tsx create mode 100644 frontend/antd/table/Index.svelte create mode 100644 frontend/antd/table/column-group/Index.svelte create mode 100644 frontend/antd/table/column-group/gradio.config.js create mode 100644 frontend/antd/table/column-group/package.json create mode 100644 frontend/antd/table/column/Index.svelte create mode 100644 frontend/antd/table/column/gradio.config.js create mode 100644 frontend/antd/table/column/package.json create mode 100644 frontend/antd/table/context.ts create mode 100644 frontend/antd/table/expandable/Expandable.svelte create mode 100644 frontend/antd/table/expandable/Index.svelte create mode 100644 frontend/antd/table/expandable/gradio.config.js create mode 100644 frontend/antd/table/expandable/package.json create mode 100644 frontend/antd/table/gradio.config.js create mode 100644 frontend/antd/table/package.json create mode 100644 frontend/antd/table/row-selection/Index.svelte create mode 100644 frontend/antd/table/row-selection/RowSelection.svelte create mode 100644 frontend/antd/table/row-selection/gradio.config.js create mode 100644 frontend/antd/table/row-selection/package.json create mode 100644 frontend/antd/table/row-selection/selection/Index.svelte create mode 100644 frontend/antd/table/row-selection/selection/gradio.config.js create mode 100644 frontend/antd/table/row-selection/selection/package.json create mode 100644 frontend/antd/table/table.tsx create mode 100644 frontend/antd/tabs/Index.svelte create mode 100644 frontend/antd/tabs/context.ts create mode 100644 frontend/antd/tabs/gradio.config.js create mode 100644 frontend/antd/tabs/item/Index.svelte create mode 100644 frontend/antd/tabs/item/gradio.config.js create mode 100644 frontend/antd/tabs/item/package.json create mode 100644 frontend/antd/tabs/package.json create mode 100644 frontend/antd/tabs/tabs.tsx create mode 100644 frontend/antd/tag/Index.svelte create mode 100644 frontend/antd/tag/checkable-tag/Index.svelte create mode 100644 frontend/antd/tag/checkable-tag/gradio.config.js create mode 100644 frontend/antd/tag/checkable-tag/package.json create mode 100644 frontend/antd/tag/checkable-tag/tag.checkable-tag.tsx create mode 100644 frontend/antd/tag/gradio.config.js create mode 100644 frontend/antd/tag/package.json create mode 100644 frontend/antd/tag/tag.tsx create mode 100644 frontend/antd/time-picker/Index.svelte create mode 100644 frontend/antd/time-picker/gradio.config.js create mode 100644 frontend/antd/time-picker/package.json create mode 100644 frontend/antd/time-picker/range-picker/Index.svelte create mode 100644 frontend/antd/time-picker/range-picker/gradio.config.js create mode 100644 frontend/antd/time-picker/range-picker/package.json create mode 100644 frontend/antd/time-picker/range-picker/time-picker.range-picker.tsx create mode 100644 frontend/antd/time-picker/time-picker.tsx create mode 100644 frontend/antd/timeline/Index.svelte create mode 100644 frontend/antd/timeline/context.ts create mode 100644 frontend/antd/timeline/gradio.config.js create mode 100644 frontend/antd/timeline/item/Index.svelte create mode 100644 frontend/antd/timeline/item/gradio.config.js create mode 100644 frontend/antd/timeline/item/package.json create mode 100644 frontend/antd/timeline/package.json create mode 100644 frontend/antd/timeline/timeline.tsx create mode 100644 frontend/antd/tooltip/Index.svelte create mode 100644 frontend/antd/tooltip/gradio.config.js create mode 100644 frontend/antd/tooltip/package.json create mode 100644 frontend/antd/tooltip/tooltip.tsx create mode 100644 frontend/antd/tour/Index.svelte create mode 100644 frontend/antd/tour/context.ts create mode 100644 frontend/antd/tour/gradio.config.js create mode 100644 frontend/antd/tour/package.json create mode 100644 frontend/antd/tour/step/Index.svelte create mode 100644 frontend/antd/tour/step/gradio.config.js create mode 100644 frontend/antd/tour/step/package.json create mode 100644 frontend/antd/tour/tour.tsx create mode 100644 frontend/antd/transfer/Index.svelte create mode 100644 frontend/antd/transfer/gradio.config.js create mode 100644 frontend/antd/transfer/package.json create mode 100644 frontend/antd/transfer/transfer.tsx create mode 100644 frontend/antd/tree-select/Index.svelte create mode 100644 frontend/antd/tree-select/context.ts create mode 100644 frontend/antd/tree-select/gradio.config.js create mode 100644 frontend/antd/tree-select/package.json create mode 100644 frontend/antd/tree-select/tree-node/Index.svelte create mode 100644 frontend/antd/tree-select/tree-node/gradio.config.js create mode 100644 frontend/antd/tree-select/tree-node/package.json create mode 100644 frontend/antd/tree-select/tree-select.tsx create mode 100644 frontend/antd/tree/Index.svelte create mode 100644 frontend/antd/tree/context.ts create mode 100644 frontend/antd/tree/directory-tree/Index.svelte create mode 100644 frontend/antd/tree/directory-tree/gradio.config.js create mode 100644 frontend/antd/tree/directory-tree/package.json create mode 100644 frontend/antd/tree/gradio.config.js create mode 100644 frontend/antd/tree/package.json create mode 100644 frontend/antd/tree/tree-node/Index.svelte create mode 100644 frontend/antd/tree/tree-node/gradio.config.js create mode 100644 frontend/antd/tree/tree-node/package.json create mode 100644 frontend/antd/tree/tree.tsx create mode 100644 frontend/antd/typography/Base.svelte create mode 100644 frontend/antd/typography/link/Index.svelte create mode 100644 frontend/antd/typography/link/gradio.config.js create mode 100644 frontend/antd/typography/link/package.json create mode 100644 frontend/antd/typography/paragraph/Index.svelte create mode 100644 frontend/antd/typography/paragraph/gradio.config.js create mode 100644 frontend/antd/typography/paragraph/package.json create mode 100644 frontend/antd/typography/text/Index.svelte create mode 100644 frontend/antd/typography/text/gradio.config.js create mode 100644 frontend/antd/typography/text/package.json create mode 100644 frontend/antd/typography/title/Index.svelte create mode 100644 frontend/antd/typography/title/gradio.config.js create mode 100644 frontend/antd/typography/title/package.json create mode 100644 frontend/antd/typography/typography.base.tsx create mode 100644 frontend/antd/upload/Index.svelte create mode 100644 frontend/antd/upload/dragger/Index.svelte create mode 100644 frontend/antd/upload/dragger/gradio.config.js create mode 100644 frontend/antd/upload/dragger/package.json create mode 100644 frontend/antd/upload/dragger/upload.dragger.tsx create mode 100644 frontend/antd/upload/gradio.config.js create mode 100644 frontend/antd/upload/package.json create mode 100644 frontend/antd/upload/upload.tsx create mode 100644 frontend/antd/watermark/Index.svelte create mode 100644 frontend/antd/watermark/gradio.config.js create mode 100644 frontend/antd/watermark/package.json create mode 100644 frontend/antd/watermark/watermark.tsx create mode 100644 frontend/base/application/Index.svelte create mode 100644 frontend/base/application/gradio.config.js create mode 100644 frontend/base/application/package.json create mode 100644 frontend/base/div/Index.svelte create mode 100644 frontend/base/div/gradio.config.js create mode 100644 frontend/base/div/package.json create mode 100644 frontend/base/each/Each.svelte create mode 100644 frontend/base/each/Index.svelte create mode 100644 frontend/base/each/gradio.config.js create mode 100644 frontend/base/each/package.json create mode 100644 frontend/base/filter/Index.svelte create mode 100644 frontend/base/filter/gradio.config.js create mode 100644 frontend/base/filter/package.json create mode 100644 frontend/base/fragment/Index.svelte create mode 100644 frontend/base/fragment/ShowFragment.svelte create mode 100644 frontend/base/fragment/fragment.tsx create mode 100644 frontend/base/fragment/gradio.config.js create mode 100644 frontend/base/fragment/package.json create mode 100644 frontend/base/slot/Index.svelte create mode 100644 frontend/base/slot/gradio.config.js create mode 100644 frontend/base/slot/package.json create mode 100644 frontend/base/span/Index.svelte create mode 100644 frontend/base/span/gradio.config.js create mode 100644 frontend/base/span/package.json create mode 100644 frontend/base/text/Index.svelte create mode 100644 frontend/base/text/global.css create mode 100644 frontend/base/text/gradio.config.js create mode 100644 frontend/base/text/package.json delete mode 100644 frontend/compiled/tsconfig.build.json delete mode 100644 frontend/compiled/tsconfig.json delete mode 100644 frontend/compiled/tsconfig.node.json delete mode 100644 frontend/compiled/vite.config.ts create mode 100644 frontend/defineConfig.js rename fixtures.d.ts => frontend/fixtures.d.ts (62%) rename frontend/{ => legacy}/Chatbot/CHANGELOG.md (100%) rename frontend/{ => legacy}/Chatbot/Index.svelte (99%) create mode 100644 frontend/legacy/Chatbot/gradio.config.js rename frontend/{Lifecycle => legacy/Chatbot}/package.json (68%) rename frontend/{ => legacy}/Chatbot/shared/ChatBot.svelte (99%) rename frontend/{ => legacy}/Chatbot/shared/Copy.svelte (100%) rename frontend/{ => legacy}/Chatbot/shared/FlushingMarkdown.svelte (100%) rename frontend/{ => legacy}/Chatbot/shared/LikeDislike.svelte (100%) rename frontend/{ => legacy}/Chatbot/shared/Pending.svelte (100%) rename frontend/{ => legacy}/Chatbot/shared/llm-thinking-presets.ts (100%) rename frontend/{ => legacy}/Chatbot/shared/utils.ts (100%) rename frontend/{ => legacy}/Flow/CHANGELOG.md (100%) rename frontend/{ => legacy}/Flow/Index.svelte (97%) create mode 100644 frontend/legacy/Flow/gradio.config.js rename frontend/{ => legacy}/Flow/package.json (53%) rename frontend/{ => legacy}/Flow/schema.json (100%) rename frontend/{ => legacy}/Flow/schema.ts (100%) rename frontend/{ => legacy}/Flow/shared/Flow.svelte (97%) rename frontend/{ => legacy}/Flow/shared/utils.ts (100%) rename frontend/{ => legacy}/Lifecycle/CHANGELOG.md (100%) create mode 100644 frontend/legacy/Lifecycle/gradio.config.js rename frontend/{ => legacy}/Lifecycle/index.svelte (100%) create mode 100644 frontend/legacy/Lifecycle/package.json rename frontend/{ => legacy}/Lifecycle/shared/utils.ts (100%) rename frontend/{ => legacy}/Markdown/CHANGELOG.md (100%) rename frontend/{ => legacy}/Markdown/Example.svelte (100%) rename frontend/{ => legacy}/Markdown/Index.svelte (100%) create mode 100644 frontend/legacy/Markdown/gradio.config.js rename frontend/{ => legacy}/Markdown/package.json (60%) rename frontend/{ => legacy}/Markdown/shared/Markdown.svelte (100%) rename frontend/{ => legacy}/MultimodalInput/CHANGELOG.md (100%) rename frontend/{ => legacy}/MultimodalInput/Example.svelte (100%) rename frontend/{ => legacy}/MultimodalInput/Index.svelte (99%) create mode 100644 frontend/legacy/MultimodalInput/gradio.config.js create mode 100644 frontend/legacy/MultimodalInput/package.json rename frontend/{ => legacy}/MultimodalInput/shared/AudioRecorder.svelte (100%) rename frontend/{ => legacy}/MultimodalInput/shared/FilePreview.svelte (100%) rename frontend/{ => legacy}/MultimodalInput/shared/Input.svelte (100%) rename frontend/{ => legacy}/MultimodalInput/shared/Loader.svelte (100%) rename frontend/{ => legacy}/MultimodalInput/shared/RemoveIcon.svelte (100%) rename frontend/{ => legacy}/MultimodalInput/shared/SubmitButton.svelte (100%) rename frontend/{ => legacy}/MultimodalInput/shared/UploadButton.svelte (100%) rename frontend/{ => legacy}/MultimodalInput/shared/UploadIcon.svelte (100%) rename frontend/{ => legacy}/MultimodalInput/shared/Webcam.svelte (100%) rename frontend/{ => legacy}/MultimodalInput/shared/context.ts (100%) rename frontend/{ => legacy}/MultimodalInput/shared/global.d.ts (100%) rename frontend/{ => legacy}/MultimodalInput/shared/utils.ts (100%) rename frontend/{ => legacy}/WaterfallGallery/CHANGELOG.md (100%) rename frontend/{ => legacy}/WaterfallGallery/Index.svelte (100%) create mode 100644 frontend/legacy/WaterfallGallery/gradio.config.js rename frontend/{shared => legacy/WaterfallGallery}/package.json (57%) rename frontend/{ => legacy}/WaterfallGallery/shared/Dislike.svelte (100%) rename frontend/{ => legacy}/WaterfallGallery/shared/Gallery.svelte (99%) rename frontend/{ => legacy}/WaterfallGallery/shared/Image.svelte (100%) rename frontend/{ => legacy}/WaterfallGallery/shared/Waterfall/createWaterfall.ts (100%) rename frontend/{ => legacy}/WaterfallGallery/shared/Waterfall/index.ts (100%) rename frontend/{ => legacy}/WaterfallGallery/shared/Waterfall/layout.ts (100%) rename frontend/{ => legacy}/WaterfallGallery/shared/utils.ts (100%) rename frontend/{ => legacy}/compiled/CHANGELOG.md (100%) rename frontend/{ => legacy}/compiled/components/FileView/index.svelte (100%) rename frontend/{ => legacy}/compiled/components/FileView/shared/FileView.svelte (83%) rename frontend/{ => legacy}/compiled/components/Flow/index.svelte (86%) rename frontend/{ => legacy}/compiled/components/Markdown/index.svelte (86%) rename frontend/{ => legacy}/compiled/components/ReactComponent.svelte (95%) rename frontend/{ => legacy}/compiled/global.d.ts (100%) rename frontend/{ => legacy}/compiled/index.ts (87%) rename frontend/{ => legacy}/compiled/package.json (50%) rename frontend/{ => legacy}/compiled/src/ComponentConfigProvider.tsx (100%) rename frontend/{ => legacy}/compiled/src/FileView/Pdf.tsx (100%) rename frontend/{ => legacy}/compiled/src/FileView/hooks/usePreview.ts (100%) rename frontend/{ => legacy}/compiled/src/FileView/index.less (100%) rename frontend/{ => legacy}/compiled/src/FileView/index.tsx (100%) rename frontend/{ => legacy}/compiled/src/Flow/FlowContext.ts (100%) rename frontend/{ => legacy}/compiled/src/Flow/components/CustomComponent.tsx (100%) rename frontend/{ => legacy}/compiled/src/Flow/components/FileUpload.tsx (100%) rename frontend/{ => legacy}/compiled/src/Flow/components/FormListItemWrapper.tsx (100%) rename frontend/{ => legacy}/compiled/src/Flow/flow-components/ConnectionHandle.tsx (100%) rename frontend/{ => legacy}/compiled/src/Flow/flow-components/ConnectionLine.tsx (100%) rename frontend/{ => legacy}/compiled/src/Flow/flow-components/Controls.tsx (100%) rename frontend/{ => legacy}/compiled/src/Flow/flow-components/Edge.tsx (100%) rename frontend/{ => legacy}/compiled/src/Flow/flow-components/Node.tsx (100%) rename frontend/{ => legacy}/compiled/src/Flow/flow-components/Sidebar.tsx (100%) rename frontend/{ => legacy}/compiled/src/Flow/i18n.ts (100%) rename frontend/{ => legacy}/compiled/src/Flow/index.less (100%) rename frontend/{ => legacy}/compiled/src/Flow/index.tsx (100%) rename frontend/{ => legacy}/compiled/src/Flow/type.ts (100%) rename frontend/{ => legacy}/compiled/src/Flow/utils.ts (100%) rename frontend/{ => legacy}/compiled/src/Markdown/components/Anchor.tsx (100%) rename frontend/{ => legacy}/compiled/src/Markdown/components/Audio.tsx (100%) rename frontend/{ => legacy}/compiled/src/Markdown/components/Code.tsx (100%) rename frontend/{ => legacy}/compiled/src/Markdown/components/CustomComponent.tsx (100%) rename frontend/{ => legacy}/compiled/src/Markdown/components/Heading.tsx (100%) rename frontend/{ => legacy}/compiled/src/Markdown/components/Image.tsx (100%) rename frontend/{ => legacy}/compiled/src/Markdown/components/Video.tsx (100%) rename frontend/{ => legacy}/compiled/src/Markdown/components/custom/Accordion.tsx (100%) rename frontend/{ => legacy}/compiled/src/Markdown/components/custom/Chart.tsx (100%) rename frontend/{ => legacy}/compiled/src/Markdown/components/custom/File.tsx (100%) rename frontend/{ => legacy}/compiled/src/Markdown/components/custom/FlushingEnd.tsx (100%) rename frontend/{ => legacy}/compiled/src/Markdown/components/custom/SelectBox.tsx (100%) rename frontend/{ => legacy}/compiled/src/Markdown/context.ts (100%) rename frontend/{ => legacy}/compiled/src/Markdown/hooks/useCustomProps.ts (100%) rename frontend/{ => legacy}/compiled/src/Markdown/index.less (100%) rename frontend/{ => legacy}/compiled/src/Markdown/index.tsx (100%) rename frontend/{ => legacy}/compiled/src/Markdown/react-markdown.d.ts (100%) rename frontend/{ => legacy}/compiled/src/Markdown/rehype-plugins/rehype-Inline-code-property.ts (100%) rename frontend/{ => legacy}/compiled/src/Markdown/rehype-plugins/rehype-sanitize/index.d.ts (100%) rename frontend/{ => legacy}/compiled/src/Markdown/rehype-plugins/rehype-sanitize/index.js (100%) rename frontend/{ => legacy}/compiled/src/Markdown/rehype-plugins/rehype-sanitize/schema.js (100%) rename frontend/{ => legacy}/compiled/src/Markdown/remark-plugins/remark-directive-rehype.ts (100%) rename frontend/{ => legacy}/compiled/src/Markdown/type.ts (100%) rename frontend/{ => legacy}/compiled/src/defineComponent.tsx (100%) rename frontend/{ => legacy}/compiled/src/index.ts (100%) rename frontend/{ => legacy}/compiled/src/mount.tsx (100%) rename frontend/{ => legacy}/compiled/src/polyfills.ts (100%) rename frontend/{ => legacy}/compiled/src/shared/hooks/useCustomComponent.ts (100%) rename frontend/{ => legacy}/compiled/src/shared/hooks/useMemoizedEqualValue.ts (100%) rename frontend/{ => legacy}/compiled/src/shared/hooks/useRefValue.ts (100%) rename frontend/{ => legacy}/compiled/src/shared/index.ts (100%) rename frontend/{ => legacy}/compiled/src/shared/type.ts (100%) rename frontend/{ => legacy}/compiled/src/utils.ts (100%) create mode 100644 frontend/plugin.js delete mode 100644 frontend/shared/CHANGELOG.md create mode 100644 frontend/svelte-preprocess-react/component.ts create mode 100644 frontend/svelte-preprocess-react/context.ts create mode 100644 frontend/svelte-preprocess-react/events-polyfills.ts create mode 100644 frontend/svelte-preprocess-react/index.ts create mode 100644 frontend/svelte-preprocess-react/inject.ts create mode 100644 frontend/svelte-preprocess-react/internal/Bridge.ts create mode 100644 frontend/svelte-preprocess-react/internal/Child.ts create mode 100644 frontend/svelte-preprocess-react/internal/ReactWrapper.svelte create mode 100644 frontend/svelte-preprocess-react/internal/types.ts create mode 100644 frontend/svelte-preprocess-react/polyfills.ts create mode 100644 frontend/svelte-preprocess-react/react-slot.tsx create mode 100644 frontend/svelte-preprocess-react/slot.ts create mode 100644 frontend/svelte-preprocess-react/sveltify.ts create mode 100644 frontend/svelte-preprocess-react/useStore.ts create mode 100644 frontend/tsconfig.json create mode 100644 frontend/utils/createFunction.ts create mode 100644 frontend/utils/createItemsContext.tsx create mode 100644 frontend/utils/hooks/useFunction.ts create mode 100644 frontend/utils/hooks/useTargets.ts create mode 100644 frontend/utils/omitUndefinedProps.ts create mode 100644 frontend/utils/renderItems.tsx create mode 100644 frontend/utils/renderSlot.tsx create mode 100644 frontend/utils/styleObject2String.ts rename frontend/{shared/src/index.ts => utils/upload.ts} (100%) diff --git a/.husky/commit-msg b/.husky/commit-msg index 9b58085f..0c61d206 100755 --- a/.husky/commit-msg +++ b/.husky/commit-msg @@ -1,4 +1 @@ -#!/bin/sh -. "$(dirname "$0")/_/husky.sh" - -npx commitlint -e $HUSKY_GIT_PARAMS +pnpm exec commitlint -e $HUSKY_GIT_PARAMS diff --git a/.husky/pre-commit b/.husky/pre-commit index 36af2198..5ee7abd8 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,4 +1 @@ -#!/bin/sh -. "$(dirname "$0")/_/husky.sh" - -npx lint-staged +pnpm exec lint-staged diff --git a/backend/modelscope_studio/__init__.py b/backend/modelscope_studio/__init__.py index a86d5328..f635a057 100644 --- a/backend/modelscope_studio/__init__.py +++ b/backend/modelscope_studio/__init__.py @@ -1,8 +1,3 @@ -from .components import ModelScopeChatbot as Chatbot -from .components import ModelScopeFlow as Flow -from .components import ModelScopeLifecycle as Lifecycle -from .components import ModelScopeMarkdown as Markdown -from .components import ModelScopeMultimodalInput as MultimodalInput -from .components import ModelScopeWaterfallGallery as WaterfallGallery +from .components.legacy import * from .external import load from .version import __version__ diff --git a/backend/modelscope_studio/components/__init__.py b/backend/modelscope_studio/components/__init__.py deleted file mode 100644 index 190ba297..00000000 --- a/backend/modelscope_studio/components/__init__.py +++ /dev/null @@ -1,6 +0,0 @@ -from .Chatbot import ModelScopeChatbot -from .Flow import ModelScopeFlow -from .Lifecycle import ModelScopeLifecycle -from .Markdown import ModelScopeMarkdown -from .MultimodalInput import ModelScopeMultimodalInput -from .WaterfallGallery import ModelScopeWaterfallGallery diff --git a/backend/modelscope_studio/components/antd/__init__.py b/backend/modelscope_studio/components/antd/__init__.py new file mode 100644 index 00000000..cfcad3ca --- /dev/null +++ b/backend/modelscope_studio/components/antd/__init__.py @@ -0,0 +1,142 @@ +from .affix import AntdAffix as Affix +from .alert import AntdAlert as Alert +from .alert.error_boundary import AntdAlertErrorBoundary as AlertErrorBoundary +from .anchor import AntdAnchor as Anchor +from .anchor.item import AntdAnchorItem as AnchorItem +from .auto_complete import AntdAutoComplete as AutoComplete +from .auto_complete.option import AntdAutoCompleteOption as AutoCompleteOption +from .avatar import AntdAvatar as Avatar +from .avatar.group import AntdAvatarGroup as AvatarGroup +from .badge import AntdBadge as Badge +from .badge.ribbon import AntdBadgeRibbon as BadgeRibbon +from .breadcrumb import AntdBreadcrumb as Breadcrumb +from .breadcrumb.item import AntdBreadcrumbItem as BreadcrumbItem +from .button import AntdButton as Button +from .button.group import AntdButtonGroup as ButtonGroup +from .calendar import AntdCalendar as Calendar +from .card import AntdCard as Card +from .card.grid import AntdCardGrid as CardGrid +from .card.meta import AntdCardMeta as CardMeta +from .carousel import AntdCarousel as Carousel +from .cascader import AntdCascader as Cascader +from .cascader.option import AntdCascaderOption as CascaderOption +from .cascader.panel import AntdCascaderPanel as CascaderPanel +from .checkbox import AntdCheckbox as Checkbox +from .checkbox.group import AntdCheckboxGroup as CheckboxGroup +from .checkbox.group.option import \ + AntdCheckboxGroupOption as CheckboxGroupOption +from .collapse import AntdCollapse as Collapse +from .collapse.item import AntdCollapseItem as CollapseItem +from .color_picker import AntdColorPicker as ColorPicker +from .color_picker.preset import AntdColorPickerPreset as ColorPickerPreset +from .config_provider import AntdConfigProvider as ConfigProvider +from .date_picker import AntdDatePicker as DatePicker +from .date_picker.preset import AntdDatePickerPreset as DatePickerPreset +from .date_picker.range_picker import \ + AntdDatePickerRangePicker as DatePickerRangePicker +from .descriptions import AntdDescriptions as Descriptions +from .descriptions.item import AntdDescriptionsItem as DescriptionsItem +from .divider import AntdDivider as Divider +from .drawer import AntdDrawer as Drawer +from .dropdown import AntdDropdown as Dropdown +from .dropdown.button import AntdDropdownButton as DropdownButton +from .empty import AntdEmpty as Empty +from .flex import AntdFlex as Flex +from .float_button import AntdFloatButton as FloatButton +from .float_button.back_top import AntdFloatButtonBackTop as FloatButtonBackTop +from .float_button.group import AntdFloatButtonGroup as FloatButtonGroup +from .form import AntdForm as Form +from .form.item import AntdFormItem as FormItem +from .form.item.rule import AntdFormItemRule as FormItemRule +from .grid.col import AntdCol as Col +from .grid.row import AntdRow as Row +from .icon import AntdIcon as Icon +from .icon.iconfont_provider import AntdIconfontProvider as IconfontProvider +from .image import AntdImage as Image +from .image.preview_group import AntdImagePreviewGroup as ImagePreviewGroup +from .input import AntdInput as Input +from .input.otp import AntdInputOTP as InputOTP +from .input.password import AntdInputPassword as InputPassword +from .input.search import AntdInputSearch as InputSearch +from .input.textarea import AntdInputTextarea as InputTextarea +from .input_number import AntdInputNumber as InputNumber +from .layout import AntdLayout as Layout +from .layout.content import AntdLayoutContent as LayoutContent +from .layout.footer import AntdLayoutFooter as LayoutFooter +from .layout.header import AntdLayoutHeader as LayoutHeader +from .layout.sider import AntdLayoutSider as LayoutSider +from .list import AntdList as List +from .list.item import AntdListItem as ListItem +from .list.item.meta import AntdListItemMeta as ListItemMeta +from .mentions import AntdMentions as Mentions +from .mentions.option import AntdMentionsOption as MentionsOption +from .menu import AntdMenu as Menu +from .menu.item import AntdMenuItem as MenuItem +from .message import AntdMessage as Message +from .modal import AntdModal as Modal +from .notification import AntdNotification as Notification +from .pagination import AntdPagination as Pagination +from .popconfirm import AntdPopconfirm as Popconfirm +from .popover import AntdPopover as Popover +from .progress import AntdProgress as Progress +from .qr_code import AntdQRCode as QRCode +from .radio import AntdRadio as Radio +from .radio.button import AntdRadioButton as RadioButton +from .radio.group import AntdRadioGroup as RadioGroup +from .radio.group.option import AntdRadioGroupOption as RadioGroupOption +from .rate import AntdRate as Rate +from .result import AntdResult as Result +from .segmented import AntdSegmented as Segmented +from .segmented.option import AntdSegmentedOption as SegmentedOptions +from .select import AntdSelect as Select +from .select.option import AntdSelectOption as SelectOption +from .skeleton import AntdSkeleton as Skeleton +from .skeleton.avatar import AntdSkeletonAvatar as SkeletonAvatar +from .skeleton.button import AntdSkeletonButton as SkeletonButton +from .skeleton.image import AntdSkeletonImage as SkeletonImage +from .skeleton.input import AntdSkeletonInput as SkeletonInput +from .skeleton.node import AntdSkeletonNode as SkeletonNode +from .slider import AntdSlider as Slider +from .slider.mark import AntdSliderMark as SliderMark +from .space import AntdSpace as Space +from .space.compact import AntdSpaceCompact as SpaceCompact +from .spin import AntdSpin as Spin +from .statistic import AntdStatistic as Statistic +from .statistic import AntdStatisticCountdown as StatisticCountdown +from .steps import AntdSteps as Steps +from .steps.item import AntdStepsItem as StepsItem +from .switch import AntdSwitch as Switch +from .table import AntdTable as Table +from .table.column import AntdTableColumn as TableColumn +from .table.column_group import AntdTableColumnGroup as TableColumnGroup +from .table.expandable import AntdTableExpandable as TableExpandable +from .table.row_selection import AntdTableRowSelection as TableRowSelection +from .table.row_selection.selection import \ + AntdTableRowSelectionSelection as TableRowSelectionSelection +from .tabs import AntdTabs as Tabs +from .tabs.item import AntdTabsItem as TabsItem +from .tag import AntdTag as Tag +from .tag.checkable_tag import AntdTagCheckableTag as TagCheckableTag +from .time_picker import AntdTimePicker as TimePicker +from .time_picker.range_picker import \ + AntdTimePickerRangePicker as TimePickerRangePicker +from .timeline import AntdTimeline as Timeline +from .timeline.item import AntdTimelineItem as TimelineItem +from .tooltip import AntdTooltip as Tooltip +from .tour import AntdTour as Tour +from .tour.step import AntdTourStep as TourStep +from .transfer import AntdTransfer as Transfer +from .tree import AntdTree as Tree +from .tree.directory_tree import AntdTreeDirectoryTree as TreeDirectoryTree +from .tree.tree_node import AntdTreeTreeNode as TreeTreeNode +from .tree_select import AntdTreeSelect as TreeSelect +from .tree_select.tree_node import AntdTreeSelectTreeNode as TreeSelectTreeNode +from .typography import AntdTypography as Typography +from .typography.link import AntdTypographyLink as TypographyLink +from .typography.paragraph import \ + AntdTypographyParagraph as TypographyParagraph +from .typography.text import AntdTypographyText as TypographyText +from .typography.title import AntdTypographyTitle as TypographyTitle +from .upload import AntdUpload as Upload +from .upload.dragger import AntdUploadDragger as UploadDragger +from .watermark import AntdWatermark as Watermark diff --git a/backend/modelscope_studio/components/antd/affix/__init__.py b/backend/modelscope_studio/components/antd/affix/__init__.py new file mode 100644 index 00000000..e1eeb8e2 --- /dev/null +++ b/backend/modelscope_studio/components/antd/affix/__init__.py @@ -0,0 +1,58 @@ +from __future__ import annotations + +from typing import Any + +from gradio.events import EventListener + +from ....utils.dev import ModelScopeLayoutComponent, resolve_frontend_dir + + +class AntdAffix(ModelScopeLayoutComponent): + """ + """ + EVENTS = [ + EventListener("change", + callback=lambda block: block._internal.update( + bind_change_event=True)) + ] + + def __init__( + self, + props: dict | None = None, + *, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + super().__init__(visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.props = props + + FRONTEND_DIR = resolve_frontend_dir("affix") + + @property + def skip_api(self): + return True + + def preprocess(self, payload: None) -> None: + return payload + + def postprocess(self, value: None) -> None: + + return value + + def example_payload(self) -> Any: + return None + + def example_value(self) -> Any: + return None diff --git a/backend/modelscope_studio/components/antd/alert/__init__.py b/backend/modelscope_studio/components/antd/alert/__init__.py new file mode 100644 index 00000000..da574b3e --- /dev/null +++ b/backend/modelscope_studio/components/antd/alert/__init__.py @@ -0,0 +1,63 @@ +from __future__ import annotations + +from typing import Any + +from gradio.events import EventListener + +from ....utils.dev import ModelScopeLayoutComponent, resolve_frontend_dir +from .error_boundary import AntdAlertErrorBoundary + + +class AntdAlert(ModelScopeLayoutComponent): + """ + """ + ErrorBoundary = AntdAlertErrorBoundary + EVENTS = [ + EventListener("close", + callback=lambda block: block._internal.update( + bind_close_event=True)) + ] + + # supported slots + SLOTS = ['action', 'closable.closeIcon', 'description', 'icon', 'message'] + + def __init__( + self, + props: dict | None = None, + *, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + super().__init__(visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.props = props + + FRONTEND_DIR = resolve_frontend_dir("alert") + + @property + def skip_api(self): + return True + + def preprocess(self, payload: None) -> None: + return payload + + def postprocess(self, value: None) -> None: + + return value + + def example_payload(self) -> Any: + return None + + def example_value(self) -> Any: + return None diff --git a/backend/modelscope_studio/components/antd/alert/error_boundary/__init__.py b/backend/modelscope_studio/components/antd/alert/error_boundary/__init__.py new file mode 100644 index 00000000..ba75eb59 --- /dev/null +++ b/backend/modelscope_studio/components/antd/alert/error_boundary/__init__.py @@ -0,0 +1,61 @@ +from __future__ import annotations + +from typing import Any + +from gradio.events import EventListener + +from .....utils.dev import ModelScopeLayoutComponent, resolve_frontend_dir + + +class AntdAlertErrorBoundary(ModelScopeLayoutComponent): + """ + """ + EVENTS = [ + EventListener("close", + callback=lambda block: block._internal.update( + bind_close_event=True)) + ] + + # supported slots + SLOTS = ['description', 'message'] + + def __init__( + self, + props: dict | None = None, + *, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + super().__init__(visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.props = props + + FRONTEND_DIR = resolve_frontend_dir("alert", "error-boundary") + + @property + def skip_api(self): + return True + + def preprocess(self, payload: None) -> None: + return payload + + def postprocess(self, value: None) -> None: + + return value + + def example_payload(self) -> Any: + return None + + def example_value(self) -> Any: + return None diff --git a/backend/modelscope_studio/components/antd/anchor/__init__.py b/backend/modelscope_studio/components/antd/anchor/__init__.py new file mode 100644 index 00000000..4ba1176b --- /dev/null +++ b/backend/modelscope_studio/components/antd/anchor/__init__.py @@ -0,0 +1,66 @@ +from __future__ import annotations + +from typing import Any + +from gradio.events import EventListener + +from ....utils.dev import ModelScopeLayoutComponent, resolve_frontend_dir +from .item import AntdAnchorItem + + +class AntdAnchor(ModelScopeLayoutComponent): + """ + """ + Item = AntdAnchorItem + EVENTS = [ + EventListener("change", + callback=lambda block: block._internal.update( + bind_change_event=True)), + EventListener("click", + callback=lambda block: block._internal.update( + bind_click_event=True)), + EventListener('affix_change', + callback=lambda block: block._internal.update( + bind_affix_change_event=True)) + ] + + def __init__( + self, + props: dict | None = None, + *, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + super().__init__(visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.props = props + + FRONTEND_DIR = resolve_frontend_dir("anchor") + + @property + def skip_api(self): + return True + + def preprocess(self, payload: None) -> None: + return payload + + def postprocess(self, value: None) -> None: + + return value + + def example_payload(self) -> Any: + return None + + def example_value(self) -> Any: + return None diff --git a/backend/modelscope_studio/components/antd/anchor/item/__init__.py b/backend/modelscope_studio/components/antd/anchor/item/__init__.py new file mode 100644 index 00000000..d8ceada5 --- /dev/null +++ b/backend/modelscope_studio/components/antd/anchor/item/__init__.py @@ -0,0 +1,54 @@ +from __future__ import annotations + +from typing import Any + +from .....utils.dev import ModelScopeLayoutComponent, resolve_frontend_dir + + +class AntdAnchorItem(ModelScopeLayoutComponent): + """ + """ + EVENTS = [] + # supported slots + SLOTS = ["title"] + + def __init__( + self, + props: dict | None = None, + *, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + super().__init__(visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.props = props + + FRONTEND_DIR = resolve_frontend_dir("anchor", "item") + + @property + def skip_api(self): + return True + + def preprocess(self, payload: None) -> None: + return payload + + def postprocess(self, value: None) -> None: + + return value + + def example_payload(self) -> Any: + return None + + def example_value(self) -> Any: + return None diff --git a/backend/modelscope_studio/components/antd/auto_complete/__init__.py b/backend/modelscope_studio/components/antd/auto_complete/__init__.py new file mode 100644 index 00000000..10bc909d --- /dev/null +++ b/backend/modelscope_studio/components/antd/auto_complete/__init__.py @@ -0,0 +1,88 @@ +from __future__ import annotations + +from typing import Any + +from gradio.events import EventListener + +from ....utils.dev import ModelScopeDataLayoutComponent, resolve_frontend_dir +from .option import AntdAutoCompleteOption + + +# as inputs, outputs +class AntdAutoComplete(ModelScopeDataLayoutComponent): + """ + """ + Option = AntdAutoCompleteOption + + EVENTS = [ + EventListener("change", + callback=lambda block: block._internal.update( + bind_change_event=True)), + EventListener("blur", + callback=lambda block: block._internal.update( + bind_blur_event=True)), + EventListener("focus", + callback=lambda block: block._internal.update( + bind_focus_event=True)), + EventListener("search", + callback=lambda block: block._internal.update( + bind_search_event=True)), + EventListener("select", + callback=lambda block: block._internal.update( + bind_select_event=True)), + EventListener("clear", + callback=lambda block: block._internal.update( + bind_clear_event=True)), + EventListener("dropdown_visible_change", + callback=lambda block: block._internal.update( + bind_dropdownVisibleChange_event=True)), + ] + + # supported slots + SLOTS = ['allowClear.clearIcon', 'children', 'notFoundContent'] + + def __init__( + self, + value: str | None = None, + props: dict | None = None, + *, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + super().__init__(value=value, + visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.props = props + + FRONTEND_DIR = resolve_frontend_dir("auto-complete") + + @property + def skip_api(self): + return False + + def api_info(self) -> dict[str, Any]: + return {"type": "string"} + + def preprocess(self, payload: None | str) -> None | str: + return payload + + def postprocess(self, value: None | str) -> None | str: + + return value + + def example_payload(self) -> None: + return None + + def example_value(self) -> None: + return None diff --git a/backend/modelscope_studio/components/antd/auto_complete/option/__init__.py b/backend/modelscope_studio/components/antd/auto_complete/option/__init__.py new file mode 100644 index 00000000..5df3a1b0 --- /dev/null +++ b/backend/modelscope_studio/components/antd/auto_complete/option/__init__.py @@ -0,0 +1,61 @@ +from __future__ import annotations + +from typing import Any + +from .....utils.dev import ModelScopeLayoutComponent, resolve_frontend_dir + + +class AntdAutoCompleteOption(ModelScopeLayoutComponent): + """ + """ + + EVENTS = [] + + # supported slots + SLOTS = [ + 'label', + ] + + def __init__( + self, + value: str | None = None, + label: str | None = None, + props: dict | None = None, + *, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + super().__init__(visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.props = props + self.value = value + self.label = label + + FRONTEND_DIR = resolve_frontend_dir("auto-complete", "option") + + @property + def skip_api(self): + return True + + def preprocess(self, payload: None) -> None: + return payload + + def postprocess(self, value: None) -> None: + return value + + def example_payload(self) -> Any: + return None + + def example_value(self) -> Any: + return None diff --git a/backend/modelscope_studio/components/antd/avatar/__init__.py b/backend/modelscope_studio/components/antd/avatar/__init__.py new file mode 100644 index 00000000..169e2eab --- /dev/null +++ b/backend/modelscope_studio/components/antd/avatar/__init__.py @@ -0,0 +1,66 @@ +from __future__ import annotations + +from typing import Any + +from gradio.events import EventListener + +from ....utils.dev import ModelScopeLayoutComponent, resolve_frontend_dir +from .group import AntdAvatarGroup + + +class AntdAvatar(ModelScopeLayoutComponent): + """ + """ + Group = AntdAvatarGroup + + EVENTS = [ + EventListener("error", + callback=lambda block: block._internal.update( + bind_error_event=True)) + ] + + # supported slots + SLOTS = ['icon', "src"] + + def __init__( + self, + src: str | None = None, + props: dict | None = None, + *, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + super().__init__(visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.src = src + self.props = props + + FRONTEND_DIR = resolve_frontend_dir("avatar") + + @property + def skip_api(self): + return True + + def preprocess(self, payload: str | None) -> str | None: + return payload + + def postprocess(self, value: str | None) -> str | None: + + return str(value) + + def example_payload(self) -> Any: + return None + + def example_value(self) -> Any: + return None diff --git a/backend/modelscope_studio/components/antd/avatar/group/__init__.py b/backend/modelscope_studio/components/antd/avatar/group/__init__.py new file mode 100644 index 00000000..7dc3c52e --- /dev/null +++ b/backend/modelscope_studio/components/antd/avatar/group/__init__.py @@ -0,0 +1,52 @@ +from __future__ import annotations + +from .....utils.dev import ModelScopeLayoutComponent, resolve_frontend_dir + + +class AntdAvatarGroup(ModelScopeLayoutComponent): + """ + """ + EVENTS = [] + # supported slots + SLOTS = ['max.popover.title', 'max.popover.content'] + + def __init__( + self, + props: dict | None = None, + *, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + super().__init__(visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.props = props + + FRONTEND_DIR = resolve_frontend_dir("avatar", 'group') + + @property + def skip_api(self): + return True + + def preprocess(self, payload: None) -> None: + return payload + + def postprocess(self, value: None) -> None: + + return value + + def example_payload(self) -> None: + return None + + def example_value(self) -> None: + return None diff --git a/backend/modelscope_studio/components/antd/badge/__init__.py b/backend/modelscope_studio/components/antd/badge/__init__.py new file mode 100644 index 00000000..01c4bfdc --- /dev/null +++ b/backend/modelscope_studio/components/antd/badge/__init__.py @@ -0,0 +1,62 @@ +from __future__ import annotations + +from typing import Any + +from gradio.events import EventListener + +from ....utils.dev import ModelScopeLayoutComponent, resolve_frontend_dir +from .ribbon import AntdBadgeRibbon + + +class AntdBadge(ModelScopeLayoutComponent): + """ + """ + Ribbon = AntdBadgeRibbon + + EVENTS = [] + + # supported slots + SLOTS = ['count', 'text'] + + def __init__( + self, + count: int | None = None, + props: dict | None = None, + *, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + super().__init__(visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.count = count + self.props = props + + FRONTEND_DIR = resolve_frontend_dir("badge") + + @property + def skip_api(self): + return True + + def preprocess(self, payload: None) -> None: + return payload + + def postprocess(self, value: None) -> None: + + return value + + def example_payload(self) -> Any: + return None + + def example_value(self) -> Any: + return None diff --git a/backend/modelscope_studio/components/antd/badge/ribbon/__init__.py b/backend/modelscope_studio/components/antd/badge/ribbon/__init__.py new file mode 100644 index 00000000..bf731376 --- /dev/null +++ b/backend/modelscope_studio/components/antd/badge/ribbon/__init__.py @@ -0,0 +1,52 @@ +from __future__ import annotations + +from .....utils.dev import ModelScopeLayoutComponent, resolve_frontend_dir + + +class AntdBadgeRibbon(ModelScopeLayoutComponent): + """ + """ + EVENTS = [] + + def __init__( + self, + text: str | None = None, + props: dict | None = None, + *, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + super().__init__(visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.props = props + self.text = text + + FRONTEND_DIR = resolve_frontend_dir("badge", 'ribbon') + + @property + def skip_api(self): + return True + + def preprocess(self, payload: None) -> None: + return payload + + def postprocess(self, value: None) -> None: + + return value + + def example_payload(self) -> None: + return None + + def example_value(self) -> None: + return None diff --git a/backend/modelscope_studio/components/antd/breadcrumb/__init__.py b/backend/modelscope_studio/components/antd/breadcrumb/__init__.py new file mode 100644 index 00000000..454458e3 --- /dev/null +++ b/backend/modelscope_studio/components/antd/breadcrumb/__init__.py @@ -0,0 +1,57 @@ +from __future__ import annotations + +from typing import Any + +from ....utils.dev import ModelScopeLayoutComponent, resolve_frontend_dir +from .item import AntdBreadcrumbItem + + +class AntdBreadcrumb(ModelScopeLayoutComponent): + """ + """ + Item = AntdBreadcrumbItem + + EVENTS = [] + + # supported slots + SLOTS = ['separator', 'items'] + + def __init__( + self, + props: dict | None = None, + *, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + super().__init__(visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.props = props + + FRONTEND_DIR = resolve_frontend_dir("breadcrumb") + + @property + def skip_api(self): + return True + + def preprocess(self, payload: None) -> None: + return payload + + def postprocess(self, value: None) -> None: + return value + + def example_payload(self) -> Any: + return None + + def example_value(self) -> Any: + return None diff --git a/backend/modelscope_studio/components/antd/breadcrumb/item/__init__.py b/backend/modelscope_studio/components/antd/breadcrumb/item/__init__.py new file mode 100644 index 00000000..a48297ad --- /dev/null +++ b/backend/modelscope_studio/components/antd/breadcrumb/item/__init__.py @@ -0,0 +1,98 @@ +from __future__ import annotations + +from typing import Any + +from gradio.events import EventListener + +from .....utils.dev import ModelScopeLayoutComponent, resolve_frontend_dir + + +class AntdBreadcrumbItem(ModelScopeLayoutComponent): + """ + """ + + EVENTS = [ + EventListener("click", + callback=lambda block: block._internal.update( + bind_click_event=True)), + EventListener("menu_click", + callback=lambda block: block._internal.update( + bind_menu_click_event=True)), + EventListener("menu_deselect", + callback=lambda block: block._internal.update( + bind_menu_deselect_event=True)), + EventListener("menu_open_change", + callback=lambda block: block._internal.update( + bind_menu_openChange_event=True)), + EventListener("menu_select", + callback=lambda block: block._internal.update( + bind_menu_select_event=True)), + EventListener("dropdown_open_change", + callback=lambda block: block._internal.update( + bind_dropdownProps_openChange_event=True)), + EventListener("dropdown_menu_click", + callback=lambda block: block._internal.update( + bind_dropdownProps_menu_click_event=True)), + EventListener("dropdown_menu_deselect", + callback=lambda block: block._internal.update( + bind_dropdownProps_menu_deselect_event=True)), + EventListener("dropdown_menu_open_change", + callback=lambda block: block._internal.update( + bind_dropdownProps_menu_openChange_event=True)), + EventListener("dropdown_menu_select", + callback=lambda block: block._internal.update( + bind_dropdownProps_menu_select_event=True)), + ] + + # supported slots + SLOTS = [ + 'title', + "menu.expandIcon", + 'menu.overflowedIndicator', + "menu.items", + "dropdownProps.menu.expandIcon", + 'dropdownProps.menu.overflowedIndicator', + "dropdownProps.menu.items", + ] + + def __init__( + self, + title: str | None = None, + props: dict | None = None, + *, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + super().__init__(visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.props = props + self.title = title + + FRONTEND_DIR = resolve_frontend_dir("breadcrumb", "item") + + @property + def skip_api(self): + return True + + def preprocess(self, payload: None) -> None: + return payload + + def postprocess(self, value: None) -> None: + return value + + def example_payload(self) -> Any: + return None + + def example_value(self) -> Any: + return None diff --git a/backend/modelscope_studio/components/antd/button/__init__.py b/backend/modelscope_studio/components/antd/button/__init__.py new file mode 100644 index 00000000..6c30753d --- /dev/null +++ b/backend/modelscope_studio/components/antd/button/__init__.py @@ -0,0 +1,136 @@ +from __future__ import annotations + +from typing import Any, Literal + +from gradio.events import EventListener + +from ....utils.dev import ModelScopeLayoutComponent, resolve_frontend_dir +from .group import AntdButtonGroup + + +class AntdButton(ModelScopeLayoutComponent): + """ + To trigger an operation. + + A button means an operation (or a series of operations). Clicking a button will trigger its corresponding business logic. + + In Ant Design we provide 5 types of button. + + Primary button: used for the main action, there can be at most one primary button in a section. + Default button: used for a series of actions without priority. + Dashed button: commonly used for adding more actions. + Text button: used for the most secondary action. + Link button: used for external links. + And 4 other properties additionally. + + danger: used for actions of risk, like deletion or authorization. + ghost: used in situations with complex background, home pages usually. + disabled: used when actions are not available. + loading: adds a loading spinner in button, avoids multiple submits too. + """ + Group = AntdButtonGroup + + EVENTS = [ + EventListener("click", + callback=lambda block: block._internal.update( + bind_click_event=True), + doc="Set the handler to handle click event.") + ] + + # supported slots + SLOTS = ['icon'] + + def __init__( + self, + value: str | None = "Run", + props: dict | None = None, + *, + auto_insert_space: bool = True, + block: bool = False, + class_names: dict | None = None, + danger: bool = False, + disabled: bool = False, + ghost: bool = False, + href: str | None = None, + html_type: Literal["button", "submit", "reset"] | None = "button", + icon: str | None = None, + icon_position: Literal["start", "end"] | None = "start", + loading: bool = False, + shape: Literal["default", "circle", "round"] | None = "default", + size: Literal["large", "middle", "small"] | None = "middle", + styles: dict | None = None, + href_target: str | None = None, + type: Literal["primary", "dashed", "link", "text", "default"] + | None = "default", + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + """ + Parameters: + auto_insert_space: We add a space between two Chinese characters by default, which can be removed by setting auto_Insert_Space to false. + block: Option to fit button width to its parent width. + class_names: Semantic DOM class. + danger: Set the danger status of button. + disabled: Disabled state of button. + ghost: Make background transparent and invert text and border colors. + href: Redirect url of link button. + html_type: Set the original html type of button, see: MDN. + icon: Set the icon component of button. + icon_position: Set the icon position of button. + loading: Set the loading status of button. + shape: Can be set button shape. + size: Set the size of button. + styles: Semantic DOM style. + href_target: Same as target attribute of a, works when href is specified. + type: Set button type. + """ + super().__init__(visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.value = value + self.props = props + self.auto_insert_space = auto_insert_space + self.block = block + self.class_names = class_names + self.danger = danger + self.disabled = disabled + self.ghost = ghost + self.href = href + self.html_type = html_type + self.icon = icon + self.icon_position = icon_position + self.loading = loading + self.shape = shape + self.size = size + self.styles = styles + self.href_target = href_target + self.type = type + + FRONTEND_DIR = resolve_frontend_dir("button") + + @property + def skip_api(self): + return True + + def preprocess(self, payload: str | None) -> str | None: + return payload + + def postprocess(self, value: str | None) -> str | None: + + return str(value) + + def example_payload(self) -> Any: + return "Run" + + def example_value(self) -> Any: + return "Run" diff --git a/backend/modelscope_studio/components/antd/button/group/__init__.py b/backend/modelscope_studio/components/antd/button/group/__init__.py new file mode 100644 index 00000000..fc3105e3 --- /dev/null +++ b/backend/modelscope_studio/components/antd/button/group/__init__.py @@ -0,0 +1,50 @@ +from __future__ import annotations + +from .....utils.dev import ModelScopeLayoutComponent, resolve_frontend_dir + + +class AntdButtonGroup(ModelScopeLayoutComponent): + """ + """ + EVENTS = [] + + def __init__( + self, + props: dict | None = None, + *, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + super().__init__(visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.props = props + + FRONTEND_DIR = resolve_frontend_dir("button", 'group') + + @property + def skip_api(self): + return True + + def preprocess(self, payload: None) -> None: + return payload + + def postprocess(self, value: None) -> None: + + return value + + def example_payload(self) -> None: + return None + + def example_value(self) -> None: + return None diff --git a/backend/modelscope_studio/components/antd/calendar/__init__.py b/backend/modelscope_studio/components/antd/calendar/__init__.py new file mode 100644 index 00000000..09b7cd4a --- /dev/null +++ b/backend/modelscope_studio/components/antd/calendar/__init__.py @@ -0,0 +1,70 @@ +from __future__ import annotations + +from typing import Any + +from gradio.events import EventListener + +from ....utils.dev import ModelScopeComponent, resolve_frontend_dir + + +# as inputs, outputs +class AntdCalendar(ModelScopeComponent): + """ + """ + + EVENTS = [ + EventListener("change", + callback=lambda block: block._internal.update( + bind_change_event=True)), + EventListener("panel_change", + callback=lambda block: block._internal.update( + bind_panelChange_event=True)), + EventListener("select", + callback=lambda block: block._internal.update( + bind_select_event=True)) + ] + + def __init__( + self, + value: int | str | float | None = None, + props: dict | None = None, + *, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + super().__init__(value=value, + visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.props = props + + FRONTEND_DIR = resolve_frontend_dir("calendar") + + def api_info(self) -> dict[str, Any]: + return {"anyOf": [{"type": "number"}, {"type": "string"}]} + + @property + def skip_api(self): + return False + + def preprocess(self, payload: int | float) -> int | float: + return payload + + def postprocess(self, value: int | float) -> int | str: + return value + + def example_payload(self) -> Any: + return None + + def example_value(self) -> Any: + return None diff --git a/backend/modelscope_studio/components/antd/card/__init__.py b/backend/modelscope_studio/components/antd/card/__init__.py new file mode 100644 index 00000000..9be1139d --- /dev/null +++ b/backend/modelscope_studio/components/antd/card/__init__.py @@ -0,0 +1,129 @@ +from __future__ import annotations + +from typing import Any, Literal + +from gradio.events import EventListener + +from ....utils.dev import ModelScopeLayoutComponent, resolve_frontend_dir +from .grid import AntdCardGrid +from .meta import AntdCardMeta + + +class AntdCard(ModelScopeLayoutComponent): + """ + A container for displaying information. + A card can be used to display content related to a single subject. The content can consist of multiple elements of varying types and sizes. + """ + Grid = AntdCardGrid + Meta = AntdCardMeta + EVENTS = [ + EventListener("click", + callback=lambda block: block._internal.update( + bind_click_event=True)), + EventListener("tab_change", + callback=lambda block: block._internal.update( + bind_tabChange_event=True)) + ] + + # supported slots + SLOTS = [ + "actions", + 'cover', + 'extra', + 'tabBarExtraContent', + 'title', + ] + + def __exit__(self, *args, **kwargs): + self._internal.update(contains_grid=any( + isinstance(child, AntdCardGrid) for child in self.children)) + super().__exit__(*args, **kwargs) + + def __init__( + self, + props: dict | None = None, + *, + actions: str | None = None, + active_tab_key: str | None = None, + bordered: bool = True, + cover: str | None = None, + default_active_tab_key: str | None = None, + extra: str | None = None, + hoverable: bool = False, + loading: bool = False, + size: Literal["default", "small"] = "default", + tab_bar_extra_content: str | None = None, + tab_list: list[str] | str | None = None, + tab_props: str | None = None, + title: str | None = None, + type: str | None = None, + class_names: dict | None = None, + styles: dict | None = None, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + """ + Parameters: + actions: The action list, shows at the bottom of the Card. + active_tab_key: Current TabPane's key. + bordered: Toggles rendering of the border around the card. + cover: Card cover. + default_active_tab_key: Initial active TabPane's key, if activeTabKey is not set. + extra: Content to render in the top-right corner of the card. + hoverable: Lift up when hovering card. + loading: Shows a loading indicator while the contents of the card are being fetched. + size: Size of card. + tab_bar_extra_content: Extra content in tab bar. + title: Card title. + type: Card style type, can be set to inner or not set. + class_names: Config Card build-in module's className. + styles: Config Card build-in module's style. + """ + super().__init__(visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.props = props + self.actions = actions + self.active_tab_key = active_tab_key + self.bordered = bordered + self.cover = cover + self.default_active_tab_key = default_active_tab_key + self.extra = extra + self.hoverable = hoverable + self.loading = loading + self.size = size + self.tab_bar_extra_content = tab_bar_extra_content + self.tab_list = tab_list + self.tab_props = tab_props + self.title = title + self.type = type + self.class_names = class_names + self.styles = styles + + FRONTEND_DIR = resolve_frontend_dir("card") + + @property + def skip_api(self): + return True + + def preprocess(self, payload: None) -> None: + return payload + + def postprocess(self, value: None) -> None: + return value + + def example_payload(self) -> Any: + return None + + def example_value(self) -> Any: + return None diff --git a/backend/modelscope_studio/components/antd/card/grid/__init__.py b/backend/modelscope_studio/components/antd/card/grid/__init__.py new file mode 100644 index 00000000..062466bb --- /dev/null +++ b/backend/modelscope_studio/components/antd/card/grid/__init__.py @@ -0,0 +1,64 @@ +from __future__ import annotations + +from typing import Any + +from gradio.events import EventListener + +from .....utils.dev import ModelScopeLayoutComponent, resolve_frontend_dir + + +class AntdCardGrid(ModelScopeLayoutComponent): + """ + """ + EVENTS = [ + EventListener("click", + callback=lambda block: block._internal.update( + bind_click_event=True)) + ] + + def __init__( + self, + props: dict | None = None, + *, + hoverable: bool = True, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + """ + Parameters: + hoverable: Lift up when hovering card grid. + """ + super().__init__(visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + elem_style=elem_style, + as_item=as_item, + **kwargs) + self.props = props + self.hoverable = hoverable + + FRONTEND_DIR = resolve_frontend_dir("card", "grid") + + @property + def skip_api(self): + return True + + def preprocess(self, payload: None) -> None: + return payload + + def postprocess(self, value: None) -> None: + + return value + + def example_payload(self) -> Any: + return None + + def example_value(self) -> Any: + return None diff --git a/backend/modelscope_studio/components/antd/card/meta/__init__.py b/backend/modelscope_studio/components/antd/card/meta/__init__.py new file mode 100644 index 00000000..2b3ef5dd --- /dev/null +++ b/backend/modelscope_studio/components/antd/card/meta/__init__.py @@ -0,0 +1,65 @@ +from __future__ import annotations + +from typing import Any + +from .....utils.dev import ModelScopeLayoutComponent, resolve_frontend_dir + + +class AntdCardMeta(ModelScopeLayoutComponent): + """ + """ + EVENTS = [] + SLOTS = ["title", "description", "avatar"] + + def __init__( + self, + props: dict | None = None, + *, + avatar: str | None = None, + description: str | None = None, + title: str | None = None, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + """ + Parameters: + avatar: Avatar or icon. + description: Description content. + title: Title content. + """ + super().__init__(visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.props = props + self.avatar = avatar + self.description = description + self.title = title + + FRONTEND_DIR = resolve_frontend_dir("card", "meta") + + @property + def skip_api(self): + return True + + def preprocess(self, payload: None) -> None: + return payload + + def postprocess(self, value: None) -> None: + + return value + + def example_payload(self) -> Any: + return None + + def example_value(self) -> Any: + return None diff --git a/backend/modelscope_studio/components/antd/carousel/__init__.py b/backend/modelscope_studio/components/antd/carousel/__init__.py new file mode 100644 index 00000000..94c7e117 --- /dev/null +++ b/backend/modelscope_studio/components/antd/carousel/__init__.py @@ -0,0 +1,53 @@ +from __future__ import annotations + +from typing import Any + +from ....utils.dev import ModelScopeLayoutComponent, resolve_frontend_dir + + +class AntdCarousel(ModelScopeLayoutComponent): + """ + """ + + EVENTS = [] + + def __init__( + self, + props: dict | None = None, + *, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + super().__init__(visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.props = props + + FRONTEND_DIR = resolve_frontend_dir("carousel") + + @property + def skip_api(self): + return True + + def preprocess(self, payload: None) -> None: + return payload + + def postprocess(self, value: None) -> None: + + return value + + def example_payload(self) -> Any: + return None + + def example_value(self) -> Any: + return None diff --git a/backend/modelscope_studio/components/antd/cascader/__init__.py b/backend/modelscope_studio/components/antd/cascader/__init__.py new file mode 100644 index 00000000..e7c8a4cc --- /dev/null +++ b/backend/modelscope_studio/components/antd/cascader/__init__.py @@ -0,0 +1,101 @@ +from __future__ import annotations + +from typing import Any + +from gradio.events import EventListener + +from ....utils.dev import ModelScopeDataLayoutComponent, resolve_frontend_dir +from .option import AntdCascaderOption +from .panel import AntdCascaderPanel + + +# as inputs, outputs +class AntdCascader(ModelScopeDataLayoutComponent): + """ + """ + Option = AntdCascaderOption + Panel = AntdCascaderPanel + + EVENTS = [ + EventListener("change", + callback=lambda block: block._internal.update( + bind_change_event=True)), + EventListener("search", + callback=lambda block: block._internal.update( + bind_search_event=True)), + EventListener("dropdown_visible_change", + callback=lambda block: block._internal.update( + bind_dropdownVisibleChange_event=True)), + EventListener("load_data", + callback=lambda block: block._internal.update( + bind_loadData_event=True)), + ] + + # supported slots + SLOTS = [ + 'allowClear.clearIcon', + 'suffixIcon', + 'maxTagPlaceholder', + 'notFoundContent', + 'expandIcon', + 'removeIcon', + ] + + def __init__( + self, + value: list[str] | list[int | float] | None = None, + props: dict | None = None, + *, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + super().__init__(value=value, + visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.props = props + + FRONTEND_DIR = resolve_frontend_dir("cascader") + + @property + def skip_api(self): + return False + + def api_info(self) -> dict[str, Any]: + return { + "anyOf": [{ + "type": "array", + "items": { + "type": "string" + } + }, { + "type": "string" + }] + } + + def preprocess( + self, payload: None | list[str] | list[int | float] + ) -> None | list[str] | list[int | float]: + return payload + + def postprocess( + self, value: None | list[str] | list[int | float] + ) -> None | list[str] | list[int | float]: + + return value + + def example_payload(self) -> None: + return None + + def example_value(self) -> None: + return None diff --git a/backend/modelscope_studio/components/antd/cascader/constants.py b/backend/modelscope_studio/components/antd/cascader/constants.py new file mode 100644 index 00000000..bfb00b1d --- /dev/null +++ b/backend/modelscope_studio/components/antd/cascader/constants.py @@ -0,0 +1,2 @@ +SHOW_CHILD = "SHOW_CHILD" +SHOW_PARENT = "SHOW_PARENT" diff --git a/backend/modelscope_studio/components/antd/cascader/option/__init__.py b/backend/modelscope_studio/components/antd/cascader/option/__init__.py new file mode 100644 index 00000000..01511078 --- /dev/null +++ b/backend/modelscope_studio/components/antd/cascader/option/__init__.py @@ -0,0 +1,61 @@ +from __future__ import annotations + +from typing import Any + +from .....utils.dev import ModelScopeLayoutComponent, resolve_frontend_dir + + +class AntdCascaderOption(ModelScopeLayoutComponent): + """ + """ + + EVENTS = [] + + # supported slots + SLOTS = [ + 'label', + ] + + def __init__( + self, + value: str | None = None, + label: str | None = None, + props: dict | None = None, + *, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + super().__init__(visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.props = props + self.value = value + self.label = label + + FRONTEND_DIR = resolve_frontend_dir("cascader", "option") + + @property + def skip_api(self): + return True + + def preprocess(self, payload: None) -> None: + return payload + + def postprocess(self, value: None) -> None: + return value + + def example_payload(self) -> Any: + return None + + def example_value(self) -> Any: + return None diff --git a/backend/modelscope_studio/components/antd/cascader/panel/__init__.py b/backend/modelscope_studio/components/antd/cascader/panel/__init__.py new file mode 100644 index 00000000..1a44b629 --- /dev/null +++ b/backend/modelscope_studio/components/antd/cascader/panel/__init__.py @@ -0,0 +1,84 @@ +from __future__ import annotations + +from typing import Any + +from gradio.events import EventListener + +from .....utils.dev import ModelScopeDataLayoutComponent, resolve_frontend_dir + + +# as inputs, outputs +class AntdCascaderPanel(ModelScopeDataLayoutComponent): + """ + """ + + EVENTS = [ + EventListener("change", + callback=lambda block: block._internal.update( + bind_change_event=True)), + EventListener("load_data", + callback=lambda block: block._internal.update( + bind_loadData_event=True)), + ] + + # supported slots + SLOTS = ['notFoundContent', 'expandIcon'] + + def __init__( + self, + value: list[str] | list[int | float] | None = None, + props: dict | None = None, + *, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + super().__init__(value=value, + visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.props = props + + FRONTEND_DIR = resolve_frontend_dir("cascader", "panel") + + @property + def skip_api(self): + return False + + def api_info(self) -> dict[str, Any]: + return { + "anyOf": [{ + "type": "array", + "items": { + "type": "string" + } + }, { + "type": "string" + }] + } + + def preprocess( + self, payload: None | list[str] | list[int | float] + ) -> None | list[str] | list[int | float]: + return payload + + def postprocess( + self, value: None | list[str] | list[int | float] + ) -> None | list[str] | list[int | float]: + + return value + + def example_payload(self) -> None: + return None + + def example_value(self) -> None: + return None diff --git a/backend/modelscope_studio/components/antd/checkbox/__init__.py b/backend/modelscope_studio/components/antd/checkbox/__init__.py new file mode 100644 index 00000000..9654b5d5 --- /dev/null +++ b/backend/modelscope_studio/components/antd/checkbox/__init__.py @@ -0,0 +1,67 @@ +from __future__ import annotations + +from typing import Any + +from gradio.events import EventListener + +from ....utils.dev import ModelScopeDataLayoutComponent, resolve_frontend_dir +from .group import AntdCheckboxGroup + + +# as inputs, outputs +class AntdCheckbox(ModelScopeDataLayoutComponent): + """ + """ + Group = AntdCheckboxGroup + + EVENTS = [ + EventListener("change", + callback=lambda block: block._internal.update( + bind_change_event=True)), + ] + + def __init__( + self, + value: bool | None = None, + props: dict | None = None, + *, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + super().__init__(value=value, + visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.props = props + + FRONTEND_DIR = resolve_frontend_dir("checkbox") + + @property + def skip_api(self): + return False + + def api_info(self) -> dict[str, Any]: + return {"type": "boolean"} + + def preprocess(self, payload: None | bool) -> None | bool: + return payload + + def postprocess(self, value: None | bool) -> None | bool: + + return value + + def example_payload(self) -> None: + return None + + def example_value(self) -> None: + return None diff --git a/backend/modelscope_studio/components/antd/checkbox/group/__init__.py b/backend/modelscope_studio/components/antd/checkbox/group/__init__.py new file mode 100644 index 00000000..36b2027d --- /dev/null +++ b/backend/modelscope_studio/components/antd/checkbox/group/__init__.py @@ -0,0 +1,91 @@ +from __future__ import annotations + +from typing import Any + +from gradio.events import EventListener + +from .....utils.dev import ModelScopeDataLayoutComponent, resolve_frontend_dir +from .option import AntdCheckboxGroupOption + + +# as inputs, outputs +class AntdCheckboxGroup(ModelScopeDataLayoutComponent): + """ + """ + Option = AntdCheckboxGroupOption + + EVENTS = [ + EventListener("change", + callback=lambda block: block._internal.update( + bind_change_event=True)), + ] + + # supported slots + SLOTS = [ + 'options', + ] + + def __init__( + self, + value: list[str | int | float | bool] | None = None, + props: dict | None = None, + *, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + super().__init__(value=value, + visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.props = props + + FRONTEND_DIR = resolve_frontend_dir("checkbox", "group") + + @property + def skip_api(self): + return False + + def api_info(self) -> dict[str, Any]: + return { + "type": "array", + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + ], + } + } + + def preprocess( + self, payload: None | list[str | int | float | bool] | None + ) -> None | list[str | int | float | bool] | None: + return payload + + def postprocess( + self, value: None | list[str | int | float | bool] | None + ) -> None | list[str | int | float | bool] | None: + + return value + + def example_payload(self) -> None: + return None + + def example_value(self) -> None: + return None diff --git a/backend/modelscope_studio/components/antd/checkbox/group/option/__init__.py b/backend/modelscope_studio/components/antd/checkbox/group/option/__init__.py new file mode 100644 index 00000000..d9adc723 --- /dev/null +++ b/backend/modelscope_studio/components/antd/checkbox/group/option/__init__.py @@ -0,0 +1,63 @@ +from __future__ import annotations + +from typing import Any + +from ......utils.dev import ModelScopeLayoutComponent, resolve_frontend_dir + + +class AntdCheckboxGroupOption(ModelScopeLayoutComponent): + """ + """ + + EVENTS = [] + + # supported slots + SLOTS = [ + 'label', + ] + + def __init__( + self, + value: str | None = None, + props: dict | None = None, + *, + label: str | None = None, + disabled: bool | None = None, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + super().__init__(visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.props = props + self.value = value + self.label = label + self.disabled = disabled + + FRONTEND_DIR = resolve_frontend_dir("checkbox", ['group', 'option']) + + @property + def skip_api(self): + return True + + def preprocess(self, payload: None) -> None: + return payload + + def postprocess(self, value: None) -> None: + return value + + def example_payload(self) -> Any: + return None + + def example_value(self) -> Any: + return None diff --git a/backend/modelscope_studio/components/antd/collapse/__init__.py b/backend/modelscope_studio/components/antd/collapse/__init__.py new file mode 100644 index 00000000..5cdff9ff --- /dev/null +++ b/backend/modelscope_studio/components/antd/collapse/__init__.py @@ -0,0 +1,88 @@ +from __future__ import annotations + +from typing import Any + +from gradio.events import EventListener + +from ....utils.dev import ModelScopeDataLayoutComponent, resolve_frontend_dir +from .item import AntdCollapseItem + + +# as inputs, outputs +class AntdCollapse(ModelScopeDataLayoutComponent): + """ + """ + Item = AntdCollapseItem + + EVENTS = [ + EventListener("change", + callback=lambda block: block._internal.update( + bind_change_event=True)), + ] + + # supported slots + SLOTS = ["expandIcon", "items"] + + def __init__( + self, + value: str | int | float | list[str | int | float] | None = None, + props: dict | None = None, + *, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + super().__init__(value=value, + visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.props = props + + FRONTEND_DIR = resolve_frontend_dir("collapse") + + @property + def skip_api(self): + return False + + def api_info(self) -> dict[str, Any]: + return { + "anyOf": [{ + "type": "number" + }, { + "type": "string" + }, { + "type": "array", + "items": { + "anyOf": [{ + "type": "number" + }, { + "type": "string" + }] + } + }] + } + + def preprocess( + self, payload: str | int | float | list[str | int | float] + ) -> str | int | float | list[str | int | float]: + return payload + + def postprocess( + self, value: str | int | float | list[str | int | float] + ) -> str | int | float | list[str | int | float]: + return value + + def example_payload(self) -> Any: + return None + + def example_value(self) -> Any: + return None diff --git a/backend/modelscope_studio/components/antd/collapse/item/__init__.py b/backend/modelscope_studio/components/antd/collapse/item/__init__.py new file mode 100644 index 00000000..ca3c9066 --- /dev/null +++ b/backend/modelscope_studio/components/antd/collapse/item/__init__.py @@ -0,0 +1,63 @@ +from __future__ import annotations + +from typing import Any + +from gradio.events import EventListener + +from .....utils.dev import ModelScopeLayoutComponent, resolve_frontend_dir + + +class AntdCollapseItem(ModelScopeLayoutComponent): + """ + """ + + EVENTS = [ + EventListener("item_click", + callback=lambda block: block._internal.update( + bind_itemClick_event=True)), + ] + + # supported slots + SLOTS = ['extra', "label", "children"] + + def __init__( + self, + label: str | None = None, + props: dict | None = None, + *, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + super().__init__(visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.label = label + self.props = props + + FRONTEND_DIR = resolve_frontend_dir("collapse", "item") + + @property + def skip_api(self): + return True + + def preprocess(self, payload: None) -> None: + return payload + + def postprocess(self, value: None) -> None: + return value + + def example_payload(self) -> Any: + return None + + def example_value(self) -> Any: + return None diff --git a/backend/modelscope_studio/components/antd/color_picker/__init__.py b/backend/modelscope_studio/components/antd/color_picker/__init__.py new file mode 100644 index 00000000..1397d68c --- /dev/null +++ b/backend/modelscope_studio/components/antd/color_picker/__init__.py @@ -0,0 +1,85 @@ +from __future__ import annotations + +from typing import Any, Literal + +from gradio.events import EventListener + +from ....utils.dev import ModelScopeDataLayoutComponent, resolve_frontend_dir +from .preset import AntdColorPickerPreset + + +# as inputs, outputs +class AntdColorPicker(ModelScopeDataLayoutComponent): + """ + """ + Preset = AntdColorPickerPreset + + EVENTS = [ + EventListener("change", + callback=lambda block: block._internal.update( + bind_change_event=True)), + EventListener("change_complete", + callback=lambda block: block._internal.update( + bind_changeComplete_event=True)), + EventListener("clear", + callback=lambda block: block._internal.update( + bind_clear_event=True)), + EventListener("open_change", + callback=lambda block: block._internal.update( + bind_openChange_event=True)), + EventListener("format_change", + callback=lambda block: block._internal.update( + bind_formatChange_event=True)), + ] + + # supported slots + SLOTS = ["presets"] + + def __init__( + self, + value: str | None = None, + props: dict | None = None, + *, + value_format: Literal['hex', 'rgb', 'hsb'] = 'hex', + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + super().__init__(value=value, + visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.props = props + self.value_format = value_format + + FRONTEND_DIR = resolve_frontend_dir("color-picker") + + @property + def skip_api(self): + return False + + def api_info(self) -> dict[str, Any]: + return {"type": "string"} + + def preprocess(self, payload: str) -> str: + + return payload + + def postprocess(self, value: str) -> str: + + return value + + def example_payload(self) -> None: + return None + + def example_value(self) -> None: + return None diff --git a/backend/modelscope_studio/components/antd/color_picker/preset/__init__.py b/backend/modelscope_studio/components/antd/color_picker/preset/__init__.py new file mode 100644 index 00000000..c8fa61b5 --- /dev/null +++ b/backend/modelscope_studio/components/antd/color_picker/preset/__init__.py @@ -0,0 +1,61 @@ +from __future__ import annotations + +from .....utils.dev import ModelScopeLayoutComponent, resolve_frontend_dir + + +class AntdColorPickerPreset(ModelScopeLayoutComponent): + """ + """ + EVENTS = [] + + # supported slots + SLOTS = [ + 'label', + ] + + def __init__( + self, + props: dict | None = None, + *, + label: str | None = None, + colors: list[str] = None, + default_open: bool = None, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + super().__init__(visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.props = props + self.label = label + self.colors = colors + self.default_open = default_open + + FRONTEND_DIR = resolve_frontend_dir("color-picker", 'preset') + + @property + def skip_api(self): + return True + + def preprocess(self, payload: None) -> None: + return payload + + def postprocess(self, value: None) -> None: + + return value + + def example_payload(self) -> None: + return None + + def example_value(self) -> None: + return None diff --git a/backend/modelscope_studio/components/antd/config_provider/__init__.py b/backend/modelscope_studio/components/antd/config_provider/__init__.py new file mode 100644 index 00000000..4fa31035 --- /dev/null +++ b/backend/modelscope_studio/components/antd/config_provider/__init__.py @@ -0,0 +1,53 @@ +from __future__ import annotations + +from typing import Any + +from ....utils.dev import ModelScopeLayoutComponent, resolve_frontend_dir + + +class AntdConfigProvider(ModelScopeLayoutComponent): + """ + """ + EVENTS = [] + + # see https://ant.design/components/config-provider, pass slot like 'spin.indicator'. + SLOTS = [] + + def __init__(self, + props: dict | None = None, + *, + as_item: str | None = None, + _internal: None = None, + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + super().__init__(visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.props = props + + FRONTEND_DIR = resolve_frontend_dir("config-provider") + + @property + def skip_api(self): + return True + + def preprocess(self, payload: None) -> None: + return payload + + def postprocess(self, value: None) -> None: + + return value + + def example_payload(self) -> Any: + return None + + def example_value(self) -> Any: + return None diff --git a/backend/modelscope_studio/components/antd/date_picker/__init__.py b/backend/modelscope_studio/components/antd/date_picker/__init__.py new file mode 100644 index 00000000..f95b47d7 --- /dev/null +++ b/backend/modelscope_studio/components/antd/date_picker/__init__.py @@ -0,0 +1,107 @@ +from __future__ import annotations + +from typing import Any + +from gradio.events import EventListener + +from ....utils.dev import ModelScopeDataLayoutComponent, resolve_frontend_dir +from .preset import AntdDatePickerPreset +from .range_picker import AntdDatePickerRangePicker + + +# as inputs, outputs +class AntdDatePicker(ModelScopeDataLayoutComponent): + """ + """ + Preset = AntdDatePickerPreset + RangePicker = AntdDatePickerRangePicker + + EVENTS = [ + EventListener("change", + callback=lambda block: block._internal.update( + bind_change_event=True)), + EventListener( + "ok", + callback=lambda block: block._internal.update(bind_ok_event=True)), + EventListener("panel_change", + callback=lambda block: block._internal.update( + bind_panelChange_event=True)), + EventListener("open_change", + callback=lambda block: block._internal.update( + bind_openChange_event=True)), + ] + + # supported slots + SLOTS = [ + 'allowClear.clearIcon', + 'prevIcon', + 'nextIcon', + 'suffixIcon', + 'superNextIcon', + 'superPrevIcon', + 'renderExtraFooter', + ] + + def __init__( + self, + value: str | int | float | list[str | int | float] | None = None, + props: dict | None = None, + *, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + super().__init__(value=value, + visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.props = props + + FRONTEND_DIR = resolve_frontend_dir("date-picker") + + @property + def skip_api(self): + return False + + def api_info(self) -> dict[str, Any]: + return { + "anyOf": [{ + "type": "number" + }, { + "type": "string" + }, { + "type": "array", + "items": { + "anyOf": [{ + "type": "number" + }, { + "type": "string" + }] + } + }] + } + + def preprocess( + self, payload: str | int | float | list[str | int | float] + ) -> str | int | float | list[str | int | float]: + return payload + + def postprocess( + self, value: str | int | float | list[str | int | float] + ) -> str | int | float | list[str | int | float]: + return value + + def example_payload(self) -> None: + return None + + def example_value(self) -> None: + return None diff --git a/backend/modelscope_studio/components/antd/date_picker/preset/__init__.py b/backend/modelscope_studio/components/antd/date_picker/preset/__init__.py new file mode 100644 index 00000000..a2e6908b --- /dev/null +++ b/backend/modelscope_studio/components/antd/date_picker/preset/__init__.py @@ -0,0 +1,59 @@ +from __future__ import annotations + +from .....utils.dev import ModelScopeLayoutComponent, resolve_frontend_dir + + +class AntdDatePickerPreset(ModelScopeLayoutComponent): + """ + """ + EVENTS = [] + + # supported slots + SLOTS = [ + 'label', + ] + + def __init__( + self, + props: dict | None = None, + *, + value: int | str | float | None = None, + label: str | None = None, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + super().__init__(visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.props = props + self.label = label + self.value = value + + FRONTEND_DIR = resolve_frontend_dir("date-picker", 'preset') + + @property + def skip_api(self): + return True + + def preprocess(self, payload: None) -> None: + return payload + + def postprocess(self, value: None) -> None: + + return value + + def example_payload(self) -> None: + return None + + def example_value(self) -> None: + return None diff --git a/backend/modelscope_studio/components/antd/date_picker/range_picker/__init__.py b/backend/modelscope_studio/components/antd/date_picker/range_picker/__init__.py new file mode 100644 index 00000000..f36bbfd1 --- /dev/null +++ b/backend/modelscope_studio/components/antd/date_picker/range_picker/__init__.py @@ -0,0 +1,98 @@ +from __future__ import annotations + +from typing import Any + +from gradio.events import EventListener + +from .....utils.dev import ModelScopeDataLayoutComponent, resolve_frontend_dir + + +# as inputs, outputs +class AntdDatePickerRangePicker(ModelScopeDataLayoutComponent): + """ + """ + + EVENTS = [ + EventListener("change", + callback=lambda block: block._internal.update( + bind_change_event=True)), + EventListener( + "calendar_change", + callback=lambda block: block._internal.update(bind_ok_event=True)), + EventListener("focus", + callback=lambda block: block._internal.update( + bind_calendarChange_event=True)), + EventListener("blur", + callback=lambda block: block._internal.update( + bind_blur_event=True)), + ] + + # supported slots + SLOTS = [ + 'allowClear.clearIcon', + 'prevIcon', + 'nextIcon', + 'suffixIcon', + 'superNextIcon', + 'superPrevIcon', + 'renderExtraFooter', + 'separator', + ] + + def __init__( + self, + value: tuple[str | int | float, str | int | float] | None = None, + props: dict | None = None, + *, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + super().__init__(value=value, + visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.props = props + + FRONTEND_DIR = resolve_frontend_dir("date-picker", 'range-picker') + + @property + def skip_api(self): + return False + + def api_info(self) -> dict[str, Any]: + return { + "type": "array", + "items": { + "anyOf": [{ + "type": "number" + }, { + "type": "string" + }] + } + } + + def preprocess( + self, payload: tuple[str | int | float, str | int | float] + ) -> tuple[str | int | float, str | int | float]: + return payload + + def postprocess( + self, value: tuple[str | int | float, str | int | float] + ) -> tuple[str | int | float, str | int | float]: + return value + + def example_payload(self) -> None: + return None + + def example_value(self) -> None: + return None diff --git a/backend/modelscope_studio/components/antd/descriptions/__init__.py b/backend/modelscope_studio/components/antd/descriptions/__init__.py new file mode 100644 index 00000000..714f6db6 --- /dev/null +++ b/backend/modelscope_studio/components/antd/descriptions/__init__.py @@ -0,0 +1,60 @@ +from __future__ import annotations + +from typing import Any + +from ....utils.dev import ModelScopeLayoutComponent, resolve_frontend_dir +from .item import AntdDescriptionsItem + + +class AntdDescriptions(ModelScopeLayoutComponent): + """ + """ + Item = AntdDescriptionsItem + + EVENTS = [] + + # supported slots + SLOTS = ['extra', 'title', "items"] + + def __init__( + self, + title: str | None = None, + props: dict | None = None, + *, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + super().__init__(visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.props = props + self.title = title + + FRONTEND_DIR = resolve_frontend_dir("descriptions") + + @property + def skip_api(self): + return True + + def preprocess(self, payload: None) -> None: + return payload + + def postprocess(self, value: None) -> None: + + return value + + def example_payload(self) -> Any: + return None + + def example_value(self) -> Any: + return None diff --git a/backend/modelscope_studio/components/antd/descriptions/item/__init__.py b/backend/modelscope_studio/components/antd/descriptions/item/__init__.py new file mode 100644 index 00000000..aca49320 --- /dev/null +++ b/backend/modelscope_studio/components/antd/descriptions/item/__init__.py @@ -0,0 +1,57 @@ +from __future__ import annotations + +from typing import Any + +from .....utils.dev import ModelScopeLayoutComponent, resolve_frontend_dir + + +class AntdDescriptionsItem(ModelScopeLayoutComponent): + """ + """ + + EVENTS = [] + + # supported slots + SLOTS = ['label', 'children'] + + def __init__( + self, + label: str | None = "", + props: dict | None = None, + *, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + super().__init__(visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.label = label + self.props = props + + FRONTEND_DIR = resolve_frontend_dir("descriptions", "item") + + @property + def skip_api(self): + return True + + def preprocess(self, payload: None) -> None: + return payload + + def postprocess(self, value: None) -> None: + return value + + def example_payload(self) -> Any: + return None + + def example_value(self) -> Any: + return None diff --git a/backend/modelscope_studio/components/antd/divider/__init__.py b/backend/modelscope_studio/components/antd/divider/__init__.py new file mode 100644 index 00000000..fdfd2090 --- /dev/null +++ b/backend/modelscope_studio/components/antd/divider/__init__.py @@ -0,0 +1,82 @@ +from __future__ import annotations + +from typing import Any, Literal + +from gradio.events import EventListener + +from ....utils.dev import ModelScopeLayoutComponent, resolve_frontend_dir + + +class AntdDivider(ModelScopeLayoutComponent): + """ + A divider line separates different content. + Divide sections of an article. + Divide inline text and links such as the operation column of table. + """ + + EVENTS = [] + + def __init__( + self, + value: str | None = None, + props: dict | None = None, + *, + dashed: bool = False, + variant: Literal["dashed", "dotted", "solid"] = "solid", + orientation: Literal["left", "right", "center"] = "center", + orientation_margin: str | int | None = None, + plain: bool = False, + type: Literal["horizontal", "horizontal"] = "horizontal", + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + """ + Parameters: + value: The wrapped title. + dashed: Whether line is dashed. + variant: Whether line is dashed, dotted or solid. + orientation: The position of title inside divider. + orientation_margin: The margin-left/right between the title and its closest border, while the orientation must be left or right, If a numeric value of type string is provided without a unit, it is assumed to be in pixels (px) by default. + plain: Divider text show as plain style. + type: The direction type of divider. + """ + super().__init__(visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.value = value + self.props = props + self.dashed = dashed + self.variant = variant + self.orientation = orientation + self.orientation_margin = orientation_margin + self.plain = plain + self.type = type + + FRONTEND_DIR = resolve_frontend_dir("divider") + + @property + def skip_api(self): + return True + + def preprocess(self, payload: str | None) -> str | None: + return payload + + def postprocess(self, value: str | None) -> str | None: + + return str(value) + + def example_payload(self) -> Any: + return None + + def example_value(self) -> Any: + return None diff --git a/backend/modelscope_studio/components/antd/drawer/__init__.py b/backend/modelscope_studio/components/antd/drawer/__init__.py new file mode 100644 index 00000000..ec783e36 --- /dev/null +++ b/backend/modelscope_studio/components/antd/drawer/__init__.py @@ -0,0 +1,66 @@ +from __future__ import annotations + +from typing import Any + +from gradio.events import EventListener + +from ....utils.dev import ModelScopeLayoutComponent, resolve_frontend_dir + + +class AntdDrawer(ModelScopeLayoutComponent): + """ + """ + EVENTS = [ + EventListener("close", + callback=lambda block: block._internal.update( + bind_close_event=True)) + ] + + # supported slots + SLOTS = [ + 'closeIcon', + 'extra', + 'footer', + 'title', + ] + + def __init__( + self, + props: dict | None = None, + *, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + super().__init__(visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.props = props + + FRONTEND_DIR = resolve_frontend_dir("drawer") + + @property + def skip_api(self): + return True + + def preprocess(self, payload: None) -> None: + return payload + + def postprocess(self, value: None) -> None: + + return value + + def example_payload(self) -> Any: + return None + + def example_value(self) -> Any: + return None diff --git a/backend/modelscope_studio/components/antd/dropdown/__init__.py b/backend/modelscope_studio/components/antd/dropdown/__init__.py new file mode 100644 index 00000000..6a05f605 --- /dev/null +++ b/backend/modelscope_studio/components/antd/dropdown/__init__.py @@ -0,0 +1,76 @@ +from __future__ import annotations + +from typing import Any + +from gradio.events import EventListener + +from ....utils.dev import ModelScopeLayoutComponent, resolve_frontend_dir +from .button import AntdDropdownButton + + +class AntdDropdown(ModelScopeLayoutComponent): + """ + """ + Button = AntdDropdownButton + EVENTS = [ + EventListener("open_change", + callback=lambda block: block._internal.update( + bind_openChange_event=True)), + EventListener("menu_click", + callback=lambda block: block._internal.update( + bind_menu_click_event=True)), + EventListener("menu_deselect", + callback=lambda block: block._internal.update( + bind_menu_deselect_event=True)), + EventListener("menu_open_change", + callback=lambda block: block._internal.update( + bind_menu_openChange_event=True)), + EventListener("menu_select", + callback=lambda block: block._internal.update( + bind_menu_select_event=True)), + ] + + # supported slots + SLOTS = ["menu.expandIcon", 'menu.overflowedIndicator', "menu.items"] + + def __init__( + self, + props: dict | None = None, + inner_elem_style: dict | None = None, + *, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + super().__init__(visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.props = props + self.inner_elem_style = inner_elem_style + + FRONTEND_DIR = resolve_frontend_dir("dropdown") + + @property + def skip_api(self): + return True + + def preprocess(self, payload: None) -> None: + return payload + + def postprocess(self, value: None) -> None: + return value + + def example_payload(self) -> Any: + return None + + def example_value(self) -> Any: + return None diff --git a/backend/modelscope_studio/components/antd/dropdown/button/__init__.py b/backend/modelscope_studio/components/antd/dropdown/button/__init__.py new file mode 100644 index 00000000..bdb10d37 --- /dev/null +++ b/backend/modelscope_studio/components/antd/dropdown/button/__init__.py @@ -0,0 +1,82 @@ +from __future__ import annotations + +from typing import Any + +from gradio.events import EventListener + +from .....utils.dev import ModelScopeLayoutComponent, resolve_frontend_dir + + +class AntdDropdownButton(ModelScopeLayoutComponent): + """ + """ + + EVENTS = [ + EventListener("click", + callback=lambda block: block._internal.update( + bind_click_event=True)), + EventListener("open_change", + callback=lambda block: block._internal.update( + bind_openChange_event=True)), + EventListener("menu_click", + callback=lambda block: block._internal.update( + bind_menu_click_event=True)), + EventListener("menu_deselect", + callback=lambda block: block._internal.update( + bind_menu_deselect_event=True)), + EventListener("menu_open_change", + callback=lambda block: block._internal.update( + bind_menu_openChange_event=True)), + EventListener("menu_select", + callback=lambda block: block._internal.update( + bind_menu_select_event=True)), + ] + + # supported slots + SLOTS = [ + "icon", 'buttonsRender', "menu.expandIcon", 'menu.overflowedIndicator', + "menu.items" + ] + + def __init__( + self, + value: str | None = "Run", + props: dict | None = None, + *, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + super().__init__(visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.props = props + self.value = value + + FRONTEND_DIR = resolve_frontend_dir("dropdown", "button") + + @property + def skip_api(self): + return True + + def preprocess(self, payload: str | None) -> str | None: + return payload + + def postprocess(self, value: str | None) -> str | None: + + return str(value) + + def example_payload(self) -> Any: + return "Run" + + def example_value(self) -> Any: + return "Run" diff --git a/backend/modelscope_studio/components/antd/empty/__init__.py b/backend/modelscope_studio/components/antd/empty/__init__.py new file mode 100644 index 00000000..d681dc69 --- /dev/null +++ b/backend/modelscope_studio/components/antd/empty/__init__.py @@ -0,0 +1,55 @@ +from __future__ import annotations + +from typing import Any + +from ....utils.dev import ModelScopeLayoutComponent, resolve_frontend_dir + + +class AntdEmpty(ModelScopeLayoutComponent): + """ + """ + + EVENTS = [] + + # supported slots + SLOTS = ['description', 'image'] + + def __init__( + self, + props: dict | None = None, + *, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + super().__init__(visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.props = props + + FRONTEND_DIR = resolve_frontend_dir("empty") + + @property + def skip_api(self): + return True + + def preprocess(self, payload: None) -> None: + return payload + + def postprocess(self, value: None) -> None: + return value + + def example_payload(self) -> Any: + return None + + def example_value(self) -> Any: + return None diff --git a/backend/modelscope_studio/components/antd/flex/__init__.py b/backend/modelscope_studio/components/antd/flex/__init__.py new file mode 100644 index 00000000..e926dad2 --- /dev/null +++ b/backend/modelscope_studio/components/antd/flex/__init__.py @@ -0,0 +1,79 @@ +from __future__ import annotations + +from typing import Any, Literal + +from ....utils.dev import ModelScopeLayoutComponent, resolve_frontend_dir + + +class AntdFlex(ModelScopeLayoutComponent): + """ + A flex layout container for alignment. + Good for setting spacing between elements. + Suitable for setting various horizontal and vertical alignments. + """ + + EVENTS = [] + + def __init__( + self, + props: dict | None = None, + *, + vertical: bool = False, + wrap: str | bool = "nowrap", + justify: str | None = "normal", + align: str | None = "normal", + flex: str | None = "normal", + gap: Literal["small", "middle", "large"] | str | int | None = None, + component: str | None = None, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + """ + Parameters: + vertical: Is direction of the flex vertical, use flex-direction: column. + wrap: Set whether the element is displayed in a single line or in multiple lines. + justify: Sets the alignment of elements in the direction of the main axis. + align: Sets the alignment of elements in the direction of the cross axis. + flex: flex CSS shorthand properties. + gap: Sets the gap between grids. + component: custom element type. + """ + super().__init__(visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.props = props + self.vertical = vertical + self.wrap = wrap + self.justify = justify + self.align = align + self.flex = flex + self.gap = gap + self.component = component + + FRONTEND_DIR = resolve_frontend_dir("flex") + + @property + def skip_api(self): + return True + + def preprocess(self, payload: None) -> None: + return payload + + def postprocess(self, value: None) -> None: + return value + + def example_payload(self) -> Any: + return None + + def example_value(self) -> Any: + return None diff --git a/backend/modelscope_studio/components/antd/float_button/__init__.py b/backend/modelscope_studio/components/antd/float_button/__init__.py new file mode 100644 index 00000000..94f42824 --- /dev/null +++ b/backend/modelscope_studio/components/antd/float_button/__init__.py @@ -0,0 +1,63 @@ +from __future__ import annotations + +from gradio.events import EventListener + +from ....utils.dev import ModelScopeLayoutComponent, resolve_frontend_dir +from .back_top import AntdFloatButtonBackTop +from .group import AntdFloatButtonGroup + + +class AntdFloatButton(ModelScopeLayoutComponent): + """ + """ + BackTop = AntdFloatButtonBackTop + Group = AntdFloatButtonGroup + EVENTS = [ + EventListener("click", + callback=lambda block: block._internal.update( + bind_click_event=True)) + ] + + # supported slots + SLOTS = ['icon', 'description', 'tooltip', 'badge.count'] + + def __init__( + self, + props: dict | None = None, + *, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + super().__init__(visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.props = props + + FRONTEND_DIR = resolve_frontend_dir("float-button") + + @property + def skip_api(self): + return True + + def preprocess(self, payload: None) -> None: + return payload + + def postprocess(self, value: None) -> None: + + return value + + def example_payload(self) -> None: + return None + + def example_value(self) -> None: + return None diff --git a/backend/modelscope_studio/components/antd/float_button/back_top/__init__.py b/backend/modelscope_studio/components/antd/float_button/back_top/__init__.py new file mode 100644 index 00000000..42c9b4d9 --- /dev/null +++ b/backend/modelscope_studio/components/antd/float_button/back_top/__init__.py @@ -0,0 +1,60 @@ +from __future__ import annotations + +from gradio.events import EventListener + +from .....utils.dev import ModelScopeLayoutComponent, resolve_frontend_dir + + +class AntdFloatButtonBackTop(ModelScopeLayoutComponent): + """ + """ + + EVENTS = [ + EventListener("click", + callback=lambda block: block._internal.update( + bind_click_event=True)) + ] + + # supported slots + SLOTS = ['icon', 'description', 'tooltip', 'badge.count'] + + def __init__( + self, + props: dict | None = None, + *, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + super().__init__(visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.props = props + + FRONTEND_DIR = resolve_frontend_dir("float-button", "back-top") + + @property + def skip_api(self): + return True + + def preprocess(self, payload: None) -> None: + return payload + + def postprocess(self, value: None) -> None: + + return value + + def example_payload(self) -> None: + return None + + def example_value(self) -> None: + return None diff --git a/backend/modelscope_studio/components/antd/float_button/group/__init__.py b/backend/modelscope_studio/components/antd/float_button/group/__init__.py new file mode 100644 index 00000000..dc9795e3 --- /dev/null +++ b/backend/modelscope_studio/components/antd/float_button/group/__init__.py @@ -0,0 +1,63 @@ +from __future__ import annotations + +from gradio.events import EventListener + +from .....utils.dev import ModelScopeLayoutComponent, resolve_frontend_dir + + +class AntdFloatButtonGroup(ModelScopeLayoutComponent): + """ + """ + + EVENTS = [ + EventListener("click", + callback=lambda block: block._internal.update( + bind_click_event=True)), + EventListener("open_change", + callback=lambda block: block._internal.update( + bind_openChange_event=True)) + ] + + # supported slots + SLOTS = ['icon', 'closeIcon', 'description', 'tooltip', 'badge.count'] + + def __init__( + self, + props: dict | None = None, + *, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + super().__init__(visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.props = props + + FRONTEND_DIR = resolve_frontend_dir("float-button", "group") + + @property + def skip_api(self): + return True + + def preprocess(self, payload: None) -> None: + return payload + + def postprocess(self, value: None) -> None: + + return value + + def example_payload(self) -> None: + return None + + def example_value(self) -> None: + return None diff --git a/backend/modelscope_studio/components/antd/form/__init__.py b/backend/modelscope_studio/components/antd/form/__init__.py new file mode 100644 index 00000000..baaf00bb --- /dev/null +++ b/backend/modelscope_studio/components/antd/form/__init__.py @@ -0,0 +1,82 @@ +from __future__ import annotations + +from typing import Union + +from gradio.data_classes import GradioRootModel +from gradio.events import EventListener + +from ....utils.dev import ModelScopeDataLayoutComponent, resolve_frontend_dir +from .item import AntdFormItem + + +class AntdFormData(GradioRootModel): + root: Union[dict, None] = None + + +class AntdForm(ModelScopeDataLayoutComponent): + """ + """ + Item = AntdFormItem + EVENTS = [ + EventListener("fields_change", + callback=lambda block: block._internal.update( + bind_fieldsChange_event=True)), + EventListener("finish", + callback=lambda block: block._internal.update( + bind_finish_event=True)), + EventListener("finish_failed", + callback=lambda block: block._internal.update( + bind_finishFailed_event=True)), + EventListener("values_change", + callback=lambda block: block._internal.update( + bind_valuesChange_event=True)), + ] + + data_model = AntdFormData + + # supported slots + SLOTS = [] + + def __init__( + self, + value: dict | None = None, + props: dict | None = None, + *, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + super().__init__(value=value, + visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.props = props + + FRONTEND_DIR = resolve_frontend_dir("form") + + @property + def skip_api(self): + return False + + def preprocess(self, payload: dict | AntdFormData | None) -> dict | None: + if isinstance(payload, AntdFormData): + return payload.root + return payload + + def postprocess(self, value: dict | None) -> dict | None: + return value + + def example_payload(self) -> dict: + return {} + + def example_value(self) -> dict: + return {} diff --git a/backend/modelscope_studio/components/antd/form/item/__init__.py b/backend/modelscope_studio/components/antd/form/item/__init__.py new file mode 100644 index 00000000..6fbede17 --- /dev/null +++ b/backend/modelscope_studio/components/antd/form/item/__init__.py @@ -0,0 +1,61 @@ +from __future__ import annotations + +from .....utils.dev import ModelScopeDataLayoutComponent, resolve_frontend_dir +from .rule import AntdFormItemRule + + +class AntdFormItem(ModelScopeDataLayoutComponent): + """ + """ + Rule = AntdFormItemRule + EVENTS = [] + + # supported slots + SLOTS = [ + 'extra', 'help', 'label', 'tooltip', 'tooltip.title', 'tooltip.icon' + ] + + def __init__( + self, + label: str | None = None, + props: dict | None = None, + *, + form_name: str | int | float | list[str | int | float] + | None = None, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + super().__init__(visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.label = label + self.form_name = form_name + self.props = props + + FRONTEND_DIR = resolve_frontend_dir("form", "item") + + @property + def skip_api(self): + return True + + def preprocess(self, payload: None) -> None: + return payload + + def postprocess(self, value: None) -> None: + return value + + def example_payload(self) -> None: + return None + + def example_value(self) -> None: + return None diff --git a/backend/modelscope_studio/components/antd/form/item/rule/__init__.py b/backend/modelscope_studio/components/antd/form/item/rule/__init__.py new file mode 100644 index 00000000..c2991c21 --- /dev/null +++ b/backend/modelscope_studio/components/antd/form/item/rule/__init__.py @@ -0,0 +1,49 @@ +from __future__ import annotations + +from ......utils.dev import ModelScopeDataLayoutComponent, resolve_frontend_dir + + +class AntdFormItemRule(ModelScopeDataLayoutComponent): + """ + """ + EVENTS = [] + + def __init__( + self, + props: dict | None = None, + *, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + super().__init__(visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.props = props + + FRONTEND_DIR = resolve_frontend_dir("form", ["item", "rule"]) + + @property + def skip_api(self): + return True + + def preprocess(self, payload: None) -> None: + return payload + + def postprocess(self, value: None) -> None: + return value + + def example_payload(self) -> None: + return None + + def example_value(self) -> None: + return None diff --git a/backend/modelscope_studio/components/antd/grid/col/__init__.py b/backend/modelscope_studio/components/antd/grid/col/__init__.py new file mode 100644 index 00000000..2eb80100 --- /dev/null +++ b/backend/modelscope_studio/components/antd/grid/col/__init__.py @@ -0,0 +1,102 @@ +from __future__ import annotations + +from typing import Any + +from .....utils.dev import ModelScopeLayoutComponent, resolve_frontend_dir + + +class AntdCol(ModelScopeLayoutComponent): + """ + In the grid system, we define the frame outside the information area based on row and column, to ensure that every area can have stable arrangement. + + Following is a brief look at how it works: + + Establish a set of column in the horizontal space defined by row (abbreviated col). + Your content elements should be placed directly in the col, and only col should be placed directly in row. + The column grid system is a value of 1-24 to represent its range spans. For example, three columns of equal width can be created by . + If the sum of col spans in a row are more than 24, then the overflowing col as a whole will start a new line arrangement. + Our grid systems base on Flex layout to allow the elements within the parent to be aligned horizontally - left, center, right, wide arrangement, and decentralized arrangement. The Grid system also supports vertical alignment - top aligned, vertically centered, bottom-aligned. You can also define the order of elements by using order. + + Layout uses a 24 grid layout to define the width of each "box", but does not rigidly adhere to the grid layout. + """ + + EVENTS = [] + + def __init__( + self, + props: dict | None = None, + *, + flex: str | int | None = None, + offset: int = 0, + order: int = 0, + pull: int = 0, + push: int = 0, + span: int | None = None, + xs: int | dict | None = None, + sm: int | dict | None = None, + md: int | dict | None = None, + lg: int | dict | None = None, + xl: int | dict | None = None, + xxl: int | dict | None = None, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + """ + Parameters: + flex: Flex layout style. + offset: The number of cells to offset Col from the left. + order: Raster order. + pull: The number of cells that raster is moved to the left. + push: The number of cells that raster is moved to the right. + span: Raster number of cells to occupy, 0 corresponds to display: none. + xs: screen < 576px and also default setting, could be a span value or an object containing above props. + sm: screen ≥ 576px, could be a span value or an object containing above props. + md: screen ≥ 768px, could be a span value or an object containing above props. + lg: screen ≥ 992px, could be a span value or an object containing above props. + xl: screen ≥ 1200px, could be a span value or an object containing above props. + xxl: screen ≥ 1600px, could be a span value or an object containing above props. + """ + super().__init__(visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.props = props + self.flex = flex + self.offset = offset + self.order = order + self.pull = pull + self.push = push + self.span = span + self.xs = xs + self.sm = sm + self.md = md + self.lg = lg + self.xl = xl + self.xxl = xxl + + FRONTEND_DIR = resolve_frontend_dir("grid", 'col') + + @property + def skip_api(self): + return True + + def preprocess(self, payload: None) -> None: + return payload + + def postprocess(self, value: None) -> None: + return value + + def example_payload(self) -> Any: + return None + + def example_value(self) -> Any: + return None diff --git a/backend/modelscope_studio/components/antd/grid/row/__init__.py b/backend/modelscope_studio/components/antd/grid/row/__init__.py new file mode 100644 index 00000000..a564e8da --- /dev/null +++ b/backend/modelscope_studio/components/antd/grid/row/__init__.py @@ -0,0 +1,78 @@ +from __future__ import annotations + +from typing import Any + +from .....utils.dev import ModelScopeLayoutComponent, resolve_frontend_dir + + +class AntdRow(ModelScopeLayoutComponent): + """ + In the grid system, we define the frame outside the information area based on row and column, to ensure that every area can have stable arrangement. + + Following is a brief look at how it works: + + Establish a set of column in the horizontal space defined by row (abbreviated col). + Your content elements should be placed directly in the col, and only col should be placed directly in row. + The column grid system is a value of 1-24 to represent its range spans. For example, three columns of equal width can be created by . + If the sum of col spans in a row are more than 24, then the overflowing col as a whole will start a new line arrangement. + Our grid systems base on Flex layout to allow the elements within the parent to be aligned horizontally - left, center, right, wide arrangement, and decentralized arrangement. The Grid system also supports vertical alignment - top aligned, vertically centered, bottom-aligned. You can also define the order of elements by using order. + + Layout uses a 24 grid layout to define the width of each "box", but does not rigidly adhere to the grid layout. + """ + + EVENTS = [] + + def __init__( + self, + props: dict | None = None, + *, + align: list[str] | str | dict = "top", + gutter: int | dict | list[int] = 0, + justify: list[str] | str | dict = "start", + wrap: bool = True, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + """ + Parameters: + align: Vertical alignment. + gutter: Spacing between grids, could be a number or a object like { xs: 8, sm: 16, md: 24}. Or you can use array to make horizontal and vertical spacing work at the same time [horizontal, vertical]. + justify: Horizontal arrangement. + wrap: Auto wrap line. + """ + super().__init__(visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.props = props + self.align = align + self.gutter = gutter + self.justify = justify + self.wrap = wrap + + FRONTEND_DIR = resolve_frontend_dir("grid", 'row') + + @property + def skip_api(self): + return True + + def preprocess(self, payload: None) -> None: + return payload + + def postprocess(self, value: None) -> None: + return value + + def example_payload(self) -> Any: + return None + + def example_value(self) -> Any: + return None diff --git a/backend/modelscope_studio/components/antd/icon/__init__.py b/backend/modelscope_studio/components/antd/icon/__init__.py new file mode 100644 index 00000000..1efc73a1 --- /dev/null +++ b/backend/modelscope_studio/components/antd/icon/__init__.py @@ -0,0 +1,65 @@ +from __future__ import annotations + +from gradio.events import EventListener + +from ....utils.dev import ModelScopeComponent, resolve_frontend_dir +from .iconfont_provider import AntdIconfontProvider + + +class AntdIcon(ModelScopeComponent): + """ + """ + + IconfontProvider = AntdIconfontProvider + + EVENTS = [ + EventListener("click", + callback=lambda block: block._internal.update( + bind_click_event=True)) + ] + + # supported slots + SLOTS = [] + + def __init__( + self, + value: str | None = "GithubOutlined", + props: dict | None = None, + *, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + super().__init__(value=value, + visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.props = props + + FRONTEND_DIR = resolve_frontend_dir("icon") + + @property + def skip_api(self): + return True + + def preprocess(self, payload: str | None) -> str | None: + return payload + + def postprocess(self, value: str | None) -> str | None: + + return str(value) + + def example_payload(self) -> str: + return "GithubOutlined" + + def example_value(self) -> str: + return "GithubOutlined" diff --git a/backend/modelscope_studio/components/antd/icon/iconfont_provider/__init__.py b/backend/modelscope_studio/components/antd/icon/iconfont_provider/__init__.py new file mode 100644 index 00000000..101c16b9 --- /dev/null +++ b/backend/modelscope_studio/components/antd/icon/iconfont_provider/__init__.py @@ -0,0 +1,49 @@ +from __future__ import annotations + +from .....utils.dev import ModelScopeLayoutComponent, resolve_frontend_dir + + +class AntdIconfontProvider(ModelScopeLayoutComponent): + """ + """ + EVENTS = [] + + # supported slots + SLOTS = [] + + def __init__( + self, + script_url: str | list[str] | None = None, + props: dict | None = None, + *, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + render: bool = True, + **kwargs): + super().__init__(visible=visible, + render=render, + as_item=as_item, + **kwargs) + self.script_url = script_url + self.props = props + + FRONTEND_DIR = resolve_frontend_dir("icon", "iconfont-provider") + + @property + def skip_api(self): + return True + + def preprocess(self, payload: None) -> None: + return payload + + def postprocess(self, value: None) -> None: + + return value + + def example_payload(self) -> None: + return "GithubOutlined" + + def example_value(self) -> None: + return "GithubOutlined" diff --git a/backend/modelscope_studio/components/antd/image/__init__.py b/backend/modelscope_studio/components/antd/image/__init__.py new file mode 100644 index 00000000..8153992b --- /dev/null +++ b/backend/modelscope_studio/components/antd/image/__init__.py @@ -0,0 +1,72 @@ +from __future__ import annotations + +from typing import Any + +from gradio.events import EventListener + +from ....utils.dev import ModelScopeLayoutComponent, resolve_frontend_dir +from .preview_group import AntdImagePreviewGroup + + +class AntdImage(ModelScopeLayoutComponent): + """ + """ + PreviewGroup = AntdImagePreviewGroup + + EVENTS = [ + EventListener("error", + callback=lambda block: block._internal.update( + bind_error_event=True)), + EventListener("preview_transform", + callback=lambda block: block._internal.update( + bind_preview_transform_event=True)), + EventListener("preview_visible_change", + callback=lambda block: block._internal.update( + bind_preview_visibleChange_event=True)) + ] + + # supported slots + SLOTS = ['placeholder', 'preview.mask', 'preview.closeIcon'] + + def __init__( + self, + src: str | None = None, + props: dict | None = None, + *, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + super().__init__(visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.src = src + self.props = props + + FRONTEND_DIR = resolve_frontend_dir("image") + + @property + def skip_api(self): + return True + + def preprocess(self, payload: None) -> None: + return payload + + def postprocess(self, value: None) -> None: + + return value + + def example_payload(self) -> Any: + return None + + def example_value(self) -> Any: + return None diff --git a/backend/modelscope_studio/components/antd/image/preview_group/__init__.py b/backend/modelscope_studio/components/antd/image/preview_group/__init__.py new file mode 100644 index 00000000..f92e7627 --- /dev/null +++ b/backend/modelscope_studio/components/antd/image/preview_group/__init__.py @@ -0,0 +1,66 @@ +from __future__ import annotations + +from gradio.events import EventListener + +from .....utils.dev import ModelScopeLayoutComponent, resolve_frontend_dir + + +class AntdImagePreviewGroup(ModelScopeLayoutComponent): + """ + """ + EVENTS = [ + EventListener("preview_transform", + callback=lambda block: block._internal.update( + bind_preview_transform_event=True)), + EventListener("preview_change", + callback=lambda block: block._internal.update( + bind_preview_change_event=True)), + EventListener("preview_visible_change", + callback=lambda block: block._internal.update( + bind_preview_visibleChange_event=True)) + ] + # supported slots + SLOTS = ['preview.mask', 'preview.closeIcon'] + + def __init__( + self, + items: list[dict | str] | None = None, + props: dict | None = None, + *, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + super().__init__(visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.props = props + self.items = items + + FRONTEND_DIR = resolve_frontend_dir("image", 'preview-group') + + @property + def skip_api(self): + return True + + def preprocess(self, payload: None) -> None: + return payload + + def postprocess(self, value: None) -> None: + + return value + + def example_payload(self) -> None: + return None + + def example_value(self) -> None: + return None diff --git a/backend/modelscope_studio/components/antd/input/__init__.py b/backend/modelscope_studio/components/antd/input/__init__.py new file mode 100644 index 00000000..7abc07f4 --- /dev/null +++ b/backend/modelscope_studio/components/antd/input/__init__.py @@ -0,0 +1,84 @@ +from __future__ import annotations + +from typing import Any + +from gradio.events import EventListener + +from ....utils.dev import ModelScopeDataLayoutComponent, resolve_frontend_dir +from .otp import AntdInputOTP +from .password import AntdInputPassword +from .search import AntdInputSearch +from .textarea import AntdInputTextarea + + +# as inputs, outputs +class AntdInput(ModelScopeDataLayoutComponent): + """ + """ + Textarea = AntdInputTextarea + Password = AntdInputPassword + OTP = AntdInputOTP + Search = AntdInputSearch + + EVENTS = [ + EventListener("change", + callback=lambda block: block._internal.update( + bind_change_event=True)), + EventListener("press_enter", + callback=lambda block: block._internal.update( + bind_pressEnter_event=True)), + EventListener("clear", + callback=lambda block: block._internal.update( + bind_clear_event=True)), + ] + + # supported slots + SLOTS = [ + 'addonAfter', 'addonBefore', 'allowClear.clearIcon', 'prefix', 'suffix' + ] + + def __init__( + self, + value: str | None = None, + props: dict | None = None, + *, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + super().__init__(value=value, + visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.props = props + + FRONTEND_DIR = resolve_frontend_dir("input") + + @property + def skip_api(self): + return False + + def api_info(self) -> dict[str, Any]: + return {"type": "string"} + + def preprocess(self, payload: None | str) -> None | str: + return payload + + def postprocess(self, value: None | str) -> None | str: + + return value + + def example_payload(self) -> None: + return None + + def example_value(self) -> None: + return None diff --git a/backend/modelscope_studio/components/antd/input/otp/__init__.py b/backend/modelscope_studio/components/antd/input/otp/__init__.py new file mode 100644 index 00000000..2df53eb2 --- /dev/null +++ b/backend/modelscope_studio/components/antd/input/otp/__init__.py @@ -0,0 +1,67 @@ +from __future__ import annotations + +from typing import Any + +from gradio.events import EventListener + +from .....utils.dev import ModelScopeDataLayoutComponent, resolve_frontend_dir + + +# as inputs, outputs +class AntdInputOTP(ModelScopeDataLayoutComponent): + """ + """ + EVENTS = [ + EventListener("change", + callback=lambda block: block._internal.update( + bind_change_event=True)), + ] + + # supported slots + SLOTS = [] + + def __init__( + self, + value: str | None = None, + props: dict | None = None, + *, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + super().__init__(value=value, + visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.props = props + + FRONTEND_DIR = resolve_frontend_dir("input", "otp") + + @property + def skip_api(self): + return False + + def api_info(self) -> dict[str, Any]: + return {"type": "string"} + + def preprocess(self, payload: None | str) -> None | str: + return payload + + def postprocess(self, value: None | str) -> None | str: + + return value + + def example_payload(self) -> None: + return None + + def example_value(self) -> None: + return None diff --git a/backend/modelscope_studio/components/antd/input/password/__init__.py b/backend/modelscope_studio/components/antd/input/password/__init__.py new file mode 100644 index 00000000..cc8153a5 --- /dev/null +++ b/backend/modelscope_studio/components/antd/input/password/__init__.py @@ -0,0 +1,82 @@ +from __future__ import annotations + +from typing import Any + +from gradio.events import EventListener + +from .....utils.dev import ModelScopeDataLayoutComponent, resolve_frontend_dir + + +# as inputs, outputs +class AntdInputPassword(ModelScopeDataLayoutComponent): + """ + """ + EVENTS = [ + EventListener("change", + callback=lambda block: block._internal.update( + bind_change_event=True)), + EventListener("press_enter", + callback=lambda block: block._internal.update( + bind_pressEnter_event=True)), + EventListener("clear", + callback=lambda block: block._internal.update( + bind_clear_event=True)), + EventListener("visibility_toggle_visible_change", + callback=lambda block: block._internal.update( + bind_visibilityToggle_visibleChange__event=True)), + ] + + # supported slots + SLOTS = [ + 'addonAfter', + 'addonBefore', + 'allowClear.clearIcon', + 'prefix', + 'suffix', + ] + + def __init__( + self, + value: str | None = None, + props: dict | None = None, + *, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + super().__init__(value=value, + visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.props = props + + FRONTEND_DIR = resolve_frontend_dir("input", "password") + + @property + def skip_api(self): + return False + + def api_info(self) -> dict[str, Any]: + return {"type": "string"} + + def preprocess(self, payload: None | str) -> None | str: + return payload + + def postprocess(self, value: None | str) -> None | str: + + return value + + def example_payload(self) -> None: + return None + + def example_value(self) -> None: + return None diff --git a/backend/modelscope_studio/components/antd/input/search/__init__.py b/backend/modelscope_studio/components/antd/input/search/__init__.py new file mode 100644 index 00000000..4a346894 --- /dev/null +++ b/backend/modelscope_studio/components/antd/input/search/__init__.py @@ -0,0 +1,83 @@ +from __future__ import annotations + +from typing import Any + +from gradio.events import EventListener + +from .....utils.dev import ModelScopeDataLayoutComponent, resolve_frontend_dir + + +# as inputs, outputs +class AntdInputSearch(ModelScopeDataLayoutComponent): + """ + """ + EVENTS = [ + EventListener("change", + callback=lambda block: block._internal.update( + bind_change_event=True)), + EventListener("press_enter", + callback=lambda block: block._internal.update( + bind_pressEnter_event=True)), + EventListener("clear", + callback=lambda block: block._internal.update( + bind_clear_event=True)), + EventListener("search", + callback=lambda block: block._internal.update( + bind_search_event=True)), + ] + + # supported slots + SLOTS = [ + 'addonAfter', + 'addonBefore', + 'allowClear.clearIcon', + 'prefix', + 'suffix', + 'enterButton', + ] + + def __init__( + self, + value: str | None = None, + props: dict | None = None, + *, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + super().__init__(value=value, + visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.props = props + + FRONTEND_DIR = resolve_frontend_dir("input", "search") + + @property + def skip_api(self): + return False + + def api_info(self) -> dict[str, Any]: + return {"type": "string"} + + def preprocess(self, payload: None | str) -> None | str: + return payload + + def postprocess(self, value: None | str) -> None | str: + + return value + + def example_payload(self) -> None: + return None + + def example_value(self) -> None: + return None diff --git a/backend/modelscope_studio/components/antd/input/textarea/__init__.py b/backend/modelscope_studio/components/antd/input/textarea/__init__.py new file mode 100644 index 00000000..e8a56c67 --- /dev/null +++ b/backend/modelscope_studio/components/antd/input/textarea/__init__.py @@ -0,0 +1,73 @@ +from __future__ import annotations + +from typing import Any + +from gradio.events import EventListener + +from .....utils.dev import ModelScopeDataLayoutComponent, resolve_frontend_dir + + +# as inputs, outputs +class AntdInputTextarea(ModelScopeDataLayoutComponent): + """ + """ + EVENTS = [ + EventListener("change", + callback=lambda block: block._internal.update( + bind_change_event=True)), + EventListener("press_enter", + callback=lambda block: block._internal.update( + bind_pressEnter_event=True)), + EventListener("clear", + callback=lambda block: block._internal.update( + bind_clear_event=True)), + ] + + # supported slots + SLOTS = ['allowClear.clearIcon'] + + def __init__( + self, + value: str | None = None, + props: dict | None = None, + *, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + super().__init__(value=value, + visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.props = props + + FRONTEND_DIR = resolve_frontend_dir("input", "textarea") + + @property + def skip_api(self): + return False + + def api_info(self) -> dict[str, Any]: + return {"type": "string"} + + def preprocess(self, payload: None | str) -> None | str: + return payload + + def postprocess(self, value: None | str) -> None | str: + + return value + + def example_payload(self) -> None: + return None + + def example_value(self) -> None: + return None diff --git a/backend/modelscope_studio/components/antd/input_number/__init__.py b/backend/modelscope_studio/components/antd/input_number/__init__.py new file mode 100644 index 00000000..03939055 --- /dev/null +++ b/backend/modelscope_studio/components/antd/input_number/__init__.py @@ -0,0 +1,84 @@ +from __future__ import annotations + +from typing import Any + +from gradio.events import EventListener + +from ....utils.dev import ModelScopeDataLayoutComponent, resolve_frontend_dir + + +# as inputs, outputs +class AntdInputNumber(ModelScopeDataLayoutComponent): + """ + """ + + EVENTS = [ + EventListener("change", + callback=lambda block: block._internal.update( + bind_change_event=True)), + EventListener("press_enter", + callback=lambda block: block._internal.update( + bind_pressEnter_event=True)), + EventListener("step", + callback=lambda block: block._internal.update( + bind_step_event=True)), + ] + + # supported slots + SLOTS = [ + 'addonAfter', + 'addonBefore', + 'controls.upIcon', + 'controls.downIcon', + 'prefix', + 'suffix', + ] + + def __init__( + self, + value: int | None = None, + props: dict | None = None, + *, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + super().__init__(value=value, + visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.props = props + + FRONTEND_DIR = resolve_frontend_dir("input-number") + + @property + def skip_api(self): + return False + + def api_info(self) -> dict[str, Any]: + return {"type": "number"} + + def preprocess(self, payload: None | int) -> None | int: + if isinstance(payload, str): + return int(payload) + return payload + + def postprocess(self, value: None | int) -> None | int: + if isinstance(value, str): + return int(value) + return value + + def example_payload(self) -> None: + return None + + def example_value(self) -> None: + return None diff --git a/backend/modelscope_studio/components/antd/layout/__init__.py b/backend/modelscope_studio/components/antd/layout/__init__.py new file mode 100644 index 00000000..8b189470 --- /dev/null +++ b/backend/modelscope_studio/components/antd/layout/__init__.py @@ -0,0 +1,68 @@ +from __future__ import annotations + +from typing import Any + +from gradio.events import EventListener + +from ....utils.dev import ModelScopeLayoutComponent, resolve_frontend_dir +from .content import AntdLayoutContent +from .footer import AntdLayoutFooter +from .header import AntdLayoutHeader +from .sider import AntdLayoutSider + + +class AntdLayout(ModelScopeLayoutComponent): + """ + """ + + Content = AntdLayoutContent + Footer = AntdLayoutFooter + Header = AntdLayoutHeader + Sider = AntdLayoutSider + + EVENTS = [ + EventListener("click", + callback=lambda block: block._internal.update( + bind_click_event=True)) + ] + + def __init__( + self, + props: dict | None = None, + *, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + super().__init__(visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.props = props + + FRONTEND_DIR = resolve_frontend_dir("layout") + + @property + def skip_api(self): + return True + + def preprocess(self, payload: None) -> None: + return payload + + def postprocess(self, value: None) -> None: + + return value + + def example_payload(self) -> Any: + return None + + def example_value(self) -> Any: + return None diff --git a/backend/modelscope_studio/components/antd/layout/content/__init__.py b/backend/modelscope_studio/components/antd/layout/content/__init__.py new file mode 100644 index 00000000..abfb04e3 --- /dev/null +++ b/backend/modelscope_studio/components/antd/layout/content/__init__.py @@ -0,0 +1,58 @@ +from __future__ import annotations + +from typing import Any + +from gradio.events import EventListener + +from .....utils.dev import ModelScopeLayoutComponent, resolve_frontend_dir + + +class AntdLayoutContent(ModelScopeLayoutComponent): + """ + """ + EVENTS = [ + EventListener("click", + callback=lambda block: block._internal.update( + bind_click_event=True)) + ] + + def __init__( + self, + props: dict | None = None, + *, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + super().__init__(visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.props = props + + FRONTEND_DIR = resolve_frontend_dir("layout", 'content') + + @property + def skip_api(self): + return True + + def preprocess(self, payload: None) -> None: + return payload + + def postprocess(self, value: None) -> None: + + return value + + def example_payload(self) -> Any: + return None + + def example_value(self) -> Any: + return None diff --git a/backend/modelscope_studio/components/antd/layout/footer/__init__.py b/backend/modelscope_studio/components/antd/layout/footer/__init__.py new file mode 100644 index 00000000..c15a358d --- /dev/null +++ b/backend/modelscope_studio/components/antd/layout/footer/__init__.py @@ -0,0 +1,58 @@ +from __future__ import annotations + +from typing import Any + +from gradio.events import EventListener + +from .....utils.dev import ModelScopeLayoutComponent, resolve_frontend_dir + + +class AntdLayoutFooter(ModelScopeLayoutComponent): + """ + """ + EVENTS = [ + EventListener("click", + callback=lambda block: block._internal.update( + bind_click_event=True)) + ] + + def __init__( + self, + props: dict | None = None, + *, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + super().__init__(visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.props = props + + FRONTEND_DIR = resolve_frontend_dir("layout", 'footer') + + @property + def skip_api(self): + return True + + def preprocess(self, payload: None) -> None: + return payload + + def postprocess(self, value: None) -> None: + + return value + + def example_payload(self) -> Any: + return None + + def example_value(self) -> Any: + return None diff --git a/backend/modelscope_studio/components/antd/layout/header/__init__.py b/backend/modelscope_studio/components/antd/layout/header/__init__.py new file mode 100644 index 00000000..2221b533 --- /dev/null +++ b/backend/modelscope_studio/components/antd/layout/header/__init__.py @@ -0,0 +1,58 @@ +from __future__ import annotations + +from typing import Any + +from gradio.events import EventListener + +from .....utils.dev import ModelScopeLayoutComponent, resolve_frontend_dir + + +class AntdLayoutHeader(ModelScopeLayoutComponent): + """ + """ + EVENTS = [ + EventListener("click", + callback=lambda block: block._internal.update( + bind_click_event=True)) + ] + + def __init__( + self, + props: dict | None = None, + *, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + super().__init__(visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.props = props + + FRONTEND_DIR = resolve_frontend_dir("layout", 'header') + + @property + def skip_api(self): + return True + + def preprocess(self, payload: None) -> None: + return payload + + def postprocess(self, value: None) -> None: + + return value + + def example_payload(self) -> Any: + return None + + def example_value(self) -> Any: + return None diff --git a/backend/modelscope_studio/components/antd/layout/sider/__init__.py b/backend/modelscope_studio/components/antd/layout/sider/__init__.py new file mode 100644 index 00000000..d8bf6f12 --- /dev/null +++ b/backend/modelscope_studio/components/antd/layout/sider/__init__.py @@ -0,0 +1,64 @@ +from __future__ import annotations + +from typing import Any + +from gradio.events import EventListener + +from .....utils.dev import ModelScopeLayoutComponent, resolve_frontend_dir + + +class AntdLayoutSider(ModelScopeLayoutComponent): + """ + """ + EVENTS = [ + EventListener("click", + callback=lambda block: block._internal.update( + bind_click_event=True)), + EventListener("breakpoint", + callback=lambda block: block._internal.update( + bind_breakpoint_event=True)), + EventListener("collapse", + callback=lambda block: block._internal.update( + bind_collapse_event=True)), + ] + + def __init__( + self, + props: dict | None = None, + *, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + super().__init__(visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.props = props + + FRONTEND_DIR = resolve_frontend_dir("layout", 'sider') + + @property + def skip_api(self): + return True + + def preprocess(self, payload: None) -> None: + return payload + + def postprocess(self, value: None) -> None: + + return value + + def example_payload(self) -> Any: + return None + + def example_value(self) -> Any: + return None diff --git a/backend/modelscope_studio/components/antd/list/__init__.py b/backend/modelscope_studio/components/antd/list/__init__.py new file mode 100644 index 00000000..ba398cc6 --- /dev/null +++ b/backend/modelscope_studio/components/antd/list/__init__.py @@ -0,0 +1,65 @@ +from __future__ import annotations + +from typing import Any + +from gradio.events import EventListener + +from ....utils.dev import ModelScopeLayoutComponent, resolve_frontend_dir +from .item import AntdListItem + + +class AntdList(ModelScopeLayoutComponent): + """ + """ + Item = AntdListItem + EVENTS = [ + EventListener("pagination_change", + callback=lambda block: block._internal.update( + bind_pagination_change_event=True)), + EventListener("pagination_show_size_change", + callback=lambda block: block._internal.update( + bind_pagination_showSizeChange_event=True)), + ] + + # supported slots + SLOTS = ['footer', 'header', 'loadMore'] + + def __init__( + self, + props: dict | None = None, + *, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + super().__init__(visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.props = props + + FRONTEND_DIR = resolve_frontend_dir("list") + + @property + def skip_api(self): + return True + + def preprocess(self, payload: None) -> None: + return payload + + def postprocess(self, value: None) -> None: + return value + + def example_payload(self) -> Any: + return None + + def example_value(self) -> Any: + return None diff --git a/backend/modelscope_studio/components/antd/list/item/__init__.py b/backend/modelscope_studio/components/antd/list/item/__init__.py new file mode 100644 index 00000000..d68beaf8 --- /dev/null +++ b/backend/modelscope_studio/components/antd/list/item/__init__.py @@ -0,0 +1,59 @@ +from __future__ import annotations + +from typing import Any + +from .....utils.dev import ModelScopeLayoutComponent, resolve_frontend_dir +from .meta import AntdListItemMeta + + +class AntdListItem(ModelScopeLayoutComponent): + """ + """ + Meta = AntdListItemMeta + EVENTS = [] + + # supported slots + SLOTS = [ + "actions", + 'extra', + ] + + def __init__( + self, + props: dict | None = None, + *, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + super().__init__(visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.props = props + + FRONTEND_DIR = resolve_frontend_dir("list", "item") + + @property + def skip_api(self): + return True + + def preprocess(self, payload: None) -> None: + return payload + + def postprocess(self, value: None) -> None: + return value + + def example_payload(self) -> Any: + return None + + def example_value(self) -> Any: + return None diff --git a/backend/modelscope_studio/components/antd/list/item/meta/__init__.py b/backend/modelscope_studio/components/antd/list/item/meta/__init__.py new file mode 100644 index 00000000..95bb134c --- /dev/null +++ b/backend/modelscope_studio/components/antd/list/item/meta/__init__.py @@ -0,0 +1,55 @@ +from __future__ import annotations + +from typing import Any + +from ......utils.dev import ModelScopeLayoutComponent, resolve_frontend_dir + + +class AntdListItemMeta(ModelScopeLayoutComponent): + """ + """ + + EVENTS = [] + + # supported slots + SLOTS = ['avatar', 'description', 'title'] + + def __init__( + self, + props: dict | None = None, + *, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + super().__init__(visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.props = props + + FRONTEND_DIR = resolve_frontend_dir("list", ["item", "meta"]) + + @property + def skip_api(self): + return True + + def preprocess(self, payload: None) -> None: + return payload + + def postprocess(self, value: None) -> None: + return value + + def example_payload(self) -> Any: + return None + + def example_value(self) -> Any: + return None diff --git a/backend/modelscope_studio/components/antd/mentions/__init__.py b/backend/modelscope_studio/components/antd/mentions/__init__.py new file mode 100644 index 00000000..27498d44 --- /dev/null +++ b/backend/modelscope_studio/components/antd/mentions/__init__.py @@ -0,0 +1,88 @@ +from __future__ import annotations + +from typing import Any + +from gradio.events import EventListener + +from ....utils.dev import ModelScopeDataLayoutComponent, resolve_frontend_dir +from .option import AntdMentionsOption + + +# as inputs, outputs +class AntdMentions(ModelScopeDataLayoutComponent): + """ + """ + Option = AntdMentionsOption + + EVENTS = [ + EventListener("change", + callback=lambda block: block._internal.update( + bind_change_event=True)), + EventListener("blur", + callback=lambda block: block._internal.update( + bind_blur_event=True)), + EventListener("focus", + callback=lambda block: block._internal.update( + bind_focus_event=True)), + EventListener("search", + callback=lambda block: block._internal.update( + bind_search_event=True)), + EventListener("select", + callback=lambda block: block._internal.update( + bind_select_event=True)), + EventListener("clear", + callback=lambda block: block._internal.update( + bind_clear_event=True)), + EventListener("resize", + callback=lambda block: block._internal.update( + bind_resize_event=True)), + ] + + # supported slots + SLOTS = ['allowClear.clearIcon', 'notFoundContent', "options"] + + def __init__( + self, + value: str | None = None, + props: dict | None = None, + *, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + super().__init__(value=value, + visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.props = props + + FRONTEND_DIR = resolve_frontend_dir("mentions") + + @property + def skip_api(self): + return False + + def api_info(self) -> dict[str, Any]: + return {"type": "string"} + + def preprocess(self, payload: None | str) -> None | str: + return payload + + def postprocess(self, value: None | str) -> None | str: + + return value + + def example_payload(self) -> None: + return None + + def example_value(self) -> None: + return None diff --git a/backend/modelscope_studio/components/antd/mentions/option/__init__.py b/backend/modelscope_studio/components/antd/mentions/option/__init__.py new file mode 100644 index 00000000..f8f7a9ec --- /dev/null +++ b/backend/modelscope_studio/components/antd/mentions/option/__init__.py @@ -0,0 +1,65 @@ +from __future__ import annotations + +from typing import Any + +from .....utils.dev import ModelScopeLayoutComponent, resolve_frontend_dir + + +class AntdMentionsOption(ModelScopeLayoutComponent): + """ + """ + + EVENTS = [] + + # supported slots + SLOTS = [ + 'label', + ] + + def __init__( + self, + value: str | None = None, + label: str | None = None, + props: dict | None = None, + *, + disabled: bool | None = None, + key: str | None = None, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + super().__init__(visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.props = props + self.value = value + self.label = label + self.disabled = disabled + self.key = key + + FRONTEND_DIR = resolve_frontend_dir("mentions", "option") + + @property + def skip_api(self): + return True + + def preprocess(self, payload: None) -> None: + return payload + + def postprocess(self, value: None) -> None: + return value + + def example_payload(self) -> Any: + return None + + def example_value(self) -> Any: + return None diff --git a/backend/modelscope_studio/components/antd/menu/__init__.py b/backend/modelscope_studio/components/antd/menu/__init__.py new file mode 100644 index 00000000..067ba781 --- /dev/null +++ b/backend/modelscope_studio/components/antd/menu/__init__.py @@ -0,0 +1,84 @@ +from __future__ import annotations + +from typing import Any, List + +from gradio.data_classes import GradioModel +from gradio.events import EventListener + +from ....utils.dev import ModelScopeDataLayoutComponent, resolve_frontend_dir +from .item import AntdMenuItem + + +class MenuData(GradioModel): + open_keys: List[str] = [] + selected_keys: List[str] = [] + + +# as inputs, outputs +class AntdMenu(ModelScopeDataLayoutComponent): + """ + """ + Item = AntdMenuItem + + EVENTS = [ + EventListener("click", + callback=lambda block: block._internal.update( + bind_click_event=True)), + EventListener("deselect", + callback=lambda block: block._internal.update( + bind_deselect_event=True)), + EventListener("open_change", + callback=lambda block: block._internal.update( + bind_openChange_event=True)), + EventListener("select", + callback=lambda block: block._internal.update( + bind_select_event=True)), + ] + + # supported slots + SLOTS = ["expandIcon", 'overflowedIndicator', "items"] + data_model = MenuData + + def __init__( + self, + value: MenuData | dict | None = None, + props: dict | None = None, + *, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + super().__init__(value=value, + visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.props = props + + FRONTEND_DIR = resolve_frontend_dir("menu") + + @property + def skip_api(self): + return False + + def preprocess(self, payload: dict | MenuData) -> dict | MenuData: + return payload + + def postprocess(self, value: dict | MenuData | None) -> MenuData: + if isinstance(value, dict): + value = MenuData(**value) + return value + + def example_payload(self) -> Any: + return None + + def example_value(self) -> Any: + return None diff --git a/backend/modelscope_studio/components/antd/menu/item/__init__.py b/backend/modelscope_studio/components/antd/menu/item/__init__.py new file mode 100644 index 00000000..1d205951 --- /dev/null +++ b/backend/modelscope_studio/components/antd/menu/item/__init__.py @@ -0,0 +1,63 @@ +from __future__ import annotations + +from typing import Any, Literal + +from gradio.events import EventListener + +from .....utils.dev import ModelScopeLayoutComponent, resolve_frontend_dir + + +class AntdMenuItem(ModelScopeLayoutComponent): + """ + """ + + EVENTS = [ + EventListener("title_click", + callback=lambda block: block._internal.update( + bind_titleClick_event=True)), + ] + + # supported slots + SLOTS = ["title", 'icon', "label"] + + def __init__( + self, + label: str | None = None, + props: dict | None = None, + *, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + super().__init__(visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.label = label + self.props = props + + FRONTEND_DIR = resolve_frontend_dir("menu", "item") + + @property + def skip_api(self): + return True + + def preprocess(self, payload: None) -> None: + return payload + + def postprocess(self, value: None) -> None: + return value + + def example_payload(self) -> Any: + return None + + def example_value(self) -> Any: + return None diff --git a/backend/modelscope_studio/components/antd/message/__init__.py b/backend/modelscope_studio/components/antd/message/__init__.py new file mode 100644 index 00000000..256faf0a --- /dev/null +++ b/backend/modelscope_studio/components/antd/message/__init__.py @@ -0,0 +1,64 @@ +from __future__ import annotations + +from gradio.events import EventListener + +from ....utils.dev import ModelScopeLayoutComponent, resolve_frontend_dir + + +class AntdMessage(ModelScopeLayoutComponent): + """ + """ + EVENTS = [ + EventListener("click", + callback=lambda block: block._internal.update( + bind_click_event=True)), + EventListener("close", + callback=lambda block: block._internal.update( + bind_close_event=True)) + ] + + # supported slots + SLOTS = ['icon', 'content'] + + def __init__( + self, + content: str | None = "", + props: dict | None = None, + *, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = False, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + super().__init__(visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.content = content + self.props = props + + FRONTEND_DIR = resolve_frontend_dir("message") + + @property + def skip_api(self): + return True + + def preprocess(self, payload: str | None) -> str | None: + return payload + + def postprocess(self, value: str | None) -> str | None: + + return str(value) + + def example_payload(self) -> str: + return "Message" + + def example_value(self) -> str: + return "Message" diff --git a/backend/modelscope_studio/components/antd/modal/__init__.py b/backend/modelscope_studio/components/antd/modal/__init__.py new file mode 100644 index 00000000..a1601872 --- /dev/null +++ b/backend/modelscope_studio/components/antd/modal/__init__.py @@ -0,0 +1,74 @@ +from __future__ import annotations + +from typing import Any + +from gradio.events import EventListener + +from ....utils.dev import ModelScopeLayoutComponent, resolve_frontend_dir + + +class AntdModal(ModelScopeLayoutComponent): + """ + """ + EVENTS = [ + EventListener("ok", + callback=lambda block: block._internal.update( + bind_cancel_event=True)), + EventListener("cancel", + callback=lambda block: block._internal.update( + bind_cancel_event=True)) + ] + + # supported slots + SLOTS = [ + 'closeIcon', + 'cancelButtonProps.icon', + 'cancelText', + 'closable.closeIcon', + 'closeIcon', + 'footer', + 'title', + 'okButtonProps.icon', + 'okText', + ] + + def __init__( + self, + props: dict | None = None, + *, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + super().__init__(visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.props = props + + FRONTEND_DIR = resolve_frontend_dir("modal") + + @property + def skip_api(self): + return True + + def preprocess(self, payload: None) -> None: + return payload + + def postprocess(self, value: None) -> None: + + return value + + def example_payload(self) -> Any: + return None + + def example_value(self) -> Any: + return None diff --git a/backend/modelscope_studio/components/antd/notification/__init__.py b/backend/modelscope_studio/components/antd/notification/__init__.py new file mode 100644 index 00000000..664f4b36 --- /dev/null +++ b/backend/modelscope_studio/components/antd/notification/__init__.py @@ -0,0 +1,66 @@ +from __future__ import annotations + +from typing import Any + +from gradio.events import EventListener + +from ....utils.dev import ModelScopeLayoutComponent, resolve_frontend_dir + + +class AntdNotification(ModelScopeLayoutComponent): + """ + """ + EVENTS = [ + EventListener("click", + callback=lambda block: block._internal.update( + bind_click_event=True)), + EventListener("close", + callback=lambda block: block._internal.update( + bind_close_event=True)) + ] + + # supported slots + SLOTS = ['btn', 'closeIcon', "description", "icon", "message"] + + def __init__( + self, + message: str | None = "", + props: dict | None = None, + *, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = False, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + super().__init__(visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.props = props + self.message = message + + FRONTEND_DIR = resolve_frontend_dir("notification") + + @property + def skip_api(self): + return True + + def preprocess(self, payload: None) -> None: + return payload + + def postprocess(self, value: None) -> None: + + return value + + def example_payload(self) -> Any: + return None + + def example_value(self) -> Any: + return None diff --git a/backend/modelscope_studio/components/antd/pagination/__init__.py b/backend/modelscope_studio/components/antd/pagination/__init__.py new file mode 100644 index 00000000..9b8536a4 --- /dev/null +++ b/backend/modelscope_studio/components/antd/pagination/__init__.py @@ -0,0 +1,80 @@ +from __future__ import annotations + +from typing import Optional, Union + +from gradio.data_classes import GradioModel +from gradio.events import EventListener + +from ....utils.dev import ModelScopeDataLayoutComponent, resolve_frontend_dir + + +class PaginationData(GradioModel): + page: int + page_size: Optional[Union[int, None]] = None + + +# as inputs, outputs +class AntdPagination(ModelScopeDataLayoutComponent): + """ + """ + EVENTS = [ + EventListener("change", + callback=lambda block: block._internal.update( + bind_change_event=True)), + EventListener("show_size_change", + callback=lambda block: block._internal.update( + bind_showSizeChange_event=True)), + ] + + # supported slots + SLOTS = ['showQuickJumper.goButton'] + + data_model = PaginationData + + def __init__( + self, + value: int | dict | PaginationData | None = None, + props: dict | None = None, + *, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + super().__init__(value=value, + visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.props = props + + FRONTEND_DIR = resolve_frontend_dir("pagination") + + @property + def skip_api(self): + return False + + def preprocess(self, + payload: PaginationData | dict) -> PaginationData | dict: + return payload + + def postprocess(self, + value: PaginationData | dict | int) -> PaginationData: + if isinstance(value, int): + value = dict(page=value) + if isinstance(value, dict): + value = PaginationData(**value) + return value + + def example_payload(self) -> None: + return {"page": 1, "page_size": 10} + + def example_value(self) -> None: + return {"page": 1, "page_size": 10} diff --git a/backend/modelscope_studio/components/antd/popconfirm/__init__.py b/backend/modelscope_studio/components/antd/popconfirm/__init__.py new file mode 100644 index 00000000..27c1d24c --- /dev/null +++ b/backend/modelscope_studio/components/antd/popconfirm/__init__.py @@ -0,0 +1,77 @@ +from __future__ import annotations + +from gradio.events import EventListener + +from ....utils.dev import ModelScopeLayoutComponent, resolve_frontend_dir + + +class AntdPopconfirm(ModelScopeLayoutComponent): + """ + """ + EVENTS = [ + EventListener("open_change", + callback=lambda block: block._internal.update( + bind_openChange_event=True)), + EventListener("cancel", + callback=lambda block: block._internal.update( + bind_cancel_event=True)), + EventListener("confirm", + callback=lambda block: block._internal.update( + bind_confirm_event=True)), + EventListener("popup_click", + callback=lambda block: block._internal.update( + bind_popupClick_event=True)) + ] + + # supported slots + SLOTS = [ + 'title', + 'description', + 'cancelButtonProps.icon', + 'cancelText', + 'okButtonProps.icon', + 'okText', + ] + + def __init__( + self, + title: str | None = "", + props: dict | None = None, + *, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + super().__init__(visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.title = title + self.props = props + + FRONTEND_DIR = resolve_frontend_dir("popconfirm") + + @property + def skip_api(self): + return True + + def preprocess(self, payload: str | None) -> str | None: + return payload + + def postprocess(self, value: str | None) -> str | None: + + return str(value) + + def example_payload(self) -> str: + return "Popconfirm" + + def example_value(self) -> str: + return "Popconfirm" diff --git a/backend/modelscope_studio/components/antd/popover/__init__.py b/backend/modelscope_studio/components/antd/popover/__init__.py new file mode 100644 index 00000000..5ff11605 --- /dev/null +++ b/backend/modelscope_studio/components/antd/popover/__init__.py @@ -0,0 +1,61 @@ +from __future__ import annotations + +from gradio.events import EventListener + +from ....utils.dev import ModelScopeLayoutComponent, resolve_frontend_dir + + +class AntdPopover(ModelScopeLayoutComponent): + """ + """ + EVENTS = [ + EventListener("open_change", + callback=lambda block: block._internal.update( + bind_openChange_event=True)), + ] + + # supported slots + SLOTS = ['title', "content"] + + def __init__( + self, + content: str | None = "", + props: dict | None = None, + *, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + super().__init__(visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.content = content + self.props = props + + FRONTEND_DIR = resolve_frontend_dir("popover") + + @property + def skip_api(self): + return True + + def preprocess(self, payload: str | None) -> str | None: + return payload + + def postprocess(self, value: str | None) -> str | None: + + return str(value) + + def example_payload(self) -> str: + return "Popover" + + def example_value(self) -> str: + return "Popover" diff --git a/backend/modelscope_studio/components/antd/progress/__init__.py b/backend/modelscope_studio/components/antd/progress/__init__.py new file mode 100644 index 00000000..16786208 --- /dev/null +++ b/backend/modelscope_studio/components/antd/progress/__init__.py @@ -0,0 +1,54 @@ +from __future__ import annotations + +from typing import Any + +from ....utils.dev import ModelScopeComponent, resolve_frontend_dir + + +class AntdProgress(ModelScopeComponent): + """ + """ + + EVENTS = [] + + def __init__( + self, + percent: int = 0, + props: dict | None = None, + *, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + super().__init__(visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.props = props + self.percent = percent + + FRONTEND_DIR = resolve_frontend_dir("progress") + + @property + def skip_api(self): + return True + + def preprocess(self, payload: None) -> None: + return payload + + def postprocess(self, value: None) -> None: + return value + + def example_payload(self) -> Any: + return 0 + + def example_value(self) -> Any: + return 0 diff --git a/backend/modelscope_studio/components/antd/qr_code/__init__.py b/backend/modelscope_studio/components/antd/qr_code/__init__.py new file mode 100644 index 00000000..51f610d6 --- /dev/null +++ b/backend/modelscope_studio/components/antd/qr_code/__init__.py @@ -0,0 +1,60 @@ +from __future__ import annotations + +from typing import Any + +from gradio.events import EventListener + +from ....utils.dev import ModelScopeComponent, resolve_frontend_dir + + +class AntdQRCode(ModelScopeComponent): + """ + """ + + EVENTS = [ + EventListener("refresh", + callback=lambda block: block._internal.update( + bind_refresh_event=True)), + ] + + def __init__( + self, + value: str | None = None, + props: dict | None = None, + *, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + super().__init__(value=value, + visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.props = props + + FRONTEND_DIR = resolve_frontend_dir("qr-code") + + @property + def skip_api(self): + return True + + def preprocess(self, payload: str) -> str: + return payload + + def postprocess(self, value: str) -> str: + return value + + def example_payload(self) -> Any: + return None + + def example_value(self) -> Any: + return None diff --git a/backend/modelscope_studio/components/antd/radio/__init__.py b/backend/modelscope_studio/components/antd/radio/__init__.py new file mode 100644 index 00000000..a475c1fb --- /dev/null +++ b/backend/modelscope_studio/components/antd/radio/__init__.py @@ -0,0 +1,77 @@ +from __future__ import annotations + +from typing import Any + +from gradio.events import EventListener + +from ....utils.dev import ModelScopeDataLayoutComponent, resolve_frontend_dir +from .button import AntdRadioButton +from .group import AntdRadioGroup + + +# as inputs, outputs +class AntdRadio(ModelScopeDataLayoutComponent): + """ + """ + Group = AntdRadioGroup + Button = AntdRadioButton + + EVENTS = [ + EventListener("change", + callback=lambda block: block._internal.update( + bind_change_event=True)), + ] + + def __init__( + self, + group_value: Any | None = None, + value: bool | None = None, + props: dict | None = None, + *, + auto_focus: bool | None = None, + default_checked: bool | None = None, + disabled: bool | None = None, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + super().__init__(value=value, + visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.props = props + self.group_value = group_value + self.auto_focus = auto_focus + self.default_checked = default_checked + self.disabled = disabled + + FRONTEND_DIR = resolve_frontend_dir("radio") + + @property + def skip_api(self): + return False + + def api_info(self) -> dict[str, Any]: + return {"type": "boolean"} + + def preprocess(self, payload: None | bool) -> None | bool: + return payload + + def postprocess(self, value: None | bool) -> None | bool: + + return value + + def example_payload(self) -> None: + return None + + def example_value(self) -> None: + return None diff --git a/backend/modelscope_studio/components/antd/radio/button/__init__.py b/backend/modelscope_studio/components/antd/radio/button/__init__.py new file mode 100644 index 00000000..bd5d527e --- /dev/null +++ b/backend/modelscope_studio/components/antd/radio/button/__init__.py @@ -0,0 +1,73 @@ +from __future__ import annotations + +from typing import Any + +from gradio.events import EventListener + +from .....utils.dev import ModelScopeDataLayoutComponent, resolve_frontend_dir + + +# as inputs, outputs +class AntdRadioButton(ModelScopeDataLayoutComponent): + """ + """ + + EVENTS = [ + EventListener("change", + callback=lambda block: block._internal.update( + bind_change_event=True)), + ] + + def __init__( + self, + group_value: Any | None = None, + value: bool | None = None, + props: dict | None = None, + *, + auto_focus: bool | None = None, + default_checked: bool | None = None, + disabled: bool | None = None, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + super().__init__(value=value, + visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.props = props + self.group_value = group_value + self.auto_focus = auto_focus + self.default_checked = default_checked + self.disabled = disabled + + FRONTEND_DIR = resolve_frontend_dir("radio", 'button') + + @property + def skip_api(self): + return False + + def api_info(self) -> dict[str, Any]: + return {"type": "boolean"} + + def preprocess(self, payload: None | bool) -> None | bool: + return payload + + def postprocess(self, value: None | bool) -> None | bool: + + return value + + def example_payload(self) -> None: + return None + + def example_value(self) -> None: + return None diff --git a/backend/modelscope_studio/components/antd/radio/group/__init__.py b/backend/modelscope_studio/components/antd/radio/group/__init__.py new file mode 100644 index 00000000..37338a25 --- /dev/null +++ b/backend/modelscope_studio/components/antd/radio/group/__init__.py @@ -0,0 +1,81 @@ +from __future__ import annotations + +from typing import Any + +from gradio.events import EventListener + +from .....utils.dev import ModelScopeDataLayoutComponent, resolve_frontend_dir +from .option import AntdRadioGroupOption + + +# as inputs, outputs +class AntdRadioGroup(ModelScopeDataLayoutComponent): + """ + """ + Option = AntdRadioGroupOption + + EVENTS = [ + EventListener("change", + callback=lambda block: block._internal.update( + bind_change_event=True)), + ] + # supported slots + SLOTS = ['options'] + + def __init__( + self, + value: Any | None = None, + props: dict | None = None, + *, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + super().__init__(value=value, + visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.props = props + + FRONTEND_DIR = resolve_frontend_dir("radio", "group") + + @property + def skip_api(self): + return False + + def api_info(self) -> dict[str, Any]: + return { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + ], + } + + def preprocess(self, payload: Any | None) -> Any | None: + return payload + + def postprocess(self, value: Any | None) -> Any | None: + + return value + + def example_payload(self) -> None: + return None + + def example_value(self) -> None: + return None diff --git a/backend/modelscope_studio/components/antd/radio/group/option/__init__.py b/backend/modelscope_studio/components/antd/radio/group/option/__init__.py new file mode 100644 index 00000000..d888d6c3 --- /dev/null +++ b/backend/modelscope_studio/components/antd/radio/group/option/__init__.py @@ -0,0 +1,67 @@ +from __future__ import annotations + +from typing import Any + +from ......utils.dev import ModelScopeLayoutComponent, resolve_frontend_dir + + +class AntdRadioGroupOption(ModelScopeLayoutComponent): + """ + """ + + EVENTS = [] + + # supported slots + SLOTS = [ + 'label', + ] + + def __init__( + self, + value: str | None = None, + props: dict | None = None, + *, + label: str | None = None, + disabled: bool | None = None, + title: str | None = None, + required: bool | None = None, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + super().__init__(visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.props = props + self.value = value + self.label = label + self.disabled = disabled + self.title = title + self.required = required + + FRONTEND_DIR = resolve_frontend_dir("radio", ['group', 'option']) + + @property + def skip_api(self): + return True + + def preprocess(self, payload: None) -> None: + return payload + + def postprocess(self, value: None) -> None: + return value + + def example_payload(self) -> Any: + return None + + def example_value(self) -> Any: + return None diff --git a/backend/modelscope_studio/components/antd/rate/__init__.py b/backend/modelscope_studio/components/antd/rate/__init__.py new file mode 100644 index 00000000..e6693916 --- /dev/null +++ b/backend/modelscope_studio/components/antd/rate/__init__.py @@ -0,0 +1,80 @@ +from __future__ import annotations + +from typing import Any + +from gradio.events import EventListener + +from ....utils.dev import ModelScopeDataLayoutComponent, resolve_frontend_dir + + +# as inputs, outputs +class AntdRate(ModelScopeDataLayoutComponent): + """ + """ + + EVENTS = [ + EventListener("change", + callback=lambda block: block._internal.update( + bind_change_event=True)), + EventListener("blur", + callback=lambda block: block._internal.update( + bind_blur_event=True)), + EventListener("focus", + callback=lambda block: block._internal.update( + bind_focus_event=True)), + EventListener("hover_change", + callback=lambda block: block._internal.update( + bind_hoverChange_event=True)), + EventListener("key_down", + callback=lambda block: block._internal.update( + bind_keyDown_event=True)), + ] + + # supported slots + SLOTS = ["character"] + + def __init__( + self, + value: int | None = None, + props: dict | None = None, + *, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + super().__init__(value=value, + visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.props = props + + FRONTEND_DIR = resolve_frontend_dir("rate") + + @property + def skip_api(self): + return False + + def api_info(self) -> dict[str, Any]: + return {"type": "number"} + + def preprocess(self, payload: None | int) -> None | int: + return payload + + def postprocess(self, value: None | int) -> None | int: + + return value + + def example_payload(self) -> None: + return None + + def example_value(self) -> None: + return None diff --git a/backend/modelscope_studio/components/antd/result/__init__.py b/backend/modelscope_studio/components/antd/result/__init__.py new file mode 100644 index 00000000..c0d76852 --- /dev/null +++ b/backend/modelscope_studio/components/antd/result/__init__.py @@ -0,0 +1,53 @@ +from __future__ import annotations + +from ....utils.dev import ModelScopeLayoutComponent, resolve_frontend_dir + + +class AntdResult(ModelScopeLayoutComponent): + """ + """ + EVENTS = [] + + # supported slots + SLOTS = ['extra', 'icon', 'subTitle', 'title'] + + def __init__( + self, + props: dict | None = None, + *, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + super().__init__(visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.props = props + + FRONTEND_DIR = resolve_frontend_dir("result") + + @property + def skip_api(self): + return True + + def preprocess(self, payload: None) -> None: + return payload + + def postprocess(self, value: None) -> None: + + return value + + def example_payload(self) -> None: + return None + + def example_value(self) -> None: + return None diff --git a/backend/modelscope_studio/components/antd/segmented/__init__.py b/backend/modelscope_studio/components/antd/segmented/__init__.py new file mode 100644 index 00000000..c89651b7 --- /dev/null +++ b/backend/modelscope_studio/components/antd/segmented/__init__.py @@ -0,0 +1,75 @@ +from __future__ import annotations + +from typing import Any + +from gradio.events import EventListener + +from ....utils.dev import ModelScopeDataLayoutComponent, resolve_frontend_dir +from .option import AntdSegmentedOption + + +# as inputs, outputs +class AntdSegmented(ModelScopeDataLayoutComponent): + """ + """ + Option = AntdSegmentedOption + + EVENTS = [ + EventListener("change", + callback=lambda block: block._internal.update( + bind_change_event=True)), + ] + + def __init__( + self, + value: str | int | float | None = None, + props: dict | None = None, + *, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + super().__init__(value=value, + visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.props = props + + FRONTEND_DIR = resolve_frontend_dir("segmented") + + @property + def skip_api(self): + return False + + def api_info(self) -> dict[str, list[str]]: + return { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + ] + } + + def preprocess(self, payload: str | int | float) -> str | int | float: + return payload + + def postprocess(self, value: str | int | float) -> str | int | float: + return value + + def example_payload(self) -> Any: + return None + + def example_value(self) -> Any: + return None diff --git a/backend/modelscope_studio/components/antd/segmented/option/__init__.py b/backend/modelscope_studio/components/antd/segmented/option/__init__.py new file mode 100644 index 00000000..325eabcf --- /dev/null +++ b/backend/modelscope_studio/components/antd/segmented/option/__init__.py @@ -0,0 +1,57 @@ +from __future__ import annotations + +from typing import Any + +from .....utils.dev import ModelScopeLayoutComponent, resolve_frontend_dir + + +class AntdSegmentedOption(ModelScopeLayoutComponent): + """ + """ + + EVENTS = [] + + # supported slots + SLOTS = ['icon', "label"] + + def __init__( + self, + value: str | int | float | None = None, + props: dict | None = None, + *, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + super().__init__(visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.value = value + self.props = props + + FRONTEND_DIR = resolve_frontend_dir("segmented", "option") + + @property + def skip_api(self): + return True + + def preprocess(self, payload: None) -> None: + return payload + + def postprocess(self, value: None) -> None: + return value + + def example_payload(self) -> Any: + return None + + def example_value(self) -> Any: + return None diff --git a/backend/modelscope_studio/components/antd/select/__init__.py b/backend/modelscope_studio/components/antd/select/__init__.py new file mode 100644 index 00000000..e2cbd03d --- /dev/null +++ b/backend/modelscope_studio/components/antd/select/__init__.py @@ -0,0 +1,122 @@ +from __future__ import annotations + +from typing import Any + +from gradio.events import EventListener + +from ....utils.dev import ModelScopeDataLayoutComponent, resolve_frontend_dir +from .option import AntdSelectOption + + +# as inputs, outputs +class AntdSelect(ModelScopeDataLayoutComponent): + """ + """ + Option = AntdSelectOption + + EVENTS = [ + EventListener("change", + callback=lambda block: block._internal.update( + bind_change_event=True)), + EventListener("blur", + callback=lambda block: block._internal.update( + bind_blur_event=True)), + EventListener("focus", + callback=lambda block: block._internal.update( + bind_focus_event=True)), + EventListener("search", + callback=lambda block: block._internal.update( + bind_search_event=True)), + EventListener("select", + callback=lambda block: block._internal.update( + bind_select_event=True)), + EventListener("clear", + callback=lambda block: block._internal.update( + bind_clear_event=True)), + EventListener("popup_scroll", + callback=lambda block: block._internal.update( + bind_popupScroll_event=True)), + EventListener("dropdown_visible_change", + callback=lambda block: block._internal.update( + bind_dropdownVisibleChange_event=True)), + ] + + # supported slots + SLOTS = [ + 'allowClear.clearIcon', 'maxTagPlaceholder', 'menuItemSelectedIcon', + 'notFoundContent', 'removeIcon', 'suffixIcon', 'options' + ] + + def __init__( + self, + value: str | int | float | list[float | int | str] | None = None, + props: dict | None = None, + *, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + key: int | str | None = None, + render: bool = True, + **kwargs): + super().__init__(value=value, + visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + key=key, + elem_style=elem_style, + **kwargs) + self.props = props + + FRONTEND_DIR = resolve_frontend_dir("select") + + @property + def skip_api(self): + return False + + def api_info(self) -> dict[str, Any]: + return { + "anyOf": [ + { + "type": "string", + }, + { + "type": "number", + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "string", + }, + { + "type": "number", + }, + ], + }, + }, + ] + } + + def preprocess( + self, payload: str | int | float | list[float | int | str] | None + ) -> str | int | float | list[float | int | str] | None: + return payload + + def postprocess( + self, value: str | int | float | list[float | int | str] | None + ) -> str | int | float | list[float | int | str] | None: + + return value + + def example_payload(self) -> None: + return None + + def example_value(self) -> None: + return None diff --git a/backend/modelscope_studio/components/antd/select/option/__init__.py b/backend/modelscope_studio/components/antd/select/option/__init__.py new file mode 100644 index 00000000..b33f4e07 --- /dev/null +++ b/backend/modelscope_studio/components/antd/select/option/__init__.py @@ -0,0 +1,63 @@ +from __future__ import annotations + +from typing import Any + +from .....utils.dev import ModelScopeLayoutComponent, resolve_frontend_dir + + +class AntdSelectOption(ModelScopeLayoutComponent): + """ + """ + + EVENTS = [] + + # supported slots + SLOTS = ['label', 'options'] + + def __init__( + self, + value: str | None = None, + label: str | None = None, + props: dict | None = None, + *, + title: str | None = None, + disabled: bool | None = None, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + super().__init__(visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.props = props + self.value = value + self.label = label + self.disabled = disabled + self.title = title + + FRONTEND_DIR = resolve_frontend_dir("select", "option") + + @property + def skip_api(self): + return True + + def preprocess(self, payload: None) -> None: + return payload + + def postprocess(self, value: None) -> None: + return value + + def example_payload(self) -> Any: + return None + + def example_value(self) -> Any: + return None diff --git a/backend/modelscope_studio/components/antd/skeleton/__init__.py b/backend/modelscope_studio/components/antd/skeleton/__init__.py new file mode 100644 index 00000000..62c4b87a --- /dev/null +++ b/backend/modelscope_studio/components/antd/skeleton/__init__.py @@ -0,0 +1,60 @@ +from __future__ import annotations + +from ....utils.dev import ModelScopeLayoutComponent, resolve_frontend_dir +from .avatar import AntdSkeletonAvatar +from .button import AntdSkeletonButton +from .image import AntdSkeletonImage +from .input import AntdSkeletonInput +from .node import AntdSkeletonNode + + +class AntdSkeleton(ModelScopeLayoutComponent): + """ + """ + Node = AntdSkeletonNode + Avatar = AntdSkeletonAvatar + Button = AntdSkeletonButton + Image = AntdSkeletonImage + Input = AntdSkeletonInput + EVENTS = [] + + def __init__( + self, + props: dict | None = None, + *, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + super().__init__(visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.props = props + + FRONTEND_DIR = resolve_frontend_dir("skeleton") + + @property + def skip_api(self): + return True + + def preprocess(self, payload: None) -> None: + return payload + + def postprocess(self, value: None) -> None: + + return value + + def example_payload(self) -> None: + return None + + def example_value(self) -> None: + return None diff --git a/backend/modelscope_studio/components/antd/skeleton/avatar/__init__.py b/backend/modelscope_studio/components/antd/skeleton/avatar/__init__.py new file mode 100644 index 00000000..28a138db --- /dev/null +++ b/backend/modelscope_studio/components/antd/skeleton/avatar/__init__.py @@ -0,0 +1,50 @@ +from __future__ import annotations + +from .....utils.dev import ModelScopeLayoutComponent, resolve_frontend_dir + + +class AntdSkeletonAvatar(ModelScopeLayoutComponent): + """ + """ + EVENTS = [] + + def __init__( + self, + props: dict | None = None, + *, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + super().__init__(visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.props = props + + FRONTEND_DIR = resolve_frontend_dir("skeleton", "avatar") + + @property + def skip_api(self): + return True + + def preprocess(self, payload: None) -> None: + return payload + + def postprocess(self, value: None) -> None: + + return value + + def example_payload(self) -> None: + return None + + def example_value(self) -> None: + return None diff --git a/backend/modelscope_studio/components/antd/skeleton/button/__init__.py b/backend/modelscope_studio/components/antd/skeleton/button/__init__.py new file mode 100644 index 00000000..e856eb83 --- /dev/null +++ b/backend/modelscope_studio/components/antd/skeleton/button/__init__.py @@ -0,0 +1,50 @@ +from __future__ import annotations + +from .....utils.dev import ModelScopeLayoutComponent, resolve_frontend_dir + + +class AntdSkeletonButton(ModelScopeLayoutComponent): + """ + """ + EVENTS = [] + + def __init__( + self, + props: dict | None = None, + *, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + super().__init__(visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.props = props + + FRONTEND_DIR = resolve_frontend_dir("skeleton", "button") + + @property + def skip_api(self): + return True + + def preprocess(self, payload: None) -> None: + return payload + + def postprocess(self, value: None) -> None: + + return value + + def example_payload(self) -> None: + return None + + def example_value(self) -> None: + return None diff --git a/backend/modelscope_studio/components/antd/skeleton/image/__init__.py b/backend/modelscope_studio/components/antd/skeleton/image/__init__.py new file mode 100644 index 00000000..54f53572 --- /dev/null +++ b/backend/modelscope_studio/components/antd/skeleton/image/__init__.py @@ -0,0 +1,50 @@ +from __future__ import annotations + +from .....utils.dev import ModelScopeLayoutComponent, resolve_frontend_dir + + +class AntdSkeletonImage(ModelScopeLayoutComponent): + """ + """ + EVENTS = [] + + def __init__( + self, + props: dict | None = None, + *, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + super().__init__(visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.props = props + + FRONTEND_DIR = resolve_frontend_dir("skeleton", "image") + + @property + def skip_api(self): + return True + + def preprocess(self, payload: None) -> None: + return payload + + def postprocess(self, value: None) -> None: + + return value + + def example_payload(self) -> None: + return None + + def example_value(self) -> None: + return None diff --git a/backend/modelscope_studio/components/antd/skeleton/input/__init__.py b/backend/modelscope_studio/components/antd/skeleton/input/__init__.py new file mode 100644 index 00000000..a6cf6df0 --- /dev/null +++ b/backend/modelscope_studio/components/antd/skeleton/input/__init__.py @@ -0,0 +1,50 @@ +from __future__ import annotations + +from .....utils.dev import ModelScopeLayoutComponent, resolve_frontend_dir + + +class AntdSkeletonInput(ModelScopeLayoutComponent): + """ + """ + EVENTS = [] + + def __init__( + self, + props: dict | None = None, + *, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + super().__init__(visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.props = props + + FRONTEND_DIR = resolve_frontend_dir("skeleton", "input") + + @property + def skip_api(self): + return True + + def preprocess(self, payload: None) -> None: + return payload + + def postprocess(self, value: None) -> None: + + return value + + def example_payload(self) -> None: + return None + + def example_value(self) -> None: + return None diff --git a/backend/modelscope_studio/components/antd/skeleton/node/__init__.py b/backend/modelscope_studio/components/antd/skeleton/node/__init__.py new file mode 100644 index 00000000..d1f7ee13 --- /dev/null +++ b/backend/modelscope_studio/components/antd/skeleton/node/__init__.py @@ -0,0 +1,50 @@ +from __future__ import annotations + +from .....utils.dev import ModelScopeLayoutComponent, resolve_frontend_dir + + +class AntdSkeletonNode(ModelScopeLayoutComponent): + """ + """ + EVENTS = [] + + def __init__( + self, + props: dict | None = None, + *, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + super().__init__(visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.props = props + + FRONTEND_DIR = resolve_frontend_dir("skeleton", "node") + + @property + def skip_api(self): + return True + + def preprocess(self, payload: None) -> None: + return payload + + def postprocess(self, value: None) -> None: + + return value + + def example_payload(self) -> None: + return None + + def example_value(self) -> None: + return None diff --git a/backend/modelscope_studio/components/antd/slider/__init__.py b/backend/modelscope_studio/components/antd/slider/__init__.py new file mode 100644 index 00000000..2a118402 --- /dev/null +++ b/backend/modelscope_studio/components/antd/slider/__init__.py @@ -0,0 +1,89 @@ +from __future__ import annotations + +from typing import Any + +from gradio.events import EventListener + +from ....utils.dev import ModelScopeDataLayoutComponent, resolve_frontend_dir +from .mark import AntdSliderMark + + +# as inputs, outputs +class AntdSlider(ModelScopeDataLayoutComponent): + """ + """ + Mark = AntdSliderMark + + EVENTS = [ + EventListener("change", + callback=lambda block: block._internal.update( + bind_change_event=True)), + EventListener("change_complete", + callback=lambda block: block._internal.update( + bind_changeComplete_event=True)), + ] + + # supported slots + SLOTS = ['marks'] + + def __init__( + self, + value: int | float | tuple[int | float, int | float] | None = None, + props: dict | None = None, + *, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + super().__init__(value=value, + visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.props = props + + FRONTEND_DIR = resolve_frontend_dir("slider") + + @property + def skip_api(self): + return False + + def api_info(self) -> dict[str, Any]: + return { + "anyOf": [ + { + "type": "number", + }, + { + "type": "array", + "items": { + "type": "number", + }, + }, + ] + } + + def preprocess( + self, payload: int | float | tuple[int | float, int | float] | None + ) -> int | float | tuple[int | float, int | float] | None: + return payload + + def postprocess( + self, value: int | float | tuple[int | float, int | float] | None + ) -> int | float | tuple[int | float, int | float] | None: + + return value + + def example_payload(self) -> None: + return None + + def example_value(self) -> None: + return None diff --git a/backend/modelscope_studio/components/antd/slider/mark/__init__.py b/backend/modelscope_studio/components/antd/slider/mark/__init__.py new file mode 100644 index 00000000..106a6e49 --- /dev/null +++ b/backend/modelscope_studio/components/antd/slider/mark/__init__.py @@ -0,0 +1,65 @@ +from __future__ import annotations + +from typing import Any + +from .....utils.dev import ModelScopeLayoutComponent, resolve_frontend_dir + + +class AntdSliderMark(ModelScopeLayoutComponent): + """ + """ + + EVENTS = [] + + # supported slots + SLOTS = [ + 'label', + ] + + def __init__( + self, + number: float | int | None = None, + label: str | None = None, + props: dict | None = None, + *, + title: str | None = None, + disabled: bool | None = None, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + super().__init__(visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.props = props + self.number = number + self.label = label + self.disabled = disabled + self.title = title + + FRONTEND_DIR = resolve_frontend_dir("slider", "mark") + + @property + def skip_api(self): + return True + + def preprocess(self, payload: None) -> None: + return payload + + def postprocess(self, value: None) -> None: + return value + + def example_payload(self) -> Any: + return None + + def example_value(self) -> Any: + return None diff --git a/backend/modelscope_studio/components/antd/space/__init__.py b/backend/modelscope_studio/components/antd/space/__init__.py new file mode 100644 index 00000000..1e05cc8d --- /dev/null +++ b/backend/modelscope_studio/components/antd/space/__init__.py @@ -0,0 +1,56 @@ +from __future__ import annotations + +from ....utils.dev import ModelScopeLayoutComponent, resolve_frontend_dir +from .compact import AntdSpaceCompact + + +class AntdSpace(ModelScopeLayoutComponent): + """ + """ + Compact = AntdSpaceCompact + + EVENTS = [] + + # supported slots + SLOTS = ['split'] + + def __init__( + self, + props: dict | None = None, + *, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + super().__init__(visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.props = props + + FRONTEND_DIR = resolve_frontend_dir("space") + + @property + def skip_api(self): + return True + + def preprocess(self, payload: None) -> None: + return payload + + def postprocess(self, value: None) -> None: + + return value + + def example_payload(self) -> None: + return None + + def example_value(self) -> None: + return None diff --git a/backend/modelscope_studio/components/antd/space/compact/__init__.py b/backend/modelscope_studio/components/antd/space/compact/__init__.py new file mode 100644 index 00000000..4610fe6e --- /dev/null +++ b/backend/modelscope_studio/components/antd/space/compact/__init__.py @@ -0,0 +1,49 @@ +from __future__ import annotations + +from .....utils.dev import ModelScopeLayoutComponent, resolve_frontend_dir + + +class AntdSpaceCompact(ModelScopeLayoutComponent): + """ + """ + EVENTS = [] + + def __init__( + self, + props: dict | None = None, + *, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + super().__init__(visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.props = props + + FRONTEND_DIR = resolve_frontend_dir("space", "compact") + + @property + def skip_api(self): + return True + + def preprocess(self, payload: None) -> None: + return payload + + def postprocess(self, value: None) -> None: + return value + + def example_payload(self) -> None: + return None + + def example_value(self) -> None: + return None diff --git a/backend/modelscope_studio/components/antd/spin/__init__.py b/backend/modelscope_studio/components/antd/spin/__init__.py new file mode 100644 index 00000000..0fe9695c --- /dev/null +++ b/backend/modelscope_studio/components/antd/spin/__init__.py @@ -0,0 +1,53 @@ +from __future__ import annotations + +from ....utils.dev import ModelScopeLayoutComponent, resolve_frontend_dir + + +class AntdSpin(ModelScopeLayoutComponent): + """ + """ + EVENTS = [] + + # supported slots + SLOTS = ['tip', 'indicator'] + + def __init__( + self, + props: dict | None = None, + *, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + super().__init__(visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.props = props + + FRONTEND_DIR = resolve_frontend_dir("spin") + + @property + def skip_api(self): + return True + + def preprocess(self, payload: None) -> None: + return payload + + def postprocess(self, value: None) -> None: + + return value + + def example_payload(self) -> None: + return None + + def example_value(self) -> None: + return None diff --git a/backend/modelscope_studio/components/antd/statistic/__init__.py b/backend/modelscope_studio/components/antd/statistic/__init__.py new file mode 100644 index 00000000..79b74743 --- /dev/null +++ b/backend/modelscope_studio/components/antd/statistic/__init__.py @@ -0,0 +1,58 @@ +from __future__ import annotations + +from ....utils.dev import ModelScopeLayoutComponent, resolve_frontend_dir +from .countdown import AntdStatisticCountdown + + +class AntdStatistic(ModelScopeLayoutComponent): + """ + """ + Countdown = AntdStatisticCountdown + + EVENTS = [] + + # supported slots + SLOTS = ['prefix', 'suffix', 'title'] + + def __init__( + self, + value: int | float | str | None = None, + props: dict | None = None, + *, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + super().__init__(visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.value = value + self.props = props + + FRONTEND_DIR = resolve_frontend_dir("statistic") + + @property + def skip_api(self): + return True + + def preprocess(self, payload: None) -> None: + return payload + + def postprocess(self, value: None) -> None: + + return value + + def example_payload(self) -> None: + return None + + def example_value(self) -> None: + return None diff --git a/backend/modelscope_studio/components/antd/statistic/countdown/__init__.py b/backend/modelscope_studio/components/antd/statistic/countdown/__init__.py new file mode 100644 index 00000000..3483c15c --- /dev/null +++ b/backend/modelscope_studio/components/antd/statistic/countdown/__init__.py @@ -0,0 +1,66 @@ +from __future__ import annotations + +from typing import Any + +from gradio.events import EventListener + +from .....utils.dev import ModelScopeLayoutComponent, resolve_frontend_dir + + +class AntdStatisticCountdown(ModelScopeLayoutComponent): + """ + """ + + EVENTS = [ + EventListener("finish", + callback=lambda block: block._internal.update( + bind_finish_event=True)), + EventListener("change", + callback=lambda block: block._internal.update( + bind_change_event=True)), + ] + + # supported slots + SLOTS = ['prefix', 'suffix', 'title'] + + def __init__( + self, + value: int | float | None = None, + props: dict | None = None, + *, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + super().__init__(visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.props = props + self.value = value + + FRONTEND_DIR = resolve_frontend_dir("statistic", "countdown") + + @property + def skip_api(self): + return True + + def preprocess(self, payload: str) -> str: + return payload + + def postprocess(self, value: str) -> str: + return value + + def example_payload(self) -> Any: + return None + + def example_value(self) -> Any: + return None diff --git a/backend/modelscope_studio/components/antd/steps/__init__.py b/backend/modelscope_studio/components/antd/steps/__init__.py new file mode 100644 index 00000000..92b0c7f7 --- /dev/null +++ b/backend/modelscope_studio/components/antd/steps/__init__.py @@ -0,0 +1,61 @@ +from __future__ import annotations + +from gradio.events import EventListener + +from ....utils.dev import ModelScopeLayoutComponent, resolve_frontend_dir +from .item import AntdStepsItem + + +class AntdSteps(ModelScopeLayoutComponent): + """ + """ + Item = AntdStepsItem + EVENTS = [ + EventListener("change", + callback=lambda block: block._internal.update( + bind_change_event=True)), + ] + + # supported slots + SLOTS = ['progressDot', "items"] + + def __init__( + self, + props: dict | None = None, + *, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + super().__init__(visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.props = props + + FRONTEND_DIR = resolve_frontend_dir("steps") + + @property + def skip_api(self): + return True + + def preprocess(self, payload: None) -> None: + return payload + + def postprocess(self, value: None) -> None: + + return value + + def example_payload(self) -> None: + return None + + def example_value(self) -> None: + return None diff --git a/backend/modelscope_studio/components/antd/steps/item/__init__.py b/backend/modelscope_studio/components/antd/steps/item/__init__.py new file mode 100644 index 00000000..e23efeb8 --- /dev/null +++ b/backend/modelscope_studio/components/antd/steps/item/__init__.py @@ -0,0 +1,53 @@ +from __future__ import annotations + +from .....utils.dev import ModelScopeLayoutComponent, resolve_frontend_dir + + +class AntdStepsItem(ModelScopeLayoutComponent): + """ + """ + EVENTS = [] + + # supported slots + SLOTS = ['description', "icon", "subTitle", "title"] + + def __init__( + self, + props: dict | None = None, + *, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + super().__init__(visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.props = props + + FRONTEND_DIR = resolve_frontend_dir("steps", "item") + + @property + def skip_api(self): + return True + + def preprocess(self, payload: None) -> None: + return payload + + def postprocess(self, value: None) -> None: + + return value + + def example_payload(self) -> None: + return None + + def example_value(self) -> None: + return None diff --git a/backend/modelscope_studio/components/antd/switch/__init__.py b/backend/modelscope_studio/components/antd/switch/__init__.py new file mode 100644 index 00000000..6cbd922f --- /dev/null +++ b/backend/modelscope_studio/components/antd/switch/__init__.py @@ -0,0 +1,71 @@ +from __future__ import annotations + +from typing import Any + +from gradio.events import EventListener + +from ....utils.dev import ModelScopeDataLayoutComponent, resolve_frontend_dir + + +# as inputs, outputs +class AntdSwitch(ModelScopeDataLayoutComponent): + """ + """ + + EVENTS = [ + EventListener("change", + callback=lambda block: block._internal.update( + bind_change_event=True)), + EventListener("click", + callback=lambda block: block._internal.update( + bind_click_event=True)), + ] + + # supported slots + SLOTS = ['checkedChildren', 'unCheckedChildren'] + + def __init__( + self, + value: bool | None = False, + props: dict | None = None, + *, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + super().__init__(value=value, + visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.props = props + + FRONTEND_DIR = resolve_frontend_dir("switch") + + @property + def skip_api(self): + return False + + def api_info(self) -> dict[str, Any]: + return {"type": "boolean"} + + def preprocess(self, payload: None | str) -> None | bool: + return payload + + def postprocess(self, value: None | bool) -> None | bool: + + return value + + def example_payload(self) -> None: + return None + + def example_value(self) -> None: + return None diff --git a/backend/modelscope_studio/components/antd/table/__init__.py b/backend/modelscope_studio/components/antd/table/__init__.py new file mode 100644 index 00000000..a712b9ef --- /dev/null +++ b/backend/modelscope_studio/components/antd/table/__init__.py @@ -0,0 +1,91 @@ +from __future__ import annotations + +from gradio.events import EventListener + +from ....utils.dev import ModelScopeLayoutComponent, resolve_frontend_dir +from .column import AntdTableColumn +from .column_group import AntdTableColumnGroup +from .constants import (EXPAND_COLUMN, SELECTION_ALL, SELECTION_COLUMN, + SELECTION_INVERT, SELECTION_NONE) +from .expandable import AntdTableExpandable +from .row_selection import AntdTableRowSelection + + +class AntdTable(ModelScopeLayoutComponent): + """ + """ + Column = AntdTableColumn + ColumnGroup = AntdTableColumnGroup + Expandable = AntdTableExpandable + RowSelection = AntdTableRowSelection + + # constants + EXPAND_COLUMN = EXPAND_COLUMN + SELECTION_ALL = SELECTION_ALL + SELECTION_COLUMN = SELECTION_COLUMN + SELECTION_INVERT = SELECTION_INVERT + SELECTION_NONE = SELECTION_NONE + + EVENTS = [ + EventListener("change", + callback=lambda block: block._internal.update( + bind_change_event=True)), + EventListener("scroll", + callback=lambda block: block._internal.update( + bind_scroll_event=True)), + ] + + # supported slots + SLOTS = [ + 'footer', + 'title', + "expandable", + "rowSelection" + 'loading.tip', + 'loading.indicator', + 'pagination.showQuickJumper.goButton', + 'showSorterTooltip.title', + ] + + def __init__( + self, + data_source: list[dict] | None = None, + props: dict | None = None, + *, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + super().__init__(visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.props = props + self.data_source = data_source + + FRONTEND_DIR = resolve_frontend_dir("table") + + @property + def skip_api(self): + return True + + def preprocess(self, payload: None) -> None: + return payload + + def postprocess(self, value: None) -> None: + + return value + + def example_payload(self) -> None: + return None + + def example_value(self) -> None: + return None diff --git a/backend/modelscope_studio/components/antd/table/column/__init__.py b/backend/modelscope_studio/components/antd/table/column/__init__.py new file mode 100644 index 00000000..2ee06604 --- /dev/null +++ b/backend/modelscope_studio/components/antd/table/column/__init__.py @@ -0,0 +1,64 @@ +from __future__ import annotations + +from gradio.events import EventListener + +from .....utils.dev import ModelScopeLayoutComponent, resolve_frontend_dir + + +class AntdTableColumn(ModelScopeLayoutComponent): + """ + """ + EVENTS = [ + EventListener("filter_dropdown_open_change", + callback=lambda block: block._internal.update( + bind_filterDropdownOpenChange_event=True)), + ] + + # supported slots + SLOTS = [ + 'filterDropdown', 'filterIcon', 'title', 'sortIcon', + 'showSorterTooltip.title' + ] + + def __init__( + self, + props: dict | None = None, + built_in_column: str | None = None, + *, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + super().__init__(visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.props = props + self.built_in_column = built_in_column + + FRONTEND_DIR = resolve_frontend_dir("table", "column") + + @property + def skip_api(self): + return True + + def preprocess(self, payload: None) -> None: + return payload + + def postprocess(self, value: None) -> None: + + return value + + def example_payload(self) -> None: + return None + + def example_value(self) -> None: + return None diff --git a/backend/modelscope_studio/components/antd/table/column_group/__init__.py b/backend/modelscope_studio/components/antd/table/column_group/__init__.py new file mode 100644 index 00000000..eef3cb13 --- /dev/null +++ b/backend/modelscope_studio/components/antd/table/column_group/__init__.py @@ -0,0 +1,57 @@ +from __future__ import annotations + +from .....utils.dev import ModelScopeLayoutComponent, resolve_frontend_dir + + +class AntdTableColumnGroup(ModelScopeLayoutComponent): + """ + """ + EVENTS = [] + + # supported slots + SLOTS = [ + 'title', + ] + + def __init__( + self, + title: str | None = None, + props: dict | None = None, + *, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + super().__init__(visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.props = props + self.title = title + + FRONTEND_DIR = resolve_frontend_dir("table", "column-group") + + @property + def skip_api(self): + return True + + def preprocess(self, payload: None) -> None: + return payload + + def postprocess(self, value: None) -> None: + + return value + + def example_payload(self) -> None: + return None + + def example_value(self) -> None: + return None diff --git a/backend/modelscope_studio/components/antd/table/constants.py b/backend/modelscope_studio/components/antd/table/constants.py new file mode 100644 index 00000000..44227dcd --- /dev/null +++ b/backend/modelscope_studio/components/antd/table/constants.py @@ -0,0 +1,5 @@ +EXPAND_COLUMN = "EXPAND_COLUMN" +SELECTION_COLUMN = "SELECTION_COLUMN" +SELECTION_ALL = "SELECT_ALL" +SELECTION_INVERT = "SELECT_INVERT" +SELECTION_NONE = "SELECT_NONE" diff --git a/backend/modelscope_studio/components/antd/table/expandable/__init__.py b/backend/modelscope_studio/components/antd/table/expandable/__init__.py new file mode 100644 index 00000000..7a10ecca --- /dev/null +++ b/backend/modelscope_studio/components/antd/table/expandable/__init__.py @@ -0,0 +1,73 @@ +from __future__ import annotations + +from typing import Any + +from gradio.events import EventListener + +from .....utils.dev import ModelScopeDataLayoutComponent, resolve_frontend_dir + + +# as inputs, outputs +class AntdTableExpandable(ModelScopeDataLayoutComponent): + """ + """ + EVENTS = [ + EventListener("expand", + callback=lambda block: block._internal.update( + bind_expand_event=True)), + EventListener("expanded_rows_change", + callback=lambda block: block._internal.update( + bind_expandedRowsChange_event=True)), + ] + + # supported slots + SLOTS = [ + 'columnTitle', + 'expandIcon', + ] + + def __init__( + self, + value: list[str] | None = None, + props: dict | None = None, + *, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + super().__init__(value=value, + visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.props = props + + FRONTEND_DIR = resolve_frontend_dir("table", "expandable") + + @property + def skip_api(self): + return False + + def api_info(self) -> dict[str, Any]: + return {"type": "array", "items": {"type": "string"}} + + def preprocess(self, payload: list[str] | None) -> list[str] | None: + return payload + + def postprocess(self, value: list[str] | None) -> list[str] | None: + + return value + + def example_payload(self) -> None: + return None + + def example_value(self) -> None: + return None diff --git a/backend/modelscope_studio/components/antd/table/row_selection/__init__.py b/backend/modelscope_studio/components/antd/table/row_selection/__init__.py new file mode 100644 index 00000000..64746137 --- /dev/null +++ b/backend/modelscope_studio/components/antd/table/row_selection/__init__.py @@ -0,0 +1,104 @@ +from __future__ import annotations + +from typing import Any + +from gradio.events import EventListener + +from .....utils.dev import ModelScopeDataLayoutComponent, resolve_frontend_dir +from .selection import AntdTableRowSelectionSelection + + +# as inputs, outputs +class AntdTableRowSelection(ModelScopeDataLayoutComponent): + """ + """ + Selection = AntdTableRowSelectionSelection + + EVENTS = [ + EventListener("change", + callback=lambda block: block._internal.update( + bind_change_event=True)), + EventListener("select", + callback=lambda block: block._internal.update( + bind_select_event=True)), + EventListener("select_all", + callback=lambda block: block._internal.update( + bind_selectAll_event=True)), + EventListener("select_invert", + callback=lambda block: block._internal.update( + bind_selectInvert_event=True)), + EventListener("select_none", + callback=lambda block: block._internal.update( + bind_selectNone_event=True)), + EventListener("select_multiple", + callback=lambda block: block._internal.update( + bind_selectMultiple_event=True)), + ] + + # supported slots + SLOTS = [ + 'columnTitle', + 'selections', + ] + + def __init__( + self, + value: list[str] | list[int | float] | None = None, + props: dict | None = None, + *, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + super().__init__(value=value, + visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.props = props + + FRONTEND_DIR = resolve_frontend_dir("table", "row-selection") + + @property + def skip_api(self): + return False + + def api_info(self) -> dict[str, Any]: + return { + "anyOf": [{ + "type": "array", + "items": { + "type": "string" + } + }, { + "type": "array", + "items": { + "type": "number" + } + }] + } + + def preprocess( + self, payload: list[str] | list[int | float] | None + ) -> list[str] | list[int | float] | None: + return payload + + def postprocess( + self, value: list[str] | list[int | float] | None + ) -> list[str] | list[int | float] | None: + + return value + + def example_payload(self) -> None: + return None + + def example_value(self) -> None: + return None diff --git a/backend/modelscope_studio/components/antd/table/row_selection/selection/__init__.py b/backend/modelscope_studio/components/antd/table/row_selection/selection/__init__.py new file mode 100644 index 00000000..279cf4df --- /dev/null +++ b/backend/modelscope_studio/components/antd/table/row_selection/selection/__init__.py @@ -0,0 +1,69 @@ +from __future__ import annotations + +from typing import Literal + +from gradio.events import EventListener + +from ......utils.dev import ModelScopeLayoutComponent, resolve_frontend_dir + + +class AntdTableRowSelectionSelection(ModelScopeLayoutComponent): + """ + """ + EVENTS = [ + EventListener("select", + callback=lambda block: block._internal.update( + bind_select_event=True)), + ] + + # supported slots + SLOTS = [ + 'text', + ] + + def __init__( + self, + text: str | None = None, + built_in_selection: Literal["SELECT_ALL", "SELECT_INVERT", + "SELECT_NONE"] | None = None, + props: dict | None = None, + *, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + super().__init__(visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.props = props + self.text = text + self.built_in_selection = built_in_selection + + FRONTEND_DIR = resolve_frontend_dir("table", + ["row-selection", 'selection']) + + @property + def skip_api(self): + return True + + def preprocess(self, payload: None) -> None: + return payload + + def postprocess(self, value: None) -> None: + + return value + + def example_payload(self) -> None: + return None + + def example_value(self) -> None: + return None diff --git a/backend/modelscope_studio/components/antd/tabs/__init__.py b/backend/modelscope_studio/components/antd/tabs/__init__.py new file mode 100644 index 00000000..b0cc1b4a --- /dev/null +++ b/backend/modelscope_studio/components/antd/tabs/__init__.py @@ -0,0 +1,82 @@ +from __future__ import annotations + +from typing import Any + +from gradio.events import EventListener + +from ....utils.dev import ModelScopeDataLayoutComponent, resolve_frontend_dir +from .item import AntdTabsItem + + +# as inputs, outputs +class AntdTabs(ModelScopeDataLayoutComponent): + """ + """ + Item = AntdTabsItem + EVENTS = [ + EventListener("change", + callback=lambda block: block._internal.update( + bind_change_event=True)), + EventListener("edit", + callback=lambda block: block._internal.update( + bind_edit_event=True)), + EventListener("tab_click", + callback=lambda block: block._internal.update( + bind_tabClick_event=True)), + EventListener("tab_scroll", + callback=lambda block: block._internal.update( + bind_tabScroll_event=True)), + ] + + # supported slots + SLOTS = [ + 'addIcon', 'removeIcon', 'tabBarExtraContent', + 'tabBarExtraContent.left', 'tabBarExtraContent.right', 'more.icon', + 'items' + ] + + def __init__( + self, + value: str | None = None, + props: dict | None = None, + *, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + super().__init__(value=value, + visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.props = props + + FRONTEND_DIR = resolve_frontend_dir("tabs") + + @property + def skip_api(self): + return False + + def api_info(self) -> dict[str, Any]: + return {"type": "string"} + + def preprocess(self, payload: str | None) -> str | None: + return payload + + def postprocess(self, value: str | None) -> str | None: + + return value + + def example_payload(self) -> None: + return None + + def example_value(self) -> None: + return None diff --git a/backend/modelscope_studio/components/antd/tabs/item/__init__.py b/backend/modelscope_studio/components/antd/tabs/item/__init__.py new file mode 100644 index 00000000..918440db --- /dev/null +++ b/backend/modelscope_studio/components/antd/tabs/item/__init__.py @@ -0,0 +1,53 @@ +from __future__ import annotations + +from .....utils.dev import ModelScopeLayoutComponent, resolve_frontend_dir + + +class AntdTabsItem(ModelScopeLayoutComponent): + """ + """ + EVENTS = [] + + # supported slots + SLOTS = ['closeIcon', "icon", "label", "children"] + + def __init__( + self, + props: dict | None = None, + *, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + super().__init__(visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.props = props + + FRONTEND_DIR = resolve_frontend_dir("tabs", "item") + + @property + def skip_api(self): + return True + + def preprocess(self, payload: None) -> None: + return payload + + def postprocess(self, value: None) -> None: + + return value + + def example_payload(self) -> None: + return None + + def example_value(self) -> None: + return None diff --git a/backend/modelscope_studio/components/antd/tag/__init__.py b/backend/modelscope_studio/components/antd/tag/__init__.py new file mode 100644 index 00000000..49798cc0 --- /dev/null +++ b/backend/modelscope_studio/components/antd/tag/__init__.py @@ -0,0 +1,66 @@ +from __future__ import annotations + +from typing import Any + +from gradio.events import EventListener + +from ....utils.dev import ModelScopeLayoutComponent, resolve_frontend_dir +from .checkable_tag import AntdTagCheckableTag + + +class AntdTag(ModelScopeLayoutComponent): + """ + """ + CheckableTag = AntdTagCheckableTag + + EVENTS = [ + EventListener("close", + callback=lambda block: block._internal.update( + bind_close_event=True)) + ] + + # supported slots + SLOTS = ['icon', 'closeIcon'] + + def __init__( + self, + value: str | None = "", + props: dict | None = None, + *, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + super().__init__(visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.value = value + self.props = props + + FRONTEND_DIR = resolve_frontend_dir("tag") + + @property + def skip_api(self): + return True + + def preprocess(self, payload: str | None) -> str | None: + return payload + + def postprocess(self, value: str | None) -> str | None: + + return str(value) + + def example_payload(self) -> Any: + return "Tag" + + def example_value(self) -> Any: + return "Tag" diff --git a/backend/modelscope_studio/components/antd/tag/checkable_tag/__init__.py b/backend/modelscope_studio/components/antd/tag/checkable_tag/__init__.py new file mode 100644 index 00000000..ec7bf516 --- /dev/null +++ b/backend/modelscope_studio/components/antd/tag/checkable_tag/__init__.py @@ -0,0 +1,69 @@ +from __future__ import annotations + +from typing import Any + +from gradio.events import EventListener + +from .....utils.dev import ModelScopeDataLayoutComponent, resolve_frontend_dir + + +# as inputs, outputs +class AntdTagCheckableTag(ModelScopeDataLayoutComponent): + """ + """ + + EVENTS = [ + EventListener("change", + callback=lambda block: block._internal.update( + bind_change_event=True)) + ] + + def __init__( + self, + label: str | None = None, + value: bool | None = False, + props: dict | None = None, + *, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + super().__init__(value=value, + visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.props = props + self.label = label + + FRONTEND_DIR = resolve_frontend_dir("tag", 'checkable-tag') + + @property + def skip_api(self): + return False + + def api_info(self) -> dict[str, Any]: + return { + "type": "boolean", + } + + def preprocess(self, payload: bool | None) -> bool | None: + return payload + + def postprocess(self, value: bool | None) -> bool | None: + + return value + + def example_payload(self) -> Any: + return None + + def example_value(self) -> Any: + return None diff --git a/backend/modelscope_studio/components/antd/time_picker/__init__.py b/backend/modelscope_studio/components/antd/time_picker/__init__.py new file mode 100644 index 00000000..493b3f0b --- /dev/null +++ b/backend/modelscope_studio/components/antd/time_picker/__init__.py @@ -0,0 +1,83 @@ +from __future__ import annotations + +from typing import Any + +from gradio.events import EventListener + +from ....utils.dev import ModelScopeDataLayoutComponent, resolve_frontend_dir +from .range_picker import AntdTimePickerRangePicker + + +# as inputs, outputs +class AntdTimePicker(ModelScopeDataLayoutComponent): + """ + """ + RangePicker = AntdTimePickerRangePicker + + EVENTS = [ + EventListener("change", + callback=lambda block: block._internal.update( + bind_change_event=True)), + EventListener("open_change", + callback=lambda block: block._internal.update( + bind_openChange_event=True)), + EventListener("calendar_change", + callback=lambda block: block._internal.update( + bind_calendarChange_event=True)), + ] + + # supported slots + SLOTS = [ + 'allowClear.clearIcon', + 'prevIcon', + 'nextIcon', + 'suffixIcon', + 'superNextIcon', + 'superPrevIcon', + 'renderExtraFooter', + ] + + def __init__( + self, + value: str | int | float | None = None, + props: dict | None = None, + *, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + super().__init__(value=value, + visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.props = props + + FRONTEND_DIR = resolve_frontend_dir("time-picker") + + @property + def skip_api(self): + return False + + def api_info(self) -> dict[str, Any]: + return {"anyOf": [{"type": "number"}, {"type": "string"}]} + + def preprocess(self, payload: int | float) -> int | float: + return payload + + def postprocess(self, value: int | float | str) -> int | str: + return value + + def example_payload(self) -> None: + return None + + def example_value(self) -> None: + return None diff --git a/backend/modelscope_studio/components/antd/time_picker/range_picker/__init__.py b/backend/modelscope_studio/components/antd/time_picker/range_picker/__init__.py new file mode 100644 index 00000000..c63f36fd --- /dev/null +++ b/backend/modelscope_studio/components/antd/time_picker/range_picker/__init__.py @@ -0,0 +1,98 @@ +from __future__ import annotations + +from typing import Any + +from gradio.events import EventListener + +from .....utils.dev import ModelScopeDataLayoutComponent, resolve_frontend_dir + + +# as inputs, outputs +class AntdTimePickerRangePicker(ModelScopeDataLayoutComponent): + """ + """ + + EVENTS = [ + EventListener("change", + callback=lambda block: block._internal.update( + bind_change_event=True)), + EventListener( + "calendar_change", + callback=lambda block: block._internal.update(bind_ok_event=True)), + EventListener("focus", + callback=lambda block: block._internal.update( + bind_calendarChange_event=True)), + EventListener("blur", + callback=lambda block: block._internal.update( + bind_blur_event=True)), + ] + + # supported slots + SLOTS = [ + 'allowClear.clearIcon', + 'prevIcon', + 'nextIcon', + 'suffixIcon', + 'superNextIcon', + 'superPrevIcon', + 'renderExtraFooter', + 'separator', + ] + + def __init__( + self, + value: tuple[str | int | float, str | int | float] | None = None, + props: dict | None = None, + *, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + super().__init__(value=value, + visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.props = props + + FRONTEND_DIR = resolve_frontend_dir("time-picker", 'range-picker') + + @property + def skip_api(self): + return False + + def api_info(self) -> dict[str, Any]: + return { + "type": "array", + "items": { + "anyOf": [{ + "type": "number" + }, { + "type": "string" + }] + } + } + + def preprocess( + self, payload: tuple[str | int | float, str | int | float] + ) -> tuple[str | int | float, str | int | float]: + return payload + + def postprocess( + self, value: tuple[str | int | float, str | int | float] + ) -> tuple[str | int | float, str | int | float]: + return value + + def example_payload(self) -> None: + return None + + def example_value(self) -> None: + return None diff --git a/backend/modelscope_studio/components/antd/timeline/__init__.py b/backend/modelscope_studio/components/antd/timeline/__init__.py new file mode 100644 index 00000000..053d9087 --- /dev/null +++ b/backend/modelscope_studio/components/antd/timeline/__init__.py @@ -0,0 +1,55 @@ +from __future__ import annotations + +from ....utils.dev import ModelScopeLayoutComponent, resolve_frontend_dir +from .item import AntdTimelineItem + + +class AntdTimeline(ModelScopeLayoutComponent): + """ + """ + Item = AntdTimelineItem + EVENTS = [] + + # supported slots + SLOTS = ['pending', 'pendingDot'] + + def __init__( + self, + props: dict | None = None, + *, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + super().__init__(visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.props = props + + FRONTEND_DIR = resolve_frontend_dir("timeline") + + @property + def skip_api(self): + return True + + def preprocess(self, payload: None) -> None: + return payload + + def postprocess(self, value: None) -> None: + + return value + + def example_payload(self) -> None: + return None + + def example_value(self) -> None: + return None diff --git a/backend/modelscope_studio/components/antd/timeline/item/__init__.py b/backend/modelscope_studio/components/antd/timeline/item/__init__.py new file mode 100644 index 00000000..e4026359 --- /dev/null +++ b/backend/modelscope_studio/components/antd/timeline/item/__init__.py @@ -0,0 +1,53 @@ +from __future__ import annotations + +from .....utils.dev import ModelScopeLayoutComponent, resolve_frontend_dir + + +class AntdTimelineItem(ModelScopeLayoutComponent): + """ + """ + EVENTS = [] + + # supported slots + SLOTS = ['dot', "label", "children"] + + def __init__( + self, + props: dict | None = None, + *, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + super().__init__(visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.props = props + + FRONTEND_DIR = resolve_frontend_dir("timeline", "item") + + @property + def skip_api(self): + return True + + def preprocess(self, payload: None) -> None: + return payload + + def postprocess(self, value: None) -> None: + + return value + + def example_payload(self) -> None: + return None + + def example_value(self) -> None: + return None diff --git a/backend/modelscope_studio/components/antd/tooltip/__init__.py b/backend/modelscope_studio/components/antd/tooltip/__init__.py new file mode 100644 index 00000000..ad249ab9 --- /dev/null +++ b/backend/modelscope_studio/components/antd/tooltip/__init__.py @@ -0,0 +1,61 @@ +from __future__ import annotations + +from gradio.events import EventListener + +from ....utils.dev import ModelScopeLayoutComponent, resolve_frontend_dir + + +class AntdTooltip(ModelScopeLayoutComponent): + """ + """ + EVENTS = [ + EventListener("open_change", + callback=lambda block: block._internal.update( + bind_openChange_event=True)) + ] + + # supported slots + SLOTS = ['title'] + + def __init__( + self, + title: str | None = "", + props: dict | None = None, + *, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + super().__init__(visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.title = title + self.props = props + + FRONTEND_DIR = resolve_frontend_dir("tooltip") + + @property + def skip_api(self): + return True + + def preprocess(self, payload: str | None) -> str | None: + return payload + + def postprocess(self, value: str | None) -> str | None: + + return str(value) + + def example_payload(self) -> str: + return "Tooltip" + + def example_value(self) -> str: + return "Tooltip" diff --git a/backend/modelscope_studio/components/antd/tour/__init__.py b/backend/modelscope_studio/components/antd/tour/__init__.py new file mode 100644 index 00000000..0cc23d55 --- /dev/null +++ b/backend/modelscope_studio/components/antd/tour/__init__.py @@ -0,0 +1,77 @@ +from __future__ import annotations + +from typing import Any + +from gradio.events import EventListener + +from ....utils.dev import ModelScopeDataLayoutComponent, resolve_frontend_dir +from .step import AntdTourStep + + +# as inputs, outputs +class AntdTour(ModelScopeDataLayoutComponent): + """ + """ + Step = AntdTourStep + EVENTS = [ + EventListener("change", + callback=lambda block: block._internal.update( + bind_change_event=True)), + EventListener("close", + callback=lambda block: block._internal.update( + bind_close_event=True)), + EventListener("finish", + callback=lambda block: block._internal.update( + bind_finish_event=True)), + ] + + # supported slots + SLOTS = ['closeIcon'] + + def __init__( + self, + value: int | None = None, + props: dict | None = None, + *, + open: bool | None = None, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + super().__init__(value=value, + visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.props = props + self.open = open + + FRONTEND_DIR = resolve_frontend_dir("tour") + + @property + def skip_api(self): + return False + + def api_info(self) -> dict[str, Any]: + return {"type": "number"} + + def preprocess(self, payload: None | int) -> None | int: + return payload + + def postprocess(self, value: None | int) -> None | int: + + return value + + def example_payload(self) -> None: + return None + + def example_value(self) -> None: + return None diff --git a/backend/modelscope_studio/components/antd/tour/step/__init__.py b/backend/modelscope_studio/components/antd/tour/step/__init__.py new file mode 100644 index 00000000..479c12b0 --- /dev/null +++ b/backend/modelscope_studio/components/antd/tour/step/__init__.py @@ -0,0 +1,68 @@ +from __future__ import annotations + +from gradio.events import EventListener + +from .....utils.dev import ModelScopeLayoutComponent, resolve_frontend_dir + + +class AntdTourStep(ModelScopeLayoutComponent): + """ + """ + EVENTS = [ + EventListener("close", + callback=lambda block: block._internal.update( + bind_close_event=True)), + EventListener("next_button_props_click", + callback=lambda block: block._internal.update( + bind_nextButtonProps_click_event=True)), + EventListener("prev_button_props_click", + callback=lambda block: block._internal.update( + bind_prevButtonProps_click_event=True)), + ] + + # supported slots + SLOTS = [ + 'closeIcon', "cover", "title", "description", + "nextButtonProps.children", "prevButtonProps.children" + ] + + def __init__( + self, + props: dict | None = None, + *, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + super().__init__(visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.props = props + + FRONTEND_DIR = resolve_frontend_dir("tour", "step") + + @property + def skip_api(self): + return True + + def preprocess(self, payload: None) -> None: + return payload + + def postprocess(self, value: None) -> None: + + return value + + def example_payload(self) -> None: + return None + + def example_value(self) -> None: + return None diff --git a/backend/modelscope_studio/components/antd/transfer/__init__.py b/backend/modelscope_studio/components/antd/transfer/__init__.py new file mode 100644 index 00000000..bbd65872 --- /dev/null +++ b/backend/modelscope_studio/components/antd/transfer/__init__.py @@ -0,0 +1,101 @@ +from __future__ import annotations + +from typing import Any + +from gradio.events import EventListener + +from ....utils.dev import ModelScopeDataLayoutComponent, resolve_frontend_dir + + +# as inputs, outputs +class AntdTransfer(ModelScopeDataLayoutComponent): + """ + """ + + EVENTS = [ + EventListener("change", + callback=lambda block: block._internal.update( + bind_change_event=True)), + EventListener("scroll", + callback=lambda block: block._internal.update( + bind_scroll_event=True)), + EventListener("search", + callback=lambda block: block._internal.update( + bind_search_event=True)), + EventListener("select_change", + callback=lambda block: block._internal.update( + bind_selectChange_event=True)), + ] + + # supported slots + SLOTS = [ + 'selectionsIcon', + 'titles', + 'footer', + 'locale.notFoundContent', + 'selectAllLabels', + ] + + def __init__( + self, + value: list[float | int | str] | None = None, + props: dict | None = None, + *, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + key: int | str | None = None, + render: bool = True, + **kwargs): + super().__init__(value=value, + visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + key=key, + elem_style=elem_style, + **kwargs) + self.props = props + + FRONTEND_DIR = resolve_frontend_dir("transfer") + + @property + def skip_api(self): + return False + + def api_info(self) -> dict[str, Any]: + return { + "type": "array", + "items": { + "anyOf": [ + { + "type": "string", + }, + { + "type": "number", + }, + ], + }, + }, + + def preprocess( + self, payload: list[float | int | str] | None + ) -> list[float | int | str] | None: + return payload + + def postprocess( + self, value: list[float | int | str] | None + ) -> list[float | int | str] | None: + + return value + + def example_payload(self) -> None: + return None + + def example_value(self) -> None: + return None diff --git a/backend/modelscope_studio/components/antd/tree/__init__.py b/backend/modelscope_studio/components/antd/tree/__init__.py new file mode 100644 index 00000000..f4857f36 --- /dev/null +++ b/backend/modelscope_studio/components/antd/tree/__init__.py @@ -0,0 +1,115 @@ +from __future__ import annotations + +from typing import Any, List, Union + +from gradio.data_classes import GradioModel +from gradio.events import EventListener + +from ....utils.dev import ModelScopeDataLayoutComponent, resolve_frontend_dir +from .directory_tree import AntdTreeDirectoryTree +from .tree_node import AntdTreeTreeNode + + +class TreeData(GradioModel): + expanded_keys: List[str] = [] + selected_keys: List[str] = [] + checked_keys: Union[List[str], dict] = [] + + +# as inputs, outputs +class AntdTree(ModelScopeDataLayoutComponent): + """ + """ + TreeNode = AntdTreeTreeNode + DirectoryTree = AntdTreeDirectoryTree + + EVENTS = [ + EventListener("check", + callback=lambda block: block._internal.update( + bind_click_event=True)), + EventListener("drag_end", + callback=lambda block: block._internal.update( + bind_dragEnd_event=True)), + EventListener("drag_enter", + callback=lambda block: block._internal.update( + bind_dragEnter_event=True)), + EventListener("drag_leave", + callback=lambda block: block._internal.update( + bind_dragLeave_event=True)), + EventListener("drag_over", + callback=lambda block: block._internal.update( + bind_dragOver_event=True)), + EventListener("drag_start", + callback=lambda block: block._internal.update( + bind_dragStart_event=True)), + EventListener("drop", + callback=lambda block: block._internal.update( + bind_dragDrop_event=True)), + EventListener("expand", + callback=lambda block: block._internal.update( + bind_expand_event=True)), + EventListener("load", + callback=lambda block: block._internal.update( + bind_load_event=True)), + EventListener("right_click", + callback=lambda block: block._internal.update( + bind_rightClick_event=True)), + EventListener("select", + callback=lambda block: block._internal.update( + bind_select_event=True)), + ] + + # supported slots + SLOTS = [ + 'switcherLoadingIcon', + 'switcherIcon', + 'showLine.showLeafIcon', + 'icon', + 'treeData', + 'draggable.icon', + ] + data_model = TreeData + + def __init__( + self, + value: TreeData | dict | None = None, + props: dict | None = None, + *, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + super().__init__(value=value, + visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.props = props + + FRONTEND_DIR = resolve_frontend_dir("tree") + + @property + def skip_api(self): + return False + + def preprocess(self, payload: dict | TreeData) -> dict | TreeData: + return payload + + def postprocess(self, value: dict | TreeData | None) -> TreeData: + if isinstance(value, dict): + value = TreeData(**value) + return value + + def example_payload(self) -> Any: + return None + + def example_value(self) -> Any: + return None diff --git a/backend/modelscope_studio/components/antd/tree/directory_tree/__init__.py b/backend/modelscope_studio/components/antd/tree/directory_tree/__init__.py new file mode 100644 index 00000000..a4ad54e5 --- /dev/null +++ b/backend/modelscope_studio/components/antd/tree/directory_tree/__init__.py @@ -0,0 +1,111 @@ +from __future__ import annotations + +from typing import Any, List, Union + +from gradio.data_classes import GradioModel +from gradio.events import EventListener + +from .....utils.dev import ModelScopeDataLayoutComponent, resolve_frontend_dir + + +class TreeData(GradioModel): + expanded_keys: List[str] = [] + selected_keys: List[str] = [] + checked_keys: Union[List[str], dict] = [] + + +# as inputs, outputs +class AntdTreeDirectoryTree(ModelScopeDataLayoutComponent): + """ + """ + + EVENTS = [ + EventListener("check", + callback=lambda block: block._internal.update( + bind_click_event=True)), + EventListener("drag_end", + callback=lambda block: block._internal.update( + bind_dragEnd_event=True)), + EventListener("drag_enter", + callback=lambda block: block._internal.update( + bind_dragEnter_event=True)), + EventListener("drag_leave", + callback=lambda block: block._internal.update( + bind_dragLeave_event=True)), + EventListener("drag_over", + callback=lambda block: block._internal.update( + bind_dragOver_event=True)), + EventListener("drag_start", + callback=lambda block: block._internal.update( + bind_dragStart_event=True)), + EventListener("drop", + callback=lambda block: block._internal.update( + bind_dragDrop_event=True)), + EventListener("expand", + callback=lambda block: block._internal.update( + bind_expand_event=True)), + EventListener("load", + callback=lambda block: block._internal.update( + bind_load_event=True)), + EventListener("right_click", + callback=lambda block: block._internal.update( + bind_rightClick_event=True)), + EventListener("select", + callback=lambda block: block._internal.update( + bind_select_event=True)), + ] + + # supported slots + SLOTS = [ + 'switcherLoadingIcon', + 'switcherIcon', + 'showLine.showLeafIcon', + 'icon', + 'treeData', + 'draggable.icon', + ] + data_model = TreeData + + def __init__( + self, + value: TreeData | dict | None = None, + props: dict | None = None, + *, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + super().__init__(value=value, + visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.props = props + + FRONTEND_DIR = resolve_frontend_dir("tree", "directory-tree") + + @property + def skip_api(self): + return False + + def preprocess(self, payload: dict | TreeData) -> dict | TreeData: + return payload + + def postprocess(self, value: dict | TreeData | None) -> TreeData: + if isinstance(value, dict): + value = TreeData(**value) + return value + + def example_payload(self) -> Any: + return None + + def example_value(self) -> Any: + return None diff --git a/backend/modelscope_studio/components/antd/tree/tree_node/__init__.py b/backend/modelscope_studio/components/antd/tree/tree_node/__init__.py new file mode 100644 index 00000000..34e9739c --- /dev/null +++ b/backend/modelscope_studio/components/antd/tree/tree_node/__init__.py @@ -0,0 +1,57 @@ +from __future__ import annotations + +from typing import Any + +from .....utils.dev import ModelScopeLayoutComponent, resolve_frontend_dir + + +class AntdTreeTreeNode(ModelScopeLayoutComponent): + """ + """ + + EVENTS = [] + + # supported slots + SLOTS = ["title", 'icon'] + + def __init__( + self, + title: str | None = None, + props: dict | None = None, + *, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + super().__init__(visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.title = title + self.props = props + + FRONTEND_DIR = resolve_frontend_dir("tree", "tree-node") + + @property + def skip_api(self): + return True + + def preprocess(self, payload: None) -> None: + return payload + + def postprocess(self, value: None) -> None: + return value + + def example_payload(self) -> Any: + return None + + def example_value(self) -> Any: + return None diff --git a/backend/modelscope_studio/components/antd/tree_select/__init__.py b/backend/modelscope_studio/components/antd/tree_select/__init__.py new file mode 100644 index 00000000..27801b9f --- /dev/null +++ b/backend/modelscope_studio/components/antd/tree_select/__init__.py @@ -0,0 +1,99 @@ +from __future__ import annotations + +from typing import Any + +from gradio.events import EventListener + +from ....utils.dev import ModelScopeDataLayoutComponent, resolve_frontend_dir +from .tree_node import AntdTreeSelectTreeNode + + +# as inputs, outputs +class AntdTreeSelect(ModelScopeDataLayoutComponent): + """ + """ + TreeNode = AntdTreeSelectTreeNode + + EVENTS = [ + EventListener("change", + callback=lambda block: block._internal.update( + bind_change_event=True)), + EventListener("select", + callback=lambda block: block._internal.update( + bind_select_event=True)), + EventListener("search", + callback=lambda block: block._internal.update( + bind_search_event=True)), + EventListener("tree_expand", + callback=lambda block: block._internal.update( + bind_treeExpand_event=True)), + EventListener("popup_scroll", + callback=lambda block: block._internal.update( + bind_popupScroll_event=True)), + EventListener("dropdown_visible_change", + callback=lambda block: block._internal.update( + bind_dropdownVisibleChange_event=True)), + ] + + # supported slots + SLOTS = [ + 'allowClear.clearIcon', + 'maxTagPlaceholder', + 'notFoundContent', + 'suffixIcon', + 'switcherIcon', + ] + + def __init__( + self, + value: str | list[str] | None = None, + props: dict | None = None, + *, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + super().__init__(value=value, + visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.props = props + + FRONTEND_DIR = resolve_frontend_dir("tree-select") + + @property + def skip_api(self): + return False + + def api_info(self) -> dict[str, Any]: + return { + "anyOf": [{ + "type": "string" + }, { + "type": "array", + "items": { + "type": "string" + } + }] + } + + def preprocess(self, payload: str | list[str]) -> str | list[str]: + return payload + + def postprocess(self, value: str | list[str] | None) -> str | list[str]: + return value + + def example_payload(self) -> Any: + return None + + def example_value(self) -> Any: + return None diff --git a/backend/modelscope_studio/components/antd/tree_select/tree_node/__init__.py b/backend/modelscope_studio/components/antd/tree_select/tree_node/__init__.py new file mode 100644 index 00000000..f40b850f --- /dev/null +++ b/backend/modelscope_studio/components/antd/tree_select/tree_node/__init__.py @@ -0,0 +1,59 @@ +from __future__ import annotations + +from typing import Any + +from .....utils.dev import ModelScopeLayoutComponent, resolve_frontend_dir + + +class AntdTreeSelectTreeNode(ModelScopeLayoutComponent): + """ + """ + + EVENTS = [] + + # supported slots + SLOTS = ["title"] + + def __init__( + self, + value: str | None = None, + title: str | None = None, + props: dict | None = None, + *, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + super().__init__(visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.value = value + self.title = title + self.props = props + + FRONTEND_DIR = resolve_frontend_dir("tree-select", "tree-node") + + @property + def skip_api(self): + return True + + def preprocess(self, payload: None) -> None: + return payload + + def postprocess(self, value: None) -> None: + return value + + def example_payload(self) -> Any: + return None + + def example_value(self) -> Any: + return None diff --git a/backend/modelscope_studio/components/antd/typography/__init__.py b/backend/modelscope_studio/components/antd/typography/__init__.py new file mode 100644 index 00000000..213b9805 --- /dev/null +++ b/backend/modelscope_studio/components/antd/typography/__init__.py @@ -0,0 +1,11 @@ +from .link import AntdTypographyLink +from .paragraph import AntdTypographyParagraph +from .text import AntdTypographyText +from .title import AntdTypographyTitle + + +class AntdTypography: + Text = AntdTypographyText + Title = AntdTypographyTitle + Paragraph = AntdTypographyParagraph + Link = AntdTypographyLink diff --git a/backend/modelscope_studio/components/antd/typography/link/__init__.py b/backend/modelscope_studio/components/antd/typography/link/__init__.py new file mode 100644 index 00000000..03afb6d6 --- /dev/null +++ b/backend/modelscope_studio/components/antd/typography/link/__init__.py @@ -0,0 +1,85 @@ +from __future__ import annotations + +from typing import Any + +from gradio.events import EventListener + +from .....utils.dev import ModelScopeLayoutComponent, resolve_frontend_dir + + +class AntdTypographyLink(ModelScopeLayoutComponent): + """ + """ + + EVENTS = [ + EventListener("click", + callback=lambda block: block._internal.update( + bind_click_event=True)), + EventListener("copyable_copy", + callback=lambda block: block._internal.update( + bind_copyable_copy_event=True)), + EventListener("editable_change", + callback=lambda block: block._internal.update( + bind_editable_change_event=True)), + EventListener("editable_cancel", + callback=lambda block: block._internal.update( + bind_editable_cancel_event=True)), + EventListener("editable_start", + callback=lambda block: block._internal.update( + bind_editable_start_event=True)), + EventListener("editable_end", + callback=lambda block: block._internal.update( + bind_editable_end_event=True)), + ] + + # supported slots + SLOTS = [ + 'copyable.icon', + 'copyable.tooltips', + 'editable.icon', + 'editable.tooltip', + 'editable.enterIcon', + ] + + def __init__( + self, + value: str | None = "", + props: dict | None = None, + *, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + super().__init__(visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.value = value + self.props = props + + FRONTEND_DIR = resolve_frontend_dir("typography", "link") + + @property + def skip_api(self): + return True + + def preprocess(self, payload: str | None) -> str | None: + return payload + + def postprocess(self, value: str | None) -> str | None: + + return str(value) + + def example_payload(self) -> Any: + return "Hello" + + def example_value(self) -> Any: + return "Hello" diff --git a/backend/modelscope_studio/components/antd/typography/paragraph/__init__.py b/backend/modelscope_studio/components/antd/typography/paragraph/__init__.py new file mode 100644 index 00000000..be82e6ad --- /dev/null +++ b/backend/modelscope_studio/components/antd/typography/paragraph/__init__.py @@ -0,0 +1,97 @@ +from __future__ import annotations + +from typing import Any + +from gradio.events import EventListener + +from .....utils.dev import ModelScopeLayoutComponent, resolve_frontend_dir + + +class AntdTypographyParagraph(ModelScopeLayoutComponent): + """ + """ + + EVENTS = [ + EventListener("click", + callback=lambda block: block._internal.update( + bind_click_event=True)), + EventListener("copyable_copy", + callback=lambda block: block._internal.update( + bind_copyable_copy_event=True)), + EventListener("editable_change", + callback=lambda block: block._internal.update( + bind_editable_change_event=True)), + EventListener("editable_cancel", + callback=lambda block: block._internal.update( + bind_editable_cancel_event=True)), + EventListener("editable_start", + callback=lambda block: block._internal.update( + bind_editable_start_event=True)), + EventListener("editable_end", + callback=lambda block: block._internal.update( + bind_editable_end_event=True)), + EventListener("ellipsis_expand", + callback=lambda block: block._internal.update( + bind_ellipsis_expand_event=True)), + EventListener("ellipsis_ellipsis", + callback=lambda block: block._internal.update( + bind_ellipsis_ellipsis_event=True)), + EventListener("ellipsis_tooltip_open_change", + callback=lambda block: block._internal.update( + bind_ellipsis_tooltip_openChange_event=True)), + ] + + # supported slots + SLOTS = [ + 'copyable.icon', + 'copyable.tooltips', + 'editable.icon', + 'editable.tooltip', + 'editable.enterIcon', + 'ellipsis.symbol', + 'ellipsis.tooltip', + 'ellipsis.tooltip.title', + ] + + def __init__( + self, + value: str | None = "", + props: dict | None = None, + *, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + super().__init__(visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.value = value + self.props = props + + FRONTEND_DIR = resolve_frontend_dir("typography", "paragraph") + + @property + def skip_api(self): + return True + + def preprocess(self, payload: str | None) -> str | None: + return payload + + def postprocess(self, value: str | None) -> str | None: + + return str(value) + + def example_payload(self) -> Any: + return "Hello" + + def example_value(self) -> Any: + return "Hello" diff --git a/backend/modelscope_studio/components/antd/typography/text/__init__.py b/backend/modelscope_studio/components/antd/typography/text/__init__.py new file mode 100644 index 00000000..868ff1ec --- /dev/null +++ b/backend/modelscope_studio/components/antd/typography/text/__init__.py @@ -0,0 +1,94 @@ +from __future__ import annotations + +from typing import Any + +from gradio.events import EventListener + +from .....utils.dev import ModelScopeLayoutComponent, resolve_frontend_dir + + +class AntdTypographyText(ModelScopeLayoutComponent): + """ + """ + + EVENTS = [ + EventListener("click", + callback=lambda block: block._internal.update( + bind_click_event=True)), + EventListener("copyable_copy", + callback=lambda block: block._internal.update( + bind_copyable_copy_event=True)), + EventListener("editable_change", + callback=lambda block: block._internal.update( + bind_editable_change_event=True)), + EventListener("editable_cancel", + callback=lambda block: block._internal.update( + bind_editable_cancel_event=True)), + EventListener("editable_start", + callback=lambda block: block._internal.update( + bind_editable_start_event=True)), + EventListener("editable_end", + callback=lambda block: block._internal.update( + bind_editable_end_event=True)), + EventListener("ellipsis_ellipsis", + callback=lambda block: block._internal.update( + bind_ellipsis_ellipsis_event=True)), + EventListener("ellipsis_tooltip_open_change", + callback=lambda block: block._internal.update( + bind_ellipsis_tooltip_openChange_event=True)), + ] + + # supported slots + SLOTS = [ + 'copyable.icon', + 'copyable.tooltips', + 'editable.icon', + 'editable.tooltip', + 'editable.enterIcon', + 'ellipsis.symbol', + 'ellipsis.tooltip', + 'ellipsis.tooltip.title', + ] + + def __init__( + self, + value: str | None = "", + props: dict | None = None, + *, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + super().__init__(visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.value = value + self.props = props + + FRONTEND_DIR = resolve_frontend_dir("typography", "text") + + @property + def skip_api(self): + return True + + def preprocess(self, payload: str | None) -> str | None: + return payload + + def postprocess(self, value: str | None) -> str | None: + + return str(value) + + def example_payload(self) -> Any: + return "Hello" + + def example_value(self) -> Any: + return "Hello" diff --git a/backend/modelscope_studio/components/antd/typography/title/__init__.py b/backend/modelscope_studio/components/antd/typography/title/__init__.py new file mode 100644 index 00000000..05740942 --- /dev/null +++ b/backend/modelscope_studio/components/antd/typography/title/__init__.py @@ -0,0 +1,97 @@ +from __future__ import annotations + +from typing import Any + +from gradio.events import EventListener + +from .....utils.dev import ModelScopeLayoutComponent, resolve_frontend_dir + + +class AntdTypographyTitle(ModelScopeLayoutComponent): + """ + """ + + EVENTS = [ + EventListener("click", + callback=lambda block: block._internal.update( + bind_click_event=True)), + EventListener("copyable_copy", + callback=lambda block: block._internal.update( + bind_copyable_copy_event=True)), + EventListener("editable_change", + callback=lambda block: block._internal.update( + bind_editable_change_event=True)), + EventListener("editable_cancel", + callback=lambda block: block._internal.update( + bind_editable_cancel_event=True)), + EventListener("editable_start", + callback=lambda block: block._internal.update( + bind_editable_start_event=True)), + EventListener("editable_end", + callback=lambda block: block._internal.update( + bind_editable_end_event=True)), + EventListener("ellipsis_expand", + callback=lambda block: block._internal.update( + bind_ellipsis_expand_event=True)), + EventListener("ellipsis_ellipsis", + callback=lambda block: block._internal.update( + bind_ellipsis_ellipsis_event=True)), + EventListener("ellipsis_tooltip_open_change", + callback=lambda block: block._internal.update( + bind_ellipsis_tooltip_openChange_event=True)), + ] + + # supported slots + SLOTS = [ + 'copyable.icon', + 'copyable.tooltips', + 'editable.icon', + 'editable.tooltip', + 'editable.enterIcon', + 'ellipsis.symbol', + 'ellipsis.tooltip', + 'ellipsis.tooltip.title', + ] + + def __init__( + self, + value: str | None = "", + props: dict | None = None, + *, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + super().__init__(visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.value = value + self.props = props + + FRONTEND_DIR = resolve_frontend_dir("typography", "title") + + @property + def skip_api(self): + return True + + def preprocess(self, payload: str | None) -> str | None: + return payload + + def postprocess(self, value: str | None) -> str | None: + + return str(value) + + def example_payload(self) -> Any: + return "Hello" + + def example_value(self) -> Any: + return "Hello" diff --git a/backend/modelscope_studio/components/antd/upload/__init__.py b/backend/modelscope_studio/components/antd/upload/__init__.py new file mode 100644 index 00000000..177d14c5 --- /dev/null +++ b/backend/modelscope_studio/components/antd/upload/__init__.py @@ -0,0 +1,154 @@ +from __future__ import annotations + +import tempfile +from pathlib import Path +from typing import TYPE_CHECKING, Any, Callable + +import gradio_client.utils as client_utils +from gradio import processing_utils +from gradio.components.base import Component +from gradio.data_classes import FileData, ListFiles +from gradio.events import EventListener +from gradio.utils import NamedString +from gradio_client import handle_file + +from ....utils.dev import ModelScopeDataLayoutComponent, resolve_frontend_dir +from .dragger import AntdUploadDragger + +if TYPE_CHECKING: + from gradio.components import Timer + + +# as inputs, outputs +class AntdUpload(ModelScopeDataLayoutComponent): + """ + """ + Dragger = AntdUploadDragger + + EVENTS = [ + EventListener("change", + callback=lambda block: block._internal.update( + bind_click_event=True)), + EventListener("drop", + callback=lambda block: block._internal.update( + bind_drop_event=True)), + EventListener("download", + callback=lambda block: block._internal.update( + bind_download_event=True)), + EventListener("preview", + callback=lambda block: block._internal.update( + bind_preview_event=True)), + EventListener("remove", + callback=lambda block: block._internal.update( + bind_remove_event=True)) + ] + + # supported slots + SLOTS = [ + 'showUploadList.extra', + 'showUploadList.previewIcon', + 'showUploadList.removeIcon', + 'showUploadList.downloadIcon', + ] + + data_model = ListFiles + + def __init__( + self, + value: list[str] | Callable | None = None, + props: dict | None = None, + *, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + key: int | str | None = None, + every: Timer | float | None = None, + inputs: Component | list[Component] | set[Component] | None = None, + render: bool = True, + **kwargs): + + super().__init__(as_item=as_item, + visible=visible, + value=value, + elem_id=elem_id, + elem_classes=elem_classes, + key=key, + elem_style=elem_style, + every=every, + inputs=inputs, + render=render, + **kwargs) + + self.props = props + + FRONTEND_DIR = resolve_frontend_dir("upload") + + def _process_single_file(self, f: FileData) -> NamedString: + file_name = f.path + file = tempfile.NamedTemporaryFile(delete=False, dir=self.GRADIO_CACHE) + file.name = file_name + return NamedString(file_name) + + def preprocess(self, payload: ListFiles | None) -> list[str] | None: + """ + Parameters: + payload: File information as a list of FileData objects. + Returns: + Passes the file as a list of `str`. + """ + if payload is None: + return None + + return [self._process_single_file(f) for f in payload] # type: ignore + + def _download_files(self, value: list[str]) -> list[str]: + downloaded_files = [] + for file in value: + if client_utils.is_http_url_like(file): + downloaded_file = processing_utils.save_url_to_cache( + file, self.GRADIO_CACHE) + downloaded_files.append(downloaded_file) + else: + downloaded_files.append(file) + return downloaded_files + + def postprocess(self, value: list[str] | None) -> ListFiles | None: + """ + Parameters: + value: a `list[str]` of filepaths/URLs. + Returns: + File information as a list of FileData objects. + """ + if value is None: + return None + value = self._download_files(value) + return ListFiles(root=[ + FileData( + path=file, + orig_name=Path(file).name, + size=Path(file).stat().st_size, + ) for file in value + ]) + + @property + def skip_api(self): + return False + + def api_info(self) -> dict[str, list[str]]: + return ListFiles.model_json_schema() + + def example_payload(self) -> Any: + return [ + handle_file( + "https://github.com/gradio-app/gradio/raw/main/test/test_files/sample_file.pdf" + ) + ] + + def example_value(self) -> Any: + return [ + "https://github.com/gradio-app/gradio/raw/main/test/test_files/sample_file.pdf" + ] diff --git a/backend/modelscope_studio/components/antd/upload/dragger/__init__.py b/backend/modelscope_studio/components/antd/upload/dragger/__init__.py new file mode 100644 index 00000000..0817298f --- /dev/null +++ b/backend/modelscope_studio/components/antd/upload/dragger/__init__.py @@ -0,0 +1,151 @@ +from __future__ import annotations + +import tempfile +from pathlib import Path +from typing import TYPE_CHECKING, Any, Callable + +import gradio_client.utils as client_utils +from gradio import processing_utils +from gradio.components.base import Component +from gradio.data_classes import FileData, ListFiles +from gradio.events import EventListener +from gradio.utils import NamedString +from gradio_client import handle_file + +from .....utils.dev import ModelScopeDataLayoutComponent, resolve_frontend_dir + +if TYPE_CHECKING: + from gradio.components import Timer + + +# as inputs, outputs +class AntdUploadDragger(ModelScopeDataLayoutComponent): + """ + """ + EVENTS = [ + EventListener("change", + callback=lambda block: block._internal.update( + bind_click_event=True)), + EventListener("drop", + callback=lambda block: block._internal.update( + bind_drop_event=True)), + EventListener("download", + callback=lambda block: block._internal.update( + bind_download_event=True)), + EventListener("preview", + callback=lambda block: block._internal.update( + bind_preview_event=True)), + EventListener("remove", + callback=lambda block: block._internal.update( + bind_remove_event=True)) + ] + + # supported slots + SLOTS = [ + 'showUploadList.extra', + 'showUploadList.previewIcon', + 'showUploadList.removeIcon', + 'showUploadList.downloadIcon', + ] + + data_model = ListFiles + + def __init__( + self, + value: list[str] | Callable | None = None, + props: dict | None = None, + *, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + key: int | str | None = None, + every: Timer | float | None = None, + inputs: Component | list[Component] | set[Component] | None = None, + render: bool = True, + **kwargs): + + super().__init__(as_item=as_item, + visible=visible, + value=value, + elem_id=elem_id, + elem_classes=elem_classes, + key=key, + elem_style=elem_style, + every=every, + inputs=inputs, + render=render, + **kwargs) + + self.props = props + + FRONTEND_DIR = resolve_frontend_dir("upload", "dragger") + + def _process_single_file(self, f: FileData) -> NamedString: + file_name = f.path + file = tempfile.NamedTemporaryFile(delete=False, dir=self.GRADIO_CACHE) + file.name = file_name + return NamedString(file_name) + + def preprocess(self, payload: ListFiles | None) -> list[str] | None: + """ + Parameters: + payload: File information as a list of FileData objects. + Returns: + Passes the file as a list of `str`. + """ + if payload is None: + return None + + return [self._process_single_file(f) for f in payload] # type: ignore + + def _download_files(self, value: list[str]) -> list[str]: + downloaded_files = [] + for file in value: + if client_utils.is_http_url_like(file): + downloaded_file = processing_utils.save_url_to_cache( + file, self.GRADIO_CACHE) + downloaded_files.append(downloaded_file) + else: + downloaded_files.append(file) + return downloaded_files + + def postprocess(self, value: list[str] | None) -> ListFiles | None: + """ + Parameters: + value: a `list[str]` of filepaths/URLs. + Returns: + File information as a list of FileData objects. + """ + if value is None: + return None + value = self._download_files(value) + return ListFiles(root=[ + FileData( + path=file, + orig_name=Path(file).name, + size=Path(file).stat().st_size, + ) for file in value + ]) + + @property + def skip_api(self): + return False + + def api_info(self) -> dict[str, list[str]]: + return ListFiles.model_json_schema() + + def example_payload(self) -> Any: + return [ + handle_file( + "https://github.com/gradio-app/gradio/raw/main/test/test_files/sample_file.pdf" + ) + ] + + def example_value(self) -> Any: + return [ + "https://github.com/gradio-app/gradio/raw/main/test/test_files/sample_file.pdf" + ] diff --git a/backend/modelscope_studio/components/antd/watermark/__init__.py b/backend/modelscope_studio/components/antd/watermark/__init__.py new file mode 100644 index 00000000..6d292daf --- /dev/null +++ b/backend/modelscope_studio/components/antd/watermark/__init__.py @@ -0,0 +1,52 @@ +from __future__ import annotations + +from ....utils.dev import ModelScopeLayoutComponent, resolve_frontend_dir + + +class AntdWatermark(ModelScopeLayoutComponent): + """ + """ + EVENTS = [] + + def __init__( + self, + content: str | list[str] | None = "", + props: dict | None = None, + *, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + super().__init__(visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.props = props + self.content = content + + FRONTEND_DIR = resolve_frontend_dir("watermark") + + @property + def skip_api(self): + return True + + def preprocess(self, payload: None) -> None: + return payload + + def postprocess(self, value: None) -> None: + + return value + + def example_payload(self) -> None: + return None + + def example_value(self) -> None: + return None diff --git a/backend/modelscope_studio/components/base/__init__.py b/backend/modelscope_studio/components/base/__init__.py new file mode 100644 index 00000000..60d3a873 --- /dev/null +++ b/backend/modelscope_studio/components/base/__init__.py @@ -0,0 +1,8 @@ +from .application import ModelScopeApplication as Application +from .div import ModelScopeDiv as Div +from .each import ModelScopeEach as Each +from .filter import ModelScopeFilter as Filter +from .fragment import ModelScopeFragment as Fragment +from .slot import ModelScopeSlot as Slot +from .span import ModelScopeSpan as Span +from .text import ModelScopeText as Text diff --git a/backend/modelscope_studio/components/base/application/__init__.py b/backend/modelscope_studio/components/base/application/__init__.py new file mode 100644 index 00000000..b62f786b --- /dev/null +++ b/backend/modelscope_studio/components/base/application/__init__.py @@ -0,0 +1,43 @@ +from __future__ import annotations + +from typing import Any + +from ....utils.dev import ModelScopeLayoutComponent, resolve_frontend_dir + + +class ModelScopeApplication(ModelScopeLayoutComponent): + """ + """ + + EVENTS = ["custom"] + + # supported slots + SLOTS = [] + + def __init__( + self, + *, + # gradio properties + visible: bool = True, + render: bool = True, + **kwargs): + super().__init__(visible=visible, render=render, **kwargs) + + FRONTEND_DIR = resolve_frontend_dir("application", type="base") + + @property + def skip_api(self): + return True + + def preprocess(self, payload: None) -> None: + return payload + + def postprocess(self, value: None) -> None: + + return value + + def example_payload(self) -> Any: + return None + + def example_value(self) -> Any: + return None diff --git a/backend/modelscope_studio/components/base/div/__init__.py b/backend/modelscope_studio/components/base/div/__init__.py new file mode 100644 index 00000000..60a7b275 --- /dev/null +++ b/backend/modelscope_studio/components/base/div/__init__.py @@ -0,0 +1,91 @@ +from __future__ import annotations + +from typing import Any + +from gradio.events import EventListener + +from ....utils.dev import ModelScopeLayoutComponent, resolve_frontend_dir +from ...antd.carousel import AntdCarousel +from ...antd.space import AntdSpace + + +class ModelScopeDiv(ModelScopeLayoutComponent): + """ + """ + + EVENTS = [ + EventListener("click", + callback=lambda block: block._internal.update( + bind_click_event=True)), + EventListener("dblclick", + callback=lambda block: block._internal.update( + bind_dblclick_event=True)), + EventListener("mousedown", + callback=lambda block: block._internal.update( + bind_mousedown_event=True)), + EventListener("mouseup", + callback=lambda block: block._internal.update( + bind_mouseup_event=True)), + EventListener("mouseover", + callback=lambda block: block._internal.update( + bind_mouseover_event=True)), + EventListener("mouseout", + callback=lambda block: block._internal.update( + bind_mouseout_event=True)), + EventListener("mousemove", + callback=lambda block: block._internal.update( + bind_mousemove_event=True)), + EventListener("scroll", + callback=lambda block: block._internal.update( + bind_scroll_event=True)), + ] + + # supported slots + SLOTS = [] + + def __init__( + self, + value: str | None = None, + props: dict | None = None, + *, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + super().__init__(visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + if self.parent and self._internal and (any( + isinstance(self.parent, component) + for component in [AntdCarousel, AntdSpace])): + self._internal.update(fragment=True) + self.value = value + self.props = props + + FRONTEND_DIR = resolve_frontend_dir("div", type="base") + + @property + def skip_api(self): + return True + + def preprocess(self, payload: str | None) -> str | None: + return payload + + def postprocess(self, value: str | None) -> str | None: + + return str(value) + + def example_payload(self) -> Any: + return None + + def example_value(self) -> Any: + return None diff --git a/backend/modelscope_studio/components/base/each/__init__.py b/backend/modelscope_studio/components/base/each/__init__.py new file mode 100644 index 00000000..6a11e1f7 --- /dev/null +++ b/backend/modelscope_studio/components/base/each/__init__.py @@ -0,0 +1,70 @@ +from __future__ import annotations + +from timeit import Timer +from typing import Callable + +from gradio.components.base import Component +from gradio.data_classes import GradioRootModel + +from ....utils.dev import ModelScopeDataLayoutComponent, resolve_frontend_dir + + +class ModelScopeEachData(GradioRootModel): + root: list = [] + + +# as inputs, outputs +class ModelScopeEach(ModelScopeDataLayoutComponent): + """ + """ + EVENTS = [] + data_model = ModelScopeEachData + + def __init__( + self, + value: list | Callable = None, + *, + as_item: str | None = None, + _internal: None = None, + + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + key: int | str | None = None, + every: Timer | float | None = None, + inputs: Component | list[Component] | set[Component] | None = None, + render: bool = True, + **kwargs): + super().__init__(visible=visible, + render=render, + value=value, + as_item=as_item, + elem_id=elem_id, + elem_classes=elem_classes, + key=key, + elem_style=elem_style, + every=every, + inputs=inputs, + **kwargs) + + FRONTEND_DIR = resolve_frontend_dir("each", type='base') + + @property + def skip_api(self): + return False + + def preprocess(self, payload: list | ModelScopeEachData) -> list: + if isinstance(payload, ModelScopeEachData): + return payload.root + return payload + + def postprocess(self, value: list) -> list: + return value + + def example_payload(self) -> list: + return [] + + def example_value(self) -> list: + return [] diff --git a/backend/modelscope_studio/components/base/filter/__init__.py b/backend/modelscope_studio/components/base/filter/__init__.py new file mode 100644 index 00000000..e37581e8 --- /dev/null +++ b/backend/modelscope_studio/components/base/filter/__init__.py @@ -0,0 +1,42 @@ +from __future__ import annotations + +from typing import Any + +from ....utils.dev import ModelScopeLayoutComponent, resolve_frontend_dir + + +class ModelScopeFilter(ModelScopeLayoutComponent): + """ + """ + EVENTS = [] + + def __init__(self, + *, + as_item: str | None = None, + _internal: None = None, + visible: bool = True, + render: bool = True, + **kwargs): + super().__init__(visible=visible, + render=render, + as_item=as_item, + **kwargs) + + FRONTEND_DIR = resolve_frontend_dir("filter", type='base') + + @property + def skip_api(self): + return True + + def preprocess(self, payload: None) -> None: + return payload + + def postprocess(self, value: None) -> None: + + return value + + def example_payload(self) -> Any: + return None + + def example_value(self) -> Any: + return None diff --git a/backend/modelscope_studio/components/base/fragment/__init__.py b/backend/modelscope_studio/components/base/fragment/__init__.py new file mode 100644 index 00000000..bce7db61 --- /dev/null +++ b/backend/modelscope_studio/components/base/fragment/__init__.py @@ -0,0 +1,48 @@ +from __future__ import annotations + +from typing import Any + +from ....utils.dev import ModelScopeLayoutComponent, resolve_frontend_dir + + +class ModelScopeFragment(ModelScopeLayoutComponent): + """ + """ + + EVENTS = [] + + # supported slots + SLOTS = [] + + def __init__( + self, + *, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + render: bool = True, + **kwargs): + super().__init__(visible=visible, + render=render, + as_item=as_item, + **kwargs) + + FRONTEND_DIR = resolve_frontend_dir("fragment", type="base") + + @property + def skip_api(self): + return True + + def preprocess(self, payload: None) -> None: + return payload + + def postprocess(self, value: None) -> None: + + return value + + def example_payload(self) -> Any: + return None + + def example_value(self) -> Any: + return None diff --git a/backend/modelscope_studio/components/base/slot/__init__.py b/backend/modelscope_studio/components/base/slot/__init__.py new file mode 100644 index 00000000..da27db0e --- /dev/null +++ b/backend/modelscope_studio/components/base/slot/__init__.py @@ -0,0 +1,51 @@ +from __future__ import annotations + +from typing import Any + +from ....utils.dev import ModelScopeLayoutComponent, resolve_frontend_dir + + +class ModelScopeSlot(ModelScopeLayoutComponent): + """ + """ + EVENTS = [] + + def __init__(self, + value: str = '', + params_mapping: str | None = None, + *, + skip_context_value: bool = True, + as_item: str | None = None, + _internal: None = None, + visible: bool = True, + render: bool = True, + **kwargs): + super().__init__(visible=visible, + render=render, + as_item=as_item, + **kwargs) + self.params_mapping = params_mapping + self.skip_context_value = skip_context_value + if isinstance(self.parent, ModelScopeSlot): + self.value = f"{self.parent.value}.{value}" + else: + self.value = value + + FRONTEND_DIR = resolve_frontend_dir("slot", type='base') + + @property + def skip_api(self): + return True + + def preprocess(self, payload: str) -> str: + return payload + + def postprocess(self, value: str) -> str: + + return value + + def example_payload(self) -> Any: + return None + + def example_value(self) -> Any: + return None diff --git a/backend/modelscope_studio/components/base/span/__init__.py b/backend/modelscope_studio/components/base/span/__init__.py new file mode 100644 index 00000000..eafd1ca3 --- /dev/null +++ b/backend/modelscope_studio/components/base/span/__init__.py @@ -0,0 +1,91 @@ +from __future__ import annotations + +from typing import Any + +from gradio.events import EventListener + +from ....utils.dev import ModelScopeLayoutComponent, resolve_frontend_dir +from ...antd.carousel import AntdCarousel +from ...antd.space import AntdSpace + + +class ModelScopeSpan(ModelScopeLayoutComponent): + """ + """ + + EVENTS = [ + EventListener("click", + callback=lambda block: block._internal.update( + bind_click_event=True)), + EventListener("dblclick", + callback=lambda block: block._internal.update( + bind_dblclick_event=True)), + EventListener("mousedown", + callback=lambda block: block._internal.update( + bind_mousedown_event=True)), + EventListener("mouseup", + callback=lambda block: block._internal.update( + bind_mouseup_event=True)), + EventListener("mouseover", + callback=lambda block: block._internal.update( + bind_mouseover_event=True)), + EventListener("mouseout", + callback=lambda block: block._internal.update( + bind_mouseout_event=True)), + EventListener("mousemove", + callback=lambda block: block._internal.update( + bind_mousemove_event=True)), + EventListener("scroll", + callback=lambda block: block._internal.update( + bind_scroll_event=True)), + ] + + # supported slots + SLOTS = [] + + def __init__( + self, + value: str | None = None, + props: dict | None = None, + *, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + super().__init__(visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + if self.parent and self._internal and (any( + isinstance(self.parent, component) + for component in [AntdCarousel, AntdSpace])): + self._internal.update(fragment=True) + self.value = value + self.props = props + + FRONTEND_DIR = resolve_frontend_dir("span", type="base") + + @property + def skip_api(self): + return True + + def preprocess(self, payload: str | None) -> str | None: + return payload + + def postprocess(self, value: str | None) -> str | None: + + return str(value) + + def example_payload(self) -> Any: + return None + + def example_value(self) -> Any: + return None diff --git a/backend/modelscope_studio/components/base/text/__init__.py b/backend/modelscope_studio/components/base/text/__init__.py new file mode 100644 index 00000000..a13ac3d7 --- /dev/null +++ b/backend/modelscope_studio/components/base/text/__init__.py @@ -0,0 +1,62 @@ +from __future__ import annotations + +from typing import Any + +from ....utils.dev import ModelScopeComponent, resolve_frontend_dir +from ...antd.carousel import AntdCarousel +from ...antd.space import AntdSpace + + +class ModelScopeText(ModelScopeComponent): + """ + """ + + EVENTS = [] + + # supported slots + SLOTS = [] + + def __init__( + self, + value: str | None = None, + *, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + super().__init__(visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + if self.parent and self._internal and (any( + isinstance(self.parent, component) + for component in [AntdCarousel, AntdSpace])): + self._internal.update(fragment=True) + self.value = value + + FRONTEND_DIR = resolve_frontend_dir("text", type="base") + + @property + def skip_api(self): + return True + + def preprocess(self, payload: str | None) -> str | None: + return payload + + def postprocess(self, value: str | None) -> str | None: + + return str(value) + + def example_payload(self) -> Any: + return None + + def example_value(self) -> Any: + return None diff --git a/backend/modelscope_studio/components/Chatbot/__init__.py b/backend/modelscope_studio/components/legacy/Chatbot/__init__.py similarity index 98% rename from backend/modelscope_studio/components/Chatbot/__init__.py rename to backend/modelscope_studio/components/legacy/Chatbot/__init__.py index 7e3ba120..f003414e 100644 --- a/backend/modelscope_studio/components/Chatbot/__init__.py +++ b/backend/modelscope_studio/components/legacy/Chatbot/__init__.py @@ -11,9 +11,9 @@ from gradio_client import utils as client_utils from gradio_client.documentation import document, set_documentation_group -from modelscope_studio.components.MultimodalInput import MultimodalInputData -from modelscope_studio.utils import (CustomComponentDict, process_links, - resolve_frontend_dir) +from ....utils.dev import (CustomComponentDict, process_links, + resolve_frontend_dir) +from ..MultimodalInput import MultimodalInputData class FileMessage(GradioModel): @@ -58,7 +58,7 @@ class ModelScopeChatbot(Component): Demos: chatbot_simple, chatbot_multimodal Guides: creating-a-chatbot """ - FRONTEND_DIR = resolve_frontend_dir("Chatbot") + FRONTEND_DIR = resolve_frontend_dir("Chatbot", type='legacy') EVENTS = [Events.change, Events.select, Events.like, 'flushed', 'custom'] data_model = ChatbotData diff --git a/backend/modelscope_studio/components/Chatbot/llm_thinking_presets.py b/backend/modelscope_studio/components/legacy/Chatbot/llm_thinking_presets.py similarity index 100% rename from backend/modelscope_studio/components/Chatbot/llm_thinking_presets.py rename to backend/modelscope_studio/components/legacy/Chatbot/llm_thinking_presets.py diff --git a/backend/modelscope_studio/components/Flow/__init__.py b/backend/modelscope_studio/components/legacy/Flow/__init__.py similarity index 97% rename from backend/modelscope_studio/components/Flow/__init__.py rename to backend/modelscope_studio/components/legacy/Flow/__init__.py index 3ab4e99f..5de50c11 100644 --- a/backend/modelscope_studio/components/Flow/__init__.py +++ b/backend/modelscope_studio/components/legacy/Flow/__init__.py @@ -9,8 +9,7 @@ from gradio.events import Events from gradio_client.documentation import document -from modelscope_studio.utils import CustomComponentDict, resolve_frontend_dir - +from ....utils.dev import CustomComponentDict, resolve_frontend_dir from .edge import * from .edge import Edge from .node import * @@ -44,7 +43,7 @@ class BackgroundPropsDict(TypedDict): @document() class ModelScopeFlow(Component): data_model = FlowData - FRONTEND_DIR = resolve_frontend_dir("Flow") + FRONTEND_DIR = resolve_frontend_dir("Flow", type='legacy') EVENTS = [Events.change, 'data_change', 'custom'] def __init__( diff --git a/backend/modelscope_studio/components/Flow/edge.py b/backend/modelscope_studio/components/legacy/Flow/edge.py similarity index 100% rename from backend/modelscope_studio/components/Flow/edge.py rename to backend/modelscope_studio/components/legacy/Flow/edge.py diff --git a/backend/modelscope_studio/components/Flow/node.py b/backend/modelscope_studio/components/legacy/Flow/node.py similarity index 100% rename from backend/modelscope_studio/components/Flow/node.py rename to backend/modelscope_studio/components/legacy/Flow/node.py diff --git a/backend/modelscope_studio/components/Flow/node_schema.py b/backend/modelscope_studio/components/legacy/Flow/node_schema.py similarity index 100% rename from backend/modelscope_studio/components/Flow/node_schema.py rename to backend/modelscope_studio/components/legacy/Flow/node_schema.py diff --git a/backend/modelscope_studio/components/Lifecycle/__init__.py b/backend/modelscope_studio/components/legacy/Lifecycle/__init__.py similarity index 96% rename from backend/modelscope_studio/components/Lifecycle/__init__.py rename to backend/modelscope_studio/components/legacy/Lifecycle/__init__.py index dbbc72e2..84a585ab 100644 --- a/backend/modelscope_studio/components/Lifecycle/__init__.py +++ b/backend/modelscope_studio/components/legacy/Lifecycle/__init__.py @@ -7,7 +7,7 @@ from gradio.events import EventListener from gradio_client.documentation import document, set_documentation_group -from modelscope_studio.utils import resolve_frontend_dir +from ....utils.dev import resolve_frontend_dir set_documentation_group("component") @@ -28,7 +28,7 @@ class LifecycleData(GradioModel): @document() class ModelScopeLifecycle(Component): - FRONTEND_DIR = resolve_frontend_dir("Lifecycle") + FRONTEND_DIR = resolve_frontend_dir("Lifecycle", type='legacy') EVENTS = [ EventListener( diff --git a/backend/modelscope_studio/components/Markdown/__init__.py b/backend/modelscope_studio/components/legacy/Markdown/__init__.py similarity index 96% rename from backend/modelscope_studio/components/Markdown/__init__.py rename to backend/modelscope_studio/components/legacy/Markdown/__init__.py index d0244184..68216ca4 100644 --- a/backend/modelscope_studio/components/Markdown/__init__.py +++ b/backend/modelscope_studio/components/legacy/Markdown/__init__.py @@ -7,8 +7,8 @@ from gradio.events import Events from gradio_client.documentation import document, set_documentation_group -from modelscope_studio.utils import (CustomComponentDict, process_links, - resolve_frontend_dir) +from ....utils.dev import (CustomComponentDict, process_links, + resolve_frontend_dir) set_documentation_group("component") @@ -23,7 +23,7 @@ class ModelScopeMarkdown(Component): Demos: blocks_hello, blocks_kinematics Guides: key-features """ - FRONTEND_DIR = resolve_frontend_dir("Markdown") + FRONTEND_DIR = resolve_frontend_dir("Markdown", type='legacy') EVENTS = [Events.change, "custom"] @staticmethod diff --git a/backend/modelscope_studio/components/MultimodalInput/__init__.py b/backend/modelscope_studio/components/legacy/MultimodalInput/__init__.py similarity index 98% rename from backend/modelscope_studio/components/MultimodalInput/__init__.py rename to backend/modelscope_studio/components/legacy/MultimodalInput/__init__.py index d22eec15..c82b5a00 100644 --- a/backend/modelscope_studio/components/MultimodalInput/__init__.py +++ b/backend/modelscope_studio/components/legacy/MultimodalInput/__init__.py @@ -9,7 +9,7 @@ from gradio_client import utils as client_utils from gradio_client.documentation import document, set_documentation_group -from modelscope_studio.utils import resolve_frontend_dir +from ....utils.dev import resolve_frontend_dir set_documentation_group("component") @@ -30,7 +30,7 @@ class ModelScopeMultimodalInput(FormComponent): Demos: hello_world, diff_texts, sentence_builder Guides: creating-a-chatbot, real-time-speech-recognition """ - FRONTEND_DIR = resolve_frontend_dir("MultimodalInput") + FRONTEND_DIR = resolve_frontend_dir("MultimodalInput", type='legacy') EVENTS = [ Events.change, diff --git a/backend/modelscope_studio/components/WaterfallGallery/__init__.py b/backend/modelscope_studio/components/legacy/WaterfallGallery/__init__.py similarity index 99% rename from backend/modelscope_studio/components/WaterfallGallery/__init__.py rename to backend/modelscope_studio/components/legacy/WaterfallGallery/__init__.py index cc1e1870..7a258efa 100644 --- a/backend/modelscope_studio/components/WaterfallGallery/__init__.py +++ b/backend/modelscope_studio/components/legacy/WaterfallGallery/__init__.py @@ -14,7 +14,7 @@ from gradio_client.utils import is_http_url_like from PIL import Image as _Image # using _ to minimize namespace pollution -from modelscope_studio.utils import resolve_frontend_dir +from ....utils.dev import resolve_frontend_dir set_documentation_group("component") @@ -53,7 +53,7 @@ class ModelScopeWaterfallGallery(Component): doc="Triggered when the image action button is clicked."), "load_more" ] - FRONTEND_DIR = resolve_frontend_dir("WaterfallGallery") + FRONTEND_DIR = resolve_frontend_dir("WaterfallGallery", type='legacy') data_model = GalleryData def __init__(self, diff --git a/backend/modelscope_studio/components/legacy/__init__.py b/backend/modelscope_studio/components/legacy/__init__.py new file mode 100644 index 00000000..6c2db370 --- /dev/null +++ b/backend/modelscope_studio/components/legacy/__init__.py @@ -0,0 +1,6 @@ +from .Chatbot import ModelScopeChatbot as Chatbot +from .Flow import ModelScopeFlow as Flow +from .Lifecycle import ModelScopeLifecycle as Lifecycle +from .Markdown import ModelScopeMarkdown as Markdown +from .MultimodalInput import ModelScopeMultimodalInput as MultimodalInput +from .WaterfallGallery import ModelScopeWaterfallGallery as WaterfallGallery diff --git a/backend/modelscope_studio/external.py b/backend/modelscope_studio/external.py index e82c3017..a54f85f4 100644 --- a/backend/modelscope_studio/external.py +++ b/backend/modelscope_studio/external.py @@ -5,6 +5,7 @@ import gradio import gradio.utils import httpx +import modelscope_studio.components from gradio.blocks import Block, BlockContext, Blocks from gradio.context import Context from gradio.events import EventListenerMethod @@ -13,8 +14,6 @@ from gradio_client.client import Endpoint from packaging import version -import modelscope_studio.components - _endpoint = "https://modelscope.cn" _studio_endpoint = "https://s5k.cn" diff --git a/backend/modelscope_studio/utils/__init__.py b/backend/modelscope_studio/utils/dev/__init__.py similarity index 69% rename from backend/modelscope_studio/utils/__init__.py rename to backend/modelscope_studio/utils/dev/__init__.py index e392f4d3..393cd789 100644 --- a/backend/modelscope_studio/utils/__init__.py +++ b/backend/modelscope_studio/utils/dev/__init__.py @@ -1,13 +1,11 @@ from typing import List, Optional, TypedDict +from .component import * from .process_links import process_links +from .resolve_frontend_dir import * class CustomComponentDict(TypedDict): props: Optional[List[str]] template: Optional[str] js: Optional[str] - - -def resolve_frontend_dir(component: str): - return f"../../../../frontend/{component}" diff --git a/backend/modelscope_studio/utils/dev/component.py b/backend/modelscope_studio/utils/dev/component.py new file mode 100644 index 00000000..3aefb42d --- /dev/null +++ b/backend/modelscope_studio/utils/dev/component.py @@ -0,0 +1,149 @@ +from timeit import Timer +from typing import Any, Callable + +from gradio.component_meta import ComponentMeta +from gradio.components.base import BlockContext, Component + + +class ModelScopeLayoutComponent(BlockContext, metaclass=ComponentMeta): + """ + """ + + EVENTS = [] + + # supported slots + SLOTS = [] + + def __exit__(self, *args, **kwargs): + self._internal.update(layout=True) + super().__exit__(*args, **kwargs) + + def __init__( + self, + *, + as_item: str | None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True): + super().__init__(visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render) + self.as_item = as_item + if self.parent: + self._internal = dict(index=len(self.parent.children) - 1) + else: + self._internal = dict() + + self.elem_style = elem_style + + @property + def skip_api(self): + return True + + +class ModelScopeComponent(Component): + """ + """ + + def __init__( + self, + value: Any = None, + *, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + key: int | str | None = None, + every: Timer | float | None = None, + inputs: Component | list[Component] | set[Component] | None = None, + load_fn: Callable | None = None, + render: bool = True): + super().__init__(visible=visible, + value=value, + elem_id=elem_id, + elem_classes=elem_classes, + key=key, + every=every, + inputs=inputs, + load_fn=load_fn, + render=render) + if self.parent: + self._internal = dict(index=len(self.parent.children) - 1) + else: + self._internal = dict() + self.as_item = as_item + self.elem_style = elem_style + + +class ModelScopeDataLayoutComponent(Component, + BlockContext, + metaclass=ComponentMeta): + """ + """ + EVENTS = [] + # supported slots + SLOTS = [] + + # fix gradio’s bug + @property + def component_class_id(self): + return self.get_component_class_id() + + @component_class_id.setter + def component_class_id(self, value): + pass + + @property + def skip_api(self): + return False + + def __exit__(self, *args, **kwargs): + self._internal.update(layout=True) + super().__exit__(*args, **kwargs) + + def __init__( + self, + value: Any = None, + *, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + key: int | str | None = None, + every: Timer | float | None = None, + inputs: Component | list[Component] | set[Component] | None = None, + load_fn: Callable | None = None, + render: bool = True, + ): + super().__init__( + visible=visible, + value=value, + elem_id=elem_id, + elem_classes=elem_classes, + key=key, + every=every, + inputs=inputs, + load_fn=load_fn, + # disable render twice + render=False) + BlockContext.__init__(self, + visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render) + if self.parent: + self._internal = dict(index=len(self.parent.children) - 1) + else: + self._internal = dict() + self.as_item = as_item + self.elem_style = elem_style diff --git a/backend/modelscope_studio/utils/process_links.py b/backend/modelscope_studio/utils/dev/process_links.py similarity index 100% rename from backend/modelscope_studio/utils/process_links.py rename to backend/modelscope_studio/utils/dev/process_links.py diff --git a/backend/modelscope_studio/utils/dev/resolve_frontend_dir.py b/backend/modelscope_studio/utils/dev/resolve_frontend_dir.py new file mode 100644 index 00000000..676c9c01 --- /dev/null +++ b/backend/modelscope_studio/utils/dev/resolve_frontend_dir.py @@ -0,0 +1,15 @@ +from typing import Literal, Union + + +def resolve_frontend_dir(component: str, + sub_component: Union[str, list, tuple] = None, + type: Literal['antd', 'base'] = 'antd'): + if isinstance(sub_component, list) or isinstance(sub_component, tuple): + dir = '' + for c in sub_component: + dir = dir + f"/{c}" + return f"{'../' * len(sub_component)}../../../../../frontend/{type}/{component}{dir}" + + if (sub_component): + return f"../../../../../../frontend/{type}/{component}/{sub_component}" + return f"../../../../../frontend/{type}/{component}" diff --git a/config/changelog/package.json b/config/changelog/package.json index 13acc534..5450e514 100644 --- a/config/changelog/package.json +++ b/config/changelog/package.json @@ -20,12 +20,12 @@ }, "dependencies": { "@changesets/get-github-info": "^0.6.0", - "@manypkg/get-packages": "^2.2.1", + "@manypkg/get-packages": "^2.2.2", "detect-indent": "^7.0.1" }, "devDependencies": { "@changesets/types": "^6.0.0", - "@types/node": "^20.14.9", - "tsup": "^8.1.0" + "@types/node": "^22.5.4", + "tsup": "^8.2.4" } } diff --git a/config/lint-config/configs/eslint/basic.mjs b/config/lint-config/configs/eslint/basic.mjs index 0ce9c94f..f92eaba2 100644 --- a/config/lint-config/configs/eslint/basic.mjs +++ b/config/lint-config/configs/eslint/basic.mjs @@ -5,7 +5,7 @@ import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended' import simpleImportSort from 'eslint-plugin-simple-import-sort'; import globals from 'globals'; /** - * @type {import('eslint').Linter.FlatConfig[]} + * @type {import('eslint').Linter.Config[]} */ export const basic = [ { diff --git a/config/lint-config/configs/eslint/react.mjs b/config/lint-config/configs/eslint/react.mjs index 25dafd9f..a36a4278 100644 --- a/config/lint-config/configs/eslint/react.mjs +++ b/config/lint-config/configs/eslint/react.mjs @@ -4,7 +4,7 @@ import reactRefresh from 'eslint-plugin-react-refresh'; import { fixupPluginRules } from '@eslint/compat'; import jsxA11y from 'eslint-plugin-jsx-a11y'; /** - * @type {import('eslint').Linter.FlatConfig[]} + * @type {import('eslint').Linter.Config[]} */ export const react = [ eslintPluginReactRecommendedConfig, diff --git a/config/lint-config/configs/eslint/svelte.mjs b/config/lint-config/configs/eslint/svelte.mjs index 18ca2469..2bbdf834 100644 --- a/config/lint-config/configs/eslint/svelte.mjs +++ b/config/lint-config/configs/eslint/svelte.mjs @@ -1,7 +1,7 @@ import eslintPluginSvelte from 'eslint-plugin-svelte'; /** - * @type {import('eslint').Linter.FlatConfig[]} + * @type {import('eslint').Linter.Config[]} */ export const svelte = [ ...eslintPluginSvelte.configs['flat/recommended'], @@ -14,6 +14,7 @@ export const svelte = [ }, rules: { 'svelte/no-at-html-tags': 'off', + 'svelte/valid-compile': 'warn', }, }, ]; diff --git a/config/lint-config/configs/eslint/typescript.mjs b/config/lint-config/configs/eslint/typescript.mjs index 40103e6d..51b0dce5 100644 --- a/config/lint-config/configs/eslint/typescript.mjs +++ b/config/lint-config/configs/eslint/typescript.mjs @@ -1,7 +1,7 @@ import eslintPluginImport from 'eslint-plugin-import'; import tseslint from 'typescript-eslint'; /** - * @type {import('eslint').Linter.FlatConfig[]} + * @type {import('eslint').Linter.Config[]} */ export const typescript = [ ...tseslint.configs.recommended.map((config) => ({ @@ -43,15 +43,11 @@ export const typescript = [ 'warn', { vars: 'all', varsIgnorePattern: '^_' }, ], - '@typescript-eslint/ban-types': [ - 'error', - { - types: { - '{}': false, - }, - extendDefaults: true, - }, - ], + '@typescript-eslint/no-unused-expressions': 'off', + '@typescript-eslint/ban-types': 'off', + '@typescript-eslint/no-empty-object-type': 'off', + '@typescript-eslint/no-wrapper-object-types': 'error', + '@typescript-eslint/no-unsafe-function-type': 'error', // import type '@typescript-eslint/consistent-type-imports': [ 'error', diff --git a/config/lint-config/eslint.mjs b/config/lint-config/eslint.mjs index 75119b48..9deefb5b 100644 --- a/config/lint-config/eslint.mjs +++ b/config/lint-config/eslint.mjs @@ -5,6 +5,6 @@ import { svelte } from './configs/eslint/svelte.mjs'; import { typescript } from './configs/eslint/typescript.mjs'; /** - * @type {import('eslint').Linter.FlatConfig[]} + * @type {import('eslint').Linter.Config[]} */ export default [].concat(basic, react, typescript, svelte); diff --git a/config/lint-config/package.json b/config/lint-config/package.json index b6f42aa5..24e6235d 100644 --- a/config/lint-config/package.json +++ b/config/lint-config/package.json @@ -16,19 +16,19 @@ } }, "dependencies": { - "@eslint/compat": "^1.1.0", - "@eslint/js": "^9.5.0", - "@typescript-eslint/parser": "^7.14.1", + "@eslint/compat": "^1.1.1", + "@eslint/js": "^9.7.0", + "@typescript-eslint/parser": "^8.5.0", "eslint-config-prettier": "^9.0.0", "eslint-import-resolver-typescript": "^3.6.0", "eslint-plugin-import": "^2.29.1", "eslint-plugin-jsx-a11y": "^6.9.0", - "eslint-plugin-prettier": "5.1.3", - "eslint-plugin-react": "^7.34.3", + "eslint-plugin-prettier": "5.2.1", + "eslint-plugin-react": "^7.36.1", "eslint-plugin-react-hooks": "^4.6.2", - "eslint-plugin-react-refresh": "^0.4.7", + "eslint-plugin-react-refresh": "^0.4.8", "eslint-plugin-simple-import-sort": "^12.1.0", - "eslint-plugin-svelte": "^2.41.0", + "eslint-plugin-svelte": "^2.42.0", "globals": "^15.6.0", "postcss": "^8.4.38", "postcss-less": "^6.0.0", @@ -37,12 +37,12 @@ "stylelint-config-standard": "^36.0.1", "stylelint-declaration-block-no-ignored-properties": "^2.8.0", "stylelint-order": "^6.0.4", - "stylelint-prettier": "^5.0.0", - "svelte-eslint-parser": "^0.39.2", - "typescript-eslint": "^7.14.1" + "stylelint-prettier": "^5.0.2", + "svelte-eslint-parser": "^0.41.0", + "typescript-eslint": "^8.5.0" }, "devDependencies": { - "@types/eslint": "^8.56.10", + "@types/eslint": "^9.6.1", "@types/eslint__js": "^8.42.3" } } diff --git a/docs/components/Chatbot/demos/accordion.py b/docs/components/Chatbot/demos/accordion.py index 2f6430bd..52adf6d4 100644 --- a/docs/components/Chatbot/demos/accordion.py +++ b/docs/components/Chatbot/demos/accordion.py @@ -1,7 +1,6 @@ import os import gradio as gr - import modelscope_studio as mgr from modelscope_studio.components.Chatbot.llm_thinking_presets import qwen diff --git a/docs/components/Chatbot/demos/basic.py b/docs/components/Chatbot/demos/basic.py index 6c5361d9..3dc3981f 100644 --- a/docs/components/Chatbot/demos/basic.py +++ b/docs/components/Chatbot/demos/basic.py @@ -2,7 +2,6 @@ import time import gradio as gr - import modelscope_studio as mgr conversation = [ diff --git a/docs/components/Chatbot/demos/chart.py b/docs/components/Chatbot/demos/chart.py index c07b3e0e..0dc39313 100644 --- a/docs/components/Chatbot/demos/chart.py +++ b/docs/components/Chatbot/demos/chart.py @@ -1,7 +1,6 @@ import json import gradio as gr - import modelscope_studio as mgr # echarts options, see: https://echarts.apache.org/en/index.html diff --git a/docs/components/Chatbot/demos/message_config.py b/docs/components/Chatbot/demos/message_config.py index b2fe3e1b..12566f3c 100644 --- a/docs/components/Chatbot/demos/message_config.py +++ b/docs/components/Chatbot/demos/message_config.py @@ -1,7 +1,6 @@ import time import gradio as gr - import modelscope_studio as mgr diff --git a/docs/components/Chatbot/demos/multi_bots.py b/docs/components/Chatbot/demos/multi_bots.py index ea167a88..e789d4b2 100644 --- a/docs/components/Chatbot/demos/multi_bots.py +++ b/docs/components/Chatbot/demos/multi_bots.py @@ -2,7 +2,6 @@ import time import gradio as gr - import modelscope_studio as mgr diff --git a/docs/components/Chatbot/demos/multimodal.py b/docs/components/Chatbot/demos/multimodal.py index 28aebe4c..840349ac 100644 --- a/docs/components/Chatbot/demos/multimodal.py +++ b/docs/components/Chatbot/demos/multimodal.py @@ -1,7 +1,6 @@ import os import gradio as gr - import modelscope_studio as mgr diff --git a/docs/components/Chatbot/demos/select-box.py b/docs/components/Chatbot/demos/select-box.py index 6035ba30..97b73cf9 100644 --- a/docs/components/Chatbot/demos/select-box.py +++ b/docs/components/Chatbot/demos/select-box.py @@ -1,7 +1,6 @@ import json import gradio as gr - import modelscope_studio as mgr # `label` will display on the page, and `value` is the actual selected value. diff --git a/docs/components/Docs.py b/docs/components/Docs.py index 71d863bb..bac94ab8 100644 --- a/docs/components/Docs.py +++ b/docs/components/Docs.py @@ -3,7 +3,6 @@ from typing import Callable import gradio as gr - import modelscope_studio as mgr from .parse_markdown import parse_markdown diff --git a/docs/components/Flow/demos/basic.py b/docs/components/Flow/demos/basic.py index 920e7fc5..313148e5 100644 --- a/docs/components/Flow/demos/basic.py +++ b/docs/components/Flow/demos/basic.py @@ -2,7 +2,6 @@ import os import gradio as gr - import modelscope_studio as mgr from modelscope_studio.components.Flow import Edge, Node diff --git a/docs/components/Flow/demos/component_options.py b/docs/components/Flow/demos/component_options.py index b080470f..9f6630eb 100644 --- a/docs/components/Flow/demos/component_options.py +++ b/docs/components/Flow/demos/component_options.py @@ -2,7 +2,6 @@ import os import gradio as gr - import modelscope_studio as mgr from modelscope_studio.components.Flow import BackgroundPropsDict, Edge, Node diff --git a/docs/components/Flow/demos/custom_node_type.py b/docs/components/Flow/demos/custom_node_type.py index e40d3e40..e02ab56a 100644 --- a/docs/components/Flow/demos/custom_node_type.py +++ b/docs/components/Flow/demos/custom_node_type.py @@ -1,5 +1,4 @@ import gradio as gr - import modelscope_studio as mgr from modelscope_studio.components.Flow import (FlowSchemaDict, Node, NodeSchemaAttributeDict, diff --git a/docs/components/Lifecycle/demos/basic.py b/docs/components/Lifecycle/demos/basic.py index a7c36168..8ba43704 100644 --- a/docs/components/Lifecycle/demos/basic.py +++ b/docs/components/Lifecycle/demos/basic.py @@ -1,5 +1,4 @@ import gradio as gr - import modelscope_studio as mgr diff --git a/docs/components/Lifecycle/demos/language_adaptation.py b/docs/components/Lifecycle/demos/language_adaptation.py index 9b504300..39321366 100644 --- a/docs/components/Lifecycle/demos/language_adaptation.py +++ b/docs/components/Lifecycle/demos/language_adaptation.py @@ -1,7 +1,6 @@ import time import gradio as gr - import modelscope_studio as mgr messages = { diff --git a/docs/components/Lifecycle/demos/theme_adaptation.py b/docs/components/Lifecycle/demos/theme_adaptation.py index dc6a1287..79ca97f4 100644 --- a/docs/components/Lifecycle/demos/theme_adaptation.py +++ b/docs/components/Lifecycle/demos/theme_adaptation.py @@ -1,5 +1,4 @@ import gradio as gr - import modelscope_studio as mgr diff --git a/docs/components/Markdown/demos/accordion.py b/docs/components/Markdown/demos/accordion.py index 924b3548..360e0c8b 100644 --- a/docs/components/Markdown/demos/accordion.py +++ b/docs/components/Markdown/demos/accordion.py @@ -1,5 +1,4 @@ import gradio as gr - import modelscope_studio as mgr with gr.Blocks() as demo: diff --git a/docs/components/Markdown/demos/basic.py b/docs/components/Markdown/demos/basic.py index 2c423e26..2b9ab5b2 100644 --- a/docs/components/Markdown/demos/basic.py +++ b/docs/components/Markdown/demos/basic.py @@ -1,5 +1,4 @@ import gradio as gr - import modelscope_studio as mgr with gr.Blocks() as demo: diff --git a/docs/components/Markdown/demos/chart.py b/docs/components/Markdown/demos/chart.py index e611b159..747eb97b 100644 --- a/docs/components/Markdown/demos/chart.py +++ b/docs/components/Markdown/demos/chart.py @@ -1,7 +1,6 @@ import json import gradio as gr - import modelscope_studio as mgr # echarts options, see: https://echarts.apache.org/en/index.html diff --git a/docs/components/Markdown/demos/custom-tag.py b/docs/components/Markdown/demos/custom-tag.py index 530e7027..0863397c 100644 --- a/docs/components/Markdown/demos/custom-tag.py +++ b/docs/components/Markdown/demos/custom-tag.py @@ -1,5 +1,4 @@ import gradio as gr - import modelscope_studio as mgr with gr.Blocks() as demo: diff --git a/docs/components/Markdown/demos/custom-tag2.py b/docs/components/Markdown/demos/custom-tag2.py index ecbcb487..4958e567 100644 --- a/docs/components/Markdown/demos/custom-tag2.py +++ b/docs/components/Markdown/demos/custom-tag2.py @@ -1,5 +1,4 @@ import gradio as gr - import modelscope_studio as mgr with gr.Blocks() as demo: diff --git a/docs/components/Markdown/demos/custom-tag3.py b/docs/components/Markdown/demos/custom-tag3.py index c87a9e19..0d4c206e 100644 --- a/docs/components/Markdown/demos/custom-tag3.py +++ b/docs/components/Markdown/demos/custom-tag3.py @@ -2,7 +2,6 @@ import os import gradio as gr - import modelscope_studio as mgr options = ["a", "b", "c"] diff --git a/docs/components/Markdown/demos/custom-tag4.py b/docs/components/Markdown/demos/custom-tag4.py index 4f8e8a81..62bf8098 100644 --- a/docs/components/Markdown/demos/custom-tag4.py +++ b/docs/components/Markdown/demos/custom-tag4.py @@ -2,7 +2,6 @@ import os import gradio as gr - import modelscope_studio as mgr options = ["a", "b", "c"] diff --git a/docs/components/Markdown/demos/custom_tags/accordion/accordion-title.py b/docs/components/Markdown/demos/custom_tags/accordion/accordion-title.py index 1b692f01..728b089a 100644 --- a/docs/components/Markdown/demos/custom_tags/accordion/accordion-title.py +++ b/docs/components/Markdown/demos/custom_tags/accordion/accordion-title.py @@ -1,5 +1,4 @@ import gradio as gr - import modelscope_studio as mgr with gr.Blocks() as demo: diff --git a/docs/components/Markdown/demos/custom_tags/accordion/basic.py b/docs/components/Markdown/demos/custom_tags/accordion/basic.py index 724b9f5c..cfa9d290 100644 --- a/docs/components/Markdown/demos/custom_tags/accordion/basic.py +++ b/docs/components/Markdown/demos/custom_tags/accordion/basic.py @@ -1,5 +1,4 @@ import gradio as gr - import modelscope_studio as mgr with gr.Blocks() as demo: diff --git a/docs/components/Markdown/demos/custom_tags/chart/basic.py b/docs/components/Markdown/demos/custom_tags/chart/basic.py index 53d5f776..0a7688bb 100644 --- a/docs/components/Markdown/demos/custom_tags/chart/basic.py +++ b/docs/components/Markdown/demos/custom_tags/chart/basic.py @@ -1,7 +1,6 @@ import json import gradio as gr - import modelscope_studio as mgr # echarts options, see: https://echarts.apache.org/en/index.html diff --git a/docs/components/Markdown/demos/custom_tags/select-box/basic.py b/docs/components/Markdown/demos/custom_tags/select-box/basic.py index eb03c2fe..52fea57a 100644 --- a/docs/components/Markdown/demos/custom_tags/select-box/basic.py +++ b/docs/components/Markdown/demos/custom_tags/select-box/basic.py @@ -1,7 +1,6 @@ import json import gradio as gr - import modelscope_studio as mgr options = [{"label": "A", "value": "a"}, "b", "c"] diff --git a/docs/components/Markdown/demos/custom_tags/select-box/card_shape.py b/docs/components/Markdown/demos/custom_tags/select-box/card_shape.py index b2813b85..ca9a39bf 100644 --- a/docs/components/Markdown/demos/custom_tags/select-box/card_shape.py +++ b/docs/components/Markdown/demos/custom_tags/select-box/card_shape.py @@ -2,7 +2,6 @@ import os import gradio as gr - import modelscope_studio as mgr # Card shape supports setting `imgSrc` as the cover. diff --git a/docs/components/Markdown/demos/custom_tags/select-box/card_shape_width_auto.py b/docs/components/Markdown/demos/custom_tags/select-box/card_shape_width_auto.py index 41e9f63b..437fcacd 100644 --- a/docs/components/Markdown/demos/custom_tags/select-box/card_shape_width_auto.py +++ b/docs/components/Markdown/demos/custom_tags/select-box/card_shape_width_auto.py @@ -2,7 +2,6 @@ import os import gradio as gr - import modelscope_studio as mgr # Card shape supports setting `imgSrc` as the cover. diff --git a/docs/components/Markdown/demos/custom_tags/select-box/python_events.py b/docs/components/Markdown/demos/custom_tags/select-box/python_events.py index dd585e7a..d77b89a4 100644 --- a/docs/components/Markdown/demos/custom_tags/select-box/python_events.py +++ b/docs/components/Markdown/demos/custom_tags/select-box/python_events.py @@ -1,7 +1,6 @@ import json import gradio as gr - import modelscope_studio as mgr options = [{"label": "A", "value": "a"}, "b", "c"] diff --git a/docs/components/Markdown/demos/multimodal.py b/docs/components/Markdown/demos/multimodal.py index ecc5928e..3bffaab3 100644 --- a/docs/components/Markdown/demos/multimodal.py +++ b/docs/components/Markdown/demos/multimodal.py @@ -1,7 +1,6 @@ import os import gradio as gr - import modelscope_studio as mgr diff --git a/docs/components/Markdown/demos/select-box.py b/docs/components/Markdown/demos/select-box.py index 9b69862b..7f5da713 100644 --- a/docs/components/Markdown/demos/select-box.py +++ b/docs/components/Markdown/demos/select-box.py @@ -1,7 +1,6 @@ import json import gradio as gr - import modelscope_studio as mgr # `label` will display on the page, and `value` is the actual selected value. diff --git a/docs/components/MultimodalInput/demos/basic.py b/docs/components/MultimodalInput/demos/basic.py index 67d7470d..55249c4b 100644 --- a/docs/components/MultimodalInput/demos/basic.py +++ b/docs/components/MultimodalInput/demos/basic.py @@ -1,5 +1,4 @@ import gradio as gr - import modelscope_studio as mgr diff --git a/docs/components/MultimodalInput/demos/config_buttons.py b/docs/components/MultimodalInput/demos/config_buttons.py index 493c59a6..6b73382b 100644 --- a/docs/components/MultimodalInput/demos/config_buttons.py +++ b/docs/components/MultimodalInput/demos/config_buttons.py @@ -1,5 +1,4 @@ import gradio as gr - import modelscope_studio as mgr diff --git a/docs/components/MultimodalInput/demos/upload_sources.py b/docs/components/MultimodalInput/demos/upload_sources.py index 2e9b5476..e9caff69 100644 --- a/docs/components/MultimodalInput/demos/upload_sources.py +++ b/docs/components/MultimodalInput/demos/upload_sources.py @@ -1,5 +1,4 @@ import gradio as gr - import modelscope_studio as mgr diff --git a/docs/components/MultimodalInput/demos/with_chatbot.py b/docs/components/MultimodalInput/demos/with_chatbot.py index 6ad7784a..fe48acad 100644 --- a/docs/components/MultimodalInput/demos/with_chatbot.py +++ b/docs/components/MultimodalInput/demos/with_chatbot.py @@ -1,7 +1,6 @@ import time import gradio as gr - import modelscope_studio as mgr diff --git a/docs/components/WaterfallGallery/demos/basic.py b/docs/components/WaterfallGallery/demos/basic.py index 7f1c2760..8077244b 100644 --- a/docs/components/WaterfallGallery/demos/basic.py +++ b/docs/components/WaterfallGallery/demos/basic.py @@ -1,7 +1,6 @@ import os import gradio as gr - import modelscope_studio as mgr diff --git a/docs/components/WaterfallGallery/demos/like_click_feedback.py b/docs/components/WaterfallGallery/demos/like_click_feedback.py index 10e2c37d..3d3bc39e 100644 --- a/docs/components/WaterfallGallery/demos/like_click_feedback.py +++ b/docs/components/WaterfallGallery/demos/like_click_feedback.py @@ -1,7 +1,6 @@ import os import gradio as gr - import modelscope_studio as mgr diff --git a/docs/components/WaterfallGallery/demos/load_more.py b/docs/components/WaterfallGallery/demos/load_more.py index a6a23e78..835b20e5 100644 --- a/docs/components/WaterfallGallery/demos/load_more.py +++ b/docs/components/WaterfallGallery/demos/load_more.py @@ -2,7 +2,6 @@ import time import gradio as gr - import modelscope_studio as mgr diff --git a/docs/components/WaterfallGallery/demos/responsive_columns.py b/docs/components/WaterfallGallery/demos/responsive_columns.py index f6bded30..938efb7f 100644 --- a/docs/components/WaterfallGallery/demos/responsive_columns.py +++ b/docs/components/WaterfallGallery/demos/responsive_columns.py @@ -1,7 +1,6 @@ import os import gradio as gr - import modelscope_studio as mgr diff --git a/frontend/CHANGELOG.md b/frontend/CHANGELOG.md deleted file mode 100644 index b3554459..00000000 --- a/frontend/CHANGELOG.md +++ /dev/null @@ -1,21 +0,0 @@ -# @modelscope-studio/frontend - -## 0.4.2 - -No significant changes to this package were made in this release. - -## 0.4.1 - -No significant changes to this package were made in this release. - -## 0.4.0 - -No significant changes to this package were made in this release. - -## 0.3.1 - -No significant changes to this package were made in this release. - -## 0.3.0 - -No significant changes to this package were made in this release. diff --git a/frontend/Chatbot/gradio.config.js b/frontend/Chatbot/gradio.config.js deleted file mode 100644 index a185f7a6..00000000 --- a/frontend/Chatbot/gradio.config.js +++ /dev/null @@ -1,6 +0,0 @@ -export default { - plugins: [], - svelte: { - preprocess: [], - }, -}; diff --git a/frontend/Chatbot/package.json b/frontend/Chatbot/package.json deleted file mode 100644 index 8fad3b26..00000000 --- a/frontend/Chatbot/package.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "name": "@modelscope-studio/chatbot", - "version": "0.4.2", - "private": false, - "description": "ModelScope Gradio Components", - "repository": "git@github.com:modelscope/modelscope-studio.git", - "license": "Apache-2.0", - "type": "module", - "exports": { - ".": "./Index.svelte", - "./package.json": "./package.json" - }, - "dependencies": { - "@gradio/atoms": "0.7.4", - "@gradio/client": "1.1.1", - "@gradio/icons": "0.4.1", - "@gradio/statustracker": "0.6.0", - "@gradio/utils": "0.4.2", - "@modelscope-studio/compiled": "workspace:*", - "@modelscope-studio/shared": "workspace:*", - "dequal": "^2.0.3" - }, - "devDependencies": { - "@gradio/preview": "0.9.1" - }, - "main_changeset": true -} diff --git a/frontend/Flow/gradio.config.js b/frontend/Flow/gradio.config.js deleted file mode 100644 index a185f7a6..00000000 --- a/frontend/Flow/gradio.config.js +++ /dev/null @@ -1,6 +0,0 @@ -export default { - plugins: [], - svelte: { - preprocess: [], - }, -}; diff --git a/frontend/Markdown/gradio.config.js b/frontend/Markdown/gradio.config.js deleted file mode 100644 index a185f7a6..00000000 --- a/frontend/Markdown/gradio.config.js +++ /dev/null @@ -1,6 +0,0 @@ -export default { - plugins: [], - svelte: { - preprocess: [], - }, -}; diff --git a/frontend/MultimodalInput/gradio.config.js b/frontend/MultimodalInput/gradio.config.js deleted file mode 100644 index a185f7a6..00000000 --- a/frontend/MultimodalInput/gradio.config.js +++ /dev/null @@ -1,6 +0,0 @@ -export default { - plugins: [], - svelte: { - preprocess: [], - }, -}; diff --git a/frontend/MultimodalInput/package.json b/frontend/MultimodalInput/package.json deleted file mode 100644 index 1d757150..00000000 --- a/frontend/MultimodalInput/package.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "name": "@modelscope-studio/multimodal-input", - "version": "0.4.2", - "private": false, - "description": "ModelScope Gradio Components", - "repository": "git@github.com:modelscope/modelscope-studio.git", - "license": "Apache-2.0", - "type": "module", - "exports": { - ".": "./Index.svelte", - "./example": "./Example.svelte", - "./package.json": "./package.json" - }, - "dependencies": { - "@gradio/atoms": "0.7.4", - "@gradio/button": "^0.2.43", - "@gradio/client": "1.1.1", - "@gradio/icons": "0.4.1", - "@gradio/statustracker": "0.6.0", - "@gradio/utils": "0.4.2", - "@modelscope-studio/compiled": "workspace:*", - "@modelscope-studio/shared": "workspace:*", - "wavesurfer.js": "^7.8.0" - }, - "devDependencies": { - "@gradio/preview": "0.9.1" - }, - "main_changeset": true -} diff --git a/frontend/WaterfallGallery/gradio.config.js b/frontend/WaterfallGallery/gradio.config.js deleted file mode 100644 index a185f7a6..00000000 --- a/frontend/WaterfallGallery/gradio.config.js +++ /dev/null @@ -1,6 +0,0 @@ -export default { - plugins: [], - svelte: { - preprocess: [], - }, -}; diff --git a/frontend/WaterfallGallery/package.json b/frontend/WaterfallGallery/package.json deleted file mode 100644 index 678c45b5..00000000 --- a/frontend/WaterfallGallery/package.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "name": "@modelscope-studio/waterfall-gallery", - "version": "0.4.2", - "description": "ModelScope Gradio Components", - "repository": "git@github.com:modelscope/modelscope-studio.git", - "license": "Apache-2.0", - "author": "", - "type": "module", - "exports": { - ".": "./Index.svelte", - "./package.json": "./package.json" - }, - "dependencies": { - "@gradio/atoms": "0.7.4", - "@gradio/button": "^0.2.43", - "@gradio/client": "1.1.1", - "@gradio/icons": "0.4.1", - "@gradio/statustracker": "0.6.0", - "@gradio/upload": "0.11.2", - "@gradio/utils": "0.4.2", - "@modelscope-studio/shared": "workspace:*", - "dequal": "^2.0.2" - }, - "devDependencies": { - "@gradio/preview": "0.9.1" - }, - "main_changeset": true -} diff --git a/frontend/antd/affix/Index.svelte b/frontend/antd/affix/Index.svelte new file mode 100644 index 00000000..993510e8 --- /dev/null +++ b/frontend/antd/affix/Index.svelte @@ -0,0 +1,70 @@ + + + + +{#if $mergedProps.visible} + {#await AwaitedAffix then Affix} + + + + {/await} +{/if} + + diff --git a/frontend/antd/affix/affix.tsx b/frontend/antd/affix/affix.tsx new file mode 100644 index 00000000..b19b73a5 --- /dev/null +++ b/frontend/antd/affix/affix.tsx @@ -0,0 +1,13 @@ +import { sveltify } from '@svelte-preprocess-react'; +import React from 'react'; +import { useFunction } from '@utils/hooks/useFunction'; +import { Affix as AAffix, type GetProps } from 'antd'; + +export const Affix = sveltify>( + ({ target, ...props }) => { + const targetFunction = useFunction(target); + return ; + } +); + +export default Affix; diff --git a/frontend/antd/affix/gradio.config.js b/frontend/antd/affix/gradio.config.js new file mode 100644 index 00000000..916857c0 --- /dev/null +++ b/frontend/antd/affix/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/affix/package.json b/frontend/antd/affix/package.json new file mode 100644 index 00000000..ea4cf744 --- /dev/null +++ b/frontend/antd/affix/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-affix", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/alert/Index.svelte b/frontend/antd/alert/Index.svelte new file mode 100644 index 00000000..0bba37c8 --- /dev/null +++ b/frontend/antd/alert/Index.svelte @@ -0,0 +1,70 @@ + + + + +{#if $mergedProps.visible} + {#await AwaitedAlert then Alert} + + + + {/await} +{/if} + + diff --git a/frontend/antd/alert/alert.tsx b/frontend/antd/alert/alert.tsx new file mode 100644 index 00000000..3356eca7 --- /dev/null +++ b/frontend/antd/alert/alert.tsx @@ -0,0 +1,40 @@ +import { sveltify } from '@svelte-preprocess-react'; +import { ReactSlot } from '@svelte-preprocess-react/react-slot'; +import React from 'react'; +import { useFunction } from '@utils/hooks/useFunction'; +import { Alert as AAlert, type GetProps } from 'antd'; + +export const Alert = sveltify< + GetProps, + ['action', 'closable.closeIcon', 'description', 'icon', 'message'] +>(({ slots, afterClose, ...props }) => { + const afterCloseFunction = useFunction(afterClose); + return ( + : props.action} + closable={ + slots['closable.closeIcon'] + ? { + ...(typeof props.closable === 'object' ? props.closable : {}), + closeIcon: , + } + : props.closable + } + description={ + slots.description ? ( + + ) : ( + props.description + ) + } + icon={slots.icon ? : props.icon} + message={ + slots.message ? : props.message + } + /> + ); +}); + +export default Alert; diff --git a/frontend/antd/alert/error-boundary/Index.svelte b/frontend/antd/alert/error-boundary/Index.svelte new file mode 100644 index 00000000..dfa2bcf5 --- /dev/null +++ b/frontend/antd/alert/error-boundary/Index.svelte @@ -0,0 +1,75 @@ + + + + +{#if $mergedProps.visible} + {#await AwaitedAlertErrorBoundary then AlertErrorBoundary} + + + + {/await} +{/if} + + diff --git a/frontend/antd/alert/error-boundary/alert.error-boundary.tsx b/frontend/antd/alert/error-boundary/alert.error-boundary.tsx new file mode 100644 index 00000000..a354c3b1 --- /dev/null +++ b/frontend/antd/alert/error-boundary/alert.error-boundary.tsx @@ -0,0 +1,27 @@ +import { sveltify } from '@svelte-preprocess-react'; +import { ReactSlot } from '@svelte-preprocess-react/react-slot'; +import React from 'react'; +import { Alert as AAlert, type GetProps } from 'antd'; + +export const AlertErrorBoundary = sveltify< + GetProps, + ['description', 'message'] +>(({ slots, ...props }) => { + return ( + + ) : ( + props.description + ) + } + message={ + slots.message ? : props.message + } + /> + ); +}); + +export default AlertErrorBoundary; diff --git a/frontend/antd/alert/error-boundary/gradio.config.js b/frontend/antd/alert/error-boundary/gradio.config.js new file mode 100644 index 00000000..1992403d --- /dev/null +++ b/frontend/antd/alert/error-boundary/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/alert/error-boundary/package.json b/frontend/antd/alert/error-boundary/package.json new file mode 100644 index 00000000..d27b6db0 --- /dev/null +++ b/frontend/antd/alert/error-boundary/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-alert.error-boundary", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/alert/gradio.config.js b/frontend/antd/alert/gradio.config.js new file mode 100644 index 00000000..916857c0 --- /dev/null +++ b/frontend/antd/alert/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/alert/package.json b/frontend/antd/alert/package.json new file mode 100644 index 00000000..8dca7359 --- /dev/null +++ b/frontend/antd/alert/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-alert", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/anchor/Index.svelte b/frontend/antd/anchor/Index.svelte new file mode 100644 index 00000000..d22cd0b3 --- /dev/null +++ b/frontend/antd/anchor/Index.svelte @@ -0,0 +1,74 @@ + + + + +{#if $mergedProps.visible} + {#await AwaitedAnchor then Anchor} + 0 ? $items : $children} + > + + + {/await} +{/if} + + diff --git a/frontend/antd/anchor/anchor.tsx b/frontend/antd/anchor/anchor.tsx new file mode 100644 index 00000000..f01ff77e --- /dev/null +++ b/frontend/antd/anchor/anchor.tsx @@ -0,0 +1,45 @@ +import { sveltify } from '@svelte-preprocess-react'; +import React, { useMemo } from 'react'; +import { useFunction } from '@utils/hooks/useFunction'; +import { renderItems } from '@utils/renderItems'; +import { Anchor as AAnchor, type GetProps } from 'antd'; + +import { type Item } from './context'; + +type AnchorProps = GetProps; +export const Anchor = sveltify< + AnchorProps & { + slotItems: Item[]; + } +>( + ({ + getContainer, + getCurrentAnchor, + children, + items, + slotItems, + ...props + }) => { + const getContainerFunction = useFunction(getContainer); + const getCurrentAnchorFunction = useFunction(getCurrentAnchor); + return ( + <> + {children} + { + // ["title"] + return ( + items || + renderItems[number]>(slotItems) + ); + }, [items, slotItems])} + getContainer={getContainerFunction} + getCurrentAnchor={getCurrentAnchorFunction} + /> + + ); + } +); + +export default Anchor; diff --git a/frontend/antd/anchor/context.ts b/frontend/antd/anchor/context.ts new file mode 100644 index 00000000..5512087d --- /dev/null +++ b/frontend/antd/anchor/context.ts @@ -0,0 +1,6 @@ +import { createItemsContext } from '@utils/createItemsContext'; + +const { getItems, getSetItemFn } = createItemsContext('anchor'); + +export { getItems, getSetItemFn }; +export * from '@utils/createItemsContext'; diff --git a/frontend/antd/anchor/gradio.config.js b/frontend/antd/anchor/gradio.config.js new file mode 100644 index 00000000..916857c0 --- /dev/null +++ b/frontend/antd/anchor/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/anchor/item/Index.svelte b/frontend/antd/anchor/item/Index.svelte new file mode 100644 index 00000000..521141c1 --- /dev/null +++ b/frontend/antd/anchor/item/Index.svelte @@ -0,0 +1,78 @@ + + + + +{#if $mergedProps.visible} + +{/if} + + diff --git a/frontend/antd/anchor/item/gradio.config.js b/frontend/antd/anchor/item/gradio.config.js new file mode 100644 index 00000000..1992403d --- /dev/null +++ b/frontend/antd/anchor/item/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/anchor/item/package.json b/frontend/antd/anchor/item/package.json new file mode 100644 index 00000000..cbc6131a --- /dev/null +++ b/frontend/antd/anchor/item/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-anchor.item", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/anchor/package.json b/frontend/antd/anchor/package.json new file mode 100644 index 00000000..e94ace69 --- /dev/null +++ b/frontend/antd/anchor/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-anchor", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/auto-complete/Index.svelte b/frontend/antd/auto-complete/Index.svelte new file mode 100644 index 00000000..ebe1b4c5 --- /dev/null +++ b/frontend/antd/auto-complete/Index.svelte @@ -0,0 +1,80 @@ + + + + +{#if $mergedProps.visible} + {#await AwaitedAutoComplete then AutoComplete} + 0 ? $options : $children} + onValueChange={(v) => { + value = v; + }} + > + + + {/await} +{/if} + + diff --git a/frontend/antd/auto-complete/auto-complete.tsx b/frontend/antd/auto-complete/auto-complete.tsx new file mode 100644 index 00000000..48d6cd35 --- /dev/null +++ b/frontend/antd/auto-complete/auto-complete.tsx @@ -0,0 +1,106 @@ +import { sveltify } from '@svelte-preprocess-react'; +import { AutoCompleteContext } from '@svelte-preprocess-react/context'; +import { ReactSlot } from '@svelte-preprocess-react/react-slot'; +import { forwardRef, useMemo } from 'react'; +import { useFunction } from '@utils/hooks/useFunction'; +import { renderItems } from '@utils/renderItems'; +import { AutoComplete as AAutoComplete, type GetProps } from 'antd'; + +import { type Item } from './context'; + +// eslint-disable-next-line react/display-name +const AutoCompleteChildrenWrapper = forwardRef< + HTMLElement, + { children?: React.ReactNode } +>(({ children, ...props }, ref) => { + return ( + { + return { + ...props, + elRef: ref, + }; + }, [props, ref])} + > + {children} + + ); +}); + +export const AutoComplete = sveltify< + GetProps & { + optionItems: Item[]; + onValueChange: (value: string) => void; + }, + ['allowClear.clearIcon', 'children', 'notFoundContent'] +>( + ({ + slots, + children, + onValueChange, + filterOption, + onChange, + options, + optionItems, + getPopupContainer, + dropdownRender, + elRef, + ...props + }) => { + const getPopupContainerFunction = useFunction(getPopupContainer); + const filterOptionFunction = useFunction(filterOption); + const dropdownRenderFunction = useFunction(dropdownRender); + return ( + <> + {slots.children ? null : ( +
{children}
+ )} + + , + } + : props.allowClear + } + options={useMemo(() => { + return ( + options || + renderItems< + NonNullable['options']>[number] + >(optionItems, { + children: 'options', + }) + ); + }, [optionItems, options])} + onChange={(v, ...args) => { + onChange?.(v, ...args); + onValueChange(v as string); + }} + notFoundContent={ + slots.notFoundContent ? ( + + ) : ( + props.notFoundContent + ) + } + filterOption={filterOptionFunction || filterOption} + getPopupContainer={getPopupContainerFunction} + dropdownRender={dropdownRenderFunction} + > + {slots.children ? ( + +
{children}
+ +
+ ) : null} +
+ + ); + } +); + +export default AutoComplete; diff --git a/frontend/antd/auto-complete/context.ts b/frontend/antd/auto-complete/context.ts new file mode 100644 index 00000000..f592e218 --- /dev/null +++ b/frontend/antd/auto-complete/context.ts @@ -0,0 +1,6 @@ +import { createItemsContext } from '@utils/createItemsContext'; + +const { getItems, getSetItemFn } = createItemsContext('auto-complete'); + +export { getItems, getSetItemFn }; +export * from '@utils/createItemsContext'; diff --git a/frontend/antd/auto-complete/gradio.config.js b/frontend/antd/auto-complete/gradio.config.js new file mode 100644 index 00000000..916857c0 --- /dev/null +++ b/frontend/antd/auto-complete/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/auto-complete/option/Index.svelte b/frontend/antd/auto-complete/option/Index.svelte new file mode 100644 index 00000000..835d5eb6 --- /dev/null +++ b/frontend/antd/auto-complete/option/Index.svelte @@ -0,0 +1,91 @@ + + + + +{#if $mergedProps.visible} + +{/if} + + diff --git a/frontend/antd/auto-complete/option/gradio.config.js b/frontend/antd/auto-complete/option/gradio.config.js new file mode 100644 index 00000000..1992403d --- /dev/null +++ b/frontend/antd/auto-complete/option/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/auto-complete/option/package.json b/frontend/antd/auto-complete/option/package.json new file mode 100644 index 00000000..9ccc8bb6 --- /dev/null +++ b/frontend/antd/auto-complete/option/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-auto-complete.option", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/auto-complete/package.json b/frontend/antd/auto-complete/package.json new file mode 100644 index 00000000..dcce510c --- /dev/null +++ b/frontend/antd/auto-complete/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-auto-complete", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/avatar/Index.svelte b/frontend/antd/avatar/Index.svelte new file mode 100644 index 00000000..b40be400 --- /dev/null +++ b/frontend/antd/avatar/Index.svelte @@ -0,0 +1,75 @@ + + + + + +{#if $mergedProps.visible} + {#await AwaitedAvatar then Avatar} + + + + {/await} +{/if} + + diff --git a/frontend/antd/avatar/avatar.tsx b/frontend/antd/avatar/avatar.tsx new file mode 100644 index 00000000..e4171fce --- /dev/null +++ b/frontend/antd/avatar/avatar.tsx @@ -0,0 +1,23 @@ +import { sveltify } from '@svelte-preprocess-react'; +import { ReactSlot } from '@svelte-preprocess-react/react-slot'; +import React from 'react'; +import { Avatar as AAvatar, type GetProps } from 'antd'; + +export const Avatar = sveltify, ['icon', 'src']>( + ({ slots, children, ...props }) => { + return ( + <> + {slots.icon ? children : null} + : props.icon} + src={slots.src ? : props.src} + > + {slots.icon ? null : children} + + + ); + } +); + +export default Avatar; diff --git a/frontend/antd/avatar/gradio.config.js b/frontend/antd/avatar/gradio.config.js new file mode 100644 index 00000000..916857c0 --- /dev/null +++ b/frontend/antd/avatar/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/avatar/group/Index.svelte b/frontend/antd/avatar/group/Index.svelte new file mode 100644 index 00000000..1000e855 --- /dev/null +++ b/frontend/antd/avatar/group/Index.svelte @@ -0,0 +1,71 @@ + + + + + +{#if $mergedProps.visible} + {#await AwaitedAvatarGroup then AvatarGroup} + + + + {/await} +{/if} + + diff --git a/frontend/antd/avatar/group/avatar.group.tsx b/frontend/antd/avatar/group/avatar.group.tsx new file mode 100644 index 00000000..ecc93959 --- /dev/null +++ b/frontend/antd/avatar/group/avatar.group.tsx @@ -0,0 +1,44 @@ +import { sveltify } from '@svelte-preprocess-react'; +import { ReactSlot } from '@svelte-preprocess-react/react-slot'; +import React from 'react'; +import { useTargets } from '@utils/hooks/useTargets'; +import { Avatar as AAvatar, type GetProps } from 'antd'; + +export const AvatarGroup = sveltify< + GetProps, + ['max.popover.title', 'max.popover.content'] +>(({ slots, children, ...props }) => { + const targets = useTargets(children); + return ( + <> +
{children}
+ + ) : ( + props.max?.popover?.title + ), + content: slots['max.popover.content'] ? ( + + ) : ( + props.max?.popover?.content + ), + }, + }} + > + {targets.map((target, index) => { + return ; + })} + + + ); +}); + +export default AvatarGroup; diff --git a/frontend/antd/avatar/group/gradio.config.js b/frontend/antd/avatar/group/gradio.config.js new file mode 100644 index 00000000..1992403d --- /dev/null +++ b/frontend/antd/avatar/group/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/avatar/group/package.json b/frontend/antd/avatar/group/package.json new file mode 100644 index 00000000..23f26727 --- /dev/null +++ b/frontend/antd/avatar/group/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-avatar.group", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/avatar/package.json b/frontend/antd/avatar/package.json new file mode 100644 index 00000000..287dea2c --- /dev/null +++ b/frontend/antd/avatar/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-avatar", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/badge/Index.svelte b/frontend/antd/badge/Index.svelte new file mode 100644 index 00000000..02b2c1c2 --- /dev/null +++ b/frontend/antd/badge/Index.svelte @@ -0,0 +1,81 @@ + + + + + +{#if $mergedProps.visible} + {#await AwaitedBadge then Badge} + {#if $mergedProps._internal.layout} + + + + {:else} + + {/if} + {/await} +{/if} + + diff --git a/frontend/antd/badge/badge.tsx b/frontend/antd/badge/badge.tsx new file mode 100644 index 00000000..5be3d850 --- /dev/null +++ b/frontend/antd/badge/badge.tsx @@ -0,0 +1,20 @@ +import { sveltify } from '@svelte-preprocess-react'; +import { ReactSlot } from '@svelte-preprocess-react/react-slot'; +import React from 'react'; +import { Badge as ABadge, type GetProps } from 'antd'; + +export const Badge = sveltify, ['count', 'text']>( + ({ slots, ...props }) => { + return ( + <> + : props.count} + text={slots.text ? : props.text} + /> + + ); + } +); + +export default Badge; diff --git a/frontend/antd/badge/gradio.config.js b/frontend/antd/badge/gradio.config.js new file mode 100644 index 00000000..916857c0 --- /dev/null +++ b/frontend/antd/badge/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/badge/package.json b/frontend/antd/badge/package.json new file mode 100644 index 00000000..16c946f4 --- /dev/null +++ b/frontend/antd/badge/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-badge", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/badge/ribbon/Index.svelte b/frontend/antd/badge/ribbon/Index.svelte new file mode 100644 index 00000000..41fd82dd --- /dev/null +++ b/frontend/antd/badge/ribbon/Index.svelte @@ -0,0 +1,74 @@ + + + + + +{#if $mergedProps.visible} + {#await AwaitedBadgeRibbon then BadgeRibbon} + + + + {/await} +{/if} + + diff --git a/frontend/antd/badge/ribbon/badge.ribbon.tsx b/frontend/antd/badge/ribbon/badge.ribbon.tsx new file mode 100644 index 00000000..4eb1d5cb --- /dev/null +++ b/frontend/antd/badge/ribbon/badge.ribbon.tsx @@ -0,0 +1,21 @@ +import { sveltify } from '@svelte-preprocess-react'; +import { ReactSlot } from '@svelte-preprocess-react/react-slot'; +import React from 'react'; +import { Badge as ABadge, type GetProps } from 'antd'; + +export const BadgeRibbon = sveltify, ['text']>( + ({ slots, children, ...props }) => { + return ( + <> + : props.text} + > + {children} + + + ); + } +); + +export default BadgeRibbon; diff --git a/frontend/antd/badge/ribbon/gradio.config.js b/frontend/antd/badge/ribbon/gradio.config.js new file mode 100644 index 00000000..1992403d --- /dev/null +++ b/frontend/antd/badge/ribbon/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/badge/ribbon/package.json b/frontend/antd/badge/ribbon/package.json new file mode 100644 index 00000000..653ce009 --- /dev/null +++ b/frontend/antd/badge/ribbon/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-badge.ribbon", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/breadcrumb/Index.svelte b/frontend/antd/breadcrumb/Index.svelte new file mode 100644 index 00000000..5bf55556 --- /dev/null +++ b/frontend/antd/breadcrumb/Index.svelte @@ -0,0 +1,74 @@ + + + + +{#if $mergedProps.visible} + {#await AwaitedBreadcrumb then Breadcrumb} + 0 ? $items : $children} + > + + + {/await} +{/if} + + diff --git a/frontend/antd/breadcrumb/breadcrumb.tsx b/frontend/antd/breadcrumb/breadcrumb.tsx new file mode 100644 index 00000000..0dd9191a --- /dev/null +++ b/frontend/antd/breadcrumb/breadcrumb.tsx @@ -0,0 +1,36 @@ +import { sveltify } from '@svelte-preprocess-react'; +import { ReactSlot } from '@svelte-preprocess-react/react-slot'; +import React, { useMemo } from 'react'; +import { renderItems } from '@utils/renderItems'; +import { Breadcrumb as ABreadcrumb, type GetProps } from 'antd'; +import type { ItemType } from 'antd/es/breadcrumb/Breadcrumb'; + +import { type Item } from './context'; + +export const Breadcrumb = sveltify< + GetProps & { + slotItems: Item[]; + }, + ['separator'] +>(({ slots, items, slotItems, children, ...props }) => { + return ( + <> +
{children}
+ { + return items || renderItems(slotItems); + }, [items, slotItems])} + separator={ + slots.separator ? ( + + ) : ( + props.separator + ) + } + /> + + ); +}); + +export default Breadcrumb; diff --git a/frontend/antd/breadcrumb/context.ts b/frontend/antd/breadcrumb/context.ts new file mode 100644 index 00000000..3d66a13d --- /dev/null +++ b/frontend/antd/breadcrumb/context.ts @@ -0,0 +1,6 @@ +import { createItemsContext } from '@utils/createItemsContext'; + +const { getItems, getSetItemFn } = createItemsContext('breadcrumb'); + +export { getItems, getSetItemFn }; +export * from '@utils/createItemsContext'; diff --git a/frontend/antd/breadcrumb/gradio.config.js b/frontend/antd/breadcrumb/gradio.config.js new file mode 100644 index 00000000..916857c0 --- /dev/null +++ b/frontend/antd/breadcrumb/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/breadcrumb/item/BreadcrumbItem.svelte b/frontend/antd/breadcrumb/item/BreadcrumbItem.svelte new file mode 100644 index 00000000..6105a701 --- /dev/null +++ b/frontend/antd/breadcrumb/item/BreadcrumbItem.svelte @@ -0,0 +1,137 @@ + + + + +{#if $mergedProps.visible} + +{/if} + + diff --git a/frontend/antd/breadcrumb/item/Index.svelte b/frontend/antd/breadcrumb/item/Index.svelte new file mode 100644 index 00000000..4b643c58 --- /dev/null +++ b/frontend/antd/breadcrumb/item/Index.svelte @@ -0,0 +1,42 @@ + + + + +{#await AwaitedBreadcrumbItem then BreadcrumbItem} + + + +{/await} + + diff --git a/frontend/antd/breadcrumb/item/gradio.config.js b/frontend/antd/breadcrumb/item/gradio.config.js new file mode 100644 index 00000000..1992403d --- /dev/null +++ b/frontend/antd/breadcrumb/item/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/breadcrumb/item/package.json b/frontend/antd/breadcrumb/item/package.json new file mode 100644 index 00000000..1fa85b4d --- /dev/null +++ b/frontend/antd/breadcrumb/item/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-breadcrumb.item", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/breadcrumb/package.json b/frontend/antd/breadcrumb/package.json new file mode 100644 index 00000000..c9275f91 --- /dev/null +++ b/frontend/antd/breadcrumb/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-breadcrumb", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/button/Index.svelte b/frontend/antd/button/Index.svelte new file mode 100644 index 00000000..523a46f5 --- /dev/null +++ b/frontend/antd/button/Index.svelte @@ -0,0 +1,141 @@ + + + + + +{#if $mergedProps.visible} + {#await AwaitedButton then Button} + + {/await} +{/if} + + diff --git a/frontend/antd/button/button.tsx b/frontend/antd/button/button.tsx new file mode 100644 index 00000000..e305597a --- /dev/null +++ b/frontend/antd/button/button.tsx @@ -0,0 +1,17 @@ +import { sveltify } from '@svelte-preprocess-react'; +import { ReactSlot } from '@svelte-preprocess-react/react-slot'; +import React from 'react'; +import { Button as AButton, type GetProps } from 'antd'; + +export const Button = sveltify, ['icon']>( + ({ slots, ...props }) => { + return ( + : props.icon} + /> + ); + } +); + +export default Button; diff --git a/frontend/antd/button/gradio.config.js b/frontend/antd/button/gradio.config.js new file mode 100644 index 00000000..916857c0 --- /dev/null +++ b/frontend/antd/button/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/button/group/Index.svelte b/frontend/antd/button/group/Index.svelte new file mode 100644 index 00000000..cc605dca --- /dev/null +++ b/frontend/antd/button/group/Index.svelte @@ -0,0 +1,71 @@ + + + + + +{#if $mergedProps.visible} + {#await AwaitedButtonGroup then ButtonGroup} + + + + {/await} +{/if} + + diff --git a/frontend/antd/button/group/button.group.less b/frontend/antd/button/group/button.group.less new file mode 100644 index 00000000..d37b5513 --- /dev/null +++ b/frontend/antd/button/group/button.group.less @@ -0,0 +1,20 @@ +.ms-gr-antd-container { + .ms-gr-antd-button-group { + react-portal-target { + &:not(:first-child) { + .ms-gr-antd-button { + border-start-start-radius: 0; + border-end-start-radius: 0; + margin-inline-start: calc(var(--ms-gr-antd-line-width) * -1); + } + } + + &:not(:last-child) { + .ms-gr-antd-button { + border-start-end-radius: 0; + border-end-end-radius: 0; + } + } + } + } +} diff --git a/frontend/antd/button/group/button.group.tsx b/frontend/antd/button/group/button.group.tsx new file mode 100644 index 00000000..a37d5a64 --- /dev/null +++ b/frontend/antd/button/group/button.group.tsx @@ -0,0 +1,26 @@ +import { sveltify } from '@svelte-preprocess-react'; +import { Button as AButton, type GetProps, theme } from 'antd'; + +import './button.group.less'; + +export const ButtonGroup = sveltify< + GetProps & { + id?: string; + } +>(({ style, ...props }) => { + const { token } = theme.useToken(); + + return ( + + ); +}); + +export default ButtonGroup; diff --git a/frontend/antd/button/group/gradio.config.js b/frontend/antd/button/group/gradio.config.js new file mode 100644 index 00000000..1992403d --- /dev/null +++ b/frontend/antd/button/group/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/button/group/package.json b/frontend/antd/button/group/package.json new file mode 100644 index 00000000..409e1463 --- /dev/null +++ b/frontend/antd/button/group/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-button.group", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/button/package.json b/frontend/antd/button/package.json new file mode 100644 index 00000000..0a94c046 --- /dev/null +++ b/frontend/antd/button/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-button", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/calendar/Index.svelte b/frontend/antd/calendar/Index.svelte new file mode 100644 index 00000000..e45b2551 --- /dev/null +++ b/frontend/antd/calendar/Index.svelte @@ -0,0 +1,75 @@ + + + + +{#if $mergedProps.visible} + {#await AwaitedCalender then Calender} + { + value = val; + }} + > + + + {/await} +{/if} diff --git a/frontend/antd/calendar/calendar.tsx b/frontend/antd/calendar/calendar.tsx new file mode 100644 index 00000000..71a5b40e --- /dev/null +++ b/frontend/antd/calendar/calendar.tsx @@ -0,0 +1,69 @@ +import { sveltify } from '@svelte-preprocess-react'; +import { useMemo } from 'react'; +import { useFunction } from '@utils/hooks/useFunction'; +import { Calendar as ACalendar, type GetProps } from 'antd'; +import dayjs from 'dayjs'; + +type CalendarProps = GetProps; + +function formatDayjs(date: any) { + if (typeof date === 'number') { + return dayjs(date * 1000); + } + return dayjs(date); +} + +export const Calendar = sveltify< + Omit & { + onChange?: (date: number, ...args: any[]) => void; + onPanelChange?: (date: number, ...args: any[]) => void; + onSelect?: (date: number, ...args: any[]) => void; + onValueChange: (date: number) => void; + } +>( + ({ + disabledDate, + value, + defaultValue, + validRange, + onChange, + onPanelChange, + onSelect, + onValueChange, + ...props + }) => { + const disabledDateFunction = useFunction(disabledDate); + const validValue = useMemo(() => { + return value ? formatDayjs(value) : undefined; + }, [value]); + const validDefaultValue = useMemo(() => { + return defaultValue ? formatDayjs(defaultValue) : undefined; + }, [defaultValue]); + const validValidRange = useMemo(() => { + return Array.isArray(validRange) + ? (validRange.map((v) => formatDayjs(v)) as [dayjs.Dayjs, dayjs.Dayjs]) + : undefined; + }, [validRange]); + return ( + { + onValueChange(date.valueOf() / 1000); + onChange?.(date.valueOf() / 1000, ...args); + }} + onPanelChange={(date, ...args) => { + onPanelChange?.(date.valueOf() / 1000, ...args); + }} + onSelect={(date, ...args) => { + onSelect?.(date.valueOf() / 1000, ...args); + }} + /> + ); + } +); + +export default Calendar; diff --git a/frontend/antd/calendar/gradio.config.js b/frontend/antd/calendar/gradio.config.js new file mode 100644 index 00000000..916857c0 --- /dev/null +++ b/frontend/antd/calendar/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/calendar/package.json b/frontend/antd/calendar/package.json new file mode 100644 index 00000000..c8423b3e --- /dev/null +++ b/frontend/antd/calendar/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-calendar", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/card/Index.svelte b/frontend/antd/card/Index.svelte new file mode 100644 index 00000000..acc847fc --- /dev/null +++ b/frontend/antd/card/Index.svelte @@ -0,0 +1,129 @@ + + + + +{#if $mergedProps.visible} + {#await AwaitedCard then Card} + + + + {/await} +{/if} + + diff --git a/frontend/antd/card/card.tsx b/frontend/antd/card/card.tsx new file mode 100644 index 00000000..af34731b --- /dev/null +++ b/frontend/antd/card/card.tsx @@ -0,0 +1,41 @@ +import { sveltify } from '@svelte-preprocess-react'; +import { ReactSlot } from '@svelte-preprocess-react/react-slot'; +import React from 'react'; +import { useTargets } from '@utils/hooks/useTargets'; +import { Card as ACard, type GetProps } from 'antd'; + +export const Card = sveltify< + GetProps & { + containsGrid?: boolean; + }, + ['actions', 'cover', 'extra', 'tabBarExtraContent', 'title'] +>(({ children, containsGrid, slots, ...props }) => { + const targets = useTargets(children, 'actions'); + return ( + : props.title} + extra={slots.extra ? : props.extra} + cover={slots.cover ? : props.cover} + tabBarExtraContent={ + slots.tabBarExtraContent ? ( + + ) : ( + props.tabBarExtraContent + ) + } + actions={ + targets.length > 0 + ? targets.map((target, index) => { + return ; + }) + : props.actions + } + > + {containsGrid ? : null} + {children} + + ); +}); + +export default Card; diff --git a/frontend/antd/card/gradio.config.js b/frontend/antd/card/gradio.config.js new file mode 100644 index 00000000..916857c0 --- /dev/null +++ b/frontend/antd/card/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/card/grid/Index.svelte b/frontend/antd/card/grid/Index.svelte new file mode 100644 index 00000000..5fb8c9e8 --- /dev/null +++ b/frontend/antd/card/grid/Index.svelte @@ -0,0 +1,69 @@ + + + + +{#if $mergedProps.visible} + {#await AwaitedCardGrid then CardGrid} + + + + {/await} +{/if} + + diff --git a/frontend/antd/card/grid/card.grid.tsx b/frontend/antd/card/grid/card.grid.tsx new file mode 100644 index 00000000..fa8389a2 --- /dev/null +++ b/frontend/antd/card/grid/card.grid.tsx @@ -0,0 +1,6 @@ +import { sveltify } from '@svelte-preprocess-react'; +import { Card as ACard, type GetProps } from 'antd'; + +export const CardGrid = sveltify>(ACard.Grid); + +export default CardGrid; diff --git a/frontend/antd/card/grid/gradio.config.js b/frontend/antd/card/grid/gradio.config.js new file mode 100644 index 00000000..1992403d --- /dev/null +++ b/frontend/antd/card/grid/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/card/grid/package.json b/frontend/antd/card/grid/package.json new file mode 100644 index 00000000..36b04c82 --- /dev/null +++ b/frontend/antd/card/grid/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-card.grid", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/card/meta/Index.svelte b/frontend/antd/card/meta/Index.svelte new file mode 100644 index 00000000..1ba86329 --- /dev/null +++ b/frontend/antd/card/meta/Index.svelte @@ -0,0 +1,79 @@ + + + + +{#if $mergedProps.visible} + {#await AwaitedCardMeta then CardMeta} + + + + {/await} +{/if} + + diff --git a/frontend/antd/card/meta/card.meta.tsx b/frontend/antd/card/meta/card.meta.tsx new file mode 100644 index 00000000..968acb61 --- /dev/null +++ b/frontend/antd/card/meta/card.meta.tsx @@ -0,0 +1,27 @@ +import { sveltify } from '@svelte-preprocess-react'; +import { ReactSlot } from '@svelte-preprocess-react/react-slot'; +import { Card as ACard, type GetProps } from 'antd'; + +export const CardMeta = sveltify< + GetProps & { + id?: string; + }, + ['avatar', 'description', 'title'] +>(({ slots, ...props }) => { + return ( + : props.title} + description={ + slots.description ? ( + + ) : ( + props.description + ) + } + avatar={slots.avatar ? : props.avatar} + /> + ); +}); + +export default CardMeta; diff --git a/frontend/antd/card/meta/gradio.config.js b/frontend/antd/card/meta/gradio.config.js new file mode 100644 index 00000000..1992403d --- /dev/null +++ b/frontend/antd/card/meta/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/card/meta/package.json b/frontend/antd/card/meta/package.json new file mode 100644 index 00000000..60208d50 --- /dev/null +++ b/frontend/antd/card/meta/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-card.meta", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/card/package.json b/frontend/antd/card/package.json new file mode 100644 index 00000000..36640fa6 --- /dev/null +++ b/frontend/antd/card/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-card", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/carousel/Index.svelte b/frontend/antd/carousel/Index.svelte new file mode 100644 index 00000000..492f4ebe --- /dev/null +++ b/frontend/antd/carousel/Index.svelte @@ -0,0 +1,70 @@ + + + + +{#if $mergedProps.visible} + {#await AwaitedCarousel then Carousel} + + + + {/await} +{/if} + + diff --git a/frontend/antd/carousel/carousel.tsx b/frontend/antd/carousel/carousel.tsx new file mode 100644 index 00000000..c4936611 --- /dev/null +++ b/frontend/antd/carousel/carousel.tsx @@ -0,0 +1,30 @@ +import { sveltify } from '@svelte-preprocess-react'; +import { ReactSlot } from '@svelte-preprocess-react/react-slot'; +import React from 'react'; +import { useFunction } from '@utils/hooks/useFunction'; +import { useTargets } from '@utils/hooks/useTargets'; +import { Carousel as ACarousel, type GetProps } from 'antd'; + +export const Carousel = sveltify>( + ({ afterChange, beforeChange, children, ...props }) => { + const afterChangeFunction = useFunction(afterChange); + const beforeChangeFunction = useFunction(beforeChange); + const targets = useTargets(children); + return ( + <> +
{children}
+ + {targets.map((target, index) => { + return ; + })} + + + ); + } +); + +export default Carousel; diff --git a/frontend/antd/carousel/gradio.config.js b/frontend/antd/carousel/gradio.config.js new file mode 100644 index 00000000..916857c0 --- /dev/null +++ b/frontend/antd/carousel/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/carousel/package.json b/frontend/antd/carousel/package.json new file mode 100644 index 00000000..4095c70e --- /dev/null +++ b/frontend/antd/carousel/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-carousel", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/cascader/Index.svelte b/frontend/antd/cascader/Index.svelte new file mode 100644 index 00000000..ee11384d --- /dev/null +++ b/frontend/antd/cascader/Index.svelte @@ -0,0 +1,80 @@ + + + + +{#if $mergedProps.visible} + {#await AwaitedCascader then Cascader} + 0 ? $options : $children} + onValueChange={(v) => { + value = v; + }} + > + + + {/await} +{/if} + + diff --git a/frontend/antd/cascader/cascader.tsx b/frontend/antd/cascader/cascader.tsx new file mode 100644 index 00000000..da2853a2 --- /dev/null +++ b/frontend/antd/cascader/cascader.tsx @@ -0,0 +1,144 @@ +import { sveltify } from '@svelte-preprocess-react'; +import { ReactSlot } from '@svelte-preprocess-react/react-slot'; +import { useMemo } from 'react'; +import { useFunction } from '@utils/hooks/useFunction'; +import { renderItems } from '@utils/renderItems'; +import { Cascader as ACascader, type CascaderProps } from 'antd'; + +import { type Item } from './context'; + +function getConfig(value: T): Partial> { + if (typeof value === 'object' && value !== null) { + return value as any; + } + return {} as any; +} + +export const Cascader = sveltify< + CascaderProps & { + onValueChange: (value: string[] | number[]) => void; + onLoadData?: (...args: any[]) => void; + optionItems: Item[]; + }, + [ + 'allowClear.clearIcon', + 'suffixIcon', + 'maxTagPlaceholder', + 'notFoundContent', + 'expandIcon', + 'removeIcon', + ] +>( + ({ + slots, + children, + onValueChange, + onChange, + displayRender, + elRef, + getPopupContainer, + tagRender, + maxTagPlaceholder, + dropdownRender, + optionRender, + onLoadData, + showSearch, + optionItems, + options, + ...props + }) => { + const getPopupContainerFunction = useFunction(getPopupContainer); + const displayRenderFunction = useFunction(displayRender); + const tagRenderFunction = useFunction(tagRender); + const optionRenderFunction = useFunction(optionRender); + const dropdownRenderFunction = useFunction(dropdownRender); + const maxTagPlaceholderFunction = useFunction(maxTagPlaceholder); + const supportShowSearchConfig = typeof showSearch === 'object'; + const showSearchConfig = getConfig(showSearch); + const showSearchFilterFunction = useFunction(showSearchConfig.filter); + const showSearchRenderFunction = useFunction(showSearchConfig.render); + const showSearchSortFunction = useFunction(showSearchConfig.sort); + return ( + <> +
{children}
+ { + return ( + options || + renderItems[number]>( + optionItems + ) + ); + }, [options, optionItems])} + showSearch={ + supportShowSearchConfig + ? { + ...showSearchConfig, + filter: showSearchFilterFunction || showSearchConfig.filter, + render: showSearchRenderFunction || showSearchConfig.render, + sort: showSearchSortFunction || showSearchConfig.sort, + } + : showSearch + } + loadData={onLoadData} + optionRender={optionRenderFunction} + dropdownRender={dropdownRenderFunction} + getPopupContainer={getPopupContainerFunction} + displayRender={displayRenderFunction} + tagRender={tagRenderFunction} + onChange={(v, ...args) => { + onChange?.(v, ...args); + onValueChange(v); + }} + suffixIcon={ + slots.suffixIcon ? ( + + ) : ( + props.suffixIcon + ) + } + expandIcon={ + slots.expandIcon ? ( + + ) : ( + props.expandIcon + ) + } + removeIcon={ + slots.removeIcon ? ( + + ) : ( + props.removeIcon + ) + } + notFoundContent={ + slots.notFoundContent ? ( + + ) : ( + props.notFoundContent + ) + } + maxTagPlaceholder={ + maxTagPlaceholderFunction || + (slots.maxTagPlaceholder ? ( + + ) : ( + maxTagPlaceholder + )) + } + allowClear={ + slots['allowClear.clearIcon'] + ? { + clearIcon: , + } + : props.allowClear + } + /> + + ); + } +); + +export default Cascader; diff --git a/frontend/antd/cascader/context.ts b/frontend/antd/cascader/context.ts new file mode 100644 index 00000000..4620c4bf --- /dev/null +++ b/frontend/antd/cascader/context.ts @@ -0,0 +1,6 @@ +import { createItemsContext } from '@utils/createItemsContext'; + +const { getItems, getSetItemFn } = createItemsContext('cascader'); + +export { getItems, getSetItemFn }; +export * from '@utils/createItemsContext'; diff --git a/frontend/antd/cascader/gradio.config.js b/frontend/antd/cascader/gradio.config.js new file mode 100644 index 00000000..916857c0 --- /dev/null +++ b/frontend/antd/cascader/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/cascader/option/Index.svelte b/frontend/antd/cascader/option/Index.svelte new file mode 100644 index 00000000..ab6b55f6 --- /dev/null +++ b/frontend/antd/cascader/option/Index.svelte @@ -0,0 +1,87 @@ + + + + +{#if $mergedProps.visible} + +{/if} + + diff --git a/frontend/antd/cascader/option/gradio.config.js b/frontend/antd/cascader/option/gradio.config.js new file mode 100644 index 00000000..1992403d --- /dev/null +++ b/frontend/antd/cascader/option/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/cascader/option/package.json b/frontend/antd/cascader/option/package.json new file mode 100644 index 00000000..0bef1896 --- /dev/null +++ b/frontend/antd/cascader/option/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-cascader.option", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/cascader/package.json b/frontend/antd/cascader/package.json new file mode 100644 index 00000000..df927b57 --- /dev/null +++ b/frontend/antd/cascader/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-cascader", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/cascader/panel/Index.svelte b/frontend/antd/cascader/panel/Index.svelte new file mode 100644 index 00000000..2e256aab --- /dev/null +++ b/frontend/antd/cascader/panel/Index.svelte @@ -0,0 +1,82 @@ + + + + +{#if $mergedProps.visible} + {#await AwaitedCascaderPanel then CascaderPanel} + 0 ? $options : $children} + onValueChange={(v) => { + value = v; + }} + > + + + {/await} +{/if} + + diff --git a/frontend/antd/cascader/panel/cascader.panel.tsx b/frontend/antd/cascader/panel/cascader.panel.tsx new file mode 100644 index 00000000..fccdd7d9 --- /dev/null +++ b/frontend/antd/cascader/panel/cascader.panel.tsx @@ -0,0 +1,66 @@ +import { sveltify } from '@svelte-preprocess-react'; +import { ReactSlot } from '@svelte-preprocess-react/react-slot'; +import { useMemo } from 'react'; +import { renderItems } from '@utils/renderItems'; +import { Cascader as ACascader, type CascaderPanelProps } from 'antd'; + +import { type Item } from '../context'; + +export const CascaderPanel = sveltify< + CascaderPanelProps & { + onValueChange: (value: string[] | number[]) => void; + onLoadData?: (...args: any[]) => void; + optionItems: Item[]; + children?: React.ReactNode; + }, + ['notFoundContent', 'expandIcon'] +>( + ({ + slots, + children, + onValueChange, + onChange, + onLoadData, + optionItems, + options, + ...props + }) => { + return ( + <> +
{children}
+ { + return ( + options || + renderItems[number]>( + optionItems + ) + ); + }, [options, optionItems])} + loadData={onLoadData} + onChange={(v, ...args) => { + onChange?.(v, ...args); + onValueChange(v); + }} + expandIcon={ + slots.expandIcon ? ( + + ) : ( + props.expandIcon + ) + } + notFoundContent={ + slots.notFoundContent ? ( + + ) : ( + props.notFoundContent + ) + } + /> + + ); + } +); + +export default CascaderPanel; diff --git a/frontend/antd/cascader/panel/gradio.config.js b/frontend/antd/cascader/panel/gradio.config.js new file mode 100644 index 00000000..1992403d --- /dev/null +++ b/frontend/antd/cascader/panel/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/cascader/panel/package.json b/frontend/antd/cascader/panel/package.json new file mode 100644 index 00000000..b5fe37b0 --- /dev/null +++ b/frontend/antd/cascader/panel/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-cascader.panel", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/checkbox/Index.svelte b/frontend/antd/checkbox/Index.svelte new file mode 100644 index 00000000..2a77abd8 --- /dev/null +++ b/frontend/antd/checkbox/Index.svelte @@ -0,0 +1,76 @@ + + + + +{#if $mergedProps.visible} + {#await AwaitedCheckbox then Checkbox} + { + value = v; + }} + > + + + {/await} +{/if} + + diff --git a/frontend/antd/checkbox/checkbox.tsx b/frontend/antd/checkbox/checkbox.tsx new file mode 100644 index 00000000..9695d686 --- /dev/null +++ b/frontend/antd/checkbox/checkbox.tsx @@ -0,0 +1,21 @@ +import { sveltify } from '@svelte-preprocess-react'; +import { Checkbox as ACheckbox, type GetProps } from 'antd'; + +export const Checkbox = sveltify< + GetProps & { + onValueChange: (value: boolean) => void; + } +>(({ onValueChange, onChange, elRef, ...props }) => { + return ( + { + onChange?.(e); + onValueChange(e.target.checked); + }} + /> + ); +}); + +export default Checkbox; diff --git a/frontend/antd/checkbox/context.ts b/frontend/antd/checkbox/context.ts new file mode 100644 index 00000000..0905e21c --- /dev/null +++ b/frontend/antd/checkbox/context.ts @@ -0,0 +1,6 @@ +import { createItemsContext } from '@utils/createItemsContext'; + +const { getItems, getSetItemFn } = createItemsContext('checkbox-group'); + +export { getItems, getSetItemFn }; +export * from '@utils/createItemsContext'; diff --git a/frontend/antd/checkbox/gradio.config.js b/frontend/antd/checkbox/gradio.config.js new file mode 100644 index 00000000..916857c0 --- /dev/null +++ b/frontend/antd/checkbox/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/checkbox/group/Index.svelte b/frontend/antd/checkbox/group/Index.svelte new file mode 100644 index 00000000..f409452c --- /dev/null +++ b/frontend/antd/checkbox/group/Index.svelte @@ -0,0 +1,82 @@ + + + + +{#if $mergedProps.visible} + {#await AwaitedCheckboxGroup then CheckboxGroup} + 0 ? $options : $children} + onValueChange={(v) => { + value = v; + }} + > + + + {/await} +{/if} + + diff --git a/frontend/antd/checkbox/group/checkbox.group.tsx b/frontend/antd/checkbox/group/checkbox.group.tsx new file mode 100644 index 00000000..7020542a --- /dev/null +++ b/frontend/antd/checkbox/group/checkbox.group.tsx @@ -0,0 +1,47 @@ +import { sveltify } from '@svelte-preprocess-react'; +import { useMemo } from 'react'; +import { renderItems } from '@utils/renderItems'; +import { Checkbox as ACheckbox, type GetProps } from 'antd'; + +import { type Item } from '../context'; + +export const CheckboxGroup = sveltify< + GetProps & { + onValueChange: (value: (string | number | boolean)[]) => void; + optionItems: Item[]; + } +>( + ({ + onValueChange, + onChange, + elRef, + optionItems, + options, + children, + ...props + }) => { + return ( + <> +
{children}
+ { + return ( + options || + renderItems< + NonNullable['options']>[number] + >(optionItems) + ); + }, [optionItems, options])} + onChange={(v: any[]) => { + onChange?.(v); + onValueChange(v); + }} + /> + + ); + } +); + +export default CheckboxGroup; diff --git a/frontend/antd/checkbox/group/gradio.config.js b/frontend/antd/checkbox/group/gradio.config.js new file mode 100644 index 00000000..1992403d --- /dev/null +++ b/frontend/antd/checkbox/group/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/checkbox/group/option/Index.svelte b/frontend/antd/checkbox/group/option/Index.svelte new file mode 100644 index 00000000..c6932cee --- /dev/null +++ b/frontend/antd/checkbox/group/option/Index.svelte @@ -0,0 +1,92 @@ + + + + +{#if $mergedProps.visible} + +{/if} + + diff --git a/frontend/antd/checkbox/group/option/gradio.config.js b/frontend/antd/checkbox/group/option/gradio.config.js new file mode 100644 index 00000000..7b2fe8dd --- /dev/null +++ b/frontend/antd/checkbox/group/option/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/checkbox/group/option/package.json b/frontend/antd/checkbox/group/option/package.json new file mode 100644 index 00000000..b884ef07 --- /dev/null +++ b/frontend/antd/checkbox/group/option/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-checkbox.group.option", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/checkbox/group/package.json b/frontend/antd/checkbox/group/package.json new file mode 100644 index 00000000..e3c9d136 --- /dev/null +++ b/frontend/antd/checkbox/group/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-checkbox.group", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/checkbox/package.json b/frontend/antd/checkbox/package.json new file mode 100644 index 00000000..60770025 --- /dev/null +++ b/frontend/antd/checkbox/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-checkbox", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/collapse/Index.svelte b/frontend/antd/collapse/Index.svelte new file mode 100644 index 00000000..a6305021 --- /dev/null +++ b/frontend/antd/collapse/Index.svelte @@ -0,0 +1,81 @@ + + + + +{#if $mergedProps.visible} + {#await AwaitedCollapse then Collapse} + 0 ? $items : $children} + activeKey={$mergedProps.props.activeKey || $mergedProps.value} + onValueChange={(val) => { + value = val; + }} + > + + + {/await} +{/if} + + diff --git a/frontend/antd/collapse/collapse.tsx b/frontend/antd/collapse/collapse.tsx new file mode 100644 index 00000000..7044ca21 --- /dev/null +++ b/frontend/antd/collapse/collapse.tsx @@ -0,0 +1,58 @@ +import { sveltify } from '@svelte-preprocess-react'; +import { ReactSlot } from '@svelte-preprocess-react/react-slot'; +import React, { useMemo } from 'react'; +import { renderItems } from '@utils/renderItems'; +import { Collapse as ACollapse, type GetProps } from 'antd'; + +import { type Item } from './context'; + +type CollapseProps = GetProps; +export const Collapse = sveltify< + CollapseProps & { + slotItems: Item[]; + onValueChange: CollapseProps['onChange']; + }, + ['expandIcon'] +>( + ({ + slots, + items, + slotItems, + children, + onChange, + onValueChange, + ...props + }) => { + return ( + <> + {children} + { + onValueChange?.(key); + onChange?.(key); + }} + expandIcon={ + slots.expandIcon + ? () => + slots.expandIcon ? ( + + ) : null + : props.expandIcon + } + items={useMemo(() => { + // ['label','extra', 'children'] + return ( + items || + renderItems[number]>( + slotItems + ) + ); + }, [items, slotItems])} + /> + + ); + } +); + +export default Collapse; diff --git a/frontend/antd/collapse/context.ts b/frontend/antd/collapse/context.ts new file mode 100644 index 00000000..98a19d3d --- /dev/null +++ b/frontend/antd/collapse/context.ts @@ -0,0 +1,6 @@ +import { createItemsContext } from '@utils/createItemsContext'; + +const { getItems, getSetItemFn } = createItemsContext('collapse'); + +export { getItems, getSetItemFn }; +export * from '@utils/createItemsContext'; diff --git a/frontend/antd/collapse/gradio.config.js b/frontend/antd/collapse/gradio.config.js new file mode 100644 index 00000000..916857c0 --- /dev/null +++ b/frontend/antd/collapse/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/collapse/item/Index.svelte b/frontend/antd/collapse/item/Index.svelte new file mode 100644 index 00000000..7f56cf58 --- /dev/null +++ b/frontend/antd/collapse/item/Index.svelte @@ -0,0 +1,90 @@ + + + + +{#if $mergedProps.visible} + + + +{/if} + + diff --git a/frontend/antd/collapse/item/gradio.config.js b/frontend/antd/collapse/item/gradio.config.js new file mode 100644 index 00000000..1992403d --- /dev/null +++ b/frontend/antd/collapse/item/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/collapse/item/package.json b/frontend/antd/collapse/item/package.json new file mode 100644 index 00000000..658794e4 --- /dev/null +++ b/frontend/antd/collapse/item/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-collapse.item", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/collapse/package.json b/frontend/antd/collapse/package.json new file mode 100644 index 00000000..0c05a87a --- /dev/null +++ b/frontend/antd/collapse/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-collapse", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/color-picker/Index.svelte b/frontend/antd/color-picker/Index.svelte new file mode 100644 index 00000000..4d823c18 --- /dev/null +++ b/frontend/antd/color-picker/Index.svelte @@ -0,0 +1,82 @@ + + + + +{#if $mergedProps.visible} + {#await AwaitedColorPicker then ColorPicker} + { + value = v; + }} + > + + + {/await} +{/if} + + diff --git a/frontend/antd/color-picker/color-picker.tsx b/frontend/antd/color-picker/color-picker.tsx new file mode 100644 index 00000000..035521e1 --- /dev/null +++ b/frontend/antd/color-picker/color-picker.tsx @@ -0,0 +1,70 @@ +import { sveltify } from '@svelte-preprocess-react'; +import { useMemo } from 'react'; +import { useFunction } from '@utils/hooks/useFunction'; +import { useTargets } from '@utils/hooks/useTargets'; +import { renderItems } from '@utils/renderItems'; +import { ColorPicker as AColorPicker, type GetProps } from 'antd'; + +import { type Item } from './context'; + +export const ColorPicker = sveltify< + GetProps & { + onValueChange: (value: string) => void; + onChange?: (value: string, ...args: any[]) => void; + value_format: 'rgb' | 'hex' | 'hsb'; + presetItems: Item[]; + } +>( + ({ + onValueChange, + onChange, + panelRender, + showText, + value, + presets, + presetItems, + children, + value_format, + ...props + }) => { + const panelRenderFunction = useFunction(panelRender); + const showTextFunction = useFunction(showText); + const targets = useTargets(children); + + return ( + <> + {targets.length === 0 && ( +
{children}
+ )} + + { + return ( + presets || + renderItems< + NonNullable['presets']>[number] + >(presetItems) + ); + }, [presets, presetItems])} + showText={showTextFunction} + panelRender={panelRenderFunction} + onChange={(v, ...args) => { + const color = { + rgb: v.toRgbString(), + hex: v.toHexString(), + hsb: v.toHsbString(), + }; + onChange?.(color[value_format], ...args); + onValueChange(color[value_format]); + }} + > + {targets.length === 0 ? null : children} + + + ); + } +); + +export default ColorPicker; diff --git a/frontend/antd/color-picker/context.ts b/frontend/antd/color-picker/context.ts new file mode 100644 index 00000000..6c841d56 --- /dev/null +++ b/frontend/antd/color-picker/context.ts @@ -0,0 +1,6 @@ +import { createItemsContext } from '@utils/createItemsContext'; + +const { getItems, getSetItemFn } = createItemsContext('color-picker'); + +export { getItems, getSetItemFn }; +export * from '@utils/createItemsContext'; diff --git a/frontend/antd/color-picker/gradio.config.js b/frontend/antd/color-picker/gradio.config.js new file mode 100644 index 00000000..916857c0 --- /dev/null +++ b/frontend/antd/color-picker/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/color-picker/package.json b/frontend/antd/color-picker/package.json new file mode 100644 index 00000000..2da5c65c --- /dev/null +++ b/frontend/antd/color-picker/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-color-picker", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/color-picker/preset/Index.svelte b/frontend/antd/color-picker/preset/Index.svelte new file mode 100644 index 00000000..cb410f3a --- /dev/null +++ b/frontend/antd/color-picker/preset/Index.svelte @@ -0,0 +1,92 @@ + + + + +{#if $mergedProps.visible} + +{/if} + + diff --git a/frontend/antd/color-picker/preset/gradio.config.js b/frontend/antd/color-picker/preset/gradio.config.js new file mode 100644 index 00000000..1992403d --- /dev/null +++ b/frontend/antd/color-picker/preset/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/color-picker/preset/package.json b/frontend/antd/color-picker/preset/package.json new file mode 100644 index 00000000..2fa0e813 --- /dev/null +++ b/frontend/antd/color-picker/preset/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-color-picker.preset", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/config-provider/Index.svelte b/frontend/antd/config-provider/Index.svelte new file mode 100644 index 00000000..719e90b4 --- /dev/null +++ b/frontend/antd/config-provider/Index.svelte @@ -0,0 +1,61 @@ + + + + +{#if $mergedProps.visible} + {#await AwaitedConfigProvider then ConfigProvider} + + + + {/await} +{/if} diff --git a/frontend/antd/config-provider/config-provider.tsx b/frontend/antd/config-provider/config-provider.tsx new file mode 100644 index 00000000..845f7288 --- /dev/null +++ b/frontend/antd/config-provider/config-provider.tsx @@ -0,0 +1,124 @@ +import { sveltify } from '@svelte-preprocess-react'; +import { ReactSlot } from '@svelte-preprocess-react/react-slot'; +import React, { useEffect, useState } from 'react'; +import { StyleProvider } from '@ant-design/cssinjs'; +import { useFunction } from '@utils/hooks/useFunction'; +import { ConfigProvider as AConfigProvider, type GetProps, theme } from 'antd'; +import type { Locale } from 'antd/es/locale'; +import dayjs from 'dayjs'; +import { produce } from 'immer'; + +import 'dayjs/locale/zh-cn'; + +import { locales } from './locales'; + +const combinePropsAndSlots = ( + props: Record, + slots: Record +) => { + return produce(props, (draft) => { + Object.keys(slots).forEach((slot) => { + const splits = slot.split('.'); + let current = draft; + for (let i = 0; i < splits.length - 1; i++) { + const split = splits[i]; + if (!current[split]) { + current[split] = {}; + } + current = current[split]; + } + current[splits[splits.length - 1]] = ( + + ); + }); + }); +}; + +type ConfigProviderProps = GetProps; + +export const ConfigProvider = sveltify< + Omit & { + theme_mode: string; + theme?: Omit & { + algorithm?: { + // Auto recognition + dark?: boolean; + compact?: boolean; + }; + }; + locale?: string; + className?: string; + style?: React.CSSProperties; + id?: string; + } +>( + ({ + slots, + theme_mode, + id, + className, + style, + locale: localeProp, + getTargetContainer, + getPopupContainer, + children, + ...props + }) => { + const [locale, setLocale] = useState(); + const algorithm = { + dark: theme_mode === 'dark' ? true : false, + ...(props.theme?.algorithm || {}), + }; + const getPopupContainerFunction = useFunction(getPopupContainer); + const getTargetContainerFunction = useFunction(getTargetContainer); + + useEffect(() => { + if (localeProp && locales[localeProp]) { + locales[localeProp]().then((m) => { + setLocale(m.default); + if (localeProp === 'zh_CN') { + dayjs.locale('zh-cn'); + } + }); + } + }, [localeProp]); + + return ( +
+ + { + switch (algo) { + case 'dark': + return algorithm[algo] + ? theme.darkAlgorithm + : theme.defaultAlgorithm; + case 'compact': + return algorithm[algo] ? theme.compactAlgorithm : null; + default: + return null; + } + }) + .filter(Boolean) as NonNullable< + ConfigProviderProps['theme'] + >['algorithm'], + }} + > + {children} + + +
+ ); + } +); + +export default ConfigProvider; diff --git a/frontend/antd/config-provider/gradio.config.js b/frontend/antd/config-provider/gradio.config.js new file mode 100644 index 00000000..916857c0 --- /dev/null +++ b/frontend/antd/config-provider/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/config-provider/locales.ts b/frontend/antd/config-provider/locales.ts new file mode 100644 index 00000000..2d0cb08a --- /dev/null +++ b/frontend/antd/config-provider/locales.ts @@ -0,0 +1,74 @@ +import type { Locale } from 'antd/es/locale'; + +export const locales: Record Promise<{ default: Locale }>> = { + ar_EG: () => import('antd/locale/ar_EG'), + az_AZ: () => import('antd/locale/az_AZ'), + bg_BG: () => import('antd/locale/bg_BG'), + bn_BD: () => import('antd/locale/bn_BD'), + by_BY: () => import('antd/locale/by_BY'), + ca_ES: () => import('antd/locale/ca_ES'), + cs_CZ: () => import('antd/locale/cs_CZ'), + da_DK: () => import('antd/locale/da_DK'), + de_DE: () => import('antd/locale/de_DE'), + el_GR: () => import('antd/locale/el_GR'), + en_GB: () => import('antd/locale/en_GB'), + en_US: () => import('antd/locale/en_US'), + es_ES: () => import('antd/locale/es_ES'), + et_EE: () => import('antd/locale/et_EE'), + eu_ES: () => import('antd/locale/eu_ES'), + fa_IR: () => import('antd/locale/fa_IR'), + fi_FI: () => import('antd/locale/fi_FI'), + fr_BE: () => import('antd/locale/fr_BE'), + fr_CA: () => import('antd/locale/fr_CA'), + fr_FR: () => import('antd/locale/fr_FR'), + ga_IE: () => import('antd/locale/ga_IE'), + gl_ES: () => import('antd/locale/gl_ES'), + he_IL: () => import('antd/locale/he_IL'), + hi_IN: () => import('antd/locale/hi_IN'), + hr_HR: () => import('antd/locale/hr_HR'), + hu_HU: () => import('antd/locale/hu_HU'), + hy_AM: () => import('antd/locale/hy_AM'), + id_ID: () => import('antd/locale/id_ID'), + is_IS: () => import('antd/locale/is_IS'), + it_IT: () => import('antd/locale/it_IT'), + ja_JP: () => import('antd/locale/ja_JP'), + ka_GE: () => import('antd/locale/ka_GE'), + kk_KZ: () => import('antd/locale/kk_KZ'), + km_KH: () => import('antd/locale/km_KH'), + kmr_IQ: () => import('antd/locale/kmr_IQ'), + kn_IN: () => import('antd/locale/kn_IN'), + ko_KR: () => import('antd/locale/ko_KR'), + ku_IQ: () => import('antd/locale/ku_IQ'), + lt_LT: () => import('antd/locale/lt_LT'), + lv_LV: () => import('antd/locale/lv_LV'), + mk_MK: () => import('antd/locale/mk_MK'), + ml_IN: () => import('antd/locale/ml_IN'), + mn_MN: () => import('antd/locale/mn_MN'), + ms_MY: () => import('antd/locale/ms_MY'), + my_MM: () => import('antd/locale/my_MM'), + nb_NO: () => import('antd/locale/nb_NO'), + ne_NP: () => import('antd/locale/ne_NP'), + nl_BE: () => import('antd/locale/nl_BE'), + nl_NL: () => import('antd/locale/nl_NL'), + pl_PL: () => import('antd/locale/pl_PL'), + pt_BR: () => import('antd/locale/pt_BR'), + pt_PT: () => import('antd/locale/pt_PT'), + ro_RO: () => import('antd/locale/ro_RO'), + ru_RU: () => import('antd/locale/ru_RU'), + si_LK: () => import('antd/locale/si_LK'), + sk_SK: () => import('antd/locale/sk_SK'), + sl_SI: () => import('antd/locale/sl_SI'), + sr_RS: () => import('antd/locale/sr_RS'), + sv_SE: () => import('antd/locale/sv_SE'), + ta_IN: () => import('antd/locale/ta_IN'), + th_TH: () => import('antd/locale/th_TH'), + tk_TK: () => import('antd/locale/tk_TK'), + tr_TR: () => import('antd/locale/tr_TR'), + uk_UA: () => import('antd/locale/uk_UA'), + ur_PK: () => import('antd/locale/ur_PK'), + uz_UZ: () => import('antd/locale/uz_UZ'), + vi_VN: () => import('antd/locale/vi_VN'), + zh_CN: () => import('antd/locale/zh_CN'), + zh_HK: () => import('antd/locale/zh_HK'), + zh_TW: () => import('antd/locale/zh_TW'), +}; diff --git a/frontend/antd/config-provider/package.json b/frontend/antd/config-provider/package.json new file mode 100644 index 00000000..231ea9bb --- /dev/null +++ b/frontend/antd/config-provider/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-config-provider", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/date-picker/Index.svelte b/frontend/antd/date-picker/Index.svelte new file mode 100644 index 00000000..4d214c3b --- /dev/null +++ b/frontend/antd/date-picker/Index.svelte @@ -0,0 +1,79 @@ + + + + +{#if $mergedProps.visible} + {#await AwaitedDatePicker then DatePicker} + { + value = val; + }} + > + + + {/await} +{/if} diff --git a/frontend/antd/date-picker/context.ts b/frontend/antd/date-picker/context.ts new file mode 100644 index 00000000..d90d80aa --- /dev/null +++ b/frontend/antd/date-picker/context.ts @@ -0,0 +1,6 @@ +import { createItemsContext } from '@utils/createItemsContext'; + +const { getItems, getSetItemFn } = createItemsContext('date-picker'); + +export { getItems, getSetItemFn }; +export * from '@utils/createItemsContext'; diff --git a/frontend/antd/date-picker/date-picker.tsx b/frontend/antd/date-picker/date-picker.tsx new file mode 100644 index 00000000..3230666f --- /dev/null +++ b/frontend/antd/date-picker/date-picker.tsx @@ -0,0 +1,207 @@ +import { sveltify } from '@svelte-preprocess-react'; +import { ReactSlot } from '@svelte-preprocess-react/react-slot'; +import { useMemo } from 'react'; +import { useFunction } from '@utils/hooks/useFunction'; +import { renderItems } from '@utils/renderItems'; +import { DatePicker as ADatePicker, type GetProps } from 'antd'; +import dayjs from 'dayjs'; + +import { type Item } from './context'; + +type DatePickerProps = GetProps; + +function formatDayjs(date: any): dayjs.Dayjs { + if (Array.isArray(date)) { + return date.map((d) => { + return formatDayjs(d) as dayjs.Dayjs; + }) as unknown as dayjs.Dayjs; + } + if (typeof date === 'number') { + return dayjs(date * 1000); + } + return dayjs(date); +} + +function formatDate(dates: (dayjs.Dayjs | null | undefined)[] | dayjs.Dayjs) { + if (Array.isArray(dates)) { + return dates.map((date) => { + return date ? date.valueOf() / 1000 : null; + }); + } + if (typeof dates === 'object' && dates !== null) { + return dates.valueOf() / 1000; + } + return dates; +} + +export const DatePicker = sveltify< + Omit & { + onChange?: (date: ReturnType, ...args: any[]) => void; + onPanelChange?: ( + date: ReturnType, + ...args: any[] + ) => void; + onValueChange: (date: ReturnType) => void; + presetItems: Item[]; + }, + [ + 'allowClear.clearIcon', + 'prevIcon', + 'nextIcon', + 'suffixIcon', + 'superNextIcon', + 'superPrevIcon', + 'renderExtraFooter', + ] +>( + ({ + slots, + disabledDate, + value, + defaultValue, + defaultPickerValue, + pickerValue, + showTime, + presets, + presetItems, + onChange, + minDate, + maxDate, + cellRender, + panelRender, + getPopupContainer, + onValueChange, + onPanelChange, + children, + elRef, + ...props + }) => { + const disabledDateFunction = useFunction(disabledDate); + const getPopupContainerFunction = useFunction(getPopupContainer); + const cellRenderFunction = useFunction(cellRender); + const panelRenderFunction = useFunction(panelRender); + const validShowTime = useMemo(() => { + if (typeof showTime === 'object') { + return { + ...showTime, + defaultValue: showTime.defaultValue + ? formatDayjs(showTime.defaultValue) + : undefined, + }; + } + return showTime; + }, [showTime]); + const validValue = useMemo(() => { + return value ? formatDayjs(value) : undefined; + }, [value]); + const validDefaultValue = useMemo(() => { + return defaultValue ? formatDayjs(defaultValue) : undefined; + }, [defaultValue]); + const validDefaultPickerValue = useMemo(() => { + return defaultPickerValue ? formatDayjs(defaultPickerValue) : undefined; + }, [defaultPickerValue]); + const validPickerValue = useMemo(() => { + return pickerValue ? formatDayjs(pickerValue) : undefined; + }, [pickerValue]); + const validMinDate = useMemo(() => { + return minDate ? formatDayjs(minDate) : undefined; + }, [minDate]); + const validMaxDate = useMemo(() => { + return maxDate ? formatDayjs(maxDate) : undefined; + }, [maxDate]); + return ( + <> +
{children}
+ { + return ( + presets || + renderItems[number]>( + presetItems + ) + ).map((preset) => { + return { + ...preset, + value: formatDayjs(preset.value), + }; + }); + }, [presets, presetItems])} + onPanelChange={(date, ...args) => { + const formattedDates = formatDate(date); + onPanelChange?.(formattedDates, ...args); + }} + onChange={(date, ...args) => { + const formattedDate = formatDate(date); + onChange?.(formattedDate, ...args); + onValueChange(formattedDate); + }} + renderExtraFooter={ + slots.renderExtraFooter + ? () => + slots.renderExtraFooter ? ( + + ) : null + : props.renderExtraFooter + } + prevIcon={ + slots.prevIcon ? ( + + ) : ( + props.prevIcon + ) + } + nextIcon={ + slots.nextIcon ? ( + + ) : ( + props.nextIcon + ) + } + suffixIcon={ + slots.suffixIcon ? ( + + ) : ( + props.suffixIcon + ) + } + superNextIcon={ + slots.superNextIcon ? ( + + ) : ( + props.superNextIcon + ) + } + superPrevIcon={ + slots.superPrevIcon ? ( + + ) : ( + props.superPrevIcon + ) + } + allowClear={ + slots['allowClear.clearIcon'] + ? { + clearIcon: , + } + : props.allowClear + } + /> + + ); + } +); + +export default DatePicker; diff --git a/frontend/antd/date-picker/gradio.config.js b/frontend/antd/date-picker/gradio.config.js new file mode 100644 index 00000000..916857c0 --- /dev/null +++ b/frontend/antd/date-picker/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/date-picker/package.json b/frontend/antd/date-picker/package.json new file mode 100644 index 00000000..9525853b --- /dev/null +++ b/frontend/antd/date-picker/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-date-picker", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/date-picker/preset/Index.svelte b/frontend/antd/date-picker/preset/Index.svelte new file mode 100644 index 00000000..a623fa73 --- /dev/null +++ b/frontend/antd/date-picker/preset/Index.svelte @@ -0,0 +1,88 @@ + + + + +{#if $mergedProps.visible} + +{/if} + + diff --git a/frontend/antd/date-picker/preset/gradio.config.js b/frontend/antd/date-picker/preset/gradio.config.js new file mode 100644 index 00000000..1992403d --- /dev/null +++ b/frontend/antd/date-picker/preset/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/date-picker/preset/package.json b/frontend/antd/date-picker/preset/package.json new file mode 100644 index 00000000..de1d5182 --- /dev/null +++ b/frontend/antd/date-picker/preset/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-date-picker.preset", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/date-picker/range-picker/Index.svelte b/frontend/antd/date-picker/range-picker/Index.svelte new file mode 100644 index 00000000..08582ba0 --- /dev/null +++ b/frontend/antd/date-picker/range-picker/Index.svelte @@ -0,0 +1,84 @@ + + + + +{#if $mergedProps.visible} + {#await AwaitedDatePickerRangePicker then DateRangePicker} + { + value = val; + }} + > + + + {/await} +{/if} diff --git a/frontend/antd/date-picker/range-picker/date-picker.range-picker.tsx b/frontend/antd/date-picker/range-picker/date-picker.range-picker.tsx new file mode 100644 index 00000000..e8f74647 --- /dev/null +++ b/frontend/antd/date-picker/range-picker/date-picker.range-picker.tsx @@ -0,0 +1,227 @@ +import { sveltify } from '@svelte-preprocess-react'; +import { ReactSlot } from '@svelte-preprocess-react/react-slot'; +import { useMemo } from 'react'; +import { useFunction } from '@utils/hooks/useFunction'; +import { renderItems } from '@utils/renderItems'; +import { DatePicker as ADatePicker, type GetProps } from 'antd'; +import dayjs from 'dayjs'; + +import { type Item } from '../context'; + +type RangePickerProps = GetProps; + +function formatDayjs(date: any) { + if (typeof date === 'number') { + return dayjs(date * 1000); + } + return dayjs(date); +} + +function formatDates( + dates: [dayjs.Dayjs | null | undefined, dayjs.Dayjs | null | undefined] | null +): [number | null, number | null] { + return (dates?.map((date) => { + return date ? date.valueOf() / 1000 : null; + }) || [null, null]) as [number | null, number | null]; +} + +export const DateRangePicker = sveltify< + Omit & { + onChange?: (dates: [number | null, number | null], ...args: any[]) => void; + onPanelChange?: ( + dates: [number | null, number | null], + ...args: any[] + ) => void; + onCalendarChange?: ( + dates: [number | null, number | null], + ...args: any[] + ) => void; + onValueChange: (dates: [number | null, number | null]) => void; + presetItems: Item[]; + }, + [ + 'allowClear.clearIcon', + 'prevIcon', + 'nextIcon', + 'suffixIcon', + 'superNextIcon', + 'superPrevIcon', + 'renderExtraFooter', + 'separator', + ] +>( + ({ + slots, + disabledDate, + value, + defaultValue, + defaultPickerValue, + pickerValue, + presets, + presetItems, + showTime, + onChange, + minDate, + maxDate, + cellRender, + panelRender, + getPopupContainer, + onValueChange, + onPanelChange, + onCalendarChange, + children, + elRef, + + ...props + }) => { + const disabledDateFunction = useFunction(disabledDate); + const getPopupContainerFunction = useFunction(getPopupContainer); + const cellRenderFunction = useFunction(cellRender); + const panelRenderFunction = useFunction(panelRender); + const validShowTime = useMemo(() => { + if (typeof showTime === 'object') { + return { + ...showTime, + defaultValue: showTime.defaultValue?.map((v) => formatDayjs(v)), + }; + } + return showTime; + }, [showTime]); + const validValue = useMemo(() => { + return value?.map((v) => formatDayjs(v)) as RangePickerProps['value']; + }, [value]); + + const validDefaultValue = useMemo(() => { + return defaultValue?.map((v) => + formatDayjs(v) + ) as RangePickerProps['defaultValue']; + }, [defaultValue]); + const validDefaultPickerValue = useMemo(() => { + if (Array.isArray(defaultPickerValue)) { + return defaultPickerValue.map((v) => + formatDayjs(v) + ) as RangePickerProps['defaultPickerValue']; + } + return defaultPickerValue ? formatDayjs(defaultPickerValue) : undefined; + }, [defaultPickerValue]); + const validPickerValue = useMemo(() => { + if (Array.isArray(pickerValue)) { + return pickerValue.map((v) => + formatDayjs(v) + ) as RangePickerProps['pickerValue']; + } + return pickerValue ? formatDayjs(pickerValue) : undefined; + }, [pickerValue]); + const validMinDate = useMemo(() => { + return minDate ? formatDayjs(minDate) : undefined; + }, [minDate]); + const validMaxDate = useMemo(() => { + return maxDate ? formatDayjs(maxDate) : undefined; + }, [maxDate]); + return ( + <> +
{children}
+ { + return ( + presets || + renderItems[number]>( + presetItems + ) + ).map((preset) => { + return { + ...preset, + value: formatDates(preset.value as any), + }; + }) as NonNullable; + }, [presets, presetItems])} + onPanelChange={(dates, ...args) => { + const formattedDates = formatDates(dates); + onPanelChange?.(formattedDates, ...args); + }} + onChange={(dates, ...args) => { + const formattedDates = formatDates(dates); + onChange?.(formattedDates, ...args); + onValueChange(formattedDates); + }} + onCalendarChange={(dates, ...args) => { + const formattedDates = formatDates(dates); + onCalendarChange?.(formattedDates, ...args); + }} + renderExtraFooter={ + slots.renderExtraFooter + ? () => + slots.renderExtraFooter ? ( + + ) : null + : props.renderExtraFooter + } + prevIcon={ + slots.prevIcon ? ( + + ) : ( + props.prevIcon + ) + } + nextIcon={ + slots.nextIcon ? ( + + ) : ( + props.nextIcon + ) + } + suffixIcon={ + slots.suffixIcon ? ( + + ) : ( + props.suffixIcon + ) + } + superNextIcon={ + slots.superNextIcon ? ( + + ) : ( + props.superNextIcon + ) + } + superPrevIcon={ + slots.superPrevIcon ? ( + + ) : ( + props.superPrevIcon + ) + } + allowClear={ + slots['allowClear.clearIcon'] + ? { + clearIcon: , + } + : props.allowClear + } + separator={ + slots.separator ? ( + + ) : ( + props.separator + ) + } + /> + + ); + } +); + +export default DateRangePicker; diff --git a/frontend/antd/date-picker/range-picker/gradio.config.js b/frontend/antd/date-picker/range-picker/gradio.config.js new file mode 100644 index 00000000..1992403d --- /dev/null +++ b/frontend/antd/date-picker/range-picker/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/date-picker/range-picker/package.json b/frontend/antd/date-picker/range-picker/package.json new file mode 100644 index 00000000..3eabe51a --- /dev/null +++ b/frontend/antd/date-picker/range-picker/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-date-picker.range-picker", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/descriptions/Index.svelte b/frontend/antd/descriptions/Index.svelte new file mode 100644 index 00000000..c886c04d --- /dev/null +++ b/frontend/antd/descriptions/Index.svelte @@ -0,0 +1,78 @@ + + + + +{#if $mergedProps.visible} + {#await AwaitedDescriptions then Descriptions} + 0 ? $items : $children} + > + + + {/await} +{/if} + + diff --git a/frontend/antd/descriptions/context.ts b/frontend/antd/descriptions/context.ts new file mode 100644 index 00000000..8ad59e83 --- /dev/null +++ b/frontend/antd/descriptions/context.ts @@ -0,0 +1,6 @@ +import { createItemsContext } from '@utils/createItemsContext'; + +const { getItems, getSetItemFn } = createItemsContext('descriptions'); + +export { getItems, getSetItemFn }; +export * from '@utils/createItemsContext'; diff --git a/frontend/antd/descriptions/descriptions.tsx b/frontend/antd/descriptions/descriptions.tsx new file mode 100644 index 00000000..4d9b3991 --- /dev/null +++ b/frontend/antd/descriptions/descriptions.tsx @@ -0,0 +1,37 @@ +import { sveltify } from '@svelte-preprocess-react'; +import { ReactSlot } from '@svelte-preprocess-react/react-slot'; +import React, { useMemo } from 'react'; +import { renderItems } from '@utils/renderItems'; +import { Descriptions as ADescriptions, type GetProps } from 'antd'; + +import { type Item } from './context'; + +type DescriptionsProps = GetProps; +export const Descriptions = sveltify< + DescriptionsProps & { + slotItems: Item[]; + }, + ['extra', 'title'] +>(({ slots, items, slotItems, children, ...props }) => { + return ( + <> +
{children}
+ : props.extra} + title={slots.title ? : props.title} + items={useMemo(() => { + // ['label', 'children'] + return ( + items || + renderItems[number]>( + slotItems + ) + ); + }, [items, slotItems])} + /> + + ); +}); + +export default Descriptions; diff --git a/frontend/antd/descriptions/gradio.config.js b/frontend/antd/descriptions/gradio.config.js new file mode 100644 index 00000000..916857c0 --- /dev/null +++ b/frontend/antd/descriptions/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/descriptions/item/Index.svelte b/frontend/antd/descriptions/item/Index.svelte new file mode 100644 index 00000000..fb0e2db4 --- /dev/null +++ b/frontend/antd/descriptions/item/Index.svelte @@ -0,0 +1,90 @@ + + + + +{#if $mergedProps.visible} + + + +{/if} + + diff --git a/frontend/antd/descriptions/item/gradio.config.js b/frontend/antd/descriptions/item/gradio.config.js new file mode 100644 index 00000000..1992403d --- /dev/null +++ b/frontend/antd/descriptions/item/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/descriptions/item/package.json b/frontend/antd/descriptions/item/package.json new file mode 100644 index 00000000..995cd23e --- /dev/null +++ b/frontend/antd/descriptions/item/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-descriptions.item", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/descriptions/package.json b/frontend/antd/descriptions/package.json new file mode 100644 index 00000000..be97d578 --- /dev/null +++ b/frontend/antd/descriptions/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-descriptions", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/divider/Index.svelte b/frontend/antd/divider/Index.svelte new file mode 100644 index 00000000..8dbe0d96 --- /dev/null +++ b/frontend/antd/divider/Index.svelte @@ -0,0 +1,107 @@ + + + + + +{#if $mergedProps.visible} + {#await AwaitedDivider then Divider} + {#if $mergedProps._internal.layout} + + + + {:else if $mergedProps.value} + + {$mergedProps.value} + + {:else} + + {/if} + {/await} +{/if} + + diff --git a/frontend/antd/divider/divider.tsx b/frontend/antd/divider/divider.tsx new file mode 100644 index 00000000..e61d6ddc --- /dev/null +++ b/frontend/antd/divider/divider.tsx @@ -0,0 +1,10 @@ +import { sveltify } from '@svelte-preprocess-react'; +import { Divider as ADivider, type GetProps } from 'antd'; + +export const Divider = sveltify, ['children']>( + ({ ...props }) => { + return ; + } +); + +export default Divider; diff --git a/frontend/antd/divider/gradio.config.js b/frontend/antd/divider/gradio.config.js new file mode 100644 index 00000000..916857c0 --- /dev/null +++ b/frontend/antd/divider/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/divider/package.json b/frontend/antd/divider/package.json new file mode 100644 index 00000000..c4b5a5b9 --- /dev/null +++ b/frontend/antd/divider/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-divider", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/drawer/Index.svelte b/frontend/antd/drawer/Index.svelte new file mode 100644 index 00000000..858fd517 --- /dev/null +++ b/frontend/antd/drawer/Index.svelte @@ -0,0 +1,70 @@ + + + + +{#if $mergedProps.visible} + {#await AwaitedDrawer then Drawer} + + + + {/await} +{/if} + + diff --git a/frontend/antd/drawer/drawer.tsx b/frontend/antd/drawer/drawer.tsx new file mode 100644 index 00000000..9f3b9376 --- /dev/null +++ b/frontend/antd/drawer/drawer.tsx @@ -0,0 +1,32 @@ +import { sveltify } from '@svelte-preprocess-react'; +import { ReactSlot } from '@svelte-preprocess-react/react-slot'; +import React from 'react'; +import { useFunction } from '@utils/hooks/useFunction'; +import { Drawer as ADrawer, type GetProps } from 'antd'; + +export const Drawer = sveltify< + GetProps, + ['closeIcon', 'extra', 'footer', 'title'] +>(({ slots, afterOpenChange, getContainer, drawerRender, ...props }) => { + const afterOpenChangeFunction = useFunction(afterOpenChange); + const getContainerFunction = useFunction(getContainer); + const drawerRenderFunction = useFunction(drawerRender); + return ( + : props.closeIcon + } + extra={slots.extra ? : props.extra} + footer={slots.footer ? : props.footer} + title={slots.title ? : props.title} + drawerRender={drawerRenderFunction} + getContainer={ + typeof getContainer === 'string' ? getContainerFunction : getContainer + } + /> + ); +}); + +export default Drawer; diff --git a/frontend/antd/drawer/gradio.config.js b/frontend/antd/drawer/gradio.config.js new file mode 100644 index 00000000..916857c0 --- /dev/null +++ b/frontend/antd/drawer/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/drawer/package.json b/frontend/antd/drawer/package.json new file mode 100644 index 00000000..6b5f9ded --- /dev/null +++ b/frontend/antd/drawer/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-drawer", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/dropdown/Index.svelte b/frontend/antd/dropdown/Index.svelte new file mode 100644 index 00000000..02923eb2 --- /dev/null +++ b/frontend/antd/dropdown/Index.svelte @@ -0,0 +1,77 @@ + + + + +{#if $mergedProps.visible} + {#await AwaitedDropdown then Dropdown} + + + + {/await} +{/if} + + diff --git a/frontend/antd/dropdown/button/Index.svelte b/frontend/antd/dropdown/button/Index.svelte new file mode 100644 index 00000000..0035a606 --- /dev/null +++ b/frontend/antd/dropdown/button/Index.svelte @@ -0,0 +1,83 @@ + + + + +{#if $mergedProps.visible} + {#await AwaitedDropdownButton then DropdownButton} + + {#if $mergedProps._internal.layout} + + {:else} + {$mergedProps.value} + {/if} + + {/await} +{/if} + + diff --git a/frontend/antd/dropdown/button/dropdown.button.tsx b/frontend/antd/dropdown/button/dropdown.button.tsx new file mode 100644 index 00000000..15dde97d --- /dev/null +++ b/frontend/antd/dropdown/button/dropdown.button.tsx @@ -0,0 +1,62 @@ +import { sveltify } from '@svelte-preprocess-react'; +import { ReactSlot } from '@svelte-preprocess-react/react-slot'; +import { useMemo } from 'react'; +import { type Item } from '@utils/createItemsContext'; +import { useFunction } from '@utils/hooks/useFunction'; +import { useTargets } from '@utils/hooks/useTargets'; +import { renderItems } from '@utils/renderItems'; +import { Dropdown as ADropdown, type GetProps } from 'antd'; +import type { ItemType } from 'antd/es/menu/interface'; + +export const DropdownButton = sveltify< + GetProps & { + menuItems: Item[]; + }, + ['icon', 'buttonsRender', 'menu.expandIcon', 'menu.overflowedIndicator'] +>( + ({ + getPopupContainer, + slots, + menuItems, + children, + dropdownRender, + ...props + }) => { + const getPopupContainerFunction = useFunction(getPopupContainer); + const dropdownRenderFunction = useFunction(dropdownRender); + const buttonsRenderTargets = useTargets(children, 'buttonsRender'); + return ( + + buttonsRenderTargets.map((item, index) => { + return ; + }) + : props.buttonsRender + } + menu={{ + ...props.menu, + items: useMemo(() => { + return props.menu?.items || renderItems(menuItems); + }, [menuItems, props.menu?.items]), + expandIcon: slots['menu.expandIcon'] ? ( + + ) : ( + props.menu?.expandIcon + ), + overflowedIndicator: slots['menu.overflowedIndicator'] ? ( + + ) : ( + props.menu?.overflowedIndicator + ), + }} + getPopupContainer={getPopupContainerFunction} + dropdownRender={dropdownRenderFunction} + /> + ); + } +); + +export default DropdownButton; diff --git a/frontend/antd/dropdown/button/gradio.config.js b/frontend/antd/dropdown/button/gradio.config.js new file mode 100644 index 00000000..1992403d --- /dev/null +++ b/frontend/antd/dropdown/button/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/dropdown/button/package.json b/frontend/antd/dropdown/button/package.json new file mode 100644 index 00000000..b495d44b --- /dev/null +++ b/frontend/antd/dropdown/button/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-dropdown.button", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/dropdown/dropdown.tsx b/frontend/antd/dropdown/dropdown.tsx new file mode 100644 index 00000000..57532569 --- /dev/null +++ b/frontend/antd/dropdown/dropdown.tsx @@ -0,0 +1,66 @@ +import { sveltify } from '@svelte-preprocess-react'; +import { ReactSlot } from '@svelte-preprocess-react/react-slot'; +import { useMemo } from 'react'; +import { type Item } from '@utils/createItemsContext'; +import { useFunction } from '@utils/hooks/useFunction'; +import { renderItems } from '@utils/renderItems'; +import { Dropdown as ADropdown, type GetProps } from 'antd'; +import type { ItemType } from 'antd/es/menu/interface'; + +export const Dropdown = sveltify< + GetProps & { + menuItems: Item[]; + innerStyle?: React.CSSProperties; + }, + ['menu.expandIcon', 'menu.overflowedIndicator'] +>( + ({ + getPopupContainer, + innerStyle, + children, + slots, + menuItems, + dropdownRender, + ...props + }) => { + const getPopupContainerFunction = useFunction(getPopupContainer); + const dropdownRenderFunction = useFunction(dropdownRender); + return ( + <> + { + return props.menu?.items || renderItems(menuItems); + }, [menuItems, props.menu?.items]), + expandIcon: slots['menu.expandIcon'] ? ( + + ) : ( + props.menu?.expandIcon + ), + overflowedIndicator: slots['menu.overflowedIndicator'] ? ( + + ) : ( + props.menu?.overflowedIndicator + ), + }} + getPopupContainer={getPopupContainerFunction} + dropdownRender={dropdownRenderFunction} + > +
+ {children} +
+
+ + ); + } +); + +export default Dropdown; diff --git a/frontend/antd/dropdown/gradio.config.js b/frontend/antd/dropdown/gradio.config.js new file mode 100644 index 00000000..916857c0 --- /dev/null +++ b/frontend/antd/dropdown/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/dropdown/package.json b/frontend/antd/dropdown/package.json new file mode 100644 index 00000000..30b2bd58 --- /dev/null +++ b/frontend/antd/dropdown/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-dropdown", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/empty/Index.svelte b/frontend/antd/empty/Index.svelte new file mode 100644 index 00000000..da8d8ff0 --- /dev/null +++ b/frontend/antd/empty/Index.svelte @@ -0,0 +1,70 @@ + + + + +{#if $mergedProps.visible} + {#await AwaitedEmpty then Empty} + + + + {/await} +{/if} + + diff --git a/frontend/antd/empty/empty.tsx b/frontend/antd/empty/empty.tsx new file mode 100644 index 00000000..a7a7bdf4 --- /dev/null +++ b/frontend/antd/empty/empty.tsx @@ -0,0 +1,28 @@ +import { sveltify } from '@svelte-preprocess-react'; +import { ReactSlot } from '@svelte-preprocess-react/react-slot'; +import { Empty as AEmpty, type GetProps } from 'antd'; + +export const Empty = sveltify< + GetProps, + ['description', 'image'] +>(({ slots, imageStyle, ...props }) => { + return ( + + ) : ( + props.description + ) + } + imageStyle={{ + display: 'inline-block', + ...imageStyle, + }} + image={slots.image ? : props.image} + /> + ); +}); + +export default Empty; diff --git a/frontend/antd/empty/gradio.config.js b/frontend/antd/empty/gradio.config.js new file mode 100644 index 00000000..916857c0 --- /dev/null +++ b/frontend/antd/empty/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/empty/package.json b/frontend/antd/empty/package.json new file mode 100644 index 00000000..ba2fc6be --- /dev/null +++ b/frontend/antd/empty/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-flex", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/flex/Index.svelte b/frontend/antd/flex/Index.svelte new file mode 100644 index 00000000..a871f41d --- /dev/null +++ b/frontend/antd/flex/Index.svelte @@ -0,0 +1,98 @@ + + + + +{#if $mergedProps.visible} + {#await AwaitedFlex then Flex} + + + + {/await} +{/if} + + diff --git a/frontend/antd/flex/flex.tsx b/frontend/antd/flex/flex.tsx new file mode 100644 index 00000000..f63efbba --- /dev/null +++ b/frontend/antd/flex/flex.tsx @@ -0,0 +1,8 @@ +import { sveltify } from '@svelte-preprocess-react'; +import { Flex as AFlex, type GetProps } from 'antd'; + +export const Flex = sveltify>((props) => { + return ; +}); + +export default Flex; diff --git a/frontend/antd/flex/gradio.config.js b/frontend/antd/flex/gradio.config.js new file mode 100644 index 00000000..916857c0 --- /dev/null +++ b/frontend/antd/flex/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/flex/package.json b/frontend/antd/flex/package.json new file mode 100644 index 00000000..ba2fc6be --- /dev/null +++ b/frontend/antd/flex/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-flex", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/float-button/Index.svelte b/frontend/antd/float-button/Index.svelte new file mode 100644 index 00000000..c81a7dee --- /dev/null +++ b/frontend/antd/float-button/Index.svelte @@ -0,0 +1,67 @@ + + + + +{#if $mergedProps.visible} + {#await AwaitedFloatButton then FloatButton} + + + + {/await} +{/if} diff --git a/frontend/antd/float-button/back-top/Index.svelte b/frontend/antd/float-button/back-top/Index.svelte new file mode 100644 index 00000000..56d94c6c --- /dev/null +++ b/frontend/antd/float-button/back-top/Index.svelte @@ -0,0 +1,73 @@ + + + + +{#if $mergedProps.visible} + {#await AwaitedFloatButtonBackTop then FloatButtonBackTop} + + {/await} +{/if} + + diff --git a/frontend/antd/float-button/back-top/float-button.back-top.tsx b/frontend/antd/float-button/back-top/float-button.back-top.tsx new file mode 100644 index 00000000..eb494320 --- /dev/null +++ b/frontend/antd/float-button/back-top/float-button.back-top.tsx @@ -0,0 +1,42 @@ +import { sveltify } from '@svelte-preprocess-react'; +import { ReactSlot } from '@svelte-preprocess-react/react-slot'; +import React from 'react'; +import { useFunction } from '@utils/hooks/useFunction'; +import { FloatButton as AFloatButton, type GetProps } from 'antd'; + +export const FloatButtonBackTop = sveltify< + GetProps, + ['icon', 'description', 'tooltip', 'badge.count'] +>(({ slots, children, target, ...props }) => { + const targetFunction = useFunction(target); + return ( + <> + : props.icon} + description={ + slots.description ? ( + + ) : ( + props.description + ) + } + tooltip={ + slots.tooltip ? : props.tooltip + } + badge={{ + ...props.badge, + count: slots['badge.count'] ? ( + + ) : ( + props.badge?.count + ), + }} + /> + {children} + + ); +}); + +export default FloatButtonBackTop; diff --git a/frontend/antd/float-button/back-top/gradio.config.js b/frontend/antd/float-button/back-top/gradio.config.js new file mode 100644 index 00000000..1992403d --- /dev/null +++ b/frontend/antd/float-button/back-top/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/float-button/back-top/package.json b/frontend/antd/float-button/back-top/package.json new file mode 100644 index 00000000..ad6d78f7 --- /dev/null +++ b/frontend/antd/float-button/back-top/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-float-button.back-top", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/float-button/float-button.tsx b/frontend/antd/float-button/float-button.tsx new file mode 100644 index 00000000..290e4750 --- /dev/null +++ b/frontend/antd/float-button/float-button.tsx @@ -0,0 +1,42 @@ +import { sveltify } from '@svelte-preprocess-react'; +import { ReactSlot } from '@svelte-preprocess-react/react-slot'; +import React from 'react'; +import { FloatButton as AFloatButton, type GetProps } from 'antd'; + +export const FloatButton = sveltify< + GetProps & { + id?: string; + }, + ['icon', 'description', 'tooltip', 'badge.count'] +>(({ slots, children, ...props }) => { + return ( + <> + : props.icon} + description={ + slots.description ? ( + + ) : ( + props.description + ) + } + tooltip={ + slots.tooltip ? : props.tooltip + } + badge={{ + ...props.badge, + count: slots['badge.count'] ? ( + + ) : ( + props.badge?.count + ), + }} + /> + {/* render the slots */} + {children} + + ); +}); + +export default FloatButton; diff --git a/frontend/antd/float-button/gradio.config.js b/frontend/antd/float-button/gradio.config.js new file mode 100644 index 00000000..916857c0 --- /dev/null +++ b/frontend/antd/float-button/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/float-button/group/Index.svelte b/frontend/antd/float-button/group/Index.svelte new file mode 100644 index 00000000..ef94fa6b --- /dev/null +++ b/frontend/antd/float-button/group/Index.svelte @@ -0,0 +1,75 @@ + + + + +{#if $mergedProps.visible} + {#await AwaitedFloatButtonGroup then FloatButtonGroup} + + + + {/await} +{/if} + + diff --git a/frontend/antd/float-button/group/float-button.group.less b/frontend/antd/float-button/group/float-button.group.less new file mode 100644 index 00000000..4125d193 --- /dev/null +++ b/frontend/antd/float-button/group/float-button.group.less @@ -0,0 +1,30 @@ +.ms-gr-antd-container { + .ms-gr-antd-float-button-group { + &.ms-gr-antd-float-button-group-square { + react-portal-target { + .ms-gr-antd-float-button { + border-start-start-radius: 0 !important; + border-start-end-radius: 0 !important; + } + + &:first-child { + .ms-gr-antd-float-button { + border-start-start-radius: var( + --ms-gr-antd-border-radius-lg + ) !important; + border-start-end-radius: var( + --ms-gr-antd-border-radius-lg + ) !important; + } + } + + &:last-child { + .ms-gr-antd-float-button { + border-end-start-radius: var(--ms-gr-antd-border-radius-lg); + border-end-end-radius: var(--ms-gr-antd-border-radius-lg); + } + } + } + } + } +} diff --git a/frontend/antd/float-button/group/float-button.group.tsx b/frontend/antd/float-button/group/float-button.group.tsx new file mode 100644 index 00000000..6c482504 --- /dev/null +++ b/frontend/antd/float-button/group/float-button.group.tsx @@ -0,0 +1,54 @@ +import { sveltify } from '@svelte-preprocess-react'; +import { ReactSlot } from '@svelte-preprocess-react/react-slot'; +import React from 'react'; +import { FloatButton as AFloatButton, type GetProps, theme } from 'antd'; +import cls from 'classnames'; + +import './float-button.group.less'; + +export const FloatButtonGroup = sveltify< + GetProps & { + id?: string; + }, + ['icon', 'closeIcon', 'description', 'tooltip', 'badge.count'] +>(({ slots, style, shape = 'circle', className, ...props }) => { + const { token } = theme.useToken(); + + return ( + : props.closeIcon + } + icon={slots.icon ? : props.icon} + description={ + slots.description ? ( + + ) : ( + props.description + ) + } + tooltip={ + slots.tooltip ? : props.tooltip + } + badge={{ + ...props.badge, + count: slots['badge.count'] ? ( + + ) : ( + props.badge?.count + ), + }} + /> + ); +}); + +export default FloatButtonGroup; diff --git a/frontend/antd/float-button/group/gradio.config.js b/frontend/antd/float-button/group/gradio.config.js new file mode 100644 index 00000000..1992403d --- /dev/null +++ b/frontend/antd/float-button/group/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/float-button/group/package.json b/frontend/antd/float-button/group/package.json new file mode 100644 index 00000000..26936512 --- /dev/null +++ b/frontend/antd/float-button/group/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-float-button.group", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/float-button/package.json b/frontend/antd/float-button/package.json new file mode 100644 index 00000000..75494ba6 --- /dev/null +++ b/frontend/antd/float-button/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-float-button", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/form/Index.svelte b/frontend/antd/form/Index.svelte new file mode 100644 index 00000000..6f52e9cc --- /dev/null +++ b/frontend/antd/form/Index.svelte @@ -0,0 +1,76 @@ + + + + +{#if $mergedProps.visible} + {#await AwaitedForm then Form} +
{ + value = v; + }} + > + + + {/await} +{/if} + + diff --git a/frontend/antd/form/context.ts b/frontend/antd/form/context.ts new file mode 100644 index 00000000..10e6362a --- /dev/null +++ b/frontend/antd/form/context.ts @@ -0,0 +1,7 @@ +import { createItemsContext } from '@utils/createItemsContext'; + +const { getItems: getRuleItems, getSetItemFn: getSetRuleItemFn } = + createItemsContext('form-item-rule'); + +export { getRuleItems, getSetRuleItemFn }; +export * from '@utils/createItemsContext'; diff --git a/frontend/antd/form/form.tsx b/frontend/antd/form/form.tsx new file mode 100644 index 00000000..290a2c9f --- /dev/null +++ b/frontend/antd/form/form.tsx @@ -0,0 +1,28 @@ +import { sveltify } from '@svelte-preprocess-react'; +import { useEffect } from 'react'; +import { Form as AForm, type GetProps } from 'antd'; + +export const Form = sveltify< + GetProps & { + value: Record; + onValueChange: (value: Record) => void; + } +>(({ value, onValueChange, onValuesChange, ...props }) => { + const [form] = AForm.useForm(); + useEffect(() => { + form.setFieldsValue(value); + }, [form, value]); + return ( + { + onValueChange(values); + onValuesChange?.(changedValues, values); + }} + /> + ); +}); + +export default Form; diff --git a/frontend/antd/form/gradio.config.js b/frontend/antd/form/gradio.config.js new file mode 100644 index 00000000..916857c0 --- /dev/null +++ b/frontend/antd/form/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/form/item/Index.svelte b/frontend/antd/form/item/Index.svelte new file mode 100644 index 00000000..5a778338 --- /dev/null +++ b/frontend/antd/form/item/Index.svelte @@ -0,0 +1,80 @@ + + + + +{#if $mergedProps.visible} + {#await AwaitedFormItem then FormItem} + + + + {/await} +{/if} + + diff --git a/frontend/antd/form/item/form.item.tsx b/frontend/antd/form/item/form.item.tsx new file mode 100644 index 00000000..da7fca2b --- /dev/null +++ b/frontend/antd/form/item/form.item.tsx @@ -0,0 +1,117 @@ +import { sveltify } from '@svelte-preprocess-react'; +import { FormItemContext } from '@svelte-preprocess-react/context'; +import { ReactSlot } from '@svelte-preprocess-react/react-slot'; +import { useMemo } from 'react'; +import { useFunction } from '@utils/hooks/useFunction'; +import { renderItems } from '@utils/renderItems'; +import { Form as AForm, type GetProps } from 'antd'; + +import { type Item } from '../context'; + +function getConfig(value: T): Partial> { + if (typeof value === 'object' && value !== null) { + return value as any; + } + return {} as any; +} + +const FormItemWrapper: React.FC<{ + children?: React.ReactNode; +}> = ({ children, ...props }) => { + return ( + { + return props; + }, [props])} + > + {children} + + ); +}; + +export const FormItem = sveltify< + GetProps & { + ruleItems: Item[]; + }, + ['extra', 'help', 'label', 'tooltip', 'tooltip.title', 'tooltip.icon'] +>( + ({ + slots, + getValueFromEvent, + getValueProps, + normalize, + shouldUpdate, + tooltip, + ruleItems, + rules, + children, + ...props + }) => { + const supportTooltipConfig = + slots['tooltip.icon'] || + slots['tooltip.title'] || + typeof tooltip === 'object'; + const getValueFromEventFunction = useFunction(getValueFromEvent); + const getValuePropsFunction = useFunction(getValueProps); + const normalizeFunction = useFunction(normalize); + const shouldUpdateFunction = useFunction(shouldUpdate); + const tooltipConfig = getConfig(tooltip); + const tooltipAfterOpenChangeFunction = useFunction( + tooltipConfig.afterOpenChange + ); + const tooltipGetPopupContainerFunction = useFunction( + tooltipConfig.getPopupContainer + ); + return ( + { + return ( + rules || + renderItems< + NonNullable['rules']>[number] + >(ruleItems) + ); + }, [ruleItems, rules])} + tooltip={ + slots['tooltip'] ? ( + + ) : supportTooltipConfig ? ( + { + ...tooltipConfig, + afterOpenChange: tooltipAfterOpenChangeFunction, + getPopupContainer: tooltipGetPopupContainerFunction, + icon: slots['tooltip.icon'] ? ( + + ) : ( + tooltipConfig.icon + ), + title: slots['tooltip.title'] ? ( + + ) : ( + tooltipConfig.title + ), + } + ) : ( + tooltip + ) + } + extra={slots.extra ? : props.extra} + help={slots.help ? : props.help} + label={slots.label ? : props.label} + > + {shouldUpdateFunction || shouldUpdate ? ( + () => {children as React.ReactNode} + ) : ( + {children as React.ReactNode} + )} + + ); + } +); + +export default FormItem; diff --git a/frontend/antd/form/item/gradio.config.js b/frontend/antd/form/item/gradio.config.js new file mode 100644 index 00000000..1992403d --- /dev/null +++ b/frontend/antd/form/item/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/form/item/package.json b/frontend/antd/form/item/package.json new file mode 100644 index 00000000..a7565d61 --- /dev/null +++ b/frontend/antd/form/item/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-form.item", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/form/item/rule/Index.svelte b/frontend/antd/form/item/rule/Index.svelte new file mode 100644 index 00000000..9e3451c3 --- /dev/null +++ b/frontend/antd/form/item/rule/Index.svelte @@ -0,0 +1,64 @@ + + + + + diff --git a/frontend/antd/form/item/rule/global.css b/frontend/antd/form/item/rule/global.css new file mode 100644 index 00000000..9d7608a9 --- /dev/null +++ b/frontend/antd/form/item/rule/global.css @@ -0,0 +1,3 @@ +.ms-gr-antd-noop-class { + display: none; +} diff --git a/frontend/antd/form/item/rule/gradio.config.js b/frontend/antd/form/item/rule/gradio.config.js new file mode 100644 index 00000000..7b2fe8dd --- /dev/null +++ b/frontend/antd/form/item/rule/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/form/item/rule/package.json b/frontend/antd/form/item/rule/package.json new file mode 100644 index 00000000..ab511de3 --- /dev/null +++ b/frontend/antd/form/item/rule/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-form.item.rule", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/form/package.json b/frontend/antd/form/package.json new file mode 100644 index 00000000..f7796392 --- /dev/null +++ b/frontend/antd/form/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-form", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/grid/col/Index.svelte b/frontend/antd/grid/col/Index.svelte new file mode 100644 index 00000000..55629c7d --- /dev/null +++ b/frontend/antd/grid/col/Index.svelte @@ -0,0 +1,128 @@ + + + + +{#if $mergedProps.visible} + + + +{/if} + + diff --git a/frontend/antd/grid/col/gradio.config.js b/frontend/antd/grid/col/gradio.config.js new file mode 100644 index 00000000..1992403d --- /dev/null +++ b/frontend/antd/grid/col/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/grid/col/package.json b/frontend/antd/grid/col/package.json new file mode 100644 index 00000000..be71674a --- /dev/null +++ b/frontend/antd/grid/col/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-col", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/grid/context.ts b/frontend/antd/grid/context.ts new file mode 100644 index 00000000..38432560 --- /dev/null +++ b/frontend/antd/grid/context.ts @@ -0,0 +1,6 @@ +import { createItemsContext } from '@utils/createItemsContext'; + +const { getItems, getSetItemFn } = createItemsContext('grid'); + +export { getItems, getSetItemFn }; +export * from '@utils/createItemsContext'; diff --git a/frontend/antd/grid/row/Index.svelte b/frontend/antd/grid/row/Index.svelte new file mode 100644 index 00000000..7a5d55bf --- /dev/null +++ b/frontend/antd/grid/row/Index.svelte @@ -0,0 +1,90 @@ + + + + +{#if $mergedProps.visible} + {#await AwaitedRow then Row} + + + + {/await} +{/if} + + diff --git a/frontend/antd/grid/row/gradio.config.js b/frontend/antd/grid/row/gradio.config.js new file mode 100644 index 00000000..1992403d --- /dev/null +++ b/frontend/antd/grid/row/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/grid/row/package.json b/frontend/antd/grid/row/package.json new file mode 100644 index 00000000..d6aff6a4 --- /dev/null +++ b/frontend/antd/grid/row/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-row", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/grid/row/row.tsx b/frontend/antd/grid/row/row.tsx new file mode 100644 index 00000000..9efea067 --- /dev/null +++ b/frontend/antd/grid/row/row.tsx @@ -0,0 +1,30 @@ +import { sveltify } from '@svelte-preprocess-react'; +import { ReactSlot } from '@svelte-preprocess-react/react-slot'; +import { Col as ACol, type GetProps, Row as ARow } from 'antd'; + +import { type Item } from '../context'; + +export const Row = sveltify< + GetProps & { + cols?: Item[]; + } +>(({ cols, children, ...props }) => { + return ( + + {children} + {cols?.map((item, index) => { + if (!item) { + return; + } + const { el, props: colProps } = item; + return ( + + {el && } + + ); + })} + + ); +}); + +export default Row; diff --git a/frontend/antd/icon/Index.svelte b/frontend/antd/icon/Index.svelte new file mode 100644 index 00000000..a8807561 --- /dev/null +++ b/frontend/antd/icon/Index.svelte @@ -0,0 +1,74 @@ + + + + +{#if $mergedProps.visible} + {#await AwaitedIcon then Icon} + + {/await} +{/if} diff --git a/frontend/antd/icon/gradio.config.js b/frontend/antd/icon/gradio.config.js new file mode 100644 index 00000000..916857c0 --- /dev/null +++ b/frontend/antd/icon/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/icon/icon.tsx b/frontend/antd/icon/icon.tsx new file mode 100644 index 00000000..a58536ed --- /dev/null +++ b/frontend/antd/icon/icon.tsx @@ -0,0 +1,26 @@ +import { sveltify } from '@svelte-preprocess-react'; +import React from 'react'; +import * as icons from '@ant-design/icons'; +import type { GetProps } from 'antd'; + +export const Icon = sveltify< + GetProps & { + name: string; + Iconfont?: ReturnType; + } +>(({ name, Iconfont, ...props }) => { + const icon = icons[name as keyof typeof icons] as React.ComponentType< + GetProps + >; + return ( + <> + {icon ? ( + React.createElement(icon, props) + ) : Iconfont ? ( + + ) : null} + + ); +}); + +export default Icon; diff --git a/frontend/antd/icon/iconfont-provider/Index.svelte b/frontend/antd/icon/iconfont-provider/Index.svelte new file mode 100644 index 00000000..b5f98d70 --- /dev/null +++ b/frontend/antd/icon/iconfont-provider/Index.svelte @@ -0,0 +1,56 @@ + + + + +{#if $mergedProps.visible} + +{/if} + + diff --git a/frontend/antd/icon/iconfont-provider/context.ts b/frontend/antd/icon/iconfont-provider/context.ts new file mode 100644 index 00000000..019e379e --- /dev/null +++ b/frontend/antd/icon/iconfont-provider/context.ts @@ -0,0 +1,37 @@ +import { initialize } from '@svelte-preprocess-react/component'; +import type { createFromIconfontCN } from '@ant-design/icons'; +import type { CustomIconOptions } from '@ant-design/icons/es/components/IconFont'; +import { getContext, setContext } from 'svelte'; +import { type Writable, writable } from 'svelte/store'; + +const iconfontContextKey = '$$ms-gr-antd-iconfont-context-key'; + +let createFromIconfont: typeof createFromIconfontCN; +async function getCreateFromIconfont() { + if (createFromIconfont) { + return createFromIconfont; + } + await initialize(); + createFromIconfont = await import('./create-iconfont').then( + (m) => m.createFromIconfontCN + ); + return createFromIconfont; +} + +export function setIconfontContext() { + const writableOptions = writable(); + const writableIconfont = writable>(); + + writableOptions.subscribe(async (value) => { + const createFromIconfontCN = await getCreateFromIconfont(); + writableIconfont.set(createFromIconfontCN(value)); + }); + setContext(iconfontContextKey, writableIconfont); + return writableOptions; +} + +export function getIconfontContext() { + return getContext(iconfontContextKey) as + | Writable> + | undefined; +} diff --git a/frontend/antd/icon/iconfont-provider/create-iconfont.ts b/frontend/antd/icon/iconfont-provider/create-iconfont.ts new file mode 100644 index 00000000..b5d6dd49 --- /dev/null +++ b/frontend/antd/icon/iconfont-provider/create-iconfont.ts @@ -0,0 +1,3 @@ +import { createFromIconfontCN } from '@ant-design/icons'; + +export { createFromIconfontCN }; diff --git a/frontend/antd/icon/iconfont-provider/gradio.config.js b/frontend/antd/icon/iconfont-provider/gradio.config.js new file mode 100644 index 00000000..1992403d --- /dev/null +++ b/frontend/antd/icon/iconfont-provider/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/icon/iconfont-provider/package.json b/frontend/antd/icon/iconfont-provider/package.json new file mode 100644 index 00000000..7d005fb6 --- /dev/null +++ b/frontend/antd/icon/iconfont-provider/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-iconfont-provider", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/icon/package.json b/frontend/antd/icon/package.json new file mode 100644 index 00000000..f7705cfe --- /dev/null +++ b/frontend/antd/icon/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-icon", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/image/Index.svelte b/frontend/antd/image/Index.svelte new file mode 100644 index 00000000..bb411f66 --- /dev/null +++ b/frontend/antd/image/Index.svelte @@ -0,0 +1,74 @@ + + + + +{#if $mergedProps.visible} + {#await AwaitedImage then Image} + + + + {/await} +{/if} + + diff --git a/frontend/antd/image/gradio.config.js b/frontend/antd/image/gradio.config.js new file mode 100644 index 00000000..916857c0 --- /dev/null +++ b/frontend/antd/image/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/image/image.tsx b/frontend/antd/image/image.tsx new file mode 100644 index 00000000..98068833 --- /dev/null +++ b/frontend/antd/image/image.tsx @@ -0,0 +1,58 @@ +import { sveltify } from '@svelte-preprocess-react'; +import { ReactSlot } from '@svelte-preprocess-react/react-slot'; +import { useFunction } from '@utils/hooks/useFunction'; +import { type GetProps, Image as AImage } from 'antd'; + +function getConfig(value: T): Partial> { + if (typeof value === 'object' && value !== null) { + return value as any; + } + return {} as any; +} +type ImageProps = GetProps; +export const Image = sveltify< + ImageProps, + ['placeholder', 'preview.mask', 'preview.closeIcon'] +>(({ slots, preview, ...props }) => { + const previewConfig = getConfig(preview); + const supportPreview = + slots['preview.mask'] || slots['preview.closeIcon'] || preview !== false; + const getContainerFunction = useFunction(previewConfig.getContainer); + + return ( + + ) : ( + previewConfig.mask + ), + } + : {}), + closeIcon: slots['preview.closeIcon'] ? ( + + ) : ( + previewConfig.closeIcon + ), + } as ImageProps['preview']) + : false + } + placeholder={ + slots.placeholder ? ( + + ) : ( + props.placeholder + ) + } + /> + ); +}); + +export default Image; diff --git a/frontend/antd/image/package.json b/frontend/antd/image/package.json new file mode 100644 index 00000000..7af7f431 --- /dev/null +++ b/frontend/antd/image/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-image", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/image/preview-group/Index.svelte b/frontend/antd/image/preview-group/Index.svelte new file mode 100644 index 00000000..6519b11a --- /dev/null +++ b/frontend/antd/image/preview-group/Index.svelte @@ -0,0 +1,79 @@ + + + + + +{#if $mergedProps.visible} + {#await AwaitedImagePreviewGroup then ImagePreviewGroup} + + + + {/await} +{/if} + + diff --git a/frontend/antd/image/preview-group/gradio.config.js b/frontend/antd/image/preview-group/gradio.config.js new file mode 100644 index 00000000..1992403d --- /dev/null +++ b/frontend/antd/image/preview-group/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/image/preview-group/image.preview-group.tsx b/frontend/antd/image/preview-group/image.preview-group.tsx new file mode 100644 index 00000000..2451e3ee --- /dev/null +++ b/frontend/antd/image/preview-group/image.preview-group.tsx @@ -0,0 +1,54 @@ +import { sveltify } from '@svelte-preprocess-react'; +import { ReactSlot } from '@svelte-preprocess-react/react-slot'; +import { useFunction } from '@utils/hooks/useFunction'; +import { type GetProps, Image as AImage } from 'antd'; + +function getConfig(value: T): Partial> { + if (typeof value === 'object' && value !== null) { + return value as any; + } + return {} as any; +} + +type ImagePreviewGroupProps = GetProps; + +export const ImagePreviewGroup = sveltify< + GetProps, + ['preview.mask', 'preview.closeIcon'] +>(({ slots, preview, ...props }) => { + const previewConfig = getConfig(preview); + const supportPreview = + slots['preview.mask'] || slots['preview.closeIcon'] || preview !== false; + const getContainerFunction = useFunction(previewConfig.getContainer); + return ( + + ) : ( + previewConfig.mask + ), + } + : {}), + closeIcon: slots['preview.closeIcon'] ? ( + + ) : ( + previewConfig.closeIcon + ), + }, + } as ImagePreviewGroupProps['preview']) + : false + } + /> + ); +}); + +export default ImagePreviewGroup; diff --git a/frontend/antd/image/preview-group/package.json b/frontend/antd/image/preview-group/package.json new file mode 100644 index 00000000..4d3157af --- /dev/null +++ b/frontend/antd/image/preview-group/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-image.preview-group", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/input-number/Index.svelte b/frontend/antd/input-number/Index.svelte new file mode 100644 index 00000000..5cffbea1 --- /dev/null +++ b/frontend/antd/input-number/Index.svelte @@ -0,0 +1,76 @@ + + + + +{#if $mergedProps.visible} + {#await AwaitedInputNumber then InputNumber} + { + value = v; + }} + > + + + {/await} +{/if} + + diff --git a/frontend/antd/input-number/gradio.config.js b/frontend/antd/input-number/gradio.config.js new file mode 100644 index 00000000..916857c0 --- /dev/null +++ b/frontend/antd/input-number/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/input-number/input-number.tsx b/frontend/antd/input-number/input-number.tsx new file mode 100644 index 00000000..3d039817 --- /dev/null +++ b/frontend/antd/input-number/input-number.tsx @@ -0,0 +1,85 @@ +import { sveltify } from '@svelte-preprocess-react'; +import { ReactSlot } from '@svelte-preprocess-react/react-slot'; +import { useFunction } from '@utils/hooks/useFunction'; +import { type GetProps, InputNumber as AInputNumber } from 'antd'; + +export const InputNumber = sveltify< + GetProps & { + onValueChange: (value: number | string | null) => void; + }, + [ + 'addonAfter', + 'addonBefore', + 'controls.upIcon', + 'controls.downIcon', + 'prefix', + 'suffix', + ] +>( + ({ + slots, + children, + onValueChange, + onChange, + formatter, + parser, + elRef, + ...props + }) => { + const formatterFunction = useFunction(formatter); + const parserFunction = useFunction(parser); + return ( + <> +
{children}
+ { + onChange?.(v); + onValueChange(v); + }} + parser={parserFunction} + formatter={formatterFunction} + controls={ + slots['controls.upIcon'] || slots['controls.downIcon'] + ? { + upIcon: slots['controls.upIcon'] ? ( + + ) : typeof props.controls === 'object' ? ( + props.controls.upIcon + ) : undefined, + downIcon: slots['controls.downIcon'] ? ( + + ) : typeof props.controls === 'object' ? ( + props.controls.downIcon + ) : undefined, + } + : props.controls + } + addonAfter={ + slots.addonAfter ? ( + + ) : ( + props.addonAfter + ) + } + addonBefore={ + slots.addonBefore ? ( + + ) : ( + props.addonBefore + ) + } + prefix={ + slots.prefix ? : props.prefix + } + suffix={ + slots.suffix ? : props.suffix + } + /> + + ); + } +); + +export default InputNumber; diff --git a/frontend/antd/input-number/package.json b/frontend/antd/input-number/package.json new file mode 100644 index 00000000..9fdaf8d2 --- /dev/null +++ b/frontend/antd/input-number/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-input-number", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/input/Index.svelte b/frontend/antd/input/Index.svelte new file mode 100644 index 00000000..39d906f7 --- /dev/null +++ b/frontend/antd/input/Index.svelte @@ -0,0 +1,76 @@ + + + + +{#if $mergedProps.visible} + {#await AwaitedInput then Input} + { + value = v; + }} + > + + + {/await} +{/if} + + diff --git a/frontend/antd/input/gradio.config.js b/frontend/antd/input/gradio.config.js new file mode 100644 index 00000000..916857c0 --- /dev/null +++ b/frontend/antd/input/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/input/input.tsx b/frontend/antd/input/input.tsx new file mode 100644 index 00000000..db0e7135 --- /dev/null +++ b/frontend/antd/input/input.tsx @@ -0,0 +1,84 @@ +import { sveltify } from '@svelte-preprocess-react'; +import { ReactSlot } from '@svelte-preprocess-react/react-slot'; +import { useFunction } from '@utils/hooks/useFunction'; +import { type GetProps, Input as AInput } from 'antd'; + +export const Input = sveltify< + GetProps & { + onValueChange: (value: string) => void; + }, + ['addonAfter', 'addonBefore', 'allowClear.clearIcon', 'prefix', 'suffix'] +>( + ({ + slots, + children, + count, + showCount, + onValueChange, + onChange, + elRef, + ...props + }) => { + const countStrategyFunction = useFunction(count?.strategy); + const countExceedFormatterFunction = useFunction(count?.exceedFormatter); + const countShowFunction = useFunction(count?.show); + const showCountFunction = useFunction( + typeof showCount === 'object' ? showCount.formatter : undefined + ); + return ( + <> +
{children}
+ { + onChange?.(e); + onValueChange(e.target.value); + }} + showCount={ + typeof showCount === 'object' && showCountFunction + ? { + formatter: showCountFunction, + } + : showCount + } + count={{ + ...count, + exceedFormatter: countExceedFormatterFunction, + strategy: countStrategyFunction, + show: countShowFunction || count?.show, + }} + addonAfter={ + slots.addonAfter ? ( + + ) : ( + props.addonAfter + ) + } + addonBefore={ + slots.addonBefore ? ( + + ) : ( + props.addonBefore + ) + } + allowClear={ + slots['allowClear.clearIcon'] + ? { + clearIcon: , + } + : props.allowClear + } + prefix={ + slots.prefix ? : props.prefix + } + suffix={ + slots.suffix ? : props.suffix + } + /> + + ); + } +); + +export default Input; diff --git a/frontend/antd/input/otp/Index.svelte b/frontend/antd/input/otp/Index.svelte new file mode 100644 index 00000000..5dd2e0c5 --- /dev/null +++ b/frontend/antd/input/otp/Index.svelte @@ -0,0 +1,74 @@ + + + + +{#if $mergedProps.visible} + {#await AwaitedInputOTP then InputOTP} + { + value = v; + }} + /> + {/await} +{/if} + + diff --git a/frontend/antd/input/otp/gradio.config.js b/frontend/antd/input/otp/gradio.config.js new file mode 100644 index 00000000..1992403d --- /dev/null +++ b/frontend/antd/input/otp/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/input/otp/input.otp.tsx b/frontend/antd/input/otp/input.otp.tsx new file mode 100644 index 00000000..dd0d0d40 --- /dev/null +++ b/frontend/antd/input/otp/input.otp.tsx @@ -0,0 +1,24 @@ +import { sveltify } from '@svelte-preprocess-react'; +import { useFunction } from '@utils/hooks/useFunction'; +import { type GetProps, Input as AInput } from 'antd'; + +export const InputOTP = sveltify< + GetProps & { + onValueChange: (value: string) => void; + } +>(({ formatter, onValueChange, onChange, elRef, ...props }) => { + const formatterFunction = useFunction(formatter); + return ( + { + onChange?.(v); + onValueChange(v); + }} + /> + ); +}); + +export default InputOTP; diff --git a/frontend/antd/input/otp/package.json b/frontend/antd/input/otp/package.json new file mode 100644 index 00000000..75103044 --- /dev/null +++ b/frontend/antd/input/otp/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-input.otp", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/input/package.json b/frontend/antd/input/package.json new file mode 100644 index 00000000..e50771dd --- /dev/null +++ b/frontend/antd/input/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-input", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/input/password/Index.svelte b/frontend/antd/input/password/Index.svelte new file mode 100644 index 00000000..9e808122 --- /dev/null +++ b/frontend/antd/input/password/Index.svelte @@ -0,0 +1,78 @@ + + + + +{#if $mergedProps.visible} + {#await AwaitedInputPassword then InputPassword} + { + value = v; + }} + > + + + {/await} +{/if} + + diff --git a/frontend/antd/input/password/gradio.config.js b/frontend/antd/input/password/gradio.config.js new file mode 100644 index 00000000..1992403d --- /dev/null +++ b/frontend/antd/input/password/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/input/password/input.password.tsx b/frontend/antd/input/password/input.password.tsx new file mode 100644 index 00000000..7e036514 --- /dev/null +++ b/frontend/antd/input/password/input.password.tsx @@ -0,0 +1,85 @@ +import { sveltify } from '@svelte-preprocess-react'; +import { ReactSlot } from '@svelte-preprocess-react/react-slot'; +import { useFunction } from '@utils/hooks/useFunction'; +import { type GetProps, Input as AInput } from 'antd'; + +export const InputPassword = sveltify< + GetProps & { + onValueChange: (value: string) => void; + }, + ['addonAfter', 'addonBefore', 'allowClear.clearIcon', 'prefix', 'suffix'] +>( + ({ + slots, + children, + count, + showCount, + onValueChange, + onChange, + elRef, + ...props + }) => { + const countStrategyFunction = useFunction(count?.strategy); + const countExceedFormatterFunction = useFunction(count?.exceedFormatter); + const countShowFunction = useFunction(count?.show); + const showCountFunction = useFunction( + typeof showCount === 'object' ? showCount.formatter : undefined + ); + + return ( + <> +
{children}
+ { + onChange?.(e); + onValueChange(e.target.value); + }} + showCount={ + typeof showCount === 'object' && showCountFunction + ? { + formatter: showCountFunction, + } + : showCount + } + count={{ + ...count, + exceedFormatter: countExceedFormatterFunction, + strategy: countStrategyFunction, + show: countShowFunction || count?.show, + }} + addonAfter={ + slots.addonAfter ? ( + + ) : ( + props.addonAfter + ) + } + addonBefore={ + slots.addonBefore ? ( + + ) : ( + props.addonBefore + ) + } + allowClear={ + slots['allowClear.clearIcon'] + ? { + clearIcon: , + } + : props.allowClear + } + prefix={ + slots.prefix ? : props.prefix + } + suffix={ + slots.suffix ? : props.suffix + } + /> + + ); + } +); + +export default InputPassword; diff --git a/frontend/antd/input/password/package.json b/frontend/antd/input/password/package.json new file mode 100644 index 00000000..54930dce --- /dev/null +++ b/frontend/antd/input/password/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-input.password", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/input/search/Index.svelte b/frontend/antd/input/search/Index.svelte new file mode 100644 index 00000000..dfd69468 --- /dev/null +++ b/frontend/antd/input/search/Index.svelte @@ -0,0 +1,76 @@ + + + + +{#if $mergedProps.visible} + {#await AwaitedInputSearch then InputSearch} + { + value = v; + }} + > + + + {/await} +{/if} + + diff --git a/frontend/antd/input/search/gradio.config.js b/frontend/antd/input/search/gradio.config.js new file mode 100644 index 00000000..1992403d --- /dev/null +++ b/frontend/antd/input/search/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/input/search/input.search.tsx b/frontend/antd/input/search/input.search.tsx new file mode 100644 index 00000000..573c760b --- /dev/null +++ b/frontend/antd/input/search/input.search.tsx @@ -0,0 +1,99 @@ +import { sveltify } from '@svelte-preprocess-react'; +import { ReactSlot } from '@svelte-preprocess-react/react-slot'; +import { useFunction } from '@utils/hooks/useFunction'; +import { type GetProps, Input as AInput } from 'antd'; + +export const InputSearch = sveltify< + GetProps & { + onValueChange: (value: string) => void; + }, + [ + 'addonAfter', + 'addonBefore', + 'allowClear.clearIcon', + 'prefix', + 'suffix', + 'enterButton', + ] +>( + ({ + slots, + children, + count, + showCount, + onValueChange, + onChange, + elRef, + ...props + }) => { + const countStrategyFunction = useFunction(count?.strategy); + const countExceedFormatterFunction = useFunction(count?.exceedFormatter); + const countShowFunction = useFunction(count?.show); + const showCountFunction = useFunction( + typeof showCount === 'object' ? showCount.formatter : undefined + ); + + return ( + <> +
{children}
+ { + onChange?.(e); + onValueChange(e.target.value); + }} + showCount={ + typeof showCount === 'object' && showCountFunction + ? { + formatter: showCountFunction, + } + : showCount + } + count={{ + ...count, + exceedFormatter: countExceedFormatterFunction, + strategy: countStrategyFunction, + show: countShowFunction || count?.show, + }} + enterButton={ + slots.enterButton ? ( + + ) : ( + props.enterButton + ) + } + addonAfter={ + slots.addonAfter ? ( + + ) : ( + props.addonAfter + ) + } + addonBefore={ + slots.addonBefore ? ( + + ) : ( + props.addonBefore + ) + } + allowClear={ + slots['allowClear.clearIcon'] + ? { + clearIcon: , + } + : props.allowClear + } + prefix={ + slots.prefix ? : props.prefix + } + suffix={ + slots.suffix ? : props.suffix + } + /> + + ); + } +); + +export default InputSearch; diff --git a/frontend/antd/input/search/package.json b/frontend/antd/input/search/package.json new file mode 100644 index 00000000..43f662c0 --- /dev/null +++ b/frontend/antd/input/search/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-input.search", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/input/textarea/Index.svelte b/frontend/antd/input/textarea/Index.svelte new file mode 100644 index 00000000..79ed21e2 --- /dev/null +++ b/frontend/antd/input/textarea/Index.svelte @@ -0,0 +1,78 @@ + + + + +{#if $mergedProps.visible} + {#await AwaitedInputTextarea then InputTextarea} + { + value = v; + }} + > + + + {/await} +{/if} + + diff --git a/frontend/antd/input/textarea/gradio.config.js b/frontend/antd/input/textarea/gradio.config.js new file mode 100644 index 00000000..1992403d --- /dev/null +++ b/frontend/antd/input/textarea/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/input/textarea/input.textarea.tsx b/frontend/antd/input/textarea/input.textarea.tsx new file mode 100644 index 00000000..5ecd159b --- /dev/null +++ b/frontend/antd/input/textarea/input.textarea.tsx @@ -0,0 +1,65 @@ +import { sveltify } from '@svelte-preprocess-react'; +import { ReactSlot } from '@svelte-preprocess-react/react-slot'; +import { useFunction } from '@utils/hooks/useFunction'; +import { type GetProps, Input as AInput } from 'antd'; + +export const InputTextarea = sveltify< + GetProps & { + onValueChange: (value: string) => void; + }, + ['allowClear.clearIcon'] +>( + ({ + slots, + children, + count, + showCount, + onValueChange, + onChange, + elRef, + ...props + }) => { + const countStrategyFunction = useFunction(count?.strategy); + const countExceedFormatterFunction = useFunction(count?.exceedFormatter); + const countShowFunction = useFunction(count?.show); + const showCountFunction = useFunction( + typeof showCount === 'object' ? showCount.formatter : undefined + ); + + return ( + <> +
{children}
+ { + onChange?.(e); + onValueChange(e.target.value); + }} + showCount={ + typeof showCount === 'object' && showCountFunction + ? { + formatter: showCountFunction, + } + : showCount + } + count={{ + ...count, + exceedFormatter: countExceedFormatterFunction, + strategy: countStrategyFunction, + show: countShowFunction || count?.show, + }} + allowClear={ + slots['allowClear.clearIcon'] + ? { + clearIcon: , + } + : props.allowClear + } + /> + + ); + } +); + +export default InputTextarea; diff --git a/frontend/antd/input/textarea/package.json b/frontend/antd/input/textarea/package.json new file mode 100644 index 00000000..09582da9 --- /dev/null +++ b/frontend/antd/input/textarea/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-input.textarea", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/layout/Base.svelte b/frontend/antd/layout/Base.svelte new file mode 100644 index 00000000..51eb1f27 --- /dev/null +++ b/frontend/antd/layout/Base.svelte @@ -0,0 +1,71 @@ + + + + +{#if $mergedProps.visible} + {#await AwaitedLayoutBase then LayoutBase} + + + + {/await} +{/if} + + diff --git a/frontend/antd/layout/Index.svelte b/frontend/antd/layout/Index.svelte new file mode 100644 index 00000000..bc283720 --- /dev/null +++ b/frontend/antd/layout/Index.svelte @@ -0,0 +1,10 @@ + + + + + + + diff --git a/frontend/antd/layout/content/Index.svelte b/frontend/antd/layout/content/Index.svelte new file mode 100644 index 00000000..33b0ffdf --- /dev/null +++ b/frontend/antd/layout/content/Index.svelte @@ -0,0 +1,10 @@ + + + + + + + diff --git a/frontend/antd/layout/content/gradio.config.js b/frontend/antd/layout/content/gradio.config.js new file mode 100644 index 00000000..1992403d --- /dev/null +++ b/frontend/antd/layout/content/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/layout/content/package.json b/frontend/antd/layout/content/package.json new file mode 100644 index 00000000..3f340e12 --- /dev/null +++ b/frontend/antd/layout/content/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-layout.content", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/layout/footer/Index.svelte b/frontend/antd/layout/footer/Index.svelte new file mode 100644 index 00000000..de1f73b4 --- /dev/null +++ b/frontend/antd/layout/footer/Index.svelte @@ -0,0 +1,10 @@ + + + + + + + diff --git a/frontend/antd/layout/footer/gradio.config.js b/frontend/antd/layout/footer/gradio.config.js new file mode 100644 index 00000000..1992403d --- /dev/null +++ b/frontend/antd/layout/footer/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/layout/footer/package.json b/frontend/antd/layout/footer/package.json new file mode 100644 index 00000000..606f5a97 --- /dev/null +++ b/frontend/antd/layout/footer/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-layout.footer", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/layout/gradio.config.js b/frontend/antd/layout/gradio.config.js new file mode 100644 index 00000000..916857c0 --- /dev/null +++ b/frontend/antd/layout/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/layout/header/Index.svelte b/frontend/antd/layout/header/Index.svelte new file mode 100644 index 00000000..cedb6145 --- /dev/null +++ b/frontend/antd/layout/header/Index.svelte @@ -0,0 +1,10 @@ + + + + + + + diff --git a/frontend/antd/layout/header/gradio.config.js b/frontend/antd/layout/header/gradio.config.js new file mode 100644 index 00000000..1992403d --- /dev/null +++ b/frontend/antd/layout/header/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/layout/header/package.json b/frontend/antd/layout/header/package.json new file mode 100644 index 00000000..dd13c5f0 --- /dev/null +++ b/frontend/antd/layout/header/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-layout.header", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/layout/layout.base.tsx b/frontend/antd/layout/layout.base.tsx new file mode 100644 index 00000000..9e02bb90 --- /dev/null +++ b/frontend/antd/layout/layout.base.tsx @@ -0,0 +1,39 @@ +import { sveltify } from '@svelte-preprocess-react'; +import React, { useMemo } from 'react'; +import { type GetProps, Layout as ALayout } from 'antd'; +import cls from 'classnames'; + +export const Base = sveltify< + GetProps & + GetProps & + GetProps & + GetProps & { + component?: 'header' | 'footer' | 'content' | 'layout'; + } +>(({ component, className, ...props }) => { + const LayoutComponent = useMemo(() => { + switch (component) { + case 'content': + return ALayout.Content; + case 'footer': + return ALayout.Footer; + case 'header': + return ALayout.Header; + case 'layout': + return ALayout; + default: + return ALayout; + } + }, [component]); + return ( + + ); +}); + +export default Base; diff --git a/frontend/antd/layout/package.json b/frontend/antd/layout/package.json new file mode 100644 index 00000000..91999c66 --- /dev/null +++ b/frontend/antd/layout/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-layout", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/layout/sider/Index.svelte b/frontend/antd/layout/sider/Index.svelte new file mode 100644 index 00000000..e943e83c --- /dev/null +++ b/frontend/antd/layout/sider/Index.svelte @@ -0,0 +1,71 @@ + + + + + +{#if $mergedProps.visible} + {#await AwaitedLayoutSider then LayoutSider} + + + + {/await} +{/if} + + diff --git a/frontend/antd/layout/sider/gradio.config.js b/frontend/antd/layout/sider/gradio.config.js new file mode 100644 index 00000000..1992403d --- /dev/null +++ b/frontend/antd/layout/sider/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/layout/sider/layout.sider.tsx b/frontend/antd/layout/sider/layout.sider.tsx new file mode 100644 index 00000000..de7003f5 --- /dev/null +++ b/frontend/antd/layout/sider/layout.sider.tsx @@ -0,0 +1,20 @@ +import { sveltify } from '@svelte-preprocess-react'; +import { ReactSlot } from '@svelte-preprocess-react/react-slot'; +import React from 'react'; +import { type GetProps, Layout as ALayout } from 'antd'; + +export const LayoutSider = sveltify< + GetProps, + ['trigger'] +>(({ slots, ...props }) => { + return ( + : props.trigger + } + /> + ); +}); + +export default LayoutSider; diff --git a/frontend/antd/layout/sider/package.json b/frontend/antd/layout/sider/package.json new file mode 100644 index 00000000..c66bcef8 --- /dev/null +++ b/frontend/antd/layout/sider/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-layout.sider", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/list/Index.svelte b/frontend/antd/list/Index.svelte new file mode 100644 index 00000000..8f8c44c5 --- /dev/null +++ b/frontend/antd/list/Index.svelte @@ -0,0 +1,70 @@ + + + + + +{#if $mergedProps.visible} + {#await AwaitedList then List} + + + + {/await} +{/if} + + diff --git a/frontend/antd/list/gradio.config.js b/frontend/antd/list/gradio.config.js new file mode 100644 index 00000000..916857c0 --- /dev/null +++ b/frontend/antd/list/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/list/item/Index.svelte b/frontend/antd/list/item/Index.svelte new file mode 100644 index 00000000..c401f1f6 --- /dev/null +++ b/frontend/antd/list/item/Index.svelte @@ -0,0 +1,65 @@ + + + + +{#if $mergedProps.visible} + {#await AwaitedListItem then ListItem} + + + + {/await} +{/if} + + diff --git a/frontend/antd/list/item/gradio.config.js b/frontend/antd/list/item/gradio.config.js new file mode 100644 index 00000000..1992403d --- /dev/null +++ b/frontend/antd/list/item/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/list/item/list.item.tsx b/frontend/antd/list/item/list.item.tsx new file mode 100644 index 00000000..1f95c792 --- /dev/null +++ b/frontend/antd/list/item/list.item.tsx @@ -0,0 +1,28 @@ +import { sveltify } from '@svelte-preprocess-react'; +import { ReactSlot } from '@svelte-preprocess-react/react-slot'; +import { useTargets } from '@utils/hooks/useTargets'; +import { type GetProps, List as AList } from 'antd'; + +export const ListItem = sveltify< + GetProps, + ['extra', 'actions'] +>(({ slots, children, ...props }) => { + const actionsSlots = useTargets(children, 'actions'); + return ( + : props.extra} + actions={ + actionsSlots.length > 0 + ? actionsSlots.map((slot, index) => { + return ; + }) + : props.actions + } + > + {children} + + ); +}); + +export default ListItem; diff --git a/frontend/antd/list/item/meta/Index.svelte b/frontend/antd/list/item/meta/Index.svelte new file mode 100644 index 00000000..27a97b09 --- /dev/null +++ b/frontend/antd/list/item/meta/Index.svelte @@ -0,0 +1,65 @@ + + + + +{#if $mergedProps.visible} + {#await AwaitedListItemMeta then ListItemMeta} + + + + {/await} +{/if} + + diff --git a/frontend/antd/list/item/meta/gradio.config.js b/frontend/antd/list/item/meta/gradio.config.js new file mode 100644 index 00000000..7b2fe8dd --- /dev/null +++ b/frontend/antd/list/item/meta/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/list/item/meta/list.item.meta.tsx b/frontend/antd/list/item/meta/list.item.meta.tsx new file mode 100644 index 00000000..f86d219b --- /dev/null +++ b/frontend/antd/list/item/meta/list.item.meta.tsx @@ -0,0 +1,28 @@ +import { sveltify } from '@svelte-preprocess-react'; +import { ReactSlot } from '@svelte-preprocess-react/react-slot'; +import { type GetProps, List as AList } from 'antd'; + +export const ListItemMeta = sveltify< + GetProps, + ['avatar', 'description', 'title'] +>(({ slots, children, ...props }) => { + return ( + <> + <>{children} + : props.avatar} + description={ + slots.description ? ( + + ) : ( + props.description + ) + } + title={slots.title ? : props.title} + /> + + ); +}); + +export default ListItemMeta; diff --git a/frontend/antd/list/item/meta/package.json b/frontend/antd/list/item/meta/package.json new file mode 100644 index 00000000..c6026085 --- /dev/null +++ b/frontend/antd/list/item/meta/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-list.item.meta", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/list/item/package.json b/frontend/antd/list/item/package.json new file mode 100644 index 00000000..e0c3deec --- /dev/null +++ b/frontend/antd/list/item/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-list.item", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/list/list.tsx b/frontend/antd/list/list.tsx new file mode 100644 index 00000000..edc393b9 --- /dev/null +++ b/frontend/antd/list/list.tsx @@ -0,0 +1,22 @@ +import { sveltify } from '@svelte-preprocess-react'; +import { ReactSlot } from '@svelte-preprocess-react/react-slot'; +import React from 'react'; +import { type GetProps, List as AList } from 'antd'; + +export const List = sveltify< + GetProps, + ['footer', 'header', 'loadMore'] +>(({ slots, ...props }) => { + return ( + : props.footer} + header={slots.header ? : props.header} + loadMore={ + slots.loadMore ? : props.loadMore + } + /> + ); +}); + +export default List; diff --git a/frontend/antd/list/package.json b/frontend/antd/list/package.json new file mode 100644 index 00000000..e0089d46 --- /dev/null +++ b/frontend/antd/list/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-list", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/mentions/Index.svelte b/frontend/antd/mentions/Index.svelte new file mode 100644 index 00000000..c0960c22 --- /dev/null +++ b/frontend/antd/mentions/Index.svelte @@ -0,0 +1,80 @@ + + + + +{#if $mergedProps.visible} + {#await AwaitedMentions then Mentions} + 0 ? $options : $children} + onValueChange={(v) => { + value = v; + }} + > + + + {/await} +{/if} + + diff --git a/frontend/antd/mentions/context.ts b/frontend/antd/mentions/context.ts new file mode 100644 index 00000000..4a5e0fcd --- /dev/null +++ b/frontend/antd/mentions/context.ts @@ -0,0 +1,6 @@ +import { createItemsContext } from '@utils/createItemsContext'; + +const { getItems, getSetItemFn } = createItemsContext('mentions'); + +export { getItems, getSetItemFn }; +export * from '@utils/createItemsContext'; diff --git a/frontend/antd/mentions/gradio.config.js b/frontend/antd/mentions/gradio.config.js new file mode 100644 index 00000000..916857c0 --- /dev/null +++ b/frontend/antd/mentions/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/mentions/mentions.tsx b/frontend/antd/mentions/mentions.tsx new file mode 100644 index 00000000..476d494c --- /dev/null +++ b/frontend/antd/mentions/mentions.tsx @@ -0,0 +1,68 @@ +import { sveltify } from '@svelte-preprocess-react'; +import { ReactSlot } from '@svelte-preprocess-react/react-slot'; +import { useMemo } from 'react'; +import { useFunction } from '@utils/hooks/useFunction'; +import { renderItems } from '@utils/renderItems'; +import { type GetProps, Mentions as AMentions } from 'antd'; + +import { type Item } from './context'; + +export const Mentions = sveltify< + GetProps & { + optionItems: Item[]; + onValueChange: (value: string) => void; + }, + ['allowClear.clearIcon', 'notFoundContent'] +>( + ({ + slots, + children, + onValueChange, + filterOption, + onChange, + options, + validateSearch, + optionItems, + getPopupContainer, + elRef, + ...props + }) => { + const getPopupContainerFunction = useFunction(getPopupContainer); + const filterOptionFunction = useFunction(filterOption); + const validateSearchFunction = useFunction(validateSearch); + return ( + <> +
{children}
+ + { + return ( + options || + renderItems< + NonNullable['options']>[number] + >(optionItems) + ); + }, [optionItems, options])} + onChange={(v, ...args) => { + onChange?.(v, ...args); + onValueChange(v); + }} + validateSearch={validateSearchFunction} + notFoundContent={ + slots.notFoundContent ? ( + + ) : ( + props.notFoundContent + ) + } + filterOption={filterOptionFunction || filterOption} + getPopupContainer={getPopupContainerFunction} + /> + + ); + } +); + +export default Mentions; diff --git a/frontend/antd/mentions/option/Index.svelte b/frontend/antd/mentions/option/Index.svelte new file mode 100644 index 00000000..53c14809 --- /dev/null +++ b/frontend/antd/mentions/option/Index.svelte @@ -0,0 +1,96 @@ + + + + +{#if $mergedProps.visible} + +{/if} + + diff --git a/frontend/antd/mentions/option/gradio.config.js b/frontend/antd/mentions/option/gradio.config.js new file mode 100644 index 00000000..1992403d --- /dev/null +++ b/frontend/antd/mentions/option/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/mentions/option/package.json b/frontend/antd/mentions/option/package.json new file mode 100644 index 00000000..d13ba7fe --- /dev/null +++ b/frontend/antd/mentions/option/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-mentions.option", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/mentions/package.json b/frontend/antd/mentions/package.json new file mode 100644 index 00000000..b9c3a6aa --- /dev/null +++ b/frontend/antd/mentions/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-mentions", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/menu/Index.svelte b/frontend/antd/menu/Index.svelte new file mode 100644 index 00000000..21bea1d4 --- /dev/null +++ b/frontend/antd/menu/Index.svelte @@ -0,0 +1,92 @@ + + + + +{#if $mergedProps.visible} + {#await AwaitedMenu then Menu} + 0 ? $items : $children} + openKeys={$mergedProps.props.openKeys || + $mergedProps.value?.open_keys || + undefined} + selectedKeys={$mergedProps.props.selectedKeys || + $mergedProps.value?.selected_keys || + undefined} + onValueChange={({ openKeys, selectedKeys }) => { + value = { + open_keys: openKeys, + selected_keys: selectedKeys, + }; + }} + > + + + {/await} +{/if} + + diff --git a/frontend/antd/menu/context.ts b/frontend/antd/menu/context.ts new file mode 100644 index 00000000..705eb792 --- /dev/null +++ b/frontend/antd/menu/context.ts @@ -0,0 +1,6 @@ +import { createItemsContext } from '@utils/createItemsContext'; + +const { getItems, getSetItemFn } = createItemsContext('menu'); + +export { getItems, getSetItemFn }; +export * from '@utils/createItemsContext'; diff --git a/frontend/antd/menu/gradio.config.js b/frontend/antd/menu/gradio.config.js new file mode 100644 index 00000000..916857c0 --- /dev/null +++ b/frontend/antd/menu/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/menu/item/Index.svelte b/frontend/antd/menu/item/Index.svelte new file mode 100644 index 00000000..8c3d4f29 --- /dev/null +++ b/frontend/antd/menu/item/Index.svelte @@ -0,0 +1,89 @@ + + + + +{#if $mergedProps.visible} + +{/if} + + diff --git a/frontend/antd/menu/item/gradio.config.js b/frontend/antd/menu/item/gradio.config.js new file mode 100644 index 00000000..1992403d --- /dev/null +++ b/frontend/antd/menu/item/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/menu/item/package.json b/frontend/antd/menu/item/package.json new file mode 100644 index 00000000..33a1b88d --- /dev/null +++ b/frontend/antd/menu/item/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-menu.item", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/menu/menu.tsx b/frontend/antd/menu/menu.tsx new file mode 100644 index 00000000..52e77511 --- /dev/null +++ b/frontend/antd/menu/menu.tsx @@ -0,0 +1,82 @@ +import { sveltify } from '@svelte-preprocess-react'; +import { ReactSlot } from '@svelte-preprocess-react/react-slot'; +import React, { useMemo } from 'react'; +import { omitUndefinedProps } from '@utils/omitUndefinedProps'; +import { renderItems } from '@utils/renderItems'; +import { type GetProps, Menu as AMenu } from 'antd'; +import type { ItemType } from 'antd/es/menu/interface'; + +import { type Item } from './context'; + +export const Menu = sveltify< + GetProps & { + slotItems: Item[]; + onValueChange: (options: { + openKeys: string[]; + selectedKeys: string[]; + }) => void; + }, + ['expandIcon', 'overflowedIndicator'] +>( + ({ + slots, + items, + slotItems, + children, + onValueChange, + onOpenChange, + onSelect, + onDeselect, + ...props + }) => { + return ( + <> + {children} + { + onOpenChange?.(openKeys); + onValueChange?.({ + openKeys, + selectedKeys: props.selectedKeys || [], + }); + }} + onSelect={(e) => { + onSelect?.(e); + onValueChange?.({ + openKeys: props.openKeys || [], + selectedKeys: e.selectedKeys, + }); + }} + onDeselect={(e) => { + onDeselect?.(e); + onValueChange?.({ + openKeys: props.openKeys || [], + selectedKeys: e.selectedKeys, + }); + }} + items={useMemo(() => { + // ['label','icon',"title"] + return items || renderItems(slotItems); + }, [items, slotItems])} + expandIcon={ + slots.expandIcon ? ( + + ) : ( + props.expandIcon + ) + } + overflowedIndicator={ + slots.overflowedIndicator ? ( + + ) : ( + props.overflowedIndicator + ) + } + /> + + ); + } +); + +export default Menu; diff --git a/frontend/antd/menu/package.json b/frontend/antd/menu/package.json new file mode 100644 index 00000000..5e214f27 --- /dev/null +++ b/frontend/antd/menu/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-menu", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/message/Index.svelte b/frontend/antd/message/Index.svelte new file mode 100644 index 00000000..d4be934d --- /dev/null +++ b/frontend/antd/message/Index.svelte @@ -0,0 +1,77 @@ + + + + +{#await AwaitedMessage then Message} + { + visible = v; + }} + > + + +{/await} + + diff --git a/frontend/antd/message/gradio.config.js b/frontend/antd/message/gradio.config.js new file mode 100644 index 00000000..916857c0 --- /dev/null +++ b/frontend/antd/message/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/message/message.tsx b/frontend/antd/message/message.tsx new file mode 100644 index 00000000..87ec1b48 --- /dev/null +++ b/frontend/antd/message/message.tsx @@ -0,0 +1,49 @@ +import { sveltify } from '@svelte-preprocess-react'; +import { ReactSlot } from '@svelte-preprocess-react/react-slot'; +import React, { useEffect } from 'react'; +import { message } from 'antd'; +import { type ArgsProps } from 'antd/es/message'; + +export const Message = sveltify< + ArgsProps & { + children?: React.ReactNode; + visible?: boolean; + onVisible?: (visible: boolean) => void; + }, + ['content', 'icon'] +>(({ slots, children, visible, onVisible, onClose, ...props }) => { + const [messageApi, contextHolder] = message.useMessage(); + + useEffect(() => { + if (visible) { + messageApi.open({ + ...props, + icon: slots.icon ? : props.icon, + content: slots.content ? ( + + ) : ( + props.content + ), + onClose(...args) { + onVisible?.(false); + onClose?.(...args); + }, + }); + } else { + messageApi.destroy(props.key); + } + + return () => { + messageApi.destroy(props.key); + }; + // eslint-disable-next-line react-hooks/exhaustive-deps + }, [visible]); + return ( + <> +
{children}
+ {contextHolder} + + ); +}); + +export default Message; diff --git a/frontend/antd/message/package.json b/frontend/antd/message/package.json new file mode 100644 index 00000000..cc6bf505 --- /dev/null +++ b/frontend/antd/message/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-message", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/modal/Index.svelte b/frontend/antd/modal/Index.svelte new file mode 100644 index 00000000..29ed29c8 --- /dev/null +++ b/frontend/antd/modal/Index.svelte @@ -0,0 +1,70 @@ + + + + +{#if $mergedProps.visible} + {#await AwaitedModal then Modal} + + + + {/await} +{/if} + + diff --git a/frontend/antd/modal/gradio.config.js b/frontend/antd/modal/gradio.config.js new file mode 100644 index 00000000..916857c0 --- /dev/null +++ b/frontend/antd/modal/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/modal/modal.tsx b/frontend/antd/modal/modal.tsx new file mode 100644 index 00000000..cb22905d --- /dev/null +++ b/frontend/antd/modal/modal.tsx @@ -0,0 +1,90 @@ +import { sveltify } from '@svelte-preprocess-react'; +import { ReactSlot } from '@svelte-preprocess-react/react-slot'; +import React from 'react'; +import { useFunction } from '@utils/hooks/useFunction'; +import { type GetProps, Modal as AModal } from 'antd'; + +export const Modal = sveltify< + GetProps, + [ + 'cancelButtonProps.icon', + 'cancelText', + 'closable.closeIcon', + 'closeIcon', + 'footer', + 'title', + 'okButtonProps.icon', + 'okText', + ] +>( + ({ + slots, + afterClose, + afterOpenChange, + getContainer, + children, + modalRender, + ...props + }) => { + const afterOpenChangeFunction = useFunction(afterOpenChange); + const afterCloseFunction = useFunction(afterClose); + const getContainerFunction = useFunction(getContainer); + const modalRenderFunction = useFunction(modalRender); + return ( + : props.okText} + okButtonProps={{ + ...(props.okButtonProps || {}), + icon: slots['okButtonProps.icon'] ? ( + + ) : ( + props.okButtonProps?.icon + ), + }} + cancelText={ + slots.cancelText ? ( + + ) : ( + props.cancelText + ) + } + cancelButtonProps={{ + ...(props.cancelButtonProps || {}), + icon: slots['cancelButtonProps.icon'] ? ( + + ) : ( + props.cancelButtonProps?.icon + ), + }} + closable={ + slots['closable.closeIcon'] + ? { + ...(typeof props.closable === 'object' ? props.closable : {}), + closeIcon: , + } + : props.closable + } + closeIcon={ + slots.closeIcon ? ( + + ) : ( + props.closeIcon + ) + } + footer={slots.footer ? : props.footer} + title={slots.title ? : props.title} + modalRender={modalRenderFunction} + getContainer={ + typeof getContainer === 'string' ? getContainerFunction : getContainer + } + > + {children} + + ); + } +); + +export default Modal; diff --git a/frontend/antd/modal/package.json b/frontend/antd/modal/package.json new file mode 100644 index 00000000..e1502012 --- /dev/null +++ b/frontend/antd/modal/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-modal", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/notification/Index.svelte b/frontend/antd/notification/Index.svelte new file mode 100644 index 00000000..a69c1e4b --- /dev/null +++ b/frontend/antd/notification/Index.svelte @@ -0,0 +1,77 @@ + + + + +{#await AwaitedNotification then Notification} + { + visible = v; + }} + > + + +{/await} + + diff --git a/frontend/antd/notification/gradio.config.js b/frontend/antd/notification/gradio.config.js new file mode 100644 index 00000000..916857c0 --- /dev/null +++ b/frontend/antd/notification/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/notification/notification.tsx b/frontend/antd/notification/notification.tsx new file mode 100644 index 00000000..8f61da89 --- /dev/null +++ b/frontend/antd/notification/notification.tsx @@ -0,0 +1,82 @@ +import { sveltify } from '@svelte-preprocess-react'; +import { ReactSlot } from '@svelte-preprocess-react/react-slot'; +import React, { useEffect } from 'react'; +import { notification } from 'antd'; +import { type ArgsProps } from 'antd/es/notification'; +import type { NotificationConfig } from 'antd/es/notification/interface'; + +export const Notification = sveltify< + ArgsProps & + NotificationConfig & { + children?: React.ReactNode; + visible?: boolean; + onVisible?: (visible: boolean) => void; + }, + ['btn', 'closeIcon', 'description', 'icon', 'message'] +>( + ({ + slots, + bottom, + rtl, + stack, + top, + maxCount, + children, + visible, + onClose, + onVisible, + ...props + }) => { + const [notificationApi, contextHolder] = notification.useNotification({ + bottom, + rtl, + stack, + top, + maxCount, + }); + + useEffect(() => { + if (visible) { + notificationApi.open({ + ...props, + btn: slots.btn ? : props.btn, + closeIcon: slots['closeIcon'] ? ( + + ) : ( + props.closeIcon + ), + description: slots.description ? ( + + ) : ( + props.description + ), + message: slots.message ? ( + + ) : ( + props.message + ), + icon: slots.icon ? : props.icon, + onClose(...args) { + onVisible?.(false); + onClose?.(...args); + }, + }); + } else { + notificationApi.destroy(props.key); + } + + return () => { + notificationApi.destroy(props.key); + }; + // eslint-disable-next-line react-hooks/exhaustive-deps + }, [visible]); + return ( + <> + {children} + {contextHolder} + + ); + } +); + +export default Notification; diff --git a/frontend/antd/notification/package.json b/frontend/antd/notification/package.json new file mode 100644 index 00000000..808605ab --- /dev/null +++ b/frontend/antd/notification/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-notification", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/pagination/Index.svelte b/frontend/antd/pagination/Index.svelte new file mode 100644 index 00000000..87e8eb28 --- /dev/null +++ b/frontend/antd/pagination/Index.svelte @@ -0,0 +1,88 @@ + + + + + +{#if $mergedProps.visible} + {#await AwaitedPagination then Pagination} + { + value = { + page, + page_size: pageSize, + }; + }} + > + + + {/await} +{/if} + + diff --git a/frontend/antd/pagination/gradio.config.js b/frontend/antd/pagination/gradio.config.js new file mode 100644 index 00000000..916857c0 --- /dev/null +++ b/frontend/antd/pagination/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/pagination/package.json b/frontend/antd/pagination/package.json new file mode 100644 index 00000000..c641fb97 --- /dev/null +++ b/frontend/antd/pagination/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-pagination", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/pagination/pagination.tsx b/frontend/antd/pagination/pagination.tsx new file mode 100644 index 00000000..157d340d --- /dev/null +++ b/frontend/antd/pagination/pagination.tsx @@ -0,0 +1,44 @@ +import { sveltify } from '@svelte-preprocess-react'; +import { ReactSlot } from '@svelte-preprocess-react/react-slot'; +import React from 'react'; +import { useFunction } from '@utils/hooks/useFunction'; +import { type GetProps, Pagination as APagination } from 'antd'; + +export const Pagination = sveltify< + GetProps & { + onValueChange: (page: number, pageSize: number) => void; + }, + ['showQuickJumper.goButton'] +>( + ({ + slots, + onValueChange, + showTotal, + showQuickJumper, + onChange, + ...props + }) => { + const showTotalFunction = useFunction(showTotal); + return ( + { + onValueChange(page, pageSize); + onChange?.(page, pageSize); + }} + showQuickJumper={ + slots['showQuickJumper.goButton'] + ? { + goButton: ( + + ), + } + : showQuickJumper + } + /> + ); + } +); + +export default Pagination; diff --git a/frontend/antd/popconfirm/Index.svelte b/frontend/antd/popconfirm/Index.svelte new file mode 100644 index 00000000..4daa63f2 --- /dev/null +++ b/frontend/antd/popconfirm/Index.svelte @@ -0,0 +1,73 @@ + + + + +{#if $mergedProps.visible} + {#await AwaitedPopconfirm then Popconfirm} + + + + {/await} +{/if} + + diff --git a/frontend/antd/popconfirm/gradio.config.js b/frontend/antd/popconfirm/gradio.config.js new file mode 100644 index 00000000..916857c0 --- /dev/null +++ b/frontend/antd/popconfirm/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/popconfirm/package.json b/frontend/antd/popconfirm/package.json new file mode 100644 index 00000000..779a5b6a --- /dev/null +++ b/frontend/antd/popconfirm/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-popconfirm", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/popconfirm/popconfirm.tsx b/frontend/antd/popconfirm/popconfirm.tsx new file mode 100644 index 00000000..a1708592 --- /dev/null +++ b/frontend/antd/popconfirm/popconfirm.tsx @@ -0,0 +1,64 @@ +import { sveltify } from '@svelte-preprocess-react'; +import { ReactSlot } from '@svelte-preprocess-react/react-slot'; +import React from 'react'; +import { useFunction } from '@utils/hooks/useFunction'; +import { type GetProps, Popconfirm as APopconfirm } from 'antd'; + +export const Popconfirm = sveltify< + GetProps, + [ + 'title', + 'cancelButtonProps.icon', + 'cancelText', + 'description', + 'okButtonProps.icon', + 'okText', + ] +>(({ slots, afterOpenChange, getPopupContainer, children, ...props }) => { + const afterOpenChangeFunction = useFunction(afterOpenChange); + const getPopupContainerFunction = useFunction(getPopupContainer); + + return ( + : props.okText} + okButtonProps={{ + ...(props.okButtonProps || {}), + icon: slots['okButtonProps.icon'] ? ( + + ) : ( + props.okButtonProps?.icon + ), + }} + cancelText={ + slots.cancelText ? ( + + ) : ( + props.cancelText + ) + } + cancelButtonProps={{ + ...(props.cancelButtonProps || {}), + icon: slots['cancelButtonProps.icon'] ? ( + + ) : ( + props.cancelButtonProps?.icon + ), + }} + title={slots.title ? : props.title} + description={ + slots.description ? ( + + ) : ( + props.description + ) + } + > + {children} + + ); +}); + +export default Popconfirm; diff --git a/frontend/antd/popover/Index.svelte b/frontend/antd/popover/Index.svelte new file mode 100644 index 00000000..86bc38da --- /dev/null +++ b/frontend/antd/popover/Index.svelte @@ -0,0 +1,72 @@ + + + + +{#if $mergedProps.visible} + {#await AwaitedPopover then Popover} + + + + {/await} +{/if} + + diff --git a/frontend/antd/popover/gradio.config.js b/frontend/antd/popover/gradio.config.js new file mode 100644 index 00000000..916857c0 --- /dev/null +++ b/frontend/antd/popover/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/popover/package.json b/frontend/antd/popover/package.json new file mode 100644 index 00000000..80623128 --- /dev/null +++ b/frontend/antd/popover/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-popover", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/popover/popover.tsx b/frontend/antd/popover/popover.tsx new file mode 100644 index 00000000..f9fb0341 --- /dev/null +++ b/frontend/antd/popover/popover.tsx @@ -0,0 +1,30 @@ +import { sveltify } from '@svelte-preprocess-react'; +import { ReactSlot } from '@svelte-preprocess-react/react-slot'; +import React from 'react'; +import { useFunction } from '@utils/hooks/useFunction'; +import { type GetProps, Popover as APopover } from 'antd'; + +export const Popover = sveltify< + GetProps, + ['title', 'content'] +>(({ slots, afterOpenChange, getPopupContainer, children, ...props }) => { + const afterOpenChangeFunction = useFunction(afterOpenChange); + const getPopupContainerFunction = useFunction(getPopupContainer); + return ( + <> + : props.title} + content={ + slots.content ? : props.content + } + > + {children} + + + ); +}); + +export default Popover; diff --git a/frontend/antd/progress/Index.svelte b/frontend/antd/progress/Index.svelte new file mode 100644 index 00000000..38ce000d --- /dev/null +++ b/frontend/antd/progress/Index.svelte @@ -0,0 +1,70 @@ + + + + +{#if $mergedProps.visible} + {#await AwaitedProgress then Progress} + + {/await} +{/if} diff --git a/frontend/antd/progress/gradio.config.js b/frontend/antd/progress/gradio.config.js new file mode 100644 index 00000000..916857c0 --- /dev/null +++ b/frontend/antd/progress/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/progress/package.json b/frontend/antd/progress/package.json new file mode 100644 index 00000000..36d6abcd --- /dev/null +++ b/frontend/antd/progress/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-progress", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/progress/progress.tsx b/frontend/antd/progress/progress.tsx new file mode 100644 index 00000000..36c31aba --- /dev/null +++ b/frontend/antd/progress/progress.tsx @@ -0,0 +1,12 @@ +import { sveltify } from '@svelte-preprocess-react'; +import { useFunction } from '@utils/hooks/useFunction'; +import { type GetProps, Progress as AProgress } from 'antd'; + +export const Progress = sveltify>( + ({ format, ...props }) => { + const formatFunction = useFunction(format); + return ; + } +); + +export default Progress; diff --git a/frontend/antd/qr-code/Index.svelte b/frontend/antd/qr-code/Index.svelte new file mode 100644 index 00000000..3b205e3a --- /dev/null +++ b/frontend/antd/qr-code/Index.svelte @@ -0,0 +1,70 @@ + + + + +{#if $mergedProps.visible} + {#await AwaitedQRCode then QRCode} + + {/await} +{/if} diff --git a/frontend/antd/qr-code/gradio.config.js b/frontend/antd/qr-code/gradio.config.js new file mode 100644 index 00000000..916857c0 --- /dev/null +++ b/frontend/antd/qr-code/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/qr-code/package.json b/frontend/antd/qr-code/package.json new file mode 100644 index 00000000..ec3a9ac6 --- /dev/null +++ b/frontend/antd/qr-code/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-qr-code", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/qr-code/qr-code.tsx b/frontend/antd/qr-code/qr-code.tsx new file mode 100644 index 00000000..16cc6789 --- /dev/null +++ b/frontend/antd/qr-code/qr-code.tsx @@ -0,0 +1,8 @@ +import { sveltify } from '@svelte-preprocess-react'; +import { type GetProps, QRCode as AQRCode } from 'antd'; + +export const QRCode = sveltify>(({ ...props }) => { + return ; +}); + +export default QRCode; diff --git a/frontend/antd/radio/Index.svelte b/frontend/antd/radio/Index.svelte new file mode 100644 index 00000000..03a6db7a --- /dev/null +++ b/frontend/antd/radio/Index.svelte @@ -0,0 +1,89 @@ + + + + +{#if $mergedProps.visible} + {#await AwaitedRadio then Radio} + { + value = v; + }} + > + + + {/await} +{/if} + + diff --git a/frontend/antd/radio/button/Index.svelte b/frontend/antd/radio/button/Index.svelte new file mode 100644 index 00000000..21ee337f --- /dev/null +++ b/frontend/antd/radio/button/Index.svelte @@ -0,0 +1,89 @@ + + + + +{#if $mergedProps.visible} + {#await AwaitedRadioButton then RadioButton} + { + value = v; + }} + > + + + {/await} +{/if} + + diff --git a/frontend/antd/radio/button/gradio.config.js b/frontend/antd/radio/button/gradio.config.js new file mode 100644 index 00000000..1992403d --- /dev/null +++ b/frontend/antd/radio/button/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/radio/button/package.json b/frontend/antd/radio/button/package.json new file mode 100644 index 00000000..65537416 --- /dev/null +++ b/frontend/antd/radio/button/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-radio.button", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/radio/button/radio.button.tsx b/frontend/antd/radio/button/radio.button.tsx new file mode 100644 index 00000000..e69adbbf --- /dev/null +++ b/frontend/antd/radio/button/radio.button.tsx @@ -0,0 +1,29 @@ +import { sveltify } from '@svelte-preprocess-react'; +import { type GetProps, Radio as ARadio, theme } from 'antd'; + +export const Radio = sveltify< + GetProps & { + onValueChange: (value: boolean) => void; + } +>(({ onValueChange, onChange, elRef, style, ...props }) => { + const { token } = theme.useToken(); + + return ( + { + onChange?.(e); + onValueChange(e.target.checked); + }} + /> + ); +}); + +export default Radio; diff --git a/frontend/antd/radio/context.ts b/frontend/antd/radio/context.ts new file mode 100644 index 00000000..10e92743 --- /dev/null +++ b/frontend/antd/radio/context.ts @@ -0,0 +1,6 @@ +import { createItemsContext } from '@utils/createItemsContext'; + +const { getItems, getSetItemFn } = createItemsContext('radio-group'); + +export { getItems, getSetItemFn }; +export * from '@utils/createItemsContext'; diff --git a/frontend/antd/radio/gradio.config.js b/frontend/antd/radio/gradio.config.js new file mode 100644 index 00000000..916857c0 --- /dev/null +++ b/frontend/antd/radio/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/radio/group/Index.svelte b/frontend/antd/radio/group/Index.svelte new file mode 100644 index 00000000..05efeaea --- /dev/null +++ b/frontend/antd/radio/group/Index.svelte @@ -0,0 +1,80 @@ + + + + +{#if $mergedProps.visible} + {#await AwaitedRadioGroup then RadioGroup} + { + value = v; + }} + > + + + {/await} +{/if} + + diff --git a/frontend/antd/radio/group/gradio.config.js b/frontend/antd/radio/group/gradio.config.js new file mode 100644 index 00000000..1992403d --- /dev/null +++ b/frontend/antd/radio/group/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/radio/group/option/Index.svelte b/frontend/antd/radio/group/option/Index.svelte new file mode 100644 index 00000000..d796b37c --- /dev/null +++ b/frontend/antd/radio/group/option/Index.svelte @@ -0,0 +1,100 @@ + + + + +{#if $mergedProps.visible} + +{/if} + + diff --git a/frontend/antd/radio/group/option/gradio.config.js b/frontend/antd/radio/group/option/gradio.config.js new file mode 100644 index 00000000..7b2fe8dd --- /dev/null +++ b/frontend/antd/radio/group/option/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/radio/group/option/package.json b/frontend/antd/radio/group/option/package.json new file mode 100644 index 00000000..e4177891 --- /dev/null +++ b/frontend/antd/radio/group/option/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-radio.group.option", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/radio/group/package.json b/frontend/antd/radio/group/package.json new file mode 100644 index 00000000..fca9d782 --- /dev/null +++ b/frontend/antd/radio/group/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-radio.group", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/radio/group/radio.group.less b/frontend/antd/radio/group/radio.group.less new file mode 100644 index 00000000..d9a16208 --- /dev/null +++ b/frontend/antd/radio/group/radio.group.less @@ -0,0 +1,20 @@ +.ms-gr-antd-container { + .ms-gr-antd-radio-group { + react-portal-target { + &:not(:first-child) { + .ms-gr-antd-radio-button { + border-start-start-radius: 0; + border-end-start-radius: 0; + margin-inline-start: calc(var(--ms-gr-antd-line-width) * -1); + } + } + + &:not(:last-child) { + .ms-gr-antd-radio-button { + border-start-end-radius: 0; + border-end-end-radius: 0; + } + } + } + } +} diff --git a/frontend/antd/radio/group/radio.group.tsx b/frontend/antd/radio/group/radio.group.tsx new file mode 100644 index 00000000..7cf02e4b --- /dev/null +++ b/frontend/antd/radio/group/radio.group.tsx @@ -0,0 +1,53 @@ +import { sveltify } from '@svelte-preprocess-react'; +import { FormItemContext } from '@svelte-preprocess-react/context'; +import { useMemo } from 'react'; +import { renderItems } from '@utils/renderItems'; +import { type GetProps, Radio as ARadio } from 'antd'; + +import { type Item } from '../context'; + +import './radio.group.less'; + +export const RadioGroup = sveltify< + GetProps & { + onValueChange: (value: any) => void; + optionItems: Item[]; + } +>( + ({ + onValueChange, + onChange, + elRef, + optionItems, + options, + children, + ...props + }) => { + return ( + <> + { + return ( + options || + renderItems< + NonNullable['options']>[number] + >(optionItems) + ); + }, [optionItems, options])} + onChange={(e) => { + onChange?.(e); + onValueChange(e.target.value); + }} + > + + {children} + + + + ); + } +); + +export default RadioGroup; diff --git a/frontend/antd/radio/package.json b/frontend/antd/radio/package.json new file mode 100644 index 00000000..321b924b --- /dev/null +++ b/frontend/antd/radio/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-radio", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/radio/radio.tsx b/frontend/antd/radio/radio.tsx new file mode 100644 index 00000000..2ab5345c --- /dev/null +++ b/frontend/antd/radio/radio.tsx @@ -0,0 +1,21 @@ +import { sveltify } from '@svelte-preprocess-react'; +import { type GetProps, Radio as ARadio } from 'antd'; + +export const Radio = sveltify< + GetProps & { + onValueChange: (value: boolean) => void; + } +>(({ onValueChange, onChange, elRef, ...props }) => { + return ( + { + onChange?.(e); + onValueChange(e.target.checked); + }} + /> + ); +}); + +export default Radio; diff --git a/frontend/antd/rate/Index.svelte b/frontend/antd/rate/Index.svelte new file mode 100644 index 00000000..a21646e6 --- /dev/null +++ b/frontend/antd/rate/Index.svelte @@ -0,0 +1,76 @@ + + + + +{#if $mergedProps.visible} + {#await AwaitedRate then Rate} + { + value = v; + }} + > + + + {/await} +{/if} + + diff --git a/frontend/antd/rate/gradio.config.js b/frontend/antd/rate/gradio.config.js new file mode 100644 index 00000000..916857c0 --- /dev/null +++ b/frontend/antd/rate/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/rate/package.json b/frontend/antd/rate/package.json new file mode 100644 index 00000000..ee244ab8 --- /dev/null +++ b/frontend/antd/rate/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-rate", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/rate/rate.tsx b/frontend/antd/rate/rate.tsx new file mode 100644 index 00000000..0e75da25 --- /dev/null +++ b/frontend/antd/rate/rate.tsx @@ -0,0 +1,40 @@ +import { sveltify } from '@svelte-preprocess-react'; +import { ReactSlot } from '@svelte-preprocess-react/react-slot'; +import { type GetProps, Rate as ARate } from 'antd'; + +export const Rate = sveltify< + GetProps & { + onValueChange: (value: number) => void; + children?: React.ReactNode; + }, + ['character'] +>( + ({ + slots, + children, + onValueChange, + character, + onChange, + elRef, + ...props + }) => { + return ( + <> +
{children}
+ { + onChange?.(v); + onValueChange(v); + }} + character={ + slots.character ? : character + } + /> + + ); + } +); + +export default Rate; diff --git a/frontend/antd/result/Index.svelte b/frontend/antd/result/Index.svelte new file mode 100644 index 00000000..bbb63de6 --- /dev/null +++ b/frontend/antd/result/Index.svelte @@ -0,0 +1,70 @@ + + + + + +{#if $mergedProps.visible} + {#await AwaitedResult then Result} + + + + {/await} +{/if} + + diff --git a/frontend/antd/result/gradio.config.js b/frontend/antd/result/gradio.config.js new file mode 100644 index 00000000..916857c0 --- /dev/null +++ b/frontend/antd/result/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/result/package.json b/frontend/antd/result/package.json new file mode 100644 index 00000000..d115d7f2 --- /dev/null +++ b/frontend/antd/result/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-result", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/result/result.tsx b/frontend/antd/result/result.tsx new file mode 100644 index 00000000..e2ea9c5a --- /dev/null +++ b/frontend/antd/result/result.tsx @@ -0,0 +1,23 @@ +import { sveltify } from '@svelte-preprocess-react'; +import { ReactSlot } from '@svelte-preprocess-react/react-slot'; +import React from 'react'; +import { type GetProps, Result as AResult } from 'antd'; + +export const Result = sveltify< + GetProps, + ['extra', 'icon', 'subTitle', 'title'] +>(({ slots, ...props }) => { + return ( + : props.extra} + icon={slots.icon ? : props.icon} + subTitle={ + slots.subTitle ? : props.subTitle + } + title={slots.title ? : props.title} + /> + ); +}); + +export default Result; diff --git a/frontend/antd/segmented/Index.svelte b/frontend/antd/segmented/Index.svelte new file mode 100644 index 00000000..6217cc75 --- /dev/null +++ b/frontend/antd/segmented/Index.svelte @@ -0,0 +1,80 @@ + + + + +{#if $mergedProps.visible} + {#await AwaitedSegmented then Segmented} + 0 ? $options : $children} + onValueChange={(v) => { + value = v; + }} + > + + + {/await} +{/if} diff --git a/frontend/antd/segmented/context.ts b/frontend/antd/segmented/context.ts new file mode 100644 index 00000000..cc4a8e3c --- /dev/null +++ b/frontend/antd/segmented/context.ts @@ -0,0 +1,6 @@ +import { createItemsContext } from '@utils/createItemsContext'; + +const { getItems, getSetItemFn } = createItemsContext('segmented'); + +export { getItems, getSetItemFn }; +export * from '@utils/createItemsContext'; diff --git a/frontend/antd/segmented/gradio.config.js b/frontend/antd/segmented/gradio.config.js new file mode 100644 index 00000000..916857c0 --- /dev/null +++ b/frontend/antd/segmented/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/segmented/option/Index.svelte b/frontend/antd/segmented/option/Index.svelte new file mode 100644 index 00000000..d178dade --- /dev/null +++ b/frontend/antd/segmented/option/Index.svelte @@ -0,0 +1,81 @@ + + + + +{#if $mergedProps.visible} + +{/if} + + diff --git a/frontend/antd/segmented/option/gradio.config.js b/frontend/antd/segmented/option/gradio.config.js new file mode 100644 index 00000000..1992403d --- /dev/null +++ b/frontend/antd/segmented/option/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/segmented/option/package.json b/frontend/antd/segmented/option/package.json new file mode 100644 index 00000000..50ce1ac8 --- /dev/null +++ b/frontend/antd/segmented/option/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-segmented.option", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/segmented/package.json b/frontend/antd/segmented/package.json new file mode 100644 index 00000000..ec3a9ac6 --- /dev/null +++ b/frontend/antd/segmented/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-qr-code", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/segmented/segmented.tsx b/frontend/antd/segmented/segmented.tsx new file mode 100644 index 00000000..f521f14f --- /dev/null +++ b/frontend/antd/segmented/segmented.tsx @@ -0,0 +1,35 @@ +import { sveltify } from '@svelte-preprocess-react'; +import { useMemo } from 'react'; +import { renderItems } from '@utils/renderItems'; +import { type GetProps, Segmented as ASegmented } from 'antd'; + +import type { Item } from './context'; + +type SegmentedProps = GetProps; +export const Segmented = sveltify< + SegmentedProps & { + slotItems: Item[]; + onValueChange: (value: string | number) => void; + } +>(({ slotItems, options, onChange, onValueChange, children, ...props }) => { + return ( + <> +
{children}
+ { + onChange?.(v); + onValueChange(v as string | number); + }} + options={useMemo(() => { + // ['label','icon'] + return ( + options || renderItems(slotItems) + ); + }, [options, slotItems])} + /> + + ); +}); + +export default Segmented; diff --git a/frontend/antd/select/Index.svelte b/frontend/antd/select/Index.svelte new file mode 100644 index 00000000..e8862057 --- /dev/null +++ b/frontend/antd/select/Index.svelte @@ -0,0 +1,80 @@ + + + + +{#if $mergedProps.visible} + {#await AwaitedSelect then Select} + + {/await} +{/if} + + diff --git a/frontend/antd/select/context.ts b/frontend/antd/select/context.ts new file mode 100644 index 00000000..3849fc4d --- /dev/null +++ b/frontend/antd/select/context.ts @@ -0,0 +1,6 @@ +import { createItemsContext } from '@utils/createItemsContext'; + +const { getItems, getSetItemFn } = createItemsContext('select'); + +export { getItems, getSetItemFn }; +export * from '@utils/createItemsContext'; diff --git a/frontend/antd/select/gradio.config.js b/frontend/antd/select/gradio.config.js new file mode 100644 index 00000000..916857c0 --- /dev/null +++ b/frontend/antd/select/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/select/option/Index.svelte b/frontend/antd/select/option/Index.svelte new file mode 100644 index 00000000..1dde92fa --- /dev/null +++ b/frontend/antd/select/option/Index.svelte @@ -0,0 +1,100 @@ + + + + +{#if $mergedProps.visible} + +{/if} + + diff --git a/frontend/antd/select/option/gradio.config.js b/frontend/antd/select/option/gradio.config.js new file mode 100644 index 00000000..1992403d --- /dev/null +++ b/frontend/antd/select/option/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/select/option/package.json b/frontend/antd/select/option/package.json new file mode 100644 index 00000000..a64270e2 --- /dev/null +++ b/frontend/antd/select/option/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-select.option", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/select/package.json b/frontend/antd/select/package.json new file mode 100644 index 00000000..b7cc7b34 --- /dev/null +++ b/frontend/antd/select/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-select", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/select/select.tsx b/frontend/antd/select/select.tsx new file mode 100644 index 00000000..a86b913f --- /dev/null +++ b/frontend/antd/select/select.tsx @@ -0,0 +1,128 @@ +import { sveltify } from '@svelte-preprocess-react'; +import { ReactSlot } from '@svelte-preprocess-react/react-slot'; +import { useMemo } from 'react'; +import { useFunction } from '@utils/hooks/useFunction'; +import { renderItems } from '@utils/renderItems'; +import { type GetProps, Select as ASelect } from 'antd'; + +import { type Item } from './context'; + +export const Select = sveltify< + GetProps & { + optionItems: Item[]; + onValueChange: (value: string | number | (string | number)[]) => void; + }, + [ + 'allowClear.clearIcon', + 'maxTagPlaceholder', + 'menuItemSelectedIcon', + 'notFoundContent', + 'removeIcon', + 'suffixIcon', + ] +>( + ({ + slots, + children, + onValueChange, + filterOption, + onChange, + options, + optionItems, + getPopupContainer, + dropdownRender, + optionRender, + tagRender, + labelRender, + filterSort, + maxTagPlaceholder, + elRef, + ...props + }) => { + const getPopupContainerFunction = useFunction(getPopupContainer); + const filterOptionFunction = useFunction(filterOption); + const dropdownRenderFunction = useFunction(dropdownRender); + const filterSortFunction = useFunction(filterSort); + const optionRenderFunction = useFunction(optionRender); + const tagRenderFunction = useFunction(tagRender); + const labelRenderFunction = useFunction(labelRender); + const maxTagPlaceholderFunction = useFunction(maxTagPlaceholder); + return ( + <> +
{children}
+ + { + return ( + options || + renderItems< + NonNullable['options']>[number] + >(optionItems, { + children: 'options', + clone: true, + }) + ); + }, [optionItems, options])} + onChange={(v, ...args) => { + onChange?.(v, ...args); + onValueChange(v as string); + }} + allowClear={ + slots['allowClear.clearIcon'] + ? { + clearIcon: , + } + : props.allowClear + } + removeIcon={ + slots.removeIcon ? ( + + ) : ( + props.removeIcon + ) + } + suffixIcon={ + slots.suffixIcon ? ( + + ) : ( + props.suffixIcon + ) + } + notFoundContent={ + slots.notFoundContent ? ( + + ) : ( + props.notFoundContent + ) + } + menuItemSelectedIcon={ + slots['menuItemSelectedIcon'] ? ( + + ) : ( + props.menuItemSelectedIcon + ) + } + filterOption={filterOptionFunction || filterOption} + maxTagPlaceholder={ + maxTagPlaceholderFunction || + (slots.maxTagPlaceholder ? ( + + ) : ( + maxTagPlaceholder + )) + } + getPopupContainer={getPopupContainerFunction} + dropdownRender={dropdownRenderFunction} + optionRender={optionRenderFunction} + tagRender={tagRenderFunction} + labelRender={labelRenderFunction} + filterSort={filterSortFunction} + /> + + ); + } +); + +export default Select; diff --git a/frontend/antd/skeleton/Index.svelte b/frontend/antd/skeleton/Index.svelte new file mode 100644 index 00000000..46162370 --- /dev/null +++ b/frontend/antd/skeleton/Index.svelte @@ -0,0 +1,70 @@ + + + + + +{#if $mergedProps.visible} + {#await AwaitedSkeleton then Skeleton} + + + + {/await} +{/if} + + diff --git a/frontend/antd/skeleton/avatar/Index.svelte b/frontend/antd/skeleton/avatar/Index.svelte new file mode 100644 index 00000000..8efd35e6 --- /dev/null +++ b/frontend/antd/skeleton/avatar/Index.svelte @@ -0,0 +1,72 @@ + + + + + +{#if $mergedProps.visible} + {#await AwaitedSkeletonAvatar then SkeletonAvatar} + + + + {/await} +{/if} + + diff --git a/frontend/antd/skeleton/avatar/gradio.config.js b/frontend/antd/skeleton/avatar/gradio.config.js new file mode 100644 index 00000000..1992403d --- /dev/null +++ b/frontend/antd/skeleton/avatar/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/skeleton/avatar/package.json b/frontend/antd/skeleton/avatar/package.json new file mode 100644 index 00000000..87906742 --- /dev/null +++ b/frontend/antd/skeleton/avatar/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-skeleton.avatar", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/skeleton/avatar/skeleton.avatar.tsx b/frontend/antd/skeleton/avatar/skeleton.avatar.tsx new file mode 100644 index 00000000..eca73bfb --- /dev/null +++ b/frontend/antd/skeleton/avatar/skeleton.avatar.tsx @@ -0,0 +1,8 @@ +import { sveltify } from '@svelte-preprocess-react'; +import { type GetProps, Skeleton as ASkeleton } from 'antd'; + +export const SkeletonAvatar = sveltify>( + ASkeleton.Avatar +); + +export default SkeletonAvatar; diff --git a/frontend/antd/skeleton/button/Index.svelte b/frontend/antd/skeleton/button/Index.svelte new file mode 100644 index 00000000..a5f4ad74 --- /dev/null +++ b/frontend/antd/skeleton/button/Index.svelte @@ -0,0 +1,72 @@ + + + + + +{#if $mergedProps.visible} + {#await AwaitedSkeletonButton then SkeletonButton} + + + + {/await} +{/if} + + diff --git a/frontend/antd/skeleton/button/gradio.config.js b/frontend/antd/skeleton/button/gradio.config.js new file mode 100644 index 00000000..1992403d --- /dev/null +++ b/frontend/antd/skeleton/button/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/skeleton/button/package.json b/frontend/antd/skeleton/button/package.json new file mode 100644 index 00000000..ebe408ac --- /dev/null +++ b/frontend/antd/skeleton/button/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-skeleton.button", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/skeleton/button/skeleton.button.tsx b/frontend/antd/skeleton/button/skeleton.button.tsx new file mode 100644 index 00000000..085804e3 --- /dev/null +++ b/frontend/antd/skeleton/button/skeleton.button.tsx @@ -0,0 +1,8 @@ +import { sveltify } from '@svelte-preprocess-react'; +import { type GetProps, Skeleton as ASkeleton } from 'antd'; + +export const SkeletonButton = sveltify>( + ASkeleton.Button +); + +export default SkeletonButton; diff --git a/frontend/antd/skeleton/gradio.config.js b/frontend/antd/skeleton/gradio.config.js new file mode 100644 index 00000000..916857c0 --- /dev/null +++ b/frontend/antd/skeleton/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/skeleton/image/Index.svelte b/frontend/antd/skeleton/image/Index.svelte new file mode 100644 index 00000000..e419a72c --- /dev/null +++ b/frontend/antd/skeleton/image/Index.svelte @@ -0,0 +1,72 @@ + + + + + +{#if $mergedProps.visible} + {#await AwaitedSkeletonImage then SkeletonImage} + + + + {/await} +{/if} + + diff --git a/frontend/antd/skeleton/image/gradio.config.js b/frontend/antd/skeleton/image/gradio.config.js new file mode 100644 index 00000000..1992403d --- /dev/null +++ b/frontend/antd/skeleton/image/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/skeleton/image/package.json b/frontend/antd/skeleton/image/package.json new file mode 100644 index 00000000..aa15f18c --- /dev/null +++ b/frontend/antd/skeleton/image/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-skeleton.image", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/skeleton/image/skeleton.image.tsx b/frontend/antd/skeleton/image/skeleton.image.tsx new file mode 100644 index 00000000..30ca59f3 --- /dev/null +++ b/frontend/antd/skeleton/image/skeleton.image.tsx @@ -0,0 +1,8 @@ +import { sveltify } from '@svelte-preprocess-react'; +import { type GetProps, Skeleton as ASkeleton } from 'antd'; + +export const SkeletonImage = sveltify>( + ASkeleton.Image +); + +export default SkeletonImage; diff --git a/frontend/antd/skeleton/input/Index.svelte b/frontend/antd/skeleton/input/Index.svelte new file mode 100644 index 00000000..b5b45aa0 --- /dev/null +++ b/frontend/antd/skeleton/input/Index.svelte @@ -0,0 +1,72 @@ + + + + + +{#if $mergedProps.visible} + {#await AwaitedSkeletonInput then SkeletonNodeInput} + + + + {/await} +{/if} + + diff --git a/frontend/antd/skeleton/input/gradio.config.js b/frontend/antd/skeleton/input/gradio.config.js new file mode 100644 index 00000000..1992403d --- /dev/null +++ b/frontend/antd/skeleton/input/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/skeleton/input/package.json b/frontend/antd/skeleton/input/package.json new file mode 100644 index 00000000..767560d0 --- /dev/null +++ b/frontend/antd/skeleton/input/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-skeleton.input", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/skeleton/input/skeleton.input.tsx b/frontend/antd/skeleton/input/skeleton.input.tsx new file mode 100644 index 00000000..e0a760d4 --- /dev/null +++ b/frontend/antd/skeleton/input/skeleton.input.tsx @@ -0,0 +1,8 @@ +import { sveltify } from '@svelte-preprocess-react'; +import { type GetProps, Skeleton as ASkeleton } from 'antd'; + +export const SkeletonInput = sveltify>( + ASkeleton.Input +); + +export default SkeletonInput; diff --git a/frontend/antd/skeleton/node/Index.svelte b/frontend/antd/skeleton/node/Index.svelte new file mode 100644 index 00000000..834903c3 --- /dev/null +++ b/frontend/antd/skeleton/node/Index.svelte @@ -0,0 +1,70 @@ + + + + + +{#if $mergedProps.visible} + {#await AwaitedSkeletonNode then SkeletonNode} + + + + {/await} +{/if} + + diff --git a/frontend/antd/skeleton/node/gradio.config.js b/frontend/antd/skeleton/node/gradio.config.js new file mode 100644 index 00000000..1992403d --- /dev/null +++ b/frontend/antd/skeleton/node/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/skeleton/node/package.json b/frontend/antd/skeleton/node/package.json new file mode 100644 index 00000000..29ece7a5 --- /dev/null +++ b/frontend/antd/skeleton/node/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-skeleton.node", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/skeleton/node/skeleton.node.tsx b/frontend/antd/skeleton/node/skeleton.node.tsx new file mode 100644 index 00000000..7197790e --- /dev/null +++ b/frontend/antd/skeleton/node/skeleton.node.tsx @@ -0,0 +1,8 @@ +import { sveltify } from '@svelte-preprocess-react'; +import { type GetProps, Skeleton as ASkeleton } from 'antd'; + +export const SkeletonNode = sveltify>( + ASkeleton.Node +); + +export default SkeletonNode; diff --git a/frontend/antd/skeleton/package.json b/frontend/antd/skeleton/package.json new file mode 100644 index 00000000..ca4cf545 --- /dev/null +++ b/frontend/antd/skeleton/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-skeleton", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/skeleton/skeleton.tsx b/frontend/antd/skeleton/skeleton.tsx new file mode 100644 index 00000000..4afebe9a --- /dev/null +++ b/frontend/antd/skeleton/skeleton.tsx @@ -0,0 +1,6 @@ +import { sveltify } from '@svelte-preprocess-react'; +import { type GetProps, Skeleton as ASkeleton } from 'antd'; + +export const Skeleton = sveltify>(ASkeleton); + +export default Skeleton; diff --git a/frontend/antd/slider/Index.svelte b/frontend/antd/slider/Index.svelte new file mode 100644 index 00000000..b1a7e082 --- /dev/null +++ b/frontend/antd/slider/Index.svelte @@ -0,0 +1,80 @@ + + + + +{#if $mergedProps.visible} + {#await AwaitedSlider then Slider} + { + value = v; + }} + > + + + {/await} +{/if} + + diff --git a/frontend/antd/slider/context.ts b/frontend/antd/slider/context.ts new file mode 100644 index 00000000..15f4b3d8 --- /dev/null +++ b/frontend/antd/slider/context.ts @@ -0,0 +1,6 @@ +import { createItemsContext } from '@utils/createItemsContext'; + +const { getItems, getSetItemFn } = createItemsContext('slider'); + +export { getItems, getSetItemFn }; +export * from '@utils/createItemsContext'; diff --git a/frontend/antd/slider/gradio.config.js b/frontend/antd/slider/gradio.config.js new file mode 100644 index 00000000..916857c0 --- /dev/null +++ b/frontend/antd/slider/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/slider/mark/Index.svelte b/frontend/antd/slider/mark/Index.svelte new file mode 100644 index 00000000..9611ffb2 --- /dev/null +++ b/frontend/antd/slider/mark/Index.svelte @@ -0,0 +1,91 @@ + + + + +{#if $mergedProps.visible} + + + +{/if} + + diff --git a/frontend/antd/slider/mark/gradio.config.js b/frontend/antd/slider/mark/gradio.config.js new file mode 100644 index 00000000..1992403d --- /dev/null +++ b/frontend/antd/slider/mark/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/slider/mark/package.json b/frontend/antd/slider/mark/package.json new file mode 100644 index 00000000..86aea9ae --- /dev/null +++ b/frontend/antd/slider/mark/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-slider.mark", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/slider/package.json b/frontend/antd/slider/package.json new file mode 100644 index 00000000..d91b64da --- /dev/null +++ b/frontend/antd/slider/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-slider", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/slider/slider.tsx b/frontend/antd/slider/slider.tsx new file mode 100644 index 00000000..aba09f8b --- /dev/null +++ b/frontend/antd/slider/slider.tsx @@ -0,0 +1,82 @@ +import { sveltify } from '@svelte-preprocess-react'; +import { ReactSlot } from '@svelte-preprocess-react/react-slot'; +import { useMemo } from 'react'; +import { useFunction } from '@utils/hooks/useFunction'; +import { type GetProps, Slider as ASlider } from 'antd'; + +import { type Item } from './context'; + +type SliderProps = GetProps; + +const renderMarks = (items: Item[]) => { + return items.reduce( + (acc, v) => { + const number = v?.props.number; + if (number !== undefined) { + acc[number] = + v?.slots.label instanceof Element ? ( + { + ...v.props, + label: , + } + ) : v?.slots.children instanceof Element ? ( + + ) : ( + { + ...v?.props, + } + ); + } + return acc; + }, + {} as NonNullable + ); +}; + +export const Slider = sveltify< + SliderProps & { + onValueChange: (value: number | number[]) => void; + children?: React.ReactNode; + markItems: Item[]; + } +>( + ({ + marks, + markItems, + children, + onValueChange, + onChange, + elRef, + tooltip, + ...props + }) => { + const onSliderChange = (v: number | number[]) => { + onChange?.(v as any); + onValueChange(v); + }; + const tooltipGetPopupContainerFunction = useFunction( + tooltip?.getPopupContainer + ); + const tooltipFormatterFunction = useFunction(tooltip?.formatter); + return ( + <> +
{children}
+ { + return marks || renderMarks(markItems); + }, [markItems, marks])} + ref={elRef} + onChange={onSliderChange} + /> + + ); + } +); + +export default Slider; diff --git a/frontend/antd/space/Index.svelte b/frontend/antd/space/Index.svelte new file mode 100644 index 00000000..3800c6d4 --- /dev/null +++ b/frontend/antd/space/Index.svelte @@ -0,0 +1,69 @@ + + + + +{#if $mergedProps.visible} + {#await AwaitedSpace then Space} + + + + {/await} +{/if} + + diff --git a/frontend/antd/space/compact/Index.svelte b/frontend/antd/space/compact/Index.svelte new file mode 100644 index 00000000..82ab2ff6 --- /dev/null +++ b/frontend/antd/space/compact/Index.svelte @@ -0,0 +1,70 @@ + + + + + +{#if $mergedProps.visible} + {#await AwaitedSpaceCompact then SpaceCompact} + + + + {/await} +{/if} + + diff --git a/frontend/antd/space/compact/gradio.config.js b/frontend/antd/space/compact/gradio.config.js new file mode 100644 index 00000000..1992403d --- /dev/null +++ b/frontend/antd/space/compact/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/space/compact/package.json b/frontend/antd/space/compact/package.json new file mode 100644 index 00000000..fbdec684 --- /dev/null +++ b/frontend/antd/space/compact/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-space.compact", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/space/compact/space.compact.tsx b/frontend/antd/space/compact/space.compact.tsx new file mode 100644 index 00000000..3e11b3f4 --- /dev/null +++ b/frontend/antd/space/compact/space.compact.tsx @@ -0,0 +1,23 @@ +import { sveltify } from '@svelte-preprocess-react'; +import { ReactSlot } from '@svelte-preprocess-react/react-slot'; +import React from 'react'; +import { useTargets } from '@utils/hooks/useTargets'; +import { type GetProps, Space as ASpace } from 'antd'; + +export const Space = sveltify>( + ({ children, ...props }) => { + const targets = useTargets(children); + return ( + <> +
{children}
+ + {targets.map((target, index) => { + return ; + })} + + + ); + } +); + +export default Space; diff --git a/frontend/antd/space/gradio.config.js b/frontend/antd/space/gradio.config.js new file mode 100644 index 00000000..916857c0 --- /dev/null +++ b/frontend/antd/space/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/space/package.json b/frontend/antd/space/package.json new file mode 100644 index 00000000..21fd6904 --- /dev/null +++ b/frontend/antd/space/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-space", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/space/space.tsx b/frontend/antd/space/space.tsx new file mode 100644 index 00000000..ed5e4993 --- /dev/null +++ b/frontend/antd/space/space.tsx @@ -0,0 +1,28 @@ +import { sveltify } from '@svelte-preprocess-react'; +import { ReactSlot } from '@svelte-preprocess-react/react-slot'; +import React from 'react'; +import { useTargets } from '@utils/hooks/useTargets'; +import { type GetProps, Space as ASpace } from 'antd'; + +export const Space = sveltify, ['split']>( + ({ slots, children, ...props }) => { + const targets = useTargets(children); + return ( + <> +
{children}
+ : props.split + } + > + {targets.map((target, index) => { + return ; + })} + + + ); + } +); + +export default Space; diff --git a/frontend/antd/spin/Index.svelte b/frontend/antd/spin/Index.svelte new file mode 100644 index 00000000..fa4ff962 --- /dev/null +++ b/frontend/antd/spin/Index.svelte @@ -0,0 +1,70 @@ + + + + + +{#if $mergedProps.visible} + {#await AwaitedSpin then Spin} + + + + {/await} +{/if} + + diff --git a/frontend/antd/spin/gradio.config.js b/frontend/antd/spin/gradio.config.js new file mode 100644 index 00000000..916857c0 --- /dev/null +++ b/frontend/antd/spin/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/spin/package.json b/frontend/antd/spin/package.json new file mode 100644 index 00000000..2e3a61fd --- /dev/null +++ b/frontend/antd/spin/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-spin", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/spin/spin.tsx b/frontend/antd/spin/spin.tsx new file mode 100644 index 00000000..73d82845 --- /dev/null +++ b/frontend/antd/spin/spin.tsx @@ -0,0 +1,23 @@ +import { sveltify } from '@svelte-preprocess-react'; +import { ReactSlot } from '@svelte-preprocess-react/react-slot'; +import React from 'react'; +import { type GetProps, Spin as ASpin } from 'antd'; + +export const Spin = sveltify< + GetProps & { + id?: string; + }, + ['tip', 'indicator'] +>(({ slots, ...props }) => { + return ( + : props.tip} + indicator={ + slots.indicator ? : props.indicator + } + /> + ); +}); + +export default Spin; diff --git a/frontend/antd/statistic/Index.svelte b/frontend/antd/statistic/Index.svelte new file mode 100644 index 00000000..2b5dd01f --- /dev/null +++ b/frontend/antd/statistic/Index.svelte @@ -0,0 +1,68 @@ + + + + +{#if $mergedProps.visible} + {#await AwaitedStatistic then Statistic} + + + + {/await} +{/if} + + diff --git a/frontend/antd/statistic/countdown/Index.svelte b/frontend/antd/statistic/countdown/Index.svelte new file mode 100644 index 00000000..5bc8a7a9 --- /dev/null +++ b/frontend/antd/statistic/countdown/Index.svelte @@ -0,0 +1,73 @@ + + + + +{#if $mergedProps.visible} + {#await AwaitedStatisticCountdown then StatisticCountdown} + + + + {/await} +{/if} + + diff --git a/frontend/antd/statistic/countdown/gradio.config.js b/frontend/antd/statistic/countdown/gradio.config.js new file mode 100644 index 00000000..1992403d --- /dev/null +++ b/frontend/antd/statistic/countdown/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/statistic/countdown/package.json b/frontend/antd/statistic/countdown/package.json new file mode 100644 index 00000000..aec187e6 --- /dev/null +++ b/frontend/antd/statistic/countdown/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-statistic.countdown", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/statistic/countdown/statistic.countdown.tsx b/frontend/antd/statistic/countdown/statistic.countdown.tsx new file mode 100644 index 00000000..ec52c319 --- /dev/null +++ b/frontend/antd/statistic/countdown/statistic.countdown.tsx @@ -0,0 +1,26 @@ +import { sveltify } from '@svelte-preprocess-react'; +import { ReactSlot } from '@svelte-preprocess-react/react-slot'; +import React from 'react'; +import { type GetProps, Statistic as AStatistic } from 'antd'; + +export const StatisticCountdown = sveltify< + GetProps & { + children: React.ReactNode; + }, + ['prefix', 'suffix', 'title'] +>(({ children, value, slots, ...props }) => { + return ( + <> +
{children}
+ : props.title} + prefix={slots.prefix ? : props.prefix} + suffix={slots.suffix ? : props.suffix} + /> + + ); +}); + +export default StatisticCountdown; diff --git a/frontend/antd/statistic/gradio.config.js b/frontend/antd/statistic/gradio.config.js new file mode 100644 index 00000000..916857c0 --- /dev/null +++ b/frontend/antd/statistic/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/statistic/package.json b/frontend/antd/statistic/package.json new file mode 100644 index 00000000..ddb6a524 --- /dev/null +++ b/frontend/antd/statistic/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-statistic", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/statistic/statistic.tsx b/frontend/antd/statistic/statistic.tsx new file mode 100644 index 00000000..ceeea3b7 --- /dev/null +++ b/frontend/antd/statistic/statistic.tsx @@ -0,0 +1,28 @@ +import { sveltify } from '@svelte-preprocess-react'; +import { ReactSlot } from '@svelte-preprocess-react/react-slot'; +import React from 'react'; +import { useFunction } from '@utils/hooks/useFunction'; +import { type GetProps, Statistic as AStatistic } from 'antd'; + +export const Statistic = sveltify< + GetProps & { + children: React.ReactNode; + }, + ['prefix', 'suffix', 'title'] +>(({ children, slots, formatter, ...props }) => { + const formatterFunction = useFunction(formatter); + return ( + <> +
{children}
+ : props.title} + prefix={slots.prefix ? : props.prefix} + suffix={slots.suffix ? : props.suffix} + /> + + ); +}); + +export default Statistic; diff --git a/frontend/antd/steps/Index.svelte b/frontend/antd/steps/Index.svelte new file mode 100644 index 00000000..30769efd --- /dev/null +++ b/frontend/antd/steps/Index.svelte @@ -0,0 +1,74 @@ + + + + + +{#if $mergedProps.visible} + {#await AwaitedSteps then Steps} + 0 ? $items : $children} + > + + + {/await} +{/if} + + diff --git a/frontend/antd/steps/context.ts b/frontend/antd/steps/context.ts new file mode 100644 index 00000000..0c3e267d --- /dev/null +++ b/frontend/antd/steps/context.ts @@ -0,0 +1,6 @@ +import { createItemsContext } from '@utils/createItemsContext'; + +const { getItems, getSetItemFn } = createItemsContext('steps'); + +export { getItems, getSetItemFn }; +export * from '@utils/createItemsContext'; diff --git a/frontend/antd/steps/gradio.config.js b/frontend/antd/steps/gradio.config.js new file mode 100644 index 00000000..916857c0 --- /dev/null +++ b/frontend/antd/steps/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/steps/item/Index.svelte b/frontend/antd/steps/item/Index.svelte new file mode 100644 index 00000000..4148025f --- /dev/null +++ b/frontend/antd/steps/item/Index.svelte @@ -0,0 +1,73 @@ + + + + +{#if $mergedProps.visible} + +{/if} + + diff --git a/frontend/antd/steps/item/gradio.config.js b/frontend/antd/steps/item/gradio.config.js new file mode 100644 index 00000000..1992403d --- /dev/null +++ b/frontend/antd/steps/item/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/steps/item/package.json b/frontend/antd/steps/item/package.json new file mode 100644 index 00000000..ae4e2ae0 --- /dev/null +++ b/frontend/antd/steps/item/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-steps.item", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/steps/package.json b/frontend/antd/steps/package.json new file mode 100644 index 00000000..27117ee6 --- /dev/null +++ b/frontend/antd/steps/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-steps", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/steps/steps.tsx b/frontend/antd/steps/steps.tsx new file mode 100644 index 00000000..18d7984e --- /dev/null +++ b/frontend/antd/steps/steps.tsx @@ -0,0 +1,36 @@ +import { sveltify } from '@svelte-preprocess-react'; +import { ReactSlot } from '@svelte-preprocess-react/react-slot'; +import React, { useMemo } from 'react'; +import { renderItems } from '@utils/renderItems'; +import { type GetProps, Steps as ASteps } from 'antd'; + +import { type Item } from './context'; + +export const Steps = sveltify< + GetProps & { + slotItems: Item[]; + }, + ['progressDot'] +>(({ slots, items, slotItems, ...props }) => { + return ( + { + return ( + items || + renderItems['items']>[number]>( + slotItems + ) + ); + }, [items, slotItems])} + progressDot={ + slots.progressDot + ? (dot) => + slots.progressDot ? : dot + : undefined + } + /> + ); +}); + +export default Steps; diff --git a/frontend/antd/switch/Index.svelte b/frontend/antd/switch/Index.svelte new file mode 100644 index 00000000..7cdafb53 --- /dev/null +++ b/frontend/antd/switch/Index.svelte @@ -0,0 +1,75 @@ + + + + +{#if $mergedProps.visible} + {#await AwaitedSwitch then Switch} + { + value = v; + }} + > + + + {/await} +{/if} + + diff --git a/frontend/antd/switch/gradio.config.js b/frontend/antd/switch/gradio.config.js new file mode 100644 index 00000000..916857c0 --- /dev/null +++ b/frontend/antd/switch/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/switch/package.json b/frontend/antd/switch/package.json new file mode 100644 index 00000000..8a7824be --- /dev/null +++ b/frontend/antd/switch/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-switch", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/switch/switch.tsx b/frontend/antd/switch/switch.tsx new file mode 100644 index 00000000..a638b7d5 --- /dev/null +++ b/frontend/antd/switch/switch.tsx @@ -0,0 +1,41 @@ +import { sveltify } from '@svelte-preprocess-react'; +import { ReactSlot } from '@svelte-preprocess-react/react-slot'; +import React from 'react'; +import { type GetProps, Switch as ASwitch } from 'antd'; + +export const Switch = sveltify< + GetProps & { + children?: React.ReactNode; + onValueChange?: (value: boolean) => void; + }, + ['checkedChildren', 'unCheckedChildren'] +>(({ slots, children, onValueChange, onChange, ...props }) => { + return ( + <> +
{children}
+ { + onValueChange?.(value); + onChange?.(value, ...args); + }} + checkedChildren={ + slots.checkedChildren ? ( + + ) : ( + props.checkedChildren + ) + } + unCheckedChildren={ + slots.unCheckedChildren ? ( + + ) : ( + props.unCheckedChildren + ) + } + /> + + ); +}); + +export default Switch; diff --git a/frontend/antd/table/Index.svelte b/frontend/antd/table/Index.svelte new file mode 100644 index 00000000..14f8c9b6 --- /dev/null +++ b/frontend/antd/table/Index.svelte @@ -0,0 +1,83 @@ + + + + +{#if $mergedProps.visible} + {#await AwaitedTable then Table} + + +
+ {/await} +{/if} + + diff --git a/frontend/antd/table/column-group/Index.svelte b/frontend/antd/table/column-group/Index.svelte new file mode 100644 index 00000000..677a9f76 --- /dev/null +++ b/frontend/antd/table/column-group/Index.svelte @@ -0,0 +1,83 @@ + + + + +{#if $mergedProps.visible} + +{/if} + + diff --git a/frontend/antd/table/column-group/gradio.config.js b/frontend/antd/table/column-group/gradio.config.js new file mode 100644 index 00000000..1992403d --- /dev/null +++ b/frontend/antd/table/column-group/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/table/column-group/package.json b/frontend/antd/table/column-group/package.json new file mode 100644 index 00000000..6ce3205b --- /dev/null +++ b/frontend/antd/table/column-group/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-table.column-group", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/table/column/Index.svelte b/frontend/antd/table/column/Index.svelte new file mode 100644 index 00000000..e1387a35 --- /dev/null +++ b/frontend/antd/table/column/Index.svelte @@ -0,0 +1,142 @@ + + + + +{#if $mergedProps.visible} + +{/if} + + diff --git a/frontend/antd/table/column/gradio.config.js b/frontend/antd/table/column/gradio.config.js new file mode 100644 index 00000000..1992403d --- /dev/null +++ b/frontend/antd/table/column/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/table/column/package.json b/frontend/antd/table/column/package.json new file mode 100644 index 00000000..852326d1 --- /dev/null +++ b/frontend/antd/table/column/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-table.column", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/table/context.ts b/frontend/antd/table/context.ts new file mode 100644 index 00000000..9246517b --- /dev/null +++ b/frontend/antd/table/context.ts @@ -0,0 +1,27 @@ +import { createItemsContext } from '@utils/createItemsContext'; + +const { getItems: getColumnItems, getSetItemFn: getSetColumnItemFn } = + createItemsContext('table-column'); + +const { getItems: getSelectionItems, getSetItemFn: getSetSelectionItemFn } = + createItemsContext('table-row-selection-selection'); + +const { + getItems: getRowSelectionItems, + getSetItemFn: getSetRowSelectionItemFn, +} = createItemsContext('table-row-selection'); + +const { getItems: getExpandableItems, getSetItemFn: getSetExpandableItemFn } = + createItemsContext('table-expandable'); + +export { + getColumnItems, + getExpandableItems, + getRowSelectionItems, + getSelectionItems, + getSetColumnItemFn, + getSetExpandableItemFn, + getSetRowSelectionItemFn, + getSetSelectionItemFn, +}; +export * from '@utils/createItemsContext'; diff --git a/frontend/antd/table/expandable/Expandable.svelte b/frontend/antd/table/expandable/Expandable.svelte new file mode 100644 index 00000000..80acff39 --- /dev/null +++ b/frontend/antd/table/expandable/Expandable.svelte @@ -0,0 +1,105 @@ + + + + +{#if $mergedProps.visible} + +{/if} + + diff --git a/frontend/antd/table/expandable/Index.svelte b/frontend/antd/table/expandable/Index.svelte new file mode 100644 index 00000000..a4c9db3e --- /dev/null +++ b/frontend/antd/table/expandable/Index.svelte @@ -0,0 +1,42 @@ + + + + +{#await AwaitedExpandable then Expandable} + + + +{/await} + + diff --git a/frontend/antd/table/expandable/gradio.config.js b/frontend/antd/table/expandable/gradio.config.js new file mode 100644 index 00000000..1992403d --- /dev/null +++ b/frontend/antd/table/expandable/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/table/expandable/package.json b/frontend/antd/table/expandable/package.json new file mode 100644 index 00000000..80669601 --- /dev/null +++ b/frontend/antd/table/expandable/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-table.expandable", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/table/gradio.config.js b/frontend/antd/table/gradio.config.js new file mode 100644 index 00000000..916857c0 --- /dev/null +++ b/frontend/antd/table/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/table/package.json b/frontend/antd/table/package.json new file mode 100644 index 00000000..accf96d7 --- /dev/null +++ b/frontend/antd/table/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-table", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/table/row-selection/Index.svelte b/frontend/antd/table/row-selection/Index.svelte new file mode 100644 index 00000000..614b6e54 --- /dev/null +++ b/frontend/antd/table/row-selection/Index.svelte @@ -0,0 +1,42 @@ + + + + +{#await AwaitedRowSelection then RowSelection} + + + +{/await} + + diff --git a/frontend/antd/table/row-selection/RowSelection.svelte b/frontend/antd/table/row-selection/RowSelection.svelte new file mode 100644 index 00000000..58c3df9f --- /dev/null +++ b/frontend/antd/table/row-selection/RowSelection.svelte @@ -0,0 +1,101 @@ + + + + +{#if $mergedProps.visible} + +{/if} + + diff --git a/frontend/antd/table/row-selection/gradio.config.js b/frontend/antd/table/row-selection/gradio.config.js new file mode 100644 index 00000000..1992403d --- /dev/null +++ b/frontend/antd/table/row-selection/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/table/row-selection/package.json b/frontend/antd/table/row-selection/package.json new file mode 100644 index 00000000..c8f22cd5 --- /dev/null +++ b/frontend/antd/table/row-selection/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-table.row-selection", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/table/row-selection/selection/Index.svelte b/frontend/antd/table/row-selection/selection/Index.svelte new file mode 100644 index 00000000..f0595f6b --- /dev/null +++ b/frontend/antd/table/row-selection/selection/Index.svelte @@ -0,0 +1,93 @@ + + + + +{#if $mergedProps.visible} + +{/if} + + diff --git a/frontend/antd/table/row-selection/selection/gradio.config.js b/frontend/antd/table/row-selection/selection/gradio.config.js new file mode 100644 index 00000000..7b2fe8dd --- /dev/null +++ b/frontend/antd/table/row-selection/selection/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/table/row-selection/selection/package.json b/frontend/antd/table/row-selection/selection/package.json new file mode 100644 index 00000000..320a0d64 --- /dev/null +++ b/frontend/antd/table/row-selection/selection/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-table.selection", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/table/table.tsx b/frontend/antd/table/table.tsx new file mode 100644 index 00000000..d9cd843b --- /dev/null +++ b/frontend/antd/table/table.tsx @@ -0,0 +1,195 @@ +import { sveltify } from '@svelte-preprocess-react'; +import { ReactSlot } from '@svelte-preprocess-react/react-slot'; +import React, { useMemo } from 'react'; +import { useFunction } from '@utils/hooks/useFunction'; +import { renderItems } from '@utils/renderItems'; +import { type GetProps, Table as ATable } from 'antd'; + +import type { Item } from './context'; + +function getConfig(value: T): Partial> { + if (typeof value === 'object' && value !== null) { + return value as any; + } + return {} as any; +} + +type TableProps = GetProps; +export const Table = sveltify< + TableProps & { + rowSelectionItems: Item[]; + expandableItems: Item[]; + columnItems: Item[]; + }, + [ + 'footer', + 'title', + 'loading.tip', + 'loading.indicator', + 'pagination.showQuickJumper.goButton', + 'showSorterTooltip.title', + ] +>( + ({ + children, + slots, + columnItems, + columns, + getPopupContainer, + pagination, + loading, + rowKey, + rowSelection, + rowSelectionItems, + expandableItems, + expandable, + sticky, + showSorterTooltip, + onRow, + onHeaderRow, + ...props + }) => { + const getPopupContainerFunction = useFunction(getPopupContainer); + + const supportLoadingConfig = + slots['loading.tip'] || slots['loading.indicator']; + const loadingConfig = getConfig(loading); + const supportPaginationConfig = + slots['pagination.showQuickJumper.goButton']; + const paginationConfig = getConfig(pagination); + const paginationShowTotalFunction = useFunction(paginationConfig.showTotal); + const rowKeyFunction = useFunction(rowKey); + const supportShowSorterTooltipConfig = + slots['showSorterTooltip.title'] || typeof showSorterTooltip === 'object'; + const showSorterTooltipConfig = getConfig(showSorterTooltip); + const showSorterTooltipAfterOpenChangeFunction = useFunction( + showSorterTooltipConfig.afterOpenChange + ); + const showSorterTooltipGetPopupContainerFunction = useFunction( + showSorterTooltipConfig.getPopupContainer + ); + const supportStickyConfig = typeof sticky === 'object'; + const stickyConfig = getConfig(sticky); + const stickyGetContainerFunction = useFunction(stickyConfig.getContainer); + const onRowFunction = useFunction(onRow); + const onHeaderRowFunction = useFunction(onHeaderRow); + + return ( + <> +
{children}
+ { + return ( + columns?.map((item) => { + if ((item as any) === 'EXPAND_COLUMN') { + return ATable.EXPAND_COLUMN; + } else if ((item as any) === 'SELECTION_COLUMN') { + return ATable.SELECTION_COLUMN; + } + return item; + }) || + renderItems[number]>( + columnItems, + { + fallback: (item) => { + if (item === 'EXPAND_COLUMN') { + return ATable.EXPAND_COLUMN; + } else if (item === 'SELECTION_COLUMN') { + return ATable.SELECTION_COLUMN; + } + return item; + }, + } + ) + ); + }, [columnItems, columns])} + onRow={onRowFunction} + onHeaderRow={onHeaderRowFunction} + rowSelection={useMemo(() => { + return ( + rowSelection || + renderItems(rowSelectionItems)[0] + ); + }, [rowSelection, rowSelectionItems])} + expandable={useMemo(() => { + return ( + expandable || + renderItems(expandableItems)[0] + ); + }, [expandable, expandableItems])} + rowKey={rowKeyFunction || rowKey} + sticky={ + supportStickyConfig + ? { + ...stickyConfig, + getContainer: stickyGetContainerFunction, + } + : sticky + } + showSorterTooltip={ + supportShowSorterTooltipConfig + ? { + ...showSorterTooltipConfig, + afterOpenChange: showSorterTooltipAfterOpenChangeFunction, + getPopupContainer: showSorterTooltipGetPopupContainerFunction, + title: slots['showSorterTooltip.title'] ? ( + + ) : ( + showSorterTooltipConfig.title + ), + } + : showSorterTooltip + } + pagination={ + supportPaginationConfig + ? { + ...paginationConfig, + showTotal: paginationShowTotalFunction, + showQuickJumper: slots['pagination.showQuickJumper.goButton'] + ? { + goButton: ( + + ), + } + : paginationConfig.showQuickJumper, + } + : pagination + } + getPopupContainer={getPopupContainerFunction} + loading={ + supportLoadingConfig + ? { + ...loadingConfig, + tip: slots['loading.tip'] ? ( + + ) : ( + loadingConfig.tip + ), + indicator: slots['loading.indicator'] ? ( + + ) : ( + loadingConfig.indicator + ), + } + : loading + } + footer={ + slots.footer + ? () => (slots.footer ? : null) + : props.footer + } + title={ + slots.title + ? () => (slots.title ? : null) + : props.title + } + /> + + ); + } +); + +export default Table; diff --git a/frontend/antd/tabs/Index.svelte b/frontend/antd/tabs/Index.svelte new file mode 100644 index 00000000..646ac43c --- /dev/null +++ b/frontend/antd/tabs/Index.svelte @@ -0,0 +1,80 @@ + + + + + +{#if $mergedProps.visible} + {#await AwaitedTabs then Tabs} + 0 ? $items : $children} + activeKey={$mergedProps.props.activeKey ?? $mergedProps.value} + onValueChange={(activeKey) => { + value = activeKey; + }} + > + + + {/await} +{/if} + + diff --git a/frontend/antd/tabs/context.ts b/frontend/antd/tabs/context.ts new file mode 100644 index 00000000..f1924a05 --- /dev/null +++ b/frontend/antd/tabs/context.ts @@ -0,0 +1,6 @@ +import { createItemsContext } from '@utils/createItemsContext'; + +const { getItems, getSetItemFn } = createItemsContext('timeline'); + +export { getItems, getSetItemFn }; +export * from '@utils/createItemsContext'; diff --git a/frontend/antd/tabs/gradio.config.js b/frontend/antd/tabs/gradio.config.js new file mode 100644 index 00000000..916857c0 --- /dev/null +++ b/frontend/antd/tabs/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/tabs/item/Index.svelte b/frontend/antd/tabs/item/Index.svelte new file mode 100644 index 00000000..ba5c199c --- /dev/null +++ b/frontend/antd/tabs/item/Index.svelte @@ -0,0 +1,82 @@ + + + + +{#if $mergedProps.visible} + + + +{/if} + + diff --git a/frontend/antd/tabs/item/gradio.config.js b/frontend/antd/tabs/item/gradio.config.js new file mode 100644 index 00000000..1992403d --- /dev/null +++ b/frontend/antd/tabs/item/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/tabs/item/package.json b/frontend/antd/tabs/item/package.json new file mode 100644 index 00000000..c054777c --- /dev/null +++ b/frontend/antd/tabs/item/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-tabs.item", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/tabs/package.json b/frontend/antd/tabs/package.json new file mode 100644 index 00000000..cd2ec069 --- /dev/null +++ b/frontend/antd/tabs/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-tabs", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/tabs/tabs.tsx b/frontend/antd/tabs/tabs.tsx new file mode 100644 index 00000000..1c07c317 --- /dev/null +++ b/frontend/antd/tabs/tabs.tsx @@ -0,0 +1,106 @@ +import { sveltify } from '@svelte-preprocess-react'; +import { ReactSlot } from '@svelte-preprocess-react/react-slot'; +import React, { useMemo } from 'react'; +import { useFunction } from '@utils/hooks/useFunction'; +import { omitUndefinedProps } from '@utils/omitUndefinedProps'; +import { renderItems } from '@utils/renderItems'; +import { type GetProps, Tabs as ATabs } from 'antd'; + +import { type Item } from './context'; + +export const Tabs = sveltify< + GetProps & { + slotItems: Item[]; + onValueChange: (activeKey: string) => void; + }, + [ + 'addIcon', + 'removeIcon', + 'tabBarExtraContent', + 'tabBarExtraContent.left', + 'tabBarExtraContent.right', + 'more.icon', + ] +>( + ({ + slots, + indicator, + items, + onChange, + onValueChange, + slotItems, + more, + children, + ...props + }) => { + const indicatorSizeFunction = useFunction(indicator?.size); + const getMorePopupContainerFunction = useFunction(more?.getPopupContainer); + return ( + <> +
{children}
+ { + return ( + items || + renderItems['items']>[number]>( + slotItems + ) + ); + }, [items, slotItems])} + more={omitUndefinedProps({ + ...(more || {}), + getPopupContainer: + getMorePopupContainerFunction || more?.getPopupContainer, + icon: slots['more.icon'] ? ( + + ) : ( + more?.icon + ), + })} + tabBarExtraContent={ + slots['tabBarExtraContent'] ? ( + + ) : slots['tabBarExtraContent.left'] || + slots['tabBarExtraContent.right'] ? ( + { + left: slots['tabBarExtraContent.left'] ? ( + + ) : undefined, + right: slots['tabBarExtraContent.right'] ? ( + + ) : undefined, + } + ) : ( + props.tabBarExtraContent + ) + } + addIcon={ + slots.addIcon ? : props.addIcon + } + removeIcon={ + slots.removeIcon ? ( + + ) : ( + props.removeIcon + ) + } + onChange={(activeKey) => { + onChange?.(activeKey); + onValueChange(activeKey); + }} + /> + + ); + } +); + +export default Tabs; diff --git a/frontend/antd/tag/Index.svelte b/frontend/antd/tag/Index.svelte new file mode 100644 index 00000000..ef6da7ae --- /dev/null +++ b/frontend/antd/tag/Index.svelte @@ -0,0 +1,80 @@ + + + + + +{#if $mergedProps.visible} + {#await AwaitedTag then Tag} + + {#if $mergedProps._internal.layout} + + {:else} + {$mergedProps.value} + {/if} + + {/await} +{/if} + + diff --git a/frontend/antd/tag/checkable-tag/Index.svelte b/frontend/antd/tag/checkable-tag/Index.svelte new file mode 100644 index 00000000..432603bb --- /dev/null +++ b/frontend/antd/tag/checkable-tag/Index.svelte @@ -0,0 +1,89 @@ + + + + + +{#if $mergedProps.visible} + {#await AwaitedCheckableTag then CheckableTag} + { + value = checked; + }} + > + {#if $mergedProps._internal.layout} + + {:else} + {$mergedProps.label} + {/if} + + {/await} +{/if} + + diff --git a/frontend/antd/tag/checkable-tag/gradio.config.js b/frontend/antd/tag/checkable-tag/gradio.config.js new file mode 100644 index 00000000..1992403d --- /dev/null +++ b/frontend/antd/tag/checkable-tag/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/tag/checkable-tag/package.json b/frontend/antd/tag/checkable-tag/package.json new file mode 100644 index 00000000..20d61835 --- /dev/null +++ b/frontend/antd/tag/checkable-tag/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-tag-checkable-tag", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/tag/checkable-tag/tag.checkable-tag.tsx b/frontend/antd/tag/checkable-tag/tag.checkable-tag.tsx new file mode 100644 index 00000000..3410949c --- /dev/null +++ b/frontend/antd/tag/checkable-tag/tag.checkable-tag.tsx @@ -0,0 +1,21 @@ +import { sveltify } from '@svelte-preprocess-react'; +import React from 'react'; +import { type GetProps, Tag as ATag } from 'antd'; + +export const CheckableTag = sveltify< + GetProps & { + onValueChange: (checked: boolean) => void; + } +>(({ onChange, onValueChange, ...props }) => { + return ( + { + onChange?.(v); + onValueChange(v); + }} + /> + ); +}); + +export default CheckableTag; diff --git a/frontend/antd/tag/gradio.config.js b/frontend/antd/tag/gradio.config.js new file mode 100644 index 00000000..916857c0 --- /dev/null +++ b/frontend/antd/tag/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/tag/package.json b/frontend/antd/tag/package.json new file mode 100644 index 00000000..67affbdb --- /dev/null +++ b/frontend/antd/tag/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-tag", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/tag/tag.tsx b/frontend/antd/tag/tag.tsx new file mode 100644 index 00000000..685e4667 --- /dev/null +++ b/frontend/antd/tag/tag.tsx @@ -0,0 +1,24 @@ +import { sveltify } from '@svelte-preprocess-react'; +import { ReactSlot } from '@svelte-preprocess-react/react-slot'; +import React from 'react'; +import { type GetProps, Tag as ATag } from 'antd'; + +export const Tag = sveltify, ['closeIcon', 'icon']>( + ({ slots, ...props }) => { + return ( + : props.icon} + closeIcon={ + slots.closeIcon ? ( + + ) : ( + props.closeIcon + ) + } + /> + ); + } +); + +export default Tag; diff --git a/frontend/antd/time-picker/Index.svelte b/frontend/antd/time-picker/Index.svelte new file mode 100644 index 00000000..467a6272 --- /dev/null +++ b/frontend/antd/time-picker/Index.svelte @@ -0,0 +1,75 @@ + + + + +{#if $mergedProps.visible} + {#await AwaitedTimePicker then TimePicker} + { + value = val; + }} + > + + + {/await} +{/if} diff --git a/frontend/antd/time-picker/gradio.config.js b/frontend/antd/time-picker/gradio.config.js new file mode 100644 index 00000000..916857c0 --- /dev/null +++ b/frontend/antd/time-picker/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/time-picker/package.json b/frontend/antd/time-picker/package.json new file mode 100644 index 00000000..a54cc68f --- /dev/null +++ b/frontend/antd/time-picker/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-time-picker", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/time-picker/range-picker/Index.svelte b/frontend/antd/time-picker/range-picker/Index.svelte new file mode 100644 index 00000000..ede1defa --- /dev/null +++ b/frontend/antd/time-picker/range-picker/Index.svelte @@ -0,0 +1,80 @@ + + + + +{#if $mergedProps.visible} + {#await AwaitedTimePickerRangePicker then TimeRangePicker} + { + value = val; + }} + > + + + {/await} +{/if} diff --git a/frontend/antd/time-picker/range-picker/gradio.config.js b/frontend/antd/time-picker/range-picker/gradio.config.js new file mode 100644 index 00000000..1992403d --- /dev/null +++ b/frontend/antd/time-picker/range-picker/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/time-picker/range-picker/package.json b/frontend/antd/time-picker/range-picker/package.json new file mode 100644 index 00000000..b084e010 --- /dev/null +++ b/frontend/antd/time-picker/range-picker/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-time-picker.range-picker", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/time-picker/range-picker/time-picker.range-picker.tsx b/frontend/antd/time-picker/range-picker/time-picker.range-picker.tsx new file mode 100644 index 00000000..8244417f --- /dev/null +++ b/frontend/antd/time-picker/range-picker/time-picker.range-picker.tsx @@ -0,0 +1,199 @@ +import { sveltify } from '@svelte-preprocess-react'; +import { ReactSlot } from '@svelte-preprocess-react/react-slot'; +import { useMemo } from 'react'; +import { useFunction } from '@utils/hooks/useFunction'; +import { type GetProps, TimePicker as ATimePicker } from 'antd'; +import dayjs from 'dayjs'; + +type RangePickerProps = GetProps; + +function formatDayjs(date: any) { + if (typeof date === 'number') { + return dayjs(date * 1000); + } + return dayjs(date); +} + +function formatDates( + dates: [dayjs.Dayjs | null | undefined, dayjs.Dayjs | null | undefined] | null +): [number | null, number | null] { + return (dates?.map((date) => { + return date ? date.valueOf() / 1000 : null; + }) || [null, null]) as [number | null, number | null]; +} + +export const TimeRangePicker = sveltify< + Omit & { + onChange?: (dates: [number | null, number | null], ...args: any[]) => void; + onPanelChange?: ( + dates: [number | null, number | null], + ...args: any[] + ) => void; + onCalendarChange?: ( + dates: [number | null, number | null], + ...args: any[] + ) => void; + onValueChange: (dates: [number | null, number | null]) => void; + }, + [ + 'allowClear.clearIcon', + 'prevIcon', + 'nextIcon', + 'suffixIcon', + 'superNextIcon', + 'superPrevIcon', + 'renderExtraFooter', + 'separator', + ] +>( + ({ + slots, + disabledDate, + disabledTime, + value, + defaultValue, + defaultPickerValue, + pickerValue, + onChange, + minDate, + maxDate, + cellRender, + panelRender, + getPopupContainer, + onValueChange, + onPanelChange, + onCalendarChange, + children, + elRef, + ...props + }) => { + const disabledDateFunction = useFunction(disabledDate); + const getPopupContainerFunction = useFunction(getPopupContainer); + const cellRenderFunction = useFunction(cellRender); + const panelRenderFunction = useFunction(panelRender); + const disabledTimeFunction = useFunction(disabledTime); + const validValue = useMemo(() => { + return value?.map((v) => formatDayjs(v)) as RangePickerProps['value']; + }, [value]); + + const validDefaultValue = useMemo(() => { + return defaultValue?.map((v) => + formatDayjs(v) + ) as RangePickerProps['defaultValue']; + }, [defaultValue]); + const validDefaultPickerValue = useMemo(() => { + if (Array.isArray(defaultPickerValue)) { + return defaultPickerValue.map((v) => + formatDayjs(v) + ) as RangePickerProps['defaultPickerValue']; + } + return defaultPickerValue ? formatDayjs(defaultPickerValue) : undefined; + }, [defaultPickerValue]); + const validPickerValue = useMemo(() => { + if (Array.isArray(pickerValue)) { + return pickerValue.map((v) => + formatDayjs(v) + ) as RangePickerProps['pickerValue']; + } + return pickerValue ? formatDayjs(pickerValue) : undefined; + }, [pickerValue]); + const validMinDate = useMemo(() => { + return minDate ? formatDayjs(minDate) : undefined; + }, [minDate]); + const validMaxDate = useMemo(() => { + return maxDate ? formatDayjs(maxDate) : undefined; + }, [maxDate]); + return ( + <> +
{children}
+ { + const formattedDates = formatDates(dates); + onPanelChange?.(formattedDates, ...args); + }} + onChange={(dates, ...args) => { + const formattedDates = formatDates(dates); + onChange?.(formattedDates, ...args); + onValueChange(formattedDates); + }} + onCalendarChange={(dates, ...args) => { + const formattedDates = formatDates(dates); + onCalendarChange?.(formattedDates, ...args); + }} + renderExtraFooter={ + slots.renderExtraFooter + ? () => + slots.renderExtraFooter ? ( + + ) : null + : props.renderExtraFooter + } + prevIcon={ + slots.prevIcon ? ( + + ) : ( + props.prevIcon + ) + } + nextIcon={ + slots.nextIcon ? ( + + ) : ( + props.nextIcon + ) + } + suffixIcon={ + slots.suffixIcon ? ( + + ) : ( + props.suffixIcon + ) + } + superNextIcon={ + slots.superNextIcon ? ( + + ) : ( + props.superNextIcon + ) + } + superPrevIcon={ + slots.superPrevIcon ? ( + + ) : ( + props.superPrevIcon + ) + } + allowClear={ + slots['allowClear.clearIcon'] + ? { + clearIcon: , + } + : props.allowClear + } + separator={ + slots.separator ? ( + + ) : ( + props.separator + ) + } + /> + + ); + } +); + +export default TimeRangePicker; diff --git a/frontend/antd/time-picker/time-picker.tsx b/frontend/antd/time-picker/time-picker.tsx new file mode 100644 index 00000000..e6237c5c --- /dev/null +++ b/frontend/antd/time-picker/time-picker.tsx @@ -0,0 +1,187 @@ +import { sveltify } from '@svelte-preprocess-react'; +import { ReactSlot } from '@svelte-preprocess-react/react-slot'; +import { useMemo } from 'react'; +import { useFunction } from '@utils/hooks/useFunction'; +import { type GetProps, TimePicker as ATimePicker } from 'antd'; +import dayjs from 'dayjs'; + +type TimePickerProps = GetProps; + +function formatDayjs(date: any): dayjs.Dayjs { + if (Array.isArray(date)) { + return date.map((d) => { + return formatDayjs(d) as dayjs.Dayjs; + }) as unknown as dayjs.Dayjs; + } + if (typeof date === 'number') { + return dayjs(date * 1000); + } + return dayjs(date); +} + +function formatDate(dates: (dayjs.Dayjs | null | undefined)[] | dayjs.Dayjs) { + if (Array.isArray(dates)) { + return dates.map((date) => { + return date ? date.valueOf() / 1000 : null; + }); + } + if (typeof dates === 'object' && dates !== null) { + return dates.valueOf() / 1000; + } + return dates; +} + +export const TimePicker = sveltify< + Omit & { + onChange?: (date: ReturnType, ...args: any[]) => void; + onPanelChange?: ( + date: ReturnType, + ...args: any[] + ) => void; + onCalendarChange?: ( + date: ReturnType, + ...args: any[] + ) => void; + onValueChange: (date: number | string) => void; + }, + [ + 'allowClear.clearIcon', + 'prevIcon', + 'nextIcon', + 'suffixIcon', + 'superNextIcon', + 'superPrevIcon', + 'renderExtraFooter', + ] +>( + ({ + slots, + disabledDate, + disabledTime, + value, + defaultValue, + defaultPickerValue, + pickerValue, + onChange, + minDate, + maxDate, + cellRender, + panelRender, + getPopupContainer, + onValueChange, + onPanelChange, + onCalendarChange, + children, + elRef, + ...props + }) => { + const disabledDateFunction = useFunction(disabledDate); + const disabledTimeFunction = useFunction(disabledTime); + const getPopupContainerFunction = useFunction(getPopupContainer); + const cellRenderFunction = useFunction(cellRender); + const panelRenderFunction = useFunction(panelRender); + const validValue = useMemo(() => { + return value ? formatDayjs(value) : undefined; + }, [value]); + const validDefaultValue = useMemo(() => { + return defaultValue ? formatDayjs(defaultValue) : undefined; + }, [defaultValue]); + const validDefaultPickerValue = useMemo(() => { + return defaultPickerValue ? formatDayjs(defaultPickerValue) : undefined; + }, [defaultPickerValue]); + const validPickerValue = useMemo(() => { + return pickerValue ? formatDayjs(pickerValue) : undefined; + }, [pickerValue]); + const validMinDate = useMemo(() => { + return minDate ? formatDayjs(minDate) : undefined; + }, [minDate]); + const validMaxDate = useMemo(() => { + return maxDate ? formatDayjs(maxDate) : undefined; + }, [maxDate]); + return ( + <> +
{children}
+ { + const formattedDates = formatDate(date); + onPanelChange?.(formattedDates, ...args); + }} + onChange={(date, ...args) => { + const formattedDate = formatDate(date); + onChange?.(formattedDate, ...args); + onValueChange(formattedDate as number); + }} + onCalendarChange={(date, ...args) => { + const formattedDate = formatDate(date); + onCalendarChange?.(formattedDate, ...args); + }} + renderExtraFooter={ + slots.renderExtraFooter + ? () => + slots.renderExtraFooter ? ( + + ) : null + : props.renderExtraFooter + } + prevIcon={ + slots.prevIcon ? ( + + ) : ( + props.prevIcon + ) + } + nextIcon={ + slots.nextIcon ? ( + + ) : ( + props.nextIcon + ) + } + suffixIcon={ + slots.suffixIcon ? ( + + ) : ( + props.suffixIcon + ) + } + superNextIcon={ + slots.superNextIcon ? ( + + ) : ( + props.superNextIcon + ) + } + superPrevIcon={ + slots.superPrevIcon ? ( + + ) : ( + props.superPrevIcon + ) + } + allowClear={ + slots['allowClear.clearIcon'] + ? { + clearIcon: , + } + : props.allowClear + } + /> + + ); + } +); + +export default TimePicker; diff --git a/frontend/antd/timeline/Index.svelte b/frontend/antd/timeline/Index.svelte new file mode 100644 index 00000000..2b5e5f33 --- /dev/null +++ b/frontend/antd/timeline/Index.svelte @@ -0,0 +1,73 @@ + + + + + +{#if $mergedProps.visible} + {#await AwaitedTimeline then Timeline} + 0 ? $items : $children} + > + + + {/await} +{/if} + + diff --git a/frontend/antd/timeline/context.ts b/frontend/antd/timeline/context.ts new file mode 100644 index 00000000..f1924a05 --- /dev/null +++ b/frontend/antd/timeline/context.ts @@ -0,0 +1,6 @@ +import { createItemsContext } from '@utils/createItemsContext'; + +const { getItems, getSetItemFn } = createItemsContext('timeline'); + +export { getItems, getSetItemFn }; +export * from '@utils/createItemsContext'; diff --git a/frontend/antd/timeline/gradio.config.js b/frontend/antd/timeline/gradio.config.js new file mode 100644 index 00000000..916857c0 --- /dev/null +++ b/frontend/antd/timeline/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/timeline/item/Index.svelte b/frontend/antd/timeline/item/Index.svelte new file mode 100644 index 00000000..a219b00b --- /dev/null +++ b/frontend/antd/timeline/item/Index.svelte @@ -0,0 +1,82 @@ + + + + +{#if $mergedProps.visible} + + + +{/if} + + diff --git a/frontend/antd/timeline/item/gradio.config.js b/frontend/antd/timeline/item/gradio.config.js new file mode 100644 index 00000000..1992403d --- /dev/null +++ b/frontend/antd/timeline/item/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/timeline/item/package.json b/frontend/antd/timeline/item/package.json new file mode 100644 index 00000000..57cf9b6b --- /dev/null +++ b/frontend/antd/timeline/item/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-timeline.item", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/timeline/package.json b/frontend/antd/timeline/package.json new file mode 100644 index 00000000..4cba30aa --- /dev/null +++ b/frontend/antd/timeline/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-timeline", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/timeline/timeline.tsx b/frontend/antd/timeline/timeline.tsx new file mode 100644 index 00000000..16b7664d --- /dev/null +++ b/frontend/antd/timeline/timeline.tsx @@ -0,0 +1,43 @@ +import { sveltify } from '@svelte-preprocess-react'; +import { ReactSlot } from '@svelte-preprocess-react/react-slot'; +import React, { useMemo } from 'react'; +import { renderItems } from '@utils/renderItems'; +import { type GetProps, Timeline as ATimeline } from 'antd'; + +import { type Item } from './context'; + +export const Timeline = sveltify< + GetProps & { + slotItems: Item[]; + }, + ['pending', 'pendingDot'] +>(({ slots, items, slotItems, children, ...props }) => { + return ( + <> +
{children}
+ { + return ( + items || + renderItems< + NonNullable['items']>[number] + >(slotItems) + ); + }, [items, slotItems])} + pending={ + slots.pending ? : props.pending + } + pendingDot={ + slots.pendingDot ? ( + + ) : ( + props.pendingDot + ) + } + /> + + ); +}); + +export default Timeline; diff --git a/frontend/antd/tooltip/Index.svelte b/frontend/antd/tooltip/Index.svelte new file mode 100644 index 00000000..c4d291de --- /dev/null +++ b/frontend/antd/tooltip/Index.svelte @@ -0,0 +1,72 @@ + + + + +{#if $mergedProps.visible} + {#await AwaitedTooltip then Tooltip} + + + + {/await} +{/if} + + diff --git a/frontend/antd/tooltip/gradio.config.js b/frontend/antd/tooltip/gradio.config.js new file mode 100644 index 00000000..916857c0 --- /dev/null +++ b/frontend/antd/tooltip/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/tooltip/package.json b/frontend/antd/tooltip/package.json new file mode 100644 index 00000000..9513a022 --- /dev/null +++ b/frontend/antd/tooltip/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-tooltip", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/tooltip/tooltip.tsx b/frontend/antd/tooltip/tooltip.tsx new file mode 100644 index 00000000..b06d47b6 --- /dev/null +++ b/frontend/antd/tooltip/tooltip.tsx @@ -0,0 +1,26 @@ +import { sveltify } from '@svelte-preprocess-react'; +import { ReactSlot } from '@svelte-preprocess-react/react-slot'; +import React from 'react'; +import { useFunction } from '@utils/hooks/useFunction'; +import { type GetProps, Tooltip as ATooltip } from 'antd'; + +export const Tooltip = sveltify, ['title']>( + ({ slots, afterOpenChange, getPopupContainer, children, ...props }) => { + const afterOpenChangeFunction = useFunction(afterOpenChange); + const getPopupContainerFunction = useFunction(getPopupContainer); + return ( + <> + : props.title} + > + {children} + + + ); + } +); + +export default Tooltip; diff --git a/frontend/antd/tour/Index.svelte b/frontend/antd/tour/Index.svelte new file mode 100644 index 00000000..51adcf2f --- /dev/null +++ b/frontend/antd/tour/Index.svelte @@ -0,0 +1,84 @@ + + + + + +{#if $mergedProps.visible} + {#await AwaitedTour then Tour} + 0 ? $steps : $children} + onValueChange={(options) => { + value = options.current; + open = options.open; + }} + > + + + {/await} +{/if} + + diff --git a/frontend/antd/tour/context.ts b/frontend/antd/tour/context.ts new file mode 100644 index 00000000..1e3b613e --- /dev/null +++ b/frontend/antd/tour/context.ts @@ -0,0 +1,6 @@ +import { createItemsContext } from '@utils/createItemsContext'; + +const { getItems, getSetItemFn } = createItemsContext('tour'); + +export { getItems, getSetItemFn }; +export * from '@utils/createItemsContext'; diff --git a/frontend/antd/tour/gradio.config.js b/frontend/antd/tour/gradio.config.js new file mode 100644 index 00000000..916857c0 --- /dev/null +++ b/frontend/antd/tour/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/tour/package.json b/frontend/antd/tour/package.json new file mode 100644 index 00000000..a600928d --- /dev/null +++ b/frontend/antd/tour/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-tour", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/tour/step/Index.svelte b/frontend/antd/tour/step/Index.svelte new file mode 100644 index 00000000..41ea0bdd --- /dev/null +++ b/frontend/antd/tour/step/Index.svelte @@ -0,0 +1,75 @@ + + + + +{#if $mergedProps.visible} + +{/if} + + diff --git a/frontend/antd/tour/step/gradio.config.js b/frontend/antd/tour/step/gradio.config.js new file mode 100644 index 00000000..1992403d --- /dev/null +++ b/frontend/antd/tour/step/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/tour/step/package.json b/frontend/antd/tour/step/package.json new file mode 100644 index 00000000..265c1054 --- /dev/null +++ b/frontend/antd/tour/step/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-tour.step", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/tour/tour.tsx b/frontend/antd/tour/tour.tsx new file mode 100644 index 00000000..e22ff2d0 --- /dev/null +++ b/frontend/antd/tour/tour.tsx @@ -0,0 +1,71 @@ +import { sveltify } from '@svelte-preprocess-react'; +import { ReactSlot } from '@svelte-preprocess-react/react-slot'; +import React, { useMemo } from 'react'; +import { useFunction } from '@utils/hooks/useFunction'; +import { renderItems } from '@utils/renderItems'; +import { type GetProps, Tour as ATour } from 'antd'; + +import { type Item } from './context'; + +export const Tour = sveltify< + GetProps & { + slotItems: Item[]; + children?: React.ReactNode; + onValueChange: (options: { current: number; open: boolean }) => void; + }, + ['closeIcon'] +>( + ({ + slots, + steps, + slotItems, + children, + onChange, + onClose, + onValueChange, + getPopupContainer, + ...props + }) => { + const getPopupContainerFunction = useFunction(getPopupContainer); + return ( + <> +
{children}
+ { + return ( + steps || + renderItems['steps']>[number]>( + slotItems + ) + ); + }, [steps, slotItems])} + onChange={(current) => { + onChange?.(current); + onValueChange({ + open: true, + current: current, + }); + }} + closeIcon={ + slots.closeIcon ? ( + + ) : ( + props.closeIcon + ) + } + getPopupContainer={getPopupContainerFunction} + onClose={(current, ...args) => { + onClose?.(current, ...args); + onValueChange({ + current, + open: false, + }); + }} + /> + + ); + } +); + +export default Tour; diff --git a/frontend/antd/transfer/Index.svelte b/frontend/antd/transfer/Index.svelte new file mode 100644 index 00000000..6c938284 --- /dev/null +++ b/frontend/antd/transfer/Index.svelte @@ -0,0 +1,76 @@ + + + + + +{#if $mergedProps.visible} + {#await AwaitedTransfer then Transfer} + { + value = v; + }} + > + + + {/await} +{/if} + + diff --git a/frontend/antd/transfer/gradio.config.js b/frontend/antd/transfer/gradio.config.js new file mode 100644 index 00000000..916857c0 --- /dev/null +++ b/frontend/antd/transfer/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/transfer/package.json b/frontend/antd/transfer/package.json new file mode 100644 index 00000000..61ae9896 --- /dev/null +++ b/frontend/antd/transfer/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-transfer", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/transfer/transfer.tsx b/frontend/antd/transfer/transfer.tsx new file mode 100644 index 00000000..a2188588 --- /dev/null +++ b/frontend/antd/transfer/transfer.tsx @@ -0,0 +1,99 @@ +import { sveltify } from '@svelte-preprocess-react'; +import { ReactSlot } from '@svelte-preprocess-react/react-slot'; +import React from 'react'; +import { useFunction } from '@utils/hooks/useFunction'; +import { useTargets } from '@utils/hooks/useTargets'; +import { type GetProps, Transfer as ATransfer } from 'antd'; + +export const Transfer = sveltify< + GetProps & { + children?: React.ReactNode; + onValueChange: (value: (string | number)[]) => void; + }, + [ + 'selectionsIcon', + 'titles', + 'footer', + 'locale.notFoundContent', + 'selectAllLabels', + ] +>( + ({ + slots, + children, + render, + filterOption, + footer, + listStyle, + locale, + onChange, + onValueChange, + ...props + }) => { + const titles = useTargets(children, 'titles'); + const selectAllLabels = useTargets(children, 'selectAllLabels'); + const renderFunction = useFunction(render); + const listStyleFunction = useFunction(listStyle); + const footerFunction = useFunction(footer); + const filterOptionFunction = useFunction(filterOption); + return ( + <> +
{children}
+ { + onChange?.(targetKeys, ...args); + onValueChange(targetKeys as (string | number)[]); + }} + selectionsIcon={ + slots.selectionsIcon ? ( + + ) : ( + props.selectionsIcon + ) + } + locale={ + slots['locale.notFoundContent'] + ? { + ...locale, + notFoundContent: ( + + ), + } + : locale + } + render={ + renderFunction || + ((item) => ({ + label: item.title || item.label, + value: item.value || item.title || item.label, + })) + } + filterOption={filterOptionFunction} + footer={ + footerFunction || + (slots.footer + ? () => (slots.footer ? : null) + : footer) + } + titles={ + titles.length > 0 + ? titles.map((target, index) => { + return ; + }) + : props.titles + } + listStyle={listStyleFunction || listStyle} + selectAllLabels={ + selectAllLabels.length > 0 + ? selectAllLabels.map((target, index) => { + return ; + }) + : props.selectAllLabels + } + /> + + ); + } +); +export default Transfer; diff --git a/frontend/antd/tree-select/Index.svelte b/frontend/antd/tree-select/Index.svelte new file mode 100644 index 00000000..54dd0cb6 --- /dev/null +++ b/frontend/antd/tree-select/Index.svelte @@ -0,0 +1,79 @@ + + + + + +{#if $mergedProps.visible} + {#await AwaitedTreeSelect then TreeSelect} + { + value = val; + }} + > + + + {/await} +{/if} + + diff --git a/frontend/antd/tree-select/context.ts b/frontend/antd/tree-select/context.ts new file mode 100644 index 00000000..6f0734d6 --- /dev/null +++ b/frontend/antd/tree-select/context.ts @@ -0,0 +1,6 @@ +import { createItemsContext } from '@utils/createItemsContext'; + +const { getItems, getSetItemFn } = createItemsContext('tree-select'); + +export { getItems, getSetItemFn }; +export * from '@utils/createItemsContext'; diff --git a/frontend/antd/tree-select/gradio.config.js b/frontend/antd/tree-select/gradio.config.js new file mode 100644 index 00000000..916857c0 --- /dev/null +++ b/frontend/antd/tree-select/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/tree-select/package.json b/frontend/antd/tree-select/package.json new file mode 100644 index 00000000..d55ff517 --- /dev/null +++ b/frontend/antd/tree-select/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-tree-select", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/tree-select/tree-node/Index.svelte b/frontend/antd/tree-select/tree-node/Index.svelte new file mode 100644 index 00000000..03f7432d --- /dev/null +++ b/frontend/antd/tree-select/tree-node/Index.svelte @@ -0,0 +1,87 @@ + + + + +{#if $mergedProps.visible} + +{/if} + + diff --git a/frontend/antd/tree-select/tree-node/gradio.config.js b/frontend/antd/tree-select/tree-node/gradio.config.js new file mode 100644 index 00000000..1992403d --- /dev/null +++ b/frontend/antd/tree-select/tree-node/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/tree-select/tree-node/package.json b/frontend/antd/tree-select/tree-node/package.json new file mode 100644 index 00000000..7da27141 --- /dev/null +++ b/frontend/antd/tree-select/tree-node/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-tree-select.tree-node", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/tree-select/tree-select.tsx b/frontend/antd/tree-select/tree-select.tsx new file mode 100644 index 00000000..703e16c3 --- /dev/null +++ b/frontend/antd/tree-select/tree-select.tsx @@ -0,0 +1,119 @@ +import { sveltify } from '@svelte-preprocess-react'; +import { ReactSlot } from '@svelte-preprocess-react/react-slot'; +import React, { useMemo } from 'react'; +import { useFunction } from '@utils/hooks/useFunction'; +import { omitUndefinedProps } from '@utils/omitUndefinedProps'; +import { renderItems } from '@utils/renderItems'; +import { type GetProps, TreeSelect as ATreeSelect } from 'antd'; + +import { type Item } from './context'; + +type TreeSelectProps = GetProps; + +export const TreeSelect = sveltify< + TreeSelectProps & { + slotItems: Item[]; + onValueChange: (options: string | string[]) => void; + }, + [ + 'allowClear.clearIcon', + 'maxTagPlaceholder', + 'notFoundContent', + 'suffixIcon', + 'switcherIcon', + ] +>( + ({ + slots, + filterTreeNode, + getPopupContainer, + dropdownRender, + tagRender, + treeTitleRender, + treeData, + onValueChange, + onChange, + children, + slotItems, + maxTagPlaceholder, + elRef, + ...props + }) => { + const filterTreeNodeFunction = useFunction(filterTreeNode); + const getPopupContainerFunction = useFunction(getPopupContainer); + const maxTagPlaceholderFunction = useFunction(maxTagPlaceholder); + const tagRenderFunction = useFunction(tagRender); + const dropdownRenderFunction = useFunction(dropdownRender); + const treeTitleRenderFunction = useFunction(treeTitleRender); + + const componentProps: TreeSelectProps = useMemo(() => { + return { + ...props, + treeData: + treeData || + renderItems[number]>( + slotItems + ), + dropdownRender: dropdownRenderFunction, + allowClear: slots['allowClear.clearIcon'] + ? { + clearIcon: , + } + : props.allowClear, + suffixIcon: slots.suffixIcon ? ( + + ) : ( + props.suffixIcon + ), + switcherIcon: slots.switcherIcon ? ( + + ) : ( + props.switcherIcon + ), + getPopupContainer: getPopupContainerFunction, + tagRender: tagRenderFunction, + treeTitleRender: treeTitleRenderFunction, + filterTreeNode: filterTreeNodeFunction || filterTreeNode, + maxTagPlaceholder: + maxTagPlaceholderFunction || + (slots.maxTagPlaceholder ? ( + + ) : ( + maxTagPlaceholder + )), + notFoundContent: slots.notFoundContent ? ( + + ) : ( + props.notFoundContent + ), + }; + }, [ + dropdownRenderFunction, + filterTreeNode, + filterTreeNodeFunction, + getPopupContainerFunction, + maxTagPlaceholder, + maxTagPlaceholderFunction, + props, + slotItems, + slots, + tagRenderFunction, + treeData, + treeTitleRenderFunction, + ]); + return ( + <> +
{children}
+ { + onChange?.(v, ...args); + onValueChange(v as string | string[]); + }} + /> + + ); + } +); +export default TreeSelect; diff --git a/frontend/antd/tree/Index.svelte b/frontend/antd/tree/Index.svelte new file mode 100644 index 00000000..6bf7c5a6 --- /dev/null +++ b/frontend/antd/tree/Index.svelte @@ -0,0 +1,95 @@ + + + + + +{#if $mergedProps.visible} + {#await AwaitedTree then Tree} + + + + {/await} +{/if} + + diff --git a/frontend/antd/tree/context.ts b/frontend/antd/tree/context.ts new file mode 100644 index 00000000..1a18e5f6 --- /dev/null +++ b/frontend/antd/tree/context.ts @@ -0,0 +1,6 @@ +import { createItemsContext } from '@utils/createItemsContext'; + +const { getItems, getSetItemFn } = createItemsContext('tree'); + +export { getItems, getSetItemFn }; +export * from '@utils/createItemsContext'; diff --git a/frontend/antd/tree/directory-tree/Index.svelte b/frontend/antd/tree/directory-tree/Index.svelte new file mode 100644 index 00000000..7726fdbd --- /dev/null +++ b/frontend/antd/tree/directory-tree/Index.svelte @@ -0,0 +1,96 @@ + + + + + +{#if $mergedProps.visible} + {#await AwaitedDirectoryTree then DirectoryTree} + + + + {/await} +{/if} + + diff --git a/frontend/antd/tree/directory-tree/gradio.config.js b/frontend/antd/tree/directory-tree/gradio.config.js new file mode 100644 index 00000000..1992403d --- /dev/null +++ b/frontend/antd/tree/directory-tree/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/tree/directory-tree/package.json b/frontend/antd/tree/directory-tree/package.json new file mode 100644 index 00000000..f8d9e6fe --- /dev/null +++ b/frontend/antd/tree/directory-tree/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-tree.directory-tree", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/tree/gradio.config.js b/frontend/antd/tree/gradio.config.js new file mode 100644 index 00000000..916857c0 --- /dev/null +++ b/frontend/antd/tree/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/tree/package.json b/frontend/antd/tree/package.json new file mode 100644 index 00000000..a750487a --- /dev/null +++ b/frontend/antd/tree/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-tree", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/tree/tree-node/Index.svelte b/frontend/antd/tree/tree-node/Index.svelte new file mode 100644 index 00000000..ef97471a --- /dev/null +++ b/frontend/antd/tree/tree-node/Index.svelte @@ -0,0 +1,83 @@ + + + + +{#if $mergedProps.visible} + +{/if} + + diff --git a/frontend/antd/tree/tree-node/gradio.config.js b/frontend/antd/tree/tree-node/gradio.config.js new file mode 100644 index 00000000..1992403d --- /dev/null +++ b/frontend/antd/tree/tree-node/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/tree/tree-node/package.json b/frontend/antd/tree/tree-node/package.json new file mode 100644 index 00000000..599b30e4 --- /dev/null +++ b/frontend/antd/tree/tree-node/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-tree.tree-node", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/tree/tree.tsx b/frontend/antd/tree/tree.tsx new file mode 100644 index 00000000..f4351154 --- /dev/null +++ b/frontend/antd/tree/tree.tsx @@ -0,0 +1,134 @@ +import { sveltify } from '@svelte-preprocess-react'; +import { ReactSlot } from '@svelte-preprocess-react/react-slot'; +import React, { useMemo } from 'react'; +import { useFunction } from '@utils/hooks/useFunction'; +import { omitUndefinedProps } from '@utils/omitUndefinedProps'; +import { renderItems } from '@utils/renderItems'; +import { type GetProps, Tree as ATree } from 'antd'; + +import { type Item } from './context'; + +type TreeProps = GetProps; + +export const Tree = sveltify< + TreeProps & { + slotItems: Item[]; + directory?: boolean; + onValueChange: (options: { + expandedKeys?: React.Key[]; + selectedKeys?: React.Key[]; + checkedKeys?: + | React.Key[] + | { checked: React.Key[]; halfChecked: React.Key[] }; + }) => void; + }, + [ + 'switcherLoadingIcon', + 'switcherIcon', + 'showLine.showLeafIcon', + 'icon', + 'draggable.icon', + ] +>( + ({ + slots, + filterTreeNode, + treeData, + draggable, + allowDrop, + onValueChange, + onCheck, + onSelect, + onExpand, + children, + directory, + slotItems, + ...props + }) => { + const filterTreeNodeFunction = useFunction(filterTreeNode); + const draggableFunction = useFunction(draggable); + const draggableNodeDraggableFunction = useFunction( + typeof draggable === 'object' ? draggable.nodeDraggable : undefined + ); + const allowDropFunction = useFunction(allowDrop); + const TreeComponent = directory ? ATree.DirectoryTree : ATree; + const componentProps = useMemo(() => { + return { + ...props, + treeData: + treeData || + renderItems[number]>(slotItems), + showLine: slots['showLine.showLeafIcon'] + ? { + showLeafIcon: , + } + : props.showLine, + icon: slots.icon ? : props.icon, + switcherLoadingIcon: slots.switcherLoadingIcon ? ( + + ) : ( + props.switcherLoadingIcon + ), + switcherIcon: slots.switcherIcon ? ( + + ) : ( + props.switcherIcon + ), + draggable: + slots['draggable.icon'] || draggableNodeDraggableFunction + ? { + icon: slots['draggable.icon'] ? ( + + ) : typeof draggable === 'object' ? ( + draggable.icon + ) : undefined, + nodeDraggable: draggableNodeDraggableFunction, + } + : draggableFunction || draggable, + }; + }, [ + draggable, + draggableFunction, + draggableNodeDraggableFunction, + props, + slotItems, + slots, + treeData, + ]); + return ( + <> +
{children}
+ { + onSelect?.(selected, ...args); + onValueChange({ + selectedKeys: selected, + expandedKeys: props.expandedKeys, + checkedKeys: props.checkedKeys, + }); + }} + onExpand={(expanded, ...args) => { + onExpand?.(expanded, ...args); + onValueChange({ + expandedKeys: expanded, + selectedKeys: props.selectedKeys, + checkedKeys: props.checkedKeys, + }); + }} + onCheck={(checked, ...args) => { + onCheck?.(checked, ...args); + onValueChange({ + checkedKeys: checked, + selectedKeys: props.selectedKeys, + expandedKeys: props.expandedKeys, + }); + }} + /> + + ); + } +); +export default Tree; diff --git a/frontend/antd/typography/Base.svelte b/frontend/antd/typography/Base.svelte new file mode 100644 index 00000000..f728f140 --- /dev/null +++ b/frontend/antd/typography/Base.svelte @@ -0,0 +1,81 @@ + + + + + +{#if $mergedProps.visible} + {#await AwaitedTypographyBase then TypographyBase} + + {#if $mergedProps._internal.layout} + + {:else} + {$mergedProps.value} + {/if} + + {/await} +{/if} + + diff --git a/frontend/antd/typography/link/Index.svelte b/frontend/antd/typography/link/Index.svelte new file mode 100644 index 00000000..aa30731f --- /dev/null +++ b/frontend/antd/typography/link/Index.svelte @@ -0,0 +1,12 @@ + + + + + + + diff --git a/frontend/antd/typography/link/gradio.config.js b/frontend/antd/typography/link/gradio.config.js new file mode 100644 index 00000000..1992403d --- /dev/null +++ b/frontend/antd/typography/link/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/typography/link/package.json b/frontend/antd/typography/link/package.json new file mode 100644 index 00000000..47a8971d --- /dev/null +++ b/frontend/antd/typography/link/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-typography.link", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/typography/paragraph/Index.svelte b/frontend/antd/typography/paragraph/Index.svelte new file mode 100644 index 00000000..ea4edc6e --- /dev/null +++ b/frontend/antd/typography/paragraph/Index.svelte @@ -0,0 +1,12 @@ + + + + + + + diff --git a/frontend/antd/typography/paragraph/gradio.config.js b/frontend/antd/typography/paragraph/gradio.config.js new file mode 100644 index 00000000..1992403d --- /dev/null +++ b/frontend/antd/typography/paragraph/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/typography/paragraph/package.json b/frontend/antd/typography/paragraph/package.json new file mode 100644 index 00000000..3c201f96 --- /dev/null +++ b/frontend/antd/typography/paragraph/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-typography.paragraph", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/typography/text/Index.svelte b/frontend/antd/typography/text/Index.svelte new file mode 100644 index 00000000..3877ea92 --- /dev/null +++ b/frontend/antd/typography/text/Index.svelte @@ -0,0 +1,12 @@ + + + + + + + diff --git a/frontend/antd/typography/text/gradio.config.js b/frontend/antd/typography/text/gradio.config.js new file mode 100644 index 00000000..1992403d --- /dev/null +++ b/frontend/antd/typography/text/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/typography/text/package.json b/frontend/antd/typography/text/package.json new file mode 100644 index 00000000..6519b5d2 --- /dev/null +++ b/frontend/antd/typography/text/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-typography.text", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/typography/title/Index.svelte b/frontend/antd/typography/title/Index.svelte new file mode 100644 index 00000000..c5f2f89c --- /dev/null +++ b/frontend/antd/typography/title/Index.svelte @@ -0,0 +1,12 @@ + + + + + + + diff --git a/frontend/antd/typography/title/gradio.config.js b/frontend/antd/typography/title/gradio.config.js new file mode 100644 index 00000000..1992403d --- /dev/null +++ b/frontend/antd/typography/title/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/typography/title/package.json b/frontend/antd/typography/title/package.json new file mode 100644 index 00000000..3560b395 --- /dev/null +++ b/frontend/antd/typography/title/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-typography.title", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/typography/typography.base.tsx b/frontend/antd/typography/typography.base.tsx new file mode 100644 index 00000000..8cab0e54 --- /dev/null +++ b/frontend/antd/typography/typography.base.tsx @@ -0,0 +1,152 @@ +import { sveltify } from '@svelte-preprocess-react'; +import { ReactSlot } from '@svelte-preprocess-react/react-slot'; +import React, { useMemo } from 'react'; +import { type GetProps, Typography } from 'antd'; +import type { EllipsisConfig } from 'antd/es/typography/Base'; +import cls from 'classnames'; + +import { useTargets } from '../../utils/hooks/useTargets'; + +function getConfig(value: T): Partial> { + if (typeof value === 'object' && value !== null) { + return value as any; + } + return {} as any; +} + +export const TypographyBase = sveltify< + GetProps & + GetProps & + GetProps & + GetProps & { + component: 'title' | 'paragraph' | 'text' | 'link'; + }, + [ + 'copyable.icon', + // list + 'copyable.tooltips', + 'editable.icon', + 'editable.tooltip', + 'editable.enterIcon', + 'ellipsis.symbol', + 'ellipsis.tooltip', + 'ellipsis.tooltip.title', + ] +>( + ({ + component, + className, + slots, + children, + copyable, + editable, + ellipsis, + ...props + }) => { + const copyableTooltipsTargets = useTargets(children, 'copyable.tooltips'); + const supportCopy = + slots['copyable.icon'] || copyableTooltipsTargets.length > 0 || copyable; + const supportEdit = + slots['editable.icon'] || + slots['editable.tooltip'] || + slots['editable.enterIcon'] || + editable; + const supportEllipsis = + slots['ellipsis.symbol'] || + slots['ellipsis.tooltip'] || + slots['ellipsis.tooltip.title'] || + ellipsis; + const copyableConfig = getConfig(copyable); + const editableConfig = getConfig(editable); + const ellipsisConfig = getConfig(ellipsis); + + const TypographyComponent = useMemo(() => { + switch (component) { + case 'title': + return Typography.Title; + case 'paragraph': + return Typography.Paragraph; + case 'text': + return Typography.Text; + case 'link': + return Typography.Link; + } + }, [component]); + return ( + 0 + ? copyableTooltipsTargets.map((slot, index) => { + return ; + }) + : copyableConfig.tooltips, + icon: slots['copyable.icon'] ? ( + + ) : ( + copyableConfig.icon + ), + } + : undefined + } + editable={ + supportEdit + ? { + ...editableConfig, + icon: slots['editable.icon'] ? ( + + ) : ( + editableConfig.icon + ), + tooltip: slots['editable.tooltip'] ? ( + + ) : ( + editableConfig.tooltip + ), + enterIcon: slots['editable.enterIcon'] ? ( + + ) : ( + editableConfig.enterIcon + ), + } + : undefined + } + ellipsis={ + (component === 'link' + ? !!supportEllipsis + : supportEllipsis + ? ({ + ...ellipsisConfig, + symbol: slots['ellipsis.symbol'] ? ( + + ) : ( + ellipsisConfig.symbol + ), + tooltip: slots['ellipsis.tooltip'] ? ( + + ) : ( + { + ...ellipsisConfig.tooltip, + title: slots['ellipsis.tooltip.title'] ? ( + + ) : ( + ellipsisConfig.tooltip.title + ), + } + ), + } as EllipsisConfig) + : undefined) as boolean + } + > + {children} + + ); + } +); + +export default TypographyBase; diff --git a/frontend/antd/upload/Index.svelte b/frontend/antd/upload/Index.svelte new file mode 100644 index 00000000..465262bc --- /dev/null +++ b/frontend/antd/upload/Index.svelte @@ -0,0 +1,83 @@ + + + + + +{#if $mergedProps.visible} + {#await AwaitedUpload then Upload} + { + value = v; + }} + upload={async (files) => { + return ( + (await gradio.client.upload(await prepare_files(files), root)) || [] + ); + }} + > + + + {/await} +{/if} + + diff --git a/frontend/antd/upload/dragger/Index.svelte b/frontend/antd/upload/dragger/Index.svelte new file mode 100644 index 00000000..f315f633 --- /dev/null +++ b/frontend/antd/upload/dragger/Index.svelte @@ -0,0 +1,85 @@ + + + + + +{#if $mergedProps.visible} + {#await AwaitedUploadDragger then UploadDragger} + { + value = v; + }} + upload={async (files) => { + return ( + (await gradio.client.upload(await prepare_files(files), root)) || [] + ); + }} + > + + + {/await} +{/if} + + diff --git a/frontend/antd/upload/dragger/gradio.config.js b/frontend/antd/upload/dragger/gradio.config.js new file mode 100644 index 00000000..1992403d --- /dev/null +++ b/frontend/antd/upload/dragger/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/upload/dragger/package.json b/frontend/antd/upload/dragger/package.json new file mode 100644 index 00000000..38348199 --- /dev/null +++ b/frontend/antd/upload/dragger/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-upload.dragger", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/upload/dragger/upload.dragger.tsx b/frontend/antd/upload/dragger/upload.dragger.tsx new file mode 100644 index 00000000..95d78d70 --- /dev/null +++ b/frontend/antd/upload/dragger/upload.dragger.tsx @@ -0,0 +1,146 @@ +import { sveltify } from '@svelte-preprocess-react'; +import { ReactSlot } from '@svelte-preprocess-react/react-slot'; +import { useMemo } from 'react'; +import type { FileData } from '@gradio/client'; +import { useFunction } from '@utils/hooks/useFunction'; +import { type GetProps, Upload as AUpload } from 'antd'; + +function getConfig(value: T): Partial> { + if (typeof value === 'object' && value !== null) { + return value as any; + } + return {} as any; +} +export const UploadDragger = sveltify< + Omit, 'fileList' | 'onChange'> & { + onValueChange?: (value: FileData[]) => void; + onChange?: (value: string[]) => void; + upload: (files: File[]) => Promise<(FileData | null)[]>; + fileList: FileData[]; + }, + [ + 'showUploadList.extra', + 'showUploadList.previewIcon', + 'showUploadList.removeIcon', + 'showUploadList.downloadIcon', + ] +>( + ({ + slots, + upload, + showUploadList, + progress, + beforeUpload, + customRequest, + previewFile, + isImageUrl, + itemRender, + iconRender, + data, + onChange, + onValueChange, + onRemove, + fileList, + ...props + }) => { + const supportShowUploadListConfig = + slots['showUploadList.downloadIcon'] || + slots['showUploadList.removeIcon'] || + slots['showUploadList.previewIcon'] || + slots['showUploadList.extra'] || + typeof showUploadList === 'object'; + const showUploadListConfig = getConfig(showUploadList); + const beforeUploadFunction = useFunction(beforeUpload); + const customRequestFunction = useFunction(customRequest); + const progressFormatFunction = useFunction(progress?.format); + const previewFileFunction = useFunction(previewFile); + const isImageUrlFunction = useFunction(isImageUrl); + const itemRenderFunction = useFunction(itemRender); + const iconRenderFunction = useFunction(iconRender); + const dataFunction = useFunction(data); + const validFileList = useMemo(() => { + return ( + fileList?.map((file) => ({ + ...file, + name: file.orig_name || file.path, + uid: file.url || file.path, + status: 'done' as const, + })) || [] + ); + }, [fileList]); + return ( + { + onRemove?.(file); + const index = validFileList.findIndex((v) => v.uid === file.uid); + const newFileList = fileList.slice(); + newFileList.splice(index, 1); + onValueChange?.(newFileList); + onChange?.(newFileList.map((v) => v.path)); + }} + beforeUpload={async (file, files) => { + if (beforeUploadFunction) { + if (!(await beforeUploadFunction(file, files))) { + return false; + } + } + const fileDataList = (await upload([file])).filter( + (v) => v + ) as FileData[]; + + onValueChange?.([...fileList, ...fileDataList]); + onChange?.([ + ...fileList.map((v) => v.path), + ...fileDataList.map((v) => v.path), + ]); + return false; + }} + customRequest={customRequestFunction} + progress={ + progress + ? { + ...progress, + format: progressFormatFunction, + } + : progress + } + showUploadList={ + supportShowUploadListConfig + ? { + ...showUploadListConfig, + downloadIcon: slots['showUploadList.downloadIcon'] ? ( + + ) : ( + showUploadListConfig.downloadIcon + ), + removeIcon: slots['showUploadList.removeIcon'] ? ( + + ) : ( + showUploadListConfig.removeIcon + ), + previewIcon: slots['showUploadList.previewIcon'] ? ( + + ) : ( + showUploadListConfig.previewIcon + ), + extra: slots['showUploadList.extra'] ? ( + + ) : ( + showUploadListConfig.extra + ), + } + : showUploadList + } + /> + ); + } +); + +export default UploadDragger; diff --git a/frontend/antd/upload/gradio.config.js b/frontend/antd/upload/gradio.config.js new file mode 100644 index 00000000..916857c0 --- /dev/null +++ b/frontend/antd/upload/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/upload/package.json b/frontend/antd/upload/package.json new file mode 100644 index 00000000..3ae0e15a --- /dev/null +++ b/frontend/antd/upload/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-upload", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/upload/upload.tsx b/frontend/antd/upload/upload.tsx new file mode 100644 index 00000000..c440e942 --- /dev/null +++ b/frontend/antd/upload/upload.tsx @@ -0,0 +1,146 @@ +import { sveltify } from '@svelte-preprocess-react'; +import { ReactSlot } from '@svelte-preprocess-react/react-slot'; +import { useMemo } from 'react'; +import type { FileData } from '@gradio/client'; +import { useFunction } from '@utils/hooks/useFunction'; +import { type GetProps, Upload as AUpload } from 'antd'; + +function getConfig(value: T): Partial> { + if (typeof value === 'object' && value !== null) { + return value as any; + } + return {} as any; +} +export const Upload = sveltify< + Omit, 'fileList' | 'onChange'> & { + onValueChange?: (value: FileData[]) => void; + onChange?: (value: string[]) => void; + upload: (files: File[]) => Promise<(FileData | null)[]>; + fileList: FileData[]; + }, + [ + 'showUploadList.extra', + 'showUploadList.previewIcon', + 'showUploadList.removeIcon', + 'showUploadList.downloadIcon', + ] +>( + ({ + slots, + upload, + showUploadList, + progress, + beforeUpload, + customRequest, + previewFile, + isImageUrl, + itemRender, + iconRender, + data, + onChange, + onValueChange, + onRemove, + fileList, + ...props + }) => { + const supportShowUploadListConfig = + slots['showUploadList.downloadIcon'] || + slots['showUploadList.removeIcon'] || + slots['showUploadList.previewIcon'] || + slots['showUploadList.extra'] || + typeof showUploadList === 'object'; + const showUploadListConfig = getConfig(showUploadList); + const beforeUploadFunction = useFunction(beforeUpload); + const customRequestFunction = useFunction(customRequest); + const progressFormatFunction = useFunction(progress?.format); + const previewFileFunction = useFunction(previewFile); + const isImageUrlFunction = useFunction(isImageUrl); + const itemRenderFunction = useFunction(itemRender); + const iconRenderFunction = useFunction(iconRender); + const dataFunction = useFunction(data); + const validFileList = useMemo(() => { + return ( + fileList?.map((file) => ({ + ...file, + name: file.orig_name || file.path, + uid: file.url || file.path, + status: 'done' as const, + })) || [] + ); + }, [fileList]); + return ( + { + onRemove?.(file); + const index = validFileList.findIndex((v) => v.uid === file.uid); + const newFileList = fileList.slice(); + newFileList.splice(index, 1); + onValueChange?.(newFileList); + onChange?.(newFileList.map((v) => v.path)); + }} + beforeUpload={async (file, files) => { + if (beforeUploadFunction) { + if (!(await beforeUploadFunction(file, files))) { + return false; + } + } + const fileDataList = (await upload([file])).filter( + (v) => v + ) as FileData[]; + + onValueChange?.([...fileList, ...fileDataList]); + onChange?.([ + ...fileList.map((v) => v.path), + ...fileDataList.map((v) => v.path), + ]); + return false; + }} + customRequest={customRequestFunction} + progress={ + progress + ? { + ...progress, + format: progressFormatFunction, + } + : progress + } + showUploadList={ + supportShowUploadListConfig + ? { + ...showUploadListConfig, + downloadIcon: slots['showUploadList.downloadIcon'] ? ( + + ) : ( + showUploadListConfig.downloadIcon + ), + removeIcon: slots['showUploadList.removeIcon'] ? ( + + ) : ( + showUploadListConfig.removeIcon + ), + previewIcon: slots['showUploadList.previewIcon'] ? ( + + ) : ( + showUploadListConfig.previewIcon + ), + extra: slots['showUploadList.extra'] ? ( + + ) : ( + showUploadListConfig.extra + ), + } + : showUploadList + } + /> + ); + } +); + +export default Upload; diff --git a/frontend/antd/watermark/Index.svelte b/frontend/antd/watermark/Index.svelte new file mode 100644 index 00000000..8534c5df --- /dev/null +++ b/frontend/antd/watermark/Index.svelte @@ -0,0 +1,73 @@ + + + + + +{#if $mergedProps.visible} + {#await AwaitedWatermark then Watermark} + + + + {/await} +{/if} + + diff --git a/frontend/antd/watermark/gradio.config.js b/frontend/antd/watermark/gradio.config.js new file mode 100644 index 00000000..916857c0 --- /dev/null +++ b/frontend/antd/watermark/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/watermark/package.json b/frontend/antd/watermark/package.json new file mode 100644 index 00000000..bda0363e --- /dev/null +++ b/frontend/antd/watermark/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-watermark", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/watermark/watermark.tsx b/frontend/antd/watermark/watermark.tsx new file mode 100644 index 00000000..6b768081 --- /dev/null +++ b/frontend/antd/watermark/watermark.tsx @@ -0,0 +1,5 @@ +import { sveltify } from '@svelte-preprocess-react'; +import { type GetProps, Watermark as AWatermark } from 'antd'; + +export const Watermark = sveltify>(AWatermark); +export default Watermark; diff --git a/frontend/base/application/Index.svelte b/frontend/base/application/Index.svelte new file mode 100644 index 00000000..1e5862ff --- /dev/null +++ b/frontend/base/application/Index.svelte @@ -0,0 +1,30 @@ + + + + +{#if visible} +
+ +
+{/if} + + diff --git a/frontend/base/application/gradio.config.js b/frontend/base/application/gradio.config.js new file mode 100644 index 00000000..3cf1a1f7 --- /dev/null +++ b/frontend/base/application/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../defineConfig.js'; + +export default config({ external: false }); diff --git a/frontend/base/application/package.json b/frontend/base/application/package.json new file mode 100644 index 00000000..3b0097e7 --- /dev/null +++ b/frontend/base/application/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-application", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/base/div/Index.svelte b/frontend/base/div/Index.svelte new file mode 100644 index 00000000..0838d1bf --- /dev/null +++ b/frontend/base/div/Index.svelte @@ -0,0 +1,104 @@ + + + + +{#if $mergedProps.visible} + +
+ {#if $mergedProps._internal.layout} + + {:else} + {$mergedProps.value} + {/if} +
+
+{/if} + + diff --git a/frontend/base/div/gradio.config.js b/frontend/base/div/gradio.config.js new file mode 100644 index 00000000..916857c0 --- /dev/null +++ b/frontend/base/div/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../defineConfig.js'; + +export default config(); diff --git a/frontend/base/div/package.json b/frontend/base/div/package.json new file mode 100644 index 00000000..0cec1cb7 --- /dev/null +++ b/frontend/base/div/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-div", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/base/each/Each.svelte b/frontend/base/each/Each.svelte new file mode 100644 index 00000000..510513a6 --- /dev/null +++ b/frontend/base/each/Each.svelte @@ -0,0 +1,18 @@ + + + + + + + diff --git a/frontend/base/each/Index.svelte b/frontend/base/each/Index.svelte new file mode 100644 index 00000000..48e8d633 --- /dev/null +++ b/frontend/base/each/Index.svelte @@ -0,0 +1,42 @@ + + + + +{#if $mergedProps.visible} + {#each $mergedProps.value as item, i} + + + + {/each} +{/if} + + diff --git a/frontend/base/each/gradio.config.js b/frontend/base/each/gradio.config.js new file mode 100644 index 00000000..916857c0 --- /dev/null +++ b/frontend/base/each/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../defineConfig.js'; + +export default config(); diff --git a/frontend/base/each/package.json b/frontend/base/each/package.json new file mode 100644 index 00000000..b39fab86 --- /dev/null +++ b/frontend/base/each/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-each", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/base/filter/Index.svelte b/frontend/base/filter/Index.svelte new file mode 100644 index 00000000..538f75e8 --- /dev/null +++ b/frontend/base/filter/Index.svelte @@ -0,0 +1,50 @@ + + + + +{#if $mergedProps.visible} + +{/if} + + diff --git a/frontend/base/filter/gradio.config.js b/frontend/base/filter/gradio.config.js new file mode 100644 index 00000000..916857c0 --- /dev/null +++ b/frontend/base/filter/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../defineConfig.js'; + +export default config(); diff --git a/frontend/base/filter/package.json b/frontend/base/filter/package.json new file mode 100644 index 00000000..daf9a8f0 --- /dev/null +++ b/frontend/base/filter/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-filter", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/base/fragment/Index.svelte b/frontend/base/fragment/Index.svelte new file mode 100644 index 00000000..f867c55a --- /dev/null +++ b/frontend/base/fragment/Index.svelte @@ -0,0 +1,38 @@ + + + + +{#if $mergedProps.visible} + {#await AwaitedFragment then Fragment} + + + + {/await} +{/if} + + diff --git a/frontend/base/fragment/ShowFragment.svelte b/frontend/base/fragment/ShowFragment.svelte new file mode 100644 index 00000000..e680b493 --- /dev/null +++ b/frontend/base/fragment/ShowFragment.svelte @@ -0,0 +1,15 @@ + + + + +{#if show} + + + +{:else} + +{/if} diff --git a/frontend/base/fragment/fragment.tsx b/frontend/base/fragment/fragment.tsx new file mode 100644 index 00000000..4225728a --- /dev/null +++ b/frontend/base/fragment/fragment.tsx @@ -0,0 +1,10 @@ +import { sveltify } from '@svelte-preprocess-react'; +import React from 'react'; + +export const Fragment = sveltify<{ + children?: React.ReactNode; +}>(({ children }) => { + return <>{children}; +}); + +export default Fragment; diff --git a/frontend/base/fragment/gradio.config.js b/frontend/base/fragment/gradio.config.js new file mode 100644 index 00000000..916857c0 --- /dev/null +++ b/frontend/base/fragment/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../defineConfig.js'; + +export default config(); diff --git a/frontend/base/fragment/package.json b/frontend/base/fragment/package.json new file mode 100644 index 00000000..d50f25e7 --- /dev/null +++ b/frontend/base/fragment/package.json @@ -0,0 +1,9 @@ +{ + "name": "@modelscope-studio/antd-fragment", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./ShowFragment": "./ShowFragment.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/base/slot/Index.svelte b/frontend/base/slot/Index.svelte new file mode 100644 index 00000000..e106693d --- /dev/null +++ b/frontend/base/slot/Index.svelte @@ -0,0 +1,77 @@ + + + + +{#if $mergedProps.visible} + +{/if} + + diff --git a/frontend/base/slot/gradio.config.js b/frontend/base/slot/gradio.config.js new file mode 100644 index 00000000..916857c0 --- /dev/null +++ b/frontend/base/slot/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../defineConfig.js'; + +export default config(); diff --git a/frontend/base/slot/package.json b/frontend/base/slot/package.json new file mode 100644 index 00000000..7ed25fc9 --- /dev/null +++ b/frontend/base/slot/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-slot", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/base/span/Index.svelte b/frontend/base/span/Index.svelte new file mode 100644 index 00000000..73e517fc --- /dev/null +++ b/frontend/base/span/Index.svelte @@ -0,0 +1,104 @@ + + + + +{#if $mergedProps.visible} + + + {#if $mergedProps._internal.layout} + + {:else} + {$mergedProps.value} + {/if} + + +{/if} + + diff --git a/frontend/base/span/gradio.config.js b/frontend/base/span/gradio.config.js new file mode 100644 index 00000000..916857c0 --- /dev/null +++ b/frontend/base/span/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../defineConfig.js'; + +export default config(); diff --git a/frontend/base/span/package.json b/frontend/base/span/package.json new file mode 100644 index 00000000..a8f90145 --- /dev/null +++ b/frontend/base/span/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-span", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/base/text/Index.svelte b/frontend/base/text/Index.svelte new file mode 100644 index 00000000..8674dfce --- /dev/null +++ b/frontend/base/text/Index.svelte @@ -0,0 +1,36 @@ + + + + +{#if $mergedProps.visible} + + {$mergedProps.value} + +{/if} diff --git a/frontend/base/text/global.css b/frontend/base/text/global.css new file mode 100644 index 00000000..9d7608a9 --- /dev/null +++ b/frontend/base/text/global.css @@ -0,0 +1,3 @@ +.ms-gr-antd-noop-class { + display: none; +} diff --git a/frontend/base/text/gradio.config.js b/frontend/base/text/gradio.config.js new file mode 100644 index 00000000..916857c0 --- /dev/null +++ b/frontend/base/text/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../defineConfig.js'; + +export default config(); diff --git a/frontend/base/text/package.json b/frontend/base/text/package.json new file mode 100644 index 00000000..0a35c503 --- /dev/null +++ b/frontend/base/text/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-text", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/compiled/tsconfig.build.json b/frontend/compiled/tsconfig.build.json deleted file mode 100644 index 0933fc76..00000000 --- a/frontend/compiled/tsconfig.build.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "compilerOptions": { - "target": "ES2020", - "useDefineForClassFields": true, - "lib": ["ESNext", "DOM", "DOM.Iterable"], - "module": "ESNext", - "skipLibCheck": true, - - /* Bundler mode */ - "moduleResolution": "bundler", - "allowImportingTsExtensions": true, - "resolveJsonModule": true, - "isolatedModules": true, - "noEmit": true, - "jsx": "react-jsx", - "types": ["vite/client"], - - /* Linting */ - "strict": true - // "noUnusedLocals": true, - // "noUnusedParameters": true, - // "noFallthroughCasesInSwitch": true - }, - "include": ["src"], - "references": [{ "path": "./tsconfig.node.json" }] -} diff --git a/frontend/compiled/tsconfig.json b/frontend/compiled/tsconfig.json deleted file mode 100644 index 75d6e0f8..00000000 --- a/frontend/compiled/tsconfig.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "compilerOptions": { - "target": "ES2020", - "useDefineForClassFields": true, - "lib": ["ESNext", "DOM", "DOM.Iterable"], - "module": "ESNext", - "skipLibCheck": true, - - /* Bundler mode */ - "moduleResolution": "bundler", - "allowImportingTsExtensions": true, - "resolveJsonModule": true, - "isolatedModules": true, - "noEmit": true, - "jsx": "react-jsx", - "types": ["vite/client"], - /* Linting */ - "strict": true - // "noUnusedLocals": true, - // "noUnusedParameters": true, - // "noFallthroughCasesInSwitch": true - }, - "include": ["src", "components", "index.ts", "global.d.ts"], - "references": [{ "path": "./tsconfig.node.json" }] -} diff --git a/frontend/compiled/tsconfig.node.json b/frontend/compiled/tsconfig.node.json deleted file mode 100644 index 397a3a3a..00000000 --- a/frontend/compiled/tsconfig.node.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "compilerOptions": { - "composite": true, - "strict": true, - "skipLibCheck": true, - "module": "ESNext", - "moduleResolution": "bundler", - "allowSyntheticDefaultImports": true - }, - "include": ["vite.config.ts"] -} diff --git a/frontend/compiled/vite.config.ts b/frontend/compiled/vite.config.ts deleted file mode 100644 index 59d9ca8a..00000000 --- a/frontend/compiled/vite.config.ts +++ /dev/null @@ -1,72 +0,0 @@ -import react from '@vitejs/plugin-react-swc'; -import path from 'path'; -import { defineConfig } from 'vite'; -import dts from 'vite-plugin-dts'; -import { libInjectCss } from 'vite-plugin-lib-inject-css'; - -const libEntryFile = path.resolve(__dirname, 'src/index.ts'); -const libEntryFileDir = path.dirname(libEntryFile); - -const libOutDir = path.resolve(__dirname, 'build-assets'); -// https://vitejs.dev/config/ -export default defineConfig({ - plugins: [ - react(), - libInjectCss(), - dts({ - rollupTypes: true, - tsconfigPath: path.resolve(__dirname, 'tsconfig.build.json'), - outDir: libOutDir, - }), - { - name: 'inject-polyfill', - }, - ], - define: { - 'process.env.NODE_ENV': JSON.stringify('production'), - }, - build: { - minify: true, - lib: { - entry: libEntryFile, - formats: ['es'], - fileName() { - return 'index.js'; - }, - }, - outDir: libOutDir, - rollupOptions: { - // external: ['react'], - // css tree shaking - output: { - assetFileNames: '[name]/index[extname]', - chunkFileNames: (chunk) => { - const entryModuleId = chunk.moduleIds[chunk.moduleIds.length - 1]; - if (entryModuleId.includes('node_modules')) { - const slices = entryModuleId.split('node_modules/'); - return slices[slices.length - 1]; - } - if ( - path.basename(entryModuleId, path.extname(entryModuleId)) === - 'index' - ) { - return '[name]/index.js'; - } - return '[name].js'; - }, - manualChunks(id, { getModuleInfo }) { - const entryModuleInfo = getModuleInfo(libEntryFile); - const entryModuleImportedIds = entryModuleInfo?.importedIds; - if (entryModuleImportedIds?.includes(id)) { - const filenameWithoutExt = path.basename(id, path.extname(id)); - if (filenameWithoutExt === 'index') { - return path.dirname(id).replace(libEntryFileDir + path.sep, ''); - } else { - return filenameWithoutExt; - } - } - }, - }, - }, - }, -}); diff --git a/frontend/defineConfig.js b/frontend/defineConfig.js new file mode 100644 index 00000000..e05a0aa1 --- /dev/null +++ b/frontend/defineConfig.js @@ -0,0 +1,18 @@ +import react from '@vitejs/plugin-react-swc'; + +import { ModelScopeStudioVitePlugin } from './plugin.js'; + +/** + * @type {(options:{ external?:boolean; }) => any} + */ +export default ({ external } = { external: true }) => { + return { + plugins: [react(), ModelScopeStudioVitePlugin({ external })], + svelte: { + preprocess: [], + }, + build: { + target: 'modules', + }, + }; +}; diff --git a/fixtures.d.ts b/frontend/fixtures.d.ts similarity index 62% rename from fixtures.d.ts rename to frontend/fixtures.d.ts index cae0e2a4..713e5df4 100644 --- a/fixtures.d.ts +++ b/frontend/fixtures.d.ts @@ -1,8 +1,11 @@ -interface Window { - __gradio_space__: any; +declare module 'virtual:component-loader' { + export const load_component; } - declare module '*?inline' { const string: string; export default string; } + +interface Window { + __gradio_space__: any; +} diff --git a/frontend/Chatbot/CHANGELOG.md b/frontend/legacy/Chatbot/CHANGELOG.md similarity index 100% rename from frontend/Chatbot/CHANGELOG.md rename to frontend/legacy/Chatbot/CHANGELOG.md diff --git a/frontend/Chatbot/Index.svelte b/frontend/legacy/Chatbot/Index.svelte similarity index 99% rename from frontend/Chatbot/Index.svelte rename to frontend/legacy/Chatbot/Index.svelte index 151d0129..1fc4feb5 100644 --- a/frontend/Chatbot/Index.svelte +++ b/frontend/legacy/Chatbot/Index.svelte @@ -13,7 +13,7 @@ CustomComponents, MarkdownCustomData, } from '@modelscope-studio/compiled'; - import { normalise_file } from '@modelscope-studio/shared'; + import { normalise_file } from '@utils/upload'; import ChatBot from './shared/ChatBot.svelte'; import { diff --git a/frontend/legacy/Chatbot/gradio.config.js b/frontend/legacy/Chatbot/gradio.config.js new file mode 100644 index 00000000..abd9137f --- /dev/null +++ b/frontend/legacy/Chatbot/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../defineConfig.js'; + +export default config({ external: true }); diff --git a/frontend/Lifecycle/package.json b/frontend/legacy/Chatbot/package.json similarity index 68% rename from frontend/Lifecycle/package.json rename to frontend/legacy/Chatbot/package.json index d8042468..69c83fc3 100644 --- a/frontend/Lifecycle/package.json +++ b/frontend/legacy/Chatbot/package.json @@ -1,5 +1,5 @@ { - "name": "@modelscope-studio/lifecycle", + "name": "@modelscope-studio/legacy-chatbot", "version": "0.4.2", "private": false, "description": "ModelScope Gradio Components", @@ -11,11 +11,8 @@ "./package.json": "./package.json" }, "dependencies": { - "@gradio/utils": "0.4.2", - "svelte-i18n": "^4.0.0" - }, - "devDependencies": { - "@gradio/preview": "0.9.1" + "@modelscope-studio/legacy-compiled": "workspace:*" }, + "devDependencies": {}, "main_changeset": true } diff --git a/frontend/Chatbot/shared/ChatBot.svelte b/frontend/legacy/Chatbot/shared/ChatBot.svelte similarity index 99% rename from frontend/Chatbot/shared/ChatBot.svelte rename to frontend/legacy/Chatbot/shared/ChatBot.svelte index bf568b81..a52ad473 100644 --- a/frontend/Chatbot/shared/ChatBot.svelte +++ b/frontend/legacy/Chatbot/shared/ChatBot.svelte @@ -7,7 +7,7 @@ FileView, type MarkdownCustomData, } from '@modelscope-studio/compiled'; - import { get_fetchable_url_or_file } from '@modelscope-studio/shared'; + import { get_fetchable_url_or_file } from '@utils/upload'; import { dequal } from 'dequal/lite'; import { afterUpdate, createEventDispatcher } from 'svelte'; diff --git a/frontend/Chatbot/shared/Copy.svelte b/frontend/legacy/Chatbot/shared/Copy.svelte similarity index 100% rename from frontend/Chatbot/shared/Copy.svelte rename to frontend/legacy/Chatbot/shared/Copy.svelte diff --git a/frontend/Chatbot/shared/FlushingMarkdown.svelte b/frontend/legacy/Chatbot/shared/FlushingMarkdown.svelte similarity index 100% rename from frontend/Chatbot/shared/FlushingMarkdown.svelte rename to frontend/legacy/Chatbot/shared/FlushingMarkdown.svelte diff --git a/frontend/Chatbot/shared/LikeDislike.svelte b/frontend/legacy/Chatbot/shared/LikeDislike.svelte similarity index 100% rename from frontend/Chatbot/shared/LikeDislike.svelte rename to frontend/legacy/Chatbot/shared/LikeDislike.svelte diff --git a/frontend/Chatbot/shared/Pending.svelte b/frontend/legacy/Chatbot/shared/Pending.svelte similarity index 100% rename from frontend/Chatbot/shared/Pending.svelte rename to frontend/legacy/Chatbot/shared/Pending.svelte diff --git a/frontend/Chatbot/shared/llm-thinking-presets.ts b/frontend/legacy/Chatbot/shared/llm-thinking-presets.ts similarity index 100% rename from frontend/Chatbot/shared/llm-thinking-presets.ts rename to frontend/legacy/Chatbot/shared/llm-thinking-presets.ts diff --git a/frontend/Chatbot/shared/utils.ts b/frontend/legacy/Chatbot/shared/utils.ts similarity index 100% rename from frontend/Chatbot/shared/utils.ts rename to frontend/legacy/Chatbot/shared/utils.ts diff --git a/frontend/Flow/CHANGELOG.md b/frontend/legacy/Flow/CHANGELOG.md similarity index 100% rename from frontend/Flow/CHANGELOG.md rename to frontend/legacy/Flow/CHANGELOG.md diff --git a/frontend/Flow/Index.svelte b/frontend/legacy/Flow/Index.svelte similarity index 97% rename from frontend/Flow/Index.svelte rename to frontend/legacy/Flow/Index.svelte index 615e03bd..429a4382 100644 --- a/frontend/Flow/Index.svelte +++ b/frontend/legacy/Flow/Index.svelte @@ -10,7 +10,7 @@ type FlowCustomData, type FlowProps, } from '@modelscope-studio/compiled'; - import { get_fetchable_url_or_file } from '@modelscope-studio/shared'; + import { get_fetchable_url_or_file } from '@utils/upload'; import Flow from './shared/Flow.svelte'; import { type FlowData } from './shared/utils'; diff --git a/frontend/legacy/Flow/gradio.config.js b/frontend/legacy/Flow/gradio.config.js new file mode 100644 index 00000000..abd9137f --- /dev/null +++ b/frontend/legacy/Flow/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../defineConfig.js'; + +export default config({ external: true }); diff --git a/frontend/Flow/package.json b/frontend/legacy/Flow/package.json similarity index 53% rename from frontend/Flow/package.json rename to frontend/legacy/Flow/package.json index 597a938b..f374ad0d 100644 --- a/frontend/Flow/package.json +++ b/frontend/legacy/Flow/package.json @@ -1,5 +1,5 @@ { - "name": "@modelscope-studio/flow", + "name": "@modelscope-studio/legacy-flow", "version": "0.4.2", "private": false, "description": "ModelScope Gradio Components", @@ -14,17 +14,8 @@ "build": "typescript-json-schema --skipLibCheck ./schema.ts FlowSchema > ./schema.json" }, "dependencies": { - "@gradio/atoms": "0.7.4", - "@gradio/client": "1.1.1", - "@gradio/icons": "0.4.1", - "@gradio/statustracker": "0.6.0", - "@gradio/utils": "0.4.2", - "@modelscope-studio/compiled": "workspace:*", - "@modelscope-studio/shared": "workspace:*" - }, - "devDependencies": { - "@gradio/preview": "0.9.1", - "typescript-json-schema": "^0.64.0" + "@modelscope-studio/legacy-compiled": "workspace:*" }, + "devDependencies": {}, "main_changeset": true } diff --git a/frontend/Flow/schema.json b/frontend/legacy/Flow/schema.json similarity index 100% rename from frontend/Flow/schema.json rename to frontend/legacy/Flow/schema.json diff --git a/frontend/Flow/schema.ts b/frontend/legacy/Flow/schema.ts similarity index 100% rename from frontend/Flow/schema.ts rename to frontend/legacy/Flow/schema.ts diff --git a/frontend/Flow/shared/Flow.svelte b/frontend/legacy/Flow/shared/Flow.svelte similarity index 97% rename from frontend/Flow/shared/Flow.svelte rename to frontend/legacy/Flow/shared/Flow.svelte index 599d0a7b..09e086b3 100644 --- a/frontend/Flow/shared/Flow.svelte +++ b/frontend/legacy/Flow/shared/Flow.svelte @@ -8,7 +8,7 @@ type FlowProps, type UploadFile, } from '@modelscope-studio/compiled'; - import { upload } from '@modelscope-studio/shared'; + import { upload } from '@utils/upload'; import { createEventDispatcher, getContext } from 'svelte'; import { type FlowData } from './utils'; diff --git a/frontend/Flow/shared/utils.ts b/frontend/legacy/Flow/shared/utils.ts similarity index 100% rename from frontend/Flow/shared/utils.ts rename to frontend/legacy/Flow/shared/utils.ts diff --git a/frontend/Lifecycle/CHANGELOG.md b/frontend/legacy/Lifecycle/CHANGELOG.md similarity index 100% rename from frontend/Lifecycle/CHANGELOG.md rename to frontend/legacy/Lifecycle/CHANGELOG.md diff --git a/frontend/legacy/Lifecycle/gradio.config.js b/frontend/legacy/Lifecycle/gradio.config.js new file mode 100644 index 00000000..abd9137f --- /dev/null +++ b/frontend/legacy/Lifecycle/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../defineConfig.js'; + +export default config({ external: true }); diff --git a/frontend/Lifecycle/index.svelte b/frontend/legacy/Lifecycle/index.svelte similarity index 100% rename from frontend/Lifecycle/index.svelte rename to frontend/legacy/Lifecycle/index.svelte diff --git a/frontend/legacy/Lifecycle/package.json b/frontend/legacy/Lifecycle/package.json new file mode 100644 index 00000000..9b7c4869 --- /dev/null +++ b/frontend/legacy/Lifecycle/package.json @@ -0,0 +1,16 @@ +{ + "name": "@modelscope-studio/legacy-lifecycle", + "version": "0.4.2", + "private": false, + "description": "ModelScope Gradio Components", + "repository": "git@github.com:modelscope/modelscope-studio.git", + "license": "Apache-2.0", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + }, + "dependencies": {}, + "devDependencies": {}, + "main_changeset": true +} diff --git a/frontend/Lifecycle/shared/utils.ts b/frontend/legacy/Lifecycle/shared/utils.ts similarity index 100% rename from frontend/Lifecycle/shared/utils.ts rename to frontend/legacy/Lifecycle/shared/utils.ts diff --git a/frontend/Markdown/CHANGELOG.md b/frontend/legacy/Markdown/CHANGELOG.md similarity index 100% rename from frontend/Markdown/CHANGELOG.md rename to frontend/legacy/Markdown/CHANGELOG.md diff --git a/frontend/Markdown/Example.svelte b/frontend/legacy/Markdown/Example.svelte similarity index 100% rename from frontend/Markdown/Example.svelte rename to frontend/legacy/Markdown/Example.svelte diff --git a/frontend/Markdown/Index.svelte b/frontend/legacy/Markdown/Index.svelte similarity index 100% rename from frontend/Markdown/Index.svelte rename to frontend/legacy/Markdown/Index.svelte diff --git a/frontend/legacy/Markdown/gradio.config.js b/frontend/legacy/Markdown/gradio.config.js new file mode 100644 index 00000000..abd9137f --- /dev/null +++ b/frontend/legacy/Markdown/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../defineConfig.js'; + +export default config({ external: true }); diff --git a/frontend/Markdown/package.json b/frontend/legacy/Markdown/package.json similarity index 60% rename from frontend/Markdown/package.json rename to frontend/legacy/Markdown/package.json index 68896f6b..0a06f5ef 100644 --- a/frontend/Markdown/package.json +++ b/frontend/legacy/Markdown/package.json @@ -1,5 +1,5 @@ { - "name": "@modelscope-studio/markdown", + "name": "@modelscope-studio/legacy-markdown", "version": "0.4.2", "private": false, "description": "ModelScope Gradio Components", @@ -12,13 +12,8 @@ "./package.json": "./package.json" }, "dependencies": { - "@gradio/atoms": "0.7.4", - "@gradio/statustracker": "0.6.0", - "@gradio/utils": "0.4.2", - "@modelscope-studio/compiled": "workspace:*" - }, - "devDependencies": { - "@gradio/preview": "0.9.1" + "@modelscope-studio/legacy-compiled": "workspace:*" }, + "devDependencies": {}, "main_changeset": true } diff --git a/frontend/Markdown/shared/Markdown.svelte b/frontend/legacy/Markdown/shared/Markdown.svelte similarity index 100% rename from frontend/Markdown/shared/Markdown.svelte rename to frontend/legacy/Markdown/shared/Markdown.svelte diff --git a/frontend/MultimodalInput/CHANGELOG.md b/frontend/legacy/MultimodalInput/CHANGELOG.md similarity index 100% rename from frontend/MultimodalInput/CHANGELOG.md rename to frontend/legacy/MultimodalInput/CHANGELOG.md diff --git a/frontend/MultimodalInput/Example.svelte b/frontend/legacy/MultimodalInput/Example.svelte similarity index 100% rename from frontend/MultimodalInput/Example.svelte rename to frontend/legacy/MultimodalInput/Example.svelte diff --git a/frontend/MultimodalInput/Index.svelte b/frontend/legacy/MultimodalInput/Index.svelte similarity index 99% rename from frontend/MultimodalInput/Index.svelte rename to frontend/legacy/MultimodalInput/Index.svelte index ff9b6967..ee1f2037 100644 --- a/frontend/MultimodalInput/Index.svelte +++ b/frontend/legacy/MultimodalInput/Index.svelte @@ -15,7 +15,7 @@ import type { LoadingStatus } from '@gradio/statustracker'; import { StatusTracker } from '@gradio/statustracker'; import type { Gradio, SelectData } from '@gradio/utils'; - import { upload as gradio_upload } from '@modelscope-studio/shared'; + import { upload as gradio_upload } from '@utils/upload'; import { getContext } from 'svelte'; import AudioRecorder from './shared/AudioRecorder.svelte'; diff --git a/frontend/legacy/MultimodalInput/gradio.config.js b/frontend/legacy/MultimodalInput/gradio.config.js new file mode 100644 index 00000000..abd9137f --- /dev/null +++ b/frontend/legacy/MultimodalInput/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../defineConfig.js'; + +export default config({ external: true }); diff --git a/frontend/legacy/MultimodalInput/package.json b/frontend/legacy/MultimodalInput/package.json new file mode 100644 index 00000000..9df9a0f9 --- /dev/null +++ b/frontend/legacy/MultimodalInput/package.json @@ -0,0 +1,19 @@ +{ + "name": "@modelscope-studio/legacy-multimodal-input", + "version": "0.4.2", + "private": false, + "description": "ModelScope Gradio Components", + "repository": "git@github.com:modelscope/modelscope-studio.git", + "license": "Apache-2.0", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./example": "./Example.svelte", + "./package.json": "./package.json" + }, + "dependencies": { + "@modelscope-studio/legacy-compiled": "workspace:*" + }, + "devDependencies": {}, + "main_changeset": true +} diff --git a/frontend/MultimodalInput/shared/AudioRecorder.svelte b/frontend/legacy/MultimodalInput/shared/AudioRecorder.svelte similarity index 100% rename from frontend/MultimodalInput/shared/AudioRecorder.svelte rename to frontend/legacy/MultimodalInput/shared/AudioRecorder.svelte diff --git a/frontend/MultimodalInput/shared/FilePreview.svelte b/frontend/legacy/MultimodalInput/shared/FilePreview.svelte similarity index 100% rename from frontend/MultimodalInput/shared/FilePreview.svelte rename to frontend/legacy/MultimodalInput/shared/FilePreview.svelte diff --git a/frontend/MultimodalInput/shared/Input.svelte b/frontend/legacy/MultimodalInput/shared/Input.svelte similarity index 100% rename from frontend/MultimodalInput/shared/Input.svelte rename to frontend/legacy/MultimodalInput/shared/Input.svelte diff --git a/frontend/MultimodalInput/shared/Loader.svelte b/frontend/legacy/MultimodalInput/shared/Loader.svelte similarity index 100% rename from frontend/MultimodalInput/shared/Loader.svelte rename to frontend/legacy/MultimodalInput/shared/Loader.svelte diff --git a/frontend/MultimodalInput/shared/RemoveIcon.svelte b/frontend/legacy/MultimodalInput/shared/RemoveIcon.svelte similarity index 100% rename from frontend/MultimodalInput/shared/RemoveIcon.svelte rename to frontend/legacy/MultimodalInput/shared/RemoveIcon.svelte diff --git a/frontend/MultimodalInput/shared/SubmitButton.svelte b/frontend/legacy/MultimodalInput/shared/SubmitButton.svelte similarity index 100% rename from frontend/MultimodalInput/shared/SubmitButton.svelte rename to frontend/legacy/MultimodalInput/shared/SubmitButton.svelte diff --git a/frontend/MultimodalInput/shared/UploadButton.svelte b/frontend/legacy/MultimodalInput/shared/UploadButton.svelte similarity index 100% rename from frontend/MultimodalInput/shared/UploadButton.svelte rename to frontend/legacy/MultimodalInput/shared/UploadButton.svelte diff --git a/frontend/MultimodalInput/shared/UploadIcon.svelte b/frontend/legacy/MultimodalInput/shared/UploadIcon.svelte similarity index 100% rename from frontend/MultimodalInput/shared/UploadIcon.svelte rename to frontend/legacy/MultimodalInput/shared/UploadIcon.svelte diff --git a/frontend/MultimodalInput/shared/Webcam.svelte b/frontend/legacy/MultimodalInput/shared/Webcam.svelte similarity index 100% rename from frontend/MultimodalInput/shared/Webcam.svelte rename to frontend/legacy/MultimodalInput/shared/Webcam.svelte diff --git a/frontend/MultimodalInput/shared/context.ts b/frontend/legacy/MultimodalInput/shared/context.ts similarity index 100% rename from frontend/MultimodalInput/shared/context.ts rename to frontend/legacy/MultimodalInput/shared/context.ts diff --git a/frontend/MultimodalInput/shared/global.d.ts b/frontend/legacy/MultimodalInput/shared/global.d.ts similarity index 100% rename from frontend/MultimodalInput/shared/global.d.ts rename to frontend/legacy/MultimodalInput/shared/global.d.ts diff --git a/frontend/MultimodalInput/shared/utils.ts b/frontend/legacy/MultimodalInput/shared/utils.ts similarity index 100% rename from frontend/MultimodalInput/shared/utils.ts rename to frontend/legacy/MultimodalInput/shared/utils.ts diff --git a/frontend/WaterfallGallery/CHANGELOG.md b/frontend/legacy/WaterfallGallery/CHANGELOG.md similarity index 100% rename from frontend/WaterfallGallery/CHANGELOG.md rename to frontend/legacy/WaterfallGallery/CHANGELOG.md diff --git a/frontend/WaterfallGallery/Index.svelte b/frontend/legacy/WaterfallGallery/Index.svelte similarity index 100% rename from frontend/WaterfallGallery/Index.svelte rename to frontend/legacy/WaterfallGallery/Index.svelte diff --git a/frontend/legacy/WaterfallGallery/gradio.config.js b/frontend/legacy/WaterfallGallery/gradio.config.js new file mode 100644 index 00000000..abd9137f --- /dev/null +++ b/frontend/legacy/WaterfallGallery/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../defineConfig.js'; + +export default config({ external: true }); diff --git a/frontend/shared/package.json b/frontend/legacy/WaterfallGallery/package.json similarity index 57% rename from frontend/shared/package.json rename to frontend/legacy/WaterfallGallery/package.json index c9dc33ce..6e87c427 100644 --- a/frontend/shared/package.json +++ b/frontend/legacy/WaterfallGallery/package.json @@ -1,13 +1,14 @@ { - "name": "@modelscope-studio/shared", + "name": "@modelscope-studio/legacy-waterfall-gallery", "version": "0.4.2", "description": "ModelScope Gradio Components", "repository": "git@github.com:modelscope/modelscope-studio.git", "license": "Apache-2.0", "author": "", - "main": "./src/index.ts", - "dependencies": { - "@gradio/client": "1.1.1" + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" }, "main_changeset": true } diff --git a/frontend/WaterfallGallery/shared/Dislike.svelte b/frontend/legacy/WaterfallGallery/shared/Dislike.svelte similarity index 100% rename from frontend/WaterfallGallery/shared/Dislike.svelte rename to frontend/legacy/WaterfallGallery/shared/Dislike.svelte diff --git a/frontend/WaterfallGallery/shared/Gallery.svelte b/frontend/legacy/WaterfallGallery/shared/Gallery.svelte similarity index 99% rename from frontend/WaterfallGallery/shared/Gallery.svelte rename to frontend/legacy/WaterfallGallery/shared/Gallery.svelte index 77913716..26705d93 100644 --- a/frontend/WaterfallGallery/shared/Gallery.svelte +++ b/frontend/legacy/WaterfallGallery/shared/Gallery.svelte @@ -11,7 +11,7 @@ SelectData, ShareData, } from '@gradio/utils'; - import { normalise_file } from '@modelscope-studio/shared'; + import { normalise_file } from '@utils/upload'; import { dequal } from 'dequal'; import { createEventDispatcher, onDestroy, tick } from 'svelte'; diff --git a/frontend/WaterfallGallery/shared/Image.svelte b/frontend/legacy/WaterfallGallery/shared/Image.svelte similarity index 100% rename from frontend/WaterfallGallery/shared/Image.svelte rename to frontend/legacy/WaterfallGallery/shared/Image.svelte diff --git a/frontend/WaterfallGallery/shared/Waterfall/createWaterfall.ts b/frontend/legacy/WaterfallGallery/shared/Waterfall/createWaterfall.ts similarity index 100% rename from frontend/WaterfallGallery/shared/Waterfall/createWaterfall.ts rename to frontend/legacy/WaterfallGallery/shared/Waterfall/createWaterfall.ts diff --git a/frontend/WaterfallGallery/shared/Waterfall/index.ts b/frontend/legacy/WaterfallGallery/shared/Waterfall/index.ts similarity index 100% rename from frontend/WaterfallGallery/shared/Waterfall/index.ts rename to frontend/legacy/WaterfallGallery/shared/Waterfall/index.ts diff --git a/frontend/WaterfallGallery/shared/Waterfall/layout.ts b/frontend/legacy/WaterfallGallery/shared/Waterfall/layout.ts similarity index 100% rename from frontend/WaterfallGallery/shared/Waterfall/layout.ts rename to frontend/legacy/WaterfallGallery/shared/Waterfall/layout.ts diff --git a/frontend/WaterfallGallery/shared/utils.ts b/frontend/legacy/WaterfallGallery/shared/utils.ts similarity index 100% rename from frontend/WaterfallGallery/shared/utils.ts rename to frontend/legacy/WaterfallGallery/shared/utils.ts diff --git a/frontend/compiled/CHANGELOG.md b/frontend/legacy/compiled/CHANGELOG.md similarity index 100% rename from frontend/compiled/CHANGELOG.md rename to frontend/legacy/compiled/CHANGELOG.md diff --git a/frontend/compiled/components/FileView/index.svelte b/frontend/legacy/compiled/components/FileView/index.svelte similarity index 100% rename from frontend/compiled/components/FileView/index.svelte rename to frontend/legacy/compiled/components/FileView/index.svelte diff --git a/frontend/compiled/components/FileView/shared/FileView.svelte b/frontend/legacy/compiled/components/FileView/shared/FileView.svelte similarity index 83% rename from frontend/compiled/components/FileView/shared/FileView.svelte rename to frontend/legacy/compiled/components/FileView/shared/FileView.svelte index d95e4d6f..f9cf9a88 100644 --- a/frontend/compiled/components/FileView/shared/FileView.svelte +++ b/frontend/legacy/compiled/components/FileView/shared/FileView.svelte @@ -1,5 +1,5 @@ + + + +{#if $$slots.default} + +{/if} + + diff --git a/frontend/svelte-preprocess-react/internal/types.ts b/frontend/svelte-preprocess-react/internal/types.ts new file mode 100644 index 00000000..73298829 --- /dev/null +++ b/frontend/svelte-preprocess-react/internal/types.ts @@ -0,0 +1,67 @@ +import type { ComponentClass, FunctionComponent } from 'react'; +import type { Readable } from 'svelte/store'; + +export type HandlerName = `on${Capitalize}`; +export type EventName = T extends `on${infer N}` + ? Uncapitalize + : never; + +export type SvelteEventHandlers = + T extends Record + ? Partial, (e: Value) => void | boolean>> + : never; + +type Uppercase = + | 'A' + | 'B' + | 'C' + | 'D' + | 'E' + | 'F' + | 'G' + | 'H' + | 'I' + | 'J' + | 'K' + | 'L' + | 'M' + | 'N' + | 'S' + | 'T' + | 'U' + | 'V' + | 'W' + | 'X' + | 'Y' + | 'Z'; + +type ReactEventProp = `on${Uppercase}${string}`; +type ExcludeProps = T extends ReactEventProp ? T : never; +type ExcludeEvents = T extends ReactEventProp ? never : T; + +export type EventProps = Omit< + ReactProps, + ExcludeEvents +>; +export type OmitEventProps = Omit< + ReactProps, + ExcludeProps +>; + +export type TreeNode = Omit & { + svelteInstance: Readable; + reactComponent: FunctionComponent | ComponentClass; + key: number; + nodes: TreeNode[]; +}; + +export type SvelteInit = { + parent?: TreeNode; + props: Readable>; + target: Readable; + slot: Readable; + slotKey: Readable | undefined; + slotIndex: Readable | undefined; + subSlotIndex: Readable | undefined; + onDestroy: (callback: () => void) => void; +}; diff --git a/frontend/svelte-preprocess-react/polyfills.ts b/frontend/svelte-preprocess-react/polyfills.ts new file mode 100644 index 00000000..f720760a --- /dev/null +++ b/frontend/svelte-preprocess-react/polyfills.ts @@ -0,0 +1,4 @@ +// Object.hasOwn +if (!Object.hasOwn) { + Object.hasOwn = (obj, key) => Object.prototype.hasOwnProperty.call(obj, key); +} diff --git a/frontend/svelte-preprocess-react/react-slot.tsx b/frontend/svelte-preprocess-react/react-slot.tsx new file mode 100644 index 00000000..af919607 --- /dev/null +++ b/frontend/svelte-preprocess-react/react-slot.tsx @@ -0,0 +1,121 @@ +import React, { forwardRef, useEffect, useRef } from 'react'; +import { styleObject2HtmlStyle } from '@utils/styleObject2String'; + +export interface ReactSlotProps { + slot: HTMLElement; + clone?: boolean; + style?: React.CSSProperties; + className?: string; +} + +function cloneElementWithEvents(element: HTMLElement) { + const clonedElement = element.cloneNode(true) as HTMLElement; + // clone eventListener + Object.keys(element.getEventListeners()).forEach((eventName) => { + const listeners = element.getEventListeners( + eventName as keyof ElementEventMap + ); + listeners.forEach(({ listener, type, useCapture }) => { + clonedElement.addEventListener(type, listener, useCapture); + }); + }); + const elementsChildrenArray = Array.from(element.children); + for (let i = 0; i < elementsChildrenArray.length; i++) { + const child = elementsChildrenArray[i]; + const clonedChild = cloneElementWithEvents(child as HTMLElement); + clonedElement.replaceChild(clonedChild, clonedElement.children[i]); + } + + return clonedElement; +} + +function mountElRef(elRef: React.ForwardedRef, el: HTMLElement) { + if (elRef) { + if (typeof elRef === 'function') { + elRef(el); + } else { + elRef.current = el; + } + } +} + +// eslint-disable-next-line react/display-name +export const ReactSlot = forwardRef( + ({ slot, clone, className, style }, elRef) => { + const ref = useRef(); + useEffect(() => { + if (!ref.current || !slot) { + return; + } + let cloned = slot; + function mountElementProps() { + let child = cloned as Element; + if ( + cloned.tagName.toLowerCase() === 'svelte-slot' && + cloned.children.length === 1 && + cloned.children[0] + ) { + child = cloned.children[0]; + if ( + child.tagName.toLowerCase() === 'react-portal-target' && + child.children[0] + ) { + child = child.children[0]; + } + } + + mountElRef(elRef, child as HTMLElement); + + if (className) { + child.classList.add(...className.split(' ')); + } + if (style) { + const htmlStyle = styleObject2HtmlStyle(style); + + Object.keys(htmlStyle).forEach((key) => { + ((child as HTMLElement).style as any)[key] = htmlStyle[key]; + }); + } + } + let observer: MutationObserver | null = null; + if (clone && window.MutationObserver) { + function render() { + cloned = cloneElementWithEvents(slot); + cloned.style.display = 'contents'; + mountElementProps(); + ref.current?.appendChild(cloned); + } + render(); + observer = new window.MutationObserver(() => { + if (ref.current?.contains(cloned)) { + ref.current?.removeChild(cloned); + } + render(); + }); + observer.observe(slot, { + attributes: true, + childList: true, + subtree: true, + }); + } else { + cloned.style.display = 'contents'; + mountElementProps(); + ref.current?.appendChild(cloned); + } + + return () => { + cloned.style.display = ''; + + if (ref.current?.contains(cloned)) { + // eslint-disable-next-line react-hooks/exhaustive-deps + ref.current?.removeChild(cloned); + } + observer?.disconnect(); + }; + }, [slot, clone, className, style, elRef]); + return React.createElement('react-child', { + ref, + style: { display: 'contents' }, + }); + } +); diff --git a/frontend/svelte-preprocess-react/slot.ts b/frontend/svelte-preprocess-react/slot.ts new file mode 100644 index 00000000..f21cf3fb --- /dev/null +++ b/frontend/svelte-preprocess-react/slot.ts @@ -0,0 +1,170 @@ +import { getContext, setContext } from 'svelte'; +import { get, type Writable, writable } from 'svelte/store'; + +const slotsKey = '$$ms-gr-antd-slots-key'; + +export function getSlots() { + const slots = writable({} as Record); + + return setContext(slotsKey, slots); +} + +export function getSetSlotFn() { + const slots = + (getContext(slotsKey) as Writable>) || + writable({}); + + return (prevSlot: string, slot: string, el: HTMLElement) => { + slots.update((v) => { + const newValue = { ...v }; + if (prevSlot) { + Reflect.deleteProperty(newValue, prevSlot); + } + return { ...newValue, [slot]: el }; + }); + }; +} + +const slotParamsKey = '$$ms-gr-antd-render-slot-context-key'; + +export function getSetSlotParamsFn() { + const slotParams = setContext( + slotParamsKey, + writable>({}) + ); + return (key: string, params: any[] | ((prevValue: any[]) => any[])) => { + slotParams.update((v) => { + if (typeof params === 'function') { + return { + ...v, + [key]: params(v[key]), + }; + } + return { + ...v, + [key]: params, + }; + }); + }; +} +export function getSlotParams() { + return getContext(slotParamsKey) as + | Writable> + | undefined; +} + +const slotContextKey = '$$ms-gr-antd-context-key'; +export function getSetSlotContextFn() { + const value = writable(); + setContext(slotContextKey, value); + return (v: any) => { + value.set(v); + }; +} + +/** + * + * will run `resetSlotKey` inside + */ +export function getSlotContext< + T extends { + as_item?: string; + _internal: Record; + }, +>(props: T): [Writable, (props: T) => void] { + if (!Reflect.has(props, 'as_item') || !Reflect.has(props, '_internal')) { + throw new Error('`as_item` and `_internal` is required'); + } + const slotKey = getSlotKey(); + const componentSlotContext = setComponentSlotContext({ + slot: undefined, + index: props._internal.index, + subIndex: props._internal.subIndex, + }); + if (slotKey) { + slotKey.subscribe((v) => { + componentSlotContext.slotKey.set(v as string); + }); + } + // reset slot key to make sure the sub component does not be affected by gr.Slot() + resetSlotKey(); + const ctx = getContext(slotContextKey) as Writable; + const as_item = get(ctx)?.as_item || props.as_item; + const initialCtxValue = ctx + ? as_item + ? get(ctx)[as_item as keyof T] + : get(ctx) + : {}; + const mergedProps = writable({ + ...props, + ...initialCtxValue, + }); + if (!ctx) { + return [ + mergedProps, + (v) => { + mergedProps.set(v); + }, + ]; + } + ctx.subscribe((ctxValue) => { + const { as_item: merged_as_item } = get(mergedProps); + if (merged_as_item) { + ctxValue = (ctxValue as Record)[merged_as_item]; + } + mergedProps.update((prev) => ({ + ...prev, + ...ctxValue, + })); + }); + + return [ + mergedProps, + (v) => { + const ctxValue = v.as_item ? get(ctx)[v.as_item as keyof T] : get(ctx); + return mergedProps.set({ + ...v, + ...ctxValue, + }); + }, + ]; +} + +const slotKey = '$$ms-gr-antd-slot-key'; + +export function resetSlotKey() { + setContext(slotKey, writable(undefined)); +} +export function setSlotKey(slot: string) { + return setContext(slotKey, writable(slot)); +} +export function getSlotKey() { + return getContext(slotKey) as Writable | undefined; +} + +const componentSlotContextKey = '$$ms-gr-antd-component-slot-context-key'; + +export function setComponentSlotContext({ + slot, + index, + subIndex, +}: { + slot: string | undefined; + index: number | undefined; + subIndex: number | undefined; +}) { + return setContext(componentSlotContextKey, { + slotKey: writable(slot), + slotIndex: writable(index), + subSlotIndex: writable(subIndex), + }); +} +export function getComponentSlotContext() { + return getContext(componentSlotContextKey) as + | { + slotKey: Writable; + slotIndex: Writable; + subSlotIndex: Writable; + } + | undefined; +} diff --git a/frontend/svelte-preprocess-react/sveltify.ts b/frontend/svelte-preprocess-react/sveltify.ts new file mode 100644 index 00000000..7be19c09 --- /dev/null +++ b/frontend/svelte-preprocess-react/sveltify.ts @@ -0,0 +1,88 @@ +import type React from 'react'; +import { createPortal } from 'react-dom'; +// eslint-disable-next-line @typescript-eslint/consistent-type-imports +import { SvelteComponent } from 'svelte'; +import { type Writable, writable } from 'svelte/store'; + +import ReactWrapper from './internal/ReactWrapper.svelte'; +import type { SvelteInit } from './internal/types'; + +export type Sveltified

> = { + new (args: { target: any; props?: P }): SvelteComponent

; +}; + +const rerender = window.ms_globals.rerender; +const tree = window.ms_globals.tree; + +type CommonProps = S extends [] + ? { + slots: {}; + elRef?: React.ForwardedRef; + style?: React.CSSProperties; + className?: string; + id?: string; + } + : { + slots: { + [P in S[number]]?: HTMLElement; + }; + elRef?: React.ForwardedRef; + style?: React.CSSProperties; + className?: string; + id?: string; + }; + +/** + * Convert a React component into a Svelte component. + */ +export function sveltify( + reactComponent: React.ComponentType

> +): + | Promise, 'children'>>> + | Sveltified, 'children'>> { + // svelte components options + function Sveltified(options: any) { + const svelteInstance: Writable = writable(); + const instance = new ReactWrapper({ + ...options, + props: { + svelteInit(init: SvelteInit) { + window.ms_globals.autokey += 1; + const node = { + key: window.ms_globals.autokey, + svelteInstance, + reactComponent, + props: init.props, + slot: init.slot, + target: init.target, + slotIndex: init.slotIndex, + subSlotIndex: init.subSlotIndex, + slotKey: init.slotKey, + nodes: [], + }; + // Here will be two trees on the page, one is the html view and the other is the React context. + const parent = init.parent ?? tree; + parent.nodes = [...parent.nodes, node]; + rerender({ createPortal, node: tree }); + init.onDestroy(() => { + parent.nodes = parent.nodes.filter( + (n) => n.svelteInstance !== svelteInstance + ); + rerender({ createPortal, node: tree }); + }); + return node; + }, + ...options.props, + }, + }); + svelteInstance.set(instance); + + return instance; + } + + return new Promise((resolve) => { + window.ms_globals.initializePromise.then(() => { + resolve(Sveltified as any); + }); + }); +} diff --git a/frontend/svelte-preprocess-react/useStore.ts b/frontend/svelte-preprocess-react/useStore.ts new file mode 100644 index 00000000..2e08f202 --- /dev/null +++ b/frontend/svelte-preprocess-react/useStore.ts @@ -0,0 +1,37 @@ +import { useEffect, useMemo, useState } from 'react'; +import { derived, get, type Readable } from 'svelte/store'; + +/** + * Hook for using Svelte stores in React. + * + * Usage: + * + * const User: React.FC = () => { + * const $user = useStore(userStore); + * return

Hello, {$user.name}

; + * } + */ +export function useStore(store: Readable): T { + const [value, setValue] = useState(() => get(store)); + useEffect(() => { + let first = true; + const cancel = store.subscribe((next) => { + if (first) { + first = false; + if (next === value) { + return; + } + } + setValue(next); + }); + return cancel; + // eslint-disable-next-line react-hooks/exhaustive-deps + }, [store]); + return value; +} + +export function useStores(stores: Readable[]): T[] { + const store = useMemo(() => derived(stores, ($stores) => $stores), [stores]); + return useStore(store); +} +export default useStore; diff --git a/frontend/tsconfig.json b/frontend/tsconfig.json new file mode 100644 index 00000000..81e4b4bb --- /dev/null +++ b/frontend/tsconfig.json @@ -0,0 +1,7 @@ +{ + "extends": ["../tsconfig.json"], + "compilerOptions": { + "module": "ESNext", + "types": ["vite/client"] + } +} diff --git a/frontend/utils/createFunction.ts b/frontend/utils/createFunction.ts new file mode 100644 index 00000000..379b27ca --- /dev/null +++ b/frontend/utils/createFunction.ts @@ -0,0 +1,11 @@ +export function createFunction any>( + target: any +): T | undefined { + try { + return typeof target == 'string' + ? (new Function(`return (...args) => (${target})(...args)`)() as T) + : undefined; + } catch { + return undefined; + } +} diff --git a/frontend/utils/createItemsContext.tsx b/frontend/utils/createItemsContext.tsx new file mode 100644 index 00000000..2dd8e1f3 --- /dev/null +++ b/frontend/utils/createItemsContext.tsx @@ -0,0 +1,86 @@ +import { getContext, setContext } from 'svelte'; +import { type Writable, writable } from 'svelte/store'; + +export type Item = + | ({ + props: Record; + slots: Record< + string, + | HTMLElement + | { + el?: HTMLElement; + // slot key, render args + callback?: (key: string, params: any[]) => void; + clone?: boolean; + } + >; + el?: HTMLElement; + } & { + [K in T]?: Item[]; + }) + | undefined; + +export function createItemsContext(key: string) { + const itemKey = `$$ms-gr-antd-${key}-context-key`; + function getItems( + allowedSlots: T = ['default'] as T + ): { + [key in T[number]]: Writable; + } { + const itemsMap = allowedSlots.reduce( + (acc, slotKey) => { + acc[slotKey as T[number]] = writable([] as V[]); + return acc; + }, + {} as { + [key in T[number]]: Writable; + } + ); + setContext(itemKey, { + itemsMap, + allowedSlots, + }); + return itemsMap; + } + + function getSetItemFn() { + const { itemsMap, allowedSlots } = getContext(itemKey) as { + itemsMap: Record>; + allowedSlots: string[]; + }; + + return function ( + slotKey: string | undefined, + index: number, + value: T + ) { + if (!itemsMap) { + return; + } + if (slotKey) { + itemsMap[slotKey].update((v) => { + const newValue = [...v]; + if (allowedSlots.includes(slotKey)) { + newValue[index] = value; + } else { + newValue[index] = undefined; + } + return newValue; + }); + } else { + if (allowedSlots.includes('default')) { + itemsMap['default'].update((v) => { + const newValue = [...v]; + newValue[index] = value; + return newValue; + }); + } + } + }; + } + + return { + getItems, + getSetItemFn, + }; +} diff --git a/frontend/utils/hooks/useFunction.ts b/frontend/utils/hooks/useFunction.ts new file mode 100644 index 00000000..030ec2fb --- /dev/null +++ b/frontend/utils/hooks/useFunction.ts @@ -0,0 +1,9 @@ +import { useMemo } from 'react'; + +import { createFunction } from '../createFunction'; + +export function useFunction any>(target: any) { + return useMemo(() => { + return createFunction(target); + }, [target]); +} diff --git a/frontend/utils/hooks/useTargets.ts b/frontend/utils/hooks/useTargets.ts new file mode 100644 index 00000000..a9392dc9 --- /dev/null +++ b/frontend/utils/hooks/useTargets.ts @@ -0,0 +1,43 @@ +import { type TreeNode, useStores } from '@svelte-preprocess-react'; +import React, { useMemo } from 'react'; +import { get, type Writable } from 'svelte/store'; + +export function useTargets(children: React.ReactNode, slotKey?: string) { + const $targets = useMemo(() => { + const array = React.Children.toArray(children); + return ( + array as React.ReactElement<{ + node: TreeNode; + nodeSlotKey?: string; + }>[] + ) + .filter((child) => { + return ( + child.props.node && + ((!slotKey && !child.props.nodeSlotKey) || + (slotKey && slotKey === child.props.nodeSlotKey)) + ); + }) + .sort((a, b) => { + if (a.props.node.slotIndex && b.props.node.slotIndex) { + const slotIndexA = get(a.props.node.slotIndex) || 0; + const slotIndexB = get(b.props.node.slotIndex) || 0; + if ( + slotIndexA - slotIndexB === 0 && + a.props.node.subSlotIndex && + b.props.node.subSlotIndex + ) { + return ( + (get(a.props.node.subSlotIndex) || 0) - + (get(b.props.node.subSlotIndex) || 0) + ); + } + return slotIndexA - slotIndexB; + } + return 0; + }) + .map((child) => child.props.node.target) as Writable[]; + }, [children, slotKey]); + const targets = useStores($targets); + return targets; +} diff --git a/frontend/utils/omitUndefinedProps.ts b/frontend/utils/omitUndefinedProps.ts new file mode 100644 index 00000000..16e3f625 --- /dev/null +++ b/frontend/utils/omitUndefinedProps.ts @@ -0,0 +1,10 @@ +export function omitUndefinedProps>( + props: T +): T { + return Object.keys(props).reduce((acc, key) => { + if (props[key] !== undefined) { + acc[key as keyof T] = props[key]; + } + return acc; + }, {} as T); +} diff --git a/frontend/utils/renderItems.tsx b/frontend/utils/renderItems.tsx new file mode 100644 index 00000000..a5f64aea --- /dev/null +++ b/frontend/utils/renderItems.tsx @@ -0,0 +1,79 @@ +import { ReactSlot } from '@svelte-preprocess-react/react-slot'; +import React from 'react'; + +import { type Item } from './createItemsContext'; + +export function renderItems( + items: Item[], + options?: { + children?: string; + fallback?: (item: any) => R; + clone?: boolean; + } +): R[] { + return items.filter(Boolean).map((item) => { + if (typeof item !== 'object') { + if (options?.fallback) { + return options.fallback(item); + } + return item; + } + const result = { + ...item.props, + }; + let current = result; + Object.keys(item.slots).forEach((slotKey) => { + if ( + !item.slots[slotKey] || + (!(item.slots[slotKey] instanceof Element) && !item.slots[slotKey].el) + ) { + return; + } + + const splits = slotKey.split('.'); + splits.forEach((split, index) => { + if (!current[split]) { + current[split] = {}; + } + if (index !== splits.length - 1) { + current = result[split]; + } + }); + const elOrObject = item.slots[slotKey]; + + let el: HTMLElement | undefined; + let callback: ((key: string, params: any[]) => void) | undefined; + let clone = false; + if (elOrObject instanceof Element) { + el = elOrObject; + } else { + el = elOrObject.el; + callback = elOrObject.callback; + clone = elOrObject.clone || false; + } + + current[splits[splits.length - 1]] = el ? ( + callback ? ( + (...args: any[]) => { + callback(splits[splits.length - 1], args); + return ; + } + ) : ( + + ) + ) : ( + current[splits[splits.length - 1]] + ); + + current = result; + }); + const childrenKey = options?.children || 'children'; + if (item[childrenKey as keyof typeof item]) { + result[childrenKey] = renderItems( + item[childrenKey as keyof typeof item] as Item[], + options + ); + } + return result as R; + }) as R[]; +} diff --git a/frontend/utils/renderSlot.tsx b/frontend/utils/renderSlot.tsx new file mode 100644 index 00000000..dc46d5a3 --- /dev/null +++ b/frontend/utils/renderSlot.tsx @@ -0,0 +1,6 @@ +import { ReactSlot } from '@svelte-preprocess-react/react-slot'; +import React from 'react'; + +export function renderSlot(el?: HTMLElement, options?: { clone?: boolean }) { + return el ? : null; +} diff --git a/frontend/utils/styleObject2String.ts b/frontend/utils/styleObject2String.ts new file mode 100644 index 00000000..a19284f9 --- /dev/null +++ b/frontend/utils/styleObject2String.ts @@ -0,0 +1,66 @@ +import type React from 'react'; + +const NO_UNIT_PROP = [ + 'animationIterationCount', + 'borderImageOutset', + 'borderImageSlice', + 'borderImageWidth', + 'boxFlex', + 'boxFlexGroup', + 'boxOrdinalGroup', + 'columnCount', + 'columns', + 'flex', + 'flexGrow', + 'flexPositive', + 'flexShrink', + 'flexNegative', + 'flexOrder', + 'gridArea', + 'gridColumn', + 'gridColumnEnd', + 'gridColumnStart', + 'gridRow', + 'gridRowEnd', + 'gridRowStart', + 'lineClamp', + 'lineHeight', + 'opacity', + 'order', + 'orphans', + 'tabSize', + 'widows', + 'zIndex', + 'zoom', + 'fontWeight', + 'letterSpacing', + 'lineHeight', +]; +export function styleObject2String(styleObj: React.CSSProperties) { + if (!styleObj) { + return ''; + } + return Object.entries(styleObj).reduce((acc, [propName, propValue]) => { + // Convert camelCase to kebab-case and add the value + acc += `${propName.replace(/([a-z\d])([A-Z])/g, '$1-$2').toLowerCase()}: ${typeof propValue === 'number' && !NO_UNIT_PROP.includes(propName) ? propValue + 'px' : propValue};`; + return acc; + }, ''); +} + +export function styleObject2HtmlStyle(styleObj: React.CSSProperties) { + if (!styleObj) { + return {}; + } + return Object.keys(styleObj).reduce( + (acc, next) => { + const value = styleObj[next as keyof React.CSSProperties]; + if (typeof value === 'number' && !NO_UNIT_PROP.includes(next)) { + acc[next] = value + 'px'; + } else { + acc[next] = value; + } + return acc; + }, + {} as Record + ); +} diff --git a/frontend/shared/src/index.ts b/frontend/utils/upload.ts similarity index 100% rename from frontend/shared/src/index.ts rename to frontend/utils/upload.ts diff --git a/package.json b/package.json index f83afb84..2b73f091 100644 --- a/package.json +++ b/package.json @@ -6,12 +6,9 @@ "repository": "git@github.com:modelscope/modelscope-studio.git", "license": "Apache-2.0", "scripts": { - "prepare": "husky || true", + "prepare": "husky", "dev": "gradio cc dev", - "dev:compiled": "pnpm -F '@modelscope-studio/compiled' dev", - "build:compiled": "pnpm -F '@modelscope-studio/compiled' build", - "build": "rimraf dist && pnpm run build:compiled && pnpm -F '@modelscope-studio/flow' build && gradio cc build --no-generate-docs", - "build:pure": "rimraf dist && gradio cc build --no-generate-docs", + "build": "rimraf dist && gradio cc build --no-generate-docs", "lint": "npm-run-all --parallel lint:* && npm run format", "format": "prettier --cache --write '**/*.{js,jsx,tsx,ts,svelte,less,md,yaml,yml,json}' --no-error-on-unmatched-pattern", "lint:js": "eslint . --fix --cache", @@ -29,26 +26,26 @@ "@actions/core": "^1.10.1", "@actions/exec": "^1.1.1", "@actions/github": "^6.0.0", - "@changesets/cli": "^2.27.6", - "@commitlint/cli": "^19.3.0", - "@commitlint/config-conventional": "^19.2.2", - "@manypkg/get-packages": "^2.2.1", + "@changesets/cli": "^2.27.8", + "@commitlint/cli": "^19.5.0", + "@commitlint/config-conventional": "^19.5.0", + "@manypkg/get-packages": "^2.2.2", "@modelscope-studio/changelog": "workspace:*", "@modelscope-studio/lint-config": "workspace:*", - "eslint": "^9.5.0", - "husky": "^9.0.11", - "lint-staged": "^15.2.7", + "eslint": "^9.10.0", + "husky": "^9.1.6", + "lint-staged": "^15.2.10", "node-fetch": "^3.3.2", "npm-run-all": "^4.1.5", - "prettier": "^3.3.2", - "prettier-plugin-packagejson": "^2.5.0", - "prettier-plugin-svelte": "^3.2.5", - "rimraf": "^5.0.7", - "stylelint": "^16.6.1", - "svelte": "^4.2.18", - "tslib": "^2.6.3", - "tsx": "^4.15.7", - "typescript": "^5.5.2" + "prettier": "^3.3.3", + "prettier-plugin-packagejson": "^2.5.2", + "prettier-plugin-svelte": "^3.2.6", + "rimraf": "^6.0.1", + "stylelint": "^16.9.0", + "svelte": "^4.2.19", + "tslib": "^2.7.0", + "tsx": "^4.19.1", + "typescript": "^5.6.2" }, "main_changeset": true } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 496b15b9..bff8bed6 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -18,17 +18,17 @@ importers: specifier: ^6.0.0 version: 6.0.0 '@changesets/cli': - specifier: ^2.27.6 - version: 2.27.6 + specifier: ^2.27.8 + version: 2.27.8 '@commitlint/cli': - specifier: ^19.3.0 - version: 19.3.0(@types/node@20.14.9)(typescript@5.5.2) + specifier: ^19.5.0 + version: 19.5.0(@types/node@22.5.4)(typescript@5.6.2) '@commitlint/config-conventional': - specifier: ^19.2.2 - version: 19.2.2 + specifier: ^19.5.0 + version: 19.5.0 '@manypkg/get-packages': - specifier: ^2.2.1 - version: 2.2.1 + specifier: ^2.2.2 + version: 2.2.2 '@modelscope-studio/changelog': specifier: workspace:* version: link:config/changelog @@ -36,14 +36,14 @@ importers: specifier: workspace:* version: link:config/lint-config eslint: - specifier: ^9.5.0 - version: 9.5.0 + specifier: ^9.10.0 + version: 9.10.0(jiti@1.21.6) husky: - specifier: ^9.0.11 - version: 9.0.11 + specifier: ^9.1.6 + version: 9.1.6 lint-staged: - specifier: ^15.2.7 - version: 15.2.7 + specifier: ^15.2.10 + version: 15.2.10 node-fetch: specifier: ^3.3.2 version: 3.3.2 @@ -51,32 +51,32 @@ importers: specifier: ^4.1.5 version: 4.1.5 prettier: - specifier: ^3.3.2 - version: 3.3.2 + specifier: ^3.3.3 + version: 3.3.3 prettier-plugin-packagejson: - specifier: ^2.5.0 - version: 2.5.0(prettier@3.3.2) + specifier: ^2.5.2 + version: 2.5.2(prettier@3.3.3) prettier-plugin-svelte: - specifier: ^3.2.5 - version: 3.2.5(prettier@3.3.2)(svelte@4.2.18) + specifier: ^3.2.6 + version: 3.2.6(prettier@3.3.3)(svelte@4.2.19) rimraf: - specifier: ^5.0.7 - version: 5.0.7 + specifier: ^6.0.1 + version: 6.0.1 stylelint: - specifier: ^16.6.1 - version: 16.6.1(typescript@5.5.2) + specifier: ^16.9.0 + version: 16.9.0(typescript@5.6.2) svelte: - specifier: ^4.2.18 - version: 4.2.18 + specifier: ^4.2.19 + version: 4.2.19 tslib: - specifier: ^2.6.3 - version: 2.6.3 + specifier: ^2.7.0 + version: 2.7.0 tsx: - specifier: ^4.15.7 - version: 4.15.7 + specifier: ^4.19.1 + version: 4.19.1 typescript: - specifier: ^5.5.2 - version: 5.5.2 + specifier: ^5.6.2 + version: 5.6.2 config/changelog: dependencies: @@ -84,8 +84,8 @@ importers: specifier: ^0.6.0 version: 0.6.0 '@manypkg/get-packages': - specifier: ^2.2.1 - version: 2.2.1 + specifier: ^2.2.2 + version: 2.2.2 detect-indent: specifier: ^7.0.1 version: 7.0.1 @@ -94,62 +94,62 @@ importers: specifier: ^6.0.0 version: 6.0.0 '@types/node': - specifier: ^20.14.9 - version: 20.14.9 + specifier: ^22.5.4 + version: 22.5.4 tsup: - specifier: ^8.1.0 - version: 8.1.0(@microsoft/api-extractor@7.47.0(@types/node@20.14.9))(@swc/core@1.6.5)(postcss@8.4.38)(ts-node@10.9.2(@swc/core@1.6.5)(@types/node@20.14.9)(typescript@5.5.2))(typescript@5.5.2) + specifier: ^8.2.4 + version: 8.2.4(@microsoft/api-extractor@7.47.9(@types/node@22.5.4))(@swc/core@1.7.26)(jiti@1.21.6)(postcss@8.4.45)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.5.1) config/lint-config: dependencies: '@eslint/compat': - specifier: ^1.1.0 - version: 1.1.0 + specifier: ^1.1.1 + version: 1.1.1 '@eslint/js': - specifier: ^9.5.0 - version: 9.5.0 + specifier: ^9.7.0 + version: 9.10.0 '@typescript-eslint/parser': - specifier: ^7.14.1 - version: 7.14.1(eslint@9.5.0)(typescript@5.5.2) + specifier: ^8.5.0 + version: 8.5.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2) eslint-config-prettier: specifier: ^9.0.0 - version: 9.1.0(eslint@9.5.0) + version: 9.1.0(eslint@9.10.0(jiti@1.21.6)) eslint-import-resolver-typescript: specifier: ^3.6.0 - version: 3.6.1(@typescript-eslint/parser@7.14.1(eslint@9.5.0)(typescript@5.5.2))(eslint-plugin-import@2.29.1)(eslint@9.5.0) + version: 3.6.3(@typescript-eslint/parser@8.5.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2))(eslint-plugin-import@2.30.0)(eslint@9.10.0(jiti@1.21.6)) eslint-plugin-import: specifier: ^2.29.1 - version: 2.29.1(@typescript-eslint/parser@7.14.1(eslint@9.5.0)(typescript@5.5.2))(eslint-import-resolver-typescript@3.6.1)(eslint@9.5.0) + version: 2.30.0(@typescript-eslint/parser@8.5.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2))(eslint-import-resolver-typescript@3.6.3)(eslint@9.10.0(jiti@1.21.6)) eslint-plugin-jsx-a11y: specifier: ^6.9.0 - version: 6.9.0(eslint@9.5.0) + version: 6.10.0(eslint@9.10.0(jiti@1.21.6)) eslint-plugin-prettier: - specifier: 5.1.3 - version: 5.1.3(@types/eslint@8.56.10)(eslint-config-prettier@9.1.0(eslint@9.5.0))(eslint@9.5.0)(prettier@3.3.2) + specifier: 5.2.1 + version: 5.2.1(@types/eslint@9.6.1)(eslint-config-prettier@9.1.0(eslint@9.10.0(jiti@1.21.6)))(eslint@9.10.0(jiti@1.21.6))(prettier@3.3.3) eslint-plugin-react: - specifier: ^7.34.3 - version: 7.34.3(eslint@9.5.0) + specifier: ^7.36.1 + version: 7.36.1(eslint@9.10.0(jiti@1.21.6)) eslint-plugin-react-hooks: specifier: ^4.6.2 - version: 4.6.2(eslint@9.5.0) + version: 4.6.2(eslint@9.10.0(jiti@1.21.6)) eslint-plugin-react-refresh: - specifier: ^0.4.7 - version: 0.4.7(eslint@9.5.0) + specifier: ^0.4.8 + version: 0.4.11(eslint@9.10.0(jiti@1.21.6)) eslint-plugin-simple-import-sort: specifier: ^12.1.0 - version: 12.1.0(eslint@9.5.0) + version: 12.1.1(eslint@9.10.0(jiti@1.21.6)) eslint-plugin-svelte: - specifier: ^2.41.0 - version: 2.41.0(eslint@9.5.0)(svelte@4.2.18)(ts-node@10.9.2(@types/node@20.14.9)(typescript@5.5.2)) + specifier: ^2.42.0 + version: 2.43.0(eslint@9.10.0(jiti@1.21.6))(svelte@4.2.19)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@22.5.4)(typescript@5.6.2)) globals: specifier: ^15.6.0 - version: 15.6.0 + version: 15.9.0 postcss: specifier: ^8.4.38 - version: 8.4.38 + version: 8.4.45 postcss-less: specifier: ^6.0.0 - version: 6.0.0(postcss@8.4.38) + version: 6.0.0(postcss@8.4.45) stylelint-config-ali: specifier: ^2.1.1 version: 2.1.1(stylelint@9.10.1) @@ -166,231 +166,316 @@ importers: specifier: ^6.0.4 version: 6.0.4(stylelint@9.10.1) stylelint-prettier: - specifier: ^5.0.0 - version: 5.0.0(prettier@3.3.2)(stylelint@9.10.1) + specifier: ^5.0.2 + version: 5.0.2(prettier@3.3.3)(stylelint@9.10.1) svelte-eslint-parser: - specifier: ^0.39.2 - version: 0.39.2(svelte@4.2.18) + specifier: ^0.41.0 + version: 0.41.0(svelte@4.2.19) typescript-eslint: - specifier: ^7.14.1 - version: 7.14.1(eslint@9.5.0)(typescript@5.5.2) + specifier: ^8.5.0 + version: 8.5.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2) devDependencies: '@types/eslint': - specifier: ^8.56.10 - version: 8.56.10 + specifier: ^9.6.1 + version: 9.6.1 '@types/eslint__js': specifier: ^8.42.3 version: 8.42.3 frontend: - devDependencies: - '@gradio/preview': - specifier: 0.9.1 - version: 0.9.1(@babel/core@7.24.7)(@types/node@20.14.9)(less@4.2.0)(postcss-load-config@4.0.2(postcss@8.4.38))(postcss@8.4.38)(rollup@4.18.0)(svelte@4.2.18) - - frontend/Chatbot: dependencies: + '@ant-design/cssinjs': + specifier: ^1.21.1 + version: 1.21.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@ant-design/icons': + specifier: ^5.4.0 + version: 5.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@gradio/atoms': specifier: 0.7.4 - version: 0.7.4(svelte@4.2.18) + version: 0.7.4(svelte@4.2.19) + '@gradio/button': + specifier: ^0.2.43 + version: 0.2.43(svelte@4.2.19) '@gradio/client': - specifier: 1.1.1 - version: 1.1.1 + specifier: ^1.5.2 + version: 1.5.2 '@gradio/icons': specifier: 0.4.1 version: 0.4.1 '@gradio/statustracker': - specifier: 0.6.0 - version: 0.6.0(svelte@4.2.18) + specifier: ^0.7.6 + version: 0.7.6(svelte@4.2.19) '@gradio/utils': - specifier: 0.4.2 - version: 0.4.2(svelte@4.2.18) - '@modelscope-studio/compiled': - specifier: workspace:* - version: link:../compiled - '@modelscope-studio/shared': - specifier: workspace:* - version: link:../shared - dequal: - specifier: ^2.0.3 - version: 2.0.3 + specifier: 0.6.1 + version: 0.6.1(svelte@4.2.19) + antd: + specifier: ^5.19.2 + version: 5.20.6(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + classnames: + specifier: ^2.5.1 + version: 2.5.1 + dayjs: + specifier: ^1.11.12 + version: 1.11.13 + immer: + specifier: ^10.1.1 + version: 10.1.1 + lodash-es: + specifier: ^4.17.21 + version: 4.17.21 + react: + specifier: ^18.3.1 + version: 18.3.1 + react-dom: + specifier: ^18.3.1 + version: 18.3.1(react@18.3.1) + svelte: + specifier: ^4.2.19 + version: 4.2.19 + svelte-i18n: + specifier: ^4.0.0 + version: 4.0.0(svelte@4.2.19) + wavesurfer.js: + specifier: ^7.8.0 + version: 7.8.0 devDependencies: + '@babel/core': + specifier: ^7.24.9 + version: 7.25.2 '@gradio/preview': - specifier: 0.9.1 - version: 0.9.1(@babel/core@7.24.7)(@types/node@20.14.9)(less@4.2.0)(postcss-load-config@4.0.2(postcss@8.4.38))(postcss@8.4.38)(rollup@4.18.0)(svelte@4.2.18) + specifier: 0.10.1 + version: 0.10.1(@babel/core@7.25.2)(@types/node@18.19.50)(less@4.2.0)(postcss-load-config@3.1.4(postcss@8.4.45)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@18.19.50)(typescript@5.5.4)))(postcss@8.4.45)(rollup@4.21.2)(svelte@4.2.19) + '@gradio/upload': + specifier: 0.11.2 + version: 0.11.2(svelte@4.2.19) + '@types/babel__core': + specifier: ^7.20.5 + version: 7.20.5 + '@types/lodash-es': + specifier: ^4.17.12 + version: 4.17.12 + '@types/react': + specifier: ^18.3.5 + version: 18.3.5 + '@types/react-dom': + specifier: ^18.3.0 + version: 18.3.0 + '@vitejs/plugin-react-swc': + specifier: ^3.7.0 + version: 3.7.0(vite@5.4.4(@types/node@18.19.50)(less@4.2.0)(lightningcss@1.27.0)(sass@1.78.0)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.45))) + dequal: + specifier: ^2.0.2 + version: 2.0.3 + less: + specifier: ^4.2.0 + version: 4.2.0 + typescript-json-schema: + specifier: ^0.65.1 + version: 0.65.1(@swc/core@1.7.26) + vite: + specifier: ^5.3.4 + version: 5.4.4(@types/node@18.19.50)(less@4.2.0)(lightningcss@1.27.0)(sass@1.78.0)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.45)) + + frontend/antd/affix: {} + + frontend/antd/alert: {} + + frontend/antd/anchor: {} + + frontend/antd/auto-complete: {} + + frontend/antd/avatar: {} + + frontend/antd/badge: {} + + frontend/antd/breadcrumb: {} + + frontend/antd/button: {} + + frontend/antd/calendar: {} + + frontend/antd/card: {} + + frontend/antd/carousel: {} + + frontend/antd/cascader: {} + + frontend/antd/checkbox: {} + + frontend/antd/collapse: {} + + frontend/antd/color-picker: {} + + frontend/antd/config-provider: {} + + frontend/antd/date-picker: {} + + frontend/antd/descriptions: {} + + frontend/antd/divider: {} + + frontend/antd/drawer: {} + + frontend/antd/dropdown: {} + + frontend/antd/empty: {} + + frontend/antd/flex: {} + + frontend/antd/float-button: {} + + frontend/antd/form: {} + + frontend/antd/icon: {} + + frontend/antd/image: {} + + frontend/antd/input: {} + + frontend/antd/input-number: {} + + frontend/antd/layout: {} + + frontend/antd/list: {} + + frontend/antd/mentions: {} + + frontend/antd/menu: {} + + frontend/antd/message: {} + + frontend/antd/modal: {} + + frontend/antd/notification: {} - frontend/Flow: + frontend/antd/pagination: {} + + frontend/antd/popconfirm: {} + + frontend/antd/popover: {} + + frontend/antd/progress: {} + + frontend/antd/qr-code: {} + + frontend/antd/radio: {} + + frontend/antd/rate: {} + + frontend/antd/result: {} + + frontend/antd/segmented: {} + + frontend/antd/select: {} + + frontend/antd/skeleton: {} + + frontend/antd/slider: {} + + frontend/antd/space: {} + + frontend/antd/spin: {} + + frontend/antd/statistic: {} + + frontend/antd/steps: {} + + frontend/antd/switch: {} + + frontend/antd/table: {} + + frontend/antd/tabs: {} + + frontend/antd/tag: {} + + frontend/antd/time-picker: {} + + frontend/antd/timeline: {} + + frontend/antd/tooltip: {} + + frontend/antd/tour: {} + + frontend/antd/transfer: {} + + frontend/antd/tree: {} + + frontend/antd/tree-select: {} + + frontend/antd/upload: {} + + frontend/antd/watermark: {} + + frontend/base/application: {} + + frontend/base/div: {} + + frontend/base/each: {} + + frontend/base/filter: {} + + frontend/base/fragment: {} + + frontend/base/slot: {} + + frontend/base/span: {} + + frontend/base/text: {} + + frontend/legacy/Chatbot: dependencies: - '@gradio/atoms': - specifier: 0.7.4 - version: 0.7.4(svelte@4.2.18) - '@gradio/client': - specifier: 1.1.1 - version: 1.1.1 - '@gradio/icons': - specifier: 0.4.1 - version: 0.4.1 - '@gradio/statustracker': - specifier: 0.6.0 - version: 0.6.0(svelte@4.2.18) - '@gradio/utils': - specifier: 0.4.2 - version: 0.4.2(svelte@4.2.18) - '@modelscope-studio/compiled': + '@modelscope-studio/legacy-compiled': specifier: workspace:* version: link:../compiled - '@modelscope-studio/shared': - specifier: workspace:* - version: link:../shared - devDependencies: - '@gradio/preview': - specifier: 0.9.1 - version: 0.9.1(@babel/core@7.24.7)(@types/node@16.18.101)(less@4.2.0)(postcss-load-config@4.0.2(postcss@8.4.38))(postcss@8.4.38)(rollup@4.18.0)(svelte@4.2.18) - typescript-json-schema: - specifier: ^0.64.0 - version: 0.64.0(@swc/core@1.6.5) - frontend/Lifecycle: + frontend/legacy/Flow: dependencies: - '@gradio/utils': - specifier: 0.4.2 - version: 0.4.2(svelte@4.2.18) - svelte-i18n: - specifier: ^4.0.0 - version: 4.0.0(svelte@4.2.18) - devDependencies: - '@gradio/preview': - specifier: 0.9.1 - version: 0.9.1(@babel/core@7.24.7)(@types/node@20.14.9)(less@4.2.0)(postcss-load-config@4.0.2(postcss@8.4.38))(postcss@8.4.38)(rollup@4.18.0)(svelte@4.2.18) - - frontend/Markdown: - dependencies: - '@gradio/atoms': - specifier: 0.7.4 - version: 0.7.4(svelte@4.2.18) - '@gradio/statustracker': - specifier: 0.6.0 - version: 0.6.0(svelte@4.2.18) - '@gradio/utils': - specifier: 0.4.2 - version: 0.4.2(svelte@4.2.18) - '@modelscope-studio/compiled': + '@modelscope-studio/legacy-compiled': specifier: workspace:* version: link:../compiled - devDependencies: - '@gradio/preview': - specifier: 0.9.1 - version: 0.9.1(@babel/core@7.24.7)(@types/node@20.14.9)(less@4.2.0)(postcss-load-config@4.0.2(postcss@8.4.38))(postcss@8.4.38)(rollup@4.18.0)(svelte@4.2.18) - frontend/MultimodalInput: + frontend/legacy/Lifecycle: {} + + frontend/legacy/Markdown: dependencies: - '@gradio/atoms': - specifier: 0.7.4 - version: 0.7.4(svelte@4.2.18) - '@gradio/button': - specifier: ^0.2.43 - version: 0.2.43(svelte@4.2.18) - '@gradio/client': - specifier: 1.1.1 - version: 1.1.1 - '@gradio/icons': - specifier: 0.4.1 - version: 0.4.1 - '@gradio/statustracker': - specifier: 0.6.0 - version: 0.6.0(svelte@4.2.18) - '@gradio/utils': - specifier: 0.4.2 - version: 0.4.2(svelte@4.2.18) - '@modelscope-studio/compiled': + '@modelscope-studio/legacy-compiled': specifier: workspace:* version: link:../compiled - '@modelscope-studio/shared': - specifier: workspace:* - version: link:../shared - wavesurfer.js: - specifier: ^7.8.0 - version: 7.8.0 - devDependencies: - '@gradio/preview': - specifier: 0.9.1 - version: 0.9.1(@babel/core@7.24.7)(@types/node@20.14.9)(less@4.2.0)(postcss-load-config@4.0.2(postcss@8.4.38))(postcss@8.4.38)(rollup@4.18.0)(svelte@4.2.18) - frontend/WaterfallGallery: + frontend/legacy/MultimodalInput: dependencies: - '@gradio/atoms': - specifier: 0.7.4 - version: 0.7.4(svelte@4.2.18) - '@gradio/button': - specifier: ^0.2.43 - version: 0.2.43(svelte@4.2.18) - '@gradio/client': - specifier: 1.1.1 - version: 1.1.1 - '@gradio/icons': - specifier: 0.4.1 - version: 0.4.1 - '@gradio/statustracker': - specifier: 0.6.0 - version: 0.6.0(svelte@4.2.18) - '@gradio/upload': - specifier: 0.11.2 - version: 0.11.2(svelte@4.2.18) - '@gradio/utils': - specifier: 0.4.2 - version: 0.4.2(svelte@4.2.18) - '@modelscope-studio/shared': + '@modelscope-studio/legacy-compiled': specifier: workspace:* - version: link:../shared - dequal: - specifier: ^2.0.2 - version: 2.0.3 - devDependencies: - '@gradio/preview': - specifier: 0.9.1 - version: 0.9.1(@babel/core@7.24.7)(@types/node@20.14.9)(less@4.2.0)(postcss-load-config@4.0.2(postcss@8.4.38))(postcss@8.4.38)(rollup@4.18.0)(svelte@4.2.18) + version: link:../compiled - frontend/compiled: + frontend/legacy/WaterfallGallery: {} + + frontend/legacy/compiled: dependencies: - '@ant-design/cssinjs': - specifier: ^1.21.0 - version: 1.21.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@ant-design/icons': - specifier: ^5.3.7 - version: 5.3.7(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@gradio/client': - specifier: 1.1.1 - version: 1.1.1 '@subscribe-kit/core': specifier: ^2.1.1 - version: 2.1.1(typescript@5.5.2) + version: 2.1.1(typescript@5.6.2) '@subscribe-kit/react': specifier: ^2.1.1 - version: 2.1.1(@subscribe-kit/core@2.1.1(typescript@5.5.2))(react@18.3.1)(typescript@5.5.2) + version: 2.1.1(@subscribe-kit/core@2.1.1(typescript@5.6.2))(react@18.3.1)(typescript@5.6.2) '@ungap/structured-clone': specifier: ^1.2.0 version: 1.2.0 '@xyflow/react': - specifier: 12.0.0-next.24 - version: 12.0.0-next.24(@types/react@18.3.3)(immer@10.1.1)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + specifier: 12.3.0 + version: 12.3.0(@types/react@18.3.5)(immer@10.1.1)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) ajv: - specifier: ^8.16.0 - version: 8.16.0 + specifier: ^8.17.1 + version: 8.17.1 ajv-i18n: specifier: ^4.2.0 - version: 4.2.0(ajv@8.16.0) - antd: - specifier: ^5.18.3 - version: 5.18.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - classnames: - specifier: ^2.5.1 - version: 2.5.1 + version: 4.2.0(ajv@8.17.1) deepmerge: specifier: ^4.3.1 version: 4.3.1 echarts: - specifier: ^5.5.0 - version: 5.5.0 + specifier: ^5.5.1 + version: 5.5.1 elkjs: specifier: ^0.9.3 version: 0.9.3 @@ -404,29 +489,20 @@ importers: specifier: ^9.0.0 version: 9.0.0 katex: - specifier: ^0.16.10 - version: 0.16.10 - lodash-es: - specifier: ^4.17.21 - version: 4.17.21 + specifier: ^0.16.11 + version: 0.16.11 pdfjs-dist: specifier: ^3.11.174 version: 3.11.174 - react: - specifier: ^18.3.1 - version: 18.3.1 - react-dom: - specifier: ^18.3.1 - version: 18.3.1(react@18.3.1) react-markdown: specifier: ^9.0.1 - version: 9.0.1(@types/react@18.3.3)(react@18.3.1) + version: 9.0.1(@types/react@18.3.5)(react@18.3.1) react-syntax-highlighter: specifier: ^15.5.0 version: 15.5.0(react@18.3.1) rehype-katex: - specifier: ^7.0.0 - version: 7.0.0 + specifier: ^7.0.1 + version: 7.0.1 rehype-raw: specifier: ^7.0.0 version: 7.0.0 @@ -442,9 +518,6 @@ importers: remark-math: specifier: ^6.0.0 version: 6.0.0 - svelte-i18n: - specifier: ^4.0.0 - version: 4.0.0(svelte@4.2.18) unist-util-position: specifier: ^5.0.0 version: 5.0.0 @@ -452,48 +525,9 @@ importers: specifier: ^5.0.0 version: 5.0.0 devDependencies: - '@babel/core': - specifier: ^7.24.7 - version: 7.24.7 - '@babel/types': - specifier: ^7.24.7 - version: 7.24.7 - '@types/babel__core': - specifier: ^7.20.5 - version: 7.20.5 - '@types/lodash-es': - specifier: ^4.17.12 - version: 4.17.12 - '@types/react': - specifier: ^18.3.3 - version: 18.3.3 - '@types/react-dom': - specifier: ^18.3.0 - version: 18.3.0 '@types/react-syntax-highlighter': specifier: ^15.5.13 version: 15.5.13 - '@vitejs/plugin-react-swc': - specifier: ^3.7.0 - version: 3.7.0(vite@5.3.1(@types/node@20.14.9)(less@4.2.0)(lightningcss@1.25.1)(sass@1.77.6)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.38))) - less: - specifier: ^4.2.0 - version: 4.2.0 - vite: - specifier: ^5.3.1 - version: 5.3.1(@types/node@20.14.9)(less@4.2.0)(lightningcss@1.25.1)(sass@1.77.6)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.38)) - vite-plugin-dts: - specifier: ^3.9.1 - version: 3.9.1(@types/node@20.14.9)(rollup@4.18.0)(typescript@5.5.2)(vite@5.3.1(@types/node@20.14.9)(less@4.2.0)(lightningcss@1.25.1)(sass@1.77.6)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.38))) - vite-plugin-lib-inject-css: - specifier: ^2.1.1 - version: 2.1.1(vite@5.3.1(@types/node@20.14.9)(less@4.2.0)(lightningcss@1.25.1)(sass@1.77.6)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.38))) - - frontend/shared: - dependencies: - '@gradio/client': - specifier: 1.1.1 - version: 1.1.1 packages: @@ -519,20 +553,30 @@ packages: resolution: {integrity: sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==} engines: {node: '>=6.0.0'} - '@ant-design/colors@7.0.2': - resolution: {integrity: sha512-7KJkhTiPiLHSu+LmMJnehfJ6242OCxSlR3xHVBecYxnMW8MS/878NXct1GqYARyL59fyeFdKRxXTfvR9SnDgJg==} + '@ant-design/colors@7.1.0': + resolution: {integrity: sha512-MMoDGWn1y9LdQJQSHiCC20x3uZ3CwQnv9QMz6pCmJOrqdgM9YxsoVVY0wtrdXbmfSgnV0KNk6zi09NAhMR2jvg==} + + '@ant-design/cssinjs-utils@1.0.3': + resolution: {integrity: sha512-BrztZZKuoYcJK8uEH40ylBemf/Mu/QPiDos56g2bv6eUoniQkgQHOCOvA3+pncoFO1TaS8xcUCIqGzDA0I+ZVQ==} + peerDependencies: + react: '>=16.9.0' + react-dom: '>=16.9.0' - '@ant-design/cssinjs@1.21.0': - resolution: {integrity: sha512-gIilraPl+9EoKdYxnupxjHB/Q6IHNRjEXszKbDxZdsgv4sAZ9pjkCq8yanDWNvyfjp4leir2OVAJm0vxwKK8YA==} + '@ant-design/cssinjs@1.21.1': + resolution: {integrity: sha512-tyWnlK+XH7Bumd0byfbCiZNK43HEubMoCcu9VxwsAwiHdHTgWa+tMN0/yvxa+e8EzuFP1WdUNNPclRpVtD33lg==} peerDependencies: react: '>=16.0.0' react-dom: '>=16.0.0' + '@ant-design/fast-color@2.0.6': + resolution: {integrity: sha512-y2217gk4NqL35giHl72o6Zzqji9O7vHh9YmhUVkPtAOpoTCH4uWxo/pr4VE8t0+ChEPs0qo4eJRC5Q1eXWo3vA==} + engines: {node: '>=8.x'} + '@ant-design/icons-svg@4.4.2': resolution: {integrity: sha512-vHbT+zJEVzllwP+CM+ul7reTEfBR0vgxFe7+lREAsAA7YGsYpboiq2sQNeQeRvh09GfQgs/GyFEvZpJ9cLXpXA==} - '@ant-design/icons@5.3.7': - resolution: {integrity: sha512-bCPXTAg66f5bdccM4TT21SQBDO1Ek2gho9h3nO9DAKXJP4sq+5VBjrQMSxMVXSB3HyEz+cUbHQ5+6ogxCOpaew==} + '@ant-design/icons@5.4.0': + resolution: {integrity: sha512-QZbWC5xQYexCI5q4/fehSEkchJr5UGtvAJweT743qKUQQGs9IH2DehNLP49DJ3Ii9m9CijD2HN6fNy3WKhIFdA==} engines: {node: '>=8'} peerDependencies: react: '>=16.0.0' @@ -543,100 +587,32 @@ packages: peerDependencies: react: '>=16.9.0' - '@ast-grep/napi-darwin-arm64@0.22.3': - resolution: {integrity: sha512-BD2uyj9UVii04G6YivQArwoeUvOhMFU+MHw5kbLdc0IBncAru65qOg/I6D/ggEAZIgfyw8e2b6ch4ywbIhMnZw==} - engines: {node: '>= 10'} - cpu: [arm64] - os: [darwin] - - '@ast-grep/napi-darwin-x64@0.22.3': - resolution: {integrity: sha512-w0kw+YYAjDW6Q5EB4I+hSU4Ax9FVxVDlPeZi3h94pRIgNjRMD8SjG/aglNImzPOACDp3bZg8m26iMc9RbZaduQ==} - engines: {node: '>= 10'} - cpu: [x64] - os: [darwin] - - '@ast-grep/napi-linux-arm64-gnu@0.22.3': - resolution: {integrity: sha512-859+EcrYLhmCCsBcQZtP3frNXgdxjyAT2zSJ0/QWVweJ//ArlW+lUf+smmp/4KZeWSZglFNRj5EYvcwUPJj6JA==} - engines: {node: '>= 10'} - cpu: [arm64] - os: [linux] - - '@ast-grep/napi-linux-x64-gnu@0.22.3': - resolution: {integrity: sha512-amc+61OeDXguX7ZV5V4JCmtPw4Thcr8zIvmnUozP3vFhO/QCql3t8rjxt2kifqPgoGbYIwW7sTIhtpA4CBxUbw==} - engines: {node: '>= 10'} - cpu: [x64] - os: [linux] - - '@ast-grep/napi-linux-x64-musl@0.22.3': - resolution: {integrity: sha512-GmG4D7HTg5gPD0LT27WsOIIsOHZazcZ8nIlylVVN27WrxhVchLU+3fnybchgANbx7ojnMce/xWhKgP29vrseIA==} - engines: {node: '>= 10'} - cpu: [x64] - os: [linux] - - '@ast-grep/napi-win32-arm64-msvc@0.22.3': - resolution: {integrity: sha512-mJAZdQwFwLtNON6pUbwTfrw6+iKelvBCZGd38TAPC0b3zapwdY7z7oVp8KfENy32eHh4OsBiGeN3CpsKaTeT5Q==} - engines: {node: '>= 10'} - cpu: [arm64] - os: [win32] - - '@ast-grep/napi-win32-ia32-msvc@0.22.3': - resolution: {integrity: sha512-hJLvg9gSYh+GjNIol8ukgOWYnfpo4sIT+D0ExOZU/KgFDwhrTXZK/gBOKyO1IefzBl9GOjrjvaKxp8TItewM7Q==} - engines: {node: '>= 10'} - cpu: [ia32] - os: [win32] - - '@ast-grep/napi-win32-x64-msvc@0.22.3': - resolution: {integrity: sha512-JnJctkkGmX6MX/aI6fJ2wK4fnPSftiqZ1fUsiPLWaBnnjvJe+ibvIByUp3sigZiStDEsjUdQ5KUDF2n9CVShyw==} - engines: {node: '>= 10'} - cpu: [x64] - os: [win32] - - '@ast-grep/napi@0.22.3': - resolution: {integrity: sha512-Viv/PQo4H6heDt0lQ6R0S8INpHhvmhm3MAXCBhMNZbsrrW8hdd9zxJ0rfSgv7jUFqRqRLCxA0crO2ObeMlySjQ==} - engines: {node: '>= 10'} - - '@babel/code-frame@7.24.2': - resolution: {integrity: sha512-y5+tLQyV8pg3fsiln67BVLD1P13Eg4lh5RW9mF0zUuvLrv9uIQ4MCL+CRT+FTsBlBjcIan6PGsLcBN0m3ClUyQ==} - engines: {node: '>=6.9.0'} - '@babel/code-frame@7.24.7': resolution: {integrity: sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA==} engines: {node: '>=6.9.0'} - '@babel/compat-data@7.24.7': - resolution: {integrity: sha512-qJzAIcv03PyaWqxRgO4mSU3lihncDT296vnyuE2O8uA4w3UHWI4S3hgeZd1L8W1Bft40w9JxJ2b412iDUFFRhw==} - engines: {node: '>=6.9.0'} - - '@babel/core@7.24.7': - resolution: {integrity: sha512-nykK+LEK86ahTkX/3TgauT0ikKoNCfKHEaZYTUVupJdTLzGNvrblu4u6fa7DhZONAltdf8e662t/abY8idrd/g==} + '@babel/compat-data@7.25.4': + resolution: {integrity: sha512-+LGRog6RAsCJrrrg/IO6LGmpphNe5DiK30dGjCoxxeGv49B10/3XYGxPsAwrDlMFcFEvdAUavDT8r9k/hSyQqQ==} engines: {node: '>=6.9.0'} - '@babel/generator@7.24.7': - resolution: {integrity: sha512-oipXieGC3i45Y1A41t4tAqpnEZWgB/lC6Ehh6+rOviR5XWpTtMmLN+fGjz9vOiNRt0p6RtO6DtD0pdU3vpqdSA==} + '@babel/core@7.25.2': + resolution: {integrity: sha512-BBt3opiCOxUr9euZ5/ro/Xv8/V7yJ5bjYMqG/C1YAo8MIKAnumZalCN+msbci3Pigy4lIQfPUpfMM27HMGaYEA==} engines: {node: '>=6.9.0'} - '@babel/helper-compilation-targets@7.24.7': - resolution: {integrity: sha512-ctSdRHBi20qWOfy27RUb4Fhp07KSJ3sXcuSvTrXrc4aG8NSYDo1ici3Vhg9bg69y5bj0Mr1lh0aeEgTvc12rMg==} + '@babel/generator@7.25.6': + resolution: {integrity: sha512-VPC82gr1seXOpkjAAKoLhP50vx4vGNlF4msF64dSFq1P8RfB+QAuJWGHPXXPc8QyfVWwwB/TNNU4+ayZmHNbZw==} engines: {node: '>=6.9.0'} - '@babel/helper-environment-visitor@7.24.7': - resolution: {integrity: sha512-DoiN84+4Gnd0ncbBOM9AZENV4a5ZiL39HYMyZJGZ/AZEykHYdJw0wW3kdcsh9/Kn+BRXHLkkklZ51ecPKmI1CQ==} - engines: {node: '>=6.9.0'} - - '@babel/helper-function-name@7.24.7': - resolution: {integrity: sha512-FyoJTsj/PEUWu1/TYRiXTIHc8lbw+TDYkZuoE43opPS5TrI7MyONBE1oNvfguEXAD9yhQRrVBnXdXzSLQl9XnA==} - engines: {node: '>=6.9.0'} - - '@babel/helper-hoist-variables@7.24.7': - resolution: {integrity: sha512-MJJwhkoGy5c4ehfoRyrJ/owKeMl19U54h27YYftT0o2teQ3FJ3nQUf/I3LlJsX4l3qlw7WRXUmiyajvHXoTubQ==} + '@babel/helper-compilation-targets@7.25.2': + resolution: {integrity: sha512-U2U5LsSaZ7TAt3cfaymQ8WHh0pxvdHoEk6HVpaexxixjyEquMh0L0YNJNM6CTGKMXV1iksi0iZkGw4AcFkPaaw==} engines: {node: '>=6.9.0'} '@babel/helper-module-imports@7.24.7': resolution: {integrity: sha512-8AyH3C+74cgCVVXow/myrynrAGv+nTVg5vKu2nZph9x7RcRwzmh0VFallJuFTZ9mx6u4eSdXZfcOzSqTUm0HCA==} engines: {node: '>=6.9.0'} - '@babel/helper-module-transforms@7.24.7': - resolution: {integrity: sha512-1fuJEwIrp+97rM4RWdO+qrRsZlAeL1lQJoPqtCYWv0NL115XM93hIH4CSRln2w52SqvmY5hqdtauB6QFCDiZNQ==} + '@babel/helper-module-transforms@7.25.2': + resolution: {integrity: sha512-BjyRAbix6j/wv83ftcVJmBt72QtHI56C7JXZoG2xATiLpmoC7dpd8WnkikExHDVPpi/3qCmO6WY1EaXOluiecQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 @@ -645,32 +621,20 @@ packages: resolution: {integrity: sha512-zBAIvbCMh5Ts+b86r/CjU+4XGYIs+R1j951gxI3KmmxBMhCg4oQMsv6ZXQ64XOm/cvzfU1FmoCyt6+owc5QMYg==} engines: {node: '>=6.9.0'} - '@babel/helper-split-export-declaration@7.24.7': - resolution: {integrity: sha512-oy5V7pD+UvfkEATUKvIjvIAH/xCzfsFVw7ygW2SI6NClZzquT+mwdTfgfdbUiceh6iQO0CHtCPsyze/MZ2YbAA==} - engines: {node: '>=6.9.0'} - - '@babel/helper-string-parser@7.24.7': - resolution: {integrity: sha512-7MbVt6xrwFQbunH2DNQsAP5sTGxfqQtErvBIvIMi6EQnbgUOuVYanvREcmFrOPhoXBrTtjhhP+lW+o5UfK+tDg==} - engines: {node: '>=6.9.0'} - - '@babel/helper-validator-identifier@7.22.20': - resolution: {integrity: sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==} + '@babel/helper-string-parser@7.24.8': + resolution: {integrity: sha512-pO9KhhRcuUyGnJWwyEgnRJTSIZHiT+vMD0kPeD+so0l7mxkMT19g3pjY9GTnHySck/hDzq+dtW/4VgnMkippsQ==} engines: {node: '>=6.9.0'} '@babel/helper-validator-identifier@7.24.7': resolution: {integrity: sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w==} engines: {node: '>=6.9.0'} - '@babel/helper-validator-option@7.24.7': - resolution: {integrity: sha512-yy1/KvjhV/ZCL+SM7hBrvnZJ3ZuT9OuZgIJAGpPEToANvc3iM6iDvBnRjtElWibHU6n8/LPR/EjX9EtIEYO3pw==} - engines: {node: '>=6.9.0'} - - '@babel/helpers@7.24.7': - resolution: {integrity: sha512-NlmJJtvcw72yRJRcnCmGvSi+3jDEg8qFu3z0AFoymmzLx5ERVWyzd9kVXr7Th9/8yIJi2Zc6av4Tqz3wFs8QWg==} + '@babel/helper-validator-option@7.24.8': + resolution: {integrity: sha512-xb8t9tD1MHLungh/AIoWYN+gVHaB9kwlu8gffXGSt3FFEIT7RjS+xWbc2vUD1UTZdIpKj/ab3rdqJ7ufngyi2Q==} engines: {node: '>=6.9.0'} - '@babel/highlight@7.24.2': - resolution: {integrity: sha512-Yac1ao4flkTxTteCDZLEvdxg2fZfz1v8M4QpaGypq/WPDqg3ijHYbDfs+LG5hvzSoqaSZ9/Z9lKSP3CjZjv+pA==} + '@babel/helpers@7.25.6': + resolution: {integrity: sha512-Xg0tn4HcfTijTwfDwYlvVCl43V6h4KyVVX2aEm4qdO/PC6L2YvzLHFdmxhoeSA3eslcE6+ZVXHgWwopXYLNq4Q==} engines: {node: '>=6.9.0'} '@babel/highlight@7.24.7': @@ -682,38 +646,25 @@ packages: engines: {node: '>=6.0.0'} hasBin: true - '@babel/parser@7.24.5': - resolution: {integrity: sha512-EOv5IK8arwh3LI47dz1b0tKUb/1uhHAnHJOrjgtQMIpu1uXd9mlFrJg9IUgGUgZ41Ch0K8REPTYpO7B76b4vJg==} - engines: {node: '>=6.0.0'} - hasBin: true - - '@babel/parser@7.24.7': - resolution: {integrity: sha512-9uUYRm6OqQrCqQdG1iCBwBPZgN8ciDBro2nIOFaiRz1/BCxaI7CNvQbDHvsArAC7Tw9Hda/B3U+6ui9u4HWXPw==} + '@babel/parser@7.25.6': + resolution: {integrity: sha512-trGdfBdbD0l1ZPmcJ83eNxB9rbEax4ALFTF7fN386TMYbeCQbyme5cOEXQhbGXKebwGaB/J52w1mrklMcbgy6Q==} engines: {node: '>=6.0.0'} hasBin: true - '@babel/runtime@7.24.4': - resolution: {integrity: sha512-dkxf7+hn8mFBwKjs9bvBlArzLVxVbS8usaPUDd5p2a9JCL9tB8OaOVN1isD4+Xyk4ns89/xeOmbQvgdK7IIVdA==} + '@babel/runtime@7.25.6': + resolution: {integrity: sha512-VBj9MYyDb9tuLq7yzqjgzt6Q+IBQLrGZfdjOekyEirZPHxXWoTSGUTMrpsfi58Up73d13NfYLv8HT9vmznjzhQ==} engines: {node: '>=6.9.0'} - '@babel/runtime@7.24.5': - resolution: {integrity: sha512-Nms86NXrsaeU9vbBJKni6gXiEXZ4CVpYVzEjDH9Sb8vmZ3UljyA1GSOJl/6LGPO8EHLuSF9H+IxNXHPX8QHJ4g==} + '@babel/template@7.25.0': + resolution: {integrity: sha512-aOOgh1/5XzKvg1jvVz7AVrx2piJ2XBi227DHmbY6y+bM9H2FlN+IfecYu4Xl0cNiiVejlsCri89LUsbj8vJD9Q==} engines: {node: '>=6.9.0'} - '@babel/runtime@7.24.7': - resolution: {integrity: sha512-UwgBRMjJP+xv857DCngvqXI3Iq6J4v0wXmwc6sapg+zyhbwmQX67LUEFrkK5tbyJ30jGuG3ZvWpBiB9LCy1kWw==} + '@babel/traverse@7.25.6': + resolution: {integrity: sha512-9Vrcx5ZW6UwK5tvqsj0nGpp/XzqthkT0dqIc9g1AdtygFToNtTF67XzYS//dm+SAK9cp3B9R4ZO/46p63SCjlQ==} engines: {node: '>=6.9.0'} - '@babel/template@7.24.7': - resolution: {integrity: sha512-jYqfPrU9JTF0PmPy1tLYHW4Mp4KlgxJD9l2nP9fD6yT/ICi554DmrWBAEYpIelzjHf1msDP3PxJIRt/nFNfBig==} - engines: {node: '>=6.9.0'} - - '@babel/traverse@7.24.7': - resolution: {integrity: sha512-yb65Ed5S/QAcewNPh0nZczy9JdYXkkAbIsEo+P7BE7yO3txAY30Y/oPa3QkQ5It3xVG2kpKMg9MsdxZaO31uKA==} - engines: {node: '>=6.9.0'} - - '@babel/types@7.24.7': - resolution: {integrity: sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q==} + '@babel/types@7.25.6': + resolution: {integrity: sha512-/l42B1qxpG6RdfYf343Uw1vmDjeNhneUXtzhojE7pDgfpEypmRhI6j1kr17XCVv4Cgl9HdAiQY2x0GwKm7rWCw==} engines: {node: '>=6.9.0'} '@bundled-es-modules/cookie@2.0.0': @@ -722,54 +673,54 @@ packages: '@bundled-es-modules/statuses@1.0.1': resolution: {integrity: sha512-yn7BklA5acgcBr+7w064fGV+SGIFySjCKpqjcWgBAIfrAkY+4GQTJJHQMeT3V/sgz23VTEVV8TtOmkvJAhFVfg==} - '@changesets/apply-release-plan@7.0.3': - resolution: {integrity: sha512-klL6LCdmfbEe9oyfLxnidIf/stFXmrbFO/3gT5LU5pcyoZytzJe4gWpTBx3BPmyNPl16dZ1xrkcW7b98e3tYkA==} + '@changesets/apply-release-plan@7.0.5': + resolution: {integrity: sha512-1cWCk+ZshEkSVEZrm2fSj1Gz8sYvxgUL4Q78+1ZZqeqfuevPTPk033/yUZ3df8BKMohkqqHfzj0HOOrG0KtXTw==} - '@changesets/assemble-release-plan@6.0.2': - resolution: {integrity: sha512-n9/Tdq+ze+iUtjmq0mZO3pEhJTKkku9hUxtUadW30jlN7kONqJG3O6ALeXrmc6gsi/nvoCuKjqEJ68Hk8RbMTQ==} + '@changesets/assemble-release-plan@6.0.4': + resolution: {integrity: sha512-nqICnvmrwWj4w2x0fOhVj2QEGdlUuwVAwESrUo5HLzWMI1rE5SWfsr9ln+rDqWB6RQ2ZyaMZHUcU7/IRaUJS+Q==} '@changesets/changelog-git@0.2.0': resolution: {integrity: sha512-bHOx97iFI4OClIT35Lok3sJAwM31VbUM++gnMBV16fdbtBhgYu4dxsphBF/0AZZsyAHMrnM0yFcj5gZM1py6uQ==} - '@changesets/cli@2.27.6': - resolution: {integrity: sha512-PB7KS5JkCQ4WSXlnfThn8CXAHVwYxFdZvYTimhi12fls/tzj9iimUhKsYwkrKSbw1AiVlGCZtihj5Wkt6siIjA==} + '@changesets/cli@2.27.8': + resolution: {integrity: sha512-gZNyh+LdSsI82wBSHLQ3QN5J30P4uHKJ4fXgoGwQxfXwYFTJzDdvIJasZn8rYQtmKhyQuiBj4SSnLuKlxKWq4w==} hasBin: true - '@changesets/config@3.0.1': - resolution: {integrity: sha512-nCr8pOemUjvGJ8aUu8TYVjqnUL+++bFOQHBVmtNbLvKzIDkN/uiP/Z4RKmr7NNaiujIURHySDEGFPftR4GbTUA==} + '@changesets/config@3.0.3': + resolution: {integrity: sha512-vqgQZMyIcuIpw9nqFIpTSNyc/wgm/Lu1zKN5vECy74u95Qx/Wa9g27HdgO4NkVAaq+BGA8wUc/qvbvVNs93n6A==} '@changesets/errors@0.2.0': resolution: {integrity: sha512-6BLOQUscTpZeGljvyQXlWOItQyU71kCdGz7Pi8H8zdw6BI0g3m43iL4xKUVPWtG+qrrL9DTjpdn8eYuCQSRpow==} - '@changesets/get-dependents-graph@2.1.0': - resolution: {integrity: sha512-QOt6pQq9RVXKGHPVvyKimJDYJumx7p4DO5MO9AhRJYgAPgv0emhNqAqqysSVKHBm4sxKlGN4S1zXOIb5yCFuhQ==} + '@changesets/get-dependents-graph@2.1.2': + resolution: {integrity: sha512-sgcHRkiBY9i4zWYBwlVyAjEM9sAzs4wYVwJUdnbDLnVG3QwAaia1Mk5P8M7kraTOZN+vBET7n8KyB0YXCbFRLQ==} '@changesets/get-github-info@0.6.0': resolution: {integrity: sha512-v/TSnFVXI8vzX9/w3DU2Ol+UlTZcu3m0kXTjTT4KlAdwSvwutcByYwyYn9hwerPWfPkT2JfpoX0KgvCEi8Q/SA==} - '@changesets/get-release-plan@4.0.2': - resolution: {integrity: sha512-rOalz7nMuMV2vyeP7KBeAhqEB7FM2GFPO5RQSoOoUKKH9L6wW3QyPA2K+/rG9kBrWl2HckPVES73/AuwPvbH3w==} + '@changesets/get-release-plan@4.0.4': + resolution: {integrity: sha512-SicG/S67JmPTrdcc9Vpu0wSQt7IiuN0dc8iR5VScnnTVPfIaLvKmEGRvIaF0kcn8u5ZqLbormZNTO77bCEvyWw==} '@changesets/get-version-range-type@0.4.0': resolution: {integrity: sha512-hwawtob9DryoGTpixy1D3ZXbGgJu1Rhr+ySH2PvTLHvkZuQ7sRT4oQwMh0hbqZH1weAooedEjRsbrWcGLCeyVQ==} - '@changesets/git@3.0.0': - resolution: {integrity: sha512-vvhnZDHe2eiBNRFHEgMiGd2CT+164dfYyrJDhwwxTVD/OW0FUD6G7+4DIx1dNwkwjHyzisxGAU96q0sVNBns0w==} + '@changesets/git@3.0.1': + resolution: {integrity: sha512-pdgHcYBLCPcLd82aRcuO0kxCDbw/yISlOtkmwmE8Odo1L6hSiZrBOsRl84eYG7DRCab/iHnOkWqExqc4wxk2LQ==} - '@changesets/logger@0.1.0': - resolution: {integrity: sha512-pBrJm4CQm9VqFVwWnSqKEfsS2ESnwqwH+xR7jETxIErZcfd1u2zBSqrHbRHR7xjhSgep9x2PSKFKY//FAshA3g==} + '@changesets/logger@0.1.1': + resolution: {integrity: sha512-OQtR36ZlnuTxKqoW4Sv6x5YIhOmClRd5pWsjZsddYxpWs517R0HkyiefQPIytCVh4ZcC5x9XaG8KTdd5iRQUfg==} '@changesets/parse@0.4.0': resolution: {integrity: sha512-TS/9KG2CdGXS27S+QxbZXgr8uPsP4yNJYb4BC2/NeFUj80Rni3TeD2qwWmabymxmrLo7JEsytXH1FbpKTbvivw==} - '@changesets/pre@2.0.0': - resolution: {integrity: sha512-HLTNYX/A4jZxc+Sq8D1AMBsv+1qD6rmmJtjsCJa/9MSRybdxh0mjbTvE6JYZQ/ZiQ0mMlDOlGPXTm9KLTU3jyw==} + '@changesets/pre@2.0.1': + resolution: {integrity: sha512-vvBJ/If4jKM4tPz9JdY2kGOgWmCowUYOi5Ycv8dyLnEE8FgpYYUo1mgJZxcdtGGP3aG8rAQulGLyyXGSLkIMTQ==} - '@changesets/read@0.6.0': - resolution: {integrity: sha512-ZypqX8+/im1Fm98K4YcZtmLKgjs1kDQ5zHpc2U1qdtNBmZZfo/IBiG162RoP0CUF05tvp2y4IspH11PLnPxuuw==} + '@changesets/read@0.6.1': + resolution: {integrity: sha512-jYMbyXQk3nwP25nRzQQGa1nKLY0KfoOV7VLgwucI0bUO8t8ZLCr6LZmgjXsiKuRDc+5A6doKPr9w2d+FEJ55zQ==} - '@changesets/should-skip-package@0.1.0': - resolution: {integrity: sha512-FxG6Mhjw7yFStlSM7Z0Gmg3RiyQ98d/9VpQAZ3Fzr59dCOM9G6ZdYbjiSAt0XtFr9JR5U2tBaJWPjrkGGc618g==} + '@changesets/should-skip-package@0.1.1': + resolution: {integrity: sha512-H9LjLbF6mMHLtJIc/eHR9Na+MifJ3VxtgP/Y+XLn4BF7tDTEN1HNYtH6QMcjP1uxp9sjaFYmW8xqloaCi/ckTg==} '@changesets/types@4.1.0': resolution: {integrity: sha512-LDQvVDv5Kb50ny2s25Fhm3d9QSZimsoUGBsUioj6MC3qbMUCuC8GPIvk/M6IvXx3lYhAs0lwWUQLb+VIEUCECw==} @@ -777,104 +728,104 @@ packages: '@changesets/types@6.0.0': resolution: {integrity: sha512-b1UkfNulgKoWfqyHtzKS5fOZYSJO+77adgL7DLRDr+/7jhChN+QcHnbjiQVOz/U+Ts3PGNySq7diAItzDgugfQ==} - '@changesets/write@0.3.1': - resolution: {integrity: sha512-SyGtMXzH3qFqlHKcvFY2eX+6b0NGiFcNav8AFsYwy5l8hejOeoeTDemu5Yjmke2V5jpzY+pBvM0vCCQ3gdZpfw==} + '@changesets/write@0.3.2': + resolution: {integrity: sha512-kDxDrPNpUgsjDbWBvUo27PzKX4gqeKOlhibaOXDJA6kuBisGqNHv/HwGJrAu8U/dSf8ZEFIeHIPtvSlZI1kULw==} - '@commitlint/cli@19.3.0': - resolution: {integrity: sha512-LgYWOwuDR7BSTQ9OLZ12m7F/qhNY+NpAyPBgo4YNMkACE7lGuUnuQq1yi9hz1KA4+3VqpOYl8H1rY/LYK43v7g==} + '@commitlint/cli@19.5.0': + resolution: {integrity: sha512-gaGqSliGwB86MDmAAKAtV9SV1SHdmN8pnGq4EJU4+hLisQ7IFfx4jvU4s+pk6tl0+9bv6yT+CaZkufOinkSJIQ==} engines: {node: '>=v18'} hasBin: true - '@commitlint/config-conventional@19.2.2': - resolution: {integrity: sha512-mLXjsxUVLYEGgzbxbxicGPggDuyWNkf25Ht23owXIH+zV2pv1eJuzLK3t1gDY5Gp6pxdE60jZnWUY5cvgL3ufw==} + '@commitlint/config-conventional@19.5.0': + resolution: {integrity: sha512-OBhdtJyHNPryZKg0fFpZNOBM1ZDbntMvqMuSmpfyP86XSfwzGw4CaoYRG4RutUPg0BTK07VMRIkNJT6wi2zthg==} engines: {node: '>=v18'} - '@commitlint/config-validator@19.0.3': - resolution: {integrity: sha512-2D3r4PKjoo59zBc2auodrSCaUnCSALCx54yveOFwwP/i2kfEAQrygwOleFWswLqK0UL/F9r07MFi5ev2ohyM4Q==} + '@commitlint/config-validator@19.5.0': + resolution: {integrity: sha512-CHtj92H5rdhKt17RmgALhfQt95VayrUo2tSqY9g2w+laAXyk7K/Ef6uPm9tn5qSIwSmrLjKaXK9eiNuxmQrDBw==} engines: {node: '>=v18'} - '@commitlint/ensure@19.0.3': - resolution: {integrity: sha512-SZEpa/VvBLoT+EFZVb91YWbmaZ/9rPH3ESrINOl0HD2kMYsjvl0tF7nMHh0EpTcv4+gTtZBAe1y/SS6/OhfZzQ==} + '@commitlint/ensure@19.5.0': + resolution: {integrity: sha512-Kv0pYZeMrdg48bHFEU5KKcccRfKmISSm9MvgIgkpI6m+ohFTB55qZlBW6eYqh/XDfRuIO0x4zSmvBjmOwWTwkg==} engines: {node: '>=v18'} - '@commitlint/execute-rule@19.0.0': - resolution: {integrity: sha512-mtsdpY1qyWgAO/iOK0L6gSGeR7GFcdW7tIjcNFxcWkfLDF5qVbPHKuGATFqRMsxcO8OUKNj0+3WOHB7EHm4Jdw==} + '@commitlint/execute-rule@19.5.0': + resolution: {integrity: sha512-aqyGgytXhl2ejlk+/rfgtwpPexYyri4t8/n4ku6rRJoRhGZpLFMqrZ+YaubeGysCP6oz4mMA34YSTaSOKEeNrg==} engines: {node: '>=v18'} - '@commitlint/format@19.3.0': - resolution: {integrity: sha512-luguk5/aF68HiF4H23ACAfk8qS8AHxl4LLN5oxPc24H+2+JRPsNr1OS3Gaea0CrH7PKhArBMKBz5RX9sA5NtTg==} + '@commitlint/format@19.5.0': + resolution: {integrity: sha512-yNy088miE52stCI3dhG/vvxFo9e4jFkU1Mj3xECfzp/bIS/JUay4491huAlVcffOoMK1cd296q0W92NlER6r3A==} engines: {node: '>=v18'} - '@commitlint/is-ignored@19.2.2': - resolution: {integrity: sha512-eNX54oXMVxncORywF4ZPFtJoBm3Tvp111tg1xf4zWXGfhBPKpfKG6R+G3G4v5CPlRROXpAOpQ3HMhA9n1Tck1g==} + '@commitlint/is-ignored@19.5.0': + resolution: {integrity: sha512-0XQ7Llsf9iL/ANtwyZ6G0NGp5Y3EQ8eDQSxv/SRcfJ0awlBY4tHFAvwWbw66FVUaWICH7iE5en+FD9TQsokZ5w==} engines: {node: '>=v18'} - '@commitlint/lint@19.2.2': - resolution: {integrity: sha512-xrzMmz4JqwGyKQKTpFzlN0dx0TAiT7Ran1fqEBgEmEj+PU98crOFtysJgY+QdeSagx6EDRigQIXJVnfrI0ratA==} + '@commitlint/lint@19.5.0': + resolution: {integrity: sha512-cAAQwJcRtiBxQWO0eprrAbOurtJz8U6MgYqLz+p9kLElirzSCc0vGMcyCaA1O7AqBuxo11l1XsY3FhOFowLAAg==} engines: {node: '>=v18'} - '@commitlint/load@19.2.0': - resolution: {integrity: sha512-XvxxLJTKqZojCxaBQ7u92qQLFMMZc4+p9qrIq/9kJDy8DOrEa7P1yx7Tjdc2u2JxIalqT4KOGraVgCE7eCYJyQ==} + '@commitlint/load@19.5.0': + resolution: {integrity: sha512-INOUhkL/qaKqwcTUvCE8iIUf5XHsEPCLY9looJ/ipzi7jtGhgmtH7OOFiNvwYgH7mA8osUWOUDV8t4E2HAi4xA==} engines: {node: '>=v18'} - '@commitlint/message@19.0.0': - resolution: {integrity: sha512-c9czf6lU+9oF9gVVa2lmKaOARJvt4soRsVmbR7Njwp9FpbBgste5i7l/2l5o8MmbwGh4yE1snfnsy2qyA2r/Fw==} + '@commitlint/message@19.5.0': + resolution: {integrity: sha512-R7AM4YnbxN1Joj1tMfCyBryOC5aNJBdxadTZkuqtWi3Xj0kMdutq16XQwuoGbIzL2Pk62TALV1fZDCv36+JhTQ==} engines: {node: '>=v18'} - '@commitlint/parse@19.0.3': - resolution: {integrity: sha512-Il+tNyOb8VDxN3P6XoBBwWJtKKGzHlitEuXA5BP6ir/3loWlsSqDr5aecl6hZcC/spjq4pHqNh0qPlfeWu38QA==} + '@commitlint/parse@19.5.0': + resolution: {integrity: sha512-cZ/IxfAlfWYhAQV0TwcbdR1Oc0/r0Ik1GEessDJ3Lbuma/MRO8FRQX76eurcXtmhJC//rj52ZSZuXUg0oIX0Fw==} engines: {node: '>=v18'} - '@commitlint/read@19.2.1': - resolution: {integrity: sha512-qETc4+PL0EUv7Q36lJbPG+NJiBOGg7SSC7B5BsPWOmei+Dyif80ErfWQ0qXoW9oCh7GTpTNRoaVhiI8RbhuaNw==} + '@commitlint/read@19.5.0': + resolution: {integrity: sha512-TjS3HLPsLsxFPQj6jou8/CZFAmOP2y+6V4PGYt3ihbQKTY1Jnv0QG28WRKl/d1ha6zLODPZqsxLEov52dhR9BQ==} engines: {node: '>=v18'} - '@commitlint/resolve-extends@19.1.0': - resolution: {integrity: sha512-z2riI+8G3CET5CPgXJPlzftH+RiWYLMYv4C9tSLdLXdr6pBNimSKukYP9MS27ejmscqCTVA4almdLh0ODD2KYg==} + '@commitlint/resolve-extends@19.5.0': + resolution: {integrity: sha512-CU/GscZhCUsJwcKTJS9Ndh3AKGZTNFIOoQB2n8CmFnizE0VnEuJoum+COW+C1lNABEeqk6ssfc1Kkalm4bDklA==} engines: {node: '>=v18'} - '@commitlint/rules@19.0.3': - resolution: {integrity: sha512-TspKb9VB6svklxNCKKwxhELn7qhtY1rFF8ls58DcFd0F97XoG07xugPjjbVnLqmMkRjZDbDIwBKt9bddOfLaPw==} + '@commitlint/rules@19.5.0': + resolution: {integrity: sha512-hDW5TPyf/h1/EufSHEKSp6Hs+YVsDMHazfJ2azIk9tHPXS6UqSz1dIRs1gpqS3eMXgtkT7JH6TW4IShdqOwhAw==} engines: {node: '>=v18'} - '@commitlint/to-lines@19.0.0': - resolution: {integrity: sha512-vkxWo+VQU5wFhiP9Ub9Sre0FYe019JxFikrALVoD5UGa8/t3yOJEpEhxC5xKiENKKhUkTpEItMTRAjHw2SCpZw==} + '@commitlint/to-lines@19.5.0': + resolution: {integrity: sha512-R772oj3NHPkodOSRZ9bBVNq224DOxQtNef5Pl8l2M8ZnkkzQfeSTr4uxawV2Sd3ui05dUVzvLNnzenDBO1KBeQ==} engines: {node: '>=v18'} - '@commitlint/top-level@19.0.0': - resolution: {integrity: sha512-KKjShd6u1aMGNkCkaX4aG1jOGdn7f8ZI8TR1VEuNqUOjWTOdcDSsmglinglJ18JTjuBX5I1PtjrhQCRcixRVFQ==} + '@commitlint/top-level@19.5.0': + resolution: {integrity: sha512-IP1YLmGAk0yWrImPRRc578I3dDUI5A2UBJx9FbSOjxe9sTlzFiwVJ+zeMLgAtHMtGZsC8LUnzmW1qRemkFU4ng==} engines: {node: '>=v18'} - '@commitlint/types@19.0.3': - resolution: {integrity: sha512-tpyc+7i6bPG9mvaBbtKUeghfyZSDgWquIDfMgqYtTbmZ9Y9VzEm2je9EYcQ0aoz5o7NvGS+rcDec93yO08MHYA==} + '@commitlint/types@19.5.0': + resolution: {integrity: sha512-DSHae2obMSMkAtTBSOulg5X7/z+rGLxcXQIkg3OmWvY6wifojge5uVMydfhUvs7yQj+V7jNmRZ2Xzl8GJyqRgg==} engines: {node: '>=v18'} '@cspotcode/source-map-support@0.8.1': resolution: {integrity: sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==} engines: {node: '>=12'} - '@csstools/css-parser-algorithms@2.6.3': - resolution: {integrity: sha512-xI/tL2zxzEbESvnSxwFgwvy5HS00oCXxL4MLs6HUiDcYfwowsoQaABKxUElp1ARITrINzBnsECOc1q0eg2GOrA==} - engines: {node: ^14 || ^16 || >=18} + '@csstools/css-parser-algorithms@3.0.1': + resolution: {integrity: sha512-lSquqZCHxDfuTg/Sk2hiS0mcSFCEBuj49JfzPHJogDBT0mGCyY5A1AQzBWngitrp7i1/HAZpIgzF/VjhOEIJIg==} + engines: {node: '>=18'} peerDependencies: - '@csstools/css-tokenizer': ^2.3.1 + '@csstools/css-tokenizer': ^3.0.1 - '@csstools/css-tokenizer@2.3.1': - resolution: {integrity: sha512-iMNHTyxLbBlWIfGtabT157LH9DUx9X8+Y3oymFEuMj8HNc+rpE3dPFGFgHjpKfjeFDjLjYIAIhXPGvS2lKxL9g==} - engines: {node: ^14 || ^16 || >=18} + '@csstools/css-tokenizer@3.0.1': + resolution: {integrity: sha512-UBqaiu7kU0lfvaP982/o3khfXccVlHPWp0/vwwiIgDF0GmqqqxoiXC/6FCjlS9u92f7CoEz6nXKQnrn1kIAkOw==} + engines: {node: '>=18'} - '@csstools/media-query-list-parser@2.1.11': - resolution: {integrity: sha512-uox5MVhvNHqitPP+SynrB1o8oPxPMt2JLgp5ghJOWf54WGQ5OKu47efne49r1SWqs3wRP8xSWjnO9MBKxhB1dA==} - engines: {node: ^14 || ^16 || >=18} + '@csstools/media-query-list-parser@3.0.1': + resolution: {integrity: sha512-HNo8gGD02kHmcbX6PvCoUuOQvn4szyB9ca63vZHKX5A81QytgDG4oxG4IaEfHTlEZSZ6MjPEMWIVU+zF2PZcgw==} + engines: {node: '>=18'} peerDependencies: - '@csstools/css-parser-algorithms': ^2.6.3 - '@csstools/css-tokenizer': ^2.3.1 + '@csstools/css-parser-algorithms': ^3.0.1 + '@csstools/css-tokenizer': ^3.0.1 - '@csstools/selector-specificity@3.1.1': - resolution: {integrity: sha512-a7cxGcJ2wIlMFLlh8z2ONm+715QkPHiyJcxwQlKOz/03GPw1COpfhcmC9wm4xlZfp//jWHNNMwzjtqHXVWU9KA==} - engines: {node: ^14 || ^16 || >=18} + '@csstools/selector-specificity@4.0.0': + resolution: {integrity: sha512-189nelqtPd8++phaHNwYovKZI0FOzH1vQEE3QhHHkNIGrg5fSs9CbYP3RvfEH5geztnIA9Jwq91wyOIwAW5JIQ==} + engines: {node: '>=18'} peerDependencies: - postcss-selector-parser: ^6.0.13 + postcss-selector-parser: ^6.1.0 '@ctrl/tinycolor@3.6.1': resolution: {integrity: sha512-SITSV6aIXsuVNV3f3O0f2n/cgyEDWoSqtZMYiAmcsYHydcKrOz3gUxB/iXd/Qf08+IZX4KpgNbvUdMBmWz+kcA==} @@ -889,35 +840,23 @@ packages: '@emotion/unitless@0.7.5': resolution: {integrity: sha512-OWORNpfjMsSSUBVrRBVGECkhWcULOAJz9ZW8uK9qgxD+87M7jHRcvh/A96XXNhXTLmKcoYSQtBEX7lHMO7YRwg==} - '@esbuild/aix-ppc64@0.19.10': - resolution: {integrity: sha512-Q+mk96KJ+FZ30h9fsJl+67IjNJm3x2eX+GBWGmocAKgzp27cowCOOqSdscX80s0SpdFXZnIv/+1xD1EctFx96Q==} - engines: {node: '>=12'} - cpu: [ppc64] - os: [aix] - '@esbuild/aix-ppc64@0.19.12': resolution: {integrity: sha512-bmoCYyWdEL3wDQIVbcyzRyeKLgk2WtWLTWz1ZIAZF/EGbNOwSA6ew3PftJ1PqMiOOGu0OyFMzG53L0zqIpPeNA==} engines: {node: '>=12'} cpu: [ppc64] os: [aix] - '@esbuild/aix-ppc64@0.20.2': - resolution: {integrity: sha512-D+EBOJHXdNZcLJRBkhENNG8Wji2kgc9AZ9KiPr1JuZjsNtyHzrsfLRrY0tk2H2aoFu6RANO1y1iPPUCDYWkb5g==} - engines: {node: '>=12'} - cpu: [ppc64] - os: [aix] - '@esbuild/aix-ppc64@0.21.5': resolution: {integrity: sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==} engines: {node: '>=12'} cpu: [ppc64] os: [aix] - '@esbuild/android-arm64@0.19.10': - resolution: {integrity: sha512-1X4CClKhDgC3by7k8aOWZeBXQX8dHT5QAMCAQDArCLaYfkppoARvh0fit3X2Qs+MXDngKcHv6XXyQCpY0hkK1Q==} - engines: {node: '>=12'} - cpu: [arm64] - os: [android] + '@esbuild/aix-ppc64@0.23.1': + resolution: {integrity: sha512-6VhYk1diRqrhBAqpJEdjASR/+WVRtfjpqKuNw11cLiaWpAT/Uu+nokB+UJnevzy/P9C/ty6AOe0dwueMrGh/iQ==} + engines: {node: '>=18'} + cpu: [ppc64] + os: [aix] '@esbuild/android-arm64@0.19.12': resolution: {integrity: sha512-P0UVNGIienjZv3f5zq0DP3Nt2IE/3plFzuaS96vihvD0Hd6H/q4WXUGpCxD/E8YrSXfNyRPbpTq+T8ZQioSuPA==} @@ -925,22 +864,16 @@ packages: cpu: [arm64] os: [android] - '@esbuild/android-arm64@0.20.2': - resolution: {integrity: sha512-mRzjLacRtl/tWU0SvD8lUEwb61yP9cqQo6noDZP/O8VkwafSYwZ4yWy24kan8jE/IMERpYncRt2dw438LP3Xmg==} - engines: {node: '>=12'} - cpu: [arm64] - os: [android] - '@esbuild/android-arm64@0.21.5': resolution: {integrity: sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A==} engines: {node: '>=12'} cpu: [arm64] os: [android] - '@esbuild/android-arm@0.19.10': - resolution: {integrity: sha512-7W0bK7qfkw1fc2viBfrtAEkDKHatYfHzr/jKAHNr9BvkYDXPcC6bodtm8AyLJNNuqClLNaeTLuwURt4PRT9d7w==} - engines: {node: '>=12'} - cpu: [arm] + '@esbuild/android-arm64@0.23.1': + resolution: {integrity: sha512-xw50ipykXcLstLeWH7WRdQuysJqejuAGPd30vd1i5zSyKK3WE+ijzHmLKxdiCMtH1pHz78rOg0BKSYOSB/2Khw==} + engines: {node: '>=18'} + cpu: [arm64] os: [android] '@esbuild/android-arm@0.19.12': @@ -949,22 +882,16 @@ packages: cpu: [arm] os: [android] - '@esbuild/android-arm@0.20.2': - resolution: {integrity: sha512-t98Ra6pw2VaDhqNWO2Oph2LXbz/EJcnLmKLGBJwEwXX/JAN83Fym1rU8l0JUWK6HkIbWONCSSatf4sf2NBRx/w==} - engines: {node: '>=12'} - cpu: [arm] - os: [android] - '@esbuild/android-arm@0.21.5': resolution: {integrity: sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg==} engines: {node: '>=12'} cpu: [arm] os: [android] - '@esbuild/android-x64@0.19.10': - resolution: {integrity: sha512-O/nO/g+/7NlitUxETkUv/IvADKuZXyH4BHf/g/7laqKC4i/7whLpB0gvpPc2zpF0q9Q6FXS3TS75QHac9MvVWw==} - engines: {node: '>=12'} - cpu: [x64] + '@esbuild/android-arm@0.23.1': + resolution: {integrity: sha512-uz6/tEy2IFm9RYOyvKl88zdzZfwEfKZmnX9Cj1BHjeSGNuGLuMD1kR8y5bteYmwqKm1tj8m4cb/aKEorr6fHWQ==} + engines: {node: '>=18'} + cpu: [arm] os: [android] '@esbuild/android-x64@0.19.12': @@ -973,23 +900,17 @@ packages: cpu: [x64] os: [android] - '@esbuild/android-x64@0.20.2': - resolution: {integrity: sha512-btzExgV+/lMGDDa194CcUQm53ncxzeBrWJcncOBxuC6ndBkKxnHdFJn86mCIgTELsooUmwUm9FkhSp5HYu00Rg==} - engines: {node: '>=12'} - cpu: [x64] - os: [android] - '@esbuild/android-x64@0.21.5': resolution: {integrity: sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA==} engines: {node: '>=12'} cpu: [x64] os: [android] - '@esbuild/darwin-arm64@0.19.10': - resolution: {integrity: sha512-YSRRs2zOpwypck+6GL3wGXx2gNP7DXzetmo5pHXLrY/VIMsS59yKfjPizQ4lLt5vEI80M41gjm2BxrGZ5U+VMA==} - engines: {node: '>=12'} - cpu: [arm64] - os: [darwin] + '@esbuild/android-x64@0.23.1': + resolution: {integrity: sha512-nlN9B69St9BwUoB+jkyU090bru8L0NA3yFvAd7k8dNsVH8bi9a8cUAUSEcEEgTp2z3dbEDGJGfP6VUnkQnlReg==} + engines: {node: '>=18'} + cpu: [x64] + os: [android] '@esbuild/darwin-arm64@0.19.12': resolution: {integrity: sha512-B6IeSgZgtEzGC42jsI+YYu9Z3HKRxp8ZT3cqhvliEHovq8HSX2YX8lNocDn79gCKJXOSaEot9MVYky7AKjCs8g==} @@ -997,22 +918,16 @@ packages: cpu: [arm64] os: [darwin] - '@esbuild/darwin-arm64@0.20.2': - resolution: {integrity: sha512-4J6IRT+10J3aJH3l1yzEg9y3wkTDgDk7TSDFX+wKFiWjqWp/iCfLIYzGyasx9l0SAFPT1HwSCR+0w/h1ES/MjA==} - engines: {node: '>=12'} - cpu: [arm64] - os: [darwin] - '@esbuild/darwin-arm64@0.21.5': resolution: {integrity: sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ==} engines: {node: '>=12'} cpu: [arm64] os: [darwin] - '@esbuild/darwin-x64@0.19.10': - resolution: {integrity: sha512-alfGtT+IEICKtNE54hbvPg13xGBe4GkVxyGWtzr+yHO7HIiRJppPDhOKq3zstTcVf8msXb/t4eavW3jCDpMSmA==} - engines: {node: '>=12'} - cpu: [x64] + '@esbuild/darwin-arm64@0.23.1': + resolution: {integrity: sha512-YsS2e3Wtgnw7Wq53XXBLcV6JhRsEq8hkfg91ESVadIrzr9wO6jJDMZnCQbHm1Guc5t/CdDiFSSfWP58FNuvT3Q==} + engines: {node: '>=18'} + cpu: [arm64] os: [darwin] '@esbuild/darwin-x64@0.19.12': @@ -1021,23 +936,17 @@ packages: cpu: [x64] os: [darwin] - '@esbuild/darwin-x64@0.20.2': - resolution: {integrity: sha512-tBcXp9KNphnNH0dfhv8KYkZhjc+H3XBkF5DKtswJblV7KlT9EI2+jeA8DgBjp908WEuYll6pF+UStUCfEpdysA==} - engines: {node: '>=12'} - cpu: [x64] - os: [darwin] - '@esbuild/darwin-x64@0.21.5': resolution: {integrity: sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw==} engines: {node: '>=12'} cpu: [x64] os: [darwin] - '@esbuild/freebsd-arm64@0.19.10': - resolution: {integrity: sha512-dMtk1wc7FSH8CCkE854GyGuNKCewlh+7heYP/sclpOG6Cectzk14qdUIY5CrKDbkA/OczXq9WesqnPl09mj5dg==} - engines: {node: '>=12'} - cpu: [arm64] - os: [freebsd] + '@esbuild/darwin-x64@0.23.1': + resolution: {integrity: sha512-aClqdgTDVPSEGgoCS8QDG37Gu8yc9lTHNAQlsztQ6ENetKEO//b8y31MMu2ZaPbn4kVsIABzVLXYLhCGekGDqw==} + engines: {node: '>=18'} + cpu: [x64] + os: [darwin] '@esbuild/freebsd-arm64@0.19.12': resolution: {integrity: sha512-4aRvFIXmwAcDBw9AueDQ2YnGmz5L6obe5kmPT8Vd+/+x/JMVKCgdcRwH6APrbpNXsPz+K653Qg8HB/oXvXVukA==} @@ -1045,22 +954,16 @@ packages: cpu: [arm64] os: [freebsd] - '@esbuild/freebsd-arm64@0.20.2': - resolution: {integrity: sha512-d3qI41G4SuLiCGCFGUrKsSeTXyWG6yem1KcGZVS+3FYlYhtNoNgYrWcvkOoaqMhwXSMrZRl69ArHsGJ9mYdbbw==} - engines: {node: '>=12'} - cpu: [arm64] - os: [freebsd] - '@esbuild/freebsd-arm64@0.21.5': resolution: {integrity: sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g==} engines: {node: '>=12'} cpu: [arm64] os: [freebsd] - '@esbuild/freebsd-x64@0.19.10': - resolution: {integrity: sha512-G5UPPspryHu1T3uX8WiOEUa6q6OlQh6gNl4CO4Iw5PS+Kg5bVggVFehzXBJY6X6RSOMS8iXDv2330VzaObm4Ag==} - engines: {node: '>=12'} - cpu: [x64] + '@esbuild/freebsd-arm64@0.23.1': + resolution: {integrity: sha512-h1k6yS8/pN/NHlMl5+v4XPfikhJulk4G+tKGFIOwURBSFzE8bixw1ebjluLOjfwtLqY0kewfjLSrO6tN2MgIhA==} + engines: {node: '>=18'} + cpu: [arm64] os: [freebsd] '@esbuild/freebsd-x64@0.19.12': @@ -1069,23 +972,17 @@ packages: cpu: [x64] os: [freebsd] - '@esbuild/freebsd-x64@0.20.2': - resolution: {integrity: sha512-d+DipyvHRuqEeM5zDivKV1KuXn9WeRX6vqSqIDgwIfPQtwMP4jaDsQsDncjTDDsExT4lR/91OLjRo8bmC1e+Cw==} - engines: {node: '>=12'} - cpu: [x64] - os: [freebsd] - '@esbuild/freebsd-x64@0.21.5': resolution: {integrity: sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ==} engines: {node: '>=12'} cpu: [x64] os: [freebsd] - '@esbuild/linux-arm64@0.19.10': - resolution: {integrity: sha512-QxaouHWZ+2KWEj7cGJmvTIHVALfhpGxo3WLmlYfJ+dA5fJB6lDEIg+oe/0//FuyVHuS3l79/wyBxbHr0NgtxJQ==} - engines: {node: '>=12'} - cpu: [arm64] - os: [linux] + '@esbuild/freebsd-x64@0.23.1': + resolution: {integrity: sha512-lK1eJeyk1ZX8UklqFd/3A60UuZ/6UVfGT2LuGo3Wp4/z7eRTRYY+0xOu2kpClP+vMTi9wKOfXi2vjUpO1Ro76g==} + engines: {node: '>=18'} + cpu: [x64] + os: [freebsd] '@esbuild/linux-arm64@0.19.12': resolution: {integrity: sha512-EoTjyYyLuVPfdPLsGVVVC8a0p1BFFvtpQDB/YLEhaXyf/5bczaGeN15QkR+O4S5LeJ92Tqotve7i1jn35qwvdA==} @@ -1093,22 +990,16 @@ packages: cpu: [arm64] os: [linux] - '@esbuild/linux-arm64@0.20.2': - resolution: {integrity: sha512-9pb6rBjGvTFNira2FLIWqDk/uaf42sSyLE8j1rnUpuzsODBq7FvpwHYZxQ/It/8b+QOS1RYfqgGFNLRI+qlq2A==} - engines: {node: '>=12'} - cpu: [arm64] - os: [linux] - '@esbuild/linux-arm64@0.21.5': resolution: {integrity: sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q==} engines: {node: '>=12'} cpu: [arm64] os: [linux] - '@esbuild/linux-arm@0.19.10': - resolution: {integrity: sha512-j6gUW5aAaPgD416Hk9FHxn27On28H4eVI9rJ4az7oCGTFW48+LcgNDBN+9f8rKZz7EEowo889CPKyeaD0iw9Kg==} - engines: {node: '>=12'} - cpu: [arm] + '@esbuild/linux-arm64@0.23.1': + resolution: {integrity: sha512-/93bf2yxencYDnItMYV/v116zff6UyTjo4EtEQjUBeGiVpMmffDNUyD9UN2zV+V3LRV3/on4xdZ26NKzn6754g==} + engines: {node: '>=18'} + cpu: [arm64] os: [linux] '@esbuild/linux-arm@0.19.12': @@ -1117,22 +1008,16 @@ packages: cpu: [arm] os: [linux] - '@esbuild/linux-arm@0.20.2': - resolution: {integrity: sha512-VhLPeR8HTMPccbuWWcEUD1Az68TqaTYyj6nfE4QByZIQEQVWBB8vup8PpR7y1QHL3CpcF6xd5WVBU/+SBEvGTg==} - engines: {node: '>=12'} - cpu: [arm] - os: [linux] - '@esbuild/linux-arm@0.21.5': resolution: {integrity: sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA==} engines: {node: '>=12'} cpu: [arm] os: [linux] - '@esbuild/linux-ia32@0.19.10': - resolution: {integrity: sha512-4ub1YwXxYjj9h1UIZs2hYbnTZBtenPw5NfXCRgEkGb0b6OJ2gpkMvDqRDYIDRjRdWSe/TBiZltm3Y3Q8SN1xNg==} - engines: {node: '>=12'} - cpu: [ia32] + '@esbuild/linux-arm@0.23.1': + resolution: {integrity: sha512-CXXkzgn+dXAPs3WBwE+Kvnrf4WECwBdfjfeYHpMeVxWE0EceB6vhWGShs6wi0IYEqMSIzdOF1XjQ/Mkm5d7ZdQ==} + engines: {node: '>=18'} + cpu: [arm] os: [linux] '@esbuild/linux-ia32@0.19.12': @@ -1141,15 +1026,15 @@ packages: cpu: [ia32] os: [linux] - '@esbuild/linux-ia32@0.20.2': - resolution: {integrity: sha512-o10utieEkNPFDZFQm9CoP7Tvb33UutoJqg3qKf1PWVeeJhJw0Q347PxMvBgVVFgouYLGIhFYG0UGdBumROyiig==} + '@esbuild/linux-ia32@0.21.5': + resolution: {integrity: sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg==} engines: {node: '>=12'} cpu: [ia32] os: [linux] - '@esbuild/linux-ia32@0.21.5': - resolution: {integrity: sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg==} - engines: {node: '>=12'} + '@esbuild/linux-ia32@0.23.1': + resolution: {integrity: sha512-VTN4EuOHwXEkXzX5nTvVY4s7E/Krz7COC8xkftbbKRYAl96vPiUssGkeMELQMOnLOJ8k3BY1+ZY52tttZnHcXQ==} + engines: {node: '>=18'} cpu: [ia32] os: [linux] @@ -1159,34 +1044,22 @@ packages: cpu: [loong64] os: [linux] - '@esbuild/linux-loong64@0.19.10': - resolution: {integrity: sha512-lo3I9k+mbEKoxtoIbM0yC/MZ1i2wM0cIeOejlVdZ3D86LAcFXFRdeuZmh91QJvUTW51bOK5W2BznGNIl4+mDaA==} - engines: {node: '>=12'} - cpu: [loong64] - os: [linux] - '@esbuild/linux-loong64@0.19.12': resolution: {integrity: sha512-LiXdXA0s3IqRRjm6rV6XaWATScKAXjI4R4LoDlvO7+yQqFdlr1Bax62sRwkVvRIrwXxvtYEHHI4dm50jAXkuAA==} engines: {node: '>=12'} cpu: [loong64] os: [linux] - '@esbuild/linux-loong64@0.20.2': - resolution: {integrity: sha512-PR7sp6R/UC4CFVomVINKJ80pMFlfDfMQMYynX7t1tNTeivQ6XdX5r2XovMmha/VjR1YN/HgHWsVcTRIMkymrgQ==} - engines: {node: '>=12'} - cpu: [loong64] - os: [linux] - '@esbuild/linux-loong64@0.21.5': resolution: {integrity: sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg==} engines: {node: '>=12'} cpu: [loong64] os: [linux] - '@esbuild/linux-mips64el@0.19.10': - resolution: {integrity: sha512-J4gH3zhHNbdZN0Bcr1QUGVNkHTdpijgx5VMxeetSk6ntdt+vR1DqGmHxQYHRmNb77tP6GVvD+K0NyO4xjd7y4A==} - engines: {node: '>=12'} - cpu: [mips64el] + '@esbuild/linux-loong64@0.23.1': + resolution: {integrity: sha512-Vx09LzEoBa5zDnieH8LSMRToj7ir/Jeq0Gu6qJ/1GcBq9GkfoEAoXvLiW1U9J1qE/Y/Oyaq33w5p2ZWrNNHNEw==} + engines: {node: '>=18'} + cpu: [loong64] os: [linux] '@esbuild/linux-mips64el@0.19.12': @@ -1195,22 +1068,16 @@ packages: cpu: [mips64el] os: [linux] - '@esbuild/linux-mips64el@0.20.2': - resolution: {integrity: sha512-4BlTqeutE/KnOiTG5Y6Sb/Hw6hsBOZapOVF6njAESHInhlQAghVVZL1ZpIctBOoTFbQyGW+LsVYZ8lSSB3wkjA==} - engines: {node: '>=12'} - cpu: [mips64el] - os: [linux] - '@esbuild/linux-mips64el@0.21.5': resolution: {integrity: sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg==} engines: {node: '>=12'} cpu: [mips64el] os: [linux] - '@esbuild/linux-ppc64@0.19.10': - resolution: {integrity: sha512-tgT/7u+QhV6ge8wFMzaklOY7KqiyitgT1AUHMApau32ZlvTB/+efeCtMk4eXS+uEymYK249JsoiklZN64xt6oQ==} - engines: {node: '>=12'} - cpu: [ppc64] + '@esbuild/linux-mips64el@0.23.1': + resolution: {integrity: sha512-nrFzzMQ7W4WRLNUOU5dlWAqa6yVeI0P78WKGUo7lg2HShq/yx+UYkeNSE0SSfSure0SqgnsxPvmAUu/vu0E+3Q==} + engines: {node: '>=18'} + cpu: [mips64el] os: [linux] '@esbuild/linux-ppc64@0.19.12': @@ -1219,22 +1086,16 @@ packages: cpu: [ppc64] os: [linux] - '@esbuild/linux-ppc64@0.20.2': - resolution: {integrity: sha512-rD3KsaDprDcfajSKdn25ooz5J5/fWBylaaXkuotBDGnMnDP1Uv5DLAN/45qfnf3JDYyJv/ytGHQaziHUdyzaAg==} - engines: {node: '>=12'} - cpu: [ppc64] - os: [linux] - '@esbuild/linux-ppc64@0.21.5': resolution: {integrity: sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w==} engines: {node: '>=12'} cpu: [ppc64] os: [linux] - '@esbuild/linux-riscv64@0.19.10': - resolution: {integrity: sha512-0f/spw0PfBMZBNqtKe5FLzBDGo0SKZKvMl5PHYQr3+eiSscfJ96XEknCe+JoOayybWUFQbcJTrk946i3j9uYZA==} - engines: {node: '>=12'} - cpu: [riscv64] + '@esbuild/linux-ppc64@0.23.1': + resolution: {integrity: sha512-dKN8fgVqd0vUIjxuJI6P/9SSSe/mB9rvA98CSH2sJnlZ/OCZWO1DJvxj8jvKTfYUdGfcq2dDxoKaC6bHuTlgcw==} + engines: {node: '>=18'} + cpu: [ppc64] os: [linux] '@esbuild/linux-riscv64@0.19.12': @@ -1243,22 +1104,16 @@ packages: cpu: [riscv64] os: [linux] - '@esbuild/linux-riscv64@0.20.2': - resolution: {integrity: sha512-snwmBKacKmwTMmhLlz/3aH1Q9T8v45bKYGE3j26TsaOVtjIag4wLfWSiZykXzXuE1kbCE+zJRmwp+ZbIHinnVg==} - engines: {node: '>=12'} - cpu: [riscv64] - os: [linux] - '@esbuild/linux-riscv64@0.21.5': resolution: {integrity: sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA==} engines: {node: '>=12'} cpu: [riscv64] os: [linux] - '@esbuild/linux-s390x@0.19.10': - resolution: {integrity: sha512-pZFe0OeskMHzHa9U38g+z8Yx5FNCLFtUnJtQMpwhS+r4S566aK2ci3t4NCP4tjt6d5j5uo4h7tExZMjeKoehAA==} - engines: {node: '>=12'} - cpu: [s390x] + '@esbuild/linux-riscv64@0.23.1': + resolution: {integrity: sha512-5AV4Pzp80fhHL83JM6LoA6pTQVWgB1HovMBsLQ9OZWLDqVY8MVobBXNSmAJi//Csh6tcY7e7Lny2Hg1tElMjIA==} + engines: {node: '>=18'} + cpu: [riscv64] os: [linux] '@esbuild/linux-s390x@0.19.12': @@ -1267,22 +1122,16 @@ packages: cpu: [s390x] os: [linux] - '@esbuild/linux-s390x@0.20.2': - resolution: {integrity: sha512-wcWISOobRWNm3cezm5HOZcYz1sKoHLd8VL1dl309DiixxVFoFe/o8HnwuIwn6sXre88Nwj+VwZUvJf4AFxkyrQ==} - engines: {node: '>=12'} - cpu: [s390x] - os: [linux] - '@esbuild/linux-s390x@0.21.5': resolution: {integrity: sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A==} engines: {node: '>=12'} cpu: [s390x] os: [linux] - '@esbuild/linux-x64@0.19.10': - resolution: {integrity: sha512-SpYNEqg/6pZYoc+1zLCjVOYvxfZVZj6w0KROZ3Fje/QrM3nfvT2llI+wmKSrWuX6wmZeTapbarvuNNK/qepSgA==} - engines: {node: '>=12'} - cpu: [x64] + '@esbuild/linux-s390x@0.23.1': + resolution: {integrity: sha512-9ygs73tuFCe6f6m/Tb+9LtYxWR4c9yg7zjt2cYkjDbDpV/xVn+68cQxMXCjUpYwEkze2RcU/rMnfIXNRFmSoDw==} + engines: {node: '>=18'} + cpu: [s390x] os: [linux] '@esbuild/linux-x64@0.19.12': @@ -1291,23 +1140,17 @@ packages: cpu: [x64] os: [linux] - '@esbuild/linux-x64@0.20.2': - resolution: {integrity: sha512-1MdwI6OOTsfQfek8sLwgyjOXAu+wKhLEoaOLTjbijk6E2WONYpH9ZU2mNtR+lZ2B4uwr+usqGuVfFT9tMtGvGw==} - engines: {node: '>=12'} - cpu: [x64] - os: [linux] - '@esbuild/linux-x64@0.21.5': resolution: {integrity: sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ==} engines: {node: '>=12'} cpu: [x64] os: [linux] - '@esbuild/netbsd-x64@0.19.10': - resolution: {integrity: sha512-ACbZ0vXy9zksNArWlk2c38NdKg25+L9pr/mVaj9SUq6lHZu/35nx2xnQVRGLrC1KKQqJKRIB0q8GspiHI3J80Q==} - engines: {node: '>=12'} + '@esbuild/linux-x64@0.23.1': + resolution: {integrity: sha512-EV6+ovTsEXCPAp58g2dD68LxoP/wK5pRvgy0J/HxPGB009omFPv3Yet0HiaqvrIrgPTBuC6wCH1LTOY91EO5hQ==} + engines: {node: '>=18'} cpu: [x64] - os: [netbsd] + os: [linux] '@esbuild/netbsd-x64@0.19.12': resolution: {integrity: sha512-3ltjQ7n1owJgFbuC61Oj++XhtzmymoCihNFgT84UAmJnxJfm4sYCiSLTXZtE00VWYpPMYc+ZQmB6xbSdVh0JWA==} @@ -1315,22 +1158,22 @@ packages: cpu: [x64] os: [netbsd] - '@esbuild/netbsd-x64@0.20.2': - resolution: {integrity: sha512-K8/DhBxcVQkzYc43yJXDSyjlFeHQJBiowJ0uVL6Tor3jGQfSGHNNJcWxNbOI8v5k82prYqzPuwkzHt3J1T1iZQ==} - engines: {node: '>=12'} - cpu: [x64] - os: [netbsd] - '@esbuild/netbsd-x64@0.21.5': resolution: {integrity: sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg==} engines: {node: '>=12'} cpu: [x64] os: [netbsd] - '@esbuild/openbsd-x64@0.19.10': - resolution: {integrity: sha512-PxcgvjdSjtgPMiPQrM3pwSaG4kGphP+bLSb+cihuP0LYdZv1epbAIecHVl5sD3npkfYBZ0ZnOjR878I7MdJDFg==} - engines: {node: '>=12'} + '@esbuild/netbsd-x64@0.23.1': + resolution: {integrity: sha512-aevEkCNu7KlPRpYLjwmdcuNz6bDFiE7Z8XC4CPqExjTvrHugh28QzUXVOZtiYghciKUacNktqxdpymplil1beA==} + engines: {node: '>=18'} cpu: [x64] + os: [netbsd] + + '@esbuild/openbsd-arm64@0.23.1': + resolution: {integrity: sha512-3x37szhLexNA4bXhLrCC/LImN/YtWis6WXr1VESlfVtVeoFJBRINPJ3f0a/6LV8zpikqoUg4hyXw0sFBt5Cr+Q==} + engines: {node: '>=18'} + cpu: [arm64] os: [openbsd] '@esbuild/openbsd-x64@0.19.12': @@ -1339,23 +1182,17 @@ packages: cpu: [x64] os: [openbsd] - '@esbuild/openbsd-x64@0.20.2': - resolution: {integrity: sha512-eMpKlV0SThJmmJgiVyN9jTPJ2VBPquf6Kt/nAoo6DgHAoN57K15ZghiHaMvqjCye/uU4X5u3YSMgVBI1h3vKrQ==} - engines: {node: '>=12'} - cpu: [x64] - os: [openbsd] - '@esbuild/openbsd-x64@0.21.5': resolution: {integrity: sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow==} engines: {node: '>=12'} cpu: [x64] os: [openbsd] - '@esbuild/sunos-x64@0.19.10': - resolution: {integrity: sha512-ZkIOtrRL8SEJjr+VHjmW0znkPs+oJXhlJbNwfI37rvgeMtk3sxOQevXPXjmAPZPigVTncvFqLMd+uV0IBSEzqA==} - engines: {node: '>=12'} + '@esbuild/openbsd-x64@0.23.1': + resolution: {integrity: sha512-aY2gMmKmPhxfU+0EdnN+XNtGbjfQgwZj43k8G3fyrDM/UdZww6xrWxmDkuz2eCZchqVeABjV5BpildOrUbBTqA==} + engines: {node: '>=18'} cpu: [x64] - os: [sunos] + os: [openbsd] '@esbuild/sunos-x64@0.19.12': resolution: {integrity: sha512-HKjJwRrW8uWtCQnQOz9qcU3mUZhTUQvi56Q8DPTLLB+DawoiQdjsYq+j+D3s9I8VFtDr+F9CjgXKKC4ss89IeA==} @@ -1363,23 +1200,17 @@ packages: cpu: [x64] os: [sunos] - '@esbuild/sunos-x64@0.20.2': - resolution: {integrity: sha512-2UyFtRC6cXLyejf/YEld4Hajo7UHILetzE1vsRcGL3earZEW77JxrFjH4Ez2qaTiEfMgAXxfAZCm1fvM/G/o8w==} - engines: {node: '>=12'} - cpu: [x64] - os: [sunos] - '@esbuild/sunos-x64@0.21.5': resolution: {integrity: sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg==} engines: {node: '>=12'} cpu: [x64] os: [sunos] - '@esbuild/win32-arm64@0.19.10': - resolution: {integrity: sha512-+Sa4oTDbpBfGpl3Hn3XiUe4f8TU2JF7aX8cOfqFYMMjXp6ma6NJDztl5FDG8Ezx0OjwGikIHw+iA54YLDNNVfw==} - engines: {node: '>=12'} - cpu: [arm64] - os: [win32] + '@esbuild/sunos-x64@0.23.1': + resolution: {integrity: sha512-RBRT2gqEl0IKQABT4XTj78tpk9v7ehp+mazn2HbUeZl1YMdaGAQqhapjGTCe7uw7y0frDi4gS0uHzhvpFuI1sA==} + engines: {node: '>=18'} + cpu: [x64] + os: [sunos] '@esbuild/win32-arm64@0.19.12': resolution: {integrity: sha512-URgtR1dJnmGvX864pn1B2YUYNzjmXkuJOIqG2HdU62MVS4EHpU2946OZoTMnRUHklGtJdJZ33QfzdjGACXhn1A==} @@ -1387,22 +1218,16 @@ packages: cpu: [arm64] os: [win32] - '@esbuild/win32-arm64@0.20.2': - resolution: {integrity: sha512-GRibxoawM9ZCnDxnP3usoUDO9vUkpAxIIZ6GQI+IlVmr5kP3zUq+l17xELTHMWTWzjxa2guPNyrpq1GWmPvcGQ==} - engines: {node: '>=12'} - cpu: [arm64] - os: [win32] - '@esbuild/win32-arm64@0.21.5': resolution: {integrity: sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A==} engines: {node: '>=12'} cpu: [arm64] os: [win32] - '@esbuild/win32-ia32@0.19.10': - resolution: {integrity: sha512-EOGVLK1oWMBXgfttJdPHDTiivYSjX6jDNaATeNOaCOFEVcfMjtbx7WVQwPSE1eIfCp/CaSF2nSrDtzc4I9f8TQ==} - engines: {node: '>=12'} - cpu: [ia32] + '@esbuild/win32-arm64@0.23.1': + resolution: {integrity: sha512-4O+gPR5rEBe2FpKOVyiJ7wNDPA8nGzDuJ6gN4okSA1gEOYZ67N8JPk58tkWtdtPeLz7lBnY6I5L3jdsr3S+A6A==} + engines: {node: '>=18'} + cpu: [arm64] os: [win32] '@esbuild/win32-ia32@0.19.12': @@ -1411,22 +1236,16 @@ packages: cpu: [ia32] os: [win32] - '@esbuild/win32-ia32@0.20.2': - resolution: {integrity: sha512-HfLOfn9YWmkSKRQqovpnITazdtquEW8/SoHW7pWpuEeguaZI4QnCRW6b+oZTztdBnZOS2hqJ6im/D5cPzBTTlQ==} - engines: {node: '>=12'} - cpu: [ia32] - os: [win32] - '@esbuild/win32-ia32@0.21.5': resolution: {integrity: sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA==} engines: {node: '>=12'} cpu: [ia32] os: [win32] - '@esbuild/win32-x64@0.19.10': - resolution: {integrity: sha512-whqLG6Sc70AbU73fFYvuYzaE4MNMBIlR1Y/IrUeOXFrWHxBEjjbZaQ3IXIQS8wJdAzue2GwYZCjOrgrU1oUHoA==} - engines: {node: '>=12'} - cpu: [x64] + '@esbuild/win32-ia32@0.23.1': + resolution: {integrity: sha512-BcaL0Vn6QwCwre3Y717nVHZbAa4UBEigzFm6VdsVdT/MbZ38xoj1X9HPkZhbmaBGUD1W8vxAfffbDe8bA6AKnQ==} + engines: {node: '>=18'} + cpu: [ia32] os: [win32] '@esbuild/win32-x64@0.19.12': @@ -1435,15 +1254,15 @@ packages: cpu: [x64] os: [win32] - '@esbuild/win32-x64@0.20.2': - resolution: {integrity: sha512-N49X4lJX27+l9jbLKSqZ6bKNjzQvHaT8IIFUy+YIqmXQdjYCToGWwOItDrfby14c78aDd5NHQl29xingXfCdLQ==} + '@esbuild/win32-x64@0.21.5': + resolution: {integrity: sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==} engines: {node: '>=12'} cpu: [x64] os: [win32] - '@esbuild/win32-x64@0.21.5': - resolution: {integrity: sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==} - engines: {node: '>=12'} + '@esbuild/win32-x64@0.23.1': + resolution: {integrity: sha512-BHpFFeslkWrXWyUPnbKm+xYYVYruCinGcftSBaa8zoF9hZO4BcSCFUvHVTtzpIY6YzUnYtuEhZ+C9iEXjxnasg==} + engines: {node: '>=18'} cpu: [x64] os: [win32] @@ -1453,30 +1272,34 @@ packages: peerDependencies: eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 - '@eslint-community/regexpp@4.10.1': - resolution: {integrity: sha512-Zm2NGpWELsQAD1xsJzGQpYfvICSsFkEpU0jxBjfdC6uNEWXcHnfs9hScFWtXVDVl+rBQJGrl4g1vcKIejpH9dA==} + '@eslint-community/regexpp@4.11.0': + resolution: {integrity: sha512-G/M/tIiMrTAxEWRfLfQJMmGNX28IxBg4PBz8XqQhqUHLFI6TL2htpIB1iQCj144V5ee/JaKyT9/WZ0MGZWfA7A==} engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} - '@eslint/compat@1.1.0': - resolution: {integrity: sha512-s9Wi/p25+KbzxKlDm3VshQdImhWk+cbdblhwGNnyCU5lpSwtWa4v7VQCxSki0FAUrGA3s8nCWgYzAH41mwQVKQ==} + '@eslint/compat@1.1.1': + resolution: {integrity: sha512-lpHyRyplhGPL5mGEh6M9O5nnKk0Gz4bFI+Zu6tKlPpDUN7XshWvH9C/px4UVm87IAANE0W81CEsNGbS1KlzXpA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@eslint/config-array@0.16.0': - resolution: {integrity: sha512-/jmuSd74i4Czf1XXn7wGRWZCuyaUZ330NH1Bek0Pplatt4Sy1S5haN21SCLLdbeKslQ+S0wEJ+++v5YibSi+Lg==} + '@eslint/config-array@0.18.0': + resolution: {integrity: sha512-fTxvnS1sRMu3+JjXwJG0j/i4RT9u4qJ+lqS/yCGap4lH4zZGzQ7tu+xZqQmcMZq5OBZDL4QRxQzRjkWcGt8IVw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@eslint/eslintrc@3.1.0': resolution: {integrity: sha512-4Bfj15dVJdoy3RfZmmo86RK1Fwzn6SstsvK9JS+BaVKqC6QQQQyXekNaC+g+LKNgkQ+2VhGAzm6hO40AhMR3zQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@eslint/js@9.5.0': - resolution: {integrity: sha512-A7+AOT2ICkodvtsWnxZP4Xxk3NbZ3VMHd8oihydLRGrJgqqdEz1qSeEgXYyT/Cu8h1TWWsQRejIx48mtjZ5y1w==} + '@eslint/js@9.10.0': + resolution: {integrity: sha512-fuXtbiP5GWIn8Fz+LWoOMVf/Jxm+aajZYkhi6CuEm4SxymFM+eUWzbO9qXT+L0iCkL5+KGYMCSGxo686H19S1g==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@eslint/object-schema@2.1.4': resolution: {integrity: sha512-BsWiH1yFGjXXS2yvrf5LyuoSIIbPrGUWob917o+BTKuZ7qJdxX8aJLRxs1fS9n6r7vESrq1OUqb68dANcFXuQQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@eslint/plugin-kit@0.1.0': + resolution: {integrity: sha512-autAXT203ixhqei9xt+qkYOvY8l6LAFIdT2UXc/RPNeUVfqRF1BV94GTJyVPFKT8nFM6MyVJhjLj9E8JWvf5zQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@fastify/busboy@2.1.1': resolution: {integrity: sha512-vBZP4NlzfOlerQTnba4aqZoMhE/a9HY7HRqoOPaETQcSQuWEIyZMHGfVu6w9wGtGK5fED5qRs2DteVCjOH60sA==} engines: {node: '>=14'} @@ -1514,24 +1337,38 @@ packages: '@gradio/atoms@0.7.4': resolution: {integrity: sha512-tBla0kYmNjh+h1Azbi+sL5RteQ2mMl2GUWToMfbUirQY9P8CrAWBLVvSWMa8dkZ8AlJUZ11tfOzTHH3dSeaWIw==} + '@gradio/atoms@0.8.1': + resolution: {integrity: sha512-TkZlao8Ow+JzKRYeX/yWWv040+aUL8/CffN9Ag5FJ6KfyaUYBfGQ3jov0uRehrlsozYajhgwKRlZCHnpEBWdtQ==} + peerDependencies: + svelte: ^4.0.0 + '@gradio/button@0.2.43': resolution: {integrity: sha512-T+SGySDKKsIhIMDat6Pqdrwd9BhaEeXpukLjmH3F3mnegXjwENB7s3C0zsfyiq3+ox8HxcO2Bt/IRARDG+gN0g==} - '@gradio/client@1.1.1': - resolution: {integrity: sha512-6Hzc+/wmNRkodefp0bvfOBQbEakwg31Ye9IVOjfoHkvunHoIzjupM+1m7VwhQXt8pMCjOw8Hc7zhvwnwy6f5GQ==} + '@gradio/client@1.5.2': + resolution: {integrity: sha512-PJbt8n3ROxDXrR55D8oPYPIIkdmG5ksyljtgNM6Kr/FgTMTwGqiiYDdoyUIGwQSBu6g+jan2zbHoniDZePw3pg==} engines: {node: '>=18.0.0'} '@gradio/icons@0.4.1': resolution: {integrity: sha512-gC6f6UENPsvoN189eqmzDpJzWBrJe4K6vmL6Tdzifq/iPRFh/zIwovXjdudpnJkTWwTci7EP/C9QtdEkTMlMvA==} - '@gradio/preview@0.9.1': - resolution: {integrity: sha512-XTtuYNkCmYE8B3t3K1WeUxQreg0EYUzeMIO1ZoXxaEdY6ZZOd7TPQ5rGHMH4daGo0yNCfCByAmmWWJ076oifzg==} + '@gradio/icons@0.7.2': + resolution: {integrity: sha512-+oRKr46PGC2qXOsPiqYCIzOR16soBqZQTmP6Ea46ZeHJuasUxbZ1DXsHmn6gEy+I/7CDNo/t6ux6lE7rJ8jDFg==} + peerDependencies: + svelte: ^4.0.0 + + '@gradio/preview@0.10.1': + resolution: {integrity: sha512-hm28fOgOViIszEt6X30lY4lLeZAOMljUgF2Dq1patIfF2ZCqL+ucIPXjzTDcJLP42vdIMu5kCmdTrx8T/roqCg==} - '@gradio/statustracker@0.6.0': - resolution: {integrity: sha512-Y89/ieo2CqhRgJM9U0Fisi1qMb86ul3BC4C2SvGAQ7d7BXN9KQqb9GsbhaqmAz9sO9xDv7zhnG63OH59MXXPMw==} + '@gradio/statustracker@0.7.6': + resolution: {integrity: sha512-Cmx2wEWIYQVxxf0r8YAspJ9w0gbp4Q6SVFp26PZR/PYkxwvelJpzIJLyys20P7OX1NVXRTEaI5NrHLskmWo7BA==} + peerDependencies: + svelte: ^4.0.0 - '@gradio/theme@0.2.3': - resolution: {integrity: sha512-JUgKTscUD0R8qktHNUzRIbfvB6HWzbRYP1vct1FmWWaXHJkyc/Ib+gp1ccKRIKutlLpF7J4gbo8gfOhSw43nHg==} + '@gradio/theme@0.2.5': + resolution: {integrity: sha512-EQ8kMoYqtk3UM8EvxC5q8TCwwahGduasyMikgMwP78Y60oTAlO+JsuOXy/1CRh6nrCK8lA8/rCqrnrVLIGGmuw==} + peerDependencies: + svelte: ^4.0.0 '@gradio/upload@0.11.2': resolution: {integrity: sha512-8jf0qQDY+GqmNFWGKTlvqBqDuH3gI6u+ATqvvM71vjFS3B4iqmJimJnTx/BAKn3DYwPwbM7AhiczKky6NiznGw==} @@ -1539,6 +1376,9 @@ packages: '@gradio/utils@0.4.2': resolution: {integrity: sha512-n2aQWhZb4azPzx/yknm8SLDsAiXdeMrYQIFbHGe5aR34jnGcUkDCVheO8i+XliBEKRipbXgcDC4J0wbW93fKCQ==} + '@gradio/utils@0.6.1': + resolution: {integrity: sha512-2PdDaoAesz9CSjRBUfg0W0tQiY8YbdfO1tpdTQ2ODmxsoSyPcI/jxOKLUSmqfYsouQp7ao/ogRKoYOuN7F3L0Q==} + '@gradio/wasm@0.10.1': resolution: {integrity: sha512-FC+apnc9zMSVS2NUouwS7imoS+o7Vhe+P3mJrTSgWksNsFDauWYkSyp2ZajqGPgexg8wRNCUKe7yteTz8gypbg==} @@ -1585,6 +1425,9 @@ packages: '@jridgewell/sourcemap-codec@1.4.15': resolution: {integrity: sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==} + '@jridgewell/sourcemap-codec@1.5.0': + resolution: {integrity: sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==} + '@jridgewell/trace-mapping@0.3.25': resolution: {integrity: sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==} @@ -1594,48 +1437,35 @@ packages: '@manypkg/find-root@1.1.0': resolution: {integrity: sha512-mki5uBvhHzO8kYYix/WRy2WX8S3B5wdVSc9D6KcU5lQNglP2yt58/VfLuAK49glRXChosY8ap2oJ1qgma3GUVA==} - '@manypkg/find-root@2.2.1': - resolution: {integrity: sha512-34NlypD5mmTY65cFAK7QPgY5Tzt0qXR4ZRXdg97xAlkiLuwXUPBEXy5Hsqzd+7S2acsLxUz6Cs50rlDZQr4xUA==} + '@manypkg/find-root@2.2.3': + resolution: {integrity: sha512-jtEZKczWTueJYHjGpxU3KJQ08Gsrf4r6Q2GjmPp/RGk5leeYAA1eyDADSAF+KVCsQ6EwZd/FMcOFCoMhtqdCtQ==} engines: {node: '>=14.18.0'} '@manypkg/get-packages@1.1.3': resolution: {integrity: sha512-fo+QhuU3qE/2TQMQmbVMqaQ6EWbMhi4ABWP+O4AM1NqPBuy0OrApV5LO6BrrgnhtAHS2NH6RrVk9OL181tTi8A==} - '@manypkg/get-packages@2.2.1': - resolution: {integrity: sha512-TrJd86paBkKEx6InhObcUhuoJNcATlbO6+s1dQdLd4+Y1SLDKJUAMhU46kTZ1SOFbegTuhDbIF3j+Jy564BERA==} + '@manypkg/get-packages@2.2.2': + resolution: {integrity: sha512-3+Zd8kLZmsyJFmWTBtY0MAuCErI7yKB2cjMBlujvSVKZ2R/BMXi0kjCXu2dtRlSq/ML86t1FkumT0yreQ3n8OQ==} engines: {node: '>=14.18.0'} - '@manypkg/tools@1.1.0': - resolution: {integrity: sha512-SkAyKAByB9l93Slyg8AUHGuM2kjvWioUTCckT/03J09jYnfEzMO/wSXmEhnKGYs6qx9De8TH4yJCl0Y9lRgnyQ==} + '@manypkg/tools@1.1.2': + resolution: {integrity: sha512-3lBouSuF7CqlseLB+FKES0K4FQ02JrbEoRtJhxnsyB1s5v4AP03gsoohN8jp7DcOImhaR9scYdztq3/sLfk/qQ==} engines: {node: '>=14.18.0'} '@mapbox/node-pre-gyp@1.0.11': resolution: {integrity: sha512-Yhlar6v9WQgUp/He7BdgzOz8lqMQ8sU+jkCq7Wx8Myc5YFJLbEe7lgui/V7G1qB1DJykHSGwreceSaD60Y0PUQ==} hasBin: true - '@microsoft/api-extractor-model@7.28.13': - resolution: {integrity: sha512-39v/JyldX4MS9uzHcdfmjjfS6cYGAoXV+io8B5a338pkHiSt+gy2eXQ0Q7cGFJ7quSa1VqqlMdlPrB6sLR/cAw==} - - '@microsoft/api-extractor-model@7.29.2': - resolution: {integrity: sha512-hAYajOjQan3uslhKJRwvvHIdLJ+ZByKqdSsJ/dgHFxPtEbdKpzMDO8zuW4K5gkSMYl5D0LbNwxkhxr51P2zsmw==} + '@microsoft/api-extractor-model@7.29.8': + resolution: {integrity: sha512-t3Z/xcO6TRbMcnKGVMs4uMzv/gd5j0NhMiJIGjD4cJMeFJ1Hf8wnLSx37vxlRlL0GWlGJhnFgxvnaL6JlS+73g==} - '@microsoft/api-extractor@7.43.0': - resolution: {integrity: sha512-GFhTcJpB+MI6FhvXEI9b2K0snulNLWHqC/BbcJtyNYcKUiw7l3Lgis5ApsYncJ0leALX7/of4XfmXk+maT111w==} + '@microsoft/api-extractor@7.47.9': + resolution: {integrity: sha512-TTq30M1rikVsO5wZVToQT/dGyJY7UXJmjiRtkHPLb74Prx3Etw8+bX7Bv7iLuby6ysb7fuu1NFWqma+csym8Jw==} hasBin: true - '@microsoft/api-extractor@7.47.0': - resolution: {integrity: sha512-LT8yvcWNf76EpDC+8/ArTVSYePvuDQ+YbAUrsTcpg3ptiZ93HIcMCozP/JOxDt+rrsFfFHcpfoselKfPyRI0GQ==} - hasBin: true - - '@microsoft/tsdoc-config@0.16.2': - resolution: {integrity: sha512-OGiIzzoBLgWWR0UdRJX98oYO+XKGf7tiK4Zk6tQ/E4IJqGCe7dvkTvgDZV5cFJUzLGDOjeAXrnZoA6QkVySuxw==} - '@microsoft/tsdoc-config@0.17.0': resolution: {integrity: sha512-v/EYRXnCAIHxOHW+Plb6OWuUoMotxTN0GLatnpOb1xq0KuTNw/WI3pamJx/UbsoJP5k9MCw1QxvvhPcF9pH3Zg==} - '@microsoft/tsdoc@0.14.2': - resolution: {integrity: sha512-9b8mPpKrfeGRuhFH5iO1iwCLeIIsV6+H1sRfxbkoGXIyQE2BTsPd9zqSqQJ+pv5sJ/hT5M1zvOFL02MnEezFug==} - '@microsoft/tsdoc@0.15.0': resolution: {integrity: sha512-HZpPoABogPvjeJOdzCOSJsXeL/SMCBgBZMVC3X3d7YYp2gf31MfxhUoYUNwf1ERPJOnQc0wkFn9trqI6ZEdZuA==} @@ -1667,6 +1497,10 @@ packages: resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==} engines: {node: '>= 8'} + '@nolyfill/is-core-module@1.0.39': + resolution: {integrity: sha512-nn5ozdjYQpUCZlWGuxcJY/KpxkWQs4DcbMCmKojjyrYDEAGy4Ce19NN4v5MduafTwJlbKc99UA8YhSVqq9yPZA==} + engines: {node: '>=12.4.0'} + '@octokit/auth-token@4.0.0': resolution: {integrity: sha512-tY/msAuJo6ARbK6SPIxZrPBms3xPbfwBrulZe0Wtr/DIY9lje2HeV1uoebShn6mx7SjCHif6EjMvoREj+gZ+SA==} engines: {node: '>= 18'} @@ -1733,8 +1567,8 @@ packages: resolution: {integrity: sha512-qgGdcVIF604M9EqjNF0hbUTz42bz/RDtxWdWuU5EQe3hi7M8ob54B6B35rOsvX5eSvIHIzT9iH1R3n+hk3CGfg==} engines: {node: '>=14.x'} - '@rc-component/color-picker@1.5.3': - resolution: {integrity: sha512-+tGGH3nLmYXTalVe0L8hSZNs73VTP5ueSHwUlDC77KKRaN7G4DS4wcpG5DTDzdcV/Yas+rzA6UGgIyzd8fS4cw==} + '@rc-component/color-picker@2.0.1': + resolution: {integrity: sha512-WcZYwAThV/b2GISQ8F+7650r5ZZJ043E57aVBFkQ+kSY4C6wdofXgB0hBx+GPGpIU0Z81eETNoDUJMr7oy/P8Q==} peerDependencies: react: '>=16.9.0' react-dom: '>=16.9.0' @@ -1763,15 +1597,22 @@ packages: react: '>=16.9.0' react-dom: '>=16.9.0' - '@rc-component/tour@1.15.0': - resolution: {integrity: sha512-h6hyILDwL+In9GAgRobwRWihLqqsD7Uft3fZGrJ7L4EiyCoxbnNYwzPXDfz7vNDhWeVyvAWQJj9fJCzpI4+b4g==} + '@rc-component/qrcode@1.0.0': + resolution: {integrity: sha512-L+rZ4HXP2sJ1gHMGHjsg9jlYBX/SLN2D6OxP9Zn3qgtpMWtO2vUfxVFwiogHpAIqs54FnALxraUy/BCO1yRIgg==} + engines: {node: '>=8.x'} + peerDependencies: + react: '>=16.9.0' + react-dom: '>=16.9.0' + + '@rc-component/tour@1.15.1': + resolution: {integrity: sha512-Tr2t7J1DKZUpfJuDZWHxyxWpfmj8EZrqSgyMZ+BCdvKZ6r1UDsfU46M/iWAAFBy961Ssfom2kv5f3UcjIL2CmQ==} engines: {node: '>=8.x'} peerDependencies: react: '>=16.9.0' react-dom: '>=16.9.0' - '@rc-component/trigger@2.2.0': - resolution: {integrity: sha512-QarBCji02YE9aRFhZgRZmOpXBj0IZutRippsVBv85sxvG4FGk/vRxwAlkn3MS9zK5mwbETd86mAVg2tKqTkdJA==} + '@rc-component/trigger@2.2.3': + resolution: {integrity: sha512-X1oFIpKoXAMXNDYCviOmTfuNuYxE4h5laBsyCqVAVMjNHxoF3/uiyA7XdegK1XbCvBbCZ6P6byWrEoDRpKL8+A==} engines: {node: '>=8.x'} peerDependencies: react: '>=16.9.0' @@ -1795,126 +1636,110 @@ packages: rollup: optional: true - '@rollup/rollup-android-arm-eabi@4.18.0': - resolution: {integrity: sha512-Tya6xypR10giZV1XzxmH5wr25VcZSncG0pZIjfePT0OVBvqNEurzValetGNarVrGiq66EBVAFn15iYX4w6FKgQ==} + '@rollup/rollup-android-arm-eabi@4.21.2': + resolution: {integrity: sha512-fSuPrt0ZO8uXeS+xP3b+yYTCBUd05MoSp2N/MFOgjhhUhMmchXlpTQrTpI8T+YAwAQuK7MafsCOxW7VrPMrJcg==} cpu: [arm] os: [android] - '@rollup/rollup-android-arm64@4.18.0': - resolution: {integrity: sha512-avCea0RAP03lTsDhEyfy+hpfr85KfyTctMADqHVhLAF3MlIkq83CP8UfAHUssgXTYd+6er6PaAhx/QGv4L1EiA==} + '@rollup/rollup-android-arm64@4.21.2': + resolution: {integrity: sha512-xGU5ZQmPlsjQS6tzTTGwMsnKUtu0WVbl0hYpTPauvbRAnmIvpInhJtgjj3mcuJpEiuUw4v1s4BimkdfDWlh7gA==} cpu: [arm64] os: [android] - '@rollup/rollup-darwin-arm64@4.18.0': - resolution: {integrity: sha512-IWfdwU7KDSm07Ty0PuA/W2JYoZ4iTj3TUQjkVsO/6U+4I1jN5lcR71ZEvRh52sDOERdnNhhHU57UITXz5jC1/w==} + '@rollup/rollup-darwin-arm64@4.21.2': + resolution: {integrity: sha512-99AhQ3/ZMxU7jw34Sq8brzXqWH/bMnf7ZVhvLk9QU2cOepbQSVTns6qoErJmSiAvU3InRqC2RRZ5ovh1KN0d0Q==} cpu: [arm64] os: [darwin] - '@rollup/rollup-darwin-x64@4.18.0': - resolution: {integrity: sha512-n2LMsUz7Ynu7DoQrSQkBf8iNrjOGyPLrdSg802vk6XT3FtsgX6JbE8IHRvposskFm9SNxzkLYGSq9QdpLYpRNA==} + '@rollup/rollup-darwin-x64@4.21.2': + resolution: {integrity: sha512-ZbRaUvw2iN/y37x6dY50D8m2BnDbBjlnMPotDi/qITMJ4sIxNY33HArjikDyakhSv0+ybdUxhWxE6kTI4oX26w==} cpu: [x64] os: [darwin] - '@rollup/rollup-linux-arm-gnueabihf@4.18.0': - resolution: {integrity: sha512-C/zbRYRXFjWvz9Z4haRxcTdnkPt1BtCkz+7RtBSuNmKzMzp3ZxdM28Mpccn6pt28/UWUCTXa+b0Mx1k3g6NOMA==} + '@rollup/rollup-linux-arm-gnueabihf@4.21.2': + resolution: {integrity: sha512-ztRJJMiE8nnU1YFcdbd9BcH6bGWG1z+jP+IPW2oDUAPxPjo9dverIOyXz76m6IPA6udEL12reYeLojzW2cYL7w==} cpu: [arm] os: [linux] - '@rollup/rollup-linux-arm-musleabihf@4.18.0': - resolution: {integrity: sha512-l3m9ewPgjQSXrUMHg93vt0hYCGnrMOcUpTz6FLtbwljo2HluS4zTXFy2571YQbisTnfTKPZ01u/ukJdQTLGh9A==} + '@rollup/rollup-linux-arm-musleabihf@4.21.2': + resolution: {integrity: sha512-flOcGHDZajGKYpLV0JNc0VFH361M7rnV1ee+NTeC/BQQ1/0pllYcFmxpagltANYt8FYf9+kL6RSk80Ziwyhr7w==} cpu: [arm] os: [linux] - '@rollup/rollup-linux-arm64-gnu@4.18.0': - resolution: {integrity: sha512-rJ5D47d8WD7J+7STKdCUAgmQk49xuFrRi9pZkWoRD1UeSMakbcepWXPF8ycChBoAqs1pb2wzvbY6Q33WmN2ftw==} + '@rollup/rollup-linux-arm64-gnu@4.21.2': + resolution: {integrity: sha512-69CF19Kp3TdMopyteO/LJbWufOzqqXzkrv4L2sP8kfMaAQ6iwky7NoXTp7bD6/irKgknDKM0P9E/1l5XxVQAhw==} cpu: [arm64] os: [linux] - '@rollup/rollup-linux-arm64-musl@4.18.0': - resolution: {integrity: sha512-be6Yx37b24ZwxQ+wOQXXLZqpq4jTckJhtGlWGZs68TgdKXJgw54lUUoFYrg6Zs/kjzAQwEwYbp8JxZVzZLRepQ==} + '@rollup/rollup-linux-arm64-musl@4.21.2': + resolution: {integrity: sha512-48pD/fJkTiHAZTnZwR0VzHrao70/4MlzJrq0ZsILjLW/Ab/1XlVUStYyGt7tdyIiVSlGZbnliqmult/QGA2O2w==} cpu: [arm64] os: [linux] - '@rollup/rollup-linux-powerpc64le-gnu@4.18.0': - resolution: {integrity: sha512-hNVMQK+qrA9Todu9+wqrXOHxFiD5YmdEi3paj6vP02Kx1hjd2LLYR2eaN7DsEshg09+9uzWi2W18MJDlG0cxJA==} + '@rollup/rollup-linux-powerpc64le-gnu@4.21.2': + resolution: {integrity: sha512-cZdyuInj0ofc7mAQpKcPR2a2iu4YM4FQfuUzCVA2u4HI95lCwzjoPtdWjdpDKyHxI0UO82bLDoOaLfpZ/wviyQ==} cpu: [ppc64] os: [linux] - '@rollup/rollup-linux-riscv64-gnu@4.18.0': - resolution: {integrity: sha512-ROCM7i+m1NfdrsmvwSzoxp9HFtmKGHEqu5NNDiZWQtXLA8S5HBCkVvKAxJ8U+CVctHwV2Gb5VUaK7UAkzhDjlg==} + '@rollup/rollup-linux-riscv64-gnu@4.21.2': + resolution: {integrity: sha512-RL56JMT6NwQ0lXIQmMIWr1SW28z4E4pOhRRNqwWZeXpRlykRIlEpSWdsgNWJbYBEWD84eocjSGDu/XxbYeCmwg==} cpu: [riscv64] os: [linux] - '@rollup/rollup-linux-s390x-gnu@4.18.0': - resolution: {integrity: sha512-0UyyRHyDN42QL+NbqevXIIUnKA47A+45WyasO+y2bGJ1mhQrfrtXUpTxCOrfxCR4esV3/RLYyucGVPiUsO8xjg==} + '@rollup/rollup-linux-s390x-gnu@4.21.2': + resolution: {integrity: sha512-PMxkrWS9z38bCr3rWvDFVGD6sFeZJw4iQlhrup7ReGmfn7Oukrr/zweLhYX6v2/8J6Cep9IEA/SmjXjCmSbrMQ==} cpu: [s390x] os: [linux] - '@rollup/rollup-linux-x64-gnu@4.18.0': - resolution: {integrity: sha512-xuglR2rBVHA5UsI8h8UbX4VJ470PtGCf5Vpswh7p2ukaqBGFTnsfzxUBetoWBWymHMxbIG0Cmx7Y9qDZzr648w==} + '@rollup/rollup-linux-x64-gnu@4.21.2': + resolution: {integrity: sha512-B90tYAUoLhU22olrafY3JQCFLnT3NglazdwkHyxNDYF/zAxJt5fJUB/yBoWFoIQ7SQj+KLe3iL4BhOMa9fzgpw==} cpu: [x64] os: [linux] - '@rollup/rollup-linux-x64-musl@4.18.0': - resolution: {integrity: sha512-LKaqQL9osY/ir2geuLVvRRs+utWUNilzdE90TpyoX0eNqPzWjRm14oMEE+YLve4k/NAqCdPkGYDaDF5Sw+xBfg==} + '@rollup/rollup-linux-x64-musl@4.21.2': + resolution: {integrity: sha512-7twFizNXudESmC9oneLGIUmoHiiLppz/Xs5uJQ4ShvE6234K0VB1/aJYU3f/4g7PhssLGKBVCC37uRkkOi8wjg==} cpu: [x64] os: [linux] - '@rollup/rollup-win32-arm64-msvc@4.18.0': - resolution: {integrity: sha512-7J6TkZQFGo9qBKH0pk2cEVSRhJbL6MtfWxth7Y5YmZs57Pi+4x6c2dStAUvaQkHQLnEQv1jzBUW43GvZW8OFqA==} + '@rollup/rollup-win32-arm64-msvc@4.21.2': + resolution: {integrity: sha512-9rRero0E7qTeYf6+rFh3AErTNU1VCQg2mn7CQcI44vNUWM9Ze7MSRS/9RFuSsox+vstRt97+x3sOhEey024FRQ==} cpu: [arm64] os: [win32] - '@rollup/rollup-win32-ia32-msvc@4.18.0': - resolution: {integrity: sha512-Txjh+IxBPbkUB9+SXZMpv+b/vnTEtFyfWZgJ6iyCmt2tdx0OF5WhFowLmnh8ENGNpfUlUZkdI//4IEmhwPieNg==} + '@rollup/rollup-win32-ia32-msvc@4.21.2': + resolution: {integrity: sha512-5rA4vjlqgrpbFVVHX3qkrCo/fZTj1q0Xxpg+Z7yIo3J2AilW7t2+n6Q8Jrx+4MrYpAnjttTYF8rr7bP46BPzRw==} cpu: [ia32] os: [win32] - '@rollup/rollup-win32-x64-msvc@4.18.0': - resolution: {integrity: sha512-UOo5FdvOL0+eIVTgS4tIdbW+TtnBLWg1YBCcU2KWM7nuNwRz9bksDX1bekJJCpu25N1DVWaCwnT39dVQxzqS8g==} + '@rollup/rollup-win32-x64-msvc@4.21.2': + resolution: {integrity: sha512-6UUxd0+SKomjdzuAcp+HAmxw1FlGBnl1v2yEPSabtx4lBfdXHDVsW7+lQkgz9cNFJGY3AWR7+V8P5BqkD9L9nA==} cpu: [x64] os: [win32] - '@rushstack/node-core-library@4.0.2': - resolution: {integrity: sha512-hyES82QVpkfQMeBMteQUnrhASL/KHPhd7iJ8euduwNJG4mu2GSOKybf0rOEjOm1Wz7CwJEUm9y0yD7jg2C1bfg==} - peerDependencies: - '@types/node': '*' - peerDependenciesMeta: - '@types/node': - optional: true + '@rtsao/scc@1.1.0': + resolution: {integrity: sha512-zt6OdqaDoOnJ1ZYsCYGt9YmWzDXl4vQdKTyJev62gFhRGKdx7mcT54V9KIjg+d2wi9EXsPvAPKe7i7WjfVWB8g==} - '@rushstack/node-core-library@5.4.1': - resolution: {integrity: sha512-WNnwdS8r9NZ/2K3u29tNoSRldscFa7SxU0RT+82B6Dy2I4Hl2MeCSKm4EXLXPKeNzLGvJ1cqbUhTLviSF8E6iA==} + '@rushstack/node-core-library@5.9.0': + resolution: {integrity: sha512-MMsshEWkTbXqxqFxD4gcIUWQOCeBChlGczdZbHfqmNZQFLHB3yWxDFSMHFUdu2/OB9NUk7Awn5qRL+rws4HQNg==} peerDependencies: '@types/node': '*' peerDependenciesMeta: '@types/node': optional: true - '@rushstack/rig-package@0.5.2': - resolution: {integrity: sha512-mUDecIJeH3yYGZs2a48k+pbhM6JYwWlgjs2Ca5f2n1G2/kgdgP9D/07oglEGf6mRyXEnazhEENeYTSNDRCwdqA==} - - '@rushstack/terminal@0.10.0': - resolution: {integrity: sha512-UbELbXnUdc7EKwfH2sb8ChqNgapUOdqcCIdQP4NGxBpTZV2sQyeekuK3zmfQSa/MN+/7b4kBogl2wq0vpkpYGw==} - peerDependencies: - '@types/node': '*' - peerDependenciesMeta: - '@types/node': - optional: true + '@rushstack/rig-package@0.5.3': + resolution: {integrity: sha512-olzSSjYrvCNxUFZowevC3uz8gvKr3WTpHQ7BkpjtRpA3wK+T0ybep/SRUMfr195gBzJm5gaXw0ZMgjIyHqJUow==} - '@rushstack/terminal@0.13.0': - resolution: {integrity: sha512-Ou44Q2s81BqJu3dpYedAX54am9vn245F0HzqVrfJCMQk5pGgoKKOBOjkbfZC9QKcGNaECh6pwH2s5noJt7X6ew==} + '@rushstack/terminal@0.14.2': + resolution: {integrity: sha512-2fC1wqu1VCExKC0/L+0noVcFQEXEnoBOtCIex1TOjBzEDWcw8KzJjjj7aTP6mLxepG0XIyn9OufeFb6SFsa+sg==} peerDependencies: '@types/node': '*' peerDependenciesMeta: '@types/node': optional: true - '@rushstack/ts-command-line@4.19.1': - resolution: {integrity: sha512-J7H768dgcpG60d7skZ5uSSwyCZs/S2HrWP1Ds8d1qYAyaaeJmpmmLr9BVw97RjFzmQPOYnoXcKA4GkqDCkduQg==} - - '@rushstack/ts-command-line@4.22.0': - resolution: {integrity: sha512-Qj28t6MO3HRgAZ72FDeFsrpdE6wBWxF3VENgvrXh7JF2qIT+CrXiOJIesW80VFZB9QwObSpkB1ilx794fGQg6g==} + '@rushstack/ts-command-line@4.22.8': + resolution: {integrity: sha512-XbFjOoV7qZHJnSuFUHv0pKaFA4ixyCuki+xMjsMfDwfvQjs5MYG0IK5COal3tRnG7KCDe2l/G+9LrzYE/RJhgg==} '@subscribe-kit/core@2.1.1': resolution: {integrity: sha512-wMTlt9+fchK9DQ+KGiWgIcG/8F12zJ7ujwAADUKPz9CRtsjDMverLuZEv43777T2bp/aUHHT/ZUmhMK6rU65AA==} @@ -1949,8 +1774,8 @@ packages: cpu: [arm64] os: [darwin] - '@swc/core-darwin-arm64@1.6.5': - resolution: {integrity: sha512-RGQhMdni2v1/ANQ/2K+F+QYdzaucekYBewZcX1ogqJ8G5sbPaBdYdDN1qQ4kHLCIkPtGP6qC7c71qPEqL2RidQ==} + '@swc/core-darwin-arm64@1.7.26': + resolution: {integrity: sha512-FF3CRYTg6a7ZVW4yT9mesxoVVZTrcSWtmZhxKCYJX9brH4CS/7PRPjAKNk6kzWgWuRoglP7hkjQcd6EpMcZEAw==} engines: {node: '>=10'} cpu: [arm64] os: [darwin] @@ -1961,8 +1786,8 @@ packages: cpu: [x64] os: [darwin] - '@swc/core-darwin-x64@1.6.5': - resolution: {integrity: sha512-/pSN0/Jtcbbb9+ovS9rKxR3qertpFAM3OEJr/+Dh/8yy7jK5G5EFPIrfsw/7Q5987ERPIJIH6BspK2CBB2tgcg==} + '@swc/core-darwin-x64@1.7.26': + resolution: {integrity: sha512-az3cibZdsay2HNKmc4bjf62QVukuiMRh5sfM5kHR/JMTrLyS6vSw7Ihs3UTkZjUxkLTT8ro54LI6sV6sUQUbLQ==} engines: {node: '>=10'} cpu: [x64] os: [darwin] @@ -1973,8 +1798,8 @@ packages: cpu: [arm] os: [linux] - '@swc/core-linux-arm-gnueabihf@1.6.5': - resolution: {integrity: sha512-B0g/dROCE747RRegs/jPHuKJgwXLracDhnqQa80kFdgWEMjlcb7OMCgs5OX86yJGRS4qcYbiMGD0Pp7Kbqn3yw==} + '@swc/core-linux-arm-gnueabihf@1.7.26': + resolution: {integrity: sha512-VYPFVJDO5zT5U3RpCdHE5v1gz4mmR8BfHecUZTmD2v1JeFY6fv9KArJUpjrHEEsjK/ucXkQFmJ0jaiWXmpOV9Q==} engines: {node: '>=10'} cpu: [arm] os: [linux] @@ -1985,8 +1810,8 @@ packages: cpu: [arm64] os: [linux] - '@swc/core-linux-arm64-gnu@1.6.5': - resolution: {integrity: sha512-W8meapgXTq8AOtSvDG4yKR8ant2WWD++yOjgzAleB5VAC+oC+aa8YJROGxj8HepurU8kurqzcialwoMeq5SZZQ==} + '@swc/core-linux-arm64-gnu@1.7.26': + resolution: {integrity: sha512-YKevOV7abpjcAzXrhsl+W48Z9mZvgoVs2eP5nY+uoMAdP2b3GxC0Df1Co0I90o2lkzO4jYBpTMcZlmUXLdXn+Q==} engines: {node: '>=10'} cpu: [arm64] os: [linux] @@ -1997,8 +1822,8 @@ packages: cpu: [arm64] os: [linux] - '@swc/core-linux-arm64-musl@1.6.5': - resolution: {integrity: sha512-jyCKqoX50Fg8rJUQqh4u5PqnE7nqYKXHjVH2WcYr114/MU21zlsI+YL6aOQU1XP8bJQ2gPQ1rnlnGJdEHiKS/w==} + '@swc/core-linux-arm64-musl@1.7.26': + resolution: {integrity: sha512-3w8iZICMkQQON0uIcvz7+Q1MPOW6hJ4O5ETjA0LSP/tuKqx30hIniCGOgPDnv3UTMruLUnQbtBwVCZTBKR3Rkg==} engines: {node: '>=10'} cpu: [arm64] os: [linux] @@ -2009,8 +1834,8 @@ packages: cpu: [x64] os: [linux] - '@swc/core-linux-x64-gnu@1.6.5': - resolution: {integrity: sha512-G6HmUn/RRIlXC0YYFfBz2qh6OZkHS/KUPkhoG4X9ADcgWXXjOFh6JrefwsYj8VBAJEnr5iewzjNfj+nztwHaeA==} + '@swc/core-linux-x64-gnu@1.7.26': + resolution: {integrity: sha512-c+pp9Zkk2lqb06bNGkR2Looxrs7FtGDMA4/aHjZcCqATgp348hOKH5WPvNLBl+yPrISuWjbKDVn3NgAvfvpH4w==} engines: {node: '>=10'} cpu: [x64] os: [linux] @@ -2021,8 +1846,8 @@ packages: cpu: [x64] os: [linux] - '@swc/core-linux-x64-musl@1.6.5': - resolution: {integrity: sha512-AQpBjBnelQDSbeTJA50AXdS6+CP66LsXIMNTwhPSgUfE7Bx1ggZV11Fsi4Q5SGcs6a8Qw1cuYKN57ZfZC5QOuA==} + '@swc/core-linux-x64-musl@1.7.26': + resolution: {integrity: sha512-PgtyfHBF6xG87dUSSdTJHwZ3/8vWZfNIXQV2GlwEpslrOkGqy+WaiiyE7Of7z9AvDILfBBBcJvJ/r8u980wAfQ==} engines: {node: '>=10'} cpu: [x64] os: [linux] @@ -2033,8 +1858,8 @@ packages: cpu: [arm64] os: [win32] - '@swc/core-win32-arm64-msvc@1.6.5': - resolution: {integrity: sha512-MZTWM8kUwS30pVrtbzSGEXtek46aXNb/mT9D6rsS7NvOuv2w+qZhjR1rzf4LNbbn5f8VnR4Nac1WIOYZmfC5ng==} + '@swc/core-win32-arm64-msvc@1.7.26': + resolution: {integrity: sha512-9TNXPIJqFynlAOrRD6tUQjMq7KApSklK3R/tXgIxc7Qx+lWu8hlDQ/kVPLpU7PWvMMwC/3hKBW+p5f+Tms1hmA==} engines: {node: '>=10'} cpu: [arm64] os: [win32] @@ -2045,8 +1870,8 @@ packages: cpu: [ia32] os: [win32] - '@swc/core-win32-ia32-msvc@1.6.5': - resolution: {integrity: sha512-WZdu4gISAr3yOm1fVwKhhk6+MrP7kVX0KMP7+ZQFTN5zXQEiDSDunEJKVgjMVj3vlR+6mnAqa/L0V9Qa8+zKlQ==} + '@swc/core-win32-ia32-msvc@1.7.26': + resolution: {integrity: sha512-9YngxNcG3177GYdsTum4V98Re+TlCeJEP4kEwEg9EagT5s3YejYdKwVAkAsJszzkXuyRDdnHUpYbTrPG6FiXrQ==} engines: {node: '>=10'} cpu: [ia32] os: [win32] @@ -2057,8 +1882,8 @@ packages: cpu: [x64] os: [win32] - '@swc/core-win32-x64-msvc@1.6.5': - resolution: {integrity: sha512-ezXgucnMTzlFIxQZw7ls/5r2hseFaRoDL04cuXUOs97E8r+nJSmFsRQm/ygH5jBeXNo59nyZCalrjJAjwfgACA==} + '@swc/core-win32-x64-msvc@1.7.26': + resolution: {integrity: sha512-VR+hzg9XqucgLjXxA13MtV5O3C0bK0ywtLIBw/+a+O+Oc6mxFWHtdUeXDbIi5AiPbn0fjgVJMqYnyjGyyX8u0w==} engines: {node: '>=10'} cpu: [x64] os: [win32] @@ -2072,8 +1897,8 @@ packages: '@swc/helpers': optional: true - '@swc/core@1.6.5': - resolution: {integrity: sha512-tyVvUK/HDOUUsK6/GmWvnqUtD9oDpPUA4f7f7JCOV8hXxtfjMtAZeBKf93yrB1XZet69TDR7EN0hFC6i4MF0Ig==} + '@swc/core@1.7.26': + resolution: {integrity: sha512-f5uYFf+TmMQyYIoxkn/evWhNGuUzC730dFwAKGwBVHHVoPyak1/GvJUm6i1SKl+2Hrj9oN0i3WSoWWZ4pgI8lw==} engines: {node: '>=10'} peerDependencies: '@swc/helpers': '*' @@ -2084,12 +1909,12 @@ packages: '@swc/counter@0.1.3': resolution: {integrity: sha512-e2BR4lsJkkRlKZ/qCHPw9ZaSxc0MVUd7gtbtaB7aMvHeJVYe8sOB8DBZkP2DtISHGSku9sCK6T6cnY0CtXrOCQ==} + '@swc/types@0.1.12': + resolution: {integrity: sha512-wBJA+SdtkbFhHjTMYH+dEH1y4VpfGdAc2Kw/LK09i9bXd/K6j6PkDcFCEzb6iVfZMkPRrl/q0e3toqTAJdkIVA==} + '@swc/types@0.1.8': resolution: {integrity: sha512-RNFA3+7OJFNYY78x0FYwi1Ow+iF1eF5WvmfY1nXPOEH4R2p/D4Cr1vzje7dNAI2aLFqpv8Wyz4oKSWqIZArpQA==} - '@swc/types@0.1.9': - resolution: {integrity: sha512-qKnCno++jzcJ4lM4NTfYifm1EFSCeIfKiAHAfkENZAV5Kl9PjJIyd2yeeVv6c/2CckuLyv2NmRC5pv6pm2WQBg==} - '@tsconfig/node10@1.0.11': resolution: {integrity: sha512-DcRjDCujK/kCk/cUe8Xz8ZSpm8mS3mNNpta+jGCA6USEDfktlNvm1+IuZ9eTcDbNk41BHwpHHeW+N1lKCz4zOw==} @@ -2144,8 +1969,11 @@ packages: '@types/debug@4.1.12': resolution: {integrity: sha512-vIChWdVG3LG1SMxEvI/AK+FWJthlrqlTu7fbrlywTkkaONwk/UAGaULXRlf8vkzFBLVm0zkMdCquhL5aOjhXPQ==} - '@types/eslint@8.56.10': - resolution: {integrity: sha512-Shavhk87gCtY2fhXDctcfS3e6FdxWkCx1iUZ9eEUbh7rTqlZT0/IzOkCOVt0fCjcFuZ9FPYfuezTBImfHCDBGQ==} + '@types/dompurify@3.0.5': + resolution: {integrity: sha512-1Wg0g3BtQF7sSb27fJQAKck1HECM6zV1EB66j8JH9i3LCjYabJa0FSdiSgsD5K/RbrsR0SiraKacLB+T8ZVYAg==} + + '@types/eslint@9.6.1': + resolution: {integrity: sha512-FXx2pKgId/WyYo2jXw63kk7/+TY7u7AziEJxJAnSFzHlqTAS3Ync6SvgYAN/k4/PQpnnVuzoMuVnByKK2qp0ag==} '@types/eslint__js@8.42.3': resolution: {integrity: sha512-alfG737uhmPdnvkrLdZLcEKJ/B8s9Y4hrZ+YAdzUeoArBlSUERA2E87ROfOaS4jd/C45fzOoZzidLc1IPwLqOw==} @@ -2165,8 +1993,8 @@ packages: '@types/hast@2.3.9': resolution: {integrity: sha512-pTHyNlaMD/oKJmS+ZZUyFUcsZeBZpC0lmGquw98CqRVNgAdJZJeD7GoeLiT6Xbx5rU9VCjSt0RwEvDgzh4obFw==} - '@types/hast@3.0.3': - resolution: {integrity: sha512-2fYGlaDy/qyLlhidX42wAH0KBi2TCjKMH8CHmBXgRlJ3Y+OXTiqsPQ6IWarZKwF1JoUcAJdPogv1d4b0COTpmQ==} + '@types/hast@3.0.4': + resolution: {integrity: sha512-WPs+bbQw5aCj+x6laNGWLH3wviHtoCv/P3+otBhbOhJgG8qtpdAMlTCxLtsTWA7LH1Oh/bFCHsBn0TPS5m30EQ==} '@types/json-schema@7.0.15': resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==} @@ -2198,11 +2026,14 @@ packages: '@types/node@12.20.55': resolution: {integrity: sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==} - '@types/node@16.18.101': - resolution: {integrity: sha512-AAsx9Rgz2IzG8KJ6tXd6ndNkVcu+GYB6U/SnFAaokSPNx2N7dcIIfnighYUNumvj6YS2q39Dejz5tT0NCV7CWA==} + '@types/node@18.19.50': + resolution: {integrity: sha512-xonK+NRrMBRtkL1hVCc3G+uXtjh1Al4opBLjqVmipe5ZAaBYWW6cNAiBVZ1BvmkBhep698rP3UM3aRAdSALuhg==} + + '@types/node@20.16.5': + resolution: {integrity: sha512-VwYCweNo3ERajwy0IUlqqcyZ8/A7Zwa9ZP3MnENWcB11AejO+tLy3pu850goUW2FC/IJMdZUfKpX/yxL1gymCA==} - '@types/node@20.14.9': - resolution: {integrity: sha512-06OCtnTXtWOZBJlRApleWndH4JsRVs1pDCc8dLSQp+7PpUpX3ePdHyeNSFTeSe7FtKyQkrlPvHwJOW3SLd8Oyg==} + '@types/node@22.5.4': + resolution: {integrity: sha512-FDuKUJQm/ju9fT/SeX/6+gBzoPzlVCzfzmGkwKvRHQVxi4BntVbyIwf6a4Xn62mrvndLiml6z/UBXIdEVjQLXg==} '@types/path-browserify@1.0.2': resolution: {integrity: sha512-ZkC5IUqqIFPXx3ASTTybTzmQdwHwe2C0u3eL75ldQ6T9E9IWFJodn6hIfbZGab73DfyiHN4Xw15gNxUq2FbvBA==} @@ -2219,8 +2050,8 @@ packages: '@types/react-syntax-highlighter@15.5.13': resolution: {integrity: sha512-uLGJ87j6Sz8UaBAooU0T6lWJ0dBmjZgN1PZTrj05TNql2/XpC6+4HhMT5syIdFUUt+FASfCeLLv4kBygNU+8qA==} - '@types/react@18.3.3': - resolution: {integrity: sha512-hti/R0pS0q1/xx+TsI73XIqk26eBsISZ2R0wUijXIngRK9R/e7Xw/cXVxQK7R5JjW+SV4zGcn5hXjudkN/pLIw==} + '@types/react@18.3.5': + resolution: {integrity: sha512-WeqMfGJLGuLCqHGYRGHxnKrXcTitc6L/nBUWfWPcTarG3t9PsquqUMuVeXZeca+mglY4Vo5GZjCi0A3Or2lnxA==} '@types/semver@7.5.8': resolution: {integrity: sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==} @@ -2228,11 +2059,14 @@ packages: '@types/statuses@2.0.5': resolution: {integrity: sha512-jmIUGWrAiwu3dZpxntxieC+1n/5c3mjrImkmOSQ2NC5uP6cYO4aAZDdSmRcI5C1oiTmqlZGHC+/NmJrKogbP5A==} + '@types/trusted-types@2.0.7': + resolution: {integrity: sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw==} + '@types/unist@2.0.10': resolution: {integrity: sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA==} - '@types/unist@3.0.2': - resolution: {integrity: sha512-dqId9J8K/vGi5Zr7oo212BGii5m3q5Hxlkwy3WpYuKPklmBEvsbMYYyLxAQpSffdLl/gdW0XUpKWFvYmyoWCoQ==} + '@types/unist@3.0.3': + resolution: {integrity: sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==} '@types/vfile-message@2.0.0': resolution: {integrity: sha512-GpTIuDpb9u4zIO165fUy9+fXcULdD8HFRNli04GehoMVbeNq7D6OBnqSmg3lxZnC+UvgUhEWKxdKiwYUkGltIw==} @@ -2247,63 +2081,62 @@ packages: '@types/wrap-ansi@3.0.0': resolution: {integrity: sha512-ltIpx+kM7g/MLRZfkbL7EsCEjfzCcScLpkg37eXEtx5kmrAKBkTJwd1GIAjDSL8wTpM6Hzn5YO4pSb91BEwu1g==} - '@typescript-eslint/eslint-plugin@7.14.1': - resolution: {integrity: sha512-aAJd6bIf2vvQRjUG3ZkNXkmBpN+J7Wd0mfQiiVCJMu9Z5GcZZdcc0j8XwN/BM97Fl7e3SkTXODSk4VehUv7CGw==} - engines: {node: ^18.18.0 || >=20.0.0} + '@typescript-eslint/eslint-plugin@8.5.0': + resolution: {integrity: sha512-lHS5hvz33iUFQKuPFGheAB84LwcJ60G8vKnEhnfcK1l8kGVLro2SFYW6K0/tj8FUhRJ0VHyg1oAfg50QGbPPHw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: - '@typescript-eslint/parser': ^7.0.0 - eslint: ^8.56.0 + '@typescript-eslint/parser': ^8.0.0 || ^8.0.0-alpha.0 + eslint: ^8.57.0 || ^9.0.0 typescript: '*' peerDependenciesMeta: typescript: optional: true - '@typescript-eslint/parser@7.14.1': - resolution: {integrity: sha512-8lKUOebNLcR0D7RvlcloOacTOWzOqemWEWkKSVpMZVF/XVcwjPR+3MD08QzbW9TCGJ+DwIc6zUSGZ9vd8cO1IA==} - engines: {node: ^18.18.0 || >=20.0.0} + '@typescript-eslint/parser@8.5.0': + resolution: {integrity: sha512-gF77eNv0Xz2UJg/NbpWJ0kqAm35UMsvZf1GHj8D9MRFTj/V3tAciIWXfmPLsAAF/vUlpWPvUDyH1jjsr0cMVWw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: - eslint: ^8.56.0 + eslint: ^8.57.0 || ^9.0.0 typescript: '*' peerDependenciesMeta: typescript: optional: true - '@typescript-eslint/scope-manager@7.14.1': - resolution: {integrity: sha512-gPrFSsoYcsffYXTOZ+hT7fyJr95rdVe4kGVX1ps/dJ+DfmlnjFN/GcMxXcVkeHDKqsq6uAcVaQaIi3cFffmAbA==} - engines: {node: ^18.18.0 || >=20.0.0} + '@typescript-eslint/scope-manager@8.5.0': + resolution: {integrity: sha512-06JOQ9Qgj33yvBEx6tpC8ecP9o860rsR22hWMEd12WcTRrfaFgHr2RB/CA/B+7BMhHkXT4chg2MyboGdFGawYg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/type-utils@7.14.1': - resolution: {integrity: sha512-/MzmgNd3nnbDbOi3LfasXWWe292+iuo+umJ0bCCMCPc1jLO/z2BQmWUUUXvXLbrQey/JgzdF/OV+I5bzEGwJkQ==} - engines: {node: ^18.18.0 || >=20.0.0} + '@typescript-eslint/type-utils@8.5.0': + resolution: {integrity: sha512-N1K8Ix+lUM+cIDhL2uekVn/ZD7TZW+9/rwz8DclQpcQ9rk4sIL5CAlBC0CugWKREmDjBzI/kQqU4wkg46jWLYA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: - eslint: ^8.56.0 typescript: '*' peerDependenciesMeta: typescript: optional: true - '@typescript-eslint/types@7.14.1': - resolution: {integrity: sha512-mL7zNEOQybo5R3AavY+Am7KLv8BorIv7HCYS5rKoNZKQD9tsfGUpO4KdAn3sSUvTiS4PQkr2+K0KJbxj8H9NDg==} - engines: {node: ^18.18.0 || >=20.0.0} + '@typescript-eslint/types@8.5.0': + resolution: {integrity: sha512-qjkormnQS5wF9pjSi6q60bKUHH44j2APxfh9TQRXK8wbYVeDYYdYJGIROL87LGZZ2gz3Rbmjc736qyL8deVtdw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/typescript-estree@7.14.1': - resolution: {integrity: sha512-k5d0VuxViE2ulIO6FbxxSZaxqDVUyMbXcidC8rHvii0I56XZPv8cq+EhMns+d/EVIL41sMXqRbK3D10Oza1bbA==} - engines: {node: ^18.18.0 || >=20.0.0} + '@typescript-eslint/typescript-estree@8.5.0': + resolution: {integrity: sha512-vEG2Sf9P8BPQ+d0pxdfndw3xIXaoSjliG0/Ejk7UggByZPKXmJmw3GW5jV2gHNQNawBUyfahoSiCFVov0Ruf7Q==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '*' peerDependenciesMeta: typescript: optional: true - '@typescript-eslint/utils@7.14.1': - resolution: {integrity: sha512-CMmVVELns3nak3cpJhZosDkm63n+DwBlDX8g0k4QUa9BMnF+lH2lr3d130M1Zt1xxmB3LLk3NV7KQCq86ZBBhQ==} - engines: {node: ^18.18.0 || >=20.0.0} + '@typescript-eslint/utils@8.5.0': + resolution: {integrity: sha512-6yyGYVL0e+VzGYp60wvkBHiqDWOpT63pdMV2CVG4LVDd5uR6q1qQN/7LafBZtAtNIn/mqXjsSeS5ggv/P0iECw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: - eslint: ^8.56.0 + eslint: ^8.57.0 || ^9.0.0 - '@typescript-eslint/visitor-keys@7.14.1': - resolution: {integrity: sha512-Crb+F75U1JAEtBeQGxSKwI60hZmmzaqA3z9sYsVm8X7W5cwLEm5bRe0/uXS6+MR/y8CVpKSR/ontIAIEPFcEkA==} - engines: {node: ^18.18.0 || >=20.0.0} + '@typescript-eslint/visitor-keys@8.5.0': + resolution: {integrity: sha512-yTPqMnbAZJNy2Xq2XU8AdtOW9tJIr+UQb64aXB9f3B1498Zx9JorVgFJcZpEc9UBuCCrdzKID2RGAMkYcDtZOw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@ungap/structured-clone@1.2.0': resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} @@ -2313,40 +2146,14 @@ packages: peerDependencies: vite: ^4 || ^5 - '@volar/language-core@1.11.1': - resolution: {integrity: sha512-dOcNn3i9GgZAcJt43wuaEykSluAuOkQgzni1cuxLxTV0nJKanQztp7FxyswdRILaKH+P2XZMPRp2S4MV/pElCw==} - - '@volar/source-map@1.11.1': - resolution: {integrity: sha512-hJnOnwZ4+WT5iupLRnuzbULZ42L7BWWPMmruzwtLhJfpDVoZLjNBxHDi2sY2bgZXCKlpU5XcsMFoYrsQmPhfZg==} - - '@volar/typescript@1.11.1': - resolution: {integrity: sha512-iU+t2mas/4lYierSnoFOeRFQUhAEMgsFuQxoxvwn5EdQopw43j+J27a4lt9LMInx1gLJBC6qL14WYGlgymaSMQ==} - - '@vue/compiler-core@3.4.27': - resolution: {integrity: sha512-E+RyqY24KnyDXsCuQrI+mlcdW3ALND6U7Gqa/+bVwbcpcR3BRRIckFoz7Qyd4TTlnugtwuI7YgjbvsLmxb+yvg==} - - '@vue/compiler-dom@3.4.27': - resolution: {integrity: sha512-kUTvochG/oVgE1w5ViSr3KUBh9X7CWirebA3bezTbB5ZKBQZwR2Mwj9uoSKRMFcz4gSMzzLXBPD6KpCLb9nvWw==} - - '@vue/language-core@1.8.27': - resolution: {integrity: sha512-L8Kc27VdQserNaCUNiSFdDl9LWT24ly8Hpwf1ECy3aFb9m6bDhBGQYOujDm21N7EW3moKIOKEanQwe1q5BK+mA==} - peerDependencies: - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - - '@vue/shared@3.4.27': - resolution: {integrity: sha512-DL3NmY2OFlqmYYrzp39yi3LDkKxa5vZVwxWdQ3rG0ekuWscHraeIbnI8t+aZK7qhYqEqWKTUdijadunb9pnrgA==} - - '@xyflow/react@12.0.0-next.24': - resolution: {integrity: sha512-FwvTUG7AxThzD4Y1Cuc0OX0eErAFpn7tBNJbCrzcSffrqQw9H4ZnFj+SUDtmxQnAISqs40dTf8szrC8+x9zQPg==} + '@xyflow/react@12.3.0': + resolution: {integrity: sha512-dujEbjOn+5gMGg/wsojxtI7v2CfWm7ieRyiOHiZTPyw6p/VIdCoS3nLfSBP3TT+swoHSAXZ78iomHSKoUl4tMg==} peerDependencies: react: '>=17' react-dom: '>=17' - '@xyflow/system@0.0.30': - resolution: {integrity: sha512-/Tq9w6QzvjlyGHW+AWoYE68vtyGS8sdp5CYgbs857pfl1ZdLNFQ4lxXvV4nFv+5z2aPp/y1iOgXLdZJT3aHX0g==} + '@xyflow/system@0.0.42': + resolution: {integrity: sha512-kWYj+Y0GOct0jKYTdyRMNOLPxGNbb2TYvPg2gTmJnZ31DOOMkL5uRBLX825DR2gOACDu+i5FHLxPJUPf/eGOJw==} JSONStream@1.3.5: resolution: {integrity: sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==} @@ -2360,8 +2167,8 @@ packages: peerDependencies: acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 - acorn-walk@8.3.2: - resolution: {integrity: sha512-cjkyv4OtNCIeqhHrfS81QWXoCBPExR/J62oyEqepVw8WaQeSqpW2uhuLPh1m9eWhDuOo/jUXVTlifvesOWp/4A==} + acorn-walk@8.3.4: + resolution: {integrity: sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g==} engines: {node: '>=0.4.0'} acorn@7.4.1: @@ -2369,13 +2176,8 @@ packages: engines: {node: '>=0.4.0'} hasBin: true - acorn@8.11.3: - resolution: {integrity: sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==} - engines: {node: '>=0.4.0'} - hasBin: true - - acorn@8.12.0: - resolution: {integrity: sha512-RTvkC4w+KNXrM39/lWCUaG0IbRkWdCv7W/IOW9oU6SawyxulvkQy5HQPVTKxEjczcUvapcrw3cFx/60VN/NRNw==} + acorn@8.12.1: + resolution: {integrity: sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==} engines: {node: '>=0.4.0'} hasBin: true @@ -2413,8 +2215,8 @@ packages: ajv@8.13.0: resolution: {integrity: sha512-PRA911Blj99jR5RMeTunVbNXMF6Lp4vZXnk5GQjcnUWUTsrXtekg/pnmFFI2u/I36Y/2bITGS30GZCXei6uNkA==} - ajv@8.16.0: - resolution: {integrity: sha512-F0twR8U1ZU67JIEtekUcLkXkoO5mMMmgGD8sK/xUFzJ805jxHQl92hImFAqqXMyMYjSPOyUPAwHYhB72g5sTXw==} + ajv@8.17.1: + resolution: {integrity: sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==} ansi-colors@4.1.3: resolution: {integrity: sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==} @@ -2424,9 +2226,9 @@ packages: resolution: {integrity: sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==} engines: {node: '>=8'} - ansi-escapes@6.2.1: - resolution: {integrity: sha512-4nJ3yixlEthEJ9Rk4vPcdBRkZvQZlYyu8j4/Mqz5sgIkddmEnH2Yj2ZrnP9S3tQOvSNRUIgVNF/1yPpRAGNRig==} - engines: {node: '>=14.16'} + ansi-escapes@7.0.0: + resolution: {integrity: sha512-GdYO7a61mR0fOlAsvC9/rIHf7L96sBc6dEWzeOu+KAea5bZyQRPIpojrVoI4AXGJS/ycu/fBTdLrUkA4ODrvjw==} + engines: {node: '>=18'} ansi-regex@4.1.1: resolution: {integrity: sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==} @@ -2436,8 +2238,8 @@ packages: resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} engines: {node: '>=8'} - ansi-regex@6.0.1: - resolution: {integrity: sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==} + ansi-regex@6.1.0: + resolution: {integrity: sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==} engines: {node: '>=12'} ansi-styles@3.2.1: @@ -2452,8 +2254,8 @@ packages: resolution: {integrity: sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==} engines: {node: '>=12'} - antd@5.18.3: - resolution: {integrity: sha512-Dm3P8HBxoo/DiR/QZLj5Mk+rQZsSXxCCArSZACHGiklkkjW6klzlebAElOUr9NyDeFX7UnQ6LVk7vznXlnjTqQ==} + antd@5.20.6: + resolution: {integrity: sha512-TZFmNenHlh26DelHCJbkB+x1OVulIKsN1f/CnAd2NxZLysXqRvSuLUeHcgccqAnxTy7B03GZ6i1tocGxPCNjgA==} peerDependencies: react: '>=16.9.0' react-dom: '>=16.9.0' @@ -2471,6 +2273,7 @@ packages: are-we-there-yet@2.0.0: resolution: {integrity: sha512-Ci/qENmwHnsYo9xKIcUJN5LeDKdJ6R1Z1j9V/J5wyq8nh/mYPEpIKJbBZXtZjG04HiK7zV/p6Vs9952MrMeUIw==} engines: {node: '>=10'} + deprecated: This package is no longer supported. arg@4.1.3: resolution: {integrity: sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==} @@ -2484,8 +2287,9 @@ packages: aria-query@5.1.3: resolution: {integrity: sha512-R5iJ5lkuHybztUfuOAznmboyjWq8O6sqNqtK7CLOqdydi54VNbORp49mb14KbWgG1QD3JFO9hJdZ+y4KutfdOQ==} - aria-query@5.3.0: - resolution: {integrity: sha512-b0P0sZPKtyu8HkeRAfCq0IfURZK+SuwMjY1UXGBU27wpAiTwQAIlq56IbIO+ytk/JjS1fMR14ee5WBBfKi5J6A==} + aria-query@5.3.1: + resolution: {integrity: sha512-Z/ZeOgVl7bcSYZ/u/rh0fOpvEpq//LZmdbkXyc7syVzjPAhfOa9ebsdTSjEBDU4vs5nC98Kfduj1uFo0qyET3g==} + engines: {node: '>= 0.4'} arr-diff@4.0.0: resolution: {integrity: sha512-YVIQ82gZPGBebQV/a8dar4AitzCQs0jjXwMPZllpXMaGjXPYVUawSxQrRsjhjupyVxEvbHgUmIhKVlND+j02kA==} @@ -2552,9 +2356,6 @@ packages: resolution: {integrity: sha512-Ewyx0c9PmpcsByhSW4r+9zDU7sGjFc86qf/kKtuSCRdhfbk0SNLLkaT5qvcHnRGgc5NP/ly/y+qkXkqONX54CQ==} engines: {node: '>= 0.4'} - array.prototype.toreversed@1.1.2: - resolution: {integrity: sha512-wwDCoT4Ck4Cz7sLtgUmzR5UV3YF5mFHUlbChCzZBQZ+0m2cl/DH3tKgvphv1nKgFsJ48oCSg6p91q2Vm0I/ZMA==} - array.prototype.tosorted@1.1.4: resolution: {integrity: sha512-p6Fx8B7b7ZhL/gmUsAy0D15WhvDccw3mnGNbZpi3pmeJdxtWsj2jEaI4Y6oo3XiHfzuSgPwKc04MYt6KgvC/wA==} engines: {node: '>= 0.4'} @@ -2609,15 +2410,13 @@ packages: resolution: {integrity: sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==} engines: {node: '>= 0.4'} - axe-core@4.9.1: - resolution: {integrity: sha512-QbUdXJVTpvUTHU7871ppZkdOLBeGUKBQWHkHrvN2V9IQWGMt61zf3B45BtzjxEJzYuj0JBjBZP/hmYS/R9pmAw==} + axe-core@4.10.0: + resolution: {integrity: sha512-Mr2ZakwQ7XUAjp7pAwQWRhhK8mQQ6JAaNWSjmjxil0R8BPioMtQsTLOolGYkji1rcL++3dCqZA3zWqpT+9Ew6g==} engines: {node: '>=4'} - axobject-query@3.1.1: - resolution: {integrity: sha512-goKlv8DZrK9hUh975fnHzhNIO4jUnFCfv/dszV5VwUGDFjI6vQ2VwoyjYjYNEbBE8AH87TduWP5uyDR1D+Iteg==} - - axobject-query@4.0.0: - resolution: {integrity: sha512-+60uv1hiVFhHZeO+Lz0RYzsVHy5Wr1ayX0mwda9KPDVLNJgZ1T9Ny7VmFbLDzxsH0D87I86vgj3gFrjTJUYznw==} + axobject-query@4.1.0: + resolution: {integrity: sha512-qIj0G9wZbMGNLjLmg1PT6v2mE9AH2zlnADJD/2tC6E00hgmhUOfEB6greHPAfLRSufHqROIUTkw6E+M3lH0PTQ==} + engines: {node: '>= 0.4'} babel-walk@3.0.0-canary-5: resolution: {integrity: sha512-GAwkz0AihzY5bkwIY5QDR+LvsRQgB/B+1foMPvi0FZPMl5fjD7ICiznUiBdLYMH1QYe6vqu4gWYytZOccLouFw==} @@ -2660,10 +2459,6 @@ packages: resolution: {integrity: sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==} engines: {node: '>=0.10.0'} - braces@3.0.2: - resolution: {integrity: sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==} - engines: {node: '>=8'} - braces@3.0.3: resolution: {integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==} engines: {node: '>=8'} @@ -2673,8 +2468,8 @@ packages: engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} hasBin: true - browserslist@4.23.1: - resolution: {integrity: sha512-TUfofFo/KsK/bWZ9TWQ5O26tsWW4Uhmt8IYklbnUa70udB6P2wA7w7o4PY4muaEPBQaAX+CEnmmIA41NVHtPVw==} + browserslist@4.23.3: + resolution: {integrity: sha512-btwCFJVjI4YWDNfau8RhZ+B1Q/VLoUITrm3RlP6y1tYGWIOa+InuYiRGXUBXo8nA1qKmHMyLB/iVQg5TT4eFoA==} engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} hasBin: true @@ -2686,11 +2481,11 @@ packages: resolution: {integrity: sha512-4T53u4PdgsXqKaIctwF8ifXlRTTmEPJ8iEPWFdGZvcf7sbwYo6FKFEX9eNNAnzFZ7EzJAQ3CJeOtCRA4rDp7Pw==} engines: {node: '>=6.14.2'} - bundle-require@4.2.1: - resolution: {integrity: sha512-7Q/6vkyYAwOmQNRw75x+4yRtZCZJXUDmHHlFdkiV0wgv/reNjtJwpu1jPJ0w2kbEpIM0uoKI3S4/f39dU7AjSA==} + bundle-require@5.0.0: + resolution: {integrity: sha512-GuziW3fSSmopcx4KRymQEJVbZUfqlCqcq7dvs6TYwKRZiegK/2buMxQTPs6MGlNv50wms1699qYO54R8XfRX4w==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} peerDependencies: - esbuild: '>=0.17' + esbuild: '>=0.18' cac@6.7.14: resolution: {integrity: sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==} @@ -2737,8 +2532,8 @@ packages: caniuse-lite@1.0.30001582: resolution: {integrity: sha512-vsJG3V5vgfduaQGVxL53uSX/HUzxyr2eA8xCo36OLal7sRcSZbibJtLeh0qja4sFOr/QQGt4opB4tOy+eOgAxg==} - caniuse-lite@1.0.30001632: - resolution: {integrity: sha512-udx3o7yHJfUxMLkGohMlVHCvFvWmirKh9JAH/d7WOLPetlH+LTL5cocMZ0t7oZx/mdlOWXti97xLZWc8uURRHg==} + caniuse-lite@1.0.30001660: + resolution: {integrity: sha512-GacvNTTuATm26qC74pt+ad1fW15mlQ/zuTzzY1ZoIzECTP8HURDfF43kNxPgf7H1jmelCBQTTbBNxdSXOA7Bqg==} canvas@2.11.2: resolution: {integrity: sha512-ItanGBMrmRV7Py2Z+Xhs7cT+FNt5K0vPL4p9EZ/UX/Mu7hFbkxSjKF2KVtPwX7UYWp7dRKnrTvReflgrItJbdw==} @@ -2814,17 +2609,13 @@ packages: classnames@2.5.1: resolution: {integrity: sha512-saHYOzhIQs6wy2sVxTM6bUDsQO4F50V9RQ22qBpEdCW+I+/Wmke2HOl6lS6dTpdxVhb88/I6+Hs+438c3lfUow==} - cli-color@2.0.3: - resolution: {integrity: sha512-OkoZnxyC4ERN3zLzZaY9Emb7f/MhBOIpePv0Ycok0fJYT+Ouo00UBEIwsVsr0yoow++n5YWlSUgST9GKhNHiRQ==} - engines: {node: '>=0.10'} - cli-color@2.0.4: resolution: {integrity: sha512-zlnpg0jNcibNrO7GG9IeHH7maWFeCz+Ja1wx/7tZNU5ASSSSZ+/qZciM0/LHCYxSdqv5h2sdbQ/PXYdOuetXvA==} engines: {node: '>=0.10'} - cli-cursor@4.0.0: - resolution: {integrity: sha512-VGtlMu3x/4DOtIUwEkRezxUZ2lBacNJCHash0N0WeZDBS+7Ux1dm3XWAgWYxLJFMMdOeXMHXorshEFhbMSGelg==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + cli-cursor@5.0.0: + resolution: {integrity: sha512-aCj4O5wKyszjMmDT4tZj93kxyydN/K5zPWSCe6/0AV/AA1pqe5ZBIw0a2ZfPQV7lL5/yb5HsUreJ6UFAF1tEQw==} + engines: {node: '>=18'} cli-spinners@2.9.2: resolution: {integrity: sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg==} @@ -2902,10 +2693,6 @@ packages: resolution: {integrity: sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==} engines: {node: '>= 12'} - commander@9.5.0: - resolution: {integrity: sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ==} - engines: {node: ^12.20.0 || >=14} - compare-func@2.0.0: resolution: {integrity: sha512-zHig5N+tPWARooBnb0Zx1MFcdfpyJrfTJ3Y5L+IFvUm8rM74hHz66z0gw0x4tijh5CorKkKUCnW82R2vmpeCRA==} @@ -2915,12 +2702,13 @@ packages: compute-scroll-into-view@3.1.0: resolution: {integrity: sha512-rj8l8pD4bJ1nx+dAkMhV1xB5RuZEyVysfxJqB1pRchh1KVvwOv9b7CGB8ZfjTImVv2oF+sYMUkMZq6Na5Ftmbg==} - computeds@0.0.1: - resolution: {integrity: sha512-7CEBgcMjVmitjYo5q8JTJVra6X5mQ20uTThdK+0kR7UEaDrAWEQcRiBtWJzga4eRpP6afNwwLsX2SET2JhVB1Q==} - concat-map@0.0.1: resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} + consola@3.2.3: + resolution: {integrity: sha512-I5qxpzLv+sJhTVEoLYNcTW+bThDCPsit0vLNKShZx6rLtpilNpmmeTPaeqJb9ZE9dV3DGaeby6Vuhrw38WjeyQ==} + engines: {node: ^14.18.0 || >=16.10.0} + console-control-strings@1.1.0: resolution: {integrity: sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==} @@ -3050,9 +2838,6 @@ packages: resolution: {integrity: sha512-b8AmV3kfQaqWAuacbPuNbL6vahnOJflOhexLzMMNLga62+/nh0JzvJ0aO/5a5MVgUFGS7Hu1P9P03o3fJkDCyw==} engines: {node: '>=12'} - d@1.0.1: - resolution: {integrity: sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==} - d@1.0.2: resolution: {integrity: sha512-MOqHvMWF9/9MX6nza0KgvFH4HpMU0EF5uUDXqX/BtxtU8NfB0QzRtJ8Oe/6SuS4kbhyzVJwjd97EA4PKrzJ8bw==} engines: {node: '>=0.12'} @@ -3083,11 +2868,8 @@ packages: dataloader@1.4.0: resolution: {integrity: sha512-68s5jYdlvasItOJnCuI2Q9s4q98g0pCyL3HrcKJu8KNugUl8ahgmZYg38ysLTgQjjXX3H8CJLkAvWrclWfcalw==} - dayjs@1.11.11: - resolution: {integrity: sha512-okzr3f11N6WuqYtZSvm+F776mB41wRZMhKP+hc34YdW+KmtYYK9iqvHSwo2k9FEH3fhGXvOPV6yz2IcSrfRUDg==} - - de-indent@1.0.2: - resolution: {integrity: sha512-e/1zu3xH5MQryN2zdVaF0OrdNLUbvWxzMbi+iNA6Bky7l1RoP8a2fIbRocyHclXt/arDrrR6lL3TqFD9pMQTsg==} + dayjs@1.11.13: + resolution: {integrity: sha512-oaMBel6gjolK862uaPQOVTA7q3TZhuSvuMQAAglQDOWYO9A91IrAOUJEyKVlqJlHE0vq5p5UXxzdPfMH/x6xNg==} debug@2.6.9: resolution: {integrity: sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==} @@ -3105,17 +2887,8 @@ packages: supports-color: optional: true - debug@4.3.4: - resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==} - engines: {node: '>=6.0'} - peerDependencies: - supports-color: '*' - peerDependenciesMeta: - supports-color: - optional: true - - debug@4.3.5: - resolution: {integrity: sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==} + debug@4.3.7: + resolution: {integrity: sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==} engines: {node: '>=6.0'} peerDependencies: supports-color: '*' @@ -3242,6 +3015,9 @@ packages: domhandler@2.4.2: resolution: {integrity: sha512-JiK04h0Ht5u/80fdLMCEmV4zkNh2BcoMFBmZ/91WtYZ8qVXSKjiw7fXMgFPnHcSZgOo3XdinHvmnDUeMf5R4wA==} + dompurify@3.1.6: + resolution: {integrity: sha512-cTOAhc36AalkjtBpfG6O8JimdTMWNXjiePT2xQH/ppBGi/4uIpmj8eKyIkMJErXWARyINV/sB38yf8JCLF5pbQ==} + domutils@1.7.0: resolution: {integrity: sha512-Lgd2XcJ/NjEw+7tFvfKxOzCYKZsdct5lczQ2ZaQY8Djz7pfAD3Gbp8ySJWtreII/vDlMVmxwa6pHmdxIYgttDg==} @@ -3252,20 +3028,20 @@ packages: eastasianwidth@0.2.0: resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} - echarts@5.5.0: - resolution: {integrity: sha512-rNYnNCzqDAPCr4m/fqyUFv7fD9qIsd50S6GDFgO1DxZhncCsNsG7IfUlAlvZe5oSEQxtsjnHiUuppzccry93Xw==} + echarts@5.5.1: + resolution: {integrity: sha512-Fce8upazaAXUVUVsjgV6mBnGuqgO+JNDlcgF79Dksy4+wgGpQB2lmYoO4TSweFg/mZITdpGHomw/cNBJZj1icA==} electron-to-chromium@1.4.654: resolution: {integrity: sha512-hjfFa+Vj4WGLRVTlCQa+IivBkpcp+boGxMQfusOC/me5Y5NfU4wX7wyw+K9p8Cw4tl0BVIZGH2n7y/jMc3w4pg==} - electron-to-chromium@1.4.800: - resolution: {integrity: sha512-G8yyAReBP8m0XaW9BBH5NOJe4ZGYDDsPYkgLCG8xU6HwGKzrT0Jj51uAHkt1D+9ZxHPoGFSSZqqSN7HxAiP+0g==} + electron-to-chromium@1.5.21: + resolution: {integrity: sha512-+rBAerCpQvFSPyAO677i5gJuWGO2WFsoujENdcMzsrpP7Ebcc3pmpERgU8CV4fFF10a5haP4ivnFQ/AmLICBVg==} elkjs@0.9.3: resolution: {integrity: sha512-f/ZeWvW/BCXbhGEf1Ujp29EASo/lk1FDnETgNKwJrsVvGZhUWCZyg3xLJjAsxfOmt8KjswHmI5EwCQcPMpOYhQ==} - emoji-regex@10.3.0: - resolution: {integrity: sha512-QpLs9D9v9kArv4lfDEgg1X/gN5XLnf/A6l9cs8SPZLRZR3ZkY9+kwIQTxm+fsSej5UMYGE8fdoaZVIBlqG0XTw==} + emoji-regex@10.4.0: + resolution: {integrity: sha512-EC+0oUMY1Rqm4O6LLrgjtYDvcVYTy7chDnM4Q7030tP4Kwj3u/pR6gP9ygnp2CJMK5Gq+9Q2oqmrFJAz01DXjw==} emoji-regex@7.0.3: resolution: {integrity: sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==} @@ -3276,8 +3052,8 @@ packages: emoji-regex@9.2.2: resolution: {integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==} - enhanced-resolve@5.15.0: - resolution: {integrity: sha512-LXYT42KJ7lpIKECr2mAXIaMldcNCh/7E0KBKOu4KSfkHmP+mZmSs+8V5gBAqisWBy0OO4W5Oyys0GO1Y8KtdKg==} + enhanced-resolve@5.17.1: + resolution: {integrity: sha512-LMHl3dXhTcfv8gM4kEzIUeTQ+7fpdA0l2tUf34BddXPkz2A5xJ5L/Pchd5BL6rdccM9QGvu0sWZzK1Z1t4wwyg==} engines: {node: '>=10.13.0'} enquirer@2.4.1: @@ -3298,6 +3074,10 @@ packages: resolution: {integrity: sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==} engines: {node: '>=6'} + environment@1.1.0: + resolution: {integrity: sha512-xUtoPkMggbz0MPyPiIWr1Kp4aeWJjDZ6SMvURhimjdZgsRuDplF5/s9hcgGhyXMhs+6vpnuoiZ2kFiu3FMnS8Q==} + engines: {node: '>=18'} + errno@0.1.8: resolution: {integrity: sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A==} hasBin: true @@ -3309,10 +3089,6 @@ packages: resolution: {integrity: sha512-eiiY8HQeYfYH2Con2berK+To6GrK2RxbPawDkGq4UiCQQfZHb6wX9qQqkbpPqaxQFcl8d9QzZqo0tGE0VcrdwA==} engines: {node: '>= 0.4'} - es-abstract@1.23.2: - resolution: {integrity: sha512-60s3Xv2T2p1ICykc7c+DNDPLDMm9t4QxCOUU0K9JxiLjM3C1zB9YVdN7tjxrFd4+AkZ8CdX1ovUga4P2+1e+/w==} - engines: {node: '>= 0.4'} - es-abstract@1.23.3: resolution: {integrity: sha512-e+HfNH61Bj1X9/jLc5v1owaLYuHdeHHSQlkhCBiTK8rBvKaULl/beGMxwrMXjpYrv4pz22BlY570vVePA2ho4A==} engines: {node: '>= 0.4'} @@ -3351,10 +3127,6 @@ packages: resolution: {integrity: sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==} engines: {node: '>= 0.4'} - es5-ext@0.10.62: - resolution: {integrity: sha512-BHLqn0klhEpnOKSrzn/Xsz2UIW8j+cGmo9JLzr8BiUapV8hPL9+FliFqjwr9ngW7jWdnxv6eO+/LqyhJVqgrjA==} - engines: {node: '>=0.10'} - es5-ext@0.10.64: resolution: {integrity: sha512-p2snDhiLaXe6dahss1LddxqEm+SkuDvV8dnIQG0MWjyHpcMNfXKPE+/Cc0y+PhxJX3A4xGNeFCj5oc0BUh6deg==} engines: {node: '>=0.10'} @@ -3365,9 +3137,6 @@ packages: es6-promise@3.3.1: resolution: {integrity: sha512-SOp9Phqvqn7jtEUxPWdWfWoLmyt2VaJ6MpvP9Comy1MceMXqE6bxvaTu4iaxpYYPzhny28Lc+M87/c2cPK6lDg==} - es6-symbol@3.1.3: - resolution: {integrity: sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA==} - es6-symbol@3.1.4: resolution: {integrity: sha512-U9bFFjX8tFiATgtkJ1zg25+KviIXpgRvRHS8sau3GfhVzThRQrOeksPeT0BWW2MNZs1OEWJ1DPXOQMn0KKRkvg==} engines: {node: '>=0.12'} @@ -3500,30 +3269,29 @@ packages: engines: {node: '>=12'} hasBin: true - esbuild@0.19.10: - resolution: {integrity: sha512-S1Y27QGt/snkNYrRcswgRFqZjaTG5a5xM3EQo97uNBnH505pdzSNe/HLBq1v0RO7iK/ngdbhJB6mDAp0OK+iUA==} - engines: {node: '>=12'} - hasBin: true - esbuild@0.19.12: resolution: {integrity: sha512-aARqgq8roFBj054KvQr5f1sFu0D65G+miZRCuJyJ0G13Zwx7vRar5Zhn2tkQNzIXcBrNVsv/8stehpj+GAjgbg==} engines: {node: '>=12'} hasBin: true - esbuild@0.20.2: - resolution: {integrity: sha512-WdOOppmUNU+IbZ0PaDiTst80zjnrOkyJNHoKupIcVyU8Lvla3Ugx94VzkQ32Ijqd7UhHJy75gNWDMUekcrSJ6g==} - engines: {node: '>=12'} - hasBin: true - esbuild@0.21.5: resolution: {integrity: sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==} engines: {node: '>=12'} hasBin: true + esbuild@0.23.1: + resolution: {integrity: sha512-VVNz/9Sa0bs5SELtn3f7qhJCDPCF5oMEl5cO9/SSinpE9hbPVvxbd572HH5AKiP7WD8INO53GgfDDhRjkylHEg==} + engines: {node: '>=18'} + hasBin: true + escalade@3.1.2: resolution: {integrity: sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==} engines: {node: '>=6'} + escalade@3.2.0: + resolution: {integrity: sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==} + engines: {node: '>=6'} + escape-string-regexp@1.0.5: resolution: {integrity: sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==} engines: {node: '>=0.8.0'} @@ -3551,36 +3319,21 @@ packages: eslint-import-resolver-node@0.3.9: resolution: {integrity: sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g==} - eslint-import-resolver-typescript@3.6.1: - resolution: {integrity: sha512-xgdptdoi5W3niYeuQxKmzVDTATvLYqhpwmykwsh7f6HIOStGWEIL9iqZgQDF9u9OEzrRwR8no5q2VT+bjAujTg==} + eslint-import-resolver-typescript@3.6.3: + resolution: {integrity: sha512-ud9aw4szY9cCT1EWWdGv1L1XR6hh2PaRWif0j2QjQ0pgTY/69iw+W0Z4qZv5wHahOl8isEr+k/JnyAqNQkLkIA==} engines: {node: ^14.18.0 || >=16.0.0} peerDependencies: eslint: '*' eslint-plugin-import: '*' - - eslint-module-utils@2.8.0: - resolution: {integrity: sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw==} - engines: {node: '>=4'} - peerDependencies: - '@typescript-eslint/parser': '*' - eslint: '*' - eslint-import-resolver-node: '*' - eslint-import-resolver-typescript: '*' - eslint-import-resolver-webpack: '*' + eslint-plugin-import-x: '*' peerDependenciesMeta: - '@typescript-eslint/parser': - optional: true - eslint: - optional: true - eslint-import-resolver-node: - optional: true - eslint-import-resolver-typescript: + eslint-plugin-import: optional: true - eslint-import-resolver-webpack: + eslint-plugin-import-x: optional: true - eslint-module-utils@2.8.1: - resolution: {integrity: sha512-rXDXR3h7cs7dy9RNpUlQf80nX31XWJEyGq1tRMo+6GsO5VmTe4UTwtmonAD4ZkAsrfMVDA2wlGJ3790Ys+D49Q==} + eslint-module-utils@2.11.0: + resolution: {integrity: sha512-gbBE5Hitek/oG6MUVj6sFuzEjA/ClzNflVrLovHi/JgLdC7fiN5gLAY1WIPW1a0V5I999MnsrvVrCOGmmVqDBQ==} engines: {node: '>=4'} peerDependencies: '@typescript-eslint/parser': '*' @@ -3600,8 +3353,8 @@ packages: eslint-import-resolver-webpack: optional: true - eslint-plugin-import@2.29.1: - resolution: {integrity: sha512-BbPC0cuExzhiMo4Ff1BTVwHpjjv28C5R+btTOGaCRC7UEz801up0JadwkeSk5Ued6TG34uaczuVuH6qyy5YUxw==} + eslint-plugin-import@2.30.0: + resolution: {integrity: sha512-/mHNE9jINJfiD2EKkg1BKyPyUk4zdnT54YgbOgfjSakWT5oyX/qQLVNTkehyfpcMxZXMy1zyonZ2v7hZTX43Yw==} engines: {node: '>=4'} peerDependencies: '@typescript-eslint/parser': '*' @@ -3610,14 +3363,14 @@ packages: '@typescript-eslint/parser': optional: true - eslint-plugin-jsx-a11y@6.9.0: - resolution: {integrity: sha512-nOFOCaJG2pYqORjK19lqPqxMO/JpvdCZdPtNdxY3kvom3jTvkAbOvQvD8wuD0G8BYR0IGAGYDlzqWJOh/ybn2g==} + eslint-plugin-jsx-a11y@6.10.0: + resolution: {integrity: sha512-ySOHvXX8eSN6zz8Bywacm7CvGNhUtdjvqfQDVe6020TUK34Cywkw7m0KsCCk1Qtm9G1FayfTN1/7mMYnYO2Bhg==} engines: {node: '>=4.0'} peerDependencies: - eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 + eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9 - eslint-plugin-prettier@5.1.3: - resolution: {integrity: sha512-C9GCVAs4Eq7ZC/XFQHITLiHJxQngdtraXaM+LoUFoFp/lHNl2Zn8f3WQbe9HvTBBQ9YnKFB0/2Ajdqwo5D1EAw==} + eslint-plugin-prettier@5.2.1: + resolution: {integrity: sha512-gH3iR3g4JfF+yYPaJYkN7jEl9QbweL/YfkoRlNnuIEHEz1vHVlCmWOS+eGGiRuzHQXdJFCOTxRgvju9b8VUmrw==} engines: {node: ^14.18.0 || >=16.0.0} peerDependencies: '@types/eslint': '>=8.0.0' @@ -3636,28 +3389,28 @@ packages: peerDependencies: eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 - eslint-plugin-react-refresh@0.4.7: - resolution: {integrity: sha512-yrj+KInFmwuQS2UQcg1SF83ha1tuHC1jMQbRNyuWtlEzzKRDgAl7L4Yp4NlDUZTZNlWvHEzOtJhMi40R7JxcSw==} + eslint-plugin-react-refresh@0.4.11: + resolution: {integrity: sha512-wrAKxMbVr8qhXTtIKfXqAn5SAtRZt0aXxe5P23Fh4pUAdC6XEsybGLB8P0PI4j1yYqOgUEUlzKAGDfo7rJOjcw==} peerDependencies: eslint: '>=7' - eslint-plugin-react@7.34.3: - resolution: {integrity: sha512-aoW4MV891jkUulwDApQbPYTVZmeuSyFrudpbTAQuj5Fv8VL+o6df2xIGpw8B0hPjAaih1/Fb0om9grCdyFYemA==} + eslint-plugin-react@7.36.1: + resolution: {integrity: sha512-/qwbqNXZoq+VP30s1d4Nc1C5GTxjJQjk4Jzs4Wq2qzxFM7dSmuG2UkIjg2USMLh3A/aVcUNrK7v0J5U1XEGGwA==} engines: {node: '>=4'} peerDependencies: - eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 + eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9.7 - eslint-plugin-simple-import-sort@12.1.0: - resolution: {integrity: sha512-Y2fqAfC11TcG/WP3TrI1Gi3p3nc8XJyEOJYHyEPEGI/UAgNx6akxxlX74p7SbAQdLcgASKhj8M0GKvH3vq/+ig==} + eslint-plugin-simple-import-sort@12.1.1: + resolution: {integrity: sha512-6nuzu4xwQtE3332Uz0to+TxDQYRLTKRESSc2hefVT48Zc8JthmN23Gx9lnYhu0FtkRSL1oxny3kJ2aveVhmOVA==} peerDependencies: eslint: '>=5.0.0' - eslint-plugin-svelte@2.41.0: - resolution: {integrity: sha512-gjU9Q/psxbWG1VNwYbEb0Q6U4W5PBGaDpYmO2zlQ+zlAMVS3Qt0luAK0ACi/tMSwRK6JENiySvMyJbO0YWmXSg==} + eslint-plugin-svelte@2.43.0: + resolution: {integrity: sha512-REkxQWvg2pp7QVLxQNa+dJ97xUqRe7Y2JJbSWkHSuszu0VcblZtXkPBPckkivk99y5CdLw4slqfPylL2d/X4jQ==} engines: {node: ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^7.0.0 || ^8.0.0-0 || ^9.0.0-0 - svelte: ^3.37.0 || ^4.0.0 || ^5.0.0-next.155 + svelte: ^3.37.0 || ^4.0.0 || ^5.0.0-next.191 peerDependenciesMeta: svelte: optional: true @@ -3666,8 +3419,8 @@ packages: resolution: {integrity: sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - eslint-scope@8.0.1: - resolution: {integrity: sha512-pL8XjgP4ZOmmwfFE8mEhSxA7ZY4C+LWyqjQ3o4yWkkmD0qcMT9kkW3zWHOczhWcjTSgqycYAgwSlXvZltv65og==} + eslint-scope@8.0.2: + resolution: {integrity: sha512-6E4xmrTw5wtxnLA5wYL3WDfhZ/1bUBGOXV0zQvVRDOtrR8D0p6W7fs3JweNYhwRYeGvd/1CKX2se0/2s7Q/nJA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} eslint-visitor-keys@3.4.3: @@ -3678,10 +3431,15 @@ packages: resolution: {integrity: sha512-OtIRv/2GyiF6o/d8K7MYKKbXrOUBIK6SfkIRM4Z0dY3w+LiQ0vy3F57m0Z71bjbyeiWFiHJ8brqnmE6H6/jEuw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - eslint@9.5.0: - resolution: {integrity: sha512-+NAOZFrW/jFTS3dASCGBxX1pkFD0/fsO+hfAkJ4TyYKwgsXZbqzrw+seCYFCcPCYXvnD67tAnglU7GQTz6kcVw==} + eslint@9.10.0: + resolution: {integrity: sha512-Y4D0IgtBZfOcOUAIQTSXBKoNGfY0REGqHJG6+Q81vNippW5YlKjHFj4soMxamKK1NXHUWuBZTLdU3Km+L/pcHw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} hasBin: true + peerDependencies: + jiti: '*' + peerDependenciesMeta: + jiti: + optional: true esniff@2.0.1: resolution: {integrity: sha512-kTUIGKQ/mDPFoJ0oVfcmyJn4iBDRptjNVIzwIFR7tqWXdVI9xfA2RMwY/gbSpJG3lkdWNEjLap/NqVHZiJsdfg==} @@ -3700,8 +3458,8 @@ packages: engines: {node: '>=4'} hasBin: true - esquery@1.5.0: - resolution: {integrity: sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==} + esquery@1.6.0: + resolution: {integrity: sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==} engines: {node: '>=0.10'} esrecurse@4.3.0: @@ -3796,12 +3554,15 @@ packages: fast-levenshtein@2.0.6: resolution: {integrity: sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==} + fast-uri@3.0.1: + resolution: {integrity: sha512-MWipKbbYiYI0UC7cl8m/i/IWTqfC8YXsqjzybjddLsFjStroQzsHXkc73JutMvBiXmOvapk+axIl79ig5t55Bw==} + fastest-levenshtein@1.0.16: resolution: {integrity: sha512-eRnCtTTtGZFpQCwhJiUOuxPQWRXVKYDn0b2PeHfXL6/Zi53SLAzAHfVhVWK2AryC/WH05kGfxhFIPvTF0SXQzg==} engines: {node: '>= 4.9.1'} - fastq@1.15.0: - resolution: {integrity: sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==} + fastq@1.17.1: + resolution: {integrity: sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==} fault@1.0.4: resolution: {integrity: sha512-CJ0HCB5tL5fYTEA7ToAq5+kTwd++Borf1/bifxd9iT70QcXr4MRrO3Llf8Ifs70q+SJcGHFtnIE/Nw6giCtECA==} @@ -3821,18 +3582,14 @@ packages: resolution: {integrity: sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==} engines: {node: '>=16.0.0'} - file-entry-cache@9.0.0: - resolution: {integrity: sha512-6MgEugi8p2tiUhqO7GnPsmbCCzj0YRCwwaTbpGRyKZesjRSzkqkAE9fPp7V2yMs5hwfgbQLgdvSSkGNg1s5Uvw==} + file-entry-cache@9.1.0: + resolution: {integrity: sha512-/pqPFG+FdxWQj+/WSuzXSDaNzxgTLr/OrR1QuqfEZzDakpdYE70PwUxL7BPUa8hpjbvY1+qvCl8k+8Tq34xJgg==} engines: {node: '>=18'} fill-range@4.0.0: resolution: {integrity: sha512-VcpLTWqWDiTerugjj8e3+esbg+skS3M9e54UuR3iCeIDMXCLTsAH8hTSzDQU/X6/6t3eYkOKoZSef2PlU6U1XQ==} engines: {node: '>=0.10.0'} - fill-range@7.0.1: - resolution: {integrity: sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==} - engines: {node: '>=8'} - fill-range@7.1.1: resolution: {integrity: sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==} engines: {node: '>=8'} @@ -3853,9 +3610,6 @@ packages: resolution: {integrity: sha512-YyZM99iHrqLKjmt4LJDj58KI+fYyufRLBSYcqycxf//KpBk9FoewoGX0450m9nB44qrZnovzC2oeP5hUibxc/g==} engines: {node: '>=18'} - find-yarn-workspace-root2@1.2.16: - resolution: {integrity: sha512-hr6hb1w8ePMpPVUK39S4RlwJzi+xPLuVuG8XlwXU3KD5Yn3qgBWVfy3AzNlDhWvE1EORCE65/Qm26rFQt3VLVA==} - flat-cache@2.0.1: resolution: {integrity: sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA==} engines: {node: '>=4'} @@ -3881,14 +3635,14 @@ packages: resolution: {integrity: sha512-7EwmXrOjyL+ChxMhmG5lnW9MPt1aIeZEwKhQzoBUdTV0N3zuwWDZYVJatDvZ2OyzPUvdIAZDsCetk3coyMfcnQ==} engines: {node: '>=0.10.0'} - foreground-child@3.1.1: - resolution: {integrity: sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg==} - engines: {node: '>=14'} - foreground-child@3.2.0: resolution: {integrity: sha512-CrWQNaEl1/6WeZoarcM9LHupTo3RpZO2Pdk1vktwzPiQTsJnAKJmm3TACKeG5UZbWDfaH2AbvYxzP96y0MT7fA==} engines: {node: '>=14'} + foreground-child@3.3.0: + resolution: {integrity: sha512-Ld2g8rrAyMYFXBhEqMz8ZAHBi4J4uS1i/CxGMDnjyFWddMXLVcDp051DZfu+t7+ab7Wv6SMqpWmyFIj5UbfFvg==} + engines: {node: '>=14'} + format@0.2.2: resolution: {integrity: sha512-wzsgA6WOq+09wrU1tsJ09udeR/YZRaeArL9e1wPbFg3GG2yDnC2ldKpxs4xunpFF9DgqCqOIra3bc1HWrJ37Ww==} engines: {node: '>=0.4.x'} @@ -3934,6 +3688,7 @@ packages: gauge@3.0.2: resolution: {integrity: sha512-+5J6MS/5XksCuXq++uFRsnUd7Ovu1XenbeuIuNRJxYWjgQbPuFhT14lAvsWfqfAmnwluf1OwMjz39HjfLPci0Q==} engines: {node: '>=10'} + deprecated: This package is no longer supported. gensync@1.0.0-beta.2: resolution: {integrity: sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==} @@ -3978,11 +3733,8 @@ packages: resolution: {integrity: sha512-g0QYk1dZBxGwk+Ngc+ltRH2IBp2f7zBkBMBJZCDerh6EhlhSR6+9irMCuT/09zD6qkarHUSn529sK/yL4S27mg==} engines: {node: '>= 0.4'} - get-tsconfig@4.7.2: - resolution: {integrity: sha512-wuMsz4leaj5hbGgg4IvDU0bqJagpftG5l5cXIAvo8uZrqn0NJqwtfupTN00VnkQJPcIRrxYrm1Ue24btpCha2A==} - - get-tsconfig@4.7.5: - resolution: {integrity: sha512-ZCuZCnlqNzjb4QprAzXKdpp/gh6KTxSJuw3IBsPnV/7fV4NxC9ckB+vPTt8w7fJA0TaSD7c55BR47JD6MEDyDw==} + get-tsconfig@4.8.1: + resolution: {integrity: sha512-k9PN+cFBmaLWtVz29SkUoqU5O0slLuHJXt/2P+tMVFT+phsSGXGkp9t3rQIqdz0e+06EHNGs3oM6ZX1s2zHxRg==} get-value@2.0.6: resolution: {integrity: sha512-Ln0UQDlxH1BapMu3GPtf7CuYNwRZf2gwCuPqbyG6pB8WfmFpzqcy4xtAaAMUhnNqjMKTiCPZG2oMT3YSx8U2NA==} @@ -4017,18 +3769,19 @@ packages: glob-to-regexp@0.3.0: resolution: {integrity: sha512-Iozmtbqv0noj0uDDqoL0zNq0VBEfK2YFoMAZoxJe4cwphvLR+JskfF30QhXHOR4m3KrE6NLRYw+U9MRXvifyig==} - glob@10.3.15: - resolution: {integrity: sha512-0c6RlJt1TICLyvJYIApxb8GsXoai0KUP7AxKKAtsYXdgJR1mGEUa7DgwShbdk1nly0PYoZj01xd4hzbq3fsjpw==} - engines: {node: '>=16 || 14 >=14.18'} - hasBin: true - glob@10.4.1: resolution: {integrity: sha512-2jelhlq3E4ho74ZyVLN03oKdAZVUa6UDZzFLVH1H7dnoax+y9qyaq8zBkfDIggjniU19z0wU18y16jMB2eyVIw==} engines: {node: '>=16 || 14 >=14.18'} hasBin: true + glob@11.0.0: + resolution: {integrity: sha512-9UiX/Bl6J2yaBbxKoEBRm4Cipxgok8kQYcOPEhScPwebu2I0HoQOuYdIO6S3hLuWoZgpDpwQZMzTFxgpkyT76g==} + engines: {node: 20 || >=22} + hasBin: true + glob@7.2.3: resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==} + deprecated: Glob versions prior to v9 are no longer supported global-directory@4.0.1: resolution: {integrity: sha512-wHTUcDUoZ1H5/0iVqEudYW4/kAlN5cZ3j/bXn0Dpbizl9iaUVeWSHqiOjsgk6OW2bkLclbBjzewBz6weQ1zA2Q==} @@ -4050,8 +3803,8 @@ packages: resolution: {integrity: sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==} engines: {node: '>=18'} - globals@15.6.0: - resolution: {integrity: sha512-UzcJi88Hw//CurUIRa9Jxb0vgOCcuD/MNjwmXp633cyaRKkCWACkoqHCtfZv43b1kqXGg/fpOa8bwgacCeXsVg==} + globals@15.9.0: + resolution: {integrity: sha512-SmSKyLLKFbSr6rptvP8izbyxJL4ILwqO9Jg23UA0sDlGlu58V59D1//I3vlc0KJphVdUR7vMjHIplYnzBxorQA==} engines: {node: '>=18'} globalthis@1.0.3: @@ -4157,10 +3910,6 @@ packages: resolution: {integrity: sha512-ODYZC64uqzmtfGMEAX/FvZiRyWLpAC3vYnNunURUnkGVTS+mI0smVsWaPydRBsE3g+ok7h960jChO8mFcWlHaQ==} engines: {node: '>=0.10.0'} - hasown@2.0.0: - resolution: {integrity: sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==} - engines: {node: '>= 0.4'} - hasown@2.0.2: resolution: {integrity: sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==} engines: {node: '>= 0.4'} @@ -4171,8 +3920,8 @@ packages: hast-util-from-html-isomorphic@2.0.0: resolution: {integrity: sha512-zJfpXq44yff2hmE0XmwEOzdWin5xwH+QIhMLOScpX91e/NSGPsAzNCvLQDIEPyO2TXi+lBmU6hjLIhV8MwP2kw==} - hast-util-from-html@2.0.1: - resolution: {integrity: sha512-RXQBLMl9kjKVNkJTIO6bZyb2n+cUH8LFaSSzo82jiLT6Tfc+Pt7VQCS+/h3YwG4jaNE2TA2sdJisGWR+aJrp0g==} + hast-util-from-html@2.0.2: + resolution: {integrity: sha512-HwOHwxdt2zC5KQ/CNoybBntRook2zJvfZE/u5/Ap7aLPe22bDqen7KwGkOqOyzL5zIqKwiYX/OTtE0FWgr6XXA==} hast-util-from-parse5@8.0.1: resolution: {integrity: sha512-Er/Iixbc7IEa7r/XLtuG52zoqn/b3Xng/w6aZQ0xGVxzhw5xUFxcRqdPzP6yFi/4HBYRaifaI5fQ1RH8n0ZeOQ==} @@ -4195,8 +3944,8 @@ packages: hast-util-to-parse5@8.0.0: resolution: {integrity: sha512-3KKrV5ZVI8if87DVSi1vDeByYrkGzg4mEfeu4alwgmmIeARiBLKCZS2uw5Gb6nU9x9Yufyj3iudm6i7nl52PFw==} - hast-util-to-text@4.0.0: - resolution: {integrity: sha512-EWiE1FSArNBPUo1cKWtzqgnuRQwEeQbQtnFJRYV1hb1BWDgrAlBU0ExptvZMM/KSA82cDpm2sFGf3Dmc5Mza3w==} + hast-util-to-text@4.0.2: + resolution: {integrity: sha512-KK6y/BN8lbaq654j7JgBydev7wuNMcID54lkRav1P0CaE1e47P72AWWPiGKXTJU271ooYzcvTAn/Zt0REnvc7A==} hast-util-whitespace@3.0.0: resolution: {integrity: sha512-88JUN06ipLwsnv+dVn+OIYOvAuvBMy/Qoi6O7mQHxdPXpjy+Cd6xRkWwux7DKO+4sYILtLBRIKgsdpS2gQc7qw==} @@ -4210,10 +3959,6 @@ packages: hastscript@9.0.0: resolution: {integrity: sha512-jzaLBGavEDKHrc5EfFImKN7nZKKBdSLIdGvCwDZ9TfzbF2ffXiov8CKE445L2Z1Ek2t/m4SKQ2j6Ipv7NyUolw==} - he@1.2.0: - resolution: {integrity: sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==} - hasBin: true - headers-polyfill@4.0.3: resolution: {integrity: sha512-IScLbePpkvO846sIwOtOTDjutRMWdXdJmXdMvk6gCBHxFO8d+QKOQedyZSxFTTFYRSmlgSTDtXqqq4pcenBXLQ==} @@ -4255,8 +4000,8 @@ packages: resolution: {integrity: sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==} engines: {node: '>=16.17.0'} - husky@9.0.11: - resolution: {integrity: sha512-AB6lFlbwwyIqMdHYhwPe+kjOC3Oc5P3nThEoW/AaO2BX3vJDjWPFxYLxokUZOo6RNX20He3AaT8sESs9NJcmEw==} + husky@9.1.6: + resolution: {integrity: sha512-sqbjZKK7kf44hfdE94EoX8MZNk0n7HeW37O4YrVGCF4wzgQjp+akPAkfUK5LZ6KuR/6sqeAVuXHji+RzQgOn5A==} engines: {node: '>=18'} hasBin: true @@ -4276,19 +4021,20 @@ packages: resolution: {integrity: sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==} engines: {node: '>= 4'} + ignore@5.3.2: + resolution: {integrity: sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==} + engines: {node: '>= 4'} + image-size@0.5.5: resolution: {integrity: sha512-6TDAlDPZxUFCv+fuOkIoXT/V/f3Qbq8e37p+YOiYrUv3v9cc3/6x78VdfPgFVaB9dZYeLUfKgHRebpkm/oP2VQ==} engines: {node: '>=0.10.0'} hasBin: true - immer@10.0.4: - resolution: {integrity: sha512-cuBuGK40P/sk5IzWa9QPUaAdvPHjkk1c+xYsd9oZw+YQQEV+10G0P5uMpGctZZKnyQ+ibRO08bD25nWLmYi2pw==} - immer@10.1.1: resolution: {integrity: sha512-s2MPrmjovJcoMaHtx6K11Ra7oD05NT97w1IC5zpMkT6Atjr7H8LjaDd81iIxUYpMKSRRNMJE703M1Fhr/TctHw==} - immutable@4.3.6: - resolution: {integrity: sha512-Ju0+lEMyzMVZarkTn/gqRpdqd5dOPaz1mCZ0SH3JV6iFw81PldE/PEB1hWVEA288HPt4WXW8O7AWxB10M+03QQ==} + immutable@4.3.7: + resolution: {integrity: sha512-1hqclzwYwjRDFLjcFxOM5AYkkG0rpFPpr1RLPMEuGczoS7YA8gLhy8SWXYRAA/XwfEHpfo3cw5JGioS32fnMRw==} import-fresh@2.0.0: resolution: {integrity: sha512-eZ5H8rcgYazHbKC3PG4ClHNykCSxtAhxSSEM+2mb+7evD2CKF5V7c0dNum7AdpDh0ZdICwZY9sRSn8f+KH96sg==} @@ -4306,8 +4052,8 @@ packages: resolution: {integrity: sha512-rKtvo6a868b5Hu3heneU+L4yEQ4jYKLtjpnPeUdK7h0yzXGmyBTypknlkCvHFBqfX9YlorEiMM6Dnq/5atfHkw==} engines: {node: '>=8'} - import-meta-resolve@4.0.0: - resolution: {integrity: sha512-okYUR7ZQPH+efeuMJGlq4f8ubUgO50kByRPyt/Cy1Io4PSRsPjxME+YlVaCOx+NIToW7hCsZNFJyTPFFKepRSA==} + import-meta-resolve@4.1.0: + resolution: {integrity: sha512-I6fiaX09Xivtk+THaMfAwnA3MVA5Big1WHF1Dfx9hFuvNIWpXnorlkzhcQf6ehrqQiiZECRt1poOAkPmer3ruw==} imurmurhash@0.1.4: resolution: {integrity: sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==} @@ -4322,6 +4068,7 @@ packages: inflight@1.0.6: resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==} + deprecated: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful. inherits@2.0.4: resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} @@ -4406,15 +4153,15 @@ packages: resolution: {integrity: sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ==} engines: {node: '>=4'} + is-bun-module@1.2.1: + resolution: {integrity: sha512-AmidtEM6D6NmUiLOvvU7+IePxjEjOzra2h0pSrsfSAcXwl/83zLLXDByafUJy9k/rKK0pvXMLdwKwGHlX2Ke6Q==} + is-callable@1.2.7: resolution: {integrity: sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==} engines: {node: '>= 0.4'} - is-core-module@2.13.1: - resolution: {integrity: sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==} - - is-core-module@2.14.0: - resolution: {integrity: sha512-a5dFJih5ZLYlRtDc0dZWP7RiKr6xIKzmn/oAYCDvdLThadVgyJwlaoQPmRtMSpz+rk0OGAgIu+TcM9HUF0fk1A==} + is-core-module@2.15.1: + resolution: {integrity: sha512-z0vtXSwucUJtANQWldhbtbt7BnL0vxiFjIdDLAatwhDYty2bad6s+rijD6Ri4YuYJubLzIJLUidCh09e1djEVQ==} engines: {node: '>= 0.4'} is-data-descriptor@1.0.1: @@ -4659,16 +4406,16 @@ packages: iterator.prototype@1.1.2: resolution: {integrity: sha512-DR33HMMr8EzwuRL8Y9D3u2BMj8+RqSE850jfGu59kS7tbmPLzGkZmVSfyCFSDxuZiEY6Rzt3T2NA/qU+NwVj1w==} - jackspeak@2.3.6: - resolution: {integrity: sha512-N3yCS/NegsOBokc8GAdM8UcmfsKiSS8cipheD/nivzr700H+nsMOxJjQnvwOcRYVuFkdH0wGUvW2WbXGmrZGbQ==} - engines: {node: '>=14'} - jackspeak@3.4.0: resolution: {integrity: sha512-JVYhQnN59LVPFCEcVa2C3CrEKYacvjRfqIQl+h8oi91aLYQVWRYbxjPcv1bUiUy/kLmQaANrYfNMCO3kuEDHfw==} engines: {node: '>=14'} - jiti@1.21.0: - resolution: {integrity: sha512-gFqAIbuKyyso/3G2qhiO2OM6shY6EPP/R0+mkDbyspxKazh8BXDC5FiFsUjlczgdNz/vfra0da2y+aHrusLG/Q==} + jackspeak@4.0.1: + resolution: {integrity: sha512-cub8rahkh0Q/bw1+GxP7aeSe29hHHn2V4m29nnDlvCdlgU+3UGxkZp7Z53jLUdpX3jdTO0nJZUDl3xvbWc2Xog==} + engines: {node: 20 || >=22} + + jiti@1.21.6: + resolution: {integrity: sha512-2yTgeWTWzMWkHu6Jp9NKgePDaYHbntiwvYuuJLbbN9vl7DC9DvXKOB2BC3ZZ92D3cvV/aflH0osDfwpHepQ53w==} hasBin: true jju@1.4.0: @@ -4741,8 +4488,8 @@ packages: resolution: {integrity: sha512-ZZow9HBI5O6EPgSJLUb8n2NKgmVWTwCvHGwFuJlMjvLFqlGG6pjirPhtdsseaLZjSibD8eegzmYpUZwoIlj2cQ==} engines: {node: '>=4.0'} - katex@0.16.10: - resolution: {integrity: sha512-ZiqaC04tp2O5utMsl2TEZTXxa6WSC4yo0fv5ML++D3QZv/vx2Mct0mTlRx3O+uUkjfuAgOkzsCmq5MiUEsDDdA==} + katex@0.16.11: + resolution: {integrity: sha512-RQrI8rlHY92OLf3rho/Ts8i/XvjgguEjOkO1BEXcU3N8BqPpSzBNwV/G0Ukr+P/l3ivvJUE/Fa/CwbS6HesGNQ==} hasBin: true keyv@4.5.4: @@ -4770,15 +4517,9 @@ packages: known-css-properties@0.29.0: resolution: {integrity: sha512-Ne7wqW7/9Cz54PDt4I3tcV+hAyat8ypyOGzYRJQfdxnnjeWsTxt1cy8pjvvKeI5kfXuyvULyeeAvwvvtAX3ayQ==} - known-css-properties@0.31.0: - resolution: {integrity: sha512-sBPIUGTNF0czz0mwGGUoKKJC8Q7On1GPbCSFPfyEsfHb2DyBG0Y4QtV+EVWpINSaiGKZblDNuF5AezxSgOhesQ==} - known-css-properties@0.34.0: resolution: {integrity: sha512-tBECoUqNFbyAY4RrbqsBQqDFpGXAEbdD5QKr8kACx3+rnArmuuR22nKQWKazvp07N9yjTyDZaw/20UIH8tL9DQ==} - kolorist@1.8.0: - resolution: {integrity: sha512-Y+60/zizpJ3HRH8DCss+q95yr6145JXZo46OTpFvDZWLfRCE4qChOyk1b26nMaNpfHHgxagk9dXT5OP0Tfe+dQ==} - language-subtag-registry@0.3.23: resolution: {integrity: sha512-0K65Lea881pHotoGEa5gDlMxt3pctLi2RplBb7Ezh4rRdLEOtgi7n4EwK9lamnUCkKBqaeKRVebTq6BAxSkpXQ==} @@ -4799,62 +4540,68 @@ packages: resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==} engines: {node: '>= 0.8.0'} - lightningcss-darwin-arm64@1.25.1: - resolution: {integrity: sha512-G4Dcvv85bs5NLENcu/s1f7ehzE3D5ThnlWSDwE190tWXRQCQaqwcuHe+MGSVI/slm0XrxnaayXY+cNl3cSricw==} + lightningcss-darwin-arm64@1.27.0: + resolution: {integrity: sha512-Gl/lqIXY+d+ySmMbgDf0pgaWSqrWYxVHoc88q+Vhf2YNzZ8DwoRzGt5NZDVqqIW5ScpSnmmjcgXP87Dn2ylSSQ==} engines: {node: '>= 12.0.0'} cpu: [arm64] os: [darwin] - lightningcss-darwin-x64@1.25.1: - resolution: {integrity: sha512-dYWuCzzfqRueDSmto6YU5SoGHvZTMU1Em9xvhcdROpmtOQLorurUZz8+xFxZ51lCO2LnYbfdjZ/gCqWEkwixNg==} + lightningcss-darwin-x64@1.27.0: + resolution: {integrity: sha512-0+mZa54IlcNAoQS9E0+niovhyjjQWEMrwW0p2sSdLRhLDc8LMQ/b67z7+B5q4VmjYCMSfnFi3djAAQFIDuj/Tg==} engines: {node: '>= 12.0.0'} cpu: [x64] os: [darwin] - lightningcss-freebsd-x64@1.25.1: - resolution: {integrity: sha512-hXoy2s9A3KVNAIoKz+Fp6bNeY+h9c3tkcx1J3+pS48CqAt+5bI/R/YY4hxGL57fWAIquRjGKW50arltD6iRt/w==} + lightningcss-freebsd-x64@1.27.0: + resolution: {integrity: sha512-n1sEf85fePoU2aDN2PzYjoI8gbBqnmLGEhKq7q0DKLj0UTVmOTwDC7PtLcy/zFxzASTSBlVQYJUhwIStQMIpRA==} engines: {node: '>= 12.0.0'} cpu: [x64] os: [freebsd] - lightningcss-linux-arm-gnueabihf@1.25.1: - resolution: {integrity: sha512-tWyMgHFlHlp1e5iW3EpqvH5MvsgoN7ZkylBbG2R2LWxnvH3FuWCJOhtGcYx9Ks0Kv0eZOBud789odkYLhyf1ng==} + lightningcss-linux-arm-gnueabihf@1.27.0: + resolution: {integrity: sha512-MUMRmtdRkOkd5z3h986HOuNBD1c2lq2BSQA1Jg88d9I7bmPGx08bwGcnB75dvr17CwxjxD6XPi3Qh8ArmKFqCA==} engines: {node: '>= 12.0.0'} cpu: [arm] os: [linux] - lightningcss-linux-arm64-gnu@1.25.1: - resolution: {integrity: sha512-Xjxsx286OT9/XSnVLIsFEDyDipqe4BcLeB4pXQ/FEA5+2uWCCuAEarUNQumRucnj7k6ftkAHUEph5r821KBccQ==} + lightningcss-linux-arm64-gnu@1.27.0: + resolution: {integrity: sha512-cPsxo1QEWq2sfKkSq2Bq5feQDHdUEwgtA9KaB27J5AX22+l4l0ptgjMZZtYtUnteBofjee+0oW1wQ1guv04a7A==} engines: {node: '>= 12.0.0'} cpu: [arm64] os: [linux] - lightningcss-linux-arm64-musl@1.25.1: - resolution: {integrity: sha512-IhxVFJoTW8wq6yLvxdPvyHv4NjzcpN1B7gjxrY3uaykQNXPHNIpChLB52+wfH+yS58zm1PL4LemUp8u9Cfp6Bw==} + lightningcss-linux-arm64-musl@1.27.0: + resolution: {integrity: sha512-rCGBm2ax7kQ9pBSeITfCW9XSVF69VX+fm5DIpvDZQl4NnQoMQyRwhZQm9pd59m8leZ1IesRqWk2v/DntMo26lg==} engines: {node: '>= 12.0.0'} cpu: [arm64] os: [linux] - lightningcss-linux-x64-gnu@1.25.1: - resolution: {integrity: sha512-RXIaru79KrREPEd6WLXfKfIp4QzoppZvD3x7vuTKkDA64PwTzKJ2jaC43RZHRt8BmyIkRRlmywNhTRMbmkPYpA==} + lightningcss-linux-x64-gnu@1.27.0: + resolution: {integrity: sha512-Dk/jovSI7qqhJDiUibvaikNKI2x6kWPN79AQiD/E/KeQWMjdGe9kw51RAgoWFDi0coP4jinaH14Nrt/J8z3U4A==} engines: {node: '>= 12.0.0'} cpu: [x64] os: [linux] - lightningcss-linux-x64-musl@1.25.1: - resolution: {integrity: sha512-TdcNqFsAENEEFr8fJWg0Y4fZ/nwuqTRsIr7W7t2wmDUlA8eSXVepeeONYcb+gtTj1RaXn/WgNLB45SFkz+XBZA==} + lightningcss-linux-x64-musl@1.27.0: + resolution: {integrity: sha512-QKjTxXm8A9s6v9Tg3Fk0gscCQA1t/HMoF7Woy1u68wCk5kS4fR+q3vXa1p3++REW784cRAtkYKrPy6JKibrEZA==} engines: {node: '>= 12.0.0'} cpu: [x64] os: [linux] - lightningcss-win32-x64-msvc@1.25.1: - resolution: {integrity: sha512-9KZZkmmy9oGDSrnyHuxP6iMhbsgChUiu/NSgOx+U1I/wTngBStDf2i2aGRCHvFqj19HqqBEI4WuGVQBa2V6e0A==} + lightningcss-win32-arm64-msvc@1.27.0: + resolution: {integrity: sha512-/wXegPS1hnhkeG4OXQKEMQeJd48RDC3qdh+OA8pCuOPCyvnm/yEayrJdJVqzBsqpy1aJklRCVxscpFur80o6iQ==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [win32] + + lightningcss-win32-x64-msvc@1.27.0: + resolution: {integrity: sha512-/OJLj94Zm/waZShL8nB5jsNj3CfNATLCTyFxZyouilfTmSoLDX7VlVAmhPHoZWVFp4vdmoiEbPEYC8HID3m6yw==} engines: {node: '>= 12.0.0'} cpu: [x64] os: [win32] - lightningcss@1.25.1: - resolution: {integrity: sha512-V0RMVZzK1+rCHpymRv4URK2lNhIRyO8g7U7zOFwVAhJuat74HtkjIQpQRKNCwFEYkRGpafOpmXXLoaoBcyVtBg==} + lightningcss@1.27.0: + resolution: {integrity: sha512-8f7aNmS1+etYSLHht0fQApPc2kNO8qGRutifN5rVIc6Xo6ABsEbqOr758UwI7ALVbTt4x1fllKt0PYgzD9S3yQ==} engines: {node: '>= 12.0.0'} lilconfig@2.1.0: @@ -4868,13 +4615,13 @@ packages: lines-and-columns@1.2.4: resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} - lint-staged@15.2.7: - resolution: {integrity: sha512-+FdVbbCZ+yoh7E/RosSdqKJyUM2OEjTciH0TFNkawKgvFp1zbGlEC39RADg+xKBG1R4mhoH2j85myBQZ5wR+lw==} + lint-staged@15.2.10: + resolution: {integrity: sha512-5dY5t743e1byO19P9I4b3x8HJwalIznL5E1FWYnU6OWw33KxNBSLAc6Cy7F2PsFEO8FKnLwjwm5hx7aMF0jzZg==} engines: {node: '>=18.12.0'} hasBin: true - listr2@8.2.1: - resolution: {integrity: sha512-irTfvpib/rNiD637xeevjO2l3Z5loZmuaRi0L0YE5LfijwVY96oyVn0DFD3o/teAok7nfobMG1THvvcHh/BP6g==} + listr2@8.2.4: + resolution: {integrity: sha512-opevsywziHd3zHCVQGAj8zu+Z3yHNkkoYhWIGnq54RrCVwLz0MozotJEDnKsIBLvkfLGN6BLOyAeRrYI0pKA4g==} engines: {node: '>=18.0.0'} load-json-file@4.0.0: @@ -4885,10 +4632,6 @@ packages: resolution: {integrity: sha512-IXO6OCs9yg8tMKzfPZ1YmheJbZCiEsnBdcB03l0OcfK9prKnJb96siuHCr5Fl37/yo9DnKU+TLpxzTUspw9shg==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - load-yaml-file@0.2.0: - resolution: {integrity: sha512-OfCBkGEw4nN6JLtgRidPX6QxjBQGQf72q3si2uvqyFEMbycSFFHwAZeXx6cJgFM9wmLrf9zBwCP3Ivqa+LLZPw==} - engines: {node: '>=6'} - locate-character@3.0.0: resolution: {integrity: sha512-SW13ws7BjaeJ6p7Q6CO2nchbYEc3X3J6WrmTTDto7yMPqVSZTUyY5Tjbid+Ab8gLnATtygYtiDIJGQRRn2ZOiA==} @@ -4914,12 +4657,6 @@ packages: lodash.camelcase@4.3.0: resolution: {integrity: sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==} - lodash.get@4.4.2: - resolution: {integrity: sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ==} - - lodash.isequal@4.5.0: - resolution: {integrity: sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ==} - lodash.isplainobject@4.0.6: resolution: {integrity: sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==} @@ -4957,8 +4694,8 @@ packages: resolution: {integrity: sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg==} engines: {node: '>=4'} - log-update@6.0.0: - resolution: {integrity: sha512-niTvB4gqvtof056rRIrTZvjNYE4rCUzO6X/X+kYjd7WFxXeJ0NwEFnRxX6ehkvv3jTwrXnNdtAak5XYZuIyPFw==} + log-update@6.1.0: + resolution: {integrity: sha512-9ie8ItPR6tjY5uYJh8K/Zrv/RMZ5VOlOWvtZdEHYSTFKZfIBPQa9tOAEeAWhd+AnIneLJ22w5fjOYtoutpWq5w==} engines: {node: '>=18'} longest-streak@2.0.4: @@ -4982,6 +4719,10 @@ packages: resolution: {integrity: sha512-9hp3Vp2/hFQUiIwKo8XCeFVnrg8Pk3TYNPIR7tJADKi5YfcF7vEaK7avFHTlSy3kOKYaJQaalfEo6YuXdceBOQ==} engines: {node: 14 || >=16.14} + lru-cache@11.0.1: + resolution: {integrity: sha512-CgeuL5uom6j/ZVrg7G/+1IXqRY8JXX4Hghfy5YE0EhoYQWvndP1kufu58cmZLNIDKnRhZrXfdS9urVWx98AipQ==} + engines: {node: 20 || >=22} + lru-cache@4.1.5: resolution: {integrity: sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==} @@ -4998,6 +4739,9 @@ packages: magic-string@0.30.10: resolution: {integrity: sha512-iIRwTIf0QKV3UAnYK4PU8uiEc4SRh5jX0mwpIwETPpHdhVM4f53RSwS/vXvN1JhGX+Cs7B8qIq3d6AH49O5fAQ==} + magic-string@0.30.11: + resolution: {integrity: sha512-+Wri9p0QHMy+545hKww7YAu5NyzF8iomPL/RQazugQ9+Ez4Ic3mERMd8ZTX5rfK944j+560ZJi8iAwgak1Ac7A==} + make-dir@2.1.0: resolution: {integrity: sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==} engines: {node: '>=6'} @@ -5097,9 +4841,6 @@ packages: mdn-data@2.0.30: resolution: {integrity: sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA==} - memoizee@0.4.15: - resolution: {integrity: sha512-UBWmJpLZd5STPm7PMUlOw/TSy972M+z8gcyQ5veOnSDRREz/0bmpyTfKt3/51DhEBqCZQn1udM/5flcSPYhkdQ==} - memoizee@0.4.17: resolution: {integrity: sha512-DGqD7Hjpi/1or4F/aYAspXKNm5Yili0QDAFAY4QYvpqpgiY6+1jOfqpmByzjxbWd/T9mChbCArXAbDAsTm5oXA==} engines: {node: '>=0.12'} @@ -5221,12 +4962,8 @@ packages: resolution: {integrity: sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==} engines: {node: '>=0.10.0'} - micromatch@4.0.5: - resolution: {integrity: sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==} - engines: {node: '>=8.6'} - - micromatch@4.0.7: - resolution: {integrity: sha512-LPP/3KorzCwBxfeUuZmaR6bG2kdeHSbe0P2tY3FLRU4vYrjYz5hI4QZwV0njUx3jeuKe67YukQ1LSPZBKDqO/Q==} + micromatch@4.0.8: + resolution: {integrity: sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==} engines: {node: '>=8.6'} mime@1.6.0: @@ -5242,6 +4979,10 @@ packages: resolution: {integrity: sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==} engines: {node: '>=12'} + mimic-function@5.0.1: + resolution: {integrity: sha512-VP79XUPxV2CigYP3jWwAUFSku2aKqBH7uTAapFWCBqutsbmDo96KY5o8uh6U+/YSIn5OxJnXp73beVkpqMIGhA==} + engines: {node: '>=18'} + mimic-response@2.1.0: resolution: {integrity: sha512-wXqjST+SLt7R009ySCglWBCFpjUygmCIfD790/kVbiGmUgfYGuB14PiTd5DwVxSV4NcYHjzMkoj5LjQZwTQLEA==} engines: {node: '>=8'} @@ -5250,14 +4991,18 @@ packages: resolution: {integrity: sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==} engines: {node: '>=4'} + minimatch@10.0.1: + resolution: {integrity: sha512-ethXTt3SGGR+95gudmqJ1eNhRO7eGEGIgYA9vnPatK4/etz2MEVDno5GMCibdMTuBMyElzIlgxMna3K94XDIDQ==} + engines: {node: 20 || >=22} + minimatch@3.0.8: resolution: {integrity: sha512-6FsRAQsxQ61mw+qP1ZzbL9Bc78x2p5OqNgNpnoAFLTrX8n5Kxph0CsnhmKKNXTWjXqU5L0pGPR7hYk+XWZr60Q==} minimatch@3.1.2: resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} - minimatch@9.0.4: - resolution: {integrity: sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==} + minimatch@9.0.5: + resolution: {integrity: sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==} engines: {node: '>=16 || 14 >=14.17'} minimist-options@3.0.2: @@ -5307,9 +5052,6 @@ packages: ms@2.0.0: resolution: {integrity: sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==} - ms@2.1.2: - resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==} - ms@2.1.3: resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} @@ -5323,9 +5065,6 @@ packages: typescript: optional: true - muggle-string@0.3.1: - resolution: {integrity: sha512-ckmWDJjphvd/FvZawgygcUeQCxzvohjFO5RxTjj4eq8kw359gFF3E1brjfI+viLMxss5JrHTDRHZvu2/tuy0Qg==} - mute-stream@1.0.0: resolution: {integrity: sha512-avsJQhyd+680gKXyG/sQc0nXaC6rBkPOfyHYcFb9+hdkqQkR9bdnkJ0AMZhke0oesPqIO+mFFJ+IdBc7mst4IA==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} @@ -5383,6 +5122,9 @@ packages: node-releases@2.0.14: resolution: {integrity: sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==} + node-releases@2.0.18: + resolution: {integrity: sha512-d9VeXT4SJ7ZeOqGX6R5EM022wpL+eWPooLI+5UpWn2jCT1aosUQEhQP214x33Wkwx3JQMvIm+tIoVOdodFS40g==} + nopt@5.0.0: resolution: {integrity: sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ==} engines: {node: '>=6'} @@ -5417,6 +5159,7 @@ packages: npmlog@5.0.1: resolution: {integrity: sha512-AqZtDUWOMKs1G/8lwylVjrdYgqA4d9nu8hc+0gzRxlDb1I10+FHBGMXs6aiQHFdCUUlqH99MUMuLfzWDNDtfxw==} + deprecated: This package is no longer supported. num2fraction@1.2.2: resolution: {integrity: sha512-Y1wZESM7VUThYY+4W+X4ySH2maqcA+p7UR+w8VWNWVAd6lwuXXWz/w/Cz43J/dI2I+PS6wD5N+bJUF+gjWvIqg==} @@ -5464,10 +5207,6 @@ packages: resolution: {integrity: sha512-+Lhy3TQTuzXI5hevh8sBGqbmurHbbIjAi0Z4S63nthVLmLxfbj4T54a4CfZrXIrt9iP4mVAPYMo/v99taj3wjQ==} engines: {node: '>= 0.4'} - object.hasown@1.1.4: - resolution: {integrity: sha512-FZ9LZt9/RHzGySlBARE3VF+gE26TxR38SdmqOqliuTnl9wrKulaQs+4dee1V+Io8VfxqzAfHu6YuRgUy8OHoTg==} - engines: {node: '>= 0.4'} - object.pick@1.3.0: resolution: {integrity: sha512-tqa/UMy/CCoYmj+H5qc07qvSL9dqcs/WZENZ1JbtWBlATP+iVOe778gE6MSijnyCnORzDuX6hU+LA4SZ09YjFQ==} engines: {node: '>=0.10.0'} @@ -5487,6 +5226,10 @@ packages: resolution: {integrity: sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==} engines: {node: '>=12'} + onetime@7.0.0: + resolution: {integrity: sha512-VXJjc87FScF88uafS3JllDgvAm+c/Slfz06lorj2uAY34rlUu0Nt+v8wreiImcrgAjjIHp1rXpTDlLOGw29WwQ==} + engines: {node: '>=18'} + optionator@0.9.4: resolution: {integrity: sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==} engines: {node: '>= 0.8.0'} @@ -5549,6 +5292,12 @@ packages: resolution: {integrity: sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==} engines: {node: '>=6'} + package-json-from-dist@1.0.0: + resolution: {integrity: sha512-dATvCeZN/8wQsGywez1mzHtTlP22H8OEfPrVMLNr4/eGa+ijtLn/6M5f0dY8UKNrC2O9UCU6SSoG3qRKnt7STw==} + + package-manager-detector@0.2.0: + resolution: {integrity: sha512-E385OSk9qDcXhcM9LNSe4sdhx8a9mAPrZ4sMLW+tmxl5ZuGtPUcdFu+MPP2jbgiWAZ6Pfe5soGFMd+0Db5Vrog==} + parent-module@1.0.1: resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==} engines: {node: '>=6'} @@ -5625,6 +5374,10 @@ packages: resolution: {integrity: sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==} engines: {node: '>=16 || 14 >=14.18'} + path-scurry@2.0.0: + resolution: {integrity: sha512-ypGJsmGtdXUOeM5u93TyeIEfEhM6s+ljAhrk5vAvSx8uyY/02OvrZnA0YNGUrPXfpJMgI1ODd3nwz8Npx4O4cg==} + engines: {node: 20 || >=22} + path-to-regexp@6.2.2: resolution: {integrity: sha512-GQX3SSMokngb36+whdpRXE+3f9V8UzyAorlYvOGx87ufGHehNTn5lCxrKtLyZ4Yl/wEKnNnr98ZzOwwDZV5ogw==} @@ -5650,11 +5403,8 @@ packages: picocolors@0.2.1: resolution: {integrity: sha512-cMlDqaLEqfSaW8Z7N5Jw+lyIW869EzT73/F5lhtY9cLGoVxSXznfgfXMO0Z5K0o0Q2TkTXq+0KFsdnSe3jDViA==} - picocolors@1.0.0: - resolution: {integrity: sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==} - - picocolors@1.0.1: - resolution: {integrity: sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==} + picocolors@1.1.0: + resolution: {integrity: sha512-TQ92mBOW0l3LeMeyLV6mzy/kWr8lkd/hp3mTg7wYK7zJhuBStmGMBG0BdeDZS/dZx1IukaX6Bk11zcln25o1Aw==} picomatch@2.3.1: resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} @@ -5682,10 +5432,6 @@ packages: resolution: {integrity: sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==} engines: {node: '>= 6'} - pkg-dir@4.2.0: - resolution: {integrity: sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==} - engines: {node: '>=8'} - posix-character-classes@0.1.1: resolution: {integrity: sha512-xTgYBc3fuo7Yt7JbiuFxSYGToMoz8fLoE6TC9Wx1P/u+LfeThMOAqmuyECnlBaaJb+u1m9hHiXUEtwW4OzfUJg==} engines: {node: '>=0.10.0'} @@ -5728,16 +5474,22 @@ packages: ts-node: optional: true - postcss-load-config@4.0.2: - resolution: {integrity: sha512-bSVhyJGL00wMVoPUzAVAnbEoWyqRxkjv64tUl427SKnPrENtq6hJwUojroMz2VB+Q1edmi4IfrAPpami5VVgMQ==} - engines: {node: '>= 14'} + postcss-load-config@6.0.1: + resolution: {integrity: sha512-oPtTM4oerL+UXmx+93ytZVN82RrlY/wPUV8IeDxFrzIjXOLF1pN+EmKPLbubvKHT2HC20xXsCAH2Z+CKV6Oz/g==} + engines: {node: '>= 18'} peerDependencies: + jiti: '>=1.21.0' postcss: '>=8.0.9' - ts-node: '>=9.0.0' + tsx: ^4.8.1 + yaml: ^2.4.2 peerDependenciesMeta: + jiti: + optional: true postcss: optional: true - ts-node: + tsx: + optional: true + yaml: optional: true postcss-markdown@0.36.0: @@ -5756,6 +5508,9 @@ packages: postcss-resolve-nested-selector@0.1.1: resolution: {integrity: sha512-HvExULSwLqHLgUy1rl3ANIqCsvMS0WHss2UOsXhXnQaZ9VCc2oBvIpXrl00IUFT5ZDITME0o6oiXeiHr2SAIfw==} + postcss-resolve-nested-selector@0.1.6: + resolution: {integrity: sha512-0sglIs9Wmkzbr8lQwEyIzlDOOC9bGmfVKcJTaxv3vMmd3uo4o4DerC3En0bnmgceeql9BfC8hRkp7cg0fjdVqw==} + postcss-safe-parser@4.0.2: resolution: {integrity: sha512-Uw6ekxSWNLCPesSv/cmqf2bY/77z11O7jZGPax3ycZMFU/oi2DMH9i89AdHc1tRwFg/arFoEwX0IS3LCUxJh1g==} engines: {node: '>=6.0.0'} @@ -5793,8 +5548,8 @@ packages: resolution: {integrity: sha512-A0RVJrX+IUkVZbW3ClroRWurercFhieevHB38sr2+l9eUClMqome3LmEmnhlNy+5Mr2EYN6B2Kaw9wYdd+VHiw==} engines: {node: '>=4'} - postcss-selector-parser@6.1.0: - resolution: {integrity: sha512-UMz42UD0UY0EApS0ZL9o1XnLhSTtvvvLe5Dc2H2O56fvRZi+KulDyf5ctDhhtYJBGKStV2FL1fy6253cmLgqVQ==} + postcss-selector-parser@6.1.2: + resolution: {integrity: sha512-Q8qQfPiZ+THO/3ZrOrO0cJJKfpYCagtMUkXbnEfmgUjwXg6z/WBeOyS9APBBPCTSiDV+s4SwQGu8yFsiMRIudg==} engines: {node: '>=4'} postcss-sorting@4.1.0: @@ -5837,14 +5592,10 @@ packages: resolution: {integrity: sha512-yioayjNbHn6z1/Bywyb2Y4s3yvDAeXGOyxqD+LnVOinq6Mdmd++SW2wUNVzavyyHxd6+DxzWGIuosg6P1Rj8uA==} engines: {node: '>=6.0.0'} - postcss@8.4.38: - resolution: {integrity: sha512-Wglpdk03BSfXkHoQa3b/oulrotAkwrlLDRSOb9D0bN86FdRyE9lppSp33aHNPgBa0JKCoB+drFLZkQoRRYae5A==} + postcss@8.4.45: + resolution: {integrity: sha512-7KTLTdzdZZYscUc65XmjFiB73vBhBfbPztCYdUNvlaso9PrzjzcmjqBPR0lNGkcVlcO4BjiO5rK/qNz+XAen1Q==} engines: {node: ^10 || ^12 || >=14} - preferred-pm@3.1.3: - resolution: {integrity: sha512-MkXsENfftWSRpzCzImcp4FRsCc3y1opwB73CfCNWyzMqArju2CrlMHlqB7VexKiPEOjGMbttv1r9fSCn5S610w==} - engines: {node: '>=10'} - prelude-ls@1.2.1: resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} engines: {node: '>= 0.8.0'} @@ -5853,16 +5604,16 @@ packages: resolution: {integrity: sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==} engines: {node: '>=6.0.0'} - prettier-plugin-packagejson@2.5.0: - resolution: {integrity: sha512-6XkH3rpin5QEQodBSVNg+rBo4r91g/1mCaRwS1YGdQJZ6jwqrg2UchBsIG9tpS1yK1kNBvOt84OILsX8uHzBGg==} + prettier-plugin-packagejson@2.5.2: + resolution: {integrity: sha512-w+TmoLv2pIa+siplW1cCj2ujEXQQS6z7wmWLOiLQK/2QVl7Wy6xh/ZUpqQw8tbKMXDodmSW4GONxlA33xpdNOg==} peerDependencies: prettier: '>= 1.16.0' peerDependenciesMeta: prettier: optional: true - prettier-plugin-svelte@3.2.5: - resolution: {integrity: sha512-vP/M/Goc8z4iVIvrwXwbrYVjJgA0Hf8PO1G4LBh/ocSt6vUP6sLvyu9F3ABEGr+dbKyxZjEKLkeFsWy/yYl0HQ==} + prettier-plugin-svelte@3.2.6: + resolution: {integrity: sha512-Y1XWLw7vXUQQZmgv1JAEiLcErqUniAF2wO7QJsw8BVMvpLET2dI5WpEIEJx1r11iHVdSMzQxivyfrH9On9t2IQ==} peerDependencies: prettier: ^3.0.0 svelte: ^3.2.0 || ^4.0.0-next.0 || ^5.0.0-next.0 @@ -5872,8 +5623,8 @@ packages: engines: {node: '>=10.13.0'} hasBin: true - prettier@3.3.2: - resolution: {integrity: sha512-rAVeHYMcv8ATV5d508CFdn+8/pHPpXeIid1DdrPwXnaAdH7cqjVbpJaT5eq4yRAFU/lsbwYwSF/n5iNrdJHPQA==} + prettier@3.3.3: + resolution: {integrity: sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==} engines: {node: '>=14'} hasBin: true @@ -5943,11 +5694,6 @@ packages: resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==} engines: {node: '>=6'} - qrcode.react@3.1.0: - resolution: {integrity: sha512-oyF+Urr3oAMUG/OiOuONL3HXM+53wvuH3mtIWQrYmsXoAq0DkvZp2RYUWFSMFtbdOpuS++9v+WAkzNVkMlNW6Q==} - peerDependencies: - react: ^16.8.0 || ^17.0.0 || ^18.0.0 - queue-microtask@1.2.3: resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} @@ -5955,8 +5701,8 @@ packages: resolution: {integrity: sha512-tRS7sTgyxMXtLum8L65daJnHUhfDUgboRdcWW2bR9vBfrj2+O5HSMbQOJfJJjIVSPFqbBCF37FpwWXGitDc5tA==} engines: {node: '>=4'} - rc-cascader@3.26.0: - resolution: {integrity: sha512-L1dml383TPSJD1I11YwxuVbmqaJY64psZqFp1ETlgl3LEOwDu76Cyl11fw5dmjJhMlUWwM5dECQfqJgfebhUjg==} + rc-cascader@3.28.1: + resolution: {integrity: sha512-9+8oHIMWVLHxuaapDiqFNmD9KSyKN/P4bo9x/MBuDbyTqP8f2/POmmZxdXWBO3yq/uE3pKyQCXYNUxrNfHRv2A==} peerDependencies: react: '>=16.9.0' react-dom: '>=16.9.0' @@ -5991,8 +5737,8 @@ packages: react: '>=16.11.0' react-dom: '>=16.11.0' - rc-field-form@2.2.1: - resolution: {integrity: sha512-uoNqDoR7A4tn4QTSqoWPAzrR7ZwOK5I+vuZ/qdcHtbKx+ZjEsTg7QXm2wk/jalDiSksAQmATxL0T5LJkRREdIA==} + rc-field-form@2.4.0: + resolution: {integrity: sha512-XZ/lF9iqf9HXApIHQHqzJK5v2w4mkUMsVqAzOyWVzoiwwXEavY6Tpuw7HavgzIoD+huVff4JghSGcgEfX6eycg==} engines: {node: '>=8.x'} peerDependencies: react: '>=16.9.0' @@ -6004,20 +5750,20 @@ packages: react: '>=16.9.0' react-dom: '>=16.9.0' - rc-input-number@9.1.0: - resolution: {integrity: sha512-NqJ6i25Xn/AgYfVxynlevIhX3FuKlMwIFpucGG1h98SlK32wQwDK0zhN9VY32McOmuaqzftduNYWWooWz8pXQA==} + rc-input-number@9.2.0: + resolution: {integrity: sha512-5XZFhBCV5f9UQ62AZ2hFbEY8iZT/dm23Q1kAg0H8EvOgD3UDbYYJAayoVIkM3lQaCqYAW5gV0yV3vjw1XtzWHg==} peerDependencies: react: '>=16.9.0' react-dom: '>=16.9.0' - rc-input@1.5.1: - resolution: {integrity: sha512-+nOzQJDeIfIpNP/SgY45LXSKbuMlp4Yap2y8c+ZpU7XbLmNzUd6+d5/S75sA/52jsVE6S/AkhkkDEAOjIu7i6g==} + rc-input@1.6.3: + resolution: {integrity: sha512-wI4NzuqBS8vvKr8cljsvnTUqItMfG1QbJoxovCgL+DX4eVUcHIjVwharwevIxyy7H/jbLryh+K7ysnJr23aWIA==} peerDependencies: react: '>=16.0.0' react-dom: '>=16.0.0' - rc-mentions@2.14.0: - resolution: {integrity: sha512-qKR59FMuF8PK4ZqsbWX3UuA5P1M/snzyqV6Yt3y1DCFbCEdqUGIBgQp6vEfLCO6Z0RoRFlzXtCeSlBTcDDpg1A==} + rc-mentions@2.15.0: + resolution: {integrity: sha512-f5v5i7VdqvBDXbphoqcQWmXDif2Msd2arritVoWybrVDuHE6nQ7XCYsybHbV//WylooK52BFDouFvyaRDtXZEw==} peerDependencies: react: '>=16.9.0' react-dom: '>=16.9.0' @@ -6047,14 +5793,14 @@ packages: react: '>=16.9.0' react-dom: '>=16.9.0' - rc-pagination@4.0.4: - resolution: {integrity: sha512-GGrLT4NgG6wgJpT/hHIpL9nELv27A1XbSZzECIuQBQTVSf4xGKxWr6I/jhpRPauYEWEbWVw22ObG6tJQqwJqWQ==} + rc-pagination@4.2.0: + resolution: {integrity: sha512-V6qeANJsT6tmOcZ4XiUmj8JXjRLbkusuufpuoBw2GiAn94fIixYjFLmbruD1Sbhn8fPLDnWawPp4CN37zQorvw==} peerDependencies: react: '>=16.9.0' react-dom: '>=16.9.0' - rc-picker@4.5.0: - resolution: {integrity: sha512-suqz9bzuhBQlf7u+bZd1bJLPzhXpk12w6AjQ9BTPTiFwexVZgUKViG1KNLyfFvW6tCUZZK0HmCCX7JAyM+JnCg==} + rc-picker@4.6.14: + resolution: {integrity: sha512-7DuTfUFdkxmsNpWQ0TWv6FPGna5e6KKC4nxtx3x9xhumLz7jb3fhlDdWQvqEL6tpt9DOb1+N5j+wB+lDOSS9kg==} engines: {node: '>=8.x'} peerDependencies: date-fns: '>= 2.x' @@ -6098,15 +5844,15 @@ packages: react: '>=16.0.0' react-dom: '>=16.0.0' - rc-select@14.14.0: - resolution: {integrity: sha512-Uo2wulrjoPPRLCPd7zlK4ZFVJxlTN//yp1xWP/U+TUOQCyXrT+Duvq/Si5OzVcmQyWAUSbsplc2OwNNhvbOeKQ==} + rc-select@14.15.2: + resolution: {integrity: sha512-oNoXlaFmpqXYcQDzcPVLrEqS2J9c+/+oJuGrlXeVVX/gVgrbHa5YcyiRUXRydFjyuA7GP3elRuLF7Y3Tfwltlw==} engines: {node: '>=8.x'} peerDependencies: react: '*' react-dom: '*' - rc-slider@10.6.2: - resolution: {integrity: sha512-FjkoFjyvUQWcBo1F3RgSglky3ar0+qHLM41PlFVYB4Bj3RD8E/Mv7kqMouLFBU+3aFglMzzctAIWRwajEuueSw==} + rc-slider@11.1.5: + resolution: {integrity: sha512-b77H5PbjMKsvkYXAYIkn50QuFX6ICQmCTibDinI9q+BHx65/TV4TeU25+oadhSRzykxs0/vBWeKBwRyySOeWlg==} engines: {node: '>=8.x'} peerDependencies: react: '>=16.9.0' @@ -6139,8 +5885,8 @@ packages: react: '>=16.9.0' react-dom: '>=16.9.0' - rc-textarea@1.7.0: - resolution: {integrity: sha512-UxizYJkWkmxP3zofXgc487QiGyDmhhheDLLjIWbFtDmiru1ls30KpO8odDaPyqNUIy9ugj5djxTEuezIn6t3Jg==} + rc-textarea@1.8.1: + resolution: {integrity: sha512-bm36N2ZqwZAP60ZQg2OY9mPdqWC+m6UTjHc+CqEZOxb3Ia29BGHazY/s5bI8M4113CkqTzhtFUDNA078ZiOx3Q==} peerDependencies: react: '>=16.9.0' react-dom: '>=16.9.0' @@ -6151,27 +5897,21 @@ packages: react: '>=16.9.0' react-dom: '>=16.9.0' - rc-tree-select@5.21.0: - resolution: {integrity: sha512-w+9qEu6zh0G3wt9N/hzWNSnqYH1i9mH1Nqxo0caxLRRFXF5yZWYmpCDoDTMdQM1Y4z3Q5yj08qyrPH/d4AtumA==} + rc-tree-select@5.23.0: + resolution: {integrity: sha512-aQGi2tFSRw1WbXv0UVXPzHm09E0cSvUVZMLxQtMv3rnZZpNmdRXWrnd9QkLNlVH31F+X5rgghmdSFF3yZW0N9A==} peerDependencies: react: '*' react-dom: '*' - rc-tree@5.8.8: - resolution: {integrity: sha512-S+mCMWo91m5AJqjz3PdzKilGgbFm7fFJRFiTDOcoRbD7UfMOPnerXwMworiga0O2XIo383UoWuEfeHs1WOltag==} + rc-tree@5.9.0: + resolution: {integrity: sha512-CPrgOvm9d/9E+izTONKSngNzQdIEjMox2PBufWjS1wf7vxtvmCWzK1SlpHbRY6IaBfJIeZ+88RkcIevf729cRg==} engines: {node: '>=10.x'} peerDependencies: react: '*' react-dom: '*' - rc-upload@4.5.2: - resolution: {integrity: sha512-QO3ne77DwnAPKFn0bA5qJM81QBjQi0e0NHdkvpFyY73Bea2NfITiotqJqVjHgeYPOJu5lLVR32TNGP084aSoXA==} - peerDependencies: - react: '>=16.9.0' - react-dom: '>=16.9.0' - - rc-util@5.40.1: - resolution: {integrity: sha512-wsYjO59DpyyZdMe1yCSqHiHU8sWjkP1wIfj2mR0aHaNmFFgw727kkOFY7FBukg4rXhIw131549SLxQXQoIB73A==} + rc-upload@4.7.0: + resolution: {integrity: sha512-eUwxYNHlsYe5vYhKFAUGrQG95JrnPzY+BmPi1Daq39fWNl/eOc7v4UODuWrVp2LFkQBuV3cMCG/I68iub6oBrg==} peerDependencies: react: '>=16.9.0' react-dom: '>=16.9.0' @@ -6182,8 +5922,8 @@ packages: react: '>=16.9.0' react-dom: '>=16.9.0' - rc-virtual-list@3.14.3: - resolution: {integrity: sha512-6+6wiEhdqakNBnbRJymgMlh+90qpkgqherTRo1l1cX7mK6F9hWsazPczmP0lA+64yhC9/t+M9Dh5pjvDWimn8A==} + rc-virtual-list@3.14.5: + resolution: {integrity: sha512-ZMOnkCLv2wUN8Jz7yI4XiSLa9THlYvf00LuMhb1JlsQCewuU7ydPuHw1rGVPhe9VZYl/5UqODtNd7QKJ2DMGfg==} engines: {node: '>=8.x'} peerDependencies: react: '>=16.9.0' @@ -6261,8 +6001,8 @@ packages: resolution: {integrity: sha512-NcDiDkTLuPR+++OCKB0nWafEmhg/Da8aUPLPMQbK+bxKKCm1/S5he+AqYa4PlMCVBalb4/yxIRub6qkEx5yJbw==} engines: {node: '>= 0.4'} - rehype-katex@7.0.0: - resolution: {integrity: sha512-h8FPkGE00r2XKU+/acgqwWUlyzve1IiOKwsEkg4pDL3k48PiE0Pt+/uLtVHDVkN1yA4iurZN6UES8ivHVEQV6Q==} + rehype-katex@7.0.1: + resolution: {integrity: sha512-OiM2wrZ/wuhKkigASodFoo8wimG3H12LWQaH8qSPVJn9apWKFSH3YOCtbKpBorTVw/eI7cuT21XBbvwEswbIOA==} rehype-raw@7.0.0: resolution: {integrity: sha512-/aE8hCfKlQeA8LmyeyQvQF3eBiLRGNlfBJEvWH7ivp9sBqs7TNqBL5X3v157rM4IFETqDnIOO+z5M/biZbo9Ww==} @@ -6339,9 +6079,6 @@ packages: resolution: {integrity: sha512-ZuF55hVUQaaczgOIwqWzkEcEidmlD/xl44x1UZnhOXcYuFN2S6+rcxpG+C1N3So0wvNI3DmJICUFfu2SxhBmvg==} deprecated: https://github.com/lydell/resolve-url#deprecated - resolve@1.19.0: - resolution: {integrity: sha512-rArEXAgsBG4UgRGcynxWIWKFvh/XZCcS8UJdHhwy91zwAvCZIbcs+vAbflgBnNjYMs/i/i+/Ux6IZhML1yPvxg==} - resolve@1.22.8: resolution: {integrity: sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==} hasBin: true @@ -6350,9 +6087,9 @@ packages: resolution: {integrity: sha512-U7WjGVG9sH8tvjW5SmGbQuui75FiyjAX72HX15DwBBwF9dNiQZRQAg9nnPhYy+TUnE0+VcrttuvNI8oSxZcocA==} hasBin: true - restore-cursor@4.0.0: - resolution: {integrity: sha512-I9fPXU9geO9bHOt9pHHOhOkYerIMsmVaWB0rA2AI9ERh/+x/i7MV5HKBNrg+ljO5eoPVgCcnFuRjJ9uH6I/3eg==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + restore-cursor@5.1.0: + resolution: {integrity: sha512-oMA2dcrw6u0YfxJQXm342bFKX/E4sG9rbTzO9ptUcR/e8A33cHuvStiYOwH7fszkZlZ1z/ta9AAoPk2F4qIOHA==} + engines: {node: '>=18'} ret@0.1.15: resolution: {integrity: sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==} @@ -6367,6 +6104,7 @@ packages: rimraf@2.6.3: resolution: {integrity: sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==} + deprecated: Rimraf versions prior to v4 are no longer supported hasBin: true rimraf@2.7.1: @@ -6376,15 +6114,16 @@ packages: rimraf@3.0.2: resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==} + deprecated: Rimraf versions prior to v4 are no longer supported hasBin: true - rimraf@5.0.7: - resolution: {integrity: sha512-nV6YcJo5wbLW77m+8KjH8aB/7/rxQy9SZ0HY5shnwULfS+9nmTtVXAJET5NdZmCzA4fPI/Hm1wo/Po/4mopOdg==} - engines: {node: '>=14.18'} + rimraf@6.0.1: + resolution: {integrity: sha512-9dkvaxAsk/xNXSJzMgFqqMCuFgt2+KsOFek3TMLfo8NCPfWpBmqwyNn5Y+NX56QUYfCtsyhF3ayiboEoUmJk/A==} + engines: {node: 20 || >=22} hasBin: true - rollup@4.18.0: - resolution: {integrity: sha512-QmJz14PX3rzbJCN1SG4Xe/bAAX2a6NpCP8ab2vfu2GiUr8AQcr2nCV/oEO3yneFarB67zk8ShlIyWb2LGTb3Sg==} + rollup@4.21.2: + resolution: {integrity: sha512-e3TapAgYf9xjdLvKQCkQTnbTKd4a6jwlpQSJJFokHGaX2IVjoEqkIIhiQfqsi0cdwlOD+tQGuOd5AJkc5RngBw==} engines: {node: '>=18.0.0', npm: '>=8.0.0'} hasBin: true @@ -6416,8 +6155,8 @@ packages: safe-regex@1.1.0: resolution: {integrity: sha512-aJXcif4xnaNUzvUuC5gcb46oTS7zvg4jpMTnuqtrEPlR3vFr4pxtdTwaF1Qs3Enjn9HK+ZlwQui+a7z0SywIzg==} - safe-stable-stringify@2.4.3: - resolution: {integrity: sha512-e2bDA2WJT0wxseVd4lsDP4+3ONX6HpMXQa1ZhFQ7SU+GjvORCmShbCMltrtIDfkYhVHrOcPtj+KhmDBdPdZD1g==} + safe-stable-stringify@2.5.0: + resolution: {integrity: sha512-b3rppTKm9T+PsVCBEOUR46GWI7fdOs00VKZ1+9c1EWDaDMvjQc6tUwuFyIprgGgTcWoVHSKrU8H31ZHA2e0RHA==} engines: {node: '>=10'} safer-buffer@2.1.2: @@ -6426,13 +6165,8 @@ packages: sander@0.5.1: resolution: {integrity: sha512-3lVqBir7WuKDHGrKRDn/1Ye3kwpXaDOMsiRP1wd6wpZW56gJhsbp5RqQpA6JG/P+pkXizygnr1dKR8vzWaVsfA==} - sass@1.77.5: - resolution: {integrity: sha512-oDfX1mukIlxacPdQqNb6mV2tVCrnE+P3nVYioy72V5tlk56CPNcO4TCuFcaCRKKfJ1M3lH95CleRS+dVKL2qMg==} - engines: {node: '>=14.0.0'} - hasBin: true - - sass@1.77.6: - resolution: {integrity: sha512-ByXE1oLD79GVq9Ht1PeHWCPMPB8XHpBuz1r85oByKHjZY6qV6rWnQovQzXJXuQ/XyE1Oj3iPk3lo28uzaRA2/Q==} + sass@1.78.0: + resolution: {integrity: sha512-AaIqGSrjo5lA2Yg7RvFZrlXDBCp3nV4XP73GrLGvdRWWwk+8H3l0SDvq/5bA4eF+0RFPLuWUk3E+P1U/YqnpsQ==} engines: {node: '>=14.0.0'} hasBin: true @@ -6462,13 +6196,8 @@ packages: engines: {node: '>=10'} hasBin: true - semver@7.6.0: - resolution: {integrity: sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==} - engines: {node: '>=10'} - hasBin: true - - semver@7.6.2: - resolution: {integrity: sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==} + semver@7.6.3: + resolution: {integrity: sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==} engines: {node: '>=10'} hasBin: true @@ -6581,12 +6310,12 @@ packages: sort-object-keys@1.1.3: resolution: {integrity: sha512-855pvK+VkU7PaKYPc+Jjnmt4EzejQHyhhF33q31qG8x7maDzkeFhAAThdCYay11CISO+qAMwjOBP+fPZe0IPyg==} - sort-package-json@2.10.0: - resolution: {integrity: sha512-MYecfvObMwJjjJskhxYfuOADkXp1ZMMnCFC8yhp+9HDsk7HhR336hd7eiBs96lTXfiqmUNI+WQCeCMRBhl251g==} + sort-package-json@2.10.1: + resolution: {integrity: sha512-d76wfhgUuGypKqY72Unm5LFnMpACbdxXsLPcL27pOsSrmVqH3PztFp1uq+Z22suk15h7vXmTesuh2aEjdCqb5w==} hasBin: true - source-map-js@1.2.0: - resolution: {integrity: sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==} + source-map-js@1.2.1: + resolution: {integrity: sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==} engines: {node: '>=0.10.0'} source-map-resolve@0.5.3: @@ -6686,8 +6415,8 @@ packages: resolution: {integrity: sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==} engines: {node: '>=12'} - string-width@7.1.0: - resolution: {integrity: sha512-SEIJCWiX7Kg4c129n48aDRwLbFb2LJmXXFrWBG4NGaRtMQ3myKPKbwrD1BKqQn74oCoNMBVrfDEr5M9YxCsrkw==} + string-width@7.2.0: + resolution: {integrity: sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==} engines: {node: '>=18'} string.prototype.includes@2.0.0: @@ -6701,6 +6430,9 @@ packages: resolution: {integrity: sha512-DOB27b/2UTTD+4myKUFh+/fXWcu/UDyASIXfg+7VzoCNNGOfWvoyU/x5pvVHr++ztyt/oSYI1BcWBBG/hmlNjA==} engines: {node: '>= 0.4'} + string.prototype.repeat@1.0.0: + resolution: {integrity: sha512-0u/TldDbKD8bFCQ/4f5+mNRrXwZ8hg2w7ZR8wa16e8z9XpePWl3eGEcUD0OXpEH/VJH/2G3gjUtR3ZOiBe2S/w==} + string.prototype.trim@1.2.8: resolution: {integrity: sha512-lfjY4HcixfQXOfaqCvcBuOIapyaroTXhbkfJN3gcB1OtyupngWK4sEET9Knd0cXd28kTUqu/kHoV4HKSJdnjiQ==} engines: {node: '>= 0.4'} @@ -6816,8 +6548,8 @@ packages: peerDependencies: stylelint: ^14.0.0 || ^15.0.0 || ^16.0.1 - stylelint-prettier@5.0.0: - resolution: {integrity: sha512-RHfSlRJIsaVg5Br94gZVdWlz/rBTyQzZflNE6dXvSxt/GthWMY3gEHsWZEBaVGg7GM+XrtVSp4RznFlB7i0oyw==} + stylelint-prettier@5.0.2: + resolution: {integrity: sha512-qJ+BN+1T2ZcKz9WIrv0x+eFGHzSUnXfXd5gL///T6XoJvr3D8/ztzz2fhtmXef7Vb8P33zBXmLTTveByr0nwBw==} engines: {node: '>=18.12.0'} peerDependencies: prettier: '>=3.0.0' @@ -6829,8 +6561,8 @@ packages: peerDependencies: stylelint: ^16.0.2 - stylelint@16.6.1: - resolution: {integrity: sha512-yNgz2PqWLkhH2hw6X9AweV9YvoafbAD5ZsFdKN9BvSDVwGvPh+AUIrn7lYwy1S7IHmtFin75LLfX1m0D2tHu8Q==} + stylelint@16.9.0: + resolution: {integrity: sha512-31Nm3WjxGOBGpQqF43o3wO9L5AC36TPIe6030Lnm13H3vDMTcS21DrLh69bMX+DBilKqMMVLian4iG6ybBoNRQ==} engines: {node: '>=18.12.0'} hasBin: true @@ -6839,8 +6571,8 @@ packages: engines: {node: '>=6'} hasBin: true - stylis@4.3.2: - resolution: {integrity: sha512-bhtUjWd/z6ltJiQwg0dUfxEJ+W+jdqQd8TbWLWyeIJHlnsqmGLRFFd8e5mA0AZi/zx90smXRlN66YMTcaSFifg==} + stylis@4.3.4: + resolution: {integrity: sha512-osIBl6BGUmSfDkyH2mB7EFvCJntXDrLhKjHTRj/rK6xLH0yuPrHULDRQzKokSOD4VoorhtKpfcfW1GAntu8now==} stylus@0.63.0: resolution: {integrity: sha512-OMlgrTCPzE/ibtRMoeLVhOY0RcNuNWh0rhAVqeKnk/QwcuUKQbnqhZ1kg2vzD8VU/6h3FoPTq4RJPHgLBvX6Bw==} @@ -6872,19 +6604,19 @@ packages: resolution: {integrity: sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==} engines: {node: '>=10'} - supports-hyperlinks@3.0.0: - resolution: {integrity: sha512-QBDPHyPQDRTy9ku4URNGY5Lah8PAaXs6tAAwp55sL5WCsSW7GIfdf6W5ixfziW+t7wh3GVvHyHHyQ1ESsoRvaA==} + supports-hyperlinks@3.1.0: + resolution: {integrity: sha512-2rn0BZ+/f7puLOHZm1HOJfwBggfaHXUpPUSSG/SWM4TWp5KCfmNYwnC3hruy2rZlMnmWZ+QAGpZfchu3f3695A==} engines: {node: '>=14.18'} supports-preserve-symlinks-flag@1.0.0: resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} engines: {node: '>= 0.4'} - svelte-eslint-parser@0.39.2: - resolution: {integrity: sha512-87UwLuWTtDIuzWOhOi1zBL5wYVd07M5BK1qZ57YmXJB5/UmjUNJqGy3XSOhPqjckY1dATNV9y+mx+nI0WH6HPA==} + svelte-eslint-parser@0.41.0: + resolution: {integrity: sha512-L6f4hOL+AbgfBIB52Z310pg1d2QjRqm7wy3kI1W6hhdhX5bvu7+f0R6w4ykp5HoDdzq+vGhIJmsisaiJDGmVfA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: - svelte: ^3.37.0 || ^4.0.0 || ^5.0.0-next.115 + svelte: ^3.37.0 || ^4.0.0 || ^5.0.0-next.191 peerDependenciesMeta: svelte: optional: true @@ -6946,19 +6678,15 @@ packages: typescript: optional: true - svelte@4.2.18: - resolution: {integrity: sha512-d0FdzYIiAePqRJEb90WlJDkjUEx42xhivxN8muUBmfZnP+tzUgz12DJ2hRJi8sIHCME7jeK1PTMgKPSfTd8JrA==} + svelte@4.2.19: + resolution: {integrity: sha512-IY1rnGr6izd10B0A8LqsBfmlT5OILVuZ7XsI0vdGPEvuonFV7NYEUK4dAkm9Zg2q0Um92kYjTpS1CAP3Nh/KWw==} engines: {node: '>=16'} svg-tags@1.0.0: resolution: {integrity: sha512-ovssysQTa+luh7A5Weu3Rta6FJlFBBbInjOh722LIt6klpU2/HtdUbszju/G4devcvk8PGt7FCLv5wftu3THUA==} - synckit@0.8.8: - resolution: {integrity: sha512-HwOKAP7Wc5aRGYdKH+dw0PRRpbO841v2DENBtjnR5HFWoiNByAl7vrx3p0G/rCyYXQsrxqtX48TImFtPcIHSpQ==} - engines: {node: ^14.18.0 || >=16.0.0} - - synckit@0.9.0: - resolution: {integrity: sha512-7RnqIMq572L8PeEzKeBINYEJDDxpcH8JEgLwUqBd3TkofhFRbkq4QLR0u+36avGAhCRbk2nnmjcW9SE531hPDg==} + synckit@0.9.1: + resolution: {integrity: sha512-7gr8p9TQP6RAHusBOSLs46F4564ZrjV8xFmw5zCmgmhGUcw2hxsShhJ6CEiHQMgPDwAQ1fWHPM0ypc4RMAig4A==} engines: {node: ^14.18.0 || >=16.0.0} table@5.4.6: @@ -6998,16 +6726,13 @@ packages: thenify@3.3.1: resolution: {integrity: sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==} - throttle-debounce@5.0.0: - resolution: {integrity: sha512-2iQTSgkkc1Zyk0MeVrt/3BvuOXYPl/R8Z0U2xxo9rjwNciaHDG3R+Lm6dh4EeUci49DanvBnuqI6jshoQQRGEg==} + throttle-debounce@5.0.2: + resolution: {integrity: sha512-B71/4oyj61iNH0KeCamLuE2rmKuTO5byTOSVwECM5FA7TiAiAW+UqTKZ9ERueC4qvgSttUhdmq1mXC3kJqGX7A==} engines: {node: '>=12.22'} through@2.3.8: resolution: {integrity: sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==} - timers-ext@0.1.7: - resolution: {integrity: sha512-b85NUNzTSdodShTIbky6ZF02e8STtVVfD+fu4aXXShEELpozH+bCpJLYMPZbsABN2wDH7fJpqIoXxJpzbf0NqQ==} - timers-ext@0.1.8: resolution: {integrity: sha512-wFH7+SEAcKfJpfLPkrgMPvvwnEtj8W4IurvEyrKsDleXnKLCDw71w8jltvfLa8Rm4qQxxT4jmDBYbJG/z7qoww==} engines: {node: '>=0.12'} @@ -7015,6 +6740,9 @@ packages: tiny-glob@0.2.9: resolution: {integrity: sha512-g/55ssRPUjShh+xkfx9UPDXqhckHEsHr4Vd9zX55oSdGZc/MD0m3sferOkwWtp98bv+kcVfEHtRJgBVJzelrzg==} + tinyexec@0.3.0: + resolution: {integrity: sha512-tVGE0mVJPGb0chKhqmsoosjsS+qUnJVGJpZgsHYQcGoPlG3B51R3PouqTgEGH2Dc9jjFyOqOpix6ZHNMXp1FZg==} + tmp@0.0.33: resolution: {integrity: sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==} engines: {node: '>=0.6.0'} @@ -7106,11 +6834,11 @@ packages: tslib@2.6.2: resolution: {integrity: sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==} - tslib@2.6.3: - resolution: {integrity: sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==} + tslib@2.7.0: + resolution: {integrity: sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA==} - tsup@8.1.0: - resolution: {integrity: sha512-UFdfCAXukax+U6KzeTNO2kAARHcWxmKsnvSPXUcfA1D+kU05XDccCrkffCQpFaWDsZfV0jMyTsxU39VfCp6EOg==} + tsup@8.2.4: + resolution: {integrity: sha512-akpCPePnBnC/CXgRrcy72ZSntgIEUa1jN0oJbbvpALWKNOz1B7aM+UVDWGRGIO/T/PZugAESWDJUAb5FD48o8Q==} engines: {node: '>=18'} hasBin: true peerDependencies: @@ -7128,8 +6856,8 @@ packages: typescript: optional: true - tsx@4.15.7: - resolution: {integrity: sha512-u3H0iSFDZM3za+VxkZ1kywdCeHCn+8/qHQS1MNoO2sONDgD95HlWtt8aB23OzeTmFP9IU4/8bZUdg58Uu5J4cg==} + tsx@4.19.1: + resolution: {integrity: sha512-0flMz1lh74BR4wOvBjuh9olbnwqCPc35OOlfyzHba0Dc+QNUeWX/Gq2YTbnwcWPO3BMd8fkzRVrHcsR+a7z7rA==} engines: {node: '>=18.0.0'} hasBin: true @@ -7149,12 +6877,6 @@ packages: resolution: {integrity: sha512-MBh+PHUHHisjXf4tlx0CFWoMdjx8zCMLJHOjnV1prABYZFHqtFOyauCIK2/7w4oIfwkF8iNhLtnJEfVY2vn3iw==} engines: {node: '>=16'} - type@1.2.0: - resolution: {integrity: sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg==} - - type@2.7.2: - resolution: {integrity: sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw==} - type@2.7.3: resolution: {integrity: sha512-8j+1QmAbPvLZow5Qpi6NCaN8FB60p/6x8/vfNqOk/hC+HuvFZhL4+WfekuhQLiqFZXOgQdrs3B+XxEmCc6b3FQ==} @@ -7194,23 +6916,17 @@ packages: peerDependencies: typescript: '>=4.5.0' - typescript-eslint@7.14.1: - resolution: {integrity: sha512-Eo1X+Y0JgGPspcANKjeR6nIqXl4VL5ldXLc15k4m9upq+eY5fhU2IueiEZL6jmHrKH8aCfbIvM/v3IrX5Hg99w==} - engines: {node: ^18.18.0 || >=20.0.0} + typescript-eslint@8.5.0: + resolution: {integrity: sha512-uD+XxEoSIvqtm4KE97etm32Tn5MfaZWgWfMMREStLxR6JzvHkc2Tkj7zhTEK5XmtpTmKHNnG8Sot6qDfhHtR1Q==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: - eslint: ^8.56.0 typescript: '*' peerDependenciesMeta: typescript: optional: true - typescript-json-schema@0.64.0: - resolution: {integrity: sha512-Sew8llkYSzpxaMoGjpjD6NMFCr6DoWFHLs7Bz1LU48pzzi8ok8W+GZs9cG87IMBpC0UI7qwBMUI2um0LGxxLOg==} - hasBin: true - - typescript@5.1.6: - resolution: {integrity: sha512-zaWCozRZ6DLEWAWFrVDz1H6FVXzUSfTy5FUMWsQlU8Ym5JP9eO4xkTIROFCQvhQf61z6O/G6ugw3SgAnvvm+HA==} - engines: {node: '>=14.17'} + typescript-json-schema@0.65.1: + resolution: {integrity: sha512-tuGH7ff2jPaUYi6as3lHyHcKpSmXIqN7/mu50x3HlYn0EHzLpmt3nplZ7EuhUkO0eqDRc9GqWNkfjgBPIS9kxg==} hasBin: true typescript@5.4.2: @@ -7218,13 +6934,13 @@ packages: engines: {node: '>=14.17'} hasBin: true - typescript@5.4.5: - resolution: {integrity: sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==} + typescript@5.5.4: + resolution: {integrity: sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q==} engines: {node: '>=14.17'} hasBin: true - typescript@5.5.2: - resolution: {integrity: sha512-NcRtPEOsPFFWjobJEtfihkLCZCXZt/os3zf8nTxjVH3RvTSxjrCamJpbExGvYOF+tFHc3pA65qpdwPbzjohhew==} + typescript@5.6.2: + resolution: {integrity: sha512-NW8ByodCSNCwZeghjN3o+JX5OFH0Ojg6sadjEKY4huZ52TqbJTJnDo5+Tw98lSy63NZvi4n+ez5m2u5d4PkZyw==} engines: {node: '>=14.17'} hasBin: true @@ -7234,6 +6950,9 @@ packages: undici-types@5.26.5: resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==} + undici-types@6.19.8: + resolution: {integrity: sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==} + undici@5.28.3: resolution: {integrity: sha512-3ItfzbrhDlINjaP0duwnNsKpDQk3acHI3gVJ1z4fmwMK31k5G9OVIAMLSIaP6w4FaGkaAkN6zaQO9LUvZ1t7VA==} engines: {node: '>=14.0'} @@ -7314,8 +7033,8 @@ packages: peerDependencies: browserslist: '>= 4.21.0' - update-browserslist-db@1.0.16: - resolution: {integrity: sha512-KVbTxlBYlckhF5wgfyZXTWnMn7MMZjMu9XG8bPlliUOP9ThaF4QnhP8qrjrH7DRzHfSk0oQv1wToW+iA5GajEQ==} + update-browserslist-db@1.1.0: + resolution: {integrity: sha512-EdRAaAyk2cUE1wOf2DkEhzxqOQvFOoRJFNS6NeyJ01Gp2beMRpBAINjM2iDXE3KCuKhwnvHIQCJm6ThL2Z+HzQ==} hasBin: true peerDependencies: browserslist: '>= 4.21.0' @@ -7327,8 +7046,8 @@ packages: resolution: {integrity: sha512-Am1ousAhSLBeB9cG/7k7r2R0zj50uDRlZHPGbazid5s9rlF1F/QKYObEKSIunSjIOkJZqwRRLpvewjEkM7pSqg==} deprecated: Please see https://github.com/lydell/urix#deprecated - use-sync-external-store@1.2.0: - resolution: {integrity: sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA==} + use-sync-external-store@1.2.2: + resolution: {integrity: sha512-PElTlVMwpblvbNqQ82d2n6RjStvdSoNe9FG28kNfz3WiXilJm4DdNkEzRhCZuIDwY8U08WVihhGR5iRqAwfDiw==} peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 @@ -7349,10 +7068,6 @@ packages: validate-npm-package-license@3.0.4: resolution: {integrity: sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==} - validator@13.12.0: - resolution: {integrity: sha512-c1Q0mCiPlgdTVVVIJIrBuxNicYE+t/7oKeI9MWLj3fh/uq2Pxh/3eeWbVZ4OcGW1TUf53At0njHw5SMdA3tmMg==} - engines: {node: '>= 0.10'} - vfile-location@2.0.6: resolution: {integrity: sha512-sSFdyCP3G6Ka0CEmN83A2YCMKIieHx0EDaj5IDP4g1pa5ZJ4FJDvpO0WODLxo4LUX4oe52gmSCK7Jw4SBghqxA==} @@ -7368,26 +7083,11 @@ packages: vfile@3.0.1: resolution: {integrity: sha512-y7Y3gH9BsUSdD4KzHsuMaCzRjglXN0W2EcMf0gpvu6+SbsGhMje7xDc8AEoeXy6mIwCKMI6BkjMsRjzQbhMEjQ==} - vfile@6.0.1: - resolution: {integrity: sha512-1bYqc7pt6NIADBJ98UiG0Bn/CHIVOoZ/IyEkqIruLg0mE1BKzkOXY2D6CSqQIcKqgadppE5lrxgWXJmXd7zZJw==} - - vite-plugin-dts@3.9.1: - resolution: {integrity: sha512-rVp2KM9Ue22NGWB8dNtWEr+KekN3rIgz1tWD050QnRGlriUCmaDwa7qA5zDEjbXg5lAXhYMSBJtx3q3hQIJZSg==} - engines: {node: ^14.18.0 || >=16.0.0} - peerDependencies: - typescript: '*' - vite: '*' - peerDependenciesMeta: - vite: - optional: true - - vite-plugin-lib-inject-css@2.1.1: - resolution: {integrity: sha512-RIMeVnqBK/8I0E9nnQWzws6pdj5ilRMPJSnXYb6nWxNR4EmDPnksnb/ACoR5Fy7QfzULqS4gtQMrjwnNCC9zoA==} - peerDependencies: - vite: '*' + vfile@6.0.3: + resolution: {integrity: sha512-KzIbH/9tXat2u30jf+smMwFCsno4wHVdNmzFyL+T/L3UGqqk6JKfVqOFOZEpZSHADH1k40ab6NUIXZq422ov3Q==} - vite@5.2.13: - resolution: {integrity: sha512-SSq1noJfY9pR3I1TUENL3rQYDQCFqgD+lM6fTRAM8Nv6Lsg5hDLaXkjETVeBt+7vZBCMoibD+6IWnT2mJ+Zb/A==} + vite@5.4.4: + resolution: {integrity: sha512-RHFCkULitycHVTtelJ6jQLd+KSAAzOgEYorV32R2q++M6COBjKJR6BxqClwp5sf0XaBDjVMuJ9wnNfyAJwjMkA==} engines: {node: ^18.0.0 || >=20.0.0} hasBin: true peerDependencies: @@ -7395,6 +7095,7 @@ packages: less: '*' lightningcss: ^1.21.0 sass: '*' + sass-embedded: '*' stylus: '*' sugarss: '*' terser: ^5.4.0 @@ -7407,33 +7108,7 @@ packages: optional: true sass: optional: true - stylus: - optional: true - sugarss: - optional: true - terser: - optional: true - - vite@5.3.1: - resolution: {integrity: sha512-XBmSKRLXLxiaPYamLv3/hnP/KXDai1NDexN0FpkTaZXTfycHvkRHoenpgl/fvuK/kPbB6xAgoyiryAhQNxYmAQ==} - engines: {node: ^18.0.0 || >=20.0.0} - hasBin: true - peerDependencies: - '@types/node': ^18.0.0 || >=20.0.0 - less: '*' - lightningcss: ^1.21.0 - sass: '*' - stylus: '*' - sugarss: '*' - terser: ^5.4.0 - peerDependenciesMeta: - '@types/node': - optional: true - less: - optional: true - lightningcss: - optional: true - sass: + sass-embedded: optional: true stylus: optional: true @@ -7454,15 +7129,6 @@ packages: resolution: {integrity: sha512-Dhxzh5HZuiHQhbvTW9AMetFfBHDMYpo23Uo9btPXgdYP+3T5S+p+jgNy7spra+veYhBP2dCSgxR/i2Y02h5/6w==} engines: {node: '>=0.10.0'} - vue-template-compiler@2.7.16: - resolution: {integrity: sha512-AYbUWAJHLGGQM7+cNTELw+KsOG9nl2CnSv467WobS5Cv9uk3wFcnr1Etsz2sEIHEZvw1U+o9mRlEO6QbZvUPGQ==} - - vue-tsc@1.8.27: - resolution: {integrity: sha512-WesKCAZCRAbmmhuGl3+VrdWItEvfoFIPXOvUJkjULi+x+6G/Dy69yO3TBRJDr9eUlmsNAwVmxsNZxvHKzbkKdg==} - hasBin: true - peerDependencies: - typescript: '*' - wavesurfer.js@7.8.0: resolution: {integrity: sha512-V9SIfE08VtSIl1KYHi+i+52gytEIxk0nDKlV98fjrK0UW+z37ojImgsYINEV015syLB9sZVAXDdGI8F4xmU7KQ==} @@ -7488,18 +7154,14 @@ packages: which-boxed-primitive@1.0.2: resolution: {integrity: sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==} - which-builtin-type@1.1.3: - resolution: {integrity: sha512-YmjsSMDBYsM1CaFiayOVT06+KJeXf0o5M/CAd4o1lTadFAtacTUM49zoYxr/oroopFDfhvN6iEcBxUyc3gvKmw==} + which-builtin-type@1.1.4: + resolution: {integrity: sha512-bppkmBSsHFmIMSl8BO9TbsyzsvGjVoppt8xUiGzwiu/bhDCGxnpOKCxgqj6GuyHE0mINMDecBFPlOm2hzY084w==} engines: {node: '>= 0.4'} which-collection@1.0.2: resolution: {integrity: sha512-K4jVyjnBdgvc86Y6BkaLZEN933SwYOuBFkdmBu9ZfkcAbdVbpITnDmjvZ/aQjRXQrv5EPkTnD1s39GiiqbngCw==} engines: {node: '>= 0.4'} - which-pm@2.0.0: - resolution: {integrity: sha512-Lhs9Pmyph0p5n5Z3mVnN0yWcbQYUAD7rbQUiMsQxOJ3T57k7RFe35SUwWMf7dsbDZks1uOmw4AecB/JMDj3v/w==} - engines: {node: '>=8.15'} - which-typed-array@1.1.13: resolution: {integrity: sha512-P5Nra0qjSncduVPEAr7xhoF5guty49ArDTwzJ/yNuPIbZppyRxFQsRCWrocxIY+CnMVG+qfbU2FmDKyvSGClow==} engines: {node: '>= 0.4'} @@ -7596,8 +7258,8 @@ packages: resolution: {integrity: sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==} engines: {node: '>= 6'} - yaml@2.4.5: - resolution: {integrity: sha512-aBx2bnqDzVOyNKfsysjA2ms5ZlnjSAW2eG3/L5G/CSujfjLJTJsEw1bGw8kCf04KodQWk1pxlGnZ56CRxiawmg==} + yaml@2.5.1: + resolution: {integrity: sha512-bLQOjaX/ADgQ20isPJRvF0iRUHIxVhYvr53Of7wGcWlO2jvtUlH5m87DsmulFVxRpNLOnI4tB6p/oh8D7kpn9Q==} engines: {node: '>= 14'} hasBin: true @@ -7620,23 +7282,18 @@ packages: resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} engines: {node: '>=10'} - yocto-queue@1.0.0: - resolution: {integrity: sha512-9bnSc/HEW2uRy67wc+T8UwauLuPJVn28jb+GtJY16iiKWyvmYJRXVT4UamsAEGQfPohgr2q4Tq0sQbQlxTfi1g==} + yocto-queue@1.1.1: + resolution: {integrity: sha512-b4JR1PFR10y1mKjhHY9LaGo6tmrgjit7hxVIeAmyMw3jegXR4dhYqLaQF5zMXZxY7tLpMyJeLjr1C4rLmkVe8g==} engines: {node: '>=12.20'} yootils@0.3.1: resolution: {integrity: sha512-A7AMeJfGefk317I/3tBoUYRcDcNavKEkpiPN/nQsBz/viI2GvT7BtrqdPD6rGqBFN8Ax7v4obf+Cl32JF9DDVw==} - z-schema@5.0.5: - resolution: {integrity: sha512-D7eujBWkLa3p2sIpJA0d1pr7es+a7m0vFAnZLlCEKq/Ij2k0MLi9Br2UPxoxdYystm5K1yeBGzub0FlYUEWj2Q==} - engines: {node: '>=8.0.0'} - hasBin: true + zrender@5.6.0: + resolution: {integrity: sha512-uzgraf4njmmHAbEUxMJ8Oxg+P3fT04O+9p7gY+wJRVxo8Ge+KmYv0WJev945EH4wFuc4OY2NLXz46FZrWS9xJg==} - zrender@5.5.0: - resolution: {integrity: sha512-O3MilSi/9mwoovx77m6ROZM7sXShR/O/JIanvzTwjN3FORfLSr81PsUGd7jlaYOeds9d8tw82oP44+3YucVo+w==} - - zustand@4.5.2: - resolution: {integrity: sha512-2cN1tPkDVkwCy5ickKrI7vijSjPksFRfqS6237NzT0vqSsztTNnQdHw9mmN7uBdk3gceVXU0a+21jFzFzAc9+g==} + zustand@4.5.5: + resolution: {integrity: sha512-+0PALYNJNgK6hldkgDq2vLrw5f6g/jCInz52n9RTpropGgeAf/ioFUCdtsjCqu4gNhW9D01rUQBROoRjdzyn2Q==} engines: {node: '>=12.7.0'} peerDependencies: '@types/react': '>=16.8' @@ -7685,13 +7342,21 @@ snapshots: '@jridgewell/gen-mapping': 0.3.5 '@jridgewell/trace-mapping': 0.3.25 - '@ant-design/colors@7.0.2': + '@ant-design/colors@7.1.0': dependencies: '@ctrl/tinycolor': 3.6.1 - '@ant-design/cssinjs@1.21.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + '@ant-design/cssinjs-utils@1.0.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + dependencies: + '@ant-design/cssinjs': 1.21.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@babel/runtime': 7.25.6 + rc-util: 5.43.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + react: 18.3.1 + react-dom: 18.3.1(react@18.3.1) + + '@ant-design/cssinjs@1.21.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: - '@babel/runtime': 7.24.7 + '@babel/runtime': 7.25.6 '@emotion/hash': 0.8.0 '@emotion/unitless': 0.7.5 classnames: 2.5.1 @@ -7699,228 +7364,150 @@ snapshots: rc-util: 5.43.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) react: 18.3.1 react-dom: 18.3.1(react@18.3.1) - stylis: 4.3.2 + stylis: 4.3.4 + + '@ant-design/fast-color@2.0.6': + dependencies: + '@babel/runtime': 7.25.6 '@ant-design/icons-svg@4.4.2': {} - '@ant-design/icons@5.3.7(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + '@ant-design/icons@5.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: - '@ant-design/colors': 7.0.2 + '@ant-design/colors': 7.1.0 '@ant-design/icons-svg': 4.4.2 - '@babel/runtime': 7.24.5 + '@babel/runtime': 7.25.6 classnames: 2.5.1 - rc-util: 5.40.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + rc-util: 5.43.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) react: 18.3.1 react-dom: 18.3.1(react@18.3.1) '@ant-design/react-slick@1.1.2(react@18.3.1)': dependencies: - '@babel/runtime': 7.24.7 + '@babel/runtime': 7.25.6 classnames: 2.5.1 json2mq: 0.2.0 react: 18.3.1 resize-observer-polyfill: 1.5.1 - throttle-debounce: 5.0.0 - - '@ast-grep/napi-darwin-arm64@0.22.3': - optional: true - - '@ast-grep/napi-darwin-x64@0.22.3': - optional: true - - '@ast-grep/napi-linux-arm64-gnu@0.22.3': - optional: true - - '@ast-grep/napi-linux-x64-gnu@0.22.3': - optional: true - - '@ast-grep/napi-linux-x64-musl@0.22.3': - optional: true - - '@ast-grep/napi-win32-arm64-msvc@0.22.3': - optional: true - - '@ast-grep/napi-win32-ia32-msvc@0.22.3': - optional: true - - '@ast-grep/napi-win32-x64-msvc@0.22.3': - optional: true - - '@ast-grep/napi@0.22.3': - optionalDependencies: - '@ast-grep/napi-darwin-arm64': 0.22.3 - '@ast-grep/napi-darwin-x64': 0.22.3 - '@ast-grep/napi-linux-arm64-gnu': 0.22.3 - '@ast-grep/napi-linux-x64-gnu': 0.22.3 - '@ast-grep/napi-linux-x64-musl': 0.22.3 - '@ast-grep/napi-win32-arm64-msvc': 0.22.3 - '@ast-grep/napi-win32-ia32-msvc': 0.22.3 - '@ast-grep/napi-win32-x64-msvc': 0.22.3 - - '@babel/code-frame@7.24.2': - dependencies: - '@babel/highlight': 7.24.2 - picocolors: 1.0.1 + throttle-debounce: 5.0.2 '@babel/code-frame@7.24.7': dependencies: '@babel/highlight': 7.24.7 - picocolors: 1.0.1 + picocolors: 1.1.0 - '@babel/compat-data@7.24.7': {} + '@babel/compat-data@7.25.4': {} - '@babel/core@7.24.7': + '@babel/core@7.25.2': dependencies: '@ampproject/remapping': 2.3.0 '@babel/code-frame': 7.24.7 - '@babel/generator': 7.24.7 - '@babel/helper-compilation-targets': 7.24.7 - '@babel/helper-module-transforms': 7.24.7(@babel/core@7.24.7) - '@babel/helpers': 7.24.7 - '@babel/parser': 7.24.7 - '@babel/template': 7.24.7 - '@babel/traverse': 7.24.7 - '@babel/types': 7.24.7 + '@babel/generator': 7.25.6 + '@babel/helper-compilation-targets': 7.25.2 + '@babel/helper-module-transforms': 7.25.2(@babel/core@7.25.2) + '@babel/helpers': 7.25.6 + '@babel/parser': 7.25.6 + '@babel/template': 7.25.0 + '@babel/traverse': 7.25.6 + '@babel/types': 7.25.6 convert-source-map: 2.0.0 - debug: 4.3.5 + debug: 4.3.7 gensync: 1.0.0-beta.2 json5: 2.2.3 semver: 6.3.1 transitivePeerDependencies: - supports-color - '@babel/generator@7.24.7': + '@babel/generator@7.25.6': dependencies: - '@babel/types': 7.24.7 + '@babel/types': 7.25.6 '@jridgewell/gen-mapping': 0.3.5 '@jridgewell/trace-mapping': 0.3.25 jsesc: 2.5.2 - '@babel/helper-compilation-targets@7.24.7': + '@babel/helper-compilation-targets@7.25.2': dependencies: - '@babel/compat-data': 7.24.7 - '@babel/helper-validator-option': 7.24.7 - browserslist: 4.23.1 + '@babel/compat-data': 7.25.4 + '@babel/helper-validator-option': 7.24.8 + browserslist: 4.23.3 lru-cache: 5.1.1 semver: 6.3.1 - '@babel/helper-environment-visitor@7.24.7': - dependencies: - '@babel/types': 7.24.7 - - '@babel/helper-function-name@7.24.7': - dependencies: - '@babel/template': 7.24.7 - '@babel/types': 7.24.7 - - '@babel/helper-hoist-variables@7.24.7': - dependencies: - '@babel/types': 7.24.7 - '@babel/helper-module-imports@7.24.7': dependencies: - '@babel/traverse': 7.24.7 - '@babel/types': 7.24.7 + '@babel/traverse': 7.25.6 + '@babel/types': 7.25.6 transitivePeerDependencies: - supports-color - '@babel/helper-module-transforms@7.24.7(@babel/core@7.24.7)': + '@babel/helper-module-transforms@7.25.2(@babel/core@7.25.2)': dependencies: - '@babel/core': 7.24.7 - '@babel/helper-environment-visitor': 7.24.7 + '@babel/core': 7.25.2 '@babel/helper-module-imports': 7.24.7 '@babel/helper-simple-access': 7.24.7 - '@babel/helper-split-export-declaration': 7.24.7 '@babel/helper-validator-identifier': 7.24.7 + '@babel/traverse': 7.25.6 transitivePeerDependencies: - supports-color '@babel/helper-simple-access@7.24.7': dependencies: - '@babel/traverse': 7.24.7 - '@babel/types': 7.24.7 + '@babel/traverse': 7.25.6 + '@babel/types': 7.25.6 transitivePeerDependencies: - supports-color - '@babel/helper-split-export-declaration@7.24.7': - dependencies: - '@babel/types': 7.24.7 - - '@babel/helper-string-parser@7.24.7': {} - - '@babel/helper-validator-identifier@7.22.20': {} + '@babel/helper-string-parser@7.24.8': {} '@babel/helper-validator-identifier@7.24.7': {} - '@babel/helper-validator-option@7.24.7': {} + '@babel/helper-validator-option@7.24.8': {} - '@babel/helpers@7.24.7': + '@babel/helpers@7.25.6': dependencies: - '@babel/template': 7.24.7 - '@babel/types': 7.24.7 - - '@babel/highlight@7.24.2': - dependencies: - '@babel/helper-validator-identifier': 7.22.20 - chalk: 2.4.2 - js-tokens: 4.0.0 - picocolors: 1.0.1 + '@babel/template': 7.25.0 + '@babel/types': 7.25.6 '@babel/highlight@7.24.7': dependencies: '@babel/helper-validator-identifier': 7.24.7 chalk: 2.4.2 js-tokens: 4.0.0 - picocolors: 1.0.1 + picocolors: 1.1.0 '@babel/parser@7.23.5': dependencies: - '@babel/types': 7.24.7 + '@babel/types': 7.25.6 - '@babel/parser@7.24.5': + '@babel/parser@7.25.6': dependencies: - '@babel/types': 7.24.7 - - '@babel/parser@7.24.7': - dependencies: - '@babel/types': 7.24.7 - - '@babel/runtime@7.24.4': - dependencies: - regenerator-runtime: 0.14.1 - - '@babel/runtime@7.24.5': - dependencies: - regenerator-runtime: 0.14.1 + '@babel/types': 7.25.6 - '@babel/runtime@7.24.7': + '@babel/runtime@7.25.6': dependencies: regenerator-runtime: 0.14.1 - '@babel/template@7.24.7': + '@babel/template@7.25.0': dependencies: '@babel/code-frame': 7.24.7 - '@babel/parser': 7.24.7 - '@babel/types': 7.24.7 + '@babel/parser': 7.25.6 + '@babel/types': 7.25.6 - '@babel/traverse@7.24.7': + '@babel/traverse@7.25.6': dependencies: '@babel/code-frame': 7.24.7 - '@babel/generator': 7.24.7 - '@babel/helper-environment-visitor': 7.24.7 - '@babel/helper-function-name': 7.24.7 - '@babel/helper-hoist-variables': 7.24.7 - '@babel/helper-split-export-declaration': 7.24.7 - '@babel/parser': 7.24.7 - '@babel/types': 7.24.7 - debug: 4.3.5 + '@babel/generator': 7.25.6 + '@babel/parser': 7.25.6 + '@babel/template': 7.25.0 + '@babel/types': 7.25.6 + debug: 4.3.7 globals: 11.12.0 transitivePeerDependencies: - supports-color - '@babel/types@7.24.7': + '@babel/types@7.25.6': dependencies: - '@babel/helper-string-parser': 7.24.7 + '@babel/helper-string-parser': 7.24.8 '@babel/helper-validator-identifier': 7.24.7 to-fast-properties: 2.0.0 @@ -7932,13 +7519,12 @@ snapshots: dependencies: statuses: 2.0.1 - '@changesets/apply-release-plan@7.0.3': + '@changesets/apply-release-plan@7.0.5': dependencies: - '@babel/runtime': 7.24.7 - '@changesets/config': 3.0.1 + '@changesets/config': 3.0.3 '@changesets/get-version-range-type': 0.4.0 - '@changesets/git': 3.0.0 - '@changesets/should-skip-package': 0.1.0 + '@changesets/git': 3.0.1 + '@changesets/should-skip-package': 0.1.1 '@changesets/types': 6.0.0 '@manypkg/get-packages': 1.1.3 detect-indent: 6.1.0 @@ -7947,78 +7533,74 @@ snapshots: outdent: 0.5.0 prettier: 2.8.8 resolve-from: 5.0.0 - semver: 7.6.2 + semver: 7.6.3 - '@changesets/assemble-release-plan@6.0.2': + '@changesets/assemble-release-plan@6.0.4': dependencies: - '@babel/runtime': 7.24.7 '@changesets/errors': 0.2.0 - '@changesets/get-dependents-graph': 2.1.0 - '@changesets/should-skip-package': 0.1.0 + '@changesets/get-dependents-graph': 2.1.2 + '@changesets/should-skip-package': 0.1.1 '@changesets/types': 6.0.0 '@manypkg/get-packages': 1.1.3 - semver: 7.6.2 + semver: 7.6.3 '@changesets/changelog-git@0.2.0': dependencies: '@changesets/types': 6.0.0 - '@changesets/cli@2.27.6': + '@changesets/cli@2.27.8': dependencies: - '@babel/runtime': 7.24.7 - '@changesets/apply-release-plan': 7.0.3 - '@changesets/assemble-release-plan': 6.0.2 + '@changesets/apply-release-plan': 7.0.5 + '@changesets/assemble-release-plan': 6.0.4 '@changesets/changelog-git': 0.2.0 - '@changesets/config': 3.0.1 + '@changesets/config': 3.0.3 '@changesets/errors': 0.2.0 - '@changesets/get-dependents-graph': 2.1.0 - '@changesets/get-release-plan': 4.0.2 - '@changesets/git': 3.0.0 - '@changesets/logger': 0.1.0 - '@changesets/pre': 2.0.0 - '@changesets/read': 0.6.0 - '@changesets/should-skip-package': 0.1.0 + '@changesets/get-dependents-graph': 2.1.2 + '@changesets/get-release-plan': 4.0.4 + '@changesets/git': 3.0.1 + '@changesets/logger': 0.1.1 + '@changesets/pre': 2.0.1 + '@changesets/read': 0.6.1 + '@changesets/should-skip-package': 0.1.1 '@changesets/types': 6.0.0 - '@changesets/write': 0.3.1 + '@changesets/write': 0.3.2 '@manypkg/get-packages': 1.1.3 '@types/semver': 7.5.8 ansi-colors: 4.1.3 - chalk: 2.4.2 ci-info: 3.9.0 enquirer: 2.4.1 external-editor: 3.1.0 fs-extra: 7.0.1 - human-id: 1.0.2 mri: 1.2.0 outdent: 0.5.0 p-limit: 2.3.0 - preferred-pm: 3.1.3 + package-manager-detector: 0.2.0 + picocolors: 1.1.0 resolve-from: 5.0.0 - semver: 7.6.2 + semver: 7.6.3 spawndamnit: 2.0.0 term-size: 2.2.1 - '@changesets/config@3.0.1': + '@changesets/config@3.0.3': dependencies: '@changesets/errors': 0.2.0 - '@changesets/get-dependents-graph': 2.1.0 - '@changesets/logger': 0.1.0 + '@changesets/get-dependents-graph': 2.1.2 + '@changesets/logger': 0.1.1 '@changesets/types': 6.0.0 '@manypkg/get-packages': 1.1.3 fs-extra: 7.0.1 - micromatch: 4.0.7 + micromatch: 4.0.8 '@changesets/errors@0.2.0': dependencies: extendable-error: 0.1.7 - '@changesets/get-dependents-graph@2.1.0': + '@changesets/get-dependents-graph@2.1.2': dependencies: '@changesets/types': 6.0.0 '@manypkg/get-packages': 1.1.3 - chalk: 2.4.2 - fs-extra: 7.0.1 - semver: 7.6.2 + picocolors: 1.1.0 + semver: 7.6.3 '@changesets/get-github-info@0.6.0': dependencies: @@ -8027,59 +7609,53 @@ snapshots: transitivePeerDependencies: - encoding - '@changesets/get-release-plan@4.0.2': + '@changesets/get-release-plan@4.0.4': dependencies: - '@babel/runtime': 7.24.7 - '@changesets/assemble-release-plan': 6.0.2 - '@changesets/config': 3.0.1 - '@changesets/pre': 2.0.0 - '@changesets/read': 0.6.0 + '@changesets/assemble-release-plan': 6.0.4 + '@changesets/config': 3.0.3 + '@changesets/pre': 2.0.1 + '@changesets/read': 0.6.1 '@changesets/types': 6.0.0 '@manypkg/get-packages': 1.1.3 '@changesets/get-version-range-type@0.4.0': {} - '@changesets/git@3.0.0': + '@changesets/git@3.0.1': dependencies: - '@babel/runtime': 7.24.7 '@changesets/errors': 0.2.0 - '@changesets/types': 6.0.0 '@manypkg/get-packages': 1.1.3 is-subdir: 1.2.0 - micromatch: 4.0.7 + micromatch: 4.0.8 spawndamnit: 2.0.0 - '@changesets/logger@0.1.0': + '@changesets/logger@0.1.1': dependencies: - chalk: 2.4.2 + picocolors: 1.1.0 '@changesets/parse@0.4.0': dependencies: '@changesets/types': 6.0.0 js-yaml: 3.14.1 - '@changesets/pre@2.0.0': + '@changesets/pre@2.0.1': dependencies: - '@babel/runtime': 7.24.7 '@changesets/errors': 0.2.0 '@changesets/types': 6.0.0 '@manypkg/get-packages': 1.1.3 fs-extra: 7.0.1 - '@changesets/read@0.6.0': + '@changesets/read@0.6.1': dependencies: - '@babel/runtime': 7.24.7 - '@changesets/git': 3.0.0 - '@changesets/logger': 0.1.0 + '@changesets/git': 3.0.1 + '@changesets/logger': 0.1.1 '@changesets/parse': 0.4.0 '@changesets/types': 6.0.0 - chalk: 2.4.2 fs-extra: 7.0.1 p-filter: 2.1.0 + picocolors: 1.1.0 - '@changesets/should-skip-package@0.1.0': + '@changesets/should-skip-package@0.1.1': dependencies: - '@babel/runtime': 7.24.7 '@changesets/types': 6.0.0 '@manypkg/get-packages': 1.1.3 @@ -8087,74 +7663,73 @@ snapshots: '@changesets/types@6.0.0': {} - '@changesets/write@0.3.1': + '@changesets/write@0.3.2': dependencies: - '@babel/runtime': 7.24.7 '@changesets/types': 6.0.0 fs-extra: 7.0.1 human-id: 1.0.2 prettier: 2.8.8 - '@commitlint/cli@19.3.0(@types/node@20.14.9)(typescript@5.5.2)': + '@commitlint/cli@19.5.0(@types/node@22.5.4)(typescript@5.6.2)': dependencies: - '@commitlint/format': 19.3.0 - '@commitlint/lint': 19.2.2 - '@commitlint/load': 19.2.0(@types/node@20.14.9)(typescript@5.5.2) - '@commitlint/read': 19.2.1 - '@commitlint/types': 19.0.3 - execa: 8.0.1 + '@commitlint/format': 19.5.0 + '@commitlint/lint': 19.5.0 + '@commitlint/load': 19.5.0(@types/node@22.5.4)(typescript@5.6.2) + '@commitlint/read': 19.5.0 + '@commitlint/types': 19.5.0 + tinyexec: 0.3.0 yargs: 17.7.2 transitivePeerDependencies: - '@types/node' - typescript - '@commitlint/config-conventional@19.2.2': + '@commitlint/config-conventional@19.5.0': dependencies: - '@commitlint/types': 19.0.3 + '@commitlint/types': 19.5.0 conventional-changelog-conventionalcommits: 7.0.2 - '@commitlint/config-validator@19.0.3': + '@commitlint/config-validator@19.5.0': dependencies: - '@commitlint/types': 19.0.3 - ajv: 8.16.0 + '@commitlint/types': 19.5.0 + ajv: 8.17.1 - '@commitlint/ensure@19.0.3': + '@commitlint/ensure@19.5.0': dependencies: - '@commitlint/types': 19.0.3 + '@commitlint/types': 19.5.0 lodash.camelcase: 4.3.0 lodash.kebabcase: 4.1.1 lodash.snakecase: 4.1.1 lodash.startcase: 4.4.0 lodash.upperfirst: 4.3.1 - '@commitlint/execute-rule@19.0.0': {} + '@commitlint/execute-rule@19.5.0': {} - '@commitlint/format@19.3.0': + '@commitlint/format@19.5.0': dependencies: - '@commitlint/types': 19.0.3 + '@commitlint/types': 19.5.0 chalk: 5.3.0 - '@commitlint/is-ignored@19.2.2': + '@commitlint/is-ignored@19.5.0': dependencies: - '@commitlint/types': 19.0.3 - semver: 7.6.0 + '@commitlint/types': 19.5.0 + semver: 7.6.3 - '@commitlint/lint@19.2.2': + '@commitlint/lint@19.5.0': dependencies: - '@commitlint/is-ignored': 19.2.2 - '@commitlint/parse': 19.0.3 - '@commitlint/rules': 19.0.3 - '@commitlint/types': 19.0.3 + '@commitlint/is-ignored': 19.5.0 + '@commitlint/parse': 19.5.0 + '@commitlint/rules': 19.5.0 + '@commitlint/types': 19.5.0 - '@commitlint/load@19.2.0(@types/node@20.14.9)(typescript@5.5.2)': + '@commitlint/load@19.5.0(@types/node@22.5.4)(typescript@5.6.2)': dependencies: - '@commitlint/config-validator': 19.0.3 - '@commitlint/execute-rule': 19.0.0 - '@commitlint/resolve-extends': 19.1.0 - '@commitlint/types': 19.0.3 + '@commitlint/config-validator': 19.5.0 + '@commitlint/execute-rule': 19.5.0 + '@commitlint/resolve-extends': 19.5.0 + '@commitlint/types': 19.5.0 chalk: 5.3.0 - cosmiconfig: 9.0.0(typescript@5.5.2) - cosmiconfig-typescript-loader: 5.0.0(@types/node@20.14.9)(cosmiconfig@9.0.0(typescript@5.5.2))(typescript@5.5.2) + cosmiconfig: 9.0.0(typescript@5.6.2) + cosmiconfig-typescript-loader: 5.0.0(@types/node@22.5.4)(cosmiconfig@9.0.0(typescript@5.6.2))(typescript@5.6.2) lodash.isplainobject: 4.0.6 lodash.merge: 4.6.2 lodash.uniq: 4.5.0 @@ -8162,46 +7737,45 @@ snapshots: - '@types/node' - typescript - '@commitlint/message@19.0.0': {} + '@commitlint/message@19.5.0': {} - '@commitlint/parse@19.0.3': + '@commitlint/parse@19.5.0': dependencies: - '@commitlint/types': 19.0.3 + '@commitlint/types': 19.5.0 conventional-changelog-angular: 7.0.0 conventional-commits-parser: 5.0.0 - '@commitlint/read@19.2.1': + '@commitlint/read@19.5.0': dependencies: - '@commitlint/top-level': 19.0.0 - '@commitlint/types': 19.0.3 - execa: 8.0.1 + '@commitlint/top-level': 19.5.0 + '@commitlint/types': 19.5.0 git-raw-commits: 4.0.0 minimist: 1.2.8 + tinyexec: 0.3.0 - '@commitlint/resolve-extends@19.1.0': + '@commitlint/resolve-extends@19.5.0': dependencies: - '@commitlint/config-validator': 19.0.3 - '@commitlint/types': 19.0.3 + '@commitlint/config-validator': 19.5.0 + '@commitlint/types': 19.5.0 global-directory: 4.0.1 - import-meta-resolve: 4.0.0 + import-meta-resolve: 4.1.0 lodash.mergewith: 4.6.2 resolve-from: 5.0.0 - '@commitlint/rules@19.0.3': + '@commitlint/rules@19.5.0': dependencies: - '@commitlint/ensure': 19.0.3 - '@commitlint/message': 19.0.0 - '@commitlint/to-lines': 19.0.0 - '@commitlint/types': 19.0.3 - execa: 8.0.1 + '@commitlint/ensure': 19.5.0 + '@commitlint/message': 19.5.0 + '@commitlint/to-lines': 19.5.0 + '@commitlint/types': 19.5.0 - '@commitlint/to-lines@19.0.0': {} + '@commitlint/to-lines@19.5.0': {} - '@commitlint/top-level@19.0.0': + '@commitlint/top-level@19.5.0': dependencies: find-up: 7.0.0 - '@commitlint/types@19.0.3': + '@commitlint/types@19.5.0': dependencies: '@types/conventional-commits-parser': 5.0.0 chalk: 5.3.0 @@ -8210,20 +7784,20 @@ snapshots: dependencies: '@jridgewell/trace-mapping': 0.3.9 - '@csstools/css-parser-algorithms@2.6.3(@csstools/css-tokenizer@2.3.1)': + '@csstools/css-parser-algorithms@3.0.1(@csstools/css-tokenizer@3.0.1)': dependencies: - '@csstools/css-tokenizer': 2.3.1 + '@csstools/css-tokenizer': 3.0.1 - '@csstools/css-tokenizer@2.3.1': {} + '@csstools/css-tokenizer@3.0.1': {} - '@csstools/media-query-list-parser@2.1.11(@csstools/css-parser-algorithms@2.6.3(@csstools/css-tokenizer@2.3.1))(@csstools/css-tokenizer@2.3.1)': + '@csstools/media-query-list-parser@3.0.1(@csstools/css-parser-algorithms@3.0.1(@csstools/css-tokenizer@3.0.1))(@csstools/css-tokenizer@3.0.1)': dependencies: - '@csstools/css-parser-algorithms': 2.6.3(@csstools/css-tokenizer@2.3.1) - '@csstools/css-tokenizer': 2.3.1 + '@csstools/css-parser-algorithms': 3.0.1(@csstools/css-tokenizer@3.0.1) + '@csstools/css-tokenizer': 3.0.1 - '@csstools/selector-specificity@3.1.1(postcss-selector-parser@6.1.0)': + '@csstools/selector-specificity@4.0.0(postcss-selector-parser@6.1.2)': dependencies: - postcss-selector-parser: 6.1.0 + postcss-selector-parser: 6.1.2 '@ctrl/tinycolor@3.6.1': {} @@ -8233,298 +7807,232 @@ snapshots: '@emotion/unitless@0.7.5': {} - '@esbuild/aix-ppc64@0.19.10': - optional: true - '@esbuild/aix-ppc64@0.19.12': optional: true - '@esbuild/aix-ppc64@0.20.2': - optional: true - '@esbuild/aix-ppc64@0.21.5': optional: true - '@esbuild/android-arm64@0.19.10': + '@esbuild/aix-ppc64@0.23.1': optional: true '@esbuild/android-arm64@0.19.12': optional: true - '@esbuild/android-arm64@0.20.2': - optional: true - '@esbuild/android-arm64@0.21.5': optional: true - '@esbuild/android-arm@0.19.10': + '@esbuild/android-arm64@0.23.1': optional: true '@esbuild/android-arm@0.19.12': optional: true - '@esbuild/android-arm@0.20.2': - optional: true - '@esbuild/android-arm@0.21.5': optional: true - '@esbuild/android-x64@0.19.10': + '@esbuild/android-arm@0.23.1': optional: true '@esbuild/android-x64@0.19.12': optional: true - '@esbuild/android-x64@0.20.2': - optional: true - '@esbuild/android-x64@0.21.5': optional: true - '@esbuild/darwin-arm64@0.19.10': + '@esbuild/android-x64@0.23.1': optional: true '@esbuild/darwin-arm64@0.19.12': optional: true - '@esbuild/darwin-arm64@0.20.2': - optional: true - '@esbuild/darwin-arm64@0.21.5': optional: true - '@esbuild/darwin-x64@0.19.10': + '@esbuild/darwin-arm64@0.23.1': optional: true '@esbuild/darwin-x64@0.19.12': optional: true - '@esbuild/darwin-x64@0.20.2': - optional: true - '@esbuild/darwin-x64@0.21.5': optional: true - '@esbuild/freebsd-arm64@0.19.10': + '@esbuild/darwin-x64@0.23.1': optional: true '@esbuild/freebsd-arm64@0.19.12': optional: true - '@esbuild/freebsd-arm64@0.20.2': - optional: true - '@esbuild/freebsd-arm64@0.21.5': optional: true - '@esbuild/freebsd-x64@0.19.10': + '@esbuild/freebsd-arm64@0.23.1': optional: true '@esbuild/freebsd-x64@0.19.12': optional: true - '@esbuild/freebsd-x64@0.20.2': - optional: true - '@esbuild/freebsd-x64@0.21.5': optional: true - '@esbuild/linux-arm64@0.19.10': + '@esbuild/freebsd-x64@0.23.1': optional: true '@esbuild/linux-arm64@0.19.12': optional: true - '@esbuild/linux-arm64@0.20.2': - optional: true - '@esbuild/linux-arm64@0.21.5': optional: true - '@esbuild/linux-arm@0.19.10': + '@esbuild/linux-arm64@0.23.1': optional: true '@esbuild/linux-arm@0.19.12': optional: true - '@esbuild/linux-arm@0.20.2': - optional: true - '@esbuild/linux-arm@0.21.5': optional: true - '@esbuild/linux-ia32@0.19.10': + '@esbuild/linux-arm@0.23.1': optional: true '@esbuild/linux-ia32@0.19.12': optional: true - '@esbuild/linux-ia32@0.20.2': - optional: true - '@esbuild/linux-ia32@0.21.5': optional: true - '@esbuild/linux-loong64@0.14.54': + '@esbuild/linux-ia32@0.23.1': optional: true - '@esbuild/linux-loong64@0.19.10': + '@esbuild/linux-loong64@0.14.54': optional: true '@esbuild/linux-loong64@0.19.12': optional: true - '@esbuild/linux-loong64@0.20.2': - optional: true - '@esbuild/linux-loong64@0.21.5': optional: true - '@esbuild/linux-mips64el@0.19.10': + '@esbuild/linux-loong64@0.23.1': optional: true '@esbuild/linux-mips64el@0.19.12': optional: true - '@esbuild/linux-mips64el@0.20.2': - optional: true - '@esbuild/linux-mips64el@0.21.5': optional: true - '@esbuild/linux-ppc64@0.19.10': + '@esbuild/linux-mips64el@0.23.1': optional: true '@esbuild/linux-ppc64@0.19.12': optional: true - '@esbuild/linux-ppc64@0.20.2': - optional: true - '@esbuild/linux-ppc64@0.21.5': optional: true - '@esbuild/linux-riscv64@0.19.10': + '@esbuild/linux-ppc64@0.23.1': optional: true '@esbuild/linux-riscv64@0.19.12': optional: true - '@esbuild/linux-riscv64@0.20.2': - optional: true - '@esbuild/linux-riscv64@0.21.5': optional: true - '@esbuild/linux-s390x@0.19.10': + '@esbuild/linux-riscv64@0.23.1': optional: true '@esbuild/linux-s390x@0.19.12': optional: true - '@esbuild/linux-s390x@0.20.2': - optional: true - '@esbuild/linux-s390x@0.21.5': optional: true - '@esbuild/linux-x64@0.19.10': + '@esbuild/linux-s390x@0.23.1': optional: true '@esbuild/linux-x64@0.19.12': optional: true - '@esbuild/linux-x64@0.20.2': - optional: true - '@esbuild/linux-x64@0.21.5': optional: true - '@esbuild/netbsd-x64@0.19.10': + '@esbuild/linux-x64@0.23.1': optional: true '@esbuild/netbsd-x64@0.19.12': optional: true - '@esbuild/netbsd-x64@0.20.2': - optional: true - '@esbuild/netbsd-x64@0.21.5': optional: true - '@esbuild/openbsd-x64@0.19.10': + '@esbuild/netbsd-x64@0.23.1': optional: true - '@esbuild/openbsd-x64@0.19.12': + '@esbuild/openbsd-arm64@0.23.1': optional: true - '@esbuild/openbsd-x64@0.20.2': + '@esbuild/openbsd-x64@0.19.12': optional: true '@esbuild/openbsd-x64@0.21.5': optional: true - '@esbuild/sunos-x64@0.19.10': + '@esbuild/openbsd-x64@0.23.1': optional: true '@esbuild/sunos-x64@0.19.12': optional: true - '@esbuild/sunos-x64@0.20.2': - optional: true - '@esbuild/sunos-x64@0.21.5': optional: true - '@esbuild/win32-arm64@0.19.10': + '@esbuild/sunos-x64@0.23.1': optional: true '@esbuild/win32-arm64@0.19.12': optional: true - '@esbuild/win32-arm64@0.20.2': - optional: true - '@esbuild/win32-arm64@0.21.5': optional: true - '@esbuild/win32-ia32@0.19.10': + '@esbuild/win32-arm64@0.23.1': optional: true '@esbuild/win32-ia32@0.19.12': optional: true - '@esbuild/win32-ia32@0.20.2': - optional: true - '@esbuild/win32-ia32@0.21.5': optional: true - '@esbuild/win32-x64@0.19.10': + '@esbuild/win32-ia32@0.23.1': optional: true '@esbuild/win32-x64@0.19.12': optional: true - '@esbuild/win32-x64@0.20.2': + '@esbuild/win32-x64@0.21.5': optional: true - '@esbuild/win32-x64@0.21.5': + '@esbuild/win32-x64@0.23.1': optional: true - '@eslint-community/eslint-utils@4.4.0(eslint@9.5.0)': + '@eslint-community/eslint-utils@4.4.0(eslint@9.10.0(jiti@1.21.6))': dependencies: - eslint: 9.5.0 + eslint: 9.10.0(jiti@1.21.6) eslint-visitor-keys: 3.4.3 - '@eslint-community/regexpp@4.10.1': {} + '@eslint-community/regexpp@4.11.0': {} - '@eslint/compat@1.1.0': {} + '@eslint/compat@1.1.1': {} - '@eslint/config-array@0.16.0': + '@eslint/config-array@0.18.0': dependencies: '@eslint/object-schema': 2.1.4 - debug: 4.3.5 + debug: 4.3.7 minimatch: 3.1.2 transitivePeerDependencies: - supports-color @@ -8532,10 +8040,10 @@ snapshots: '@eslint/eslintrc@3.1.0': dependencies: ajv: 6.12.6 - debug: 4.3.5 + debug: 4.3.7 espree: 10.1.0 globals: 14.0.0 - ignore: 5.3.1 + ignore: 5.3.2 import-fresh: 3.3.0 js-yaml: 4.1.0 minimatch: 3.1.2 @@ -8543,139 +8051,123 @@ snapshots: transitivePeerDependencies: - supports-color - '@eslint/js@9.5.0': {} + '@eslint/js@9.10.0': {} '@eslint/object-schema@2.1.4': {} + '@eslint/plugin-kit@0.1.0': + dependencies: + levn: 0.4.1 + '@fastify/busboy@2.1.1': {} '@formatjs/ecma402-abstract@1.11.4': dependencies: '@formatjs/intl-localematcher': 0.2.25 - tslib: 2.6.3 + tslib: 2.7.0 '@formatjs/ecma402-abstract@1.18.0': dependencies: '@formatjs/intl-localematcher': 0.5.2 - tslib: 2.6.3 + tslib: 2.7.0 '@formatjs/fast-memoize@1.2.1': dependencies: - tslib: 2.6.3 + tslib: 2.7.0 '@formatjs/fast-memoize@2.2.0': dependencies: - tslib: 2.6.3 + tslib: 2.7.0 '@formatjs/icu-messageformat-parser@2.1.0': dependencies: '@formatjs/ecma402-abstract': 1.11.4 '@formatjs/icu-skeleton-parser': 1.3.6 - tslib: 2.6.3 + tslib: 2.7.0 '@formatjs/icu-messageformat-parser@2.7.3': dependencies: '@formatjs/ecma402-abstract': 1.18.0 '@formatjs/icu-skeleton-parser': 1.7.0 - tslib: 2.6.3 + tslib: 2.7.0 '@formatjs/icu-skeleton-parser@1.3.6': dependencies: '@formatjs/ecma402-abstract': 1.11.4 - tslib: 2.6.3 + tslib: 2.7.0 '@formatjs/icu-skeleton-parser@1.7.0': dependencies: '@formatjs/ecma402-abstract': 1.18.0 - tslib: 2.6.3 + tslib: 2.7.0 '@formatjs/intl-localematcher@0.2.25': dependencies: - tslib: 2.6.3 + tslib: 2.7.0 '@formatjs/intl-localematcher@0.5.2': dependencies: - tslib: 2.6.3 + tslib: 2.7.0 - '@gradio/atoms@0.7.4(svelte@4.2.18)': + '@gradio/atoms@0.7.4(svelte@4.2.19)': dependencies: '@gradio/icons': 0.4.1 - '@gradio/utils': 0.4.2(svelte@4.2.18) + '@gradio/utils': 0.4.2(svelte@4.2.19) transitivePeerDependencies: - svelte - '@gradio/button@0.2.43(svelte@4.2.18)': + '@gradio/atoms@0.8.1(svelte@4.2.19)': dependencies: - '@gradio/client': 1.1.1 - '@gradio/upload': 0.11.2(svelte@4.2.18) - '@gradio/utils': 0.4.2(svelte@4.2.18) + '@gradio/icons': 0.7.2(svelte@4.2.19) + '@gradio/utils': 0.6.1(svelte@4.2.19) + svelte: 4.2.19 + + '@gradio/button@0.2.43(svelte@4.2.19)': + dependencies: + '@gradio/client': 1.5.2 + '@gradio/upload': 0.11.2(svelte@4.2.19) + '@gradio/utils': 0.4.2(svelte@4.2.19) transitivePeerDependencies: - svelte - utf-8-validate - '@gradio/client@1.1.1': + '@gradio/client@1.5.2': dependencies: '@types/eventsource': 1.1.15 bufferutil: 4.0.8 eventsource: 2.0.2 fetch-event-stream: 0.1.5 - msw: 2.3.1(typescript@5.4.5) + msw: 2.3.1(typescript@5.6.2) semiver: 1.1.0 textlinestream: 1.1.1 - typescript: 5.4.5 + typescript: 5.6.2 ws: 8.17.0(bufferutil@4.0.8) transitivePeerDependencies: - - utf-8-validate - - '@gradio/icons@0.4.1': {} - - '@gradio/preview@0.9.1(@babel/core@7.24.7)(@types/node@16.18.101)(less@4.2.0)(postcss-load-config@4.0.2(postcss@8.4.38))(postcss@8.4.38)(rollup@4.18.0)(svelte@4.2.18)': - dependencies: - '@originjs/vite-plugin-commonjs': 1.0.3 - '@rollup/plugin-sucrase': 5.0.2(rollup@4.18.0) - '@sveltejs/vite-plugin-svelte': 3.1.1(svelte@4.2.18)(vite@5.2.13(@types/node@16.18.101)(less@4.2.0)(lightningcss@1.25.1)(sass@1.77.5)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.38))) - '@types/which': 3.0.4 - coffeescript: 2.7.0 - lightningcss: 1.25.1 - pug: 3.0.3 - sass: 1.77.5 - stylus: 0.63.0 - sucrase: 3.35.0 - sugarss: 4.0.1(postcss@8.4.38) - svelte-hmr: 0.16.0(svelte@4.2.18) - svelte-preprocess: 5.1.4(@babel/core@7.24.7)(coffeescript@2.7.0)(less@4.2.0)(postcss-load-config@4.0.2(postcss@8.4.38))(postcss@8.4.38)(pug@3.0.3)(sass@1.77.5)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.38))(svelte@4.2.18)(typescript@5.4.5) - typescript: 5.4.5 - vite: 5.2.13(@types/node@16.18.101)(less@4.2.0)(lightningcss@1.25.1)(sass@1.77.5)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.38)) - which: 4.0.0 - yootils: 0.3.1 - transitivePeerDependencies: - - '@babel/core' - - '@types/node' - - less - - postcss - - postcss-load-config - - rollup - - supports-color - - svelte - - terser + - utf-8-validate + + '@gradio/icons@0.4.1': {} - '@gradio/preview@0.9.1(@babel/core@7.24.7)(@types/node@20.14.9)(less@4.2.0)(postcss-load-config@4.0.2(postcss@8.4.38))(postcss@8.4.38)(rollup@4.18.0)(svelte@4.2.18)': + '@gradio/icons@0.7.2(svelte@4.2.19)': + dependencies: + svelte: 4.2.19 + + '@gradio/preview@0.10.1(@babel/core@7.25.2)(@types/node@18.19.50)(less@4.2.0)(postcss-load-config@3.1.4(postcss@8.4.45)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@18.19.50)(typescript@5.5.4)))(postcss@8.4.45)(rollup@4.21.2)(svelte@4.2.19)': dependencies: '@originjs/vite-plugin-commonjs': 1.0.3 - '@rollup/plugin-sucrase': 5.0.2(rollup@4.18.0) - '@sveltejs/vite-plugin-svelte': 3.1.1(svelte@4.2.18)(vite@5.2.13(@types/node@20.14.9)(less@4.2.0)(lightningcss@1.25.1)(sass@1.77.5)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.38))) + '@rollup/plugin-sucrase': 5.0.2(rollup@4.21.2) + '@sveltejs/vite-plugin-svelte': 3.1.1(svelte@4.2.19)(vite@5.4.4(@types/node@18.19.50)(less@4.2.0)(lightningcss@1.27.0)(sass@1.78.0)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.45))) '@types/which': 3.0.4 coffeescript: 2.7.0 - lightningcss: 1.25.1 + lightningcss: 1.27.0 pug: 3.0.3 - sass: 1.77.5 + sass: 1.78.0 stylus: 0.63.0 sucrase: 3.35.0 - sugarss: 4.0.1(postcss@8.4.38) - svelte-hmr: 0.16.0(svelte@4.2.18) - svelte-preprocess: 5.1.4(@babel/core@7.24.7)(coffeescript@2.7.0)(less@4.2.0)(postcss-load-config@4.0.2(postcss@8.4.38))(postcss@8.4.38)(pug@3.0.3)(sass@1.77.5)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.38))(svelte@4.2.18)(typescript@5.4.5) - typescript: 5.4.5 - vite: 5.2.13(@types/node@20.14.9)(less@4.2.0)(lightningcss@1.25.1)(sass@1.77.5)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.38)) + sugarss: 4.0.1(postcss@8.4.45) + svelte-hmr: 0.16.0(svelte@4.2.19) + svelte-preprocess: 5.1.4(@babel/core@7.25.2)(coffeescript@2.7.0)(less@4.2.0)(postcss-load-config@3.1.4(postcss@8.4.45)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@18.19.50)(typescript@5.5.4)))(postcss@8.4.45)(pug@3.0.3)(sass@1.78.0)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.45))(svelte@4.2.19)(typescript@5.6.2) + typescript: 5.6.2 + vite: 5.4.4(@types/node@18.19.50)(less@4.2.0)(lightningcss@1.27.0)(sass@1.78.0)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.45)) which: 4.0.0 yootils: 0.3.1 transitivePeerDependencies: @@ -8685,35 +8177,46 @@ snapshots: - postcss - postcss-load-config - rollup + - sass-embedded - supports-color - svelte - terser - '@gradio/statustracker@0.6.0(svelte@4.2.18)': + '@gradio/statustracker@0.7.6(svelte@4.2.19)': dependencies: - '@gradio/atoms': 0.7.4(svelte@4.2.18) - '@gradio/icons': 0.4.1 - '@gradio/utils': 0.4.2(svelte@4.2.18) - transitivePeerDependencies: - - svelte + '@gradio/atoms': 0.8.1(svelte@4.2.19) + '@gradio/icons': 0.7.2(svelte@4.2.19) + '@gradio/utils': 0.6.1(svelte@4.2.19) + '@types/dompurify': 3.0.5 + dompurify: 3.1.6 + svelte: 4.2.19 - '@gradio/theme@0.2.3': {} + '@gradio/theme@0.2.5(svelte@4.2.19)': + dependencies: + svelte: 4.2.19 - '@gradio/upload@0.11.2(svelte@4.2.18)': + '@gradio/upload@0.11.2(svelte@4.2.19)': dependencies: - '@gradio/atoms': 0.7.4(svelte@4.2.18) - '@gradio/client': 1.1.1 + '@gradio/atoms': 0.7.4(svelte@4.2.19) + '@gradio/client': 1.5.2 '@gradio/icons': 0.4.1 - '@gradio/utils': 0.4.2(svelte@4.2.18) + '@gradio/utils': 0.4.2(svelte@4.2.19) '@gradio/wasm': 0.10.1 transitivePeerDependencies: - svelte - utf-8-validate - '@gradio/utils@0.4.2(svelte@4.2.18)': + '@gradio/utils@0.4.2(svelte@4.2.19)': + dependencies: + '@gradio/theme': 0.2.5(svelte@4.2.19) + svelte-i18n: 3.7.4(svelte@4.2.19) + transitivePeerDependencies: + - svelte + + '@gradio/utils@0.6.1(svelte@4.2.19)': dependencies: - '@gradio/theme': 0.2.3 - svelte-i18n: 3.7.4(svelte@4.2.18) + '@gradio/theme': 0.2.5(svelte@4.2.19) + svelte-i18n: 3.7.4(svelte@4.2.19) transitivePeerDependencies: - svelte @@ -8736,7 +8239,7 @@ snapshots: '@inquirer/figures': 1.0.3 '@inquirer/type': 1.3.3 '@types/mute-stream': 0.0.4 - '@types/node': 20.14.9 + '@types/node': 20.16.5 '@types/wrap-ansi': 3.0.0 ansi-escapes: 4.3.2 chalk: 4.1.2 @@ -8772,6 +8275,8 @@ snapshots: '@jridgewell/sourcemap-codec@1.4.15': {} + '@jridgewell/sourcemap-codec@1.5.0': {} + '@jridgewell/trace-mapping@0.3.25': dependencies: '@jridgewell/resolve-uri': 3.1.2 @@ -8780,41 +8285,38 @@ snapshots: '@jridgewell/trace-mapping@0.3.9': dependencies: '@jridgewell/resolve-uri': 3.1.2 - '@jridgewell/sourcemap-codec': 1.4.15 + '@jridgewell/sourcemap-codec': 1.5.0 '@manypkg/find-root@1.1.0': dependencies: - '@babel/runtime': 7.24.7 + '@babel/runtime': 7.25.6 '@types/node': 12.20.55 find-up: 4.1.0 fs-extra: 8.1.0 - '@manypkg/find-root@2.2.1': + '@manypkg/find-root@2.2.3': dependencies: - '@manypkg/tools': 1.1.0 - find-up: 4.1.0 - fs-extra: 8.1.0 + '@manypkg/tools': 1.1.2 '@manypkg/get-packages@1.1.3': dependencies: - '@babel/runtime': 7.24.7 + '@babel/runtime': 7.25.6 '@changesets/types': 4.1.0 '@manypkg/find-root': 1.1.0 fs-extra: 8.1.0 globby: 11.1.0 read-yaml-file: 1.1.0 - '@manypkg/get-packages@2.2.1': + '@manypkg/get-packages@2.2.2': dependencies: - '@manypkg/find-root': 2.2.1 - '@manypkg/tools': 1.1.0 + '@manypkg/find-root': 2.2.3 + '@manypkg/tools': 1.1.2 - '@manypkg/tools@1.1.0': + '@manypkg/tools@1.1.2': dependencies: - fs-extra: 8.1.0 - globby: 11.1.0 + fast-glob: 3.3.2 jju: 1.4.0 - read-yaml-file: 1.1.0 + js-yaml: 4.1.0 '@mapbox/node-pre-gyp@1.0.11': dependencies: @@ -8825,57 +8327,31 @@ snapshots: nopt: 5.0.0 npmlog: 5.0.1 rimraf: 3.0.2 - semver: 7.6.2 + semver: 7.6.3 tar: 6.2.0 transitivePeerDependencies: - encoding - supports-color optional: true - '@microsoft/api-extractor-model@7.28.13(@types/node@20.14.9)': - dependencies: - '@microsoft/tsdoc': 0.14.2 - '@microsoft/tsdoc-config': 0.16.2 - '@rushstack/node-core-library': 4.0.2(@types/node@20.14.9) - transitivePeerDependencies: - - '@types/node' - - '@microsoft/api-extractor-model@7.29.2(@types/node@20.14.9)': + '@microsoft/api-extractor-model@7.29.8(@types/node@22.5.4)': dependencies: '@microsoft/tsdoc': 0.15.0 '@microsoft/tsdoc-config': 0.17.0 - '@rushstack/node-core-library': 5.4.1(@types/node@20.14.9) + '@rushstack/node-core-library': 5.9.0(@types/node@22.5.4) transitivePeerDependencies: - '@types/node' optional: true - '@microsoft/api-extractor@7.43.0(@types/node@20.14.9)': - dependencies: - '@microsoft/api-extractor-model': 7.28.13(@types/node@20.14.9) - '@microsoft/tsdoc': 0.14.2 - '@microsoft/tsdoc-config': 0.16.2 - '@rushstack/node-core-library': 4.0.2(@types/node@20.14.9) - '@rushstack/rig-package': 0.5.2 - '@rushstack/terminal': 0.10.0(@types/node@20.14.9) - '@rushstack/ts-command-line': 4.19.1(@types/node@20.14.9) - lodash: 4.17.21 - minimatch: 3.0.8 - resolve: 1.22.8 - semver: 7.5.4 - source-map: 0.6.1 - typescript: 5.4.2 - transitivePeerDependencies: - - '@types/node' - - '@microsoft/api-extractor@7.47.0(@types/node@20.14.9)': + '@microsoft/api-extractor@7.47.9(@types/node@22.5.4)': dependencies: - '@microsoft/api-extractor-model': 7.29.2(@types/node@20.14.9) + '@microsoft/api-extractor-model': 7.29.8(@types/node@22.5.4) '@microsoft/tsdoc': 0.15.0 '@microsoft/tsdoc-config': 0.17.0 - '@rushstack/node-core-library': 5.4.1(@types/node@20.14.9) - '@rushstack/rig-package': 0.5.2 - '@rushstack/terminal': 0.13.0(@types/node@20.14.9) - '@rushstack/ts-command-line': 4.22.0(@types/node@20.14.9) + '@rushstack/node-core-library': 5.9.0(@types/node@22.5.4) + '@rushstack/rig-package': 0.5.3 + '@rushstack/terminal': 0.14.2(@types/node@22.5.4) + '@rushstack/ts-command-line': 4.22.8(@types/node@22.5.4) lodash: 4.17.21 minimatch: 3.0.8 resolve: 1.22.8 @@ -8886,13 +8362,6 @@ snapshots: - '@types/node' optional: true - '@microsoft/tsdoc-config@0.16.2': - dependencies: - '@microsoft/tsdoc': 0.14.2 - ajv: 6.12.6 - jju: 1.4.0 - resolve: 1.19.0 - '@microsoft/tsdoc-config@0.17.0': dependencies: '@microsoft/tsdoc': 0.15.0 @@ -8901,8 +8370,6 @@ snapshots: resolve: 1.22.8 optional: true - '@microsoft/tsdoc@0.14.2': {} - '@microsoft/tsdoc@0.15.0': optional: true @@ -8934,7 +8401,9 @@ snapshots: '@nodelib/fs.walk@1.2.8': dependencies: '@nodelib/fs.scandir': 2.1.5 - fastq: 1.15.0 + fastq: 1.17.1 + + '@nolyfill/is-core-module@1.0.39': {} '@octokit/auth-token@4.0.0': {} @@ -9008,12 +8477,12 @@ snapshots: '@rc-component/async-validator@5.0.4': dependencies: - '@babel/runtime': 7.24.7 + '@babel/runtime': 7.25.6 - '@rc-component/color-picker@1.5.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + '@rc-component/color-picker@2.0.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: - '@babel/runtime': 7.24.7 - '@ctrl/tinycolor': 3.6.1 + '@ant-design/fast-color': 2.0.6 + '@babel/runtime': 7.25.6 classnames: 2.5.1 rc-util: 5.43.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) react: 18.3.1 @@ -9021,18 +8490,18 @@ snapshots: '@rc-component/context@1.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: - '@babel/runtime': 7.24.7 + '@babel/runtime': 7.25.6 rc-util: 5.43.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) react: 18.3.1 react-dom: 18.3.1(react@18.3.1) '@rc-component/mini-decimal@1.1.0': dependencies: - '@babel/runtime': 7.24.7 + '@babel/runtime': 7.25.6 '@rc-component/mutate-observer@1.1.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: - '@babel/runtime': 7.24.7 + '@babel/runtime': 7.25.6 classnames: 2.5.1 rc-util: 5.43.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) react: 18.3.1 @@ -9040,25 +8509,33 @@ snapshots: '@rc-component/portal@1.1.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: - '@babel/runtime': 7.24.7 + '@babel/runtime': 7.25.6 + classnames: 2.5.1 + rc-util: 5.43.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + react: 18.3.1 + react-dom: 18.3.1(react@18.3.1) + + '@rc-component/qrcode@1.0.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + dependencies: + '@babel/runtime': 7.25.6 classnames: 2.5.1 rc-util: 5.43.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) react: 18.3.1 react-dom: 18.3.1(react@18.3.1) - '@rc-component/tour@1.15.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + '@rc-component/tour@1.15.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: - '@babel/runtime': 7.24.7 + '@babel/runtime': 7.25.6 '@rc-component/portal': 1.1.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@rc-component/trigger': 2.2.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@rc-component/trigger': 2.2.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1) classnames: 2.5.1 rc-util: 5.43.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) react: 18.3.1 react-dom: 18.3.1(react@18.3.1) - '@rc-component/trigger@2.2.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + '@rc-component/trigger@2.2.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: - '@babel/runtime': 7.24.7 + '@babel/runtime': 7.25.6 '@rc-component/portal': 1.1.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1) classnames: 2.5.1 rc-motion: 2.9.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1) @@ -9067,81 +8544,72 @@ snapshots: react: 18.3.1 react-dom: 18.3.1(react@18.3.1) - '@rollup/plugin-sucrase@5.0.2(rollup@4.18.0)': + '@rollup/plugin-sucrase@5.0.2(rollup@4.21.2)': dependencies: - '@rollup/pluginutils': 5.1.0(rollup@4.18.0) + '@rollup/pluginutils': 5.1.0(rollup@4.21.2) sucrase: 3.35.0 optionalDependencies: - rollup: 4.18.0 + rollup: 4.21.2 - '@rollup/pluginutils@5.1.0(rollup@4.18.0)': + '@rollup/pluginutils@5.1.0(rollup@4.21.2)': dependencies: '@types/estree': 1.0.5 estree-walker: 2.0.2 picomatch: 2.3.1 optionalDependencies: - rollup: 4.18.0 + rollup: 4.21.2 - '@rollup/rollup-android-arm-eabi@4.18.0': + '@rollup/rollup-android-arm-eabi@4.21.2': optional: true - '@rollup/rollup-android-arm64@4.18.0': + '@rollup/rollup-android-arm64@4.21.2': optional: true - '@rollup/rollup-darwin-arm64@4.18.0': + '@rollup/rollup-darwin-arm64@4.21.2': optional: true - '@rollup/rollup-darwin-x64@4.18.0': + '@rollup/rollup-darwin-x64@4.21.2': optional: true - '@rollup/rollup-linux-arm-gnueabihf@4.18.0': + '@rollup/rollup-linux-arm-gnueabihf@4.21.2': optional: true - '@rollup/rollup-linux-arm-musleabihf@4.18.0': + '@rollup/rollup-linux-arm-musleabihf@4.21.2': optional: true - '@rollup/rollup-linux-arm64-gnu@4.18.0': + '@rollup/rollup-linux-arm64-gnu@4.21.2': optional: true - '@rollup/rollup-linux-arm64-musl@4.18.0': + '@rollup/rollup-linux-arm64-musl@4.21.2': optional: true - '@rollup/rollup-linux-powerpc64le-gnu@4.18.0': + '@rollup/rollup-linux-powerpc64le-gnu@4.21.2': optional: true - '@rollup/rollup-linux-riscv64-gnu@4.18.0': + '@rollup/rollup-linux-riscv64-gnu@4.21.2': optional: true - '@rollup/rollup-linux-s390x-gnu@4.18.0': + '@rollup/rollup-linux-s390x-gnu@4.21.2': optional: true - '@rollup/rollup-linux-x64-gnu@4.18.0': + '@rollup/rollup-linux-x64-gnu@4.21.2': optional: true - '@rollup/rollup-linux-x64-musl@4.18.0': + '@rollup/rollup-linux-x64-musl@4.21.2': optional: true - '@rollup/rollup-win32-arm64-msvc@4.18.0': + '@rollup/rollup-win32-arm64-msvc@4.21.2': optional: true - '@rollup/rollup-win32-ia32-msvc@4.18.0': + '@rollup/rollup-win32-ia32-msvc@4.21.2': optional: true - '@rollup/rollup-win32-x64-msvc@4.18.0': + '@rollup/rollup-win32-x64-msvc@4.21.2': optional: true - '@rushstack/node-core-library@4.0.2(@types/node@20.14.9)': - dependencies: - fs-extra: 7.0.1 - import-lazy: 4.0.0 - jju: 1.4.0 - resolve: 1.22.8 - semver: 7.5.4 - z-schema: 5.0.5 - optionalDependencies: - '@types/node': 20.14.9 + '@rtsao/scc@1.1.0': {} - '@rushstack/node-core-library@5.4.1(@types/node@20.14.9)': + '@rushstack/node-core-library@5.9.0(@types/node@22.5.4)': dependencies: ajv: 8.13.0 ajv-draft-04: 1.0.0(ajv@8.13.0) @@ -9152,41 +8620,26 @@ snapshots: resolve: 1.22.8 semver: 7.5.4 optionalDependencies: - '@types/node': 20.14.9 + '@types/node': 22.5.4 optional: true - '@rushstack/rig-package@0.5.2': + '@rushstack/rig-package@0.5.3': dependencies: resolve: 1.22.8 strip-json-comments: 3.1.1 + optional: true - '@rushstack/terminal@0.10.0(@types/node@20.14.9)': - dependencies: - '@rushstack/node-core-library': 4.0.2(@types/node@20.14.9) - supports-color: 8.1.1 - optionalDependencies: - '@types/node': 20.14.9 - - '@rushstack/terminal@0.13.0(@types/node@20.14.9)': + '@rushstack/terminal@0.14.2(@types/node@22.5.4)': dependencies: - '@rushstack/node-core-library': 5.4.1(@types/node@20.14.9) + '@rushstack/node-core-library': 5.9.0(@types/node@22.5.4) supports-color: 8.1.1 optionalDependencies: - '@types/node': 20.14.9 + '@types/node': 22.5.4 optional: true - '@rushstack/ts-command-line@4.19.1(@types/node@20.14.9)': - dependencies: - '@rushstack/terminal': 0.10.0(@types/node@20.14.9) - '@types/argparse': 1.0.38 - argparse: 1.0.10 - string-argv: 0.3.2 - transitivePeerDependencies: - - '@types/node' - - '@rushstack/ts-command-line@4.22.0(@types/node@20.14.9)': + '@rushstack/ts-command-line@4.22.8(@types/node@22.5.4)': dependencies: - '@rushstack/terminal': 0.13.0(@types/node@20.14.9) + '@rushstack/terminal': 0.14.2(@types/node@22.5.4) '@types/argparse': 1.0.38 argparse: 1.0.10 string-argv: 0.3.2 @@ -9194,137 +8647,114 @@ snapshots: - '@types/node' optional: true - '@subscribe-kit/core@2.1.1(typescript@5.5.2)': + '@subscribe-kit/core@2.1.1(typescript@5.6.2)': dependencies: - '@babel/runtime': 7.24.4 - '@subscribe-kit/shared': 2.1.1(typescript@5.5.2) - immer: 10.0.4 - types-kit: 0.0.11(typescript@5.5.2) + '@babel/runtime': 7.25.6 + '@subscribe-kit/shared': 2.1.1(typescript@5.6.2) + immer: 10.1.1 + types-kit: 0.0.11(typescript@5.6.2) transitivePeerDependencies: - typescript - '@subscribe-kit/react@2.1.1(@subscribe-kit/core@2.1.1(typescript@5.5.2))(react@18.3.1)(typescript@5.5.2)': + '@subscribe-kit/react@2.1.1(@subscribe-kit/core@2.1.1(typescript@5.6.2))(react@18.3.1)(typescript@5.6.2)': dependencies: - '@babel/runtime': 7.24.4 - '@subscribe-kit/core': 2.1.1(typescript@5.5.2) - '@subscribe-kit/shared': 2.1.1(typescript@5.5.2) + '@babel/runtime': 7.25.6 + '@subscribe-kit/core': 2.1.1(typescript@5.6.2) + '@subscribe-kit/shared': 2.1.1(typescript@5.6.2) lodash: 4.17.21 react: 18.3.1 - use-sync-external-store: 1.2.0(react@18.3.1) + use-sync-external-store: 1.2.2(react@18.3.1) transitivePeerDependencies: - typescript - '@subscribe-kit/shared@2.1.1(typescript@5.5.2)': + '@subscribe-kit/shared@2.1.1(typescript@5.6.2)': dependencies: - '@babel/runtime': 7.24.4 - types-kit: 0.0.11(typescript@5.5.2) + '@babel/runtime': 7.25.6 + types-kit: 0.0.11(typescript@5.6.2) transitivePeerDependencies: - typescript - '@sveltejs/vite-plugin-svelte-inspector@2.1.0(@sveltejs/vite-plugin-svelte@3.1.1(svelte@4.2.18)(vite@5.2.13(@types/node@16.18.101)(less@4.2.0)(lightningcss@1.25.1)(sass@1.77.5)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.38))))(svelte@4.2.18)(vite@5.2.13(@types/node@16.18.101)(less@4.2.0)(lightningcss@1.25.1)(sass@1.77.5)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.38)))': - dependencies: - '@sveltejs/vite-plugin-svelte': 3.1.1(svelte@4.2.18)(vite@5.2.13(@types/node@16.18.101)(less@4.2.0)(lightningcss@1.25.1)(sass@1.77.5)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.38))) - debug: 4.3.5 - svelte: 4.2.18 - vite: 5.2.13(@types/node@16.18.101)(less@4.2.0)(lightningcss@1.25.1)(sass@1.77.5)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.38)) - transitivePeerDependencies: - - supports-color - - '@sveltejs/vite-plugin-svelte-inspector@2.1.0(@sveltejs/vite-plugin-svelte@3.1.1(svelte@4.2.18)(vite@5.2.13(@types/node@20.14.9)(less@4.2.0)(lightningcss@1.25.1)(sass@1.77.5)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.38))))(svelte@4.2.18)(vite@5.2.13(@types/node@20.14.9)(less@4.2.0)(lightningcss@1.25.1)(sass@1.77.5)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.38)))': - dependencies: - '@sveltejs/vite-plugin-svelte': 3.1.1(svelte@4.2.18)(vite@5.2.13(@types/node@20.14.9)(less@4.2.0)(lightningcss@1.25.1)(sass@1.77.5)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.38))) - debug: 4.3.5 - svelte: 4.2.18 - vite: 5.2.13(@types/node@20.14.9)(less@4.2.0)(lightningcss@1.25.1)(sass@1.77.5)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.38)) - transitivePeerDependencies: - - supports-color - - '@sveltejs/vite-plugin-svelte@3.1.1(svelte@4.2.18)(vite@5.2.13(@types/node@16.18.101)(less@4.2.0)(lightningcss@1.25.1)(sass@1.77.5)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.38)))': + '@sveltejs/vite-plugin-svelte-inspector@2.1.0(@sveltejs/vite-plugin-svelte@3.1.1(svelte@4.2.19)(vite@5.4.4(@types/node@18.19.50)(less@4.2.0)(lightningcss@1.27.0)(sass@1.78.0)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.45))))(svelte@4.2.19)(vite@5.4.4(@types/node@18.19.50)(less@4.2.0)(lightningcss@1.27.0)(sass@1.78.0)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.45)))': dependencies: - '@sveltejs/vite-plugin-svelte-inspector': 2.1.0(@sveltejs/vite-plugin-svelte@3.1.1(svelte@4.2.18)(vite@5.2.13(@types/node@16.18.101)(less@4.2.0)(lightningcss@1.25.1)(sass@1.77.5)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.38))))(svelte@4.2.18)(vite@5.2.13(@types/node@16.18.101)(less@4.2.0)(lightningcss@1.25.1)(sass@1.77.5)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.38))) - debug: 4.3.5 - deepmerge: 4.3.1 - kleur: 4.1.5 - magic-string: 0.30.10 - svelte: 4.2.18 - svelte-hmr: 0.16.0(svelte@4.2.18) - vite: 5.2.13(@types/node@16.18.101)(less@4.2.0)(lightningcss@1.25.1)(sass@1.77.5)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.38)) - vitefu: 0.2.5(vite@5.2.13(@types/node@16.18.101)(less@4.2.0)(lightningcss@1.25.1)(sass@1.77.5)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.38))) + '@sveltejs/vite-plugin-svelte': 3.1.1(svelte@4.2.19)(vite@5.4.4(@types/node@18.19.50)(less@4.2.0)(lightningcss@1.27.0)(sass@1.78.0)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.45))) + debug: 4.3.7 + svelte: 4.2.19 + vite: 5.4.4(@types/node@18.19.50)(less@4.2.0)(lightningcss@1.27.0)(sass@1.78.0)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.45)) transitivePeerDependencies: - supports-color - '@sveltejs/vite-plugin-svelte@3.1.1(svelte@4.2.18)(vite@5.2.13(@types/node@20.14.9)(less@4.2.0)(lightningcss@1.25.1)(sass@1.77.5)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.38)))': + '@sveltejs/vite-plugin-svelte@3.1.1(svelte@4.2.19)(vite@5.4.4(@types/node@18.19.50)(less@4.2.0)(lightningcss@1.27.0)(sass@1.78.0)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.45)))': dependencies: - '@sveltejs/vite-plugin-svelte-inspector': 2.1.0(@sveltejs/vite-plugin-svelte@3.1.1(svelte@4.2.18)(vite@5.2.13(@types/node@20.14.9)(less@4.2.0)(lightningcss@1.25.1)(sass@1.77.5)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.38))))(svelte@4.2.18)(vite@5.2.13(@types/node@20.14.9)(less@4.2.0)(lightningcss@1.25.1)(sass@1.77.5)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.38))) - debug: 4.3.5 + '@sveltejs/vite-plugin-svelte-inspector': 2.1.0(@sveltejs/vite-plugin-svelte@3.1.1(svelte@4.2.19)(vite@5.4.4(@types/node@18.19.50)(less@4.2.0)(lightningcss@1.27.0)(sass@1.78.0)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.45))))(svelte@4.2.19)(vite@5.4.4(@types/node@18.19.50)(less@4.2.0)(lightningcss@1.27.0)(sass@1.78.0)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.45))) + debug: 4.3.7 deepmerge: 4.3.1 kleur: 4.1.5 magic-string: 0.30.10 - svelte: 4.2.18 - svelte-hmr: 0.16.0(svelte@4.2.18) - vite: 5.2.13(@types/node@20.14.9)(less@4.2.0)(lightningcss@1.25.1)(sass@1.77.5)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.38)) - vitefu: 0.2.5(vite@5.2.13(@types/node@20.14.9)(less@4.2.0)(lightningcss@1.25.1)(sass@1.77.5)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.38))) + svelte: 4.2.19 + svelte-hmr: 0.16.0(svelte@4.2.19) + vite: 5.4.4(@types/node@18.19.50)(less@4.2.0)(lightningcss@1.27.0)(sass@1.78.0)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.45)) + vitefu: 0.2.5(vite@5.4.4(@types/node@18.19.50)(less@4.2.0)(lightningcss@1.27.0)(sass@1.78.0)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.45))) transitivePeerDependencies: - supports-color '@swc/core-darwin-arm64@1.5.29': optional: true - '@swc/core-darwin-arm64@1.6.5': + '@swc/core-darwin-arm64@1.7.26': optional: true '@swc/core-darwin-x64@1.5.29': optional: true - '@swc/core-darwin-x64@1.6.5': + '@swc/core-darwin-x64@1.7.26': optional: true '@swc/core-linux-arm-gnueabihf@1.5.29': optional: true - '@swc/core-linux-arm-gnueabihf@1.6.5': + '@swc/core-linux-arm-gnueabihf@1.7.26': optional: true '@swc/core-linux-arm64-gnu@1.5.29': optional: true - '@swc/core-linux-arm64-gnu@1.6.5': + '@swc/core-linux-arm64-gnu@1.7.26': optional: true '@swc/core-linux-arm64-musl@1.5.29': optional: true - '@swc/core-linux-arm64-musl@1.6.5': + '@swc/core-linux-arm64-musl@1.7.26': optional: true '@swc/core-linux-x64-gnu@1.5.29': optional: true - '@swc/core-linux-x64-gnu@1.6.5': + '@swc/core-linux-x64-gnu@1.7.26': optional: true '@swc/core-linux-x64-musl@1.5.29': optional: true - '@swc/core-linux-x64-musl@1.6.5': + '@swc/core-linux-x64-musl@1.7.26': optional: true '@swc/core-win32-arm64-msvc@1.5.29': optional: true - '@swc/core-win32-arm64-msvc@1.6.5': + '@swc/core-win32-arm64-msvc@1.7.26': optional: true '@swc/core-win32-ia32-msvc@1.5.29': optional: true - '@swc/core-win32-ia32-msvc@1.6.5': + '@swc/core-win32-ia32-msvc@1.7.26': optional: true '@swc/core-win32-x64-msvc@1.5.29': optional: true - '@swc/core-win32-x64-msvc@1.6.5': + '@swc/core-win32-x64-msvc@1.7.26': optional: true '@swc/core@1.5.29': @@ -9343,33 +8773,33 @@ snapshots: '@swc/core-win32-ia32-msvc': 1.5.29 '@swc/core-win32-x64-msvc': 1.5.29 - '@swc/core@1.6.5': + '@swc/core@1.7.26': dependencies: '@swc/counter': 0.1.3 - '@swc/types': 0.1.9 + '@swc/types': 0.1.12 optionalDependencies: - '@swc/core-darwin-arm64': 1.6.5 - '@swc/core-darwin-x64': 1.6.5 - '@swc/core-linux-arm-gnueabihf': 1.6.5 - '@swc/core-linux-arm64-gnu': 1.6.5 - '@swc/core-linux-arm64-musl': 1.6.5 - '@swc/core-linux-x64-gnu': 1.6.5 - '@swc/core-linux-x64-musl': 1.6.5 - '@swc/core-win32-arm64-msvc': 1.6.5 - '@swc/core-win32-ia32-msvc': 1.6.5 - '@swc/core-win32-x64-msvc': 1.6.5 + '@swc/core-darwin-arm64': 1.7.26 + '@swc/core-darwin-x64': 1.7.26 + '@swc/core-linux-arm-gnueabihf': 1.7.26 + '@swc/core-linux-arm64-gnu': 1.7.26 + '@swc/core-linux-arm64-musl': 1.7.26 + '@swc/core-linux-x64-gnu': 1.7.26 + '@swc/core-linux-x64-musl': 1.7.26 + '@swc/core-win32-arm64-msvc': 1.7.26 + '@swc/core-win32-ia32-msvc': 1.7.26 + '@swc/core-win32-x64-msvc': 1.7.26 optional: true '@swc/counter@0.1.3': {} - '@swc/types@0.1.8': + '@swc/types@0.1.12': dependencies: '@swc/counter': 0.1.3 + optional: true - '@swc/types@0.1.9': + '@swc/types@0.1.8': dependencies: '@swc/counter': 0.1.3 - optional: true '@tsconfig/node10@1.0.11': {} @@ -9379,32 +8809,33 @@ snapshots: '@tsconfig/node16@1.0.4': {} - '@types/argparse@1.0.38': {} + '@types/argparse@1.0.38': + optional: true '@types/babel__core@7.20.5': dependencies: '@babel/parser': 7.23.5 - '@babel/types': 7.24.7 + '@babel/types': 7.25.6 '@types/babel__generator': 7.6.7 '@types/babel__template': 7.4.4 '@types/babel__traverse': 7.20.4 '@types/babel__generator@7.6.7': dependencies: - '@babel/types': 7.24.7 + '@babel/types': 7.25.6 '@types/babel__template@7.4.4': dependencies: '@babel/parser': 7.23.5 - '@babel/types': 7.24.7 + '@babel/types': 7.25.6 '@types/babel__traverse@7.20.4': dependencies: - '@babel/types': 7.24.7 + '@babel/types': 7.25.6 '@types/conventional-commits-parser@5.0.0': dependencies: - '@types/node': 20.14.9 + '@types/node': 22.5.4 '@types/cookie@0.6.0': {} @@ -9433,14 +8864,18 @@ snapshots: dependencies: '@types/ms': 0.7.34 - '@types/eslint@8.56.10': + '@types/dompurify@3.0.5': + dependencies: + '@types/trusted-types': 2.0.7 + + '@types/eslint@9.6.1': dependencies: '@types/estree': 1.0.5 '@types/json-schema': 7.0.15 '@types/eslint__js@8.42.3': dependencies: - '@types/eslint': 8.56.10 + '@types/eslint': 9.6.1 '@types/estree-jsx@1.0.3': dependencies: @@ -9453,15 +8888,15 @@ snapshots: '@types/glob@7.2.0': dependencies: '@types/minimatch': 5.1.2 - '@types/node': 20.14.9 + '@types/node': 22.5.4 '@types/hast@2.3.9': dependencies: '@types/unist': 2.0.10 - '@types/hast@3.0.3': + '@types/hast@3.0.4': dependencies: - '@types/unist': 3.0.2 + '@types/unist': 3.0.3 '@types/json-schema@7.0.15': {} @@ -9477,7 +8912,7 @@ snapshots: '@types/mdast@4.0.3': dependencies: - '@types/unist': 3.0.2 + '@types/unist': 3.0.3 '@types/minimatch@5.1.2': {} @@ -9485,16 +8920,22 @@ snapshots: '@types/mute-stream@0.0.4': dependencies: - '@types/node': 20.14.9 + '@types/node': 20.16.5 '@types/node@12.20.55': {} - '@types/node@16.18.101': {} - - '@types/node@20.14.9': + '@types/node@18.19.50': dependencies: undici-types: 5.26.5 + '@types/node@20.16.5': + dependencies: + undici-types: 6.19.8 + + '@types/node@22.5.4': + dependencies: + undici-types: 6.19.8 + '@types/path-browserify@1.0.2': {} '@types/prop-types@15.7.12': {} @@ -9503,13 +8944,13 @@ snapshots: '@types/react-dom@18.3.0': dependencies: - '@types/react': 18.3.3 + '@types/react': 18.3.5 '@types/react-syntax-highlighter@15.5.13': dependencies: - '@types/react': 18.3.3 + '@types/react': 18.3.5 - '@types/react@18.3.3': + '@types/react@18.3.5': dependencies: '@types/prop-types': 15.7.12 csstype: 3.1.3 @@ -9518,9 +8959,11 @@ snapshots: '@types/statuses@2.0.5': {} + '@types/trusted-types@2.0.7': {} + '@types/unist@2.0.10': {} - '@types/unist@3.0.2': {} + '@types/unist@3.0.3': {} '@types/vfile-message@2.0.0': dependencies: @@ -9528,158 +8971,116 @@ snapshots: '@types/vfile@3.0.2': dependencies: - '@types/node': 20.14.9 - '@types/unist': 3.0.2 + '@types/node': 22.5.4 + '@types/unist': 3.0.3 '@types/vfile-message': 2.0.0 '@types/which@3.0.4': {} '@types/wrap-ansi@3.0.0': {} - '@typescript-eslint/eslint-plugin@7.14.1(@typescript-eslint/parser@7.14.1(eslint@9.5.0)(typescript@5.5.2))(eslint@9.5.0)(typescript@5.5.2)': + '@typescript-eslint/eslint-plugin@8.5.0(@typescript-eslint/parser@8.5.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2))(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2)': dependencies: - '@eslint-community/regexpp': 4.10.1 - '@typescript-eslint/parser': 7.14.1(eslint@9.5.0)(typescript@5.5.2) - '@typescript-eslint/scope-manager': 7.14.1 - '@typescript-eslint/type-utils': 7.14.1(eslint@9.5.0)(typescript@5.5.2) - '@typescript-eslint/utils': 7.14.1(eslint@9.5.0)(typescript@5.5.2) - '@typescript-eslint/visitor-keys': 7.14.1 - eslint: 9.5.0 + '@eslint-community/regexpp': 4.11.0 + '@typescript-eslint/parser': 8.5.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2) + '@typescript-eslint/scope-manager': 8.5.0 + '@typescript-eslint/type-utils': 8.5.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2) + '@typescript-eslint/utils': 8.5.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2) + '@typescript-eslint/visitor-keys': 8.5.0 + eslint: 9.10.0(jiti@1.21.6) graphemer: 1.4.0 - ignore: 5.3.1 + ignore: 5.3.2 natural-compare: 1.4.0 - ts-api-utils: 1.3.0(typescript@5.5.2) + ts-api-utils: 1.3.0(typescript@5.6.2) optionalDependencies: - typescript: 5.5.2 + typescript: 5.6.2 transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@7.14.1(eslint@9.5.0)(typescript@5.5.2)': + '@typescript-eslint/parser@8.5.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2)': dependencies: - '@typescript-eslint/scope-manager': 7.14.1 - '@typescript-eslint/types': 7.14.1 - '@typescript-eslint/typescript-estree': 7.14.1(typescript@5.5.2) - '@typescript-eslint/visitor-keys': 7.14.1 - debug: 4.3.5 - eslint: 9.5.0 + '@typescript-eslint/scope-manager': 8.5.0 + '@typescript-eslint/types': 8.5.0 + '@typescript-eslint/typescript-estree': 8.5.0(typescript@5.6.2) + '@typescript-eslint/visitor-keys': 8.5.0 + debug: 4.3.7 + eslint: 9.10.0(jiti@1.21.6) optionalDependencies: - typescript: 5.5.2 + typescript: 5.6.2 transitivePeerDependencies: - supports-color - '@typescript-eslint/scope-manager@7.14.1': + '@typescript-eslint/scope-manager@8.5.0': dependencies: - '@typescript-eslint/types': 7.14.1 - '@typescript-eslint/visitor-keys': 7.14.1 + '@typescript-eslint/types': 8.5.0 + '@typescript-eslint/visitor-keys': 8.5.0 - '@typescript-eslint/type-utils@7.14.1(eslint@9.5.0)(typescript@5.5.2)': + '@typescript-eslint/type-utils@8.5.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2)': dependencies: - '@typescript-eslint/typescript-estree': 7.14.1(typescript@5.5.2) - '@typescript-eslint/utils': 7.14.1(eslint@9.5.0)(typescript@5.5.2) - debug: 4.3.5 - eslint: 9.5.0 - ts-api-utils: 1.3.0(typescript@5.5.2) + '@typescript-eslint/typescript-estree': 8.5.0(typescript@5.6.2) + '@typescript-eslint/utils': 8.5.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2) + debug: 4.3.7 + ts-api-utils: 1.3.0(typescript@5.6.2) optionalDependencies: - typescript: 5.5.2 + typescript: 5.6.2 transitivePeerDependencies: + - eslint - supports-color - '@typescript-eslint/types@7.14.1': {} + '@typescript-eslint/types@8.5.0': {} - '@typescript-eslint/typescript-estree@7.14.1(typescript@5.5.2)': + '@typescript-eslint/typescript-estree@8.5.0(typescript@5.6.2)': dependencies: - '@typescript-eslint/types': 7.14.1 - '@typescript-eslint/visitor-keys': 7.14.1 - debug: 4.3.5 - globby: 11.1.0 + '@typescript-eslint/types': 8.5.0 + '@typescript-eslint/visitor-keys': 8.5.0 + debug: 4.3.7 + fast-glob: 3.3.2 is-glob: 4.0.3 - minimatch: 9.0.4 - semver: 7.6.2 - ts-api-utils: 1.3.0(typescript@5.5.2) + minimatch: 9.0.5 + semver: 7.6.3 + ts-api-utils: 1.3.0(typescript@5.6.2) optionalDependencies: - typescript: 5.5.2 + typescript: 5.6.2 transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@7.14.1(eslint@9.5.0)(typescript@5.5.2)': + '@typescript-eslint/utils@8.5.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2)': dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@9.5.0) - '@typescript-eslint/scope-manager': 7.14.1 - '@typescript-eslint/types': 7.14.1 - '@typescript-eslint/typescript-estree': 7.14.1(typescript@5.5.2) - eslint: 9.5.0 + '@eslint-community/eslint-utils': 4.4.0(eslint@9.10.0(jiti@1.21.6)) + '@typescript-eslint/scope-manager': 8.5.0 + '@typescript-eslint/types': 8.5.0 + '@typescript-eslint/typescript-estree': 8.5.0(typescript@5.6.2) + eslint: 9.10.0(jiti@1.21.6) transitivePeerDependencies: - supports-color - typescript - '@typescript-eslint/visitor-keys@7.14.1': + '@typescript-eslint/visitor-keys@8.5.0': dependencies: - '@typescript-eslint/types': 7.14.1 + '@typescript-eslint/types': 8.5.0 eslint-visitor-keys: 3.4.3 '@ungap/structured-clone@1.2.0': {} - '@vitejs/plugin-react-swc@3.7.0(vite@5.3.1(@types/node@20.14.9)(less@4.2.0)(lightningcss@1.25.1)(sass@1.77.6)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.38)))': + '@vitejs/plugin-react-swc@3.7.0(vite@5.4.4(@types/node@18.19.50)(less@4.2.0)(lightningcss@1.27.0)(sass@1.78.0)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.45)))': dependencies: '@swc/core': 1.5.29 - vite: 5.3.1(@types/node@20.14.9)(less@4.2.0)(lightningcss@1.25.1)(sass@1.77.6)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.38)) + vite: 5.4.4(@types/node@18.19.50)(less@4.2.0)(lightningcss@1.27.0)(sass@1.78.0)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.45)) transitivePeerDependencies: - '@swc/helpers' - '@volar/language-core@1.11.1': - dependencies: - '@volar/source-map': 1.11.1 - - '@volar/source-map@1.11.1': - dependencies: - muggle-string: 0.3.1 - - '@volar/typescript@1.11.1': - dependencies: - '@volar/language-core': 1.11.1 - path-browserify: 1.0.1 - - '@vue/compiler-core@3.4.27': - dependencies: - '@babel/parser': 7.24.5 - '@vue/shared': 3.4.27 - entities: 4.5.0 - estree-walker: 2.0.2 - source-map-js: 1.2.0 - - '@vue/compiler-dom@3.4.27': - dependencies: - '@vue/compiler-core': 3.4.27 - '@vue/shared': 3.4.27 - - '@vue/language-core@1.8.27(typescript@5.5.2)': - dependencies: - '@volar/language-core': 1.11.1 - '@volar/source-map': 1.11.1 - '@vue/compiler-dom': 3.4.27 - '@vue/shared': 3.4.27 - computeds: 0.0.1 - minimatch: 9.0.4 - muggle-string: 0.3.1 - path-browserify: 1.0.1 - vue-template-compiler: 2.7.16 - optionalDependencies: - typescript: 5.5.2 - - '@vue/shared@3.4.27': {} - - '@xyflow/react@12.0.0-next.24(@types/react@18.3.3)(immer@10.1.1)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + '@xyflow/react@12.3.0(@types/react@18.3.5)(immer@10.1.1)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: - '@xyflow/system': 0.0.30 + '@xyflow/system': 0.0.42 classcat: 5.0.5 react: 18.3.1 react-dom: 18.3.1(react@18.3.1) - zustand: 4.5.2(@types/react@18.3.3)(immer@10.1.1)(react@18.3.1) + zustand: 4.5.5(@types/react@18.3.5)(immer@10.1.1)(react@18.3.1) transitivePeerDependencies: - '@types/react' - immer - '@xyflow/system@0.0.30': + '@xyflow/system@0.0.42': dependencies: '@types/d3-drag': 3.0.7 '@types/d3-selection': 3.0.10 @@ -9697,21 +9098,21 @@ snapshots: abbrev@1.1.1: optional: true - acorn-jsx@5.3.2(acorn@8.12.0): + acorn-jsx@5.3.2(acorn@8.12.1): dependencies: - acorn: 8.12.0 + acorn: 8.12.1 - acorn-walk@8.3.2: {} + acorn-walk@8.3.4: + dependencies: + acorn: 8.12.1 acorn@7.4.1: {} - acorn@8.11.3: {} - - acorn@8.12.0: {} + acorn@8.12.1: {} agent-base@6.0.2: dependencies: - debug: 4.3.5 + debug: 4.3.7 transitivePeerDependencies: - supports-color optional: true @@ -9726,9 +9127,9 @@ snapshots: ajv: 8.13.0 optional: true - ajv-i18n@4.2.0(ajv@8.16.0): + ajv-i18n@4.2.0(ajv@8.17.1): dependencies: - ajv: 8.16.0 + ajv: 8.17.1 ajv@6.12.6: dependencies: @@ -9753,12 +9154,12 @@ snapshots: uri-js: 4.4.1 optional: true - ajv@8.16.0: + ajv@8.17.1: dependencies: fast-deep-equal: 3.1.3 + fast-uri: 3.0.1 json-schema-traverse: 1.0.0 require-from-string: 2.0.2 - uri-js: 4.4.1 ansi-colors@4.1.3: {} @@ -9766,13 +9167,15 @@ snapshots: dependencies: type-fest: 0.21.3 - ansi-escapes@6.2.1: {} + ansi-escapes@7.0.0: + dependencies: + environment: 1.1.0 ansi-regex@4.1.1: {} ansi-regex@5.0.1: {} - ansi-regex@6.0.1: {} + ansi-regex@6.1.0: {} ansi-styles@3.2.1: dependencies: @@ -9784,58 +9187,59 @@ snapshots: ansi-styles@6.2.1: {} - antd@5.18.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1): + antd@5.20.6(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: - '@ant-design/colors': 7.0.2 - '@ant-design/cssinjs': 1.21.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@ant-design/icons': 5.3.7(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@ant-design/colors': 7.1.0 + '@ant-design/cssinjs': 1.21.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@ant-design/cssinjs-utils': 1.0.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@ant-design/icons': 5.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@ant-design/react-slick': 1.1.2(react@18.3.1) - '@babel/runtime': 7.24.7 + '@babel/runtime': 7.25.6 '@ctrl/tinycolor': 3.6.1 - '@rc-component/color-picker': 1.5.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@rc-component/color-picker': 2.0.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@rc-component/mutate-observer': 1.1.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@rc-component/tour': 1.15.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@rc-component/trigger': 2.2.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@rc-component/qrcode': 1.0.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@rc-component/tour': 1.15.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@rc-component/trigger': 2.2.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1) classnames: 2.5.1 copy-to-clipboard: 3.3.3 - dayjs: 1.11.11 - qrcode.react: 3.1.0(react@18.3.1) - rc-cascader: 3.26.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + dayjs: 1.11.13 + rc-cascader: 3.28.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1) rc-checkbox: 3.3.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) rc-collapse: 3.7.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1) rc-dialog: 9.5.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1) rc-drawer: 7.2.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) rc-dropdown: 4.2.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - rc-field-form: 2.2.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + rc-field-form: 2.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) rc-image: 7.9.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - rc-input: 1.5.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - rc-input-number: 9.1.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - rc-mentions: 2.14.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + rc-input: 1.6.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + rc-input-number: 9.2.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + rc-mentions: 2.15.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) rc-menu: 9.14.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1) rc-motion: 2.9.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1) rc-notification: 5.6.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - rc-pagination: 4.0.4(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - rc-picker: 4.5.0(dayjs@1.11.11)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + rc-pagination: 4.2.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + rc-picker: 4.6.14(dayjs@1.11.13)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) rc-progress: 4.0.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) rc-rate: 2.13.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) rc-resize-observer: 1.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) rc-segmented: 2.3.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - rc-select: 14.14.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - rc-slider: 10.6.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + rc-select: 14.15.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + rc-slider: 11.1.5(react-dom@18.3.1(react@18.3.1))(react@18.3.1) rc-steps: 6.0.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1) rc-switch: 4.1.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) rc-table: 7.45.7(react-dom@18.3.1(react@18.3.1))(react@18.3.1) rc-tabs: 15.1.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - rc-textarea: 1.7.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + rc-textarea: 1.8.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1) rc-tooltip: 6.2.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - rc-tree: 5.8.8(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - rc-tree-select: 5.21.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - rc-upload: 4.5.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + rc-tree: 5.9.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + rc-tree-select: 5.23.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + rc-upload: 4.7.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) rc-util: 5.43.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) react: 18.3.1 react-dom: 18.3.1(react@18.3.1) scroll-into-view-if-needed: 3.1.0 - throttle-debounce: 5.0.0 + throttle-debounce: 5.0.2 transitivePeerDependencies: - date-fns - luxon @@ -9869,9 +9273,7 @@ snapshots: dependencies: deep-equal: 2.2.3 - aria-query@5.3.0: - dependencies: - dequal: 2.0.3 + aria-query@5.3.1: {} arr-diff@4.0.0: {} @@ -9881,7 +9283,7 @@ snapshots: array-buffer-byte-length@1.0.0: dependencies: - call-bind: 1.0.5 + call-bind: 1.0.7 is-array-buffer: 3.0.2 array-buffer-byte-length@1.0.1: @@ -9897,7 +9299,7 @@ snapshots: dependencies: call-bind: 1.0.7 define-properties: 1.2.1 - es-abstract: 1.23.2 + es-abstract: 1.23.3 es-object-atoms: 1.0.0 get-intrinsic: 1.2.4 is-string: 1.0.7 @@ -9927,26 +9329,19 @@ snapshots: dependencies: call-bind: 1.0.7 define-properties: 1.2.1 - es-abstract: 1.23.2 + es-abstract: 1.23.3 es-errors: 1.3.0 es-object-atoms: 1.0.0 es-shim-unscopables: 1.0.2 array.prototype.flat@1.3.2: dependencies: - call-bind: 1.0.5 + call-bind: 1.0.7 define-properties: 1.2.1 - es-abstract: 1.22.3 + es-abstract: 1.23.3 es-shim-unscopables: 1.0.2 array.prototype.flatmap@1.3.2: - dependencies: - call-bind: 1.0.5 - define-properties: 1.2.1 - es-abstract: 1.22.3 - es-shim-unscopables: 1.0.2 - - array.prototype.toreversed@1.1.2: dependencies: call-bind: 1.0.7 define-properties: 1.2.1 @@ -9964,9 +9359,9 @@ snapshots: arraybuffer.prototype.slice@1.0.2: dependencies: array-buffer-byte-length: 1.0.0 - call-bind: 1.0.5 + call-bind: 1.0.7 define-properties: 1.2.1 - es-abstract: 1.22.3 + es-abstract: 1.23.3 get-intrinsic: 1.2.2 is-array-buffer: 3.0.2 is-shared-array-buffer: 1.0.2 @@ -9976,7 +9371,7 @@ snapshots: array-buffer-byte-length: 1.0.1 call-bind: 1.0.7 define-properties: 1.2.1 - es-abstract: 1.23.2 + es-abstract: 1.23.3 es-errors: 1.3.0 get-intrinsic: 1.2.4 is-array-buffer: 3.0.4 @@ -10014,19 +9409,13 @@ snapshots: dependencies: possible-typed-array-names: 1.0.0 - axe-core@4.9.1: {} - - axobject-query@3.1.1: - dependencies: - deep-equal: 2.2.3 + axe-core@4.10.0: {} - axobject-query@4.0.0: - dependencies: - dequal: 2.0.3 + axobject-query@4.1.0: {} babel-walk@3.0.0-canary-5: dependencies: - '@babel/types': 7.24.7 + '@babel/types': 7.25.6 bail@1.0.5: {} @@ -10078,10 +9467,6 @@ snapshots: transitivePeerDependencies: - supports-color - braces@3.0.2: - dependencies: - fill-range: 7.0.1 - braces@3.0.3: dependencies: fill-range: 7.1.1 @@ -10093,12 +9478,12 @@ snapshots: node-releases: 2.0.14 update-browserslist-db: 1.0.13(browserslist@4.22.3) - browserslist@4.23.1: + browserslist@4.23.3: dependencies: - caniuse-lite: 1.0.30001632 - electron-to-chromium: 1.4.800 - node-releases: 2.0.14 - update-browserslist-db: 1.0.16(browserslist@4.23.1) + caniuse-lite: 1.0.30001660 + electron-to-chromium: 1.5.21 + node-releases: 2.0.18 + update-browserslist-db: 1.1.0(browserslist@4.23.3) buffer-crc32@1.0.0: {} @@ -10106,9 +9491,9 @@ snapshots: dependencies: node-gyp-build: 4.8.1 - bundle-require@4.2.1(esbuild@0.21.5): + bundle-require@5.0.0(esbuild@0.23.1): dependencies: - esbuild: 0.21.5 + esbuild: 0.23.1 load-tsconfig: 0.2.5 cac@6.7.14: {} @@ -10163,7 +9548,7 @@ snapshots: caniuse-lite@1.0.30001582: {} - caniuse-lite@1.0.30001632: {} + caniuse-lite@1.0.30001660: {} canvas@2.11.2: dependencies: @@ -10242,14 +9627,6 @@ snapshots: classnames@2.5.1: {} - cli-color@2.0.3: - dependencies: - d: 1.0.1 - es5-ext: 0.10.62 - es6-iterator: 2.0.3 - memoizee: 0.4.15 - timers-ext: 0.1.7 - cli-color@2.0.4: dependencies: d: 1.0.2 @@ -10258,16 +9635,16 @@ snapshots: memoizee: 0.4.17 timers-ext: 0.1.8 - cli-cursor@4.0.0: + cli-cursor@5.0.0: dependencies: - restore-cursor: 4.0.0 + restore-cursor: 5.1.0 cli-spinners@2.9.2: {} cli-truncate@4.0.0: dependencies: slice-ansi: 5.0.0 - string-width: 7.1.0 + string-width: 7.2.0 cli-width@4.1.0: {} @@ -10284,9 +9661,9 @@ snapshots: code-red@1.0.4: dependencies: - '@jridgewell/sourcemap-codec': 1.4.15 + '@jridgewell/sourcemap-codec': 1.5.0 '@types/estree': 1.0.5 - acorn: 8.12.0 + acorn: 8.12.1 estree-walker: 3.0.3 periscopic: 3.1.0 @@ -10328,9 +9705,6 @@ snapshots: commander@8.3.0: {} - commander@9.5.0: - optional: true - compare-func@2.0.0: dependencies: array-ify: 1.0.0 @@ -10340,17 +9714,17 @@ snapshots: compute-scroll-into-view@3.1.0: {} - computeds@0.0.1: {} - concat-map@0.0.1: {} + consola@3.2.3: {} + console-control-strings@1.1.0: optional: true constantinople@4.0.1: dependencies: - '@babel/parser': 7.24.7 - '@babel/types': 7.24.7 + '@babel/parser': 7.25.6 + '@babel/types': 7.25.6 conventional-changelog-angular@7.0.0: dependencies: @@ -10381,12 +9755,12 @@ snapshots: dependencies: toggle-selection: 1.0.6 - cosmiconfig-typescript-loader@5.0.0(@types/node@20.14.9)(cosmiconfig@9.0.0(typescript@5.5.2))(typescript@5.5.2): + cosmiconfig-typescript-loader@5.0.0(@types/node@22.5.4)(cosmiconfig@9.0.0(typescript@5.6.2))(typescript@5.6.2): dependencies: - '@types/node': 20.14.9 - cosmiconfig: 9.0.0(typescript@5.5.2) - jiti: 1.21.0 - typescript: 5.5.2 + '@types/node': 22.5.4 + cosmiconfig: 9.0.0(typescript@5.6.2) + jiti: 1.21.6 + typescript: 5.6.2 cosmiconfig@5.2.1: dependencies: @@ -10395,14 +9769,14 @@ snapshots: js-yaml: 3.14.1 parse-json: 4.0.0 - cosmiconfig@9.0.0(typescript@5.5.2): + cosmiconfig@9.0.0(typescript@5.6.2): dependencies: env-paths: 2.2.1 import-fresh: 3.3.0 js-yaml: 4.1.0 parse-json: 5.2.0 optionalDependencies: - typescript: 5.5.2 + typescript: 5.6.2 create-require@1.1.1: {} @@ -10431,7 +9805,7 @@ snapshots: css-tree@2.3.1: dependencies: mdn-data: 2.0.30 - source-map-js: 1.2.0 + source-map-js: 1.2.1 cssesc@3.0.0: {} @@ -10477,11 +9851,6 @@ snapshots: d3-selection: 3.0.0 d3-transition: 3.0.1(d3-selection@3.0.0) - d@1.0.1: - dependencies: - es5-ext: 0.10.62 - type: 1.2.0 - d@1.0.2: dependencies: es5-ext: 0.10.64 @@ -10513,9 +9882,7 @@ snapshots: dataloader@1.4.0: {} - dayjs@1.11.11: {} - - de-indent@1.0.2: {} + dayjs@1.11.13: {} debug@2.6.9: dependencies: @@ -10525,13 +9892,9 @@ snapshots: dependencies: ms: 2.1.3 - debug@4.3.4: - dependencies: - ms: 2.1.2 - - debug@4.3.5: + debug@4.3.7: dependencies: - ms: 2.1.2 + ms: 2.1.3 decamelize-keys@1.1.1: dependencies: @@ -10658,6 +10021,8 @@ snapshots: dependencies: domelementtype: 1.3.1 + dompurify@3.1.6: {} + domutils@1.7.0: dependencies: dom-serializer: 0.2.2 @@ -10669,18 +10034,18 @@ snapshots: eastasianwidth@0.2.0: {} - echarts@5.5.0: + echarts@5.5.1: dependencies: tslib: 2.3.0 - zrender: 5.5.0 + zrender: 5.6.0 electron-to-chromium@1.4.654: {} - electron-to-chromium@1.4.800: {} + electron-to-chromium@1.5.21: {} elkjs@0.9.3: {} - emoji-regex@10.3.0: {} + emoji-regex@10.4.0: {} emoji-regex@7.0.3: {} @@ -10688,7 +10053,7 @@ snapshots: emoji-regex@9.2.2: {} - enhanced-resolve@5.15.0: + enhanced-resolve@5.17.1: dependencies: graceful-fs: 4.2.11 tapable: 2.2.1 @@ -10706,6 +10071,8 @@ snapshots: env-paths@2.2.1: {} + environment@1.1.0: {} + errno@0.1.8: dependencies: prr: 1.0.1 @@ -10720,7 +10087,7 @@ snapshots: array-buffer-byte-length: 1.0.0 arraybuffer.prototype.slice: 1.0.2 available-typed-arrays: 1.0.5 - call-bind: 1.0.5 + call-bind: 1.0.7 es-set-tostringtag: 2.0.2 es-to-primitive: 1.2.1 function.prototype.name: 1.1.6 @@ -10731,7 +10098,7 @@ snapshots: has-property-descriptors: 1.0.1 has-proto: 1.0.1 has-symbols: 1.0.3 - hasown: 2.0.0 + hasown: 2.0.2 internal-slot: 1.0.6 is-array-buffer: 3.0.2 is-callable: 1.2.7 @@ -10757,55 +10124,6 @@ snapshots: unbox-primitive: 1.0.2 which-typed-array: 1.1.13 - es-abstract@1.23.2: - dependencies: - array-buffer-byte-length: 1.0.1 - arraybuffer.prototype.slice: 1.0.3 - available-typed-arrays: 1.0.7 - call-bind: 1.0.7 - data-view-buffer: 1.0.1 - data-view-byte-length: 1.0.1 - data-view-byte-offset: 1.0.0 - es-define-property: 1.0.0 - es-errors: 1.3.0 - es-object-atoms: 1.0.0 - es-set-tostringtag: 2.0.3 - es-to-primitive: 1.2.1 - function.prototype.name: 1.1.6 - get-intrinsic: 1.2.4 - get-symbol-description: 1.0.2 - globalthis: 1.0.3 - gopd: 1.0.1 - has-property-descriptors: 1.0.2 - has-proto: 1.0.3 - has-symbols: 1.0.3 - hasown: 2.0.2 - internal-slot: 1.0.7 - is-array-buffer: 3.0.4 - is-callable: 1.2.7 - is-data-view: 1.0.1 - is-negative-zero: 2.0.3 - is-regex: 1.1.4 - is-shared-array-buffer: 1.0.3 - is-string: 1.0.7 - is-typed-array: 1.1.13 - is-weakref: 1.0.2 - object-inspect: 1.13.1 - object-keys: 1.1.1 - object.assign: 4.1.5 - regexp.prototype.flags: 1.5.2 - safe-array-concat: 1.1.2 - safe-regex-test: 1.0.3 - string.prototype.trim: 1.2.9 - string.prototype.trimend: 1.0.8 - string.prototype.trimstart: 1.0.8 - typed-array-buffer: 1.0.2 - typed-array-byte-length: 1.0.1 - typed-array-byte-offset: 1.0.2 - typed-array-length: 1.0.6 - unbox-primitive: 1.0.2 - which-typed-array: 1.1.15 - es-abstract@1.23.3: dependencies: array-buffer-byte-length: 1.0.1 @@ -10898,7 +10216,7 @@ snapshots: dependencies: get-intrinsic: 1.2.2 has-tostringtag: 1.0.0 - hasown: 2.0.0 + hasown: 2.0.2 es-set-tostringtag@2.0.3: dependencies: @@ -10908,7 +10226,7 @@ snapshots: es-shim-unscopables@1.0.2: dependencies: - hasown: 2.0.0 + hasown: 2.0.2 es-to-primitive@1.2.1: dependencies: @@ -10916,12 +10234,6 @@ snapshots: is-date-object: 1.0.5 is-symbol: 1.0.4 - es5-ext@0.10.62: - dependencies: - es6-iterator: 2.0.3 - es6-symbol: 3.1.3 - next-tick: 1.1.0 - es5-ext@0.10.64: dependencies: es6-iterator: 2.0.3 @@ -10931,17 +10243,12 @@ snapshots: es6-iterator@2.0.3: dependencies: - d: 1.0.1 - es5-ext: 0.10.62 - es6-symbol: 3.1.3 + d: 1.0.2 + es5-ext: 0.10.64 + es6-symbol: 3.1.4 es6-promise@3.3.1: {} - es6-symbol@3.1.3: - dependencies: - d: 1.0.1 - ext: 1.7.0 - es6-symbol@3.1.4: dependencies: d: 1.0.2 @@ -10949,10 +10256,10 @@ snapshots: es6-weak-map@2.0.3: dependencies: - d: 1.0.1 - es5-ext: 0.10.62 + d: 1.0.2 + es5-ext: 0.10.64 es6-iterator: 2.0.3 - es6-symbol: 3.1.3 + es6-symbol: 3.1.4 esbuild-android-64@0.14.54: optional: true @@ -11038,32 +10345,6 @@ snapshots: esbuild-windows-64: 0.14.54 esbuild-windows-arm64: 0.14.54 - esbuild@0.19.10: - optionalDependencies: - '@esbuild/aix-ppc64': 0.19.10 - '@esbuild/android-arm': 0.19.10 - '@esbuild/android-arm64': 0.19.10 - '@esbuild/android-x64': 0.19.10 - '@esbuild/darwin-arm64': 0.19.10 - '@esbuild/darwin-x64': 0.19.10 - '@esbuild/freebsd-arm64': 0.19.10 - '@esbuild/freebsd-x64': 0.19.10 - '@esbuild/linux-arm': 0.19.10 - '@esbuild/linux-arm64': 0.19.10 - '@esbuild/linux-ia32': 0.19.10 - '@esbuild/linux-loong64': 0.19.10 - '@esbuild/linux-mips64el': 0.19.10 - '@esbuild/linux-ppc64': 0.19.10 - '@esbuild/linux-riscv64': 0.19.10 - '@esbuild/linux-s390x': 0.19.10 - '@esbuild/linux-x64': 0.19.10 - '@esbuild/netbsd-x64': 0.19.10 - '@esbuild/openbsd-x64': 0.19.10 - '@esbuild/sunos-x64': 0.19.10 - '@esbuild/win32-arm64': 0.19.10 - '@esbuild/win32-ia32': 0.19.10 - '@esbuild/win32-x64': 0.19.10 - esbuild@0.19.12: optionalDependencies: '@esbuild/aix-ppc64': 0.19.12 @@ -11090,32 +10371,6 @@ snapshots: '@esbuild/win32-ia32': 0.19.12 '@esbuild/win32-x64': 0.19.12 - esbuild@0.20.2: - optionalDependencies: - '@esbuild/aix-ppc64': 0.20.2 - '@esbuild/android-arm': 0.20.2 - '@esbuild/android-arm64': 0.20.2 - '@esbuild/android-x64': 0.20.2 - '@esbuild/darwin-arm64': 0.20.2 - '@esbuild/darwin-x64': 0.20.2 - '@esbuild/freebsd-arm64': 0.20.2 - '@esbuild/freebsd-x64': 0.20.2 - '@esbuild/linux-arm': 0.20.2 - '@esbuild/linux-arm64': 0.20.2 - '@esbuild/linux-ia32': 0.20.2 - '@esbuild/linux-loong64': 0.20.2 - '@esbuild/linux-mips64el': 0.20.2 - '@esbuild/linux-ppc64': 0.20.2 - '@esbuild/linux-riscv64': 0.20.2 - '@esbuild/linux-s390x': 0.20.2 - '@esbuild/linux-x64': 0.20.2 - '@esbuild/netbsd-x64': 0.20.2 - '@esbuild/openbsd-x64': 0.20.2 - '@esbuild/sunos-x64': 0.20.2 - '@esbuild/win32-arm64': 0.20.2 - '@esbuild/win32-ia32': 0.20.2 - '@esbuild/win32-x64': 0.20.2 - esbuild@0.21.5: optionalDependencies: '@esbuild/aix-ppc64': 0.21.5 @@ -11142,82 +10397,104 @@ snapshots: '@esbuild/win32-ia32': 0.21.5 '@esbuild/win32-x64': 0.21.5 + esbuild@0.23.1: + optionalDependencies: + '@esbuild/aix-ppc64': 0.23.1 + '@esbuild/android-arm': 0.23.1 + '@esbuild/android-arm64': 0.23.1 + '@esbuild/android-x64': 0.23.1 + '@esbuild/darwin-arm64': 0.23.1 + '@esbuild/darwin-x64': 0.23.1 + '@esbuild/freebsd-arm64': 0.23.1 + '@esbuild/freebsd-x64': 0.23.1 + '@esbuild/linux-arm': 0.23.1 + '@esbuild/linux-arm64': 0.23.1 + '@esbuild/linux-ia32': 0.23.1 + '@esbuild/linux-loong64': 0.23.1 + '@esbuild/linux-mips64el': 0.23.1 + '@esbuild/linux-ppc64': 0.23.1 + '@esbuild/linux-riscv64': 0.23.1 + '@esbuild/linux-s390x': 0.23.1 + '@esbuild/linux-x64': 0.23.1 + '@esbuild/netbsd-x64': 0.23.1 + '@esbuild/openbsd-arm64': 0.23.1 + '@esbuild/openbsd-x64': 0.23.1 + '@esbuild/sunos-x64': 0.23.1 + '@esbuild/win32-arm64': 0.23.1 + '@esbuild/win32-ia32': 0.23.1 + '@esbuild/win32-x64': 0.23.1 + escalade@3.1.2: {} + escalade@3.2.0: {} + escape-string-regexp@1.0.5: {} escape-string-regexp@4.0.0: {} escape-string-regexp@5.0.0: {} - eslint-compat-utils@0.5.1(eslint@9.5.0): + eslint-compat-utils@0.5.1(eslint@9.10.0(jiti@1.21.6)): dependencies: - eslint: 9.5.0 - semver: 7.6.2 + eslint: 9.10.0(jiti@1.21.6) + semver: 7.6.3 - eslint-config-prettier@9.1.0(eslint@9.5.0): + eslint-config-prettier@9.1.0(eslint@9.10.0(jiti@1.21.6)): dependencies: - eslint: 9.5.0 + eslint: 9.10.0(jiti@1.21.6) eslint-import-resolver-node@0.3.9: dependencies: debug: 3.2.7 - is-core-module: 2.13.1 + is-core-module: 2.15.1 resolve: 1.22.8 transitivePeerDependencies: - supports-color - eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.14.1(eslint@9.5.0)(typescript@5.5.2))(eslint-plugin-import@2.29.1)(eslint@9.5.0): - dependencies: - debug: 4.3.4 - enhanced-resolve: 5.15.0 - eslint: 9.5.0 - eslint-module-utils: 2.8.0(@typescript-eslint/parser@7.14.1(eslint@9.5.0)(typescript@5.5.2))(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.14.1(eslint@9.5.0)(typescript@5.5.2))(eslint-plugin-import@2.29.1)(eslint@9.5.0))(eslint@9.5.0) - eslint-plugin-import: 2.29.1(@typescript-eslint/parser@7.14.1(eslint@9.5.0)(typescript@5.5.2))(eslint-import-resolver-typescript@3.6.1)(eslint@9.5.0) - fast-glob: 3.3.2 - get-tsconfig: 4.7.2 - is-core-module: 2.13.1 - is-glob: 4.0.3 - transitivePeerDependencies: - - '@typescript-eslint/parser' - - eslint-import-resolver-node - - eslint-import-resolver-webpack - - supports-color - - eslint-module-utils@2.8.0(@typescript-eslint/parser@7.14.1(eslint@9.5.0)(typescript@5.5.2))(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.14.1(eslint@9.5.0)(typescript@5.5.2))(eslint-plugin-import@2.29.1)(eslint@9.5.0))(eslint@9.5.0): + eslint-import-resolver-typescript@3.6.3(@typescript-eslint/parser@8.5.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2))(eslint-plugin-import@2.30.0)(eslint@9.10.0(jiti@1.21.6)): dependencies: - debug: 3.2.7 + '@nolyfill/is-core-module': 1.0.39 + debug: 4.3.7 + enhanced-resolve: 5.17.1 + eslint: 9.10.0(jiti@1.21.6) + eslint-module-utils: 2.11.0(@typescript-eslint/parser@8.5.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.3(@typescript-eslint/parser@8.5.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2))(eslint-plugin-import@2.30.0)(eslint@9.10.0(jiti@1.21.6)))(eslint@9.10.0(jiti@1.21.6)) + fast-glob: 3.3.2 + get-tsconfig: 4.8.1 + is-bun-module: 1.2.1 + is-glob: 4.0.3 optionalDependencies: - '@typescript-eslint/parser': 7.14.1(eslint@9.5.0)(typescript@5.5.2) - eslint: 9.5.0 - eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@7.14.1(eslint@9.5.0)(typescript@5.5.2))(eslint-plugin-import@2.29.1)(eslint@9.5.0) + eslint-plugin-import: 2.30.0(@typescript-eslint/parser@8.5.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2))(eslint-import-resolver-typescript@3.6.3)(eslint@9.10.0(jiti@1.21.6)) transitivePeerDependencies: + - '@typescript-eslint/parser' + - eslint-import-resolver-node + - eslint-import-resolver-webpack - supports-color - eslint-module-utils@2.8.1(@typescript-eslint/parser@7.14.1(eslint@9.5.0)(typescript@5.5.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.14.1(eslint@9.5.0)(typescript@5.5.2))(eslint-plugin-import@2.29.1)(eslint@9.5.0))(eslint@9.5.0): + eslint-module-utils@2.11.0(@typescript-eslint/parser@8.5.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.3(@typescript-eslint/parser@8.5.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2))(eslint-plugin-import@2.30.0)(eslint@9.10.0(jiti@1.21.6)))(eslint@9.10.0(jiti@1.21.6)): dependencies: debug: 3.2.7 optionalDependencies: - '@typescript-eslint/parser': 7.14.1(eslint@9.5.0)(typescript@5.5.2) - eslint: 9.5.0 + '@typescript-eslint/parser': 8.5.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2) + eslint: 9.10.0(jiti@1.21.6) eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@7.14.1(eslint@9.5.0)(typescript@5.5.2))(eslint-plugin-import@2.29.1)(eslint@9.5.0) + eslint-import-resolver-typescript: 3.6.3(@typescript-eslint/parser@8.5.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2))(eslint-plugin-import@2.30.0)(eslint@9.10.0(jiti@1.21.6)) transitivePeerDependencies: - supports-color - eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.14.1(eslint@9.5.0)(typescript@5.5.2))(eslint-import-resolver-typescript@3.6.1)(eslint@9.5.0): + eslint-plugin-import@2.30.0(@typescript-eslint/parser@8.5.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2))(eslint-import-resolver-typescript@3.6.3)(eslint@9.10.0(jiti@1.21.6)): dependencies: + '@rtsao/scc': 1.1.0 array-includes: 3.1.8 array.prototype.findlastindex: 1.2.5 array.prototype.flat: 1.3.2 array.prototype.flatmap: 1.3.2 debug: 3.2.7 doctrine: 2.1.0 - eslint: 9.5.0 + eslint: 9.10.0(jiti@1.21.6) eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.8.1(@typescript-eslint/parser@7.14.1(eslint@9.5.0)(typescript@5.5.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.14.1(eslint@9.5.0)(typescript@5.5.2))(eslint-plugin-import@2.29.1)(eslint@9.5.0))(eslint@9.5.0) + eslint-module-utils: 2.11.0(@typescript-eslint/parser@8.5.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.3(@typescript-eslint/parser@8.5.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2))(eslint-plugin-import@2.30.0)(eslint@9.10.0(jiti@1.21.6)))(eslint@9.10.0(jiti@1.21.6)) hasown: 2.0.2 - is-core-module: 2.13.1 + is-core-module: 2.15.1 is-glob: 4.0.3 minimatch: 3.1.2 object.fromentries: 2.0.8 @@ -11226,24 +10503,24 @@ snapshots: semver: 6.3.1 tsconfig-paths: 3.15.0 optionalDependencies: - '@typescript-eslint/parser': 7.14.1(eslint@9.5.0)(typescript@5.5.2) + '@typescript-eslint/parser': 8.5.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2) transitivePeerDependencies: - eslint-import-resolver-typescript - eslint-import-resolver-webpack - supports-color - eslint-plugin-jsx-a11y@6.9.0(eslint@9.5.0): + eslint-plugin-jsx-a11y@6.10.0(eslint@9.10.0(jiti@1.21.6)): dependencies: aria-query: 5.1.3 array-includes: 3.1.8 array.prototype.flatmap: 1.3.2 ast-types-flow: 0.0.8 - axe-core: 4.9.1 - axobject-query: 3.1.1 + axe-core: 4.10.0 + axobject-query: 4.1.0 damerau-levenshtein: 1.0.8 emoji-regex: 9.2.2 es-iterator-helpers: 1.0.19 - eslint: 9.5.0 + eslint: 9.10.0(jiti@1.21.6) hasown: 2.0.2 jsx-ast-utils: 3.3.5 language-tags: 1.0.9 @@ -11252,66 +10529,66 @@ snapshots: safe-regex-test: 1.0.3 string.prototype.includes: 2.0.0 - eslint-plugin-prettier@5.1.3(@types/eslint@8.56.10)(eslint-config-prettier@9.1.0(eslint@9.5.0))(eslint@9.5.0)(prettier@3.3.2): + eslint-plugin-prettier@5.2.1(@types/eslint@9.6.1)(eslint-config-prettier@9.1.0(eslint@9.10.0(jiti@1.21.6)))(eslint@9.10.0(jiti@1.21.6))(prettier@3.3.3): dependencies: - eslint: 9.5.0 - prettier: 3.3.2 + eslint: 9.10.0(jiti@1.21.6) + prettier: 3.3.3 prettier-linter-helpers: 1.0.0 - synckit: 0.8.8 + synckit: 0.9.1 optionalDependencies: - '@types/eslint': 8.56.10 - eslint-config-prettier: 9.1.0(eslint@9.5.0) + '@types/eslint': 9.6.1 + eslint-config-prettier: 9.1.0(eslint@9.10.0(jiti@1.21.6)) - eslint-plugin-react-hooks@4.6.2(eslint@9.5.0): + eslint-plugin-react-hooks@4.6.2(eslint@9.10.0(jiti@1.21.6)): dependencies: - eslint: 9.5.0 + eslint: 9.10.0(jiti@1.21.6) - eslint-plugin-react-refresh@0.4.7(eslint@9.5.0): + eslint-plugin-react-refresh@0.4.11(eslint@9.10.0(jiti@1.21.6)): dependencies: - eslint: 9.5.0 + eslint: 9.10.0(jiti@1.21.6) - eslint-plugin-react@7.34.3(eslint@9.5.0): + eslint-plugin-react@7.36.1(eslint@9.10.0(jiti@1.21.6)): dependencies: array-includes: 3.1.8 array.prototype.findlast: 1.2.5 array.prototype.flatmap: 1.3.2 - array.prototype.toreversed: 1.1.2 array.prototype.tosorted: 1.1.4 doctrine: 2.1.0 es-iterator-helpers: 1.0.19 - eslint: 9.5.0 + eslint: 9.10.0(jiti@1.21.6) estraverse: 5.3.0 + hasown: 2.0.2 jsx-ast-utils: 3.3.5 minimatch: 3.1.2 object.entries: 1.1.8 object.fromentries: 2.0.8 - object.hasown: 1.1.4 object.values: 1.2.0 prop-types: 15.8.1 resolve: 2.0.0-next.5 semver: 6.3.1 string.prototype.matchall: 4.0.11 + string.prototype.repeat: 1.0.0 - eslint-plugin-simple-import-sort@12.1.0(eslint@9.5.0): + eslint-plugin-simple-import-sort@12.1.1(eslint@9.10.0(jiti@1.21.6)): dependencies: - eslint: 9.5.0 + eslint: 9.10.0(jiti@1.21.6) - eslint-plugin-svelte@2.41.0(eslint@9.5.0)(svelte@4.2.18)(ts-node@10.9.2(@types/node@20.14.9)(typescript@5.5.2)): + eslint-plugin-svelte@2.43.0(eslint@9.10.0(jiti@1.21.6))(svelte@4.2.19)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@22.5.4)(typescript@5.6.2)): dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@9.5.0) - '@jridgewell/sourcemap-codec': 1.4.15 - eslint: 9.5.0 - eslint-compat-utils: 0.5.1(eslint@9.5.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@9.10.0(jiti@1.21.6)) + '@jridgewell/sourcemap-codec': 1.5.0 + eslint: 9.10.0(jiti@1.21.6) + eslint-compat-utils: 0.5.1(eslint@9.10.0(jiti@1.21.6)) esutils: 2.0.3 known-css-properties: 0.34.0 - postcss: 8.4.38 - postcss-load-config: 3.1.4(postcss@8.4.38)(ts-node@10.9.2(@types/node@20.14.9)(typescript@5.5.2)) - postcss-safe-parser: 6.0.0(postcss@8.4.38) - postcss-selector-parser: 6.1.0 - semver: 7.6.2 - svelte-eslint-parser: 0.39.2(svelte@4.2.18) + postcss: 8.4.45 + postcss-load-config: 3.1.4(postcss@8.4.45)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@22.5.4)(typescript@5.6.2)) + postcss-safe-parser: 6.0.0(postcss@8.4.45) + postcss-selector-parser: 6.1.2 + semver: 7.6.3 + svelte-eslint-parser: 0.41.0(svelte@4.2.19) optionalDependencies: - svelte: 4.2.18 + svelte: 4.2.19 transitivePeerDependencies: - ts-node @@ -11320,7 +10597,7 @@ snapshots: esrecurse: 4.3.0 estraverse: 5.3.0 - eslint-scope@8.0.1: + eslint-scope@8.0.2: dependencies: esrecurse: 4.3.0 estraverse: 5.3.0 @@ -11329,42 +10606,44 @@ snapshots: eslint-visitor-keys@4.0.0: {} - eslint@9.5.0: + eslint@9.10.0(jiti@1.21.6): dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@9.5.0) - '@eslint-community/regexpp': 4.10.1 - '@eslint/config-array': 0.16.0 + '@eslint-community/eslint-utils': 4.4.0(eslint@9.10.0(jiti@1.21.6)) + '@eslint-community/regexpp': 4.11.0 + '@eslint/config-array': 0.18.0 '@eslint/eslintrc': 3.1.0 - '@eslint/js': 9.5.0 + '@eslint/js': 9.10.0 + '@eslint/plugin-kit': 0.1.0 '@humanwhocodes/module-importer': 1.0.1 '@humanwhocodes/retry': 0.3.0 '@nodelib/fs.walk': 1.2.8 ajv: 6.12.6 chalk: 4.1.2 cross-spawn: 7.0.3 - debug: 4.3.5 + debug: 4.3.7 escape-string-regexp: 4.0.0 - eslint-scope: 8.0.1 + eslint-scope: 8.0.2 eslint-visitor-keys: 4.0.0 espree: 10.1.0 - esquery: 1.5.0 + esquery: 1.6.0 esutils: 2.0.3 fast-deep-equal: 3.1.3 file-entry-cache: 8.0.0 find-up: 5.0.0 glob-parent: 6.0.2 - ignore: 5.3.1 + ignore: 5.3.2 imurmurhash: 0.1.4 is-glob: 4.0.3 is-path-inside: 3.0.3 json-stable-stringify-without-jsonify: 1.0.1 - levn: 0.4.1 lodash.merge: 4.6.2 minimatch: 3.1.2 natural-compare: 1.4.0 optionator: 0.9.4 strip-ansi: 6.0.1 text-table: 0.2.0 + optionalDependencies: + jiti: 1.21.6 transitivePeerDependencies: - supports-color @@ -11377,19 +10656,19 @@ snapshots: espree@10.1.0: dependencies: - acorn: 8.12.0 - acorn-jsx: 5.3.2(acorn@8.12.0) + acorn: 8.12.1 + acorn-jsx: 5.3.2(acorn@8.12.1) eslint-visitor-keys: 4.0.0 espree@9.6.1: dependencies: - acorn: 8.12.0 - acorn-jsx: 5.3.2(acorn@8.12.0) + acorn: 8.12.1 + acorn-jsx: 5.3.2(acorn@8.12.1) eslint-visitor-keys: 3.4.3 esprima@4.0.1: {} - esquery@1.5.0: + esquery@1.6.0: dependencies: estraverse: 5.3.0 @@ -11411,8 +10690,8 @@ snapshots: event-emitter@0.3.5: dependencies: - d: 1.0.1 - es5-ext: 0.10.62 + d: 1.0.2 + es5-ext: 0.10.64 eventemitter3@5.0.1: {} @@ -11460,7 +10739,7 @@ snapshots: ext@1.7.0: dependencies: - type: 2.7.2 + type: 2.7.3 extend-shallow@2.0.1: dependencies: @@ -11515,15 +10794,17 @@ snapshots: '@nodelib/fs.walk': 1.2.8 glob-parent: 5.1.2 merge2: 1.4.1 - micromatch: 4.0.5 + micromatch: 4.0.8 fast-json-stable-stringify@2.1.0: {} fast-levenshtein@2.0.6: {} + fast-uri@3.0.1: {} + fastest-levenshtein@1.0.16: {} - fastq@1.15.0: + fastq@1.17.1: dependencies: reusify: 1.0.4 @@ -11546,7 +10827,7 @@ snapshots: dependencies: flat-cache: 4.0.1 - file-entry-cache@9.0.0: + file-entry-cache@9.1.0: dependencies: flat-cache: 5.0.0 @@ -11557,10 +10838,6 @@ snapshots: repeat-string: 1.6.1 to-regex-range: 2.1.1 - fill-range@7.0.1: - dependencies: - to-regex-range: 5.0.1 - fill-range@7.1.1: dependencies: to-regex-range: 5.0.1 @@ -11585,11 +10862,6 @@ snapshots: path-exists: 5.0.0 unicorn-magic: 0.1.0 - find-yarn-workspace-root2@1.2.16: - dependencies: - micromatch: 4.0.7 - pkg-dir: 4.2.0 - flat-cache@2.0.1: dependencies: flatted: 2.0.2 @@ -11616,12 +10888,12 @@ snapshots: for-in@1.0.2: {} - foreground-child@3.1.1: + foreground-child@3.2.0: dependencies: cross-spawn: 7.0.3 signal-exit: 4.1.0 - foreground-child@3.2.0: + foreground-child@3.3.0: dependencies: cross-spawn: 7.0.3 signal-exit: 4.1.0 @@ -11662,9 +10934,9 @@ snapshots: function.prototype.name@1.1.6: dependencies: - call-bind: 1.0.5 + call-bind: 1.0.7 define-properties: 1.2.1 - es-abstract: 1.22.3 + es-abstract: 1.23.3 functions-have-names: 1.2.3 functions-have-names@1.2.3: {} @@ -11693,7 +10965,7 @@ snapshots: function-bind: 1.1.2 has-proto: 1.0.1 has-symbols: 1.0.3 - hasown: 2.0.0 + hasown: 2.0.2 get-intrinsic@1.2.4: dependencies: @@ -11713,7 +10985,7 @@ snapshots: get-symbol-description@1.0.0: dependencies: - call-bind: 1.0.5 + call-bind: 1.0.7 get-intrinsic: 1.2.2 get-symbol-description@1.0.2: @@ -11722,11 +10994,7 @@ snapshots: es-errors: 1.3.0 get-intrinsic: 1.2.4 - get-tsconfig@4.7.2: - dependencies: - resolve-pkg-maps: 1.0.0 - - get-tsconfig@4.7.5: + get-tsconfig@4.8.1: dependencies: resolve-pkg-maps: 1.0.0 @@ -11759,22 +11027,23 @@ snapshots: glob-to-regexp@0.3.0: {} - glob@10.3.15: - dependencies: - foreground-child: 3.1.1 - jackspeak: 2.3.6 - minimatch: 9.0.4 - minipass: 7.1.1 - path-scurry: 1.11.1 - glob@10.4.1: dependencies: foreground-child: 3.2.0 jackspeak: 3.4.0 - minimatch: 9.0.4 + minimatch: 9.0.5 minipass: 7.1.2 path-scurry: 1.11.1 + glob@11.0.0: + dependencies: + foreground-child: 3.3.0 + jackspeak: 4.0.1 + minimatch: 10.0.1 + minipass: 7.1.2 + package-json-from-dist: 1.0.0 + path-scurry: 2.0.0 + glob@7.2.3: dependencies: fs.realpath: 1.0.0 @@ -11802,7 +11071,7 @@ snapshots: globals@14.0.0: {} - globals@15.6.0: {} + globals@15.9.0: {} globalthis@1.0.3: dependencies: @@ -11820,7 +11089,7 @@ snapshots: array-union: 2.1.0 dir-glob: 3.0.1 fast-glob: 3.3.2 - ignore: 5.3.1 + ignore: 5.3.2 merge2: 1.4.1 slash: 3.0.0 @@ -11828,7 +11097,7 @@ snapshots: dependencies: dir-glob: 3.0.1 fast-glob: 3.3.2 - ignore: 5.3.1 + ignore: 5.3.2 merge2: 1.4.1 slash: 4.0.0 @@ -11913,61 +11182,57 @@ snapshots: is-number: 3.0.0 kind-of: 4.0.0 - hasown@2.0.0: - dependencies: - function-bind: 1.1.2 - hasown@2.0.2: dependencies: function-bind: 1.1.2 hast-util-from-dom@5.0.0: dependencies: - '@types/hast': 3.0.3 + '@types/hast': 3.0.4 hastscript: 8.0.0 web-namespaces: 2.0.1 hast-util-from-html-isomorphic@2.0.0: dependencies: - '@types/hast': 3.0.3 + '@types/hast': 3.0.4 hast-util-from-dom: 5.0.0 - hast-util-from-html: 2.0.1 + hast-util-from-html: 2.0.2 unist-util-remove-position: 5.0.0 - hast-util-from-html@2.0.1: + hast-util-from-html@2.0.2: dependencies: - '@types/hast': 3.0.3 + '@types/hast': 3.0.4 devlop: 1.1.0 hast-util-from-parse5: 8.0.1 parse5: 7.1.2 - vfile: 6.0.1 + vfile: 6.0.3 vfile-message: 4.0.2 hast-util-from-parse5@8.0.1: dependencies: - '@types/hast': 3.0.3 - '@types/unist': 3.0.2 + '@types/hast': 3.0.4 + '@types/unist': 3.0.3 devlop: 1.1.0 hastscript: 8.0.0 property-information: 6.4.0 - vfile: 6.0.1 + vfile: 6.0.3 vfile-location: 5.0.2 web-namespaces: 2.0.1 hast-util-is-element@3.0.0: dependencies: - '@types/hast': 3.0.3 + '@types/hast': 3.0.4 hast-util-parse-selector@2.2.5: {} hast-util-parse-selector@4.0.0: dependencies: - '@types/hast': 3.0.3 + '@types/hast': 3.0.4 hast-util-raw@9.0.1: dependencies: - '@types/hast': 3.0.3 - '@types/unist': 3.0.2 + '@types/hast': 3.0.4 + '@types/unist': 3.0.3 '@ungap/structured-clone': 1.2.0 hast-util-from-parse5: 8.0.1 hast-util-to-parse5: 8.0.0 @@ -11976,15 +11241,15 @@ snapshots: parse5: 7.1.2 unist-util-position: 5.0.0 unist-util-visit: 5.0.0 - vfile: 6.0.1 + vfile: 6.0.3 web-namespaces: 2.0.1 zwitch: 2.0.4 hast-util-to-jsx-runtime@2.3.0: dependencies: '@types/estree': 1.0.5 - '@types/hast': 3.0.3 - '@types/unist': 3.0.2 + '@types/hast': 3.0.4 + '@types/unist': 3.0.3 comma-separated-tokens: 2.0.3 devlop: 1.1.0 estree-util-is-identifier-name: 3.0.0 @@ -12002,7 +11267,7 @@ snapshots: hast-util-to-parse5@8.0.0: dependencies: - '@types/hast': 3.0.3 + '@types/hast': 3.0.4 comma-separated-tokens: 2.0.3 devlop: 1.1.0 property-information: 6.4.0 @@ -12010,16 +11275,16 @@ snapshots: web-namespaces: 2.0.1 zwitch: 2.0.4 - hast-util-to-text@4.0.0: + hast-util-to-text@4.0.2: dependencies: - '@types/hast': 3.0.3 - '@types/unist': 3.0.2 + '@types/hast': 3.0.4 + '@types/unist': 3.0.3 hast-util-is-element: 3.0.0 unist-util-find-after: 5.0.0 hast-util-whitespace@3.0.0: dependencies: - '@types/hast': 3.0.3 + '@types/hast': 3.0.4 hastscript@6.0.0: dependencies: @@ -12031,7 +11296,7 @@ snapshots: hastscript@8.0.0: dependencies: - '@types/hast': 3.0.3 + '@types/hast': 3.0.4 comma-separated-tokens: 2.0.3 hast-util-parse-selector: 4.0.0 property-information: 6.4.0 @@ -12039,14 +11304,12 @@ snapshots: hastscript@9.0.0: dependencies: - '@types/hast': 3.0.3 + '@types/hast': 3.0.4 comma-separated-tokens: 2.0.3 hast-util-parse-selector: 4.0.0 property-information: 6.4.0 space-separated-tokens: 2.0.2 - he@1.2.0: {} - headers-polyfill@4.0.3: {} highlight.js@10.7.3: {} @@ -12073,7 +11336,7 @@ snapshots: https-proxy-agent@5.0.1: dependencies: agent-base: 6.0.2 - debug: 4.3.5 + debug: 4.3.7 transitivePeerDependencies: - supports-color optional: true @@ -12084,7 +11347,7 @@ snapshots: human-signals@5.0.0: {} - husky@9.0.11: {} + husky@9.1.6: {} iconv-lite@0.4.24: dependencies: @@ -12099,15 +11362,14 @@ snapshots: ignore@5.3.1: {} + ignore@5.3.2: {} + image-size@0.5.5: optional: true - immer@10.0.4: {} - - immer@10.1.1: - optional: true + immer@10.1.1: {} - immutable@4.3.6: {} + immutable@4.3.7: {} import-fresh@2.0.0: dependencies: @@ -12121,9 +11383,10 @@ snapshots: import-lazy@3.1.0: {} - import-lazy@4.0.0: {} + import-lazy@4.0.0: + optional: true - import-meta-resolve@4.0.0: {} + import-meta-resolve@4.1.0: {} imurmurhash@0.1.4: {} @@ -12147,7 +11410,7 @@ snapshots: internal-slot@1.0.6: dependencies: get-intrinsic: 1.2.2 - hasown: 2.0.0 + hasown: 2.0.2 side-channel: 1.0.4 internal-slot@1.0.7: @@ -12161,14 +11424,14 @@ snapshots: '@formatjs/ecma402-abstract': 1.18.0 '@formatjs/fast-memoize': 2.2.0 '@formatjs/icu-messageformat-parser': 2.7.3 - tslib: 2.6.3 + tslib: 2.7.0 intl-messageformat@9.13.0: dependencies: '@formatjs/ecma402-abstract': 1.11.4 '@formatjs/fast-memoize': 1.2.1 '@formatjs/icu-messageformat-parser': 2.1.0 - tslib: 2.6.3 + tslib: 2.7.0 is-accessor-descriptor@1.0.1: dependencies: @@ -12197,7 +11460,7 @@ snapshots: is-array-buffer@3.0.2: dependencies: - call-bind: 1.0.5 + call-bind: 1.0.7 get-intrinsic: 1.2.2 is-typed-array: 1.1.12 @@ -12222,20 +11485,20 @@ snapshots: is-boolean-object@1.1.2: dependencies: - call-bind: 1.0.5 + call-bind: 1.0.7 has-tostringtag: 1.0.0 is-buffer@1.1.6: {} is-buffer@2.0.5: {} - is-callable@1.2.7: {} - - is-core-module@2.13.1: + is-bun-module@1.2.1: dependencies: - hasown: 2.0.0 + semver: 7.6.3 + + is-callable@1.2.7: {} - is-core-module@2.14.0: + is-core-module@2.15.1: dependencies: hasown: 2.0.2 @@ -12350,7 +11613,7 @@ snapshots: is-regex@1.1.4: dependencies: - call-bind: 1.0.5 + call-bind: 1.0.7 has-tostringtag: 1.0.0 is-regexp@1.0.0: {} @@ -12359,7 +11622,7 @@ snapshots: is-shared-array-buffer@1.0.2: dependencies: - call-bind: 1.0.5 + call-bind: 1.0.7 is-shared-array-buffer@1.0.3: dependencies: @@ -12399,7 +11662,7 @@ snapshots: is-weakref@1.0.2: dependencies: - call-bind: 1.0.5 + call-bind: 1.0.7 is-weakset@2.0.3: dependencies: @@ -12436,19 +11699,19 @@ snapshots: reflect.getprototypeof: 1.0.6 set-function-name: 2.0.2 - jackspeak@2.3.6: + jackspeak@3.4.0: dependencies: '@isaacs/cliui': 8.0.2 optionalDependencies: '@pkgjs/parseargs': 0.11.0 - jackspeak@3.4.0: + jackspeak@4.0.1: dependencies: '@isaacs/cliui': 8.0.2 optionalDependencies: '@pkgjs/parseargs': 0.11.0 - jiti@1.21.0: {} + jiti@1.21.6: {} jju@1.4.0: {} @@ -12509,7 +11772,7 @@ snapshots: object.assign: 4.1.5 object.values: 1.2.0 - katex@0.16.10: + katex@0.16.11: dependencies: commander: 8.3.0 @@ -12533,12 +11796,8 @@ snapshots: known-css-properties@0.29.0: {} - known-css-properties@0.31.0: {} - known-css-properties@0.34.0: {} - kolorist@1.8.0: {} - language-subtag-registry@0.3.23: {} language-tags@1.0.9: @@ -12566,46 +11825,50 @@ snapshots: prelude-ls: 1.2.1 type-check: 0.4.0 - lightningcss-darwin-arm64@1.25.1: + lightningcss-darwin-arm64@1.27.0: + optional: true + + lightningcss-darwin-x64@1.27.0: optional: true - lightningcss-darwin-x64@1.25.1: + lightningcss-freebsd-x64@1.27.0: optional: true - lightningcss-freebsd-x64@1.25.1: + lightningcss-linux-arm-gnueabihf@1.27.0: optional: true - lightningcss-linux-arm-gnueabihf@1.25.1: + lightningcss-linux-arm64-gnu@1.27.0: optional: true - lightningcss-linux-arm64-gnu@1.25.1: + lightningcss-linux-arm64-musl@1.27.0: optional: true - lightningcss-linux-arm64-musl@1.25.1: + lightningcss-linux-x64-gnu@1.27.0: optional: true - lightningcss-linux-x64-gnu@1.25.1: + lightningcss-linux-x64-musl@1.27.0: optional: true - lightningcss-linux-x64-musl@1.25.1: + lightningcss-win32-arm64-msvc@1.27.0: optional: true - lightningcss-win32-x64-msvc@1.25.1: + lightningcss-win32-x64-msvc@1.27.0: optional: true - lightningcss@1.25.1: + lightningcss@1.27.0: dependencies: detect-libc: 1.0.3 optionalDependencies: - lightningcss-darwin-arm64: 1.25.1 - lightningcss-darwin-x64: 1.25.1 - lightningcss-freebsd-x64: 1.25.1 - lightningcss-linux-arm-gnueabihf: 1.25.1 - lightningcss-linux-arm64-gnu: 1.25.1 - lightningcss-linux-arm64-musl: 1.25.1 - lightningcss-linux-x64-gnu: 1.25.1 - lightningcss-linux-x64-musl: 1.25.1 - lightningcss-win32-x64-msvc: 1.25.1 + lightningcss-darwin-arm64: 1.27.0 + lightningcss-darwin-x64: 1.27.0 + lightningcss-freebsd-x64: 1.27.0 + lightningcss-linux-arm-gnueabihf: 1.27.0 + lightningcss-linux-arm64-gnu: 1.27.0 + lightningcss-linux-arm64-musl: 1.27.0 + lightningcss-linux-x64-gnu: 1.27.0 + lightningcss-linux-x64-musl: 1.27.0 + lightningcss-win32-arm64-msvc: 1.27.0 + lightningcss-win32-x64-msvc: 1.27.0 lilconfig@2.1.0: {} @@ -12613,27 +11876,27 @@ snapshots: lines-and-columns@1.2.4: {} - lint-staged@15.2.7: + lint-staged@15.2.10: dependencies: chalk: 5.3.0 commander: 12.1.0 - debug: 4.3.5 + debug: 4.3.7 execa: 8.0.1 lilconfig: 3.1.2 - listr2: 8.2.1 - micromatch: 4.0.7 + listr2: 8.2.4 + micromatch: 4.0.8 pidtree: 0.6.0 string-argv: 0.3.2 - yaml: 2.4.5 + yaml: 2.5.1 transitivePeerDependencies: - supports-color - listr2@8.2.1: + listr2@8.2.4: dependencies: cli-truncate: 4.0.0 colorette: 2.0.20 eventemitter3: 5.0.1 - log-update: 6.0.0 + log-update: 6.1.0 rfdc: 1.4.1 wrap-ansi: 9.0.0 @@ -12646,13 +11909,6 @@ snapshots: load-tsconfig@0.2.5: {} - load-yaml-file@0.2.0: - dependencies: - graceful-fs: 4.2.11 - js-yaml: 3.14.1 - pify: 4.0.1 - strip-bom: 3.0.0 - locate-character@3.0.0: {} locate-path@2.0.0: @@ -12676,10 +11932,6 @@ snapshots: lodash.camelcase@4.3.0: {} - lodash.get@4.4.2: {} - - lodash.isequal@4.5.0: {} - lodash.isplainobject@4.0.6: {} lodash.kebabcase@4.1.1: {} @@ -12706,10 +11958,10 @@ snapshots: dependencies: chalk: 2.4.2 - log-update@6.0.0: + log-update@6.1.0: dependencies: - ansi-escapes: 6.2.1 - cli-cursor: 4.0.0 + ansi-escapes: 7.0.0 + cli-cursor: 5.0.0 slice-ansi: 7.1.0 strip-ansi: 7.1.0 wrap-ansi: 9.0.0 @@ -12734,6 +11986,8 @@ snapshots: lru-cache@10.2.2: {} + lru-cache@11.0.1: {} + lru-cache@4.1.5: dependencies: pseudomap: 1.0.2 @@ -12746,15 +12000,20 @@ snapshots: lru-cache@6.0.0: dependencies: yallist: 4.0.0 + optional: true lru-queue@0.1.0: dependencies: - es5-ext: 0.10.62 + es5-ext: 0.10.64 magic-string@0.30.10: dependencies: '@jridgewell/sourcemap-codec': 1.4.15 + magic-string@0.30.11: + dependencies: + '@jridgewell/sourcemap-codec': 1.5.0 + make-dir@2.1.0: dependencies: pify: 4.0.1 @@ -12793,7 +12052,7 @@ snapshots: mdast-util-directive@3.0.0: dependencies: '@types/mdast': 4.0.3 - '@types/unist': 3.0.2 + '@types/unist': 3.0.3 devlop: 1.1.0 mdast-util-from-markdown: 2.0.0 mdast-util-to-markdown: 2.1.0 @@ -12813,7 +12072,7 @@ snapshots: mdast-util-from-markdown@2.0.0: dependencies: '@types/mdast': 4.0.3 - '@types/unist': 3.0.2 + '@types/unist': 3.0.3 decode-named-character-reference: 1.0.2 devlop: 1.1.0 mdast-util-to-string: 4.0.0 @@ -12886,7 +12145,7 @@ snapshots: mdast-util-math@3.0.0: dependencies: - '@types/hast': 3.0.3 + '@types/hast': 3.0.4 '@types/mdast': 4.0.3 devlop: 1.1.0 longest-streak: 3.1.0 @@ -12899,7 +12158,7 @@ snapshots: mdast-util-mdx-expression@2.0.0: dependencies: '@types/estree-jsx': 1.0.3 - '@types/hast': 3.0.3 + '@types/hast': 3.0.4 '@types/mdast': 4.0.3 devlop: 1.1.0 mdast-util-from-markdown: 2.0.0 @@ -12910,9 +12169,9 @@ snapshots: mdast-util-mdx-jsx@3.0.0: dependencies: '@types/estree-jsx': 1.0.3 - '@types/hast': 3.0.3 + '@types/hast': 3.0.4 '@types/mdast': 4.0.3 - '@types/unist': 3.0.2 + '@types/unist': 3.0.3 ccount: 2.0.1 devlop: 1.1.0 mdast-util-from-markdown: 2.0.0 @@ -12928,7 +12187,7 @@ snapshots: mdast-util-mdxjs-esm@2.0.1: dependencies: '@types/estree-jsx': 1.0.3 - '@types/hast': 3.0.3 + '@types/hast': 3.0.4 '@types/mdast': 4.0.3 devlop: 1.1.0 mdast-util-from-markdown: 2.0.0 @@ -12948,7 +12207,7 @@ snapshots: mdast-util-to-hast@13.0.2: dependencies: - '@types/hast': 3.0.3 + '@types/hast': 3.0.4 '@types/mdast': 4.0.3 '@ungap/structured-clone': 1.2.0 devlop: 1.1.0 @@ -12960,7 +12219,7 @@ snapshots: mdast-util-to-markdown@2.1.0: dependencies: '@types/mdast': 4.0.3 - '@types/unist': 3.0.2 + '@types/unist': 3.0.3 longest-streak: 3.1.0 mdast-util-phrasing: 4.0.0 mdast-util-to-string: 4.0.0 @@ -12974,17 +12233,6 @@ snapshots: mdn-data@2.0.30: {} - memoizee@0.4.15: - dependencies: - d: 1.0.1 - es5-ext: 0.10.62 - es6-weak-map: 2.0.3 - event-emitter: 0.3.5 - is-promise: 2.2.2 - lru-queue: 0.1.0 - next-tick: 1.1.0 - timers-ext: 0.1.7 - memoizee@0.4.17: dependencies: d: 1.0.2 @@ -13109,7 +12357,7 @@ snapshots: dependencies: '@types/katex': 0.16.7 devlop: 1.1.0 - katex: 0.16.10 + katex: 0.16.11 micromark-factory-space: 2.0.0 micromark-util-character: 2.0.1 micromark-util-symbol: 2.0.0 @@ -13210,7 +12458,7 @@ snapshots: micromark@4.0.0: dependencies: '@types/debug': 4.1.12 - debug: 4.3.5 + debug: 4.3.7 decode-named-character-reference: 1.0.2 devlop: 1.1.0 micromark-core-commonmark: 2.0.0 @@ -13247,12 +12495,7 @@ snapshots: transitivePeerDependencies: - supports-color - micromatch@4.0.5: - dependencies: - braces: 3.0.2 - picomatch: 2.3.1 - - micromatch@4.0.7: + micromatch@4.0.8: dependencies: braces: 3.0.3 picomatch: 2.3.1 @@ -13264,20 +12507,27 @@ snapshots: mimic-fn@4.0.0: {} + mimic-function@5.0.1: {} + mimic-response@2.1.0: optional: true min-indent@1.0.1: {} + minimatch@10.0.1: + dependencies: + brace-expansion: 2.0.1 + minimatch@3.0.8: dependencies: brace-expansion: 1.1.11 + optional: true minimatch@3.1.2: dependencies: brace-expansion: 1.1.11 - minimatch@9.0.4: + minimatch@9.0.5: dependencies: brace-expansion: 2.0.1 @@ -13322,11 +12572,9 @@ snapshots: ms@2.0.0: {} - ms@2.1.2: {} - ms@2.1.3: {} - msw@2.3.1(typescript@5.4.5): + msw@2.3.1(typescript@5.6.2): dependencies: '@bundled-es-modules/cookie': 2.0.0 '@bundled-es-modules/statuses': 1.0.1 @@ -13346,9 +12594,7 @@ snapshots: type-fest: 4.20.0 yargs: 17.7.2 optionalDependencies: - typescript: 5.4.5 - - muggle-string@0.3.1: {} + typescript: 5.6.2 mute-stream@1.0.0: {} @@ -13407,6 +12653,8 @@ snapshots: node-releases@2.0.14: {} + node-releases@2.0.18: {} + nopt@5.0.0: dependencies: abbrev: 1.1.1 @@ -13495,20 +12743,14 @@ snapshots: dependencies: call-bind: 1.0.7 define-properties: 1.2.1 - es-abstract: 1.23.2 + es-abstract: 1.23.3 es-object-atoms: 1.0.0 object.groupby@1.0.3: dependencies: call-bind: 1.0.7 - define-properties: 1.2.1 - es-abstract: 1.23.2 - - object.hasown@1.1.4: - dependencies: define-properties: 1.2.1 es-abstract: 1.23.3 - es-object-atoms: 1.0.0 object.pick@1.3.0: dependencies: @@ -13532,6 +12774,10 @@ snapshots: dependencies: mimic-fn: 4.0.0 + onetime@7.0.0: + dependencies: + mimic-function: 5.0.1 + optionator@0.9.4: dependencies: deep-is: 0.1.4 @@ -13565,7 +12811,7 @@ snapshots: p-limit@4.0.0: dependencies: - yocto-queue: 1.0.0 + yocto-queue: 1.1.1 p-locate@2.0.0: dependencies: @@ -13589,6 +12835,10 @@ snapshots: p-try@2.2.0: {} + package-json-from-dist@1.0.0: {} + + package-manager-detector@0.2.0: {} + parent-module@1.0.1: dependencies: callsites: 3.1.0 @@ -13629,7 +12879,7 @@ snapshots: parse-json@5.2.0: dependencies: - '@babel/code-frame': 7.24.2 + '@babel/code-frame': 7.24.7 error-ex: 1.3.2 json-parse-even-better-errors: 2.3.1 lines-and-columns: 1.2.4 @@ -13669,6 +12919,11 @@ snapshots: lru-cache: 10.2.2 minipass: 7.1.1 + path-scurry@2.0.0: + dependencies: + lru-cache: 11.0.1 + minipass: 7.1.2 + path-to-regexp@6.2.2: {} path-type@3.0.0: @@ -13696,9 +12951,7 @@ snapshots: picocolors@0.2.1: {} - picocolors@1.0.0: {} - - picocolors@1.0.1: {} + picocolors@1.1.0: {} picomatch@2.3.1: {} @@ -13712,25 +12965,21 @@ snapshots: pirates@4.0.6: {} - pkg-dir@4.2.0: - dependencies: - find-up: 4.1.0 - posix-character-classes@0.1.1: {} possible-typed-array-names@1.0.0: {} - postcss-html@0.36.0(postcss-syntax@0.36.2(postcss-less@6.0.0(postcss@8.4.38))(postcss@8.4.38))(postcss@7.0.39): + postcss-html@0.36.0(postcss-syntax@0.36.2(postcss-less@6.0.0(postcss@8.4.45))(postcss@8.4.45))(postcss@7.0.39): dependencies: htmlparser2: 3.10.1 postcss: 7.0.39 - postcss-syntax: 0.36.2(postcss-html@0.36.0(postcss-syntax@0.36.2(postcss-less@6.0.0(postcss@8.4.38))(postcss@8.4.38))(postcss@7.0.39))(postcss-jsx@0.36.4(postcss-syntax@0.36.2(postcss-less@6.0.0(postcss@8.4.38))(postcss@8.4.38))(postcss@7.0.39))(postcss-less@3.1.4)(postcss-markdown@0.36.0(postcss-syntax@0.36.2(postcss-less@6.0.0(postcss@8.4.38))(postcss@8.4.38))(postcss@7.0.39))(postcss-scss@2.1.1)(postcss@7.0.39) + postcss-syntax: 0.36.2(postcss-html@0.36.0(postcss-syntax@0.36.2(postcss-less@6.0.0(postcss@8.4.45))(postcss@8.4.45))(postcss@7.0.39))(postcss-jsx@0.36.4(postcss-syntax@0.36.2(postcss-less@6.0.0(postcss@8.4.45))(postcss@8.4.45))(postcss@7.0.39))(postcss-less@3.1.4)(postcss-markdown@0.36.0(postcss-syntax@0.36.2(postcss-less@6.0.0(postcss@8.4.45))(postcss@8.4.45))(postcss@7.0.39))(postcss-scss@2.1.1)(postcss@7.0.39) - postcss-jsx@0.36.4(postcss-syntax@0.36.2(postcss-less@6.0.0(postcss@8.4.38))(postcss@8.4.38))(postcss@7.0.39): + postcss-jsx@0.36.4(postcss-syntax@0.36.2(postcss-less@6.0.0(postcss@8.4.45))(postcss@8.4.45))(postcss@7.0.39): dependencies: - '@babel/core': 7.24.7 + '@babel/core': 7.25.2 postcss: 7.0.39 - postcss-syntax: 0.36.2(postcss-html@0.36.0(postcss-syntax@0.36.2(postcss-less@6.0.0(postcss@8.4.38))(postcss@8.4.38))(postcss@7.0.39))(postcss-jsx@0.36.4(postcss-syntax@0.36.2(postcss-less@6.0.0(postcss@8.4.38))(postcss@8.4.38))(postcss@7.0.39))(postcss-less@3.1.4)(postcss-markdown@0.36.0(postcss-syntax@0.36.2(postcss-less@6.0.0(postcss@8.4.38))(postcss@8.4.38))(postcss@7.0.39))(postcss-scss@2.1.1)(postcss@7.0.39) + postcss-syntax: 0.36.2(postcss-html@0.36.0(postcss-syntax@0.36.2(postcss-less@6.0.0(postcss@8.4.45))(postcss@8.4.45))(postcss@7.0.39))(postcss-jsx@0.36.4(postcss-syntax@0.36.2(postcss-less@6.0.0(postcss@8.4.45))(postcss@8.4.45))(postcss@7.0.39))(postcss-less@3.1.4)(postcss-markdown@0.36.0(postcss-syntax@0.36.2(postcss-less@6.0.0(postcss@8.4.45))(postcss@8.4.45))(postcss@7.0.39))(postcss-scss@2.1.1)(postcss@7.0.39) transitivePeerDependencies: - supports-color @@ -13738,30 +12987,40 @@ snapshots: dependencies: postcss: 7.0.39 - postcss-less@6.0.0(postcss@8.4.38): + postcss-less@6.0.0(postcss@8.4.45): dependencies: - postcss: 8.4.38 + postcss: 8.4.45 - postcss-load-config@3.1.4(postcss@8.4.38)(ts-node@10.9.2(@types/node@20.14.9)(typescript@5.5.2)): + postcss-load-config@3.1.4(postcss@8.4.45)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@18.19.50)(typescript@5.5.4)): dependencies: lilconfig: 2.1.0 yaml: 1.10.2 optionalDependencies: - postcss: 8.4.38 - ts-node: 10.9.2(@swc/core@1.6.5)(@types/node@20.14.9)(typescript@5.5.2) + postcss: 8.4.45 + ts-node: 10.9.2(@swc/core@1.7.26)(@types/node@18.19.50)(typescript@5.5.4) + optional: true + + postcss-load-config@3.1.4(postcss@8.4.45)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@22.5.4)(typescript@5.6.2)): + dependencies: + lilconfig: 2.1.0 + yaml: 1.10.2 + optionalDependencies: + postcss: 8.4.45 + ts-node: 10.9.2(@swc/core@1.7.26)(@types/node@22.5.4)(typescript@5.6.2) - postcss-load-config@4.0.2(postcss@8.4.38)(ts-node@10.9.2(@swc/core@1.6.5)(@types/node@20.14.9)(typescript@5.5.2)): + postcss-load-config@6.0.1(jiti@1.21.6)(postcss@8.4.45)(tsx@4.19.1)(yaml@2.5.1): dependencies: lilconfig: 3.1.2 - yaml: 2.4.5 optionalDependencies: - postcss: 8.4.38 - ts-node: 10.9.2(@swc/core@1.6.5)(@types/node@20.14.9)(typescript@5.5.2) + jiti: 1.21.6 + postcss: 8.4.45 + tsx: 4.19.1 + yaml: 2.5.1 - postcss-markdown@0.36.0(postcss-syntax@0.36.2(postcss-less@6.0.0(postcss@8.4.38))(postcss@8.4.38))(postcss@7.0.39): + postcss-markdown@0.36.0(postcss-syntax@0.36.2(postcss-less@6.0.0(postcss@8.4.45))(postcss@8.4.45))(postcss@7.0.39): dependencies: postcss: 7.0.39 - postcss-syntax: 0.36.2(postcss-html@0.36.0(postcss-syntax@0.36.2(postcss-less@6.0.0(postcss@8.4.38))(postcss@8.4.38))(postcss@7.0.39))(postcss-jsx@0.36.4(postcss-syntax@0.36.2(postcss-less@6.0.0(postcss@8.4.38))(postcss@8.4.38))(postcss@7.0.39))(postcss-less@3.1.4)(postcss-markdown@0.36.0(postcss-syntax@0.36.2(postcss-less@6.0.0(postcss@8.4.38))(postcss@8.4.38))(postcss@7.0.39))(postcss-scss@2.1.1)(postcss@7.0.39) + postcss-syntax: 0.36.2(postcss-html@0.36.0(postcss-syntax@0.36.2(postcss-less@6.0.0(postcss@8.4.45))(postcss@8.4.45))(postcss@7.0.39))(postcss-jsx@0.36.4(postcss-syntax@0.36.2(postcss-less@6.0.0(postcss@8.4.45))(postcss@8.4.45))(postcss@7.0.39))(postcss-less@3.1.4)(postcss-markdown@0.36.0(postcss-syntax@0.36.2(postcss-less@6.0.0(postcss@8.4.45))(postcss@8.4.45))(postcss@7.0.39))(postcss-scss@2.1.1)(postcss@7.0.39) remark: 10.0.1 unist-util-find-all-after: 1.0.5 @@ -13776,17 +13035,19 @@ snapshots: postcss-resolve-nested-selector@0.1.1: {} + postcss-resolve-nested-selector@0.1.6: {} + postcss-safe-parser@4.0.2: dependencies: postcss: 7.0.39 - postcss-safe-parser@6.0.0(postcss@8.4.38): + postcss-safe-parser@6.0.0(postcss@8.4.45): dependencies: - postcss: 8.4.38 + postcss: 8.4.45 - postcss-safe-parser@7.0.0(postcss@8.4.38): + postcss-safe-parser@7.0.0(postcss@8.4.45): dependencies: - postcss: 8.4.38 + postcss: 8.4.45 postcss-sass@0.3.5: dependencies: @@ -13797,9 +13058,9 @@ snapshots: dependencies: postcss: 7.0.39 - postcss-scss@4.0.9(postcss@8.4.38): + postcss-scss@4.0.9(postcss@8.4.45): dependencies: - postcss: 8.4.38 + postcss: 8.4.45 postcss-selector-parser@3.1.2: dependencies: @@ -13812,7 +13073,7 @@ snapshots: cssesc: 3.0.0 util-deprecate: 1.0.2 - postcss-selector-parser@6.1.0: + postcss-selector-parser@6.1.2: dependencies: cssesc: 3.0.0 util-deprecate: 1.0.2 @@ -13822,18 +13083,18 @@ snapshots: lodash: 4.17.21 postcss: 7.0.39 - postcss-sorting@8.0.2(postcss@8.4.38): + postcss-sorting@8.0.2(postcss@8.4.45): dependencies: - postcss: 8.4.38 + postcss: 8.4.45 - postcss-syntax@0.36.2(postcss-html@0.36.0(postcss-syntax@0.36.2(postcss-less@6.0.0(postcss@8.4.38))(postcss@8.4.38))(postcss@7.0.39))(postcss-jsx@0.36.4(postcss-syntax@0.36.2(postcss-less@6.0.0(postcss@8.4.38))(postcss@8.4.38))(postcss@7.0.39))(postcss-less@3.1.4)(postcss-markdown@0.36.0(postcss-syntax@0.36.2(postcss-less@6.0.0(postcss@8.4.38))(postcss@8.4.38))(postcss@7.0.39))(postcss-scss@2.1.1)(postcss@7.0.39): + postcss-syntax@0.36.2(postcss-html@0.36.0(postcss-syntax@0.36.2(postcss-less@6.0.0(postcss@8.4.45))(postcss@8.4.45))(postcss@7.0.39))(postcss-jsx@0.36.4(postcss-syntax@0.36.2(postcss-less@6.0.0(postcss@8.4.45))(postcss@8.4.45))(postcss@7.0.39))(postcss-less@3.1.4)(postcss-markdown@0.36.0(postcss-syntax@0.36.2(postcss-less@6.0.0(postcss@8.4.45))(postcss@8.4.45))(postcss@7.0.39))(postcss-scss@2.1.1)(postcss@7.0.39): dependencies: postcss: 7.0.39 optionalDependencies: - postcss-html: 0.36.0(postcss-syntax@0.36.2(postcss-less@6.0.0(postcss@8.4.38))(postcss@8.4.38))(postcss@7.0.39) - postcss-jsx: 0.36.4(postcss-syntax@0.36.2(postcss-less@6.0.0(postcss@8.4.38))(postcss@8.4.38))(postcss@7.0.39) + postcss-html: 0.36.0(postcss-syntax@0.36.2(postcss-less@6.0.0(postcss@8.4.45))(postcss@8.4.45))(postcss@7.0.39) + postcss-jsx: 0.36.4(postcss-syntax@0.36.2(postcss-less@6.0.0(postcss@8.4.45))(postcss@8.4.45))(postcss@7.0.39) postcss-less: 3.1.4 - postcss-markdown: 0.36.0(postcss-syntax@0.36.2(postcss-less@6.0.0(postcss@8.4.38))(postcss@8.4.38))(postcss@7.0.39) + postcss-markdown: 0.36.0(postcss-syntax@0.36.2(postcss-less@6.0.0(postcss@8.4.45))(postcss@8.4.45))(postcss@7.0.39) postcss-scss: 2.1.1 postcss-value-parser@3.3.1: {} @@ -13845,18 +13106,11 @@ snapshots: picocolors: 0.2.1 source-map: 0.6.1 - postcss@8.4.38: + postcss@8.4.45: dependencies: nanoid: 3.3.7 - picocolors: 1.0.0 - source-map-js: 1.2.0 - - preferred-pm@3.1.3: - dependencies: - find-up: 5.0.0 - find-yarn-workspace-root2: 1.2.16 - path-exists: 4.0.0 - which-pm: 2.0.0 + picocolors: 1.1.0 + source-map-js: 1.2.1 prelude-ls@1.2.1: {} @@ -13864,21 +13118,21 @@ snapshots: dependencies: fast-diff: 1.3.0 - prettier-plugin-packagejson@2.5.0(prettier@3.3.2): + prettier-plugin-packagejson@2.5.2(prettier@3.3.3): dependencies: - sort-package-json: 2.10.0 - synckit: 0.9.0 + sort-package-json: 2.10.1 + synckit: 0.9.1 optionalDependencies: - prettier: 3.3.2 + prettier: 3.3.3 - prettier-plugin-svelte@3.2.5(prettier@3.3.2)(svelte@4.2.18): + prettier-plugin-svelte@3.2.6(prettier@3.3.3)(svelte@4.2.19): dependencies: - prettier: 3.3.2 - svelte: 4.2.18 + prettier: 3.3.3 + svelte: 4.2.19 prettier@2.8.8: {} - prettier@3.3.2: {} + prettier@3.3.3: {} prismjs@1.27.0: {} @@ -13974,28 +13228,24 @@ snapshots: punycode@2.3.1: {} - qrcode.react@3.1.0(react@18.3.1): - dependencies: - react: 18.3.1 - queue-microtask@1.2.3: {} quick-lru@1.1.0: {} - rc-cascader@3.26.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1): + rc-cascader@3.28.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: - '@babel/runtime': 7.24.7 + '@babel/runtime': 7.25.6 array-tree-filter: 2.1.0 classnames: 2.5.1 - rc-select: 14.14.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - rc-tree: 5.8.8(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + rc-select: 14.15.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + rc-tree: 5.9.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) rc-util: 5.43.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) react: 18.3.1 react-dom: 18.3.1(react@18.3.1) rc-checkbox@3.3.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: - '@babel/runtime': 7.24.7 + '@babel/runtime': 7.25.6 classnames: 2.5.1 rc-util: 5.43.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) react: 18.3.1 @@ -14003,7 +13253,7 @@ snapshots: rc-collapse@3.7.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: - '@babel/runtime': 7.24.7 + '@babel/runtime': 7.25.6 classnames: 2.5.1 rc-motion: 2.9.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1) rc-util: 5.43.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) @@ -14012,7 +13262,7 @@ snapshots: rc-dialog@9.5.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: - '@babel/runtime': 7.24.7 + '@babel/runtime': 7.25.6 '@rc-component/portal': 1.1.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1) classnames: 2.5.1 rc-motion: 2.9.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1) @@ -14022,7 +13272,7 @@ snapshots: rc-drawer@7.2.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: - '@babel/runtime': 7.24.7 + '@babel/runtime': 7.25.6 '@rc-component/portal': 1.1.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1) classnames: 2.5.1 rc-motion: 2.9.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1) @@ -14032,16 +13282,16 @@ snapshots: rc-dropdown@4.2.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: - '@babel/runtime': 7.24.7 - '@rc-component/trigger': 2.2.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@babel/runtime': 7.25.6 + '@rc-component/trigger': 2.2.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1) classnames: 2.5.1 rc-util: 5.43.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) react: 18.3.1 react-dom: 18.3.1(react@18.3.1) - rc-field-form@2.2.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1): + rc-field-form@2.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: - '@babel/runtime': 7.24.7 + '@babel/runtime': 7.25.6 '@rc-component/async-validator': 5.0.4 rc-util: 5.43.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) react: 18.3.1 @@ -14049,7 +13299,7 @@ snapshots: rc-image@7.9.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: - '@babel/runtime': 7.24.7 + '@babel/runtime': 7.25.6 '@rc-component/portal': 1.1.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1) classnames: 2.5.1 rc-dialog: 9.5.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1) @@ -14058,40 +13308,40 @@ snapshots: react: 18.3.1 react-dom: 18.3.1(react@18.3.1) - rc-input-number@9.1.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1): + rc-input-number@9.2.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: - '@babel/runtime': 7.24.7 + '@babel/runtime': 7.25.6 '@rc-component/mini-decimal': 1.1.0 classnames: 2.5.1 - rc-input: 1.5.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + rc-input: 1.6.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1) rc-util: 5.43.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) react: 18.3.1 react-dom: 18.3.1(react@18.3.1) - rc-input@1.5.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1): + rc-input@1.6.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: - '@babel/runtime': 7.24.7 + '@babel/runtime': 7.25.6 classnames: 2.5.1 rc-util: 5.43.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) react: 18.3.1 react-dom: 18.3.1(react@18.3.1) - rc-mentions@2.14.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1): + rc-mentions@2.15.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: - '@babel/runtime': 7.24.7 - '@rc-component/trigger': 2.2.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@babel/runtime': 7.25.6 + '@rc-component/trigger': 2.2.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1) classnames: 2.5.1 - rc-input: 1.5.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + rc-input: 1.6.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1) rc-menu: 9.14.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - rc-textarea: 1.7.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + rc-textarea: 1.8.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1) rc-util: 5.43.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) react: 18.3.1 react-dom: 18.3.1(react@18.3.1) rc-menu@9.14.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: - '@babel/runtime': 7.24.7 - '@rc-component/trigger': 2.2.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@babel/runtime': 7.25.6 + '@rc-component/trigger': 2.2.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1) classnames: 2.5.1 rc-motion: 2.9.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1) rc-overflow: 1.3.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1) @@ -14101,7 +13351,7 @@ snapshots: rc-motion@2.9.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: - '@babel/runtime': 7.24.7 + '@babel/runtime': 7.25.6 classnames: 2.5.1 rc-util: 5.43.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) react: 18.3.1 @@ -14109,7 +13359,7 @@ snapshots: rc-notification@5.6.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: - '@babel/runtime': 7.24.7 + '@babel/runtime': 7.25.6 classnames: 2.5.1 rc-motion: 2.9.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1) rc-util: 5.43.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) @@ -14118,25 +13368,25 @@ snapshots: rc-overflow@1.3.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: - '@babel/runtime': 7.24.7 + '@babel/runtime': 7.25.6 classnames: 2.5.1 rc-resize-observer: 1.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) rc-util: 5.43.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) react: 18.3.1 react-dom: 18.3.1(react@18.3.1) - rc-pagination@4.0.4(react-dom@18.3.1(react@18.3.1))(react@18.3.1): + rc-pagination@4.2.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: - '@babel/runtime': 7.24.7 + '@babel/runtime': 7.25.6 classnames: 2.5.1 rc-util: 5.43.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) react: 18.3.1 react-dom: 18.3.1(react@18.3.1) - rc-picker@4.5.0(dayjs@1.11.11)(react-dom@18.3.1(react@18.3.1))(react@18.3.1): + rc-picker@4.6.14(dayjs@1.11.13)(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: - '@babel/runtime': 7.24.7 - '@rc-component/trigger': 2.2.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@babel/runtime': 7.25.6 + '@rc-component/trigger': 2.2.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1) classnames: 2.5.1 rc-overflow: 1.3.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1) rc-resize-observer: 1.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) @@ -14144,11 +13394,11 @@ snapshots: react: 18.3.1 react-dom: 18.3.1(react@18.3.1) optionalDependencies: - dayjs: 1.11.11 + dayjs: 1.11.13 rc-progress@4.0.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: - '@babel/runtime': 7.24.7 + '@babel/runtime': 7.25.6 classnames: 2.5.1 rc-util: 5.43.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) react: 18.3.1 @@ -14156,7 +13406,7 @@ snapshots: rc-rate@2.13.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: - '@babel/runtime': 7.24.7 + '@babel/runtime': 7.25.6 classnames: 2.5.1 rc-util: 5.43.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) react: 18.3.1 @@ -14164,7 +13414,7 @@ snapshots: rc-resize-observer@1.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: - '@babel/runtime': 7.24.7 + '@babel/runtime': 7.25.6 classnames: 2.5.1 rc-util: 5.43.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) react: 18.3.1 @@ -14173,28 +13423,28 @@ snapshots: rc-segmented@2.3.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: - '@babel/runtime': 7.24.7 + '@babel/runtime': 7.25.6 classnames: 2.5.1 rc-motion: 2.9.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1) rc-util: 5.43.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) react: 18.3.1 react-dom: 18.3.1(react@18.3.1) - rc-select@14.14.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1): + rc-select@14.15.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: - '@babel/runtime': 7.24.7 - '@rc-component/trigger': 2.2.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@babel/runtime': 7.25.6 + '@rc-component/trigger': 2.2.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1) classnames: 2.5.1 rc-motion: 2.9.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1) rc-overflow: 1.3.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1) rc-util: 5.43.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - rc-virtual-list: 3.14.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + rc-virtual-list: 3.14.5(react-dom@18.3.1(react@18.3.1))(react@18.3.1) react: 18.3.1 react-dom: 18.3.1(react@18.3.1) - rc-slider@10.6.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1): + rc-slider@11.1.5(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: - '@babel/runtime': 7.24.7 + '@babel/runtime': 7.25.6 classnames: 2.5.1 rc-util: 5.43.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) react: 18.3.1 @@ -14202,7 +13452,7 @@ snapshots: rc-steps@6.0.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: - '@babel/runtime': 7.24.7 + '@babel/runtime': 7.25.6 classnames: 2.5.1 rc-util: 5.43.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) react: 18.3.1 @@ -14210,7 +13460,7 @@ snapshots: rc-switch@4.1.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: - '@babel/runtime': 7.24.7 + '@babel/runtime': 7.25.6 classnames: 2.5.1 rc-util: 5.43.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) react: 18.3.1 @@ -14218,18 +13468,18 @@ snapshots: rc-table@7.45.7(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: - '@babel/runtime': 7.24.7 + '@babel/runtime': 7.25.6 '@rc-component/context': 1.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) classnames: 2.5.1 rc-resize-observer: 1.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) rc-util: 5.43.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - rc-virtual-list: 3.14.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + rc-virtual-list: 3.14.5(react-dom@18.3.1(react@18.3.1))(react@18.3.1) react: 18.3.1 react-dom: 18.3.1(react@18.3.1) rc-tabs@15.1.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: - '@babel/runtime': 7.24.7 + '@babel/runtime': 7.25.6 classnames: 2.5.1 rc-dropdown: 4.2.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) rc-menu: 9.14.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1) @@ -14239,11 +13489,11 @@ snapshots: react: 18.3.1 react-dom: 18.3.1(react@18.3.1) - rc-textarea@1.7.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1): + rc-textarea@1.8.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: - '@babel/runtime': 7.24.7 + '@babel/runtime': 7.25.6 classnames: 2.5.1 - rc-input: 1.5.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + rc-input: 1.6.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1) rc-resize-observer: 1.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) rc-util: 5.43.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) react: 18.3.1 @@ -14251,57 +13501,50 @@ snapshots: rc-tooltip@6.2.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: - '@babel/runtime': 7.24.7 - '@rc-component/trigger': 2.2.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@babel/runtime': 7.25.6 + '@rc-component/trigger': 2.2.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1) classnames: 2.5.1 react: 18.3.1 react-dom: 18.3.1(react@18.3.1) - rc-tree-select@5.21.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1): + rc-tree-select@5.23.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: - '@babel/runtime': 7.24.7 + '@babel/runtime': 7.25.6 classnames: 2.5.1 - rc-select: 14.14.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - rc-tree: 5.8.8(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + rc-select: 14.15.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + rc-tree: 5.9.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) rc-util: 5.43.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) react: 18.3.1 react-dom: 18.3.1(react@18.3.1) - rc-tree@5.8.8(react-dom@18.3.1(react@18.3.1))(react@18.3.1): + rc-tree@5.9.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: - '@babel/runtime': 7.24.7 + '@babel/runtime': 7.25.6 classnames: 2.5.1 rc-motion: 2.9.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1) rc-util: 5.43.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - rc-virtual-list: 3.14.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + rc-virtual-list: 3.14.5(react-dom@18.3.1(react@18.3.1))(react@18.3.1) react: 18.3.1 react-dom: 18.3.1(react@18.3.1) - rc-upload@4.5.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1): + rc-upload@4.7.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: - '@babel/runtime': 7.24.7 + '@babel/runtime': 7.25.6 classnames: 2.5.1 rc-util: 5.43.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) react: 18.3.1 react-dom: 18.3.1(react@18.3.1) - rc-util@5.40.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1): - dependencies: - '@babel/runtime': 7.24.5 - react: 18.3.1 - react-dom: 18.3.1(react@18.3.1) - react-is: 18.3.1 - rc-util@5.43.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: - '@babel/runtime': 7.24.7 + '@babel/runtime': 7.25.6 react: 18.3.1 react-dom: 18.3.1(react@18.3.1) react-is: 18.3.1 - rc-virtual-list@3.14.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1): + rc-virtual-list@3.14.5(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: - '@babel/runtime': 7.24.7 + '@babel/runtime': 7.25.6 classnames: 2.5.1 rc-resize-observer: 1.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) rc-util: 5.43.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) @@ -14318,10 +13561,10 @@ snapshots: react-is@18.3.1: {} - react-markdown@9.0.1(@types/react@18.3.3)(react@18.3.1): + react-markdown@9.0.1(@types/react@18.3.5)(react@18.3.1): dependencies: - '@types/hast': 3.0.3 - '@types/react': 18.3.3 + '@types/hast': 3.0.4 + '@types/react': 18.3.5 devlop: 1.1.0 hast-util-to-jsx-runtime: 2.3.0 html-url-attributes: 3.0.0 @@ -14331,13 +13574,13 @@ snapshots: remark-rehype: 11.1.0 unified: 11.0.4 unist-util-visit: 5.0.0 - vfile: 6.0.1 + vfile: 6.0.3 transitivePeerDependencies: - supports-color react-syntax-highlighter@15.5.0(react@18.3.1): dependencies: - '@babel/runtime': 7.24.4 + '@babel/runtime': 7.25.6 highlight.js: 10.7.3 lowlight: 1.20.0 prismjs: 1.29.0 @@ -14389,7 +13632,7 @@ snapshots: es-errors: 1.3.0 get-intrinsic: 1.2.4 globalthis: 1.0.4 - which-builtin-type: 1.1.3 + which-builtin-type: 1.1.4 refractor@3.6.0: dependencies: @@ -14406,7 +13649,7 @@ snapshots: regexp.prototype.flags@1.5.1: dependencies: - call-bind: 1.0.5 + call-bind: 1.0.7 define-properties: 1.2.1 set-function-name: 2.0.1 @@ -14417,21 +13660,21 @@ snapshots: es-errors: 1.3.0 set-function-name: 2.0.2 - rehype-katex@7.0.0: + rehype-katex@7.0.1: dependencies: - '@types/hast': 3.0.3 + '@types/hast': 3.0.4 '@types/katex': 0.16.7 hast-util-from-html-isomorphic: 2.0.0 - hast-util-to-text: 4.0.0 - katex: 0.16.10 + hast-util-to-text: 4.0.2 + katex: 0.16.11 unist-util-visit-parents: 6.0.1 - vfile: 6.0.1 + vfile: 6.0.3 rehype-raw@7.0.0: dependencies: - '@types/hast': 3.0.3 + '@types/hast': 3.0.4 hast-util-raw: 9.0.1 - vfile: 6.0.1 + vfile: 6.0.3 remark-breaks@4.0.0: dependencies: @@ -14497,11 +13740,11 @@ snapshots: remark-rehype@11.1.0: dependencies: - '@types/hast': 3.0.3 + '@types/hast': 3.0.4 '@types/mdast': 4.0.3 mdast-util-to-hast: 13.0.2 unified: 11.0.4 - vfile: 6.0.1 + vfile: 6.0.3 remark-stringify@11.0.0: dependencies: @@ -14554,27 +13797,22 @@ snapshots: resolve-url@0.2.1: {} - resolve@1.19.0: - dependencies: - is-core-module: 2.13.1 - path-parse: 1.0.7 - resolve@1.22.8: dependencies: - is-core-module: 2.13.1 + is-core-module: 2.15.1 path-parse: 1.0.7 supports-preserve-symlinks-flag: 1.0.0 resolve@2.0.0-next.5: dependencies: - is-core-module: 2.14.0 + is-core-module: 2.15.1 path-parse: 1.0.7 supports-preserve-symlinks-flag: 1.0.0 - restore-cursor@4.0.0: + restore-cursor@5.1.0: dependencies: - onetime: 5.1.2 - signal-exit: 3.0.7 + onetime: 7.0.0 + signal-exit: 4.1.0 ret@0.1.15: {} @@ -14595,30 +13833,31 @@ snapshots: glob: 7.2.3 optional: true - rimraf@5.0.7: + rimraf@6.0.1: dependencies: - glob: 10.3.15 + glob: 11.0.0 + package-json-from-dist: 1.0.0 - rollup@4.18.0: + rollup@4.21.2: dependencies: '@types/estree': 1.0.5 optionalDependencies: - '@rollup/rollup-android-arm-eabi': 4.18.0 - '@rollup/rollup-android-arm64': 4.18.0 - '@rollup/rollup-darwin-arm64': 4.18.0 - '@rollup/rollup-darwin-x64': 4.18.0 - '@rollup/rollup-linux-arm-gnueabihf': 4.18.0 - '@rollup/rollup-linux-arm-musleabihf': 4.18.0 - '@rollup/rollup-linux-arm64-gnu': 4.18.0 - '@rollup/rollup-linux-arm64-musl': 4.18.0 - '@rollup/rollup-linux-powerpc64le-gnu': 4.18.0 - '@rollup/rollup-linux-riscv64-gnu': 4.18.0 - '@rollup/rollup-linux-s390x-gnu': 4.18.0 - '@rollup/rollup-linux-x64-gnu': 4.18.0 - '@rollup/rollup-linux-x64-musl': 4.18.0 - '@rollup/rollup-win32-arm64-msvc': 4.18.0 - '@rollup/rollup-win32-ia32-msvc': 4.18.0 - '@rollup/rollup-win32-x64-msvc': 4.18.0 + '@rollup/rollup-android-arm-eabi': 4.21.2 + '@rollup/rollup-android-arm64': 4.21.2 + '@rollup/rollup-darwin-arm64': 4.21.2 + '@rollup/rollup-darwin-x64': 4.21.2 + '@rollup/rollup-linux-arm-gnueabihf': 4.21.2 + '@rollup/rollup-linux-arm-musleabihf': 4.21.2 + '@rollup/rollup-linux-arm64-gnu': 4.21.2 + '@rollup/rollup-linux-arm64-musl': 4.21.2 + '@rollup/rollup-linux-powerpc64le-gnu': 4.21.2 + '@rollup/rollup-linux-riscv64-gnu': 4.21.2 + '@rollup/rollup-linux-s390x-gnu': 4.21.2 + '@rollup/rollup-linux-x64-gnu': 4.21.2 + '@rollup/rollup-linux-x64-musl': 4.21.2 + '@rollup/rollup-win32-arm64-msvc': 4.21.2 + '@rollup/rollup-win32-ia32-msvc': 4.21.2 + '@rollup/rollup-win32-x64-msvc': 4.21.2 fsevents: 2.3.3 run-parallel@1.2.0: @@ -14631,7 +13870,7 @@ snapshots: safe-array-concat@1.0.1: dependencies: - call-bind: 1.0.5 + call-bind: 1.0.7 get-intrinsic: 1.2.2 has-symbols: 1.0.3 isarray: 2.0.5 @@ -14647,7 +13886,7 @@ snapshots: safe-regex-test@1.0.0: dependencies: - call-bind: 1.0.5 + call-bind: 1.0.7 get-intrinsic: 1.2.2 is-regex: 1.1.4 @@ -14661,7 +13900,7 @@ snapshots: dependencies: ret: 0.1.15 - safe-stable-stringify@2.4.3: {} + safe-stable-stringify@2.5.0: {} safer-buffer@2.1.2: {} @@ -14672,18 +13911,11 @@ snapshots: mkdirp: 0.5.6 rimraf: 2.7.1 - sass@1.77.5: - dependencies: - chokidar: 3.6.0 - immutable: 4.3.6 - source-map-js: 1.2.0 - - sass@1.77.6: + sass@1.78.0: dependencies: chokidar: 3.6.0 - immutable: 4.3.6 - source-map-js: 1.2.0 - optional: true + immutable: 4.3.7 + source-map-js: 1.2.1 sax@1.3.0: {} @@ -14704,12 +13936,9 @@ snapshots: semver@7.5.4: dependencies: lru-cache: 6.0.0 + optional: true - semver@7.6.0: - dependencies: - lru-cache: 6.0.0 - - semver@7.6.2: {} + semver@7.6.3: {} set-blocking@2.0.0: optional: true @@ -14766,7 +13995,7 @@ snapshots: side-channel@1.0.4: dependencies: - call-bind: 1.0.5 + call-bind: 1.0.7 get-intrinsic: 1.2.2 object-inspect: 1.13.1 @@ -14775,7 +14004,7 @@ snapshots: call-bind: 1.0.7 es-errors: 1.3.0 get-intrinsic: 1.2.4 - object-inspect: 1.13.1 + object-inspect: 1.13.2 signal-exit@3.0.7: {} @@ -14851,7 +14080,7 @@ snapshots: sort-object-keys@1.1.3: {} - sort-package-json@2.10.0: + sort-package-json@2.10.1: dependencies: detect-indent: 7.0.1 detect-newline: 4.0.1 @@ -14859,10 +14088,10 @@ snapshots: git-hooks-list: 3.1.0 globby: 13.2.2 is-plain-obj: 4.1.0 - semver: 7.6.0 + semver: 7.6.3 sort-object-keys: 1.1.3 - source-map-js@1.2.0: {} + source-map-js@1.2.1: {} source-map-resolve@0.5.3: dependencies: @@ -14954,9 +14183,9 @@ snapshots: emoji-regex: 9.2.2 strip-ansi: 7.1.0 - string-width@7.1.0: + string-width@7.2.0: dependencies: - emoji-regex: 10.3.0 + emoji-regex: 10.4.0 get-east-asian-width: 1.2.0 strip-ansi: 7.1.0 @@ -14986,24 +14215,29 @@ snapshots: define-properties: 1.2.1 es-abstract: 1.22.3 + string.prototype.repeat@1.0.0: + dependencies: + define-properties: 1.2.1 + es-abstract: 1.23.3 + string.prototype.trim@1.2.8: dependencies: - call-bind: 1.0.5 + call-bind: 1.0.7 define-properties: 1.2.1 - es-abstract: 1.22.3 + es-abstract: 1.23.3 string.prototype.trim@1.2.9: dependencies: call-bind: 1.0.7 define-properties: 1.2.1 - es-abstract: 1.23.2 + es-abstract: 1.23.3 es-object-atoms: 1.0.0 string.prototype.trimend@1.0.7: dependencies: - call-bind: 1.0.5 + call-bind: 1.0.7 define-properties: 1.2.1 - es-abstract: 1.22.3 + es-abstract: 1.23.3 string.prototype.trimend@1.0.8: dependencies: @@ -15013,9 +14247,9 @@ snapshots: string.prototype.trimstart@1.0.7: dependencies: - call-bind: 1.0.5 + call-bind: 1.0.7 define-properties: 1.2.1 - es-abstract: 1.22.3 + es-abstract: 1.23.3 string.prototype.trimstart@1.0.8: dependencies: @@ -15049,7 +14283,7 @@ snapshots: strip-ansi@7.1.0: dependencies: - ansi-regex: 6.0.1 + ansi-regex: 6.1.0 strip-bom@3.0.0: {} @@ -15073,11 +14307,11 @@ snapshots: stylelint-config-ali@2.1.1(stylelint@9.10.1): dependencies: - postcss: 8.4.38 - postcss-less: 6.0.0(postcss@8.4.38) - postcss-scss: 4.0.9(postcss@8.4.38) + postcss: 8.4.45 + postcss-less: 6.0.0(postcss@8.4.45) + postcss-scss: 4.0.9(postcss@8.4.45) stylelint: 9.10.1 - stylelint-less: 3.0.1(postcss@8.4.38)(stylelint@9.10.1) + stylelint-less: 3.0.1(postcss@8.4.45)(stylelint@9.10.1) stylelint-scss: 6.2.1(stylelint@9.10.1) stylelint-config-rational-order@0.1.2: @@ -15100,9 +14334,9 @@ snapshots: dependencies: stylelint: 9.10.1 - stylelint-less@3.0.1(postcss@8.4.38)(stylelint@9.10.1): + stylelint-less@3.0.1(postcss@8.4.45)(stylelint@9.10.1): dependencies: - postcss: 8.4.38 + postcss: 8.4.45 postcss-resolve-nested-selector: 0.1.1 postcss-value-parser: 4.2.0 stylelint: 9.10.1 @@ -15116,13 +14350,13 @@ snapshots: stylelint-order@6.0.4(stylelint@9.10.1): dependencies: - postcss: 8.4.38 - postcss-sorting: 8.0.2(postcss@8.4.38) + postcss: 8.4.45 + postcss-sorting: 8.0.2(postcss@8.4.45) stylelint: 9.10.1 - stylelint-prettier@5.0.0(prettier@3.3.2)(stylelint@9.10.1): + stylelint-prettier@5.0.2(prettier@3.3.3)(stylelint@9.10.1): dependencies: - prettier: 3.3.2 + prettier: 3.3.3 prettier-linter-helpers: 1.0.0 stylelint: 9.10.1 @@ -15135,44 +14369,44 @@ snapshots: postcss-value-parser: 4.2.0 stylelint: 9.10.1 - stylelint@16.6.1(typescript@5.5.2): + stylelint@16.9.0(typescript@5.6.2): dependencies: - '@csstools/css-parser-algorithms': 2.6.3(@csstools/css-tokenizer@2.3.1) - '@csstools/css-tokenizer': 2.3.1 - '@csstools/media-query-list-parser': 2.1.11(@csstools/css-parser-algorithms@2.6.3(@csstools/css-tokenizer@2.3.1))(@csstools/css-tokenizer@2.3.1) - '@csstools/selector-specificity': 3.1.1(postcss-selector-parser@6.1.0) + '@csstools/css-parser-algorithms': 3.0.1(@csstools/css-tokenizer@3.0.1) + '@csstools/css-tokenizer': 3.0.1 + '@csstools/media-query-list-parser': 3.0.1(@csstools/css-parser-algorithms@3.0.1(@csstools/css-tokenizer@3.0.1))(@csstools/css-tokenizer@3.0.1) + '@csstools/selector-specificity': 4.0.0(postcss-selector-parser@6.1.2) '@dual-bundle/import-meta-resolve': 4.1.0 balanced-match: 2.0.0 colord: 2.9.3 - cosmiconfig: 9.0.0(typescript@5.5.2) + cosmiconfig: 9.0.0(typescript@5.6.2) css-functions-list: 3.2.2 css-tree: 2.3.1 - debug: 4.3.5 + debug: 4.3.7 fast-glob: 3.3.2 fastest-levenshtein: 1.0.16 - file-entry-cache: 9.0.0 + file-entry-cache: 9.1.0 global-modules: 2.0.0 globby: 11.1.0 globjoin: 0.1.4 html-tags: 3.3.1 - ignore: 5.3.1 + ignore: 5.3.2 imurmurhash: 0.1.4 is-plain-object: 5.0.0 - known-css-properties: 0.31.0 + known-css-properties: 0.34.0 mathml-tag-names: 2.1.3 meow: 13.2.0 - micromatch: 4.0.7 + micromatch: 4.0.8 normalize-path: 3.0.0 - picocolors: 1.0.1 - postcss: 8.4.38 - postcss-resolve-nested-selector: 0.1.1 - postcss-safe-parser: 7.0.0(postcss@8.4.38) - postcss-selector-parser: 6.1.0 + picocolors: 1.1.0 + postcss: 8.4.45 + postcss-resolve-nested-selector: 0.1.6 + postcss-safe-parser: 7.0.0(postcss@8.4.45) + postcss-selector-parser: 6.1.2 postcss-value-parser: 4.2.0 resolve-from: 5.0.0 string-width: 4.2.3 strip-ansi: 7.1.0 - supports-hyperlinks: 3.0.0 + supports-hyperlinks: 3.1.0 svg-tags: 1.0.0 table: 6.8.2 write-file-atomic: 5.0.1 @@ -15186,7 +14420,7 @@ snapshots: balanced-match: 1.0.2 chalk: 2.4.2 cosmiconfig: 5.2.1 - debug: 4.3.4 + debug: 4.3.7 execall: 1.0.0 file-entry-cache: 4.0.0 get-stdin: 6.0.0 @@ -15207,10 +14441,10 @@ snapshots: normalize-selector: 0.2.0 pify: 4.0.1 postcss: 7.0.39 - postcss-html: 0.36.0(postcss-syntax@0.36.2(postcss-less@6.0.0(postcss@8.4.38))(postcss@8.4.38))(postcss@7.0.39) - postcss-jsx: 0.36.4(postcss-syntax@0.36.2(postcss-less@6.0.0(postcss@8.4.38))(postcss@8.4.38))(postcss@7.0.39) + postcss-html: 0.36.0(postcss-syntax@0.36.2(postcss-less@6.0.0(postcss@8.4.45))(postcss@8.4.45))(postcss@7.0.39) + postcss-jsx: 0.36.4(postcss-syntax@0.36.2(postcss-less@6.0.0(postcss@8.4.45))(postcss@8.4.45))(postcss@7.0.39) postcss-less: 3.1.4 - postcss-markdown: 0.36.0(postcss-syntax@0.36.2(postcss-less@6.0.0(postcss@8.4.38))(postcss@8.4.38))(postcss@7.0.39) + postcss-markdown: 0.36.0(postcss-syntax@0.36.2(postcss-less@6.0.0(postcss@8.4.45))(postcss@8.4.45))(postcss@7.0.39) postcss-media-query-parser: 0.2.3 postcss-reporter: 6.0.1 postcss-resolve-nested-selector: 0.1.1 @@ -15218,7 +14452,7 @@ snapshots: postcss-sass: 0.3.5 postcss-scss: 2.1.1 postcss-selector-parser: 3.1.2 - postcss-syntax: 0.36.2(postcss-html@0.36.0(postcss-syntax@0.36.2(postcss-less@6.0.0(postcss@8.4.38))(postcss@8.4.38))(postcss@7.0.39))(postcss-jsx@0.36.4(postcss-syntax@0.36.2(postcss-less@6.0.0(postcss@8.4.38))(postcss@8.4.38))(postcss@7.0.39))(postcss-less@3.1.4)(postcss-markdown@0.36.0(postcss-syntax@0.36.2(postcss-less@6.0.0(postcss@8.4.38))(postcss@8.4.38))(postcss@7.0.39))(postcss-scss@2.1.1)(postcss@7.0.39) + postcss-syntax: 0.36.2(postcss-html@0.36.0(postcss-syntax@0.36.2(postcss-less@6.0.0(postcss@8.4.45))(postcss@8.4.45))(postcss@7.0.39))(postcss-jsx@0.36.4(postcss-syntax@0.36.2(postcss-less@6.0.0(postcss@8.4.45))(postcss@8.4.45))(postcss@7.0.39))(postcss-less@3.1.4)(postcss-markdown@0.36.0(postcss-syntax@0.36.2(postcss-less@6.0.0(postcss@8.4.45))(postcss@8.4.45))(postcss@7.0.39))(postcss-scss@2.1.1)(postcss@7.0.39) postcss-value-parser: 3.3.1 resolve-from: 4.0.0 signal-exit: 3.0.7 @@ -15232,12 +14466,12 @@ snapshots: transitivePeerDependencies: - supports-color - stylis@4.3.2: {} + stylis@4.3.4: {} stylus@0.63.0: dependencies: '@adobe/css-tools': 4.3.3 - debug: 4.3.5 + debug: 4.3.7 glob: 7.2.3 sax: 1.3.0 source-map: 0.7.4 @@ -15258,9 +14492,9 @@ snapshots: dependencies: postcss: 7.0.39 - sugarss@4.0.1(postcss@8.4.38): + sugarss@4.0.1(postcss@8.4.45): dependencies: - postcss: 8.4.38 + postcss: 8.4.45 supports-color@5.5.0: dependencies: @@ -15273,29 +14507,30 @@ snapshots: supports-color@8.1.1: dependencies: has-flag: 4.0.0 + optional: true - supports-hyperlinks@3.0.0: + supports-hyperlinks@3.1.0: dependencies: has-flag: 4.0.0 supports-color: 7.2.0 supports-preserve-symlinks-flag@1.0.0: {} - svelte-eslint-parser@0.39.2(svelte@4.2.18): + svelte-eslint-parser@0.41.0(svelte@4.2.19): dependencies: eslint-scope: 7.2.2 eslint-visitor-keys: 3.4.3 espree: 9.6.1 - postcss: 8.4.38 - postcss-scss: 4.0.9(postcss@8.4.38) + postcss: 8.4.45 + postcss-scss: 4.0.9(postcss@8.4.45) optionalDependencies: - svelte: 4.2.18 + svelte: 4.2.19 - svelte-hmr@0.16.0(svelte@4.2.18): + svelte-hmr@0.16.0(svelte@4.2.19): dependencies: - svelte: 4.2.18 + svelte: 4.2.19 - svelte-i18n@3.7.4(svelte@4.2.18): + svelte-i18n@3.7.4(svelte@4.2.19): dependencies: cli-color: 2.0.4 deepmerge: 4.3.1 @@ -15303,68 +14538,63 @@ snapshots: estree-walker: 2.0.2 intl-messageformat: 9.13.0 sade: 1.8.1 - svelte: 4.2.18 + svelte: 4.2.19 tiny-glob: 0.2.9 - svelte-i18n@4.0.0(svelte@4.2.18): + svelte-i18n@4.0.0(svelte@4.2.19): dependencies: - cli-color: 2.0.3 + cli-color: 2.0.4 deepmerge: 4.3.1 - esbuild: 0.19.10 + esbuild: 0.19.12 estree-walker: 2.0.2 intl-messageformat: 10.5.8 sade: 1.8.1 - svelte: 4.2.18 + svelte: 4.2.19 tiny-glob: 0.2.9 - svelte-preprocess@5.1.4(@babel/core@7.24.7)(coffeescript@2.7.0)(less@4.2.0)(postcss-load-config@4.0.2(postcss@8.4.38))(postcss@8.4.38)(pug@3.0.3)(sass@1.77.5)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.38))(svelte@4.2.18)(typescript@5.4.5): + svelte-preprocess@5.1.4(@babel/core@7.25.2)(coffeescript@2.7.0)(less@4.2.0)(postcss-load-config@3.1.4(postcss@8.4.45)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@18.19.50)(typescript@5.5.4)))(postcss@8.4.45)(pug@3.0.3)(sass@1.78.0)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.45))(svelte@4.2.19)(typescript@5.6.2): dependencies: '@types/pug': 2.0.10 detect-indent: 6.1.0 magic-string: 0.30.10 sorcery: 0.11.1 strip-indent: 3.0.0 - svelte: 4.2.18 + svelte: 4.2.19 optionalDependencies: - '@babel/core': 7.24.7 + '@babel/core': 7.25.2 coffeescript: 2.7.0 less: 4.2.0 - postcss: 8.4.38 - postcss-load-config: 4.0.2(postcss@8.4.38)(ts-node@10.9.2(@swc/core@1.6.5)(@types/node@20.14.9)(typescript@5.5.2)) + postcss: 8.4.45 + postcss-load-config: 3.1.4(postcss@8.4.45)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@18.19.50)(typescript@5.5.4)) pug: 3.0.3 - sass: 1.77.5 + sass: 1.78.0 stylus: 0.63.0 - sugarss: 4.0.1(postcss@8.4.38) - typescript: 5.4.5 + sugarss: 4.0.1(postcss@8.4.45) + typescript: 5.6.2 - svelte@4.2.18: + svelte@4.2.19: dependencies: '@ampproject/remapping': 2.3.0 - '@jridgewell/sourcemap-codec': 1.4.15 + '@jridgewell/sourcemap-codec': 1.5.0 '@jridgewell/trace-mapping': 0.3.25 '@types/estree': 1.0.5 - acorn: 8.12.0 - aria-query: 5.3.0 - axobject-query: 4.0.0 + acorn: 8.12.1 + aria-query: 5.3.1 + axobject-query: 4.1.0 code-red: 1.0.4 css-tree: 2.3.1 estree-walker: 3.0.3 is-reference: 3.0.2 locate-character: 3.0.0 - magic-string: 0.30.10 + magic-string: 0.30.11 periscopic: 3.1.0 svg-tags@1.0.0: {} - synckit@0.8.8: + synckit@0.9.1: dependencies: '@pkgr/core': 0.1.1 - tslib: 2.6.3 - - synckit@0.9.0: - dependencies: - '@pkgr/core': 0.1.1 - tslib: 2.6.3 + tslib: 2.7.0 table@5.4.6: dependencies: @@ -15375,7 +14605,7 @@ snapshots: table@6.8.2: dependencies: - ajv: 8.16.0 + ajv: 8.17.1 lodash.truncate: 4.4.2 slice-ansi: 4.0.0 string-width: 4.2.3 @@ -15409,15 +14639,10 @@ snapshots: dependencies: any-promise: 1.3.0 - throttle-debounce@5.0.0: {} + throttle-debounce@5.0.2: {} through@2.3.8: {} - timers-ext@0.1.7: - dependencies: - es5-ext: 0.10.62 - next-tick: 1.1.0 - timers-ext@0.1.8: dependencies: es5-ext: 0.10.64 @@ -15428,6 +14653,8 @@ snapshots: globalyzer: 0.1.0 globrex: 0.1.2 + tinyexec@0.3.0: {} + tmp@0.0.33: dependencies: os-tmpdir: 1.0.2 @@ -15478,51 +14705,51 @@ snapshots: trough@2.1.0: {} - ts-api-utils@1.3.0(typescript@5.5.2): + ts-api-utils@1.3.0(typescript@5.6.2): dependencies: - typescript: 5.5.2 + typescript: 5.6.2 ts-interface-checker@0.1.13: {} - ts-node@10.9.2(@swc/core@1.6.5)(@types/node@16.18.101)(typescript@5.1.6): + ts-node@10.9.2(@swc/core@1.7.26)(@types/node@18.19.50)(typescript@5.5.4): dependencies: '@cspotcode/source-map-support': 0.8.1 '@tsconfig/node10': 1.0.11 '@tsconfig/node12': 1.0.11 '@tsconfig/node14': 1.0.3 '@tsconfig/node16': 1.0.4 - '@types/node': 16.18.101 - acorn: 8.11.3 - acorn-walk: 8.3.2 + '@types/node': 18.19.50 + acorn: 8.12.1 + acorn-walk: 8.3.4 arg: 4.1.3 create-require: 1.1.1 diff: 4.0.2 make-error: 1.3.6 - typescript: 5.1.6 + typescript: 5.5.4 v8-compile-cache-lib: 3.0.1 yn: 3.1.1 optionalDependencies: - '@swc/core': 1.6.5 + '@swc/core': 1.7.26 - ts-node@10.9.2(@swc/core@1.6.5)(@types/node@20.14.9)(typescript@5.5.2): + ts-node@10.9.2(@swc/core@1.7.26)(@types/node@22.5.4)(typescript@5.6.2): dependencies: '@cspotcode/source-map-support': 0.8.1 '@tsconfig/node10': 1.0.11 '@tsconfig/node12': 1.0.11 '@tsconfig/node14': 1.0.3 '@tsconfig/node16': 1.0.4 - '@types/node': 20.14.9 - acorn: 8.11.3 - acorn-walk: 8.3.2 + '@types/node': 22.5.4 + acorn: 8.12.1 + acorn-walk: 8.3.4 arg: 4.1.3 create-require: 1.1.1 diff: 4.0.2 make-error: 1.3.6 - typescript: 5.5.2 + typescript: 5.6.2 v8-compile-cache-lib: 3.0.1 yn: 3.1.1 optionalDependencies: - '@swc/core': 1.6.5 + '@swc/core': 1.7.26 optional: true tsconfig-paths@3.15.0: @@ -15536,37 +14763,41 @@ snapshots: tslib@2.6.2: {} - tslib@2.6.3: {} + tslib@2.7.0: {} - tsup@8.1.0(@microsoft/api-extractor@7.47.0(@types/node@20.14.9))(@swc/core@1.6.5)(postcss@8.4.38)(ts-node@10.9.2(@swc/core@1.6.5)(@types/node@20.14.9)(typescript@5.5.2))(typescript@5.5.2): + tsup@8.2.4(@microsoft/api-extractor@7.47.9(@types/node@22.5.4))(@swc/core@1.7.26)(jiti@1.21.6)(postcss@8.4.45)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.5.1): dependencies: - bundle-require: 4.2.1(esbuild@0.21.5) + bundle-require: 5.0.0(esbuild@0.23.1) cac: 6.7.14 chokidar: 3.6.0 - debug: 4.3.5 - esbuild: 0.21.5 + consola: 3.2.3 + debug: 4.3.7 + esbuild: 0.23.1 execa: 5.1.1 globby: 11.1.0 joycon: 3.1.1 - postcss-load-config: 4.0.2(postcss@8.4.38)(ts-node@10.9.2(@swc/core@1.6.5)(@types/node@20.14.9)(typescript@5.5.2)) + picocolors: 1.1.0 + postcss-load-config: 6.0.1(jiti@1.21.6)(postcss@8.4.45)(tsx@4.19.1)(yaml@2.5.1) resolve-from: 5.0.0 - rollup: 4.18.0 + rollup: 4.21.2 source-map: 0.8.0-beta.0 sucrase: 3.35.0 tree-kill: 1.2.2 optionalDependencies: - '@microsoft/api-extractor': 7.47.0(@types/node@20.14.9) - '@swc/core': 1.6.5 - postcss: 8.4.38 - typescript: 5.5.2 + '@microsoft/api-extractor': 7.47.9(@types/node@22.5.4) + '@swc/core': 1.7.26 + postcss: 8.4.45 + typescript: 5.6.2 transitivePeerDependencies: + - jiti - supports-color - - ts-node + - tsx + - yaml - tsx@4.15.7: + tsx@4.19.1: dependencies: - esbuild: 0.21.5 - get-tsconfig: 4.7.5 + esbuild: 0.23.1 + get-tsconfig: 4.8.1 optionalDependencies: fsevents: 2.3.3 @@ -15580,15 +14811,11 @@ snapshots: type-fest@4.20.0: {} - type@1.2.0: {} - - type@2.7.2: {} - type@2.7.3: {} typed-array-buffer@1.0.0: dependencies: - call-bind: 1.0.5 + call-bind: 1.0.7 get-intrinsic: 1.2.2 is-typed-array: 1.1.12 @@ -15600,7 +14827,7 @@ snapshots: typed-array-byte-length@1.0.0: dependencies: - call-bind: 1.0.5 + call-bind: 1.0.7 for-each: 0.3.3 has-proto: 1.0.1 is-typed-array: 1.1.12 @@ -15616,7 +14843,7 @@ snapshots: typed-array-byte-offset@1.0.0: dependencies: available-typed-arrays: 1.0.5 - call-bind: 1.0.5 + call-bind: 1.0.7 for-each: 0.3.3 has-proto: 1.0.1 is-typed-array: 1.1.12 @@ -15632,7 +14859,7 @@ snapshots: typed-array-length@1.0.4: dependencies: - call-bind: 1.0.5 + call-bind: 1.0.7 for-each: 0.3.3 is-typed-array: 1.1.12 @@ -15645,52 +14872,53 @@ snapshots: is-typed-array: 1.1.13 possible-typed-array-names: 1.0.0 - types-kit@0.0.11(typescript@5.5.2): + types-kit@0.0.11(typescript@5.6.2): dependencies: - typescript: 5.5.2 + typescript: 5.6.2 - typescript-eslint@7.14.1(eslint@9.5.0)(typescript@5.5.2): + typescript-eslint@8.5.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2): dependencies: - '@typescript-eslint/eslint-plugin': 7.14.1(@typescript-eslint/parser@7.14.1(eslint@9.5.0)(typescript@5.5.2))(eslint@9.5.0)(typescript@5.5.2) - '@typescript-eslint/parser': 7.14.1(eslint@9.5.0)(typescript@5.5.2) - '@typescript-eslint/utils': 7.14.1(eslint@9.5.0)(typescript@5.5.2) - eslint: 9.5.0 + '@typescript-eslint/eslint-plugin': 8.5.0(@typescript-eslint/parser@8.5.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2))(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2) + '@typescript-eslint/parser': 8.5.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2) + '@typescript-eslint/utils': 8.5.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2) optionalDependencies: - typescript: 5.5.2 + typescript: 5.6.2 transitivePeerDependencies: + - eslint - supports-color - typescript-json-schema@0.64.0(@swc/core@1.6.5): + typescript-json-schema@0.65.1(@swc/core@1.7.26): dependencies: '@types/json-schema': 7.0.15 - '@types/node': 16.18.101 + '@types/node': 18.19.50 glob: 7.2.3 path-equal: 1.2.5 - safe-stable-stringify: 2.4.3 - ts-node: 10.9.2(@swc/core@1.6.5)(@types/node@16.18.101)(typescript@5.1.6) - typescript: 5.1.6 + safe-stable-stringify: 2.5.0 + ts-node: 10.9.2(@swc/core@1.7.26)(@types/node@18.19.50)(typescript@5.5.4) + typescript: 5.5.4 yargs: 17.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' - typescript@5.1.6: {} - - typescript@5.4.2: {} + typescript@5.4.2: + optional: true - typescript@5.4.5: {} + typescript@5.5.4: {} - typescript@5.5.2: {} + typescript@5.6.2: {} unbox-primitive@1.0.2: dependencies: - call-bind: 1.0.5 + call-bind: 1.0.7 has-bigints: 1.0.2 has-symbols: 1.0.3 which-boxed-primitive: 1.0.2 undici-types@5.26.5: {} + undici-types@6.19.8: {} + undici@5.28.3: dependencies: '@fastify/busboy': 2.1.1 @@ -15704,13 +14932,13 @@ snapshots: unified@11.0.4: dependencies: - '@types/unist': 3.0.2 + '@types/unist': 3.0.3 bail: 2.0.2 devlop: 1.1.0 extend: 3.0.2 is-plain-obj: 4.1.0 trough: 2.1.0 - vfile: 6.0.1 + vfile: 6.0.3 unified@7.1.0: dependencies: @@ -15734,7 +14962,7 @@ snapshots: unist-util-find-after@5.0.0: dependencies: - '@types/unist': 3.0.2 + '@types/unist': 3.0.3 unist-util-is: 6.0.0 unist-util-find-all-after@1.0.5: @@ -15745,11 +14973,11 @@ snapshots: unist-util-is@6.0.0: dependencies: - '@types/unist': 3.0.2 + '@types/unist': 3.0.3 unist-util-position@5.0.0: dependencies: - '@types/unist': 3.0.2 + '@types/unist': 3.0.3 unist-util-remove-position@1.1.4: dependencies: @@ -15757,14 +14985,14 @@ snapshots: unist-util-remove-position@5.0.0: dependencies: - '@types/unist': 3.0.2 + '@types/unist': 3.0.3 unist-util-visit: 5.0.0 unist-util-stringify-position@1.1.2: {} unist-util-stringify-position@4.0.0: dependencies: - '@types/unist': 3.0.2 + '@types/unist': 3.0.3 unist-util-visit-parents@2.1.2: dependencies: @@ -15772,7 +15000,7 @@ snapshots: unist-util-visit-parents@6.0.1: dependencies: - '@types/unist': 3.0.2 + '@types/unist': 3.0.3 unist-util-is: 6.0.0 unist-util-visit@1.4.1: @@ -15781,7 +15009,7 @@ snapshots: unist-util-visit@5.0.0: dependencies: - '@types/unist': 3.0.2 + '@types/unist': 3.0.3 unist-util-is: 6.0.0 unist-util-visit-parents: 6.0.1 @@ -15798,13 +15026,13 @@ snapshots: dependencies: browserslist: 4.22.3 escalade: 3.1.2 - picocolors: 1.0.1 + picocolors: 1.1.0 - update-browserslist-db@1.0.16(browserslist@4.23.1): + update-browserslist-db@1.1.0(browserslist@4.23.3): dependencies: - browserslist: 4.23.1 - escalade: 3.1.2 - picocolors: 1.0.1 + browserslist: 4.23.3 + escalade: 3.2.0 + picocolors: 1.1.0 uri-js@4.4.1: dependencies: @@ -15812,7 +15040,7 @@ snapshots: urix@0.1.0: {} - use-sync-external-store@1.2.0(react@18.3.1): + use-sync-external-store@1.2.2(react@18.3.1): dependencies: react: 18.3.1 @@ -15829,14 +15057,12 @@ snapshots: spdx-correct: 3.2.0 spdx-expression-parse: 3.0.1 - validator@13.12.0: {} - vfile-location@2.0.6: {} vfile-location@5.0.2: dependencies: - '@types/unist': 3.0.2 - vfile: 6.0.1 + '@types/unist': 3.0.3 + vfile: 6.0.3 vfile-message@1.1.1: dependencies: @@ -15844,7 +15070,7 @@ snapshots: vfile-message@4.0.2: dependencies: - '@types/unist': 3.0.2 + '@types/unist': 3.0.3 unist-util-stringify-position: 4.0.0 vfile@3.0.1: @@ -15854,100 +15080,31 @@ snapshots: unist-util-stringify-position: 1.1.2 vfile-message: 1.1.1 - vfile@6.0.1: + vfile@6.0.3: dependencies: - '@types/unist': 3.0.2 - unist-util-stringify-position: 4.0.0 + '@types/unist': 3.0.3 vfile-message: 4.0.2 - vite-plugin-dts@3.9.1(@types/node@20.14.9)(rollup@4.18.0)(typescript@5.5.2)(vite@5.3.1(@types/node@20.14.9)(less@4.2.0)(lightningcss@1.25.1)(sass@1.77.6)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.38))): - dependencies: - '@microsoft/api-extractor': 7.43.0(@types/node@20.14.9) - '@rollup/pluginutils': 5.1.0(rollup@4.18.0) - '@vue/language-core': 1.8.27(typescript@5.5.2) - debug: 4.3.4 - kolorist: 1.8.0 - magic-string: 0.30.10 - typescript: 5.5.2 - vue-tsc: 1.8.27(typescript@5.5.2) - optionalDependencies: - vite: 5.3.1(@types/node@20.14.9)(less@4.2.0)(lightningcss@1.25.1)(sass@1.77.6)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.38)) - transitivePeerDependencies: - - '@types/node' - - rollup - - supports-color - - vite-plugin-lib-inject-css@2.1.1(vite@5.3.1(@types/node@20.14.9)(less@4.2.0)(lightningcss@1.25.1)(sass@1.77.6)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.38))): - dependencies: - '@ast-grep/napi': 0.22.3 - magic-string: 0.30.10 - picocolors: 1.0.1 - vite: 5.3.1(@types/node@20.14.9)(less@4.2.0)(lightningcss@1.25.1)(sass@1.77.6)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.38)) - - vite@5.2.13(@types/node@16.18.101)(less@4.2.0)(lightningcss@1.25.1)(sass@1.77.5)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.38)): - dependencies: - esbuild: 0.20.2 - postcss: 8.4.38 - rollup: 4.18.0 - optionalDependencies: - '@types/node': 16.18.101 - fsevents: 2.3.3 - less: 4.2.0 - lightningcss: 1.25.1 - sass: 1.77.5 - stylus: 0.63.0 - sugarss: 4.0.1(postcss@8.4.38) - - vite@5.2.13(@types/node@20.14.9)(less@4.2.0)(lightningcss@1.25.1)(sass@1.77.5)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.38)): - dependencies: - esbuild: 0.20.2 - postcss: 8.4.38 - rollup: 4.18.0 - optionalDependencies: - '@types/node': 20.14.9 - fsevents: 2.3.3 - less: 4.2.0 - lightningcss: 1.25.1 - sass: 1.77.5 - stylus: 0.63.0 - sugarss: 4.0.1(postcss@8.4.38) - - vite@5.3.1(@types/node@20.14.9)(less@4.2.0)(lightningcss@1.25.1)(sass@1.77.6)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.38)): + vite@5.4.4(@types/node@18.19.50)(less@4.2.0)(lightningcss@1.27.0)(sass@1.78.0)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.45)): dependencies: esbuild: 0.21.5 - postcss: 8.4.38 - rollup: 4.18.0 + postcss: 8.4.45 + rollup: 4.21.2 optionalDependencies: - '@types/node': 20.14.9 + '@types/node': 18.19.50 fsevents: 2.3.3 less: 4.2.0 - lightningcss: 1.25.1 - sass: 1.77.6 + lightningcss: 1.27.0 + sass: 1.78.0 stylus: 0.63.0 - sugarss: 4.0.1(postcss@8.4.38) + sugarss: 4.0.1(postcss@8.4.45) - vitefu@0.2.5(vite@5.2.13(@types/node@16.18.101)(less@4.2.0)(lightningcss@1.25.1)(sass@1.77.5)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.38))): + vitefu@0.2.5(vite@5.4.4(@types/node@18.19.50)(less@4.2.0)(lightningcss@1.27.0)(sass@1.78.0)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.45))): optionalDependencies: - vite: 5.2.13(@types/node@16.18.101)(less@4.2.0)(lightningcss@1.25.1)(sass@1.77.5)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.38)) - - vitefu@0.2.5(vite@5.2.13(@types/node@20.14.9)(less@4.2.0)(lightningcss@1.25.1)(sass@1.77.5)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.38))): - optionalDependencies: - vite: 5.2.13(@types/node@20.14.9)(less@4.2.0)(lightningcss@1.25.1)(sass@1.77.5)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.38)) + vite: 5.4.4(@types/node@18.19.50)(less@4.2.0)(lightningcss@1.27.0)(sass@1.78.0)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.45)) void-elements@3.1.0: {} - vue-template-compiler@2.7.16: - dependencies: - de-indent: 1.0.2 - he: 1.2.0 - - vue-tsc@1.8.27(typescript@5.5.2): - dependencies: - '@volar/typescript': 1.11.1 - '@vue/language-core': 1.8.27(typescript@5.5.2) - semver: 7.6.2 - typescript: 5.5.2 - wavesurfer.js@7.8.0: {} web-namespaces@2.0.1: {} @@ -15977,7 +15134,7 @@ snapshots: is-string: 1.0.7 is-symbol: 1.0.4 - which-builtin-type@1.1.3: + which-builtin-type@1.1.4: dependencies: function.prototype.name: 1.1.6 has-tostringtag: 1.0.2 @@ -15999,15 +15156,10 @@ snapshots: is-weakmap: 2.0.2 is-weakset: 2.0.3 - which-pm@2.0.0: - dependencies: - load-yaml-file: 0.2.0 - path-exists: 4.0.0 - which-typed-array@1.1.13: dependencies: available-typed-arrays: 1.0.5 - call-bind: 1.0.5 + call-bind: 1.0.7 for-each: 0.3.3 gopd: 1.0.1 has-tostringtag: 1.0.0 @@ -16039,8 +15191,8 @@ snapshots: with@7.0.2: dependencies: - '@babel/parser': 7.24.7 - '@babel/types': 7.24.7 + '@babel/parser': 7.25.6 + '@babel/types': 7.25.6 assert-never: 1.2.1 babel-walk: 3.0.0-canary-5 @@ -16067,7 +15219,7 @@ snapshots: wrap-ansi@9.0.0: dependencies: ansi-styles: 6.2.1 - string-width: 7.1.0 + string-width: 7.2.0 strip-ansi: 7.1.0 wrappy@1.0.2: {} @@ -16095,11 +15247,12 @@ snapshots: yallist@3.1.1: {} - yallist@4.0.0: {} + yallist@4.0.0: + optional: true yaml@1.10.2: {} - yaml@2.4.5: {} + yaml@2.5.1: {} yargs-parser@10.1.0: dependencies: @@ -16121,27 +15274,19 @@ snapshots: yocto-queue@0.1.0: {} - yocto-queue@1.0.0: {} + yocto-queue@1.1.1: {} yootils@0.3.1: {} - z-schema@5.0.5: - dependencies: - lodash.get: 4.4.2 - lodash.isequal: 4.5.0 - validator: 13.12.0 - optionalDependencies: - commander: 9.5.0 - - zrender@5.5.0: + zrender@5.6.0: dependencies: tslib: 2.3.0 - zustand@4.5.2(@types/react@18.3.3)(immer@10.1.1)(react@18.3.1): + zustand@4.5.5(@types/react@18.3.5)(immer@10.1.1)(react@18.3.1): dependencies: - use-sync-external-store: 1.2.0(react@18.3.1) + use-sync-external-store: 1.2.2(react@18.3.1) optionalDependencies: - '@types/react': 18.3.3 + '@types/react': 18.3.5 immer: 10.1.1 react: 18.3.1 diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 88203ca0..8b748dbc 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -3,4 +3,6 @@ packages: - 'config/*' # for https://github.com/gradio-app/gradio/issues/8162 - 'frontend' - - 'frontend/*' + - 'frontend/legacy/*' + - 'frontend/base/*' + - 'frontend/antd/*' diff --git a/pyproject.toml b/pyproject.toml index 4ca40dd7..c1a6370f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -42,17 +42,156 @@ dev = ["build", "twine"] [tool.hatch.build] artifacts = [ "*.pyi", - "backend/modelscope_studio/components/Chatbot/templates", - "backend/modelscope_studio/components/Flow/templates", - "backend/modelscope_studio/components/MultimodalInput/templates", - "backend/modelscope_studio/components/Markdown/templates", - "backend/modelscope_studio/components/WaterfallGallery/templates", - "/backend/modelscope_studio/components/Lifecycle/templates", - "/backend/modelscope_studio/components/Chatbot/templates", - "/backend/modelscope_studio/components/Flow/templates", - "/backend/modelscope_studio/components/Markdown/templates", - "/backend/modelscope_studio/components/MultimodalInput/templates", - "/backend/modelscope_studio/components/WaterfallGallery/templates", + "backend/modelscope_studio/components/legacy/Chatbot/templates", + "backend/modelscope_studio/components/legacy/Flow/templates", + "backend/modelscope_studio/components/legacy/MultimodalInput/templates", + "backend/modelscope_studio/components/legacy/Markdown/templates", + "backend/modelscope_studio/components/legacy/WaterfallGallery/templates", + "/backend/modelscope_studio/components/legacy/Lifecycle/templates", + "/backend/modelscope_studio/components/antd/button/templates", + "/backend/modelscope_studio/components/antd/card/templates", + "/backend/modelscope_studio/components/antd/card/grid/templates", + "/backend/modelscope_studio/components/antd/card/meta/templates", + "/backend/modelscope_studio/components/antd/config_provider/templates", + "/backend/modelscope_studio/components/base/fragment/templates", + "/backend/modelscope_studio/components/base/each/templates", + "/backend/modelscope_studio/components/base/slot/templates", + "/backend/modelscope_studio/components/base/application/templates", + "/backend/modelscope_studio/components/antd/message/templates", + "/backend/modelscope_studio/components/antd/spin/templates", + "/backend/modelscope_studio/components/antd/upload/templates", + "/backend/modelscope_studio/components/antd/icon/templates", + "/backend/modelscope_studio/components/antd/icon/iconfont_provider/templates", + "/backend/modelscope_studio/components/antd/button/group/templates", + "/backend/modelscope_studio/components/antd/float_button/templates", + "/backend/modelscope_studio/components/antd/affix/templates", + "/backend/modelscope_studio/components/base/filter/templates", + "/backend/modelscope_studio/components/antd/float_button/back_top/templates", + "/backend/modelscope_studio/components/antd/float_button/group/templates", + "/backend/modelscope_studio/components/antd/typography/link/templates", + "/backend/modelscope_studio/components/antd/typography/paragraph/templates", + "/backend/modelscope_studio/components/antd/typography/text/templates", + "/backend/modelscope_studio/components/antd/typography/title/templates", + "/backend/modelscope_studio/components/antd/anchor/templates", + "/backend/modelscope_studio/components/antd/anchor/item/templates", + "/backend/modelscope_studio/components/antd/breadcrumb/templates", + "/backend/modelscope_studio/components/antd/breadcrumb/item/templates", + "/backend/modelscope_studio/components/antd/grid/col/templates", + "/backend/modelscope_studio/components/antd/divider/templates", + "/backend/modelscope_studio/components/antd/dropdown/templates", + "/backend/modelscope_studio/components/antd/dropdown/button/templates", + "/backend/modelscope_studio/components/antd/flex/templates", + "/backend/modelscope_studio/components/antd/layout/templates", + "/backend/modelscope_studio/components/antd/layout/content/templates", + "/backend/modelscope_studio/components/antd/layout/footer/templates", + "/backend/modelscope_studio/components/antd/layout/header/templates", + "/backend/modelscope_studio/components/antd/layout/sider/templates", + "/backend/modelscope_studio/components/antd/menu/templates", + "/backend/modelscope_studio/components/antd/menu/item/templates", + "/backend/modelscope_studio/components/antd/grid/row/templates", + "/backend/modelscope_studio/components/antd/space/templates", + "/backend/modelscope_studio/components/antd/space/compact/templates", + "/backend/modelscope_studio/components/base/div/templates", + "/backend/modelscope_studio/components/antd/pagination/templates", + "/backend/modelscope_studio/components/base/span/templates", + "/backend/modelscope_studio/components/base/text/templates", + "/backend/modelscope_studio/components/antd/alert/templates", + "/backend/modelscope_studio/components/antd/alert/error_boundary/templates", + "/backend/modelscope_studio/components/antd/avatar/templates", + "/backend/modelscope_studio/components/antd/avatar/group/templates", + "/backend/modelscope_studio/components/antd/badge/templates", + "/backend/modelscope_studio/components/antd/badge/ribbon/templates", + "/backend/modelscope_studio/components/antd/calendar/templates", + "/backend/modelscope_studio/components/antd/carousel/templates", + "/backend/modelscope_studio/components/antd/collapse/templates", + "/backend/modelscope_studio/components/antd/collapse/item/templates", + "/backend/modelscope_studio/components/antd/descriptions/templates", + "/backend/modelscope_studio/components/antd/descriptions/item/templates", + "/backend/modelscope_studio/components/antd/drawer/templates", + "/backend/modelscope_studio/components/antd/empty/templates", + "/backend/modelscope_studio/components/antd/image/templates", + "/backend/modelscope_studio/components/antd/image/preview_group/templates", + "/backend/modelscope_studio/components/antd/list/templates", + "/backend/modelscope_studio/components/antd/list/item/templates", + "/backend/modelscope_studio/components/antd/list/item/meta/templates", + "/backend/modelscope_studio/components/antd/modal/templates", + "/backend/modelscope_studio/components/antd/notification/templates", + "/backend/modelscope_studio/components/antd/popconfirm/templates", + "/backend/modelscope_studio/components/antd/popover/templates", + "/backend/modelscope_studio/components/antd/progress/templates", + "/backend/modelscope_studio/components/antd/result/templates", + "/backend/modelscope_studio/components/antd/skeleton/templates", + "/backend/modelscope_studio/components/antd/skeleton/avatar/templates", + "/backend/modelscope_studio/components/antd/skeleton/button/templates", + "/backend/modelscope_studio/components/antd/skeleton/image/templates", + "/backend/modelscope_studio/components/antd/skeleton/input/templates", + "/backend/modelscope_studio/components/antd/skeleton/node/templates", + "/backend/modelscope_studio/components/antd/steps/templates", + "/backend/modelscope_studio/components/antd/steps/item/templates", + "/backend/modelscope_studio/components/antd/tooltip/templates", + "/backend/modelscope_studio/components/antd/tree/templates", + "/backend/modelscope_studio/components/antd/tree/directory_tree/templates", + "/backend/modelscope_studio/components/antd/tree/tree_node/templates", + "/backend/modelscope_studio/components/antd/watermark/templates", + "/backend/modelscope_studio/components/antd/qr_code/templates", + "/backend/modelscope_studio/components/antd/auto_complete/templates", + "/backend/modelscope_studio/components/antd/auto_complete/option/templates", + "/backend/modelscope_studio/components/antd/cascader/templates", + "/backend/modelscope_studio/components/antd/cascader/option/templates", + "/backend/modelscope_studio/components/antd/cascader/panel/templates", + "/backend/modelscope_studio/components/antd/checkbox/templates", + "/backend/modelscope_studio/components/antd/checkbox/group/templates", + "/backend/modelscope_studio/components/antd/checkbox/group/option/templates", + "/backend/modelscope_studio/components/antd/color_picker/templates", + "/backend/modelscope_studio/components/antd/color_picker/preset/templates", + "/backend/modelscope_studio/components/antd/date_picker/templates", + "/backend/modelscope_studio/components/antd/date_picker/preset/templates", + "/backend/modelscope_studio/components/antd/date_picker/range_picker/templates", + "/backend/modelscope_studio/components/antd/form/templates", + "/backend/modelscope_studio/components/antd/form/item/templates", + "/backend/modelscope_studio/components/antd/form/item/rule/templates", + "/backend/modelscope_studio/components/antd/input/templates", + "/backend/modelscope_studio/components/antd/input_number/templates", + "/backend/modelscope_studio/components/antd/input/otp/templates", + "/backend/modelscope_studio/components/antd/input/password/templates", + "/backend/modelscope_studio/components/antd/input/search/templates", + "/backend/modelscope_studio/components/antd/input/textarea/templates", + "/backend/modelscope_studio/components/antd/mentions/templates", + "/backend/modelscope_studio/components/antd/mentions/option/templates", + "/backend/modelscope_studio/components/antd/radio/templates", + "/backend/modelscope_studio/components/antd/radio/button/templates", + "/backend/modelscope_studio/components/antd/radio/group/templates", + "/backend/modelscope_studio/components/antd/radio/group/option/templates", + "/backend/modelscope_studio/components/antd/rate/templates", + "/backend/modelscope_studio/components/antd/segmented/templates", + "/backend/modelscope_studio/components/antd/segmented/option/templates", + "/backend/modelscope_studio/components/antd/select/templates", + "/backend/modelscope_studio/components/antd/statistic/templates", + "/backend/modelscope_studio/components/antd/statistic/countdown/templates", + "/backend/modelscope_studio/components/antd/table/templates", + "/backend/modelscope_studio/components/antd/table/column/templates", + "/backend/modelscope_studio/components/antd/table/column_group/templates", + "/backend/modelscope_studio/components/antd/table/expandable/templates", + "/backend/modelscope_studio/components/antd/table/row_selection/templates", + "/backend/modelscope_studio/components/antd/table/row_selection/selection/templates", + "/backend/modelscope_studio/components/antd/tabs/templates", + "/backend/modelscope_studio/components/antd/tabs/item/templates", + "/backend/modelscope_studio/components/antd/tag/templates", + "/backend/modelscope_studio/components/antd/tag/checkable_tag/templates", + "/backend/modelscope_studio/components/antd/time_picker/templates", + "/backend/modelscope_studio/components/antd/time_picker/range_picker/templates", + "/backend/modelscope_studio/components/antd/timeline/templates", + "/backend/modelscope_studio/components/antd/timeline/item/templates", + "/backend/modelscope_studio/components/antd/tour/templates", + "/backend/modelscope_studio/components/antd/tour/step/templates", + "/backend/modelscope_studio/components/antd/select/option/templates", + "/backend/modelscope_studio/components/antd/slider/templates", + "/backend/modelscope_studio/components/antd/slider/mark/templates", + "/backend/modelscope_studio/components/antd/switch/templates", + "/backend/modelscope_studio/components/antd/transfer/templates", + "/backend/modelscope_studio/components/antd/tree_select/templates", + "/backend/modelscope_studio/components/antd/tree_select/tree_node/templates", + "/backend/modelscope_studio/components/antd/upload/dragger/templates", ] [tool.hatch.build.targets.sdist] diff --git a/tsconfig.json b/tsconfig.json index 456e7b4f..783ea1a9 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -12,8 +12,24 @@ "esModuleInterop": true, "allowSyntheticDefaultImports": true, "resolveJsonModule": true, - "noImplicitOverride": true + "noImplicitOverride": true, + "baseUrl": "./frontend", + "paths": { + "@svelte-preprocess-react": ["svelte-preprocess-react/index.ts"], + "@svelte-preprocess-react/inject": ["svelte-preprocess-react/inject.ts"], + "@svelte-preprocess-react/component": [ + "svelte-preprocess-react/component.ts" + ], + "@svelte-preprocess-react/slot": ["svelte-preprocess-react/slot.ts"], + "@svelte-preprocess-react/react-slot": [ + "svelte-preprocess-react/react-slot.tsx" + ], + "@svelte-preprocess-react/context": [ + "svelte-preprocess-react/context.ts" + ], + "@utils/*": ["utils/*"] + } }, - "include": ["frontend", "config", "scripts", "fixtures.d.ts"], + "include": ["frontend", "config"], "exclude": ["node_modules"] } From 947cb3827e08ab80b9d1fe8e3a66df592ca26a04 Mon Sep 17 00:00:00 2001 From: Col0ring <1561999073@qq.com> Date: Fri, 13 Sep 2024 20:16:00 +0800 Subject: [PATCH 02/51] fix: file path --- docs/components/Chatbot/README-zh_CN.md | 2 +- docs/components/Chatbot/README.md | 2 +- docs/components/Chatbot/demos/accordion.py | 4 +++- docs/components/Flow/demos/basic.py | 3 ++- docs/components/Flow/demos/component_options.py | 4 +++- docs/components/Flow/demos/custom_node_type.py | 7 ++++--- docs/components/Flow/schema/agents_schema.py | 2 +- frontend/legacy/Chatbot/CHANGELOG.md | 2 +- frontend/legacy/Chatbot/Index.svelte | 2 +- frontend/legacy/Chatbot/shared/ChatBot.svelte | 2 +- frontend/legacy/Chatbot/shared/FlushingMarkdown.svelte | 2 +- frontend/legacy/Flow/Index.svelte | 2 +- frontend/legacy/Flow/schema.ts | 2 +- frontend/legacy/Flow/shared/Flow.svelte | 2 +- frontend/legacy/Flow/shared/utils.ts | 2 +- frontend/legacy/Markdown/CHANGELOG.md | 2 +- frontend/legacy/Markdown/Example.svelte | 5 ++++- frontend/legacy/Markdown/Index.svelte | 2 +- frontend/legacy/Markdown/shared/Markdown.svelte | 2 +- frontend/legacy/MultimodalInput/CHANGELOG.md | 2 +- frontend/legacy/MultimodalInput/shared/FilePreview.svelte | 2 +- frontend/legacy/compiled/CHANGELOG.md | 2 +- 22 files changed, 33 insertions(+), 24 deletions(-) diff --git a/docs/components/Chatbot/README-zh_CN.md b/docs/components/Chatbot/README-zh_CN.md index d88ea4a8..307e40d8 100644 --- a/docs/components/Chatbot/README-zh_CN.md +++ b/docs/components/Chatbot/README-zh_CN.md @@ -30,7 +30,7 @@ ```python import modelscope_studio as mgr -from modelscope_studio.components.Chatbot.llm_thinking_presets import qwen +from modelscope_studio.components.legacy.Chatbot.llm_thinking_presets import qwen # 添加 qwen 解析预设 mgr.Chatbot(llm_thinking_presets=[qwen()]) diff --git a/docs/components/Chatbot/README.md b/docs/components/Chatbot/README.md index 21d1904d..5aeb32e1 100644 --- a/docs/components/Chatbot/README.md +++ b/docs/components/Chatbot/README.md @@ -29,7 +29,7 @@ Additionally, to adapt to the toolchain usage of large models, some preset confi ```python import modelscope_studio as mgr -from modelscope_studio.components.Chatbot.llm_thinking_presets import qwen +from modelscope_studio.components.legacy.Chatbot.llm_thinking_presets import qwen # Add qwen preset mgr.Chatbot(llm_thinking_presets=[qwen()]) diff --git a/docs/components/Chatbot/demos/accordion.py b/docs/components/Chatbot/demos/accordion.py index 52adf6d4..ed3ca9e2 100644 --- a/docs/components/Chatbot/demos/accordion.py +++ b/docs/components/Chatbot/demos/accordion.py @@ -1,8 +1,10 @@ import os import gradio as gr + import modelscope_studio as mgr -from modelscope_studio.components.Chatbot.llm_thinking_presets import qwen +from modelscope_studio.components.legacy.Chatbot.llm_thinking_presets import \ + qwen def resolve_assets(relative_path): diff --git a/docs/components/Flow/demos/basic.py b/docs/components/Flow/demos/basic.py index 313148e5..3505892f 100644 --- a/docs/components/Flow/demos/basic.py +++ b/docs/components/Flow/demos/basic.py @@ -2,8 +2,9 @@ import os import gradio as gr + import modelscope_studio as mgr -from modelscope_studio.components.Flow import Edge, Node +from modelscope_studio.components.legacy.Flow import Edge, Node with open((os.path.join(os.path.dirname(__file__), "../schema/agents_schema.json"))) as f: diff --git a/docs/components/Flow/demos/component_options.py b/docs/components/Flow/demos/component_options.py index 9f6630eb..6182594f 100644 --- a/docs/components/Flow/demos/component_options.py +++ b/docs/components/Flow/demos/component_options.py @@ -2,8 +2,10 @@ import os import gradio as gr + import modelscope_studio as mgr -from modelscope_studio.components.Flow import BackgroundPropsDict, Edge, Node +from modelscope_studio.components.legacy.Flow import (BackgroundPropsDict, + Edge, Node) with open((os.path.join(os.path.dirname(__file__), "../schema/agents_schema.json"))) as f: diff --git a/docs/components/Flow/demos/custom_node_type.py b/docs/components/Flow/demos/custom_node_type.py index e02ab56a..c3f59e74 100644 --- a/docs/components/Flow/demos/custom_node_type.py +++ b/docs/components/Flow/demos/custom_node_type.py @@ -1,8 +1,9 @@ import gradio as gr + import modelscope_studio as mgr -from modelscope_studio.components.Flow import (FlowSchemaDict, Node, - NodeSchemaAttributeDict, - NodeSchemaDict) +from modelscope_studio.components.legacy.Flow import (FlowSchemaDict, Node, + NodeSchemaAttributeDict, + NodeSchemaDict) def on_data_change(_flow): diff --git a/docs/components/Flow/schema/agents_schema.py b/docs/components/Flow/schema/agents_schema.py index 9cc1f6c8..d80f7848 100644 --- a/docs/components/Flow/schema/agents_schema.py +++ b/docs/components/Flow/schema/agents_schema.py @@ -1,6 +1,6 @@ import os -from modelscope_studio.components.Flow import ( +from modelscope_studio.components.legacy.Flow import ( FlowSchemaDict, NodeSchemaAttributeDict, NodeSchemaAttributeListDict, NodeSchemaAttributeRequiredDict, NodeSchemaDict, NodeSchemaPortsDict, NodeSchemaTemplateDict) diff --git a/frontend/legacy/Chatbot/CHANGELOG.md b/frontend/legacy/Chatbot/CHANGELOG.md index 4ad7d083..dfceb9a2 100644 --- a/frontend/legacy/Chatbot/CHANGELOG.md +++ b/frontend/legacy/Chatbot/CHANGELOG.md @@ -31,7 +31,7 @@ No significant changes to this package were made in this release. ### Patch Changes - Updated dependencies [[`68400a3`](https://github.com/modelscope/modelscope-studio/commit/68400a366d5a8af9a8d14f51577d8db1ebdcceb3)]: - - @modelscope-studio/compiled@0.2.1 + - @modelscope-studio/legacy-compiled@0.2.1 ## 0.2.0 diff --git a/frontend/legacy/Chatbot/Index.svelte b/frontend/legacy/Chatbot/Index.svelte index 1fc4feb5..5420ec9f 100644 --- a/frontend/legacy/Chatbot/Index.svelte +++ b/frontend/legacy/Chatbot/Index.svelte @@ -12,7 +12,7 @@ import type { CustomComponents, MarkdownCustomData, - } from '@modelscope-studio/compiled'; + } from '@modelscope-studio/legacy-compiled'; import { normalise_file } from '@utils/upload'; import ChatBot from './shared/ChatBot.svelte'; diff --git a/frontend/legacy/Chatbot/shared/ChatBot.svelte b/frontend/legacy/Chatbot/shared/ChatBot.svelte index a52ad473..6189436f 100644 --- a/frontend/legacy/Chatbot/shared/ChatBot.svelte +++ b/frontend/legacy/Chatbot/shared/ChatBot.svelte @@ -6,7 +6,7 @@ type CustomComponents, FileView, type MarkdownCustomData, - } from '@modelscope-studio/compiled'; + } from '@modelscope-studio/legacy-compiled'; import { get_fetchable_url_or_file } from '@utils/upload'; import { dequal } from 'dequal/lite'; import { afterUpdate, createEventDispatcher } from 'svelte'; diff --git a/frontend/legacy/Chatbot/shared/FlushingMarkdown.svelte b/frontend/legacy/Chatbot/shared/FlushingMarkdown.svelte index cbf3fd5d..4ddc827a 100644 --- a/frontend/legacy/Chatbot/shared/FlushingMarkdown.svelte +++ b/frontend/legacy/Chatbot/shared/FlushingMarkdown.svelte @@ -2,7 +2,7 @@ import { Markdown, type MarkdownCustomData, - } from '@modelscope-studio/compiled'; + } from '@modelscope-studio/legacy-compiled'; import { afterUpdate, createEventDispatcher, onDestroy } from 'svelte'; export let message = ''; diff --git a/frontend/legacy/Flow/Index.svelte b/frontend/legacy/Flow/Index.svelte index 429a4382..479294c3 100644 --- a/frontend/legacy/Flow/Index.svelte +++ b/frontend/legacy/Flow/Index.svelte @@ -9,7 +9,7 @@ type CustomComponents, type FlowCustomData, type FlowProps, - } from '@modelscope-studio/compiled'; + } from '@modelscope-studio/legacy-compiled'; import { get_fetchable_url_or_file } from '@utils/upload'; import Flow from './shared/Flow.svelte'; diff --git a/frontend/legacy/Flow/schema.ts b/frontend/legacy/Flow/schema.ts index ed21921d..8b61b4ff 100644 --- a/frontend/legacy/Flow/schema.ts +++ b/frontend/legacy/Flow/schema.ts @@ -1 +1 @@ -export { FlowSchema } from '@modelscope-studio/compiled/src/Flow/type'; +export { FlowSchema } from '@modelscope-studio/legacy-compiled/src/Flow/type'; diff --git a/frontend/legacy/Flow/shared/Flow.svelte b/frontend/legacy/Flow/shared/Flow.svelte index 09e086b3..74f3bdd8 100644 --- a/frontend/legacy/Flow/shared/Flow.svelte +++ b/frontend/legacy/Flow/shared/Flow.svelte @@ -7,7 +7,7 @@ type FlowCustomData, type FlowProps, type UploadFile, - } from '@modelscope-studio/compiled'; + } from '@modelscope-studio/legacy-compiled'; import { upload } from '@utils/upload'; import { createEventDispatcher, getContext } from 'svelte'; diff --git a/frontend/legacy/Flow/shared/utils.ts b/frontend/legacy/Flow/shared/utils.ts index a89ef822..565293b3 100644 --- a/frontend/legacy/Flow/shared/utils.ts +++ b/frontend/legacy/Flow/shared/utils.ts @@ -1,4 +1,4 @@ -import type { FlowRenderData } from '@modelscope-studio/compiled'; +import type { FlowRenderData } from '@modelscope-studio/legacy-compiled'; export interface FlowData { nodes?: NonNullable; diff --git a/frontend/legacy/Markdown/CHANGELOG.md b/frontend/legacy/Markdown/CHANGELOG.md index 63e1fcc6..354d2084 100644 --- a/frontend/legacy/Markdown/CHANGELOG.md +++ b/frontend/legacy/Markdown/CHANGELOG.md @@ -31,7 +31,7 @@ No significant changes to this package were made in this release. ### Patch Changes - Updated dependencies [[`68400a3`](https://github.com/modelscope/modelscope-studio/commit/68400a366d5a8af9a8d14f51577d8db1ebdcceb3)]: - - @modelscope-studio/compiled@0.2.1 + - @modelscope-studio/legacy-compiled@0.2.1 ## 0.2.0 diff --git a/frontend/legacy/Markdown/Example.svelte b/frontend/legacy/Markdown/Example.svelte index c8d6b0b1..faeb8f69 100644 --- a/frontend/legacy/Markdown/Example.svelte +++ b/frontend/legacy/Markdown/Example.svelte @@ -1,5 +1,8 @@ diff --git a/frontend/base/each/Index.svelte b/frontend/base/each/Index.svelte index 48e8d633..1ddbce6e 100644 --- a/frontend/base/each/Index.svelte +++ b/frontend/base/each/Index.svelte @@ -5,7 +5,8 @@ import Each from './Each.svelte'; - export let value: any[] = []; + export let context_value: Record; + export let value: Record[] = []; export let as_item: string | undefined; // gradio properties export let visible = true; @@ -18,18 +19,25 @@ value, as_item, visible, + context_value, }); $: update({ _internal, value, as_item, visible, + context_value, }); {#if $mergedProps.visible} {#each $mergedProps.value as item, i} - + {/each} diff --git a/frontend/base/filter/Index.svelte b/frontend/base/filter/Index.svelte index 538f75e8..7cd358e7 100644 --- a/frontend/base/filter/Index.svelte +++ b/frontend/base/filter/Index.svelte @@ -5,8 +5,10 @@ getSetSlotContextFn, getSlotContext, } from '@svelte-preprocess-react/slot'; + import { createFunction } from '@utils/createFunction'; export let as_item: string | undefined; + export let params_mapping: string; // gradio properties export let visible = true; export let _internal = {}; @@ -15,12 +17,16 @@ _internal, as_item, visible, + params_mapping, }); $: update({ _internal, as_item, visible, + params_mapping, }); + $: paramsMapping = $mergedProps.params_mapping; + $: paramsMappingFn = createFunction(paramsMapping); const setSlotContext = getSetSlotContextFn(); @@ -31,10 +37,14 @@ visible: _visible, ...restProps } = $mergedProps; - if (!_as_item) { - setSlotContext(undefined); + if (paramsMappingFn) { + setSlotContext(paramsMappingFn(restProps)); } else { - setSlotContext(restProps); + if (!as_item) { + setSlotContext(undefined); + } else { + setSlotContext(restProps); + } } } diff --git a/frontend/svelte-preprocess-react/internal/ReactWrapper.svelte b/frontend/svelte-preprocess-react/internal/ReactWrapper.svelte index edd28b1c..a0a31b7d 100644 --- a/frontend/svelte-preprocess-react/internal/ReactWrapper.svelte +++ b/frontend/svelte-preprocess-react/internal/ReactWrapper.svelte @@ -16,7 +16,7 @@ const listeners: Array<() => void> = []; - const parent = getContext('$$ms-gr-antd-react-wrapper'); + const parent = getContext('$$ms-gr-react-wrapper'); const { slotKey, slotIndex, subSlotIndex } = getComponentSlotContext() || {}; const node = svelteInit({ parent, @@ -30,7 +30,7 @@ listeners.push(callback); }, }); - setContext('$$ms-gr-antd-react-wrapper', node); + setContext('$$ms-gr-react-wrapper', node); beforeUpdate(() => { props.set(extractProps($$props)); }); diff --git a/frontend/svelte-preprocess-react/slot.ts b/frontend/svelte-preprocess-react/slot.ts index f21cf3fb..4231bb98 100644 --- a/frontend/svelte-preprocess-react/slot.ts +++ b/frontend/svelte-preprocess-react/slot.ts @@ -1,7 +1,7 @@ import { getContext, setContext } from 'svelte'; import { get, type Writable, writable } from 'svelte/store'; -const slotsKey = '$$ms-gr-antd-slots-key'; +const slotsKey = '$$ms-gr-slots-key'; export function getSlots() { const slots = writable({} as Record); @@ -25,7 +25,7 @@ export function getSetSlotFn() { }; } -const slotParamsKey = '$$ms-gr-antd-render-slot-context-key'; +const slotParamsKey = '$$ms-gr-render-slot-context-key'; export function getSetSlotParamsFn() { const slotParams = setContext( @@ -53,7 +53,7 @@ export function getSlotParams() { | undefined; } -const slotContextKey = '$$ms-gr-antd-context-key'; +const slotContextKey = '$$ms-gr-context-key'; export function getSetSlotContextFn() { const value = writable(); setContext(slotContextKey, value); @@ -130,7 +130,7 @@ export function getSlotContext< ]; } -const slotKey = '$$ms-gr-antd-slot-key'; +const slotKey = '$$ms-gr-slot-key'; export function resetSlotKey() { setContext(slotKey, writable(undefined)); @@ -142,7 +142,7 @@ export function getSlotKey() { return getContext(slotKey) as Writable | undefined; } -const componentSlotContextKey = '$$ms-gr-antd-component-slot-context-key'; +const componentSlotContextKey = '$$ms-gr-component-slot-context-key'; export function setComponentSlotContext({ slot, diff --git a/frontend/utils/createItemsContext.tsx b/frontend/utils/createItemsContext.tsx index 2dd8e1f3..e91fce5a 100644 --- a/frontend/utils/createItemsContext.tsx +++ b/frontend/utils/createItemsContext.tsx @@ -21,7 +21,7 @@ export type Item = | undefined; export function createItemsContext(key: string) { - const itemKey = `$$ms-gr-antd-${key}-context-key`; + const itemKey = `$$ms-gr-${key}-context-key`; function getItems( allowedSlots: T = ['default'] as T ): { From ed8aeb9354e33253f520bd69f611eba5ae1d62f9 Mon Sep 17 00:00:00 2001 From: Col0ring <1561999073@qq.com> Date: Mon, 23 Sep 2024 11:07:31 +0800 Subject: [PATCH 12/51] feat: integrate Application and Lifecycle --- .../components/base/application/__init__.py | 83 +++++++++++++++-- .../components/legacy/Lifecycle/__init__.py | 3 +- frontend/base/application/Index.svelte | 91 ++++++++++++++++++- 3 files changed, 165 insertions(+), 12 deletions(-) diff --git a/backend/modelscope_studio/components/base/application/__init__.py b/backend/modelscope_studio/components/base/application/__init__.py index b62f786b..47df9842 100644 --- a/backend/modelscope_studio/components/base/application/__init__.py +++ b/backend/modelscope_studio/components/base/application/__init__.py @@ -2,42 +2,105 @@ from typing import Any -from ....utils.dev import ModelScopeLayoutComponent, resolve_frontend_dir +from gradio.data_classes import GradioModel +from gradio.events import EventListener +from ....utils.dev import ModelScopeDataLayoutComponent, resolve_frontend_dir -class ModelScopeApplication(ModelScopeLayoutComponent): + +class ApplicationPageScreenData(GradioModel): + width: float + height: float + scrollX: float + scrollY: float + + +class ApplicationPageData(GradioModel): + screen: ApplicationPageScreenData + language: str + theme: str + userAgent: str + + +class ModelScopeApplication(ModelScopeDataLayoutComponent): """ """ - EVENTS = ["custom"] + EVENTS = [ + EventListener( + "custom", + doc= + "This listener is triggered when the `window.ms_globals.dispatch` is called in javascript.", + callback=lambda block: block._internal.update(bind_custom_event= + True)), + EventListener( + "mount", + doc= + "This listener is triggered when the application initially mount in the browser.", + callback=lambda block: block._internal.update(bind_mount_event=True + )), + EventListener( + "resize", + doc= + "This listener is triggered when the user resizes the browser window.", + callback=lambda block: block._internal.update(bind_resize_event= + True)), + EventListener( + "unmount", + doc="This listener is triggered when the user leaves the page.", + callback=lambda block: block._internal.update(bind_unmount_event= + True)), + ] # supported slots SLOTS = [] def __init__( self, + value: ApplicationPageData | dict | None = None, *, + _internal: None = None, # gradio properties visible: bool = True, + key: int | str | None = None, render: bool = True, **kwargs): - super().__init__(visible=visible, render=render, **kwargs) + super().__init__(value=value, + visible=visible, + render=render, + key=key, + **kwargs) FRONTEND_DIR = resolve_frontend_dir("application", type="base") - @property - def skip_api(self): - return True + data_model = ApplicationPageData - def preprocess(self, payload: None) -> None: + def preprocess( + self, payload: ApplicationPageData | dict | None + ) -> ApplicationPageData | dict | None: return payload - def postprocess(self, value: None) -> None: + def postprocess( + self, value: ApplicationPageData | dict | None + ) -> ApplicationPageData | dict | None: return value def example_payload(self) -> Any: - return None + return { + "screen": { + "width": 1920, + "height": 1080, + "scrollX": 0, + "scrollY": 0, + }, + "theme": + "light", + "language": + "en", + "userAgent": + "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36", + } def example_value(self) -> Any: return None diff --git a/backend/modelscope_studio/components/legacy/Lifecycle/__init__.py b/backend/modelscope_studio/components/legacy/Lifecycle/__init__.py index 84a585ab..cbcf1e30 100644 --- a/backend/modelscope_studio/components/legacy/Lifecycle/__init__.py +++ b/backend/modelscope_studio/components/legacy/Lifecycle/__init__.py @@ -56,6 +56,7 @@ class ModelScopeLifecycle(Component): def __init__( self, + value: LifecycleData | dict | None = None, *, every: float | None = None, _bind_mount_event: bool | None = None, @@ -69,7 +70,7 @@ def __init__( self._bind_mount_event = _bind_mount_event self._bind_resize_event = _bind_resize_event self._bind_unmount_event = _bind_unmount_event - super().__init__(every=every) + super().__init__(value=value, every=every) def preprocess( self, payload: LifecycleData | dict | None diff --git a/frontend/base/application/Index.svelte b/frontend/base/application/Index.svelte index 1e5862ff..d3bfe3cc 100644 --- a/frontend/base/application/Index.svelte +++ b/frontend/base/application/Index.svelte @@ -3,17 +3,106 @@ From c152e5eb7091623d71e08d2d4457409f77fca1eb Mon Sep 17 00:00:00 2001 From: Col0ring <1561999073@qq.com> Date: Mon, 23 Sep 2024 14:53:37 +0800 Subject: [PATCH 13/51] feat: handle rest props --- .../components/antd/form/item/__init__.py | 4 +- frontend/antd/button/Index.svelte | 95 ++++--------------- frontend/antd/config-provider/Index.svelte | 5 +- .../antd/config-provider/config-provider.tsx | 6 +- frontend/svelte-preprocess-react/component.ts | 36 +++++++ frontend/svelte-preprocess-react/slot.ts | 40 ++++++-- 6 files changed, 99 insertions(+), 87 deletions(-) diff --git a/backend/modelscope_studio/components/antd/form/item/__init__.py b/backend/modelscope_studio/components/antd/form/item/__init__.py index 6fbede17..6a11c53d 100644 --- a/backend/modelscope_studio/components/antd/form/item/__init__.py +++ b/backend/modelscope_studio/components/antd/form/item/__init__.py @@ -1,10 +1,10 @@ from __future__ import annotations -from .....utils.dev import ModelScopeDataLayoutComponent, resolve_frontend_dir +from .....utils.dev import ModelScopeLayoutComponent, resolve_frontend_dir from .rule import AntdFormItemRule -class AntdFormItem(ModelScopeDataLayoutComponent): +class AntdFormItem(ModelScopeLayoutComponent): """ """ Rule = AntdFormItemRule diff --git a/frontend/antd/button/Index.svelte b/frontend/antd/button/Index.svelte index 523a46f5..3ca3e94f 100644 --- a/frontend/antd/button/Index.svelte +++ b/frontend/antd/button/Index.svelte @@ -21,22 +21,6 @@ layout?: boolean; } = {}; export let value = ''; - export let auto_insert_space; - export let block; - export let class_names; - export let danger; - export let disabled; - export let ghost; - export let href; - export let html_type; - export let icon; - export let icon_position; - export let loading; - export let shape; - export let size; - export let styles; - export let href_target; - export let type; export let as_item: string | undefined; // gradio properties @@ -44,33 +28,24 @@ export let elem_id = ''; export let elem_classes: string[] = []; export let elem_style: React.CSSProperties = {}; - const [mergedProps, update] = getSlotContext({ - gradio, - props: $updatedProps, - _internal, - value, - visible, - elem_id, - elem_classes, - elem_style, - as_item, - auto_insert_space, - block, - class_names, - danger, - disabled, - ghost, - href, - html_type, - icon, - icon_position, - loading, - shape, - size, - styles, - href_target, - type, - }); + const [mergedProps, update] = getSlotContext( + { + gradio, + props: $updatedProps, + _internal, + value, + visible, + elem_id, + elem_classes, + elem_style, + as_item, + restProps: $$restProps, + }, + { + href_target: 'target', + } + ); + const slots = getSlots(); $: update({ gradio, @@ -82,22 +57,7 @@ elem_classes, elem_style, as_item, - auto_insert_space, - block, - class_names, - danger, - disabled, - ghost, - href, - html_type, - icon, - icon_position, - loading, - shape, - size, - styles, - href_target, - type, + restProps: $$restProps, }); @@ -108,22 +68,7 @@ style={$mergedProps.elem_style} className={cls($mergedProps.elem_classes, 'ms-gr-antd-button')} id={$mergedProps.elem_id} - autoInsertSpace={$mergedProps.auto_insert_space} - block={$mergedProps.block} - classNames={$mergedProps.class_names} - danger={$mergedProps.danger} - disabled={$mergedProps.disabled} - ghost={$mergedProps.ghost} - href={$mergedProps.href} - htmlType={$mergedProps.html_type} - icon={$mergedProps.icon} - iconPosition={$mergedProps.icon_position} - loading={$mergedProps.loading} - shape={$mergedProps.shape} - size={$mergedProps.size} - styles={$mergedProps.styles} - target={$mergedProps.href_target} - type={$mergedProps.type} + {...$mergedProps.restProps} {...$mergedProps.props} {...bindEvents($mergedProps)} slots={$slots} diff --git a/frontend/antd/config-provider/Index.svelte b/frontend/antd/config-provider/Index.svelte index 719e90b4..473226f3 100644 --- a/frontend/antd/config-provider/Index.svelte +++ b/frontend/antd/config-provider/Index.svelte @@ -31,6 +31,7 @@ elem_classes, elem_style, as_item, + restProps: $$restProps, }); const slots = getSlots(); $: update({ @@ -42,6 +43,7 @@ elem_classes, elem_style, as_item, + restProps: $$restProps, }); @@ -51,9 +53,10 @@ className={cls('ms-gr-antd-config-provider', $mergedProps.elem_classes)} id={$mergedProps.elem_id} style={$mergedProps.elem_style} + {...$mergedProps.restProps} {...$mergedProps.props} slots={$slots} - theme_mode={$mergedProps.gradio.theme} + themeMode={$mergedProps.gradio.theme} > diff --git a/frontend/antd/config-provider/config-provider.tsx b/frontend/antd/config-provider/config-provider.tsx index 845f7288..4aa40efa 100644 --- a/frontend/antd/config-provider/config-provider.tsx +++ b/frontend/antd/config-provider/config-provider.tsx @@ -38,7 +38,7 @@ type ConfigProviderProps = GetProps; export const ConfigProvider = sveltify< Omit & { - theme_mode: string; + themeMode: string; theme?: Omit & { algorithm?: { // Auto recognition @@ -54,7 +54,7 @@ export const ConfigProvider = sveltify< >( ({ slots, - theme_mode, + themeMode, id, className, style, @@ -66,7 +66,7 @@ export const ConfigProvider = sveltify< }) => { const [locale, setLocale] = useState(); const algorithm = { - dark: theme_mode === 'dark' ? true : false, + dark: themeMode === 'dark' ? true : false, ...(props.theme?.algorithm || {}), }; const getPopupContainerFunction = useFunction(getPopupContainer); diff --git a/frontend/svelte-preprocess-react/component.ts b/frontend/svelte-preprocess-react/component.ts index a341b95c..5e8cce2f 100644 --- a/frontend/svelte-preprocess-react/component.ts +++ b/frontend/svelte-preprocess-react/component.ts @@ -1,4 +1,5 @@ import type { Gradio } from '@gradio/utils'; +import { mapKeys, omit } from 'lodash-es'; export async function initialize() { if (!window.ms_globals.initializePromise) { @@ -18,6 +19,41 @@ export async function importComponent( return importer().then((m) => m.default); } +function convertToCamelCase(str: string) { + return str.replace(/(^|_)(\w)/g, (_match, _separator, char, index) => { + if (index === 0) { + return char.toLowerCase(); + } else { + return char.toUpperCase(); + } + }); +} + +export function getComponentRestProps>( + props: T, + mapping: Record = {} as Record +) { + const gradioProps = [ + 'interactive', + 'gradio', + 'server', + 'target', + 'theme_mode', + 'root', + 'name', + 'visible', + 'elem_id', + 'elem_classes', + 'elem_style', + '_internal', + 'props', + 'value', + ]; + return mapKeys(omit(props, gradioProps), (_, key) => { + return mapping[key] || convertToCamelCase(key); + }); +} + export function bindEvents< T extends { gradio: Gradio; diff --git a/frontend/svelte-preprocess-react/slot.ts b/frontend/svelte-preprocess-react/slot.ts index 4231bb98..028d55bf 100644 --- a/frontend/svelte-preprocess-react/slot.ts +++ b/frontend/svelte-preprocess-react/slot.ts @@ -1,6 +1,8 @@ import { getContext, setContext } from 'svelte'; import { get, type Writable, writable } from 'svelte/store'; +import { getComponentRestProps } from './component'; + const slotsKey = '$$ms-gr-slots-key'; export function getSlots() { @@ -70,8 +72,12 @@ export function getSlotContext< T extends { as_item?: string; _internal: Record; + restProps?: Record; }, ->(props: T): [Writable, (props: T) => void] { +>( + props: T, + restPropsMapping?: Record +): [Writable, (props: T) => void] { if (!Reflect.has(props, 'as_item') || !Reflect.has(props, '_internal')) { throw new Error('`as_item` and `_internal` is required'); } @@ -90,20 +96,38 @@ export function getSlotContext< resetSlotKey(); const ctx = getContext(slotContextKey) as Writable; const as_item = get(ctx)?.as_item || props.as_item; - const initialCtxValue = ctx + const initialCtxValue: Record = ctx ? as_item - ? get(ctx)[as_item as keyof T] + ? (get(ctx)[as_item as keyof T] as Record) : get(ctx) : {}; - const mergedProps = writable({ + const mergeRestProps = ( + restProps?: Record, + ctxValue?: Record + ) => { + return restProps + ? getComponentRestProps( + { + ...restProps, + ...(ctxValue || {}), + }, + restPropsMapping + ) + : undefined; + }; + const mergedProps = writable({ ...props, ...initialCtxValue, + restProps: mergeRestProps(props.restProps, initialCtxValue), }); if (!ctx) { return [ mergedProps, (v) => { - mergedProps.set(v); + mergedProps.set({ + ...v, + restProps: mergeRestProps(v.restProps), + }); }, ]; } @@ -115,16 +139,20 @@ export function getSlotContext< mergedProps.update((prev) => ({ ...prev, ...ctxValue, + restProps: mergeRestProps(prev.restProps, ctxValue), })); }); return [ mergedProps, (v) => { - const ctxValue = v.as_item ? get(ctx)[v.as_item as keyof T] : get(ctx); + const ctxValue: Record = v.as_item + ? (get(ctx)[v.as_item as keyof T] as Record) + : get(ctx); return mergedProps.set({ ...v, ...ctxValue, + restProps: mergeRestProps(v.restProps, ctxValue), }); }, ]; From 6a9d2fd894eea3056945ea5346784068383b51bb Mon Sep 17 00:00:00 2001 From: Col0ring <1561999073@qq.com> Date: Tue, 24 Sep 2024 19:23:15 +0800 Subject: [PATCH 14/51] feat: update to antd 5.21.0 --- .../components/antd/__init__.py | 2 + .../components/antd/button/__init__.py | 7 + .../components/antd/components.py | 2 + .../components/antd/menu/item/__init__.py | 2 +- .../components/antd/splitter/__init__.py | 78 ++ .../antd/splitter/panel/__init__.py | 76 ++ config/changelog/package.json | 4 +- config/lint-config/package.json | 14 +- .../breadcrumb/item/BreadcrumbItem.svelte | 3 +- frontend/antd/pagination/pagination.tsx | 39 +- frontend/antd/splitter/Index.svelte | 76 ++ frontend/antd/splitter/context.ts | 6 + frontend/antd/splitter/gradio.config.js | 3 + frontend/antd/splitter/package.json | 8 + frontend/antd/splitter/panel/Index.svelte | 86 ++ frontend/antd/splitter/panel/gradio.config.js | 3 + frontend/antd/splitter/panel/package.json | 8 + frontend/antd/splitter/splitter.tsx | 32 + frontend/antd/table/table.tsx | 4 +- frontend/antd/typography/Base.svelte | 8 +- frontend/antd/typography/typography.base.tsx | 28 +- frontend/antd/upload/upload.tsx | 18 + frontend/package.json | 10 +- frontend/svelte-preprocess-react/slot.ts | 9 +- package.json | 2 +- pnpm-lock.yaml | 966 +++++++++--------- pyproject.toml | 2 +- 27 files changed, 982 insertions(+), 514 deletions(-) create mode 100644 backend/modelscope_studio/components/antd/splitter/__init__.py create mode 100644 backend/modelscope_studio/components/antd/splitter/panel/__init__.py create mode 100644 frontend/antd/splitter/Index.svelte create mode 100644 frontend/antd/splitter/context.ts create mode 100644 frontend/antd/splitter/gradio.config.js create mode 100644 frontend/antd/splitter/package.json create mode 100644 frontend/antd/splitter/panel/Index.svelte create mode 100644 frontend/antd/splitter/panel/gradio.config.js create mode 100644 frontend/antd/splitter/panel/package.json create mode 100644 frontend/antd/splitter/splitter.tsx diff --git a/backend/modelscope_studio/components/antd/__init__.py b/backend/modelscope_studio/components/antd/__init__.py index cfcad3ca..3dfd2d6b 100644 --- a/backend/modelscope_studio/components/antd/__init__.py +++ b/backend/modelscope_studio/components/antd/__init__.py @@ -101,6 +101,8 @@ from .space import AntdSpace as Space from .space.compact import AntdSpaceCompact as SpaceCompact from .spin import AntdSpin as Spin +from .splitter import AntdSplitter as Splitter +from .splitter.panel import AntdSplitterPanel as SplitterPanel from .statistic import AntdStatistic as Statistic from .statistic import AntdStatisticCountdown as StatisticCountdown from .steps import AntdSteps as Steps diff --git a/backend/modelscope_studio/components/antd/button/__init__.py b/backend/modelscope_studio/components/antd/button/__init__.py index 6c30753d..94a06b86 100644 --- a/backend/modelscope_studio/components/antd/button/__init__.py +++ b/backend/modelscope_studio/components/antd/button/__init__.py @@ -62,6 +62,9 @@ def __init__( href_target: str | None = None, type: Literal["primary", "dashed", "link", "text", "default"] | None = "default", + variant: Literal["outlined", "dashed", "solid", "filled", "text", + "link"] | None = None, + color: Literal['default', 'primary', 'danger'] | None = None, as_item: str | None = None, _internal: None = None, # gradio properties @@ -89,6 +92,8 @@ def __init__( styles: Semantic DOM style. href_target: Same as target attribute of a, works when href is specified. type: Set button type. + variant: Set button variant. + color: Set button color. """ super().__init__(visible=visible, elem_id=elem_id, @@ -115,6 +120,8 @@ def __init__( self.styles = styles self.href_target = href_target self.type = type + self.variant = variant + self.color = color FRONTEND_DIR = resolve_frontend_dir("button") diff --git a/backend/modelscope_studio/components/antd/components.py b/backend/modelscope_studio/components/antd/components.py index 15704f51..ba3fca49 100644 --- a/backend/modelscope_studio/components/antd/components.py +++ b/backend/modelscope_studio/components/antd/components.py @@ -99,6 +99,8 @@ from .space import AntdSpace from .space.compact import AntdSpaceCompact from .spin import AntdSpin +from .splitter import AntdSplitter +from .splitter.panel import AntdSplitterPanel from .statistic import AntdStatistic, AntdStatisticCountdown from .steps import AntdSteps from .steps.item import AntdStepsItem diff --git a/backend/modelscope_studio/components/antd/menu/item/__init__.py b/backend/modelscope_studio/components/antd/menu/item/__init__.py index 1d205951..2f4a4f5e 100644 --- a/backend/modelscope_studio/components/antd/menu/item/__init__.py +++ b/backend/modelscope_studio/components/antd/menu/item/__init__.py @@ -18,7 +18,7 @@ class AntdMenuItem(ModelScopeLayoutComponent): ] # supported slots - SLOTS = ["title", 'icon', "label"] + SLOTS = ["title", 'icon', "label", "extra"] def __init__( self, diff --git a/backend/modelscope_studio/components/antd/splitter/__init__.py b/backend/modelscope_studio/components/antd/splitter/__init__.py new file mode 100644 index 00000000..c0978514 --- /dev/null +++ b/backend/modelscope_studio/components/antd/splitter/__init__.py @@ -0,0 +1,78 @@ +from __future__ import annotations + +from typing import Any, Literal + +from gradio.events import EventListener + +from ....utils.dev import ModelScopeLayoutComponent, resolve_frontend_dir +from .panel import AntdSplitterPanel + + +class AntdSplitter(ModelScopeLayoutComponent): + """ + Split panels to isolate. + + Can be used to separate areas horizontally or vertically. When you need to freely drag and adjust the size of each area. When you need to specify the maximum and minimum width and height of an area. + """ + Panel = AntdSplitterPanel + + EVENTS = [ + EventListener("resize_start", + doc="Callback before dragging starts.", + callback=lambda block: block._internal.update( + bind_resizeStart_event=True)), + EventListener("resize", + doc="Panel size change callback.", + callback=lambda block: block._internal.update( + bind_resize_event=True)), + EventListener("resize_end", + doc="Drag end callback.", + callback=lambda block: block._internal.update( + bind_resizeEnd_event=True)), + ] + + def __init__( + self, + props: dict | None = None, + *, + layout: Literal['horizontal', 'vertical'] | None = 'horizontal', + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + """ + Parameters: + layout: Layout direction. + """ + super().__init__(visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.props = props + self.layout = layout + + FRONTEND_DIR = resolve_frontend_dir("splitter") + + @property + def skip_api(self): + return True + + def preprocess(self, payload: None) -> None: + return payload + + def postprocess(self, value: None) -> None: + return value + + def example_payload(self) -> Any: + return None + + def example_value(self) -> Any: + return None diff --git a/backend/modelscope_studio/components/antd/splitter/panel/__init__.py b/backend/modelscope_studio/components/antd/splitter/panel/__init__.py new file mode 100644 index 00000000..b90aeea6 --- /dev/null +++ b/backend/modelscope_studio/components/antd/splitter/panel/__init__.py @@ -0,0 +1,76 @@ +from __future__ import annotations + +from typing import Any + +from .....utils.dev import ModelScopeLayoutComponent, resolve_frontend_dir + + +class AntdSplitterPanel(ModelScopeLayoutComponent): + """ + Split panels to isolate. + + Can be used to separate areas horizontally or vertically. When you need to freely drag and adjust the size of each area. When you need to specify the maximum and minimum width and height of an area. + """ + + EVENTS = [] + + def __init__( + self, + props: dict | None = None, + *, + default_size: str | int | None = None, + min: int | str | None = None, + max: int | str | None = None, + size: int | str | None = None, + collapsible: bool | dict = False, + resizable: bool = True, + as_item: str | None = None, + _internal: None = None, + # gradio properties + visible: bool = True, + elem_id: str | None = None, + elem_classes: list[str] | str | None = None, + elem_style: dict | None = None, + render: bool = True, + **kwargs): + """ + Parameters: + default_size: Initial panel size support number for px or 'percent%' usage. + min: Minimum threshold support number for px or 'percent%' usage. + max: Maximum threshold support number for px or 'percent%' usage. + size: Controlled panel size support number for px or 'percent%' usage. + collapsible: Quick folding. + resizable: Whether to enable drag and drop. + """ + super().__init__(visible=visible, + elem_id=elem_id, + elem_classes=elem_classes, + render=render, + as_item=as_item, + elem_style=elem_style, + **kwargs) + self.props = props + self.default_size = default_size + self.min = min + self.max = max + self.size = size + self.collapsible = collapsible + self.resizable = resizable + + FRONTEND_DIR = resolve_frontend_dir("splitter", 'panel') + + @property + def skip_api(self): + return True + + def preprocess(self, payload: None) -> None: + return payload + + def postprocess(self, value: None) -> None: + return value + + def example_payload(self) -> Any: + return None + + def example_value(self) -> Any: + return None diff --git a/config/changelog/package.json b/config/changelog/package.json index bf504b3d..70410726 100644 --- a/config/changelog/package.json +++ b/config/changelog/package.json @@ -25,7 +25,7 @@ }, "devDependencies": { "@changesets/types": "^6.0.0", - "@types/node": "^22.5.4", - "tsup": "^8.2.4" + "@types/node": "^22.5.5", + "tsup": "^8.3.0" } } diff --git a/config/lint-config/package.json b/config/lint-config/package.json index c5923096..41290945 100644 --- a/config/lint-config/package.json +++ b/config/lint-config/package.json @@ -17,8 +17,8 @@ }, "dependencies": { "@eslint/compat": "^1.1.1", - "@eslint/js": "^9.7.0", - "@typescript-eslint/parser": "^8.5.0", + "@eslint/js": "^9.11.0", + "@typescript-eslint/parser": "^8.6.0", "eslint-config-prettier": "^9.0.0", "eslint-import-resolver-typescript": "^3.6.0", "eslint-plugin-import": "^2.29.1", @@ -26,11 +26,11 @@ "eslint-plugin-prettier": "5.2.1", "eslint-plugin-react": "^7.36.1", "eslint-plugin-react-hooks": "^4.6.2", - "eslint-plugin-react-refresh": "^0.4.8", + "eslint-plugin-react-refresh": "^0.4.12", "eslint-plugin-simple-import-sort": "^12.1.0", - "eslint-plugin-svelte": "^2.42.0", + "eslint-plugin-svelte": "^2.44.0", "globals": "^15.6.0", - "postcss": "^8.4.38", + "postcss": "^8.4.47", "postcss-less": "^6.0.0", "stylelint-config-ali": "^2.1.1", "stylelint-config-rational-order": "^0.1.2", @@ -38,8 +38,8 @@ "stylelint-declaration-block-no-ignored-properties": "^2.8.0", "stylelint-order": "^6.0.4", "stylelint-prettier": "^5.0.2", - "svelte-eslint-parser": "^0.41.0", - "typescript-eslint": "^8.5.0" + "svelte-eslint-parser": "^0.41.1", + "typescript-eslint": "^8.6.0" }, "devDependencies": { "@types/eslint": "^9.6.1", diff --git a/frontend/antd/breadcrumb/item/BreadcrumbItem.svelte b/frontend/antd/breadcrumb/item/BreadcrumbItem.svelte index 6105a701..b796b8bd 100644 --- a/frontend/antd/breadcrumb/item/BreadcrumbItem.svelte +++ b/frontend/antd/breadcrumb/item/BreadcrumbItem.svelte @@ -91,6 +91,7 @@ renderSlot($slots['dropdownProps.menu.overflowedIndicator']) || $mergedProps.props.dropdownProps?.menu?.overflowedIndicator, }; + const dropdownProps = { ...($mergedProps.props.dropdownProps || {}), dropdownRender: createFunction( @@ -98,7 +99,7 @@ ), menu: Object.values(dropdownMenu).filter(Boolean).length > 0 - ? menu + ? dropdownMenu : undefined, }; const currentMergedProps = { diff --git a/frontend/antd/pagination/pagination.tsx b/frontend/antd/pagination/pagination.tsx index 157d340d..d5eb7d61 100644 --- a/frontend/antd/pagination/pagination.tsx +++ b/frontend/antd/pagination/pagination.tsx @@ -7,6 +7,7 @@ import { type GetProps, Pagination as APagination } from 'antd'; export const Pagination = sveltify< GetProps & { onValueChange: (page: number, pageSize: number) => void; + children?: React.ReactNode; }, ['showQuickJumper.goButton'] >( @@ -16,27 +17,31 @@ export const Pagination = sveltify< showTotal, showQuickJumper, onChange, + children, ...props }) => { const showTotalFunction = useFunction(showTotal); return ( - { - onValueChange(page, pageSize); - onChange?.(page, pageSize); - }} - showQuickJumper={ - slots['showQuickJumper.goButton'] - ? { - goButton: ( - - ), - } - : showQuickJumper - } - /> + <> +
{children}
+ { + onValueChange(page, pageSize); + onChange?.(page, pageSize); + }} + showQuickJumper={ + slots['showQuickJumper.goButton'] + ? { + goButton: ( + + ), + } + : showQuickJumper + } + /> + ); } ); diff --git a/frontend/antd/splitter/Index.svelte b/frontend/antd/splitter/Index.svelte new file mode 100644 index 00000000..7ba98150 --- /dev/null +++ b/frontend/antd/splitter/Index.svelte @@ -0,0 +1,76 @@ + + + + +{#if $mergedProps.visible} + {#await AwaitedSplitter then Splitter} + + + + {/await} +{/if} + + diff --git a/frontend/antd/splitter/context.ts b/frontend/antd/splitter/context.ts new file mode 100644 index 00000000..16c5391a --- /dev/null +++ b/frontend/antd/splitter/context.ts @@ -0,0 +1,6 @@ +import { createItemsContext } from '@utils/createItemsContext'; + +const { getItems, getSetItemFn } = createItemsContext('splitter'); + +export { getItems, getSetItemFn }; +export * from '@utils/createItemsContext'; diff --git a/frontend/antd/splitter/gradio.config.js b/frontend/antd/splitter/gradio.config.js new file mode 100644 index 00000000..916857c0 --- /dev/null +++ b/frontend/antd/splitter/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/splitter/package.json b/frontend/antd/splitter/package.json new file mode 100644 index 00000000..16fce53d --- /dev/null +++ b/frontend/antd/splitter/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-splitter", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/splitter/panel/Index.svelte b/frontend/antd/splitter/panel/Index.svelte new file mode 100644 index 00000000..1897ac84 --- /dev/null +++ b/frontend/antd/splitter/panel/Index.svelte @@ -0,0 +1,86 @@ + + + + +{#if $mergedProps.visible} + + + +{/if} + + diff --git a/frontend/antd/splitter/panel/gradio.config.js b/frontend/antd/splitter/panel/gradio.config.js new file mode 100644 index 00000000..1992403d --- /dev/null +++ b/frontend/antd/splitter/panel/gradio.config.js @@ -0,0 +1,3 @@ +import config from '../../../defineConfig.js'; + +export default config(); diff --git a/frontend/antd/splitter/panel/package.json b/frontend/antd/splitter/panel/package.json new file mode 100644 index 00000000..1b69296c --- /dev/null +++ b/frontend/antd/splitter/panel/package.json @@ -0,0 +1,8 @@ +{ + "name": "@modelscope-studio/antd-panel", + "type": "module", + "exports": { + ".": "./Index.svelte", + "./package.json": "./package.json" + } +} diff --git a/frontend/antd/splitter/splitter.tsx b/frontend/antd/splitter/splitter.tsx new file mode 100644 index 00000000..2a0daf70 --- /dev/null +++ b/frontend/antd/splitter/splitter.tsx @@ -0,0 +1,32 @@ +import { sveltify } from '@svelte-preprocess-react'; +import { ReactSlot } from '@svelte-preprocess-react/react-slot'; +import { type GetProps, Splitter as ASplitter } from 'antd'; + +import { type Item } from './context'; + +export const Splitter = sveltify< + GetProps & { + items?: Item[]; + } +>(({ items, children, ...props }) => { + return ( + <> +
{children}
+ + {items?.map((item, index) => { + if (!item) { + return; + } + const { el, props: panelProps } = item; + return ( + + {el && } + + ); + })} + + + ); +}); + +export default Splitter; diff --git a/frontend/antd/table/table.tsx b/frontend/antd/table/table.tsx index d9cd843b..2f53f9dd 100644 --- a/frontend/antd/table/table.tsx +++ b/frontend/antd/table/table.tsx @@ -39,6 +39,7 @@ export const Table = sveltify< pagination, loading, rowKey, + summary, rowSelection, rowSelectionItems, expandableItems, @@ -73,7 +74,7 @@ export const Table = sveltify< const stickyGetContainerFunction = useFunction(stickyConfig.getContainer); const onRowFunction = useFunction(onRow); const onHeaderRowFunction = useFunction(onHeaderRow); - + const summaryFunction = useFunction(summary); return ( <>
{children}
@@ -106,6 +107,7 @@ export const Table = sveltify< }, [columnItems, columns])} onRow={onRowFunction} onHeaderRow={onHeaderRowFunction} + summary={summaryFunction} rowSelection={useMemo(() => { return ( rowSelection || diff --git a/frontend/antd/typography/Base.svelte b/frontend/antd/typography/Base.svelte index f728f140..f26b8c70 100644 --- a/frontend/antd/typography/Base.svelte +++ b/frontend/antd/typography/Base.svelte @@ -5,7 +5,11 @@ bindEvents, importComponent, } from '@svelte-preprocess-react/component'; - import { getSlotContext, getSlots } from '@svelte-preprocess-react/slot'; + import { + getSetSlotParamsFn, + getSlotContext, + getSlots, + } from '@svelte-preprocess-react/slot'; import type React from 'react'; import type { Gradio } from '@gradio/utils'; import cls from 'classnames'; @@ -42,6 +46,7 @@ elem_style, as_item, }); + const setSlotParams = getSetSlotParamsFn(); const slots = getSlots(); $: update({ gradio, @@ -67,6 +72,7 @@ {...$mergedProps.props} {...bindEvents($mergedProps)} slots={$slots} + {setSlotParams} > {#if $mergedProps._internal.layout} diff --git a/frontend/antd/typography/typography.base.tsx b/frontend/antd/typography/typography.base.tsx index 8cab0e54..f9114e13 100644 --- a/frontend/antd/typography/typography.base.tsx +++ b/frontend/antd/typography/typography.base.tsx @@ -1,6 +1,8 @@ import { sveltify } from '@svelte-preprocess-react'; import { ReactSlot } from '@svelte-preprocess-react/react-slot'; +import type { SetSlotParams } from '@svelte-preprocess-react/slot'; import React, { useMemo } from 'react'; +import { renderSlot } from '@utils/renderSlot'; import { type GetProps, Typography } from 'antd'; import type { EllipsisConfig } from 'antd/es/typography/Base'; import cls from 'classnames'; @@ -20,8 +22,10 @@ export const TypographyBase = sveltify< GetProps & GetProps & { component: 'title' | 'paragraph' | 'text' | 'link'; + setSlotParams: SetSlotParams; }, [ + // list 'copyable.icon', // list 'copyable.tooltips', @@ -41,9 +45,11 @@ export const TypographyBase = sveltify< copyable, editable, ellipsis, + setSlotParams, ...props }) => { const copyableTooltipsTargets = useTargets(children, 'copyable.tooltips'); + const copyableIconTargets = useTargets(children, 'copyable.icon'); const supportCopy = slots['copyable.icon'] || copyableTooltipsTargets.length > 0 || copyable; const supportEdit = @@ -86,11 +92,12 @@ export const TypographyBase = sveltify< return ; }) : copyableConfig.tooltips, - icon: slots['copyable.icon'] ? ( - - ) : ( - copyableConfig.icon - ), + icon: + copyableIconTargets.length > 0 + ? copyableIconTargets.map((slot, index) => { + return ; + }) + : copyableConfig.icon, } : undefined } @@ -122,11 +129,12 @@ export const TypographyBase = sveltify< : supportEllipsis ? ({ ...ellipsisConfig, - symbol: slots['ellipsis.symbol'] ? ( - - ) : ( - ellipsisConfig.symbol - ), + symbol: slots['ellipsis.symbol'] + ? (...args) => { + setSlotParams('ellipsis.symbol', args); + return renderSlot(slots['ellipsis.symbol']); + } + : ellipsisConfig.symbol, tooltip: slots['ellipsis.tooltip'] ? ( ) : ( diff --git a/frontend/antd/upload/upload.tsx b/frontend/antd/upload/upload.tsx index c440e942..39515b2e 100644 --- a/frontend/antd/upload/upload.tsx +++ b/frontend/antd/upload/upload.tsx @@ -50,6 +50,15 @@ export const Upload = sveltify< slots['showUploadList.extra'] || typeof showUploadList === 'object'; const showUploadListConfig = getConfig(showUploadList); + const showUploadListShowPreviewIconFunction = useFunction( + showUploadListConfig.showPreviewIcon + ); + const showUploadListShowRemoveIconFunction = useFunction( + showUploadListConfig.showRemoveIcon + ); + const showUploadListShowDownloadIconFunction = useFunction( + showUploadListConfig.showDownloadIcon + ); const beforeUploadFunction = useFunction(beforeUpload); const customRequestFunction = useFunction(customRequest); const progressFormatFunction = useFunction(progress?.format); @@ -115,6 +124,15 @@ export const Upload = sveltify< supportShowUploadListConfig ? { ...showUploadListConfig, + showDownloadIcon: + showUploadListShowDownloadIconFunction || + showUploadListConfig.showDownloadIcon, + showRemoveIcon: + showUploadListShowRemoveIconFunction || + showUploadListConfig.showRemoveIcon, + showPreviewIcon: + showUploadListShowPreviewIconFunction || + showUploadListConfig.showPreviewIcon, downloadIcon: slots['showUploadList.downloadIcon'] ? ( ) : ( diff --git a/frontend/package.json b/frontend/package.json index d9e0de17..e5abea24 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -7,14 +7,14 @@ "type": "module", "dependencies": { "@ant-design/cssinjs": "^1.21.1", - "@ant-design/icons": "^5.4.0", + "@ant-design/icons": "^5.5.1", "@gradio/atoms": "0.7.4", "@gradio/button": "^0.2.43", "@gradio/client": "^1.5.2", "@gradio/icons": "0.4.1", "@gradio/statustracker": "^0.7.6", "@gradio/utils": "0.6.1", - "antd": "^5.19.2", + "antd": "^5.21.0", "classnames": "^2.5.1", "dayjs": "^1.11.12", "immer": "^10.1.1", @@ -23,7 +23,7 @@ "react-dom": "^18.3.1", "svelte": "^4.2.19", "svelte-i18n": "^4.0.0", - "wavesurfer.js": "^7.8.0" + "wavesurfer.js": "^7.8.6" }, "devDependencies": { "@babel/core": "^7.24.9", @@ -37,13 +37,13 @@ "@gradio/utils": "0.4.2", "@types/babel__core": "^7.20.5", "@types/lodash-es": "^4.17.12", - "@types/react": "^18.3.5", + "@types/react": "^18.3.8", "@types/react-dom": "^18.3.0", "@vitejs/plugin-react-swc": "^3.7.0", "dequal": "^2.0.2", "less": "^4.2.0", "typescript-json-schema": "^0.65.1", - "vite": "^5.3.4" + "vite": "^5.4.7" }, "main_changeset": true } diff --git a/frontend/svelte-preprocess-react/slot.ts b/frontend/svelte-preprocess-react/slot.ts index 028d55bf..6a7ef1d3 100644 --- a/frontend/svelte-preprocess-react/slot.ts +++ b/frontend/svelte-preprocess-react/slot.ts @@ -29,12 +29,17 @@ export function getSetSlotFn() { const slotParamsKey = '$$ms-gr-render-slot-context-key'; -export function getSetSlotParamsFn() { +export type SetSlotParams = ( + key: string, + params: any[] | ((prevValue: any[]) => any[]) +) => void; + +export function getSetSlotParamsFn(): SetSlotParams { const slotParams = setContext( slotParamsKey, writable>({}) ); - return (key: string, params: any[] | ((prevValue: any[]) => any[])) => { + return (key, params) => { slotParams.update((v) => { if (typeof params === 'function') { return { diff --git a/package.json b/package.json index 9f07fe77..8858d7b7 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "@manypkg/get-packages": "^2.2.2", "@modelscope-studio/changelog": "workspace:*", "@modelscope-studio/lint-config": "workspace:*", - "eslint": "^9.10.0", + "eslint": "^9.11.0", "husky": "^9.1.6", "lint-staged": "^15.2.10", "node-fetch": "^3.3.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 39980526..b8801d8e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -22,7 +22,7 @@ importers: version: 2.27.8 '@commitlint/cli': specifier: ^19.5.0 - version: 19.5.0(@types/node@22.5.4)(typescript@5.6.2) + version: 19.5.0(@types/node@22.5.5)(typescript@5.6.2) '@commitlint/config-conventional': specifier: ^19.5.0 version: 19.5.0 @@ -36,8 +36,8 @@ importers: specifier: workspace:* version: link:config/lint-config eslint: - specifier: ^9.10.0 - version: 9.10.0(jiti@1.21.6) + specifier: ^9.11.0 + version: 9.11.0(jiti@1.21.6) husky: specifier: ^9.1.6 version: 9.1.6 @@ -94,11 +94,11 @@ importers: specifier: ^6.0.0 version: 6.0.0 '@types/node': - specifier: ^22.5.4 - version: 22.5.4 + specifier: ^22.5.5 + version: 22.5.5 tsup: - specifier: ^8.2.4 - version: 8.2.4(@microsoft/api-extractor@7.47.9(@types/node@22.5.4))(@swc/core@1.7.26)(jiti@1.21.6)(postcss@8.4.45)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.5.1) + specifier: ^8.3.0 + version: 8.3.0(@microsoft/api-extractor@7.47.9(@types/node@22.5.5))(@swc/core@1.7.26)(jiti@1.21.6)(postcss@8.4.47)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.5.1) config/lint-config: dependencies: @@ -106,50 +106,50 @@ importers: specifier: ^1.1.1 version: 1.1.1 '@eslint/js': - specifier: ^9.7.0 - version: 9.10.0 + specifier: ^9.11.0 + version: 9.11.0 '@typescript-eslint/parser': - specifier: ^8.5.0 - version: 8.5.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2) + specifier: ^8.6.0 + version: 8.6.0(eslint@9.11.0(jiti@1.21.6))(typescript@5.6.2) eslint-config-prettier: specifier: ^9.0.0 - version: 9.1.0(eslint@9.10.0(jiti@1.21.6)) + version: 9.1.0(eslint@9.11.0(jiti@1.21.6)) eslint-import-resolver-typescript: specifier: ^3.6.0 - version: 3.6.3(@typescript-eslint/parser@8.5.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2))(eslint-plugin-import@2.30.0)(eslint@9.10.0(jiti@1.21.6)) + version: 3.6.3(@typescript-eslint/parser@8.6.0(eslint@9.11.0(jiti@1.21.6))(typescript@5.6.2))(eslint-plugin-import@2.30.0)(eslint@9.11.0(jiti@1.21.6)) eslint-plugin-import: specifier: ^2.29.1 - version: 2.30.0(@typescript-eslint/parser@8.5.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2))(eslint-import-resolver-typescript@3.6.3)(eslint@9.10.0(jiti@1.21.6)) + version: 2.30.0(@typescript-eslint/parser@8.6.0(eslint@9.11.0(jiti@1.21.6))(typescript@5.6.2))(eslint-import-resolver-typescript@3.6.3)(eslint@9.11.0(jiti@1.21.6)) eslint-plugin-jsx-a11y: specifier: ^6.9.0 - version: 6.10.0(eslint@9.10.0(jiti@1.21.6)) + version: 6.10.0(eslint@9.11.0(jiti@1.21.6)) eslint-plugin-prettier: specifier: 5.2.1 - version: 5.2.1(@types/eslint@9.6.1)(eslint-config-prettier@9.1.0(eslint@9.10.0(jiti@1.21.6)))(eslint@9.10.0(jiti@1.21.6))(prettier@3.3.3) + version: 5.2.1(@types/eslint@9.6.1)(eslint-config-prettier@9.1.0(eslint@9.11.0(jiti@1.21.6)))(eslint@9.11.0(jiti@1.21.6))(prettier@3.3.3) eslint-plugin-react: specifier: ^7.36.1 - version: 7.36.1(eslint@9.10.0(jiti@1.21.6)) + version: 7.36.1(eslint@9.11.0(jiti@1.21.6)) eslint-plugin-react-hooks: specifier: ^4.6.2 - version: 4.6.2(eslint@9.10.0(jiti@1.21.6)) + version: 4.6.2(eslint@9.11.0(jiti@1.21.6)) eslint-plugin-react-refresh: - specifier: ^0.4.8 - version: 0.4.11(eslint@9.10.0(jiti@1.21.6)) + specifier: ^0.4.12 + version: 0.4.12(eslint@9.11.0(jiti@1.21.6)) eslint-plugin-simple-import-sort: specifier: ^12.1.0 - version: 12.1.1(eslint@9.10.0(jiti@1.21.6)) + version: 12.1.1(eslint@9.11.0(jiti@1.21.6)) eslint-plugin-svelte: - specifier: ^2.42.0 - version: 2.43.0(eslint@9.10.0(jiti@1.21.6))(svelte@4.2.19)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@22.5.4)(typescript@5.6.2)) + specifier: ^2.44.0 + version: 2.44.0(eslint@9.11.0(jiti@1.21.6))(svelte@4.2.19)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@22.5.5)(typescript@5.6.2)) globals: specifier: ^15.6.0 version: 15.9.0 postcss: - specifier: ^8.4.38 - version: 8.4.45 + specifier: ^8.4.47 + version: 8.4.47 postcss-less: specifier: ^6.0.0 - version: 6.0.0(postcss@8.4.45) + version: 6.0.0(postcss@8.4.47) stylelint-config-ali: specifier: ^2.1.1 version: 2.1.1(stylelint@9.10.1) @@ -169,11 +169,11 @@ importers: specifier: ^5.0.2 version: 5.0.2(prettier@3.3.3)(stylelint@9.10.1) svelte-eslint-parser: - specifier: ^0.41.0 - version: 0.41.0(svelte@4.2.19) + specifier: ^0.41.1 + version: 0.41.1(svelte@4.2.19) typescript-eslint: - specifier: ^8.5.0 - version: 8.5.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2) + specifier: ^8.6.0 + version: 8.6.0(eslint@9.11.0(jiti@1.21.6))(typescript@5.6.2) devDependencies: '@types/eslint': specifier: ^9.6.1 @@ -188,8 +188,8 @@ importers: specifier: ^1.21.1 version: 1.21.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@ant-design/icons': - specifier: ^5.4.0 - version: 5.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + specifier: ^5.5.1 + version: 5.5.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@gradio/atoms': specifier: 0.7.4 version: 0.7.4(svelte@4.2.19) @@ -209,8 +209,8 @@ importers: specifier: 0.6.1 version: 0.6.1(svelte@4.2.19) antd: - specifier: ^5.19.2 - version: 5.20.6(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + specifier: ^5.21.0 + version: 5.21.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) classnames: specifier: ^2.5.1 version: 2.5.1 @@ -236,15 +236,15 @@ importers: specifier: ^4.0.0 version: 4.0.0(svelte@4.2.19) wavesurfer.js: - specifier: ^7.8.0 - version: 7.8.0 + specifier: ^7.8.6 + version: 7.8.6 devDependencies: '@babel/core': specifier: ^7.24.9 version: 7.25.2 '@gradio/preview': specifier: 0.10.1 - version: 0.10.1(@babel/core@7.25.2)(@types/node@18.19.50)(less@4.2.0)(postcss-load-config@3.1.4(postcss@8.4.45)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@18.19.50)(typescript@5.5.4)))(postcss@8.4.45)(rollup@4.21.2)(svelte@4.2.19) + version: 0.10.1(@babel/core@7.25.2)(@types/node@18.19.50)(less@4.2.0)(postcss-load-config@6.0.1(jiti@1.21.6)(postcss@8.4.47)(tsx@4.19.1)(yaml@2.5.1))(postcss@8.4.47)(rollup@4.22.4)(svelte@4.2.19) '@gradio/upload': specifier: 0.11.2 version: 0.11.2(svelte@4.2.19) @@ -255,14 +255,14 @@ importers: specifier: ^4.17.12 version: 4.17.12 '@types/react': - specifier: ^18.3.5 - version: 18.3.5 + specifier: ^18.3.8 + version: 18.3.8 '@types/react-dom': specifier: ^18.3.0 version: 18.3.0 '@vitejs/plugin-react-swc': specifier: ^3.7.0 - version: 3.7.0(vite@5.4.4(@types/node@18.19.50)(less@4.2.0)(lightningcss@1.27.0)(sass@1.78.0)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.45))) + version: 3.7.0(vite@5.4.7(@types/node@18.19.50)(less@4.2.0)(lightningcss@1.27.0)(sass@1.78.0)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.47))) dequal: specifier: ^2.0.2 version: 2.0.3 @@ -273,8 +273,8 @@ importers: specifier: ^0.65.1 version: 0.65.1(@swc/core@1.7.26) vite: - specifier: ^5.3.4 - version: 5.4.4(@types/node@18.19.50)(less@4.2.0)(lightningcss@1.27.0)(sass@1.78.0)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.45)) + specifier: ^5.4.7 + version: 5.4.7(@types/node@18.19.50)(less@4.2.0)(lightningcss@1.27.0)(sass@1.78.0)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.47)) frontend/antd: {} @@ -321,7 +321,7 @@ importers: version: 1.2.0 '@xyflow/react': specifier: 12.3.0 - version: 12.3.0(@types/react@18.3.5)(immer@10.1.1)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + version: 12.3.0(@types/react@18.3.8)(immer@10.1.1)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) ajv: specifier: ^8.17.1 version: 8.17.1 @@ -354,7 +354,7 @@ importers: version: 3.11.174 react-markdown: specifier: ^9.0.1 - version: 9.0.1(@types/react@18.3.5)(react@18.3.1) + version: 9.0.1(@types/react@18.3.8)(react@18.3.1) react-syntax-highlighter: specifier: ^15.5.0 version: 15.5.0(react@18.3.1) @@ -414,8 +414,8 @@ packages: '@ant-design/colors@7.1.0': resolution: {integrity: sha512-MMoDGWn1y9LdQJQSHiCC20x3uZ3CwQnv9QMz6pCmJOrqdgM9YxsoVVY0wtrdXbmfSgnV0KNk6zi09NAhMR2jvg==} - '@ant-design/cssinjs-utils@1.0.3': - resolution: {integrity: sha512-BrztZZKuoYcJK8uEH40ylBemf/Mu/QPiDos56g2bv6eUoniQkgQHOCOvA3+pncoFO1TaS8xcUCIqGzDA0I+ZVQ==} + '@ant-design/cssinjs-utils@1.1.0': + resolution: {integrity: sha512-E9nOWObXx7Dy7hdyuYlOFaer/LtPO7oyZVxZphh0CYEslr5EmhJPM3WI0Q2RBHRtYg6dSNqeSK73kvZjPN3IMQ==} peerDependencies: react: '>=16.9.0' react-dom: '>=16.9.0' @@ -433,8 +433,8 @@ packages: '@ant-design/icons-svg@4.4.2': resolution: {integrity: sha512-vHbT+zJEVzllwP+CM+ul7reTEfBR0vgxFe7+lREAsAA7YGsYpboiq2sQNeQeRvh09GfQgs/GyFEvZpJ9cLXpXA==} - '@ant-design/icons@5.4.0': - resolution: {integrity: sha512-QZbWC5xQYexCI5q4/fehSEkchJr5UGtvAJweT743qKUQQGs9IH2DehNLP49DJ3Ii9m9CijD2HN6fNy3WKhIFdA==} + '@ant-design/icons@5.5.1': + resolution: {integrity: sha512-0UrM02MA2iDIgvLatWrj6YTCYe0F/cwXvVE0E2SqGrL7PZireQwgEKTKBisWpZyal5eXZLvuM98kju6YtYne8w==} engines: {node: '>=8'} peerDependencies: react: '>=16.0.0' @@ -1130,8 +1130,8 @@ packages: peerDependencies: eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 - '@eslint-community/regexpp@4.11.0': - resolution: {integrity: sha512-G/M/tIiMrTAxEWRfLfQJMmGNX28IxBg4PBz8XqQhqUHLFI6TL2htpIB1iQCj144V5ee/JaKyT9/WZ0MGZWfA7A==} + '@eslint-community/regexpp@4.11.1': + resolution: {integrity: sha512-m4DVN9ZqskZoLU5GlWZadwDnYo3vAEydiUayB9widCl9ffWx2IvPnp6n3on5rJmziJSw9Bv+Z3ChDVdMwXCY8Q==} engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} '@eslint/compat@1.1.1': @@ -1146,16 +1146,16 @@ packages: resolution: {integrity: sha512-4Bfj15dVJdoy3RfZmmo86RK1Fwzn6SstsvK9JS+BaVKqC6QQQQyXekNaC+g+LKNgkQ+2VhGAzm6hO40AhMR3zQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@eslint/js@9.10.0': - resolution: {integrity: sha512-fuXtbiP5GWIn8Fz+LWoOMVf/Jxm+aajZYkhi6CuEm4SxymFM+eUWzbO9qXT+L0iCkL5+KGYMCSGxo686H19S1g==} + '@eslint/js@9.11.0': + resolution: {integrity: sha512-LPkkenkDqyzTFauZLLAPhIb48fj6drrfMvRGSL9tS3AcZBSVTllemLSNyCvHNNL2t797S/6DJNSIwRwXgMO/eQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@eslint/object-schema@2.1.4': resolution: {integrity: sha512-BsWiH1yFGjXXS2yvrf5LyuoSIIbPrGUWob917o+BTKuZ7qJdxX8aJLRxs1fS9n6r7vESrq1OUqb68dANcFXuQQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@eslint/plugin-kit@0.1.0': - resolution: {integrity: sha512-autAXT203ixhqei9xt+qkYOvY8l6LAFIdT2UXc/RPNeUVfqRF1BV94GTJyVPFKT8nFM6MyVJhjLj9E8JWvf5zQ==} + '@eslint/plugin-kit@0.2.0': + resolution: {integrity: sha512-vH9PiIMMwvhCx31Af3HiGzsVNULDbyVkHXwlemn/B0TFj/00ho3y55efXrUZTfQipxoHC5u4xq6zblww1zm1Ig==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@fastify/busboy@2.1.1': @@ -1494,83 +1494,92 @@ packages: rollup: optional: true - '@rollup/rollup-android-arm-eabi@4.21.2': - resolution: {integrity: sha512-fSuPrt0ZO8uXeS+xP3b+yYTCBUd05MoSp2N/MFOgjhhUhMmchXlpTQrTpI8T+YAwAQuK7MafsCOxW7VrPMrJcg==} + '@rollup/rollup-android-arm-eabi@4.22.4': + resolution: {integrity: sha512-Fxamp4aEZnfPOcGA8KSNEohV8hX7zVHOemC8jVBoBUHu5zpJK/Eu3uJwt6BMgy9fkvzxDaurgj96F/NiLukF2w==} cpu: [arm] os: [android] - '@rollup/rollup-android-arm64@4.21.2': - resolution: {integrity: sha512-xGU5ZQmPlsjQS6tzTTGwMsnKUtu0WVbl0hYpTPauvbRAnmIvpInhJtgjj3mcuJpEiuUw4v1s4BimkdfDWlh7gA==} + '@rollup/rollup-android-arm64@4.22.4': + resolution: {integrity: sha512-VXoK5UMrgECLYaMuGuVTOx5kcuap1Jm8g/M83RnCHBKOqvPPmROFJGQaZhGccnsFtfXQ3XYa4/jMCJvZnbJBdA==} cpu: [arm64] os: [android] - '@rollup/rollup-darwin-arm64@4.21.2': - resolution: {integrity: sha512-99AhQ3/ZMxU7jw34Sq8brzXqWH/bMnf7ZVhvLk9QU2cOepbQSVTns6qoErJmSiAvU3InRqC2RRZ5ovh1KN0d0Q==} + '@rollup/rollup-darwin-arm64@4.22.4': + resolution: {integrity: sha512-xMM9ORBqu81jyMKCDP+SZDhnX2QEVQzTcC6G18KlTQEzWK8r/oNZtKuZaCcHhnsa6fEeOBionoyl5JsAbE/36Q==} cpu: [arm64] os: [darwin] - '@rollup/rollup-darwin-x64@4.21.2': - resolution: {integrity: sha512-ZbRaUvw2iN/y37x6dY50D8m2BnDbBjlnMPotDi/qITMJ4sIxNY33HArjikDyakhSv0+ybdUxhWxE6kTI4oX26w==} + '@rollup/rollup-darwin-x64@4.22.4': + resolution: {integrity: sha512-aJJyYKQwbHuhTUrjWjxEvGnNNBCnmpHDvrb8JFDbeSH3m2XdHcxDd3jthAzvmoI8w/kSjd2y0udT+4okADsZIw==} cpu: [x64] os: [darwin] - '@rollup/rollup-linux-arm-gnueabihf@4.21.2': - resolution: {integrity: sha512-ztRJJMiE8nnU1YFcdbd9BcH6bGWG1z+jP+IPW2oDUAPxPjo9dverIOyXz76m6IPA6udEL12reYeLojzW2cYL7w==} + '@rollup/rollup-linux-arm-gnueabihf@4.22.4': + resolution: {integrity: sha512-j63YtCIRAzbO+gC2L9dWXRh5BFetsv0j0va0Wi9epXDgU/XUi5dJKo4USTttVyK7fGw2nPWK0PbAvyliz50SCQ==} cpu: [arm] os: [linux] + libc: [glibc] - '@rollup/rollup-linux-arm-musleabihf@4.21.2': - resolution: {integrity: sha512-flOcGHDZajGKYpLV0JNc0VFH361M7rnV1ee+NTeC/BQQ1/0pllYcFmxpagltANYt8FYf9+kL6RSk80Ziwyhr7w==} + '@rollup/rollup-linux-arm-musleabihf@4.22.4': + resolution: {integrity: sha512-dJnWUgwWBX1YBRsuKKMOlXCzh2Wu1mlHzv20TpqEsfdZLb3WoJW2kIEsGwLkroYf24IrPAvOT/ZQ2OYMV6vlrg==} cpu: [arm] os: [linux] + libc: [musl] - '@rollup/rollup-linux-arm64-gnu@4.21.2': - resolution: {integrity: sha512-69CF19Kp3TdMopyteO/LJbWufOzqqXzkrv4L2sP8kfMaAQ6iwky7NoXTp7bD6/irKgknDKM0P9E/1l5XxVQAhw==} + '@rollup/rollup-linux-arm64-gnu@4.22.4': + resolution: {integrity: sha512-AdPRoNi3NKVLolCN/Sp4F4N1d98c4SBnHMKoLuiG6RXgoZ4sllseuGioszumnPGmPM2O7qaAX/IJdeDU8f26Aw==} cpu: [arm64] os: [linux] + libc: [glibc] - '@rollup/rollup-linux-arm64-musl@4.21.2': - resolution: {integrity: sha512-48pD/fJkTiHAZTnZwR0VzHrao70/4MlzJrq0ZsILjLW/Ab/1XlVUStYyGt7tdyIiVSlGZbnliqmult/QGA2O2w==} + '@rollup/rollup-linux-arm64-musl@4.22.4': + resolution: {integrity: sha512-Gl0AxBtDg8uoAn5CCqQDMqAx22Wx22pjDOjBdmG0VIWX3qUBHzYmOKh8KXHL4UpogfJ14G4wk16EQogF+v8hmA==} cpu: [arm64] os: [linux] + libc: [musl] - '@rollup/rollup-linux-powerpc64le-gnu@4.21.2': - resolution: {integrity: sha512-cZdyuInj0ofc7mAQpKcPR2a2iu4YM4FQfuUzCVA2u4HI95lCwzjoPtdWjdpDKyHxI0UO82bLDoOaLfpZ/wviyQ==} + '@rollup/rollup-linux-powerpc64le-gnu@4.22.4': + resolution: {integrity: sha512-3aVCK9xfWW1oGQpTsYJJPF6bfpWfhbRnhdlyhak2ZiyFLDaayz0EP5j9V1RVLAAxlmWKTDfS9wyRyY3hvhPoOg==} cpu: [ppc64] os: [linux] + libc: [glibc] - '@rollup/rollup-linux-riscv64-gnu@4.21.2': - resolution: {integrity: sha512-RL56JMT6NwQ0lXIQmMIWr1SW28z4E4pOhRRNqwWZeXpRlykRIlEpSWdsgNWJbYBEWD84eocjSGDu/XxbYeCmwg==} + '@rollup/rollup-linux-riscv64-gnu@4.22.4': + resolution: {integrity: sha512-ePYIir6VYnhgv2C5Xe9u+ico4t8sZWXschR6fMgoPUK31yQu7hTEJb7bCqivHECwIClJfKgE7zYsh1qTP3WHUA==} cpu: [riscv64] os: [linux] + libc: [glibc] - '@rollup/rollup-linux-s390x-gnu@4.21.2': - resolution: {integrity: sha512-PMxkrWS9z38bCr3rWvDFVGD6sFeZJw4iQlhrup7ReGmfn7Oukrr/zweLhYX6v2/8J6Cep9IEA/SmjXjCmSbrMQ==} + '@rollup/rollup-linux-s390x-gnu@4.22.4': + resolution: {integrity: sha512-GqFJ9wLlbB9daxhVlrTe61vJtEY99/xB3C8e4ULVsVfflcpmR6c8UZXjtkMA6FhNONhj2eA5Tk9uAVw5orEs4Q==} cpu: [s390x] os: [linux] + libc: [glibc] - '@rollup/rollup-linux-x64-gnu@4.21.2': - resolution: {integrity: sha512-B90tYAUoLhU22olrafY3JQCFLnT3NglazdwkHyxNDYF/zAxJt5fJUB/yBoWFoIQ7SQj+KLe3iL4BhOMa9fzgpw==} + '@rollup/rollup-linux-x64-gnu@4.22.4': + resolution: {integrity: sha512-87v0ol2sH9GE3cLQLNEy0K/R0pz1nvg76o8M5nhMR0+Q+BBGLnb35P0fVz4CQxHYXaAOhE8HhlkaZfsdUOlHwg==} cpu: [x64] os: [linux] + libc: [glibc] - '@rollup/rollup-linux-x64-musl@4.21.2': - resolution: {integrity: sha512-7twFizNXudESmC9oneLGIUmoHiiLppz/Xs5uJQ4ShvE6234K0VB1/aJYU3f/4g7PhssLGKBVCC37uRkkOi8wjg==} + '@rollup/rollup-linux-x64-musl@4.22.4': + resolution: {integrity: sha512-UV6FZMUgePDZrFjrNGIWzDo/vABebuXBhJEqrHxrGiU6HikPy0Z3LfdtciIttEUQfuDdCn8fqh7wiFJjCNwO+g==} cpu: [x64] os: [linux] + libc: [musl] - '@rollup/rollup-win32-arm64-msvc@4.21.2': - resolution: {integrity: sha512-9rRero0E7qTeYf6+rFh3AErTNU1VCQg2mn7CQcI44vNUWM9Ze7MSRS/9RFuSsox+vstRt97+x3sOhEey024FRQ==} + '@rollup/rollup-win32-arm64-msvc@4.22.4': + resolution: {integrity: sha512-BjI+NVVEGAXjGWYHz/vv0pBqfGoUH0IGZ0cICTn7kB9PyjrATSkX+8WkguNjWoj2qSr1im/+tTGRaY+4/PdcQw==} cpu: [arm64] os: [win32] - '@rollup/rollup-win32-ia32-msvc@4.21.2': - resolution: {integrity: sha512-5rA4vjlqgrpbFVVHX3qkrCo/fZTj1q0Xxpg+Z7yIo3J2AilW7t2+n6Q8Jrx+4MrYpAnjttTYF8rr7bP46BPzRw==} + '@rollup/rollup-win32-ia32-msvc@4.22.4': + resolution: {integrity: sha512-SiWG/1TuUdPvYmzmYnmd3IEifzR61Tragkbx9D3+R8mzQqDBz8v+BvZNDlkiTtI9T15KYZhP0ehn3Dld4n9J5g==} cpu: [ia32] os: [win32] - '@rollup/rollup-win32-x64-msvc@4.21.2': - resolution: {integrity: sha512-6UUxd0+SKomjdzuAcp+HAmxw1FlGBnl1v2yEPSabtx4lBfdXHDVsW7+lQkgz9cNFJGY3AWR7+V8P5BqkD9L9nA==} + '@rollup/rollup-win32-x64-msvc@4.22.4': + resolution: {integrity: sha512-j8pPKp53/lq9lMXN57S8cFz0MynJk8OWNuUnXct/9KCpKU7DgU3bYMJhwWmcqC0UU29p8Lr0/7KEVcaM6bf47Q==} cpu: [x64] os: [win32] @@ -1667,48 +1676,56 @@ packages: engines: {node: '>=10'} cpu: [arm64] os: [linux] + libc: [glibc] '@swc/core-linux-arm64-gnu@1.7.26': resolution: {integrity: sha512-YKevOV7abpjcAzXrhsl+W48Z9mZvgoVs2eP5nY+uoMAdP2b3GxC0Df1Co0I90o2lkzO4jYBpTMcZlmUXLdXn+Q==} engines: {node: '>=10'} cpu: [arm64] os: [linux] + libc: [glibc] '@swc/core-linux-arm64-musl@1.5.29': resolution: {integrity: sha512-TERh2OICAJz+SdDIK9+0GyTUwF6r4xDlFmpoiHKHrrD/Hh3u+6Zue0d7jQ/he/i80GDn4tJQkHlZys+RZL5UZg==} engines: {node: '>=10'} cpu: [arm64] os: [linux] + libc: [musl] '@swc/core-linux-arm64-musl@1.7.26': resolution: {integrity: sha512-3w8iZICMkQQON0uIcvz7+Q1MPOW6hJ4O5ETjA0LSP/tuKqx30hIniCGOgPDnv3UTMruLUnQbtBwVCZTBKR3Rkg==} engines: {node: '>=10'} cpu: [arm64] os: [linux] + libc: [musl] '@swc/core-linux-x64-gnu@1.5.29': resolution: {integrity: sha512-WMDPqU7Ji9dJpA+Llek2p9t7pcy7Bob8ggPUvgsIlv3R/eesF9DIzSbrgl6j3EAEPB9LFdSafsgf6kT/qnvqFg==} engines: {node: '>=10'} cpu: [x64] os: [linux] + libc: [glibc] '@swc/core-linux-x64-gnu@1.7.26': resolution: {integrity: sha512-c+pp9Zkk2lqb06bNGkR2Looxrs7FtGDMA4/aHjZcCqATgp348hOKH5WPvNLBl+yPrISuWjbKDVn3NgAvfvpH4w==} engines: {node: '>=10'} cpu: [x64] os: [linux] + libc: [glibc] '@swc/core-linux-x64-musl@1.5.29': resolution: {integrity: sha512-DO14glwpdKY4POSN0201OnGg1+ziaSVr6/RFzuSLggshwXeeyVORiHv3baj7NENhJhWhUy3NZlDsXLnRFkmhHQ==} engines: {node: '>=10'} cpu: [x64] os: [linux] + libc: [musl] '@swc/core-linux-x64-musl@1.7.26': resolution: {integrity: sha512-PgtyfHBF6xG87dUSSdTJHwZ3/8vWZfNIXQV2GlwEpslrOkGqy+WaiiyE7Of7z9AvDILfBBBcJvJ/r8u980wAfQ==} engines: {node: '>=10'} cpu: [x64] os: [linux] + libc: [musl] '@swc/core-win32-arm64-msvc@1.5.29': resolution: {integrity: sha512-V3Y1+a1zG1zpYXUMqPIHEMEOd+rHoVnIpO/KTyFwAmKVu8v+/xPEVx/AGoYE67x4vDAAvPQrKI3Aokilqa5yVg==} @@ -1890,14 +1907,14 @@ packages: '@types/node@20.16.5': resolution: {integrity: sha512-VwYCweNo3ERajwy0IUlqqcyZ8/A7Zwa9ZP3MnENWcB11AejO+tLy3pu850goUW2FC/IJMdZUfKpX/yxL1gymCA==} - '@types/node@22.5.4': - resolution: {integrity: sha512-FDuKUJQm/ju9fT/SeX/6+gBzoPzlVCzfzmGkwKvRHQVxi4BntVbyIwf6a4Xn62mrvndLiml6z/UBXIdEVjQLXg==} + '@types/node@22.5.5': + resolution: {integrity: sha512-Xjs4y5UPO/CLdzpgR6GirZJx36yScjh73+2NlLlkFRSoQN8B0DpfXPdZGnvVmLRLOsqDpOfTNv7D9trgGhmOIA==} '@types/path-browserify@1.0.2': resolution: {integrity: sha512-ZkC5IUqqIFPXx3ASTTybTzmQdwHwe2C0u3eL75ldQ6T9E9IWFJodn6hIfbZGab73DfyiHN4Xw15gNxUq2FbvBA==} - '@types/prop-types@15.7.12': - resolution: {integrity: sha512-5zvhXYtRNRluoE/jAp4GVsSduVUzNWKkOZrCDBWYtE7biZywwdC2AcEzg+cSMLFRfVgeAFqpfNabiPjxFddV1Q==} + '@types/prop-types@15.7.13': + resolution: {integrity: sha512-hCZTSvwbzWGvhqxp/RqVqwU999pBf2vp7hzIjiYOsl8wqOmUxkQ6ddw1cV3l8811+kdUFus/q4d1Y3E3SyEifA==} '@types/pug@2.0.10': resolution: {integrity: sha512-Sk/uYFOBAB7mb74XcpizmH0KOR2Pv3D2Hmrh1Dmy5BmK3MpdSa5kqZcg6EKBdklU0bFXX9gCfzvpnyUehrPIuA==} @@ -1908,8 +1925,8 @@ packages: '@types/react-syntax-highlighter@15.5.13': resolution: {integrity: sha512-uLGJ87j6Sz8UaBAooU0T6lWJ0dBmjZgN1PZTrj05TNql2/XpC6+4HhMT5syIdFUUt+FASfCeLLv4kBygNU+8qA==} - '@types/react@18.3.5': - resolution: {integrity: sha512-WeqMfGJLGuLCqHGYRGHxnKrXcTitc6L/nBUWfWPcTarG3t9PsquqUMuVeXZeca+mglY4Vo5GZjCi0A3Or2lnxA==} + '@types/react@18.3.8': + resolution: {integrity: sha512-syBUrW3/XpnW4WJ41Pft+I+aPoDVbrBVQGEnbD7NijDGlVC+8gV/XKRY+7vMDlfPpbwYt0l1vd/Sj8bJGMbs9Q==} '@types/semver@7.5.8': resolution: {integrity: sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==} @@ -1939,8 +1956,8 @@ packages: '@types/wrap-ansi@3.0.0': resolution: {integrity: sha512-ltIpx+kM7g/MLRZfkbL7EsCEjfzCcScLpkg37eXEtx5kmrAKBkTJwd1GIAjDSL8wTpM6Hzn5YO4pSb91BEwu1g==} - '@typescript-eslint/eslint-plugin@8.5.0': - resolution: {integrity: sha512-lHS5hvz33iUFQKuPFGheAB84LwcJ60G8vKnEhnfcK1l8kGVLro2SFYW6K0/tj8FUhRJ0VHyg1oAfg50QGbPPHw==} + '@typescript-eslint/eslint-plugin@8.6.0': + resolution: {integrity: sha512-UOaz/wFowmoh2G6Mr9gw60B1mm0MzUtm6Ic8G2yM1Le6gyj5Loi/N+O5mocugRGY+8OeeKmkMmbxNqUCq3B4Sg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: '@typescript-eslint/parser': ^8.0.0 || ^8.0.0-alpha.0 @@ -1950,8 +1967,8 @@ packages: typescript: optional: true - '@typescript-eslint/parser@8.5.0': - resolution: {integrity: sha512-gF77eNv0Xz2UJg/NbpWJ0kqAm35UMsvZf1GHj8D9MRFTj/V3tAciIWXfmPLsAAF/vUlpWPvUDyH1jjsr0cMVWw==} + '@typescript-eslint/parser@8.6.0': + resolution: {integrity: sha512-eQcbCuA2Vmw45iGfcyG4y6rS7BhWfz9MQuk409WD47qMM+bKCGQWXxvoOs1DUp+T7UBMTtRTVT+kXr7Sh4O9Ow==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 @@ -1960,12 +1977,12 @@ packages: typescript: optional: true - '@typescript-eslint/scope-manager@8.5.0': - resolution: {integrity: sha512-06JOQ9Qgj33yvBEx6tpC8ecP9o860rsR22hWMEd12WcTRrfaFgHr2RB/CA/B+7BMhHkXT4chg2MyboGdFGawYg==} + '@typescript-eslint/scope-manager@8.6.0': + resolution: {integrity: sha512-ZuoutoS5y9UOxKvpc/GkvF4cuEmpokda4wRg64JEia27wX+PysIE9q+lzDtlHHgblwUWwo5/Qn+/WyTUvDwBHw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/type-utils@8.5.0': - resolution: {integrity: sha512-N1K8Ix+lUM+cIDhL2uekVn/ZD7TZW+9/rwz8DclQpcQ9rk4sIL5CAlBC0CugWKREmDjBzI/kQqU4wkg46jWLYA==} + '@typescript-eslint/type-utils@8.6.0': + resolution: {integrity: sha512-dtePl4gsuenXVwC7dVNlb4mGDcKjDT/Ropsk4za/ouMBPplCLyznIaR+W65mvCvsyS97dymoBRrioEXI7k0XIg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '*' @@ -1973,12 +1990,12 @@ packages: typescript: optional: true - '@typescript-eslint/types@8.5.0': - resolution: {integrity: sha512-qjkormnQS5wF9pjSi6q60bKUHH44j2APxfh9TQRXK8wbYVeDYYdYJGIROL87LGZZ2gz3Rbmjc736qyL8deVtdw==} + '@typescript-eslint/types@8.6.0': + resolution: {integrity: sha512-rojqFZGd4MQxw33SrOy09qIDS8WEldM8JWtKQLAjf/X5mGSeEFh5ixQlxssMNyPslVIk9yzWqXCsV2eFhYrYUw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/typescript-estree@8.5.0': - resolution: {integrity: sha512-vEG2Sf9P8BPQ+d0pxdfndw3xIXaoSjliG0/Ejk7UggByZPKXmJmw3GW5jV2gHNQNawBUyfahoSiCFVov0Ruf7Q==} + '@typescript-eslint/typescript-estree@8.6.0': + resolution: {integrity: sha512-MOVAzsKJIPIlLK239l5s06YXjNqpKTVhBVDnqUumQJja5+Y94V3+4VUFRA0G60y2jNnTVwRCkhyGQpavfsbq/g==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '*' @@ -1986,14 +2003,14 @@ packages: typescript: optional: true - '@typescript-eslint/utils@8.5.0': - resolution: {integrity: sha512-6yyGYVL0e+VzGYp60wvkBHiqDWOpT63pdMV2CVG4LVDd5uR6q1qQN/7LafBZtAtNIn/mqXjsSeS5ggv/P0iECw==} + '@typescript-eslint/utils@8.6.0': + resolution: {integrity: sha512-eNp9cWnYf36NaOVjkEUznf6fEgVy1TWpE0o52e4wtojjBx7D1UV2WAWGzR+8Y5lVFtpMLPwNbC67T83DWSph4A==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 - '@typescript-eslint/visitor-keys@8.5.0': - resolution: {integrity: sha512-yTPqMnbAZJNy2Xq2XU8AdtOW9tJIr+UQb64aXB9f3B1498Zx9JorVgFJcZpEc9UBuCCrdzKID2RGAMkYcDtZOw==} + '@typescript-eslint/visitor-keys@8.6.0': + resolution: {integrity: sha512-wapVFfZg9H0qOYh4grNVQiMklJGluQrOUiOhYRrQWhx7BY/+I1IYb8BczWNbbUpO+pqy0rDciv3lQH5E1bCLrg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@ungap/structured-clone@1.2.0': @@ -2112,11 +2129,8 @@ packages: resolution: {integrity: sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==} engines: {node: '>=12'} - antd@5.20.6: - resolution: {integrity: sha512-TZFmNenHlh26DelHCJbkB+x1OVulIKsN1f/CnAd2NxZLysXqRvSuLUeHcgccqAnxTy7B03GZ6i1tocGxPCNjgA==} - peerDependencies: - react: '>=16.9.0' - react-dom: '>=16.9.0' + antd@5.21.0: + resolution: {integrity: sha512-eoY3LruXq/8MRCXG46O2cwc+Q8HW8Bhc+pWw7loIt6Dn22tLHckxYF/663kn55JTIOVUnJdmJDP9njdJmLXJsQ==} any-promise@1.3.0: resolution: {integrity: sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==} @@ -3247,8 +3261,8 @@ packages: peerDependencies: eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 - eslint-plugin-react-refresh@0.4.11: - resolution: {integrity: sha512-wrAKxMbVr8qhXTtIKfXqAn5SAtRZt0aXxe5P23Fh4pUAdC6XEsybGLB8P0PI4j1yYqOgUEUlzKAGDfo7rJOjcw==} + eslint-plugin-react-refresh@0.4.12: + resolution: {integrity: sha512-9neVjoGv20FwYtCP6CB1dzR1vr57ZDNOXst21wd2xJ/cTlM2xLq0GWVlSNTdMn/4BtP6cHYBMCSp1wFBJ9jBsg==} peerDependencies: eslint: '>=7' @@ -3263,8 +3277,8 @@ packages: peerDependencies: eslint: '>=5.0.0' - eslint-plugin-svelte@2.43.0: - resolution: {integrity: sha512-REkxQWvg2pp7QVLxQNa+dJ97xUqRe7Y2JJbSWkHSuszu0VcblZtXkPBPckkivk99y5CdLw4slqfPylL2d/X4jQ==} + eslint-plugin-svelte@2.44.0: + resolution: {integrity: sha512-wav4MOs02vBb1WjvTCYItwJCxMkuk2Z4p+K/eyjL0N/z7ahXLP+0LtQQjiKc2ezuif7GnZLbD1F3o1VHzSvdVg==} engines: {node: ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^7.0.0 || ^8.0.0-0 || ^9.0.0-0 @@ -3289,8 +3303,8 @@ packages: resolution: {integrity: sha512-OtIRv/2GyiF6o/d8K7MYKKbXrOUBIK6SfkIRM4Z0dY3w+LiQ0vy3F57m0Z71bjbyeiWFiHJ8brqnmE6H6/jEuw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - eslint@9.10.0: - resolution: {integrity: sha512-Y4D0IgtBZfOcOUAIQTSXBKoNGfY0REGqHJG6+Q81vNippW5YlKjHFj4soMxamKK1NXHUWuBZTLdU3Km+L/pcHw==} + eslint@9.11.0: + resolution: {integrity: sha512-yVS6XODx+tMFMDFcG4+Hlh+qG7RM6cCJXtQhCKLSsr3XkLvWggHjCqjfh0XsPPnt1c56oaT6PMgW9XWQQjdHXA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} hasBin: true peerDependencies: @@ -3425,6 +3439,14 @@ packages: fault@1.0.4: resolution: {integrity: sha512-CJ0HCB5tL5fYTEA7ToAq5+kTwd++Borf1/bifxd9iT70QcXr4MRrO3Llf8Ifs70q+SJcGHFtnIE/Nw6giCtECA==} + fdir@6.3.0: + resolution: {integrity: sha512-QOnuT+BOtivR77wYvCWHfGt9s4Pz1VIMbD463vegT5MLqNXy8rYFT/lPVEqf/bhYeT6qmqrNHhsX+rWwe3rOCQ==} + peerDependencies: + picomatch: ^3 || ^4 + peerDependenciesMeta: + picomatch: + optional: true + fetch-blob@3.2.0: resolution: {integrity: sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==} engines: {node: ^12.20 || >= 14.13} @@ -4427,24 +4449,28 @@ packages: engines: {node: '>= 12.0.0'} cpu: [arm64] os: [linux] + libc: [glibc] lightningcss-linux-arm64-musl@1.27.0: resolution: {integrity: sha512-rCGBm2ax7kQ9pBSeITfCW9XSVF69VX+fm5DIpvDZQl4NnQoMQyRwhZQm9pd59m8leZ1IesRqWk2v/DntMo26lg==} engines: {node: '>= 12.0.0'} cpu: [arm64] os: [linux] + libc: [musl] lightningcss-linux-x64-gnu@1.27.0: resolution: {integrity: sha512-Dk/jovSI7qqhJDiUibvaikNKI2x6kWPN79AQiD/E/KeQWMjdGe9kw51RAgoWFDi0coP4jinaH14Nrt/J8z3U4A==} engines: {node: '>= 12.0.0'} cpu: [x64] os: [linux] + libc: [glibc] lightningcss-linux-x64-musl@1.27.0: resolution: {integrity: sha512-QKjTxXm8A9s6v9Tg3Fk0gscCQA1t/HMoF7Woy1u68wCk5kS4fR+q3vXa1p3++REW784cRAtkYKrPy6JKibrEZA==} engines: {node: '>= 12.0.0'} cpu: [x64] os: [linux] + libc: [musl] lightningcss-win32-arm64-msvc@1.27.0: resolution: {integrity: sha512-/wXegPS1hnhkeG4OXQKEMQeJd48RDC3qdh+OA8pCuOPCyvnm/yEayrJdJVqzBsqpy1aJklRCVxscpFur80o6iQ==} @@ -5268,6 +5294,10 @@ packages: resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} engines: {node: '>=8.6'} + picomatch@4.0.2: + resolution: {integrity: sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==} + engines: {node: '>=12'} + pidtree@0.3.1: resolution: {integrity: sha512-qQbW94hLHEqCg7nhby4yRC7G2+jYHY4Rguc2bjw7Uug4GIJuu1tvf2uHaZv5Q8zdt+WKJ6qK1FOI6amaWUo5FA==} engines: {node: '>=0.10'} @@ -5450,8 +5480,8 @@ packages: resolution: {integrity: sha512-yioayjNbHn6z1/Bywyb2Y4s3yvDAeXGOyxqD+LnVOinq6Mdmd++SW2wUNVzavyyHxd6+DxzWGIuosg6P1Rj8uA==} engines: {node: '>=6.0.0'} - postcss@8.4.45: - resolution: {integrity: sha512-7KTLTdzdZZYscUc65XmjFiB73vBhBfbPztCYdUNvlaso9PrzjzcmjqBPR0lNGkcVlcO4BjiO5rK/qNz+XAen1Q==} + postcss@8.4.47: + resolution: {integrity: sha512-56rxCq7G/XfB4EkXq9Egn5GCqugWvDFjafDOThIdMBsI15iqPqR5r15TfSr1YPYeEI19YeaXMCbY6u88Y76GLQ==} engines: {node: ^10 || ^12 || >=14} prelude-ls@1.2.1: @@ -5571,14 +5601,14 @@ packages: react: '>=16.9.0' react-dom: '>=16.9.0' - rc-collapse@3.7.3: - resolution: {integrity: sha512-60FJcdTRn0X5sELF18TANwtVi7FtModq649H11mYF1jh83DniMoM4MqY627sEKRCTm4+WXfGDcB7hY5oW6xhyw==} + rc-collapse@3.8.0: + resolution: {integrity: sha512-YVBkssrKPBG09TGfcWWGj8zJBYD9G3XuTy89t5iUmSXrIXEAnO1M+qjUxRW6b4Qi0+wNWG6MHJF/+US+nmIlzA==} peerDependencies: react: '>=16.9.0' react-dom: '>=16.9.0' - rc-dialog@9.5.2: - resolution: {integrity: sha512-qVUjc8JukG+j/pNaHVSRa2GO2/KbV2thm7yO4hepQ902eGdYK913sGkwg/fh9yhKYV1ql3BKIN2xnud3rEXAPw==} + rc-dialog@9.6.0: + resolution: {integrity: sha512-ApoVi9Z8PaCQg6FsUzS8yvBEQy0ZL2PkuvAgrmohPkN3okps5WZ5WQWPc1RNuiOKaAYv8B97ACdsFU5LizzCqg==} peerDependencies: react: '>=16.9.0' react-dom: '>=16.9.0' @@ -5602,8 +5632,8 @@ packages: react: '>=16.9.0' react-dom: '>=16.9.0' - rc-image@7.9.0: - resolution: {integrity: sha512-l4zqO5E0quuLMCtdKfBgj4Suv8tIS011F5k1zBBlK25iMjjiNHxA0VeTzGFtUZERSA45gvpXDg8/P6qNLjR25g==} + rc-image@7.11.0: + resolution: {integrity: sha512-aZkTEZXqeqfPZtnSdNUnKQA0N/3MbgR7nUnZ+/4MfSFWPFHZau4p5r5ShaI0KPEMnNjv4kijSCFq/9wtJpwykw==} peerDependencies: react: '>=16.9.0' react-dom: '>=16.9.0' @@ -5620,26 +5650,26 @@ packages: react: '>=16.0.0' react-dom: '>=16.0.0' - rc-mentions@2.15.0: - resolution: {integrity: sha512-f5v5i7VdqvBDXbphoqcQWmXDif2Msd2arritVoWybrVDuHE6nQ7XCYsybHbV//WylooK52BFDouFvyaRDtXZEw==} + rc-mentions@2.16.1: + resolution: {integrity: sha512-GnhSTGP9Mtv6pqFFGQze44LlrtWOjHNrUUAcsdo9DnNAhN4pwVPEWy4z+2jpjkiGlJ3VoXdvMHcNDQdfI9fEaw==} peerDependencies: react: '>=16.9.0' react-dom: '>=16.9.0' - rc-menu@9.14.1: - resolution: {integrity: sha512-5wlRb3M8S4yGlWhSoEYJ7ZVRElyScdcpUHxgiLxkeig1tEdyKrnED3B2fhpN0Rrpdp9jyhnmZR/Lwq2fH5VvDQ==} + rc-menu@9.15.1: + resolution: {integrity: sha512-UKporqU6LPfHnpPmtP6hdEK4iO5Q+b7BRv/uRpxdIyDGplZy9jwUjsnpev5bs3PQKB0H0n34WAPDfjAfn3kAPA==} peerDependencies: react: '>=16.9.0' react-dom: '>=16.9.0' - rc-motion@2.9.2: - resolution: {integrity: sha512-fUAhHKLDdkAXIDLH0GYwof3raS58dtNUmzLF2MeiR8o6n4thNpSDQhOqQzWE4WfFZDCi9VEN8n7tiB7czREcyw==} + rc-motion@2.9.3: + resolution: {integrity: sha512-rkW47ABVkic7WEB0EKJqzySpvDqwl60/tdkY7hWP7dYnh5pm0SzJpo54oW3TDUGXV5wfxXFmMkxrzRRbotQ0+w==} peerDependencies: react: '>=16.9.0' react-dom: '>=16.9.0' - rc-notification@5.6.0: - resolution: {integrity: sha512-TGQW5T7waOxLwgJG7fXcw8l7AQiFOjaZ7ISF5PrU526nunHRNcTMuzKihQHaF4E/h/KfOCDk3Mv8eqzbu2e28w==} + rc-notification@5.6.1: + resolution: {integrity: sha512-Q4ZKES3IBxWmpNnlDiMFYoH6D7MJ1L3n3gp59pnpaMI8gm9Vj+gVRxdInvoYjBoZvEOenxb9MbbKvnFhzJpgvA==} engines: {node: '>=8.x'} peerDependencies: react: '>=16.9.0' @@ -5651,8 +5681,8 @@ packages: react: '>=16.9.0' react-dom: '>=16.9.0' - rc-pagination@4.2.0: - resolution: {integrity: sha512-V6qeANJsT6tmOcZ4XiUmj8JXjRLbkusuufpuoBw2GiAn94fIixYjFLmbruD1Sbhn8fPLDnWawPp4CN37zQorvw==} + rc-pagination@4.3.0: + resolution: {integrity: sha512-UubEWA0ShnroQ1tDa291Fzw6kj0iOeF26IsUObxYTpimgj4/qPCWVFl18RLZE+0Up1IZg0IK4pMn6nB3mjvB7g==} peerDependencies: react: '>=16.9.0' react-dom: '>=16.9.0' @@ -5696,8 +5726,8 @@ packages: react: '>=16.9.0' react-dom: '>=16.9.0' - rc-segmented@2.3.0: - resolution: {integrity: sha512-I3FtM5Smua/ESXutFfb8gJ8ZPcvFR+qUgeeGFQHBOvRiRKyAk4aBE5nfqrxXx+h8/vn60DQjOt6i4RNtrbOobg==} + rc-segmented@2.5.0: + resolution: {integrity: sha512-B28Fe3J9iUFOhFJET3RoXAPFJ2u47QvLSYcZWC4tFYNGPEjug5LAxEasZlA/PpAxhdOPqGWsGbSj7ftneukJnw==} peerDependencies: react: '>=16.0.0' react-dom: '>=16.0.0' @@ -5709,8 +5739,8 @@ packages: react: '*' react-dom: '*' - rc-slider@11.1.5: - resolution: {integrity: sha512-b77H5PbjMKsvkYXAYIkn50QuFX6ICQmCTibDinI9q+BHx65/TV4TeU25+oadhSRzykxs0/vBWeKBwRyySOeWlg==} + rc-slider@11.1.6: + resolution: {integrity: sha512-LACAaXM0hi+4x4ErDGZLy7weIQwmBIVbIgPE+eDHiHkyzMvKjWHraCG8/B22Y/tCQUPAsP02wBhKhth7mH2PIw==} engines: {node: '>=8.x'} peerDependencies: react: '>=16.9.0' @@ -5729,28 +5759,28 @@ packages: react: '>=16.9.0' react-dom: '>=16.9.0' - rc-table@7.45.7: - resolution: {integrity: sha512-wi9LetBL1t1csxyGkMB2p3mCiMt+NDexMlPbXHvQFmBBAsMxrgNSAPwUci2zDLUq9m8QdWc1Nh8suvrpy9mXrg==} + rc-table@7.47.5: + resolution: {integrity: sha512-fzq+V9j/atbPIcvs3emuclaEoXulwQpIiJA6/7ey52j8+9cJ4P8DGmp4YzfUVDrb3qhgedcVeD6eRgUrokwVEQ==} engines: {node: '>=8.x'} peerDependencies: react: '>=16.9.0' react-dom: '>=16.9.0' - rc-tabs@15.1.1: - resolution: {integrity: sha512-Tc7bJvpEdkWIVCUL7yQrMNBJY3j44NcyWS48jF/UKMXuUlzaXK+Z/pEL5LjGcTadtPvVmNqA40yv7hmr+tCOAw==} + rc-tabs@15.2.0: + resolution: {integrity: sha512-ZfHdGw0krK4walBYNOgPWCcBImSp5NtzJR5+oI4rN9Z44FYDQKozBFfuAQHhumIUtx4EmGaYCFjywwgca/Rs1g==} engines: {node: '>=8.x'} peerDependencies: react: '>=16.9.0' react-dom: '>=16.9.0' - rc-textarea@1.8.1: - resolution: {integrity: sha512-bm36N2ZqwZAP60ZQg2OY9mPdqWC+m6UTjHc+CqEZOxb3Ia29BGHazY/s5bI8M4113CkqTzhtFUDNA078ZiOx3Q==} + rc-textarea@1.8.2: + resolution: {integrity: sha512-UFAezAqltyR00a8Lf0IPAyTd29Jj9ee8wt8DqXyDMal7r/Cg/nDt3e1OOv3Th4W6mKaZijjgwuPXhAfVNTN8sw==} peerDependencies: react: '>=16.9.0' react-dom: '>=16.9.0' - rc-tooltip@6.2.0: - resolution: {integrity: sha512-iS/3iOAvtDh9GIx1ulY7EFUXUtktFccNLsARo3NPgLf0QW9oT0w3dA9cYWlhqAKmD+uriEwdWz1kH0Qs4zk2Aw==} + rc-tooltip@6.2.1: + resolution: {integrity: sha512-rws0duD/3sHHsD905Nex7FvoUGy2UBQRhTkKxeEvr2FB+r21HsOxcDJI0TzyO8NHhnAA8ILr8pfbSBg5Jj5KBg==} peerDependencies: react: '>=16.9.0' react-dom: '>=16.9.0' @@ -5768,8 +5798,8 @@ packages: react: '*' react-dom: '*' - rc-upload@4.7.0: - resolution: {integrity: sha512-eUwxYNHlsYe5vYhKFAUGrQG95JrnPzY+BmPi1Daq39fWNl/eOc7v4UODuWrVp2LFkQBuV3cMCG/I68iub6oBrg==} + rc-upload@4.8.1: + resolution: {integrity: sha512-toEAhwl4hjLAI1u8/CgKWt30BR06ulPa4iGQSMvSXoHzO88gPCslxqV/mnn4gJU7PDoltGIC9Eh+wkeudqgHyw==} peerDependencies: react: '>=16.9.0' react-dom: '>=16.9.0' @@ -5780,8 +5810,8 @@ packages: react: '>=16.9.0' react-dom: '>=16.9.0' - rc-virtual-list@3.14.5: - resolution: {integrity: sha512-ZMOnkCLv2wUN8Jz7yI4XiSLa9THlYvf00LuMhb1JlsQCewuU7ydPuHw1rGVPhe9VZYl/5UqODtNd7QKJ2DMGfg==} + rc-virtual-list@3.14.7: + resolution: {integrity: sha512-wFH1vzByGzT4jwNzj53JXScCHiTtZmEEXE9F8qyGDhoEaQAEg+RDeRZcTi0oIUo2EWqPiFnpaV5H09c8XVKSIw==} engines: {node: '>=8.x'} peerDependencies: react: '>=16.9.0' @@ -5980,8 +6010,8 @@ packages: engines: {node: 20 || >=22} hasBin: true - rollup@4.21.2: - resolution: {integrity: sha512-e3TapAgYf9xjdLvKQCkQTnbTKd4a6jwlpQSJJFokHGaX2IVjoEqkIIhiQfqsi0cdwlOD+tQGuOd5AJkc5RngBw==} + rollup@4.22.4: + resolution: {integrity: sha512-vD8HJ5raRcWOyymsR6Z3o6+RzfEPCnVLMFJ6vRslO1jt4LO6dUo5Qnpg7y4RkZFM2DMe3WUirkI5c16onjrc6A==} engines: {node: '>=18.0.0', npm: '>=8.0.0'} hasBin: true @@ -6470,8 +6500,8 @@ packages: resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} engines: {node: '>= 0.4'} - svelte-eslint-parser@0.41.0: - resolution: {integrity: sha512-L6f4hOL+AbgfBIB52Z310pg1d2QjRqm7wy3kI1W6hhdhX5bvu7+f0R6w4ykp5HoDdzq+vGhIJmsisaiJDGmVfA==} + svelte-eslint-parser@0.41.1: + resolution: {integrity: sha512-08ndI6zTghzI8SuJAFpvMbA/haPSGn3xz19pjre19yYMw8Nw/wQJ2PrZBI/L8ijGTgtkWCQQiLLy+Z1tfaCwNA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: svelte: ^3.37.0 || ^4.0.0 || ^5.0.0-next.191 @@ -6601,6 +6631,10 @@ packages: tinyexec@0.3.0: resolution: {integrity: sha512-tVGE0mVJPGb0chKhqmsoosjsS+qUnJVGJpZgsHYQcGoPlG3B51R3PouqTgEGH2Dc9jjFyOqOpix6ZHNMXp1FZg==} + tinyglobby@0.2.6: + resolution: {integrity: sha512-NbBoFBpqfcgd1tCiO8Lkfdk+xrA7mlLR9zgvZcZWQQwU63XAfUePyd6wZBaU93Hqw347lHnwFzttAkemHzzz4g==} + engines: {node: '>=12.0.0'} + tmp@0.0.33: resolution: {integrity: sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==} engines: {node: '>=0.6.0'} @@ -6695,8 +6729,8 @@ packages: tslib@2.7.0: resolution: {integrity: sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA==} - tsup@8.2.4: - resolution: {integrity: sha512-akpCPePnBnC/CXgRrcy72ZSntgIEUa1jN0oJbbvpALWKNOz1B7aM+UVDWGRGIO/T/PZugAESWDJUAb5FD48o8Q==} + tsup@8.3.0: + resolution: {integrity: sha512-ALscEeyS03IomcuNdFdc0YWGVIkwH1Ws7nfTbAPuoILvEV2hpGQAY72LIOjglGo4ShWpZfpBqP/jpQVCzqYQag==} engines: {node: '>=18'} hasBin: true peerDependencies: @@ -6774,8 +6808,8 @@ packages: peerDependencies: typescript: '>=4.5.0' - typescript-eslint@8.5.0: - resolution: {integrity: sha512-uD+XxEoSIvqtm4KE97etm32Tn5MfaZWgWfMMREStLxR6JzvHkc2Tkj7zhTEK5XmtpTmKHNnG8Sot6qDfhHtR1Q==} + typescript-eslint@8.6.0: + resolution: {integrity: sha512-eEhhlxCEpCd4helh3AO1hk0UP2MvbRi9CtIAJTVPQjuSXOOO2jsEacNi4UdcJzZJbeuVg1gMhtZ8UYb+NFYPrA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '*' @@ -6944,8 +6978,8 @@ packages: vfile@6.0.3: resolution: {integrity: sha512-KzIbH/9tXat2u30jf+smMwFCsno4wHVdNmzFyL+T/L3UGqqk6JKfVqOFOZEpZSHADH1k40ab6NUIXZq422ov3Q==} - vite@5.4.4: - resolution: {integrity: sha512-RHFCkULitycHVTtelJ6jQLd+KSAAzOgEYorV32R2q++M6COBjKJR6BxqClwp5sf0XaBDjVMuJ9wnNfyAJwjMkA==} + vite@5.4.7: + resolution: {integrity: sha512-5l2zxqMEPVENgvzTuBpHer2awaetimj2BGkhBPdnwKbPNOlHsODU+oiazEZzLK7KhAnOrO+XGYJYn4ZlUhDtDQ==} engines: {node: ^18.0.0 || >=20.0.0} hasBin: true peerDependencies: @@ -6987,8 +7021,8 @@ packages: resolution: {integrity: sha512-Dhxzh5HZuiHQhbvTW9AMetFfBHDMYpo23Uo9btPXgdYP+3T5S+p+jgNy7spra+veYhBP2dCSgxR/i2Y02h5/6w==} engines: {node: '>=0.10.0'} - wavesurfer.js@7.8.0: - resolution: {integrity: sha512-V9SIfE08VtSIl1KYHi+i+52gytEIxk0nDKlV98fjrK0UW+z37ojImgsYINEV015syLB9sZVAXDdGI8F4xmU7KQ==} + wavesurfer.js@7.8.6: + resolution: {integrity: sha512-EDexkMwkkQBTWruhfWQRkTtvRggtKFTPuJX/oZ5wbIZEfyww9EBeLr2mtkxzA1S8TlWPx6adY5WyjOlNYNyHSg==} web-namespaces@2.0.1: resolution: {integrity: sha512-bKr1DkiNa2krS7qxNtdrtHAmzuYGFQLiQ13TsorsdT6ULTkPLKuu5+GsFpDlg6JFjUTwX2DyhMPG2be8uPrqsQ==} @@ -7204,7 +7238,7 @@ snapshots: dependencies: '@ctrl/tinycolor': 3.6.1 - '@ant-design/cssinjs-utils@1.0.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + '@ant-design/cssinjs-utils@1.1.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: '@ant-design/cssinjs': 1.21.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@babel/runtime': 7.25.6 @@ -7230,7 +7264,7 @@ snapshots: '@ant-design/icons-svg@4.4.2': {} - '@ant-design/icons@5.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + '@ant-design/icons@5.5.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: '@ant-design/colors': 7.1.0 '@ant-design/icons-svg': 4.4.2 @@ -7528,11 +7562,11 @@ snapshots: human-id: 1.0.2 prettier: 2.8.8 - '@commitlint/cli@19.5.0(@types/node@22.5.4)(typescript@5.6.2)': + '@commitlint/cli@19.5.0(@types/node@22.5.5)(typescript@5.6.2)': dependencies: '@commitlint/format': 19.5.0 '@commitlint/lint': 19.5.0 - '@commitlint/load': 19.5.0(@types/node@22.5.4)(typescript@5.6.2) + '@commitlint/load': 19.5.0(@types/node@22.5.5)(typescript@5.6.2) '@commitlint/read': 19.5.0 '@commitlint/types': 19.5.0 tinyexec: 0.3.0 @@ -7579,7 +7613,7 @@ snapshots: '@commitlint/rules': 19.5.0 '@commitlint/types': 19.5.0 - '@commitlint/load@19.5.0(@types/node@22.5.4)(typescript@5.6.2)': + '@commitlint/load@19.5.0(@types/node@22.5.5)(typescript@5.6.2)': dependencies: '@commitlint/config-validator': 19.5.0 '@commitlint/execute-rule': 19.5.0 @@ -7587,7 +7621,7 @@ snapshots: '@commitlint/types': 19.5.0 chalk: 5.3.0 cosmiconfig: 9.0.0(typescript@5.6.2) - cosmiconfig-typescript-loader: 5.0.0(@types/node@22.5.4)(cosmiconfig@9.0.0(typescript@5.6.2))(typescript@5.6.2) + cosmiconfig-typescript-loader: 5.0.0(@types/node@22.5.5)(cosmiconfig@9.0.0(typescript@5.6.2))(typescript@5.6.2) lodash.isplainobject: 4.0.6 lodash.merge: 4.6.2 lodash.uniq: 4.5.0 @@ -7878,12 +7912,12 @@ snapshots: '@esbuild/win32-x64@0.23.1': optional: true - '@eslint-community/eslint-utils@4.4.0(eslint@9.10.0(jiti@1.21.6))': + '@eslint-community/eslint-utils@4.4.0(eslint@9.11.0(jiti@1.21.6))': dependencies: - eslint: 9.10.0(jiti@1.21.6) + eslint: 9.11.0(jiti@1.21.6) eslint-visitor-keys: 3.4.3 - '@eslint-community/regexpp@4.11.0': {} + '@eslint-community/regexpp@4.11.1': {} '@eslint/compat@1.1.1': {} @@ -7909,11 +7943,11 @@ snapshots: transitivePeerDependencies: - supports-color - '@eslint/js@9.10.0': {} + '@eslint/js@9.11.0': {} '@eslint/object-schema@2.1.4': {} - '@eslint/plugin-kit@0.1.0': + '@eslint/plugin-kit@0.2.0': dependencies: levn: 0.4.1 @@ -8009,11 +8043,11 @@ snapshots: dependencies: svelte: 4.2.19 - '@gradio/preview@0.10.1(@babel/core@7.25.2)(@types/node@18.19.50)(less@4.2.0)(postcss-load-config@3.1.4(postcss@8.4.45)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@18.19.50)(typescript@5.5.4)))(postcss@8.4.45)(rollup@4.21.2)(svelte@4.2.19)': + '@gradio/preview@0.10.1(@babel/core@7.25.2)(@types/node@18.19.50)(less@4.2.0)(postcss-load-config@6.0.1(jiti@1.21.6)(postcss@8.4.47)(tsx@4.19.1)(yaml@2.5.1))(postcss@8.4.47)(rollup@4.22.4)(svelte@4.2.19)': dependencies: '@originjs/vite-plugin-commonjs': 1.0.3 - '@rollup/plugin-sucrase': 5.0.2(rollup@4.21.2) - '@sveltejs/vite-plugin-svelte': 3.1.1(svelte@4.2.19)(vite@5.4.4(@types/node@18.19.50)(less@4.2.0)(lightningcss@1.27.0)(sass@1.78.0)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.45))) + '@rollup/plugin-sucrase': 5.0.2(rollup@4.22.4) + '@sveltejs/vite-plugin-svelte': 3.1.1(svelte@4.2.19)(vite@5.4.7(@types/node@18.19.50)(less@4.2.0)(lightningcss@1.27.0)(sass@1.78.0)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.47))) '@types/which': 3.0.4 coffeescript: 2.7.0 lightningcss: 1.27.0 @@ -8021,11 +8055,11 @@ snapshots: sass: 1.78.0 stylus: 0.63.0 sucrase: 3.35.0 - sugarss: 4.0.1(postcss@8.4.45) + sugarss: 4.0.1(postcss@8.4.47) svelte-hmr: 0.16.0(svelte@4.2.19) - svelte-preprocess: 5.1.4(@babel/core@7.25.2)(coffeescript@2.7.0)(less@4.2.0)(postcss-load-config@3.1.4(postcss@8.4.45)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@18.19.50)(typescript@5.5.4)))(postcss@8.4.45)(pug@3.0.3)(sass@1.78.0)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.45))(svelte@4.2.19)(typescript@5.6.2) + svelte-preprocess: 5.1.4(@babel/core@7.25.2)(coffeescript@2.7.0)(less@4.2.0)(postcss-load-config@6.0.1(jiti@1.21.6)(postcss@8.4.47)(tsx@4.19.1)(yaml@2.5.1))(postcss@8.4.47)(pug@3.0.3)(sass@1.78.0)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.47))(svelte@4.2.19)(typescript@5.6.2) typescript: 5.6.2 - vite: 5.4.4(@types/node@18.19.50)(less@4.2.0)(lightningcss@1.27.0)(sass@1.78.0)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.45)) + vite: 5.4.7(@types/node@18.19.50)(less@4.2.0)(lightningcss@1.27.0)(sass@1.78.0)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.47)) which: 4.0.0 yootils: 0.3.1 transitivePeerDependencies: @@ -8192,24 +8226,24 @@ snapshots: - supports-color optional: true - '@microsoft/api-extractor-model@7.29.8(@types/node@22.5.4)': + '@microsoft/api-extractor-model@7.29.8(@types/node@22.5.5)': dependencies: '@microsoft/tsdoc': 0.15.0 '@microsoft/tsdoc-config': 0.17.0 - '@rushstack/node-core-library': 5.9.0(@types/node@22.5.4) + '@rushstack/node-core-library': 5.9.0(@types/node@22.5.5) transitivePeerDependencies: - '@types/node' optional: true - '@microsoft/api-extractor@7.47.9(@types/node@22.5.4)': + '@microsoft/api-extractor@7.47.9(@types/node@22.5.5)': dependencies: - '@microsoft/api-extractor-model': 7.29.8(@types/node@22.5.4) + '@microsoft/api-extractor-model': 7.29.8(@types/node@22.5.5) '@microsoft/tsdoc': 0.15.0 '@microsoft/tsdoc-config': 0.17.0 - '@rushstack/node-core-library': 5.9.0(@types/node@22.5.4) + '@rushstack/node-core-library': 5.9.0(@types/node@22.5.5) '@rushstack/rig-package': 0.5.3 - '@rushstack/terminal': 0.14.2(@types/node@22.5.4) - '@rushstack/ts-command-line': 4.22.8(@types/node@22.5.4) + '@rushstack/terminal': 0.14.2(@types/node@22.5.5) + '@rushstack/ts-command-line': 4.22.8(@types/node@22.5.5) lodash: 4.17.21 minimatch: 3.0.8 resolve: 1.22.8 @@ -8396,78 +8430,78 @@ snapshots: '@babel/runtime': 7.25.6 '@rc-component/portal': 1.1.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1) classnames: 2.5.1 - rc-motion: 2.9.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + rc-motion: 2.9.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1) rc-resize-observer: 1.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) rc-util: 5.43.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) react: 18.3.1 react-dom: 18.3.1(react@18.3.1) - '@rollup/plugin-sucrase@5.0.2(rollup@4.21.2)': + '@rollup/plugin-sucrase@5.0.2(rollup@4.22.4)': dependencies: - '@rollup/pluginutils': 5.1.0(rollup@4.21.2) + '@rollup/pluginutils': 5.1.0(rollup@4.22.4) sucrase: 3.35.0 optionalDependencies: - rollup: 4.21.2 + rollup: 4.22.4 - '@rollup/pluginutils@5.1.0(rollup@4.21.2)': + '@rollup/pluginutils@5.1.0(rollup@4.22.4)': dependencies: '@types/estree': 1.0.5 estree-walker: 2.0.2 picomatch: 2.3.1 optionalDependencies: - rollup: 4.21.2 + rollup: 4.22.4 - '@rollup/rollup-android-arm-eabi@4.21.2': + '@rollup/rollup-android-arm-eabi@4.22.4': optional: true - '@rollup/rollup-android-arm64@4.21.2': + '@rollup/rollup-android-arm64@4.22.4': optional: true - '@rollup/rollup-darwin-arm64@4.21.2': + '@rollup/rollup-darwin-arm64@4.22.4': optional: true - '@rollup/rollup-darwin-x64@4.21.2': + '@rollup/rollup-darwin-x64@4.22.4': optional: true - '@rollup/rollup-linux-arm-gnueabihf@4.21.2': + '@rollup/rollup-linux-arm-gnueabihf@4.22.4': optional: true - '@rollup/rollup-linux-arm-musleabihf@4.21.2': + '@rollup/rollup-linux-arm-musleabihf@4.22.4': optional: true - '@rollup/rollup-linux-arm64-gnu@4.21.2': + '@rollup/rollup-linux-arm64-gnu@4.22.4': optional: true - '@rollup/rollup-linux-arm64-musl@4.21.2': + '@rollup/rollup-linux-arm64-musl@4.22.4': optional: true - '@rollup/rollup-linux-powerpc64le-gnu@4.21.2': + '@rollup/rollup-linux-powerpc64le-gnu@4.22.4': optional: true - '@rollup/rollup-linux-riscv64-gnu@4.21.2': + '@rollup/rollup-linux-riscv64-gnu@4.22.4': optional: true - '@rollup/rollup-linux-s390x-gnu@4.21.2': + '@rollup/rollup-linux-s390x-gnu@4.22.4': optional: true - '@rollup/rollup-linux-x64-gnu@4.21.2': + '@rollup/rollup-linux-x64-gnu@4.22.4': optional: true - '@rollup/rollup-linux-x64-musl@4.21.2': + '@rollup/rollup-linux-x64-musl@4.22.4': optional: true - '@rollup/rollup-win32-arm64-msvc@4.21.2': + '@rollup/rollup-win32-arm64-msvc@4.22.4': optional: true - '@rollup/rollup-win32-ia32-msvc@4.21.2': + '@rollup/rollup-win32-ia32-msvc@4.22.4': optional: true - '@rollup/rollup-win32-x64-msvc@4.21.2': + '@rollup/rollup-win32-x64-msvc@4.22.4': optional: true '@rtsao/scc@1.1.0': {} - '@rushstack/node-core-library@5.9.0(@types/node@22.5.4)': + '@rushstack/node-core-library@5.9.0(@types/node@22.5.5)': dependencies: ajv: 8.13.0 ajv-draft-04: 1.0.0(ajv@8.13.0) @@ -8478,7 +8512,7 @@ snapshots: resolve: 1.22.8 semver: 7.5.4 optionalDependencies: - '@types/node': 22.5.4 + '@types/node': 22.5.5 optional: true '@rushstack/rig-package@0.5.3': @@ -8487,17 +8521,17 @@ snapshots: strip-json-comments: 3.1.1 optional: true - '@rushstack/terminal@0.14.2(@types/node@22.5.4)': + '@rushstack/terminal@0.14.2(@types/node@22.5.5)': dependencies: - '@rushstack/node-core-library': 5.9.0(@types/node@22.5.4) + '@rushstack/node-core-library': 5.9.0(@types/node@22.5.5) supports-color: 8.1.1 optionalDependencies: - '@types/node': 22.5.4 + '@types/node': 22.5.5 optional: true - '@rushstack/ts-command-line@4.22.8(@types/node@22.5.4)': + '@rushstack/ts-command-line@4.22.8(@types/node@22.5.5)': dependencies: - '@rushstack/terminal': 0.14.2(@types/node@22.5.4) + '@rushstack/terminal': 0.14.2(@types/node@22.5.5) '@types/argparse': 1.0.38 argparse: 1.0.10 string-argv: 0.3.2 @@ -8532,26 +8566,26 @@ snapshots: transitivePeerDependencies: - typescript - '@sveltejs/vite-plugin-svelte-inspector@2.1.0(@sveltejs/vite-plugin-svelte@3.1.1(svelte@4.2.19)(vite@5.4.4(@types/node@18.19.50)(less@4.2.0)(lightningcss@1.27.0)(sass@1.78.0)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.45))))(svelte@4.2.19)(vite@5.4.4(@types/node@18.19.50)(less@4.2.0)(lightningcss@1.27.0)(sass@1.78.0)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.45)))': + '@sveltejs/vite-plugin-svelte-inspector@2.1.0(@sveltejs/vite-plugin-svelte@3.1.1(svelte@4.2.19)(vite@5.4.7(@types/node@18.19.50)(less@4.2.0)(lightningcss@1.27.0)(sass@1.78.0)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.47))))(svelte@4.2.19)(vite@5.4.7(@types/node@18.19.50)(less@4.2.0)(lightningcss@1.27.0)(sass@1.78.0)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.47)))': dependencies: - '@sveltejs/vite-plugin-svelte': 3.1.1(svelte@4.2.19)(vite@5.4.4(@types/node@18.19.50)(less@4.2.0)(lightningcss@1.27.0)(sass@1.78.0)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.45))) + '@sveltejs/vite-plugin-svelte': 3.1.1(svelte@4.2.19)(vite@5.4.7(@types/node@18.19.50)(less@4.2.0)(lightningcss@1.27.0)(sass@1.78.0)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.47))) debug: 4.3.7 svelte: 4.2.19 - vite: 5.4.4(@types/node@18.19.50)(less@4.2.0)(lightningcss@1.27.0)(sass@1.78.0)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.45)) + vite: 5.4.7(@types/node@18.19.50)(less@4.2.0)(lightningcss@1.27.0)(sass@1.78.0)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.47)) transitivePeerDependencies: - supports-color - '@sveltejs/vite-plugin-svelte@3.1.1(svelte@4.2.19)(vite@5.4.4(@types/node@18.19.50)(less@4.2.0)(lightningcss@1.27.0)(sass@1.78.0)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.45)))': + '@sveltejs/vite-plugin-svelte@3.1.1(svelte@4.2.19)(vite@5.4.7(@types/node@18.19.50)(less@4.2.0)(lightningcss@1.27.0)(sass@1.78.0)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.47)))': dependencies: - '@sveltejs/vite-plugin-svelte-inspector': 2.1.0(@sveltejs/vite-plugin-svelte@3.1.1(svelte@4.2.19)(vite@5.4.4(@types/node@18.19.50)(less@4.2.0)(lightningcss@1.27.0)(sass@1.78.0)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.45))))(svelte@4.2.19)(vite@5.4.4(@types/node@18.19.50)(less@4.2.0)(lightningcss@1.27.0)(sass@1.78.0)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.45))) + '@sveltejs/vite-plugin-svelte-inspector': 2.1.0(@sveltejs/vite-plugin-svelte@3.1.1(svelte@4.2.19)(vite@5.4.7(@types/node@18.19.50)(less@4.2.0)(lightningcss@1.27.0)(sass@1.78.0)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.47))))(svelte@4.2.19)(vite@5.4.7(@types/node@18.19.50)(less@4.2.0)(lightningcss@1.27.0)(sass@1.78.0)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.47))) debug: 4.3.7 deepmerge: 4.3.1 kleur: 4.1.5 magic-string: 0.30.10 svelte: 4.2.19 svelte-hmr: 0.16.0(svelte@4.2.19) - vite: 5.4.4(@types/node@18.19.50)(less@4.2.0)(lightningcss@1.27.0)(sass@1.78.0)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.45)) - vitefu: 0.2.5(vite@5.4.4(@types/node@18.19.50)(less@4.2.0)(lightningcss@1.27.0)(sass@1.78.0)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.45))) + vite: 5.4.7(@types/node@18.19.50)(less@4.2.0)(lightningcss@1.27.0)(sass@1.78.0)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.47)) + vitefu: 0.2.5(vite@5.4.7(@types/node@18.19.50)(less@4.2.0)(lightningcss@1.27.0)(sass@1.78.0)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.47))) transitivePeerDependencies: - supports-color @@ -8693,7 +8727,7 @@ snapshots: '@types/conventional-commits-parser@5.0.0': dependencies: - '@types/node': 22.5.4 + '@types/node': 22.5.5 '@types/cookie@0.6.0': {} @@ -8746,7 +8780,7 @@ snapshots: '@types/glob@7.2.0': dependencies: '@types/minimatch': 5.1.2 - '@types/node': 22.5.4 + '@types/node': 22.5.5 '@types/hast@2.3.9': dependencies: @@ -8790,27 +8824,27 @@ snapshots: dependencies: undici-types: 6.19.8 - '@types/node@22.5.4': + '@types/node@22.5.5': dependencies: undici-types: 6.19.8 '@types/path-browserify@1.0.2': {} - '@types/prop-types@15.7.12': {} + '@types/prop-types@15.7.13': {} '@types/pug@2.0.10': {} '@types/react-dom@18.3.0': dependencies: - '@types/react': 18.3.5 + '@types/react': 18.3.8 '@types/react-syntax-highlighter@15.5.13': dependencies: - '@types/react': 18.3.5 + '@types/react': 18.3.8 - '@types/react@18.3.5': + '@types/react@18.3.8': dependencies: - '@types/prop-types': 15.7.12 + '@types/prop-types': 15.7.13 csstype: 3.1.3 '@types/semver@7.5.8': {} @@ -8829,7 +8863,7 @@ snapshots: '@types/vfile@3.0.2': dependencies: - '@types/node': 22.5.4 + '@types/node': 22.5.5 '@types/unist': 3.0.3 '@types/vfile-message': 2.0.0 @@ -8837,15 +8871,15 @@ snapshots: '@types/wrap-ansi@3.0.0': {} - '@typescript-eslint/eslint-plugin@8.5.0(@typescript-eslint/parser@8.5.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2))(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2)': + '@typescript-eslint/eslint-plugin@8.6.0(@typescript-eslint/parser@8.6.0(eslint@9.11.0(jiti@1.21.6))(typescript@5.6.2))(eslint@9.11.0(jiti@1.21.6))(typescript@5.6.2)': dependencies: - '@eslint-community/regexpp': 4.11.0 - '@typescript-eslint/parser': 8.5.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2) - '@typescript-eslint/scope-manager': 8.5.0 - '@typescript-eslint/type-utils': 8.5.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2) - '@typescript-eslint/utils': 8.5.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2) - '@typescript-eslint/visitor-keys': 8.5.0 - eslint: 9.10.0(jiti@1.21.6) + '@eslint-community/regexpp': 4.11.1 + '@typescript-eslint/parser': 8.6.0(eslint@9.11.0(jiti@1.21.6))(typescript@5.6.2) + '@typescript-eslint/scope-manager': 8.6.0 + '@typescript-eslint/type-utils': 8.6.0(eslint@9.11.0(jiti@1.21.6))(typescript@5.6.2) + '@typescript-eslint/utils': 8.6.0(eslint@9.11.0(jiti@1.21.6))(typescript@5.6.2) + '@typescript-eslint/visitor-keys': 8.6.0 + eslint: 9.11.0(jiti@1.21.6) graphemer: 1.4.0 ignore: 5.3.2 natural-compare: 1.4.0 @@ -8855,28 +8889,28 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@8.5.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2)': + '@typescript-eslint/parser@8.6.0(eslint@9.11.0(jiti@1.21.6))(typescript@5.6.2)': dependencies: - '@typescript-eslint/scope-manager': 8.5.0 - '@typescript-eslint/types': 8.5.0 - '@typescript-eslint/typescript-estree': 8.5.0(typescript@5.6.2) - '@typescript-eslint/visitor-keys': 8.5.0 + '@typescript-eslint/scope-manager': 8.6.0 + '@typescript-eslint/types': 8.6.0 + '@typescript-eslint/typescript-estree': 8.6.0(typescript@5.6.2) + '@typescript-eslint/visitor-keys': 8.6.0 debug: 4.3.7 - eslint: 9.10.0(jiti@1.21.6) + eslint: 9.11.0(jiti@1.21.6) optionalDependencies: typescript: 5.6.2 transitivePeerDependencies: - supports-color - '@typescript-eslint/scope-manager@8.5.0': + '@typescript-eslint/scope-manager@8.6.0': dependencies: - '@typescript-eslint/types': 8.5.0 - '@typescript-eslint/visitor-keys': 8.5.0 + '@typescript-eslint/types': 8.6.0 + '@typescript-eslint/visitor-keys': 8.6.0 - '@typescript-eslint/type-utils@8.5.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2)': + '@typescript-eslint/type-utils@8.6.0(eslint@9.11.0(jiti@1.21.6))(typescript@5.6.2)': dependencies: - '@typescript-eslint/typescript-estree': 8.5.0(typescript@5.6.2) - '@typescript-eslint/utils': 8.5.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2) + '@typescript-eslint/typescript-estree': 8.6.0(typescript@5.6.2) + '@typescript-eslint/utils': 8.6.0(eslint@9.11.0(jiti@1.21.6))(typescript@5.6.2) debug: 4.3.7 ts-api-utils: 1.3.0(typescript@5.6.2) optionalDependencies: @@ -8885,12 +8919,12 @@ snapshots: - eslint - supports-color - '@typescript-eslint/types@8.5.0': {} + '@typescript-eslint/types@8.6.0': {} - '@typescript-eslint/typescript-estree@8.5.0(typescript@5.6.2)': + '@typescript-eslint/typescript-estree@8.6.0(typescript@5.6.2)': dependencies: - '@typescript-eslint/types': 8.5.0 - '@typescript-eslint/visitor-keys': 8.5.0 + '@typescript-eslint/types': 8.6.0 + '@typescript-eslint/visitor-keys': 8.6.0 debug: 4.3.7 fast-glob: 3.3.2 is-glob: 4.0.3 @@ -8902,38 +8936,38 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@8.5.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2)': + '@typescript-eslint/utils@8.6.0(eslint@9.11.0(jiti@1.21.6))(typescript@5.6.2)': dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@9.10.0(jiti@1.21.6)) - '@typescript-eslint/scope-manager': 8.5.0 - '@typescript-eslint/types': 8.5.0 - '@typescript-eslint/typescript-estree': 8.5.0(typescript@5.6.2) - eslint: 9.10.0(jiti@1.21.6) + '@eslint-community/eslint-utils': 4.4.0(eslint@9.11.0(jiti@1.21.6)) + '@typescript-eslint/scope-manager': 8.6.0 + '@typescript-eslint/types': 8.6.0 + '@typescript-eslint/typescript-estree': 8.6.0(typescript@5.6.2) + eslint: 9.11.0(jiti@1.21.6) transitivePeerDependencies: - supports-color - typescript - '@typescript-eslint/visitor-keys@8.5.0': + '@typescript-eslint/visitor-keys@8.6.0': dependencies: - '@typescript-eslint/types': 8.5.0 + '@typescript-eslint/types': 8.6.0 eslint-visitor-keys: 3.4.3 '@ungap/structured-clone@1.2.0': {} - '@vitejs/plugin-react-swc@3.7.0(vite@5.4.4(@types/node@18.19.50)(less@4.2.0)(lightningcss@1.27.0)(sass@1.78.0)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.45)))': + '@vitejs/plugin-react-swc@3.7.0(vite@5.4.7(@types/node@18.19.50)(less@4.2.0)(lightningcss@1.27.0)(sass@1.78.0)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.47)))': dependencies: '@swc/core': 1.5.29 - vite: 5.4.4(@types/node@18.19.50)(less@4.2.0)(lightningcss@1.27.0)(sass@1.78.0)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.45)) + vite: 5.4.7(@types/node@18.19.50)(less@4.2.0)(lightningcss@1.27.0)(sass@1.78.0)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.47)) transitivePeerDependencies: - '@swc/helpers' - '@xyflow/react@12.3.0(@types/react@18.3.5)(immer@10.1.1)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + '@xyflow/react@12.3.0(@types/react@18.3.8)(immer@10.1.1)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: '@xyflow/system': 0.0.42 classcat: 5.0.5 react: 18.3.1 react-dom: 18.3.1(react@18.3.1) - zustand: 4.5.5(@types/react@18.3.5)(immer@10.1.1)(react@18.3.1) + zustand: 4.5.5(@types/react@18.3.8)(immer@10.1.1)(react@18.3.1) transitivePeerDependencies: - '@types/react' - immer @@ -9045,12 +9079,12 @@ snapshots: ansi-styles@6.2.1: {} - antd@5.20.6(react-dom@18.3.1(react@18.3.1))(react@18.3.1): + antd@5.21.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: '@ant-design/colors': 7.1.0 '@ant-design/cssinjs': 1.21.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@ant-design/cssinjs-utils': 1.0.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@ant-design/icons': 5.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@ant-design/cssinjs-utils': 1.1.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@ant-design/icons': 5.5.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@ant-design/react-slick': 1.1.2(react@18.3.1) '@babel/runtime': 7.25.6 '@ctrl/tinycolor': 3.6.1 @@ -9064,44 +9098,44 @@ snapshots: dayjs: 1.11.13 rc-cascader: 3.28.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1) rc-checkbox: 3.3.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - rc-collapse: 3.7.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - rc-dialog: 9.5.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + rc-collapse: 3.8.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + rc-dialog: 9.6.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) rc-drawer: 7.2.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) rc-dropdown: 4.2.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) rc-field-form: 2.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - rc-image: 7.9.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + rc-image: 7.11.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) rc-input: 1.6.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1) rc-input-number: 9.2.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - rc-mentions: 2.15.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - rc-menu: 9.14.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - rc-motion: 2.9.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - rc-notification: 5.6.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - rc-pagination: 4.2.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + rc-mentions: 2.16.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + rc-menu: 9.15.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + rc-motion: 2.9.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + rc-notification: 5.6.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + rc-pagination: 4.3.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) rc-picker: 4.6.14(dayjs@1.11.13)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) rc-progress: 4.0.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) rc-rate: 2.13.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) rc-resize-observer: 1.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - rc-segmented: 2.3.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + rc-segmented: 2.5.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) rc-select: 14.15.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - rc-slider: 11.1.5(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + rc-slider: 11.1.6(react-dom@18.3.1(react@18.3.1))(react@18.3.1) rc-steps: 6.0.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1) rc-switch: 4.1.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - rc-table: 7.45.7(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - rc-tabs: 15.1.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - rc-textarea: 1.8.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - rc-tooltip: 6.2.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + rc-table: 7.47.5(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + rc-tabs: 15.2.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + rc-textarea: 1.8.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + rc-tooltip: 6.2.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1) rc-tree: 5.9.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) rc-tree-select: 5.23.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - rc-upload: 4.7.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + rc-upload: 4.8.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1) rc-util: 5.43.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - react: 18.3.1 - react-dom: 18.3.1(react@18.3.1) scroll-into-view-if-needed: 3.1.0 throttle-debounce: 5.0.2 transitivePeerDependencies: - date-fns - luxon - moment + - react + - react-dom any-promise@1.3.0: {} @@ -9613,9 +9647,9 @@ snapshots: dependencies: toggle-selection: 1.0.6 - cosmiconfig-typescript-loader@5.0.0(@types/node@22.5.4)(cosmiconfig@9.0.0(typescript@5.6.2))(typescript@5.6.2): + cosmiconfig-typescript-loader@5.0.0(@types/node@22.5.5)(cosmiconfig@9.0.0(typescript@5.6.2))(typescript@5.6.2): dependencies: - '@types/node': 22.5.4 + '@types/node': 22.5.5 cosmiconfig: 9.0.0(typescript@5.6.2) jiti: 1.21.6 typescript: 5.6.2 @@ -10292,14 +10326,14 @@ snapshots: escape-string-regexp@5.0.0: {} - eslint-compat-utils@0.5.1(eslint@9.10.0(jiti@1.21.6)): + eslint-compat-utils@0.5.1(eslint@9.11.0(jiti@1.21.6)): dependencies: - eslint: 9.10.0(jiti@1.21.6) + eslint: 9.11.0(jiti@1.21.6) semver: 7.6.3 - eslint-config-prettier@9.1.0(eslint@9.10.0(jiti@1.21.6)): + eslint-config-prettier@9.1.0(eslint@9.11.0(jiti@1.21.6)): dependencies: - eslint: 9.10.0(jiti@1.21.6) + eslint: 9.11.0(jiti@1.21.6) eslint-import-resolver-node@0.3.9: dependencies: @@ -10309,37 +10343,37 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-import-resolver-typescript@3.6.3(@typescript-eslint/parser@8.5.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2))(eslint-plugin-import@2.30.0)(eslint@9.10.0(jiti@1.21.6)): + eslint-import-resolver-typescript@3.6.3(@typescript-eslint/parser@8.6.0(eslint@9.11.0(jiti@1.21.6))(typescript@5.6.2))(eslint-plugin-import@2.30.0)(eslint@9.11.0(jiti@1.21.6)): dependencies: '@nolyfill/is-core-module': 1.0.39 debug: 4.3.7 enhanced-resolve: 5.17.1 - eslint: 9.10.0(jiti@1.21.6) - eslint-module-utils: 2.11.0(@typescript-eslint/parser@8.5.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.3(@typescript-eslint/parser@8.5.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2))(eslint-plugin-import@2.30.0)(eslint@9.10.0(jiti@1.21.6)))(eslint@9.10.0(jiti@1.21.6)) + eslint: 9.11.0(jiti@1.21.6) + eslint-module-utils: 2.11.0(@typescript-eslint/parser@8.6.0(eslint@9.11.0(jiti@1.21.6))(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.3(@typescript-eslint/parser@8.6.0(eslint@9.11.0(jiti@1.21.6))(typescript@5.6.2))(eslint-plugin-import@2.30.0)(eslint@9.11.0(jiti@1.21.6)))(eslint@9.11.0(jiti@1.21.6)) fast-glob: 3.3.2 get-tsconfig: 4.8.1 is-bun-module: 1.2.1 is-glob: 4.0.3 optionalDependencies: - eslint-plugin-import: 2.30.0(@typescript-eslint/parser@8.5.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2))(eslint-import-resolver-typescript@3.6.3)(eslint@9.10.0(jiti@1.21.6)) + eslint-plugin-import: 2.30.0(@typescript-eslint/parser@8.6.0(eslint@9.11.0(jiti@1.21.6))(typescript@5.6.2))(eslint-import-resolver-typescript@3.6.3)(eslint@9.11.0(jiti@1.21.6)) transitivePeerDependencies: - '@typescript-eslint/parser' - eslint-import-resolver-node - eslint-import-resolver-webpack - supports-color - eslint-module-utils@2.11.0(@typescript-eslint/parser@8.5.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.3(@typescript-eslint/parser@8.5.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2))(eslint-plugin-import@2.30.0)(eslint@9.10.0(jiti@1.21.6)))(eslint@9.10.0(jiti@1.21.6)): + eslint-module-utils@2.11.0(@typescript-eslint/parser@8.6.0(eslint@9.11.0(jiti@1.21.6))(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.3(@typescript-eslint/parser@8.6.0(eslint@9.11.0(jiti@1.21.6))(typescript@5.6.2))(eslint-plugin-import@2.30.0)(eslint@9.11.0(jiti@1.21.6)))(eslint@9.11.0(jiti@1.21.6)): dependencies: debug: 3.2.7 optionalDependencies: - '@typescript-eslint/parser': 8.5.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2) - eslint: 9.10.0(jiti@1.21.6) + '@typescript-eslint/parser': 8.6.0(eslint@9.11.0(jiti@1.21.6))(typescript@5.6.2) + eslint: 9.11.0(jiti@1.21.6) eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.6.3(@typescript-eslint/parser@8.5.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2))(eslint-plugin-import@2.30.0)(eslint@9.10.0(jiti@1.21.6)) + eslint-import-resolver-typescript: 3.6.3(@typescript-eslint/parser@8.6.0(eslint@9.11.0(jiti@1.21.6))(typescript@5.6.2))(eslint-plugin-import@2.30.0)(eslint@9.11.0(jiti@1.21.6)) transitivePeerDependencies: - supports-color - eslint-plugin-import@2.30.0(@typescript-eslint/parser@8.5.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2))(eslint-import-resolver-typescript@3.6.3)(eslint@9.10.0(jiti@1.21.6)): + eslint-plugin-import@2.30.0(@typescript-eslint/parser@8.6.0(eslint@9.11.0(jiti@1.21.6))(typescript@5.6.2))(eslint-import-resolver-typescript@3.6.3)(eslint@9.11.0(jiti@1.21.6)): dependencies: '@rtsao/scc': 1.1.0 array-includes: 3.1.8 @@ -10348,9 +10382,9 @@ snapshots: array.prototype.flatmap: 1.3.2 debug: 3.2.7 doctrine: 2.1.0 - eslint: 9.10.0(jiti@1.21.6) + eslint: 9.11.0(jiti@1.21.6) eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.11.0(@typescript-eslint/parser@8.5.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.3(@typescript-eslint/parser@8.5.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2))(eslint-plugin-import@2.30.0)(eslint@9.10.0(jiti@1.21.6)))(eslint@9.10.0(jiti@1.21.6)) + eslint-module-utils: 2.11.0(@typescript-eslint/parser@8.6.0(eslint@9.11.0(jiti@1.21.6))(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.3(@typescript-eslint/parser@8.6.0(eslint@9.11.0(jiti@1.21.6))(typescript@5.6.2))(eslint-plugin-import@2.30.0)(eslint@9.11.0(jiti@1.21.6)))(eslint@9.11.0(jiti@1.21.6)) hasown: 2.0.2 is-core-module: 2.15.1 is-glob: 4.0.3 @@ -10361,13 +10395,13 @@ snapshots: semver: 6.3.1 tsconfig-paths: 3.15.0 optionalDependencies: - '@typescript-eslint/parser': 8.5.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2) + '@typescript-eslint/parser': 8.6.0(eslint@9.11.0(jiti@1.21.6))(typescript@5.6.2) transitivePeerDependencies: - eslint-import-resolver-typescript - eslint-import-resolver-webpack - supports-color - eslint-plugin-jsx-a11y@6.10.0(eslint@9.10.0(jiti@1.21.6)): + eslint-plugin-jsx-a11y@6.10.0(eslint@9.11.0(jiti@1.21.6)): dependencies: aria-query: 5.1.3 array-includes: 3.1.8 @@ -10378,7 +10412,7 @@ snapshots: damerau-levenshtein: 1.0.8 emoji-regex: 9.2.2 es-iterator-helpers: 1.0.19 - eslint: 9.10.0(jiti@1.21.6) + eslint: 9.11.0(jiti@1.21.6) hasown: 2.0.2 jsx-ast-utils: 3.3.5 language-tags: 1.0.9 @@ -10387,25 +10421,25 @@ snapshots: safe-regex-test: 1.0.3 string.prototype.includes: 2.0.0 - eslint-plugin-prettier@5.2.1(@types/eslint@9.6.1)(eslint-config-prettier@9.1.0(eslint@9.10.0(jiti@1.21.6)))(eslint@9.10.0(jiti@1.21.6))(prettier@3.3.3): + eslint-plugin-prettier@5.2.1(@types/eslint@9.6.1)(eslint-config-prettier@9.1.0(eslint@9.11.0(jiti@1.21.6)))(eslint@9.11.0(jiti@1.21.6))(prettier@3.3.3): dependencies: - eslint: 9.10.0(jiti@1.21.6) + eslint: 9.11.0(jiti@1.21.6) prettier: 3.3.3 prettier-linter-helpers: 1.0.0 synckit: 0.9.1 optionalDependencies: '@types/eslint': 9.6.1 - eslint-config-prettier: 9.1.0(eslint@9.10.0(jiti@1.21.6)) + eslint-config-prettier: 9.1.0(eslint@9.11.0(jiti@1.21.6)) - eslint-plugin-react-hooks@4.6.2(eslint@9.10.0(jiti@1.21.6)): + eslint-plugin-react-hooks@4.6.2(eslint@9.11.0(jiti@1.21.6)): dependencies: - eslint: 9.10.0(jiti@1.21.6) + eslint: 9.11.0(jiti@1.21.6) - eslint-plugin-react-refresh@0.4.11(eslint@9.10.0(jiti@1.21.6)): + eslint-plugin-react-refresh@0.4.12(eslint@9.11.0(jiti@1.21.6)): dependencies: - eslint: 9.10.0(jiti@1.21.6) + eslint: 9.11.0(jiti@1.21.6) - eslint-plugin-react@7.36.1(eslint@9.10.0(jiti@1.21.6)): + eslint-plugin-react@7.36.1(eslint@9.11.0(jiti@1.21.6)): dependencies: array-includes: 3.1.8 array.prototype.findlast: 1.2.5 @@ -10413,7 +10447,7 @@ snapshots: array.prototype.tosorted: 1.1.4 doctrine: 2.1.0 es-iterator-helpers: 1.0.19 - eslint: 9.10.0(jiti@1.21.6) + eslint: 9.11.0(jiti@1.21.6) estraverse: 5.3.0 hasown: 2.0.2 jsx-ast-utils: 3.3.5 @@ -10427,24 +10461,24 @@ snapshots: string.prototype.matchall: 4.0.11 string.prototype.repeat: 1.0.0 - eslint-plugin-simple-import-sort@12.1.1(eslint@9.10.0(jiti@1.21.6)): + eslint-plugin-simple-import-sort@12.1.1(eslint@9.11.0(jiti@1.21.6)): dependencies: - eslint: 9.10.0(jiti@1.21.6) + eslint: 9.11.0(jiti@1.21.6) - eslint-plugin-svelte@2.43.0(eslint@9.10.0(jiti@1.21.6))(svelte@4.2.19)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@22.5.4)(typescript@5.6.2)): + eslint-plugin-svelte@2.44.0(eslint@9.11.0(jiti@1.21.6))(svelte@4.2.19)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@22.5.5)(typescript@5.6.2)): dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@9.10.0(jiti@1.21.6)) + '@eslint-community/eslint-utils': 4.4.0(eslint@9.11.0(jiti@1.21.6)) '@jridgewell/sourcemap-codec': 1.5.0 - eslint: 9.10.0(jiti@1.21.6) - eslint-compat-utils: 0.5.1(eslint@9.10.0(jiti@1.21.6)) + eslint: 9.11.0(jiti@1.21.6) + eslint-compat-utils: 0.5.1(eslint@9.11.0(jiti@1.21.6)) esutils: 2.0.3 known-css-properties: 0.34.0 - postcss: 8.4.45 - postcss-load-config: 3.1.4(postcss@8.4.45)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@22.5.4)(typescript@5.6.2)) - postcss-safe-parser: 6.0.0(postcss@8.4.45) + postcss: 8.4.47 + postcss-load-config: 3.1.4(postcss@8.4.47)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@22.5.5)(typescript@5.6.2)) + postcss-safe-parser: 6.0.0(postcss@8.4.47) postcss-selector-parser: 6.1.2 semver: 7.6.3 - svelte-eslint-parser: 0.41.0(svelte@4.2.19) + svelte-eslint-parser: 0.41.1(svelte@4.2.19) optionalDependencies: svelte: 4.2.19 transitivePeerDependencies: @@ -10464,14 +10498,14 @@ snapshots: eslint-visitor-keys@4.0.0: {} - eslint@9.10.0(jiti@1.21.6): + eslint@9.11.0(jiti@1.21.6): dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@9.10.0(jiti@1.21.6)) - '@eslint-community/regexpp': 4.11.0 + '@eslint-community/eslint-utils': 4.4.0(eslint@9.11.0(jiti@1.21.6)) + '@eslint-community/regexpp': 4.11.1 '@eslint/config-array': 0.18.0 '@eslint/eslintrc': 3.1.0 - '@eslint/js': 9.10.0 - '@eslint/plugin-kit': 0.1.0 + '@eslint/js': 9.11.0 + '@eslint/plugin-kit': 0.2.0 '@humanwhocodes/module-importer': 1.0.1 '@humanwhocodes/retry': 0.3.0 '@nodelib/fs.walk': 1.2.8 @@ -10670,6 +10704,10 @@ snapshots: dependencies: format: 0.2.2 + fdir@6.3.0(picomatch@4.0.2): + optionalDependencies: + picomatch: 4.0.2 + fetch-blob@3.2.0: dependencies: node-domexception: 1.0.0 @@ -12813,6 +12851,8 @@ snapshots: picomatch@2.3.1: {} + picomatch@4.0.2: {} + pidtree@0.3.1: {} pidtree@0.6.0: {} @@ -12827,17 +12867,17 @@ snapshots: possible-typed-array-names@1.0.0: {} - postcss-html@0.36.0(postcss-syntax@0.36.2(postcss-less@6.0.0(postcss@8.4.45))(postcss@8.4.45))(postcss@7.0.39): + postcss-html@0.36.0(postcss-syntax@0.36.2(postcss-less@6.0.0(postcss@8.4.47))(postcss@8.4.47))(postcss@7.0.39): dependencies: htmlparser2: 3.10.1 postcss: 7.0.39 - postcss-syntax: 0.36.2(postcss-html@0.36.0(postcss-syntax@0.36.2(postcss-less@6.0.0(postcss@8.4.45))(postcss@8.4.45))(postcss@7.0.39))(postcss-jsx@0.36.4(postcss-syntax@0.36.2(postcss-less@6.0.0(postcss@8.4.45))(postcss@8.4.45))(postcss@7.0.39))(postcss-less@3.1.4)(postcss-markdown@0.36.0(postcss-syntax@0.36.2(postcss-less@6.0.0(postcss@8.4.45))(postcss@8.4.45))(postcss@7.0.39))(postcss-scss@2.1.1)(postcss@7.0.39) + postcss-syntax: 0.36.2(postcss-html@0.36.0)(postcss-jsx@0.36.4)(postcss-less@3.1.4)(postcss-markdown@0.36.0)(postcss-scss@2.1.1)(postcss@7.0.39) - postcss-jsx@0.36.4(postcss-syntax@0.36.2(postcss-less@6.0.0(postcss@8.4.45))(postcss@8.4.45))(postcss@7.0.39): + postcss-jsx@0.36.4(postcss-syntax@0.36.2(postcss-less@6.0.0(postcss@8.4.47))(postcss@8.4.47))(postcss@7.0.39): dependencies: '@babel/core': 7.25.2 postcss: 7.0.39 - postcss-syntax: 0.36.2(postcss-html@0.36.0(postcss-syntax@0.36.2(postcss-less@6.0.0(postcss@8.4.45))(postcss@8.4.45))(postcss@7.0.39))(postcss-jsx@0.36.4(postcss-syntax@0.36.2(postcss-less@6.0.0(postcss@8.4.45))(postcss@8.4.45))(postcss@7.0.39))(postcss-less@3.1.4)(postcss-markdown@0.36.0(postcss-syntax@0.36.2(postcss-less@6.0.0(postcss@8.4.45))(postcss@8.4.45))(postcss@7.0.39))(postcss-scss@2.1.1)(postcss@7.0.39) + postcss-syntax: 0.36.2(postcss-html@0.36.0)(postcss-jsx@0.36.4)(postcss-less@3.1.4)(postcss-markdown@0.36.0)(postcss-scss@2.1.1)(postcss@7.0.39) transitivePeerDependencies: - supports-color @@ -12845,40 +12885,31 @@ snapshots: dependencies: postcss: 7.0.39 - postcss-less@6.0.0(postcss@8.4.45): + postcss-less@6.0.0(postcss@8.4.47): dependencies: - postcss: 8.4.45 + postcss: 8.4.47 - postcss-load-config@3.1.4(postcss@8.4.45)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@18.19.50)(typescript@5.5.4)): + postcss-load-config@3.1.4(postcss@8.4.47)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@22.5.5)(typescript@5.6.2)): dependencies: lilconfig: 2.1.0 yaml: 1.10.2 optionalDependencies: - postcss: 8.4.45 - ts-node: 10.9.2(@swc/core@1.7.26)(@types/node@18.19.50)(typescript@5.5.4) - optional: true + postcss: 8.4.47 + ts-node: 10.9.2(@swc/core@1.7.26)(@types/node@22.5.5)(typescript@5.6.2) - postcss-load-config@3.1.4(postcss@8.4.45)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@22.5.4)(typescript@5.6.2)): - dependencies: - lilconfig: 2.1.0 - yaml: 1.10.2 - optionalDependencies: - postcss: 8.4.45 - ts-node: 10.9.2(@swc/core@1.7.26)(@types/node@22.5.4)(typescript@5.6.2) - - postcss-load-config@6.0.1(jiti@1.21.6)(postcss@8.4.45)(tsx@4.19.1)(yaml@2.5.1): + postcss-load-config@6.0.1(jiti@1.21.6)(postcss@8.4.47)(tsx@4.19.1)(yaml@2.5.1): dependencies: lilconfig: 3.1.2 optionalDependencies: jiti: 1.21.6 - postcss: 8.4.45 + postcss: 8.4.47 tsx: 4.19.1 yaml: 2.5.1 - postcss-markdown@0.36.0(postcss-syntax@0.36.2(postcss-less@6.0.0(postcss@8.4.45))(postcss@8.4.45))(postcss@7.0.39): + postcss-markdown@0.36.0(postcss-syntax@0.36.2(postcss-less@6.0.0(postcss@8.4.47))(postcss@8.4.47))(postcss@7.0.39): dependencies: postcss: 7.0.39 - postcss-syntax: 0.36.2(postcss-html@0.36.0(postcss-syntax@0.36.2(postcss-less@6.0.0(postcss@8.4.45))(postcss@8.4.45))(postcss@7.0.39))(postcss-jsx@0.36.4(postcss-syntax@0.36.2(postcss-less@6.0.0(postcss@8.4.45))(postcss@8.4.45))(postcss@7.0.39))(postcss-less@3.1.4)(postcss-markdown@0.36.0(postcss-syntax@0.36.2(postcss-less@6.0.0(postcss@8.4.45))(postcss@8.4.45))(postcss@7.0.39))(postcss-scss@2.1.1)(postcss@7.0.39) + postcss-syntax: 0.36.2(postcss-html@0.36.0)(postcss-jsx@0.36.4)(postcss-less@3.1.4)(postcss-markdown@0.36.0)(postcss-scss@2.1.1)(postcss@7.0.39) remark: 10.0.1 unist-util-find-all-after: 1.0.5 @@ -12899,13 +12930,13 @@ snapshots: dependencies: postcss: 7.0.39 - postcss-safe-parser@6.0.0(postcss@8.4.45): + postcss-safe-parser@6.0.0(postcss@8.4.47): dependencies: - postcss: 8.4.45 + postcss: 8.4.47 - postcss-safe-parser@7.0.0(postcss@8.4.45): + postcss-safe-parser@7.0.0(postcss@8.4.47): dependencies: - postcss: 8.4.45 + postcss: 8.4.47 postcss-sass@0.3.5: dependencies: @@ -12916,9 +12947,9 @@ snapshots: dependencies: postcss: 7.0.39 - postcss-scss@4.0.9(postcss@8.4.45): + postcss-scss@4.0.9(postcss@8.4.47): dependencies: - postcss: 8.4.45 + postcss: 8.4.47 postcss-selector-parser@3.1.2: dependencies: @@ -12941,18 +12972,18 @@ snapshots: lodash: 4.17.21 postcss: 7.0.39 - postcss-sorting@8.0.2(postcss@8.4.45): + postcss-sorting@8.0.2(postcss@8.4.47): dependencies: - postcss: 8.4.45 + postcss: 8.4.47 - postcss-syntax@0.36.2(postcss-html@0.36.0(postcss-syntax@0.36.2(postcss-less@6.0.0(postcss@8.4.45))(postcss@8.4.45))(postcss@7.0.39))(postcss-jsx@0.36.4(postcss-syntax@0.36.2(postcss-less@6.0.0(postcss@8.4.45))(postcss@8.4.45))(postcss@7.0.39))(postcss-less@3.1.4)(postcss-markdown@0.36.0(postcss-syntax@0.36.2(postcss-less@6.0.0(postcss@8.4.45))(postcss@8.4.45))(postcss@7.0.39))(postcss-scss@2.1.1)(postcss@7.0.39): + postcss-syntax@0.36.2(postcss-html@0.36.0)(postcss-jsx@0.36.4)(postcss-less@3.1.4)(postcss-markdown@0.36.0)(postcss-scss@2.1.1)(postcss@7.0.39): dependencies: postcss: 7.0.39 optionalDependencies: - postcss-html: 0.36.0(postcss-syntax@0.36.2(postcss-less@6.0.0(postcss@8.4.45))(postcss@8.4.45))(postcss@7.0.39) - postcss-jsx: 0.36.4(postcss-syntax@0.36.2(postcss-less@6.0.0(postcss@8.4.45))(postcss@8.4.45))(postcss@7.0.39) + postcss-html: 0.36.0(postcss-syntax@0.36.2(postcss-less@6.0.0(postcss@8.4.47))(postcss@8.4.47))(postcss@7.0.39) + postcss-jsx: 0.36.4(postcss-syntax@0.36.2(postcss-less@6.0.0(postcss@8.4.47))(postcss@8.4.47))(postcss@7.0.39) postcss-less: 3.1.4 - postcss-markdown: 0.36.0(postcss-syntax@0.36.2(postcss-less@6.0.0(postcss@8.4.45))(postcss@8.4.45))(postcss@7.0.39) + postcss-markdown: 0.36.0(postcss-syntax@0.36.2(postcss-less@6.0.0(postcss@8.4.47))(postcss@8.4.47))(postcss@7.0.39) postcss-scss: 2.1.1 postcss-value-parser@3.3.1: {} @@ -12964,7 +12995,7 @@ snapshots: picocolors: 0.2.1 source-map: 0.6.1 - postcss@8.4.45: + postcss@8.4.47: dependencies: nanoid: 3.3.7 picocolors: 1.1.0 @@ -13109,21 +13140,21 @@ snapshots: react: 18.3.1 react-dom: 18.3.1(react@18.3.1) - rc-collapse@3.7.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1): + rc-collapse@3.8.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: '@babel/runtime': 7.25.6 classnames: 2.5.1 - rc-motion: 2.9.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + rc-motion: 2.9.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1) rc-util: 5.43.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) react: 18.3.1 react-dom: 18.3.1(react@18.3.1) - rc-dialog@9.5.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1): + rc-dialog@9.6.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: '@babel/runtime': 7.25.6 '@rc-component/portal': 1.1.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1) classnames: 2.5.1 - rc-motion: 2.9.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + rc-motion: 2.9.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1) rc-util: 5.43.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) react: 18.3.1 react-dom: 18.3.1(react@18.3.1) @@ -13133,7 +13164,7 @@ snapshots: '@babel/runtime': 7.25.6 '@rc-component/portal': 1.1.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1) classnames: 2.5.1 - rc-motion: 2.9.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + rc-motion: 2.9.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1) rc-util: 5.43.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) react: 18.3.1 react-dom: 18.3.1(react@18.3.1) @@ -13155,13 +13186,13 @@ snapshots: react: 18.3.1 react-dom: 18.3.1(react@18.3.1) - rc-image@7.9.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1): + rc-image@7.11.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: '@babel/runtime': 7.25.6 '@rc-component/portal': 1.1.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1) classnames: 2.5.1 - rc-dialog: 9.5.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - rc-motion: 2.9.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + rc-dialog: 9.6.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + rc-motion: 2.9.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1) rc-util: 5.43.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) react: 18.3.1 react-dom: 18.3.1(react@18.3.1) @@ -13184,30 +13215,30 @@ snapshots: react: 18.3.1 react-dom: 18.3.1(react@18.3.1) - rc-mentions@2.15.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1): + rc-mentions@2.16.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: '@babel/runtime': 7.25.6 '@rc-component/trigger': 2.2.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1) classnames: 2.5.1 rc-input: 1.6.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - rc-menu: 9.14.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - rc-textarea: 1.8.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + rc-menu: 9.15.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + rc-textarea: 1.8.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1) rc-util: 5.43.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) react: 18.3.1 react-dom: 18.3.1(react@18.3.1) - rc-menu@9.14.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1): + rc-menu@9.15.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: '@babel/runtime': 7.25.6 '@rc-component/trigger': 2.2.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1) classnames: 2.5.1 - rc-motion: 2.9.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + rc-motion: 2.9.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1) rc-overflow: 1.3.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1) rc-util: 5.43.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) react: 18.3.1 react-dom: 18.3.1(react@18.3.1) - rc-motion@2.9.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1): + rc-motion@2.9.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: '@babel/runtime': 7.25.6 classnames: 2.5.1 @@ -13215,11 +13246,11 @@ snapshots: react: 18.3.1 react-dom: 18.3.1(react@18.3.1) - rc-notification@5.6.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1): + rc-notification@5.6.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: '@babel/runtime': 7.25.6 classnames: 2.5.1 - rc-motion: 2.9.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + rc-motion: 2.9.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1) rc-util: 5.43.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) react: 18.3.1 react-dom: 18.3.1(react@18.3.1) @@ -13233,7 +13264,7 @@ snapshots: react: 18.3.1 react-dom: 18.3.1(react@18.3.1) - rc-pagination@4.2.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1): + rc-pagination@4.3.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: '@babel/runtime': 7.25.6 classnames: 2.5.1 @@ -13279,11 +13310,11 @@ snapshots: react-dom: 18.3.1(react@18.3.1) resize-observer-polyfill: 1.5.1 - rc-segmented@2.3.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1): + rc-segmented@2.5.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: '@babel/runtime': 7.25.6 classnames: 2.5.1 - rc-motion: 2.9.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + rc-motion: 2.9.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1) rc-util: 5.43.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) react: 18.3.1 react-dom: 18.3.1(react@18.3.1) @@ -13293,14 +13324,14 @@ snapshots: '@babel/runtime': 7.25.6 '@rc-component/trigger': 2.2.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1) classnames: 2.5.1 - rc-motion: 2.9.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + rc-motion: 2.9.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1) rc-overflow: 1.3.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1) rc-util: 5.43.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - rc-virtual-list: 3.14.5(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + rc-virtual-list: 3.14.7(react-dom@18.3.1(react@18.3.1))(react@18.3.1) react: 18.3.1 react-dom: 18.3.1(react@18.3.1) - rc-slider@11.1.5(react-dom@18.3.1(react@18.3.1))(react@18.3.1): + rc-slider@11.1.6(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: '@babel/runtime': 7.25.6 classnames: 2.5.1 @@ -13324,30 +13355,30 @@ snapshots: react: 18.3.1 react-dom: 18.3.1(react@18.3.1) - rc-table@7.45.7(react-dom@18.3.1(react@18.3.1))(react@18.3.1): + rc-table@7.47.5(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: '@babel/runtime': 7.25.6 '@rc-component/context': 1.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) classnames: 2.5.1 rc-resize-observer: 1.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) rc-util: 5.43.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - rc-virtual-list: 3.14.5(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + rc-virtual-list: 3.14.7(react-dom@18.3.1(react@18.3.1))(react@18.3.1) react: 18.3.1 react-dom: 18.3.1(react@18.3.1) - rc-tabs@15.1.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1): + rc-tabs@15.2.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: '@babel/runtime': 7.25.6 classnames: 2.5.1 rc-dropdown: 4.2.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - rc-menu: 9.14.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - rc-motion: 2.9.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + rc-menu: 9.15.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + rc-motion: 2.9.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1) rc-resize-observer: 1.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) rc-util: 5.43.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) react: 18.3.1 react-dom: 18.3.1(react@18.3.1) - rc-textarea@1.8.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1): + rc-textarea@1.8.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: '@babel/runtime': 7.25.6 classnames: 2.5.1 @@ -13357,7 +13388,7 @@ snapshots: react: 18.3.1 react-dom: 18.3.1(react@18.3.1) - rc-tooltip@6.2.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1): + rc-tooltip@6.2.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: '@babel/runtime': 7.25.6 '@rc-component/trigger': 2.2.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1) @@ -13379,13 +13410,13 @@ snapshots: dependencies: '@babel/runtime': 7.25.6 classnames: 2.5.1 - rc-motion: 2.9.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + rc-motion: 2.9.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1) rc-util: 5.43.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - rc-virtual-list: 3.14.5(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + rc-virtual-list: 3.14.7(react-dom@18.3.1(react@18.3.1))(react@18.3.1) react: 18.3.1 react-dom: 18.3.1(react@18.3.1) - rc-upload@4.7.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1): + rc-upload@4.8.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: '@babel/runtime': 7.25.6 classnames: 2.5.1 @@ -13400,7 +13431,7 @@ snapshots: react-dom: 18.3.1(react@18.3.1) react-is: 18.3.1 - rc-virtual-list@3.14.5(react-dom@18.3.1(react@18.3.1))(react@18.3.1): + rc-virtual-list@3.14.7(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: '@babel/runtime': 7.25.6 classnames: 2.5.1 @@ -13419,10 +13450,10 @@ snapshots: react-is@18.3.1: {} - react-markdown@9.0.1(@types/react@18.3.5)(react@18.3.1): + react-markdown@9.0.1(@types/react@18.3.8)(react@18.3.1): dependencies: '@types/hast': 3.0.4 - '@types/react': 18.3.5 + '@types/react': 18.3.8 devlop: 1.1.0 hast-util-to-jsx-runtime: 2.3.0 html-url-attributes: 3.0.0 @@ -13696,26 +13727,26 @@ snapshots: glob: 11.0.0 package-json-from-dist: 1.0.0 - rollup@4.21.2: + rollup@4.22.4: dependencies: '@types/estree': 1.0.5 optionalDependencies: - '@rollup/rollup-android-arm-eabi': 4.21.2 - '@rollup/rollup-android-arm64': 4.21.2 - '@rollup/rollup-darwin-arm64': 4.21.2 - '@rollup/rollup-darwin-x64': 4.21.2 - '@rollup/rollup-linux-arm-gnueabihf': 4.21.2 - '@rollup/rollup-linux-arm-musleabihf': 4.21.2 - '@rollup/rollup-linux-arm64-gnu': 4.21.2 - '@rollup/rollup-linux-arm64-musl': 4.21.2 - '@rollup/rollup-linux-powerpc64le-gnu': 4.21.2 - '@rollup/rollup-linux-riscv64-gnu': 4.21.2 - '@rollup/rollup-linux-s390x-gnu': 4.21.2 - '@rollup/rollup-linux-x64-gnu': 4.21.2 - '@rollup/rollup-linux-x64-musl': 4.21.2 - '@rollup/rollup-win32-arm64-msvc': 4.21.2 - '@rollup/rollup-win32-ia32-msvc': 4.21.2 - '@rollup/rollup-win32-x64-msvc': 4.21.2 + '@rollup/rollup-android-arm-eabi': 4.22.4 + '@rollup/rollup-android-arm64': 4.22.4 + '@rollup/rollup-darwin-arm64': 4.22.4 + '@rollup/rollup-darwin-x64': 4.22.4 + '@rollup/rollup-linux-arm-gnueabihf': 4.22.4 + '@rollup/rollup-linux-arm-musleabihf': 4.22.4 + '@rollup/rollup-linux-arm64-gnu': 4.22.4 + '@rollup/rollup-linux-arm64-musl': 4.22.4 + '@rollup/rollup-linux-powerpc64le-gnu': 4.22.4 + '@rollup/rollup-linux-riscv64-gnu': 4.22.4 + '@rollup/rollup-linux-s390x-gnu': 4.22.4 + '@rollup/rollup-linux-x64-gnu': 4.22.4 + '@rollup/rollup-linux-x64-musl': 4.22.4 + '@rollup/rollup-win32-arm64-msvc': 4.22.4 + '@rollup/rollup-win32-ia32-msvc': 4.22.4 + '@rollup/rollup-win32-x64-msvc': 4.22.4 fsevents: 2.3.3 run-parallel@1.2.0: @@ -14165,11 +14196,11 @@ snapshots: stylelint-config-ali@2.1.1(stylelint@9.10.1): dependencies: - postcss: 8.4.45 - postcss-less: 6.0.0(postcss@8.4.45) - postcss-scss: 4.0.9(postcss@8.4.45) + postcss: 8.4.47 + postcss-less: 6.0.0(postcss@8.4.47) + postcss-scss: 4.0.9(postcss@8.4.47) stylelint: 9.10.1 - stylelint-less: 3.0.1(postcss@8.4.45)(stylelint@9.10.1) + stylelint-less: 3.0.1(postcss@8.4.47)(stylelint@9.10.1) stylelint-scss: 6.2.1(stylelint@9.10.1) stylelint-config-rational-order@0.1.2: @@ -14192,9 +14223,9 @@ snapshots: dependencies: stylelint: 9.10.1 - stylelint-less@3.0.1(postcss@8.4.45)(stylelint@9.10.1): + stylelint-less@3.0.1(postcss@8.4.47)(stylelint@9.10.1): dependencies: - postcss: 8.4.45 + postcss: 8.4.47 postcss-resolve-nested-selector: 0.1.1 postcss-value-parser: 4.2.0 stylelint: 9.10.1 @@ -14208,8 +14239,8 @@ snapshots: stylelint-order@6.0.4(stylelint@9.10.1): dependencies: - postcss: 8.4.45 - postcss-sorting: 8.0.2(postcss@8.4.45) + postcss: 8.4.47 + postcss-sorting: 8.0.2(postcss@8.4.47) stylelint: 9.10.1 stylelint-prettier@5.0.2(prettier@3.3.3)(stylelint@9.10.1): @@ -14256,9 +14287,9 @@ snapshots: micromatch: 4.0.8 normalize-path: 3.0.0 picocolors: 1.1.0 - postcss: 8.4.45 + postcss: 8.4.47 postcss-resolve-nested-selector: 0.1.6 - postcss-safe-parser: 7.0.0(postcss@8.4.45) + postcss-safe-parser: 7.0.0(postcss@8.4.47) postcss-selector-parser: 6.1.2 postcss-value-parser: 4.2.0 resolve-from: 5.0.0 @@ -14299,10 +14330,10 @@ snapshots: normalize-selector: 0.2.0 pify: 4.0.1 postcss: 7.0.39 - postcss-html: 0.36.0(postcss-syntax@0.36.2(postcss-less@6.0.0(postcss@8.4.45))(postcss@8.4.45))(postcss@7.0.39) - postcss-jsx: 0.36.4(postcss-syntax@0.36.2(postcss-less@6.0.0(postcss@8.4.45))(postcss@8.4.45))(postcss@7.0.39) + postcss-html: 0.36.0(postcss-syntax@0.36.2(postcss-less@6.0.0(postcss@8.4.47))(postcss@8.4.47))(postcss@7.0.39) + postcss-jsx: 0.36.4(postcss-syntax@0.36.2(postcss-less@6.0.0(postcss@8.4.47))(postcss@8.4.47))(postcss@7.0.39) postcss-less: 3.1.4 - postcss-markdown: 0.36.0(postcss-syntax@0.36.2(postcss-less@6.0.0(postcss@8.4.45))(postcss@8.4.45))(postcss@7.0.39) + postcss-markdown: 0.36.0(postcss-syntax@0.36.2(postcss-less@6.0.0(postcss@8.4.47))(postcss@8.4.47))(postcss@7.0.39) postcss-media-query-parser: 0.2.3 postcss-reporter: 6.0.1 postcss-resolve-nested-selector: 0.1.1 @@ -14310,7 +14341,7 @@ snapshots: postcss-sass: 0.3.5 postcss-scss: 2.1.1 postcss-selector-parser: 3.1.2 - postcss-syntax: 0.36.2(postcss-html@0.36.0(postcss-syntax@0.36.2(postcss-less@6.0.0(postcss@8.4.45))(postcss@8.4.45))(postcss@7.0.39))(postcss-jsx@0.36.4(postcss-syntax@0.36.2(postcss-less@6.0.0(postcss@8.4.45))(postcss@8.4.45))(postcss@7.0.39))(postcss-less@3.1.4)(postcss-markdown@0.36.0(postcss-syntax@0.36.2(postcss-less@6.0.0(postcss@8.4.45))(postcss@8.4.45))(postcss@7.0.39))(postcss-scss@2.1.1)(postcss@7.0.39) + postcss-syntax: 0.36.2(postcss-html@0.36.0)(postcss-jsx@0.36.4)(postcss-less@3.1.4)(postcss-markdown@0.36.0)(postcss-scss@2.1.1)(postcss@7.0.39) postcss-value-parser: 3.3.1 resolve-from: 4.0.0 signal-exit: 3.0.7 @@ -14350,9 +14381,9 @@ snapshots: dependencies: postcss: 7.0.39 - sugarss@4.0.1(postcss@8.4.45): + sugarss@4.0.1(postcss@8.4.47): dependencies: - postcss: 8.4.45 + postcss: 8.4.47 supports-color@5.5.0: dependencies: @@ -14374,13 +14405,13 @@ snapshots: supports-preserve-symlinks-flag@1.0.0: {} - svelte-eslint-parser@0.41.0(svelte@4.2.19): + svelte-eslint-parser@0.41.1(svelte@4.2.19): dependencies: eslint-scope: 7.2.2 eslint-visitor-keys: 3.4.3 espree: 9.6.1 - postcss: 8.4.45 - postcss-scss: 4.0.9(postcss@8.4.45) + postcss: 8.4.47 + postcss-scss: 4.0.9(postcss@8.4.47) optionalDependencies: svelte: 4.2.19 @@ -14410,7 +14441,7 @@ snapshots: svelte: 4.2.19 tiny-glob: 0.2.9 - svelte-preprocess@5.1.4(@babel/core@7.25.2)(coffeescript@2.7.0)(less@4.2.0)(postcss-load-config@3.1.4(postcss@8.4.45)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@18.19.50)(typescript@5.5.4)))(postcss@8.4.45)(pug@3.0.3)(sass@1.78.0)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.45))(svelte@4.2.19)(typescript@5.6.2): + svelte-preprocess@5.1.4(@babel/core@7.25.2)(coffeescript@2.7.0)(less@4.2.0)(postcss-load-config@6.0.1(jiti@1.21.6)(postcss@8.4.47)(tsx@4.19.1)(yaml@2.5.1))(postcss@8.4.47)(pug@3.0.3)(sass@1.78.0)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.47))(svelte@4.2.19)(typescript@5.6.2): dependencies: '@types/pug': 2.0.10 detect-indent: 6.1.0 @@ -14422,12 +14453,12 @@ snapshots: '@babel/core': 7.25.2 coffeescript: 2.7.0 less: 4.2.0 - postcss: 8.4.45 - postcss-load-config: 3.1.4(postcss@8.4.45)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@18.19.50)(typescript@5.5.4)) + postcss: 8.4.47 + postcss-load-config: 6.0.1(jiti@1.21.6)(postcss@8.4.47)(tsx@4.19.1)(yaml@2.5.1) pug: 3.0.3 sass: 1.78.0 stylus: 0.63.0 - sugarss: 4.0.1(postcss@8.4.45) + sugarss: 4.0.1(postcss@8.4.47) typescript: 5.6.2 svelte@4.2.19: @@ -14513,6 +14544,11 @@ snapshots: tinyexec@0.3.0: {} + tinyglobby@0.2.6: + dependencies: + fdir: 6.3.0(picomatch@4.0.2) + picomatch: 4.0.2 + tmp@0.0.33: dependencies: os-tmpdir: 1.0.2 @@ -14589,14 +14625,14 @@ snapshots: optionalDependencies: '@swc/core': 1.7.26 - ts-node@10.9.2(@swc/core@1.7.26)(@types/node@22.5.4)(typescript@5.6.2): + ts-node@10.9.2(@swc/core@1.7.26)(@types/node@22.5.5)(typescript@5.6.2): dependencies: '@cspotcode/source-map-support': 0.8.1 '@tsconfig/node10': 1.0.11 '@tsconfig/node12': 1.0.11 '@tsconfig/node14': 1.0.3 '@tsconfig/node16': 1.0.4 - '@types/node': 22.5.4 + '@types/node': 22.5.5 acorn: 8.12.1 acorn-walk: 8.3.4 arg: 4.1.3 @@ -14623,7 +14659,7 @@ snapshots: tslib@2.7.0: {} - tsup@8.2.4(@microsoft/api-extractor@7.47.9(@types/node@22.5.4))(@swc/core@1.7.26)(jiti@1.21.6)(postcss@8.4.45)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.5.1): + tsup@8.3.0(@microsoft/api-extractor@7.47.9(@types/node@22.5.5))(@swc/core@1.7.26)(jiti@1.21.6)(postcss@8.4.47)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.5.1): dependencies: bundle-require: 5.0.0(esbuild@0.23.1) cac: 6.7.14 @@ -14632,19 +14668,19 @@ snapshots: debug: 4.3.7 esbuild: 0.23.1 execa: 5.1.1 - globby: 11.1.0 joycon: 3.1.1 picocolors: 1.1.0 - postcss-load-config: 6.0.1(jiti@1.21.6)(postcss@8.4.45)(tsx@4.19.1)(yaml@2.5.1) + postcss-load-config: 6.0.1(jiti@1.21.6)(postcss@8.4.47)(tsx@4.19.1)(yaml@2.5.1) resolve-from: 5.0.0 - rollup: 4.21.2 + rollup: 4.22.4 source-map: 0.8.0-beta.0 sucrase: 3.35.0 + tinyglobby: 0.2.6 tree-kill: 1.2.2 optionalDependencies: - '@microsoft/api-extractor': 7.47.9(@types/node@22.5.4) + '@microsoft/api-extractor': 7.47.9(@types/node@22.5.5) '@swc/core': 1.7.26 - postcss: 8.4.45 + postcss: 8.4.47 typescript: 5.6.2 transitivePeerDependencies: - jiti @@ -14734,11 +14770,11 @@ snapshots: dependencies: typescript: 5.6.2 - typescript-eslint@8.5.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2): + typescript-eslint@8.6.0(eslint@9.11.0(jiti@1.21.6))(typescript@5.6.2): dependencies: - '@typescript-eslint/eslint-plugin': 8.5.0(@typescript-eslint/parser@8.5.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2))(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2) - '@typescript-eslint/parser': 8.5.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2) - '@typescript-eslint/utils': 8.5.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2) + '@typescript-eslint/eslint-plugin': 8.6.0(@typescript-eslint/parser@8.6.0(eslint@9.11.0(jiti@1.21.6))(typescript@5.6.2))(eslint@9.11.0(jiti@1.21.6))(typescript@5.6.2) + '@typescript-eslint/parser': 8.6.0(eslint@9.11.0(jiti@1.21.6))(typescript@5.6.2) + '@typescript-eslint/utils': 8.6.0(eslint@9.11.0(jiti@1.21.6))(typescript@5.6.2) optionalDependencies: typescript: 5.6.2 transitivePeerDependencies: @@ -14943,11 +14979,11 @@ snapshots: '@types/unist': 3.0.3 vfile-message: 4.0.2 - vite@5.4.4(@types/node@18.19.50)(less@4.2.0)(lightningcss@1.27.0)(sass@1.78.0)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.45)): + vite@5.4.7(@types/node@18.19.50)(less@4.2.0)(lightningcss@1.27.0)(sass@1.78.0)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.47)): dependencies: esbuild: 0.21.5 - postcss: 8.4.45 - rollup: 4.21.2 + postcss: 8.4.47 + rollup: 4.22.4 optionalDependencies: '@types/node': 18.19.50 fsevents: 2.3.3 @@ -14955,15 +14991,15 @@ snapshots: lightningcss: 1.27.0 sass: 1.78.0 stylus: 0.63.0 - sugarss: 4.0.1(postcss@8.4.45) + sugarss: 4.0.1(postcss@8.4.47) - vitefu@0.2.5(vite@5.4.4(@types/node@18.19.50)(less@4.2.0)(lightningcss@1.27.0)(sass@1.78.0)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.45))): + vitefu@0.2.5(vite@5.4.7(@types/node@18.19.50)(less@4.2.0)(lightningcss@1.27.0)(sass@1.78.0)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.47))): optionalDependencies: - vite: 5.4.4(@types/node@18.19.50)(less@4.2.0)(lightningcss@1.27.0)(sass@1.78.0)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.45)) + vite: 5.4.7(@types/node@18.19.50)(less@4.2.0)(lightningcss@1.27.0)(sass@1.78.0)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.47)) void-elements@3.1.0: {} - wavesurfer.js@7.8.0: {} + wavesurfer.js@7.8.6: {} web-namespaces@2.0.1: {} @@ -15140,11 +15176,11 @@ snapshots: dependencies: tslib: 2.3.0 - zustand@4.5.5(@types/react@18.3.5)(immer@10.1.1)(react@18.3.1): + zustand@4.5.5(@types/react@18.3.8)(immer@10.1.1)(react@18.3.1): dependencies: use-sync-external-store: 1.2.2(react@18.3.1) optionalDependencies: - '@types/react': 18.3.5 + '@types/react': 18.3.8 immer: 10.1.1 react: 18.3.1 diff --git a/pyproject.toml b/pyproject.toml index 0fed77d2..fdad00df 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -21,7 +21,7 @@ keywords = [ "gradio-template-Chatbot", ] # Add dependencies here -dependencies = ["gradio>=4.0,<5.0"] +dependencies = ["gradio>=4.0"] classifiers = [ 'Development Status :: 3 - Alpha', 'License :: OSI Approved :: Apache Software License', From c49a8e11aeadc92b0854be25f9ea00a0c528f73d Mon Sep 17 00:00:00 2001 From: Col0ring <1561999073@qq.com> Date: Wed, 25 Sep 2024 20:09:08 +0800 Subject: [PATCH 15/51] feat: resolve rest props --- .../components/antd/affix/__init__.py | 2 + .../components/antd/divider/__init__.py | 2 - .../antd/float_button/back_top/__init__.py | 2 + .../components/antd/icon/__init__.py | 6 ++ .../antd/icon/iconfont_provider/__init__.py | 2 + frontend/antd/affix/Index.svelte | 28 ++++--- frontend/antd/alert/Index.svelte | 3 + .../antd/alert/error-boundary/Index.svelte | 3 + frontend/antd/anchor/Index.svelte | 3 + frontend/antd/anchor/item/Index.svelte | 3 + frontend/antd/auto-complete/Index.svelte | 3 + .../antd/auto-complete/option/Index.svelte | 3 + frontend/antd/avatar/Index.svelte | 3 + frontend/antd/avatar/group/Index.svelte | 3 + frontend/antd/badge/Index.svelte | 3 + frontend/antd/badge/ribbon/Index.svelte | 3 + frontend/antd/breadcrumb/Index.svelte | 3 + .../breadcrumb/item/BreadcrumbItem.svelte | 3 + frontend/antd/button/group/Index.svelte | 3 + frontend/antd/calendar/Index.svelte | 3 + frontend/antd/card/Index.svelte | 67 +---------------- frontend/antd/card/grid/Index.svelte | 7 +- frontend/antd/card/meta/Index.svelte | 15 +--- frontend/antd/carousel/Index.svelte | 3 + frontend/antd/cascader/Index.svelte | 3 + frontend/antd/cascader/option/Index.svelte | 3 + frontend/antd/cascader/panel/Index.svelte | 3 + frontend/antd/checkbox/Index.svelte | 3 + frontend/antd/checkbox/group/Index.svelte | 3 + .../antd/checkbox/group/option/Index.svelte | 3 + frontend/antd/collapse/Index.svelte | 3 + frontend/antd/collapse/item/Index.svelte | 3 + frontend/antd/color-picker/Index.svelte | 3 + .../antd/color-picker/preset/Index.svelte | 3 + frontend/antd/date-picker/Index.svelte | 3 + frontend/antd/date-picker/preset/Index.svelte | 3 + .../date-picker/range-picker/Index.svelte | 3 + frontend/antd/descriptions/Index.svelte | 3 + frontend/antd/descriptions/item/Index.svelte | 3 + frontend/antd/divider/Index.svelte | 28 +------ frontend/antd/drawer/Index.svelte | 3 + frontend/antd/dropdown/Index.svelte | 7 +- frontend/antd/dropdown/button/Index.svelte | 3 + frontend/antd/empty/Index.svelte | 3 + frontend/antd/flex/Index.svelte | 31 +------- frontend/antd/float-button/Index.svelte | 3 + .../antd/float-button/back-top/Index.svelte | 28 ++++--- frontend/antd/float-button/group/Index.svelte | 3 + frontend/antd/form/Index.svelte | 3 + frontend/antd/form/item/Index.svelte | 36 ++++----- frontend/antd/form/item/rule/Index.svelte | 3 + frontend/antd/grid/col/Index.svelte | 52 +------------ frontend/antd/grid/row/Index.svelte | 19 +---- frontend/antd/icon/Index.svelte | 3 + .../antd/icon/iconfont-provider/Index.svelte | 7 +- frontend/antd/image/Index.svelte | 3 + .../antd/image/preview-group/Index.svelte | 3 + frontend/antd/input-number/Index.svelte | 3 + frontend/antd/input/Index.svelte | 3 + frontend/antd/input/otp/Index.svelte | 3 + frontend/antd/input/password/Index.svelte | 3 + frontend/antd/input/search/Index.svelte | 3 + frontend/antd/input/textarea/Index.svelte | 3 + frontend/antd/layout/Base.svelte | 3 + frontend/antd/layout/sider/Index.svelte | 3 + frontend/antd/list/Index.svelte | 3 + frontend/antd/list/item/Index.svelte | 3 + frontend/antd/list/item/meta/Index.svelte | 3 + frontend/antd/mentions/Index.svelte | 3 + frontend/antd/mentions/option/Index.svelte | 3 + frontend/antd/menu/Index.svelte | 3 + frontend/antd/menu/item/Index.svelte | 3 + frontend/antd/message/Index.svelte | 3 + frontend/antd/modal/Index.svelte | 3 + frontend/antd/notification/Index.svelte | 3 + frontend/antd/pagination/Index.svelte | 3 + frontend/antd/popconfirm/Index.svelte | 3 + frontend/antd/popover/Index.svelte | 3 + frontend/antd/progress/Index.svelte | 3 + frontend/antd/qr-code/Index.svelte | 3 + frontend/antd/radio/Index.svelte | 3 + frontend/antd/radio/button/Index.svelte | 3 + frontend/antd/radio/group/Index.svelte | 3 + frontend/antd/radio/group/option/Index.svelte | 3 + frontend/antd/rate/Index.svelte | 3 + frontend/antd/result/Index.svelte | 3 + frontend/antd/segmented/Index.svelte | 3 + frontend/antd/segmented/option/Index.svelte | 3 + frontend/antd/select/Index.svelte | 3 + frontend/antd/select/option/Index.svelte | 3 + frontend/antd/skeleton/Index.svelte | 3 + frontend/antd/skeleton/avatar/Index.svelte | 3 + frontend/antd/skeleton/button/Index.svelte | 3 + frontend/antd/skeleton/image/Index.svelte | 3 + frontend/antd/skeleton/input/Index.svelte | 3 + frontend/antd/skeleton/node/Index.svelte | 3 + frontend/antd/slider/Index.svelte | 3 + frontend/antd/slider/mark/Index.svelte | 3 + frontend/antd/space/Index.svelte | 3 + frontend/antd/space/compact/Index.svelte | 3 + frontend/antd/spin/Index.svelte | 3 + frontend/antd/splitter/panel/Index.svelte | 1 + frontend/antd/statistic/Index.svelte | 3 + .../antd/statistic/countdown/Index.svelte | 3 + frontend/antd/steps/Index.svelte | 3 + frontend/antd/steps/item/Index.svelte | 3 + frontend/antd/switch/Index.svelte | 3 + frontend/antd/table/Index.svelte | 3 + frontend/antd/table/column-group/Index.svelte | 3 + frontend/antd/table/column/Index.svelte | 3 + .../antd/table/expandable/Expandable.svelte | 3 + .../table/row-selection/RowSelection.svelte | 3 + .../row-selection/selection/Index.svelte | 3 + frontend/antd/tabs/Index.svelte | 3 + frontend/antd/tabs/item/Index.svelte | 3 + frontend/antd/tag/Index.svelte | 3 + frontend/antd/tag/checkable-tag/Index.svelte | 3 + frontend/antd/time-picker/Index.svelte | 3 + .../time-picker/range-picker/Index.svelte | 3 + frontend/antd/timeline/Index.svelte | 3 + frontend/antd/timeline/item/Index.svelte | 3 + frontend/antd/tooltip/Index.svelte | 3 + frontend/antd/tour/Index.svelte | 3 + frontend/antd/tour/step/Index.svelte | 3 + frontend/antd/transfer/Index.svelte | 3 + frontend/antd/tree-select/Index.svelte | 3 + .../antd/tree-select/tree-node/Index.svelte | 3 + frontend/antd/tree/Index.svelte | 3 + .../antd/tree/directory-tree/Index.svelte | 3 + frontend/antd/tree/tree-node/Index.svelte | 3 + frontend/antd/typography/Base.svelte | 3 + frontend/antd/typography/typography.base.tsx | 11 +-- frontend/antd/upload/Index.svelte | 3 + frontend/antd/upload/dragger/Index.svelte | 3 + frontend/antd/watermark/Index.svelte | 3 + frontend/base/div/Index.svelte | 3 + frontend/base/each/Each.svelte | 2 + frontend/base/fragment/Index.svelte | 2 + frontend/base/span/Index.svelte | 3 + frontend/utils/renderParamsSlot.tsx | 18 +++++ package.json | 3 +- pnpm-lock.yaml | 73 +++++++++++-------- tsconfig.json | 1 + 143 files changed, 523 insertions(+), 281 deletions(-) create mode 100644 frontend/utils/renderParamsSlot.tsx diff --git a/backend/modelscope_studio/components/antd/affix/__init__.py b/backend/modelscope_studio/components/antd/affix/__init__.py index e1eeb8e2..04cf700b 100644 --- a/backend/modelscope_studio/components/antd/affix/__init__.py +++ b/backend/modelscope_studio/components/antd/affix/__init__.py @@ -20,6 +20,7 @@ def __init__( self, props: dict | None = None, *, + elem_target: str | None = None, as_item: str | None = None, _internal: None = None, # gradio properties @@ -37,6 +38,7 @@ def __init__( elem_style=elem_style, **kwargs) self.props = props + self.elem_target = elem_target FRONTEND_DIR = resolve_frontend_dir("affix") diff --git a/backend/modelscope_studio/components/antd/divider/__init__.py b/backend/modelscope_studio/components/antd/divider/__init__.py index fdfd2090..60521958 100644 --- a/backend/modelscope_studio/components/antd/divider/__init__.py +++ b/backend/modelscope_studio/components/antd/divider/__init__.py @@ -2,8 +2,6 @@ from typing import Any, Literal -from gradio.events import EventListener - from ....utils.dev import ModelScopeLayoutComponent, resolve_frontend_dir diff --git a/backend/modelscope_studio/components/antd/float_button/back_top/__init__.py b/backend/modelscope_studio/components/antd/float_button/back_top/__init__.py index 42c9b4d9..604abf76 100644 --- a/backend/modelscope_studio/components/antd/float_button/back_top/__init__.py +++ b/backend/modelscope_studio/components/antd/float_button/back_top/__init__.py @@ -22,6 +22,7 @@ def __init__( self, props: dict | None = None, *, + elem_target: str | None = None, as_item: str | None = None, _internal: None = None, # gradio properties @@ -39,6 +40,7 @@ def __init__( elem_style=elem_style, **kwargs) self.props = props + self.elem_target = elem_target FRONTEND_DIR = resolve_frontend_dir("float-button", "back-top") diff --git a/backend/modelscope_studio/components/antd/icon/__init__.py b/backend/modelscope_studio/components/antd/icon/__init__.py index 1efc73a1..42088666 100644 --- a/backend/modelscope_studio/components/antd/icon/__init__.py +++ b/backend/modelscope_studio/components/antd/icon/__init__.py @@ -26,6 +26,9 @@ def __init__( value: str | None = "GithubOutlined", props: dict | None = None, *, + spin: bool = False, + rotate: int | float | None = None, + component: str | None = None, as_item: str | None = None, _internal: None = None, # gradio properties @@ -44,6 +47,9 @@ def __init__( elem_style=elem_style, **kwargs) self.props = props + self.spin = spin + self.rotate = rotate + self.component = component FRONTEND_DIR = resolve_frontend_dir("icon") diff --git a/backend/modelscope_studio/components/antd/icon/iconfont_provider/__init__.py b/backend/modelscope_studio/components/antd/icon/iconfont_provider/__init__.py index 101c16b9..14d713ac 100644 --- a/backend/modelscope_studio/components/antd/icon/iconfont_provider/__init__.py +++ b/backend/modelscope_studio/components/antd/icon/iconfont_provider/__init__.py @@ -16,6 +16,7 @@ def __init__( script_url: str | list[str] | None = None, props: dict | None = None, *, + extra_common_props: dict | None = None, as_item: str | None = None, _internal: None = None, # gradio properties @@ -27,6 +28,7 @@ def __init__( as_item=as_item, **kwargs) self.script_url = script_url + self.extra_common_props = extra_common_props self.props = props FRONTEND_DIR = resolve_frontend_dir("icon", "iconfont-provider") diff --git a/frontend/antd/affix/Index.svelte b/frontend/antd/affix/Index.svelte index 993510e8..c6d54b23 100644 --- a/frontend/antd/affix/Index.svelte +++ b/frontend/antd/affix/Index.svelte @@ -28,16 +28,22 @@ export let elem_classes: string[] = []; export let elem_style: React.CSSProperties = {}; - const [mergedProps, update] = getSlotContext({ - gradio, - props: $updatedProps, - _internal, - visible, - elem_id, - elem_classes, - elem_style, - as_item, - }); + const [mergedProps, update] = getSlotContext( + { + gradio, + props: $updatedProps, + _internal, + visible, + elem_id, + elem_classes, + elem_style, + as_item, + restProps: $$restProps, + }, + { + elem_target: 'target', + } + ); const slots = getSlots(); $: update({ gradio, @@ -48,6 +54,7 @@ elem_classes, elem_style, as_item, + restProps: $$restProps, }); @@ -57,6 +64,7 @@ style={$mergedProps.elem_style} className={cls($mergedProps.elem_classes, 'ms-gr-antd-affix')} id={$mergedProps.elem_id} + {...$mergedProps.restProps} {...$mergedProps.props} {...bindEvents($mergedProps)} slots={$slots} diff --git a/frontend/antd/alert/Index.svelte b/frontend/antd/alert/Index.svelte index 0bba37c8..aa2c3668 100644 --- a/frontend/antd/alert/Index.svelte +++ b/frontend/antd/alert/Index.svelte @@ -37,6 +37,7 @@ elem_classes, elem_style, as_item, + restProps: $$restProps, }); const slots = getSlots(); $: update({ @@ -48,6 +49,7 @@ elem_classes, elem_style, as_item, + restProps: $$restProps, }); @@ -57,6 +59,7 @@ style={$mergedProps.elem_style} className={cls($mergedProps.elem_classes, 'ms-gr-antd-alert')} id={$mergedProps.elem_id} + {...$mergedProps.restProps} {...$mergedProps.props} {...bindEvents($mergedProps)} slots={$slots} diff --git a/frontend/antd/alert/error-boundary/Index.svelte b/frontend/antd/alert/error-boundary/Index.svelte index dfa2bcf5..0dbd6224 100644 --- a/frontend/antd/alert/error-boundary/Index.svelte +++ b/frontend/antd/alert/error-boundary/Index.svelte @@ -39,6 +39,7 @@ elem_classes, elem_style, as_item, + restProps: $$restProps, }); const slots = getSlots(); $: update({ @@ -50,6 +51,7 @@ elem_classes, elem_style, as_item, + restProps: $$restProps, }); @@ -62,6 +64,7 @@ 'ms-gr-antd-alert-error-boundary' )} id={$mergedProps.elem_id} + {...$mergedProps.restProps} {...$mergedProps.props} {...bindEvents($mergedProps)} slots={$slots} diff --git a/frontend/antd/anchor/Index.svelte b/frontend/antd/anchor/Index.svelte index d22cd0b3..61293226 100644 --- a/frontend/antd/anchor/Index.svelte +++ b/frontend/antd/anchor/Index.svelte @@ -39,6 +39,7 @@ elem_classes, elem_style, as_item, + restProps: $$restProps, }); const slots = getSlots(); $: update({ @@ -50,6 +51,7 @@ elem_classes, elem_style, as_item, + restProps: $$restProps, }); const { items, default: children } = getItems(['items', 'default']); @@ -60,6 +62,7 @@ style={$mergedProps.elem_style} className={cls($mergedProps.elem_classes, 'ms-gr-antd-anchor')} id={$mergedProps.elem_id} + {...$mergedProps.restProps} {...$mergedProps.props} {...bindEvents($mergedProps)} slots={$slots} diff --git a/frontend/antd/anchor/item/Index.svelte b/frontend/antd/anchor/item/Index.svelte index 521141c1..a712147d 100644 --- a/frontend/antd/anchor/item/Index.svelte +++ b/frontend/antd/anchor/item/Index.svelte @@ -40,6 +40,7 @@ elem_classes, elem_style, as_item, + restProps: $$restProps, }); const slots = getSlots(); $: update({ @@ -51,6 +52,7 @@ elem_classes, elem_style, as_item, + restProps: $$restProps, }); const setItem = getSetItemFn(); const { default: items } = getItems(); @@ -59,6 +61,7 @@ style: $mergedProps.elem_style, className: cls($mergedProps.elem_classes, 'ms-gr-antd-anchor-item'), id: $mergedProps.elem_id, + ...$mergedProps.restProps, ...$mergedProps.props, ...bindEvents($mergedProps), }, diff --git a/frontend/antd/auto-complete/Index.svelte b/frontend/antd/auto-complete/Index.svelte index ebe1b4c5..2ac25f8a 100644 --- a/frontend/antd/auto-complete/Index.svelte +++ b/frontend/antd/auto-complete/Index.svelte @@ -40,6 +40,7 @@ elem_style, as_item, value, + restProps: $$restProps, }); const slots = getSlots(); $: update({ @@ -52,6 +53,7 @@ elem_style, as_item, value, + restProps: $$restProps, }); const { options, default: children } = getItems(['options', 'default']); @@ -62,6 +64,7 @@ style={$mergedProps.elem_style} className={cls($mergedProps.elem_classes, 'ms-gr-antd-auto-complete')} id={$mergedProps.elem_id} + {...$mergedProps.restProps} {...$mergedProps.props} {...bindEvents($mergedProps)} value={$mergedProps.props.value ?? $mergedProps.value} diff --git a/frontend/antd/auto-complete/option/Index.svelte b/frontend/antd/auto-complete/option/Index.svelte index 835d5eb6..a9dae884 100644 --- a/frontend/antd/auto-complete/option/Index.svelte +++ b/frontend/antd/auto-complete/option/Index.svelte @@ -44,6 +44,7 @@ as_item, value, label, + restProps: $$restProps, }); const slots = getSlots(); $: update({ @@ -57,6 +58,7 @@ as_item, value, label, + restProps: $$restProps, }); const setItem = getSetItemFn(); const { default: items, options } = getItems(['default', 'options']); @@ -71,6 +73,7 @@ id: $mergedProps.elem_id, value: $mergedProps.value, label: $mergedProps.label, + ...$mergedProps.restProps, ...$mergedProps.props, ...bindEvents($mergedProps), }, diff --git a/frontend/antd/avatar/Index.svelte b/frontend/antd/avatar/Index.svelte index b40be400..f301981d 100644 --- a/frontend/antd/avatar/Index.svelte +++ b/frontend/antd/avatar/Index.svelte @@ -39,6 +39,7 @@ elem_classes, elem_style, as_item, + restProps: $$restProps, }); const slots = getSlots(); $: update({ @@ -51,6 +52,7 @@ elem_classes, elem_style, as_item, + restProps: $$restProps, }); @@ -61,6 +63,7 @@ style={$mergedProps.elem_style} className={cls($mergedProps.elem_classes, 'ms-gr-antd-avatar')} id={$mergedProps.elem_id} + {...$mergedProps.restProps} {...$mergedProps.props} {...bindEvents($mergedProps)} slots={$slots} diff --git a/frontend/antd/avatar/group/Index.svelte b/frontend/antd/avatar/group/Index.svelte index 1000e855..8a0568c1 100644 --- a/frontend/antd/avatar/group/Index.svelte +++ b/frontend/antd/avatar/group/Index.svelte @@ -37,6 +37,7 @@ elem_classes, elem_style, as_item, + restProps: $$restProps, }); const slots = getSlots(); $: update({ @@ -48,6 +49,7 @@ elem_classes, elem_style, as_item, + restProps: $$restProps, }); @@ -58,6 +60,7 @@ style={$mergedProps.elem_style} className={cls($mergedProps.elem_classes, 'ms-gr-antd-avatar-group')} id={$mergedProps.elem_id} + {...$mergedProps.restProps} {...$mergedProps.props} {...bindEvents($mergedProps)} slots={$slots} diff --git a/frontend/antd/badge/Index.svelte b/frontend/antd/badge/Index.svelte index 02b2c1c2..f69fc73c 100644 --- a/frontend/antd/badge/Index.svelte +++ b/frontend/antd/badge/Index.svelte @@ -39,6 +39,7 @@ elem_classes, elem_style, as_item, + restProps: $$restProps, }); const slots = getSlots(); $: update({ @@ -51,12 +52,14 @@ elem_classes, elem_style, as_item, + restProps: $$restProps, }); $: badge_props = { style: $mergedProps.elem_style, className: cls($mergedProps.elem_classes, 'ms-gr-antd-badge'), id: $mergedProps.elem_id, + ...$mergedProps.restProps, ...$mergedProps.props, ...bindEvents($mergedProps), slots: $slots, diff --git a/frontend/antd/badge/ribbon/Index.svelte b/frontend/antd/badge/ribbon/Index.svelte index 41fd82dd..44dd3e19 100644 --- a/frontend/antd/badge/ribbon/Index.svelte +++ b/frontend/antd/badge/ribbon/Index.svelte @@ -38,6 +38,7 @@ elem_style, as_item, text, + restProps: $$restProps, }); const slots = getSlots(); $: update({ @@ -50,6 +51,7 @@ elem_style, as_item, text, + restProps: $$restProps, }); @@ -60,6 +62,7 @@ style={$mergedProps.elem_style} className={cls($mergedProps.elem_classes, 'ms-gr-antd-badge-ribbon')} id={$mergedProps.elem_id} + {...$mergedProps.restProps} {...$mergedProps.props} {...bindEvents($mergedProps)} slots={$slots} diff --git a/frontend/antd/breadcrumb/Index.svelte b/frontend/antd/breadcrumb/Index.svelte index 5bf55556..df36477d 100644 --- a/frontend/antd/breadcrumb/Index.svelte +++ b/frontend/antd/breadcrumb/Index.svelte @@ -39,6 +39,7 @@ elem_classes, elem_style, as_item, + restProps: $$restProps, }); const slots = getSlots(); $: update({ @@ -50,6 +51,7 @@ elem_classes, elem_style, as_item, + restProps: $$restProps, }); const { items, default: children } = getItems(['items', 'default']); @@ -60,6 +62,7 @@ style={$mergedProps.elem_style} className={cls($mergedProps.elem_classes, 'ms-gr-antd-breadcrumb')} id={$mergedProps.elem_id} + {...$mergedProps.restProps} {...$mergedProps.props} {...bindEvents($mergedProps)} slots={$slots} diff --git a/frontend/antd/breadcrumb/item/BreadcrumbItem.svelte b/frontend/antd/breadcrumb/item/BreadcrumbItem.svelte index b796b8bd..65821810 100644 --- a/frontend/antd/breadcrumb/item/BreadcrumbItem.svelte +++ b/frontend/antd/breadcrumb/item/BreadcrumbItem.svelte @@ -44,6 +44,7 @@ elem_style, as_item, title, + restProps: $$restProps, }); const slots = getSlots(); $: update({ @@ -56,6 +57,7 @@ elem_style, as_item, title, + restProps: $$restProps, }); const setItem = getSetItemFn(); const { @@ -105,6 +107,7 @@ const currentMergedProps = { ...$mergedProps, props: { + ...$mergedProps.restProps, ...$mergedProps.props, title: $mergedProps.props.title || title, menu: Object.values(menu).filter(Boolean).length > 0 ? menu : undefined, diff --git a/frontend/antd/button/group/Index.svelte b/frontend/antd/button/group/Index.svelte index cc605dca..ff762b60 100644 --- a/frontend/antd/button/group/Index.svelte +++ b/frontend/antd/button/group/Index.svelte @@ -37,6 +37,7 @@ elem_classes, elem_style, as_item, + restProps: $$restProps, }); const slots = getSlots(); $: update({ @@ -48,6 +49,7 @@ elem_classes, elem_style, as_item, + restProps: $$restProps, }); @@ -58,6 +60,7 @@ style={$mergedProps.elem_style} className={cls($mergedProps.elem_classes, 'ms-gr-antd-button-group')} id={$mergedProps.elem_id} + {...$mergedProps.restProps} {...$mergedProps.props} {...bindEvents($mergedProps)} slots={$slots} diff --git a/frontend/antd/calendar/Index.svelte b/frontend/antd/calendar/Index.svelte index e45b2551..edcf180c 100644 --- a/frontend/antd/calendar/Index.svelte +++ b/frontend/antd/calendar/Index.svelte @@ -39,6 +39,7 @@ elem_style, as_item, value, + restProps: $$restProps, }); const slots = getSlots(); @@ -52,6 +53,7 @@ elem_style, as_item, value, + restProps: $$restProps, }); @@ -61,6 +63,7 @@ style={$mergedProps.elem_style} className={cls($mergedProps.elem_classes, 'ms-gr-antd-calender')} id={$mergedProps.elem_id} + {...$mergedProps.restProps} {...$mergedProps.props} {...bindEvents($mergedProps)} slots={$slots} diff --git a/frontend/antd/card/Index.svelte b/frontend/antd/card/Index.svelte index acc847fc..ee0d524d 100644 --- a/frontend/antd/card/Index.svelte +++ b/frontend/antd/card/Index.svelte @@ -14,22 +14,6 @@ const AwaitedCard = importComponent(() => import('./card')); export let gradio: Gradio; export let _internal: Record = {}; - export let actions; - export let active_tab_key; - export let bordered; - export let cover; - export let default_active_tab_key; - export let extra; - export let hoverable; - export let loading; - export let size; - export let tab_bar_extra_content; - export let tab_list; - export let tab_props; - export let title; - export let type; - export let class_names; - export let styles; export let as_item: string | undefined; export let props: Record = {}; const updatedProps: Writable = writable(props); @@ -48,22 +32,7 @@ elem_id, elem_classes, elem_style, - actions, - active_tab_key, - bordered, - cover, - default_active_tab_key, - extra, - hoverable, - loading, - size, - tab_bar_extra_content, - tab_list, - tab_props, - title, - type, - class_names, - styles, + restProps: $$restProps, }); $: update({ gradio, @@ -74,22 +43,7 @@ elem_id, elem_classes, elem_style, - actions, - active_tab_key, - bordered, - cover, - default_active_tab_key, - extra, - hoverable, - loading, - size, - tab_bar_extra_content, - tab_list, - tab_props, - title, - type, - class_names, - styles, + restProps: $$restProps, }); @@ -99,22 +53,7 @@ style={$mergedProps.elem_style} className={cls($mergedProps.elem_classes, 'ms-gr-antd-card')} id={$mergedProps.elem_id} - actions={$mergedProps.actions} - activeTabKey={$mergedProps.active_tab_key} - bordered={$mergedProps.bordered} - cover={$mergedProps.cover} - defaultActiveTabKey={$mergedProps.default_active_tab_key} - extra={$mergedProps.extra} - hoverable={$mergedProps.hoverable} - loading={$mergedProps.loading} - size={$mergedProps.size} - tabBarExtraContent={$mergedProps.tab_bar_extra_content} - tabList={$mergedProps.tab_list} - tabProps={$mergedProps.tab_props} - title={$mergedProps.title} - type={$mergedProps.type} - classNames={$mergedProps.class_names} - styles={$mergedProps.styles} + {...$mergedProps.restProps} {...$mergedProps.props} {...bindEvents($mergedProps)} containsGrid={$mergedProps._internal.contains_grid} diff --git a/frontend/antd/card/grid/Index.svelte b/frontend/antd/card/grid/Index.svelte index 5fb8c9e8..67b08232 100644 --- a/frontend/antd/card/grid/Index.svelte +++ b/frontend/antd/card/grid/Index.svelte @@ -14,7 +14,6 @@ const AwaitedCardGrid = importComponent(() => import('./card.grid')); export let gradio: Gradio; export let _internal: Record = {}; - export let hoverable; export let as_item: string | undefined; export let props: Record = {}; const updatedProps = writable(props); @@ -33,7 +32,7 @@ elem_id, elem_classes, elem_style, - hoverable, + restProps: $$restProps, }); const slots = getSlots(); $: update({ @@ -45,7 +44,7 @@ elem_id, elem_classes, elem_style, - hoverable, + restProps: $$restProps, }); @@ -55,7 +54,7 @@ style={$mergedProps.elem_style} className={cls($mergedProps.elem_classes, 'ms-gr-antd-card-grid')} id={$mergedProps.elem_id} - hoverable={$mergedProps.hoverable} + {...$mergedProps.restProps} {...$mergedProps.props} {...bindEvents($mergedProps)} slots={$slots} diff --git a/frontend/antd/card/meta/Index.svelte b/frontend/antd/card/meta/Index.svelte index 1ba86329..18c1b36c 100644 --- a/frontend/antd/card/meta/Index.svelte +++ b/frontend/antd/card/meta/Index.svelte @@ -14,9 +14,6 @@ const AwaitedCardMeta = importComponent(() => import('./card.meta')); export let gradio: Gradio; export let _internal: Record = {}; - export let avatar; - export let description; - export let title; export let as_item: string | undefined; export let props: Record = {}; const updatedProps = writable(props); @@ -38,9 +35,7 @@ elem_id, elem_classes, elem_style, - avatar, - description, - title, + restProps: $$restProps, }); $: update({ gradio, @@ -51,9 +46,7 @@ elem_id, elem_classes, elem_style, - avatar, - description, - title, + restProps: $$restProps, }); @@ -63,9 +56,7 @@ style={$mergedProps.elem_style} className={cls($mergedProps.elem_classes, 'ms-gr-antd-card-meta')} id={$mergedProps.elem_id} - avatar={$mergedProps.avatar} - description={$mergedProps.description} - title={$mergedProps.title} + {...$mergedProps.restProps} {...$mergedProps.props} {...bindEvents($mergedProps)} slots={$slots} diff --git a/frontend/antd/carousel/Index.svelte b/frontend/antd/carousel/Index.svelte index 492f4ebe..35df4afc 100644 --- a/frontend/antd/carousel/Index.svelte +++ b/frontend/antd/carousel/Index.svelte @@ -37,6 +37,7 @@ elem_classes, elem_style, as_item, + restProps: $$restProps, }); const slots = getSlots(); $: update({ @@ -48,6 +49,7 @@ elem_classes, elem_style, as_item, + restProps: $$restProps, }); @@ -57,6 +59,7 @@ style={$mergedProps.elem_style} className={cls($mergedProps.elem_classes, 'ms-gr-antd-carousel')} id={$mergedProps.elem_id} + {...$mergedProps.restProps} {...$mergedProps.props} {...bindEvents($mergedProps)} slots={$slots} diff --git a/frontend/antd/cascader/Index.svelte b/frontend/antd/cascader/Index.svelte index ee11384d..aeeb0d28 100644 --- a/frontend/antd/cascader/Index.svelte +++ b/frontend/antd/cascader/Index.svelte @@ -40,6 +40,7 @@ elem_style, as_item, value, + restProps: $$restProps, }); const slots = getSlots(); $: update({ @@ -52,6 +53,7 @@ elem_style, as_item, value, + restProps: $$restProps, }); const { default: children, options } = getItems(['default', 'options']); @@ -62,6 +64,7 @@ style={$mergedProps.elem_style} className={cls($mergedProps.elem_classes, 'ms-gr-antd-cascader')} id={$mergedProps.elem_id} + {...$mergedProps.restProps} {...$mergedProps.props} {...bindEvents($mergedProps)} value={$mergedProps.props.value ?? $mergedProps.value} diff --git a/frontend/antd/cascader/option/Index.svelte b/frontend/antd/cascader/option/Index.svelte index ab6b55f6..41099d11 100644 --- a/frontend/antd/cascader/option/Index.svelte +++ b/frontend/antd/cascader/option/Index.svelte @@ -44,6 +44,7 @@ as_item, value, label, + restProps: $$restProps, }); const slots = getSlots(); $: update({ @@ -57,6 +58,7 @@ as_item, value, label, + restProps: $$restProps, }); const setItem = getSetItemFn(); const { default: items } = getItems(); @@ -68,6 +70,7 @@ id: $mergedProps.elem_id, label: $mergedProps.label, value: $mergedProps.value, + ...$mergedProps.restProps, ...$mergedProps.props, ...bindEvents($mergedProps), }, diff --git a/frontend/antd/cascader/panel/Index.svelte b/frontend/antd/cascader/panel/Index.svelte index 2e256aab..24caf22a 100644 --- a/frontend/antd/cascader/panel/Index.svelte +++ b/frontend/antd/cascader/panel/Index.svelte @@ -42,6 +42,7 @@ elem_style, as_item, value, + restProps: $$restProps, }); const slots = getSlots(); $: update({ @@ -54,6 +55,7 @@ elem_style, as_item, value, + restProps: $$restProps, }); const { default: children, options } = getItems(['default', 'options']); @@ -64,6 +66,7 @@ style={$mergedProps.elem_style} className={cls($mergedProps.elem_classes, 'ms-gr-antd-cascader-panel')} id={$mergedProps.elem_id} + {...$mergedProps.restProps} {...$mergedProps.props} {...bindEvents($mergedProps)} value={$mergedProps.props.value ?? $mergedProps.value} diff --git a/frontend/antd/checkbox/Index.svelte b/frontend/antd/checkbox/Index.svelte index 2a77abd8..bb98b92d 100644 --- a/frontend/antd/checkbox/Index.svelte +++ b/frontend/antd/checkbox/Index.svelte @@ -38,6 +38,7 @@ elem_style, as_item, value, + restProps: $$restProps, }); const slots = getSlots(); $: update({ @@ -50,6 +51,7 @@ elem_style, as_item, value, + restProps: $$restProps, }); @@ -59,6 +61,7 @@ style={$mergedProps.elem_style} className={cls($mergedProps.elem_classes, 'ms-gr-antd-checkbox')} id={$mergedProps.elem_id} + {...$mergedProps.restProps} {...$mergedProps.props} {...bindEvents($mergedProps)} checked={$mergedProps.props.checked ?? $mergedProps.value} diff --git a/frontend/antd/checkbox/group/Index.svelte b/frontend/antd/checkbox/group/Index.svelte index f409452c..6ce0e365 100644 --- a/frontend/antd/checkbox/group/Index.svelte +++ b/frontend/antd/checkbox/group/Index.svelte @@ -42,6 +42,7 @@ elem_style, as_item, value, + restProps: $$restProps, }); const slots = getSlots(); $: update({ @@ -54,6 +55,7 @@ elem_style, as_item, value, + restProps: $$restProps, }); const { default: children, options } = getItems(['default', 'options']); @@ -64,6 +66,7 @@ style={$mergedProps.elem_style} className={cls($mergedProps.elem_classes, 'ms-gr-antd-checkbox-group')} id={$mergedProps.elem_id} + {...$mergedProps.restProps} {...$mergedProps.props} {...bindEvents($mergedProps)} value={$mergedProps.props.value ?? $mergedProps.value} diff --git a/frontend/antd/checkbox/group/option/Index.svelte b/frontend/antd/checkbox/group/option/Index.svelte index c6932cee..1449b22e 100644 --- a/frontend/antd/checkbox/group/option/Index.svelte +++ b/frontend/antd/checkbox/group/option/Index.svelte @@ -46,6 +46,7 @@ value, label, disabled, + restProps: $$restProps, }); const slots = getSlots(); $: update({ @@ -60,6 +61,7 @@ value, label, disabled, + restProps: $$restProps, }); const setItem = getSetItemFn(); @@ -74,6 +76,7 @@ value: $mergedProps.value, label: $mergedProps.label, disabled: $mergedProps.disabled, + ...$mergedProps.restProps, ...$mergedProps.props, ...bindEvents($mergedProps), }, diff --git a/frontend/antd/collapse/Index.svelte b/frontend/antd/collapse/Index.svelte index a6305021..f8ac1503 100644 --- a/frontend/antd/collapse/Index.svelte +++ b/frontend/antd/collapse/Index.svelte @@ -40,6 +40,7 @@ elem_style, as_item, value, + restProps: $$restProps, }); const slots = getSlots(); $: update({ @@ -52,6 +53,7 @@ elem_style, as_item, value, + restProps: $$restProps, }); const { items, default: children } = getItems(['default', 'items']); @@ -63,6 +65,7 @@ style={$mergedProps.elem_style} className={cls($mergedProps.elem_classes, 'ms-gr-antd-collapse')} id={$mergedProps.elem_id} + {...$mergedProps.restProps} {...$mergedProps.props} {...bindEvents($mergedProps)} slots={$slots} diff --git a/frontend/antd/collapse/item/Index.svelte b/frontend/antd/collapse/item/Index.svelte index 7f56cf58..efcee324 100644 --- a/frontend/antd/collapse/item/Index.svelte +++ b/frontend/antd/collapse/item/Index.svelte @@ -44,6 +44,7 @@ elem_style, as_item, label, + restProps: $$restProps, }); const slots = getSlots(); $: update({ @@ -56,6 +57,7 @@ elem_style, as_item, label, + restProps: $$restProps, }); const setItem = getSetItemFn(); $: setItem($slotKey, $mergedProps._internal.index || 0, { @@ -64,6 +66,7 @@ className: cls($mergedProps.elem_classes, 'ms-gr-antd-collapse-item'), id: $mergedProps.elem_id, label: $mergedProps.label, + ...$mergedProps.restProps, ...$mergedProps.props, ...bindEvents($mergedProps), }, diff --git a/frontend/antd/color-picker/Index.svelte b/frontend/antd/color-picker/Index.svelte index 4d823c18..9f1a4729 100644 --- a/frontend/antd/color-picker/Index.svelte +++ b/frontend/antd/color-picker/Index.svelte @@ -41,6 +41,7 @@ elem_style, as_item, value, + restProps: $$restProps, }); const slots = getSlots(); $: update({ @@ -53,6 +54,7 @@ elem_style, as_item, value, + restProps: $$restProps, }); const { presets } = getItems(['presets']); @@ -63,6 +65,7 @@ style={$mergedProps.elem_style} className={cls($mergedProps.elem_classes, 'ms-gr-antd-color-picker')} id={$mergedProps.elem_id} + {...$mergedProps.restProps} {...$mergedProps.props} {...bindEvents($mergedProps)} value={$mergedProps.props.value ?? $mergedProps.value} diff --git a/frontend/antd/color-picker/preset/Index.svelte b/frontend/antd/color-picker/preset/Index.svelte index cb410f3a..cf485d41 100644 --- a/frontend/antd/color-picker/preset/Index.svelte +++ b/frontend/antd/color-picker/preset/Index.svelte @@ -46,6 +46,7 @@ colors, default_open, label, + restProps: $$restProps, }); const slots = getSlots(); $: update({ @@ -60,6 +61,7 @@ colors, default_open, label, + restProps: $$restProps, }); const setItem = getSetItemFn(); @@ -74,6 +76,7 @@ label: $mergedProps.label, colors: $mergedProps.colors, defaultOpen: $mergedProps.default_open, + ...$mergedProps.restProps, ...$mergedProps.props, ...bindEvents($mergedProps), }, diff --git a/frontend/antd/date-picker/Index.svelte b/frontend/antd/date-picker/Index.svelte index 4d214c3b..24d3c167 100644 --- a/frontend/antd/date-picker/Index.svelte +++ b/frontend/antd/date-picker/Index.svelte @@ -41,6 +41,7 @@ elem_style, as_item, value, + restProps: $$restProps, }); const slots = getSlots(); @@ -54,6 +55,7 @@ elem_style, as_item, value, + restProps: $$restProps, }); const { presets } = getItems(['presets']); @@ -64,6 +66,7 @@ style={$mergedProps.elem_style} className={cls($mergedProps.elem_classes, 'ms-gr-antd-date-picker')} id={$mergedProps.elem_id} + {...$mergedProps.restProps} {...$mergedProps.props} {...bindEvents($mergedProps)} slots={$slots} diff --git a/frontend/antd/date-picker/preset/Index.svelte b/frontend/antd/date-picker/preset/Index.svelte index a623fa73..7c3ceed2 100644 --- a/frontend/antd/date-picker/preset/Index.svelte +++ b/frontend/antd/date-picker/preset/Index.svelte @@ -44,6 +44,7 @@ as_item, value, label, + restProps: $$restProps, }); const slots = getSlots(); $: update({ @@ -57,6 +58,7 @@ as_item, value, label, + restProps: $$restProps, }); const setItem = getSetItemFn(); @@ -70,6 +72,7 @@ id: $mergedProps.elem_id, label: $mergedProps.label, value: $mergedProps.value, + ...$mergedProps.restProps, ...$mergedProps.props, ...bindEvents($mergedProps), }, diff --git a/frontend/antd/date-picker/range-picker/Index.svelte b/frontend/antd/date-picker/range-picker/Index.svelte index 08582ba0..2e6025b8 100644 --- a/frontend/antd/date-picker/range-picker/Index.svelte +++ b/frontend/antd/date-picker/range-picker/Index.svelte @@ -43,6 +43,7 @@ elem_style, as_item, value, + restProps: $$restProps, }); const slots = getSlots(); @@ -56,6 +57,7 @@ elem_style, as_item, value, + restProps: $$restProps, }); const { presets } = getItems(['presets']); @@ -69,6 +71,7 @@ 'ms-gr-antd-date-picker-range-picker' )} id={$mergedProps.elem_id} + {...$mergedProps.restProps} {...$mergedProps.props} {...bindEvents($mergedProps)} slots={$slots} diff --git a/frontend/antd/descriptions/Index.svelte b/frontend/antd/descriptions/Index.svelte index c886c04d..fc1b327d 100644 --- a/frontend/antd/descriptions/Index.svelte +++ b/frontend/antd/descriptions/Index.svelte @@ -40,6 +40,7 @@ elem_style, as_item, title, + restProps: $$restProps, }); const slots = getSlots(); $: update({ @@ -52,6 +53,7 @@ elem_style, as_item, title, + restProps: $$restProps, }); const { items, default: children } = getItems(['default', 'items']); @@ -63,6 +65,7 @@ style={$mergedProps.elem_style} className={cls($mergedProps.elem_classes, 'ms-gr-antd-descriptions')} id={$mergedProps.elem_id} + {...$mergedProps.restProps} {...$mergedProps.props} {...bindEvents($mergedProps)} slots={$slots} diff --git a/frontend/antd/descriptions/item/Index.svelte b/frontend/antd/descriptions/item/Index.svelte index fb0e2db4..ecb77fed 100644 --- a/frontend/antd/descriptions/item/Index.svelte +++ b/frontend/antd/descriptions/item/Index.svelte @@ -43,6 +43,7 @@ elem_style, as_item, label, + restProps: $$restProps, }); const slots = getSlots(); $: update({ @@ -55,6 +56,7 @@ elem_style, as_item, label, + restProps: $$restProps, }); const setItem = getSetItemFn(); @@ -64,6 +66,7 @@ className: cls($mergedProps.elem_classes, 'ms-gr-antd-descriptions-item'), id: $mergedProps.elem_id, label: $mergedProps.label, + ...$mergedProps.restProps, ...$mergedProps.props, ...bindEvents($mergedProps), }, diff --git a/frontend/antd/divider/Index.svelte b/frontend/antd/divider/Index.svelte index 8dbe0d96..3d8a75d9 100644 --- a/frontend/antd/divider/Index.svelte +++ b/frontend/antd/divider/Index.svelte @@ -22,12 +22,6 @@ } = {}; export let value = ''; - export let dashed; - export let variant; - export let orientation; - export let orientation_margin; - export let plain; - export let type; export let as_item: string | undefined; // gradio properties export let visible = true; @@ -45,12 +39,7 @@ elem_classes, elem_style, as_item, - dashed, - variant, - orientation, - orientation_margin, - plain, - type, + restProps: $$restProps, }); const slots = getSlots(); $: update({ @@ -63,23 +52,14 @@ elem_classes, elem_style, as_item, - dashed, - variant, - orientation, - orientation_margin, - plain, - type, + restProps: $$restProps, }); $: passed_props = { style: $mergedProps.elem_style, className: cls($mergedProps.elem_classes, 'ms-gr-antd-divider'), id: $mergedProps.elem_id, - dashed: $mergedProps.dashed, - variant: $mergedProps.variant, - orientation: $mergedProps.orientation, - orientationMargin: $mergedProps.orientation_margin, - plain: $mergedProps.plain, - type: $mergedProps.type, + ...$mergedProps.restProps, + ...$mergedProps.restProps, ...$mergedProps.props, ...bindEvents($mergedProps), slots: $slots, diff --git a/frontend/antd/drawer/Index.svelte b/frontend/antd/drawer/Index.svelte index 858fd517..5bcef036 100644 --- a/frontend/antd/drawer/Index.svelte +++ b/frontend/antd/drawer/Index.svelte @@ -37,6 +37,7 @@ elem_classes, elem_style, as_item, + restProps: $$restProps, }); const slots = getSlots(); $: update({ @@ -48,6 +49,7 @@ elem_classes, elem_style, as_item, + restProps: $$restProps, }); @@ -57,6 +59,7 @@ style={$mergedProps.elem_style} className={cls($mergedProps.elem_classes, 'ms-gr-antd-drawer')} id={$mergedProps.elem_id} + {...$mergedProps.restProps} {...$mergedProps.props} {...bindEvents($mergedProps)} slots={$slots} diff --git a/frontend/antd/dropdown/Index.svelte b/frontend/antd/dropdown/Index.svelte index 02923eb2..0b9b3074 100644 --- a/frontend/antd/dropdown/Index.svelte +++ b/frontend/antd/dropdown/Index.svelte @@ -29,7 +29,6 @@ export let elem_id = ''; export let elem_classes: string[] = []; export let elem_style: React.CSSProperties = {}; - export let inner_elem_style: React.CSSProperties = {}; const [mergedProps, update] = getSlotContext({ gradio, props: $updatedProps, @@ -39,7 +38,7 @@ elem_classes, elem_style, as_item, - inner_elem_style, + restProps: $$restProps, }); const slots = getSlots(); $: update({ @@ -51,7 +50,7 @@ elem_classes, elem_style, as_item, - inner_elem_style, + restProps: $$restProps, }); const { 'menu.items': items } = getItems(['menu.items']); @@ -62,11 +61,11 @@ style={$mergedProps.elem_style} className={cls($mergedProps.elem_classes, 'ms-gr-antd-dropdown')} id={$mergedProps.elem_id} + {...$mergedProps.restProps} {...$mergedProps.props} {...bindEvents($mergedProps)} slots={$slots} menuItems={$items} - innerStyle={$mergedProps.inner_elem_style} > diff --git a/frontend/antd/dropdown/button/Index.svelte b/frontend/antd/dropdown/button/Index.svelte index 0035a606..ac281f91 100644 --- a/frontend/antd/dropdown/button/Index.svelte +++ b/frontend/antd/dropdown/button/Index.svelte @@ -43,6 +43,7 @@ elem_style, as_item, value, + restProps: $$restProps, }); const slots = getSlots(); $: update({ @@ -55,6 +56,7 @@ elem_style, as_item, value, + restProps: $$restProps, }); const { 'menu.items': items } = getItems(['menu.items']); @@ -65,6 +67,7 @@ style={$mergedProps.elem_style} className={cls($mergedProps.elem_classes, 'ms-gr-antd-dropdown-button')} id={$mergedProps.elem_id} + {...$mergedProps.restProps} {...$mergedProps.props} {...bindEvents($mergedProps)} slots={$slots} diff --git a/frontend/antd/empty/Index.svelte b/frontend/antd/empty/Index.svelte index da8d8ff0..521a0c6b 100644 --- a/frontend/antd/empty/Index.svelte +++ b/frontend/antd/empty/Index.svelte @@ -37,6 +37,7 @@ elem_classes, elem_style, as_item, + restProps: $$restProps, }); const slots = getSlots(); $: update({ @@ -48,6 +49,7 @@ elem_classes, elem_style, as_item, + restProps: $$restProps, }); @@ -57,6 +59,7 @@ style={$mergedProps.elem_style} className={cls($mergedProps.elem_classes, 'ms-gr-antd-empty')} id={$mergedProps.elem_id} + {...$mergedProps.restProps} {...$mergedProps.props} {...bindEvents($mergedProps)} slots={$slots} diff --git a/frontend/antd/flex/Index.svelte b/frontend/antd/flex/Index.svelte index a871f41d..76182e64 100644 --- a/frontend/antd/flex/Index.svelte +++ b/frontend/antd/flex/Index.svelte @@ -21,13 +21,6 @@ layout?: boolean; } = {}; - export let vertical; - export let wrap; - export let justify; - export let align; - export let flex; - export let gap; - export let component; export let as_item: string | undefined; // gradio properties export let visible = true; @@ -44,13 +37,7 @@ elem_classes, elem_style, as_item, - vertical, - wrap, - justify, - align, - flex, - gap, - component, + restProps: $$restProps, }); const slots = getSlots(); $: update({ @@ -62,13 +49,7 @@ elem_classes, elem_style, as_item, - vertical, - wrap, - justify, - align, - flex, - gap, - component, + restProps: $$restProps, }); @@ -78,13 +59,7 @@ style={$mergedProps.elem_style} className={cls($mergedProps.elem_classes, 'ms-gr-antd-flex')} id={$mergedProps.elem_id} - vertical={$mergedProps.vertical} - wrap={$mergedProps.wrap} - justify={$mergedProps.justify} - align={$mergedProps.align} - flex={$mergedProps.flex} - gap={$mergedProps.gap} - component={$mergedProps.component} + {...$mergedProps.restProps} {...$mergedProps.props} {...bindEvents($mergedProps)} slots={$slots} diff --git a/frontend/antd/float-button/Index.svelte b/frontend/antd/float-button/Index.svelte index c81a7dee..b923538c 100644 --- a/frontend/antd/float-button/Index.svelte +++ b/frontend/antd/float-button/Index.svelte @@ -37,6 +37,7 @@ elem_classes, elem_style, as_item, + restProps: $$restProps, }); const slots = getSlots(); $: update({ @@ -48,6 +49,7 @@ elem_classes, elem_style, as_item, + restProps: $$restProps, }); @@ -57,6 +59,7 @@ style={$mergedProps.elem_style} className={cls($mergedProps.elem_classes, 'ms-gr-antd-float-button')} id={$mergedProps.elem_id} + {...$mergedProps.restProps} {...$mergedProps.props} {...bindEvents($mergedProps)} slots={$slots} diff --git a/frontend/antd/float-button/back-top/Index.svelte b/frontend/antd/float-button/back-top/Index.svelte index 56d94c6c..317122da 100644 --- a/frontend/antd/float-button/back-top/Index.svelte +++ b/frontend/antd/float-button/back-top/Index.svelte @@ -30,16 +30,22 @@ export let elem_classes: string[] = []; export let elem_style: React.CSSProperties = {}; - const [mergedProps, update] = getSlotContext({ - gradio, - props: $updatedProps, - _internal, - visible, - elem_id, - elem_classes, - elem_style, - as_item, - }); + const [mergedProps, update] = getSlotContext( + { + gradio, + props: $updatedProps, + _internal, + visible, + elem_id, + elem_classes, + elem_style, + as_item, + restProps: $$restProps, + }, + { + elem_target: 'target', + } + ); const slots = getSlots(); $: update({ gradio, @@ -50,6 +56,7 @@ elem_classes, elem_style, as_item, + restProps: $$restProps, }); @@ -62,6 +69,7 @@ 'ms-gr-antd-float-button-back-top' )} id={$mergedProps.elem_id} + {...$mergedProps.restProps} {...$mergedProps.props} {...bindEvents($mergedProps)} slots={$slots} diff --git a/frontend/antd/float-button/group/Index.svelte b/frontend/antd/float-button/group/Index.svelte index ef94fa6b..6880726d 100644 --- a/frontend/antd/float-button/group/Index.svelte +++ b/frontend/antd/float-button/group/Index.svelte @@ -39,6 +39,7 @@ elem_classes, elem_style, as_item, + restProps: $$restProps, }); const slots = getSlots(); $: update({ @@ -50,6 +51,7 @@ elem_classes, elem_style, as_item, + restProps: $$restProps, }); @@ -62,6 +64,7 @@ 'ms-gr-antd-float-button-group' )} id={$mergedProps.elem_id} + {...$mergedProps.restProps} {...$mergedProps.props} {...bindEvents($mergedProps)} slots={$slots} diff --git a/frontend/antd/form/Index.svelte b/frontend/antd/form/Index.svelte index 6f52e9cc..169ae42b 100644 --- a/frontend/antd/form/Index.svelte +++ b/frontend/antd/form/Index.svelte @@ -38,6 +38,7 @@ elem_style, as_item, value, + restProps: $$restProps, }); const slots = getSlots(); $: update({ @@ -50,6 +51,7 @@ elem_style, as_item, value, + restProps: $$restProps, }); @@ -59,6 +61,7 @@ style={$mergedProps.elem_style} className={cls($mergedProps.elem_classes, 'ms-gr-antd-form')} id={$mergedProps.elem_id} + {...$mergedProps.restProps} {...$mergedProps.props} {...bindEvents($mergedProps)} slots={$slots} diff --git a/frontend/antd/form/item/Index.svelte b/frontend/antd/form/item/Index.svelte index 5a778338..7c069f4d 100644 --- a/frontend/antd/form/item/Index.svelte +++ b/frontend/antd/form/item/Index.svelte @@ -21,8 +21,6 @@ export let _internal: { layout?: boolean; } = {}; - export let label: string; - export let form_name: string | number | (string | number)[]; export let as_item: string | undefined; // gradio properties export let visible = true; @@ -30,18 +28,22 @@ export let elem_classes: string[] = []; export let elem_style: React.CSSProperties = {}; - const [mergedProps, update] = getSlotContext({ - gradio, - props: $updatedProps, - _internal, - visible, - elem_id, - elem_classes, - elem_style, - as_item, - label, - form_name, - }); + const [mergedProps, update] = getSlotContext( + { + gradio, + props: $updatedProps, + _internal, + visible, + elem_id, + elem_classes, + elem_style, + as_item, + restProps: $$restProps, + }, + { + form_name: 'name', + } + ); const slots = getSlots(); $: update({ gradio, @@ -52,8 +54,7 @@ elem_classes, elem_style, as_item, - label, - form_name, + restProps: $$restProps, }); const { rules: ruleItems } = getRuleItems(['rules']); @@ -64,10 +65,9 @@ style={$mergedProps.elem_style} className={cls($mergedProps.elem_classes, 'ms-gr-antd-form-item')} id={$mergedProps.elem_id} + {...$mergedProps.restProps} {...$mergedProps.props} {...bindEvents($mergedProps)} - name={$mergedProps.props.name ?? $mergedProps.form_name} - label={$mergedProps.props.label ?? $mergedProps.label} slots={$slots} ruleItems={$ruleItems} > diff --git a/frontend/antd/form/item/rule/Index.svelte b/frontend/antd/form/item/rule/Index.svelte index 9e3451c3..8741bb79 100644 --- a/frontend/antd/form/item/rule/Index.svelte +++ b/frontend/antd/form/item/rule/Index.svelte @@ -37,6 +37,7 @@ elem_classes, elem_style, as_item, + restProps: $$restProps, }); $: update({ gradio, @@ -47,10 +48,12 @@ elem_classes, elem_style, as_item, + restProps: $$restProps, }); const setRuleItem = getSetRuleItemFn(); $: setRuleItem($slotKey, $mergedProps._internal.index || 0, { props: { + ...$mergedProps.restProps, ...$mergedProps.props, ...bindEvents($mergedProps), transform: createFunction($mergedProps.props.transform), diff --git a/frontend/antd/grid/col/Index.svelte b/frontend/antd/grid/col/Index.svelte index 55629c7d..d99f78a2 100644 --- a/frontend/antd/grid/col/Index.svelte +++ b/frontend/antd/grid/col/Index.svelte @@ -19,18 +19,6 @@ index?: number; } = {}; - export let flex; - export let offset; - export let order; - export let pull; - export let push; - export let span; - export let xs; - export let sm; - export let md; - export let lg; - export let xl; - export let xxl; export let as_item: string | undefined; // gradio properties export let visible = true; @@ -47,18 +35,7 @@ elem_classes, elem_style, as_item, - flex, - offset, - order, - pull, - push, - span, - xs, - sm, - md, - lg, - xl, - xxl, + restProps: $$restProps, }); $: update({ @@ -70,18 +47,7 @@ elem_classes, elem_style, as_item, - flex, - offset, - order, - pull, - push, - span, - xs, - sm, - md, - lg, - xl, - xxl, + restProps: $$restProps, }); const slot: Writable = writable(); @@ -94,18 +60,8 @@ style: $mergedProps.elem_style, className: cls($mergedProps.elem_classes, 'ms-gr-antd-col'), id: $mergedProps.elem_id, - flex: $mergedProps.flex, - offset: $mergedProps.offset, - order: $mergedProps.order, - pull: $mergedProps.pull, - push: $mergedProps.push, - span: $mergedProps.span, - xs: $mergedProps.xs, - sm: $mergedProps.sm, - md: $mergedProps.md, - lg: $mergedProps.lg, - xl: $mergedProps.xl, - xxl: $mergedProps.xxl, + ...$mergedProps.restProps, + ...$mergedProps.restProps, ...$mergedProps.props, ...bindEvents($mergedProps), }, diff --git a/frontend/antd/grid/row/Index.svelte b/frontend/antd/grid/row/Index.svelte index 7a5d55bf..2afd7575 100644 --- a/frontend/antd/grid/row/Index.svelte +++ b/frontend/antd/grid/row/Index.svelte @@ -23,10 +23,6 @@ layout?: boolean; } = {}; - export let align; - export let gutter; - export let justify; - export let wrap; export let as_item: string | undefined; // gradio properties export let visible = true; @@ -43,10 +39,7 @@ elem_classes, elem_style, as_item, - align, - gutter, - justify, - wrap, + restProps: $$restProps, }); const slots = getSlots(); $: update({ @@ -58,10 +51,7 @@ elem_classes, elem_style, as_item, - align, - gutter, - justify, - wrap, + restProps: $$restProps, }); const { default: cols } = getItems(); @@ -72,10 +62,7 @@ style={$mergedProps.elem_style} className={cls($mergedProps.elem_classes, 'ms-gr-antd-row')} id={$mergedProps.elem_id} - align={$mergedProps.align} - gutter={$mergedProps.gutter} - justify={$mergedProps.justify} - wrap={$mergedProps.wrap} + {...$mergedProps.restProps} {...$mergedProps.props} {...bindEvents($mergedProps)} slots={$slots} diff --git a/frontend/antd/icon/Index.svelte b/frontend/antd/icon/Index.svelte index a8807561..72bb08e2 100644 --- a/frontend/antd/icon/Index.svelte +++ b/frontend/antd/icon/Index.svelte @@ -42,6 +42,7 @@ elem_classes, elem_style, as_item, + restProps: $$restProps, }); const slots = getSlots(); @@ -55,6 +56,7 @@ elem_classes, elem_style, as_item, + restProps: $$restProps, }); @@ -64,6 +66,7 @@ style={$mergedProps.elem_style} className={cls($mergedProps.elem_classes, 'ms-gr-antd-icon')} id={$mergedProps.elem_id} + {...$mergedProps.restProps} {...$mergedProps.props} {...bindEvents($mergedProps)} slots={$slots} diff --git a/frontend/antd/icon/iconfont-provider/Index.svelte b/frontend/antd/icon/iconfont-provider/Index.svelte index b5f98d70..502b8321 100644 --- a/frontend/antd/icon/iconfont-provider/Index.svelte +++ b/frontend/antd/icon/iconfont-provider/Index.svelte @@ -11,7 +11,6 @@ $: updatedProps.update((prev) => ({ ...prev, ...props })); export let _internal: Record = {}; - export let script_url: string | string[] = ''; export let as_item: string | undefined; // gradio properties export let visible = true; @@ -19,21 +18,21 @@ const [mergedProps, update] = getSlotContext({ props: $updatedProps, _internal, - script_url, visible, as_item, + restProps: $$restProps, }); $: update({ props: $updatedProps, _internal, - script_url, visible, as_item, + restProps: $$restProps, }); const options = setIconfontContext(); $: { const newOptions = { - scriptUrl: $mergedProps.script_url, + ...$mergedProps.restProps, ...$mergedProps.props, }; options.update((prev) => { diff --git a/frontend/antd/image/Index.svelte b/frontend/antd/image/Index.svelte index bb411f66..5407df15 100644 --- a/frontend/antd/image/Index.svelte +++ b/frontend/antd/image/Index.svelte @@ -39,6 +39,7 @@ elem_style, as_item, src, + restProps: $$restProps, }); const slots = getSlots(); $: update({ @@ -51,6 +52,7 @@ elem_style, as_item, src, + restProps: $$restProps, }); @@ -60,6 +62,7 @@ style={$mergedProps.elem_style} className={cls($mergedProps.elem_classes, 'ms-gr-antd-image')} id={$mergedProps.elem_id} + {...$mergedProps.restProps} {...$mergedProps.props} {...bindEvents($mergedProps)} slots={$slots} diff --git a/frontend/antd/image/preview-group/Index.svelte b/frontend/antd/image/preview-group/Index.svelte index 6519b11a..489df6c2 100644 --- a/frontend/antd/image/preview-group/Index.svelte +++ b/frontend/antd/image/preview-group/Index.svelte @@ -40,6 +40,7 @@ elem_style, as_item, items, + restProps: $$restProps, }); const slots = getSlots(); $: update({ @@ -52,6 +53,7 @@ elem_style, as_item, items, + restProps: $$restProps, }); @@ -65,6 +67,7 @@ 'ms-gr-antd-image-preview-group' )} id={$mergedProps.elem_id} + {...$mergedProps.restProps} {...$mergedProps.props} {...bindEvents($mergedProps)} slots={$slots} diff --git a/frontend/antd/input-number/Index.svelte b/frontend/antd/input-number/Index.svelte index 5cffbea1..865ed457 100644 --- a/frontend/antd/input-number/Index.svelte +++ b/frontend/antd/input-number/Index.svelte @@ -38,6 +38,7 @@ elem_style, as_item, value, + restProps: $$restProps, }); const slots = getSlots(); $: update({ @@ -50,6 +51,7 @@ elem_style, as_item, value, + restProps: $$restProps, }); @@ -59,6 +61,7 @@ style={$mergedProps.elem_style} className={cls($mergedProps.elem_classes, 'ms-gr-antd-input-number')} id={$mergedProps.elem_id} + {...$mergedProps.restProps} {...$mergedProps.props} {...bindEvents($mergedProps)} value={$mergedProps.props.value ?? $mergedProps.value} diff --git a/frontend/antd/input/Index.svelte b/frontend/antd/input/Index.svelte index 39d906f7..a30c3623 100644 --- a/frontend/antd/input/Index.svelte +++ b/frontend/antd/input/Index.svelte @@ -38,6 +38,7 @@ elem_style, as_item, value, + restProps: $$restProps, }); const slots = getSlots(); $: update({ @@ -50,6 +51,7 @@ elem_style, as_item, value, + restProps: $$restProps, }); @@ -59,6 +61,7 @@ style={$mergedProps.elem_style} className={cls($mergedProps.elem_classes, 'ms-gr-antd-input')} id={$mergedProps.elem_id} + {...$mergedProps.restProps} {...$mergedProps.props} {...bindEvents($mergedProps)} value={$mergedProps.props.value ?? $mergedProps.value} diff --git a/frontend/antd/input/otp/Index.svelte b/frontend/antd/input/otp/Index.svelte index 5dd2e0c5..e5e27321 100644 --- a/frontend/antd/input/otp/Index.svelte +++ b/frontend/antd/input/otp/Index.svelte @@ -38,6 +38,7 @@ elem_style, as_item, value, + restProps: $$restProps, }); const slots = getSlots(); $: update({ @@ -50,6 +51,7 @@ elem_style, as_item, value, + restProps: $$restProps, }); @@ -59,6 +61,7 @@ style={$mergedProps.elem_style} className={cls($mergedProps.elem_classes, 'ms-gr-antd-input-otp')} id={$mergedProps.elem_id} + {...$mergedProps.restProps} {...$mergedProps.props} {...bindEvents($mergedProps)} value={$mergedProps.props.value ?? $mergedProps.value} diff --git a/frontend/antd/input/password/Index.svelte b/frontend/antd/input/password/Index.svelte index 9e808122..e50222d4 100644 --- a/frontend/antd/input/password/Index.svelte +++ b/frontend/antd/input/password/Index.svelte @@ -40,6 +40,7 @@ elem_style, as_item, value, + restProps: $$restProps, }); const slots = getSlots(); $: update({ @@ -52,6 +53,7 @@ elem_style, as_item, value, + restProps: $$restProps, }); @@ -61,6 +63,7 @@ style={$mergedProps.elem_style} className={cls($mergedProps.elem_classes, 'ms-gr-antd-input-password')} id={$mergedProps.elem_id} + {...$mergedProps.restProps} {...$mergedProps.props} {...bindEvents($mergedProps)} value={$mergedProps.props.value ?? $mergedProps.value} diff --git a/frontend/antd/input/search/Index.svelte b/frontend/antd/input/search/Index.svelte index dfd69468..30984550 100644 --- a/frontend/antd/input/search/Index.svelte +++ b/frontend/antd/input/search/Index.svelte @@ -38,6 +38,7 @@ elem_style, as_item, value, + restProps: $$restProps, }); const slots = getSlots(); $: update({ @@ -50,6 +51,7 @@ elem_style, as_item, value, + restProps: $$restProps, }); @@ -59,6 +61,7 @@ style={$mergedProps.elem_style} className={cls($mergedProps.elem_classes, 'ms-gr-antd-input-search')} id={$mergedProps.elem_id} + {...$mergedProps.restProps} {...$mergedProps.props} {...bindEvents($mergedProps)} value={$mergedProps.props.value ?? $mergedProps.value} diff --git a/frontend/antd/input/textarea/Index.svelte b/frontend/antd/input/textarea/Index.svelte index 79ed21e2..e174f66d 100644 --- a/frontend/antd/input/textarea/Index.svelte +++ b/frontend/antd/input/textarea/Index.svelte @@ -40,6 +40,7 @@ elem_style, as_item, value, + restProps: $$restProps, }); const slots = getSlots(); $: update({ @@ -52,6 +53,7 @@ elem_style, as_item, value, + restProps: $$restProps, }); @@ -61,6 +63,7 @@ style={$mergedProps.elem_style} className={cls($mergedProps.elem_classes, 'ms-gr-antd-input-textarea')} id={$mergedProps.elem_id} + {...$mergedProps.restProps} {...$mergedProps.props} {...bindEvents($mergedProps)} value={$mergedProps.props.value ?? $mergedProps.value} diff --git a/frontend/antd/layout/Base.svelte b/frontend/antd/layout/Base.svelte index 51eb1f27..c4eab932 100644 --- a/frontend/antd/layout/Base.svelte +++ b/frontend/antd/layout/Base.svelte @@ -37,6 +37,7 @@ elem_classes, elem_style, as_item, + restProps: $$restProps, }); const slots = getSlots(); $: update({ @@ -48,6 +49,7 @@ elem_classes, elem_style, as_item, + restProps: $$restProps, }); @@ -58,6 +60,7 @@ style={$mergedProps.elem_style} className={cls($mergedProps.elem_classes)} id={$mergedProps.elem_id} + {...$mergedProps.restProps} {...$mergedProps.props} {...bindEvents($mergedProps)} slots={$slots} diff --git a/frontend/antd/layout/sider/Index.svelte b/frontend/antd/layout/sider/Index.svelte index e943e83c..ad309d83 100644 --- a/frontend/antd/layout/sider/Index.svelte +++ b/frontend/antd/layout/sider/Index.svelte @@ -37,6 +37,7 @@ elem_classes, elem_style, as_item, + restProps: $$restProps, }); const slots = getSlots(); $: update({ @@ -48,6 +49,7 @@ elem_classes, elem_style, as_item, + restProps: $$restProps, }); @@ -58,6 +60,7 @@ style={$mergedProps.elem_style} className={cls($mergedProps.elem_classes, 'ms-gr-antd-layout-sider')} id={$mergedProps.elem_id} + {...$mergedProps.restProps} {...$mergedProps.props} {...bindEvents($mergedProps)} slots={$slots} diff --git a/frontend/antd/list/Index.svelte b/frontend/antd/list/Index.svelte index 8f8c44c5..eccf59f5 100644 --- a/frontend/antd/list/Index.svelte +++ b/frontend/antd/list/Index.svelte @@ -35,6 +35,7 @@ elem_classes, elem_style, as_item, + restProps: $$restProps, }); const slots = getSlots(); @@ -47,6 +48,7 @@ elem_classes, elem_style, as_item, + restProps: $$restProps, }); @@ -57,6 +59,7 @@ style={$mergedProps.elem_style} className={cls($mergedProps.elem_classes, 'ms-gr-antd-list')} id={$mergedProps.elem_id} + {...$mergedProps.restProps} {...$mergedProps.props} {...bindEvents($mergedProps)} slots={$slots} diff --git a/frontend/antd/list/item/Index.svelte b/frontend/antd/list/item/Index.svelte index c401f1f6..94ff9edd 100644 --- a/frontend/antd/list/item/Index.svelte +++ b/frontend/antd/list/item/Index.svelte @@ -32,6 +32,7 @@ elem_id, elem_classes, elem_style, + restProps: $$restProps, }); const slots = getSlots(); $: update({ @@ -43,6 +44,7 @@ elem_id, elem_classes, elem_style, + restProps: $$restProps, }); @@ -52,6 +54,7 @@ style={$mergedProps.elem_style} className={cls($mergedProps.elem_classes, 'ms-gr-antd-list-item')} id={$mergedProps.elem_id} + {...$mergedProps.restProps} {...$mergedProps.props} {...bindEvents($mergedProps)} slots={$slots} diff --git a/frontend/antd/list/item/meta/Index.svelte b/frontend/antd/list/item/meta/Index.svelte index 27a97b09..6f86bc1d 100644 --- a/frontend/antd/list/item/meta/Index.svelte +++ b/frontend/antd/list/item/meta/Index.svelte @@ -32,6 +32,7 @@ elem_id, elem_classes, elem_style, + restProps: $$restProps, }); const slots = getSlots(); $: update({ @@ -43,6 +44,7 @@ elem_id, elem_classes, elem_style, + restProps: $$restProps, }); @@ -52,6 +54,7 @@ style={$mergedProps.elem_style} className={cls($mergedProps.elem_classes, 'ms-gr-antd-list-item-meta')} id={$mergedProps.elem_id} + {...$mergedProps.restProps} {...$mergedProps.props} {...bindEvents($mergedProps)} slots={$slots} diff --git a/frontend/antd/mentions/Index.svelte b/frontend/antd/mentions/Index.svelte index c0960c22..4e19a876 100644 --- a/frontend/antd/mentions/Index.svelte +++ b/frontend/antd/mentions/Index.svelte @@ -40,6 +40,7 @@ elem_style, as_item, value, + restProps: $$restProps, }); const slots = getSlots(); $: update({ @@ -52,6 +53,7 @@ elem_style, as_item, value, + restProps: $$restProps, }); const { options, default: children } = getItems(['options', 'default']); @@ -62,6 +64,7 @@ style={$mergedProps.elem_style} className={cls($mergedProps.elem_classes, 'ms-gr-antd-mentions')} id={$mergedProps.elem_id} + {...$mergedProps.restProps} {...$mergedProps.props} {...bindEvents($mergedProps)} value={$mergedProps.props.value ?? $mergedProps.value} diff --git a/frontend/antd/mentions/option/Index.svelte b/frontend/antd/mentions/option/Index.svelte index 53c14809..0683c8b0 100644 --- a/frontend/antd/mentions/option/Index.svelte +++ b/frontend/antd/mentions/option/Index.svelte @@ -48,6 +48,7 @@ disabled, key, label, + restProps: $$restProps, }); const slots = getSlots(); $: update({ @@ -63,6 +64,7 @@ disabled, key, label, + restProps: $$restProps, }); const setItem = getSetItemFn(); const { default: items, options } = getItems(['default', 'options']); @@ -76,6 +78,7 @@ label: $mergedProps.label, disabled: $mergedProps.disabled, key: $mergedProps.key, + ...$mergedProps.restProps, ...$mergedProps.props, ...bindEvents($mergedProps), }, diff --git a/frontend/antd/menu/Index.svelte b/frontend/antd/menu/Index.svelte index 21bea1d4..1248ce2c 100644 --- a/frontend/antd/menu/Index.svelte +++ b/frontend/antd/menu/Index.svelte @@ -43,6 +43,7 @@ elem_style, as_item, value, + restProps: $$restProps, }); const slots = getSlots(); $: update({ @@ -55,6 +56,7 @@ elem_style, as_item, value, + restProps: $$restProps, }); const { items, default: children } = getItems(['default', 'items']); @@ -66,6 +68,7 @@ style={$mergedProps.elem_style} className={cls($mergedProps.elem_classes, 'ms-gr-antd-menu')} id={$mergedProps.elem_id} + {...$mergedProps.restProps} {...$mergedProps.props} {...bindEvents($mergedProps)} slots={$slots} diff --git a/frontend/antd/menu/item/Index.svelte b/frontend/antd/menu/item/Index.svelte index 8c3d4f29..17ca1dae 100644 --- a/frontend/antd/menu/item/Index.svelte +++ b/frontend/antd/menu/item/Index.svelte @@ -43,6 +43,7 @@ elem_style, as_item, label, + restProps: $$restProps, }); const slots = getSlots(); $: update({ @@ -55,6 +56,7 @@ elem_style, as_item, label, + restProps: $$restProps, }); const setItem = getSetItemFn(); const { default: items } = getItems(); @@ -70,6 +72,7 @@ ), id: $mergedProps.elem_id, label: $mergedProps.label, + ...$mergedProps.restProps, ...$mergedProps.props, ...bindEvents($mergedProps), }, diff --git a/frontend/antd/message/Index.svelte b/frontend/antd/message/Index.svelte index d4be934d..00777e64 100644 --- a/frontend/antd/message/Index.svelte +++ b/frontend/antd/message/Index.svelte @@ -39,6 +39,7 @@ elem_classes, elem_style, as_item, + restProps: $$restProps, }); const slots = getSlots(); @@ -52,6 +53,7 @@ elem_classes, elem_style, as_item, + restProps: $$restProps, }); @@ -60,6 +62,7 @@ style={$mergedProps.elem_style} className={cls($mergedProps.elem_classes, 'ms-gr-antd-message')} id={$mergedProps.elem_id} + {...$mergedProps.restProps} {...$mergedProps.props} {...bindEvents($mergedProps)} content={$mergedProps.props.content || $mergedProps.content} diff --git a/frontend/antd/modal/Index.svelte b/frontend/antd/modal/Index.svelte index 29ed29c8..51231885 100644 --- a/frontend/antd/modal/Index.svelte +++ b/frontend/antd/modal/Index.svelte @@ -37,6 +37,7 @@ elem_classes, elem_style, as_item, + restProps: $$restProps, }); const slots = getSlots(); $: update({ @@ -48,6 +49,7 @@ elem_classes, elem_style, as_item, + restProps: $$restProps, }); @@ -57,6 +59,7 @@ style={$mergedProps.elem_style} className={cls($mergedProps.elem_classes, 'ms-gr-antd-modal')} id={$mergedProps.elem_id} + {...$mergedProps.restProps} {...$mergedProps.props} {...bindEvents($mergedProps)} slots={$slots} diff --git a/frontend/antd/notification/Index.svelte b/frontend/antd/notification/Index.svelte index a69c1e4b..c453d175 100644 --- a/frontend/antd/notification/Index.svelte +++ b/frontend/antd/notification/Index.svelte @@ -39,6 +39,7 @@ elem_classes, elem_style, as_item, + restProps: $$restProps, }); const slots = getSlots(); @@ -52,6 +53,7 @@ elem_classes, elem_style, as_item, + restProps: $$restProps, }); @@ -60,6 +62,7 @@ style={$mergedProps.elem_style} className={cls($mergedProps.elem_classes, 'ms-gr-antd-notification')} id={$mergedProps.elem_id} + {...$mergedProps.restProps} {...$mergedProps.props} {...bindEvents($mergedProps)} message={$mergedProps.props.message || $mergedProps.message} diff --git a/frontend/antd/pagination/Index.svelte b/frontend/antd/pagination/Index.svelte index 87e8eb28..0297c989 100644 --- a/frontend/antd/pagination/Index.svelte +++ b/frontend/antd/pagination/Index.svelte @@ -40,6 +40,7 @@ elem_style, as_item, value, + restProps: $$restProps, }); const slots = getSlots(); @@ -53,6 +54,7 @@ elem_style, as_item, value, + restProps: $$restProps, }); @@ -63,6 +65,7 @@ style={$mergedProps.elem_style} className={cls($mergedProps.elem_classes, 'ms-gr-antd-pagination')} id={$mergedProps.elem_id} + {...$mergedProps.restProps} {...$mergedProps.props} {...bindEvents($mergedProps)} slots={$slots} diff --git a/frontend/antd/popconfirm/Index.svelte b/frontend/antd/popconfirm/Index.svelte index 4daa63f2..52dc8ad4 100644 --- a/frontend/antd/popconfirm/Index.svelte +++ b/frontend/antd/popconfirm/Index.svelte @@ -38,6 +38,7 @@ elem_style, as_item, title, + restProps: $$restProps, }); const slots = getSlots(); $: update({ @@ -50,6 +51,7 @@ elem_style, as_item, title, + restProps: $$restProps, }); @@ -59,6 +61,7 @@ style={$mergedProps.elem_style} className={cls($mergedProps.elem_classes, 'ms-gr-antd-popconfirm')} id={$mergedProps.elem_id} + {...$mergedProps.restProps} {...$mergedProps.props} {...bindEvents($mergedProps)} slots={$slots} diff --git a/frontend/antd/popover/Index.svelte b/frontend/antd/popover/Index.svelte index 86bc38da..1ca93eb0 100644 --- a/frontend/antd/popover/Index.svelte +++ b/frontend/antd/popover/Index.svelte @@ -37,6 +37,7 @@ elem_style, as_item, content, + restProps: $$restProps, }); const slots = getSlots(); $: update({ @@ -49,6 +50,7 @@ elem_style, as_item, content, + restProps: $$restProps, }); @@ -58,6 +60,7 @@ style={$mergedProps.elem_style} className={cls($mergedProps.elem_classes, 'ms-gr-antd-popover')} id={$mergedProps.elem_id} + {...$mergedProps.restProps} {...$mergedProps.props} {...bindEvents($mergedProps)} slots={$slots} diff --git a/frontend/antd/progress/Index.svelte b/frontend/antd/progress/Index.svelte index 38ce000d..e0e8c4a9 100644 --- a/frontend/antd/progress/Index.svelte +++ b/frontend/antd/progress/Index.svelte @@ -39,6 +39,7 @@ elem_classes, elem_style, as_item, + restProps: $$restProps, }); const slots = getSlots(); @@ -52,6 +53,7 @@ elem_classes, elem_style, as_item, + restProps: $$restProps, }); @@ -61,6 +63,7 @@ style={$mergedProps.elem_style} className={cls($mergedProps.elem_classes, 'ms-gr-antd-progress')} id={$mergedProps.elem_id} + {...$mergedProps.restProps} {...$mergedProps.props} {...bindEvents($mergedProps)} slots={$slots} diff --git a/frontend/antd/qr-code/Index.svelte b/frontend/antd/qr-code/Index.svelte index 3b205e3a..ef43c92c 100644 --- a/frontend/antd/qr-code/Index.svelte +++ b/frontend/antd/qr-code/Index.svelte @@ -39,6 +39,7 @@ elem_classes, elem_style, as_item, + restProps: $$restProps, }); const slots = getSlots(); @@ -52,6 +53,7 @@ elem_classes, elem_style, as_item, + restProps: $$restProps, }); @@ -61,6 +63,7 @@ style={$mergedProps.elem_style} className={cls($mergedProps.elem_classes, 'ms-gr-antd-qr-code')} id={$mergedProps.elem_id} + {...$mergedProps.restProps} {...$mergedProps.props} {...bindEvents($mergedProps)} slots={$slots} diff --git a/frontend/antd/radio/Index.svelte b/frontend/antd/radio/Index.svelte index 03a6db7a..bd27c2f8 100644 --- a/frontend/antd/radio/Index.svelte +++ b/frontend/antd/radio/Index.svelte @@ -46,6 +46,7 @@ group_value, default_checked, disabled, + restProps: $$restProps, }); const slots = getSlots(); $: update({ @@ -62,6 +63,7 @@ group_value, default_checked, disabled, + restProps: $$restProps, }); @@ -73,6 +75,7 @@ id={$mergedProps.elem_id} checked={$mergedProps.value} value={$mergedProps.group_value} + {...$mergedProps.restProps} {...$mergedProps.props} {...bindEvents($mergedProps)} slots={$slots} diff --git a/frontend/antd/radio/button/Index.svelte b/frontend/antd/radio/button/Index.svelte index 21ee337f..4ed60edc 100644 --- a/frontend/antd/radio/button/Index.svelte +++ b/frontend/antd/radio/button/Index.svelte @@ -46,6 +46,7 @@ group_value, default_checked, disabled, + restProps: $$restProps, }); const slots = getSlots(); $: update({ @@ -62,6 +63,7 @@ group_value, default_checked, disabled, + restProps: $$restProps, }); @@ -73,6 +75,7 @@ id={$mergedProps.elem_id} checked={$mergedProps.value} value={$mergedProps.group_value} + {...$mergedProps.restProps} {...$mergedProps.props} {...bindEvents($mergedProps)} slots={$slots} diff --git a/frontend/antd/radio/group/Index.svelte b/frontend/antd/radio/group/Index.svelte index 05efeaea..dde3a0a6 100644 --- a/frontend/antd/radio/group/Index.svelte +++ b/frontend/antd/radio/group/Index.svelte @@ -40,6 +40,7 @@ elem_style, as_item, value, + restProps: $$restProps, }); const slots = getSlots(); $: update({ @@ -52,6 +53,7 @@ elem_style, as_item, value, + restProps: $$restProps, }); const { options } = getItems(['options']); @@ -62,6 +64,7 @@ style={$mergedProps.elem_style} className={cls($mergedProps.elem_classes, 'ms-gr-antd-radio-group')} id={$mergedProps.elem_id} + {...$mergedProps.restProps} {...$mergedProps.props} {...bindEvents($mergedProps)} value={$mergedProps.props.value ?? $mergedProps.value} diff --git a/frontend/antd/radio/group/option/Index.svelte b/frontend/antd/radio/group/option/Index.svelte index d796b37c..fa600c81 100644 --- a/frontend/antd/radio/group/option/Index.svelte +++ b/frontend/antd/radio/group/option/Index.svelte @@ -50,6 +50,7 @@ disabled, title, required, + restProps: $$restProps, }); const slots = getSlots(); $: update({ @@ -66,6 +67,7 @@ disabled, title, required, + restProps: $$restProps, }); const setItem = getSetItemFn(); @@ -82,6 +84,7 @@ disabled: $mergedProps.disabled, title: $mergedProps.title, required: $mergedProps.required, + ...$mergedProps.restProps, ...$mergedProps.props, ...bindEvents($mergedProps), }, diff --git a/frontend/antd/rate/Index.svelte b/frontend/antd/rate/Index.svelte index a21646e6..aaef6a13 100644 --- a/frontend/antd/rate/Index.svelte +++ b/frontend/antd/rate/Index.svelte @@ -38,6 +38,7 @@ elem_style, as_item, value, + restProps: $$restProps, }); const slots = getSlots(); $: update({ @@ -50,6 +51,7 @@ elem_style, as_item, value, + restProps: $$restProps, }); @@ -60,6 +62,7 @@ className={cls($mergedProps.elem_classes, 'ms-gr-antd-rate')} id={$mergedProps.elem_id} value={$mergedProps.value} + {...$mergedProps.restProps} {...$mergedProps.props} {...bindEvents($mergedProps)} slots={$slots} diff --git a/frontend/antd/result/Index.svelte b/frontend/antd/result/Index.svelte index bbb63de6..5f28ee14 100644 --- a/frontend/antd/result/Index.svelte +++ b/frontend/antd/result/Index.svelte @@ -35,6 +35,7 @@ elem_classes, elem_style, as_item, + restProps: $$restProps, }); const slots = getSlots(); @@ -47,6 +48,7 @@ elem_classes, elem_style, as_item, + restProps: $$restProps, }); @@ -57,6 +59,7 @@ style={$mergedProps.elem_style} className={cls($mergedProps.elem_classes, 'ms-gr-antd-result')} id={$mergedProps.elem_id} + {...$mergedProps.restProps} {...$mergedProps.props} {...bindEvents($mergedProps)} slots={$slots} diff --git a/frontend/antd/segmented/Index.svelte b/frontend/antd/segmented/Index.svelte index 6217cc75..7a66bcc9 100644 --- a/frontend/antd/segmented/Index.svelte +++ b/frontend/antd/segmented/Index.svelte @@ -41,6 +41,7 @@ elem_style, as_item, value, + restProps: $$restProps, }); const slots = getSlots(); @@ -54,6 +55,7 @@ elem_style, as_item, value, + restProps: $$restProps, }); const { options, default: children } = getItems(['options', 'default']); @@ -64,6 +66,7 @@ style={$mergedProps.elem_style} className={cls($mergedProps.elem_classes, 'ms-gr-antd-segmented')} id={$mergedProps.elem_id} + {...$mergedProps.restProps} {...$mergedProps.props} {...bindEvents($mergedProps)} value={$mergedProps.props.value ?? $mergedProps.value} diff --git a/frontend/antd/segmented/option/Index.svelte b/frontend/antd/segmented/option/Index.svelte index d178dade..c37794b4 100644 --- a/frontend/antd/segmented/option/Index.svelte +++ b/frontend/antd/segmented/option/Index.svelte @@ -43,6 +43,7 @@ elem_style, as_item, value, + restProps: $$restProps, }); const slots = getSlots(); $: update({ @@ -55,6 +56,7 @@ elem_style, as_item, value, + restProps: $$restProps, }); const setItem = getSetItemFn(); $: setItem($slotKey, $mergedProps._internal.index || 0, { @@ -63,6 +65,7 @@ className: cls($mergedProps.elem_classes, 'ms-gr-antd-segmented-option'), id: $mergedProps.elem_id, value: $mergedProps.value, + ...$mergedProps.restProps, ...$mergedProps.props, ...bindEvents($mergedProps), }, diff --git a/frontend/antd/select/Index.svelte b/frontend/antd/select/Index.svelte index e8862057..0163a6f4 100644 --- a/frontend/antd/select/Index.svelte +++ b/frontend/antd/select/Index.svelte @@ -40,6 +40,7 @@ elem_style, as_item, value, + restProps: $$restProps, }); const slots = getSlots(); $: update({ @@ -52,6 +53,7 @@ elem_style, as_item, value, + restProps: $$restProps, }); const { options, default: children } = getItems(['options', 'default']); @@ -62,6 +64,7 @@ style={$mergedProps.elem_style} className={cls($mergedProps.elem_classes, 'ms-gr-antd-select')} id={$mergedProps.elem_id} + {...$mergedProps.restProps} {...$mergedProps.props} {...bindEvents($mergedProps)} value={$mergedProps.props.value ?? $mergedProps.value} diff --git a/frontend/antd/select/option/Index.svelte b/frontend/antd/select/option/Index.svelte index 1dde92fa..549fd509 100644 --- a/frontend/antd/select/option/Index.svelte +++ b/frontend/antd/select/option/Index.svelte @@ -50,6 +50,7 @@ disabled, title, key, + restProps: $$restProps, }); const slots = getSlots(); $: update({ @@ -66,6 +67,7 @@ disabled, title, key, + restProps: $$restProps, }); const setItem = getSetItemFn(); const { default: items, options } = getItems(['default', 'options']); @@ -80,6 +82,7 @@ disabled: $mergedProps.disabled, title: $mergedProps.title, key: $mergedProps.key, + ...$mergedProps.restProps, ...$mergedProps.props, ...bindEvents($mergedProps), }, diff --git a/frontend/antd/skeleton/Index.svelte b/frontend/antd/skeleton/Index.svelte index 46162370..52f891ca 100644 --- a/frontend/antd/skeleton/Index.svelte +++ b/frontend/antd/skeleton/Index.svelte @@ -35,6 +35,7 @@ elem_classes, elem_style, as_item, + restProps: $$restProps, }); const slots = getSlots(); @@ -47,6 +48,7 @@ elem_classes, elem_style, as_item, + restProps: $$restProps, }); @@ -57,6 +59,7 @@ style={$mergedProps.elem_style} className={cls($mergedProps.elem_classes, 'ms-gr-antd-skeleton')} id={$mergedProps.elem_id} + {...$mergedProps.restProps} {...$mergedProps.props} {...bindEvents($mergedProps)} slots={$slots} diff --git a/frontend/antd/skeleton/avatar/Index.svelte b/frontend/antd/skeleton/avatar/Index.svelte index 8efd35e6..75e7bb1e 100644 --- a/frontend/antd/skeleton/avatar/Index.svelte +++ b/frontend/antd/skeleton/avatar/Index.svelte @@ -37,6 +37,7 @@ elem_classes, elem_style, as_item, + restProps: $$restProps, }); const slots = getSlots(); @@ -49,6 +50,7 @@ elem_classes, elem_style, as_item, + restProps: $$restProps, }); @@ -59,6 +61,7 @@ style={$mergedProps.elem_style} className={cls($mergedProps.elem_classes, 'ms-gr-antd-skeleton-avatar')} id={$mergedProps.elem_id} + {...$mergedProps.restProps} {...$mergedProps.props} {...bindEvents($mergedProps)} slots={$slots} diff --git a/frontend/antd/skeleton/button/Index.svelte b/frontend/antd/skeleton/button/Index.svelte index a5f4ad74..1417e492 100644 --- a/frontend/antd/skeleton/button/Index.svelte +++ b/frontend/antd/skeleton/button/Index.svelte @@ -37,6 +37,7 @@ elem_classes, elem_style, as_item, + restProps: $$restProps, }); const slots = getSlots(); @@ -49,6 +50,7 @@ elem_classes, elem_style, as_item, + restProps: $$restProps, }); @@ -59,6 +61,7 @@ style={$mergedProps.elem_style} className={cls($mergedProps.elem_classes, 'ms-gr-antd-skeleton-button')} id={$mergedProps.elem_id} + {...$mergedProps.restProps} {...$mergedProps.props} {...bindEvents($mergedProps)} slots={$slots} diff --git a/frontend/antd/skeleton/image/Index.svelte b/frontend/antd/skeleton/image/Index.svelte index e419a72c..c4fb677a 100644 --- a/frontend/antd/skeleton/image/Index.svelte +++ b/frontend/antd/skeleton/image/Index.svelte @@ -37,6 +37,7 @@ elem_classes, elem_style, as_item, + restProps: $$restProps, }); const slots = getSlots(); @@ -49,6 +50,7 @@ elem_classes, elem_style, as_item, + restProps: $$restProps, }); @@ -59,6 +61,7 @@ style={$mergedProps.elem_style} className={cls($mergedProps.elem_classes, 'ms-gr-antd-skeleton-image')} id={$mergedProps.elem_id} + {...$mergedProps.restProps} {...$mergedProps.props} {...bindEvents($mergedProps)} slots={$slots} diff --git a/frontend/antd/skeleton/input/Index.svelte b/frontend/antd/skeleton/input/Index.svelte index b5b45aa0..d673621c 100644 --- a/frontend/antd/skeleton/input/Index.svelte +++ b/frontend/antd/skeleton/input/Index.svelte @@ -37,6 +37,7 @@ elem_classes, elem_style, as_item, + restProps: $$restProps, }); const slots = getSlots(); @@ -49,6 +50,7 @@ elem_classes, elem_style, as_item, + restProps: $$restProps, }); @@ -59,6 +61,7 @@ style={$mergedProps.elem_style} className={cls($mergedProps.elem_classes, 'ms-gr-antd-skeleton-input')} id={$mergedProps.elem_id} + {...$mergedProps.restProps} {...$mergedProps.props} {...bindEvents($mergedProps)} slots={$slots} diff --git a/frontend/antd/skeleton/node/Index.svelte b/frontend/antd/skeleton/node/Index.svelte index 834903c3..dae77478 100644 --- a/frontend/antd/skeleton/node/Index.svelte +++ b/frontend/antd/skeleton/node/Index.svelte @@ -35,6 +35,7 @@ elem_classes, elem_style, as_item, + restProps: $$restProps, }); const slots = getSlots(); @@ -47,6 +48,7 @@ elem_classes, elem_style, as_item, + restProps: $$restProps, }); @@ -57,6 +59,7 @@ style={$mergedProps.elem_style} className={cls($mergedProps.elem_classes, 'ms-gr-antd-skeleton-node')} id={$mergedProps.elem_id} + {...$mergedProps.restProps} {...$mergedProps.props} {...bindEvents($mergedProps)} slots={$slots} diff --git a/frontend/antd/slider/Index.svelte b/frontend/antd/slider/Index.svelte index b1a7e082..c8b2094b 100644 --- a/frontend/antd/slider/Index.svelte +++ b/frontend/antd/slider/Index.svelte @@ -40,6 +40,7 @@ elem_style, as_item, value, + restProps: $$restProps, }); const slots = getSlots(); $: update({ @@ -52,6 +53,7 @@ elem_style, as_item, value, + restProps: $$restProps, }); const { marks } = getItems(['marks']); @@ -62,6 +64,7 @@ style={$mergedProps.elem_style} className={cls($mergedProps.elem_classes, 'ms-gr-antd-slider')} id={$mergedProps.elem_id} + {...$mergedProps.restProps} {...$mergedProps.props} {...bindEvents($mergedProps)} value={$mergedProps.props.value ?? $mergedProps.value} diff --git a/frontend/antd/slider/mark/Index.svelte b/frontend/antd/slider/mark/Index.svelte index 9611ffb2..bfddc478 100644 --- a/frontend/antd/slider/mark/Index.svelte +++ b/frontend/antd/slider/mark/Index.svelte @@ -44,6 +44,7 @@ as_item, label, number, + restProps: $$restProps, }); const slots = getSlots(); $: update({ @@ -57,6 +58,7 @@ as_item, label, number, + restProps: $$restProps, }); const slot: Writable = writable(); const setItem = getSetItemFn(); @@ -68,6 +70,7 @@ id: $mergedProps.elem_id, number: $mergedProps.number, label: $mergedProps.label, + ...$mergedProps.restProps, ...$mergedProps.props, ...bindEvents($mergedProps), }, diff --git a/frontend/antd/space/Index.svelte b/frontend/antd/space/Index.svelte index 3800c6d4..00a37121 100644 --- a/frontend/antd/space/Index.svelte +++ b/frontend/antd/space/Index.svelte @@ -35,6 +35,7 @@ elem_classes, elem_style, as_item, + restProps: $$restProps, }); const slots = getSlots(); @@ -47,6 +48,7 @@ elem_classes, elem_style, as_item, + restProps: $$restProps, }); @@ -56,6 +58,7 @@ style={$mergedProps.elem_style} className={cls($mergedProps.elem_classes, 'ms-gr-antd-space')} id={$mergedProps.elem_id} + {...$mergedProps.restProps} {...$mergedProps.props} {...bindEvents($mergedProps)} slots={$slots} diff --git a/frontend/antd/space/compact/Index.svelte b/frontend/antd/space/compact/Index.svelte index 82ab2ff6..2a118b09 100644 --- a/frontend/antd/space/compact/Index.svelte +++ b/frontend/antd/space/compact/Index.svelte @@ -35,6 +35,7 @@ elem_classes, elem_style, as_item, + restProps: $$restProps, }); const slots = getSlots(); @@ -47,6 +48,7 @@ elem_classes, elem_style, as_item, + restProps: $$restProps, }); @@ -57,6 +59,7 @@ style={$mergedProps.elem_style} className={cls($mergedProps.elem_classes, 'ms-gr-antd-space-compact')} id={$mergedProps.elem_id} + {...$mergedProps.restProps} {...$mergedProps.props} {...bindEvents($mergedProps)} slots={$slots} diff --git a/frontend/antd/spin/Index.svelte b/frontend/antd/spin/Index.svelte index fa4ff962..48309203 100644 --- a/frontend/antd/spin/Index.svelte +++ b/frontend/antd/spin/Index.svelte @@ -35,6 +35,7 @@ elem_classes, elem_style, as_item, + restProps: $$restProps, }); const slots = getSlots(); @@ -47,6 +48,7 @@ elem_classes, elem_style, as_item, + restProps: $$restProps, }); @@ -57,6 +59,7 @@ style={$mergedProps.elem_style} className={cls($mergedProps.elem_classes, 'ms-gr-antd-spin')} id={$mergedProps.elem_id} + {...$mergedProps.restProps} {...$mergedProps.props} {...bindEvents($mergedProps)} slots={$slots} diff --git a/frontend/antd/splitter/panel/Index.svelte b/frontend/antd/splitter/panel/Index.svelte index 1897ac84..d413dedb 100644 --- a/frontend/antd/splitter/panel/Index.svelte +++ b/frontend/antd/splitter/panel/Index.svelte @@ -64,6 +64,7 @@ ), id: $mergedProps.elem_id, ...$mergedProps.restProps, + ...$mergedProps.restProps, ...$mergedProps.props, ...bindEvents($mergedProps), }, diff --git a/frontend/antd/statistic/Index.svelte b/frontend/antd/statistic/Index.svelte index 2b5dd01f..e15d6007 100644 --- a/frontend/antd/statistic/Index.svelte +++ b/frontend/antd/statistic/Index.svelte @@ -34,6 +34,7 @@ elem_classes, elem_style, value, + restProps: $$restProps, }); $: update({ gradio, @@ -45,6 +46,7 @@ elem_classes, elem_style, value, + restProps: $$restProps, }); @@ -54,6 +56,7 @@ style={$mergedProps.elem_style} className={cls($mergedProps.elem_classes, 'ms-gr-antd-statistic')} id={$mergedProps.elem_id} + {...$mergedProps.restProps} {...$mergedProps.props} {...bindEvents($mergedProps)} slots={$slots} diff --git a/frontend/antd/statistic/countdown/Index.svelte b/frontend/antd/statistic/countdown/Index.svelte index 5bc8a7a9..608e608b 100644 --- a/frontend/antd/statistic/countdown/Index.svelte +++ b/frontend/antd/statistic/countdown/Index.svelte @@ -36,6 +36,7 @@ elem_classes, elem_style, value, + restProps: $$restProps, }); $: update({ gradio, @@ -47,6 +48,7 @@ elem_classes, elem_style, value, + restProps: $$restProps, }); @@ -59,6 +61,7 @@ 'ms-gr-antd-statistic-coutdown' )} id={$mergedProps.elem_id} + {...$mergedProps.restProps} {...$mergedProps.props} {...bindEvents($mergedProps)} slots={$slots} diff --git a/frontend/antd/steps/Index.svelte b/frontend/antd/steps/Index.svelte index 30769efd..ccfc649b 100644 --- a/frontend/antd/steps/Index.svelte +++ b/frontend/antd/steps/Index.svelte @@ -37,6 +37,7 @@ elem_classes, elem_style, as_item, + restProps: $$restProps, }); const slots = getSlots(); @@ -49,6 +50,7 @@ elem_classes, elem_style, as_item, + restProps: $$restProps, }); const { items, default: children } = getItems(['items', 'default']); @@ -60,6 +62,7 @@ style={$mergedProps.elem_style} className={cls($mergedProps.elem_classes, 'ms-gr-antd-steps')} id={$mergedProps.elem_id} + {...$mergedProps.restProps} {...$mergedProps.props} {...bindEvents($mergedProps)} slots={$slots} diff --git a/frontend/antd/steps/item/Index.svelte b/frontend/antd/steps/item/Index.svelte index 4148025f..e3612ddd 100644 --- a/frontend/antd/steps/item/Index.svelte +++ b/frontend/antd/steps/item/Index.svelte @@ -36,6 +36,7 @@ elem_classes, elem_style, as_item, + restProps: $$restProps, }); const slots = getSlots(); @@ -48,6 +49,7 @@ elem_classes, elem_style, as_item, + restProps: $$restProps, }); const setItem = getSetItemFn(); $: setItem($slotKey, $mergedProps._internal.index || 0, { @@ -55,6 +57,7 @@ style: $mergedProps.elem_style, className: cls($mergedProps.elem_classes, 'ms-gr-antd-steps-item'), id: $mergedProps.elem_id, + ...$mergedProps.restProps, ...$mergedProps.props, ...bindEvents($mergedProps), }, diff --git a/frontend/antd/switch/Index.svelte b/frontend/antd/switch/Index.svelte index 7cdafb53..776e2160 100644 --- a/frontend/antd/switch/Index.svelte +++ b/frontend/antd/switch/Index.svelte @@ -36,6 +36,7 @@ elem_style, as_item, value, + restProps: $$restProps, }); const slots = getSlots(); @@ -49,6 +50,7 @@ elem_style, as_item, value, + restProps: $$restProps, }); @@ -59,6 +61,7 @@ className={cls($mergedProps.elem_classes, 'ms-gr-antd-switch')} id={$mergedProps.elem_id} value={$mergedProps.value} + {...$mergedProps.restProps} {...$mergedProps.props} {...bindEvents($mergedProps)} slots={$slots} diff --git a/frontend/antd/table/Index.svelte b/frontend/antd/table/Index.svelte index 14f8c9b6..3667d775 100644 --- a/frontend/antd/table/Index.svelte +++ b/frontend/antd/table/Index.svelte @@ -40,6 +40,7 @@ elem_classes, elem_style, data_source, + restProps: $$restProps, }); $: update({ gradio, @@ -51,6 +52,7 @@ elem_classes, elem_style, data_source, + restProps: $$restProps, }); const { rowSelection: rowSelectionItems } = getRowSelectionItems([ 'rowSelection', @@ -66,6 +68,7 @@ style={$mergedProps.elem_style} className={cls($mergedProps.elem_classes, 'ms-gr-antd-table')} id={$mergedProps.elem_id} + {...$mergedProps.restProps} {...$mergedProps.props} {...bindEvents($mergedProps)} slots={$slots} diff --git a/frontend/antd/table/column-group/Index.svelte b/frontend/antd/table/column-group/Index.svelte index 677a9f76..ff87a2be 100644 --- a/frontend/antd/table/column-group/Index.svelte +++ b/frontend/antd/table/column-group/Index.svelte @@ -38,6 +38,7 @@ elem_style, as_item, title, + restProps: $$restProps, }); const slots = getSlots(); @@ -51,6 +52,7 @@ elem_style, as_item, title, + restProps: $$restProps, }); const setColumnItem = getSetColumnItemFn(); @@ -64,6 +66,7 @@ ), id: $mergedProps.elem_id, title: $mergedProps.title, + ...$mergedProps.restProps, ...$mergedProps.props, ...bindEvents($mergedProps), }, diff --git a/frontend/antd/table/column/Index.svelte b/frontend/antd/table/column/Index.svelte index e1387a35..21e05446 100644 --- a/frontend/antd/table/column/Index.svelte +++ b/frontend/antd/table/column/Index.svelte @@ -39,6 +39,7 @@ elem_classes, elem_style, as_item, + restProps: $$restProps, }); const slots = getSlots(); @@ -51,6 +52,7 @@ elem_classes, elem_style, as_item, + restProps: $$restProps, }); const setColumnItem = getSetColumnItemFn(); @@ -70,6 +72,7 @@ 'ms-gr-antd-table-column' ), id: $mergedProps.elem_id, + ...$mergedProps.restProps, ...$mergedProps.props, ...bindEvents($mergedProps), render: createFunction($mergedProps.props.render), diff --git a/frontend/antd/table/expandable/Expandable.svelte b/frontend/antd/table/expandable/Expandable.svelte index 80acff39..5a4d2242 100644 --- a/frontend/antd/table/expandable/Expandable.svelte +++ b/frontend/antd/table/expandable/Expandable.svelte @@ -45,6 +45,7 @@ elem_style, as_item, value, + restProps: $$restProps, }); const slots = getSlots(); $: update({ @@ -57,6 +58,7 @@ elem_style, as_item, value, + restProps: $$restProps, }); const setExpandableItem = getSetExpandableItemFn(); @@ -72,6 +74,7 @@ ), id: $mergedProps.elem_id, expandedRowKeys: $mergedProps.value, + ...$mergedProps.restProps, ...$mergedProps.props, ...events, onExpandedRowsChange: (expandedKeys: string[]) => { diff --git a/frontend/antd/table/row-selection/RowSelection.svelte b/frontend/antd/table/row-selection/RowSelection.svelte index 58c3df9f..afeaf320 100644 --- a/frontend/antd/table/row-selection/RowSelection.svelte +++ b/frontend/antd/table/row-selection/RowSelection.svelte @@ -46,6 +46,7 @@ elem_style, as_item, value, + restProps: $$restProps, }); const slots = getSlots(); $: update({ @@ -58,6 +59,7 @@ elem_style, as_item, value, + restProps: $$restProps, }); const { selections: selectionsItems } = getSelectionItems(['selections']); const setRowSelectionItem = getSetRowSelectionItemFn(); @@ -74,6 +76,7 @@ selectedRowKeys: $mergedProps.value, selections: $mergedProps.props.selections || renderItems($selectionsItems), + ...$mergedProps.restProps, ...$mergedProps.props, ...events, onChange: (selectedRowKeys: string[] | number[], ...args: any[]) => { diff --git a/frontend/antd/table/row-selection/selection/Index.svelte b/frontend/antd/table/row-selection/selection/Index.svelte index f0595f6b..0f1521b0 100644 --- a/frontend/antd/table/row-selection/selection/Index.svelte +++ b/frontend/antd/table/row-selection/selection/Index.svelte @@ -45,6 +45,7 @@ as_item, text, built_in_selection, + restProps: $$restProps, }); const slots = getSlots(); $: update({ @@ -58,6 +59,7 @@ as_item, text, built_in_selection, + restProps: $$restProps, }); const setSelectionItem = getSetSelectionItemFn(); $: setSelectionItem( @@ -74,6 +76,7 @@ ), id: $mergedProps.elem_id, text: $mergedProps.text, + ...$mergedProps.restProps, ...$mergedProps.props, ...bindEvents($mergedProps), }, diff --git a/frontend/antd/tabs/Index.svelte b/frontend/antd/tabs/Index.svelte index 646ac43c..22622c73 100644 --- a/frontend/antd/tabs/Index.svelte +++ b/frontend/antd/tabs/Index.svelte @@ -38,6 +38,7 @@ elem_style, as_item, value, + restProps: $$restProps, }); const slots = getSlots(); @@ -51,6 +52,7 @@ elem_style, as_item, value, + restProps: $$restProps, }); const { items, default: children } = getItems(['items', 'default']); @@ -62,6 +64,7 @@ style={$mergedProps.elem_style} className={cls($mergedProps.elem_classes, 'ms-gr-antd-tabs')} id={$mergedProps.elem_id} + {...$mergedProps.restProps} {...$mergedProps.props} {...bindEvents($mergedProps)} slots={$slots} diff --git a/frontend/antd/tabs/item/Index.svelte b/frontend/antd/tabs/item/Index.svelte index ba5c199c..dc351dc0 100644 --- a/frontend/antd/tabs/item/Index.svelte +++ b/frontend/antd/tabs/item/Index.svelte @@ -37,6 +37,7 @@ elem_classes, elem_style, as_item, + restProps: $$restProps, }); const slots = getSlots(); @@ -49,6 +50,7 @@ elem_classes, elem_style, as_item, + restProps: $$restProps, }); const setItem = getSetItemFn(); $: setItem($slotKey, $mergedProps._internal.index || 0, { @@ -56,6 +58,7 @@ style: $mergedProps.elem_style, className: cls($mergedProps.elem_classes, 'ms-gr-antd-tabs-item'), id: $mergedProps.elem_id, + ...$mergedProps.restProps, ...$mergedProps.props, ...bindEvents($mergedProps), }, diff --git a/frontend/antd/tag/Index.svelte b/frontend/antd/tag/Index.svelte index ef6da7ae..eafaed74 100644 --- a/frontend/antd/tag/Index.svelte +++ b/frontend/antd/tag/Index.svelte @@ -40,6 +40,7 @@ elem_style, as_item, value, + restProps: $$restProps, }); const slots = getSlots(); @@ -53,6 +54,7 @@ elem_style, as_item, value, + restProps: $$restProps, }); @@ -63,6 +65,7 @@ style={$mergedProps.elem_style} className={cls($mergedProps.elem_classes, 'ms-gr-antd-tag')} id={$mergedProps.elem_id} + {...$mergedProps.restProps} {...$mergedProps.props} {...bindEvents($mergedProps)} slots={$slots} diff --git a/frontend/antd/tag/checkable-tag/Index.svelte b/frontend/antd/tag/checkable-tag/Index.svelte index 432603bb..5a20646a 100644 --- a/frontend/antd/tag/checkable-tag/Index.svelte +++ b/frontend/antd/tag/checkable-tag/Index.svelte @@ -44,6 +44,7 @@ as_item, value, label, + restProps: $$restProps, }); const slots = getSlots(); @@ -58,6 +59,7 @@ as_item, value, label, + restProps: $$restProps, }); @@ -68,6 +70,7 @@ style={$mergedProps.elem_style} className={cls($mergedProps.elem_classes, 'ms-gr-antd-tag-checkable-tag')} id={$mergedProps.elem_id} + {...$mergedProps.restProps} {...$mergedProps.props} {...bindEvents($mergedProps)} slots={$slots} diff --git a/frontend/antd/time-picker/Index.svelte b/frontend/antd/time-picker/Index.svelte index 467a6272..3e08ffdc 100644 --- a/frontend/antd/time-picker/Index.svelte +++ b/frontend/antd/time-picker/Index.svelte @@ -39,6 +39,7 @@ elem_style, as_item, value, + restProps: $$restProps, }); const slots = getSlots(); @@ -52,6 +53,7 @@ elem_style, as_item, value, + restProps: $$restProps, }); @@ -61,6 +63,7 @@ style={$mergedProps.elem_style} className={cls($mergedProps.elem_classes, 'ms-gr-antd-time-picker')} id={$mergedProps.elem_id} + {...$mergedProps.restProps} {...$mergedProps.props} {...bindEvents($mergedProps)} slots={$slots} diff --git a/frontend/antd/time-picker/range-picker/Index.svelte b/frontend/antd/time-picker/range-picker/Index.svelte index ede1defa..9f4fc938 100644 --- a/frontend/antd/time-picker/range-picker/Index.svelte +++ b/frontend/antd/time-picker/range-picker/Index.svelte @@ -41,6 +41,7 @@ elem_style, as_item, value, + restProps: $$restProps, }); const slots = getSlots(); @@ -54,6 +55,7 @@ elem_style, as_item, value, + restProps: $$restProps, }); @@ -66,6 +68,7 @@ 'ms-gr-antd-time-picker-range-picker' )} id={$mergedProps.elem_id} + {...$mergedProps.restProps} {...$mergedProps.props} {...bindEvents($mergedProps)} slots={$slots} diff --git a/frontend/antd/timeline/Index.svelte b/frontend/antd/timeline/Index.svelte index 2b5e5f33..0e585b21 100644 --- a/frontend/antd/timeline/Index.svelte +++ b/frontend/antd/timeline/Index.svelte @@ -36,6 +36,7 @@ elem_classes, elem_style, as_item, + restProps: $$restProps, }); const slots = getSlots(); @@ -48,6 +49,7 @@ elem_classes, elem_style, as_item, + restProps: $$restProps, }); const { items, default: children } = getItems(['items', 'default']); @@ -59,6 +61,7 @@ style={$mergedProps.elem_style} className={cls($mergedProps.elem_classes, 'ms-gr-antd-timeline')} id={$mergedProps.elem_id} + {...$mergedProps.restProps} {...$mergedProps.props} {...bindEvents($mergedProps)} slots={$slots} diff --git a/frontend/antd/timeline/item/Index.svelte b/frontend/antd/timeline/item/Index.svelte index a219b00b..43abe853 100644 --- a/frontend/antd/timeline/item/Index.svelte +++ b/frontend/antd/timeline/item/Index.svelte @@ -37,6 +37,7 @@ elem_classes, elem_style, as_item, + restProps: $$restProps, }); const slots = getSlots(); @@ -49,6 +50,7 @@ elem_classes, elem_style, as_item, + restProps: $$restProps, }); const setItem = getSetItemFn(); $: setItem($slotKey, $mergedProps._internal.index || 0, { @@ -56,6 +58,7 @@ style: $mergedProps.elem_style, className: cls($mergedProps.elem_classes, 'ms-gr-antd-timeline-item'), id: $mergedProps.elem_id, + ...$mergedProps.restProps, ...$mergedProps.props, ...bindEvents($mergedProps), }, diff --git a/frontend/antd/tooltip/Index.svelte b/frontend/antd/tooltip/Index.svelte index c4d291de..7ac8e79c 100644 --- a/frontend/antd/tooltip/Index.svelte +++ b/frontend/antd/tooltip/Index.svelte @@ -37,6 +37,7 @@ elem_style, as_item, title, + restProps: $$restProps, }); const slots = getSlots(); $: update({ @@ -49,6 +50,7 @@ elem_style, as_item, title, + restProps: $$restProps, }); @@ -58,6 +60,7 @@ style={$mergedProps.elem_style} className={cls($mergedProps.elem_classes, 'ms-gr-antd-tooltip')} id={$mergedProps.elem_id} + {...$mergedProps.restProps} {...$mergedProps.props} {...bindEvents($mergedProps)} slots={$slots} diff --git a/frontend/antd/tour/Index.svelte b/frontend/antd/tour/Index.svelte index 51adcf2f..2df8ed55 100644 --- a/frontend/antd/tour/Index.svelte +++ b/frontend/antd/tour/Index.svelte @@ -39,6 +39,7 @@ as_item, value, open, + restProps: $$restProps, }); const slots = getSlots(); @@ -53,6 +54,7 @@ as_item, value, open, + restProps: $$restProps, }); const { steps, default: children } = getItems(['steps', 'default']); @@ -64,6 +66,7 @@ style={$mergedProps.elem_style} className={cls($mergedProps.elem_classes, 'ms-gr-antd-tour')} id={$mergedProps.elem_id} + {...$mergedProps.restProps} {...$mergedProps.props} {...bindEvents($mergedProps)} current={$mergedProps.props.current ?? $mergedProps.value} diff --git a/frontend/antd/tour/step/Index.svelte b/frontend/antd/tour/step/Index.svelte index 41ea0bdd..416c8e5d 100644 --- a/frontend/antd/tour/step/Index.svelte +++ b/frontend/antd/tour/step/Index.svelte @@ -37,6 +37,7 @@ elem_classes, elem_style, as_item, + restProps: $$restProps, }); const slots = getSlots(); @@ -49,6 +50,7 @@ elem_classes, elem_style, as_item, + restProps: $$restProps, }); const setItem = getSetItemFn(); $: setItem($slotKey, $mergedProps._internal.index || 0, { @@ -56,6 +58,7 @@ style: $mergedProps.elem_style, className: cls($mergedProps.elem_classes, 'ms-gr-antd-tour-step'), id: $mergedProps.elem_id, + ...$mergedProps.restProps, ...$mergedProps.props, ...bindEvents($mergedProps), target: createFunction($mergedProps.props.target), diff --git a/frontend/antd/transfer/Index.svelte b/frontend/antd/transfer/Index.svelte index 6c938284..804de883 100644 --- a/frontend/antd/transfer/Index.svelte +++ b/frontend/antd/transfer/Index.svelte @@ -36,6 +36,7 @@ elem_style, as_item, value, + restProps: $$restProps, }); const slots = getSlots(); @@ -49,6 +50,7 @@ elem_style, as_item, value, + restProps: $$restProps, }); @@ -60,6 +62,7 @@ className={cls($mergedProps.elem_classes, 'ms-gr-antd-transfer')} id={$mergedProps.elem_id} targetKeys={$mergedProps.value} + {...$mergedProps.restProps} {...$mergedProps.props} {...bindEvents($mergedProps)} slots={$slots} diff --git a/frontend/antd/tree-select/Index.svelte b/frontend/antd/tree-select/Index.svelte index 54dd0cb6..645f8858 100644 --- a/frontend/antd/tree-select/Index.svelte +++ b/frontend/antd/tree-select/Index.svelte @@ -38,6 +38,7 @@ elem_style, as_item, value, + restProps: $$restProps, }); const slots = getSlots(); @@ -51,6 +52,7 @@ elem_style, as_item, value, + restProps: $$restProps, }); const { treeData, default: children } = getItems(['default', 'treeData']); @@ -62,6 +64,7 @@ style={$mergedProps.elem_style} className={cls($mergedProps.elem_classes, 'ms-gr-antd-tree-select')} id={$mergedProps.elem_id} + {...$mergedProps.restProps} {...$mergedProps.props} {...bindEvents($mergedProps)} slots={$slots} diff --git a/frontend/antd/tree-select/tree-node/Index.svelte b/frontend/antd/tree-select/tree-node/Index.svelte index 03f7432d..491287af 100644 --- a/frontend/antd/tree-select/tree-node/Index.svelte +++ b/frontend/antd/tree-select/tree-node/Index.svelte @@ -45,6 +45,7 @@ as_item, value, title, + restProps: $$restProps, }); const slots = getSlots(); $: update({ @@ -58,6 +59,7 @@ as_item, value, title, + restProps: $$restProps, }); const setItem = getSetItemFn(); const { default: items } = getItems(); @@ -68,6 +70,7 @@ id: $mergedProps.elem_id, title: $mergedProps.title, value: $mergedProps.value, + ...$mergedProps.restProps, ...$mergedProps.props, ...bindEvents($mergedProps), }, diff --git a/frontend/antd/tree/Index.svelte b/frontend/antd/tree/Index.svelte index 6bf7c5a6..7c73f616 100644 --- a/frontend/antd/tree/Index.svelte +++ b/frontend/antd/tree/Index.svelte @@ -42,6 +42,7 @@ elem_style, as_item, value, + restProps: $$restProps, }); const slots = getSlots(); @@ -55,6 +56,7 @@ elem_style, as_item, value, + restProps: $$restProps, }); const { treeData, default: children } = getItems(['default', 'treeData']); @@ -74,6 +76,7 @@ style={$mergedProps.elem_style} className={cls($mergedProps.elem_classes, 'ms-gr-antd-tree')} id={$mergedProps.elem_id} + {...$mergedProps.restProps} {...$mergedProps.props} {...bindEvents($mergedProps)} slots={$slots} diff --git a/frontend/antd/tree/directory-tree/Index.svelte b/frontend/antd/tree/directory-tree/Index.svelte index 7726fdbd..2d439138 100644 --- a/frontend/antd/tree/directory-tree/Index.svelte +++ b/frontend/antd/tree/directory-tree/Index.svelte @@ -42,6 +42,7 @@ elem_style, as_item, value, + restProps: $$restProps, }); const slots = getSlots(); @@ -55,6 +56,7 @@ elem_style, as_item, value, + restProps: $$restProps, }); const { treeData, default: children } = getItems(['default', 'treeData']); @@ -74,6 +76,7 @@ style={$mergedProps.elem_style} className={cls($mergedProps.elem_classes, 'ms-gr-antd-directory-tree')} id={$mergedProps.elem_id} + {...$mergedProps.restProps} {...$mergedProps.props} {...bindEvents($mergedProps)} slots={$slots} diff --git a/frontend/antd/tree/tree-node/Index.svelte b/frontend/antd/tree/tree-node/Index.svelte index ef97471a..dea4243d 100644 --- a/frontend/antd/tree/tree-node/Index.svelte +++ b/frontend/antd/tree/tree-node/Index.svelte @@ -43,6 +43,7 @@ elem_style, as_item, title, + restProps: $$restProps, }); const slots = getSlots(); $: update({ @@ -55,6 +56,7 @@ elem_style, as_item, title, + restProps: $$restProps, }); const setItem = getSetItemFn(); const { default: items } = getItems(); @@ -64,6 +66,7 @@ className: cls($mergedProps.elem_classes, 'ms-gr-antd-tree-node'), id: $mergedProps.elem_id, title: $mergedProps.title, + ...$mergedProps.restProps, ...$mergedProps.props, ...bindEvents($mergedProps), }, diff --git a/frontend/antd/typography/Base.svelte b/frontend/antd/typography/Base.svelte index f26b8c70..9bf638a2 100644 --- a/frontend/antd/typography/Base.svelte +++ b/frontend/antd/typography/Base.svelte @@ -45,6 +45,7 @@ elem_classes, elem_style, as_item, + restProps: $$restProps, }); const setSlotParams = getSetSlotParamsFn(); const slots = getSlots(); @@ -58,6 +59,7 @@ elem_classes, elem_style, as_item, + restProps: $$restProps, }); @@ -69,6 +71,7 @@ style={$mergedProps.elem_style} className={cls($mergedProps.elem_classes)} id={$mergedProps.elem_id} + {...$mergedProps.restProps} {...$mergedProps.props} {...bindEvents($mergedProps)} slots={$slots} diff --git a/frontend/antd/typography/typography.base.tsx b/frontend/antd/typography/typography.base.tsx index f9114e13..b5cd3fa1 100644 --- a/frontend/antd/typography/typography.base.tsx +++ b/frontend/antd/typography/typography.base.tsx @@ -2,7 +2,7 @@ import { sveltify } from '@svelte-preprocess-react'; import { ReactSlot } from '@svelte-preprocess-react/react-slot'; import type { SetSlotParams } from '@svelte-preprocess-react/slot'; import React, { useMemo } from 'react'; -import { renderSlot } from '@utils/renderSlot'; +import { renderParamsSlot } from '@utils/renderParamsSlot'; import { type GetProps, Typography } from 'antd'; import type { EllipsisConfig } from 'antd/es/typography/Base'; import cls from 'classnames'; @@ -130,10 +130,11 @@ export const TypographyBase = sveltify< ? ({ ...ellipsisConfig, symbol: slots['ellipsis.symbol'] - ? (...args) => { - setSlotParams('ellipsis.symbol', args); - return renderSlot(slots['ellipsis.symbol']); - } + ? renderParamsSlot({ + key: 'ellipsis.symbol', + setSlotParams, + slots, + }) : ellipsisConfig.symbol, tooltip: slots['ellipsis.tooltip'] ? ( diff --git a/frontend/antd/upload/Index.svelte b/frontend/antd/upload/Index.svelte index 465262bc..d8440505 100644 --- a/frontend/antd/upload/Index.svelte +++ b/frontend/antd/upload/Index.svelte @@ -38,6 +38,7 @@ elem_classes, elem_style, as_item, + restProps: $$restProps, }); const slots = getSlots(); @@ -51,6 +52,7 @@ elem_classes, elem_style, as_item, + restProps: $$restProps, }); @@ -62,6 +64,7 @@ className={cls($mergedProps.elem_classes, 'ms-gr-antd-upload')} id={$mergedProps.elem_id} fileList={$mergedProps.value} + {...$mergedProps.restProps} {...$mergedProps.props} {...bindEvents($mergedProps)} slots={$slots} diff --git a/frontend/antd/upload/dragger/Index.svelte b/frontend/antd/upload/dragger/Index.svelte index f315f633..6e59de74 100644 --- a/frontend/antd/upload/dragger/Index.svelte +++ b/frontend/antd/upload/dragger/Index.svelte @@ -40,6 +40,7 @@ elem_classes, elem_style, as_item, + restProps: $$restProps, }); const slots = getSlots(); @@ -53,6 +54,7 @@ elem_classes, elem_style, as_item, + restProps: $$restProps, }); @@ -64,6 +66,7 @@ className={cls($mergedProps.elem_classes, 'ms-gr-antd-upload-dragger')} id={$mergedProps.elem_id} fileList={$mergedProps.value} + {...$mergedProps.restProps} {...$mergedProps.props} {...bindEvents($mergedProps)} slots={$slots} diff --git a/frontend/antd/watermark/Index.svelte b/frontend/antd/watermark/Index.svelte index 8534c5df..eb78d15d 100644 --- a/frontend/antd/watermark/Index.svelte +++ b/frontend/antd/watermark/Index.svelte @@ -36,6 +36,7 @@ elem_style, as_item, content, + restProps: $$restProps, }); const slots = getSlots(); @@ -49,6 +50,7 @@ elem_style, as_item, content, + restProps: $$restProps, }); @@ -59,6 +61,7 @@ style={$mergedProps.elem_style} className={cls($mergedProps.elem_classes, 'ms-gr-antd-watermark')} id={$mergedProps.elem_id} + {...$mergedProps.restProps} {...$mergedProps.props} {...bindEvents($mergedProps)} slots={$slots} diff --git a/frontend/base/div/Index.svelte b/frontend/base/div/Index.svelte index 0838d1bf..f41fbe70 100644 --- a/frontend/base/div/Index.svelte +++ b/frontend/base/div/Index.svelte @@ -40,6 +40,7 @@ elem_id, elem_classes, elem_style, + restProps: $$restProps, }); $: update({ gradio, @@ -51,6 +52,7 @@ elem_id, elem_classes, elem_style, + restProps: $$restProps, }); let events: { event: string; handler: (...args: any[]) => any }[] = []; @@ -86,6 +88,7 @@ : $mergedProps.elem_style} class={$mergedProps.elem_classes.join(' ')} id={$mergedProps.elem_id} + {...$mergedProps.restProps} {...$mergedProps.props} > {#if $mergedProps._internal.layout} diff --git a/frontend/base/each/Each.svelte b/frontend/base/each/Each.svelte index b803cd1d..7399fd5b 100644 --- a/frontend/base/each/Each.svelte +++ b/frontend/base/each/Each.svelte @@ -13,10 +13,12 @@ setSlotContext({ ...context_value, ...value, + restProps: $$restProps, }); $: setSlotContext({ ...context_value, ...value, + restProps: $$restProps, }); diff --git a/frontend/base/fragment/Index.svelte b/frontend/base/fragment/Index.svelte index f867c55a..2ae17131 100644 --- a/frontend/base/fragment/Index.svelte +++ b/frontend/base/fragment/Index.svelte @@ -18,11 +18,13 @@ _internal, visible, as_item, + restProps: $$restProps, }); $: update({ _internal, visible, as_item, + restProps: $$restProps, }); diff --git a/frontend/base/span/Index.svelte b/frontend/base/span/Index.svelte index 73e517fc..9ba7d452 100644 --- a/frontend/base/span/Index.svelte +++ b/frontend/base/span/Index.svelte @@ -40,6 +40,7 @@ elem_id, elem_classes, elem_style, + restProps: $$restProps, }); $: update({ gradio, @@ -51,6 +52,7 @@ elem_id, elem_classes, elem_style, + restProps: $$restProps, }); let events: { event: string; handler: (...args: any[]) => any }[] = []; @@ -86,6 +88,7 @@ : $mergedProps.elem_style} class={$mergedProps.elem_classes.join(' ')} id={$mergedProps.elem_id} + {...$mergedProps.restProps} {...$mergedProps.props} > {#if $mergedProps._internal.layout} diff --git a/frontend/utils/renderParamsSlot.tsx b/frontend/utils/renderParamsSlot.tsx new file mode 100644 index 00000000..38c4b925 --- /dev/null +++ b/frontend/utils/renderParamsSlot.tsx @@ -0,0 +1,18 @@ +import type { SetSlotParams } from '@svelte-preprocess-react/slot'; + +import { renderSlot } from './renderSlot'; + +export function renderParamsSlot({ + key, + setSlotParams, + slots, +}: { + key: string; + setSlotParams: SetSlotParams; + slots: Record; +}) { + return (...args: any[]) => { + setSlotParams(key, args); + return renderSlot(slots[key]); + }; +} diff --git a/package.json b/package.json index 8858d7b7..d2338797 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "lint": "npm-run-all --parallel lint:* && npm run format", "format": "prettier --cache --write '**/*.{js,jsx,tsx,ts,svelte,less,md,yaml,yml,json}' --no-error-on-unmatched-pattern", "lint:js": "eslint . --fix --cache", - "lint:ts": "tsc", + "lint:ts": "tsc && svelte-check --tsconfig ./tsconfig.json", "lint:py": "flake8 . && isort . && yapf --in-place --recursive --exclude=node_modules/ .", "lint:style": "stylelint --allow-empty-input --cache --fix \"**/*.{less,css}\" ", "changeset": "changeset", @@ -43,6 +43,7 @@ "rimraf": "^6.0.1", "stylelint": "^16.9.0", "svelte": "^4.2.19", + "svelte-check": "^4.0.2", "tslib": "^2.7.0", "tsx": "^4.19.1", "typescript": "^5.6.2" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b8801d8e..5b84e1be 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -68,6 +68,9 @@ importers: svelte: specifier: ^4.2.19 version: 4.2.19 + svelte-check: + specifier: ^4.0.2 + version: 4.0.2(picomatch@4.0.2)(svelte@4.2.19)(typescript@5.6.2) tslib: specifier: ^2.7.0 version: 2.7.0 @@ -244,7 +247,7 @@ importers: version: 7.25.2 '@gradio/preview': specifier: 0.10.1 - version: 0.10.1(@babel/core@7.25.2)(@types/node@18.19.50)(less@4.2.0)(postcss-load-config@6.0.1(jiti@1.21.6)(postcss@8.4.47)(tsx@4.19.1)(yaml@2.5.1))(postcss@8.4.47)(rollup@4.22.4)(svelte@4.2.19) + version: 0.10.1(@babel/core@7.25.2)(@types/node@18.19.50)(less@4.2.0)(postcss-load-config@3.1.4(postcss@8.4.47)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@18.19.50)(typescript@5.5.4)))(postcss@8.4.47)(rollup@4.22.4)(svelte@4.2.19) '@gradio/upload': specifier: 0.11.2 version: 0.11.2(svelte@4.2.19) @@ -1518,55 +1521,46 @@ packages: resolution: {integrity: sha512-j63YtCIRAzbO+gC2L9dWXRh5BFetsv0j0va0Wi9epXDgU/XUi5dJKo4USTttVyK7fGw2nPWK0PbAvyliz50SCQ==} cpu: [arm] os: [linux] - libc: [glibc] '@rollup/rollup-linux-arm-musleabihf@4.22.4': resolution: {integrity: sha512-dJnWUgwWBX1YBRsuKKMOlXCzh2Wu1mlHzv20TpqEsfdZLb3WoJW2kIEsGwLkroYf24IrPAvOT/ZQ2OYMV6vlrg==} cpu: [arm] os: [linux] - libc: [musl] '@rollup/rollup-linux-arm64-gnu@4.22.4': resolution: {integrity: sha512-AdPRoNi3NKVLolCN/Sp4F4N1d98c4SBnHMKoLuiG6RXgoZ4sllseuGioszumnPGmPM2O7qaAX/IJdeDU8f26Aw==} cpu: [arm64] os: [linux] - libc: [glibc] '@rollup/rollup-linux-arm64-musl@4.22.4': resolution: {integrity: sha512-Gl0AxBtDg8uoAn5CCqQDMqAx22Wx22pjDOjBdmG0VIWX3qUBHzYmOKh8KXHL4UpogfJ14G4wk16EQogF+v8hmA==} cpu: [arm64] os: [linux] - libc: [musl] '@rollup/rollup-linux-powerpc64le-gnu@4.22.4': resolution: {integrity: sha512-3aVCK9xfWW1oGQpTsYJJPF6bfpWfhbRnhdlyhak2ZiyFLDaayz0EP5j9V1RVLAAxlmWKTDfS9wyRyY3hvhPoOg==} cpu: [ppc64] os: [linux] - libc: [glibc] '@rollup/rollup-linux-riscv64-gnu@4.22.4': resolution: {integrity: sha512-ePYIir6VYnhgv2C5Xe9u+ico4t8sZWXschR6fMgoPUK31yQu7hTEJb7bCqivHECwIClJfKgE7zYsh1qTP3WHUA==} cpu: [riscv64] os: [linux] - libc: [glibc] '@rollup/rollup-linux-s390x-gnu@4.22.4': resolution: {integrity: sha512-GqFJ9wLlbB9daxhVlrTe61vJtEY99/xB3C8e4ULVsVfflcpmR6c8UZXjtkMA6FhNONhj2eA5Tk9uAVw5orEs4Q==} cpu: [s390x] os: [linux] - libc: [glibc] '@rollup/rollup-linux-x64-gnu@4.22.4': resolution: {integrity: sha512-87v0ol2sH9GE3cLQLNEy0K/R0pz1nvg76o8M5nhMR0+Q+BBGLnb35P0fVz4CQxHYXaAOhE8HhlkaZfsdUOlHwg==} cpu: [x64] os: [linux] - libc: [glibc] '@rollup/rollup-linux-x64-musl@4.22.4': resolution: {integrity: sha512-UV6FZMUgePDZrFjrNGIWzDo/vABebuXBhJEqrHxrGiU6HikPy0Z3LfdtciIttEUQfuDdCn8fqh7wiFJjCNwO+g==} cpu: [x64] os: [linux] - libc: [musl] '@rollup/rollup-win32-arm64-msvc@4.22.4': resolution: {integrity: sha512-BjI+NVVEGAXjGWYHz/vv0pBqfGoUH0IGZ0cICTn7kB9PyjrATSkX+8WkguNjWoj2qSr1im/+tTGRaY+4/PdcQw==} @@ -1676,56 +1670,48 @@ packages: engines: {node: '>=10'} cpu: [arm64] os: [linux] - libc: [glibc] '@swc/core-linux-arm64-gnu@1.7.26': resolution: {integrity: sha512-YKevOV7abpjcAzXrhsl+W48Z9mZvgoVs2eP5nY+uoMAdP2b3GxC0Df1Co0I90o2lkzO4jYBpTMcZlmUXLdXn+Q==} engines: {node: '>=10'} cpu: [arm64] os: [linux] - libc: [glibc] '@swc/core-linux-arm64-musl@1.5.29': resolution: {integrity: sha512-TERh2OICAJz+SdDIK9+0GyTUwF6r4xDlFmpoiHKHrrD/Hh3u+6Zue0d7jQ/he/i80GDn4tJQkHlZys+RZL5UZg==} engines: {node: '>=10'} cpu: [arm64] os: [linux] - libc: [musl] '@swc/core-linux-arm64-musl@1.7.26': resolution: {integrity: sha512-3w8iZICMkQQON0uIcvz7+Q1MPOW6hJ4O5ETjA0LSP/tuKqx30hIniCGOgPDnv3UTMruLUnQbtBwVCZTBKR3Rkg==} engines: {node: '>=10'} cpu: [arm64] os: [linux] - libc: [musl] '@swc/core-linux-x64-gnu@1.5.29': resolution: {integrity: sha512-WMDPqU7Ji9dJpA+Llek2p9t7pcy7Bob8ggPUvgsIlv3R/eesF9DIzSbrgl6j3EAEPB9LFdSafsgf6kT/qnvqFg==} engines: {node: '>=10'} cpu: [x64] os: [linux] - libc: [glibc] '@swc/core-linux-x64-gnu@1.7.26': resolution: {integrity: sha512-c+pp9Zkk2lqb06bNGkR2Looxrs7FtGDMA4/aHjZcCqATgp348hOKH5WPvNLBl+yPrISuWjbKDVn3NgAvfvpH4w==} engines: {node: '>=10'} cpu: [x64] os: [linux] - libc: [glibc] '@swc/core-linux-x64-musl@1.5.29': resolution: {integrity: sha512-DO14glwpdKY4POSN0201OnGg1+ziaSVr6/RFzuSLggshwXeeyVORiHv3baj7NENhJhWhUy3NZlDsXLnRFkmhHQ==} engines: {node: '>=10'} cpu: [x64] os: [linux] - libc: [musl] '@swc/core-linux-x64-musl@1.7.26': resolution: {integrity: sha512-PgtyfHBF6xG87dUSSdTJHwZ3/8vWZfNIXQV2GlwEpslrOkGqy+WaiiyE7Of7z9AvDILfBBBcJvJ/r8u980wAfQ==} engines: {node: '>=10'} cpu: [x64] os: [linux] - libc: [musl] '@swc/core-win32-arm64-msvc@1.5.29': resolution: {integrity: sha512-V3Y1+a1zG1zpYXUMqPIHEMEOd+rHoVnIpO/KTyFwAmKVu8v+/xPEVx/AGoYE67x4vDAAvPQrKI3Aokilqa5yVg==} @@ -4449,28 +4435,24 @@ packages: engines: {node: '>= 12.0.0'} cpu: [arm64] os: [linux] - libc: [glibc] lightningcss-linux-arm64-musl@1.27.0: resolution: {integrity: sha512-rCGBm2ax7kQ9pBSeITfCW9XSVF69VX+fm5DIpvDZQl4NnQoMQyRwhZQm9pd59m8leZ1IesRqWk2v/DntMo26lg==} engines: {node: '>= 12.0.0'} cpu: [arm64] os: [linux] - libc: [musl] lightningcss-linux-x64-gnu@1.27.0: resolution: {integrity: sha512-Dk/jovSI7qqhJDiUibvaikNKI2x6kWPN79AQiD/E/KeQWMjdGe9kw51RAgoWFDi0coP4jinaH14Nrt/J8z3U4A==} engines: {node: '>= 12.0.0'} cpu: [x64] os: [linux] - libc: [glibc] lightningcss-linux-x64-musl@1.27.0: resolution: {integrity: sha512-QKjTxXm8A9s6v9Tg3Fk0gscCQA1t/HMoF7Woy1u68wCk5kS4fR+q3vXa1p3++REW784cRAtkYKrPy6JKibrEZA==} engines: {node: '>= 12.0.0'} cpu: [x64] os: [linux] - libc: [musl] lightningcss-win32-arm64-msvc@1.27.0: resolution: {integrity: sha512-/wXegPS1hnhkeG4OXQKEMQeJd48RDC3qdh+OA8pCuOPCyvnm/yEayrJdJVqzBsqpy1aJklRCVxscpFur80o6iQ==} @@ -6500,6 +6482,14 @@ packages: resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} engines: {node: '>= 0.4'} + svelte-check@4.0.2: + resolution: {integrity: sha512-w2yqcG9ELJe2RJCnAvB7v0OgkHhL3czzz/tVoxGFfO6y4mOrF6QHCDhXijeXzsU7LVKEwWS3Qd9tza4JBuDxqA==} + engines: {node: '>= 18.0.0'} + hasBin: true + peerDependencies: + svelte: ^4.0.0 || ^5.0.0-next.0 + typescript: '>=5.0.0' + svelte-eslint-parser@0.41.1: resolution: {integrity: sha512-08ndI6zTghzI8SuJAFpvMbA/haPSGn3xz19pjre19yYMw8Nw/wQJ2PrZBI/L8ijGTgtkWCQQiLLy+Z1tfaCwNA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -8043,7 +8033,7 @@ snapshots: dependencies: svelte: 4.2.19 - '@gradio/preview@0.10.1(@babel/core@7.25.2)(@types/node@18.19.50)(less@4.2.0)(postcss-load-config@6.0.1(jiti@1.21.6)(postcss@8.4.47)(tsx@4.19.1)(yaml@2.5.1))(postcss@8.4.47)(rollup@4.22.4)(svelte@4.2.19)': + '@gradio/preview@0.10.1(@babel/core@7.25.2)(@types/node@18.19.50)(less@4.2.0)(postcss-load-config@3.1.4(postcss@8.4.47)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@18.19.50)(typescript@5.5.4)))(postcss@8.4.47)(rollup@4.22.4)(svelte@4.2.19)': dependencies: '@originjs/vite-plugin-commonjs': 1.0.3 '@rollup/plugin-sucrase': 5.0.2(rollup@4.22.4) @@ -8057,7 +8047,7 @@ snapshots: sucrase: 3.35.0 sugarss: 4.0.1(postcss@8.4.47) svelte-hmr: 0.16.0(svelte@4.2.19) - svelte-preprocess: 5.1.4(@babel/core@7.25.2)(coffeescript@2.7.0)(less@4.2.0)(postcss-load-config@6.0.1(jiti@1.21.6)(postcss@8.4.47)(tsx@4.19.1)(yaml@2.5.1))(postcss@8.4.47)(pug@3.0.3)(sass@1.78.0)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.47))(svelte@4.2.19)(typescript@5.6.2) + svelte-preprocess: 5.1.4(@babel/core@7.25.2)(coffeescript@2.7.0)(less@4.2.0)(postcss-load-config@3.1.4(postcss@8.4.47)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@18.19.50)(typescript@5.5.4)))(postcss@8.4.47)(pug@3.0.3)(sass@1.78.0)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.47))(svelte@4.2.19)(typescript@5.6.2) typescript: 5.6.2 vite: 5.4.7(@types/node@18.19.50)(less@4.2.0)(lightningcss@1.27.0)(sass@1.78.0)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.47)) which: 4.0.0 @@ -12871,13 +12861,13 @@ snapshots: dependencies: htmlparser2: 3.10.1 postcss: 7.0.39 - postcss-syntax: 0.36.2(postcss-html@0.36.0)(postcss-jsx@0.36.4)(postcss-less@3.1.4)(postcss-markdown@0.36.0)(postcss-scss@2.1.1)(postcss@7.0.39) + postcss-syntax: 0.36.2(postcss-html@0.36.0(postcss-syntax@0.36.2(postcss-less@6.0.0(postcss@8.4.47))(postcss@8.4.47))(postcss@7.0.39))(postcss-jsx@0.36.4(postcss-syntax@0.36.2(postcss-less@6.0.0(postcss@8.4.47))(postcss@8.4.47))(postcss@7.0.39))(postcss-less@3.1.4)(postcss-markdown@0.36.0)(postcss-scss@2.1.1)(postcss@7.0.39) postcss-jsx@0.36.4(postcss-syntax@0.36.2(postcss-less@6.0.0(postcss@8.4.47))(postcss@8.4.47))(postcss@7.0.39): dependencies: '@babel/core': 7.25.2 postcss: 7.0.39 - postcss-syntax: 0.36.2(postcss-html@0.36.0)(postcss-jsx@0.36.4)(postcss-less@3.1.4)(postcss-markdown@0.36.0)(postcss-scss@2.1.1)(postcss@7.0.39) + postcss-syntax: 0.36.2(postcss-html@0.36.0(postcss-syntax@0.36.2(postcss-less@6.0.0(postcss@8.4.47))(postcss@8.4.47))(postcss@7.0.39))(postcss-jsx@0.36.4(postcss-syntax@0.36.2(postcss-less@6.0.0(postcss@8.4.47))(postcss@8.4.47))(postcss@7.0.39))(postcss-less@3.1.4)(postcss-markdown@0.36.0)(postcss-scss@2.1.1)(postcss@7.0.39) transitivePeerDependencies: - supports-color @@ -12889,6 +12879,15 @@ snapshots: dependencies: postcss: 8.4.47 + postcss-load-config@3.1.4(postcss@8.4.47)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@18.19.50)(typescript@5.5.4)): + dependencies: + lilconfig: 2.1.0 + yaml: 1.10.2 + optionalDependencies: + postcss: 8.4.47 + ts-node: 10.9.2(@swc/core@1.7.26)(@types/node@18.19.50)(typescript@5.5.4) + optional: true + postcss-load-config@3.1.4(postcss@8.4.47)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@22.5.5)(typescript@5.6.2)): dependencies: lilconfig: 2.1.0 @@ -12909,7 +12908,7 @@ snapshots: postcss-markdown@0.36.0(postcss-syntax@0.36.2(postcss-less@6.0.0(postcss@8.4.47))(postcss@8.4.47))(postcss@7.0.39): dependencies: postcss: 7.0.39 - postcss-syntax: 0.36.2(postcss-html@0.36.0)(postcss-jsx@0.36.4)(postcss-less@3.1.4)(postcss-markdown@0.36.0)(postcss-scss@2.1.1)(postcss@7.0.39) + postcss-syntax: 0.36.2(postcss-html@0.36.0(postcss-syntax@0.36.2(postcss-less@6.0.0(postcss@8.4.47))(postcss@8.4.47))(postcss@7.0.39))(postcss-jsx@0.36.4(postcss-syntax@0.36.2(postcss-less@6.0.0(postcss@8.4.47))(postcss@8.4.47))(postcss@7.0.39))(postcss-less@3.1.4)(postcss-markdown@0.36.0)(postcss-scss@2.1.1)(postcss@7.0.39) remark: 10.0.1 unist-util-find-all-after: 1.0.5 @@ -12976,7 +12975,7 @@ snapshots: dependencies: postcss: 8.4.47 - postcss-syntax@0.36.2(postcss-html@0.36.0)(postcss-jsx@0.36.4)(postcss-less@3.1.4)(postcss-markdown@0.36.0)(postcss-scss@2.1.1)(postcss@7.0.39): + postcss-syntax@0.36.2(postcss-html@0.36.0(postcss-syntax@0.36.2(postcss-less@6.0.0(postcss@8.4.47))(postcss@8.4.47))(postcss@7.0.39))(postcss-jsx@0.36.4(postcss-syntax@0.36.2(postcss-less@6.0.0(postcss@8.4.47))(postcss@8.4.47))(postcss@7.0.39))(postcss-less@3.1.4)(postcss-markdown@0.36.0)(postcss-scss@2.1.1)(postcss@7.0.39): dependencies: postcss: 7.0.39 optionalDependencies: @@ -14341,7 +14340,7 @@ snapshots: postcss-sass: 0.3.5 postcss-scss: 2.1.1 postcss-selector-parser: 3.1.2 - postcss-syntax: 0.36.2(postcss-html@0.36.0)(postcss-jsx@0.36.4)(postcss-less@3.1.4)(postcss-markdown@0.36.0)(postcss-scss@2.1.1)(postcss@7.0.39) + postcss-syntax: 0.36.2(postcss-html@0.36.0(postcss-syntax@0.36.2(postcss-less@6.0.0(postcss@8.4.47))(postcss@8.4.47))(postcss@7.0.39))(postcss-jsx@0.36.4(postcss-syntax@0.36.2(postcss-less@6.0.0(postcss@8.4.47))(postcss@8.4.47))(postcss@7.0.39))(postcss-less@3.1.4)(postcss-markdown@0.36.0)(postcss-scss@2.1.1)(postcss@7.0.39) postcss-value-parser: 3.3.1 resolve-from: 4.0.0 signal-exit: 3.0.7 @@ -14405,6 +14404,18 @@ snapshots: supports-preserve-symlinks-flag@1.0.0: {} + svelte-check@4.0.2(picomatch@4.0.2)(svelte@4.2.19)(typescript@5.6.2): + dependencies: + '@jridgewell/trace-mapping': 0.3.25 + chokidar: 3.6.0 + fdir: 6.3.0(picomatch@4.0.2) + picocolors: 1.1.0 + sade: 1.8.1 + svelte: 4.2.19 + typescript: 5.6.2 + transitivePeerDependencies: + - picomatch + svelte-eslint-parser@0.41.1(svelte@4.2.19): dependencies: eslint-scope: 7.2.2 @@ -14441,7 +14452,7 @@ snapshots: svelte: 4.2.19 tiny-glob: 0.2.9 - svelte-preprocess@5.1.4(@babel/core@7.25.2)(coffeescript@2.7.0)(less@4.2.0)(postcss-load-config@6.0.1(jiti@1.21.6)(postcss@8.4.47)(tsx@4.19.1)(yaml@2.5.1))(postcss@8.4.47)(pug@3.0.3)(sass@1.78.0)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.47))(svelte@4.2.19)(typescript@5.6.2): + svelte-preprocess@5.1.4(@babel/core@7.25.2)(coffeescript@2.7.0)(less@4.2.0)(postcss-load-config@3.1.4(postcss@8.4.47)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@18.19.50)(typescript@5.5.4)))(postcss@8.4.47)(pug@3.0.3)(sass@1.78.0)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.47))(svelte@4.2.19)(typescript@5.6.2): dependencies: '@types/pug': 2.0.10 detect-indent: 6.1.0 @@ -14454,7 +14465,7 @@ snapshots: coffeescript: 2.7.0 less: 4.2.0 postcss: 8.4.47 - postcss-load-config: 6.0.1(jiti@1.21.6)(postcss@8.4.47)(tsx@4.19.1)(yaml@2.5.1) + postcss-load-config: 3.1.4(postcss@8.4.47)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@18.19.50)(typescript@5.5.4)) pug: 3.0.3 sass: 1.78.0 stylus: 0.63.0 diff --git a/tsconfig.json b/tsconfig.json index 783ea1a9..eb4eb511 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -8,6 +8,7 @@ "importHelpers": true, "moduleResolution": "Node", "jsx": "preserve", + "noImplicitAny": false, "skipLibCheck": true, "esModuleInterop": true, "allowSyntheticDefaultImports": true, From 023317e5e9bad75369961d5e1deb588665057ca3 Mon Sep 17 00:00:00 2001 From: Col0ring <1561999073@qq.com> Date: Wed, 25 Sep 2024 20:13:45 +0800 Subject: [PATCH 16/51] fix: duplicate --- .lintstagedrc | 2 +- frontend/antd/grid/col/Index.svelte | 3 +-- frontend/antd/splitter/panel/Index.svelte | 1 - 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.lintstagedrc b/.lintstagedrc index cfaf6972..e1370fbc 100644 --- a/.lintstagedrc +++ b/.lintstagedrc @@ -1,6 +1,6 @@ { "*.{less,css}": ["pnpm run lint:style", "pnpm run format"], - "*.{js,jsx,ts,tsx}": ["pnpm run lint:js", "pnpm run format"], + "*.{js,jsx,ts,tsx,svelte}": ["pnpm run lint:js", "pnpm run format"], "*.{md,yaml,yml,json,html}": ["pnpm run format"], "*.py": ["pnpm run lint:py"] } diff --git a/frontend/antd/grid/col/Index.svelte b/frontend/antd/grid/col/Index.svelte index d99f78a2..6420e27a 100644 --- a/frontend/antd/grid/col/Index.svelte +++ b/frontend/antd/grid/col/Index.svelte @@ -60,8 +60,7 @@ style: $mergedProps.elem_style, className: cls($mergedProps.elem_classes, 'ms-gr-antd-col'), id: $mergedProps.elem_id, - ...$mergedProps.restProps, - ...$mergedProps.restProps, + ...$mergedProps.props, ...bindEvents($mergedProps), }, diff --git a/frontend/antd/splitter/panel/Index.svelte b/frontend/antd/splitter/panel/Index.svelte index d413dedb..1897ac84 100644 --- a/frontend/antd/splitter/panel/Index.svelte +++ b/frontend/antd/splitter/panel/Index.svelte @@ -64,7 +64,6 @@ ), id: $mergedProps.elem_id, ...$mergedProps.restProps, - ...$mergedProps.restProps, ...$mergedProps.props, ...bindEvents($mergedProps), }, From d874a4f3ddbb1d59689162535d494eac75f466e5 Mon Sep 17 00:00:00 2001 From: Col0ring <1561999073@qq.com> Date: Mon, 30 Sep 2024 17:00:26 +0800 Subject: [PATCH 17/51] fix: float button --- .../components/antd/button/__init__.py | 19 +++-- .../components/antd/float_button/__init__.py | 39 ++++++++- .../antd/float_button/back_top/__init__.py | 50 ++++++++++- .../antd/float_button/group/__init__.py | 69 +++++++++++++-- .../components/base/div/__init__.py | 4 +- .../components/base/span/__init__.py | 3 +- eslint.config.mjs | 2 +- frontend/antd/float-button/Index.svelte | 27 +++--- .../back-top/float-button.back-top.tsx | 12 ++- frontend/antd/float-button/float-button.tsx | 13 +-- frontend/antd/float-button/group/Index.svelte | 27 +++--- .../float-button/group/float-button.group.tsx | 83 +++++++++++-------- frontend/antd/icon/icon.tsx | 1 + frontend/base/div/Index.svelte | 28 ++++--- frontend/base/span/Index.svelte | 28 ++++--- frontend/svelte-preprocess-react/component.ts | 55 +++++++----- .../events-polyfills.ts | 1 - .../svelte-preprocess-react/react-slot.tsx | 2 + frontend/svelte-preprocess-react/slot.ts | 22 ++++- frontend/utils/hooks/useSlotsChildren.ts | 23 +++++ 20 files changed, 372 insertions(+), 136 deletions(-) create mode 100644 frontend/utils/hooks/useSlotsChildren.ts diff --git a/backend/modelscope_studio/components/antd/button/__init__.py b/backend/modelscope_studio/components/antd/button/__init__.py index 94a06b86..84b11486 100644 --- a/backend/modelscope_studio/components/antd/button/__init__.py +++ b/backend/modelscope_studio/components/antd/button/__init__.py @@ -16,17 +16,18 @@ class AntdButton(ModelScopeLayoutComponent): In Ant Design we provide 5 types of button. - Primary button: used for the main action, there can be at most one primary button in a section. - Default button: used for a series of actions without priority. - Dashed button: commonly used for adding more actions. - Text button: used for the most secondary action. - Link button: used for external links. + - Primary button: used for the main action, there can be at most one primary button in a section. + - Default button: used for a series of actions without priority. + - Dashed button: commonly used for adding more actions. + - Text button: used for the most secondary action. + - Link button: used for external links. + And 4 other properties additionally. - danger: used for actions of risk, like deletion or authorization. - ghost: used in situations with complex background, home pages usually. - disabled: used when actions are not available. - loading: adds a loading spinner in button, avoids multiple submits too. + - danger: used for actions of risk, like deletion or authorization. + - ghost: used in situations with complex background, home pages usually. + - disabled: used when actions are not available. + - loading: adds a loading spinner in button, avoids multiple submits too. """ Group = AntdButtonGroup diff --git a/backend/modelscope_studio/components/antd/float_button/__init__.py b/backend/modelscope_studio/components/antd/float_button/__init__.py index 94f42824..56f29c08 100644 --- a/backend/modelscope_studio/components/antd/float_button/__init__.py +++ b/backend/modelscope_studio/components/antd/float_button/__init__.py @@ -1,5 +1,7 @@ from __future__ import annotations +from typing import Literal + from gradio.events import EventListener from ....utils.dev import ModelScopeLayoutComponent, resolve_frontend_dir @@ -9,13 +11,18 @@ class AntdFloatButton(ModelScopeLayoutComponent): """ + A button that floats at the top of the page. + + - For global functionality on the site. + - Buttons that can be seen wherever you browse. """ BackTop = AntdFloatButtonBackTop Group = AntdFloatButtonGroup EVENTS = [ EventListener("click", callback=lambda block: block._internal.update( - bind_click_event=True)) + bind_click_event=True), + doc="Set the handler to handle `click` event.") ] # supported slots @@ -25,6 +32,15 @@ def __init__( self, props: dict | None = None, *, + icon: str | None = None, + description: str | None = None, + tooltip: str | None = None, + type: Literal['default', 'primary'] = 'default', + shape: Literal['circle', 'square'] = 'circle', + href: str | None = None, + href_target: str | None = None, + html_type: Literal['submit', 'reset', 'button'] | None = 'button', + badge: dict | None = None, as_item: str | None = None, _internal: None = None, # gradio properties @@ -34,6 +50,18 @@ def __init__( elem_style: dict | None = None, render: bool = True, **kwargs): + """ + Parameters: + icon: Set the icon component of button. + description: Text and other. + tooltip: The text shown in the tooltip. + type: Setting button type. + shape: Setting button shape. + href_target: The target of hyperlink. + target: Specifies where to display the linked URL string. + htmlType: Set the original html type of button. + badge: Attach Badge to FloatButton. status and other props related are not supported. + """ super().__init__(visible=visible, elem_id=elem_id, elem_classes=elem_classes, @@ -42,6 +70,15 @@ def __init__( elem_style=elem_style, **kwargs) self.props = props + self.icon = icon + self.description = description + self.tooltip = tooltip + self.type = type + self.shape = shape + self.href = href + self.href_target = href_target + self.html_type = html_type + self.badge = badge FRONTEND_DIR = resolve_frontend_dir("float-button") diff --git a/backend/modelscope_studio/components/antd/float_button/back_top/__init__.py b/backend/modelscope_studio/components/antd/float_button/back_top/__init__.py index 604abf76..d57d0c54 100644 --- a/backend/modelscope_studio/components/antd/float_button/back_top/__init__.py +++ b/backend/modelscope_studio/components/antd/float_button/back_top/__init__.py @@ -1,5 +1,7 @@ from __future__ import annotations +from typing import Literal + from gradio.events import EventListener from .....utils.dev import ModelScopeLayoutComponent, resolve_frontend_dir @@ -7,12 +9,20 @@ class AntdFloatButtonBackTop(ModelScopeLayoutComponent): """ + A button that floats at the top of the page. + + - For global functionality on the site. + - Buttons that can be seen wherever you browse. """ EVENTS = [ - EventListener("click", - callback=lambda block: block._internal.update( - bind_click_event=True)) + EventListener( + "click", + callback=lambda block: block._internal.update(bind_click_event=True + ), + doc= + "A callback function, which can be executed when you click the button." + ) ] # supported slots @@ -22,7 +32,17 @@ def __init__( self, props: dict | None = None, *, + icon: str | None = None, + description: str | None = None, + tooltip: str | None = None, + type: Literal['default', 'primary'] = 'default', + shape: Literal['circle', 'square'] = 'circle', + href: str | None = None, + html_type: Literal['submit', 'reset', 'button'] | None = 'button', + badge: dict | None = None, + duration: int | float = 450, elem_target: str | None = None, + visibility_height: int | float = 400, as_item: str | None = None, _internal: None = None, # gradio properties @@ -32,6 +52,20 @@ def __init__( elem_style: dict | None = None, render: bool = True, **kwargs): + """ + Parameters: + icon: Set the icon component of button. + description: Text and other. + tooltip: The text shown in the tooltip. + type: Setting button type. + shape: Setting button shape. + target: Specifies where to display the linked URL string. + htmlType: Set the original html type of button. + badge: Attach Badge to FloatButton. status and other props related are not supported. + duration: Time to return to top(ms). + elem_target: Specifies the scrollable area dom node. + visibility_height: The BackTop button will not show until the scroll height reaches this value. + """ super().__init__(visible=visible, elem_id=elem_id, elem_classes=elem_classes, @@ -40,6 +74,16 @@ def __init__( elem_style=elem_style, **kwargs) self.props = props + self.icon = icon + self.description = description + self.tooltip = tooltip + self.type = type + self.shape = shape + self.href = href + self.html_type = html_type + self.badge = badge + self.duration = duration + self.visibility_height = visibility_height self.elem_target = elem_target FRONTEND_DIR = resolve_frontend_dir("float-button", "back-top") diff --git a/backend/modelscope_studio/components/antd/float_button/group/__init__.py b/backend/modelscope_studio/components/antd/float_button/group/__init__.py index dc9795e3..8850eb66 100644 --- a/backend/modelscope_studio/components/antd/float_button/group/__init__.py +++ b/backend/modelscope_studio/components/antd/float_button/group/__init__.py @@ -1,5 +1,7 @@ from __future__ import annotations +from typing import Literal + from gradio.events import EventListener from .....utils.dev import ModelScopeLayoutComponent, resolve_frontend_dir @@ -7,15 +9,25 @@ class AntdFloatButtonGroup(ModelScopeLayoutComponent): """ - """ + A button that floats at the top of the page. + - For global functionality on the site. + - Buttons that can be seen wherever you browse. + """ EVENTS = [ - EventListener("click", - callback=lambda block: block._internal.update( - bind_click_event=True)), - EventListener("open_change", - callback=lambda block: block._internal.update( - bind_openChange_event=True)) + EventListener( + "click", + callback=lambda block: block._internal.update(bind_click_event=True + ), + doc= + "Set the handler to handle click event (only work in Menu mode)."), + EventListener( + "open_change", + callback=lambda block: block._internal.update(bind_openChange_event + =True), + doc= + "Callback executed when active menu is changed, use it with trigger." + ) ] # supported slots @@ -25,7 +37,21 @@ def __init__( self, props: dict | None = None, *, + icon: str | None = None, + description: str | None = None, + tooltip: str | None = None, + type: Literal['default', 'primary'] = 'default', + shape: Literal['circle', 'square'] = 'circle', + href: str | None = None, + href_target: str | None = None, + html_type: Literal['submit', 'reset', 'button'] | None = 'button', + badge: dict | None = None, + trigger: Literal['hover', 'click'] | None = None, as_item: str | None = None, + open: bool | None = None, + close_icon: str | None = None, + placement: Literal['left', 'right', 'top', 'bottom'] + | None = 'top', _internal: None = None, # gradio properties visible: bool = True, @@ -34,6 +60,22 @@ def __init__( elem_style: dict | None = None, render: bool = True, **kwargs): + """ + Parameters: + icon: Set the icon component of button. + description: Text and other. + tooltip: The text shown in the tooltip. + type: Setting button type. + shape: Setting button shape. + href_target: The target of hyperlink. + target: Specifies where to display the linked URL string. + htmlType: Set the original html type of button. + badge: Attach Badge to FloatButton. status and other props related are not supported. + trigger: Which action can trigger menu open/close. + open: Whether the menu is visible or not, use it with trigger. + closeIcon: Customize close button icon. + placement: Customize menu animation placement. + """ super().__init__(visible=visible, elem_id=elem_id, elem_classes=elem_classes, @@ -42,6 +84,19 @@ def __init__( elem_style=elem_style, **kwargs) self.props = props + self.icon = icon + self.description = description + self.tooltip = tooltip + self.type = type + self.shape = shape + self.href = href + self.href_target = href_target + self.html_type = html_type + self.badge = badge + self.trigger = trigger + self.open = open + self.close_icon = close_icon + self.placement = placement FRONTEND_DIR = resolve_frontend_dir("float-button", "group") diff --git a/backend/modelscope_studio/components/base/div/__init__.py b/backend/modelscope_studio/components/base/div/__init__.py index 60a7b275..7fdd1b62 100644 --- a/backend/modelscope_studio/components/base/div/__init__.py +++ b/backend/modelscope_studio/components/base/div/__init__.py @@ -7,6 +7,7 @@ from ....utils.dev import ModelScopeLayoutComponent, resolve_frontend_dir from ...antd.carousel import AntdCarousel from ...antd.space import AntdSpace +from ..slot import ModelScopeSlot class ModelScopeDiv(ModelScopeLayoutComponent): @@ -64,9 +65,10 @@ def __init__( as_item=as_item, elem_style=elem_style, **kwargs) + if self.parent and self._internal and (any( isinstance(self.parent, component) - for component in [AntdCarousel, AntdSpace])): + for component in [AntdCarousel, AntdSpace, ModelScopeSlot])): self._internal.update(fragment=True) self.value = value self.props = props diff --git a/backend/modelscope_studio/components/base/span/__init__.py b/backend/modelscope_studio/components/base/span/__init__.py index eafd1ca3..eda853d1 100644 --- a/backend/modelscope_studio/components/base/span/__init__.py +++ b/backend/modelscope_studio/components/base/span/__init__.py @@ -7,6 +7,7 @@ from ....utils.dev import ModelScopeLayoutComponent, resolve_frontend_dir from ...antd.carousel import AntdCarousel from ...antd.space import AntdSpace +from ..slot import ModelScopeSlot class ModelScopeSpan(ModelScopeLayoutComponent): @@ -66,7 +67,7 @@ def __init__( **kwargs) if self.parent and self._internal and (any( isinstance(self.parent, component) - for component in [AntdCarousel, AntdSpace])): + for component in [AntdCarousel, AntdSpace, ModelScopeSlot])): self._internal.update(fragment=True) self.value = value self.props = props diff --git a/eslint.config.mjs b/eslint.config.mjs index 01522bcd..013a9444 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -1,7 +1,7 @@ import baseConfig from '@modelscope-studio/lint-config/eslint'; /** - * @type {import('eslint').Linter.FlatConfig[]} + * @type {import('eslint').Linter.Config[]} */ const config = []; diff --git a/frontend/antd/float-button/Index.svelte b/frontend/antd/float-button/Index.svelte index b923538c..b3e73778 100644 --- a/frontend/antd/float-button/Index.svelte +++ b/frontend/antd/float-button/Index.svelte @@ -28,17 +28,22 @@ export let elem_classes: string[] = []; export let elem_style: React.CSSProperties = {}; - const [mergedProps, update] = getSlotContext({ - gradio, - props: $updatedProps, - _internal, - visible, - elem_id, - elem_classes, - elem_style, - as_item, - restProps: $$restProps, - }); + const [mergedProps, update] = getSlotContext( + { + gradio, + props: $updatedProps, + _internal, + visible, + elem_id, + elem_classes, + elem_style, + as_item, + restProps: $$restProps, + }, + { + href_target: 'target', + } + ); const slots = getSlots(); $: update({ gradio, diff --git a/frontend/antd/float-button/back-top/float-button.back-top.tsx b/frontend/antd/float-button/back-top/float-button.back-top.tsx index eb494320..f4d1b483 100644 --- a/frontend/antd/float-button/back-top/float-button.back-top.tsx +++ b/frontend/antd/float-button/back-top/float-button.back-top.tsx @@ -11,19 +11,24 @@ export const FloatButtonBackTop = sveltify< const targetFunction = useFunction(target); return ( <> +
{children}
: props.icon} + icon={slots.icon ? : props.icon} description={ slots.description ? ( - + ) : ( props.description ) } tooltip={ - slots.tooltip ? : props.tooltip + slots.tooltip ? ( + + ) : ( + props.tooltip + ) } badge={{ ...props.badge, @@ -34,7 +39,6 @@ export const FloatButtonBackTop = sveltify< ), }} /> - {children} ); }); diff --git a/frontend/antd/float-button/float-button.tsx b/frontend/antd/float-button/float-button.tsx index 290e4750..a65e101f 100644 --- a/frontend/antd/float-button/float-button.tsx +++ b/frontend/antd/float-button/float-button.tsx @@ -11,18 +11,23 @@ export const FloatButton = sveltify< >(({ slots, children, ...props }) => { return ( <> +
{children}
: props.icon} + icon={slots.icon ? : props.icon} description={ slots.description ? ( - + ) : ( props.description ) } tooltip={ - slots.tooltip ? : props.tooltip + slots.tooltip ? ( + + ) : ( + props.tooltip + ) } badge={{ ...props.badge, @@ -33,8 +38,6 @@ export const FloatButton = sveltify< ), }} /> - {/* render the slots */} - {children} ); }); diff --git a/frontend/antd/float-button/group/Index.svelte b/frontend/antd/float-button/group/Index.svelte index 6880726d..414f8ae4 100644 --- a/frontend/antd/float-button/group/Index.svelte +++ b/frontend/antd/float-button/group/Index.svelte @@ -30,17 +30,22 @@ export let elem_classes: string[] = []; export let elem_style: React.CSSProperties = {}; - const [mergedProps, update] = getSlotContext({ - gradio, - props: $updatedProps, - _internal, - visible, - elem_id, - elem_classes, - elem_style, - as_item, - restProps: $$restProps, - }); + const [mergedProps, update] = getSlotContext( + { + gradio, + props: $updatedProps, + _internal, + visible, + elem_id, + elem_classes, + elem_style, + as_item, + restProps: $$restProps, + }, + { + href_target: 'target', + } + ); const slots = getSlots(); $: update({ gradio, diff --git a/frontend/antd/float-button/group/float-button.group.tsx b/frontend/antd/float-button/group/float-button.group.tsx index 6c482504..0e6ba5e0 100644 --- a/frontend/antd/float-button/group/float-button.group.tsx +++ b/frontend/antd/float-button/group/float-button.group.tsx @@ -1,6 +1,7 @@ import { sveltify } from '@svelte-preprocess-react'; import { ReactSlot } from '@svelte-preprocess-react/react-slot'; import React from 'react'; +import { useSlotsChildren } from '@utils/hooks/useSlotsChildren'; import { FloatButton as AFloatButton, type GetProps, theme } from 'antd'; import cls from 'classnames'; @@ -11,43 +12,57 @@ export const FloatButtonGroup = sveltify< id?: string; }, ['icon', 'closeIcon', 'description', 'tooltip', 'badge.count'] ->(({ slots, style, shape = 'circle', className, ...props }) => { +>(({ children, slots, style, shape = 'circle', className, ...props }) => { const { token } = theme.useToken(); + const [slotsChildren, restChildren] = useSlotsChildren(children); return ( - : props.closeIcon - } - icon={slots.icon ? : props.icon} - description={ - slots.description ? ( - - ) : ( - props.description - ) - } - tooltip={ - slots.tooltip ? : props.tooltip - } - badge={{ - ...props.badge, - count: slots['badge.count'] ? ( - - ) : ( - props.badge?.count - ), - }} - /> + <> +
{slotsChildren}
+ + ) : ( + props.closeIcon + ) + } + icon={slots.icon ? : props.icon} + description={ + slots.description ? ( + + ) : ( + props.description + ) + } + tooltip={ + slots.tooltip ? ( + + ) : ( + props.tooltip + ) + } + badge={{ + ...props.badge, + count: slots['badge.count'] ? ( + + ) : ( + props.badge?.count + ), + }} + > + {restChildren} + + ); }); diff --git a/frontend/antd/icon/icon.tsx b/frontend/antd/icon/icon.tsx index a58536ed..41ef8d93 100644 --- a/frontend/antd/icon/icon.tsx +++ b/frontend/antd/icon/icon.tsx @@ -12,6 +12,7 @@ export const Icon = sveltify< const icon = icons[name as keyof typeof icons] as React.ComponentType< GetProps >; + return ( <> {icon ? ( diff --git a/frontend/base/div/Index.svelte b/frontend/base/div/Index.svelte index f41fbe70..3a3cbbd1 100644 --- a/frontend/base/div/Index.svelte +++ b/frontend/base/div/Index.svelte @@ -30,18 +30,22 @@ let el: HTMLDivElement | undefined; - const [mergedProps, update] = getSlotContext({ - gradio, - props: $updatedProps, - _internal, - value, - as_item, - visible, - elem_id, - elem_classes, - elem_style, - restProps: $$restProps, - }); + const [mergedProps, update] = getSlotContext( + { + gradio, + props: $updatedProps, + _internal, + value, + as_item, + visible, + elem_id, + elem_classes, + elem_style, + restProps: $$restProps, + }, + undefined, + { shouldRestSlotKey: !_internal.fragment } + ); $: update({ gradio, props: $updatedProps, diff --git a/frontend/base/span/Index.svelte b/frontend/base/span/Index.svelte index 9ba7d452..4c856369 100644 --- a/frontend/base/span/Index.svelte +++ b/frontend/base/span/Index.svelte @@ -30,18 +30,22 @@ let el: HTMLSpanElement | undefined; - const [mergedProps, update] = getSlotContext({ - gradio, - props: $updatedProps, - _internal, - value, - as_item, - visible, - elem_id, - elem_classes, - elem_style, - restProps: $$restProps, - }); + const [mergedProps, update] = getSlotContext( + { + gradio, + props: $updatedProps, + _internal, + value, + as_item, + visible, + elem_id, + elem_classes, + elem_style, + restProps: $$restProps, + }, + undefined, + { shouldRestSlotKey: !_internal.fragment } + ); $: update({ gradio, props: $updatedProps, diff --git a/frontend/svelte-preprocess-react/component.ts b/frontend/svelte-preprocess-react/component.ts index 5e8cce2f..4c9ca8d8 100644 --- a/frontend/svelte-preprocess-react/component.ts +++ b/frontend/svelte-preprocess-react/component.ts @@ -29,26 +29,28 @@ function convertToCamelCase(str: string) { }); } +const gradioProps = [ + 'interactive', + 'gradio', + 'server', + 'target', + 'theme_mode', + 'root', + 'name', + 'visible', + 'elem_id', + 'elem_classes', + 'elem_style', + '_internal', + 'props', + 'value', + 'attached_events', +]; + export function getComponentRestProps>( props: T, mapping: Record = {} as Record ) { - const gradioProps = [ - 'interactive', - 'gradio', - 'server', - 'target', - 'theme_mode', - 'root', - 'name', - 'visible', - 'elem_id', - 'elem_classes', - 'elem_style', - '_internal', - 'props', - 'value', - ]; return mapKeys(omit(props, gradioProps), (_, key) => { return mapping[key] || convertToCamelCase(key); }); @@ -59,9 +61,17 @@ export function bindEvents< gradio: Gradio; _internal: Record; props: Record; + restProps?: Record; + originalRestProps?: Record; }, >(props: T) { - const { gradio, _internal: internal, ...component } = props; + const { + gradio, + _internal: internal, + restProps, + originalRestProps, + ...component + } = props; return Object.keys(internal).reduce( (acc, key) => { @@ -96,19 +106,24 @@ export function bindEvents< event.replace(/[A-Z]/g, (letter) => '_' + letter.toLowerCase()), { payload, - component, + component: { + ...component, + ...omit(originalRestProps, gradioProps), + }, } ); }; if (splitted.length > 1) { let value: Record = { - ...(component.props[splitted[0]] || {}), + ...(component.props[splitted[0]] || restProps?.[splitted[0]] || {}), }; acc[splitted[0]] = value; for (let i = 1; i < splitted.length - 1; i++) { const prop = { - ...(component.props[splitted[i]] || {}), + ...(component.props[splitted[i]] || + restProps?.[splitted[i]] || + {}), }; value[splitted[i]] = prop; value = prop; diff --git a/frontend/svelte-preprocess-react/events-polyfills.ts b/frontend/svelte-preprocess-react/events-polyfills.ts index e6352a38..49ad9c08 100644 --- a/frontend/svelte-preprocess-react/events-polyfills.ts +++ b/frontend/svelte-preprocess-react/events-polyfills.ts @@ -37,7 +37,6 @@ Element.prototype.addEventListener = function ( options?: boolean | AddEventListenerOptions ): void { if (options === undefined) options = false; - // declare listener this._addEventListener(type, listener, options); diff --git a/frontend/svelte-preprocess-react/react-slot.tsx b/frontend/svelte-preprocess-react/react-slot.tsx index af919607..77f095ae 100644 --- a/frontend/svelte-preprocess-react/react-slot.tsx +++ b/frontend/svelte-preprocess-react/react-slot.tsx @@ -22,6 +22,7 @@ function cloneElementWithEvents(element: HTMLElement) { const elementsChildrenArray = Array.from(element.children); for (let i = 0; i < elementsChildrenArray.length; i++) { const child = elementsChildrenArray[i]; + const clonedChild = cloneElementWithEvents(child as HTMLElement); clonedElement.replaceChild(clonedChild, clonedElement.children[i]); } @@ -48,6 +49,7 @@ export const ReactSlot = forwardRef( return; } let cloned = slot; + function mountElementProps() { let child = cloned as Element; if ( diff --git a/frontend/svelte-preprocess-react/slot.ts b/frontend/svelte-preprocess-react/slot.ts index 6a7ef1d3..df44021d 100644 --- a/frontend/svelte-preprocess-react/slot.ts +++ b/frontend/svelte-preprocess-react/slot.ts @@ -81,8 +81,19 @@ export function getSlotContext< }, >( props: T, - restPropsMapping?: Record -): [Writable, (props: T) => void] { + restPropsMapping?: Record, + options?: { + shouldRestSlotKey?: boolean; + } +): [ + Writable< + T & { + originalRestProps?: Record; + } + >, + (props: T) => void, +] { + const shouldRestSlotKey = options?.shouldRestSlotKey ?? true; if (!Reflect.has(props, 'as_item') || !Reflect.has(props, '_internal')) { throw new Error('`as_item` and `_internal` is required'); } @@ -98,7 +109,9 @@ export function getSlotContext< }); } // reset slot key to make sure the sub component does not be affected by gr.Slot() - resetSlotKey(); + if (shouldRestSlotKey) { + resetSlotKey(); + } const ctx = getContext(slotContextKey) as Writable; const as_item = get(ctx)?.as_item || props.as_item; const initialCtxValue: Record = ctx @@ -124,6 +137,7 @@ export function getSlotContext< ...props, ...initialCtxValue, restProps: mergeRestProps(props.restProps, initialCtxValue), + originalRestProps: props.restProps, }); if (!ctx) { return [ @@ -132,6 +146,7 @@ export function getSlotContext< mergedProps.set({ ...v, restProps: mergeRestProps(v.restProps), + originalRestProps: v.restProps, }); }, ]; @@ -158,6 +173,7 @@ export function getSlotContext< ...v, ...ctxValue, restProps: mergeRestProps(v.restProps, ctxValue), + originalRestProps: v.restProps, }); }, ]; diff --git a/frontend/utils/hooks/useSlotsChildren.ts b/frontend/utils/hooks/useSlotsChildren.ts new file mode 100644 index 00000000..7658c792 --- /dev/null +++ b/frontend/utils/hooks/useSlotsChildren.ts @@ -0,0 +1,23 @@ +import { type TreeNode } from '@svelte-preprocess-react'; +import React, { useMemo } from 'react'; + +export function useSlotsChildren( + children: React.ReactNode +): [slotsChildren: React.ReactNode[], restChildren: React.ReactNode[]] { + return useMemo(() => { + const array = React.Children.toArray(children) as React.ReactElement<{ + node: TreeNode; + nodeSlotKey?: string; + }>[]; + const slotsChildren: React.ReactNode[] = []; + const restChildren: React.ReactNode[] = []; + array.forEach((child) => { + if (child.props.node && child.props.nodeSlotKey) { + slotsChildren.push(child); + } else { + restChildren.push(child); + } + }); + return [slotsChildren, restChildren]; + }, [children]); +} From 093404af4a5ea090537d220ab7ef868165b5cf95 Mon Sep 17 00:00:00 2001 From: Col0ring <1561999073@qq.com> Date: Tue, 8 Oct 2024 19:07:31 +0800 Subject: [PATCH 18/51] feat: clone react element --- .../float-button/group/float-button.group.tsx | 2 +- frontend/antd/icon/icon.tsx | 1 - .../antd/icon/iconfont-provider/Index.svelte | 20 +++--- frontend/fixtures.d.ts | 4 ++ .../internal/Bridge.ts | 11 ++-- .../svelte-preprocess-react/react-slot.tsx | 62 ++++++++++++++++--- 6 files changed, 77 insertions(+), 23 deletions(-) diff --git a/frontend/antd/float-button/group/float-button.group.tsx b/frontend/antd/float-button/group/float-button.group.tsx index 0e6ba5e0..1cb83e74 100644 --- a/frontend/antd/float-button/group/float-button.group.tsx +++ b/frontend/antd/float-button/group/float-button.group.tsx @@ -14,8 +14,8 @@ export const FloatButtonGroup = sveltify< ['icon', 'closeIcon', 'description', 'tooltip', 'badge.count'] >(({ children, slots, style, shape = 'circle', className, ...props }) => { const { token } = theme.useToken(); - const [slotsChildren, restChildren] = useSlotsChildren(children); + const [slotsChildren, restChildren] = useSlotsChildren(children); return ( <>
{slotsChildren}
diff --git a/frontend/antd/icon/icon.tsx b/frontend/antd/icon/icon.tsx index 41ef8d93..a58536ed 100644 --- a/frontend/antd/icon/icon.tsx +++ b/frontend/antd/icon/icon.tsx @@ -12,7 +12,6 @@ export const Icon = sveltify< const icon = icons[name as keyof typeof icons] as React.ComponentType< GetProps >; - return ( <> {icon ? ( diff --git a/frontend/antd/icon/iconfont-provider/Index.svelte b/frontend/antd/icon/iconfont-provider/Index.svelte index 502b8321..4bd11211 100644 --- a/frontend/antd/icon/iconfont-provider/Index.svelte +++ b/frontend/antd/icon/iconfont-provider/Index.svelte @@ -15,13 +15,19 @@ // gradio properties export let visible = true; - const [mergedProps, update] = getSlotContext({ - props: $updatedProps, - _internal, - visible, - as_item, - restProps: $$restProps, - }); + const [mergedProps, update] = getSlotContext( + { + props: $updatedProps, + _internal, + visible, + as_item, + restProps: $$restProps, + }, + undefined, + { + shouldRestSlotKey: false, + } + ); $: update({ props: $updatedProps, _internal, diff --git a/frontend/fixtures.d.ts b/frontend/fixtures.d.ts index 713e5df4..ecd94893 100644 --- a/frontend/fixtures.d.ts +++ b/frontend/fixtures.d.ts @@ -9,3 +9,7 @@ declare module '*?inline' { interface Window { __gradio_space__: any; } + +interface Element { + _reactElement: React.ReactElement; +} diff --git a/frontend/svelte-preprocess-react/internal/Bridge.ts b/frontend/svelte-preprocess-react/internal/Bridge.ts index 879f97c1..bcd211dd 100644 --- a/frontend/svelte-preprocess-react/internal/Bridge.ts +++ b/frontend/svelte-preprocess-react/internal/Bridge.ts @@ -63,6 +63,7 @@ const Bridge: React.FC = ({ createPortal, node }) => { key: `bridge${subnode.key}`, createPortal, node: subnode, + // slotKey nodeSlotKey: subSlotKeys[i], }) ); @@ -81,12 +82,14 @@ const Bridge: React.FC = ({ createPortal, node }) => { ); } } + // render in different container - return createPortal( + const element = children === undefined ? React.createElement(node.reactComponent, props) - : React.createElement(node.reactComponent, props, children), - target - ); + : React.createElement(node.reactComponent, props, ...children); + target._reactElement = element; + + return createPortal(element, target); }; export default Bridge; diff --git a/frontend/svelte-preprocess-react/react-slot.tsx b/frontend/svelte-preprocess-react/react-slot.tsx index 77f095ae..58aca1a7 100644 --- a/frontend/svelte-preprocess-react/react-slot.tsx +++ b/frontend/svelte-preprocess-react/react-slot.tsx @@ -1,4 +1,5 @@ -import React, { forwardRef, useEffect, useRef } from 'react'; +import React, { forwardRef, useEffect, useRef, useState } from 'react'; +import { createPortal } from 'react-dom'; import { styleObject2HtmlStyle } from '@utils/styleObject2String'; export interface ReactSlotProps { @@ -9,7 +10,33 @@ export interface ReactSlotProps { } function cloneElementWithEvents(element: HTMLElement) { - const clonedElement = element.cloneNode(true) as HTMLElement; + const portals: React.ReactPortal[] = []; + + const clonedElement = element.cloneNode(false) as HTMLElement; + + if (element._reactElement) { + portals.push( + createPortal( + React.cloneElement(element._reactElement, { + ...element._reactElement.props, + children: React.Children.toArray( + element._reactElement.props.children + ).map((child) => { + // get svelte-slot + if (React.isValidElement(child) && child.props.__slot__) { + return child; + } + return null; + }), + }), + clonedElement + ) + ); + return { + clonedElement, + portals, + }; + } // clone eventListener Object.keys(element.getEventListeners()).forEach((eventName) => { const listeners = element.getEventListeners( @@ -20,14 +47,21 @@ function cloneElementWithEvents(element: HTMLElement) { }); }); const elementsChildrenArray = Array.from(element.children); + for (let i = 0; i < elementsChildrenArray.length; i++) { const child = elementsChildrenArray[i]; - const clonedChild = cloneElementWithEvents(child as HTMLElement); - clonedElement.replaceChild(clonedChild, clonedElement.children[i]); + const { clonedElement: clonedChild, portals: portalsChildren } = + cloneElementWithEvents(child as HTMLElement); + portals.push(...portalsChildren); + clonedElement.appendChild(clonedChild); + // clonedElement.replaceChild(clonedChild, clonedElement.children[i]); } - return clonedElement; + return { + clonedElement, + portals, + }; } function mountElRef(elRef: React.ForwardedRef, el: HTMLElement) { @@ -44,6 +78,7 @@ function mountElRef(elRef: React.ForwardedRef, el: HTMLElement) { export const ReactSlot = forwardRef( ({ slot, clone, className, style }, elRef) => { const ref = useRef(); + const [children, setChildren] = useState([]); useEffect(() => { if (!ref.current || !slot) { return; @@ -82,7 +117,9 @@ export const ReactSlot = forwardRef( let observer: MutationObserver | null = null; if (clone && window.MutationObserver) { function render() { - cloned = cloneElementWithEvents(slot); + const { portals, clonedElement } = cloneElementWithEvents(slot); + cloned = clonedElement; + setChildren(portals); cloned.style.display = 'contents'; mountElementProps(); ref.current?.appendChild(cloned); @@ -115,9 +152,14 @@ export const ReactSlot = forwardRef( observer?.disconnect(); }; }, [slot, clone, className, style, elRef]); - return React.createElement('react-child', { - ref, - style: { display: 'contents' }, - }); + + return React.createElement( + 'react-child', + { + ref, + style: { display: 'contents' }, + }, + ...children + ); } ); From e8e3dd87ce63cded0a9ae092d7fea5528aa032b6 Mon Sep 17 00:00:00 2001 From: Col0ring <1561999073@qq.com> Date: Thu, 10 Oct 2024 18:00:38 +0800 Subject: [PATCH 19/51] feat: migrate to gradio 5 --- .../components/antd/breadcrumb/__init__.py | 2 +- .../antd/breadcrumb/item/__init__.py | 1 + .../components/antd/dropdown/__init__.py | 5 +- .../antd/dropdown/button/__init__.py | 4 +- config/changelog/package.json | 2 +- config/lint-config/package.json | 16 +- frontend/antd/affix/package.json | 10 +- .../antd/alert/error-boundary/package.json | 10 +- frontend/antd/alert/package.json | 10 +- frontend/antd/anchor/item/package.json | 10 +- frontend/antd/anchor/package.json | 10 +- .../antd/auto-complete/option/package.json | 10 +- frontend/antd/auto-complete/package.json | 10 +- frontend/antd/avatar/group/package.json | 10 +- frontend/antd/avatar/package.json | 10 +- frontend/antd/badge/package.json | 10 +- frontend/antd/badge/ribbon/package.json | 10 +- frontend/antd/breadcrumb/Index.svelte | 8 +- frontend/antd/breadcrumb/breadcrumb.tsx | 19 +- .../breadcrumb/item/BreadcrumbItem.svelte | 43 +- frontend/antd/breadcrumb/item/package.json | 10 +- frontend/antd/breadcrumb/package.json | 10 +- frontend/antd/button/group/package.json | 10 +- frontend/antd/button/package.json | 10 +- frontend/antd/calendar/package.json | 10 +- frontend/antd/card/grid/package.json | 10 +- frontend/antd/card/meta/package.json | 10 +- frontend/antd/card/package.json | 10 +- frontend/antd/carousel/package.json | 10 +- frontend/antd/cascader/option/package.json | 10 +- frontend/antd/cascader/package.json | 10 +- frontend/antd/cascader/panel/package.json | 10 +- .../antd/checkbox/group/option/package.json | 10 +- frontend/antd/checkbox/group/package.json | 10 +- frontend/antd/checkbox/package.json | 10 +- frontend/antd/collapse/item/package.json | 10 +- frontend/antd/collapse/package.json | 10 +- frontend/antd/color-picker/package.json | 10 +- .../antd/color-picker/preset/package.json | 10 +- frontend/antd/config-provider/package.json | 10 +- frontend/antd/date-picker/package.json | 10 +- frontend/antd/date-picker/preset/package.json | 10 +- .../date-picker/range-picker/package.json | 10 +- frontend/antd/descriptions/item/package.json | 10 +- frontend/antd/descriptions/package.json | 10 +- frontend/antd/divider/package.json | 10 +- frontend/antd/drawer/package.json | 10 +- frontend/antd/dropdown/Index.svelte | 8 +- frontend/antd/dropdown/button/Index.svelte | 8 +- .../antd/dropdown/button/dropdown.button.tsx | 44 +- frontend/antd/dropdown/button/package.json | 10 +- frontend/antd/dropdown/dropdown.tsx | 30 +- frontend/antd/dropdown/package.json | 10 +- frontend/antd/empty/package.json | 10 +- frontend/antd/flex/package.json | 10 +- .../antd/float-button/back-top/package.json | 10 +- frontend/antd/float-button/group/package.json | 10 +- frontend/antd/float-button/package.json | 10 +- frontend/antd/form/item/package.json | 10 +- frontend/antd/form/item/rule/package.json | 10 +- frontend/antd/form/package.json | 10 +- frontend/antd/grid/col/package.json | 10 +- frontend/antd/grid/row/package.json | 10 +- .../antd/icon/iconfont-provider/package.json | 10 +- frontend/antd/icon/package.json | 10 +- frontend/antd/image/package.json | 10 +- .../antd/image/preview-group/package.json | 10 +- frontend/antd/input-number/package.json | 10 +- frontend/antd/input/otp/package.json | 10 +- frontend/antd/input/package.json | 10 +- frontend/antd/input/password/package.json | 10 +- frontend/antd/input/search/package.json | 10 +- frontend/antd/input/textarea/package.json | 10 +- frontend/antd/layout/content/package.json | 10 +- frontend/antd/layout/footer/package.json | 10 +- frontend/antd/layout/header/package.json | 10 +- frontend/antd/layout/package.json | 10 +- frontend/antd/layout/sider/package.json | 10 +- frontend/antd/list/item/meta/package.json | 10 +- frontend/antd/list/item/package.json | 10 +- frontend/antd/list/package.json | 10 +- frontend/antd/mentions/option/package.json | 10 +- frontend/antd/mentions/package.json | 10 +- frontend/antd/menu/Index.svelte | 9 +- frontend/antd/menu/item/package.json | 10 +- frontend/antd/menu/menu.tsx | 19 +- frontend/antd/menu/package.json | 10 +- frontend/antd/message/package.json | 10 +- frontend/antd/modal/package.json | 10 +- frontend/antd/notification/package.json | 10 +- frontend/antd/pagination/package.json | 10 +- frontend/antd/pagination/pagination.tsx | 3 + frontend/antd/popconfirm/package.json | 10 +- frontend/antd/popover/package.json | 10 +- frontend/antd/progress/package.json | 10 +- frontend/antd/qr-code/package.json | 10 +- frontend/antd/radio/button/package.json | 10 +- frontend/antd/radio/group/option/package.json | 10 +- frontend/antd/radio/group/package.json | 10 +- frontend/antd/radio/package.json | 10 +- frontend/antd/rate/package.json | 10 +- frontend/antd/result/package.json | 10 +- frontend/antd/segmented/option/package.json | 10 +- frontend/antd/segmented/package.json | 10 +- frontend/antd/select/option/package.json | 10 +- frontend/antd/select/package.json | 10 +- frontend/antd/skeleton/avatar/package.json | 10 +- frontend/antd/skeleton/button/package.json | 10 +- frontend/antd/skeleton/image/package.json | 10 +- frontend/antd/skeleton/input/package.json | 10 +- frontend/antd/skeleton/node/package.json | 10 +- frontend/antd/skeleton/package.json | 10 +- frontend/antd/slider/mark/package.json | 10 +- frontend/antd/slider/package.json | 10 +- frontend/antd/space/compact/package.json | 10 +- frontend/antd/space/package.json | 10 +- frontend/antd/spin/package.json | 10 +- frontend/antd/splitter/package.json | 10 +- frontend/antd/splitter/panel/package.json | 10 +- .../antd/statistic/countdown/package.json | 10 +- frontend/antd/statistic/package.json | 10 +- frontend/antd/steps/Index.svelte | 8 +- frontend/antd/steps/item/package.json | 10 +- frontend/antd/steps/package.json | 10 +- frontend/antd/steps/steps.tsx | 45 +- frontend/antd/switch/package.json | 10 +- frontend/antd/table/column-group/package.json | 10 +- frontend/antd/table/column/package.json | 10 +- frontend/antd/table/expandable/package.json | 10 +- frontend/antd/table/package.json | 10 +- .../antd/table/row-selection/package.json | 10 +- .../row-selection/selection/package.json | 10 +- frontend/antd/tabs/item/package.json | 10 +- frontend/antd/tabs/package.json | 10 +- frontend/antd/tag/checkable-tag/package.json | 10 +- frontend/antd/tag/package.json | 10 +- frontend/antd/time-picker/package.json | 10 +- .../time-picker/range-picker/package.json | 10 +- frontend/antd/timeline/item/package.json | 10 +- frontend/antd/timeline/package.json | 10 +- frontend/antd/tooltip/package.json | 10 +- frontend/antd/tour/package.json | 10 +- frontend/antd/tour/step/package.json | 10 +- frontend/antd/transfer/package.json | 10 +- frontend/antd/tree-select/package.json | 10 +- .../antd/tree-select/tree-node/package.json | 10 +- .../antd/tree/directory-tree/package.json | 10 +- frontend/antd/tree/package.json | 10 +- frontend/antd/tree/tree-node/package.json | 10 +- frontend/antd/typography/link/package.json | 10 +- .../antd/typography/paragraph/package.json | 10 +- frontend/antd/typography/text/package.json | 10 +- frontend/antd/typography/title/package.json | 10 +- frontend/antd/typography/typography.base.tsx | 154 +- frontend/antd/upload/dragger/package.json | 10 +- frontend/antd/upload/package.json | 10 +- frontend/antd/watermark/package.json | 10 +- frontend/base/application/package.json | 10 +- frontend/base/div/package.json | 10 +- frontend/base/each/package.json | 10 +- frontend/base/filter/package.json | 10 +- frontend/base/fragment/package.json | 12 +- frontend/base/slot/package.json | 10 +- frontend/base/span/package.json | 10 +- frontend/base/text/package.json | 10 +- frontend/legacy/Chatbot/package.json | 10 +- frontend/legacy/Flow/package.json | 10 +- frontend/legacy/Lifecycle/package.json | 10 +- frontend/legacy/Markdown/package.json | 15 +- frontend/legacy/MultimodalInput/package.json | 15 +- frontend/legacy/WaterfallGallery/package.json | 10 +- frontend/legacy/compiled/package.json | 4 +- frontend/package.json | 16 +- .../svelte-preprocess-react/internal/Child.ts | 15 +- .../svelte-preprocess-react/react-slot.tsx | 33 +- frontend/svelte-preprocess-react/slot.ts | 4 +- frontend/utils/renderParamsSlot.tsx | 25 +- frontend/utils/renderSlot.tsx | 6 +- package.json | 14 +- pnpm-lock.yaml | 1895 ++++++++++------- pyproject.toml | 2 +- 181 files changed, 2680 insertions(+), 1294 deletions(-) diff --git a/backend/modelscope_studio/components/antd/breadcrumb/__init__.py b/backend/modelscope_studio/components/antd/breadcrumb/__init__.py index 454458e3..e65ea3fa 100644 --- a/backend/modelscope_studio/components/antd/breadcrumb/__init__.py +++ b/backend/modelscope_studio/components/antd/breadcrumb/__init__.py @@ -14,7 +14,7 @@ class AntdBreadcrumb(ModelScopeLayoutComponent): EVENTS = [] # supported slots - SLOTS = ['separator', 'items'] + SLOTS = ['separator', 'itemRender', 'items'] def __init__( self, diff --git a/backend/modelscope_studio/components/antd/breadcrumb/item/__init__.py b/backend/modelscope_studio/components/antd/breadcrumb/item/__init__.py index a48297ad..23e9e765 100644 --- a/backend/modelscope_studio/components/antd/breadcrumb/item/__init__.py +++ b/backend/modelscope_studio/components/antd/breadcrumb/item/__init__.py @@ -50,6 +50,7 @@ class AntdBreadcrumbItem(ModelScopeLayoutComponent): "menu.expandIcon", 'menu.overflowedIndicator', "menu.items", + "dropdownProps.dropdownRender", "dropdownProps.menu.expandIcon", 'dropdownProps.menu.overflowedIndicator', "dropdownProps.menu.items", diff --git a/backend/modelscope_studio/components/antd/dropdown/__init__.py b/backend/modelscope_studio/components/antd/dropdown/__init__.py index 6a05f605..14dbdba4 100644 --- a/backend/modelscope_studio/components/antd/dropdown/__init__.py +++ b/backend/modelscope_studio/components/antd/dropdown/__init__.py @@ -31,7 +31,10 @@ class AntdDropdown(ModelScopeLayoutComponent): ] # supported slots - SLOTS = ["menu.expandIcon", 'menu.overflowedIndicator', "menu.items"] + SLOTS = [ + "menu.expandIcon", 'menu.overflowedIndicator', "menu.items", + "dropdownRender" + ] def __init__( self, diff --git a/backend/modelscope_studio/components/antd/dropdown/button/__init__.py b/backend/modelscope_studio/components/antd/dropdown/button/__init__.py index bdb10d37..c393cc2d 100644 --- a/backend/modelscope_studio/components/antd/dropdown/button/__init__.py +++ b/backend/modelscope_studio/components/antd/dropdown/button/__init__.py @@ -34,8 +34,8 @@ class AntdDropdownButton(ModelScopeLayoutComponent): # supported slots SLOTS = [ - "icon", 'buttonsRender', "menu.expandIcon", 'menu.overflowedIndicator', - "menu.items" + "icon", 'dropdownRender', 'buttonsRender', "menu.expandIcon", + 'menu.overflowedIndicator', "menu.items" ] def __init__( diff --git a/config/changelog/package.json b/config/changelog/package.json index 70410726..3694c216 100644 --- a/config/changelog/package.json +++ b/config/changelog/package.json @@ -25,7 +25,7 @@ }, "devDependencies": { "@changesets/types": "^6.0.0", - "@types/node": "^22.5.5", + "@types/node": "^22.7.5", "tsup": "^8.3.0" } } diff --git a/config/lint-config/package.json b/config/lint-config/package.json index 41290945..9c353a01 100644 --- a/config/lint-config/package.json +++ b/config/lint-config/package.json @@ -16,20 +16,20 @@ } }, "dependencies": { - "@eslint/compat": "^1.1.1", - "@eslint/js": "^9.11.0", - "@typescript-eslint/parser": "^8.6.0", + "@eslint/compat": "^1.2.0", + "@eslint/js": "^9.12.0", + "@typescript-eslint/parser": "^8.8.1", "eslint-config-prettier": "^9.0.0", "eslint-import-resolver-typescript": "^3.6.0", - "eslint-plugin-import": "^2.29.1", + "eslint-plugin-import": "^2.31.0", "eslint-plugin-jsx-a11y": "^6.9.0", "eslint-plugin-prettier": "5.2.1", - "eslint-plugin-react": "^7.36.1", + "eslint-plugin-react": "^7.37.1", "eslint-plugin-react-hooks": "^4.6.2", "eslint-plugin-react-refresh": "^0.4.12", "eslint-plugin-simple-import-sort": "^12.1.0", - "eslint-plugin-svelte": "^2.44.0", - "globals": "^15.6.0", + "eslint-plugin-svelte": "^2.44.1", + "globals": "^15.11.0", "postcss": "^8.4.47", "postcss-less": "^6.0.0", "stylelint-config-ali": "^2.1.1", @@ -39,7 +39,7 @@ "stylelint-order": "^6.0.4", "stylelint-prettier": "^5.0.2", "svelte-eslint-parser": "^0.41.1", - "typescript-eslint": "^8.6.0" + "typescript-eslint": "^8.8.1" }, "devDependencies": { "@types/eslint": "^9.6.1", diff --git a/frontend/antd/affix/package.json b/frontend/antd/affix/package.json index ea4cf744..97da442b 100644 --- a/frontend/antd/affix/package.json +++ b/frontend/antd/affix/package.json @@ -2,7 +2,13 @@ "name": "@modelscope-studio/antd-affix", "type": "module", "exports": { - ".": "./Index.svelte", - "./package.json": "./package.json" + ".": { + "default": "./Index.svelte", + "gradio": "./Index.svelte" + }, + "./package.json": { + "default": "./package.json", + "gradio": "./package.json" + } } } diff --git a/frontend/antd/alert/error-boundary/package.json b/frontend/antd/alert/error-boundary/package.json index d27b6db0..81358d1f 100644 --- a/frontend/antd/alert/error-boundary/package.json +++ b/frontend/antd/alert/error-boundary/package.json @@ -2,7 +2,13 @@ "name": "@modelscope-studio/antd-alert.error-boundary", "type": "module", "exports": { - ".": "./Index.svelte", - "./package.json": "./package.json" + ".": { + "default": "./Index.svelte", + "gradio": "./Index.svelte" + }, + "./package.json": { + "default": "./package.json", + "gradio": "./package.json" + } } } diff --git a/frontend/antd/alert/package.json b/frontend/antd/alert/package.json index 8dca7359..08fb77c3 100644 --- a/frontend/antd/alert/package.json +++ b/frontend/antd/alert/package.json @@ -2,7 +2,13 @@ "name": "@modelscope-studio/antd-alert", "type": "module", "exports": { - ".": "./Index.svelte", - "./package.json": "./package.json" + ".": { + "default": "./Index.svelte", + "gradio": "./Index.svelte" + }, + "./package.json": { + "default": "./package.json", + "gradio": "./package.json" + } } } diff --git a/frontend/antd/anchor/item/package.json b/frontend/antd/anchor/item/package.json index cbc6131a..8a407e76 100644 --- a/frontend/antd/anchor/item/package.json +++ b/frontend/antd/anchor/item/package.json @@ -2,7 +2,13 @@ "name": "@modelscope-studio/antd-anchor.item", "type": "module", "exports": { - ".": "./Index.svelte", - "./package.json": "./package.json" + ".": { + "default": "./Index.svelte", + "gradio": "./Index.svelte" + }, + "./package.json": { + "default": "./package.json", + "gradio": "./package.json" + } } } diff --git a/frontend/antd/anchor/package.json b/frontend/antd/anchor/package.json index e94ace69..40ee8290 100644 --- a/frontend/antd/anchor/package.json +++ b/frontend/antd/anchor/package.json @@ -2,7 +2,13 @@ "name": "@modelscope-studio/antd-anchor", "type": "module", "exports": { - ".": "./Index.svelte", - "./package.json": "./package.json" + ".": { + "default": "./Index.svelte", + "gradio": "./Index.svelte" + }, + "./package.json": { + "default": "./package.json", + "gradio": "./package.json" + } } } diff --git a/frontend/antd/auto-complete/option/package.json b/frontend/antd/auto-complete/option/package.json index 9ccc8bb6..cc09764f 100644 --- a/frontend/antd/auto-complete/option/package.json +++ b/frontend/antd/auto-complete/option/package.json @@ -2,7 +2,13 @@ "name": "@modelscope-studio/antd-auto-complete.option", "type": "module", "exports": { - ".": "./Index.svelte", - "./package.json": "./package.json" + ".": { + "default": "./Index.svelte", + "gradio": "./Index.svelte" + }, + "./package.json": { + "default": "./package.json", + "gradio": "./package.json" + } } } diff --git a/frontend/antd/auto-complete/package.json b/frontend/antd/auto-complete/package.json index dcce510c..511f48a1 100644 --- a/frontend/antd/auto-complete/package.json +++ b/frontend/antd/auto-complete/package.json @@ -2,7 +2,13 @@ "name": "@modelscope-studio/antd-auto-complete", "type": "module", "exports": { - ".": "./Index.svelte", - "./package.json": "./package.json" + ".": { + "default": "./Index.svelte", + "gradio": "./Index.svelte" + }, + "./package.json": { + "default": "./package.json", + "gradio": "./package.json" + } } } diff --git a/frontend/antd/avatar/group/package.json b/frontend/antd/avatar/group/package.json index 23f26727..9353d3bd 100644 --- a/frontend/antd/avatar/group/package.json +++ b/frontend/antd/avatar/group/package.json @@ -2,7 +2,13 @@ "name": "@modelscope-studio/antd-avatar.group", "type": "module", "exports": { - ".": "./Index.svelte", - "./package.json": "./package.json" + ".": { + "default": "./Index.svelte", + "gradio": "./Index.svelte" + }, + "./package.json": { + "default": "./package.json", + "gradio": "./package.json" + } } } diff --git a/frontend/antd/avatar/package.json b/frontend/antd/avatar/package.json index 287dea2c..433e0199 100644 --- a/frontend/antd/avatar/package.json +++ b/frontend/antd/avatar/package.json @@ -2,7 +2,13 @@ "name": "@modelscope-studio/antd-avatar", "type": "module", "exports": { - ".": "./Index.svelte", - "./package.json": "./package.json" + ".": { + "default": "./Index.svelte", + "gradio": "./Index.svelte" + }, + "./package.json": { + "default": "./package.json", + "gradio": "./package.json" + } } } diff --git a/frontend/antd/badge/package.json b/frontend/antd/badge/package.json index 16c946f4..5ff82104 100644 --- a/frontend/antd/badge/package.json +++ b/frontend/antd/badge/package.json @@ -2,7 +2,13 @@ "name": "@modelscope-studio/antd-badge", "type": "module", "exports": { - ".": "./Index.svelte", - "./package.json": "./package.json" + ".": { + "default": "./Index.svelte", + "gradio": "./Index.svelte" + }, + "./package.json": { + "default": "./package.json", + "gradio": "./package.json" + } } } diff --git a/frontend/antd/badge/ribbon/package.json b/frontend/antd/badge/ribbon/package.json index 653ce009..2ca52113 100644 --- a/frontend/antd/badge/ribbon/package.json +++ b/frontend/antd/badge/ribbon/package.json @@ -2,7 +2,13 @@ "name": "@modelscope-studio/antd-badge.ribbon", "type": "module", "exports": { - ".": "./Index.svelte", - "./package.json": "./package.json" + ".": { + "default": "./Index.svelte", + "gradio": "./Index.svelte" + }, + "./package.json": { + "default": "./package.json", + "gradio": "./package.json" + } } } diff --git a/frontend/antd/breadcrumb/Index.svelte b/frontend/antd/breadcrumb/Index.svelte index df36477d..6da140f0 100644 --- a/frontend/antd/breadcrumb/Index.svelte +++ b/frontend/antd/breadcrumb/Index.svelte @@ -5,7 +5,11 @@ bindEvents, importComponent, } from '@svelte-preprocess-react/component'; - import { getSlotContext, getSlots } from '@svelte-preprocess-react/slot'; + import { + getSetSlotParamsFn, + getSlotContext, + getSlots, + } from '@svelte-preprocess-react/slot'; import type React from 'react'; import type { Gradio } from '@gradio/utils'; import cls from 'classnames'; @@ -53,6 +57,7 @@ as_item, restProps: $$restProps, }); + const setSlotParams = getSetSlotParamsFn(); const { items, default: children } = getItems(['items', 'default']); @@ -67,6 +72,7 @@ {...bindEvents($mergedProps)} slots={$slots} slotItems={$items.length > 0 ? $items : $children} + {setSlotParams} > diff --git a/frontend/antd/breadcrumb/breadcrumb.tsx b/frontend/antd/breadcrumb/breadcrumb.tsx index 0dd9191a..e4895d4d 100644 --- a/frontend/antd/breadcrumb/breadcrumb.tsx +++ b/frontend/antd/breadcrumb/breadcrumb.tsx @@ -1,7 +1,9 @@ import { sveltify } from '@svelte-preprocess-react'; import { ReactSlot } from '@svelte-preprocess-react/react-slot'; +import type { SetSlotParams } from '@svelte-preprocess-react/slot'; import React, { useMemo } from 'react'; import { renderItems } from '@utils/renderItems'; +import { renderParamsSlot } from '@utils/renderParamsSlot'; import { Breadcrumb as ABreadcrumb, type GetProps } from 'antd'; import type { ItemType } from 'antd/es/breadcrumb/Breadcrumb'; @@ -10,14 +12,27 @@ import { type Item } from './context'; export const Breadcrumb = sveltify< GetProps & { slotItems: Item[]; + setSlotParams: SetSlotParams; }, - ['separator'] ->(({ slots, items, slotItems, children, ...props }) => { + ['separator', 'itemRender'] +>(({ slots, items, slotItems, setSlotParams, children, ...props }) => { return ( <>
{children}
{ return items || renderItems(slotItems); }, [items, slotItems])} diff --git a/frontend/antd/breadcrumb/item/BreadcrumbItem.svelte b/frontend/antd/breadcrumb/item/BreadcrumbItem.svelte index 65821810..0345c307 100644 --- a/frontend/antd/breadcrumb/item/BreadcrumbItem.svelte +++ b/frontend/antd/breadcrumb/item/BreadcrumbItem.svelte @@ -3,6 +3,7 @@ @@ -66,6 +71,7 @@ {...bindEvents($mergedProps)} slots={$slots} menuItems={$items} + {setSlotParams} > diff --git a/frontend/antd/dropdown/button/Index.svelte b/frontend/antd/dropdown/button/Index.svelte index ac281f91..ccfa0fab 100644 --- a/frontend/antd/dropdown/button/Index.svelte +++ b/frontend/antd/dropdown/button/Index.svelte @@ -5,7 +5,11 @@ bindEvents, importComponent, } from '@svelte-preprocess-react/component'; - import { getSlotContext, getSlots } from '@svelte-preprocess-react/slot'; + import { + getSetSlotParamsFn, + getSlotContext, + getSlots, + } from '@svelte-preprocess-react/slot'; import type React from 'react'; import type { Gradio } from '@gradio/utils'; import cls from 'classnames'; @@ -58,6 +62,7 @@ value, restProps: $$restProps, }); + const setSlotParams = getSetSlotParamsFn(); const { 'menu.items': items } = getItems(['menu.items']); @@ -72,6 +77,7 @@ {...bindEvents($mergedProps)} slots={$slots} menuItems={$items} + {setSlotParams} > {#if $mergedProps._internal.layout} diff --git a/frontend/antd/dropdown/button/dropdown.button.tsx b/frontend/antd/dropdown/button/dropdown.button.tsx index 15dde97d..6a0e44dc 100644 --- a/frontend/antd/dropdown/button/dropdown.button.tsx +++ b/frontend/antd/dropdown/button/dropdown.button.tsx @@ -1,18 +1,27 @@ import { sveltify } from '@svelte-preprocess-react'; import { ReactSlot } from '@svelte-preprocess-react/react-slot'; +import type { SetSlotParams } from '@svelte-preprocess-react/slot'; import { useMemo } from 'react'; import { type Item } from '@utils/createItemsContext'; import { useFunction } from '@utils/hooks/useFunction'; import { useTargets } from '@utils/hooks/useTargets'; import { renderItems } from '@utils/renderItems'; +import { renderParamsSlot } from '@utils/renderParamsSlot'; import { Dropdown as ADropdown, type GetProps } from 'antd'; import type { ItemType } from 'antd/es/menu/interface'; export const DropdownButton = sveltify< GetProps & { menuItems: Item[]; + setSlotParams: SetSlotParams; }, - ['icon', 'buttonsRender', 'menu.expandIcon', 'menu.overflowedIndicator'] + [ + 'icon', + 'buttonsRender', + 'dropdownRender', + 'menu.expandIcon', + 'menu.overflowedIndicator', + ] >( ({ getPopupContainer, @@ -20,6 +29,7 @@ export const DropdownButton = sveltify< menuItems, children, dropdownRender, + setSlotParams, ...props }) => { const getPopupContainerFunction = useFunction(getPopupContainer); @@ -30,10 +40,12 @@ export const DropdownButton = sveltify< {...props} buttonsRender={ buttonsRenderTargets.length - ? () => - buttonsRenderTargets.map((item, index) => { + ? (...args) => { + setSlotParams('buttonsRender', args); + return buttonsRenderTargets.map((item, index) => { return ; - }) + }); + } : props.buttonsRender } menu={{ @@ -41,11 +53,12 @@ export const DropdownButton = sveltify< items: useMemo(() => { return props.menu?.items || renderItems(menuItems); }, [menuItems, props.menu?.items]), - expandIcon: slots['menu.expandIcon'] ? ( - - ) : ( - props.menu?.expandIcon - ), + expandIcon: slots['menu.expandIcon'] + ? renderParamsSlot( + { slots, setSlotParams, key: 'menu.expandIcon' }, + { clone: true } + ) + : props.menu?.expandIcon, overflowedIndicator: slots['menu.overflowedIndicator'] ? ( ) : ( @@ -53,7 +66,18 @@ export const DropdownButton = sveltify< ), }} getPopupContainer={getPopupContainerFunction} - dropdownRender={dropdownRenderFunction} + dropdownRender={ + slots.dropdownRender + ? renderParamsSlot( + { + slots, + setSlotParams, + key: 'dropdownRender', + }, + { clone: true } + ) + : dropdownRenderFunction + } /> ); } diff --git a/frontend/antd/dropdown/button/package.json b/frontend/antd/dropdown/button/package.json index b495d44b..f104ebef 100644 --- a/frontend/antd/dropdown/button/package.json +++ b/frontend/antd/dropdown/button/package.json @@ -2,7 +2,13 @@ "name": "@modelscope-studio/antd-dropdown.button", "type": "module", "exports": { - ".": "./Index.svelte", - "./package.json": "./package.json" + ".": { + "default": "./Index.svelte", + "gradio": "./Index.svelte" + }, + "./package.json": { + "default": "./package.json", + "gradio": "./package.json" + } } } diff --git a/frontend/antd/dropdown/dropdown.tsx b/frontend/antd/dropdown/dropdown.tsx index 57532569..f2337411 100644 --- a/frontend/antd/dropdown/dropdown.tsx +++ b/frontend/antd/dropdown/dropdown.tsx @@ -1,9 +1,11 @@ import { sveltify } from '@svelte-preprocess-react'; import { ReactSlot } from '@svelte-preprocess-react/react-slot'; +import type { SetSlotParams } from '@svelte-preprocess-react/slot'; import { useMemo } from 'react'; import { type Item } from '@utils/createItemsContext'; import { useFunction } from '@utils/hooks/useFunction'; import { renderItems } from '@utils/renderItems'; +import { renderParamsSlot } from '@utils/renderParamsSlot'; import { Dropdown as ADropdown, type GetProps } from 'antd'; import type { ItemType } from 'antd/es/menu/interface'; @@ -11,8 +13,9 @@ export const Dropdown = sveltify< GetProps & { menuItems: Item[]; innerStyle?: React.CSSProperties; + setSlotParams: SetSlotParams; }, - ['menu.expandIcon', 'menu.overflowedIndicator'] + ['menu.expandIcon', 'dropdownRender', 'menu.overflowedIndicator'] >( ({ getPopupContainer, @@ -21,6 +24,7 @@ export const Dropdown = sveltify< slots, menuItems, dropdownRender, + setSlotParams, ...props }) => { const getPopupContainerFunction = useFunction(getPopupContainer); @@ -34,11 +38,12 @@ export const Dropdown = sveltify< items: useMemo(() => { return props.menu?.items || renderItems(menuItems); }, [menuItems, props.menu?.items]), - expandIcon: slots['menu.expandIcon'] ? ( - - ) : ( - props.menu?.expandIcon - ), + expandIcon: slots['menu.expandIcon'] + ? renderParamsSlot( + { slots, setSlotParams, key: 'menu.expandIcon' }, + { clone: true } + ) + : props.menu?.expandIcon, overflowedIndicator: slots['menu.overflowedIndicator'] ? ( ) : ( @@ -46,7 +51,18 @@ export const Dropdown = sveltify< ), }} getPopupContainer={getPopupContainerFunction} - dropdownRender={dropdownRenderFunction} + dropdownRender={ + slots.dropdownRender + ? renderParamsSlot( + { + slots, + setSlotParams, + key: 'dropdownRender', + }, + { clone: true } + ) + : dropdownRenderFunction + } >
@@ -85,6 +89,7 @@ selected_keys: selectedKeys, }; }} + {setSlotParams} > diff --git a/frontend/antd/menu/item/package.json b/frontend/antd/menu/item/package.json index 33a1b88d..f078a35d 100644 --- a/frontend/antd/menu/item/package.json +++ b/frontend/antd/menu/item/package.json @@ -2,7 +2,13 @@ "name": "@modelscope-studio/antd-menu.item", "type": "module", "exports": { - ".": "./Index.svelte", - "./package.json": "./package.json" + ".": { + "default": "./Index.svelte", + "gradio": "./Index.svelte" + }, + "./package.json": { + "default": "./package.json", + "gradio": "./package.json" + } } } diff --git a/frontend/antd/menu/menu.tsx b/frontend/antd/menu/menu.tsx index 52e77511..c985cfe0 100644 --- a/frontend/antd/menu/menu.tsx +++ b/frontend/antd/menu/menu.tsx @@ -1,8 +1,10 @@ import { sveltify } from '@svelte-preprocess-react'; import { ReactSlot } from '@svelte-preprocess-react/react-slot'; +import type { SetSlotParams } from '@svelte-preprocess-react/slot'; import React, { useMemo } from 'react'; import { omitUndefinedProps } from '@utils/omitUndefinedProps'; import { renderItems } from '@utils/renderItems'; +import { renderParamsSlot } from '@utils/renderParamsSlot'; import { type GetProps, Menu as AMenu } from 'antd'; import type { ItemType } from 'antd/es/menu/interface'; @@ -15,6 +17,7 @@ export const Menu = sveltify< openKeys: string[]; selectedKeys: string[]; }) => void; + setSlotParams: SetSlotParams; }, ['expandIcon', 'overflowedIndicator'] >( @@ -27,6 +30,7 @@ export const Menu = sveltify< onOpenChange, onSelect, onDeselect, + setSlotParams, ...props }) => { return ( @@ -60,11 +64,16 @@ export const Menu = sveltify< return items || renderItems(slotItems); }, [items, slotItems])} expandIcon={ - slots.expandIcon ? ( - - ) : ( - props.expandIcon - ) + slots.expandIcon + ? renderParamsSlot( + { + key: 'expandIcon', + slots, + setSlotParams, + }, + { clone: true } + ) + : props.expandIcon } overflowedIndicator={ slots.overflowedIndicator ? ( diff --git a/frontend/antd/menu/package.json b/frontend/antd/menu/package.json index 5e214f27..21d1e57c 100644 --- a/frontend/antd/menu/package.json +++ b/frontend/antd/menu/package.json @@ -2,7 +2,13 @@ "name": "@modelscope-studio/antd-menu", "type": "module", "exports": { - ".": "./Index.svelte", - "./package.json": "./package.json" + ".": { + "default": "./Index.svelte", + "gradio": "./Index.svelte" + }, + "./package.json": { + "default": "./package.json", + "gradio": "./package.json" + } } } diff --git a/frontend/antd/message/package.json b/frontend/antd/message/package.json index cc6bf505..6690b00d 100644 --- a/frontend/antd/message/package.json +++ b/frontend/antd/message/package.json @@ -2,7 +2,13 @@ "name": "@modelscope-studio/antd-message", "type": "module", "exports": { - ".": "./Index.svelte", - "./package.json": "./package.json" + ".": { + "default": "./Index.svelte", + "gradio": "./Index.svelte" + }, + "./package.json": { + "default": "./package.json", + "gradio": "./package.json" + } } } diff --git a/frontend/antd/modal/package.json b/frontend/antd/modal/package.json index e1502012..b12ba527 100644 --- a/frontend/antd/modal/package.json +++ b/frontend/antd/modal/package.json @@ -2,7 +2,13 @@ "name": "@modelscope-studio/antd-modal", "type": "module", "exports": { - ".": "./Index.svelte", - "./package.json": "./package.json" + ".": { + "default": "./Index.svelte", + "gradio": "./Index.svelte" + }, + "./package.json": { + "default": "./package.json", + "gradio": "./package.json" + } } } diff --git a/frontend/antd/notification/package.json b/frontend/antd/notification/package.json index 808605ab..70926955 100644 --- a/frontend/antd/notification/package.json +++ b/frontend/antd/notification/package.json @@ -2,7 +2,13 @@ "name": "@modelscope-studio/antd-notification", "type": "module", "exports": { - ".": "./Index.svelte", - "./package.json": "./package.json" + ".": { + "default": "./Index.svelte", + "gradio": "./Index.svelte" + }, + "./package.json": { + "default": "./package.json", + "gradio": "./package.json" + } } } diff --git a/frontend/antd/pagination/package.json b/frontend/antd/pagination/package.json index c641fb97..e4670065 100644 --- a/frontend/antd/pagination/package.json +++ b/frontend/antd/pagination/package.json @@ -2,7 +2,13 @@ "name": "@modelscope-studio/antd-pagination", "type": "module", "exports": { - ".": "./Index.svelte", - "./package.json": "./package.json" + ".": { + "default": "./Index.svelte", + "gradio": "./Index.svelte" + }, + "./package.json": { + "default": "./package.json", + "gradio": "./package.json" + } } } diff --git a/frontend/antd/pagination/pagination.tsx b/frontend/antd/pagination/pagination.tsx index d5eb7d61..fe8296a0 100644 --- a/frontend/antd/pagination/pagination.tsx +++ b/frontend/antd/pagination/pagination.tsx @@ -18,8 +18,10 @@ export const Pagination = sveltify< showQuickJumper, onChange, children, + itemRender, ...props }) => { + const itemRenderFunction = useFunction(itemRender); const showTotalFunction = useFunction(showTotal); return ( <> @@ -27,6 +29,7 @@ export const Pagination = sveltify< { onValueChange(page, pageSize); onChange?.(page, pageSize); diff --git a/frontend/antd/popconfirm/package.json b/frontend/antd/popconfirm/package.json index 779a5b6a..fe5fff9e 100644 --- a/frontend/antd/popconfirm/package.json +++ b/frontend/antd/popconfirm/package.json @@ -2,7 +2,13 @@ "name": "@modelscope-studio/antd-popconfirm", "type": "module", "exports": { - ".": "./Index.svelte", - "./package.json": "./package.json" + ".": { + "default": "./Index.svelte", + "gradio": "./Index.svelte" + }, + "./package.json": { + "default": "./package.json", + "gradio": "./package.json" + } } } diff --git a/frontend/antd/popover/package.json b/frontend/antd/popover/package.json index 80623128..597b1773 100644 --- a/frontend/antd/popover/package.json +++ b/frontend/antd/popover/package.json @@ -2,7 +2,13 @@ "name": "@modelscope-studio/antd-popover", "type": "module", "exports": { - ".": "./Index.svelte", - "./package.json": "./package.json" + ".": { + "default": "./Index.svelte", + "gradio": "./Index.svelte" + }, + "./package.json": { + "default": "./package.json", + "gradio": "./package.json" + } } } diff --git a/frontend/antd/progress/package.json b/frontend/antd/progress/package.json index 36d6abcd..ae96d020 100644 --- a/frontend/antd/progress/package.json +++ b/frontend/antd/progress/package.json @@ -2,7 +2,13 @@ "name": "@modelscope-studio/antd-progress", "type": "module", "exports": { - ".": "./Index.svelte", - "./package.json": "./package.json" + ".": { + "default": "./Index.svelte", + "gradio": "./Index.svelte" + }, + "./package.json": { + "default": "./package.json", + "gradio": "./package.json" + } } } diff --git a/frontend/antd/qr-code/package.json b/frontend/antd/qr-code/package.json index ec3a9ac6..f1d43ad8 100644 --- a/frontend/antd/qr-code/package.json +++ b/frontend/antd/qr-code/package.json @@ -2,7 +2,13 @@ "name": "@modelscope-studio/antd-qr-code", "type": "module", "exports": { - ".": "./Index.svelte", - "./package.json": "./package.json" + ".": { + "default": "./Index.svelte", + "gradio": "./Index.svelte" + }, + "./package.json": { + "default": "./package.json", + "gradio": "./package.json" + } } } diff --git a/frontend/antd/radio/button/package.json b/frontend/antd/radio/button/package.json index 65537416..ec80da14 100644 --- a/frontend/antd/radio/button/package.json +++ b/frontend/antd/radio/button/package.json @@ -2,7 +2,13 @@ "name": "@modelscope-studio/antd-radio.button", "type": "module", "exports": { - ".": "./Index.svelte", - "./package.json": "./package.json" + ".": { + "default": "./Index.svelte", + "gradio": "./Index.svelte" + }, + "./package.json": { + "default": "./package.json", + "gradio": "./package.json" + } } } diff --git a/frontend/antd/radio/group/option/package.json b/frontend/antd/radio/group/option/package.json index e4177891..c93c2d0d 100644 --- a/frontend/antd/radio/group/option/package.json +++ b/frontend/antd/radio/group/option/package.json @@ -2,7 +2,13 @@ "name": "@modelscope-studio/antd-radio.group.option", "type": "module", "exports": { - ".": "./Index.svelte", - "./package.json": "./package.json" + ".": { + "default": "./Index.svelte", + "gradio": "./Index.svelte" + }, + "./package.json": { + "default": "./package.json", + "gradio": "./package.json" + } } } diff --git a/frontend/antd/radio/group/package.json b/frontend/antd/radio/group/package.json index fca9d782..bc2654c9 100644 --- a/frontend/antd/radio/group/package.json +++ b/frontend/antd/radio/group/package.json @@ -2,7 +2,13 @@ "name": "@modelscope-studio/antd-radio.group", "type": "module", "exports": { - ".": "./Index.svelte", - "./package.json": "./package.json" + ".": { + "default": "./Index.svelte", + "gradio": "./Index.svelte" + }, + "./package.json": { + "default": "./package.json", + "gradio": "./package.json" + } } } diff --git a/frontend/antd/radio/package.json b/frontend/antd/radio/package.json index 321b924b..23aef293 100644 --- a/frontend/antd/radio/package.json +++ b/frontend/antd/radio/package.json @@ -2,7 +2,13 @@ "name": "@modelscope-studio/antd-radio", "type": "module", "exports": { - ".": "./Index.svelte", - "./package.json": "./package.json" + ".": { + "default": "./Index.svelte", + "gradio": "./Index.svelte" + }, + "./package.json": { + "default": "./package.json", + "gradio": "./package.json" + } } } diff --git a/frontend/antd/rate/package.json b/frontend/antd/rate/package.json index ee244ab8..fae33ef2 100644 --- a/frontend/antd/rate/package.json +++ b/frontend/antd/rate/package.json @@ -2,7 +2,13 @@ "name": "@modelscope-studio/antd-rate", "type": "module", "exports": { - ".": "./Index.svelte", - "./package.json": "./package.json" + ".": { + "default": "./Index.svelte", + "gradio": "./Index.svelte" + }, + "./package.json": { + "default": "./package.json", + "gradio": "./package.json" + } } } diff --git a/frontend/antd/result/package.json b/frontend/antd/result/package.json index d115d7f2..7f3d2a90 100644 --- a/frontend/antd/result/package.json +++ b/frontend/antd/result/package.json @@ -2,7 +2,13 @@ "name": "@modelscope-studio/antd-result", "type": "module", "exports": { - ".": "./Index.svelte", - "./package.json": "./package.json" + ".": { + "default": "./Index.svelte", + "gradio": "./Index.svelte" + }, + "./package.json": { + "default": "./package.json", + "gradio": "./package.json" + } } } diff --git a/frontend/antd/segmented/option/package.json b/frontend/antd/segmented/option/package.json index 50ce1ac8..e9e9c7ee 100644 --- a/frontend/antd/segmented/option/package.json +++ b/frontend/antd/segmented/option/package.json @@ -2,7 +2,13 @@ "name": "@modelscope-studio/antd-segmented.option", "type": "module", "exports": { - ".": "./Index.svelte", - "./package.json": "./package.json" + ".": { + "default": "./Index.svelte", + "gradio": "./Index.svelte" + }, + "./package.json": { + "default": "./package.json", + "gradio": "./package.json" + } } } diff --git a/frontend/antd/segmented/package.json b/frontend/antd/segmented/package.json index ec3a9ac6..f1d43ad8 100644 --- a/frontend/antd/segmented/package.json +++ b/frontend/antd/segmented/package.json @@ -2,7 +2,13 @@ "name": "@modelscope-studio/antd-qr-code", "type": "module", "exports": { - ".": "./Index.svelte", - "./package.json": "./package.json" + ".": { + "default": "./Index.svelte", + "gradio": "./Index.svelte" + }, + "./package.json": { + "default": "./package.json", + "gradio": "./package.json" + } } } diff --git a/frontend/antd/select/option/package.json b/frontend/antd/select/option/package.json index a64270e2..527c382d 100644 --- a/frontend/antd/select/option/package.json +++ b/frontend/antd/select/option/package.json @@ -2,7 +2,13 @@ "name": "@modelscope-studio/antd-select.option", "type": "module", "exports": { - ".": "./Index.svelte", - "./package.json": "./package.json" + ".": { + "default": "./Index.svelte", + "gradio": "./Index.svelte" + }, + "./package.json": { + "default": "./package.json", + "gradio": "./package.json" + } } } diff --git a/frontend/antd/select/package.json b/frontend/antd/select/package.json index b7cc7b34..03094c7a 100644 --- a/frontend/antd/select/package.json +++ b/frontend/antd/select/package.json @@ -2,7 +2,13 @@ "name": "@modelscope-studio/antd-select", "type": "module", "exports": { - ".": "./Index.svelte", - "./package.json": "./package.json" + ".": { + "default": "./Index.svelte", + "gradio": "./Index.svelte" + }, + "./package.json": { + "default": "./package.json", + "gradio": "./package.json" + } } } diff --git a/frontend/antd/skeleton/avatar/package.json b/frontend/antd/skeleton/avatar/package.json index 87906742..35aa5482 100644 --- a/frontend/antd/skeleton/avatar/package.json +++ b/frontend/antd/skeleton/avatar/package.json @@ -2,7 +2,13 @@ "name": "@modelscope-studio/antd-skeleton.avatar", "type": "module", "exports": { - ".": "./Index.svelte", - "./package.json": "./package.json" + ".": { + "default": "./Index.svelte", + "gradio": "./Index.svelte" + }, + "./package.json": { + "default": "./package.json", + "gradio": "./package.json" + } } } diff --git a/frontend/antd/skeleton/button/package.json b/frontend/antd/skeleton/button/package.json index ebe408ac..415a6d95 100644 --- a/frontend/antd/skeleton/button/package.json +++ b/frontend/antd/skeleton/button/package.json @@ -2,7 +2,13 @@ "name": "@modelscope-studio/antd-skeleton.button", "type": "module", "exports": { - ".": "./Index.svelte", - "./package.json": "./package.json" + ".": { + "default": "./Index.svelte", + "gradio": "./Index.svelte" + }, + "./package.json": { + "default": "./package.json", + "gradio": "./package.json" + } } } diff --git a/frontend/antd/skeleton/image/package.json b/frontend/antd/skeleton/image/package.json index aa15f18c..6467b271 100644 --- a/frontend/antd/skeleton/image/package.json +++ b/frontend/antd/skeleton/image/package.json @@ -2,7 +2,13 @@ "name": "@modelscope-studio/antd-skeleton.image", "type": "module", "exports": { - ".": "./Index.svelte", - "./package.json": "./package.json" + ".": { + "default": "./Index.svelte", + "gradio": "./Index.svelte" + }, + "./package.json": { + "default": "./package.json", + "gradio": "./package.json" + } } } diff --git a/frontend/antd/skeleton/input/package.json b/frontend/antd/skeleton/input/package.json index 767560d0..011e2611 100644 --- a/frontend/antd/skeleton/input/package.json +++ b/frontend/antd/skeleton/input/package.json @@ -2,7 +2,13 @@ "name": "@modelscope-studio/antd-skeleton.input", "type": "module", "exports": { - ".": "./Index.svelte", - "./package.json": "./package.json" + ".": { + "default": "./Index.svelte", + "gradio": "./Index.svelte" + }, + "./package.json": { + "default": "./package.json", + "gradio": "./package.json" + } } } diff --git a/frontend/antd/skeleton/node/package.json b/frontend/antd/skeleton/node/package.json index 29ece7a5..a4a7b24c 100644 --- a/frontend/antd/skeleton/node/package.json +++ b/frontend/antd/skeleton/node/package.json @@ -2,7 +2,13 @@ "name": "@modelscope-studio/antd-skeleton.node", "type": "module", "exports": { - ".": "./Index.svelte", - "./package.json": "./package.json" + ".": { + "default": "./Index.svelte", + "gradio": "./Index.svelte" + }, + "./package.json": { + "default": "./package.json", + "gradio": "./package.json" + } } } diff --git a/frontend/antd/skeleton/package.json b/frontend/antd/skeleton/package.json index ca4cf545..a8848a90 100644 --- a/frontend/antd/skeleton/package.json +++ b/frontend/antd/skeleton/package.json @@ -2,7 +2,13 @@ "name": "@modelscope-studio/antd-skeleton", "type": "module", "exports": { - ".": "./Index.svelte", - "./package.json": "./package.json" + ".": { + "default": "./Index.svelte", + "gradio": "./Index.svelte" + }, + "./package.json": { + "default": "./package.json", + "gradio": "./package.json" + } } } diff --git a/frontend/antd/slider/mark/package.json b/frontend/antd/slider/mark/package.json index 86aea9ae..f7302d2a 100644 --- a/frontend/antd/slider/mark/package.json +++ b/frontend/antd/slider/mark/package.json @@ -2,7 +2,13 @@ "name": "@modelscope-studio/antd-slider.mark", "type": "module", "exports": { - ".": "./Index.svelte", - "./package.json": "./package.json" + ".": { + "default": "./Index.svelte", + "gradio": "./Index.svelte" + }, + "./package.json": { + "default": "./package.json", + "gradio": "./package.json" + } } } diff --git a/frontend/antd/slider/package.json b/frontend/antd/slider/package.json index d91b64da..7cb4695d 100644 --- a/frontend/antd/slider/package.json +++ b/frontend/antd/slider/package.json @@ -2,7 +2,13 @@ "name": "@modelscope-studio/antd-slider", "type": "module", "exports": { - ".": "./Index.svelte", - "./package.json": "./package.json" + ".": { + "default": "./Index.svelte", + "gradio": "./Index.svelte" + }, + "./package.json": { + "default": "./package.json", + "gradio": "./package.json" + } } } diff --git a/frontend/antd/space/compact/package.json b/frontend/antd/space/compact/package.json index fbdec684..c6865718 100644 --- a/frontend/antd/space/compact/package.json +++ b/frontend/antd/space/compact/package.json @@ -2,7 +2,13 @@ "name": "@modelscope-studio/antd-space.compact", "type": "module", "exports": { - ".": "./Index.svelte", - "./package.json": "./package.json" + ".": { + "default": "./Index.svelte", + "gradio": "./Index.svelte" + }, + "./package.json": { + "default": "./package.json", + "gradio": "./package.json" + } } } diff --git a/frontend/antd/space/package.json b/frontend/antd/space/package.json index 21fd6904..2f2bb790 100644 --- a/frontend/antd/space/package.json +++ b/frontend/antd/space/package.json @@ -2,7 +2,13 @@ "name": "@modelscope-studio/antd-space", "type": "module", "exports": { - ".": "./Index.svelte", - "./package.json": "./package.json" + ".": { + "default": "./Index.svelte", + "gradio": "./Index.svelte" + }, + "./package.json": { + "default": "./package.json", + "gradio": "./package.json" + } } } diff --git a/frontend/antd/spin/package.json b/frontend/antd/spin/package.json index 2e3a61fd..ae3028cc 100644 --- a/frontend/antd/spin/package.json +++ b/frontend/antd/spin/package.json @@ -2,7 +2,13 @@ "name": "@modelscope-studio/antd-spin", "type": "module", "exports": { - ".": "./Index.svelte", - "./package.json": "./package.json" + ".": { + "default": "./Index.svelte", + "gradio": "./Index.svelte" + }, + "./package.json": { + "default": "./package.json", + "gradio": "./package.json" + } } } diff --git a/frontend/antd/splitter/package.json b/frontend/antd/splitter/package.json index 16fce53d..f81675f0 100644 --- a/frontend/antd/splitter/package.json +++ b/frontend/antd/splitter/package.json @@ -2,7 +2,13 @@ "name": "@modelscope-studio/antd-splitter", "type": "module", "exports": { - ".": "./Index.svelte", - "./package.json": "./package.json" + ".": { + "default": "./Index.svelte", + "gradio": "./Index.svelte" + }, + "./package.json": { + "default": "./package.json", + "gradio": "./package.json" + } } } diff --git a/frontend/antd/splitter/panel/package.json b/frontend/antd/splitter/panel/package.json index 1b69296c..79840404 100644 --- a/frontend/antd/splitter/panel/package.json +++ b/frontend/antd/splitter/panel/package.json @@ -2,7 +2,13 @@ "name": "@modelscope-studio/antd-panel", "type": "module", "exports": { - ".": "./Index.svelte", - "./package.json": "./package.json" + ".": { + "default": "./Index.svelte", + "gradio": "./Index.svelte" + }, + "./package.json": { + "default": "./package.json", + "gradio": "./package.json" + } } } diff --git a/frontend/antd/statistic/countdown/package.json b/frontend/antd/statistic/countdown/package.json index aec187e6..8e94d069 100644 --- a/frontend/antd/statistic/countdown/package.json +++ b/frontend/antd/statistic/countdown/package.json @@ -2,7 +2,13 @@ "name": "@modelscope-studio/antd-statistic.countdown", "type": "module", "exports": { - ".": "./Index.svelte", - "./package.json": "./package.json" + ".": { + "default": "./Index.svelte", + "gradio": "./Index.svelte" + }, + "./package.json": { + "default": "./package.json", + "gradio": "./package.json" + } } } diff --git a/frontend/antd/statistic/package.json b/frontend/antd/statistic/package.json index ddb6a524..6e457ec3 100644 --- a/frontend/antd/statistic/package.json +++ b/frontend/antd/statistic/package.json @@ -2,7 +2,13 @@ "name": "@modelscope-studio/antd-statistic", "type": "module", "exports": { - ".": "./Index.svelte", - "./package.json": "./package.json" + ".": { + "default": "./Index.svelte", + "gradio": "./Index.svelte" + }, + "./package.json": { + "default": "./package.json", + "gradio": "./package.json" + } } } diff --git a/frontend/antd/steps/Index.svelte b/frontend/antd/steps/Index.svelte index ccfc649b..833da03f 100644 --- a/frontend/antd/steps/Index.svelte +++ b/frontend/antd/steps/Index.svelte @@ -5,7 +5,11 @@ bindEvents, importComponent, } from '@svelte-preprocess-react/component'; - import { getSlotContext, getSlots } from '@svelte-preprocess-react/slot'; + import { + getSetSlotParamsFn, + getSlotContext, + getSlots, + } from '@svelte-preprocess-react/slot'; import type React from 'react'; import type { Gradio } from '@gradio/utils'; import cls from 'classnames'; @@ -52,6 +56,7 @@ as_item, restProps: $$restProps, }); + const setSlotParams = getSetSlotParamsFn(); const { items, default: children } = getItems(['items', 'default']); @@ -67,6 +72,7 @@ {...bindEvents($mergedProps)} slots={$slots} slotItems={$items.length > 0 ? $items : $children} + {setSlotParams} > diff --git a/frontend/antd/steps/item/package.json b/frontend/antd/steps/item/package.json index ae4e2ae0..533045f0 100644 --- a/frontend/antd/steps/item/package.json +++ b/frontend/antd/steps/item/package.json @@ -2,7 +2,13 @@ "name": "@modelscope-studio/antd-steps.item", "type": "module", "exports": { - ".": "./Index.svelte", - "./package.json": "./package.json" + ".": { + "default": "./Index.svelte", + "gradio": "./Index.svelte" + }, + "./package.json": { + "default": "./package.json", + "gradio": "./package.json" + } } } diff --git a/frontend/antd/steps/package.json b/frontend/antd/steps/package.json index 27117ee6..c6cbdd10 100644 --- a/frontend/antd/steps/package.json +++ b/frontend/antd/steps/package.json @@ -2,7 +2,13 @@ "name": "@modelscope-studio/antd-steps", "type": "module", "exports": { - ".": "./Index.svelte", - "./package.json": "./package.json" + ".": { + "default": "./Index.svelte", + "gradio": "./Index.svelte" + }, + "./package.json": { + "default": "./package.json", + "gradio": "./package.json" + } } } diff --git a/frontend/antd/steps/steps.tsx b/frontend/antd/steps/steps.tsx index 18d7984e..90e616bb 100644 --- a/frontend/antd/steps/steps.tsx +++ b/frontend/antd/steps/steps.tsx @@ -1,7 +1,8 @@ import { sveltify } from '@svelte-preprocess-react'; -import { ReactSlot } from '@svelte-preprocess-react/react-slot'; +import type { SetSlotParams } from '@svelte-preprocess-react/slot'; import React, { useMemo } from 'react'; import { renderItems } from '@utils/renderItems'; +import { renderParamsSlot } from '@utils/renderParamsSlot'; import { type GetProps, Steps as ASteps } from 'antd'; import { type Item } from './context'; @@ -9,27 +10,33 @@ import { type Item } from './context'; export const Steps = sveltify< GetProps & { slotItems: Item[]; + setSlotParams: SetSlotParams; }, ['progressDot'] ->(({ slots, items, slotItems, ...props }) => { +>(({ slots, items, slotItems, setSlotParams, children, ...props }) => { return ( - { - return ( - items || - renderItems['items']>[number]>( - slotItems - ) - ); - }, [items, slotItems])} - progressDot={ - slots.progressDot - ? (dot) => - slots.progressDot ? : dot - : undefined - } - /> + <> +
{children}
+ { + return ( + items || + renderItems['items']>[number]>( + slotItems + ) + ); + }, [items, slotItems])} + progressDot={ + slots.progressDot + ? renderParamsSlot( + { slots, setSlotParams, key: 'progressDot' }, + { clone: true } + ) + : props.progressDot + } + /> + ); }); diff --git a/frontend/antd/switch/package.json b/frontend/antd/switch/package.json index 8a7824be..3a81efa0 100644 --- a/frontend/antd/switch/package.json +++ b/frontend/antd/switch/package.json @@ -2,7 +2,13 @@ "name": "@modelscope-studio/antd-switch", "type": "module", "exports": { - ".": "./Index.svelte", - "./package.json": "./package.json" + ".": { + "default": "./Index.svelte", + "gradio": "./Index.svelte" + }, + "./package.json": { + "default": "./package.json", + "gradio": "./package.json" + } } } diff --git a/frontend/antd/table/column-group/package.json b/frontend/antd/table/column-group/package.json index 6ce3205b..0b211b78 100644 --- a/frontend/antd/table/column-group/package.json +++ b/frontend/antd/table/column-group/package.json @@ -2,7 +2,13 @@ "name": "@modelscope-studio/antd-table.column-group", "type": "module", "exports": { - ".": "./Index.svelte", - "./package.json": "./package.json" + ".": { + "default": "./Index.svelte", + "gradio": "./Index.svelte" + }, + "./package.json": { + "default": "./package.json", + "gradio": "./package.json" + } } } diff --git a/frontend/antd/table/column/package.json b/frontend/antd/table/column/package.json index 852326d1..4d346167 100644 --- a/frontend/antd/table/column/package.json +++ b/frontend/antd/table/column/package.json @@ -2,7 +2,13 @@ "name": "@modelscope-studio/antd-table.column", "type": "module", "exports": { - ".": "./Index.svelte", - "./package.json": "./package.json" + ".": { + "default": "./Index.svelte", + "gradio": "./Index.svelte" + }, + "./package.json": { + "default": "./package.json", + "gradio": "./package.json" + } } } diff --git a/frontend/antd/table/expandable/package.json b/frontend/antd/table/expandable/package.json index 80669601..7903774c 100644 --- a/frontend/antd/table/expandable/package.json +++ b/frontend/antd/table/expandable/package.json @@ -2,7 +2,13 @@ "name": "@modelscope-studio/antd-table.expandable", "type": "module", "exports": { - ".": "./Index.svelte", - "./package.json": "./package.json" + ".": { + "default": "./Index.svelte", + "gradio": "./Index.svelte" + }, + "./package.json": { + "default": "./package.json", + "gradio": "./package.json" + } } } diff --git a/frontend/antd/table/package.json b/frontend/antd/table/package.json index accf96d7..30aa7610 100644 --- a/frontend/antd/table/package.json +++ b/frontend/antd/table/package.json @@ -2,7 +2,13 @@ "name": "@modelscope-studio/antd-table", "type": "module", "exports": { - ".": "./Index.svelte", - "./package.json": "./package.json" + ".": { + "default": "./Index.svelte", + "gradio": "./Index.svelte" + }, + "./package.json": { + "default": "./package.json", + "gradio": "./package.json" + } } } diff --git a/frontend/antd/table/row-selection/package.json b/frontend/antd/table/row-selection/package.json index c8f22cd5..bf1eafd4 100644 --- a/frontend/antd/table/row-selection/package.json +++ b/frontend/antd/table/row-selection/package.json @@ -2,7 +2,13 @@ "name": "@modelscope-studio/antd-table.row-selection", "type": "module", "exports": { - ".": "./Index.svelte", - "./package.json": "./package.json" + ".": { + "default": "./Index.svelte", + "gradio": "./Index.svelte" + }, + "./package.json": { + "default": "./package.json", + "gradio": "./package.json" + } } } diff --git a/frontend/antd/table/row-selection/selection/package.json b/frontend/antd/table/row-selection/selection/package.json index 320a0d64..975c06b9 100644 --- a/frontend/antd/table/row-selection/selection/package.json +++ b/frontend/antd/table/row-selection/selection/package.json @@ -2,7 +2,13 @@ "name": "@modelscope-studio/antd-table.selection", "type": "module", "exports": { - ".": "./Index.svelte", - "./package.json": "./package.json" + ".": { + "default": "./Index.svelte", + "gradio": "./Index.svelte" + }, + "./package.json": { + "default": "./package.json", + "gradio": "./package.json" + } } } diff --git a/frontend/antd/tabs/item/package.json b/frontend/antd/tabs/item/package.json index c054777c..cefe2bfb 100644 --- a/frontend/antd/tabs/item/package.json +++ b/frontend/antd/tabs/item/package.json @@ -2,7 +2,13 @@ "name": "@modelscope-studio/antd-tabs.item", "type": "module", "exports": { - ".": "./Index.svelte", - "./package.json": "./package.json" + ".": { + "default": "./Index.svelte", + "gradio": "./Index.svelte" + }, + "./package.json": { + "default": "./package.json", + "gradio": "./package.json" + } } } diff --git a/frontend/antd/tabs/package.json b/frontend/antd/tabs/package.json index cd2ec069..c52cec1f 100644 --- a/frontend/antd/tabs/package.json +++ b/frontend/antd/tabs/package.json @@ -2,7 +2,13 @@ "name": "@modelscope-studio/antd-tabs", "type": "module", "exports": { - ".": "./Index.svelte", - "./package.json": "./package.json" + ".": { + "default": "./Index.svelte", + "gradio": "./Index.svelte" + }, + "./package.json": { + "default": "./package.json", + "gradio": "./package.json" + } } } diff --git a/frontend/antd/tag/checkable-tag/package.json b/frontend/antd/tag/checkable-tag/package.json index 20d61835..ce1b1c46 100644 --- a/frontend/antd/tag/checkable-tag/package.json +++ b/frontend/antd/tag/checkable-tag/package.json @@ -2,7 +2,13 @@ "name": "@modelscope-studio/antd-tag-checkable-tag", "type": "module", "exports": { - ".": "./Index.svelte", - "./package.json": "./package.json" + ".": { + "default": "./Index.svelte", + "gradio": "./Index.svelte" + }, + "./package.json": { + "default": "./package.json", + "gradio": "./package.json" + } } } diff --git a/frontend/antd/tag/package.json b/frontend/antd/tag/package.json index 67affbdb..72f0afe1 100644 --- a/frontend/antd/tag/package.json +++ b/frontend/antd/tag/package.json @@ -2,7 +2,13 @@ "name": "@modelscope-studio/antd-tag", "type": "module", "exports": { - ".": "./Index.svelte", - "./package.json": "./package.json" + ".": { + "default": "./Index.svelte", + "gradio": "./Index.svelte" + }, + "./package.json": { + "default": "./package.json", + "gradio": "./package.json" + } } } diff --git a/frontend/antd/time-picker/package.json b/frontend/antd/time-picker/package.json index a54cc68f..32687b6b 100644 --- a/frontend/antd/time-picker/package.json +++ b/frontend/antd/time-picker/package.json @@ -2,7 +2,13 @@ "name": "@modelscope-studio/antd-time-picker", "type": "module", "exports": { - ".": "./Index.svelte", - "./package.json": "./package.json" + ".": { + "default": "./Index.svelte", + "gradio": "./Index.svelte" + }, + "./package.json": { + "default": "./package.json", + "gradio": "./package.json" + } } } diff --git a/frontend/antd/time-picker/range-picker/package.json b/frontend/antd/time-picker/range-picker/package.json index b084e010..60da7ac4 100644 --- a/frontend/antd/time-picker/range-picker/package.json +++ b/frontend/antd/time-picker/range-picker/package.json @@ -2,7 +2,13 @@ "name": "@modelscope-studio/antd-time-picker.range-picker", "type": "module", "exports": { - ".": "./Index.svelte", - "./package.json": "./package.json" + ".": { + "default": "./Index.svelte", + "gradio": "./Index.svelte" + }, + "./package.json": { + "default": "./package.json", + "gradio": "./package.json" + } } } diff --git a/frontend/antd/timeline/item/package.json b/frontend/antd/timeline/item/package.json index 57cf9b6b..397ceb79 100644 --- a/frontend/antd/timeline/item/package.json +++ b/frontend/antd/timeline/item/package.json @@ -2,7 +2,13 @@ "name": "@modelscope-studio/antd-timeline.item", "type": "module", "exports": { - ".": "./Index.svelte", - "./package.json": "./package.json" + ".": { + "default": "./Index.svelte", + "gradio": "./Index.svelte" + }, + "./package.json": { + "default": "./package.json", + "gradio": "./package.json" + } } } diff --git a/frontend/antd/timeline/package.json b/frontend/antd/timeline/package.json index 4cba30aa..401e27e8 100644 --- a/frontend/antd/timeline/package.json +++ b/frontend/antd/timeline/package.json @@ -2,7 +2,13 @@ "name": "@modelscope-studio/antd-timeline", "type": "module", "exports": { - ".": "./Index.svelte", - "./package.json": "./package.json" + ".": { + "default": "./Index.svelte", + "gradio": "./Index.svelte" + }, + "./package.json": { + "default": "./package.json", + "gradio": "./package.json" + } } } diff --git a/frontend/antd/tooltip/package.json b/frontend/antd/tooltip/package.json index 9513a022..11f0309f 100644 --- a/frontend/antd/tooltip/package.json +++ b/frontend/antd/tooltip/package.json @@ -2,7 +2,13 @@ "name": "@modelscope-studio/antd-tooltip", "type": "module", "exports": { - ".": "./Index.svelte", - "./package.json": "./package.json" + ".": { + "default": "./Index.svelte", + "gradio": "./Index.svelte" + }, + "./package.json": { + "default": "./package.json", + "gradio": "./package.json" + } } } diff --git a/frontend/antd/tour/package.json b/frontend/antd/tour/package.json index a600928d..c3510ef4 100644 --- a/frontend/antd/tour/package.json +++ b/frontend/antd/tour/package.json @@ -2,7 +2,13 @@ "name": "@modelscope-studio/antd-tour", "type": "module", "exports": { - ".": "./Index.svelte", - "./package.json": "./package.json" + ".": { + "default": "./Index.svelte", + "gradio": "./Index.svelte" + }, + "./package.json": { + "default": "./package.json", + "gradio": "./package.json" + } } } diff --git a/frontend/antd/tour/step/package.json b/frontend/antd/tour/step/package.json index 265c1054..c2f358e2 100644 --- a/frontend/antd/tour/step/package.json +++ b/frontend/antd/tour/step/package.json @@ -2,7 +2,13 @@ "name": "@modelscope-studio/antd-tour.step", "type": "module", "exports": { - ".": "./Index.svelte", - "./package.json": "./package.json" + ".": { + "default": "./Index.svelte", + "gradio": "./Index.svelte" + }, + "./package.json": { + "default": "./package.json", + "gradio": "./package.json" + } } } diff --git a/frontend/antd/transfer/package.json b/frontend/antd/transfer/package.json index 61ae9896..7bdd6254 100644 --- a/frontend/antd/transfer/package.json +++ b/frontend/antd/transfer/package.json @@ -2,7 +2,13 @@ "name": "@modelscope-studio/antd-transfer", "type": "module", "exports": { - ".": "./Index.svelte", - "./package.json": "./package.json" + ".": { + "default": "./Index.svelte", + "gradio": "./Index.svelte" + }, + "./package.json": { + "default": "./package.json", + "gradio": "./package.json" + } } } diff --git a/frontend/antd/tree-select/package.json b/frontend/antd/tree-select/package.json index d55ff517..00b433f7 100644 --- a/frontend/antd/tree-select/package.json +++ b/frontend/antd/tree-select/package.json @@ -2,7 +2,13 @@ "name": "@modelscope-studio/antd-tree-select", "type": "module", "exports": { - ".": "./Index.svelte", - "./package.json": "./package.json" + ".": { + "default": "./Index.svelte", + "gradio": "./Index.svelte" + }, + "./package.json": { + "default": "./package.json", + "gradio": "./package.json" + } } } diff --git a/frontend/antd/tree-select/tree-node/package.json b/frontend/antd/tree-select/tree-node/package.json index 7da27141..b2b3e659 100644 --- a/frontend/antd/tree-select/tree-node/package.json +++ b/frontend/antd/tree-select/tree-node/package.json @@ -2,7 +2,13 @@ "name": "@modelscope-studio/antd-tree-select.tree-node", "type": "module", "exports": { - ".": "./Index.svelte", - "./package.json": "./package.json" + ".": { + "default": "./Index.svelte", + "gradio": "./Index.svelte" + }, + "./package.json": { + "default": "./package.json", + "gradio": "./package.json" + } } } diff --git a/frontend/antd/tree/directory-tree/package.json b/frontend/antd/tree/directory-tree/package.json index f8d9e6fe..bd4c7e70 100644 --- a/frontend/antd/tree/directory-tree/package.json +++ b/frontend/antd/tree/directory-tree/package.json @@ -2,7 +2,13 @@ "name": "@modelscope-studio/antd-tree.directory-tree", "type": "module", "exports": { - ".": "./Index.svelte", - "./package.json": "./package.json" + ".": { + "default": "./Index.svelte", + "gradio": "./Index.svelte" + }, + "./package.json": { + "default": "./package.json", + "gradio": "./package.json" + } } } diff --git a/frontend/antd/tree/package.json b/frontend/antd/tree/package.json index a750487a..e4245db8 100644 --- a/frontend/antd/tree/package.json +++ b/frontend/antd/tree/package.json @@ -2,7 +2,13 @@ "name": "@modelscope-studio/antd-tree", "type": "module", "exports": { - ".": "./Index.svelte", - "./package.json": "./package.json" + ".": { + "default": "./Index.svelte", + "gradio": "./Index.svelte" + }, + "./package.json": { + "default": "./package.json", + "gradio": "./package.json" + } } } diff --git a/frontend/antd/tree/tree-node/package.json b/frontend/antd/tree/tree-node/package.json index 599b30e4..c6843cfa 100644 --- a/frontend/antd/tree/tree-node/package.json +++ b/frontend/antd/tree/tree-node/package.json @@ -2,7 +2,13 @@ "name": "@modelscope-studio/antd-tree.tree-node", "type": "module", "exports": { - ".": "./Index.svelte", - "./package.json": "./package.json" + ".": { + "default": "./Index.svelte", + "gradio": "./Index.svelte" + }, + "./package.json": { + "default": "./package.json", + "gradio": "./package.json" + } } } diff --git a/frontend/antd/typography/link/package.json b/frontend/antd/typography/link/package.json index 47a8971d..20f412c9 100644 --- a/frontend/antd/typography/link/package.json +++ b/frontend/antd/typography/link/package.json @@ -2,7 +2,13 @@ "name": "@modelscope-studio/antd-typography.link", "type": "module", "exports": { - ".": "./Index.svelte", - "./package.json": "./package.json" + ".": { + "default": "./Index.svelte", + "gradio": "./Index.svelte" + }, + "./package.json": { + "default": "./package.json", + "gradio": "./package.json" + } } } diff --git a/frontend/antd/typography/paragraph/package.json b/frontend/antd/typography/paragraph/package.json index 3c201f96..7e2a86e1 100644 --- a/frontend/antd/typography/paragraph/package.json +++ b/frontend/antd/typography/paragraph/package.json @@ -2,7 +2,13 @@ "name": "@modelscope-studio/antd-typography.paragraph", "type": "module", "exports": { - ".": "./Index.svelte", - "./package.json": "./package.json" + ".": { + "default": "./Index.svelte", + "gradio": "./Index.svelte" + }, + "./package.json": { + "default": "./package.json", + "gradio": "./package.json" + } } } diff --git a/frontend/antd/typography/text/package.json b/frontend/antd/typography/text/package.json index 6519b5d2..f35ede67 100644 --- a/frontend/antd/typography/text/package.json +++ b/frontend/antd/typography/text/package.json @@ -2,7 +2,13 @@ "name": "@modelscope-studio/antd-typography.text", "type": "module", "exports": { - ".": "./Index.svelte", - "./package.json": "./package.json" + ".": { + "default": "./Index.svelte", + "gradio": "./Index.svelte" + }, + "./package.json": { + "default": "./package.json", + "gradio": "./package.json" + } } } diff --git a/frontend/antd/typography/title/package.json b/frontend/antd/typography/title/package.json index 3560b395..221fd14d 100644 --- a/frontend/antd/typography/title/package.json +++ b/frontend/antd/typography/title/package.json @@ -2,7 +2,13 @@ "name": "@modelscope-studio/antd-typography.title", "type": "module", "exports": { - ".": "./Index.svelte", - "./package.json": "./package.json" + ".": { + "default": "./Index.svelte", + "gradio": "./Index.svelte" + }, + "./package.json": { + "default": "./package.json", + "gradio": "./package.json" + } } } diff --git a/frontend/antd/typography/typography.base.tsx b/frontend/antd/typography/typography.base.tsx index b5cd3fa1..84c13f2d 100644 --- a/frontend/antd/typography/typography.base.tsx +++ b/frontend/antd/typography/typography.base.tsx @@ -2,6 +2,7 @@ import { sveltify } from '@svelte-preprocess-react'; import { ReactSlot } from '@svelte-preprocess-react/react-slot'; import type { SetSlotParams } from '@svelte-preprocess-react/slot'; import React, { useMemo } from 'react'; +import { useSlotsChildren } from '@utils/hooks/useSlotsChildren'; import { renderParamsSlot } from '@utils/renderParamsSlot'; import { type GetProps, Typography } from 'antd'; import type { EllipsisConfig } from 'antd/es/typography/Base'; @@ -78,82 +79,89 @@ export const TypographyBase = sveltify< return Typography.Link; } }, [component]); + const [slotsChildren, restChildren] = useSlotsChildren(children); return ( - 0 - ? copyableTooltipsTargets.map((slot, index) => { - return ; - }) - : copyableConfig.tooltips, - icon: - copyableIconTargets.length > 0 - ? copyableIconTargets.map((slot, index) => { - return ; - }) - : copyableConfig.icon, - } - : undefined - } - editable={ - supportEdit - ? { - ...editableConfig, - icon: slots['editable.icon'] ? ( - - ) : ( - editableConfig.icon - ), - tooltip: slots['editable.tooltip'] ? ( - - ) : ( - editableConfig.tooltip - ), - enterIcon: slots['editable.enterIcon'] ? ( - - ) : ( - editableConfig.enterIcon - ), - } - : undefined - } - ellipsis={ - (component === 'link' - ? !!supportEllipsis - : supportEllipsis - ? ({ - ...ellipsisConfig, - symbol: slots['ellipsis.symbol'] - ? renderParamsSlot({ - key: 'ellipsis.symbol', - setSlotParams, - slots, - }) - : ellipsisConfig.symbol, - tooltip: slots['ellipsis.tooltip'] ? ( - + <> +
{slotsChildren}
+ 0 + ? copyableTooltipsTargets.map((slot, index) => { + return ; + }) + : copyableConfig.tooltips, + icon: + copyableIconTargets.length > 0 + ? copyableIconTargets.map((slot, index) => { + return ; + }) + : copyableConfig.icon, + } + : undefined + } + editable={ + supportEdit + ? { + ...editableConfig, + icon: slots['editable.icon'] ? ( + ) : ( - { - ...ellipsisConfig.tooltip, - title: slots['ellipsis.tooltip.title'] ? ( - - ) : ( - ellipsisConfig.tooltip.title - ), - } + editableConfig.icon ), - } as EllipsisConfig) - : undefined) as boolean - } - > - {children} - + tooltip: slots['editable.tooltip'] ? ( + + ) : ( + editableConfig.tooltip + ), + enterIcon: slots['editable.enterIcon'] ? ( + + ) : ( + editableConfig.enterIcon + ), + } + : undefined + } + ellipsis={ + (component === 'link' + ? !!supportEllipsis + : supportEllipsis + ? ({ + ...ellipsisConfig, + symbol: slots['ellipsis.symbol'] + ? renderParamsSlot( + { + key: 'ellipsis.symbol', + setSlotParams, + slots, + }, + { clone: true } + ) + : ellipsisConfig.symbol, + tooltip: slots['ellipsis.tooltip'] ? ( + + ) : ( + { + ...ellipsisConfig.tooltip, + title: slots['ellipsis.tooltip.title'] ? ( + + ) : ( + ellipsisConfig.tooltip?.title + ), + } + ), + } as EllipsisConfig) + : undefined) as boolean + } + > + {restChildren} +
+ ); } ); diff --git a/frontend/antd/upload/dragger/package.json b/frontend/antd/upload/dragger/package.json index 38348199..b68a119d 100644 --- a/frontend/antd/upload/dragger/package.json +++ b/frontend/antd/upload/dragger/package.json @@ -2,7 +2,13 @@ "name": "@modelscope-studio/antd-upload.dragger", "type": "module", "exports": { - ".": "./Index.svelte", - "./package.json": "./package.json" + ".": { + "default": "./Index.svelte", + "gradio": "./Index.svelte" + }, + "./package.json": { + "default": "./package.json", + "gradio": "./package.json" + } } } diff --git a/frontend/antd/upload/package.json b/frontend/antd/upload/package.json index 3ae0e15a..d07c445d 100644 --- a/frontend/antd/upload/package.json +++ b/frontend/antd/upload/package.json @@ -2,7 +2,13 @@ "name": "@modelscope-studio/antd-upload", "type": "module", "exports": { - ".": "./Index.svelte", - "./package.json": "./package.json" + ".": { + "default": "./Index.svelte", + "gradio": "./Index.svelte" + }, + "./package.json": { + "default": "./package.json", + "gradio": "./package.json" + } } } diff --git a/frontend/antd/watermark/package.json b/frontend/antd/watermark/package.json index bda0363e..26c38a1e 100644 --- a/frontend/antd/watermark/package.json +++ b/frontend/antd/watermark/package.json @@ -2,7 +2,13 @@ "name": "@modelscope-studio/antd-watermark", "type": "module", "exports": { - ".": "./Index.svelte", - "./package.json": "./package.json" + ".": { + "default": "./Index.svelte", + "gradio": "./Index.svelte" + }, + "./package.json": { + "default": "./package.json", + "gradio": "./package.json" + } } } diff --git a/frontend/base/application/package.json b/frontend/base/application/package.json index 3b0097e7..1b09e517 100644 --- a/frontend/base/application/package.json +++ b/frontend/base/application/package.json @@ -2,7 +2,13 @@ "name": "@modelscope-studio/antd-application", "type": "module", "exports": { - ".": "./Index.svelte", - "./package.json": "./package.json" + ".": { + "default": "./Index.svelte", + "gradio": "./Index.svelte" + }, + "./package.json": { + "default": "./package.json", + "gradio": "./package.json" + } } } diff --git a/frontend/base/div/package.json b/frontend/base/div/package.json index 0cec1cb7..b5ba6623 100644 --- a/frontend/base/div/package.json +++ b/frontend/base/div/package.json @@ -2,7 +2,13 @@ "name": "@modelscope-studio/antd-div", "type": "module", "exports": { - ".": "./Index.svelte", - "./package.json": "./package.json" + ".": { + "default": "./Index.svelte", + "gradio": "./Index.svelte" + }, + "./package.json": { + "default": "./package.json", + "gradio": "./package.json" + } } } diff --git a/frontend/base/each/package.json b/frontend/base/each/package.json index b39fab86..08434ea0 100644 --- a/frontend/base/each/package.json +++ b/frontend/base/each/package.json @@ -2,7 +2,13 @@ "name": "@modelscope-studio/antd-each", "type": "module", "exports": { - ".": "./Index.svelte", - "./package.json": "./package.json" + ".": { + "default": "./Index.svelte", + "gradio": "./Index.svelte" + }, + "./package.json": { + "default": "./package.json", + "gradio": "./package.json" + } } } diff --git a/frontend/base/filter/package.json b/frontend/base/filter/package.json index daf9a8f0..98988955 100644 --- a/frontend/base/filter/package.json +++ b/frontend/base/filter/package.json @@ -2,7 +2,13 @@ "name": "@modelscope-studio/antd-filter", "type": "module", "exports": { - ".": "./Index.svelte", - "./package.json": "./package.json" + ".": { + "default": "./Index.svelte", + "gradio": "./Index.svelte" + }, + "./package.json": { + "default": "./package.json", + "gradio": "./package.json" + } } } diff --git a/frontend/base/fragment/package.json b/frontend/base/fragment/package.json index d50f25e7..eff5dd12 100644 --- a/frontend/base/fragment/package.json +++ b/frontend/base/fragment/package.json @@ -2,8 +2,14 @@ "name": "@modelscope-studio/antd-fragment", "type": "module", "exports": { - ".": "./Index.svelte", - "./ShowFragment": "./ShowFragment.svelte", - "./package.json": "./package.json" + ".": { + "default": "./Index.svelte", + "gradio": "./Index.svelte" + }, + "./package.json": { + "default": "./package.json", + "gradio": "./package.json" + }, + "./ShowFragment": "./ShowFragment.svelte" } } diff --git a/frontend/base/slot/package.json b/frontend/base/slot/package.json index 7ed25fc9..fe61cc1b 100644 --- a/frontend/base/slot/package.json +++ b/frontend/base/slot/package.json @@ -2,7 +2,13 @@ "name": "@modelscope-studio/antd-slot", "type": "module", "exports": { - ".": "./Index.svelte", - "./package.json": "./package.json" + ".": { + "default": "./Index.svelte", + "gradio": "./Index.svelte" + }, + "./package.json": { + "default": "./package.json", + "gradio": "./package.json" + } } } diff --git a/frontend/base/span/package.json b/frontend/base/span/package.json index a8f90145..c3a83e32 100644 --- a/frontend/base/span/package.json +++ b/frontend/base/span/package.json @@ -2,7 +2,13 @@ "name": "@modelscope-studio/antd-span", "type": "module", "exports": { - ".": "./Index.svelte", - "./package.json": "./package.json" + ".": { + "default": "./Index.svelte", + "gradio": "./Index.svelte" + }, + "./package.json": { + "default": "./package.json", + "gradio": "./package.json" + } } } diff --git a/frontend/base/text/package.json b/frontend/base/text/package.json index 0a35c503..44cfecdb 100644 --- a/frontend/base/text/package.json +++ b/frontend/base/text/package.json @@ -2,7 +2,13 @@ "name": "@modelscope-studio/antd-text", "type": "module", "exports": { - ".": "./Index.svelte", - "./package.json": "./package.json" + ".": { + "default": "./Index.svelte", + "gradio": "./Index.svelte" + }, + "./package.json": { + "default": "./package.json", + "gradio": "./package.json" + } } } diff --git a/frontend/legacy/Chatbot/package.json b/frontend/legacy/Chatbot/package.json index 3fdd9378..101bbdd0 100644 --- a/frontend/legacy/Chatbot/package.json +++ b/frontend/legacy/Chatbot/package.json @@ -7,8 +7,14 @@ "license": "Apache-2.0", "type": "module", "exports": { - ".": "./Index.svelte", - "./package.json": "./package.json" + ".": { + "default": "./Index.svelte", + "gradio": "./Index.svelte" + }, + "./package.json": { + "default": "./package.json", + "gradio": "./package.json" + } }, "dependencies": { "@modelscope-studio/legacy-compiled": "workspace:*" diff --git a/frontend/legacy/Flow/package.json b/frontend/legacy/Flow/package.json index 8bae2bc0..1bd8735d 100644 --- a/frontend/legacy/Flow/package.json +++ b/frontend/legacy/Flow/package.json @@ -7,8 +7,14 @@ "license": "Apache-2.0", "type": "module", "exports": { - ".": "./Index.svelte", - "./package.json": "./package.json" + ".": { + "default": "./Index.svelte", + "gradio": "./Index.svelte" + }, + "./package.json": { + "default": "./package.json", + "gradio": "./package.json" + } }, "scripts": { "build": "typescript-json-schema --skipLibCheck ./schema.ts FlowSchema > ./schema.json" diff --git a/frontend/legacy/Lifecycle/package.json b/frontend/legacy/Lifecycle/package.json index 4497417d..d285d85b 100644 --- a/frontend/legacy/Lifecycle/package.json +++ b/frontend/legacy/Lifecycle/package.json @@ -7,8 +7,14 @@ "license": "Apache-2.0", "type": "module", "exports": { - ".": "./Index.svelte", - "./package.json": "./package.json" + ".": { + "default": "./Index.svelte", + "gradio": "./Index.svelte" + }, + "./package.json": { + "default": "./package.json", + "gradio": "./package.json" + } }, "dependencies": {}, "devDependencies": {}, diff --git a/frontend/legacy/Markdown/package.json b/frontend/legacy/Markdown/package.json index 7b025700..e33ff967 100644 --- a/frontend/legacy/Markdown/package.json +++ b/frontend/legacy/Markdown/package.json @@ -7,9 +7,18 @@ "license": "Apache-2.0", "type": "module", "exports": { - ".": "./Index.svelte", - "./example": "./Example.svelte", - "./package.json": "./package.json" + "./example": { + "default": "./Example.svelte", + "gradio": "./Example.svelte" + }, + ".": { + "default": "./Index.svelte", + "gradio": "./Index.svelte" + }, + "./package.json": { + "default": "./package.json", + "gradio": "./package.json" + } }, "dependencies": { "@modelscope-studio/legacy-compiled": "workspace:*" diff --git a/frontend/legacy/MultimodalInput/package.json b/frontend/legacy/MultimodalInput/package.json index 1d0b86c2..e173cdf5 100644 --- a/frontend/legacy/MultimodalInput/package.json +++ b/frontend/legacy/MultimodalInput/package.json @@ -7,9 +7,18 @@ "license": "Apache-2.0", "type": "module", "exports": { - ".": "./Index.svelte", - "./example": "./Example.svelte", - "./package.json": "./package.json" + "./example": { + "default": "./Example.svelte", + "gradio": "./Example.svelte" + }, + ".": { + "default": "./Index.svelte", + "gradio": "./Index.svelte" + }, + "./package.json": { + "default": "./package.json", + "gradio": "./package.json" + } }, "dependencies": { "@modelscope-studio/legacy-compiled": "workspace:*" diff --git a/frontend/legacy/WaterfallGallery/package.json b/frontend/legacy/WaterfallGallery/package.json index 852fd60c..2ab708df 100644 --- a/frontend/legacy/WaterfallGallery/package.json +++ b/frontend/legacy/WaterfallGallery/package.json @@ -7,8 +7,14 @@ "author": "", "type": "module", "exports": { - ".": "./Index.svelte", - "./package.json": "./package.json" + ".": { + "default": "./Index.svelte", + "gradio": "./Index.svelte" + }, + "./package.json": { + "default": "./package.json", + "gradio": "./package.json" + } }, "main_changeset": true } diff --git a/frontend/legacy/compiled/package.json b/frontend/legacy/compiled/package.json index 8e24f42a..2e60fb64 100644 --- a/frontend/legacy/compiled/package.json +++ b/frontend/legacy/compiled/package.json @@ -14,13 +14,13 @@ "@subscribe-kit/core": "^2.1.1", "@subscribe-kit/react": "^2.1.1", "@ungap/structured-clone": "^1.2.0", - "@xyflow/react": "12.3.0", + "@xyflow/react": "12.3.1", "ajv": "^8.17.1", "ajv-i18n": "^4.2.0", "deepmerge": "^4.3.1", "echarts": "^5.5.1", "elkjs": "^0.9.3", - "github-markdown-css": "^5.6.1", + "github-markdown-css": "^5.7.0", "github-slugger": "^2.0.0", "hastscript": "^9.0.0", "katex": "^0.16.11", diff --git a/frontend/package.json b/frontend/package.json index e5abea24..eab4bb3c 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -10,11 +10,11 @@ "@ant-design/icons": "^5.5.1", "@gradio/atoms": "0.7.4", "@gradio/button": "^0.2.43", - "@gradio/client": "^1.5.2", + "@gradio/client": "^1.6.0", "@gradio/icons": "0.4.1", "@gradio/statustracker": "^0.7.6", - "@gradio/utils": "0.6.1", - "antd": "^5.21.0", + "@gradio/utils": "0.7.0", + "antd": "^5.21.3", "classnames": "^2.5.1", "dayjs": "^1.11.12", "immer": "^10.1.1", @@ -26,24 +26,24 @@ "wavesurfer.js": "^7.8.6" }, "devDependencies": { - "@babel/core": "^7.24.9", + "@babel/core": "^7.25.7", "@gradio/atoms": "0.7.4", "@gradio/button": "^0.2.43", "@gradio/client": "1.1.1", "@gradio/icons": "0.4.1", - "@gradio/preview": "0.10.1", + "@gradio/preview": "0.12.0", "@gradio/statustracker": "0.6.0", "@gradio/upload": "0.11.2", "@gradio/utils": "0.4.2", "@types/babel__core": "^7.20.5", "@types/lodash-es": "^4.17.12", - "@types/react": "^18.3.8", + "@types/react": "^18.3.11", "@types/react-dom": "^18.3.0", - "@vitejs/plugin-react-swc": "^3.7.0", + "@vitejs/plugin-react-swc": "^3.7.1", "dequal": "^2.0.2", "less": "^4.2.0", "typescript-json-schema": "^0.65.1", - "vite": "^5.4.7" + "vite": "^5.4.8" }, "main_changeset": true } diff --git a/frontend/svelte-preprocess-react/internal/Child.ts b/frontend/svelte-preprocess-react/internal/Child.ts index ac690aa2..d1791b46 100644 --- a/frontend/svelte-preprocess-react/internal/Child.ts +++ b/frontend/svelte-preprocess-react/internal/Child.ts @@ -3,8 +3,9 @@ import React, { useEffect, useRef } from 'react'; export interface ChildProps { el: HTMLElement | undefined; __slot__: boolean; + children?: React.ReactNode[]; } -const Child: React.FC = ({ el }) => { +const Child: React.FC = ({ el, children }) => { const ref = useRef(); useEffect(() => { if (!ref.current) { @@ -15,9 +16,13 @@ const Child: React.FC = ({ el }) => { ref.current.appendChild(el); } }, [el]); - return React.createElement('react-child', { - ref, - style: { display: 'contents' }, - }); + return React.createElement( + 'react-child', + { + ref, + style: { display: 'contents' }, + }, + ...(children || []) + ); }; export default Child; diff --git a/frontend/svelte-preprocess-react/react-slot.tsx b/frontend/svelte-preprocess-react/react-slot.tsx index 58aca1a7..ed0fa6b8 100644 --- a/frontend/svelte-preprocess-react/react-slot.tsx +++ b/frontend/svelte-preprocess-react/react-slot.tsx @@ -24,7 +24,19 @@ function cloneElementWithEvents(element: HTMLElement) { ).map((child) => { // get svelte-slot if (React.isValidElement(child) && child.props.__slot__) { - return child; + const { + portals: childPortals, + clonedElement: childClonedElement, + } = cloneElementWithEvents(child.props.el); + // Child Component + return React.cloneElement(child, { + ...child.props, + el: childClonedElement, + children: [ + ...React.Children.toArray(child.props.children), + ...childPortals, + ], + }); } return null; }), @@ -46,16 +58,21 @@ function cloneElementWithEvents(element: HTMLElement) { clonedElement.addEventListener(type, listener, useCapture); }); }); - const elementsChildrenArray = Array.from(element.children); + const elementsChildrenArray = Array.from(element.childNodes); for (let i = 0; i < elementsChildrenArray.length; i++) { const child = elementsChildrenArray[i]; - - const { clonedElement: clonedChild, portals: portalsChildren } = - cloneElementWithEvents(child as HTMLElement); - portals.push(...portalsChildren); - clonedElement.appendChild(clonedChild); - // clonedElement.replaceChild(clonedChild, clonedElement.children[i]); + // element + if (child.nodeType === 1) { + const { clonedElement: clonedChild, portals: portalsChildren } = + cloneElementWithEvents(child as HTMLElement); + portals.push(...portalsChildren); + clonedElement.appendChild(clonedChild); + // clonedElement.replaceChild(clonedChild, clonedElement.children[i]); + // text + } else if (child.nodeType === 3) { + clonedElement.appendChild(child.cloneNode()); + } } return { diff --git a/frontend/svelte-preprocess-react/slot.ts b/frontend/svelte-preprocess-react/slot.ts index df44021d..365d55bf 100644 --- a/frontend/svelte-preprocess-react/slot.ts +++ b/frontend/svelte-preprocess-react/slot.ts @@ -55,9 +55,11 @@ export function getSetSlotParamsFn(): SetSlotParams { }; } export function getSlotParams() { - return getContext(slotParamsKey) as + const slotParams = getContext(slotParamsKey) as | Writable> | undefined; + setContext(slotParamsKey, undefined); + return slotParams; } const slotContextKey = '$$ms-gr-context-key'; diff --git a/frontend/utils/renderParamsSlot.tsx b/frontend/utils/renderParamsSlot.tsx index 38c4b925..3d0996e4 100644 --- a/frontend/utils/renderParamsSlot.tsx +++ b/frontend/utils/renderParamsSlot.tsx @@ -1,18 +1,21 @@ import type { SetSlotParams } from '@svelte-preprocess-react/slot'; -import { renderSlot } from './renderSlot'; +import { renderSlot, type RenderSlotOptions } from './renderSlot'; -export function renderParamsSlot({ - key, - setSlotParams, - slots, -}: { - key: string; - setSlotParams: SetSlotParams; - slots: Record; -}) { +export function renderParamsSlot( + { + key, + setSlotParams, + slots, + }: { + key: string; + setSlotParams: SetSlotParams; + slots: Record; + }, + options?: RenderSlotOptions +) { return (...args: any[]) => { setSlotParams(key, args); - return renderSlot(slots[key]); + return renderSlot(slots[key], options); }; } diff --git a/frontend/utils/renderSlot.tsx b/frontend/utils/renderSlot.tsx index dc46d5a3..80771d59 100644 --- a/frontend/utils/renderSlot.tsx +++ b/frontend/utils/renderSlot.tsx @@ -1,6 +1,10 @@ import { ReactSlot } from '@svelte-preprocess-react/react-slot'; import React from 'react'; -export function renderSlot(el?: HTMLElement, options?: { clone?: boolean }) { +export interface RenderSlotOptions { + clone?: boolean; +} + +export function renderSlot(el?: HTMLElement, options?: RenderSlotOptions) { return el ? : null; } diff --git a/package.json b/package.json index d2338797..5ca3f779 100644 --- a/package.json +++ b/package.json @@ -23,30 +23,30 @@ "ci:version": "pnpm run version" }, "devDependencies": { - "@actions/core": "^1.10.1", + "@actions/core": "^1.11.1", "@actions/exec": "^1.1.1", "@actions/github": "^6.0.0", - "@changesets/cli": "^2.27.8", + "@changesets/cli": "^2.27.9", "@commitlint/cli": "^19.5.0", "@commitlint/config-conventional": "^19.5.0", "@manypkg/get-packages": "^2.2.2", "@modelscope-studio/changelog": "workspace:*", "@modelscope-studio/lint-config": "workspace:*", - "eslint": "^9.11.0", + "eslint": "^9.12.0", "husky": "^9.1.6", "lint-staged": "^15.2.10", "node-fetch": "^3.3.2", "npm-run-all": "^4.1.5", "prettier": "^3.3.3", - "prettier-plugin-packagejson": "^2.5.2", - "prettier-plugin-svelte": "^3.2.6", + "prettier-plugin-packagejson": "^2.5.3", + "prettier-plugin-svelte": "^3.2.7", "rimraf": "^6.0.1", "stylelint": "^16.9.0", "svelte": "^4.2.19", - "svelte-check": "^4.0.2", + "svelte-check": "^4.0.4", "tslib": "^2.7.0", "tsx": "^4.19.1", - "typescript": "^5.6.2" + "typescript": "^5.6.3" }, "main_changeset": true } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 5b84e1be..8fe709b4 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -9,8 +9,8 @@ importers: .: devDependencies: '@actions/core': - specifier: ^1.10.1 - version: 1.10.1 + specifier: ^1.11.1 + version: 1.11.1 '@actions/exec': specifier: ^1.1.1 version: 1.1.1 @@ -18,11 +18,11 @@ importers: specifier: ^6.0.0 version: 6.0.0 '@changesets/cli': - specifier: ^2.27.8 - version: 2.27.8 + specifier: ^2.27.9 + version: 2.27.9 '@commitlint/cli': specifier: ^19.5.0 - version: 19.5.0(@types/node@22.5.5)(typescript@5.6.2) + version: 19.5.0(@types/node@22.7.5)(typescript@5.6.3) '@commitlint/config-conventional': specifier: ^19.5.0 version: 19.5.0 @@ -36,8 +36,8 @@ importers: specifier: workspace:* version: link:config/lint-config eslint: - specifier: ^9.11.0 - version: 9.11.0(jiti@1.21.6) + specifier: ^9.12.0 + version: 9.12.0(jiti@2.3.3) husky: specifier: ^9.1.6 version: 9.1.6 @@ -54,23 +54,23 @@ importers: specifier: ^3.3.3 version: 3.3.3 prettier-plugin-packagejson: - specifier: ^2.5.2 - version: 2.5.2(prettier@3.3.3) + specifier: ^2.5.3 + version: 2.5.3(prettier@3.3.3) prettier-plugin-svelte: - specifier: ^3.2.6 - version: 3.2.6(prettier@3.3.3)(svelte@4.2.19) + specifier: ^3.2.7 + version: 3.2.7(prettier@3.3.3)(svelte@4.2.19) rimraf: specifier: ^6.0.1 version: 6.0.1 stylelint: specifier: ^16.9.0 - version: 16.9.0(typescript@5.6.2) + version: 16.9.0(typescript@5.6.3) svelte: specifier: ^4.2.19 version: 4.2.19 svelte-check: - specifier: ^4.0.2 - version: 4.0.2(picomatch@4.0.2)(svelte@4.2.19)(typescript@5.6.2) + specifier: ^4.0.4 + version: 4.0.4(picomatch@4.0.2)(svelte@4.2.19)(typescript@5.6.3) tslib: specifier: ^2.7.0 version: 2.7.0 @@ -78,8 +78,8 @@ importers: specifier: ^4.19.1 version: 4.19.1 typescript: - specifier: ^5.6.2 - version: 5.6.2 + specifier: ^5.6.3 + version: 5.6.3 config/changelog: dependencies: @@ -97,56 +97,56 @@ importers: specifier: ^6.0.0 version: 6.0.0 '@types/node': - specifier: ^22.5.5 - version: 22.5.5 + specifier: ^22.7.5 + version: 22.7.5 tsup: specifier: ^8.3.0 - version: 8.3.0(@microsoft/api-extractor@7.47.9(@types/node@22.5.5))(@swc/core@1.7.26)(jiti@1.21.6)(postcss@8.4.47)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.5.1) + version: 8.3.0(@microsoft/api-extractor@7.47.9(@types/node@22.7.5))(@swc/core@1.7.26)(jiti@2.3.3)(postcss@8.4.47)(tsx@4.19.1)(typescript@5.6.3)(yaml@2.5.1) config/lint-config: dependencies: '@eslint/compat': - specifier: ^1.1.1 - version: 1.1.1 + specifier: ^1.2.0 + version: 1.2.0(eslint@9.12.0(jiti@2.3.3)) '@eslint/js': - specifier: ^9.11.0 - version: 9.11.0 + specifier: ^9.12.0 + version: 9.12.0 '@typescript-eslint/parser': - specifier: ^8.6.0 - version: 8.6.0(eslint@9.11.0(jiti@1.21.6))(typescript@5.6.2) + specifier: ^8.8.1 + version: 8.8.1(eslint@9.12.0(jiti@2.3.3))(typescript@5.6.3) eslint-config-prettier: specifier: ^9.0.0 - version: 9.1.0(eslint@9.11.0(jiti@1.21.6)) + version: 9.1.0(eslint@9.12.0(jiti@2.3.3)) eslint-import-resolver-typescript: specifier: ^3.6.0 - version: 3.6.3(@typescript-eslint/parser@8.6.0(eslint@9.11.0(jiti@1.21.6))(typescript@5.6.2))(eslint-plugin-import@2.30.0)(eslint@9.11.0(jiti@1.21.6)) + version: 3.6.3(@typescript-eslint/parser@8.8.1(eslint@9.12.0(jiti@2.3.3))(typescript@5.6.3))(eslint-plugin-import@2.31.0)(eslint@9.12.0(jiti@2.3.3)) eslint-plugin-import: - specifier: ^2.29.1 - version: 2.30.0(@typescript-eslint/parser@8.6.0(eslint@9.11.0(jiti@1.21.6))(typescript@5.6.2))(eslint-import-resolver-typescript@3.6.3)(eslint@9.11.0(jiti@1.21.6)) + specifier: ^2.31.0 + version: 2.31.0(@typescript-eslint/parser@8.8.1(eslint@9.12.0(jiti@2.3.3))(typescript@5.6.3))(eslint-import-resolver-typescript@3.6.3)(eslint@9.12.0(jiti@2.3.3)) eslint-plugin-jsx-a11y: specifier: ^6.9.0 - version: 6.10.0(eslint@9.11.0(jiti@1.21.6)) + version: 6.10.0(eslint@9.12.0(jiti@2.3.3)) eslint-plugin-prettier: specifier: 5.2.1 - version: 5.2.1(@types/eslint@9.6.1)(eslint-config-prettier@9.1.0(eslint@9.11.0(jiti@1.21.6)))(eslint@9.11.0(jiti@1.21.6))(prettier@3.3.3) + version: 5.2.1(@types/eslint@9.6.1)(eslint-config-prettier@9.1.0(eslint@9.12.0(jiti@2.3.3)))(eslint@9.12.0(jiti@2.3.3))(prettier@3.3.3) eslint-plugin-react: - specifier: ^7.36.1 - version: 7.36.1(eslint@9.11.0(jiti@1.21.6)) + specifier: ^7.37.1 + version: 7.37.1(eslint@9.12.0(jiti@2.3.3)) eslint-plugin-react-hooks: specifier: ^4.6.2 - version: 4.6.2(eslint@9.11.0(jiti@1.21.6)) + version: 4.6.2(eslint@9.12.0(jiti@2.3.3)) eslint-plugin-react-refresh: specifier: ^0.4.12 - version: 0.4.12(eslint@9.11.0(jiti@1.21.6)) + version: 0.4.12(eslint@9.12.0(jiti@2.3.3)) eslint-plugin-simple-import-sort: specifier: ^12.1.0 - version: 12.1.1(eslint@9.11.0(jiti@1.21.6)) + version: 12.1.1(eslint@9.12.0(jiti@2.3.3)) eslint-plugin-svelte: - specifier: ^2.44.0 - version: 2.44.0(eslint@9.11.0(jiti@1.21.6))(svelte@4.2.19)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@22.5.5)(typescript@5.6.2)) + specifier: ^2.44.1 + version: 2.44.1(eslint@9.12.0(jiti@2.3.3))(svelte@4.2.19)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@22.7.5)(typescript@5.6.3)) globals: - specifier: ^15.6.0 - version: 15.9.0 + specifier: ^15.11.0 + version: 15.11.0 postcss: specifier: ^8.4.47 version: 8.4.47 @@ -175,8 +175,8 @@ importers: specifier: ^0.41.1 version: 0.41.1(svelte@4.2.19) typescript-eslint: - specifier: ^8.6.0 - version: 8.6.0(eslint@9.11.0(jiti@1.21.6))(typescript@5.6.2) + specifier: ^8.8.1 + version: 8.8.1(eslint@9.12.0(jiti@2.3.3))(typescript@5.6.3) devDependencies: '@types/eslint': specifier: ^9.6.1 @@ -200,8 +200,8 @@ importers: specifier: ^0.2.43 version: 0.2.43(svelte@4.2.19) '@gradio/client': - specifier: ^1.5.2 - version: 1.5.2 + specifier: ^1.6.0 + version: 1.6.0 '@gradio/icons': specifier: 0.4.1 version: 0.4.1 @@ -209,11 +209,11 @@ importers: specifier: ^0.7.6 version: 0.7.6(svelte@4.2.19) '@gradio/utils': - specifier: 0.6.1 - version: 0.6.1(svelte@4.2.19) + specifier: 0.7.0 + version: 0.7.0(svelte@4.2.19) antd: - specifier: ^5.21.0 - version: 5.21.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + specifier: ^5.21.3 + version: 5.21.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1) classnames: specifier: ^2.5.1 version: 2.5.1 @@ -243,11 +243,11 @@ importers: version: 7.8.6 devDependencies: '@babel/core': - specifier: ^7.24.9 - version: 7.25.2 + specifier: ^7.25.7 + version: 7.25.7 '@gradio/preview': - specifier: 0.10.1 - version: 0.10.1(@babel/core@7.25.2)(@types/node@18.19.50)(less@4.2.0)(postcss-load-config@3.1.4(postcss@8.4.47)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@18.19.50)(typescript@5.5.4)))(postcss@8.4.47)(rollup@4.22.4)(svelte@4.2.19) + specifier: 0.12.0 + version: 0.12.0(@babel/core@7.25.7)(@types/node@18.19.55)(less@4.2.0)(postcss-load-config@3.1.4(postcss@8.4.47)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@18.19.55)(typescript@5.5.4)))(postcss@8.4.47)(rollup@4.24.0) '@gradio/upload': specifier: 0.11.2 version: 0.11.2(svelte@4.2.19) @@ -258,14 +258,14 @@ importers: specifier: ^4.17.12 version: 4.17.12 '@types/react': - specifier: ^18.3.8 - version: 18.3.8 + specifier: ^18.3.11 + version: 18.3.11 '@types/react-dom': specifier: ^18.3.0 version: 18.3.0 '@vitejs/plugin-react-swc': - specifier: ^3.7.0 - version: 3.7.0(vite@5.4.7(@types/node@18.19.50)(less@4.2.0)(lightningcss@1.27.0)(sass@1.78.0)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.47))) + specifier: ^3.7.1 + version: 3.7.1(vite@5.4.8(@types/node@18.19.55)(less@4.2.0)(lightningcss@1.27.0)(sass@1.79.4)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.47))) dequal: specifier: ^2.0.2 version: 2.0.3 @@ -276,8 +276,8 @@ importers: specifier: ^0.65.1 version: 0.65.1(@swc/core@1.7.26) vite: - specifier: ^5.4.7 - version: 5.4.7(@types/node@18.19.50)(less@4.2.0)(lightningcss@1.27.0)(sass@1.78.0)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.47)) + specifier: ^5.4.8 + version: 5.4.8(@types/node@18.19.55)(less@4.2.0)(lightningcss@1.27.0)(sass@1.79.4)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.47)) frontend/antd: {} @@ -315,16 +315,16 @@ importers: dependencies: '@subscribe-kit/core': specifier: ^2.1.1 - version: 2.1.1(typescript@5.6.2) + version: 2.1.1(typescript@5.6.3) '@subscribe-kit/react': specifier: ^2.1.1 - version: 2.1.1(@subscribe-kit/core@2.1.1(typescript@5.6.2))(react@18.3.1)(typescript@5.6.2) + version: 2.1.1(@subscribe-kit/core@2.1.1(typescript@5.6.3))(react@18.3.1)(typescript@5.6.3) '@ungap/structured-clone': specifier: ^1.2.0 version: 1.2.0 '@xyflow/react': - specifier: 12.3.0 - version: 12.3.0(@types/react@18.3.8)(immer@10.1.1)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + specifier: 12.3.1 + version: 12.3.1(@types/react@18.3.11)(immer@10.1.1)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) ajv: specifier: ^8.17.1 version: 8.17.1 @@ -341,8 +341,8 @@ importers: specifier: ^0.9.3 version: 0.9.3 github-markdown-css: - specifier: ^5.6.1 - version: 5.6.1 + specifier: ^5.7.0 + version: 5.7.0 github-slugger: specifier: ^2.0.0 version: 2.0.0 @@ -357,7 +357,7 @@ importers: version: 3.11.174 react-markdown: specifier: ^9.0.1 - version: 9.0.1(@types/react@18.3.8)(react@18.3.1) + version: 9.0.1(@types/react@18.3.11)(react@18.3.1) react-syntax-highlighter: specifier: ^15.5.0 version: 15.5.0(react@18.3.1) @@ -392,8 +392,8 @@ importers: packages: - '@actions/core@1.10.1': - resolution: {integrity: sha512-3lBR9EDAY+iYIpTnTIXmWcNbX3T2kCkAEQGIQx4NVQ0575nk2k3GRZDTPQG+vVtS2izSLmINlxXf0uLtnrTP+g==} + '@actions/core@1.11.1': + resolution: {integrity: sha512-hXJCSrkwfA46Vd9Z3q4cpEpHB1rL5NG04+/rbqW9d3+CSvtB1tYe8UTpAlixa1vj0m/ULglfEK2UKxMGxCxv5A==} '@actions/exec@1.1.1': resolution: {integrity: sha512-+sCcHHbVdk93a0XT19ECtO/gIXoxvdsgQLzb2fE2/5sIZmWQuluYyjPQtrtTHdU1YzTZ7bAPN4sITq2xi1679w==} @@ -404,6 +404,9 @@ packages: '@actions/http-client@2.2.1': resolution: {integrity: sha512-KhC/cZsq7f8I4LfZSJKgCvEwfkE8o1538VoBeoGzokVLLnbFDEAdFD3UhoMklxo2un9NJVBdANOresx7vTHlHw==} + '@actions/http-client@2.2.3': + resolution: {integrity: sha512-mx8hyJi/hjFvbPokCg4uRd4ZX78t+YyRPtnKWwIl+RzNaVuFpQHfmlGVfsKEJN8LwTCvL+DfVgAM04XaHkm6bA==} + '@actions/io@1.1.3': resolution: {integrity: sha512-wi9JjgKLYS7U/z8PPbco+PvTb/nRWjeoFlJ1Qer83k/3C5PHQi28hiVdeE2kHXmIL99mQFawx8qt/JPjZilJ8Q==} @@ -452,63 +455,79 @@ packages: resolution: {integrity: sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA==} engines: {node: '>=6.9.0'} - '@babel/compat-data@7.25.4': - resolution: {integrity: sha512-+LGRog6RAsCJrrrg/IO6LGmpphNe5DiK30dGjCoxxeGv49B10/3XYGxPsAwrDlMFcFEvdAUavDT8r9k/hSyQqQ==} + '@babel/code-frame@7.25.7': + resolution: {integrity: sha512-0xZJFNE5XMpENsgfHYTw8FbX4kv53mFLn2i3XPoq69LyhYSCBJtitaHx9QnsVTrsogI4Z3+HtEfZ2/GFPOtf5g==} engines: {node: '>=6.9.0'} - '@babel/core@7.25.2': - resolution: {integrity: sha512-BBt3opiCOxUr9euZ5/ro/Xv8/V7yJ5bjYMqG/C1YAo8MIKAnumZalCN+msbci3Pigy4lIQfPUpfMM27HMGaYEA==} + '@babel/compat-data@7.25.7': + resolution: {integrity: sha512-9ickoLz+hcXCeh7jrcin+/SLWm+GkxE2kTvoYyp38p4WkdFXfQJxDFGWp/YHjiKLPx06z2A7W8XKuqbReXDzsw==} engines: {node: '>=6.9.0'} - '@babel/generator@7.25.6': - resolution: {integrity: sha512-VPC82gr1seXOpkjAAKoLhP50vx4vGNlF4msF64dSFq1P8RfB+QAuJWGHPXXPc8QyfVWwwB/TNNU4+ayZmHNbZw==} + '@babel/core@7.25.7': + resolution: {integrity: sha512-yJ474Zv3cwiSOO9nXJuqzvwEeM+chDuQ8GJirw+pZ91sCGCyOZ3dJkVE09fTV0VEVzXyLWhh3G/AolYTPX7Mow==} engines: {node: '>=6.9.0'} - '@babel/helper-compilation-targets@7.25.2': - resolution: {integrity: sha512-U2U5LsSaZ7TAt3cfaymQ8WHh0pxvdHoEk6HVpaexxixjyEquMh0L0YNJNM6CTGKMXV1iksi0iZkGw4AcFkPaaw==} + '@babel/generator@7.25.7': + resolution: {integrity: sha512-5Dqpl5fyV9pIAD62yK9P7fcA768uVPUyrQmqpqstHWgMma4feF1x/oFysBCVZLY5wJ2GkMUCdsNDnGZrPoR6rA==} engines: {node: '>=6.9.0'} - '@babel/helper-module-imports@7.24.7': - resolution: {integrity: sha512-8AyH3C+74cgCVVXow/myrynrAGv+nTVg5vKu2nZph9x7RcRwzmh0VFallJuFTZ9mx6u4eSdXZfcOzSqTUm0HCA==} + '@babel/helper-compilation-targets@7.25.7': + resolution: {integrity: sha512-DniTEax0sv6isaw6qSQSfV4gVRNtw2rte8HHM45t9ZR0xILaufBRNkpMifCRiAPyvL4ACD6v0gfCwCmtOQaV4A==} engines: {node: '>=6.9.0'} - '@babel/helper-module-transforms@7.25.2': - resolution: {integrity: sha512-BjyRAbix6j/wv83ftcVJmBt72QtHI56C7JXZoG2xATiLpmoC7dpd8WnkikExHDVPpi/3qCmO6WY1EaXOluiecQ==} + '@babel/helper-module-imports@7.25.7': + resolution: {integrity: sha512-o0xCgpNmRohmnoWKQ0Ij8IdddjyBFE4T2kagL/x6M3+4zUgc+4qTOUBoNe4XxDskt1HPKO007ZPiMgLDq2s7Kw==} + engines: {node: '>=6.9.0'} + + '@babel/helper-module-transforms@7.25.7': + resolution: {integrity: sha512-k/6f8dKG3yDz/qCwSM+RKovjMix563SLxQFo0UhRNo239SP6n9u5/eLtKD6EAjwta2JHJ49CsD8pms2HdNiMMQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 - '@babel/helper-simple-access@7.24.7': - resolution: {integrity: sha512-zBAIvbCMh5Ts+b86r/CjU+4XGYIs+R1j951gxI3KmmxBMhCg4oQMsv6ZXQ64XOm/cvzfU1FmoCyt6+owc5QMYg==} + '@babel/helper-simple-access@7.25.7': + resolution: {integrity: sha512-FPGAkJmyoChQeM+ruBGIDyrT2tKfZJO8NcxdC+CWNJi7N8/rZpSxK7yvBJ5O/nF1gfu5KzN7VKG3YVSLFfRSxQ==} engines: {node: '>=6.9.0'} '@babel/helper-string-parser@7.24.8': resolution: {integrity: sha512-pO9KhhRcuUyGnJWwyEgnRJTSIZHiT+vMD0kPeD+so0l7mxkMT19g3pjY9GTnHySck/hDzq+dtW/4VgnMkippsQ==} engines: {node: '>=6.9.0'} + '@babel/helper-string-parser@7.25.7': + resolution: {integrity: sha512-CbkjYdsJNHFk8uqpEkpCvRs3YRp9tY6FmFY7wLMSYuGYkrdUi7r2lc4/wqsvlHoMznX3WJ9IP8giGPq68T/Y6g==} + engines: {node: '>=6.9.0'} + '@babel/helper-validator-identifier@7.24.7': resolution: {integrity: sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w==} engines: {node: '>=6.9.0'} - '@babel/helper-validator-option@7.24.8': - resolution: {integrity: sha512-xb8t9tD1MHLungh/AIoWYN+gVHaB9kwlu8gffXGSt3FFEIT7RjS+xWbc2vUD1UTZdIpKj/ab3rdqJ7ufngyi2Q==} + '@babel/helper-validator-identifier@7.25.7': + resolution: {integrity: sha512-AM6TzwYqGChO45oiuPqwL2t20/HdMC1rTPAesnBCgPCSF1x3oN9MVUwQV2iyz4xqWrctwK5RNC8LV22kaQCNYg==} engines: {node: '>=6.9.0'} - '@babel/helpers@7.25.6': - resolution: {integrity: sha512-Xg0tn4HcfTijTwfDwYlvVCl43V6h4KyVVX2aEm4qdO/PC6L2YvzLHFdmxhoeSA3eslcE6+ZVXHgWwopXYLNq4Q==} + '@babel/helper-validator-option@7.25.7': + resolution: {integrity: sha512-ytbPLsm+GjArDYXJ8Ydr1c/KJuutjF2besPNbIZnZ6MKUxi/uTA22t2ymmA4WFjZFpjiAMO0xuuJPqK2nvDVfQ==} + engines: {node: '>=6.9.0'} + + '@babel/helpers@7.25.7': + resolution: {integrity: sha512-Sv6pASx7Esm38KQpF/U/OXLwPPrdGHNKoeblRxgZRLXnAtnkEe4ptJPDtAZM7fBLadbc1Q07kQpSiGQ0Jg6tRA==} engines: {node: '>=6.9.0'} '@babel/highlight@7.24.7': resolution: {integrity: sha512-EStJpq4OuY8xYfhGVXngigBJRWxftKX9ksiGDnmlY3o7B/V7KIAc9X4oiK87uPJSc/vs5L869bem5fhZa8caZw==} engines: {node: '>=6.9.0'} + '@babel/highlight@7.25.7': + resolution: {integrity: sha512-iYyACpW3iW8Fw+ZybQK+drQre+ns/tKpXbNESfrhNnPLIklLbXr7MYJ6gPEd0iETGLOK+SxMjVvKb/ffmk+FEw==} + engines: {node: '>=6.9.0'} + '@babel/parser@7.23.5': resolution: {integrity: sha512-hOOqoiNXrmGdFbhgCzu6GiURxUgM27Xwd/aPuu8RfHEZPBzL1Z54okAHAQjXfcQNwvrlkAmAp4SlRTZ45vlthQ==} engines: {node: '>=6.0.0'} hasBin: true - '@babel/parser@7.25.6': - resolution: {integrity: sha512-trGdfBdbD0l1ZPmcJ83eNxB9rbEax4ALFTF7fN386TMYbeCQbyme5cOEXQhbGXKebwGaB/J52w1mrklMcbgy6Q==} + '@babel/parser@7.25.7': + resolution: {integrity: sha512-aZn7ETtQsjjGG5HruveUK06cU3Hljuhd9Iojm4M8WWv3wLE6OkE5PWbDUkItmMgegmccaITudyuW5RPYrYlgWw==} engines: {node: '>=6.0.0'} hasBin: true @@ -516,24 +535,35 @@ packages: resolution: {integrity: sha512-VBj9MYyDb9tuLq7yzqjgzt6Q+IBQLrGZfdjOekyEirZPHxXWoTSGUTMrpsfi58Up73d13NfYLv8HT9vmznjzhQ==} engines: {node: '>=6.9.0'} - '@babel/template@7.25.0': - resolution: {integrity: sha512-aOOgh1/5XzKvg1jvVz7AVrx2piJ2XBi227DHmbY6y+bM9H2FlN+IfecYu4Xl0cNiiVejlsCri89LUsbj8vJD9Q==} + '@babel/runtime@7.25.7': + resolution: {integrity: sha512-FjoyLe754PMiYsFaN5C94ttGiOmBNYTf6pLr4xXHAT5uctHb092PBszndLDR5XA/jghQvn4n7JMHl7dmTgbm9w==} engines: {node: '>=6.9.0'} - '@babel/traverse@7.25.6': - resolution: {integrity: sha512-9Vrcx5ZW6UwK5tvqsj0nGpp/XzqthkT0dqIc9g1AdtygFToNtTF67XzYS//dm+SAK9cp3B9R4ZO/46p63SCjlQ==} + '@babel/template@7.25.7': + resolution: {integrity: sha512-wRwtAgI3bAS+JGU2upWNL9lSlDcRCqD05BZ1n3X2ONLH1WilFP6O1otQjeMK/1g0pvYcXC7b/qVUB1keofjtZA==} + engines: {node: '>=6.9.0'} + + '@babel/traverse@7.25.7': + resolution: {integrity: sha512-jatJPT1Zjqvh/1FyJs6qAHL+Dzb7sTb+xr7Q+gM1b+1oBsMsQQ4FkVKb6dFlJvLlVssqkRzV05Jzervt9yhnzg==} engines: {node: '>=6.9.0'} '@babel/types@7.25.6': resolution: {integrity: sha512-/l42B1qxpG6RdfYf343Uw1vmDjeNhneUXtzhojE7pDgfpEypmRhI6j1kr17XCVv4Cgl9HdAiQY2x0GwKm7rWCw==} engines: {node: '>=6.9.0'} + '@babel/types@7.25.7': + resolution: {integrity: sha512-vwIVdXG+j+FOpkwqHRcBgHLYNL7XMkufrlaFvL9o6Ai9sJn9+PdyIL5qa0XzTZw084c+u9LOls53eoZWP/W5WQ==} + engines: {node: '>=6.9.0'} + '@bundled-es-modules/cookie@2.0.0': resolution: {integrity: sha512-Or6YHg/kamKHpxULAdSqhGqnWFneIXu1NKvvfBBzKGwpVsYuFIQ5aBPHDnnoR3ghW1nvSkALd+EF9iMtY7Vjxw==} '@bundled-es-modules/statuses@1.0.1': resolution: {integrity: sha512-yn7BklA5acgcBr+7w064fGV+SGIFySjCKpqjcWgBAIfrAkY+4GQTJJHQMeT3V/sgz23VTEVV8TtOmkvJAhFVfg==} + '@bundled-es-modules/tough-cookie@0.1.6': + resolution: {integrity: sha512-dvMHbL464C0zI+Yqxbz6kZ5TOEp7GLW+pry/RWndAR8MJQAXZ2rPmIs8tziTZjeIyhSNZgZbCePtfSbdWqStJw==} + '@changesets/apply-release-plan@7.0.5': resolution: {integrity: sha512-1cWCk+ZshEkSVEZrm2fSj1Gz8sYvxgUL4Q78+1ZZqeqfuevPTPk033/yUZ3df8BKMohkqqHfzj0HOOrG0KtXTw==} @@ -543,8 +573,8 @@ packages: '@changesets/changelog-git@0.2.0': resolution: {integrity: sha512-bHOx97iFI4OClIT35Lok3sJAwM31VbUM++gnMBV16fdbtBhgYu4dxsphBF/0AZZsyAHMrnM0yFcj5gZM1py6uQ==} - '@changesets/cli@2.27.8': - resolution: {integrity: sha512-gZNyh+LdSsI82wBSHLQ3QN5J30P4uHKJ4fXgoGwQxfXwYFTJzDdvIJasZn8rYQtmKhyQuiBj4SSnLuKlxKWq4w==} + '@changesets/cli@2.27.9': + resolution: {integrity: sha512-q42a/ZbDnxPpCb5Wkm6tMVIxgeI9C/bexntzTeCFBrQEdpisQqk8kCHllYZMDjYtEc1ZzumbMJAG8H0Z4rdvjg==} hasBin: true '@changesets/config@3.0.3': @@ -1137,20 +1167,29 @@ packages: resolution: {integrity: sha512-m4DVN9ZqskZoLU5GlWZadwDnYo3vAEydiUayB9widCl9ffWx2IvPnp6n3on5rJmziJSw9Bv+Z3ChDVdMwXCY8Q==} engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} - '@eslint/compat@1.1.1': - resolution: {integrity: sha512-lpHyRyplhGPL5mGEh6M9O5nnKk0Gz4bFI+Zu6tKlPpDUN7XshWvH9C/px4UVm87IAANE0W81CEsNGbS1KlzXpA==} + '@eslint/compat@1.2.0': + resolution: {integrity: sha512-CkPWddN7J9JPrQedEr2X7AjK9y1jaMJtxZ4A/+jTMFA2+n5BWhcKHW/EbJyARqg2zzQfgtWUtVmG3hrG6+nGpg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^9.10.0 + peerDependenciesMeta: + eslint: + optional: true '@eslint/config-array@0.18.0': resolution: {integrity: sha512-fTxvnS1sRMu3+JjXwJG0j/i4RT9u4qJ+lqS/yCGap4lH4zZGzQ7tu+xZqQmcMZq5OBZDL4QRxQzRjkWcGt8IVw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@eslint/core@0.6.0': + resolution: {integrity: sha512-8I2Q8ykA4J0x0o7cg67FPVnehcqWTBehu/lmY+bolPFHGjh49YzGBMXTvpqVgEbBdvNCSxj6iFgiIyHzf03lzg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@eslint/eslintrc@3.1.0': resolution: {integrity: sha512-4Bfj15dVJdoy3RfZmmo86RK1Fwzn6SstsvK9JS+BaVKqC6QQQQyXekNaC+g+LKNgkQ+2VhGAzm6hO40AhMR3zQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@eslint/js@9.11.0': - resolution: {integrity: sha512-LPkkenkDqyzTFauZLLAPhIb48fj6drrfMvRGSL9tS3AcZBSVTllemLSNyCvHNNL2t797S/6DJNSIwRwXgMO/eQ==} + '@eslint/js@9.12.0': + resolution: {integrity: sha512-eohesHH8WFRUprDNyEREgqP6beG6htMeUYeCpkEgBCieCMme5r9zFWjzAJp//9S+Kub4rqE+jXe9Cp1a7IYIIA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@eslint/object-schema@2.1.4': @@ -1206,8 +1245,8 @@ packages: '@gradio/button@0.2.43': resolution: {integrity: sha512-T+SGySDKKsIhIMDat6Pqdrwd9BhaEeXpukLjmH3F3mnegXjwENB7s3C0zsfyiq3+ox8HxcO2Bt/IRARDG+gN0g==} - '@gradio/client@1.5.2': - resolution: {integrity: sha512-PJbt8n3ROxDXrR55D8oPYPIIkdmG5ksyljtgNM6Kr/FgTMTwGqiiYDdoyUIGwQSBu6g+jan2zbHoniDZePw3pg==} + '@gradio/client@1.6.0': + resolution: {integrity: sha512-1258LcF45FFjGCjcn37zDZD1dRrsApTogc7fD9jlSBN8x61s0MPzz6LRCefD2DZ1Is3G+pRu7M6w6XrBNyVVmA==} engines: {node: '>=18.0.0'} '@gradio/icons@0.4.1': @@ -1218,8 +1257,8 @@ packages: peerDependencies: svelte: ^4.0.0 - '@gradio/preview@0.10.1': - resolution: {integrity: sha512-hm28fOgOViIszEt6X30lY4lLeZAOMljUgF2Dq1patIfF2ZCqL+ucIPXjzTDcJLP42vdIMu5kCmdTrx8T/roqCg==} + '@gradio/preview@0.12.0': + resolution: {integrity: sha512-VXmqZxieNuOZiXTFX/Bo+hOwoBRyJH7UaVcgZo5Cy1bXz1LsNZ1+EWNJB4L01u5Ga7UwLdSLrTaVrhF+GGHZ6A==} '@gradio/statustracker@0.7.6': resolution: {integrity: sha512-Cmx2wEWIYQVxxf0r8YAspJ9w0gbp4Q6SVFp26PZR/PYkxwvelJpzIJLyys20P7OX1NVXRTEaI5NrHLskmWo7BA==} @@ -1231,6 +1270,11 @@ packages: peerDependencies: svelte: ^4.0.0 + '@gradio/theme@0.3.0': + resolution: {integrity: sha512-PNguiOQFZO4Vim9446b2VRa0wO0ulkz9MUkDJXIdk7Cdx6HZQaqc5hErp/mlDV1scFKQbwTsG+9IzcClTnLXTg==} + peerDependencies: + svelte: ^4.0.0 + '@gradio/upload@0.11.2': resolution: {integrity: sha512-8jf0qQDY+GqmNFWGKTlvqBqDuH3gI6u+ATqvvM71vjFS3B4iqmJimJnTx/BAKn3DYwPwbM7AhiczKky6NiznGw==} @@ -1240,31 +1284,46 @@ packages: '@gradio/utils@0.6.1': resolution: {integrity: sha512-2PdDaoAesz9CSjRBUfg0W0tQiY8YbdfO1tpdTQ2ODmxsoSyPcI/jxOKLUSmqfYsouQp7ao/ogRKoYOuN7F3L0Q==} + '@gradio/utils@0.7.0': + resolution: {integrity: sha512-cPVt/oz+tdEQ3ya1XoDe7VBX+q4Z1KDI68FxmindW5BWHIfOEVNWZ+6KQTIZhrgl+k4kSHqpZjnahGyFpes9+w==} + '@gradio/wasm@0.10.1': resolution: {integrity: sha512-FC+apnc9zMSVS2NUouwS7imoS+o7Vhe+P3mJrTSgWksNsFDauWYkSyp2ZajqGPgexg8wRNCUKe7yteTz8gypbg==} + '@humanfs/core@0.19.0': + resolution: {integrity: sha512-2cbWIHbZVEweE853g8jymffCA+NCMiuqeECeBBLm8dg2oFdjuGJhgN4UAbI+6v0CKbbhvtXA4qV8YR5Ji86nmw==} + engines: {node: '>=18.18.0'} + + '@humanfs/node@0.16.5': + resolution: {integrity: sha512-KSPA4umqSG4LHYRodq31VDwKAvaTF4xmVlzM8Aeh4PlU1JQ3IG0wiA8C25d3RQ9nJyM3mBHyI53K06VVL/oFFg==} + engines: {node: '>=18.18.0'} + '@humanwhocodes/module-importer@1.0.1': resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==} engines: {node: '>=12.22'} - '@humanwhocodes/retry@0.3.0': - resolution: {integrity: sha512-d2CGZR2o7fS6sWB7DG/3a95bGKQyHMACZ5aW8qGkkqQpUoZV6C0X7Pc7l4ZNMZkfNBf4VWNe9E1jRsf0G146Ew==} + '@humanwhocodes/retry@0.3.1': + resolution: {integrity: sha512-JBxkERygn7Bv/GbN5Rv8Ul6LVknS+5Bp6RgDC/O8gEBU/yeH5Ui5C/OlWrTb6qct7LjjfT6Re2NxB0ln0yYybA==} engines: {node: '>=18.18'} - '@inquirer/confirm@3.1.9': - resolution: {integrity: sha512-UF09aejxCi4Xqm6N/jJAiFXArXfi9al52AFaSD+2uIHnhZGtd1d6lIGTRMPouVSJxbGEi+HkOWSYaiEY/+szUw==} + '@inquirer/confirm@3.2.0': + resolution: {integrity: sha512-oOIwPs0Dvq5220Z8lGL/6LHRTEr9TgLHmiI99Rj1PJ1p1czTys+olrgBqZk4E2qC0YTzeHprxSQmoHioVdJ7Lw==} engines: {node: '>=18'} - '@inquirer/core@8.2.2': - resolution: {integrity: sha512-K8SuNX45jEFlX3EBJpu9B+S2TISzMPGXZIuJ9ME924SqbdW6Pt6fIkKvXg7mOEOKJ4WxpQsxj0UTfcL/A434Ww==} + '@inquirer/core@9.2.1': + resolution: {integrity: sha512-F2VBt7W/mwqEU4bL0RnHNZmC/OxzNx9cOYxHqnXX3MP6ruYvZUZAW9imgN9+h/uBT/oP8Gh888J2OZSbjSeWcg==} engines: {node: '>=18'} - '@inquirer/figures@1.0.3': - resolution: {integrity: sha512-ErXXzENMH5pJt5/ssXV0DfWUZqly8nGzf0UcBV9xTnP+KyffE2mqyxIMBrZ8ijQck2nU0TQm40EQB53YreyWHw==} + '@inquirer/figures@1.0.7': + resolution: {integrity: sha512-m+Trk77mp54Zma6xLkLuY+mvanPxlE4A7yNKs2HBiyZ4UkVs28Mv5c/pgWrHeInx+USHeX/WEPzjrWrcJiQgjw==} engines: {node: '>=18'} - '@inquirer/type@1.3.3': - resolution: {integrity: sha512-xTUt0NulylX27/zMx04ZYar/kr1raaiFTVvQ5feljQsiAgdm0WPj4S73/ye0fbslh+15QrIuDvfCXTek7pMY5A==} + '@inquirer/type@1.5.5': + resolution: {integrity: sha512-MzICLu4yS7V8AA61sANROZ9vT1H3ooca5dSmI1FjZkzq7o/koMsRfQSzRtFo+F3Ao4Sf1C0bpLKejpKB/+j6MA==} + engines: {node: '>=18'} + + '@inquirer/type@2.0.0': + resolution: {integrity: sha512-XvJRx+2KR3YXyYtPUUy+qd9i7p+GO9Ko6VIIpWlBrpWwXDv8WLFeHTxz35CfQFUiBMLXlGHhGzys7lqit9gWag==} engines: {node: '>=18'} '@isaacs/cliui@8.0.2': @@ -1334,12 +1393,8 @@ packages: resolution: {integrity: sha512-bPHp6Ji8b41szTOcaP63VlnbbO5Ny6dwAATtY6JTjh5N2OLrb5Qk/Th5cRkRQhkWCt+EJsYrNB0MiL+Gpn6e3g==} engines: {node: '>=4'} - '@mswjs/cookies@1.1.0': - resolution: {integrity: sha512-0ZcCVQxifZmhwNBoQIrystCb+2sWBY2Zw8lpfJBPCHGCA/HWqehITeCRVIv4VMy8MPlaHo2w2pTHFV2pFfqKPw==} - engines: {node: '>=18'} - - '@mswjs/interceptors@0.29.1': - resolution: {integrity: sha512-3rDakgJZ77+RiQUuSK69t1F0m8BQKA8Vh5DCS5V0DWvNY67zob2JhhQrhCO0AKLGINTRSFd1tBaHcJTkhefoSw==} + '@mswjs/interceptors@0.35.9': + resolution: {integrity: sha512-SSnyl/4ni/2ViHKkiZb8eajA/eN1DNFaHjhGiLUdZvDz6PKF4COSf/17xqSz64nOo2Ia29SA6B2KNCsyCbVmaQ==} engines: {node: '>=18'} '@nodelib/fs.scandir@2.1.5': @@ -1488,8 +1543,8 @@ packages: rollup: optional: true - '@rollup/pluginutils@5.1.0': - resolution: {integrity: sha512-XTIWOPPcpvyKI6L1NHo0lFlCyznUEyPmPY1mc3KpPVDYulHSTvyeLNVW00QTLIAFNhR3kYnJTQHeGqU4M3n09g==} + '@rollup/pluginutils@5.1.2': + resolution: {integrity: sha512-/FIdS3PyZ39bjZlwqFnWqCOVnW7o963LtKMwQOD0NhQqw22gSr2YY1afu3FxRip4ZCZNsD5jq6Aaz6QV3D/Njw==} engines: {node: '>=14.0.0'} peerDependencies: rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0 @@ -1502,81 +1557,161 @@ packages: cpu: [arm] os: [android] + '@rollup/rollup-android-arm-eabi@4.24.0': + resolution: {integrity: sha512-Q6HJd7Y6xdB48x8ZNVDOqsbh2uByBhgK8PiQgPhwkIw/HC/YX5Ghq2mQY5sRMZWHb3VsFkWooUVOZHKr7DmDIA==} + cpu: [arm] + os: [android] + '@rollup/rollup-android-arm64@4.22.4': resolution: {integrity: sha512-VXoK5UMrgECLYaMuGuVTOx5kcuap1Jm8g/M83RnCHBKOqvPPmROFJGQaZhGccnsFtfXQ3XYa4/jMCJvZnbJBdA==} cpu: [arm64] os: [android] + '@rollup/rollup-android-arm64@4.24.0': + resolution: {integrity: sha512-ijLnS1qFId8xhKjT81uBHuuJp2lU4x2yxa4ctFPtG+MqEE6+C5f/+X/bStmxapgmwLwiL3ih122xv8kVARNAZA==} + cpu: [arm64] + os: [android] + '@rollup/rollup-darwin-arm64@4.22.4': resolution: {integrity: sha512-xMM9ORBqu81jyMKCDP+SZDhnX2QEVQzTcC6G18KlTQEzWK8r/oNZtKuZaCcHhnsa6fEeOBionoyl5JsAbE/36Q==} cpu: [arm64] os: [darwin] + '@rollup/rollup-darwin-arm64@4.24.0': + resolution: {integrity: sha512-bIv+X9xeSs1XCk6DVvkO+S/z8/2AMt/2lMqdQbMrmVpgFvXlmde9mLcbQpztXm1tajC3raFDqegsH18HQPMYtA==} + cpu: [arm64] + os: [darwin] + '@rollup/rollup-darwin-x64@4.22.4': resolution: {integrity: sha512-aJJyYKQwbHuhTUrjWjxEvGnNNBCnmpHDvrb8JFDbeSH3m2XdHcxDd3jthAzvmoI8w/kSjd2y0udT+4okADsZIw==} cpu: [x64] os: [darwin] + '@rollup/rollup-darwin-x64@4.24.0': + resolution: {integrity: sha512-X6/nOwoFN7RT2svEQWUsW/5C/fYMBe4fnLK9DQk4SX4mgVBiTA9h64kjUYPvGQ0F/9xwJ5U5UfTbl6BEjaQdBQ==} + cpu: [x64] + os: [darwin] + '@rollup/rollup-linux-arm-gnueabihf@4.22.4': resolution: {integrity: sha512-j63YtCIRAzbO+gC2L9dWXRh5BFetsv0j0va0Wi9epXDgU/XUi5dJKo4USTttVyK7fGw2nPWK0PbAvyliz50SCQ==} cpu: [arm] os: [linux] + '@rollup/rollup-linux-arm-gnueabihf@4.24.0': + resolution: {integrity: sha512-0KXvIJQMOImLCVCz9uvvdPgfyWo93aHHp8ui3FrtOP57svqrF/roSSR5pjqL2hcMp0ljeGlU4q9o/rQaAQ3AYA==} + cpu: [arm] + os: [linux] + '@rollup/rollup-linux-arm-musleabihf@4.22.4': resolution: {integrity: sha512-dJnWUgwWBX1YBRsuKKMOlXCzh2Wu1mlHzv20TpqEsfdZLb3WoJW2kIEsGwLkroYf24IrPAvOT/ZQ2OYMV6vlrg==} cpu: [arm] os: [linux] + '@rollup/rollup-linux-arm-musleabihf@4.24.0': + resolution: {integrity: sha512-it2BW6kKFVh8xk/BnHfakEeoLPv8STIISekpoF+nBgWM4d55CZKc7T4Dx1pEbTnYm/xEKMgy1MNtYuoA8RFIWw==} + cpu: [arm] + os: [linux] + '@rollup/rollup-linux-arm64-gnu@4.22.4': resolution: {integrity: sha512-AdPRoNi3NKVLolCN/Sp4F4N1d98c4SBnHMKoLuiG6RXgoZ4sllseuGioszumnPGmPM2O7qaAX/IJdeDU8f26Aw==} cpu: [arm64] os: [linux] + '@rollup/rollup-linux-arm64-gnu@4.24.0': + resolution: {integrity: sha512-i0xTLXjqap2eRfulFVlSnM5dEbTVque/3Pi4g2y7cxrs7+a9De42z4XxKLYJ7+OhE3IgxvfQM7vQc43bwTgPwA==} + cpu: [arm64] + os: [linux] + '@rollup/rollup-linux-arm64-musl@4.22.4': resolution: {integrity: sha512-Gl0AxBtDg8uoAn5CCqQDMqAx22Wx22pjDOjBdmG0VIWX3qUBHzYmOKh8KXHL4UpogfJ14G4wk16EQogF+v8hmA==} cpu: [arm64] os: [linux] + '@rollup/rollup-linux-arm64-musl@4.24.0': + resolution: {integrity: sha512-9E6MKUJhDuDh604Qco5yP/3qn3y7SLXYuiC0Rpr89aMScS2UAmK1wHP2b7KAa1nSjWJc/f/Lc0Wl1L47qjiyQw==} + cpu: [arm64] + os: [linux] + '@rollup/rollup-linux-powerpc64le-gnu@4.22.4': resolution: {integrity: sha512-3aVCK9xfWW1oGQpTsYJJPF6bfpWfhbRnhdlyhak2ZiyFLDaayz0EP5j9V1RVLAAxlmWKTDfS9wyRyY3hvhPoOg==} cpu: [ppc64] os: [linux] + '@rollup/rollup-linux-powerpc64le-gnu@4.24.0': + resolution: {integrity: sha512-2XFFPJ2XMEiF5Zi2EBf4h73oR1V/lycirxZxHZNc93SqDN/IWhYYSYj8I9381ikUFXZrz2v7r2tOVk2NBwxrWw==} + cpu: [ppc64] + os: [linux] + '@rollup/rollup-linux-riscv64-gnu@4.22.4': resolution: {integrity: sha512-ePYIir6VYnhgv2C5Xe9u+ico4t8sZWXschR6fMgoPUK31yQu7hTEJb7bCqivHECwIClJfKgE7zYsh1qTP3WHUA==} cpu: [riscv64] os: [linux] + '@rollup/rollup-linux-riscv64-gnu@4.24.0': + resolution: {integrity: sha512-M3Dg4hlwuntUCdzU7KjYqbbd+BLq3JMAOhCKdBE3TcMGMZbKkDdJ5ivNdehOssMCIokNHFOsv7DO4rlEOfyKpg==} + cpu: [riscv64] + os: [linux] + '@rollup/rollup-linux-s390x-gnu@4.22.4': resolution: {integrity: sha512-GqFJ9wLlbB9daxhVlrTe61vJtEY99/xB3C8e4ULVsVfflcpmR6c8UZXjtkMA6FhNONhj2eA5Tk9uAVw5orEs4Q==} cpu: [s390x] os: [linux] + '@rollup/rollup-linux-s390x-gnu@4.24.0': + resolution: {integrity: sha512-mjBaoo4ocxJppTorZVKWFpy1bfFj9FeCMJqzlMQGjpNPY9JwQi7OuS1axzNIk0nMX6jSgy6ZURDZ2w0QW6D56g==} + cpu: [s390x] + os: [linux] + '@rollup/rollup-linux-x64-gnu@4.22.4': resolution: {integrity: sha512-87v0ol2sH9GE3cLQLNEy0K/R0pz1nvg76o8M5nhMR0+Q+BBGLnb35P0fVz4CQxHYXaAOhE8HhlkaZfsdUOlHwg==} cpu: [x64] os: [linux] + '@rollup/rollup-linux-x64-gnu@4.24.0': + resolution: {integrity: sha512-ZXFk7M72R0YYFN5q13niV0B7G8/5dcQ9JDp8keJSfr3GoZeXEoMHP/HlvqROA3OMbMdfr19IjCeNAnPUG93b6A==} + cpu: [x64] + os: [linux] + '@rollup/rollup-linux-x64-musl@4.22.4': resolution: {integrity: sha512-UV6FZMUgePDZrFjrNGIWzDo/vABebuXBhJEqrHxrGiU6HikPy0Z3LfdtciIttEUQfuDdCn8fqh7wiFJjCNwO+g==} cpu: [x64] os: [linux] + '@rollup/rollup-linux-x64-musl@4.24.0': + resolution: {integrity: sha512-w1i+L7kAXZNdYl+vFvzSZy8Y1arS7vMgIy8wusXJzRrPyof5LAb02KGr1PD2EkRcl73kHulIID0M501lN+vobQ==} + cpu: [x64] + os: [linux] + '@rollup/rollup-win32-arm64-msvc@4.22.4': resolution: {integrity: sha512-BjI+NVVEGAXjGWYHz/vv0pBqfGoUH0IGZ0cICTn7kB9PyjrATSkX+8WkguNjWoj2qSr1im/+tTGRaY+4/PdcQw==} cpu: [arm64] os: [win32] + '@rollup/rollup-win32-arm64-msvc@4.24.0': + resolution: {integrity: sha512-VXBrnPWgBpVDCVY6XF3LEW0pOU51KbaHhccHw6AS6vBWIC60eqsH19DAeeObl+g8nKAz04QFdl/Cefta0xQtUQ==} + cpu: [arm64] + os: [win32] + '@rollup/rollup-win32-ia32-msvc@4.22.4': resolution: {integrity: sha512-SiWG/1TuUdPvYmzmYnmd3IEifzR61Tragkbx9D3+R8mzQqDBz8v+BvZNDlkiTtI9T15KYZhP0ehn3Dld4n9J5g==} cpu: [ia32] os: [win32] + '@rollup/rollup-win32-ia32-msvc@4.24.0': + resolution: {integrity: sha512-xrNcGDU0OxVcPTH/8n/ShH4UevZxKIO6HJFK0e15XItZP2UcaiLFd5kiX7hJnqCbSztUF8Qot+JWBC/QXRPYWQ==} + cpu: [ia32] + os: [win32] + '@rollup/rollup-win32-x64-msvc@4.22.4': resolution: {integrity: sha512-j8pPKp53/lq9lMXN57S8cFz0MynJk8OWNuUnXct/9KCpKU7DgU3bYMJhwWmcqC0UU29p8Lr0/7KEVcaM6bf47Q==} cpu: [x64] os: [win32] + '@rollup/rollup-win32-x64-msvc@4.24.0': + resolution: {integrity: sha512-fbMkAF7fufku0N2dE5TBXcNlg0pt0cJue4xBRE2Qc5Vqikxr4VCgKj/ht6SMdFcOacVA9rqF70APJ8RN/4vMJw==} + cpu: [x64] + os: [win32] + '@rtsao/scc@1.1.0': resolution: {integrity: sha512-zt6OdqaDoOnJ1ZYsCYGt9YmWzDXl4vQdKTyJev62gFhRGKdx7mcT54V9KIjg+d2wi9EXsPvAPKe7i7WjfVWB8g==} @@ -1622,142 +1757,73 @@ packages: svelte: ^4.0.0 || ^5.0.0-next.0 vite: ^5.0.0 - '@sveltejs/vite-plugin-svelte@3.1.1': - resolution: {integrity: sha512-rimpFEAboBBHIlzISibg94iP09k/KYdHgVhJlcsTfn7KMBhc70jFX/GRWkRdFCc2fdnk+4+Bdfej23cMDnJS6A==} + '@sveltejs/vite-plugin-svelte@3.1.2': + resolution: {integrity: sha512-Txsm1tJvtiYeLUVRNqxZGKR/mI+CzuIQuc2gn+YCs9rMTowpNZ2Nqt53JdL8KF9bLhAf2ruR/dr9eZCwdTriRA==} engines: {node: ^18.0.0 || >=20} peerDependencies: svelte: ^4.0.0 || ^5.0.0-next.0 vite: ^5.0.0 - '@swc/core-darwin-arm64@1.5.29': - resolution: {integrity: sha512-6F/sSxpHaq3nzg2ADv9FHLi4Fu2A8w8vP8Ich8gIl16D2htStlwnaPmCLjRswO+cFkzgVqy/l01gzNGWd4DFqA==} - engines: {node: '>=10'} - cpu: [arm64] - os: [darwin] - '@swc/core-darwin-arm64@1.7.26': resolution: {integrity: sha512-FF3CRYTg6a7ZVW4yT9mesxoVVZTrcSWtmZhxKCYJX9brH4CS/7PRPjAKNk6kzWgWuRoglP7hkjQcd6EpMcZEAw==} engines: {node: '>=10'} cpu: [arm64] os: [darwin] - '@swc/core-darwin-x64@1.5.29': - resolution: {integrity: sha512-rF/rXkvUOTdTIfoYbmszbSUGsCyvqACqy1VeP3nXONS+LxFl4bRmRcUTRrblL7IE5RTMCKUuPbqbQSE2hK7bqg==} - engines: {node: '>=10'} - cpu: [x64] - os: [darwin] - '@swc/core-darwin-x64@1.7.26': resolution: {integrity: sha512-az3cibZdsay2HNKmc4bjf62QVukuiMRh5sfM5kHR/JMTrLyS6vSw7Ihs3UTkZjUxkLTT8ro54LI6sV6sUQUbLQ==} engines: {node: '>=10'} cpu: [x64] os: [darwin] - '@swc/core-linux-arm-gnueabihf@1.5.29': - resolution: {integrity: sha512-2OAPL8iWBsmmwkjGXqvuUhbmmoLxS1xNXiMq87EsnCNMAKohGc7wJkdAOUL6J/YFpean/vwMWg64rJD4pycBeg==} - engines: {node: '>=10'} - cpu: [arm] - os: [linux] - '@swc/core-linux-arm-gnueabihf@1.7.26': resolution: {integrity: sha512-VYPFVJDO5zT5U3RpCdHE5v1gz4mmR8BfHecUZTmD2v1JeFY6fv9KArJUpjrHEEsjK/ucXkQFmJ0jaiWXmpOV9Q==} engines: {node: '>=10'} cpu: [arm] os: [linux] - '@swc/core-linux-arm64-gnu@1.5.29': - resolution: {integrity: sha512-eH/Q9+8O5qhSxMestZnhuS1xqQMr6M7SolZYxiXJqxArXYILLCF+nq2R9SxuMl0CfjHSpb6+hHPk/HXy54eIRA==} - engines: {node: '>=10'} - cpu: [arm64] - os: [linux] - '@swc/core-linux-arm64-gnu@1.7.26': resolution: {integrity: sha512-YKevOV7abpjcAzXrhsl+W48Z9mZvgoVs2eP5nY+uoMAdP2b3GxC0Df1Co0I90o2lkzO4jYBpTMcZlmUXLdXn+Q==} engines: {node: '>=10'} cpu: [arm64] os: [linux] - '@swc/core-linux-arm64-musl@1.5.29': - resolution: {integrity: sha512-TERh2OICAJz+SdDIK9+0GyTUwF6r4xDlFmpoiHKHrrD/Hh3u+6Zue0d7jQ/he/i80GDn4tJQkHlZys+RZL5UZg==} - engines: {node: '>=10'} - cpu: [arm64] - os: [linux] - '@swc/core-linux-arm64-musl@1.7.26': resolution: {integrity: sha512-3w8iZICMkQQON0uIcvz7+Q1MPOW6hJ4O5ETjA0LSP/tuKqx30hIniCGOgPDnv3UTMruLUnQbtBwVCZTBKR3Rkg==} engines: {node: '>=10'} cpu: [arm64] os: [linux] - '@swc/core-linux-x64-gnu@1.5.29': - resolution: {integrity: sha512-WMDPqU7Ji9dJpA+Llek2p9t7pcy7Bob8ggPUvgsIlv3R/eesF9DIzSbrgl6j3EAEPB9LFdSafsgf6kT/qnvqFg==} - engines: {node: '>=10'} - cpu: [x64] - os: [linux] - '@swc/core-linux-x64-gnu@1.7.26': resolution: {integrity: sha512-c+pp9Zkk2lqb06bNGkR2Looxrs7FtGDMA4/aHjZcCqATgp348hOKH5WPvNLBl+yPrISuWjbKDVn3NgAvfvpH4w==} engines: {node: '>=10'} cpu: [x64] os: [linux] - '@swc/core-linux-x64-musl@1.5.29': - resolution: {integrity: sha512-DO14glwpdKY4POSN0201OnGg1+ziaSVr6/RFzuSLggshwXeeyVORiHv3baj7NENhJhWhUy3NZlDsXLnRFkmhHQ==} - engines: {node: '>=10'} - cpu: [x64] - os: [linux] - '@swc/core-linux-x64-musl@1.7.26': resolution: {integrity: sha512-PgtyfHBF6xG87dUSSdTJHwZ3/8vWZfNIXQV2GlwEpslrOkGqy+WaiiyE7Of7z9AvDILfBBBcJvJ/r8u980wAfQ==} engines: {node: '>=10'} cpu: [x64] os: [linux] - '@swc/core-win32-arm64-msvc@1.5.29': - resolution: {integrity: sha512-V3Y1+a1zG1zpYXUMqPIHEMEOd+rHoVnIpO/KTyFwAmKVu8v+/xPEVx/AGoYE67x4vDAAvPQrKI3Aokilqa5yVg==} - engines: {node: '>=10'} - cpu: [arm64] - os: [win32] - '@swc/core-win32-arm64-msvc@1.7.26': resolution: {integrity: sha512-9TNXPIJqFynlAOrRD6tUQjMq7KApSklK3R/tXgIxc7Qx+lWu8hlDQ/kVPLpU7PWvMMwC/3hKBW+p5f+Tms1hmA==} engines: {node: '>=10'} cpu: [arm64] os: [win32] - '@swc/core-win32-ia32-msvc@1.5.29': - resolution: {integrity: sha512-OrM6yfXw4wXhnVFosOJzarw0Fdz5Y0okgHfn9oFbTPJhoqxV5Rdmd6kXxWu2RiVKs6kGSJFZXHDeUq2w5rTIMg==} - engines: {node: '>=10'} - cpu: [ia32] - os: [win32] - '@swc/core-win32-ia32-msvc@1.7.26': resolution: {integrity: sha512-9YngxNcG3177GYdsTum4V98Re+TlCeJEP4kEwEg9EagT5s3YejYdKwVAkAsJszzkXuyRDdnHUpYbTrPG6FiXrQ==} engines: {node: '>=10'} cpu: [ia32] os: [win32] - '@swc/core-win32-x64-msvc@1.5.29': - resolution: {integrity: sha512-eD/gnxqKyZQQR0hR7TMkIlJ+nCF9dzYmVVNbYZWuA1Xy94aBPUsEk3Uw3oG7q6R3ErrEUPP0FNf2ztEnv+I+dw==} - engines: {node: '>=10'} - cpu: [x64] - os: [win32] - '@swc/core-win32-x64-msvc@1.7.26': resolution: {integrity: sha512-VR+hzg9XqucgLjXxA13MtV5O3C0bK0ywtLIBw/+a+O+Oc6mxFWHtdUeXDbIi5AiPbn0fjgVJMqYnyjGyyX8u0w==} engines: {node: '>=10'} cpu: [x64] os: [win32] - '@swc/core@1.5.29': - resolution: {integrity: sha512-nvTtHJI43DUSOAf3h9XsqYg8YXKc0/N4il9y4j0xAkO0ekgDNo+3+jbw6MInawjKJF9uulyr+f5bAutTsOKVlw==} - engines: {node: '>=10'} - peerDependencies: - '@swc/helpers': '*' - peerDependenciesMeta: - '@swc/helpers': - optional: true - '@swc/core@1.7.26': resolution: {integrity: sha512-f5uYFf+TmMQyYIoxkn/evWhNGuUzC730dFwAKGwBVHHVoPyak1/GvJUm6i1SKl+2Hrj9oN0i3WSoWWZ4pgI8lw==} engines: {node: '>=10'} @@ -1773,9 +1839,6 @@ packages: '@swc/types@0.1.12': resolution: {integrity: sha512-wBJA+SdtkbFhHjTMYH+dEH1y4VpfGdAc2Kw/LK09i9bXd/K6j6PkDcFCEzb6iVfZMkPRrl/q0e3toqTAJdkIVA==} - '@swc/types@0.1.8': - resolution: {integrity: sha512-RNFA3+7OJFNYY78x0FYwi1Ow+iF1eF5WvmfY1nXPOEH4R2p/D4Cr1vzje7dNAI2aLFqpv8Wyz4oKSWqIZArpQA==} - '@tsconfig/node10@1.0.11': resolution: {integrity: sha512-DcRjDCujK/kCk/cUe8Xz8ZSpm8mS3mNNpta+jGCA6USEDfktlNvm1+IuZ9eTcDbNk41BHwpHHeW+N1lKCz4zOw==} @@ -1818,11 +1881,11 @@ packages: '@types/d3-interpolate@3.0.4': resolution: {integrity: sha512-mgLPETlrpVV1YRJIglr4Ez47g7Yxjl1lj7YKsiMCb27VJH9W8NVM6Bb9d8kkpG/uAQS5AmbA48q2IAolKKo1MA==} - '@types/d3-selection@3.0.10': - resolution: {integrity: sha512-cuHoUgS/V3hLdjJOLTT691+G2QoqAjCVLmr4kJXR4ha56w1Zdu8UUQ5TxLRqudgNjwXeQxKMq4j+lyf9sWuslg==} + '@types/d3-selection@3.0.11': + resolution: {integrity: sha512-bhAXu23DJWsrI45xafYpkQ4NtcKMwWnAC/vKrd2l+nxMFuvOT3XMYTIj2opv8vq8AO5Yh7Qac/nSeP/3zjTK0w==} - '@types/d3-transition@3.0.8': - resolution: {integrity: sha512-ew63aJfQ/ms7QQ4X7pk5NxQ9fZH/z+i24ZfJ6tJSfqxJMrYLiK01EAs2/Rtw/JreGUsS3pLPNV644qXFGnoZNQ==} + '@types/d3-transition@3.0.9': + resolution: {integrity: sha512-uZS5shfxzO3rGlu0cC3bjmMFKsXv+SmZZcgp0KD22ts4uGXp5EVYGzu/0YdwZeKmddhcAccYtREJKkPfXkZuCg==} '@types/d3-zoom@3.0.8': resolution: {integrity: sha512-iqMC4/YlFCSlO8+2Ii1GGGliCAY4XdeG748w5vQUbevlbDu0zSjH/+jojorQVBK/se0j6DUFNPBGSqD3YWYnDw==} @@ -1845,6 +1908,9 @@ packages: '@types/estree@1.0.5': resolution: {integrity: sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==} + '@types/estree@1.0.6': + resolution: {integrity: sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==} + '@types/eventsource@1.1.15': resolution: {integrity: sha512-XQmGcbnxUNa06HR3VBVkc9+A2Vpi9ZyLJcdS5dwaQQ/4ZMWFO+5c90FnMUpbtMZwB/FChoYHwuVg8TvkECacTA==} @@ -1887,17 +1953,14 @@ packages: '@types/node@12.20.55': resolution: {integrity: sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==} - '@types/node@18.19.50': - resolution: {integrity: sha512-xonK+NRrMBRtkL1hVCc3G+uXtjh1Al4opBLjqVmipe5ZAaBYWW6cNAiBVZ1BvmkBhep698rP3UM3aRAdSALuhg==} - - '@types/node@20.16.5': - resolution: {integrity: sha512-VwYCweNo3ERajwy0IUlqqcyZ8/A7Zwa9ZP3MnENWcB11AejO+tLy3pu850goUW2FC/IJMdZUfKpX/yxL1gymCA==} + '@types/node@18.19.55': + resolution: {integrity: sha512-zzw5Vw52205Zr/nmErSEkN5FLqXPuKX/k5d1D7RKHATGqU7y6YfX9QxZraUzUrFGqH6XzOzG196BC35ltJC4Cw==} - '@types/node@22.5.5': - resolution: {integrity: sha512-Xjs4y5UPO/CLdzpgR6GirZJx36yScjh73+2NlLlkFRSoQN8B0DpfXPdZGnvVmLRLOsqDpOfTNv7D9trgGhmOIA==} + '@types/node@22.7.5': + resolution: {integrity: sha512-jML7s2NAzMWc//QSJ1a3prpk78cOPchGvXJsC3C6R6PSMoooztvRVQEz89gmBTBY1SPMaqo5teB4uNHPdetShQ==} - '@types/path-browserify@1.0.2': - resolution: {integrity: sha512-ZkC5IUqqIFPXx3ASTTybTzmQdwHwe2C0u3eL75ldQ6T9E9IWFJodn6hIfbZGab73DfyiHN4Xw15gNxUq2FbvBA==} + '@types/path-browserify@1.0.3': + resolution: {integrity: sha512-ZmHivEbNCBtAfcrFeBCiTjdIc2dey0l7oCGNGpSuRTy8jP6UVND7oUowlvDujBy8r2Hoa8bfFUOCiPWfmtkfxw==} '@types/prop-types@15.7.13': resolution: {integrity: sha512-hCZTSvwbzWGvhqxp/RqVqwU999pBf2vp7hzIjiYOsl8wqOmUxkQ6ddw1cV3l8811+kdUFus/q4d1Y3E3SyEifA==} @@ -1911,15 +1974,15 @@ packages: '@types/react-syntax-highlighter@15.5.13': resolution: {integrity: sha512-uLGJ87j6Sz8UaBAooU0T6lWJ0dBmjZgN1PZTrj05TNql2/XpC6+4HhMT5syIdFUUt+FASfCeLLv4kBygNU+8qA==} - '@types/react@18.3.8': - resolution: {integrity: sha512-syBUrW3/XpnW4WJ41Pft+I+aPoDVbrBVQGEnbD7NijDGlVC+8gV/XKRY+7vMDlfPpbwYt0l1vd/Sj8bJGMbs9Q==} - - '@types/semver@7.5.8': - resolution: {integrity: sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==} + '@types/react@18.3.11': + resolution: {integrity: sha512-r6QZ069rFTjrEYgFdOck1gK7FLVsgJE7tTz0pQBczlBNUhBNk0MQH4UbnFSwjpQLMkLzgqvBBa+qGpLje16eTQ==} '@types/statuses@2.0.5': resolution: {integrity: sha512-jmIUGWrAiwu3dZpxntxieC+1n/5c3mjrImkmOSQ2NC5uP6cYO4aAZDdSmRcI5C1oiTmqlZGHC+/NmJrKogbP5A==} + '@types/tough-cookie@4.0.5': + resolution: {integrity: sha512-/Ad8+nIOV7Rl++6f1BdKxFSMgmoqEoYbHRpPcx3JEfv8VRsQe9Z4mCXeJBzxs7mbHY/XOZZuXlRNfhpVPbs6ZA==} + '@types/trusted-types@2.0.7': resolution: {integrity: sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw==} @@ -1942,8 +2005,8 @@ packages: '@types/wrap-ansi@3.0.0': resolution: {integrity: sha512-ltIpx+kM7g/MLRZfkbL7EsCEjfzCcScLpkg37eXEtx5kmrAKBkTJwd1GIAjDSL8wTpM6Hzn5YO4pSb91BEwu1g==} - '@typescript-eslint/eslint-plugin@8.6.0': - resolution: {integrity: sha512-UOaz/wFowmoh2G6Mr9gw60B1mm0MzUtm6Ic8G2yM1Le6gyj5Loi/N+O5mocugRGY+8OeeKmkMmbxNqUCq3B4Sg==} + '@typescript-eslint/eslint-plugin@8.8.1': + resolution: {integrity: sha512-xfvdgA8AP/vxHgtgU310+WBnLB4uJQ9XdyP17RebG26rLtDrQJV3ZYrcopX91GrHmMoH8bdSwMRh2a//TiJ1jQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: '@typescript-eslint/parser': ^8.0.0 || ^8.0.0-alpha.0 @@ -1953,8 +2016,8 @@ packages: typescript: optional: true - '@typescript-eslint/parser@8.6.0': - resolution: {integrity: sha512-eQcbCuA2Vmw45iGfcyG4y6rS7BhWfz9MQuk409WD47qMM+bKCGQWXxvoOs1DUp+T7UBMTtRTVT+kXr7Sh4O9Ow==} + '@typescript-eslint/parser@8.8.1': + resolution: {integrity: sha512-hQUVn2Lij2NAxVFEdvIGxT9gP1tq2yM83m+by3whWFsWC+1y8pxxxHUFE1UqDu2VsGi2i6RLcv4QvouM84U+ow==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 @@ -1963,12 +2026,12 @@ packages: typescript: optional: true - '@typescript-eslint/scope-manager@8.6.0': - resolution: {integrity: sha512-ZuoutoS5y9UOxKvpc/GkvF4cuEmpokda4wRg64JEia27wX+PysIE9q+lzDtlHHgblwUWwo5/Qn+/WyTUvDwBHw==} + '@typescript-eslint/scope-manager@8.8.1': + resolution: {integrity: sha512-X4JdU+66Mazev/J0gfXlcC/dV6JI37h+93W9BRYXrSn0hrE64IoWgVkO9MSJgEzoWkxONgaQpICWg8vAN74wlA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/type-utils@8.6.0': - resolution: {integrity: sha512-dtePl4gsuenXVwC7dVNlb4mGDcKjDT/Ropsk4za/ouMBPplCLyznIaR+W65mvCvsyS97dymoBRrioEXI7k0XIg==} + '@typescript-eslint/type-utils@8.8.1': + resolution: {integrity: sha512-qSVnpcbLP8CALORf0za+vjLYj1Wp8HSoiI8zYU5tHxRVj30702Z1Yw4cLwfNKhTPWp5+P+k1pjmD5Zd1nhxiZA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '*' @@ -1976,12 +2039,12 @@ packages: typescript: optional: true - '@typescript-eslint/types@8.6.0': - resolution: {integrity: sha512-rojqFZGd4MQxw33SrOy09qIDS8WEldM8JWtKQLAjf/X5mGSeEFh5ixQlxssMNyPslVIk9yzWqXCsV2eFhYrYUw==} + '@typescript-eslint/types@8.8.1': + resolution: {integrity: sha512-WCcTP4SDXzMd23N27u66zTKMuEevH4uzU8C9jf0RO4E04yVHgQgW+r+TeVTNnO1KIfrL8ebgVVYYMMO3+jC55Q==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/typescript-estree@8.6.0': - resolution: {integrity: sha512-MOVAzsKJIPIlLK239l5s06YXjNqpKTVhBVDnqUumQJja5+Y94V3+4VUFRA0G60y2jNnTVwRCkhyGQpavfsbq/g==} + '@typescript-eslint/typescript-estree@8.8.1': + resolution: {integrity: sha512-A5d1R9p+X+1js4JogdNilDuuq+EHZdsH9MjTVxXOdVFfTJXunKJR/v+fNNyO4TnoOn5HqobzfRlc70NC6HTcdg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '*' @@ -1989,32 +2052,32 @@ packages: typescript: optional: true - '@typescript-eslint/utils@8.6.0': - resolution: {integrity: sha512-eNp9cWnYf36NaOVjkEUznf6fEgVy1TWpE0o52e4wtojjBx7D1UV2WAWGzR+8Y5lVFtpMLPwNbC67T83DWSph4A==} + '@typescript-eslint/utils@8.8.1': + resolution: {integrity: sha512-/QkNJDbV0bdL7H7d0/y0qBbV2HTtf0TIyjSDTvvmQEzeVx8jEImEbLuOA4EsvE8gIgqMitns0ifb5uQhMj8d9w==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 - '@typescript-eslint/visitor-keys@8.6.0': - resolution: {integrity: sha512-wapVFfZg9H0qOYh4grNVQiMklJGluQrOUiOhYRrQWhx7BY/+I1IYb8BczWNbbUpO+pqy0rDciv3lQH5E1bCLrg==} + '@typescript-eslint/visitor-keys@8.8.1': + resolution: {integrity: sha512-0/TdC3aeRAsW7MDvYRwEc1Uwm0TIBfzjPFgg60UU2Haj5qsCs9cc3zNgY71edqE3LbWfF/WoZQd3lJoDXFQpag==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@ungap/structured-clone@1.2.0': resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} - '@vitejs/plugin-react-swc@3.7.0': - resolution: {integrity: sha512-yrknSb3Dci6svCd/qhHqhFPDSw0QtjumcqdKMoNNzmOl5lMXTTiqzjWtG4Qask2HdvvzaNgSunbQGet8/GrKdA==} + '@vitejs/plugin-react-swc@3.7.1': + resolution: {integrity: sha512-vgWOY0i1EROUK0Ctg1hwhtC3SdcDjZcdit4Ups4aPkDcB1jYhmo+RMYWY87cmXMhvtD5uf8lV89j2w16vkdSVg==} peerDependencies: vite: ^4 || ^5 - '@xyflow/react@12.3.0': - resolution: {integrity: sha512-dujEbjOn+5gMGg/wsojxtI7v2CfWm7ieRyiOHiZTPyw6p/VIdCoS3nLfSBP3TT+swoHSAXZ78iomHSKoUl4tMg==} + '@xyflow/react@12.3.1': + resolution: {integrity: sha512-PurYFxwzJa0U6RRX9k4VbNRU+vQd6mRKFR8Uk1dF81diCKZDj495y6AupqsjMHtkO66tGHV0LdenLpIHvnOEFw==} peerDependencies: react: '>=17' react-dom: '>=17' - '@xyflow/system@0.0.42': - resolution: {integrity: sha512-kWYj+Y0GOct0jKYTdyRMNOLPxGNbb2TYvPg2gTmJnZ31DOOMkL5uRBLX825DR2gOACDu+i5FHLxPJUPf/eGOJw==} + '@xyflow/system@0.0.43': + resolution: {integrity: sha512-1zHgad1cWr1mKm2xbFaarK0Jg8WRgaQ8ubSBIo/pRdq3fEgCuqgNkL9NSAP6Rvm8zi3+Lu4JPUMN+EEx5QgX9A==} JSONStream@1.3.5: resolution: {integrity: sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==} @@ -2115,8 +2178,11 @@ packages: resolution: {integrity: sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==} engines: {node: '>=12'} - antd@5.21.0: - resolution: {integrity: sha512-eoY3LruXq/8MRCXG46O2cwc+Q8HW8Bhc+pWw7loIt6Dn22tLHckxYF/663kn55JTIOVUnJdmJDP9njdJmLXJsQ==} + antd@5.21.3: + resolution: {integrity: sha512-Yby3gU6jfuvhNFRPsrHB4Yc/G3LHLNHHy0kShwNmmZf1QTCiW5TmqP3DT5m/NHbJsTgEwJpwo3AaOWo+KQyEjw==} + peerDependencies: + react: '>=16.9.0' + react-dom: '>=16.9.0' any-promise@1.3.0: resolution: {integrity: sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==} @@ -2233,8 +2299,8 @@ packages: asap@2.0.6: resolution: {integrity: sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==} - assert-never@1.2.1: - resolution: {integrity: sha512-TaTivMB6pYI1kXwrFlEhLeGfOqoDNdTxjCdwRfFFkEA30Eu+k48W34nlok2EYWJfFFzqaEmichdNM7th6M5HNw==} + assert-never@1.3.0: + resolution: {integrity: sha512-9Z3vxQ+berkL/JJo0dK+EY3Lp0s3NtSnP3VCLsh5HDcZPrh0M+KQRK5sWhUeyPPH+/RCxZqOxLMR+YC6vlviEQ==} assign-symbols@1.0.0: resolution: {integrity: sha512-Q+JC7Whu8HhmTdBph/Tq59IoRtoy6KAm5zzPv00WdujX82lbAL8K7WVjne7vdCsAmbF4AYaDOPyO3k0kl8qIrw==} @@ -2326,8 +2392,8 @@ packages: engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} hasBin: true - browserslist@4.23.3: - resolution: {integrity: sha512-btwCFJVjI4YWDNfau8RhZ+B1Q/VLoUITrm3RlP6y1tYGWIOa+InuYiRGXUBXo8nA1qKmHMyLB/iVQg5TT4eFoA==} + browserslist@4.24.0: + resolution: {integrity: sha512-Rmb62sR1Zpjql25eSanFGEhAxcFwfA1K0GuQcLoaJBAcENegrQut3hYdhXFF1obQfiDyqIW/cLM5HSJ/9k884A==} engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} hasBin: true @@ -2390,8 +2456,8 @@ packages: caniuse-lite@1.0.30001582: resolution: {integrity: sha512-vsJG3V5vgfduaQGVxL53uSX/HUzxyr2eA8xCo36OLal7sRcSZbibJtLeh0qja4sFOr/QQGt4opB4tOy+eOgAxg==} - caniuse-lite@1.0.30001660: - resolution: {integrity: sha512-GacvNTTuATm26qC74pt+ad1fW15mlQ/zuTzzY1ZoIzECTP8HURDfF43kNxPgf7H1jmelCBQTTbBNxdSXOA7Bqg==} + caniuse-lite@1.0.30001667: + resolution: {integrity: sha512-7LTwJjcRkzKFmtqGsibMeuXmvFDfZq/nzIjnmgCGzKKRVzjD72selLDK1oPF/Oxzmt4fNcPvTDvGqSDG4tCALw==} canvas@2.11.2: resolution: {integrity: sha512-ItanGBMrmRV7Py2Z+Xhs7cT+FNt5K0vPL4p9EZ/UX/Mu7hFbkxSjKF2KVtPwX7UYWp7dRKnrTvReflgrItJbdw==} @@ -2449,6 +2515,10 @@ packages: resolution: {integrity: sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==} engines: {node: '>= 8.10.0'} + chokidar@4.0.1: + resolution: {integrity: sha512-n8enUVCED/KVRQlab1hr3MVpcVMvxtZjmEa956u+4YijlmQED223XMSYj2tLuKvr4jcCTzNNMpQDUer72MMmzA==} + engines: {node: '>= 14.16.0'} + chownr@2.0.0: resolution: {integrity: sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==} engines: {node: '>=10'} @@ -2475,10 +2545,6 @@ packages: resolution: {integrity: sha512-aCj4O5wKyszjMmDT4tZj93kxyydN/K5zPWSCe6/0AV/AA1pqe5ZBIw0a2ZfPQV7lL5/yb5HsUreJ6UFAF1tEQw==} engines: {node: '>=18'} - cli-spinners@2.9.2: - resolution: {integrity: sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg==} - engines: {node: '>=6'} - cli-truncate@4.0.0: resolution: {integrity: sha512-nPdaFdQ0h/GEigbPClz11D0v/ZJEwxmeVZGeMo3Z5StPtUTkA9o1lD6QwoirYiSDzbcwn2XcjwmCp68W1IS4TA==} engines: {node: '>=18'} @@ -2892,8 +2958,8 @@ packages: electron-to-chromium@1.4.654: resolution: {integrity: sha512-hjfFa+Vj4WGLRVTlCQa+IivBkpcp+boGxMQfusOC/me5Y5NfU4wX7wyw+K9p8Cw4tl0BVIZGH2n7y/jMc3w4pg==} - electron-to-chromium@1.5.21: - resolution: {integrity: sha512-+rBAerCpQvFSPyAO677i5gJuWGO2WFsoujENdcMzsrpP7Ebcc3pmpERgU8CV4fFF10a5haP4ivnFQ/AmLICBVg==} + electron-to-chromium@1.5.35: + resolution: {integrity: sha512-hOSRInrIDm0Brzp4IHW2F/VM+638qOL2CzE0DgpnGzKW27C95IqqeqgKz/hxHGnvPxvQGpHUGD5qRVC9EZY2+A==} elkjs@0.9.3: resolution: {integrity: sha512-f/ZeWvW/BCXbhGEf1Ujp29EASo/lk1FDnETgNKwJrsVvGZhUWCZyg3xLJjAsxfOmt8KjswHmI5EwCQcPMpOYhQ==} @@ -2966,6 +3032,10 @@ packages: resolution: {integrity: sha512-zoMwbCcH5hwUkKJkT8kDIBZSz9I6mVG//+lDCinLCGov4+r7NIy0ld8o03M0cJxl2spVf6ESYVS6/gpIfq1FFw==} engines: {node: '>= 0.4'} + es-iterator-helpers@1.1.0: + resolution: {integrity: sha512-/SurEfycdyssORP/E+bj4sEu1CWw4EmLDsHynHwSXQ7utgbrMRWW195pTrCjFgFCddf/UkYm3oqKPRq5i8bJbw==} + engines: {node: '>= 0.4'} + es-object-atoms@1.0.0: resolution: {integrity: sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw==} engines: {node: '>= 0.4'} @@ -3211,12 +3281,33 @@ packages: eslint-import-resolver-webpack: optional: true - eslint-plugin-import@2.30.0: - resolution: {integrity: sha512-/mHNE9jINJfiD2EKkg1BKyPyUk4zdnT54YgbOgfjSakWT5oyX/qQLVNTkehyfpcMxZXMy1zyonZ2v7hZTX43Yw==} + eslint-module-utils@2.12.0: + resolution: {integrity: sha512-wALZ0HFoytlyh/1+4wuZ9FJCD/leWHQzzrxJ8+rebyReSLk7LApMyd3WJaLVoN+D5+WIdJyDK1c6JnE65V4Zyg==} + engines: {node: '>=4'} + peerDependencies: + '@typescript-eslint/parser': '*' + eslint: '*' + eslint-import-resolver-node: '*' + eslint-import-resolver-typescript: '*' + eslint-import-resolver-webpack: '*' + peerDependenciesMeta: + '@typescript-eslint/parser': + optional: true + eslint: + optional: true + eslint-import-resolver-node: + optional: true + eslint-import-resolver-typescript: + optional: true + eslint-import-resolver-webpack: + optional: true + + eslint-plugin-import@2.31.0: + resolution: {integrity: sha512-ixmkI62Rbc2/w8Vfxyh1jQRTdRTF52VxwRVHl/ykPAmqG+Nb7/kNn+byLP0LxPgI7zWA16Jt82SybJInmMia3A==} engines: {node: '>=4'} peerDependencies: '@typescript-eslint/parser': '*' - eslint: ^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8 + eslint: ^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8 || ^9 peerDependenciesMeta: '@typescript-eslint/parser': optional: true @@ -3252,8 +3343,8 @@ packages: peerDependencies: eslint: '>=7' - eslint-plugin-react@7.36.1: - resolution: {integrity: sha512-/qwbqNXZoq+VP30s1d4Nc1C5GTxjJQjk4Jzs4Wq2qzxFM7dSmuG2UkIjg2USMLh3A/aVcUNrK7v0J5U1XEGGwA==} + eslint-plugin-react@7.37.1: + resolution: {integrity: sha512-xwTnwDqzbDRA8uJ7BMxPs/EXRB3i8ZfnOIp8BsxEQkT0nHPp+WWceqGgo6rKb9ctNi8GJLDT4Go5HAWELa/WMg==} engines: {node: '>=4'} peerDependencies: eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9.7 @@ -3263,8 +3354,8 @@ packages: peerDependencies: eslint: '>=5.0.0' - eslint-plugin-svelte@2.44.0: - resolution: {integrity: sha512-wav4MOs02vBb1WjvTCYItwJCxMkuk2Z4p+K/eyjL0N/z7ahXLP+0LtQQjiKc2ezuif7GnZLbD1F3o1VHzSvdVg==} + eslint-plugin-svelte@2.44.1: + resolution: {integrity: sha512-w6wkoJPw1FJKFtM/2oln21rlu5+HTd2CSkkzhm32A+trNoW2EYQqTQAbDTU6k2GI/6Vh64rBHYQejqEgDld7fw==} engines: {node: ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^7.0.0 || ^8.0.0-0 || ^9.0.0-0 @@ -3277,20 +3368,20 @@ packages: resolution: {integrity: sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - eslint-scope@8.0.2: - resolution: {integrity: sha512-6E4xmrTw5wtxnLA5wYL3WDfhZ/1bUBGOXV0zQvVRDOtrR8D0p6W7fs3JweNYhwRYeGvd/1CKX2se0/2s7Q/nJA==} + eslint-scope@8.1.0: + resolution: {integrity: sha512-14dSvlhaVhKKsa9Fx1l8A17s7ah7Ef7wCakJ10LYk6+GYmP9yDti2oq2SEwcyndt6knfcZyhyxwY3i9yL78EQw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} eslint-visitor-keys@3.4.3: resolution: {integrity: sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - eslint-visitor-keys@4.0.0: - resolution: {integrity: sha512-OtIRv/2GyiF6o/d8K7MYKKbXrOUBIK6SfkIRM4Z0dY3w+LiQ0vy3F57m0Z71bjbyeiWFiHJ8brqnmE6H6/jEuw==} + eslint-visitor-keys@4.1.0: + resolution: {integrity: sha512-Q7lok0mqMUSf5a/AdAZkA5a/gHcO6snwQClVNNvFKCAVlxXucdU8pKydU5ZVZjBx5xr37vGbFFWtLQYreLzrZg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - eslint@9.11.0: - resolution: {integrity: sha512-yVS6XODx+tMFMDFcG4+Hlh+qG7RM6cCJXtQhCKLSsr3XkLvWggHjCqjfh0XsPPnt1c56oaT6PMgW9XWQQjdHXA==} + eslint@9.12.0: + resolution: {integrity: sha512-UVIOlTEWxwIopRL1wgSQYdnVDcEvs2wyaO6DGo5mXqe3r16IoCNWkR29iHhyaP4cICWjbgbmFUGAhh0GJRuGZw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} hasBin: true peerDependencies: @@ -3303,8 +3394,8 @@ packages: resolution: {integrity: sha512-kTUIGKQ/mDPFoJ0oVfcmyJn4iBDRptjNVIzwIFR7tqWXdVI9xfA2RMwY/gbSpJG3lkdWNEjLap/NqVHZiJsdfg==} engines: {node: '>=0.10'} - espree@10.1.0: - resolution: {integrity: sha512-M1M6CpiE6ffoigIOWYO9UDP8TMUw9kqb21tf+08IgDYjCsOvCuDt4jQcZmoYxx+w7zlKw9/N0KXfto+I8/FrXA==} + espree@10.2.0: + resolution: {integrity: sha512-upbkBJbckcCNBDBDXEbuhjbP68n+scUd3k/U2EkyM9nw+I/jPiL4cLF/Al06CF96wRltFda16sxDFrxsI1v0/g==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} espree@9.6.1: @@ -3433,6 +3524,14 @@ packages: picomatch: optional: true + fdir@6.4.0: + resolution: {integrity: sha512-3oB133prH1o4j/L5lLW7uOCF1PlD+/It2L0eL/iAqWMB91RBbqTewABqxhj0ibBd90EEmWZq7ntIWzVaWcXTGQ==} + peerDependencies: + picomatch: ^3 || ^4 + peerDependenciesMeta: + picomatch: + optional: true + fetch-blob@3.2.0: resolution: {integrity: sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==} engines: {node: ^12.20 || >= 14.13} @@ -3614,8 +3713,8 @@ packages: engines: {node: '>=16'} hasBin: true - github-markdown-css@5.6.1: - resolution: {integrity: sha512-DItLFgHd+s7HQmk63YN4/TdvLeRqk1QP7pPKTTPrDTYoI5x7f/luJWSOZxesmuxBI2srHp8RDyoZd+9WF+WK8Q==} + github-markdown-css@5.7.0: + resolution: {integrity: sha512-GoYhaqELL4YUjz4tZ00PQ4JzFQkMfrBVuEeRB8W74HoikHWNiaGqSgynpwJEc+xom5uf04qoD/tUSS6ziZltaQ==} engines: {node: '>=10'} github-slugger@2.0.0: @@ -3669,8 +3768,8 @@ packages: resolution: {integrity: sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==} engines: {node: '>=18'} - globals@15.9.0: - resolution: {integrity: sha512-SmSKyLLKFbSr6rptvP8izbyxJL4ILwqO9Jg23UA0sDlGlu58V59D1//I3vlc0KJphVdUR7vMjHIplYnzBxorQA==} + globals@15.11.0: + resolution: {integrity: sha512-yeyNSjdbyVaWurlwCpcA6XNBrHTMIeDdj0/hnvX/OLJ9ekOXYbLsLinH/MucQyGvNnXhidTdNhTtJaffL2sMfw==} engines: {node: '>=18'} globalthis@1.0.3: @@ -3716,8 +3815,8 @@ packages: graphemer@1.4.0: resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==} - graphql@16.8.2: - resolution: {integrity: sha512-cvVIBILwuoSyD54U4cF/UXDh5yAobhNV/tPygI4lZhgOIJQE/WLWC4waBRb4I6bDVYb3OVx3lfHbaQOEoUD5sg==} + graphql@16.9.0: + resolution: {integrity: sha512-GGTKBX4SD7Wdb8mqeDLni2oaRGYQWjWHGKPQ24ZMnUtKfcsVoiv4uX8+LJr1K6U5VW2Lu1BwJnj7uiori0YtRw==} engines: {node: ^12.22.0 || ^14.16.0 || ^16.0.0 || >=17.0.0} has-bigints@1.0.2: @@ -4143,10 +4242,6 @@ packages: resolution: {integrity: sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==} engines: {node: '>=8'} - is-path-inside@3.0.3: - resolution: {integrity: sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==} - engines: {node: '>=8'} - is-plain-obj@1.1.0: resolution: {integrity: sha512-yvkRyxmFKEOQ4pNXCmJG5AEQNlXJS5LaONXo5/cLdTZdWvsZ1ioJEonLGAosKlMWE8lwUy/bJzMjcw8az73+Fg==} engines: {node: '>=0.10.0'} @@ -4272,6 +4367,10 @@ packages: iterator.prototype@1.1.2: resolution: {integrity: sha512-DR33HMMr8EzwuRL8Y9D3u2BMj8+RqSE850jfGu59kS7tbmPLzGkZmVSfyCFSDxuZiEY6Rzt3T2NA/qU+NwVj1w==} + iterator.prototype@1.1.3: + resolution: {integrity: sha512-FW5iMbeQ6rBGm/oKgzq2aW4KvAGpxPzYES8N4g4xNXUKpL1mclMvOe+76AcLDTvD+Ze+sOpVhgdAQEKF4L9iGQ==} + engines: {node: '>= 0.4'} + jackspeak@3.4.0: resolution: {integrity: sha512-JVYhQnN59LVPFCEcVa2C3CrEKYacvjRfqIQl+h8oi91aLYQVWRYbxjPcv1bUiUy/kLmQaANrYfNMCO3kuEDHfw==} engines: {node: '>=14'} @@ -4284,6 +4383,10 @@ packages: resolution: {integrity: sha512-2yTgeWTWzMWkHu6Jp9NKgePDaYHbntiwvYuuJLbbN9vl7DC9DvXKOB2BC3ZZ92D3cvV/aflH0osDfwpHepQ53w==} hasBin: true + jiti@2.3.3: + resolution: {integrity: sha512-EX4oNDwcXSivPrw2qKH2LB5PoFxEvgtv2JgwW0bU858HoLQ+kutSvjLMUqBd0PeJYEinLWhoI9Ol0eYMqj/wNQ==} + hasBin: true + jju@1.4.0: resolution: {integrity: sha512-8wb9Yw966OSxApiCt0K3yNJL8pnNeIv+OEq2YMidz4FKP6nonSRoOXc80iXY4JaN2FC11B9qsNmDsm+ZOfMROA==} @@ -4305,9 +4408,9 @@ packages: resolution: {integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==} hasBin: true - jsesc@2.5.2: - resolution: {integrity: sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==} - engines: {node: '>=4'} + jsesc@3.0.2: + resolution: {integrity: sha512-xKqzzWXDttJuOcawBt4KnKHHIf5oQ/Cxax+0PWFG+DFDgHNAdi+TXECADI+RYiFUMmx8792xsMbbgXj4CwnP4g==} + engines: {node: '>=6'} hasBin: true json-buffer@3.0.1: @@ -4602,9 +4705,6 @@ packages: lru-queue@0.1.0: resolution: {integrity: sha512-BpdYkt9EvGl8OfWHDQPISVpcl5xZthb+XPsbELj5AQXxIC8IriDZIQYjBJPEm5rS420sjZ0TLEzRcq5KdBhYrQ==} - magic-string@0.30.10: - resolution: {integrity: sha512-iIRwTIf0QKV3UAnYK4PU8uiEc4SRh5jX0mwpIwETPpHdhVM4f53RSwS/vXvN1JhGX+Cs7B8qIq3d6AH49O5fAQ==} - magic-string@0.30.11: resolution: {integrity: sha512-+Wri9p0QHMy+545hKww7YAu5NyzF8iomPL/RQazugQ9+Ez4Ic3mERMd8ZTX5rfK944j+560ZJi8iAwgak1Ac7A==} @@ -4921,12 +5021,12 @@ packages: ms@2.1.3: resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} - msw@2.3.1: - resolution: {integrity: sha512-ocgvBCLn/5l3jpl1lssIb3cniuACJLoOfZu01e3n5dbJrpA5PeeWn28jCLgQDNt6d7QT8tF2fYRzm9JoEHtiig==} + msw@2.4.9: + resolution: {integrity: sha512-1m8xccT6ipN4PTqLinPwmzhxQREuxaEJYdx4nIbggxP8aM7r1e71vE7RtOUSQoAm1LydjGfZKy7370XD/tsuYg==} engines: {node: '>=18'} hasBin: true peerDependencies: - typescript: '>= 4.7.x' + typescript: '>= 4.8.x' peerDependenciesMeta: typescript: optional: true @@ -4981,8 +5081,8 @@ packages: resolution: {integrity: sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - node-gyp-build@4.8.1: - resolution: {integrity: sha512-OSs33Z9yWr148JZcbZd5WiAXhh/n9z8TxQcdMhIOlpN9AhWpLfvVFO73+m77bBABQMaY9XSvIa+qk0jlI7Gcaw==} + node-gyp-build@4.8.2: + resolution: {integrity: sha512-IRUxE4BVsHWXkV/SFOut4qTlagw2aM8T5/vnTsmrHJvVoKueJHRc/JaFND7QDDc61kLYUJ6qlZM3sqTSyx2dTw==} hasBin: true node-releases@2.0.14: @@ -5107,8 +5207,8 @@ packages: outdent@0.5.0: resolution: {integrity: sha512-/jHxFIzoMXdqPzTaCpFzAAWhpkSjZPF4Vsn6jAfNpmbH/ymsmd7Qc6VE9BGn0L6YMj6uwpQLxCECpus4ukKS9Q==} - outvariant@1.4.2: - resolution: {integrity: sha512-Ou3dJ6bA/UJ5GVHxah4LnqDwZRwAmWxrG3wtrHrbGnP4RnLCtA64A4F+ae7Y8ww660JaddSoArUR5HjipWSHAQ==} + outvariant@1.4.3: + resolution: {integrity: sha512-+Sl2UErvtsoajRDKCE5/dBz4DIvHXQQnAxtQTF04OJxY0+DyZXSo5P5Bb7XYWOh81syohlYL24hbDwxedPUJCA==} p-filter@2.1.0: resolution: {integrity: sha512-ZBxxZ5sL2HghephhpGAQdoskxplTwr7ICaehZwLIlfL6acuVgZPm8yBNuRAFBGEqtD/hmUeq9eqLg2ys9Xr/yw==} @@ -5161,8 +5261,8 @@ packages: package-json-from-dist@1.0.0: resolution: {integrity: sha512-dATvCeZN/8wQsGywez1mzHtTlP22H8OEfPrVMLNr4/eGa+ijtLn/6M5f0dY8UKNrC2O9UCU6SSoG3qRKnt7STw==} - package-manager-detector@0.2.0: - resolution: {integrity: sha512-E385OSk9qDcXhcM9LNSe4sdhx8a9mAPrZ4sMLW+tmxl5ZuGtPUcdFu+MPP2jbgiWAZ6Pfe5soGFMd+0Db5Vrog==} + package-manager-detector@0.2.2: + resolution: {integrity: sha512-VgXbyrSNsml4eHWIvxxG/nTL4wgybMTXCV2Un/+yEc3aDKKU6nQBZjbeP3Pl3qm9Qg92X/1ng4ffvCeD/zwHgg==} parent-module@1.0.1: resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==} @@ -5244,8 +5344,8 @@ packages: resolution: {integrity: sha512-ypGJsmGtdXUOeM5u93TyeIEfEhM6s+ljAhrk5vAvSx8uyY/02OvrZnA0YNGUrPXfpJMgI1ODd3nwz8Npx4O4cg==} engines: {node: 20 || >=22} - path-to-regexp@6.2.2: - resolution: {integrity: sha512-GQX3SSMokngb36+whdpRXE+3f9V8UzyAorlYvOGx87ufGHehNTn5lCxrKtLyZ4Yl/wEKnNnr98ZzOwwDZV5ogw==} + path-to-regexp@6.3.0: + resolution: {integrity: sha512-Yhpw4T9C6hPpgPeA28us07OJeqZ5EzQTkbfwuhsUg0c237RomFoETJgmp2sa3F/41gfLE6G5cqcYwznmeEeOlQ==} path-type@3.0.0: resolution: {integrity: sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==} @@ -5474,16 +5574,16 @@ packages: resolution: {integrity: sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==} engines: {node: '>=6.0.0'} - prettier-plugin-packagejson@2.5.2: - resolution: {integrity: sha512-w+TmoLv2pIa+siplW1cCj2ujEXQQS6z7wmWLOiLQK/2QVl7Wy6xh/ZUpqQw8tbKMXDodmSW4GONxlA33xpdNOg==} + prettier-plugin-packagejson@2.5.3: + resolution: {integrity: sha512-ATMEEXr+ywls1kgrZEWl4SBPEm0uDdyDAjyNzUC0/Z8WZTD3RqbJcQDR+Dau+wYkW9KHK6zqQIsFyfn+9aduWg==} peerDependencies: prettier: '>= 1.16.0' peerDependenciesMeta: prettier: optional: true - prettier-plugin-svelte@3.2.6: - resolution: {integrity: sha512-Y1XWLw7vXUQQZmgv1JAEiLcErqUniAF2wO7QJsw8BVMvpLET2dI5WpEIEJx1r11iHVdSMzQxivyfrH9On9t2IQ==} + prettier-plugin-svelte@3.2.7: + resolution: {integrity: sha512-/Dswx/ea0lV34If1eDcG3nulQ63YNr5KPDfMsjbdtpSWOxKKJ7nAc2qlVuYwEvCr4raIuredNoR7K4JCkmTGaQ==} peerDependencies: prettier: ^3.0.0 svelte: ^3.2.0 || ^4.0.0-next.0 || ^5.0.0-next.0 @@ -5524,6 +5624,9 @@ packages: pseudomap@1.0.2: resolution: {integrity: sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ==} + psl@1.9.0: + resolution: {integrity: sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==} + pug-attrs@3.0.0: resolution: {integrity: sha512-azINV9dUtzPMFQktvTXciNAfAuVh/L/JCl0vtPCwvOA21uZrC08K/UnmrL+SXGEVc1FwzjW62+xw5S/uaLj6cA==} @@ -5564,6 +5667,9 @@ packages: resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==} engines: {node: '>=6'} + querystringify@2.2.0: + resolution: {integrity: sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==} + queue-microtask@1.2.3: resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} @@ -5650,8 +5756,8 @@ packages: react: '>=16.9.0' react-dom: '>=16.9.0' - rc-notification@5.6.1: - resolution: {integrity: sha512-Q4ZKES3IBxWmpNnlDiMFYoH6D7MJ1L3n3gp59pnpaMI8gm9Vj+gVRxdInvoYjBoZvEOenxb9MbbKvnFhzJpgvA==} + rc-notification@5.6.2: + resolution: {integrity: sha512-Id4IYMoii3zzrG0lB0gD6dPgJx4Iu95Xu0BQrhHIbp7ZnAZbLqdqQ73aIWH0d0UFcElxwaKjnzNovTjo7kXz7g==} engines: {node: '>=8.x'} peerDependencies: react: '>=16.9.0' @@ -5669,8 +5775,8 @@ packages: react: '>=16.9.0' react-dom: '>=16.9.0' - rc-picker@4.6.14: - resolution: {integrity: sha512-7DuTfUFdkxmsNpWQ0TWv6FPGna5e6KKC4nxtx3x9xhumLz7jb3fhlDdWQvqEL6tpt9DOb1+N5j+wB+lDOSS9kg==} + rc-picker@4.6.15: + resolution: {integrity: sha512-OWZ1yrMie+KN2uEUfYCfS4b2Vu6RC1FWwNI0s+qypsc3wRt7g+peuZKVIzXCTaJwyyZruo80+akPg2+GmyiJjw==} engines: {node: '>=8.x'} peerDependencies: date-fns: '>= 2.x' @@ -5721,8 +5827,8 @@ packages: react: '*' react-dom: '*' - rc-slider@11.1.6: - resolution: {integrity: sha512-LACAaXM0hi+4x4ErDGZLy7weIQwmBIVbIgPE+eDHiHkyzMvKjWHraCG8/B22Y/tCQUPAsP02wBhKhth7mH2PIw==} + rc-slider@11.1.7: + resolution: {integrity: sha512-ytYbZei81TX7otdC0QvoYD72XSlxvTihNth5OeZ6PMXyEDq/vHdWFulQmfDGyXK1NwKwSlKgpvINOa88uT5g2A==} engines: {node: '>=8.x'} peerDependencies: react: '>=16.9.0' @@ -5748,8 +5854,8 @@ packages: react: '>=16.9.0' react-dom: '>=16.9.0' - rc-tabs@15.2.0: - resolution: {integrity: sha512-ZfHdGw0krK4walBYNOgPWCcBImSp5NtzJR5+oI4rN9Z44FYDQKozBFfuAQHhumIUtx4EmGaYCFjywwgca/Rs1g==} + rc-tabs@15.3.0: + resolution: {integrity: sha512-lzE18r+zppT/jZWOAWS6ntdkDUKHOLJzqMi5UAij1LeKwOaQaupupAoI9Srn73GRzVpmGznkECMRrzkRusC40A==} engines: {node: '>=8.x'} peerDependencies: react: '>=16.9.0' @@ -5792,8 +5898,8 @@ packages: react: '>=16.9.0' react-dom: '>=16.9.0' - rc-virtual-list@3.14.7: - resolution: {integrity: sha512-wFH1vzByGzT4jwNzj53JXScCHiTtZmEEXE9F8qyGDhoEaQAEg+RDeRZcTi0oIUo2EWqPiFnpaV5H09c8XVKSIw==} + rc-virtual-list@3.14.8: + resolution: {integrity: sha512-8D0KfzpRYi6YZvlOWIxiOm9BGt4Wf2hQyEaM6RXlDDiY2NhLheuYI+RA+7ZaZj1lq+XQqy3KHlaeeXQfzI5fGg==} engines: {node: '>=8.x'} peerDependencies: react: '>=16.9.0' @@ -5845,6 +5951,10 @@ packages: resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==} engines: {node: '>=8.10.0'} + readdirp@4.0.2: + resolution: {integrity: sha512-yDMz9g+VaZkqBYS/ozoBJwaBhTbZo3UNYQHNRw1D3UFQB8oHB4uS/tAODO+ZLjGWmUbKnIlOWO+aaIiAxrUWHA==} + engines: {node: '>= 14.16.0'} + redent@2.0.0: resolution: {integrity: sha512-XNwrTx77JQCEMXTeb8movBKuK75MgH0RZkujNuDKCezemx/voapl9i2gCSi8WWm8+ox5ycJi1gxF22fR7c0Ciw==} engines: {node: '>=4'} @@ -5871,6 +5981,10 @@ packages: resolution: {integrity: sha512-NcDiDkTLuPR+++OCKB0nWafEmhg/Da8aUPLPMQbK+bxKKCm1/S5he+AqYa4PlMCVBalb4/yxIRub6qkEx5yJbw==} engines: {node: '>= 0.4'} + regexp.prototype.flags@1.5.3: + resolution: {integrity: sha512-vqlC04+RQoFalODCbCumG2xIOvapzVMHwsyIGM/SIE8fRhFFsXeH8/QQ+s0T0kDAhKc4k30s73/0ydkHQz6HlQ==} + engines: {node: '>= 0.4'} + rehype-katex@7.0.1: resolution: {integrity: sha512-OiM2wrZ/wuhKkigASodFoo8wimG3H12LWQaH8qSPVJn9apWKFSH3YOCtbKpBorTVw/eI7cuT21XBbvwEswbIOA==} @@ -5927,6 +6041,9 @@ packages: resolution: {integrity: sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==} engines: {node: '>=0.10.0'} + requires-port@1.0.0: + resolution: {integrity: sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==} + resize-observer-polyfill@1.5.1: resolution: {integrity: sha512-LwZrotdHOo12nQuZlHEmtuXdqGoOD0OhaxopaNFxWzInpEgaLWoVuAMbTzixuosCx2nEG58ngzW3vxdWoxIgdg==} @@ -5997,6 +6114,11 @@ packages: engines: {node: '>=18.0.0', npm: '>=8.0.0'} hasBin: true + rollup@4.24.0: + resolution: {integrity: sha512-DOmrlGSXNk1DM0ljiQA+i+o0rSLhtii1je5wgk60j49d1jHT5YYttBv1iWOnYSTG+fZZESUOSNiAl89SIet+Cg==} + engines: {node: '>=18.0.0', npm: '>=8.0.0'} + hasBin: true + run-parallel@1.2.0: resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} @@ -6035,8 +6157,8 @@ packages: sander@0.5.1: resolution: {integrity: sha512-3lVqBir7WuKDHGrKRDn/1Ye3kwpXaDOMsiRP1wd6wpZW56gJhsbp5RqQpA6JG/P+pkXizygnr1dKR8vzWaVsfA==} - sass@1.78.0: - resolution: {integrity: sha512-AaIqGSrjo5lA2Yg7RvFZrlXDBCp3nV4XP73GrLGvdRWWwk+8H3l0SDvq/5bA4eF+0RFPLuWUk3E+P1U/YqnpsQ==} + sass@1.79.4: + resolution: {integrity: sha512-K0QDSNPXgyqO4GZq2HO5Q70TLxTH6cIT59RdoCHMivrC8rqzaTw5ab9prjz9KUN1El4FLXrBXJhik61JR4HcGg==} engines: {node: '>=14.0.0'} hasBin: true @@ -6482,8 +6604,8 @@ packages: resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} engines: {node: '>= 0.4'} - svelte-check@4.0.2: - resolution: {integrity: sha512-w2yqcG9ELJe2RJCnAvB7v0OgkHhL3czzz/tVoxGFfO6y4mOrF6QHCDhXijeXzsU7LVKEwWS3Qd9tza4JBuDxqA==} + svelte-check@4.0.4: + resolution: {integrity: sha512-AcHWIPuZb1mh/jKoIrww0ebBPpAvwWd1bfXCnwC2dx4OkydNMaiG//+Xnry91RJMHFH7CiE+6Y2p332DRIaOXQ==} engines: {node: '>= 18.0.0'} hasBin: true peerDependencies: @@ -6567,6 +6689,10 @@ packages: resolution: {integrity: sha512-7gr8p9TQP6RAHusBOSLs46F4564ZrjV8xFmw5zCmgmhGUcw2hxsShhJ6CEiHQMgPDwAQ1fWHPM0ypc4RMAig4A==} engines: {node: ^14.18.0 || >=16.0.0} + synckit@0.9.2: + resolution: {integrity: sha512-vrozgXDQwYO72vHjUb/HnFbQx1exDjoKzqx23aXEg2a9VIg2TSFZ8FmeZpTjUCFMYw7mpX4BE2SFu8wI7asYsw==} + engines: {node: ^14.18.0 || >=16.0.0} + table@5.4.6: resolution: {integrity: sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug==} engines: {node: '>=6.0.0'} @@ -6655,6 +6781,10 @@ packages: token-stream@1.0.0: resolution: {integrity: sha512-VSsyNPPW74RpHwR8Fc21uubwHY7wMDeJLys2IX5zJNih+OnAnaifKHo+1LHT7DAdloQ7apeaaWg8l7qnf/TnEg==} + tough-cookie@4.1.4: + resolution: {integrity: sha512-Loo5UUvLD9ScZ6jh8beX1T6sO1w2/MpCRpEP7V280GKMVUQ0Jzar2U3UJPsrdbziLEMMhu3Ujnq//rhiFuIeag==} + engines: {node: '>=6'} + tr46@0.0.3: resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==} @@ -6755,8 +6885,8 @@ packages: resolution: {integrity: sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==} engines: {node: '>=10'} - type-fest@4.20.0: - resolution: {integrity: sha512-MBh+PHUHHisjXf4tlx0CFWoMdjx8zCMLJHOjnV1prABYZFHqtFOyauCIK2/7w4oIfwkF8iNhLtnJEfVY2vn3iw==} + type-fest@4.26.1: + resolution: {integrity: sha512-yOGpmOAL7CkKe/91I5O3gPICmJNLJ1G4zFYVAsRHg7M64biSnPtRj0WNQt++bRkjYOqjWXrhnUw1utzmVErAdg==} engines: {node: '>=16'} type@2.7.3: @@ -6798,8 +6928,8 @@ packages: peerDependencies: typescript: '>=4.5.0' - typescript-eslint@8.6.0: - resolution: {integrity: sha512-eEhhlxCEpCd4helh3AO1hk0UP2MvbRi9CtIAJTVPQjuSXOOO2jsEacNi4UdcJzZJbeuVg1gMhtZ8UYb+NFYPrA==} + typescript-eslint@8.8.1: + resolution: {integrity: sha512-R0dsXFt6t4SAFjUSKFjMh4pXDtq04SsFKCVGDP3ZOzNP7itF0jBcZYU4fMsZr4y7O7V7Nc751dDeESbe4PbQMQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '*' @@ -6821,8 +6951,8 @@ packages: engines: {node: '>=14.17'} hasBin: true - typescript@5.6.2: - resolution: {integrity: sha512-NW8ByodCSNCwZeghjN3o+JX5OFH0Ojg6sadjEKY4huZ52TqbJTJnDo5+Tw98lSy63NZvi4n+ez5m2u5d4PkZyw==} + typescript@5.6.3: + resolution: {integrity: sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw==} engines: {node: '>=14.17'} hasBin: true @@ -6839,6 +6969,10 @@ packages: resolution: {integrity: sha512-3ItfzbrhDlINjaP0duwnNsKpDQk3acHI3gVJ1z4fmwMK31k5G9OVIAMLSIaP6w4FaGkaAkN6zaQO9LUvZ1t7VA==} engines: {node: '>=14.0'} + undici@5.28.4: + resolution: {integrity: sha512-72RFADWFqKmUb2hmmvNODKL3p9hcB6Gt2DOQMis1SEBaV6a4MH8soBvzg+95CYhCKPFedut2JY9bMfrDl9D23g==} + engines: {node: '>=14.0'} + unherit@1.1.3: resolution: {integrity: sha512-Ft16BJcnapDKp0+J/rqFC3Rrk6Y/Ng4nzsC028k2jdDII/rdZ7Wd3pPT/6+vIIxRagwRc9K0IUX0Ra4fKvw+WQ==} @@ -6905,6 +7039,10 @@ packages: resolution: {integrity: sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==} engines: {node: '>= 4.0.0'} + universalify@0.2.0: + resolution: {integrity: sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==} + engines: {node: '>= 4.0.0'} + unset-value@1.0.0: resolution: {integrity: sha512-PcA2tsuGSF9cnySLHTLSh2qrQiJ70mn+r+Glzxv2TWZblxsxCC52BDlZoPCsz7STd9pN7EZetkWZBAvk4cgZdQ==} engines: {node: '>=0.10.0'} @@ -6915,8 +7053,8 @@ packages: peerDependencies: browserslist: '>= 4.21.0' - update-browserslist-db@1.1.0: - resolution: {integrity: sha512-EdRAaAyk2cUE1wOf2DkEhzxqOQvFOoRJFNS6NeyJ01Gp2beMRpBAINjM2iDXE3KCuKhwnvHIQCJm6ThL2Z+HzQ==} + update-browserslist-db@1.1.1: + resolution: {integrity: sha512-R8UzCaa9Az+38REPiJ1tXlImTJXlVfgHZsglwBD/k6nj76ctsH1E3q4doGrukiLQd3sGQYu56r5+lo5r94l29A==} hasBin: true peerDependencies: browserslist: '>= 4.21.0' @@ -6928,6 +7066,9 @@ packages: resolution: {integrity: sha512-Am1ousAhSLBeB9cG/7k7r2R0zj50uDRlZHPGbazid5s9rlF1F/QKYObEKSIunSjIOkJZqwRRLpvewjEkM7pSqg==} deprecated: Please see https://github.com/lydell/urix#deprecated + url-parse@1.5.10: + resolution: {integrity: sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==} + use-sync-external-store@1.2.2: resolution: {integrity: sha512-PElTlVMwpblvbNqQ82d2n6RjStvdSoNe9FG28kNfz3WiXilJm4DdNkEzRhCZuIDwY8U08WVihhGR5iRqAwfDiw==} peerDependencies: @@ -6940,10 +7081,6 @@ packages: util-deprecate@1.0.2: resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} - uuid@8.3.2: - resolution: {integrity: sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==} - hasBin: true - v8-compile-cache-lib@3.0.1: resolution: {integrity: sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==} @@ -6968,8 +7105,8 @@ packages: vfile@6.0.3: resolution: {integrity: sha512-KzIbH/9tXat2u30jf+smMwFCsno4wHVdNmzFyL+T/L3UGqqk6JKfVqOFOZEpZSHADH1k40ab6NUIXZq422ov3Q==} - vite@5.4.7: - resolution: {integrity: sha512-5l2zxqMEPVENgvzTuBpHer2awaetimj2BGkhBPdnwKbPNOlHsODU+oiazEZzLK7KhAnOrO+XGYJYn4ZlUhDtDQ==} + vite@5.4.8: + resolution: {integrity: sha512-FqrItQ4DT1NC4zCUqMB4c4AZORMKIa0m8/URVCZ77OZ/QSNeJ54bU1vrFADbDsuwfIPcgknRkmqakQcgnL4GiQ==} engines: {node: ^18.0.0 || >=20.0.0} hasBin: true peerDependencies: @@ -7104,8 +7241,8 @@ packages: resolution: {integrity: sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig==} engines: {node: '>=4'} - ws@8.17.0: - resolution: {integrity: sha512-uJq6108EgZMAl20KagGkzCKfMEjxmKvZHG7Tlq0Z6nOky7YF7aq4mOx6xK8TJ/i1LeK4Qus7INktacctDgY8Ow==} + ws@8.18.0: + resolution: {integrity: sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==} engines: {node: '>=10.0.0'} peerDependencies: bufferutil: ^4.0.1 @@ -7168,6 +7305,10 @@ packages: resolution: {integrity: sha512-b4JR1PFR10y1mKjhHY9LaGo6tmrgjit7hxVIeAmyMw3jegXR4dhYqLaQF5zMXZxY7tLpMyJeLjr1C4rLmkVe8g==} engines: {node: '>=12.20'} + yoctocolors-cjs@2.1.2: + resolution: {integrity: sha512-cYVsTjKl8b+FrnidjibDWskAv7UKOfcwaVZdp/it9n1s9fU3IkgDbhdIRKCW4JDsAlECJY0ytoVPT3sK6kideA==} + engines: {node: '>=18'} + yootils@0.3.1: resolution: {integrity: sha512-A7AMeJfGefk317I/3tBoUYRcDcNavKEkpiPN/nQsBz/viI2GvT7BtrqdPD6rGqBFN8Ax7v4obf+Cl32JF9DDVw==} @@ -7194,10 +7335,10 @@ packages: snapshots: - '@actions/core@1.10.1': + '@actions/core@1.11.1': dependencies: - '@actions/http-client': 2.2.1 - uuid: 8.3.2 + '@actions/exec': 1.1.1 + '@actions/http-client': 2.2.3 '@actions/exec@1.1.1': dependencies: @@ -7215,6 +7356,11 @@ snapshots: tunnel: 0.0.6 undici: 5.28.3 + '@actions/http-client@2.2.3': + dependencies: + tunnel: 0.0.6 + undici: 5.28.4 + '@actions/io@1.1.3': {} '@adobe/css-tools@4.3.3': {} @@ -7231,7 +7377,7 @@ snapshots: '@ant-design/cssinjs-utils@1.1.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: '@ant-design/cssinjs': 1.21.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@babel/runtime': 7.25.6 + '@babel/runtime': 7.25.7 rc-util: 5.43.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) react: 18.3.1 react-dom: 18.3.1(react@18.3.1) @@ -7250,7 +7396,7 @@ snapshots: '@ant-design/fast-color@2.0.6': dependencies: - '@babel/runtime': 7.25.6 + '@babel/runtime': 7.25.7 '@ant-design/icons-svg@4.4.2': {} @@ -7266,7 +7412,7 @@ snapshots: '@ant-design/react-slick@1.1.2(react@18.3.1)': dependencies: - '@babel/runtime': 7.25.6 + '@babel/runtime': 7.25.7 classnames: 2.5.1 json2mq: 0.2.0 react: 18.3.1 @@ -7278,20 +7424,25 @@ snapshots: '@babel/highlight': 7.24.7 picocolors: 1.1.0 - '@babel/compat-data@7.25.4': {} + '@babel/code-frame@7.25.7': + dependencies: + '@babel/highlight': 7.25.7 + picocolors: 1.1.0 - '@babel/core@7.25.2': + '@babel/compat-data@7.25.7': {} + + '@babel/core@7.25.7': dependencies: '@ampproject/remapping': 2.3.0 - '@babel/code-frame': 7.24.7 - '@babel/generator': 7.25.6 - '@babel/helper-compilation-targets': 7.25.2 - '@babel/helper-module-transforms': 7.25.2(@babel/core@7.25.2) - '@babel/helpers': 7.25.6 - '@babel/parser': 7.25.6 - '@babel/template': 7.25.0 - '@babel/traverse': 7.25.6 - '@babel/types': 7.25.6 + '@babel/code-frame': 7.25.7 + '@babel/generator': 7.25.7 + '@babel/helper-compilation-targets': 7.25.7 + '@babel/helper-module-transforms': 7.25.7(@babel/core@7.25.7) + '@babel/helpers': 7.25.7 + '@babel/parser': 7.25.7 + '@babel/template': 7.25.7 + '@babel/traverse': 7.25.7 + '@babel/types': 7.25.7 convert-source-map: 2.0.0 debug: 4.3.7 gensync: 1.0.0-beta.2 @@ -7300,55 +7451,59 @@ snapshots: transitivePeerDependencies: - supports-color - '@babel/generator@7.25.6': + '@babel/generator@7.25.7': dependencies: - '@babel/types': 7.25.6 + '@babel/types': 7.25.7 '@jridgewell/gen-mapping': 0.3.5 '@jridgewell/trace-mapping': 0.3.25 - jsesc: 2.5.2 + jsesc: 3.0.2 - '@babel/helper-compilation-targets@7.25.2': + '@babel/helper-compilation-targets@7.25.7': dependencies: - '@babel/compat-data': 7.25.4 - '@babel/helper-validator-option': 7.24.8 - browserslist: 4.23.3 + '@babel/compat-data': 7.25.7 + '@babel/helper-validator-option': 7.25.7 + browserslist: 4.24.0 lru-cache: 5.1.1 semver: 6.3.1 - '@babel/helper-module-imports@7.24.7': + '@babel/helper-module-imports@7.25.7': dependencies: - '@babel/traverse': 7.25.6 - '@babel/types': 7.25.6 + '@babel/traverse': 7.25.7 + '@babel/types': 7.25.7 transitivePeerDependencies: - supports-color - '@babel/helper-module-transforms@7.25.2(@babel/core@7.25.2)': + '@babel/helper-module-transforms@7.25.7(@babel/core@7.25.7)': dependencies: - '@babel/core': 7.25.2 - '@babel/helper-module-imports': 7.24.7 - '@babel/helper-simple-access': 7.24.7 - '@babel/helper-validator-identifier': 7.24.7 - '@babel/traverse': 7.25.6 + '@babel/core': 7.25.7 + '@babel/helper-module-imports': 7.25.7 + '@babel/helper-simple-access': 7.25.7 + '@babel/helper-validator-identifier': 7.25.7 + '@babel/traverse': 7.25.7 transitivePeerDependencies: - supports-color - '@babel/helper-simple-access@7.24.7': + '@babel/helper-simple-access@7.25.7': dependencies: - '@babel/traverse': 7.25.6 - '@babel/types': 7.25.6 + '@babel/traverse': 7.25.7 + '@babel/types': 7.25.7 transitivePeerDependencies: - supports-color '@babel/helper-string-parser@7.24.8': {} + '@babel/helper-string-parser@7.25.7': {} + '@babel/helper-validator-identifier@7.24.7': {} - '@babel/helper-validator-option@7.24.8': {} + '@babel/helper-validator-identifier@7.25.7': {} - '@babel/helpers@7.25.6': + '@babel/helper-validator-option@7.25.7': {} + + '@babel/helpers@7.25.7': dependencies: - '@babel/template': 7.25.0 - '@babel/types': 7.25.6 + '@babel/template': 7.25.7 + '@babel/types': 7.25.7 '@babel/highlight@7.24.7': dependencies: @@ -7357,31 +7512,42 @@ snapshots: js-tokens: 4.0.0 picocolors: 1.1.0 + '@babel/highlight@7.25.7': + dependencies: + '@babel/helper-validator-identifier': 7.25.7 + chalk: 2.4.2 + js-tokens: 4.0.0 + picocolors: 1.1.0 + '@babel/parser@7.23.5': dependencies: '@babel/types': 7.25.6 - '@babel/parser@7.25.6': + '@babel/parser@7.25.7': dependencies: - '@babel/types': 7.25.6 + '@babel/types': 7.25.7 '@babel/runtime@7.25.6': dependencies: regenerator-runtime: 0.14.1 - '@babel/template@7.25.0': + '@babel/runtime@7.25.7': dependencies: - '@babel/code-frame': 7.24.7 - '@babel/parser': 7.25.6 - '@babel/types': 7.25.6 + regenerator-runtime: 0.14.1 - '@babel/traverse@7.25.6': + '@babel/template@7.25.7': dependencies: - '@babel/code-frame': 7.24.7 - '@babel/generator': 7.25.6 - '@babel/parser': 7.25.6 - '@babel/template': 7.25.0 - '@babel/types': 7.25.6 + '@babel/code-frame': 7.25.7 + '@babel/parser': 7.25.7 + '@babel/types': 7.25.7 + + '@babel/traverse@7.25.7': + dependencies: + '@babel/code-frame': 7.25.7 + '@babel/generator': 7.25.7 + '@babel/parser': 7.25.7 + '@babel/template': 7.25.7 + '@babel/types': 7.25.7 debug: 4.3.7 globals: 11.12.0 transitivePeerDependencies: @@ -7393,6 +7559,12 @@ snapshots: '@babel/helper-validator-identifier': 7.24.7 to-fast-properties: 2.0.0 + '@babel/types@7.25.7': + dependencies: + '@babel/helper-string-parser': 7.25.7 + '@babel/helper-validator-identifier': 7.25.7 + to-fast-properties: 2.0.0 + '@bundled-es-modules/cookie@2.0.0': dependencies: cookie: 0.5.0 @@ -7401,6 +7573,11 @@ snapshots: dependencies: statuses: 2.0.1 + '@bundled-es-modules/tough-cookie@0.1.6': + dependencies: + '@types/tough-cookie': 4.0.5 + tough-cookie: 4.1.4 + '@changesets/apply-release-plan@7.0.5': dependencies: '@changesets/config': 3.0.3 @@ -7430,7 +7607,7 @@ snapshots: dependencies: '@changesets/types': 6.0.0 - '@changesets/cli@2.27.8': + '@changesets/cli@2.27.9': dependencies: '@changesets/apply-release-plan': 7.0.5 '@changesets/assemble-release-plan': 6.0.4 @@ -7447,16 +7624,14 @@ snapshots: '@changesets/types': 6.0.0 '@changesets/write': 0.3.2 '@manypkg/get-packages': 1.1.3 - '@types/semver': 7.5.8 ansi-colors: 4.1.3 ci-info: 3.9.0 enquirer: 2.4.1 external-editor: 3.1.0 fs-extra: 7.0.1 mri: 1.2.0 - outdent: 0.5.0 p-limit: 2.3.0 - package-manager-detector: 0.2.0 + package-manager-detector: 0.2.2 picocolors: 1.1.0 resolve-from: 5.0.0 semver: 7.6.3 @@ -7552,11 +7727,11 @@ snapshots: human-id: 1.0.2 prettier: 2.8.8 - '@commitlint/cli@19.5.0(@types/node@22.5.5)(typescript@5.6.2)': + '@commitlint/cli@19.5.0(@types/node@22.7.5)(typescript@5.6.3)': dependencies: '@commitlint/format': 19.5.0 '@commitlint/lint': 19.5.0 - '@commitlint/load': 19.5.0(@types/node@22.5.5)(typescript@5.6.2) + '@commitlint/load': 19.5.0(@types/node@22.7.5)(typescript@5.6.3) '@commitlint/read': 19.5.0 '@commitlint/types': 19.5.0 tinyexec: 0.3.0 @@ -7603,15 +7778,15 @@ snapshots: '@commitlint/rules': 19.5.0 '@commitlint/types': 19.5.0 - '@commitlint/load@19.5.0(@types/node@22.5.5)(typescript@5.6.2)': + '@commitlint/load@19.5.0(@types/node@22.7.5)(typescript@5.6.3)': dependencies: '@commitlint/config-validator': 19.5.0 '@commitlint/execute-rule': 19.5.0 '@commitlint/resolve-extends': 19.5.0 '@commitlint/types': 19.5.0 chalk: 5.3.0 - cosmiconfig: 9.0.0(typescript@5.6.2) - cosmiconfig-typescript-loader: 5.0.0(@types/node@22.5.5)(cosmiconfig@9.0.0(typescript@5.6.2))(typescript@5.6.2) + cosmiconfig: 9.0.0(typescript@5.6.3) + cosmiconfig-typescript-loader: 5.0.0(@types/node@22.7.5)(cosmiconfig@9.0.0(typescript@5.6.3))(typescript@5.6.3) lodash.isplainobject: 4.0.6 lodash.merge: 4.6.2 lodash.uniq: 4.5.0 @@ -7902,14 +8077,16 @@ snapshots: '@esbuild/win32-x64@0.23.1': optional: true - '@eslint-community/eslint-utils@4.4.0(eslint@9.11.0(jiti@1.21.6))': + '@eslint-community/eslint-utils@4.4.0(eslint@9.12.0(jiti@2.3.3))': dependencies: - eslint: 9.11.0(jiti@1.21.6) + eslint: 9.12.0(jiti@2.3.3) eslint-visitor-keys: 3.4.3 '@eslint-community/regexpp@4.11.1': {} - '@eslint/compat@1.1.1': {} + '@eslint/compat@1.2.0(eslint@9.12.0(jiti@2.3.3))': + optionalDependencies: + eslint: 9.12.0(jiti@2.3.3) '@eslint/config-array@0.18.0': dependencies: @@ -7919,11 +8096,13 @@ snapshots: transitivePeerDependencies: - supports-color + '@eslint/core@0.6.0': {} + '@eslint/eslintrc@3.1.0': dependencies: ajv: 6.12.6 debug: 4.3.7 - espree: 10.1.0 + espree: 10.2.0 globals: 14.0.0 ignore: 5.3.2 import-fresh: 3.3.0 @@ -7933,7 +8112,7 @@ snapshots: transitivePeerDependencies: - supports-color - '@eslint/js@9.11.0': {} + '@eslint/js@9.12.0': {} '@eslint/object-schema@2.1.4': {} @@ -8006,24 +8185,24 @@ snapshots: '@gradio/button@0.2.43(svelte@4.2.19)': dependencies: - '@gradio/client': 1.5.2 + '@gradio/client': 1.6.0 '@gradio/upload': 0.11.2(svelte@4.2.19) '@gradio/utils': 0.4.2(svelte@4.2.19) transitivePeerDependencies: - svelte - utf-8-validate - '@gradio/client@1.5.2': + '@gradio/client@1.6.0': dependencies: '@types/eventsource': 1.1.15 bufferutil: 4.0.8 eventsource: 2.0.2 fetch-event-stream: 0.1.5 - msw: 2.3.1(typescript@5.6.2) + msw: 2.4.9(typescript@5.6.3) semiver: 1.1.0 textlinestream: 1.1.1 - typescript: 5.6.2 - ws: 8.17.0(bufferutil@4.0.8) + typescript: 5.6.3 + ws: 8.18.0(bufferutil@4.0.8) transitivePeerDependencies: - utf-8-validate @@ -8033,25 +8212,27 @@ snapshots: dependencies: svelte: 4.2.19 - '@gradio/preview@0.10.1(@babel/core@7.25.2)(@types/node@18.19.50)(less@4.2.0)(postcss-load-config@3.1.4(postcss@8.4.47)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@18.19.50)(typescript@5.5.4)))(postcss@8.4.47)(rollup@4.22.4)(svelte@4.2.19)': + '@gradio/preview@0.12.0(@babel/core@7.25.7)(@types/node@18.19.55)(less@4.2.0)(postcss-load-config@3.1.4(postcss@8.4.47)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@18.19.55)(typescript@5.5.4)))(postcss@8.4.47)(rollup@4.24.0)': dependencies: '@originjs/vite-plugin-commonjs': 1.0.3 - '@rollup/plugin-sucrase': 5.0.2(rollup@4.22.4) - '@sveltejs/vite-plugin-svelte': 3.1.1(svelte@4.2.19)(vite@5.4.7(@types/node@18.19.50)(less@4.2.0)(lightningcss@1.27.0)(sass@1.78.0)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.47))) + '@rollup/plugin-sucrase': 5.0.2(rollup@4.24.0) + '@sveltejs/vite-plugin-svelte': 3.1.2(svelte@4.2.19)(vite@5.4.8(@types/node@18.19.55)(less@4.2.0)(lightningcss@1.27.0)(sass@1.79.4)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.47))) '@types/which': 3.0.4 coffeescript: 2.7.0 lightningcss: 1.27.0 pug: 3.0.3 - sass: 1.78.0 + sass: 1.79.4 stylus: 0.63.0 sucrase: 3.35.0 sugarss: 4.0.1(postcss@8.4.47) svelte-hmr: 0.16.0(svelte@4.2.19) - svelte-preprocess: 5.1.4(@babel/core@7.25.2)(coffeescript@2.7.0)(less@4.2.0)(postcss-load-config@3.1.4(postcss@8.4.47)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@18.19.50)(typescript@5.5.4)))(postcss@8.4.47)(pug@3.0.3)(sass@1.78.0)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.47))(svelte@4.2.19)(typescript@5.6.2) - typescript: 5.6.2 - vite: 5.4.7(@types/node@18.19.50)(less@4.2.0)(lightningcss@1.27.0)(sass@1.78.0)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.47)) + svelte-preprocess: 5.1.4(@babel/core@7.25.7)(coffeescript@2.7.0)(less@4.2.0)(postcss-load-config@3.1.4(postcss@8.4.47)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@18.19.55)(typescript@5.5.4)))(postcss@8.4.47)(pug@3.0.3)(sass@1.79.4)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.47))(svelte@4.2.19)(typescript@5.6.3) + typescript: 5.6.3 + vite: 5.4.8(@types/node@18.19.55)(less@4.2.0)(lightningcss@1.27.0)(sass@1.79.4)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.47)) which: 4.0.0 yootils: 0.3.1 + optionalDependencies: + svelte: 4.2.19 transitivePeerDependencies: - '@babel/core' - '@types/node' @@ -8061,7 +8242,6 @@ snapshots: - rollup - sass-embedded - supports-color - - svelte - terser '@gradio/statustracker@0.7.6(svelte@4.2.19)': @@ -8077,10 +8257,14 @@ snapshots: dependencies: svelte: 4.2.19 + '@gradio/theme@0.3.0(svelte@4.2.19)': + dependencies: + svelte: 4.2.19 + '@gradio/upload@0.11.2(svelte@4.2.19)': dependencies: '@gradio/atoms': 0.7.4(svelte@4.2.19) - '@gradio/client': 1.5.2 + '@gradio/client': 1.6.0 '@gradio/icons': 0.4.1 '@gradio/utils': 0.4.2(svelte@4.2.19) '@gradio/wasm': 0.10.1 @@ -8102,39 +8286,58 @@ snapshots: transitivePeerDependencies: - svelte + '@gradio/utils@0.7.0(svelte@4.2.19)': + dependencies: + '@gradio/theme': 0.3.0(svelte@4.2.19) + svelte-i18n: 3.7.4(svelte@4.2.19) + transitivePeerDependencies: + - svelte + '@gradio/wasm@0.10.1': dependencies: - '@types/path-browserify': 1.0.2 + '@types/path-browserify': 1.0.3 path-browserify: 1.0.1 + '@humanfs/core@0.19.0': {} + + '@humanfs/node@0.16.5': + dependencies: + '@humanfs/core': 0.19.0 + '@humanwhocodes/retry': 0.3.1 + '@humanwhocodes/module-importer@1.0.1': {} - '@humanwhocodes/retry@0.3.0': {} + '@humanwhocodes/retry@0.3.1': {} - '@inquirer/confirm@3.1.9': + '@inquirer/confirm@3.2.0': dependencies: - '@inquirer/core': 8.2.2 - '@inquirer/type': 1.3.3 + '@inquirer/core': 9.2.1 + '@inquirer/type': 1.5.5 - '@inquirer/core@8.2.2': + '@inquirer/core@9.2.1': dependencies: - '@inquirer/figures': 1.0.3 - '@inquirer/type': 1.3.3 + '@inquirer/figures': 1.0.7 + '@inquirer/type': 2.0.0 '@types/mute-stream': 0.0.4 - '@types/node': 20.16.5 + '@types/node': 22.7.5 '@types/wrap-ansi': 3.0.0 ansi-escapes: 4.3.2 - chalk: 4.1.2 - cli-spinners: 2.9.2 cli-width: 4.1.0 mute-stream: 1.0.0 signal-exit: 4.1.0 strip-ansi: 6.0.1 wrap-ansi: 6.2.0 + yoctocolors-cjs: 2.1.2 - '@inquirer/figures@1.0.3': {} + '@inquirer/figures@1.0.7': {} + + '@inquirer/type@1.5.5': + dependencies: + mute-stream: 1.0.0 - '@inquirer/type@1.3.3': {} + '@inquirer/type@2.0.0': + dependencies: + mute-stream: 1.0.0 '@isaacs/cliui@8.0.2': dependencies: @@ -8171,7 +8374,7 @@ snapshots: '@manypkg/find-root@1.1.0': dependencies: - '@babel/runtime': 7.25.6 + '@babel/runtime': 7.25.7 '@types/node': 12.20.55 find-up: 4.1.0 fs-extra: 8.1.0 @@ -8182,7 +8385,7 @@ snapshots: '@manypkg/get-packages@1.1.3': dependencies: - '@babel/runtime': 7.25.6 + '@babel/runtime': 7.25.7 '@changesets/types': 4.1.0 '@manypkg/find-root': 1.1.0 fs-extra: 8.1.0 @@ -8216,24 +8419,24 @@ snapshots: - supports-color optional: true - '@microsoft/api-extractor-model@7.29.8(@types/node@22.5.5)': + '@microsoft/api-extractor-model@7.29.8(@types/node@22.7.5)': dependencies: '@microsoft/tsdoc': 0.15.0 '@microsoft/tsdoc-config': 0.17.0 - '@rushstack/node-core-library': 5.9.0(@types/node@22.5.5) + '@rushstack/node-core-library': 5.9.0(@types/node@22.7.5) transitivePeerDependencies: - '@types/node' optional: true - '@microsoft/api-extractor@7.47.9(@types/node@22.5.5)': + '@microsoft/api-extractor@7.47.9(@types/node@22.7.5)': dependencies: - '@microsoft/api-extractor-model': 7.29.8(@types/node@22.5.5) + '@microsoft/api-extractor-model': 7.29.8(@types/node@22.7.5) '@microsoft/tsdoc': 0.15.0 '@microsoft/tsdoc-config': 0.17.0 - '@rushstack/node-core-library': 5.9.0(@types/node@22.5.5) + '@rushstack/node-core-library': 5.9.0(@types/node@22.7.5) '@rushstack/rig-package': 0.5.3 - '@rushstack/terminal': 0.14.2(@types/node@22.5.5) - '@rushstack/ts-command-line': 4.22.8(@types/node@22.5.5) + '@rushstack/terminal': 0.14.2(@types/node@22.7.5) + '@rushstack/ts-command-line': 4.22.8(@types/node@22.7.5) lodash: 4.17.21 minimatch: 3.0.8 resolve: 1.22.8 @@ -8260,15 +8463,13 @@ snapshots: call-me-maybe: 1.0.2 glob-to-regexp: 0.3.0 - '@mswjs/cookies@1.1.0': {} - - '@mswjs/interceptors@0.29.1': + '@mswjs/interceptors@0.35.9': dependencies: '@open-draft/deferred-promise': 2.2.0 '@open-draft/logger': 0.3.0 '@open-draft/until': 2.1.0 is-node-process: 1.2.0 - outvariant: 1.4.2 + outvariant: 1.4.3 strict-event-emitter: 0.5.1 '@nodelib/fs.scandir@2.1.5': @@ -8344,7 +8545,7 @@ snapshots: '@open-draft/logger@0.3.0': dependencies: is-node-process: 1.2.0 - outvariant: 1.4.2 + outvariant: 1.4.3 '@open-draft/until@2.1.0': {} @@ -8359,12 +8560,12 @@ snapshots: '@rc-component/async-validator@5.0.4': dependencies: - '@babel/runtime': 7.25.6 + '@babel/runtime': 7.25.7 '@rc-component/color-picker@2.0.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: '@ant-design/fast-color': 2.0.6 - '@babel/runtime': 7.25.6 + '@babel/runtime': 7.25.7 classnames: 2.5.1 rc-util: 5.43.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) react: 18.3.1 @@ -8372,18 +8573,18 @@ snapshots: '@rc-component/context@1.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: - '@babel/runtime': 7.25.6 + '@babel/runtime': 7.25.7 rc-util: 5.43.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) react: 18.3.1 react-dom: 18.3.1(react@18.3.1) '@rc-component/mini-decimal@1.1.0': dependencies: - '@babel/runtime': 7.25.6 + '@babel/runtime': 7.25.7 '@rc-component/mutate-observer@1.1.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: - '@babel/runtime': 7.25.6 + '@babel/runtime': 7.25.7 classnames: 2.5.1 rc-util: 5.43.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) react: 18.3.1 @@ -8391,7 +8592,7 @@ snapshots: '@rc-component/portal@1.1.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: - '@babel/runtime': 7.25.6 + '@babel/runtime': 7.25.7 classnames: 2.5.1 rc-util: 5.43.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) react: 18.3.1 @@ -8399,7 +8600,7 @@ snapshots: '@rc-component/qrcode@1.0.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: - '@babel/runtime': 7.25.6 + '@babel/runtime': 7.25.7 classnames: 2.5.1 rc-util: 5.43.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) react: 18.3.1 @@ -8407,7 +8608,7 @@ snapshots: '@rc-component/tour@1.15.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: - '@babel/runtime': 7.25.6 + '@babel/runtime': 7.25.7 '@rc-component/portal': 1.1.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@rc-component/trigger': 2.2.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1) classnames: 2.5.1 @@ -8417,7 +8618,7 @@ snapshots: '@rc-component/trigger@2.2.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: - '@babel/runtime': 7.25.6 + '@babel/runtime': 7.25.7 '@rc-component/portal': 1.1.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1) classnames: 2.5.1 rc-motion: 2.9.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1) @@ -8426,72 +8627,120 @@ snapshots: react: 18.3.1 react-dom: 18.3.1(react@18.3.1) - '@rollup/plugin-sucrase@5.0.2(rollup@4.22.4)': + '@rollup/plugin-sucrase@5.0.2(rollup@4.24.0)': dependencies: - '@rollup/pluginutils': 5.1.0(rollup@4.22.4) + '@rollup/pluginutils': 5.1.2(rollup@4.24.0) sucrase: 3.35.0 optionalDependencies: - rollup: 4.22.4 + rollup: 4.24.0 - '@rollup/pluginutils@5.1.0(rollup@4.22.4)': + '@rollup/pluginutils@5.1.2(rollup@4.24.0)': dependencies: - '@types/estree': 1.0.5 + '@types/estree': 1.0.6 estree-walker: 2.0.2 picomatch: 2.3.1 optionalDependencies: - rollup: 4.22.4 + rollup: 4.24.0 '@rollup/rollup-android-arm-eabi@4.22.4': optional: true + '@rollup/rollup-android-arm-eabi@4.24.0': + optional: true + '@rollup/rollup-android-arm64@4.22.4': optional: true + '@rollup/rollup-android-arm64@4.24.0': + optional: true + '@rollup/rollup-darwin-arm64@4.22.4': optional: true + '@rollup/rollup-darwin-arm64@4.24.0': + optional: true + '@rollup/rollup-darwin-x64@4.22.4': optional: true + '@rollup/rollup-darwin-x64@4.24.0': + optional: true + '@rollup/rollup-linux-arm-gnueabihf@4.22.4': optional: true + '@rollup/rollup-linux-arm-gnueabihf@4.24.0': + optional: true + '@rollup/rollup-linux-arm-musleabihf@4.22.4': optional: true + '@rollup/rollup-linux-arm-musleabihf@4.24.0': + optional: true + '@rollup/rollup-linux-arm64-gnu@4.22.4': optional: true + '@rollup/rollup-linux-arm64-gnu@4.24.0': + optional: true + '@rollup/rollup-linux-arm64-musl@4.22.4': optional: true + '@rollup/rollup-linux-arm64-musl@4.24.0': + optional: true + '@rollup/rollup-linux-powerpc64le-gnu@4.22.4': optional: true + '@rollup/rollup-linux-powerpc64le-gnu@4.24.0': + optional: true + '@rollup/rollup-linux-riscv64-gnu@4.22.4': optional: true + '@rollup/rollup-linux-riscv64-gnu@4.24.0': + optional: true + '@rollup/rollup-linux-s390x-gnu@4.22.4': optional: true + '@rollup/rollup-linux-s390x-gnu@4.24.0': + optional: true + '@rollup/rollup-linux-x64-gnu@4.22.4': optional: true + '@rollup/rollup-linux-x64-gnu@4.24.0': + optional: true + '@rollup/rollup-linux-x64-musl@4.22.4': optional: true + '@rollup/rollup-linux-x64-musl@4.24.0': + optional: true + '@rollup/rollup-win32-arm64-msvc@4.22.4': optional: true + '@rollup/rollup-win32-arm64-msvc@4.24.0': + optional: true + '@rollup/rollup-win32-ia32-msvc@4.22.4': optional: true + '@rollup/rollup-win32-ia32-msvc@4.24.0': + optional: true + '@rollup/rollup-win32-x64-msvc@4.22.4': optional: true + '@rollup/rollup-win32-x64-msvc@4.24.0': + optional: true + '@rtsao/scc@1.1.0': {} - '@rushstack/node-core-library@5.9.0(@types/node@22.5.5)': + '@rushstack/node-core-library@5.9.0(@types/node@22.7.5)': dependencies: ajv: 8.13.0 ajv-draft-04: 1.0.0(ajv@8.13.0) @@ -8502,7 +8751,7 @@ snapshots: resolve: 1.22.8 semver: 7.5.4 optionalDependencies: - '@types/node': 22.5.5 + '@types/node': 22.7.5 optional: true '@rushstack/rig-package@0.5.3': @@ -8511,17 +8760,17 @@ snapshots: strip-json-comments: 3.1.1 optional: true - '@rushstack/terminal@0.14.2(@types/node@22.5.5)': + '@rushstack/terminal@0.14.2(@types/node@22.7.5)': dependencies: - '@rushstack/node-core-library': 5.9.0(@types/node@22.5.5) + '@rushstack/node-core-library': 5.9.0(@types/node@22.7.5) supports-color: 8.1.1 optionalDependencies: - '@types/node': 22.5.5 + '@types/node': 22.7.5 optional: true - '@rushstack/ts-command-line@4.22.8(@types/node@22.5.5)': + '@rushstack/ts-command-line@4.22.8(@types/node@22.7.5)': dependencies: - '@rushstack/terminal': 0.14.2(@types/node@22.5.5) + '@rushstack/terminal': 0.14.2(@types/node@22.7.5) '@types/argparse': 1.0.38 argparse: 1.0.10 string-argv: 0.3.2 @@ -8529,132 +8778,86 @@ snapshots: - '@types/node' optional: true - '@subscribe-kit/core@2.1.1(typescript@5.6.2)': + '@subscribe-kit/core@2.1.1(typescript@5.6.3)': dependencies: '@babel/runtime': 7.25.6 - '@subscribe-kit/shared': 2.1.1(typescript@5.6.2) + '@subscribe-kit/shared': 2.1.1(typescript@5.6.3) immer: 10.1.1 - types-kit: 0.0.11(typescript@5.6.2) + types-kit: 0.0.11(typescript@5.6.3) transitivePeerDependencies: - typescript - '@subscribe-kit/react@2.1.1(@subscribe-kit/core@2.1.1(typescript@5.6.2))(react@18.3.1)(typescript@5.6.2)': + '@subscribe-kit/react@2.1.1(@subscribe-kit/core@2.1.1(typescript@5.6.3))(react@18.3.1)(typescript@5.6.3)': dependencies: '@babel/runtime': 7.25.6 - '@subscribe-kit/core': 2.1.1(typescript@5.6.2) - '@subscribe-kit/shared': 2.1.1(typescript@5.6.2) + '@subscribe-kit/core': 2.1.1(typescript@5.6.3) + '@subscribe-kit/shared': 2.1.1(typescript@5.6.3) lodash: 4.17.21 react: 18.3.1 use-sync-external-store: 1.2.2(react@18.3.1) transitivePeerDependencies: - typescript - '@subscribe-kit/shared@2.1.1(typescript@5.6.2)': + '@subscribe-kit/shared@2.1.1(typescript@5.6.3)': dependencies: '@babel/runtime': 7.25.6 - types-kit: 0.0.11(typescript@5.6.2) + types-kit: 0.0.11(typescript@5.6.3) transitivePeerDependencies: - typescript - '@sveltejs/vite-plugin-svelte-inspector@2.1.0(@sveltejs/vite-plugin-svelte@3.1.1(svelte@4.2.19)(vite@5.4.7(@types/node@18.19.50)(less@4.2.0)(lightningcss@1.27.0)(sass@1.78.0)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.47))))(svelte@4.2.19)(vite@5.4.7(@types/node@18.19.50)(less@4.2.0)(lightningcss@1.27.0)(sass@1.78.0)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.47)))': + '@sveltejs/vite-plugin-svelte-inspector@2.1.0(@sveltejs/vite-plugin-svelte@3.1.2(svelte@4.2.19)(vite@5.4.8(@types/node@18.19.55)(less@4.2.0)(lightningcss@1.27.0)(sass@1.79.4)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.47))))(svelte@4.2.19)(vite@5.4.8(@types/node@18.19.55)(less@4.2.0)(lightningcss@1.27.0)(sass@1.79.4)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.47)))': dependencies: - '@sveltejs/vite-plugin-svelte': 3.1.1(svelte@4.2.19)(vite@5.4.7(@types/node@18.19.50)(less@4.2.0)(lightningcss@1.27.0)(sass@1.78.0)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.47))) + '@sveltejs/vite-plugin-svelte': 3.1.2(svelte@4.2.19)(vite@5.4.8(@types/node@18.19.55)(less@4.2.0)(lightningcss@1.27.0)(sass@1.79.4)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.47))) debug: 4.3.7 svelte: 4.2.19 - vite: 5.4.7(@types/node@18.19.50)(less@4.2.0)(lightningcss@1.27.0)(sass@1.78.0)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.47)) + vite: 5.4.8(@types/node@18.19.55)(less@4.2.0)(lightningcss@1.27.0)(sass@1.79.4)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.47)) transitivePeerDependencies: - supports-color - '@sveltejs/vite-plugin-svelte@3.1.1(svelte@4.2.19)(vite@5.4.7(@types/node@18.19.50)(less@4.2.0)(lightningcss@1.27.0)(sass@1.78.0)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.47)))': + '@sveltejs/vite-plugin-svelte@3.1.2(svelte@4.2.19)(vite@5.4.8(@types/node@18.19.55)(less@4.2.0)(lightningcss@1.27.0)(sass@1.79.4)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.47)))': dependencies: - '@sveltejs/vite-plugin-svelte-inspector': 2.1.0(@sveltejs/vite-plugin-svelte@3.1.1(svelte@4.2.19)(vite@5.4.7(@types/node@18.19.50)(less@4.2.0)(lightningcss@1.27.0)(sass@1.78.0)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.47))))(svelte@4.2.19)(vite@5.4.7(@types/node@18.19.50)(less@4.2.0)(lightningcss@1.27.0)(sass@1.78.0)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.47))) + '@sveltejs/vite-plugin-svelte-inspector': 2.1.0(@sveltejs/vite-plugin-svelte@3.1.2(svelte@4.2.19)(vite@5.4.8(@types/node@18.19.55)(less@4.2.0)(lightningcss@1.27.0)(sass@1.79.4)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.47))))(svelte@4.2.19)(vite@5.4.8(@types/node@18.19.55)(less@4.2.0)(lightningcss@1.27.0)(sass@1.79.4)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.47))) debug: 4.3.7 deepmerge: 4.3.1 kleur: 4.1.5 - magic-string: 0.30.10 + magic-string: 0.30.11 svelte: 4.2.19 svelte-hmr: 0.16.0(svelte@4.2.19) - vite: 5.4.7(@types/node@18.19.50)(less@4.2.0)(lightningcss@1.27.0)(sass@1.78.0)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.47)) - vitefu: 0.2.5(vite@5.4.7(@types/node@18.19.50)(less@4.2.0)(lightningcss@1.27.0)(sass@1.78.0)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.47))) + vite: 5.4.8(@types/node@18.19.55)(less@4.2.0)(lightningcss@1.27.0)(sass@1.79.4)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.47)) + vitefu: 0.2.5(vite@5.4.8(@types/node@18.19.55)(less@4.2.0)(lightningcss@1.27.0)(sass@1.79.4)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.47))) transitivePeerDependencies: - supports-color - '@swc/core-darwin-arm64@1.5.29': - optional: true - '@swc/core-darwin-arm64@1.7.26': optional: true - '@swc/core-darwin-x64@1.5.29': - optional: true - '@swc/core-darwin-x64@1.7.26': optional: true - '@swc/core-linux-arm-gnueabihf@1.5.29': - optional: true - '@swc/core-linux-arm-gnueabihf@1.7.26': optional: true - '@swc/core-linux-arm64-gnu@1.5.29': - optional: true - '@swc/core-linux-arm64-gnu@1.7.26': optional: true - '@swc/core-linux-arm64-musl@1.5.29': - optional: true - '@swc/core-linux-arm64-musl@1.7.26': optional: true - '@swc/core-linux-x64-gnu@1.5.29': - optional: true - '@swc/core-linux-x64-gnu@1.7.26': optional: true - '@swc/core-linux-x64-musl@1.5.29': - optional: true - '@swc/core-linux-x64-musl@1.7.26': optional: true - '@swc/core-win32-arm64-msvc@1.5.29': - optional: true - '@swc/core-win32-arm64-msvc@1.7.26': optional: true - '@swc/core-win32-ia32-msvc@1.5.29': - optional: true - '@swc/core-win32-ia32-msvc@1.7.26': optional: true - '@swc/core-win32-x64-msvc@1.5.29': - optional: true - '@swc/core-win32-x64-msvc@1.7.26': optional: true - '@swc/core@1.5.29': - dependencies: - '@swc/counter': 0.1.3 - '@swc/types': 0.1.8 - optionalDependencies: - '@swc/core-darwin-arm64': 1.5.29 - '@swc/core-darwin-x64': 1.5.29 - '@swc/core-linux-arm-gnueabihf': 1.5.29 - '@swc/core-linux-arm64-gnu': 1.5.29 - '@swc/core-linux-arm64-musl': 1.5.29 - '@swc/core-linux-x64-gnu': 1.5.29 - '@swc/core-linux-x64-musl': 1.5.29 - '@swc/core-win32-arm64-msvc': 1.5.29 - '@swc/core-win32-ia32-msvc': 1.5.29 - '@swc/core-win32-x64-msvc': 1.5.29 - '@swc/core@1.7.26': dependencies: '@swc/counter': 0.1.3 @@ -8670,18 +8873,12 @@ snapshots: '@swc/core-win32-arm64-msvc': 1.7.26 '@swc/core-win32-ia32-msvc': 1.7.26 '@swc/core-win32-x64-msvc': 1.7.26 - optional: true '@swc/counter@0.1.3': {} '@swc/types@0.1.12': dependencies: '@swc/counter': 0.1.3 - optional: true - - '@swc/types@0.1.8': - dependencies: - '@swc/counter': 0.1.3 '@tsconfig/node10@1.0.11': {} @@ -8717,7 +8914,7 @@ snapshots: '@types/conventional-commits-parser@5.0.0': dependencies: - '@types/node': 22.5.5 + '@types/node': 22.7.5 '@types/cookie@0.6.0': {} @@ -8725,22 +8922,22 @@ snapshots: '@types/d3-drag@3.0.7': dependencies: - '@types/d3-selection': 3.0.10 + '@types/d3-selection': 3.0.11 '@types/d3-interpolate@3.0.4': dependencies: '@types/d3-color': 3.1.3 - '@types/d3-selection@3.0.10': {} + '@types/d3-selection@3.0.11': {} - '@types/d3-transition@3.0.8': + '@types/d3-transition@3.0.9': dependencies: - '@types/d3-selection': 3.0.10 + '@types/d3-selection': 3.0.11 '@types/d3-zoom@3.0.8': dependencies: '@types/d3-interpolate': 3.0.4 - '@types/d3-selection': 3.0.10 + '@types/d3-selection': 3.0.11 '@types/debug@4.1.12': dependencies: @@ -8765,12 +8962,14 @@ snapshots: '@types/estree@1.0.5': {} + '@types/estree@1.0.6': {} + '@types/eventsource@1.1.15': {} '@types/glob@7.2.0': dependencies: '@types/minimatch': 5.1.2 - '@types/node': 22.5.5 + '@types/node': 22.7.5 '@types/hast@2.3.9': dependencies: @@ -8802,23 +9001,19 @@ snapshots: '@types/mute-stream@0.0.4': dependencies: - '@types/node': 20.16.5 + '@types/node': 22.7.5 '@types/node@12.20.55': {} - '@types/node@18.19.50': + '@types/node@18.19.55': dependencies: undici-types: 5.26.5 - '@types/node@20.16.5': + '@types/node@22.7.5': dependencies: undici-types: 6.19.8 - '@types/node@22.5.5': - dependencies: - undici-types: 6.19.8 - - '@types/path-browserify@1.0.2': {} + '@types/path-browserify@1.0.3': {} '@types/prop-types@15.7.13': {} @@ -8826,21 +9021,21 @@ snapshots: '@types/react-dom@18.3.0': dependencies: - '@types/react': 18.3.8 + '@types/react': 18.3.11 '@types/react-syntax-highlighter@15.5.13': dependencies: - '@types/react': 18.3.8 + '@types/react': 18.3.11 - '@types/react@18.3.8': + '@types/react@18.3.11': dependencies: '@types/prop-types': 15.7.13 csstype: 3.1.3 - '@types/semver@7.5.8': {} - '@types/statuses@2.0.5': {} + '@types/tough-cookie@4.0.5': {} + '@types/trusted-types@2.0.7': {} '@types/unist@2.0.10': {} @@ -8853,7 +9048,7 @@ snapshots: '@types/vfile@3.0.2': dependencies: - '@types/node': 22.5.5 + '@types/node': 22.7.5 '@types/unist': 3.0.3 '@types/vfile-message': 2.0.0 @@ -8861,112 +9056,112 @@ snapshots: '@types/wrap-ansi@3.0.0': {} - '@typescript-eslint/eslint-plugin@8.6.0(@typescript-eslint/parser@8.6.0(eslint@9.11.0(jiti@1.21.6))(typescript@5.6.2))(eslint@9.11.0(jiti@1.21.6))(typescript@5.6.2)': + '@typescript-eslint/eslint-plugin@8.8.1(@typescript-eslint/parser@8.8.1(eslint@9.12.0(jiti@2.3.3))(typescript@5.6.3))(eslint@9.12.0(jiti@2.3.3))(typescript@5.6.3)': dependencies: '@eslint-community/regexpp': 4.11.1 - '@typescript-eslint/parser': 8.6.0(eslint@9.11.0(jiti@1.21.6))(typescript@5.6.2) - '@typescript-eslint/scope-manager': 8.6.0 - '@typescript-eslint/type-utils': 8.6.0(eslint@9.11.0(jiti@1.21.6))(typescript@5.6.2) - '@typescript-eslint/utils': 8.6.0(eslint@9.11.0(jiti@1.21.6))(typescript@5.6.2) - '@typescript-eslint/visitor-keys': 8.6.0 - eslint: 9.11.0(jiti@1.21.6) + '@typescript-eslint/parser': 8.8.1(eslint@9.12.0(jiti@2.3.3))(typescript@5.6.3) + '@typescript-eslint/scope-manager': 8.8.1 + '@typescript-eslint/type-utils': 8.8.1(eslint@9.12.0(jiti@2.3.3))(typescript@5.6.3) + '@typescript-eslint/utils': 8.8.1(eslint@9.12.0(jiti@2.3.3))(typescript@5.6.3) + '@typescript-eslint/visitor-keys': 8.8.1 + eslint: 9.12.0(jiti@2.3.3) graphemer: 1.4.0 ignore: 5.3.2 natural-compare: 1.4.0 - ts-api-utils: 1.3.0(typescript@5.6.2) + ts-api-utils: 1.3.0(typescript@5.6.3) optionalDependencies: - typescript: 5.6.2 + typescript: 5.6.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@8.6.0(eslint@9.11.0(jiti@1.21.6))(typescript@5.6.2)': + '@typescript-eslint/parser@8.8.1(eslint@9.12.0(jiti@2.3.3))(typescript@5.6.3)': dependencies: - '@typescript-eslint/scope-manager': 8.6.0 - '@typescript-eslint/types': 8.6.0 - '@typescript-eslint/typescript-estree': 8.6.0(typescript@5.6.2) - '@typescript-eslint/visitor-keys': 8.6.0 + '@typescript-eslint/scope-manager': 8.8.1 + '@typescript-eslint/types': 8.8.1 + '@typescript-eslint/typescript-estree': 8.8.1(typescript@5.6.3) + '@typescript-eslint/visitor-keys': 8.8.1 debug: 4.3.7 - eslint: 9.11.0(jiti@1.21.6) + eslint: 9.12.0(jiti@2.3.3) optionalDependencies: - typescript: 5.6.2 + typescript: 5.6.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/scope-manager@8.6.0': + '@typescript-eslint/scope-manager@8.8.1': dependencies: - '@typescript-eslint/types': 8.6.0 - '@typescript-eslint/visitor-keys': 8.6.0 + '@typescript-eslint/types': 8.8.1 + '@typescript-eslint/visitor-keys': 8.8.1 - '@typescript-eslint/type-utils@8.6.0(eslint@9.11.0(jiti@1.21.6))(typescript@5.6.2)': + '@typescript-eslint/type-utils@8.8.1(eslint@9.12.0(jiti@2.3.3))(typescript@5.6.3)': dependencies: - '@typescript-eslint/typescript-estree': 8.6.0(typescript@5.6.2) - '@typescript-eslint/utils': 8.6.0(eslint@9.11.0(jiti@1.21.6))(typescript@5.6.2) + '@typescript-eslint/typescript-estree': 8.8.1(typescript@5.6.3) + '@typescript-eslint/utils': 8.8.1(eslint@9.12.0(jiti@2.3.3))(typescript@5.6.3) debug: 4.3.7 - ts-api-utils: 1.3.0(typescript@5.6.2) + ts-api-utils: 1.3.0(typescript@5.6.3) optionalDependencies: - typescript: 5.6.2 + typescript: 5.6.3 transitivePeerDependencies: - eslint - supports-color - '@typescript-eslint/types@8.6.0': {} + '@typescript-eslint/types@8.8.1': {} - '@typescript-eslint/typescript-estree@8.6.0(typescript@5.6.2)': + '@typescript-eslint/typescript-estree@8.8.1(typescript@5.6.3)': dependencies: - '@typescript-eslint/types': 8.6.0 - '@typescript-eslint/visitor-keys': 8.6.0 + '@typescript-eslint/types': 8.8.1 + '@typescript-eslint/visitor-keys': 8.8.1 debug: 4.3.7 fast-glob: 3.3.2 is-glob: 4.0.3 minimatch: 9.0.5 semver: 7.6.3 - ts-api-utils: 1.3.0(typescript@5.6.2) + ts-api-utils: 1.3.0(typescript@5.6.3) optionalDependencies: - typescript: 5.6.2 + typescript: 5.6.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@8.6.0(eslint@9.11.0(jiti@1.21.6))(typescript@5.6.2)': + '@typescript-eslint/utils@8.8.1(eslint@9.12.0(jiti@2.3.3))(typescript@5.6.3)': dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@9.11.0(jiti@1.21.6)) - '@typescript-eslint/scope-manager': 8.6.0 - '@typescript-eslint/types': 8.6.0 - '@typescript-eslint/typescript-estree': 8.6.0(typescript@5.6.2) - eslint: 9.11.0(jiti@1.21.6) + '@eslint-community/eslint-utils': 4.4.0(eslint@9.12.0(jiti@2.3.3)) + '@typescript-eslint/scope-manager': 8.8.1 + '@typescript-eslint/types': 8.8.1 + '@typescript-eslint/typescript-estree': 8.8.1(typescript@5.6.3) + eslint: 9.12.0(jiti@2.3.3) transitivePeerDependencies: - supports-color - typescript - '@typescript-eslint/visitor-keys@8.6.0': + '@typescript-eslint/visitor-keys@8.8.1': dependencies: - '@typescript-eslint/types': 8.6.0 + '@typescript-eslint/types': 8.8.1 eslint-visitor-keys: 3.4.3 '@ungap/structured-clone@1.2.0': {} - '@vitejs/plugin-react-swc@3.7.0(vite@5.4.7(@types/node@18.19.50)(less@4.2.0)(lightningcss@1.27.0)(sass@1.78.0)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.47)))': + '@vitejs/plugin-react-swc@3.7.1(vite@5.4.8(@types/node@18.19.55)(less@4.2.0)(lightningcss@1.27.0)(sass@1.79.4)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.47)))': dependencies: - '@swc/core': 1.5.29 - vite: 5.4.7(@types/node@18.19.50)(less@4.2.0)(lightningcss@1.27.0)(sass@1.78.0)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.47)) + '@swc/core': 1.7.26 + vite: 5.4.8(@types/node@18.19.55)(less@4.2.0)(lightningcss@1.27.0)(sass@1.79.4)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.47)) transitivePeerDependencies: - '@swc/helpers' - '@xyflow/react@12.3.0(@types/react@18.3.8)(immer@10.1.1)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + '@xyflow/react@12.3.1(@types/react@18.3.11)(immer@10.1.1)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: - '@xyflow/system': 0.0.42 + '@xyflow/system': 0.0.43 classcat: 5.0.5 react: 18.3.1 react-dom: 18.3.1(react@18.3.1) - zustand: 4.5.5(@types/react@18.3.8)(immer@10.1.1)(react@18.3.1) + zustand: 4.5.5(@types/react@18.3.11)(immer@10.1.1)(react@18.3.1) transitivePeerDependencies: - '@types/react' - immer - '@xyflow/system@0.0.42': + '@xyflow/system@0.0.43': dependencies: '@types/d3-drag': 3.0.7 - '@types/d3-selection': 3.0.10 - '@types/d3-transition': 3.0.8 + '@types/d3-selection': 3.0.11 + '@types/d3-transition': 3.0.9 '@types/d3-zoom': 3.0.8 d3-drag: 3.0.0 d3-selection: 3.0.0 @@ -9069,14 +9264,14 @@ snapshots: ansi-styles@6.2.1: {} - antd@5.21.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1): + antd@5.21.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: '@ant-design/colors': 7.1.0 '@ant-design/cssinjs': 1.21.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@ant-design/cssinjs-utils': 1.1.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@ant-design/icons': 5.5.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@ant-design/react-slick': 1.1.2(react@18.3.1) - '@babel/runtime': 7.25.6 + '@babel/runtime': 7.25.7 '@ctrl/tinycolor': 3.6.1 '@rc-component/color-picker': 2.0.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@rc-component/mutate-observer': 1.1.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) @@ -9099,33 +9294,33 @@ snapshots: rc-mentions: 2.16.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1) rc-menu: 9.15.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1) rc-motion: 2.9.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - rc-notification: 5.6.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + rc-notification: 5.6.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1) rc-pagination: 4.3.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - rc-picker: 4.6.14(dayjs@1.11.13)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + rc-picker: 4.6.15(dayjs@1.11.13)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) rc-progress: 4.0.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) rc-rate: 2.13.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) rc-resize-observer: 1.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) rc-segmented: 2.5.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) rc-select: 14.15.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - rc-slider: 11.1.6(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + rc-slider: 11.1.7(react-dom@18.3.1(react@18.3.1))(react@18.3.1) rc-steps: 6.0.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1) rc-switch: 4.1.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) rc-table: 7.47.5(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - rc-tabs: 15.2.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + rc-tabs: 15.3.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) rc-textarea: 1.8.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1) rc-tooltip: 6.2.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1) rc-tree: 5.9.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) rc-tree-select: 5.23.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) rc-upload: 4.8.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1) rc-util: 5.43.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + react: 18.3.1 + react-dom: 18.3.1(react@18.3.1) scroll-into-view-if-needed: 3.1.0 throttle-debounce: 5.0.2 transitivePeerDependencies: - date-fns - luxon - moment - - react - - react-dom any-promise@1.3.0: {} @@ -9263,7 +9458,7 @@ snapshots: asap@2.0.6: {} - assert-never@1.2.1: {} + assert-never@1.3.0: {} assign-symbols@1.0.0: {} @@ -9297,7 +9492,7 @@ snapshots: babel-walk@3.0.0-canary-5: dependencies: - '@babel/types': 7.25.6 + '@babel/types': 7.25.7 bail@1.0.5: {} @@ -9360,18 +9555,18 @@ snapshots: node-releases: 2.0.14 update-browserslist-db: 1.0.13(browserslist@4.22.3) - browserslist@4.23.3: + browserslist@4.24.0: dependencies: - caniuse-lite: 1.0.30001660 - electron-to-chromium: 1.5.21 + caniuse-lite: 1.0.30001667 + electron-to-chromium: 1.5.35 node-releases: 2.0.18 - update-browserslist-db: 1.1.0(browserslist@4.23.3) + update-browserslist-db: 1.1.1(browserslist@4.24.0) buffer-crc32@1.0.0: {} bufferutil@4.0.8: dependencies: - node-gyp-build: 4.8.1 + node-gyp-build: 4.8.2 bundle-require@5.0.0(esbuild@0.23.1): dependencies: @@ -9430,7 +9625,7 @@ snapshots: caniuse-lite@1.0.30001582: {} - caniuse-lite@1.0.30001660: {} + caniuse-lite@1.0.30001667: {} canvas@2.11.2: dependencies: @@ -9493,6 +9688,10 @@ snapshots: optionalDependencies: fsevents: 2.3.3 + chokidar@4.0.1: + dependencies: + readdirp: 4.0.2 + chownr@2.0.0: optional: true @@ -9521,8 +9720,6 @@ snapshots: dependencies: restore-cursor: 5.1.0 - cli-spinners@2.9.2: {} - cli-truncate@4.0.0: dependencies: slice-ansi: 5.0.0 @@ -9605,8 +9802,8 @@ snapshots: constantinople@4.0.1: dependencies: - '@babel/parser': 7.25.6 - '@babel/types': 7.25.6 + '@babel/parser': 7.25.7 + '@babel/types': 7.25.7 conventional-changelog-angular@7.0.0: dependencies: @@ -9637,12 +9834,12 @@ snapshots: dependencies: toggle-selection: 1.0.6 - cosmiconfig-typescript-loader@5.0.0(@types/node@22.5.5)(cosmiconfig@9.0.0(typescript@5.6.2))(typescript@5.6.2): + cosmiconfig-typescript-loader@5.0.0(@types/node@22.7.5)(cosmiconfig@9.0.0(typescript@5.6.3))(typescript@5.6.3): dependencies: - '@types/node': 22.5.5 - cosmiconfig: 9.0.0(typescript@5.6.2) + '@types/node': 22.7.5 + cosmiconfig: 9.0.0(typescript@5.6.3) jiti: 1.21.6 - typescript: 5.6.2 + typescript: 5.6.3 cosmiconfig@5.2.1: dependencies: @@ -9651,14 +9848,14 @@ snapshots: js-yaml: 3.14.1 parse-json: 4.0.0 - cosmiconfig@9.0.0(typescript@5.6.2): + cosmiconfig@9.0.0(typescript@5.6.3): dependencies: env-paths: 2.2.1 import-fresh: 3.3.0 js-yaml: 4.1.0 parse-json: 5.2.0 optionalDependencies: - typescript: 5.6.2 + typescript: 5.6.3 create-require@1.1.1: {} @@ -9923,7 +10120,7 @@ snapshots: electron-to-chromium@1.4.654: {} - electron-to-chromium@1.5.21: {} + electron-to-chromium@1.5.35: {} elkjs@0.9.3: {} @@ -10090,6 +10287,23 @@ snapshots: iterator.prototype: 1.1.2 safe-array-concat: 1.1.2 + es-iterator-helpers@1.1.0: + dependencies: + call-bind: 1.0.7 + define-properties: 1.2.1 + es-abstract: 1.23.3 + es-errors: 1.3.0 + es-set-tostringtag: 2.0.3 + function-bind: 1.1.2 + get-intrinsic: 1.2.4 + globalthis: 1.0.4 + has-property-descriptors: 1.0.2 + has-proto: 1.0.3 + has-symbols: 1.0.3 + internal-slot: 1.0.7 + iterator.prototype: 1.1.3 + safe-array-concat: 1.1.2 + es-object-atoms@1.0.0: dependencies: es-errors: 1.3.0 @@ -10316,14 +10530,14 @@ snapshots: escape-string-regexp@5.0.0: {} - eslint-compat-utils@0.5.1(eslint@9.11.0(jiti@1.21.6)): + eslint-compat-utils@0.5.1(eslint@9.12.0(jiti@2.3.3)): dependencies: - eslint: 9.11.0(jiti@1.21.6) + eslint: 9.12.0(jiti@2.3.3) semver: 7.6.3 - eslint-config-prettier@9.1.0(eslint@9.11.0(jiti@1.21.6)): + eslint-config-prettier@9.1.0(eslint@9.12.0(jiti@2.3.3)): dependencies: - eslint: 9.11.0(jiti@1.21.6) + eslint: 9.12.0(jiti@2.3.3) eslint-import-resolver-node@0.3.9: dependencies: @@ -10333,37 +10547,47 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-import-resolver-typescript@3.6.3(@typescript-eslint/parser@8.6.0(eslint@9.11.0(jiti@1.21.6))(typescript@5.6.2))(eslint-plugin-import@2.30.0)(eslint@9.11.0(jiti@1.21.6)): + eslint-import-resolver-typescript@3.6.3(@typescript-eslint/parser@8.8.1(eslint@9.12.0(jiti@2.3.3))(typescript@5.6.3))(eslint-plugin-import@2.31.0)(eslint@9.12.0(jiti@2.3.3)): dependencies: '@nolyfill/is-core-module': 1.0.39 debug: 4.3.7 enhanced-resolve: 5.17.1 - eslint: 9.11.0(jiti@1.21.6) - eslint-module-utils: 2.11.0(@typescript-eslint/parser@8.6.0(eslint@9.11.0(jiti@1.21.6))(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.3(@typescript-eslint/parser@8.6.0(eslint@9.11.0(jiti@1.21.6))(typescript@5.6.2))(eslint-plugin-import@2.30.0)(eslint@9.11.0(jiti@1.21.6)))(eslint@9.11.0(jiti@1.21.6)) + eslint: 9.12.0(jiti@2.3.3) + eslint-module-utils: 2.11.0(@typescript-eslint/parser@8.8.1(eslint@9.12.0(jiti@2.3.3))(typescript@5.6.3))(eslint-import-resolver-typescript@3.6.3(@typescript-eslint/parser@8.8.1(eslint@9.12.0(jiti@2.3.3))(typescript@5.6.3))(eslint-plugin-import@2.31.0)(eslint@9.12.0(jiti@2.3.3)))(eslint@9.12.0(jiti@2.3.3)) fast-glob: 3.3.2 get-tsconfig: 4.8.1 is-bun-module: 1.2.1 is-glob: 4.0.3 optionalDependencies: - eslint-plugin-import: 2.30.0(@typescript-eslint/parser@8.6.0(eslint@9.11.0(jiti@1.21.6))(typescript@5.6.2))(eslint-import-resolver-typescript@3.6.3)(eslint@9.11.0(jiti@1.21.6)) + eslint-plugin-import: 2.31.0(@typescript-eslint/parser@8.8.1(eslint@9.12.0(jiti@2.3.3))(typescript@5.6.3))(eslint-import-resolver-typescript@3.6.3)(eslint@9.12.0(jiti@2.3.3)) transitivePeerDependencies: - '@typescript-eslint/parser' - eslint-import-resolver-node - eslint-import-resolver-webpack - supports-color - eslint-module-utils@2.11.0(@typescript-eslint/parser@8.6.0(eslint@9.11.0(jiti@1.21.6))(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.3(@typescript-eslint/parser@8.6.0(eslint@9.11.0(jiti@1.21.6))(typescript@5.6.2))(eslint-plugin-import@2.30.0)(eslint@9.11.0(jiti@1.21.6)))(eslint@9.11.0(jiti@1.21.6)): + eslint-module-utils@2.11.0(@typescript-eslint/parser@8.8.1(eslint@9.12.0(jiti@2.3.3))(typescript@5.6.3))(eslint-import-resolver-typescript@3.6.3(@typescript-eslint/parser@8.8.1(eslint@9.12.0(jiti@2.3.3))(typescript@5.6.3))(eslint-plugin-import@2.31.0)(eslint@9.12.0(jiti@2.3.3)))(eslint@9.12.0(jiti@2.3.3)): dependencies: debug: 3.2.7 optionalDependencies: - '@typescript-eslint/parser': 8.6.0(eslint@9.11.0(jiti@1.21.6))(typescript@5.6.2) - eslint: 9.11.0(jiti@1.21.6) + '@typescript-eslint/parser': 8.8.1(eslint@9.12.0(jiti@2.3.3))(typescript@5.6.3) + eslint: 9.12.0(jiti@2.3.3) + eslint-import-resolver-typescript: 3.6.3(@typescript-eslint/parser@8.8.1(eslint@9.12.0(jiti@2.3.3))(typescript@5.6.3))(eslint-plugin-import@2.31.0)(eslint@9.12.0(jiti@2.3.3)) + transitivePeerDependencies: + - supports-color + + eslint-module-utils@2.12.0(@typescript-eslint/parser@8.8.1(eslint@9.12.0(jiti@2.3.3))(typescript@5.6.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.3(@typescript-eslint/parser@8.8.1(eslint@9.12.0(jiti@2.3.3))(typescript@5.6.3))(eslint-plugin-import@2.31.0)(eslint@9.12.0(jiti@2.3.3)))(eslint@9.12.0(jiti@2.3.3)): + dependencies: + debug: 3.2.7 + optionalDependencies: + '@typescript-eslint/parser': 8.8.1(eslint@9.12.0(jiti@2.3.3))(typescript@5.6.3) + eslint: 9.12.0(jiti@2.3.3) eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.6.3(@typescript-eslint/parser@8.6.0(eslint@9.11.0(jiti@1.21.6))(typescript@5.6.2))(eslint-plugin-import@2.30.0)(eslint@9.11.0(jiti@1.21.6)) + eslint-import-resolver-typescript: 3.6.3(@typescript-eslint/parser@8.8.1(eslint@9.12.0(jiti@2.3.3))(typescript@5.6.3))(eslint-plugin-import@2.31.0)(eslint@9.12.0(jiti@2.3.3)) transitivePeerDependencies: - supports-color - eslint-plugin-import@2.30.0(@typescript-eslint/parser@8.6.0(eslint@9.11.0(jiti@1.21.6))(typescript@5.6.2))(eslint-import-resolver-typescript@3.6.3)(eslint@9.11.0(jiti@1.21.6)): + eslint-plugin-import@2.31.0(@typescript-eslint/parser@8.8.1(eslint@9.12.0(jiti@2.3.3))(typescript@5.6.3))(eslint-import-resolver-typescript@3.6.3)(eslint@9.12.0(jiti@2.3.3)): dependencies: '@rtsao/scc': 1.1.0 array-includes: 3.1.8 @@ -10372,9 +10596,9 @@ snapshots: array.prototype.flatmap: 1.3.2 debug: 3.2.7 doctrine: 2.1.0 - eslint: 9.11.0(jiti@1.21.6) + eslint: 9.12.0(jiti@2.3.3) eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.11.0(@typescript-eslint/parser@8.6.0(eslint@9.11.0(jiti@1.21.6))(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.3(@typescript-eslint/parser@8.6.0(eslint@9.11.0(jiti@1.21.6))(typescript@5.6.2))(eslint-plugin-import@2.30.0)(eslint@9.11.0(jiti@1.21.6)))(eslint@9.11.0(jiti@1.21.6)) + eslint-module-utils: 2.12.0(@typescript-eslint/parser@8.8.1(eslint@9.12.0(jiti@2.3.3))(typescript@5.6.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.3(@typescript-eslint/parser@8.8.1(eslint@9.12.0(jiti@2.3.3))(typescript@5.6.3))(eslint-plugin-import@2.31.0)(eslint@9.12.0(jiti@2.3.3)))(eslint@9.12.0(jiti@2.3.3)) hasown: 2.0.2 is-core-module: 2.15.1 is-glob: 4.0.3 @@ -10383,15 +10607,16 @@ snapshots: object.groupby: 1.0.3 object.values: 1.2.0 semver: 6.3.1 + string.prototype.trimend: 1.0.8 tsconfig-paths: 3.15.0 optionalDependencies: - '@typescript-eslint/parser': 8.6.0(eslint@9.11.0(jiti@1.21.6))(typescript@5.6.2) + '@typescript-eslint/parser': 8.8.1(eslint@9.12.0(jiti@2.3.3))(typescript@5.6.3) transitivePeerDependencies: - eslint-import-resolver-typescript - eslint-import-resolver-webpack - supports-color - eslint-plugin-jsx-a11y@6.10.0(eslint@9.11.0(jiti@1.21.6)): + eslint-plugin-jsx-a11y@6.10.0(eslint@9.12.0(jiti@2.3.3)): dependencies: aria-query: 5.1.3 array-includes: 3.1.8 @@ -10402,7 +10627,7 @@ snapshots: damerau-levenshtein: 1.0.8 emoji-regex: 9.2.2 es-iterator-helpers: 1.0.19 - eslint: 9.11.0(jiti@1.21.6) + eslint: 9.12.0(jiti@2.3.3) hasown: 2.0.2 jsx-ast-utils: 3.3.5 language-tags: 1.0.9 @@ -10411,33 +10636,33 @@ snapshots: safe-regex-test: 1.0.3 string.prototype.includes: 2.0.0 - eslint-plugin-prettier@5.2.1(@types/eslint@9.6.1)(eslint-config-prettier@9.1.0(eslint@9.11.0(jiti@1.21.6)))(eslint@9.11.0(jiti@1.21.6))(prettier@3.3.3): + eslint-plugin-prettier@5.2.1(@types/eslint@9.6.1)(eslint-config-prettier@9.1.0(eslint@9.12.0(jiti@2.3.3)))(eslint@9.12.0(jiti@2.3.3))(prettier@3.3.3): dependencies: - eslint: 9.11.0(jiti@1.21.6) + eslint: 9.12.0(jiti@2.3.3) prettier: 3.3.3 prettier-linter-helpers: 1.0.0 synckit: 0.9.1 optionalDependencies: '@types/eslint': 9.6.1 - eslint-config-prettier: 9.1.0(eslint@9.11.0(jiti@1.21.6)) + eslint-config-prettier: 9.1.0(eslint@9.12.0(jiti@2.3.3)) - eslint-plugin-react-hooks@4.6.2(eslint@9.11.0(jiti@1.21.6)): + eslint-plugin-react-hooks@4.6.2(eslint@9.12.0(jiti@2.3.3)): dependencies: - eslint: 9.11.0(jiti@1.21.6) + eslint: 9.12.0(jiti@2.3.3) - eslint-plugin-react-refresh@0.4.12(eslint@9.11.0(jiti@1.21.6)): + eslint-plugin-react-refresh@0.4.12(eslint@9.12.0(jiti@2.3.3)): dependencies: - eslint: 9.11.0(jiti@1.21.6) + eslint: 9.12.0(jiti@2.3.3) - eslint-plugin-react@7.36.1(eslint@9.11.0(jiti@1.21.6)): + eslint-plugin-react@7.37.1(eslint@9.12.0(jiti@2.3.3)): dependencies: array-includes: 3.1.8 array.prototype.findlast: 1.2.5 array.prototype.flatmap: 1.3.2 array.prototype.tosorted: 1.1.4 doctrine: 2.1.0 - es-iterator-helpers: 1.0.19 - eslint: 9.11.0(jiti@1.21.6) + es-iterator-helpers: 1.1.0 + eslint: 9.12.0(jiti@2.3.3) estraverse: 5.3.0 hasown: 2.0.2 jsx-ast-utils: 3.3.5 @@ -10451,20 +10676,20 @@ snapshots: string.prototype.matchall: 4.0.11 string.prototype.repeat: 1.0.0 - eslint-plugin-simple-import-sort@12.1.1(eslint@9.11.0(jiti@1.21.6)): + eslint-plugin-simple-import-sort@12.1.1(eslint@9.12.0(jiti@2.3.3)): dependencies: - eslint: 9.11.0(jiti@1.21.6) + eslint: 9.12.0(jiti@2.3.3) - eslint-plugin-svelte@2.44.0(eslint@9.11.0(jiti@1.21.6))(svelte@4.2.19)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@22.5.5)(typescript@5.6.2)): + eslint-plugin-svelte@2.44.1(eslint@9.12.0(jiti@2.3.3))(svelte@4.2.19)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@22.7.5)(typescript@5.6.3)): dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@9.11.0(jiti@1.21.6)) + '@eslint-community/eslint-utils': 4.4.0(eslint@9.12.0(jiti@2.3.3)) '@jridgewell/sourcemap-codec': 1.5.0 - eslint: 9.11.0(jiti@1.21.6) - eslint-compat-utils: 0.5.1(eslint@9.11.0(jiti@1.21.6)) + eslint: 9.12.0(jiti@2.3.3) + eslint-compat-utils: 0.5.1(eslint@9.12.0(jiti@2.3.3)) esutils: 2.0.3 known-css-properties: 0.34.0 postcss: 8.4.47 - postcss-load-config: 3.1.4(postcss@8.4.47)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@22.5.5)(typescript@5.6.2)) + postcss-load-config: 3.1.4(postcss@8.4.47)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@22.7.5)(typescript@5.6.3)) postcss-safe-parser: 6.0.0(postcss@8.4.47) postcss-selector-parser: 6.1.2 semver: 7.6.3 @@ -10479,34 +10704,37 @@ snapshots: esrecurse: 4.3.0 estraverse: 5.3.0 - eslint-scope@8.0.2: + eslint-scope@8.1.0: dependencies: esrecurse: 4.3.0 estraverse: 5.3.0 eslint-visitor-keys@3.4.3: {} - eslint-visitor-keys@4.0.0: {} + eslint-visitor-keys@4.1.0: {} - eslint@9.11.0(jiti@1.21.6): + eslint@9.12.0(jiti@2.3.3): dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@9.11.0(jiti@1.21.6)) + '@eslint-community/eslint-utils': 4.4.0(eslint@9.12.0(jiti@2.3.3)) '@eslint-community/regexpp': 4.11.1 '@eslint/config-array': 0.18.0 + '@eslint/core': 0.6.0 '@eslint/eslintrc': 3.1.0 - '@eslint/js': 9.11.0 + '@eslint/js': 9.12.0 '@eslint/plugin-kit': 0.2.0 + '@humanfs/node': 0.16.5 '@humanwhocodes/module-importer': 1.0.1 - '@humanwhocodes/retry': 0.3.0 - '@nodelib/fs.walk': 1.2.8 + '@humanwhocodes/retry': 0.3.1 + '@types/estree': 1.0.6 + '@types/json-schema': 7.0.15 ajv: 6.12.6 chalk: 4.1.2 cross-spawn: 7.0.3 debug: 4.3.7 escape-string-regexp: 4.0.0 - eslint-scope: 8.0.2 - eslint-visitor-keys: 4.0.0 - espree: 10.1.0 + eslint-scope: 8.1.0 + eslint-visitor-keys: 4.1.0 + espree: 10.2.0 esquery: 1.6.0 esutils: 2.0.3 fast-deep-equal: 3.1.3 @@ -10516,16 +10744,14 @@ snapshots: ignore: 5.3.2 imurmurhash: 0.1.4 is-glob: 4.0.3 - is-path-inside: 3.0.3 json-stable-stringify-without-jsonify: 1.0.1 lodash.merge: 4.6.2 minimatch: 3.1.2 natural-compare: 1.4.0 optionator: 0.9.4 - strip-ansi: 6.0.1 text-table: 0.2.0 optionalDependencies: - jiti: 1.21.6 + jiti: 2.3.3 transitivePeerDependencies: - supports-color @@ -10536,11 +10762,11 @@ snapshots: event-emitter: 0.3.5 type: 2.7.3 - espree@10.1.0: + espree@10.2.0: dependencies: acorn: 8.12.1 acorn-jsx: 5.3.2(acorn@8.12.1) - eslint-visitor-keys: 4.0.0 + eslint-visitor-keys: 4.1.0 espree@9.6.1: dependencies: @@ -10698,6 +10924,10 @@ snapshots: optionalDependencies: picomatch: 4.0.2 + fdir@6.4.0(picomatch@4.0.2): + optionalDependencies: + picomatch: 4.0.2 + fetch-blob@3.2.0: dependencies: node-domexception: 1.0.0 @@ -10894,7 +11124,7 @@ snapshots: meow: 12.1.1 split2: 4.2.0 - github-markdown-css@5.6.1: {} + github-markdown-css@5.7.0: {} github-slugger@2.0.0: {} @@ -10957,7 +11187,7 @@ snapshots: globals@14.0.0: {} - globals@15.9.0: {} + globals@15.11.0: {} globalthis@1.0.3: dependencies: @@ -11016,7 +11246,7 @@ snapshots: graphemer@1.4.0: {} - graphql@16.8.2: {} + graphql@16.9.0: {} has-bigints@1.0.2: {} @@ -11479,8 +11709,6 @@ snapshots: is-obj@2.0.0: {} - is-path-inside@3.0.3: {} - is-plain-obj@1.1.0: {} is-plain-obj@4.1.0: {} @@ -11585,6 +11813,14 @@ snapshots: reflect.getprototypeof: 1.0.6 set-function-name: 2.0.2 + iterator.prototype@1.1.3: + dependencies: + define-properties: 1.2.1 + get-intrinsic: 1.2.4 + has-symbols: 1.0.3 + reflect.getprototypeof: 1.0.6 + set-function-name: 2.0.2 + jackspeak@3.4.0: dependencies: '@isaacs/cliui': 8.0.2 @@ -11599,6 +11835,9 @@ snapshots: jiti@1.21.6: {} + jiti@2.3.3: + optional: true + jju@1.4.0: {} joycon@3.1.1: {} @@ -11616,7 +11855,7 @@ snapshots: dependencies: argparse: 2.0.1 - jsesc@2.5.2: {} + jsesc@3.0.2: {} json-buffer@3.0.1: {} @@ -11892,10 +12131,6 @@ snapshots: dependencies: es5-ext: 0.10.64 - magic-string@0.30.10: - dependencies: - '@jridgewell/sourcemap-codec': 1.4.15 - magic-string@0.30.11: dependencies: '@jridgewell/sourcemap-codec': 1.5.0 @@ -12460,27 +12695,27 @@ snapshots: ms@2.1.3: {} - msw@2.3.1(typescript@5.6.2): + msw@2.4.9(typescript@5.6.3): dependencies: '@bundled-es-modules/cookie': 2.0.0 '@bundled-es-modules/statuses': 1.0.1 - '@inquirer/confirm': 3.1.9 - '@mswjs/cookies': 1.1.0 - '@mswjs/interceptors': 0.29.1 + '@bundled-es-modules/tough-cookie': 0.1.6 + '@inquirer/confirm': 3.2.0 + '@mswjs/interceptors': 0.35.9 '@open-draft/until': 2.1.0 '@types/cookie': 0.6.0 '@types/statuses': 2.0.5 chalk: 4.1.2 - graphql: 16.8.2 + graphql: 16.9.0 headers-polyfill: 4.0.3 is-node-process: 1.2.0 - outvariant: 1.4.2 - path-to-regexp: 6.2.2 + outvariant: 1.4.3 + path-to-regexp: 6.3.0 strict-event-emitter: 0.5.1 - type-fest: 4.20.0 + type-fest: 4.26.1 yargs: 17.7.2 optionalDependencies: - typescript: 5.6.2 + typescript: 5.6.3 mute-stream@1.0.0: {} @@ -12535,7 +12770,7 @@ snapshots: fetch-blob: 3.2.0 formdata-polyfill: 4.0.10 - node-gyp-build@4.8.1: {} + node-gyp-build@4.8.2: {} node-releases@2.0.14: {} @@ -12677,7 +12912,7 @@ snapshots: outdent@0.5.0: {} - outvariant@1.4.2: {} + outvariant@1.4.3: {} p-filter@2.1.0: dependencies: @@ -12723,7 +12958,7 @@ snapshots: package-json-from-dist@1.0.0: {} - package-manager-detector@0.2.0: {} + package-manager-detector@0.2.2: {} parent-module@1.0.1: dependencies: @@ -12810,7 +13045,7 @@ snapshots: lru-cache: 11.0.1 minipass: 7.1.2 - path-to-regexp@6.2.2: {} + path-to-regexp@6.3.0: {} path-type@3.0.0: dependencies: @@ -12861,13 +13096,13 @@ snapshots: dependencies: htmlparser2: 3.10.1 postcss: 7.0.39 - postcss-syntax: 0.36.2(postcss-html@0.36.0(postcss-syntax@0.36.2(postcss-less@6.0.0(postcss@8.4.47))(postcss@8.4.47))(postcss@7.0.39))(postcss-jsx@0.36.4(postcss-syntax@0.36.2(postcss-less@6.0.0(postcss@8.4.47))(postcss@8.4.47))(postcss@7.0.39))(postcss-less@3.1.4)(postcss-markdown@0.36.0)(postcss-scss@2.1.1)(postcss@7.0.39) + postcss-syntax: 0.36.2(postcss-html@0.36.0(postcss-syntax@0.36.2(postcss-less@6.0.0(postcss@8.4.47))(postcss@8.4.47))(postcss@7.0.39))(postcss-jsx@0.36.4(postcss-syntax@0.36.2(postcss-less@6.0.0(postcss@8.4.47))(postcss@8.4.47))(postcss@7.0.39))(postcss-less@3.1.4)(postcss-markdown@0.36.0(postcss-syntax@0.36.2(postcss-less@6.0.0(postcss@8.4.47))(postcss@8.4.47))(postcss@7.0.39))(postcss-scss@2.1.1)(postcss@7.0.39) postcss-jsx@0.36.4(postcss-syntax@0.36.2(postcss-less@6.0.0(postcss@8.4.47))(postcss@8.4.47))(postcss@7.0.39): dependencies: - '@babel/core': 7.25.2 + '@babel/core': 7.25.7 postcss: 7.0.39 - postcss-syntax: 0.36.2(postcss-html@0.36.0(postcss-syntax@0.36.2(postcss-less@6.0.0(postcss@8.4.47))(postcss@8.4.47))(postcss@7.0.39))(postcss-jsx@0.36.4(postcss-syntax@0.36.2(postcss-less@6.0.0(postcss@8.4.47))(postcss@8.4.47))(postcss@7.0.39))(postcss-less@3.1.4)(postcss-markdown@0.36.0)(postcss-scss@2.1.1)(postcss@7.0.39) + postcss-syntax: 0.36.2(postcss-html@0.36.0(postcss-syntax@0.36.2(postcss-less@6.0.0(postcss@8.4.47))(postcss@8.4.47))(postcss@7.0.39))(postcss-jsx@0.36.4(postcss-syntax@0.36.2(postcss-less@6.0.0(postcss@8.4.47))(postcss@8.4.47))(postcss@7.0.39))(postcss-less@3.1.4)(postcss-markdown@0.36.0(postcss-syntax@0.36.2(postcss-less@6.0.0(postcss@8.4.47))(postcss@8.4.47))(postcss@7.0.39))(postcss-scss@2.1.1)(postcss@7.0.39) transitivePeerDependencies: - supports-color @@ -12879,28 +13114,28 @@ snapshots: dependencies: postcss: 8.4.47 - postcss-load-config@3.1.4(postcss@8.4.47)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@18.19.50)(typescript@5.5.4)): + postcss-load-config@3.1.4(postcss@8.4.47)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@18.19.55)(typescript@5.5.4)): dependencies: lilconfig: 2.1.0 yaml: 1.10.2 optionalDependencies: postcss: 8.4.47 - ts-node: 10.9.2(@swc/core@1.7.26)(@types/node@18.19.50)(typescript@5.5.4) + ts-node: 10.9.2(@swc/core@1.7.26)(@types/node@18.19.55)(typescript@5.5.4) optional: true - postcss-load-config@3.1.4(postcss@8.4.47)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@22.5.5)(typescript@5.6.2)): + postcss-load-config@3.1.4(postcss@8.4.47)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@22.7.5)(typescript@5.6.3)): dependencies: lilconfig: 2.1.0 yaml: 1.10.2 optionalDependencies: postcss: 8.4.47 - ts-node: 10.9.2(@swc/core@1.7.26)(@types/node@22.5.5)(typescript@5.6.2) + ts-node: 10.9.2(@swc/core@1.7.26)(@types/node@22.7.5)(typescript@5.6.3) - postcss-load-config@6.0.1(jiti@1.21.6)(postcss@8.4.47)(tsx@4.19.1)(yaml@2.5.1): + postcss-load-config@6.0.1(jiti@2.3.3)(postcss@8.4.47)(tsx@4.19.1)(yaml@2.5.1): dependencies: lilconfig: 3.1.2 optionalDependencies: - jiti: 1.21.6 + jiti: 2.3.3 postcss: 8.4.47 tsx: 4.19.1 yaml: 2.5.1 @@ -12908,7 +13143,7 @@ snapshots: postcss-markdown@0.36.0(postcss-syntax@0.36.2(postcss-less@6.0.0(postcss@8.4.47))(postcss@8.4.47))(postcss@7.0.39): dependencies: postcss: 7.0.39 - postcss-syntax: 0.36.2(postcss-html@0.36.0(postcss-syntax@0.36.2(postcss-less@6.0.0(postcss@8.4.47))(postcss@8.4.47))(postcss@7.0.39))(postcss-jsx@0.36.4(postcss-syntax@0.36.2(postcss-less@6.0.0(postcss@8.4.47))(postcss@8.4.47))(postcss@7.0.39))(postcss-less@3.1.4)(postcss-markdown@0.36.0)(postcss-scss@2.1.1)(postcss@7.0.39) + postcss-syntax: 0.36.2(postcss-html@0.36.0(postcss-syntax@0.36.2(postcss-less@6.0.0(postcss@8.4.47))(postcss@8.4.47))(postcss@7.0.39))(postcss-jsx@0.36.4(postcss-syntax@0.36.2(postcss-less@6.0.0(postcss@8.4.47))(postcss@8.4.47))(postcss@7.0.39))(postcss-less@3.1.4)(postcss-markdown@0.36.0(postcss-syntax@0.36.2(postcss-less@6.0.0(postcss@8.4.47))(postcss@8.4.47))(postcss@7.0.39))(postcss-scss@2.1.1)(postcss@7.0.39) remark: 10.0.1 unist-util-find-all-after: 1.0.5 @@ -12975,7 +13210,7 @@ snapshots: dependencies: postcss: 8.4.47 - postcss-syntax@0.36.2(postcss-html@0.36.0(postcss-syntax@0.36.2(postcss-less@6.0.0(postcss@8.4.47))(postcss@8.4.47))(postcss@7.0.39))(postcss-jsx@0.36.4(postcss-syntax@0.36.2(postcss-less@6.0.0(postcss@8.4.47))(postcss@8.4.47))(postcss@7.0.39))(postcss-less@3.1.4)(postcss-markdown@0.36.0)(postcss-scss@2.1.1)(postcss@7.0.39): + postcss-syntax@0.36.2(postcss-html@0.36.0(postcss-syntax@0.36.2(postcss-less@6.0.0(postcss@8.4.47))(postcss@8.4.47))(postcss@7.0.39))(postcss-jsx@0.36.4(postcss-syntax@0.36.2(postcss-less@6.0.0(postcss@8.4.47))(postcss@8.4.47))(postcss@7.0.39))(postcss-less@3.1.4)(postcss-markdown@0.36.0(postcss-syntax@0.36.2(postcss-less@6.0.0(postcss@8.4.47))(postcss@8.4.47))(postcss@7.0.39))(postcss-scss@2.1.1)(postcss@7.0.39): dependencies: postcss: 7.0.39 optionalDependencies: @@ -13006,14 +13241,14 @@ snapshots: dependencies: fast-diff: 1.3.0 - prettier-plugin-packagejson@2.5.2(prettier@3.3.3): + prettier-plugin-packagejson@2.5.3(prettier@3.3.3): dependencies: sort-package-json: 2.10.1 - synckit: 0.9.1 + synckit: 0.9.2 optionalDependencies: prettier: 3.3.3 - prettier-plugin-svelte@3.2.6(prettier@3.3.3)(svelte@4.2.19): + prettier-plugin-svelte@3.2.7(prettier@3.3.3)(svelte@4.2.19): dependencies: prettier: 3.3.3 svelte: 4.2.19 @@ -13047,6 +13282,8 @@ snapshots: pseudomap@1.0.2: {} + psl@1.9.0: {} + pug-attrs@3.0.0: dependencies: constantinople: 4.0.1 @@ -13116,13 +13353,15 @@ snapshots: punycode@2.3.1: {} + querystringify@2.2.0: {} + queue-microtask@1.2.3: {} quick-lru@1.1.0: {} rc-cascader@3.28.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: - '@babel/runtime': 7.25.6 + '@babel/runtime': 7.25.7 array-tree-filter: 2.1.0 classnames: 2.5.1 rc-select: 14.15.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1) @@ -13133,7 +13372,7 @@ snapshots: rc-checkbox@3.3.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: - '@babel/runtime': 7.25.6 + '@babel/runtime': 7.25.7 classnames: 2.5.1 rc-util: 5.43.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) react: 18.3.1 @@ -13141,7 +13380,7 @@ snapshots: rc-collapse@3.8.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: - '@babel/runtime': 7.25.6 + '@babel/runtime': 7.25.7 classnames: 2.5.1 rc-motion: 2.9.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1) rc-util: 5.43.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) @@ -13150,7 +13389,7 @@ snapshots: rc-dialog@9.6.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: - '@babel/runtime': 7.25.6 + '@babel/runtime': 7.25.7 '@rc-component/portal': 1.1.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1) classnames: 2.5.1 rc-motion: 2.9.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1) @@ -13160,7 +13399,7 @@ snapshots: rc-drawer@7.2.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: - '@babel/runtime': 7.25.6 + '@babel/runtime': 7.25.7 '@rc-component/portal': 1.1.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1) classnames: 2.5.1 rc-motion: 2.9.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1) @@ -13170,7 +13409,7 @@ snapshots: rc-dropdown@4.2.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: - '@babel/runtime': 7.25.6 + '@babel/runtime': 7.25.7 '@rc-component/trigger': 2.2.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1) classnames: 2.5.1 rc-util: 5.43.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) @@ -13179,7 +13418,7 @@ snapshots: rc-field-form@2.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: - '@babel/runtime': 7.25.6 + '@babel/runtime': 7.25.7 '@rc-component/async-validator': 5.0.4 rc-util: 5.43.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) react: 18.3.1 @@ -13187,7 +13426,7 @@ snapshots: rc-image@7.11.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: - '@babel/runtime': 7.25.6 + '@babel/runtime': 7.25.7 '@rc-component/portal': 1.1.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1) classnames: 2.5.1 rc-dialog: 9.6.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) @@ -13198,7 +13437,7 @@ snapshots: rc-input-number@9.2.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: - '@babel/runtime': 7.25.6 + '@babel/runtime': 7.25.7 '@rc-component/mini-decimal': 1.1.0 classnames: 2.5.1 rc-input: 1.6.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1) @@ -13208,7 +13447,7 @@ snapshots: rc-input@1.6.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: - '@babel/runtime': 7.25.6 + '@babel/runtime': 7.25.7 classnames: 2.5.1 rc-util: 5.43.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) react: 18.3.1 @@ -13216,7 +13455,7 @@ snapshots: rc-mentions@2.16.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: - '@babel/runtime': 7.25.6 + '@babel/runtime': 7.25.7 '@rc-component/trigger': 2.2.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1) classnames: 2.5.1 rc-input: 1.6.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1) @@ -13228,7 +13467,7 @@ snapshots: rc-menu@9.15.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: - '@babel/runtime': 7.25.6 + '@babel/runtime': 7.25.7 '@rc-component/trigger': 2.2.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1) classnames: 2.5.1 rc-motion: 2.9.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1) @@ -13239,15 +13478,15 @@ snapshots: rc-motion@2.9.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: - '@babel/runtime': 7.25.6 + '@babel/runtime': 7.25.7 classnames: 2.5.1 rc-util: 5.43.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) react: 18.3.1 react-dom: 18.3.1(react@18.3.1) - rc-notification@5.6.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1): + rc-notification@5.6.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: - '@babel/runtime': 7.25.6 + '@babel/runtime': 7.25.7 classnames: 2.5.1 rc-motion: 2.9.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1) rc-util: 5.43.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) @@ -13256,7 +13495,7 @@ snapshots: rc-overflow@1.3.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: - '@babel/runtime': 7.25.6 + '@babel/runtime': 7.25.7 classnames: 2.5.1 rc-resize-observer: 1.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) rc-util: 5.43.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) @@ -13265,15 +13504,15 @@ snapshots: rc-pagination@4.3.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: - '@babel/runtime': 7.25.6 + '@babel/runtime': 7.25.7 classnames: 2.5.1 rc-util: 5.43.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) react: 18.3.1 react-dom: 18.3.1(react@18.3.1) - rc-picker@4.6.14(dayjs@1.11.13)(react-dom@18.3.1(react@18.3.1))(react@18.3.1): + rc-picker@4.6.15(dayjs@1.11.13)(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: - '@babel/runtime': 7.25.6 + '@babel/runtime': 7.25.7 '@rc-component/trigger': 2.2.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1) classnames: 2.5.1 rc-overflow: 1.3.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1) @@ -13286,7 +13525,7 @@ snapshots: rc-progress@4.0.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: - '@babel/runtime': 7.25.6 + '@babel/runtime': 7.25.7 classnames: 2.5.1 rc-util: 5.43.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) react: 18.3.1 @@ -13294,7 +13533,7 @@ snapshots: rc-rate@2.13.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: - '@babel/runtime': 7.25.6 + '@babel/runtime': 7.25.7 classnames: 2.5.1 rc-util: 5.43.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) react: 18.3.1 @@ -13302,7 +13541,7 @@ snapshots: rc-resize-observer@1.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: - '@babel/runtime': 7.25.6 + '@babel/runtime': 7.25.7 classnames: 2.5.1 rc-util: 5.43.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) react: 18.3.1 @@ -13311,7 +13550,7 @@ snapshots: rc-segmented@2.5.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: - '@babel/runtime': 7.25.6 + '@babel/runtime': 7.25.7 classnames: 2.5.1 rc-motion: 2.9.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1) rc-util: 5.43.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) @@ -13320,19 +13559,19 @@ snapshots: rc-select@14.15.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: - '@babel/runtime': 7.25.6 + '@babel/runtime': 7.25.7 '@rc-component/trigger': 2.2.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1) classnames: 2.5.1 rc-motion: 2.9.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1) rc-overflow: 1.3.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1) rc-util: 5.43.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - rc-virtual-list: 3.14.7(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + rc-virtual-list: 3.14.8(react-dom@18.3.1(react@18.3.1))(react@18.3.1) react: 18.3.1 react-dom: 18.3.1(react@18.3.1) - rc-slider@11.1.6(react-dom@18.3.1(react@18.3.1))(react@18.3.1): + rc-slider@11.1.7(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: - '@babel/runtime': 7.25.6 + '@babel/runtime': 7.25.7 classnames: 2.5.1 rc-util: 5.43.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) react: 18.3.1 @@ -13340,7 +13579,7 @@ snapshots: rc-steps@6.0.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: - '@babel/runtime': 7.25.6 + '@babel/runtime': 7.25.7 classnames: 2.5.1 rc-util: 5.43.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) react: 18.3.1 @@ -13348,7 +13587,7 @@ snapshots: rc-switch@4.1.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: - '@babel/runtime': 7.25.6 + '@babel/runtime': 7.25.7 classnames: 2.5.1 rc-util: 5.43.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) react: 18.3.1 @@ -13356,18 +13595,18 @@ snapshots: rc-table@7.47.5(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: - '@babel/runtime': 7.25.6 + '@babel/runtime': 7.25.7 '@rc-component/context': 1.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) classnames: 2.5.1 rc-resize-observer: 1.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) rc-util: 5.43.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - rc-virtual-list: 3.14.7(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + rc-virtual-list: 3.14.8(react-dom@18.3.1(react@18.3.1))(react@18.3.1) react: 18.3.1 react-dom: 18.3.1(react@18.3.1) - rc-tabs@15.2.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1): + rc-tabs@15.3.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: - '@babel/runtime': 7.25.6 + '@babel/runtime': 7.25.7 classnames: 2.5.1 rc-dropdown: 4.2.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) rc-menu: 9.15.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1) @@ -13379,7 +13618,7 @@ snapshots: rc-textarea@1.8.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: - '@babel/runtime': 7.25.6 + '@babel/runtime': 7.25.7 classnames: 2.5.1 rc-input: 1.6.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1) rc-resize-observer: 1.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) @@ -13389,7 +13628,7 @@ snapshots: rc-tooltip@6.2.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: - '@babel/runtime': 7.25.6 + '@babel/runtime': 7.25.7 '@rc-component/trigger': 2.2.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1) classnames: 2.5.1 react: 18.3.1 @@ -13397,7 +13636,7 @@ snapshots: rc-tree-select@5.23.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: - '@babel/runtime': 7.25.6 + '@babel/runtime': 7.25.7 classnames: 2.5.1 rc-select: 14.15.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1) rc-tree: 5.9.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) @@ -13407,17 +13646,17 @@ snapshots: rc-tree@5.9.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: - '@babel/runtime': 7.25.6 + '@babel/runtime': 7.25.7 classnames: 2.5.1 rc-motion: 2.9.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1) rc-util: 5.43.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - rc-virtual-list: 3.14.7(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + rc-virtual-list: 3.14.8(react-dom@18.3.1(react@18.3.1))(react@18.3.1) react: 18.3.1 react-dom: 18.3.1(react@18.3.1) rc-upload@4.8.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: - '@babel/runtime': 7.25.6 + '@babel/runtime': 7.25.7 classnames: 2.5.1 rc-util: 5.43.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) react: 18.3.1 @@ -13430,9 +13669,9 @@ snapshots: react-dom: 18.3.1(react@18.3.1) react-is: 18.3.1 - rc-virtual-list@3.14.7(react-dom@18.3.1(react@18.3.1))(react@18.3.1): + rc-virtual-list@3.14.8(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: - '@babel/runtime': 7.25.6 + '@babel/runtime': 7.25.7 classnames: 2.5.1 rc-resize-observer: 1.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) rc-util: 5.43.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) @@ -13449,10 +13688,10 @@ snapshots: react-is@18.3.1: {} - react-markdown@9.0.1(@types/react@18.3.8)(react@18.3.1): + react-markdown@9.0.1(@types/react@18.3.11)(react@18.3.1): dependencies: '@types/hast': 3.0.4 - '@types/react': 18.3.8 + '@types/react': 18.3.11 devlop: 1.1.0 hast-util-to-jsx-runtime: 2.3.0 html-url-attributes: 3.0.0 @@ -13507,6 +13746,8 @@ snapshots: dependencies: picomatch: 2.3.1 + readdirp@4.0.2: {} + redent@2.0.0: dependencies: indent-string: 3.2.0 @@ -13548,6 +13789,13 @@ snapshots: es-errors: 1.3.0 set-function-name: 2.0.2 + regexp.prototype.flags@1.5.3: + dependencies: + call-bind: 1.0.7 + define-properties: 1.2.1 + es-errors: 1.3.0 + set-function-name: 2.0.2 + rehype-katex@7.0.1: dependencies: '@types/hast': 3.0.4 @@ -13673,6 +13921,8 @@ snapshots: require-from-string@2.0.2: {} + requires-port@1.0.0: {} + resize-observer-polyfill@1.5.1: {} resolve-from@3.0.0: {} @@ -13748,6 +13998,28 @@ snapshots: '@rollup/rollup-win32-x64-msvc': 4.22.4 fsevents: 2.3.3 + rollup@4.24.0: + dependencies: + '@types/estree': 1.0.6 + optionalDependencies: + '@rollup/rollup-android-arm-eabi': 4.24.0 + '@rollup/rollup-android-arm64': 4.24.0 + '@rollup/rollup-darwin-arm64': 4.24.0 + '@rollup/rollup-darwin-x64': 4.24.0 + '@rollup/rollup-linux-arm-gnueabihf': 4.24.0 + '@rollup/rollup-linux-arm-musleabihf': 4.24.0 + '@rollup/rollup-linux-arm64-gnu': 4.24.0 + '@rollup/rollup-linux-arm64-musl': 4.24.0 + '@rollup/rollup-linux-powerpc64le-gnu': 4.24.0 + '@rollup/rollup-linux-riscv64-gnu': 4.24.0 + '@rollup/rollup-linux-s390x-gnu': 4.24.0 + '@rollup/rollup-linux-x64-gnu': 4.24.0 + '@rollup/rollup-linux-x64-musl': 4.24.0 + '@rollup/rollup-win32-arm64-msvc': 4.24.0 + '@rollup/rollup-win32-ia32-msvc': 4.24.0 + '@rollup/rollup-win32-x64-msvc': 4.24.0 + fsevents: 2.3.3 + run-parallel@1.2.0: dependencies: queue-microtask: 1.2.3 @@ -13799,9 +14071,9 @@ snapshots: mkdirp: 0.5.6 rimraf: 2.7.1 - sass@1.78.0: + sass@1.79.4: dependencies: - chokidar: 3.6.0 + chokidar: 4.0.1 immutable: 4.3.7 source-map-js: 1.2.1 @@ -13961,7 +14233,7 @@ snapshots: sorcery@0.11.1: dependencies: - '@jridgewell/sourcemap-codec': 1.4.15 + '@jridgewell/sourcemap-codec': 1.5.0 buffer-crc32: 1.0.0 minimist: 1.2.8 sander: 0.5.1 @@ -14093,7 +14365,7 @@ snapshots: gopd: 1.0.1 has-symbols: 1.0.3 internal-slot: 1.0.7 - regexp.prototype.flags: 1.5.2 + regexp.prototype.flags: 1.5.3 set-function-name: 2.0.2 side-channel: 1.0.6 @@ -14257,7 +14529,7 @@ snapshots: postcss-value-parser: 4.2.0 stylelint: 9.10.1 - stylelint@16.9.0(typescript@5.6.2): + stylelint@16.9.0(typescript@5.6.3): dependencies: '@csstools/css-parser-algorithms': 3.0.1(@csstools/css-tokenizer@3.0.1) '@csstools/css-tokenizer': 3.0.1 @@ -14266,7 +14538,7 @@ snapshots: '@dual-bundle/import-meta-resolve': 4.1.0 balanced-match: 2.0.0 colord: 2.9.3 - cosmiconfig: 9.0.0(typescript@5.6.2) + cosmiconfig: 9.0.0(typescript@5.6.3) css-functions-list: 3.2.2 css-tree: 2.3.1 debug: 4.3.7 @@ -14340,7 +14612,7 @@ snapshots: postcss-sass: 0.3.5 postcss-scss: 2.1.1 postcss-selector-parser: 3.1.2 - postcss-syntax: 0.36.2(postcss-html@0.36.0(postcss-syntax@0.36.2(postcss-less@6.0.0(postcss@8.4.47))(postcss@8.4.47))(postcss@7.0.39))(postcss-jsx@0.36.4(postcss-syntax@0.36.2(postcss-less@6.0.0(postcss@8.4.47))(postcss@8.4.47))(postcss@7.0.39))(postcss-less@3.1.4)(postcss-markdown@0.36.0)(postcss-scss@2.1.1)(postcss@7.0.39) + postcss-syntax: 0.36.2(postcss-html@0.36.0(postcss-syntax@0.36.2(postcss-less@6.0.0(postcss@8.4.47))(postcss@8.4.47))(postcss@7.0.39))(postcss-jsx@0.36.4(postcss-syntax@0.36.2(postcss-less@6.0.0(postcss@8.4.47))(postcss@8.4.47))(postcss@7.0.39))(postcss-less@3.1.4)(postcss-markdown@0.36.0(postcss-syntax@0.36.2(postcss-less@6.0.0(postcss@8.4.47))(postcss@8.4.47))(postcss@7.0.39))(postcss-scss@2.1.1)(postcss@7.0.39) postcss-value-parser: 3.3.1 resolve-from: 4.0.0 signal-exit: 3.0.7 @@ -14404,15 +14676,15 @@ snapshots: supports-preserve-symlinks-flag@1.0.0: {} - svelte-check@4.0.2(picomatch@4.0.2)(svelte@4.2.19)(typescript@5.6.2): + svelte-check@4.0.4(picomatch@4.0.2)(svelte@4.2.19)(typescript@5.6.3): dependencies: '@jridgewell/trace-mapping': 0.3.25 - chokidar: 3.6.0 - fdir: 6.3.0(picomatch@4.0.2) + chokidar: 4.0.1 + fdir: 6.4.0(picomatch@4.0.2) picocolors: 1.1.0 sade: 1.8.1 svelte: 4.2.19 - typescript: 5.6.2 + typescript: 5.6.3 transitivePeerDependencies: - picomatch @@ -14452,25 +14724,25 @@ snapshots: svelte: 4.2.19 tiny-glob: 0.2.9 - svelte-preprocess@5.1.4(@babel/core@7.25.2)(coffeescript@2.7.0)(less@4.2.0)(postcss-load-config@3.1.4(postcss@8.4.47)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@18.19.50)(typescript@5.5.4)))(postcss@8.4.47)(pug@3.0.3)(sass@1.78.0)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.47))(svelte@4.2.19)(typescript@5.6.2): + svelte-preprocess@5.1.4(@babel/core@7.25.7)(coffeescript@2.7.0)(less@4.2.0)(postcss-load-config@3.1.4(postcss@8.4.47)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@18.19.55)(typescript@5.5.4)))(postcss@8.4.47)(pug@3.0.3)(sass@1.79.4)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.47))(svelte@4.2.19)(typescript@5.6.3): dependencies: '@types/pug': 2.0.10 detect-indent: 6.1.0 - magic-string: 0.30.10 + magic-string: 0.30.11 sorcery: 0.11.1 strip-indent: 3.0.0 svelte: 4.2.19 optionalDependencies: - '@babel/core': 7.25.2 + '@babel/core': 7.25.7 coffeescript: 2.7.0 less: 4.2.0 postcss: 8.4.47 - postcss-load-config: 3.1.4(postcss@8.4.47)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@18.19.50)(typescript@5.5.4)) + postcss-load-config: 3.1.4(postcss@8.4.47)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@18.19.55)(typescript@5.5.4)) pug: 3.0.3 - sass: 1.78.0 + sass: 1.79.4 stylus: 0.63.0 sugarss: 4.0.1(postcss@8.4.47) - typescript: 5.6.2 + typescript: 5.6.3 svelte@4.2.19: dependencies: @@ -14496,6 +14768,11 @@ snapshots: '@pkgr/core': 0.1.1 tslib: 2.7.0 + synckit@0.9.2: + dependencies: + '@pkgr/core': 0.1.1 + tslib: 2.7.0 + table@5.4.6: dependencies: ajv: 6.12.6 @@ -14590,6 +14867,13 @@ snapshots: token-stream@1.0.0: {} + tough-cookie@4.1.4: + dependencies: + psl: 1.9.0 + punycode: 2.3.1 + universalify: 0.2.0 + url-parse: 1.5.10 + tr46@0.0.3: {} tr46@1.0.1: @@ -14610,20 +14894,20 @@ snapshots: trough@2.1.0: {} - ts-api-utils@1.3.0(typescript@5.6.2): + ts-api-utils@1.3.0(typescript@5.6.3): dependencies: - typescript: 5.6.2 + typescript: 5.6.3 ts-interface-checker@0.1.13: {} - ts-node@10.9.2(@swc/core@1.7.26)(@types/node@18.19.50)(typescript@5.5.4): + ts-node@10.9.2(@swc/core@1.7.26)(@types/node@18.19.55)(typescript@5.5.4): dependencies: '@cspotcode/source-map-support': 0.8.1 '@tsconfig/node10': 1.0.11 '@tsconfig/node12': 1.0.11 '@tsconfig/node14': 1.0.3 '@tsconfig/node16': 1.0.4 - '@types/node': 18.19.50 + '@types/node': 18.19.55 acorn: 8.12.1 acorn-walk: 8.3.4 arg: 4.1.3 @@ -14636,21 +14920,21 @@ snapshots: optionalDependencies: '@swc/core': 1.7.26 - ts-node@10.9.2(@swc/core@1.7.26)(@types/node@22.5.5)(typescript@5.6.2): + ts-node@10.9.2(@swc/core@1.7.26)(@types/node@22.7.5)(typescript@5.6.3): dependencies: '@cspotcode/source-map-support': 0.8.1 '@tsconfig/node10': 1.0.11 '@tsconfig/node12': 1.0.11 '@tsconfig/node14': 1.0.3 '@tsconfig/node16': 1.0.4 - '@types/node': 22.5.5 + '@types/node': 22.7.5 acorn: 8.12.1 acorn-walk: 8.3.4 arg: 4.1.3 create-require: 1.1.1 diff: 4.0.2 make-error: 1.3.6 - typescript: 5.6.2 + typescript: 5.6.3 v8-compile-cache-lib: 3.0.1 yn: 3.1.1 optionalDependencies: @@ -14670,7 +14954,7 @@ snapshots: tslib@2.7.0: {} - tsup@8.3.0(@microsoft/api-extractor@7.47.9(@types/node@22.5.5))(@swc/core@1.7.26)(jiti@1.21.6)(postcss@8.4.47)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.5.1): + tsup@8.3.0(@microsoft/api-extractor@7.47.9(@types/node@22.7.5))(@swc/core@1.7.26)(jiti@2.3.3)(postcss@8.4.47)(tsx@4.19.1)(typescript@5.6.3)(yaml@2.5.1): dependencies: bundle-require: 5.0.0(esbuild@0.23.1) cac: 6.7.14 @@ -14681,7 +14965,7 @@ snapshots: execa: 5.1.1 joycon: 3.1.1 picocolors: 1.1.0 - postcss-load-config: 6.0.1(jiti@1.21.6)(postcss@8.4.47)(tsx@4.19.1)(yaml@2.5.1) + postcss-load-config: 6.0.1(jiti@2.3.3)(postcss@8.4.47)(tsx@4.19.1)(yaml@2.5.1) resolve-from: 5.0.0 rollup: 4.22.4 source-map: 0.8.0-beta.0 @@ -14689,10 +14973,10 @@ snapshots: tinyglobby: 0.2.6 tree-kill: 1.2.2 optionalDependencies: - '@microsoft/api-extractor': 7.47.9(@types/node@22.5.5) + '@microsoft/api-extractor': 7.47.9(@types/node@22.7.5) '@swc/core': 1.7.26 postcss: 8.4.47 - typescript: 5.6.2 + typescript: 5.6.3 transitivePeerDependencies: - jiti - supports-color @@ -14714,7 +14998,7 @@ snapshots: type-fest@0.21.3: {} - type-fest@4.20.0: {} + type-fest@4.26.1: {} type@2.7.3: {} @@ -14777,17 +15061,17 @@ snapshots: is-typed-array: 1.1.13 possible-typed-array-names: 1.0.0 - types-kit@0.0.11(typescript@5.6.2): + types-kit@0.0.11(typescript@5.6.3): dependencies: - typescript: 5.6.2 + typescript: 5.6.3 - typescript-eslint@8.6.0(eslint@9.11.0(jiti@1.21.6))(typescript@5.6.2): + typescript-eslint@8.8.1(eslint@9.12.0(jiti@2.3.3))(typescript@5.6.3): dependencies: - '@typescript-eslint/eslint-plugin': 8.6.0(@typescript-eslint/parser@8.6.0(eslint@9.11.0(jiti@1.21.6))(typescript@5.6.2))(eslint@9.11.0(jiti@1.21.6))(typescript@5.6.2) - '@typescript-eslint/parser': 8.6.0(eslint@9.11.0(jiti@1.21.6))(typescript@5.6.2) - '@typescript-eslint/utils': 8.6.0(eslint@9.11.0(jiti@1.21.6))(typescript@5.6.2) + '@typescript-eslint/eslint-plugin': 8.8.1(@typescript-eslint/parser@8.8.1(eslint@9.12.0(jiti@2.3.3))(typescript@5.6.3))(eslint@9.12.0(jiti@2.3.3))(typescript@5.6.3) + '@typescript-eslint/parser': 8.8.1(eslint@9.12.0(jiti@2.3.3))(typescript@5.6.3) + '@typescript-eslint/utils': 8.8.1(eslint@9.12.0(jiti@2.3.3))(typescript@5.6.3) optionalDependencies: - typescript: 5.6.2 + typescript: 5.6.3 transitivePeerDependencies: - eslint - supports-color @@ -14795,11 +15079,11 @@ snapshots: typescript-json-schema@0.65.1(@swc/core@1.7.26): dependencies: '@types/json-schema': 7.0.15 - '@types/node': 18.19.50 + '@types/node': 18.19.55 glob: 7.2.3 path-equal: 1.2.5 safe-stable-stringify: 2.5.0 - ts-node: 10.9.2(@swc/core@1.7.26)(@types/node@18.19.50)(typescript@5.5.4) + ts-node: 10.9.2(@swc/core@1.7.26)(@types/node@18.19.55)(typescript@5.5.4) typescript: 5.5.4 yargs: 17.7.2 transitivePeerDependencies: @@ -14811,7 +15095,7 @@ snapshots: typescript@5.5.4: {} - typescript@5.6.2: {} + typescript@5.6.3: {} unbox-primitive@1.0.2: dependencies: @@ -14828,6 +15112,10 @@ snapshots: dependencies: '@fastify/busboy': 2.1.1 + undici@5.28.4: + dependencies: + '@fastify/busboy': 2.1.1 + unherit@1.1.3: dependencies: inherits: 2.0.4 @@ -14922,6 +15210,8 @@ snapshots: universalify@0.1.2: {} + universalify@0.2.0: {} + unset-value@1.0.0: dependencies: has-value: 0.3.1 @@ -14933,9 +15223,9 @@ snapshots: escalade: 3.1.2 picocolors: 1.1.0 - update-browserslist-db@1.1.0(browserslist@4.23.3): + update-browserslist-db@1.1.1(browserslist@4.24.0): dependencies: - browserslist: 4.23.3 + browserslist: 4.24.0 escalade: 3.2.0 picocolors: 1.1.0 @@ -14945,6 +15235,11 @@ snapshots: urix@0.1.0: {} + url-parse@1.5.10: + dependencies: + querystringify: 2.2.0 + requires-port: 1.0.0 + use-sync-external-store@1.2.2(react@18.3.1): dependencies: react: 18.3.1 @@ -14953,8 +15248,6 @@ snapshots: util-deprecate@1.0.2: {} - uuid@8.3.2: {} - v8-compile-cache-lib@3.0.1: {} validate-npm-package-license@3.0.4: @@ -14990,23 +15283,23 @@ snapshots: '@types/unist': 3.0.3 vfile-message: 4.0.2 - vite@5.4.7(@types/node@18.19.50)(less@4.2.0)(lightningcss@1.27.0)(sass@1.78.0)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.47)): + vite@5.4.8(@types/node@18.19.55)(less@4.2.0)(lightningcss@1.27.0)(sass@1.79.4)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.47)): dependencies: esbuild: 0.21.5 postcss: 8.4.47 - rollup: 4.22.4 + rollup: 4.24.0 optionalDependencies: - '@types/node': 18.19.50 + '@types/node': 18.19.55 fsevents: 2.3.3 less: 4.2.0 lightningcss: 1.27.0 - sass: 1.78.0 + sass: 1.79.4 stylus: 0.63.0 sugarss: 4.0.1(postcss@8.4.47) - vitefu@0.2.5(vite@5.4.7(@types/node@18.19.50)(less@4.2.0)(lightningcss@1.27.0)(sass@1.78.0)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.47))): + vitefu@0.2.5(vite@5.4.8(@types/node@18.19.55)(less@4.2.0)(lightningcss@1.27.0)(sass@1.79.4)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.47))): optionalDependencies: - vite: 5.4.7(@types/node@18.19.50)(less@4.2.0)(lightningcss@1.27.0)(sass@1.78.0)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.47)) + vite: 5.4.8(@types/node@18.19.55)(less@4.2.0)(lightningcss@1.27.0)(sass@1.79.4)(stylus@0.63.0)(sugarss@4.0.1(postcss@8.4.47)) void-elements@3.1.0: {} @@ -15096,9 +15389,9 @@ snapshots: with@7.0.2: dependencies: - '@babel/parser': 7.25.6 - '@babel/types': 7.25.6 - assert-never: 1.2.1 + '@babel/parser': 7.25.7 + '@babel/types': 7.25.7 + assert-never: 1.3.0 babel-walk: 3.0.0-canary-5 word-wrap@1.2.5: {} @@ -15138,7 +15431,7 @@ snapshots: dependencies: mkdirp: 0.5.6 - ws@8.17.0(bufferutil@4.0.8): + ws@8.18.0(bufferutil@4.0.8): optionalDependencies: bufferutil: 4.0.8 @@ -15181,17 +15474,19 @@ snapshots: yocto-queue@1.1.1: {} + yoctocolors-cjs@2.1.2: {} + yootils@0.3.1: {} zrender@5.6.0: dependencies: tslib: 2.3.0 - zustand@4.5.5(@types/react@18.3.8)(immer@10.1.1)(react@18.3.1): + zustand@4.5.5(@types/react@18.3.11)(immer@10.1.1)(react@18.3.1): dependencies: use-sync-external-store: 1.2.2(react@18.3.1) optionalDependencies: - '@types/react': 18.3.8 + '@types/react': 18.3.11 immer: 10.1.1 react: 18.3.1 diff --git a/pyproject.toml b/pyproject.toml index fdad00df..a26cfde2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -21,7 +21,7 @@ keywords = [ "gradio-template-Chatbot", ] # Add dependencies here -dependencies = ["gradio>=4.0"] +dependencies = ["gradio>=4.0,<6.0"] classifiers = [ 'Development Status :: 3 - Alpha', 'License :: OSI Approved :: Apache Software License', From 334d7bfce906682eb3e69f9d6f6a543acc439d52 Mon Sep 17 00:00:00 2001 From: Col0ring <1561999073@qq.com> Date: Fri, 11 Oct 2024 18:42:09 +0800 Subject: [PATCH 20/51] feat: add slot params --- .../components/antd/auto_complete/__init__.py | 4 +- .../components/antd/cascader/__init__.py | 4 + .../components/antd/color_picker/__init__.py | 2 +- .../components/antd/date_picker/__init__.py | 2 + .../antd/date_picker/range_picker/__init__.py | 2 + .../components/antd/input/__init__.py | 3 +- .../antd/input/password/__init__.py | 7 +- .../components/antd/input/search/__init__.py | 8 +- .../antd/input/textarea/__init__.py | 2 +- .../components/antd/pagination/__init__.py | 2 +- .../components/antd/select/__init__.py | 1 + .../components/antd/time_picker/__init__.py | 2 + .../antd/time_picker/range_picker/__init__.py | 2 + .../components/antd/transfer/__init__.py | 7 +- .../components/antd/tree_select/__init__.py | 3 + .../components/antd/upload/__init__.py | 2 + .../antd/upload/dragger/__init__.py | 2 + .../legacy/MultimodalInput/__init__.py | 2 +- frontend/antd/auto-complete/Index.svelte | 8 +- frontend/antd/auto-complete/auto-complete.tsx | 19 ++++- frontend/antd/cascader/Index.svelte | 8 +- frontend/antd/cascader/cascader.tsx | 62 +++++++++++--- frontend/antd/color-picker/Index.svelte | 8 +- frontend/antd/color-picker/color-picker.tsx | 20 ++++- frontend/antd/date-picker/Index.svelte | 8 +- frontend/antd/date-picker/date-picker.tsx | 27 ++++-- .../date-picker/range-picker/Index.svelte | 8 +- .../range-picker/date-picker.range-picker.tsx | 30 +++++-- frontend/antd/form/form.tsx | 5 +- frontend/antd/form/item/form.item.tsx | 13 +++ frontend/antd/input/Index.svelte | 8 +- frontend/antd/input/input.tsx | 27 +++++- frontend/antd/input/password/Index.svelte | 10 ++- .../antd/input/password/input.password.tsx | 27 +++++- frontend/antd/input/search/Index.svelte | 10 ++- frontend/antd/input/search/input.search.tsx | 19 ++++- frontend/antd/input/textarea/Index.svelte | 10 ++- .../antd/input/textarea/input.textarea.tsx | 20 ++++- frontend/antd/pagination/Index.svelte | 9 +- frontend/antd/pagination/pagination.tsx | 15 +++- frontend/antd/rate/Index.svelte | 8 +- frontend/antd/rate/rate.tsx | 12 ++- frontend/antd/select/Index.svelte | 8 +- frontend/antd/select/select.tsx | 61 ++++++++++--- frontend/antd/steps/steps.tsx | 64 ++++++++------ frontend/antd/time-picker/Index.svelte | 8 +- .../time-picker/range-picker/Index.svelte | 9 +- .../range-picker/time-picker.range-picker.tsx | 18 +++- frontend/antd/time-picker/time-picker.tsx | 18 +++- frontend/antd/transfer/Index.svelte | 9 +- frontend/antd/transfer/transfer.tsx | 24 ++++-- frontend/antd/tree-select/Index.svelte | 8 +- frontend/antd/tree-select/tree-select.tsx | 42 +++++---- frontend/antd/upload/Index.svelte | 9 +- frontend/antd/upload/dragger/Index.svelte | 8 +- .../antd/upload/dragger/upload.dragger.tsx | 85 ++++++++++++++----- frontend/antd/upload/upload.tsx | 67 ++++++++++----- frontend/utils/renderParamsSlot.tsx | 2 +- 58 files changed, 683 insertions(+), 205 deletions(-) diff --git a/backend/modelscope_studio/components/antd/auto_complete/__init__.py b/backend/modelscope_studio/components/antd/auto_complete/__init__.py index 10bc909d..de869eb2 100644 --- a/backend/modelscope_studio/components/antd/auto_complete/__init__.py +++ b/backend/modelscope_studio/components/antd/auto_complete/__init__.py @@ -39,7 +39,9 @@ class AntdAutoComplete(ModelScopeDataLayoutComponent): ] # supported slots - SLOTS = ['allowClear.clearIcon', 'children', 'notFoundContent'] + SLOTS = [ + 'allowClear.clearIcon', 'dropdownRender', 'children', 'notFoundContent' + ] def __init__( self, diff --git a/backend/modelscope_studio/components/antd/cascader/__init__.py b/backend/modelscope_studio/components/antd/cascader/__init__.py index e7c8a4cc..cc6ba67e 100644 --- a/backend/modelscope_studio/components/antd/cascader/__init__.py +++ b/backend/modelscope_studio/components/antd/cascader/__init__.py @@ -39,6 +39,10 @@ class AntdCascader(ModelScopeDataLayoutComponent): 'notFoundContent', 'expandIcon', 'removeIcon', + 'displayRender', + 'tagRender', + 'dropdownRender', + 'showSearch.render', ] def __init__( diff --git a/backend/modelscope_studio/components/antd/color_picker/__init__.py b/backend/modelscope_studio/components/antd/color_picker/__init__.py index 1397d68c..061dd1a4 100644 --- a/backend/modelscope_studio/components/antd/color_picker/__init__.py +++ b/backend/modelscope_studio/components/antd/color_picker/__init__.py @@ -33,7 +33,7 @@ class AntdColorPicker(ModelScopeDataLayoutComponent): ] # supported slots - SLOTS = ["presets"] + SLOTS = ["presets", 'panelRender', 'showText'] def __init__( self, diff --git a/backend/modelscope_studio/components/antd/date_picker/__init__.py b/backend/modelscope_studio/components/antd/date_picker/__init__.py index f95b47d7..17df3dad 100644 --- a/backend/modelscope_studio/components/antd/date_picker/__init__.py +++ b/backend/modelscope_studio/components/antd/date_picker/__init__.py @@ -40,6 +40,8 @@ class AntdDatePicker(ModelScopeDataLayoutComponent): 'superNextIcon', 'superPrevIcon', 'renderExtraFooter', + 'cellRender', + 'panelRender', ] def __init__( diff --git a/backend/modelscope_studio/components/antd/date_picker/range_picker/__init__.py b/backend/modelscope_studio/components/antd/date_picker/range_picker/__init__.py index f36bbfd1..ec9cfe0d 100644 --- a/backend/modelscope_studio/components/antd/date_picker/range_picker/__init__.py +++ b/backend/modelscope_studio/components/antd/date_picker/range_picker/__init__.py @@ -37,6 +37,8 @@ class AntdDatePickerRangePicker(ModelScopeDataLayoutComponent): 'superPrevIcon', 'renderExtraFooter', 'separator', + 'cellRender', + 'panelRender', ] def __init__( diff --git a/backend/modelscope_studio/components/antd/input/__init__.py b/backend/modelscope_studio/components/antd/input/__init__.py index 7abc07f4..162f4057 100644 --- a/backend/modelscope_studio/components/antd/input/__init__.py +++ b/backend/modelscope_studio/components/antd/input/__init__.py @@ -34,7 +34,8 @@ class AntdInput(ModelScopeDataLayoutComponent): # supported slots SLOTS = [ - 'addonAfter', 'addonBefore', 'allowClear.clearIcon', 'prefix', 'suffix' + 'addonAfter', 'addonBefore', 'allowClear.clearIcon', 'prefix', + 'suffix', 'showCount.formatter' ] def __init__( diff --git a/backend/modelscope_studio/components/antd/input/password/__init__.py b/backend/modelscope_studio/components/antd/input/password/__init__.py index cc8153a5..ce4afbe1 100644 --- a/backend/modelscope_studio/components/antd/input/password/__init__.py +++ b/backend/modelscope_studio/components/antd/input/password/__init__.py @@ -28,11 +28,8 @@ class AntdInputPassword(ModelScopeDataLayoutComponent): # supported slots SLOTS = [ - 'addonAfter', - 'addonBefore', - 'allowClear.clearIcon', - 'prefix', - 'suffix', + 'addonAfter', 'addonBefore', 'allowClear.clearIcon', 'prefix', + 'suffix', 'showCount.formatter' ] def __init__( diff --git a/backend/modelscope_studio/components/antd/input/search/__init__.py b/backend/modelscope_studio/components/antd/input/search/__init__.py index 4a346894..e7e62667 100644 --- a/backend/modelscope_studio/components/antd/input/search/__init__.py +++ b/backend/modelscope_studio/components/antd/input/search/__init__.py @@ -28,12 +28,8 @@ class AntdInputSearch(ModelScopeDataLayoutComponent): # supported slots SLOTS = [ - 'addonAfter', - 'addonBefore', - 'allowClear.clearIcon', - 'prefix', - 'suffix', - 'enterButton', + 'addonAfter', 'addonBefore', 'allowClear.clearIcon', 'prefix', + 'suffix', 'enterButton', 'showCount.formatter' ] def __init__( diff --git a/backend/modelscope_studio/components/antd/input/textarea/__init__.py b/backend/modelscope_studio/components/antd/input/textarea/__init__.py index e8a56c67..2e754f7e 100644 --- a/backend/modelscope_studio/components/antd/input/textarea/__init__.py +++ b/backend/modelscope_studio/components/antd/input/textarea/__init__.py @@ -24,7 +24,7 @@ class AntdInputTextarea(ModelScopeDataLayoutComponent): ] # supported slots - SLOTS = ['allowClear.clearIcon'] + SLOTS = ['allowClear.clearIcon', 'showCount.formatter'] def __init__( self, diff --git a/backend/modelscope_studio/components/antd/pagination/__init__.py b/backend/modelscope_studio/components/antd/pagination/__init__.py index 9b8536a4..2cb9b5d3 100644 --- a/backend/modelscope_studio/components/antd/pagination/__init__.py +++ b/backend/modelscope_studio/components/antd/pagination/__init__.py @@ -27,7 +27,7 @@ class AntdPagination(ModelScopeDataLayoutComponent): ] # supported slots - SLOTS = ['showQuickJumper.goButton'] + SLOTS = ['showQuickJumper.goButton', 'itemRender'] data_model = PaginationData diff --git a/backend/modelscope_studio/components/antd/select/__init__.py b/backend/modelscope_studio/components/antd/select/__init__.py index e2cbd03d..3cb5c8d9 100644 --- a/backend/modelscope_studio/components/antd/select/__init__.py +++ b/backend/modelscope_studio/components/antd/select/__init__.py @@ -44,6 +44,7 @@ class AntdSelect(ModelScopeDataLayoutComponent): # supported slots SLOTS = [ 'allowClear.clearIcon', 'maxTagPlaceholder', 'menuItemSelectedIcon', + 'dropdownRender', 'optionRender', 'tagRender', 'labelRender', 'notFoundContent', 'removeIcon', 'suffixIcon', 'options' ] diff --git a/backend/modelscope_studio/components/antd/time_picker/__init__.py b/backend/modelscope_studio/components/antd/time_picker/__init__.py index 493b3f0b..1e48911e 100644 --- a/backend/modelscope_studio/components/antd/time_picker/__init__.py +++ b/backend/modelscope_studio/components/antd/time_picker/__init__.py @@ -35,6 +35,8 @@ class AntdTimePicker(ModelScopeDataLayoutComponent): 'superNextIcon', 'superPrevIcon', 'renderExtraFooter', + 'cellRender', + 'panelRender', ] def __init__( diff --git a/backend/modelscope_studio/components/antd/time_picker/range_picker/__init__.py b/backend/modelscope_studio/components/antd/time_picker/range_picker/__init__.py index c63f36fd..38b40103 100644 --- a/backend/modelscope_studio/components/antd/time_picker/range_picker/__init__.py +++ b/backend/modelscope_studio/components/antd/time_picker/range_picker/__init__.py @@ -37,6 +37,8 @@ class AntdTimePickerRangePicker(ModelScopeDataLayoutComponent): 'superPrevIcon', 'renderExtraFooter', 'separator', + 'cellRender', + 'panelRender', ] def __init__( diff --git a/backend/modelscope_studio/components/antd/transfer/__init__.py b/backend/modelscope_studio/components/antd/transfer/__init__.py index bbd65872..761f1f16 100644 --- a/backend/modelscope_studio/components/antd/transfer/__init__.py +++ b/backend/modelscope_studio/components/antd/transfer/__init__.py @@ -29,11 +29,8 @@ class AntdTransfer(ModelScopeDataLayoutComponent): # supported slots SLOTS = [ - 'selectionsIcon', - 'titles', - 'footer', - 'locale.notFoundContent', - 'selectAllLabels', + 'selectionsIcon', 'titles', 'footer', 'locale.notFoundContent', + 'selectAllLabels', 'render' ] def __init__( diff --git a/backend/modelscope_studio/components/antd/tree_select/__init__.py b/backend/modelscope_studio/components/antd/tree_select/__init__.py index 27801b9f..1d38f895 100644 --- a/backend/modelscope_studio/components/antd/tree_select/__init__.py +++ b/backend/modelscope_studio/components/antd/tree_select/__init__.py @@ -42,6 +42,9 @@ class AntdTreeSelect(ModelScopeDataLayoutComponent): 'notFoundContent', 'suffixIcon', 'switcherIcon', + 'dropdownRender', + 'tagRender', + 'treeTitleRender', ] def __init__( diff --git a/backend/modelscope_studio/components/antd/upload/__init__.py b/backend/modelscope_studio/components/antd/upload/__init__.py index 177d14c5..5edcdc58 100644 --- a/backend/modelscope_studio/components/antd/upload/__init__.py +++ b/backend/modelscope_studio/components/antd/upload/__init__.py @@ -49,6 +49,8 @@ class AntdUpload(ModelScopeDataLayoutComponent): 'showUploadList.previewIcon', 'showUploadList.removeIcon', 'showUploadList.downloadIcon', + 'iconRender', + 'itemRender', ] data_model = ListFiles diff --git a/backend/modelscope_studio/components/antd/upload/dragger/__init__.py b/backend/modelscope_studio/components/antd/upload/dragger/__init__.py index 0817298f..d291d675 100644 --- a/backend/modelscope_studio/components/antd/upload/dragger/__init__.py +++ b/backend/modelscope_studio/components/antd/upload/dragger/__init__.py @@ -46,6 +46,8 @@ class AntdUploadDragger(ModelScopeDataLayoutComponent): 'showUploadList.previewIcon', 'showUploadList.removeIcon', 'showUploadList.downloadIcon', + 'iconRender', + 'itemRender', ] data_model = ListFiles diff --git a/backend/modelscope_studio/components/legacy/MultimodalInput/__init__.py b/backend/modelscope_studio/components/legacy/MultimodalInput/__init__.py index c82b5a00..cde41580 100644 --- a/backend/modelscope_studio/components/legacy/MultimodalInput/__init__.py +++ b/backend/modelscope_studio/components/legacy/MultimodalInput/__init__.py @@ -208,7 +208,7 @@ def as_example(self, value.files[i].mime_type = client_utils.get_mimetype( value.files[i].path) # gradio fix - return {"files": value.files or [], "text": value.text} + return MultimodalInputData(text=value.text, files=value.files) def example_inputs(self) -> Any: return {"text": "Hello!!", "files": []} diff --git a/frontend/antd/auto-complete/Index.svelte b/frontend/antd/auto-complete/Index.svelte index 2ac25f8a..58657881 100644 --- a/frontend/antd/auto-complete/Index.svelte +++ b/frontend/antd/auto-complete/Index.svelte @@ -5,7 +5,11 @@ bindEvents, importComponent, } from '@svelte-preprocess-react/component'; - import { getSlotContext, getSlots } from '@svelte-preprocess-react/slot'; + import { + getSetSlotParamsFn, + getSlotContext, + getSlots, + } from '@svelte-preprocess-react/slot'; import type React from 'react'; import type { Gradio } from '@gradio/utils'; import cls from 'classnames'; @@ -55,6 +59,7 @@ value, restProps: $$restProps, }); + const setSlotParams = getSetSlotParamsFn(); const { options, default: children } = getItems(['options', 'default']); @@ -73,6 +78,7 @@ onValueChange={(v) => { value = v; }} + {setSlotParams} > diff --git a/frontend/antd/auto-complete/auto-complete.tsx b/frontend/antd/auto-complete/auto-complete.tsx index 48d6cd35..d45eb139 100644 --- a/frontend/antd/auto-complete/auto-complete.tsx +++ b/frontend/antd/auto-complete/auto-complete.tsx @@ -1,9 +1,11 @@ import { sveltify } from '@svelte-preprocess-react'; import { AutoCompleteContext } from '@svelte-preprocess-react/context'; import { ReactSlot } from '@svelte-preprocess-react/react-slot'; +import type { SetSlotParams } from '@svelte-preprocess-react/slot'; import { forwardRef, useMemo } from 'react'; import { useFunction } from '@utils/hooks/useFunction'; import { renderItems } from '@utils/renderItems'; +import { renderParamsSlot } from '@utils/renderParamsSlot'; import { AutoComplete as AAutoComplete, type GetProps } from 'antd'; import { type Item } from './context'; @@ -31,8 +33,9 @@ export const AutoComplete = sveltify< GetProps & { optionItems: Item[]; onValueChange: (value: string) => void; + setSlotParams: SetSlotParams; }, - ['allowClear.clearIcon', 'children', 'notFoundContent'] + ['allowClear.clearIcon', 'children', 'dropdownRender', 'notFoundContent'] >( ({ slots, @@ -45,6 +48,7 @@ export const AutoComplete = sveltify< getPopupContainer, dropdownRender, elRef, + setSlotParams, ...props }) => { const getPopupContainerFunction = useFunction(getPopupContainer); @@ -89,7 +93,18 @@ export const AutoComplete = sveltify< } filterOption={filterOptionFunction || filterOption} getPopupContainer={getPopupContainerFunction} - dropdownRender={dropdownRenderFunction} + dropdownRender={ + slots.dropdownRender + ? renderParamsSlot( + { + slots, + setSlotParams, + key: 'dropdownRender', + }, + { clone: true } + ) + : dropdownRenderFunction + } > {slots.children ? ( diff --git a/frontend/antd/cascader/Index.svelte b/frontend/antd/cascader/Index.svelte index aeeb0d28..9cdb2328 100644 --- a/frontend/antd/cascader/Index.svelte +++ b/frontend/antd/cascader/Index.svelte @@ -5,7 +5,11 @@ bindEvents, importComponent, } from '@svelte-preprocess-react/component'; - import { getSlotContext, getSlots } from '@svelte-preprocess-react/slot'; + import { + getSetSlotParamsFn, + getSlotContext, + getSlots, + } from '@svelte-preprocess-react/slot'; import type React from 'react'; import type { Gradio } from '@gradio/utils'; import cls from 'classnames'; @@ -55,6 +59,7 @@ value, restProps: $$restProps, }); + const setSlotParams = getSetSlotParamsFn(); const { default: children, options } = getItems(['default', 'options']); @@ -73,6 +78,7 @@ onValueChange={(v) => { value = v; }} + {setSlotParams} > diff --git a/frontend/antd/cascader/cascader.tsx b/frontend/antd/cascader/cascader.tsx index da2853a2..1dcbda4d 100644 --- a/frontend/antd/cascader/cascader.tsx +++ b/frontend/antd/cascader/cascader.tsx @@ -1,8 +1,10 @@ import { sveltify } from '@svelte-preprocess-react'; import { ReactSlot } from '@svelte-preprocess-react/react-slot'; +import type { SetSlotParams } from '@svelte-preprocess-react/slot'; import { useMemo } from 'react'; import { useFunction } from '@utils/hooks/useFunction'; import { renderItems } from '@utils/renderItems'; +import { renderParamsSlot } from '@utils/renderParamsSlot'; import { Cascader as ACascader, type CascaderProps } from 'antd'; import { type Item } from './context'; @@ -19,6 +21,7 @@ export const Cascader = sveltify< onValueChange: (value: string[] | number[]) => void; onLoadData?: (...args: any[]) => void; optionItems: Item[]; + setSlotParams: SetSlotParams; }, [ 'allowClear.clearIcon', @@ -27,6 +30,10 @@ export const Cascader = sveltify< 'notFoundContent', 'expandIcon', 'removeIcon', + 'displayRender', + 'tagRender', + 'dropdownRender', + 'showSearch.render', ] >( ({ @@ -45,6 +52,7 @@ export const Cascader = sveltify< showSearch, optionItems, options, + setSlotParams, ...props }) => { const getPopupContainerFunction = useFunction(getPopupContainer); @@ -53,7 +61,8 @@ export const Cascader = sveltify< const optionRenderFunction = useFunction(optionRender); const dropdownRenderFunction = useFunction(dropdownRender); const maxTagPlaceholderFunction = useFunction(maxTagPlaceholder); - const supportShowSearchConfig = typeof showSearch === 'object'; + const supportShowSearchConfig = + typeof showSearch === 'object' || slots['showSearch.render']; const showSearchConfig = getConfig(showSearch); const showSearchFilterFunction = useFunction(showSearchConfig.filter); const showSearchRenderFunction = useFunction(showSearchConfig.render); @@ -77,17 +86,47 @@ export const Cascader = sveltify< ? { ...showSearchConfig, filter: showSearchFilterFunction || showSearchConfig.filter, - render: showSearchRenderFunction || showSearchConfig.render, + render: slots['showSearch.render'] + ? renderParamsSlot({ + slots, + setSlotParams, + key: 'showSearch.render', + }) + : showSearchRenderFunction || showSearchConfig.render, sort: showSearchSortFunction || showSearchConfig.sort, } : showSearch } loadData={onLoadData} optionRender={optionRenderFunction} - dropdownRender={dropdownRenderFunction} getPopupContainer={getPopupContainerFunction} - displayRender={displayRenderFunction} - tagRender={tagRenderFunction} + dropdownRender={ + slots.dropdownRender + ? renderParamsSlot({ + slots, + setSlotParams, + key: 'dropdownRender', + }) + : dropdownRenderFunction + } + displayRender={ + slots.displayRender + ? renderParamsSlot({ + slots, + setSlotParams, + key: 'displayRender', + }) + : displayRenderFunction + } + tagRender={ + slots.tagRender + ? renderParamsSlot({ + slots, + setSlotParams, + key: 'tagRender', + }) + : tagRenderFunction + } onChange={(v, ...args) => { onChange?.(v, ...args); onValueChange(v); @@ -121,12 +160,13 @@ export const Cascader = sveltify< ) } maxTagPlaceholder={ - maxTagPlaceholderFunction || - (slots.maxTagPlaceholder ? ( - - ) : ( - maxTagPlaceholder - )) + slots.maxTagPlaceholder + ? renderParamsSlot({ + slots, + setSlotParams, + key: 'maxTagPlaceholder', + }) + : maxTagPlaceholderFunction || maxTagPlaceholder } allowClear={ slots['allowClear.clearIcon'] diff --git a/frontend/antd/color-picker/Index.svelte b/frontend/antd/color-picker/Index.svelte index 9f1a4729..d301d182 100644 --- a/frontend/antd/color-picker/Index.svelte +++ b/frontend/antd/color-picker/Index.svelte @@ -5,7 +5,11 @@ bindEvents, importComponent, } from '@svelte-preprocess-react/component'; - import { getSlotContext, getSlots } from '@svelte-preprocess-react/slot'; + import { + getSetSlotParamsFn, + getSlotContext, + getSlots, + } from '@svelte-preprocess-react/slot'; import type React from 'react'; import type { Gradio } from '@gradio/utils'; import cls from 'classnames'; @@ -56,6 +60,7 @@ value, restProps: $$restProps, }); + const setSlotParams = getSetSlotParamsFn(); const { presets } = getItems(['presets']); @@ -75,6 +80,7 @@ onValueChange={(v) => { value = v; }} + {setSlotParams} > diff --git a/frontend/antd/color-picker/color-picker.tsx b/frontend/antd/color-picker/color-picker.tsx index 035521e1..9d914c0f 100644 --- a/frontend/antd/color-picker/color-picker.tsx +++ b/frontend/antd/color-picker/color-picker.tsx @@ -1,8 +1,10 @@ import { sveltify } from '@svelte-preprocess-react'; +import type { SetSlotParams } from '@svelte-preprocess-react/slot'; import { useMemo } from 'react'; import { useFunction } from '@utils/hooks/useFunction'; import { useTargets } from '@utils/hooks/useTargets'; import { renderItems } from '@utils/renderItems'; +import { renderParamsSlot } from '@utils/renderParamsSlot'; import { ColorPicker as AColorPicker, type GetProps } from 'antd'; import { type Item } from './context'; @@ -13,7 +15,9 @@ export const ColorPicker = sveltify< onChange?: (value: string, ...args: any[]) => void; value_format: 'rgb' | 'hex' | 'hsb'; presetItems: Item[]; - } + setSlotParams: SetSlotParams; + }, + ['panelRender', 'showText'] >( ({ onValueChange, @@ -25,6 +29,8 @@ export const ColorPicker = sveltify< presetItems, children, value_format, + setSlotParams, + slots, ...props }) => { const panelRenderFunction = useFunction(panelRender); @@ -48,8 +54,16 @@ export const ColorPicker = sveltify< >(presetItems) ); }, [presets, presetItems])} - showText={showTextFunction} - panelRender={panelRenderFunction} + showText={ + slots.showText + ? renderParamsSlot({ slots, setSlotParams, key: 'showText' }) + : showTextFunction || showText + } + panelRender={ + slots.panelRender + ? renderParamsSlot({ slots, setSlotParams, key: 'panelRender' }) + : panelRenderFunction + } onChange={(v, ...args) => { const color = { rgb: v.toRgbString(), diff --git a/frontend/antd/date-picker/Index.svelte b/frontend/antd/date-picker/Index.svelte index 24d3c167..49074b0e 100644 --- a/frontend/antd/date-picker/Index.svelte +++ b/frontend/antd/date-picker/Index.svelte @@ -5,7 +5,11 @@ bindEvents, importComponent, } from '@svelte-preprocess-react/component'; - import { getSlotContext, getSlots } from '@svelte-preprocess-react/slot'; + import { + getSetSlotParamsFn, + getSlotContext, + getSlots, + } from '@svelte-preprocess-react/slot'; import type React from 'react'; import type { Gradio } from '@gradio/utils'; import cls from 'classnames'; @@ -57,6 +61,7 @@ value, restProps: $$restProps, }); + const setSlotParams = getSetSlotParamsFn(); const { presets } = getItems(['presets']); @@ -75,6 +80,7 @@ onValueChange={(val) => { value = val; }} + {setSlotParams} > diff --git a/frontend/antd/date-picker/date-picker.tsx b/frontend/antd/date-picker/date-picker.tsx index 3230666f..9b2316dc 100644 --- a/frontend/antd/date-picker/date-picker.tsx +++ b/frontend/antd/date-picker/date-picker.tsx @@ -1,8 +1,10 @@ import { sveltify } from '@svelte-preprocess-react'; import { ReactSlot } from '@svelte-preprocess-react/react-slot'; +import type { SetSlotParams } from '@svelte-preprocess-react/slot'; import { useMemo } from 'react'; import { useFunction } from '@utils/hooks/useFunction'; import { renderItems } from '@utils/renderItems'; +import { renderParamsSlot } from '@utils/renderParamsSlot'; import { DatePicker as ADatePicker, type GetProps } from 'antd'; import dayjs from 'dayjs'; @@ -43,6 +45,7 @@ export const DatePicker = sveltify< ) => void; onValueChange: (date: ReturnType) => void; presetItems: Item[]; + setSlotParams: SetSlotParams; }, [ 'allowClear.clearIcon', @@ -52,6 +55,8 @@ export const DatePicker = sveltify< 'superNextIcon', 'superPrevIcon', 'renderExtraFooter', + 'cellRender', + 'panelRender', ] >( ({ @@ -73,6 +78,7 @@ export const DatePicker = sveltify< onValueChange, onPanelChange, children, + setSlotParams, elRef, ...props }) => { @@ -124,8 +130,16 @@ export const DatePicker = sveltify< showTime={validShowTime} disabledDate={disabledDateFunction} getPopupContainer={getPopupContainerFunction} - cellRender={cellRenderFunction} - panelRender={panelRenderFunction} + cellRender={ + slots.cellRender + ? renderParamsSlot({ slots, setSlotParams, key: 'cellRender' }) + : cellRenderFunction + } + panelRender={ + slots.panelRender + ? renderParamsSlot({ slots, setSlotParams, key: 'panelRender' }) + : panelRenderFunction + } presets={useMemo(() => { return ( presets || @@ -150,10 +164,11 @@ export const DatePicker = sveltify< }} renderExtraFooter={ slots.renderExtraFooter - ? () => - slots.renderExtraFooter ? ( - - ) : null + ? renderParamsSlot({ + slots, + setSlotParams, + key: 'renderExtraFooter', + }) : props.renderExtraFooter } prevIcon={ diff --git a/frontend/antd/date-picker/range-picker/Index.svelte b/frontend/antd/date-picker/range-picker/Index.svelte index 2e6025b8..8388ad47 100644 --- a/frontend/antd/date-picker/range-picker/Index.svelte +++ b/frontend/antd/date-picker/range-picker/Index.svelte @@ -5,7 +5,11 @@ bindEvents, importComponent, } from '@svelte-preprocess-react/component'; - import { getSlotContext, getSlots } from '@svelte-preprocess-react/slot'; + import { + getSetSlotParamsFn, + getSlotContext, + getSlots, + } from '@svelte-preprocess-react/slot'; import type React from 'react'; import type { Gradio } from '@gradio/utils'; import cls from 'classnames'; @@ -59,6 +63,7 @@ value, restProps: $$restProps, }); + const setSlotParams = getSetSlotParamsFn(); const { presets } = getItems(['presets']); @@ -80,6 +85,7 @@ onValueChange={(val) => { value = val; }} + {setSlotParams} > diff --git a/frontend/antd/date-picker/range-picker/date-picker.range-picker.tsx b/frontend/antd/date-picker/range-picker/date-picker.range-picker.tsx index e8f74647..3847f372 100644 --- a/frontend/antd/date-picker/range-picker/date-picker.range-picker.tsx +++ b/frontend/antd/date-picker/range-picker/date-picker.range-picker.tsx @@ -1,8 +1,10 @@ import { sveltify } from '@svelte-preprocess-react'; import { ReactSlot } from '@svelte-preprocess-react/react-slot'; +import type { SetSlotParams } from '@svelte-preprocess-react/slot'; import { useMemo } from 'react'; import { useFunction } from '@utils/hooks/useFunction'; import { renderItems } from '@utils/renderItems'; +import { renderParamsSlot } from '@utils/renderParamsSlot'; import { DatePicker as ADatePicker, type GetProps } from 'antd'; import dayjs from 'dayjs'; @@ -38,6 +40,7 @@ export const DateRangePicker = sveltify< ) => void; onValueChange: (dates: [number | null, number | null]) => void; presetItems: Item[]; + setSlotParams: SetSlotParams; }, [ 'allowClear.clearIcon', @@ -48,6 +51,8 @@ export const DateRangePicker = sveltify< 'superPrevIcon', 'renderExtraFooter', 'separator', + 'cellRender', + 'panelRender', ] >( ({ @@ -70,8 +75,8 @@ export const DateRangePicker = sveltify< onPanelChange, onCalendarChange, children, + setSlotParams, elRef, - ...props }) => { const disabledDateFunction = useFunction(disabledDate); @@ -133,8 +138,16 @@ export const DateRangePicker = sveltify< showTime={validShowTime} disabledDate={disabledDateFunction} getPopupContainer={getPopupContainerFunction} - cellRender={cellRenderFunction} - panelRender={panelRenderFunction} + cellRender={ + slots.cellRender + ? renderParamsSlot({ slots, setSlotParams, key: 'cellRender' }) + : cellRenderFunction + } + panelRender={ + slots.panelRender + ? renderParamsSlot({ slots, setSlotParams, key: 'panelRender' }) + : panelRenderFunction + } presets={useMemo(() => { return ( presets || @@ -163,10 +176,11 @@ export const DateRangePicker = sveltify< }} renderExtraFooter={ slots.renderExtraFooter - ? () => - slots.renderExtraFooter ? ( - - ) : null + ? renderParamsSlot({ + slots, + setSlotParams, + key: 'renderExtraFooter', + }) : props.renderExtraFooter } prevIcon={ @@ -213,7 +227,7 @@ export const DateRangePicker = sveltify< } separator={ slots.separator ? ( - + ) : ( props.separator ) diff --git a/frontend/antd/form/form.tsx b/frontend/antd/form/form.tsx index 290a2c9f..3e6e24c4 100644 --- a/frontend/antd/form/form.tsx +++ b/frontend/antd/form/form.tsx @@ -1,5 +1,6 @@ import { sveltify } from '@svelte-preprocess-react'; import { useEffect } from 'react'; +import { useFunction } from '@utils/hooks/useFunction'; import { Form as AForm, type GetProps } from 'antd'; export const Form = sveltify< @@ -7,8 +8,9 @@ export const Form = sveltify< value: Record; onValueChange: (value: Record) => void; } ->(({ value, onValueChange, onValuesChange, ...props }) => { +>(({ value, onValueChange, onValuesChange, feedbackIcons, ...props }) => { const [form] = AForm.useForm(); + const feedbackIconsFunction = useFunction(feedbackIcons); useEffect(() => { form.setFieldsValue(value); }, [form, value]); @@ -17,6 +19,7 @@ export const Form = sveltify< {...props} initialValues={value} form={form} + feedbackIcons={feedbackIconsFunction} onValuesChange={(changedValues, values: any) => { onValueChange(values); onValuesChange?.(changedValues, values); diff --git a/frontend/antd/form/item/form.item.tsx b/frontend/antd/form/item/form.item.tsx index da7fca2b..513ff3ee 100644 --- a/frontend/antd/form/item/form.item.tsx +++ b/frontend/antd/form/item/form.item.tsx @@ -45,16 +45,21 @@ export const FormItem = sveltify< ruleItems, rules, children, + hasFeedback, ...props }) => { const supportTooltipConfig = slots['tooltip.icon'] || slots['tooltip.title'] || typeof tooltip === 'object'; + const supportHasFeedbackConfig = typeof hasFeedback === 'object'; + const hasFeedbackConfig = getConfig(hasFeedback); + const hasFeedbackIconsFunction = useFunction(hasFeedbackConfig.icons); const getValueFromEventFunction = useFunction(getValueFromEvent); const getValuePropsFunction = useFunction(getValueProps); const normalizeFunction = useFunction(normalize); const shouldUpdateFunction = useFunction(shouldUpdate); + const tooltipConfig = getConfig(tooltip); const tooltipAfterOpenChangeFunction = useFunction( tooltipConfig.afterOpenChange @@ -65,6 +70,14 @@ export const FormItem = sveltify< return ( { value = v; }} + {setSlotParams} > diff --git a/frontend/antd/input/input.tsx b/frontend/antd/input/input.tsx index db0e7135..90507ecf 100644 --- a/frontend/antd/input/input.tsx +++ b/frontend/antd/input/input.tsx @@ -1,13 +1,23 @@ import { sveltify } from '@svelte-preprocess-react'; import { ReactSlot } from '@svelte-preprocess-react/react-slot'; +import type { SetSlotParams } from '@svelte-preprocess-react/slot'; import { useFunction } from '@utils/hooks/useFunction'; +import { renderParamsSlot } from '@utils/renderParamsSlot'; import { type GetProps, Input as AInput } from 'antd'; export const Input = sveltify< GetProps & { onValueChange: (value: string) => void; + setSlotParams: SetSlotParams; }, - ['addonAfter', 'addonBefore', 'allowClear.clearIcon', 'prefix', 'suffix'] + [ + 'addonAfter', + 'addonBefore', + 'allowClear.clearIcon', + 'prefix', + 'suffix', + 'showCount.formatter', + ] >( ({ slots, @@ -16,6 +26,7 @@ export const Input = sveltify< showCount, onValueChange, onChange, + setSlotParams, elRef, ...props }) => { @@ -36,11 +47,19 @@ export const Input = sveltify< onValueChange(e.target.value); }} showCount={ - typeof showCount === 'object' && showCountFunction + slots['showCount.formatter'] ? { - formatter: showCountFunction, + formatter: renderParamsSlot({ + slots, + setSlotParams, + key: 'showCount.formatter', + }), } - : showCount + : typeof showCount === 'object' && showCountFunction + ? { + formatter: showCountFunction, + } + : showCount } count={{ ...count, diff --git a/frontend/antd/input/password/Index.svelte b/frontend/antd/input/password/Index.svelte index e50222d4..ebde2452 100644 --- a/frontend/antd/input/password/Index.svelte +++ b/frontend/antd/input/password/Index.svelte @@ -5,7 +5,11 @@ bindEvents, importComponent, } from '@svelte-preprocess-react/component'; - import { getSlotContext, getSlots } from '@svelte-preprocess-react/slot'; + import { + getSetSlotParamsFn, + getSlotContext, + getSlots, + } from '@svelte-preprocess-react/slot'; import type React from 'react'; import type { Gradio } from '@gradio/utils'; import cls from 'classnames'; @@ -43,6 +47,9 @@ restProps: $$restProps, }); const slots = getSlots(); + + const setSlotParams = getSetSlotParamsFn(); + $: update({ gradio, props: $updatedProps, @@ -71,6 +78,7 @@ onValueChange={(v) => { value = v; }} + {setSlotParams} > diff --git a/frontend/antd/input/password/input.password.tsx b/frontend/antd/input/password/input.password.tsx index 7e036514..bc9e95aa 100644 --- a/frontend/antd/input/password/input.password.tsx +++ b/frontend/antd/input/password/input.password.tsx @@ -1,13 +1,23 @@ import { sveltify } from '@svelte-preprocess-react'; import { ReactSlot } from '@svelte-preprocess-react/react-slot'; +import type { SetSlotParams } from '@svelte-preprocess-react/slot'; import { useFunction } from '@utils/hooks/useFunction'; +import { renderParamsSlot } from '@utils/renderParamsSlot'; import { type GetProps, Input as AInput } from 'antd'; export const InputPassword = sveltify< GetProps & { onValueChange: (value: string) => void; + setSlotParams: SetSlotParams; }, - ['addonAfter', 'addonBefore', 'allowClear.clearIcon', 'prefix', 'suffix'] + [ + 'addonAfter', + 'addonBefore', + 'allowClear.clearIcon', + 'prefix', + 'suffix', + 'showCount.formatter', + ] >( ({ slots, @@ -17,6 +27,7 @@ export const InputPassword = sveltify< onValueChange, onChange, elRef, + setSlotParams, ...props }) => { const countStrategyFunction = useFunction(count?.strategy); @@ -37,11 +48,19 @@ export const InputPassword = sveltify< onValueChange(e.target.value); }} showCount={ - typeof showCount === 'object' && showCountFunction + slots['showCount.formatter'] ? { - formatter: showCountFunction, + formatter: renderParamsSlot({ + slots, + setSlotParams, + key: 'showCount.formatter', + }), } - : showCount + : typeof showCount === 'object' && showCountFunction + ? { + formatter: showCountFunction, + } + : showCount } count={{ ...count, diff --git a/frontend/antd/input/search/Index.svelte b/frontend/antd/input/search/Index.svelte index 30984550..bb6caba2 100644 --- a/frontend/antd/input/search/Index.svelte +++ b/frontend/antd/input/search/Index.svelte @@ -5,7 +5,11 @@ bindEvents, importComponent, } from '@svelte-preprocess-react/component'; - import { getSlotContext, getSlots } from '@svelte-preprocess-react/slot'; + import { + getSetSlotParamsFn, + getSlotContext, + getSlots, + } from '@svelte-preprocess-react/slot'; import type React from 'react'; import type { Gradio } from '@gradio/utils'; import cls from 'classnames'; @@ -40,7 +44,10 @@ value, restProps: $$restProps, }); + const slots = getSlots(); + const setSlotParams = getSetSlotParamsFn(); + $: update({ gradio, props: $updatedProps, @@ -69,6 +76,7 @@ onValueChange={(v) => { value = v; }} + {setSlotParams} > diff --git a/frontend/antd/input/search/input.search.tsx b/frontend/antd/input/search/input.search.tsx index 573c760b..debfbe4b 100644 --- a/frontend/antd/input/search/input.search.tsx +++ b/frontend/antd/input/search/input.search.tsx @@ -1,11 +1,14 @@ import { sveltify } from '@svelte-preprocess-react'; import { ReactSlot } from '@svelte-preprocess-react/react-slot'; +import type { SetSlotParams } from '@svelte-preprocess-react/slot'; import { useFunction } from '@utils/hooks/useFunction'; +import { renderParamsSlot } from '@utils/renderParamsSlot'; import { type GetProps, Input as AInput } from 'antd'; export const InputSearch = sveltify< GetProps & { onValueChange: (value: string) => void; + setSlotParams: SetSlotParams; }, [ 'addonAfter', @@ -14,6 +17,7 @@ export const InputSearch = sveltify< 'prefix', 'suffix', 'enterButton', + 'showCount.formatter', ] >( ({ @@ -24,6 +28,7 @@ export const InputSearch = sveltify< onValueChange, onChange, elRef, + setSlotParams, ...props }) => { const countStrategyFunction = useFunction(count?.strategy); @@ -44,11 +49,19 @@ export const InputSearch = sveltify< onValueChange(e.target.value); }} showCount={ - typeof showCount === 'object' && showCountFunction + slots['showCount.formatter'] ? { - formatter: showCountFunction, + formatter: renderParamsSlot({ + slots, + setSlotParams, + key: 'showCount.formatter', + }), } - : showCount + : typeof showCount === 'object' && showCountFunction + ? { + formatter: showCountFunction, + } + : showCount } count={{ ...count, diff --git a/frontend/antd/input/textarea/Index.svelte b/frontend/antd/input/textarea/Index.svelte index e174f66d..bdb536a6 100644 --- a/frontend/antd/input/textarea/Index.svelte +++ b/frontend/antd/input/textarea/Index.svelte @@ -5,7 +5,11 @@ bindEvents, importComponent, } from '@svelte-preprocess-react/component'; - import { getSlotContext, getSlots } from '@svelte-preprocess-react/slot'; + import { + getSetSlotParamsFn, + getSlotContext, + getSlots, + } from '@svelte-preprocess-react/slot'; import type React from 'react'; import type { Gradio } from '@gradio/utils'; import cls from 'classnames'; @@ -43,6 +47,9 @@ restProps: $$restProps, }); const slots = getSlots(); + + const setSlotParams = getSetSlotParamsFn(); + $: update({ gradio, props: $updatedProps, @@ -71,6 +78,7 @@ onValueChange={(v) => { value = v; }} + {setSlotParams} > diff --git a/frontend/antd/input/textarea/input.textarea.tsx b/frontend/antd/input/textarea/input.textarea.tsx index 5ecd159b..3c44bde9 100644 --- a/frontend/antd/input/textarea/input.textarea.tsx +++ b/frontend/antd/input/textarea/input.textarea.tsx @@ -1,13 +1,16 @@ import { sveltify } from '@svelte-preprocess-react'; import { ReactSlot } from '@svelte-preprocess-react/react-slot'; +import type { SetSlotParams } from '@svelte-preprocess-react/slot'; import { useFunction } from '@utils/hooks/useFunction'; +import { renderParamsSlot } from '@utils/renderParamsSlot'; import { type GetProps, Input as AInput } from 'antd'; export const InputTextarea = sveltify< GetProps & { onValueChange: (value: string) => void; + setSlotParams: SetSlotParams; }, - ['allowClear.clearIcon'] + ['allowClear.clearIcon', 'showCount.formatter'] >( ({ slots, @@ -17,6 +20,7 @@ export const InputTextarea = sveltify< onValueChange, onChange, elRef, + setSlotParams, ...props }) => { const countStrategyFunction = useFunction(count?.strategy); @@ -37,11 +41,19 @@ export const InputTextarea = sveltify< onValueChange(e.target.value); }} showCount={ - typeof showCount === 'object' && showCountFunction + slots['showCount.formatter'] ? { - formatter: showCountFunction, + formatter: renderParamsSlot({ + slots, + setSlotParams, + key: 'showCount.formatter', + }), } - : showCount + : typeof showCount === 'object' && showCountFunction + ? { + formatter: showCountFunction, + } + : showCount } count={{ ...count, diff --git a/frontend/antd/pagination/Index.svelte b/frontend/antd/pagination/Index.svelte index 0297c989..8ce664dd 100644 --- a/frontend/antd/pagination/Index.svelte +++ b/frontend/antd/pagination/Index.svelte @@ -5,7 +5,11 @@ bindEvents, importComponent, } from '@svelte-preprocess-react/component'; - import { getSlotContext, getSlots } from '@svelte-preprocess-react/slot'; + import { + getSetSlotParamsFn, + getSlotContext, + getSlots, + } from '@svelte-preprocess-react/slot'; import type React from 'react'; import type { Gradio } from '@gradio/utils'; import cls from 'classnames'; @@ -42,7 +46,7 @@ value, restProps: $$restProps, }); - + const setSlotParams = getSetSlotParamsFn(); const slots = getSlots(); $: update({ gradio, @@ -81,6 +85,7 @@ page_size: pageSize, }; }} + {setSlotParams} > diff --git a/frontend/antd/pagination/pagination.tsx b/frontend/antd/pagination/pagination.tsx index fe8296a0..becb29ff 100644 --- a/frontend/antd/pagination/pagination.tsx +++ b/frontend/antd/pagination/pagination.tsx @@ -1,15 +1,18 @@ import { sveltify } from '@svelte-preprocess-react'; import { ReactSlot } from '@svelte-preprocess-react/react-slot'; +import type { SetSlotParams } from '@svelte-preprocess-react/slot'; import React from 'react'; import { useFunction } from '@utils/hooks/useFunction'; +import { renderParamsSlot } from '@utils/renderParamsSlot'; import { type GetProps, Pagination as APagination } from 'antd'; export const Pagination = sveltify< GetProps & { onValueChange: (page: number, pageSize: number) => void; children?: React.ReactNode; + setSlotParams: SetSlotParams; }, - ['showQuickJumper.goButton'] + ['showQuickJumper.goButton', 'itemRender'] >( ({ slots, @@ -19,6 +22,7 @@ export const Pagination = sveltify< onChange, children, itemRender, + setSlotParams, ...props }) => { const itemRenderFunction = useFunction(itemRender); @@ -29,7 +33,14 @@ export const Pagination = sveltify< { onValueChange(page, pageSize); onChange?.(page, pageSize); diff --git a/frontend/antd/rate/Index.svelte b/frontend/antd/rate/Index.svelte index aaef6a13..6e9098ca 100644 --- a/frontend/antd/rate/Index.svelte +++ b/frontend/antd/rate/Index.svelte @@ -5,7 +5,11 @@ bindEvents, importComponent, } from '@svelte-preprocess-react/component'; - import { getSlotContext, getSlots } from '@svelte-preprocess-react/slot'; + import { + getSetSlotParamsFn, + getSlotContext, + getSlots, + } from '@svelte-preprocess-react/slot'; import type React from 'react'; import type { Gradio } from '@gradio/utils'; import cls from 'classnames'; @@ -41,6 +45,7 @@ restProps: $$restProps, }); const slots = getSlots(); + const setSlotParams = getSetSlotParamsFn(); $: update({ gradio, props: $updatedProps, @@ -69,6 +74,7 @@ onValueChange={(v) => { value = v; }} + {setSlotParams} > diff --git a/frontend/antd/rate/rate.tsx b/frontend/antd/rate/rate.tsx index 0e75da25..f7058eeb 100644 --- a/frontend/antd/rate/rate.tsx +++ b/frontend/antd/rate/rate.tsx @@ -1,11 +1,13 @@ import { sveltify } from '@svelte-preprocess-react'; -import { ReactSlot } from '@svelte-preprocess-react/react-slot'; +import type { SetSlotParams } from '@svelte-preprocess-react/slot'; +import { renderParamsSlot } from '@utils/renderParamsSlot'; import { type GetProps, Rate as ARate } from 'antd'; export const Rate = sveltify< GetProps & { onValueChange: (value: number) => void; children?: React.ReactNode; + setSlotParams: SetSlotParams; }, ['character'] >( @@ -15,6 +17,7 @@ export const Rate = sveltify< onValueChange, character, onChange, + setSlotParams, elRef, ...props }) => { @@ -29,7 +32,12 @@ export const Rate = sveltify< onValueChange(v); }} character={ - slots.character ? : character + slots.character + ? renderParamsSlot( + { slots, setSlotParams, key: 'character' }, + { clone: true } + ) + : character } /> diff --git a/frontend/antd/select/Index.svelte b/frontend/antd/select/Index.svelte index 0163a6f4..2d3ff656 100644 --- a/frontend/antd/select/Index.svelte +++ b/frontend/antd/select/Index.svelte @@ -5,7 +5,11 @@ bindEvents, importComponent, } from '@svelte-preprocess-react/component'; - import { getSlotContext, getSlots } from '@svelte-preprocess-react/slot'; + import { + getSetSlotParamsFn, + getSlotContext, + getSlots, + } from '@svelte-preprocess-react/slot'; import type React from 'react'; import type { Gradio } from '@gradio/utils'; import cls from 'classnames'; @@ -55,6 +59,7 @@ value, restProps: $$restProps, }); + const setSlotParams = getSetSlotParamsFn(); const { options, default: children } = getItems(['options', 'default']); @@ -73,6 +78,7 @@ onValueChange={(v) => { value = v; }} + {setSlotParams} > diff --git a/frontend/antd/select/select.tsx b/frontend/antd/select/select.tsx index a86b913f..0bad4408 100644 --- a/frontend/antd/select/select.tsx +++ b/frontend/antd/select/select.tsx @@ -1,8 +1,10 @@ import { sveltify } from '@svelte-preprocess-react'; import { ReactSlot } from '@svelte-preprocess-react/react-slot'; +import type { SetSlotParams } from '@svelte-preprocess-react/slot'; import { useMemo } from 'react'; import { useFunction } from '@utils/hooks/useFunction'; import { renderItems } from '@utils/renderItems'; +import { renderParamsSlot } from '@utils/renderParamsSlot'; import { type GetProps, Select as ASelect } from 'antd'; import { type Item } from './context'; @@ -11,6 +13,7 @@ export const Select = sveltify< GetProps & { optionItems: Item[]; onValueChange: (value: string | number | (string | number)[]) => void; + setSlotParams: SetSlotParams; }, [ 'allowClear.clearIcon', @@ -19,6 +22,10 @@ export const Select = sveltify< 'notFoundContent', 'removeIcon', 'suffixIcon', + 'dropdownRender', + 'optionRender', + 'tagRender', + 'labelRender', ] >( ({ @@ -37,6 +44,7 @@ export const Select = sveltify< filterSort, maxTagPlaceholder, elRef, + setSlotParams, ...props }) => { const getPopupContainerFunction = useFunction(getPopupContainer); @@ -106,18 +114,51 @@ export const Select = sveltify< } filterOption={filterOptionFunction || filterOption} maxTagPlaceholder={ - maxTagPlaceholderFunction || - (slots.maxTagPlaceholder ? ( - - ) : ( - maxTagPlaceholder - )) + slots.maxTagPlaceholder + ? renderParamsSlot({ + slots, + setSlotParams, + key: 'maxTagPlaceholder', + }) + : maxTagPlaceholderFunction } getPopupContainer={getPopupContainerFunction} - dropdownRender={dropdownRenderFunction} - optionRender={optionRenderFunction} - tagRender={tagRenderFunction} - labelRender={labelRenderFunction} + dropdownRender={ + slots.dropdownRender + ? renderParamsSlot({ + slots, + setSlotParams, + key: 'dropdownRender', + }) + : dropdownRenderFunction + } + optionRender={ + slots.optionRender + ? renderParamsSlot({ + slots, + setSlotParams, + key: 'optionRender', + }) + : optionRenderFunction + } + tagRender={ + slots.tagRender + ? renderParamsSlot({ + slots, + setSlotParams, + key: 'tagRender', + }) + : tagRenderFunction + } + labelRender={ + slots.labelRender + ? renderParamsSlot({ + slots, + setSlotParams, + key: 'labelRender', + }) + : labelRenderFunction + } filterSort={filterSortFunction} /> diff --git a/frontend/antd/steps/steps.tsx b/frontend/antd/steps/steps.tsx index 90e616bb..fd078ceb 100644 --- a/frontend/antd/steps/steps.tsx +++ b/frontend/antd/steps/steps.tsx @@ -1,6 +1,7 @@ import { sveltify } from '@svelte-preprocess-react'; import type { SetSlotParams } from '@svelte-preprocess-react/slot'; import React, { useMemo } from 'react'; +import { useFunction } from '@utils/hooks/useFunction'; import { renderItems } from '@utils/renderItems'; import { renderParamsSlot } from '@utils/renderParamsSlot'; import { type GetProps, Steps as ASteps } from 'antd'; @@ -13,31 +14,42 @@ export const Steps = sveltify< setSlotParams: SetSlotParams; }, ['progressDot'] ->(({ slots, items, slotItems, setSlotParams, children, ...props }) => { - return ( - <> -
{children}
- { - return ( - items || - renderItems['items']>[number]>( - slotItems - ) - ); - }, [items, slotItems])} - progressDot={ - slots.progressDot - ? renderParamsSlot( - { slots, setSlotParams, key: 'progressDot' }, - { clone: true } - ) - : props.progressDot - } - /> - - ); -}); +>( + ({ + slots, + items, + slotItems, + setSlotParams, + children, + progressDot, + ...props + }) => { + const progressDotFunction = useFunction(progressDot); + return ( + <> +
{children}
+ { + return ( + items || + renderItems< + NonNullable['items']>[number] + >(slotItems) + ); + }, [items, slotItems])} + progressDot={ + slots.progressDot + ? renderParamsSlot( + { slots, setSlotParams, key: 'progressDot' }, + { clone: true } + ) + : progressDotFunction || progressDot + } + /> + + ); + } +); export default Steps; diff --git a/frontend/antd/time-picker/Index.svelte b/frontend/antd/time-picker/Index.svelte index 3e08ffdc..5f606f75 100644 --- a/frontend/antd/time-picker/Index.svelte +++ b/frontend/antd/time-picker/Index.svelte @@ -5,7 +5,11 @@ bindEvents, importComponent, } from '@svelte-preprocess-react/component'; - import { getSlotContext, getSlots } from '@svelte-preprocess-react/slot'; + import { + getSetSlotParamsFn, + getSlotContext, + getSlots, + } from '@svelte-preprocess-react/slot'; import type React from 'react'; import type { Gradio } from '@gradio/utils'; import cls from 'classnames'; @@ -42,6 +46,7 @@ restProps: $$restProps, }); + const setSlotParams = getSetSlotParamsFn(); const slots = getSlots(); $: update({ gradio, @@ -71,6 +76,7 @@ onValueChange={(val) => { value = val; }} + {setSlotParams} > diff --git a/frontend/antd/time-picker/range-picker/Index.svelte b/frontend/antd/time-picker/range-picker/Index.svelte index 9f4fc938..60021229 100644 --- a/frontend/antd/time-picker/range-picker/Index.svelte +++ b/frontend/antd/time-picker/range-picker/Index.svelte @@ -5,7 +5,11 @@ bindEvents, importComponent, } from '@svelte-preprocess-react/component'; - import { getSlotContext, getSlots } from '@svelte-preprocess-react/slot'; + import { + getSetSlotParamsFn, + getSlotContext, + getSlots, + } from '@svelte-preprocess-react/slot'; import type React from 'react'; import type { Gradio } from '@gradio/utils'; import cls from 'classnames'; @@ -43,7 +47,7 @@ value, restProps: $$restProps, }); - + const setSlotParams = getSetSlotParamsFn(); const slots = getSlots(); $: update({ gradio, @@ -76,6 +80,7 @@ onValueChange={(val) => { value = val; }} + {setSlotParams} > diff --git a/frontend/antd/time-picker/range-picker/time-picker.range-picker.tsx b/frontend/antd/time-picker/range-picker/time-picker.range-picker.tsx index 8244417f..ed952a15 100644 --- a/frontend/antd/time-picker/range-picker/time-picker.range-picker.tsx +++ b/frontend/antd/time-picker/range-picker/time-picker.range-picker.tsx @@ -1,7 +1,9 @@ import { sveltify } from '@svelte-preprocess-react'; import { ReactSlot } from '@svelte-preprocess-react/react-slot'; +import type { SetSlotParams } from '@svelte-preprocess-react/slot'; import { useMemo } from 'react'; import { useFunction } from '@utils/hooks/useFunction'; +import { renderParamsSlot } from '@utils/renderParamsSlot'; import { type GetProps, TimePicker as ATimePicker } from 'antd'; import dayjs from 'dayjs'; @@ -34,6 +36,7 @@ export const TimeRangePicker = sveltify< ...args: any[] ) => void; onValueChange: (dates: [number | null, number | null]) => void; + setSlotParams: SetSlotParams; }, [ 'allowClear.clearIcon', @@ -44,6 +47,8 @@ export const TimeRangePicker = sveltify< 'superPrevIcon', 'renderExtraFooter', 'separator', + 'cellRender', + 'panelRender', ] >( ({ @@ -64,6 +69,7 @@ export const TimeRangePicker = sveltify< onPanelChange, onCalendarChange, children, + setSlotParams, elRef, ...props }) => { @@ -118,8 +124,16 @@ export const TimeRangePicker = sveltify< maxDate={validMaxDate} disabledDate={disabledDateFunction} getPopupContainer={getPopupContainerFunction} - cellRender={cellRenderFunction} - panelRender={panelRenderFunction} + cellRender={ + slots.cellRender + ? renderParamsSlot({ slots, setSlotParams, key: 'cellRender' }) + : cellRenderFunction + } + panelRender={ + slots.panelRender + ? renderParamsSlot({ slots, setSlotParams, key: 'panelRender' }) + : panelRenderFunction + } onPanelChange={(dates, ...args) => { const formattedDates = formatDates(dates); onPanelChange?.(formattedDates, ...args); diff --git a/frontend/antd/time-picker/time-picker.tsx b/frontend/antd/time-picker/time-picker.tsx index e6237c5c..39f78f1d 100644 --- a/frontend/antd/time-picker/time-picker.tsx +++ b/frontend/antd/time-picker/time-picker.tsx @@ -1,7 +1,9 @@ import { sveltify } from '@svelte-preprocess-react'; import { ReactSlot } from '@svelte-preprocess-react/react-slot'; +import type { SetSlotParams } from '@svelte-preprocess-react/slot'; import { useMemo } from 'react'; import { useFunction } from '@utils/hooks/useFunction'; +import { renderParamsSlot } from '@utils/renderParamsSlot'; import { type GetProps, TimePicker as ATimePicker } from 'antd'; import dayjs from 'dayjs'; @@ -43,6 +45,7 @@ export const TimePicker = sveltify< ...args: any[] ) => void; onValueChange: (date: number | string) => void; + setSlotParams: SetSlotParams; }, [ 'allowClear.clearIcon', @@ -52,6 +55,8 @@ export const TimePicker = sveltify< 'superNextIcon', 'superPrevIcon', 'renderExtraFooter', + 'cellRender', + 'panelRender', ] >( ({ @@ -72,6 +77,7 @@ export const TimePicker = sveltify< onPanelChange, onCalendarChange, children, + setSlotParams, elRef, ...props }) => { @@ -113,8 +119,16 @@ export const TimePicker = sveltify< disabledTime={disabledTimeFunction} disabledDate={disabledDateFunction} getPopupContainer={getPopupContainerFunction} - cellRender={cellRenderFunction} - panelRender={panelRenderFunction} + cellRender={ + slots.cellRender + ? renderParamsSlot({ slots, setSlotParams, key: 'cellRender' }) + : cellRenderFunction + } + panelRender={ + slots.panelRender + ? renderParamsSlot({ slots, setSlotParams, key: 'panelRender' }) + : panelRenderFunction + } onPanelChange={(date, ...args) => { const formattedDates = formatDate(date); onPanelChange?.(formattedDates, ...args); diff --git a/frontend/antd/transfer/Index.svelte b/frontend/antd/transfer/Index.svelte index 804de883..00385d3c 100644 --- a/frontend/antd/transfer/Index.svelte +++ b/frontend/antd/transfer/Index.svelte @@ -5,7 +5,11 @@ bindEvents, importComponent, } from '@svelte-preprocess-react/component'; - import { getSlotContext, getSlots } from '@svelte-preprocess-react/slot'; + import { + getSetSlotParamsFn, + getSlotContext, + getSlots, + } from '@svelte-preprocess-react/slot'; import type React from 'react'; import type { Gradio } from '@gradio/utils'; import cls from 'classnames'; @@ -38,7 +42,7 @@ value, restProps: $$restProps, }); - + const setSlotParams = getSetSlotParamsFn(); const slots = getSlots(); $: update({ gradio, @@ -69,6 +73,7 @@ onValueChange={(v) => { value = v; }} + {setSlotParams} > diff --git a/frontend/antd/transfer/transfer.tsx b/frontend/antd/transfer/transfer.tsx index a2188588..ba4cd1a9 100644 --- a/frontend/antd/transfer/transfer.tsx +++ b/frontend/antd/transfer/transfer.tsx @@ -1,14 +1,17 @@ import { sveltify } from '@svelte-preprocess-react'; import { ReactSlot } from '@svelte-preprocess-react/react-slot'; +import type { SetSlotParams } from '@svelte-preprocess-react/slot'; import React from 'react'; import { useFunction } from '@utils/hooks/useFunction'; import { useTargets } from '@utils/hooks/useTargets'; +import { renderParamsSlot } from '@utils/renderParamsSlot'; import { type GetProps, Transfer as ATransfer } from 'antd'; export const Transfer = sveltify< GetProps & { children?: React.ReactNode; onValueChange: (value: (string | number)[]) => void; + setSlotParams: SetSlotParams; }, [ 'selectionsIcon', @@ -16,6 +19,7 @@ export const Transfer = sveltify< 'footer', 'locale.notFoundContent', 'selectAllLabels', + 'render', ] >( ({ @@ -28,6 +32,7 @@ export const Transfer = sveltify< locale, onChange, onValueChange, + setSlotParams, ...props }) => { const titles = useTargets(children, 'titles'); @@ -63,18 +68,19 @@ export const Transfer = sveltify< : locale } render={ - renderFunction || - ((item) => ({ - label: item.title || item.label, - value: item.value || item.title || item.label, - })) + slots.render + ? renderParamsSlot({ slots, setSlotParams, key: 'render' }) + : renderFunction || + ((item) => ({ + label: item.title || item.label, + value: item.value || item.title || item.label, + })) } filterOption={filterOptionFunction} footer={ - footerFunction || - (slots.footer - ? () => (slots.footer ? : null) - : footer) + slots.footer + ? renderParamsSlot({ slots, setSlotParams, key: 'footer' }) + : footerFunction || footer } titles={ titles.length > 0 diff --git a/frontend/antd/tree-select/Index.svelte b/frontend/antd/tree-select/Index.svelte index 645f8858..c3ce72c7 100644 --- a/frontend/antd/tree-select/Index.svelte +++ b/frontend/antd/tree-select/Index.svelte @@ -5,7 +5,11 @@ bindEvents, importComponent, } from '@svelte-preprocess-react/component'; - import { getSlotContext, getSlots } from '@svelte-preprocess-react/slot'; + import { + getSetSlotParamsFn, + getSlotContext, + getSlots, + } from '@svelte-preprocess-react/slot'; import type React from 'react'; import type { Gradio } from '@gradio/utils'; import cls from 'classnames'; @@ -54,6 +58,7 @@ value, restProps: $$restProps, }); + const setSlotParams = getSetSlotParamsFn(); const { treeData, default: children } = getItems(['default', 'treeData']); @@ -72,6 +77,7 @@ onValueChange={(val) => { value = val; }} + {setSlotParams} > diff --git a/frontend/antd/tree-select/tree-select.tsx b/frontend/antd/tree-select/tree-select.tsx index 703e16c3..54a0c9f9 100644 --- a/frontend/antd/tree-select/tree-select.tsx +++ b/frontend/antd/tree-select/tree-select.tsx @@ -1,9 +1,11 @@ import { sveltify } from '@svelte-preprocess-react'; import { ReactSlot } from '@svelte-preprocess-react/react-slot'; +import type { SetSlotParams } from '@svelte-preprocess-react/slot'; import React, { useMemo } from 'react'; import { useFunction } from '@utils/hooks/useFunction'; import { omitUndefinedProps } from '@utils/omitUndefinedProps'; import { renderItems } from '@utils/renderItems'; +import { renderParamsSlot } from '@utils/renderParamsSlot'; import { type GetProps, TreeSelect as ATreeSelect } from 'antd'; import { type Item } from './context'; @@ -14,6 +16,7 @@ export const TreeSelect = sveltify< TreeSelectProps & { slotItems: Item[]; onValueChange: (options: string | string[]) => void; + setSlotParams: SetSlotParams; }, [ 'allowClear.clearIcon', @@ -21,6 +24,9 @@ export const TreeSelect = sveltify< 'notFoundContent', 'suffixIcon', 'switcherIcon', + 'dropdownRender', + 'tagRender', + 'treeTitleRender', ] >( ({ @@ -37,6 +43,7 @@ export const TreeSelect = sveltify< slotItems, maxTagPlaceholder, elRef, + setSlotParams, ...props }) => { const filterTreeNodeFunction = useFunction(filterTreeNode); @@ -54,7 +61,9 @@ export const TreeSelect = sveltify< renderItems[number]>( slotItems ), - dropdownRender: dropdownRenderFunction, + dropdownRender: slots.dropdownRender + ? renderParamsSlot({ slots, setSlotParams, key: 'dropdownRender' }) + : dropdownRenderFunction, allowClear: slots['allowClear.clearIcon'] ? { clearIcon: , @@ -65,22 +74,24 @@ export const TreeSelect = sveltify< ) : ( props.suffixIcon ), - switcherIcon: slots.switcherIcon ? ( - - ) : ( - props.switcherIcon - ), + switcherIcon: slots.switcherIcon + ? renderParamsSlot({ slots, setSlotParams, key: 'switcherIcon' }) + : props.switcherIcon, getPopupContainer: getPopupContainerFunction, - tagRender: tagRenderFunction, - treeTitleRender: treeTitleRenderFunction, + tagRender: slots.tagRender + ? renderParamsSlot({ slots, setSlotParams, key: 'tagRender' }) + : tagRenderFunction, + treeTitleRender: slots.treeTitleRender + ? renderParamsSlot({ slots, setSlotParams, key: 'treeTitleRender' }) + : treeTitleRenderFunction, filterTreeNode: filterTreeNodeFunction || filterTreeNode, - maxTagPlaceholder: - maxTagPlaceholderFunction || - (slots.maxTagPlaceholder ? ( - - ) : ( - maxTagPlaceholder - )), + maxTagPlaceholder: slots.maxTagPlaceholder + ? renderParamsSlot({ + slots, + setSlotParams, + key: 'maxTagPlaceholder', + }) + : maxTagPlaceholderFunction || maxTagPlaceholder, notFoundContent: slots.notFoundContent ? ( ) : ( @@ -95,6 +106,7 @@ export const TreeSelect = sveltify< maxTagPlaceholder, maxTagPlaceholderFunction, props, + setSlotParams, slotItems, slots, tagRenderFunction, diff --git a/frontend/antd/upload/Index.svelte b/frontend/antd/upload/Index.svelte index d8440505..48afd352 100644 --- a/frontend/antd/upload/Index.svelte +++ b/frontend/antd/upload/Index.svelte @@ -5,7 +5,11 @@ bindEvents, importComponent, } from '@svelte-preprocess-react/component'; - import { getSlotContext, getSlots } from '@svelte-preprocess-react/slot'; + import { + getSetSlotParamsFn, + getSlotContext, + getSlots, + } from '@svelte-preprocess-react/slot'; import type React from 'react'; import { type FileData, prepare_files } from '@gradio/client'; import type { Gradio } from '@gradio/utils'; @@ -40,7 +44,7 @@ as_item, restProps: $$restProps, }); - + const setSlotParams = getSetSlotParamsFn(); const slots = getSlots(); $: update({ gradio, @@ -76,6 +80,7 @@ (await gradio.client.upload(await prepare_files(files), root)) || [] ); }} + {setSlotParams} > diff --git a/frontend/antd/upload/dragger/Index.svelte b/frontend/antd/upload/dragger/Index.svelte index 6e59de74..0c75d548 100644 --- a/frontend/antd/upload/dragger/Index.svelte +++ b/frontend/antd/upload/dragger/Index.svelte @@ -5,7 +5,11 @@ bindEvents, importComponent, } from '@svelte-preprocess-react/component'; - import { getSlotContext, getSlots } from '@svelte-preprocess-react/slot'; + import { + getSetSlotParamsFn, + getSlotContext, + getSlots, + } from '@svelte-preprocess-react/slot'; import type React from 'react'; import { type FileData, prepare_files } from '@gradio/client'; import type { Gradio } from '@gradio/utils'; @@ -42,6 +46,7 @@ as_item, restProps: $$restProps, }); + const setSlotParams = getSetSlotParamsFn(); const slots = getSlots(); $: update({ @@ -78,6 +83,7 @@ (await gradio.client.upload(await prepare_files(files), root)) || [] ); }} + {setSlotParams} > diff --git a/frontend/antd/upload/dragger/upload.dragger.tsx b/frontend/antd/upload/dragger/upload.dragger.tsx index 95d78d70..a8bafb09 100644 --- a/frontend/antd/upload/dragger/upload.dragger.tsx +++ b/frontend/antd/upload/dragger/upload.dragger.tsx @@ -1,8 +1,9 @@ import { sveltify } from '@svelte-preprocess-react'; -import { ReactSlot } from '@svelte-preprocess-react/react-slot'; +import type { SetSlotParams } from '@svelte-preprocess-react/slot'; import { useMemo } from 'react'; import type { FileData } from '@gradio/client'; import { useFunction } from '@utils/hooks/useFunction'; +import { renderParamsSlot } from '@utils/renderParamsSlot'; import { type GetProps, Upload as AUpload } from 'antd'; function getConfig(value: T): Partial> { @@ -17,12 +18,15 @@ export const UploadDragger = sveltify< onChange?: (value: string[]) => void; upload: (files: File[]) => Promise<(FileData | null)[]>; fileList: FileData[]; + setSlotParams: SetSlotParams; }, [ 'showUploadList.extra', 'showUploadList.previewIcon', 'showUploadList.removeIcon', 'showUploadList.downloadIcon', + 'iconRender', + 'itemRender', ] >( ({ @@ -41,6 +45,7 @@ export const UploadDragger = sveltify< onValueChange, onRemove, fileList, + setSlotParams, ...props }) => { const supportShowUploadListConfig = @@ -50,6 +55,15 @@ export const UploadDragger = sveltify< slots['showUploadList.extra'] || typeof showUploadList === 'object'; const showUploadListConfig = getConfig(showUploadList); + const showUploadListShowPreviewIconFunction = useFunction( + showUploadListConfig.showPreviewIcon + ); + const showUploadListShowRemoveIconFunction = useFunction( + showUploadListConfig.showRemoveIcon + ); + const showUploadListShowDownloadIconFunction = useFunction( + showUploadListConfig.showDownloadIcon + ); const beforeUploadFunction = useFunction(beforeUpload); const customRequestFunction = useFunction(customRequest); const progressFormatFunction = useFunction(progress?.format); @@ -75,8 +89,16 @@ export const UploadDragger = sveltify< data={dataFunction || data} previewFile={previewFileFunction} isImageUrl={isImageUrlFunction} - itemRender={itemRenderFunction} - iconRender={iconRenderFunction} + itemRender={ + slots.itemRender + ? renderParamsSlot({ slots, setSlotParams, key: 'itemRender' }) + : itemRenderFunction + } + iconRender={ + slots.iconRender + ? renderParamsSlot({ slots, setSlotParams, key: 'iconRender' }) + : iconRenderFunction + } onRemove={(file) => { onRemove?.(file); const index = validFileList.findIndex((v) => v.uid === file.uid); @@ -115,26 +137,43 @@ export const UploadDragger = sveltify< supportShowUploadListConfig ? { ...showUploadListConfig, - downloadIcon: slots['showUploadList.downloadIcon'] ? ( - - ) : ( - showUploadListConfig.downloadIcon - ), - removeIcon: slots['showUploadList.removeIcon'] ? ( - - ) : ( - showUploadListConfig.removeIcon - ), - previewIcon: slots['showUploadList.previewIcon'] ? ( - - ) : ( - showUploadListConfig.previewIcon - ), - extra: slots['showUploadList.extra'] ? ( - - ) : ( - showUploadListConfig.extra - ), + showDownloadIcon: + showUploadListShowDownloadIconFunction || + showUploadListConfig.showDownloadIcon, + showRemoveIcon: + showUploadListShowRemoveIconFunction || + showUploadListConfig.showRemoveIcon, + showPreviewIcon: + showUploadListShowPreviewIconFunction || + showUploadListConfig.showPreviewIcon, + downloadIcon: slots['showUploadList.downloadIcon'] + ? renderParamsSlot({ + slots, + setSlotParams, + key: 'showUploadList.downloadIcon', + }) + : showUploadListConfig.downloadIcon, + removeIcon: slots['showUploadList.removeIcon'] + ? renderParamsSlot({ + slots, + setSlotParams, + key: 'showUploadList.removeIcon', + }) + : showUploadListConfig.removeIcon, + previewIcon: slots['showUploadList.previewIcon'] + ? renderParamsSlot({ + slots, + setSlotParams, + key: 'showUploadList.previewIcon', + }) + : showUploadListConfig.previewIcon, + extra: slots['showUploadList.extra'] + ? renderParamsSlot({ + slots, + setSlotParams, + key: 'showUploadList.extra', + }) + : showUploadListConfig.extra, } : showUploadList } diff --git a/frontend/antd/upload/upload.tsx b/frontend/antd/upload/upload.tsx index 39515b2e..31236005 100644 --- a/frontend/antd/upload/upload.tsx +++ b/frontend/antd/upload/upload.tsx @@ -1,8 +1,9 @@ import { sveltify } from '@svelte-preprocess-react'; -import { ReactSlot } from '@svelte-preprocess-react/react-slot'; +import type { SetSlotParams } from '@svelte-preprocess-react/slot'; import { useMemo } from 'react'; import type { FileData } from '@gradio/client'; import { useFunction } from '@utils/hooks/useFunction'; +import { renderParamsSlot } from '@utils/renderParamsSlot'; import { type GetProps, Upload as AUpload } from 'antd'; function getConfig(value: T): Partial> { @@ -17,12 +18,15 @@ export const Upload = sveltify< onChange?: (value: string[]) => void; upload: (files: File[]) => Promise<(FileData | null)[]>; fileList: FileData[]; + setSlotParams: SetSlotParams; }, [ 'showUploadList.extra', 'showUploadList.previewIcon', 'showUploadList.removeIcon', 'showUploadList.downloadIcon', + 'iconRender', + 'itemRender', ] >( ({ @@ -41,6 +45,7 @@ export const Upload = sveltify< onValueChange, onRemove, fileList, + setSlotParams, ...props }) => { const supportShowUploadListConfig = @@ -84,8 +89,16 @@ export const Upload = sveltify< data={dataFunction || data} previewFile={previewFileFunction} isImageUrl={isImageUrlFunction} - itemRender={itemRenderFunction} - iconRender={iconRenderFunction} + itemRender={ + slots.itemRender + ? renderParamsSlot({ slots, setSlotParams, key: 'itemRender' }) + : itemRenderFunction + } + iconRender={ + slots.iconRender + ? renderParamsSlot({ slots, setSlotParams, key: 'iconRender' }) + : iconRenderFunction + } onRemove={(file) => { onRemove?.(file); const index = validFileList.findIndex((v) => v.uid === file.uid); @@ -133,26 +146,34 @@ export const Upload = sveltify< showPreviewIcon: showUploadListShowPreviewIconFunction || showUploadListConfig.showPreviewIcon, - downloadIcon: slots['showUploadList.downloadIcon'] ? ( - - ) : ( - showUploadListConfig.downloadIcon - ), - removeIcon: slots['showUploadList.removeIcon'] ? ( - - ) : ( - showUploadListConfig.removeIcon - ), - previewIcon: slots['showUploadList.previewIcon'] ? ( - - ) : ( - showUploadListConfig.previewIcon - ), - extra: slots['showUploadList.extra'] ? ( - - ) : ( - showUploadListConfig.extra - ), + downloadIcon: slots['showUploadList.downloadIcon'] + ? renderParamsSlot({ + slots, + setSlotParams, + key: 'showUploadList.downloadIcon', + }) + : showUploadListConfig.downloadIcon, + removeIcon: slots['showUploadList.removeIcon'] + ? renderParamsSlot({ + slots, + setSlotParams, + key: 'showUploadList.removeIcon', + }) + : showUploadListConfig.removeIcon, + previewIcon: slots['showUploadList.previewIcon'] + ? renderParamsSlot({ + slots, + setSlotParams, + key: 'showUploadList.previewIcon', + }) + : showUploadListConfig.previewIcon, + extra: slots['showUploadList.extra'] + ? renderParamsSlot({ + slots, + setSlotParams, + key: 'showUploadList.extra', + }) + : showUploadListConfig.extra, } : showUploadList } diff --git a/frontend/utils/renderParamsSlot.tsx b/frontend/utils/renderParamsSlot.tsx index 3d0996e4..3ed74ea7 100644 --- a/frontend/utils/renderParamsSlot.tsx +++ b/frontend/utils/renderParamsSlot.tsx @@ -16,6 +16,6 @@ export function renderParamsSlot( ) { return (...args: any[]) => { setSlotParams(key, args); - return renderSlot(slots[key], options); + return renderSlot(slots[key], { clone: true, ...options }); }; } From 11c1c1c8302470360bedc6f8eb52d5ffd06d7cf6 Mon Sep 17 00:00:00 2001 From: Col0ring <1561999073@qq.com> Date: Tue, 15 Oct 2024 12:05:27 +0800 Subject: [PATCH 21/51] feat: complete the render function for slots --- .../components/antd/calendar/__init__.py | 3 + .../components/antd/drawer/__init__.py | 7 +- .../components/antd/image/__init__.py | 8 ++- .../components/antd/list/__init__.py | 2 +- .../components/antd/modal/__init__.py | 12 +--- .../components/antd/qr_code/__init__.py | 3 + .../components/antd/statistic/__init__.py | 2 +- .../components/antd/table/__init__.py | 2 + .../components/antd/table/column/__init__.py | 2 +- .../antd/table/expandable/__init__.py | 5 +- .../antd/table/row_selection/__init__.py | 1 + .../components/antd/tabs/__init__.py | 2 +- frontend/antd/calendar/Index.svelte | 9 ++- frontend/antd/calendar/calendar.tsx | 29 +++++++- frontend/antd/collapse/Index.svelte | 8 ++- frontend/antd/collapse/collapse.tsx | 10 +-- frontend/antd/drawer/Index.svelte | 8 ++- frontend/antd/drawer/drawer.tsx | 67 ++++++++++++------- frontend/antd/image/Index.svelte | 8 ++- frontend/antd/image/image.tsx | 44 ++++++++++-- frontend/antd/list/Index.svelte | 9 ++- frontend/antd/list/list.tsx | 17 ++++- frontend/antd/modal/Index.svelte | 8 ++- frontend/antd/modal/modal.tsx | 20 +++++- frontend/antd/qr-code/Index.svelte | 9 ++- frontend/antd/qr-code/qr-code.tsx | 22 +++++- frontend/antd/statistic/Index.svelte | 9 ++- frontend/antd/statistic/statistic.tsx | 13 +++- frontend/antd/table/Index.svelte | 8 ++- frontend/antd/table/column/Index.svelte | 11 ++- .../antd/table/expandable/Expandable.svelte | 23 ++++--- .../table/row-selection/RowSelection.svelte | 19 ++++-- frontend/antd/table/table.tsx | 31 +++++++-- frontend/antd/tabs/Index.svelte | 8 ++- frontend/antd/tabs/tabs.tsx | 16 +++++ frontend/antd/tree/Index.svelte | 8 ++- .../antd/tree/directory-tree/Index.svelte | 9 ++- frontend/antd/tree/tree-node/Index.svelte | 10 ++- frontend/antd/tree/tree.tsx | 27 ++++++-- 39 files changed, 397 insertions(+), 112 deletions(-) diff --git a/backend/modelscope_studio/components/antd/calendar/__init__.py b/backend/modelscope_studio/components/antd/calendar/__init__.py index 09b7cd4a..c26bb589 100644 --- a/backend/modelscope_studio/components/antd/calendar/__init__.py +++ b/backend/modelscope_studio/components/antd/calendar/__init__.py @@ -24,6 +24,9 @@ class AntdCalendar(ModelScopeComponent): bind_select_event=True)) ] + # supported slots + SLOTS = ['cellRender', 'fullCellRender', 'headerRender'] + def __init__( self, value: int | str | float | None = None, diff --git a/backend/modelscope_studio/components/antd/drawer/__init__.py b/backend/modelscope_studio/components/antd/drawer/__init__.py index ec783e36..76e36100 100644 --- a/backend/modelscope_studio/components/antd/drawer/__init__.py +++ b/backend/modelscope_studio/components/antd/drawer/__init__.py @@ -17,12 +17,7 @@ class AntdDrawer(ModelScopeLayoutComponent): ] # supported slots - SLOTS = [ - 'closeIcon', - 'extra', - 'footer', - 'title', - ] + SLOTS = ['closeIcon', 'extra', 'footer', 'title', 'drawerRender'] def __init__( self, diff --git a/backend/modelscope_studio/components/antd/image/__init__.py b/backend/modelscope_studio/components/antd/image/__init__.py index 8153992b..ac93b01a 100644 --- a/backend/modelscope_studio/components/antd/image/__init__.py +++ b/backend/modelscope_studio/components/antd/image/__init__.py @@ -26,7 +26,13 @@ class AntdImage(ModelScopeLayoutComponent): ] # supported slots - SLOTS = ['placeholder', 'preview.mask', 'preview.closeIcon'] + SLOTS = [ + 'placeholder', + 'preview.mask', + 'preview.closeIcon', + 'preview.toolbarRender', + 'preview.imageRender', + ] def __init__( self, diff --git a/backend/modelscope_studio/components/antd/list/__init__.py b/backend/modelscope_studio/components/antd/list/__init__.py index ba398cc6..af4d20bd 100644 --- a/backend/modelscope_studio/components/antd/list/__init__.py +++ b/backend/modelscope_studio/components/antd/list/__init__.py @@ -22,7 +22,7 @@ class AntdList(ModelScopeLayoutComponent): ] # supported slots - SLOTS = ['footer', 'header', 'loadMore'] + SLOTS = ['footer', 'header', 'loadMore', 'renderItem'] def __init__( self, diff --git a/backend/modelscope_studio/components/antd/modal/__init__.py b/backend/modelscope_studio/components/antd/modal/__init__.py index a1601872..ed5a9749 100644 --- a/backend/modelscope_studio/components/antd/modal/__init__.py +++ b/backend/modelscope_studio/components/antd/modal/__init__.py @@ -21,15 +21,9 @@ class AntdModal(ModelScopeLayoutComponent): # supported slots SLOTS = [ - 'closeIcon', - 'cancelButtonProps.icon', - 'cancelText', - 'closable.closeIcon', - 'closeIcon', - 'footer', - 'title', - 'okButtonProps.icon', - 'okText', + 'closeIcon', 'cancelButtonProps.icon', 'cancelText', + 'closable.closeIcon', 'closeIcon', 'footer', 'title', + 'okButtonProps.icon', 'okText', 'modalRender' ] def __init__( diff --git a/backend/modelscope_studio/components/antd/qr_code/__init__.py b/backend/modelscope_studio/components/antd/qr_code/__init__.py index 51f610d6..cd9a9fbf 100644 --- a/backend/modelscope_studio/components/antd/qr_code/__init__.py +++ b/backend/modelscope_studio/components/antd/qr_code/__init__.py @@ -17,6 +17,9 @@ class AntdQRCode(ModelScopeComponent): bind_refresh_event=True)), ] + # supported slots + SLOTS = ["statusRender"] + def __init__( self, value: str | None = None, diff --git a/backend/modelscope_studio/components/antd/statistic/__init__.py b/backend/modelscope_studio/components/antd/statistic/__init__.py index 79b74743..9788e5fd 100644 --- a/backend/modelscope_studio/components/antd/statistic/__init__.py +++ b/backend/modelscope_studio/components/antd/statistic/__init__.py @@ -12,7 +12,7 @@ class AntdStatistic(ModelScopeLayoutComponent): EVENTS = [] # supported slots - SLOTS = ['prefix', 'suffix', 'title'] + SLOTS = ['prefix', 'suffix', 'title', 'formatter'] def __init__( self, diff --git a/backend/modelscope_studio/components/antd/table/__init__.py b/backend/modelscope_studio/components/antd/table/__init__.py index a712b9ef..3a233e1d 100644 --- a/backend/modelscope_studio/components/antd/table/__init__.py +++ b/backend/modelscope_studio/components/antd/table/__init__.py @@ -39,11 +39,13 @@ class AntdTable(ModelScopeLayoutComponent): SLOTS = [ 'footer', 'title', + 'summary', "expandable", "rowSelection" 'loading.tip', 'loading.indicator', 'pagination.showQuickJumper.goButton', + 'pagination.itemRender', 'showSorterTooltip.title', ] diff --git a/backend/modelscope_studio/components/antd/table/column/__init__.py b/backend/modelscope_studio/components/antd/table/column/__init__.py index 2ee06604..87137eb6 100644 --- a/backend/modelscope_studio/components/antd/table/column/__init__.py +++ b/backend/modelscope_studio/components/antd/table/column/__init__.py @@ -16,7 +16,7 @@ class AntdTableColumn(ModelScopeLayoutComponent): # supported slots SLOTS = [ - 'filterDropdown', 'filterIcon', 'title', 'sortIcon', + 'filterDropdown', 'filterIcon', 'render', 'title', 'sortIcon', 'showSorterTooltip.title' ] diff --git a/backend/modelscope_studio/components/antd/table/expandable/__init__.py b/backend/modelscope_studio/components/antd/table/expandable/__init__.py index 7a10ecca..87196eb6 100644 --- a/backend/modelscope_studio/components/antd/table/expandable/__init__.py +++ b/backend/modelscope_studio/components/antd/table/expandable/__init__.py @@ -21,10 +21,7 @@ class AntdTableExpandable(ModelScopeDataLayoutComponent): ] # supported slots - SLOTS = [ - 'columnTitle', - 'expandIcon', - ] + SLOTS = ['columnTitle', 'expandIcon', 'expandedRowRender'] def __init__( self, diff --git a/backend/modelscope_studio/components/antd/table/row_selection/__init__.py b/backend/modelscope_studio/components/antd/table/row_selection/__init__.py index 64746137..871bbcdf 100644 --- a/backend/modelscope_studio/components/antd/table/row_selection/__init__.py +++ b/backend/modelscope_studio/components/antd/table/row_selection/__init__.py @@ -38,6 +38,7 @@ class AntdTableRowSelection(ModelScopeDataLayoutComponent): # supported slots SLOTS = [ 'columnTitle', + 'renderCell', 'selections', ] diff --git a/backend/modelscope_studio/components/antd/tabs/__init__.py b/backend/modelscope_studio/components/antd/tabs/__init__.py index b0cc1b4a..0339fd3b 100644 --- a/backend/modelscope_studio/components/antd/tabs/__init__.py +++ b/backend/modelscope_studio/components/antd/tabs/__init__.py @@ -30,7 +30,7 @@ class AntdTabs(ModelScopeDataLayoutComponent): # supported slots SLOTS = [ - 'addIcon', 'removeIcon', 'tabBarExtraContent', + 'addIcon', 'removeIcon', 'renderTabBar', 'tabBarExtraContent', 'tabBarExtraContent.left', 'tabBarExtraContent.right', 'more.icon', 'items' ] diff --git a/frontend/antd/calendar/Index.svelte b/frontend/antd/calendar/Index.svelte index edcf180c..e5b45b82 100644 --- a/frontend/antd/calendar/Index.svelte +++ b/frontend/antd/calendar/Index.svelte @@ -5,7 +5,11 @@ bindEvents, importComponent, } from '@svelte-preprocess-react/component'; - import { getSlotContext, getSlots } from '@svelte-preprocess-react/slot'; + import { + getSetSlotParamsFn, + getSlotContext, + getSlots, + } from '@svelte-preprocess-react/slot'; import type React from 'react'; import type { Gradio } from '@gradio/utils'; import cls from 'classnames'; @@ -41,7 +45,7 @@ value, restProps: $$restProps, }); - + const setSlotParams = getSetSlotParamsFn(); const slots = getSlots(); $: update({ gradio, @@ -71,6 +75,7 @@ onValueChange={(val) => { value = val; }} + {setSlotParams} > diff --git a/frontend/antd/calendar/calendar.tsx b/frontend/antd/calendar/calendar.tsx index 71a5b40e..8a705495 100644 --- a/frontend/antd/calendar/calendar.tsx +++ b/frontend/antd/calendar/calendar.tsx @@ -1,6 +1,8 @@ import { sveltify } from '@svelte-preprocess-react'; +import type { SetSlotParams } from '@svelte-preprocess-react/slot'; import { useMemo } from 'react'; import { useFunction } from '@utils/hooks/useFunction'; +import { renderParamsSlot } from '@utils/renderParamsSlot'; import { Calendar as ACalendar, type GetProps } from 'antd'; import dayjs from 'dayjs'; @@ -19,7 +21,9 @@ export const Calendar = sveltify< onPanelChange?: (date: number, ...args: any[]) => void; onSelect?: (date: number, ...args: any[]) => void; onValueChange: (date: number) => void; - } + setSlotParams: SetSlotParams; + }, + ['cellRender', 'fullCellRender', 'headerRender'] >( ({ disabledDate, @@ -30,9 +34,17 @@ export const Calendar = sveltify< onPanelChange, onSelect, onValueChange, + setSlotParams, + cellRender, + fullCellRender, + headerRender, + slots, ...props }) => { const disabledDateFunction = useFunction(disabledDate); + const cellRenderFunction = useFunction(cellRender); + const fullCellRenderFunction = useFunction(fullCellRender); + const headerRenderFunction = useFunction(headerRender); const validValue = useMemo(() => { return value ? formatDayjs(value) : undefined; }, [value]); @@ -51,6 +63,21 @@ export const Calendar = sveltify< defaultValue={validDefaultValue} validRange={validValidRange} disabledDate={disabledDateFunction} + cellRender={ + slots.cellRender + ? renderParamsSlot({ slots, setSlotParams, key: 'cellRender' }) + : cellRenderFunction + } + fullCellRender={ + slots.fullCellRender + ? renderParamsSlot({ slots, setSlotParams, key: 'fullCellRender' }) + : fullCellRenderFunction + } + headerRender={ + slots.headerRender + ? renderParamsSlot({ slots, setSlotParams, key: 'headerRender' }) + : headerRenderFunction + } onChange={(date, ...args) => { onValueChange(date.valueOf() / 1000); onChange?.(date.valueOf() / 1000, ...args); diff --git a/frontend/antd/collapse/Index.svelte b/frontend/antd/collapse/Index.svelte index f8ac1503..ce6d1404 100644 --- a/frontend/antd/collapse/Index.svelte +++ b/frontend/antd/collapse/Index.svelte @@ -5,7 +5,11 @@ bindEvents, importComponent, } from '@svelte-preprocess-react/component'; - import { getSlotContext, getSlots } from '@svelte-preprocess-react/slot'; + import { + getSetSlotParamsFn, + getSlotContext, + getSlots, + } from '@svelte-preprocess-react/slot'; import type React from 'react'; import type { Gradio } from '@gradio/utils'; import cls from 'classnames'; @@ -42,6 +46,7 @@ value, restProps: $$restProps, }); + const setSlotParams = getSetSlotParamsFn(); const slots = getSlots(); $: update({ gradio, @@ -74,6 +79,7 @@ onValueChange={(val) => { value = val; }} + {setSlotParams} > diff --git a/frontend/antd/collapse/collapse.tsx b/frontend/antd/collapse/collapse.tsx index 7044ca21..bfb86512 100644 --- a/frontend/antd/collapse/collapse.tsx +++ b/frontend/antd/collapse/collapse.tsx @@ -1,7 +1,8 @@ import { sveltify } from '@svelte-preprocess-react'; -import { ReactSlot } from '@svelte-preprocess-react/react-slot'; +import type { SetSlotParams } from '@svelte-preprocess-react/slot'; import React, { useMemo } from 'react'; import { renderItems } from '@utils/renderItems'; +import { renderParamsSlot } from '@utils/renderParamsSlot'; import { Collapse as ACollapse, type GetProps } from 'antd'; import { type Item } from './context'; @@ -11,6 +12,7 @@ export const Collapse = sveltify< CollapseProps & { slotItems: Item[]; onValueChange: CollapseProps['onChange']; + setSlotParams: SetSlotParams; }, ['expandIcon'] >( @@ -21,6 +23,7 @@ export const Collapse = sveltify< children, onChange, onValueChange, + setSlotParams, ...props }) => { return ( @@ -34,10 +37,7 @@ export const Collapse = sveltify< }} expandIcon={ slots.expandIcon - ? () => - slots.expandIcon ? ( - - ) : null + ? renderParamsSlot({ slots, setSlotParams, key: 'expandIcon' }) : props.expandIcon } items={useMemo(() => { diff --git a/frontend/antd/drawer/Index.svelte b/frontend/antd/drawer/Index.svelte index 5bcef036..fe0e849c 100644 --- a/frontend/antd/drawer/Index.svelte +++ b/frontend/antd/drawer/Index.svelte @@ -5,7 +5,11 @@ bindEvents, importComponent, } from '@svelte-preprocess-react/component'; - import { getSlotContext, getSlots } from '@svelte-preprocess-react/slot'; + import { + getSetSlotParamsFn, + getSlotContext, + getSlots, + } from '@svelte-preprocess-react/slot'; import type React from 'react'; import type { Gradio } from '@gradio/utils'; import cls from 'classnames'; @@ -39,6 +43,7 @@ as_item, restProps: $$restProps, }); + const setSlotParams = getSetSlotParamsFn(); const slots = getSlots(); $: update({ gradio, @@ -63,6 +68,7 @@ {...$mergedProps.props} {...bindEvents($mergedProps)} slots={$slots} + {setSlotParams} > diff --git a/frontend/antd/drawer/drawer.tsx b/frontend/antd/drawer/drawer.tsx index 9f3b9376..8c069d0f 100644 --- a/frontend/antd/drawer/drawer.tsx +++ b/frontend/antd/drawer/drawer.tsx @@ -1,32 +1,53 @@ import { sveltify } from '@svelte-preprocess-react'; import { ReactSlot } from '@svelte-preprocess-react/react-slot'; +import type { SetSlotParams } from '@svelte-preprocess-react/slot'; import React from 'react'; import { useFunction } from '@utils/hooks/useFunction'; +import { renderParamsSlot } from '@utils/renderParamsSlot'; import { Drawer as ADrawer, type GetProps } from 'antd'; export const Drawer = sveltify< - GetProps, - ['closeIcon', 'extra', 'footer', 'title'] ->(({ slots, afterOpenChange, getContainer, drawerRender, ...props }) => { - const afterOpenChangeFunction = useFunction(afterOpenChange); - const getContainerFunction = useFunction(getContainer); - const drawerRenderFunction = useFunction(drawerRender); - return ( - : props.closeIcon - } - extra={slots.extra ? : props.extra} - footer={slots.footer ? : props.footer} - title={slots.title ? : props.title} - drawerRender={drawerRenderFunction} - getContainer={ - typeof getContainer === 'string' ? getContainerFunction : getContainer - } - /> - ); -}); + GetProps & { + setSlotParams: SetSlotParams; + }, + ['closeIcon', 'extra', 'footer', 'title', 'drawerRender'] +>( + ({ + slots, + afterOpenChange, + getContainer, + drawerRender, + setSlotParams, + ...props + }) => { + const afterOpenChangeFunction = useFunction(afterOpenChange); + const getContainerFunction = useFunction(getContainer); + const drawerRenderFunction = useFunction(drawerRender); + return ( + + ) : ( + props.closeIcon + ) + } + extra={slots.extra ? : props.extra} + footer={slots.footer ? : props.footer} + title={slots.title ? : props.title} + drawerRender={ + slots.drawerRender + ? renderParamsSlot({ slots, setSlotParams, key: 'drawerRender' }) + : drawerRenderFunction + } + getContainer={ + typeof getContainer === 'string' ? getContainerFunction : getContainer + } + /> + ); + } +); export default Drawer; diff --git a/frontend/antd/image/Index.svelte b/frontend/antd/image/Index.svelte index 5407df15..31493a88 100644 --- a/frontend/antd/image/Index.svelte +++ b/frontend/antd/image/Index.svelte @@ -5,7 +5,11 @@ bindEvents, importComponent, } from '@svelte-preprocess-react/component'; - import { getSlotContext, getSlots } from '@svelte-preprocess-react/slot'; + import { + getSetSlotParamsFn, + getSlotContext, + getSlots, + } from '@svelte-preprocess-react/slot'; import type React from 'react'; import type { Gradio } from '@gradio/utils'; import cls from 'classnames'; @@ -41,6 +45,7 @@ src, restProps: $$restProps, }); + const setSlotParams = getSetSlotParamsFn(); const slots = getSlots(); $: update({ gradio, @@ -67,6 +72,7 @@ {...bindEvents($mergedProps)} slots={$slots} src={$mergedProps.props.src || $mergedProps.src} + {setSlotParams} > diff --git a/frontend/antd/image/image.tsx b/frontend/antd/image/image.tsx index 98068833..aceacb5c 100644 --- a/frontend/antd/image/image.tsx +++ b/frontend/antd/image/image.tsx @@ -1,6 +1,9 @@ import { sveltify } from '@svelte-preprocess-react'; import { ReactSlot } from '@svelte-preprocess-react/react-slot'; +import type { SetSlotParams } from '@svelte-preprocess-react/slot'; import { useFunction } from '@utils/hooks/useFunction'; +import { omitUndefinedProps } from '@utils/omitUndefinedProps'; +import { renderParamsSlot } from '@utils/renderParamsSlot'; import { type GetProps, Image as AImage } from 'antd'; function getConfig(value: T): Partial> { @@ -11,22 +14,51 @@ function getConfig(value: T): Partial> { } type ImageProps = GetProps; export const Image = sveltify< - ImageProps, - ['placeholder', 'preview.mask', 'preview.closeIcon'] ->(({ slots, preview, ...props }) => { + ImageProps & { + setSlotParams: SetSlotParams; + }, + [ + 'placeholder', + 'preview.mask', + 'preview.closeIcon', + 'preview.toolbarRender', + 'preview.imageRender', + ] +>(({ slots, preview, setSlotParams, ...props }) => { const previewConfig = getConfig(preview); const supportPreview = - slots['preview.mask'] || slots['preview.closeIcon'] || preview !== false; + slots['preview.mask'] || + slots['preview.closeIcon'] || + slots['preview.toolbarRender'] || + slots['preview.imageRender'] || + preview !== false; const getContainerFunction = useFunction(previewConfig.getContainer); + const previewToolbarRenderFunction = useFunction(previewConfig.toolbarRender); + const previewImageRenderFunction = useFunction(previewConfig.imageRender); return ( diff --git a/frontend/antd/list/list.tsx b/frontend/antd/list/list.tsx index edc393b9..1b8e79bd 100644 --- a/frontend/antd/list/list.tsx +++ b/frontend/antd/list/list.tsx @@ -1,12 +1,18 @@ import { sveltify } from '@svelte-preprocess-react'; import { ReactSlot } from '@svelte-preprocess-react/react-slot'; +import type { SetSlotParams } from '@svelte-preprocess-react/slot'; import React from 'react'; +import { useFunction } from '@utils/hooks/useFunction'; +import { renderParamsSlot } from '@utils/renderParamsSlot'; import { type GetProps, List as AList } from 'antd'; export const List = sveltify< - GetProps, - ['footer', 'header', 'loadMore'] ->(({ slots, ...props }) => { + GetProps & { + setSlotParams: SetSlotParams; + }, + ['footer', 'header', 'loadMore', 'renderItem'] +>(({ slots, renderItem, setSlotParams, ...props }) => { + const renderItemFunction = useFunction(renderItem); return ( : props.loadMore } + renderItem={ + slots.renderItem + ? renderParamsSlot({ slots, setSlotParams, key: 'renderItem' }) + : renderItemFunction + } /> ); }); diff --git a/frontend/antd/modal/Index.svelte b/frontend/antd/modal/Index.svelte index 51231885..c42604b0 100644 --- a/frontend/antd/modal/Index.svelte +++ b/frontend/antd/modal/Index.svelte @@ -5,7 +5,11 @@ bindEvents, importComponent, } from '@svelte-preprocess-react/component'; - import { getSlotContext, getSlots } from '@svelte-preprocess-react/slot'; + import { + getSetSlotParamsFn, + getSlotContext, + getSlots, + } from '@svelte-preprocess-react/slot'; import type React from 'react'; import type { Gradio } from '@gradio/utils'; import cls from 'classnames'; @@ -39,6 +43,7 @@ as_item, restProps: $$restProps, }); + const setSlotParams = getSetSlotParamsFn(); const slots = getSlots(); $: update({ gradio, @@ -63,6 +68,7 @@ {...$mergedProps.props} {...bindEvents($mergedProps)} slots={$slots} + {setSlotParams} > diff --git a/frontend/antd/modal/modal.tsx b/frontend/antd/modal/modal.tsx index cb22905d..a1c3be45 100644 --- a/frontend/antd/modal/modal.tsx +++ b/frontend/antd/modal/modal.tsx @@ -1,11 +1,15 @@ import { sveltify } from '@svelte-preprocess-react'; import { ReactSlot } from '@svelte-preprocess-react/react-slot'; +import type { SetSlotParams } from '@svelte-preprocess-react/slot'; import React from 'react'; import { useFunction } from '@utils/hooks/useFunction'; +import { renderParamsSlot } from '@utils/renderParamsSlot'; import { type GetProps, Modal as AModal } from 'antd'; export const Modal = sveltify< - GetProps, + GetProps & { + setSlotParams: SetSlotParams; + }, [ 'cancelButtonProps.icon', 'cancelText', @@ -15,6 +19,7 @@ export const Modal = sveltify< 'title', 'okButtonProps.icon', 'okText', + 'modalRender', ] >( ({ @@ -24,6 +29,7 @@ export const Modal = sveltify< getContainer, children, modalRender, + setSlotParams, ...props }) => { const afterOpenChangeFunction = useFunction(afterOpenChange); @@ -74,9 +80,17 @@ export const Modal = sveltify< props.closeIcon ) } - footer={slots.footer ? : props.footer} + footer={ + slots.footer + ? renderParamsSlot({ slots, setSlotParams, key: 'footer' }) + : props.footer + } title={slots.title ? : props.title} - modalRender={modalRenderFunction} + modalRender={ + slots.modalRender + ? renderParamsSlot({ slots, setSlotParams, key: 'modalRender' }) + : modalRenderFunction + } getContainer={ typeof getContainer === 'string' ? getContainerFunction : getContainer } diff --git a/frontend/antd/qr-code/Index.svelte b/frontend/antd/qr-code/Index.svelte index ef43c92c..3eaac18f 100644 --- a/frontend/antd/qr-code/Index.svelte +++ b/frontend/antd/qr-code/Index.svelte @@ -5,7 +5,11 @@ bindEvents, importComponent, } from '@svelte-preprocess-react/component'; - import { getSlotContext, getSlots } from '@svelte-preprocess-react/slot'; + import { + getSetSlotParamsFn, + getSlotContext, + getSlots, + } from '@svelte-preprocess-react/slot'; import type React from 'react'; import type { Gradio } from '@gradio/utils'; import cls from 'classnames'; @@ -41,7 +45,7 @@ as_item, restProps: $$restProps, }); - + const setSlotParams = getSetSlotParamsFn(); const slots = getSlots(); $: update({ gradio, @@ -68,6 +72,7 @@ {...bindEvents($mergedProps)} slots={$slots} value={$mergedProps.props.value ?? $mergedProps.value} + {setSlotParams} /> {/await} {/if} diff --git a/frontend/antd/qr-code/qr-code.tsx b/frontend/antd/qr-code/qr-code.tsx index 16cc6789..f87b4d16 100644 --- a/frontend/antd/qr-code/qr-code.tsx +++ b/frontend/antd/qr-code/qr-code.tsx @@ -1,8 +1,26 @@ import { sveltify } from '@svelte-preprocess-react'; +import type { SetSlotParams } from '@svelte-preprocess-react/slot'; +import { useFunction } from '@utils/hooks/useFunction'; +import { renderParamsSlot } from '@utils/renderParamsSlot'; import { type GetProps, QRCode as AQRCode } from 'antd'; -export const QRCode = sveltify>(({ ...props }) => { - return ; +export const QRCode = sveltify< + GetProps & { + setSlotParams: SetSlotParams; + }, + ['statusRender'] +>(({ setSlotParams, slots, statusRender, ...props }) => { + const statusRenderFunction = useFunction(statusRender); + return ( + + ); }); export default QRCode; diff --git a/frontend/antd/statistic/Index.svelte b/frontend/antd/statistic/Index.svelte index e15d6007..e34cc794 100644 --- a/frontend/antd/statistic/Index.svelte +++ b/frontend/antd/statistic/Index.svelte @@ -5,7 +5,11 @@ bindEvents, importComponent, } from '@svelte-preprocess-react/component'; - import { getSlotContext, getSlots } from '@svelte-preprocess-react/slot'; + import { + getSetSlotParamsFn, + getSlotContext, + getSlots, + } from '@svelte-preprocess-react/slot'; import type React from 'react'; import type { Gradio } from '@gradio/utils'; import cls from 'classnames'; @@ -48,6 +52,8 @@ value, restProps: $$restProps, }); + + const setSlotParams = getSetSlotParamsFn(); {#if $mergedProps.visible} @@ -61,6 +67,7 @@ {...bindEvents($mergedProps)} slots={$slots} value={$mergedProps.props.value ?? $mergedProps.value} + {setSlotParams} > diff --git a/frontend/antd/statistic/statistic.tsx b/frontend/antd/statistic/statistic.tsx index ceeea3b7..adaf1d4c 100644 --- a/frontend/antd/statistic/statistic.tsx +++ b/frontend/antd/statistic/statistic.tsx @@ -1,22 +1,29 @@ import { sveltify } from '@svelte-preprocess-react'; import { ReactSlot } from '@svelte-preprocess-react/react-slot'; +import type { SetSlotParams } from '@svelte-preprocess-react/slot'; import React from 'react'; import { useFunction } from '@utils/hooks/useFunction'; +import { renderParamsSlot } from '@utils/renderParamsSlot'; import { type GetProps, Statistic as AStatistic } from 'antd'; export const Statistic = sveltify< GetProps & { children: React.ReactNode; + setSlotParams: SetSlotParams; }, - ['prefix', 'suffix', 'title'] ->(({ children, slots, formatter, ...props }) => { + ['prefix', 'suffix', 'title', 'formatter'] +>(({ children, slots, setSlotParams, formatter, ...props }) => { const formatterFunction = useFunction(formatter); return ( <>
{children}
: props.title} prefix={slots.prefix ? : props.prefix} suffix={slots.suffix ? : props.suffix} diff --git a/frontend/antd/table/Index.svelte b/frontend/antd/table/Index.svelte index 3667d775..f3007e0f 100644 --- a/frontend/antd/table/Index.svelte +++ b/frontend/antd/table/Index.svelte @@ -5,7 +5,11 @@ bindEvents, importComponent, } from '@svelte-preprocess-react/component'; - import { getSlotContext, getSlots } from '@svelte-preprocess-react/slot'; + import { + getSetSlotParamsFn, + getSlotContext, + getSlots, + } from '@svelte-preprocess-react/slot'; import type React from 'react'; import type { Gradio } from '@gradio/utils'; import cls from 'classnames'; @@ -54,6 +58,7 @@ data_source, restProps: $$restProps, }); + const setSlotParams = getSetSlotParamsFn(); const { rowSelection: rowSelectionItems } = getRowSelectionItems([ 'rowSelection', ]); @@ -76,6 +81,7 @@ rowSelectionItems={$rowSelectionItems} expandableItems={$expandableItems} columnItems={$columnItems} + {setSlotParams} > diff --git a/frontend/antd/table/column/Index.svelte b/frontend/antd/table/column/Index.svelte index 21e05446..11fe2bca 100644 --- a/frontend/antd/table/column/Index.svelte +++ b/frontend/antd/table/column/Index.svelte @@ -11,6 +11,7 @@ import type React from 'react'; import type { Gradio } from '@gradio/utils'; import { createFunction } from '@utils/createFunction'; + import { renderSlot } from '@utils/renderSlot'; import cls from 'classnames'; import { writable } from 'svelte/store'; @@ -79,9 +80,9 @@ filterIcon: createFunction($mergedProps.props.filterIcon), filterDropdown: createFunction($mergedProps.props.filterDropdown), showSorterTooltip: - $slots['showSorterTooltip.title'] || typeof showSorterTooltip === 'object' ? { + ...showSorterTooltip, afterOpenChange: createFunction( typeof showSorterTooltip === 'object' ? showSorterTooltip.afterOpenChange @@ -120,6 +121,10 @@ el: $slots.filterIcon, callback: setSlotParams, }, + filterDropdown: { + el: $slots.filterDropdown, + callback: setSlotParams, + }, sortIcon: { el: $slots.sortIcon, callback: setSlotParams, @@ -128,6 +133,10 @@ el: $slots.title, callback: setSlotParams, }, + render: { + el: $slots.render, + callback: setSlotParams, + }, }, } ); diff --git a/frontend/antd/table/expandable/Expandable.svelte b/frontend/antd/table/expandable/Expandable.svelte index 5a4d2242..5a997ee3 100644 --- a/frontend/antd/table/expandable/Expandable.svelte +++ b/frontend/antd/table/expandable/Expandable.svelte @@ -3,6 +3,7 @@ diff --git a/frontend/antd/table/row-selection/RowSelection.svelte b/frontend/antd/table/row-selection/RowSelection.svelte index afeaf320..fa28ef8c 100644 --- a/frontend/antd/table/row-selection/RowSelection.svelte +++ b/frontend/antd/table/row-selection/RowSelection.svelte @@ -3,6 +3,7 @@ diff --git a/frontend/antd/table/table.tsx b/frontend/antd/table/table.tsx index 2f53f9dd..cbd38c7b 100644 --- a/frontend/antd/table/table.tsx +++ b/frontend/antd/table/table.tsx @@ -1,8 +1,11 @@ import { sveltify } from '@svelte-preprocess-react'; import { ReactSlot } from '@svelte-preprocess-react/react-slot'; +import type { SetSlotParams } from '@svelte-preprocess-react/slot'; import React, { useMemo } from 'react'; import { useFunction } from '@utils/hooks/useFunction'; +import { omitUndefinedProps } from '@utils/omitUndefinedProps'; import { renderItems } from '@utils/renderItems'; +import { renderParamsSlot } from '@utils/renderParamsSlot'; import { type GetProps, Table as ATable } from 'antd'; import type { Item } from './context'; @@ -20,6 +23,7 @@ export const Table = sveltify< rowSelectionItems: Item[]; expandableItems: Item[]; columnItems: Item[]; + setSlotParams: SetSlotParams; }, [ 'footer', @@ -27,7 +31,9 @@ export const Table = sveltify< 'loading.tip', 'loading.indicator', 'pagination.showQuickJumper.goButton', + 'pagination.itemRender', 'showSorterTooltip.title', + 'summary', ] >( ({ @@ -48,6 +54,7 @@ export const Table = sveltify< showSorterTooltip, onRow, onHeaderRow, + setSlotParams, ...props }) => { const getPopupContainerFunction = useFunction(getPopupContainer); @@ -56,7 +63,8 @@ export const Table = sveltify< slots['loading.tip'] || slots['loading.indicator']; const loadingConfig = getConfig(loading); const supportPaginationConfig = - slots['pagination.showQuickJumper.goButton']; + slots['pagination.showQuickJumper.goButton'] || + slots['pagination.itemRender']; const paginationConfig = getConfig(pagination); const paginationShowTotalFunction = useFunction(paginationConfig.showTotal); const rowKeyFunction = useFunction(rowKey); @@ -107,7 +115,11 @@ export const Table = sveltify< }, [columnItems, columns])} onRow={onRowFunction} onHeaderRow={onHeaderRowFunction} - summary={summaryFunction} + summary={ + slots.summary + ? renderParamsSlot({ slots, setSlotParams, key: 'summary' }) + : summaryFunction + } rowSelection={useMemo(() => { return ( rowSelection || @@ -145,7 +157,7 @@ export const Table = sveltify< } pagination={ supportPaginationConfig - ? { + ? omitUndefinedProps({ ...paginationConfig, showTotal: paginationShowTotalFunction, showQuickJumper: slots['pagination.showQuickJumper.goButton'] @@ -157,7 +169,14 @@ export const Table = sveltify< ), } : paginationConfig.showQuickJumper, - } + itemRender: slots['pagination.itemRender'] + ? renderParamsSlot({ + slots, + setSlotParams, + key: 'pagination.itemRender', + }) + : paginationConfig.itemRender, + }) : pagination } getPopupContainer={getPopupContainerFunction} @@ -180,12 +199,12 @@ export const Table = sveltify< } footer={ slots.footer - ? () => (slots.footer ? : null) + ? renderParamsSlot({ slots, setSlotParams, key: 'footer' }) : props.footer } title={ slots.title - ? () => (slots.title ? : null) + ? renderParamsSlot({ slots, setSlotParams, key: 'title' }) : props.title } /> diff --git a/frontend/antd/tabs/Index.svelte b/frontend/antd/tabs/Index.svelte index 22622c73..a49dee0f 100644 --- a/frontend/antd/tabs/Index.svelte +++ b/frontend/antd/tabs/Index.svelte @@ -5,7 +5,11 @@ bindEvents, importComponent, } from '@svelte-preprocess-react/component'; - import { getSlotContext, getSlots } from '@svelte-preprocess-react/slot'; + import { + getSetSlotParamsFn, + getSlotContext, + getSlots, + } from '@svelte-preprocess-react/slot'; import type React from 'react'; import type { Gradio } from '@gradio/utils'; import cls from 'classnames'; @@ -41,6 +45,7 @@ restProps: $$restProps, }); + const setSlotParams = getSetSlotParamsFn(); const slots = getSlots(); $: update({ gradio, @@ -73,6 +78,7 @@ onValueChange={(activeKey) => { value = activeKey; }} + {setSlotParams} > diff --git a/frontend/antd/tabs/tabs.tsx b/frontend/antd/tabs/tabs.tsx index 1c07c317..5e2161ba 100644 --- a/frontend/antd/tabs/tabs.tsx +++ b/frontend/antd/tabs/tabs.tsx @@ -1,9 +1,11 @@ import { sveltify } from '@svelte-preprocess-react'; import { ReactSlot } from '@svelte-preprocess-react/react-slot'; +import type { SetSlotParams } from '@svelte-preprocess-react/slot'; import React, { useMemo } from 'react'; import { useFunction } from '@utils/hooks/useFunction'; import { omitUndefinedProps } from '@utils/omitUndefinedProps'; import { renderItems } from '@utils/renderItems'; +import { renderParamsSlot } from '@utils/renderParamsSlot'; import { type GetProps, Tabs as ATabs } from 'antd'; import { type Item } from './context'; @@ -12,10 +14,12 @@ export const Tabs = sveltify< GetProps & { slotItems: Item[]; onValueChange: (activeKey: string) => void; + setSlotParams: SetSlotParams; }, [ 'addIcon', 'removeIcon', + 'renderTabBar', 'tabBarExtraContent', 'tabBarExtraContent.left', 'tabBarExtraContent.right', @@ -31,10 +35,13 @@ export const Tabs = sveltify< slotItems, more, children, + renderTabBar, + setSlotParams, ...props }) => { const indicatorSizeFunction = useFunction(indicator?.size); const getMorePopupContainerFunction = useFunction(more?.getPopupContainer); + const renderTabBarFunction = useFunction(renderTabBar); return ( <>
{children}
@@ -48,6 +55,15 @@ export const Tabs = sveltify< } : indicator } + renderTabBar={ + slots.renderTabBar + ? renderParamsSlot({ + slots, + setSlotParams, + key: 'renderTabBar', + }) + : renderTabBarFunction + } items={useMemo(() => { return ( items || diff --git a/frontend/antd/tree/Index.svelte b/frontend/antd/tree/Index.svelte index 7c73f616..79c1c8df 100644 --- a/frontend/antd/tree/Index.svelte +++ b/frontend/antd/tree/Index.svelte @@ -5,7 +5,11 @@ bindEvents, importComponent, } from '@svelte-preprocess-react/component'; - import { getSlotContext, getSlots } from '@svelte-preprocess-react/slot'; + import { + getSetSlotParamsFn, + getSlotContext, + getSlots, + } from '@svelte-preprocess-react/slot'; import type React from 'react'; import type { Gradio } from '@gradio/utils'; import cls from 'classnames'; @@ -59,6 +63,7 @@ restProps: $$restProps, }); const { treeData, default: children } = getItems(['default', 'treeData']); + const setSlotParams = getSetSlotParamsFn(); const onValueChange = (val: Record) => { value = { @@ -88,6 +93,7 @@ checkedKeys={$mergedProps.props.checkedKeys || $mergedProps.value.checked_keys} {onValueChange} + {setSlotParams} > diff --git a/frontend/antd/tree/directory-tree/Index.svelte b/frontend/antd/tree/directory-tree/Index.svelte index 2d439138..61ce06b2 100644 --- a/frontend/antd/tree/directory-tree/Index.svelte +++ b/frontend/antd/tree/directory-tree/Index.svelte @@ -5,7 +5,11 @@ bindEvents, importComponent, } from '@svelte-preprocess-react/component'; - import { getSlotContext, getSlots } from '@svelte-preprocess-react/slot'; + import { + getSetSlotParamsFn, + getSlotContext, + getSlots, + } from '@svelte-preprocess-react/slot'; import type React from 'react'; import type { Gradio } from '@gradio/utils'; import cls from 'classnames'; @@ -60,6 +64,8 @@ }); const { treeData, default: children } = getItems(['default', 'treeData']); + const setSlotParams = getSetSlotParamsFn(); + const onValueChange = (val: Record) => { value = { expanded_keys: val.expandedKeys, @@ -89,6 +95,7 @@ checkedKeys={$mergedProps.props.checkedKeys || $mergedProps.value.checked_keys} {onValueChange} + {setSlotParams} > diff --git a/frontend/antd/tree/tree-node/Index.svelte b/frontend/antd/tree/tree-node/Index.svelte index dea4243d..85637610 100644 --- a/frontend/antd/tree/tree-node/Index.svelte +++ b/frontend/antd/tree/tree-node/Index.svelte @@ -3,6 +3,7 @@ diff --git a/frontend/antd/tree/tree.tsx b/frontend/antd/tree/tree.tsx index f4351154..6e12c861 100644 --- a/frontend/antd/tree/tree.tsx +++ b/frontend/antd/tree/tree.tsx @@ -1,9 +1,11 @@ import { sveltify } from '@svelte-preprocess-react'; import { ReactSlot } from '@svelte-preprocess-react/react-slot'; +import type { SetSlotParams } from '@svelte-preprocess-react/slot'; import React, { useMemo } from 'react'; import { useFunction } from '@utils/hooks/useFunction'; import { omitUndefinedProps } from '@utils/omitUndefinedProps'; import { renderItems } from '@utils/renderItems'; +import { renderParamsSlot } from '@utils/renderParamsSlot'; import { type GetProps, Tree as ATree } from 'antd'; import { type Item } from './context'; @@ -21,6 +23,7 @@ export const Tree = sveltify< | React.Key[] | { checked: React.Key[]; halfChecked: React.Key[] }; }) => void; + setSlotParams: SetSlotParams; }, [ 'switcherLoadingIcon', @@ -28,6 +31,7 @@ export const Tree = sveltify< 'showLine.showLeafIcon', 'icon', 'draggable.icon', + 'titleRender', ] >( ({ @@ -43,6 +47,7 @@ export const Tree = sveltify< children, directory, slotItems, + setSlotParams, ...props }) => { const filterTreeNodeFunction = useFunction(filterTreeNode); @@ -60,20 +65,27 @@ export const Tree = sveltify< renderItems[number]>(slotItems), showLine: slots['showLine.showLeafIcon'] ? { - showLeafIcon: , + showLeafIcon: renderParamsSlot({ + slots, + setSlotParams, + key: 'showLine.showLeafIcon', + }), } : props.showLine, - icon: slots.icon ? : props.icon, + icon: slots.icon + ? renderParamsSlot({ slots, setSlotParams, key: 'icon' }) + : props.icon, switcherLoadingIcon: slots.switcherLoadingIcon ? ( ) : ( props.switcherLoadingIcon ), - switcherIcon: slots.switcherIcon ? ( - - ) : ( - props.switcherIcon - ), + switcherIcon: slots.switcherIcon + ? renderParamsSlot({ slots, setSlotParams, key: 'switcherIcon' }) + : props.switcherIcon, + titleRender: slots.titleRender + ? renderParamsSlot({ slots, setSlotParams, key: 'titleRender' }) + : props.titleRender, draggable: slots['draggable.icon'] || draggableNodeDraggableFunction ? { @@ -94,6 +106,7 @@ export const Tree = sveltify< slotItems, slots, treeData, + setSlotParams, ]); return ( <> From 24262bce699eae9a65a31a5b535b17dd8845b7af Mon Sep 17 00:00:00 2001 From: Col0ring <1561999073@qq.com> Date: Tue, 15 Oct 2024 16:37:49 +0800 Subject: [PATCH 22/51] feat: add docs in code --- .../components/antd/button/__init__.py | 3 + .../components/antd/button/group/__init__.py | 1 + .../components/antd/card/__init__.py | 4 + .../components/antd/card/grid/__init__.py | 6 ++ .../components/antd/card/meta/__init__.py | 6 ++ .../components/antd/divider/__init__.py | 8 +- .../components/antd/flex/__init__.py | 22 +++-- .../components/antd/float_button/__init__.py | 3 + .../antd/float_button/back_top/__init__.py | 3 + .../antd/float_button/group/__init__.py | 3 + .../components/antd/grid/col/__init__.py | 13 ++- .../components/antd/grid/row/__init__.py | 23 ++++-- .../components/antd/icon/__init__.py | 12 +++ .../antd/icon/iconfont_provider/__init__.py | 10 +++ .../components/antd/layout/__init__.py | 16 ++++ .../antd/layout/content/__init__.py | 10 +++ .../components/antd/layout/footer/__init__.py | 10 +++ .../components/antd/layout/header/__init__.py | 10 +++ .../components/antd/layout/sider/__init__.py | 66 +++++++++++++-- .../components/antd/space/__init__.py | 38 +++++++++ .../components/antd/space/compact/__init__.py | 25 ++++++ .../components/antd/splitter/__init__.py | 3 + .../antd/splitter/panel/__init__.py | 3 + .../antd/typography/link/__init__.py | 71 ++++++++++++++-- .../antd/typography/paragraph/__init__.py | 82 ++++++++++++++++--- .../antd/typography/text/__init__.py | 80 +++++++++++++++--- .../antd/typography/title/__init__.py | 82 ++++++++++++++++--- frontend/antd/layout/sider/layout.sider.tsx | 7 +- frontend/antd/table/column/Index.svelte | 1 - frontend/antd/typography/Base.svelte | 29 ++++--- 30 files changed, 566 insertions(+), 84 deletions(-) diff --git a/backend/modelscope_studio/components/antd/button/__init__.py b/backend/modelscope_studio/components/antd/button/__init__.py index 84b11486..7dcabaa5 100644 --- a/backend/modelscope_studio/components/antd/button/__init__.py +++ b/backend/modelscope_studio/components/antd/button/__init__.py @@ -10,8 +10,11 @@ class AntdButton(ModelScopeLayoutComponent): """ + Ant Design: https://ant.design/components/button + To trigger an operation. + When to use: A button means an operation (or a series of operations). Clicking a button will trigger its corresponding business logic. In Ant Design we provide 5 types of button. diff --git a/backend/modelscope_studio/components/antd/button/group/__init__.py b/backend/modelscope_studio/components/antd/button/group/__init__.py index fc3105e3..f22e7061 100644 --- a/backend/modelscope_studio/components/antd/button/group/__init__.py +++ b/backend/modelscope_studio/components/antd/button/group/__init__.py @@ -5,6 +5,7 @@ class AntdButtonGroup(ModelScopeLayoutComponent): """ + Ant Design: https://ant.design/components/button """ EVENTS = [] diff --git a/backend/modelscope_studio/components/antd/card/__init__.py b/backend/modelscope_studio/components/antd/card/__init__.py index 9be1139d..cc47c756 100644 --- a/backend/modelscope_studio/components/antd/card/__init__.py +++ b/backend/modelscope_studio/components/antd/card/__init__.py @@ -11,7 +11,11 @@ class AntdCard(ModelScopeLayoutComponent): """ + Ant Design: https://ant.design/components/card + A container for displaying information. + + When to use: A card can be used to display content related to a single subject. The content can consist of multiple elements of varying types and sizes. """ Grid = AntdCardGrid diff --git a/backend/modelscope_studio/components/antd/card/grid/__init__.py b/backend/modelscope_studio/components/antd/card/grid/__init__.py index 062466bb..bb966aca 100644 --- a/backend/modelscope_studio/components/antd/card/grid/__init__.py +++ b/backend/modelscope_studio/components/antd/card/grid/__init__.py @@ -9,6 +9,12 @@ class AntdCardGrid(ModelScopeLayoutComponent): """ + Ant Design: https://ant.design/components/card + + A container for displaying information. + + When to use: + A card can be used to display content related to a single subject. The content can consist of multiple elements of varying types and sizes. """ EVENTS = [ EventListener("click", diff --git a/backend/modelscope_studio/components/antd/card/meta/__init__.py b/backend/modelscope_studio/components/antd/card/meta/__init__.py index 2b3ef5dd..8593e657 100644 --- a/backend/modelscope_studio/components/antd/card/meta/__init__.py +++ b/backend/modelscope_studio/components/antd/card/meta/__init__.py @@ -7,6 +7,12 @@ class AntdCardMeta(ModelScopeLayoutComponent): """ + Ant Design: https://ant.design/components/card + + A container for displaying information. + + When to use: + A card can be used to display content related to a single subject. The content can consist of multiple elements of varying types and sizes. """ EVENTS = [] SLOTS = ["title", "description", "avatar"] diff --git a/backend/modelscope_studio/components/antd/divider/__init__.py b/backend/modelscope_studio/components/antd/divider/__init__.py index 60521958..020614d6 100644 --- a/backend/modelscope_studio/components/antd/divider/__init__.py +++ b/backend/modelscope_studio/components/antd/divider/__init__.py @@ -7,9 +7,13 @@ class AntdDivider(ModelScopeLayoutComponent): """ + Ant Design: https://ant.design/components/divider + A divider line separates different content. - Divide sections of an article. - Divide inline text and links such as the operation column of table. + + When to use: + - Divide sections of an article. + - Divide inline text and links such as the operation column of table. """ EVENTS = [] diff --git a/backend/modelscope_studio/components/antd/flex/__init__.py b/backend/modelscope_studio/components/antd/flex/__init__.py index e926dad2..d6829f71 100644 --- a/backend/modelscope_studio/components/antd/flex/__init__.py +++ b/backend/modelscope_studio/components/antd/flex/__init__.py @@ -7,9 +7,13 @@ class AntdFlex(ModelScopeLayoutComponent): """ + Ant Design: https://ant.design/components/flex + A flex layout container for alignment. - Good for setting spacing between elements. - Suitable for setting various horizontal and vertical alignments. + + When to use: + - Good for setting spacing between elements. + - Suitable for setting various horizontal and vertical alignments. """ EVENTS = [] @@ -19,11 +23,17 @@ def __init__( props: dict | None = None, *, vertical: bool = False, - wrap: str | bool = "nowrap", - justify: str | None = "normal", - align: str | None = "normal", + wrap: Literal['nowrap', 'wrap', 'wrap-reverse'] | bool = "nowrap", + justify: Literal['normal', 'start', 'end', 'flex-start', + 'flex-end', 'center', 'left', 'right', + 'space-between', 'space-around', 'space-evenly', + 'stretch', 'safe', 'unsafe'] | None = "normal", + align: Literal['normal', 'start', 'end', 'flex-start', 'flex-end', + 'center', 'self-start', 'self-end', 'baseline', + 'unsafe'] | None = "normal", flex: str | None = "normal", - gap: Literal["small", "middle", "large"] | str | int | None = None, + gap: Literal["small", "middle", "large"] | str | int | float + | None = None, component: str | None = None, as_item: str | None = None, _internal: None = None, diff --git a/backend/modelscope_studio/components/antd/float_button/__init__.py b/backend/modelscope_studio/components/antd/float_button/__init__.py index 56f29c08..8194e12a 100644 --- a/backend/modelscope_studio/components/antd/float_button/__init__.py +++ b/backend/modelscope_studio/components/antd/float_button/__init__.py @@ -11,8 +11,11 @@ class AntdFloatButton(ModelScopeLayoutComponent): """ + Ant Design: https://ant.design/components/float-button + A button that floats at the top of the page. + When to use: - For global functionality on the site. - Buttons that can be seen wherever you browse. """ diff --git a/backend/modelscope_studio/components/antd/float_button/back_top/__init__.py b/backend/modelscope_studio/components/antd/float_button/back_top/__init__.py index d57d0c54..4612cf21 100644 --- a/backend/modelscope_studio/components/antd/float_button/back_top/__init__.py +++ b/backend/modelscope_studio/components/antd/float_button/back_top/__init__.py @@ -9,8 +9,11 @@ class AntdFloatButtonBackTop(ModelScopeLayoutComponent): """ + Ant Design: https://ant.design/components/float-button + A button that floats at the top of the page. + When to use: - For global functionality on the site. - Buttons that can be seen wherever you browse. """ diff --git a/backend/modelscope_studio/components/antd/float_button/group/__init__.py b/backend/modelscope_studio/components/antd/float_button/group/__init__.py index 8850eb66..e3e24a70 100644 --- a/backend/modelscope_studio/components/antd/float_button/group/__init__.py +++ b/backend/modelscope_studio/components/antd/float_button/group/__init__.py @@ -9,8 +9,11 @@ class AntdFloatButtonGroup(ModelScopeLayoutComponent): """ + Ant Design: https://ant.design/components/float-button + A button that floats at the top of the page. + When to use: - For global functionality on the site. - Buttons that can be seen wherever you browse. """ diff --git a/backend/modelscope_studio/components/antd/grid/col/__init__.py b/backend/modelscope_studio/components/antd/grid/col/__init__.py index 2eb80100..068d7ec0 100644 --- a/backend/modelscope_studio/components/antd/grid/col/__init__.py +++ b/backend/modelscope_studio/components/antd/grid/col/__init__.py @@ -7,14 +7,19 @@ class AntdCol(ModelScopeLayoutComponent): """ + Ant Design: https://ant.design/components/grid + + 24 Grids System. + In the grid system, we define the frame outside the information area based on row and column, to ensure that every area can have stable arrangement. Following is a brief look at how it works: - Establish a set of column in the horizontal space defined by row (abbreviated col). - Your content elements should be placed directly in the col, and only col should be placed directly in row. - The column grid system is a value of 1-24 to represent its range spans. For example, three columns of equal width can be created by . - If the sum of col spans in a row are more than 24, then the overflowing col as a whole will start a new line arrangement. + - Establish a set of column in the horizontal space defined by row (abbreviated col). + - Your content elements should be placed directly in the col, and only col should be placed directly in row. + - The column grid system is a value of 1-24 to represent its range spans. For example, three columns of equal width can be created by . + - If the sum of col spans in a row are more than 24, then the overflowing col as a whole will start a new line arrangement. + Our grid systems base on Flex layout to allow the elements within the parent to be aligned horizontally - left, center, right, wide arrangement, and decentralized arrangement. The Grid system also supports vertical alignment - top aligned, vertically centered, bottom-aligned. You can also define the order of elements by using order. Layout uses a 24 grid layout to define the width of each "box", but does not rigidly adhere to the grid layout. diff --git a/backend/modelscope_studio/components/antd/grid/row/__init__.py b/backend/modelscope_studio/components/antd/grid/row/__init__.py index a564e8da..7e0a226f 100644 --- a/backend/modelscope_studio/components/antd/grid/row/__init__.py +++ b/backend/modelscope_studio/components/antd/grid/row/__init__.py @@ -1,20 +1,25 @@ from __future__ import annotations -from typing import Any +from typing import Any, Literal from .....utils.dev import ModelScopeLayoutComponent, resolve_frontend_dir class AntdRow(ModelScopeLayoutComponent): """ + Ant Design: https://ant.design/components/grid + + 24 Grids System. + In the grid system, we define the frame outside the information area based on row and column, to ensure that every area can have stable arrangement. Following is a brief look at how it works: - Establish a set of column in the horizontal space defined by row (abbreviated col). - Your content elements should be placed directly in the col, and only col should be placed directly in row. - The column grid system is a value of 1-24 to represent its range spans. For example, three columns of equal width can be created by . - If the sum of col spans in a row are more than 24, then the overflowing col as a whole will start a new line arrangement. + - Establish a set of column in the horizontal space defined by row (abbreviated col). + - Your content elements should be placed directly in the col, and only col should be placed directly in row. + - The column grid system is a value of 1-24 to represent its range spans. For example, three columns of equal width can be created by . + - If the sum of col spans in a row are more than 24, then the overflowing col as a whole will start a new line arrangement. + Our grid systems base on Flex layout to allow the elements within the parent to be aligned horizontally - left, center, right, wide arrangement, and decentralized arrangement. The Grid system also supports vertical alignment - top aligned, vertically centered, bottom-aligned. You can also define the order of elements by using order. Layout uses a 24 grid layout to define the width of each "box", but does not rigidly adhere to the grid layout. @@ -26,9 +31,13 @@ def __init__( self, props: dict | None = None, *, - align: list[str] | str | dict = "top", + align: Literal["top", "middle", "bottom", "stretch"] + | dict[str, Literal["top", "middle", "bottom", "stretch"]] = "top", gutter: int | dict | list[int] = 0, - justify: list[str] | str | dict = "start", + justify: Literal["start", "end", "center", "space-between", + 'space-around', 'space-evenly'] + | dict[str, Literal["start", "end", "center", "space-between", + 'space-around', 'space-evenly']] = "start", wrap: bool = True, as_item: str | None = None, _internal: None = None, diff --git a/backend/modelscope_studio/components/antd/icon/__init__.py b/backend/modelscope_studio/components/antd/icon/__init__.py index 42088666..4c2d6a8b 100644 --- a/backend/modelscope_studio/components/antd/icon/__init__.py +++ b/backend/modelscope_studio/components/antd/icon/__init__.py @@ -8,6 +8,9 @@ class AntdIcon(ModelScopeComponent): """ + Ant Design: https://ant.design/components/icon + + Semantic vector graphics. """ IconfontProvider = AntdIconfontProvider @@ -28,6 +31,7 @@ def __init__( *, spin: bool = False, rotate: int | float | None = None, + two_tone_color: str | None = None, component: str | None = None, as_item: str | None = None, _internal: None = None, @@ -38,6 +42,13 @@ def __init__( elem_style: dict | None = None, render: bool = True, **kwargs): + """ + Parameters: + rotate: Rotate by n degrees (not working in IE9). + spin: Rotate icon with animation. + two_tone_color: Only supports the two-tone icon. Specify the primary color. + component: The component used for the root node. + """ super().__init__(value=value, visible=visible, elem_id=elem_id, @@ -50,6 +61,7 @@ def __init__( self.spin = spin self.rotate = rotate self.component = component + self.two_tone_color = two_tone_color FRONTEND_DIR = resolve_frontend_dir("icon") diff --git a/backend/modelscope_studio/components/antd/icon/iconfont_provider/__init__.py b/backend/modelscope_studio/components/antd/icon/iconfont_provider/__init__.py index 14d713ac..be9540a4 100644 --- a/backend/modelscope_studio/components/antd/icon/iconfont_provider/__init__.py +++ b/backend/modelscope_studio/components/antd/icon/iconfont_provider/__init__.py @@ -5,6 +5,11 @@ class AntdIconfontProvider(ModelScopeLayoutComponent): """ + Ant Design: https://ant.design/components/icon + + Semantic vector graphics. + + A component to help developer use their own icons deployed at https://iconfont.cn in a convenient way. """ EVENTS = [] @@ -23,6 +28,11 @@ def __init__( visible: bool = True, render: bool = True, **kwargs): + """ + Parameters: + script_url: The URL generated by https://iconfont.cn project. + extra_common_props: Define extra properties to the component. + """ super().__init__(visible=visible, render=render, as_item=as_item, diff --git a/backend/modelscope_studio/components/antd/layout/__init__.py b/backend/modelscope_studio/components/antd/layout/__init__.py index 8b189470..b8ff8d55 100644 --- a/backend/modelscope_studio/components/antd/layout/__init__.py +++ b/backend/modelscope_studio/components/antd/layout/__init__.py @@ -13,6 +13,16 @@ class AntdLayout(ModelScopeLayoutComponent): """ + Ant Design: https://ant.design/components/layout + + Handling the overall layout of a page. + + Component overview: + - Layout: The layout wrapper, in which Header Sider Content Footer or Layout itself can be nested, and can be placed in any parent container. + - Header: The top layout with the default style, in which any element can be nested, and must be placed in Layout. + - Sider: The sidebar with default style and basic functions, in which any element can be nested, and must be placed in Layout. + - Content: The content layout with the default style, in which any element can be nested, and must be placed in Layout. + - Footer: The bottom layout with the default style, in which any element can be nested, and must be placed in Layout. """ Content = AntdLayoutContent @@ -30,6 +40,7 @@ def __init__( self, props: dict | None = None, *, + has_sider: bool | None = None, as_item: str | None = None, _internal: None = None, # gradio properties @@ -39,6 +50,10 @@ def __init__( elem_style: dict | None = None, render: bool = True, **kwargs): + """ + Parameters: + has_sider: Whether contain Sider in children, don't have to assign it normally. Useful in ssr avoid style flickering. + """ super().__init__(visible=visible, elem_id=elem_id, elem_classes=elem_classes, @@ -47,6 +62,7 @@ def __init__( elem_style=elem_style, **kwargs) self.props = props + self.has_sider = has_sider FRONTEND_DIR = resolve_frontend_dir("layout") diff --git a/backend/modelscope_studio/components/antd/layout/content/__init__.py b/backend/modelscope_studio/components/antd/layout/content/__init__.py index abfb04e3..01c71c22 100644 --- a/backend/modelscope_studio/components/antd/layout/content/__init__.py +++ b/backend/modelscope_studio/components/antd/layout/content/__init__.py @@ -9,6 +9,16 @@ class AntdLayoutContent(ModelScopeLayoutComponent): """ + Ant Design: https://ant.design/components/layout + + Handling the overall layout of a page. + + Component overview: + - Layout: The layout wrapper, in which Header Sider Content Footer or Layout itself can be nested, and can be placed in any parent container. + - Header: The top layout with the default style, in which any element can be nested, and must be placed in Layout. + - Sider: The sidebar with default style and basic functions, in which any element can be nested, and must be placed in Layout. + - Content: The content layout with the default style, in which any element can be nested, and must be placed in Layout. + - Footer: The bottom layout with the default style, in which any element can be nested, and must be placed in Layout. """ EVENTS = [ EventListener("click", diff --git a/backend/modelscope_studio/components/antd/layout/footer/__init__.py b/backend/modelscope_studio/components/antd/layout/footer/__init__.py index c15a358d..2308ceee 100644 --- a/backend/modelscope_studio/components/antd/layout/footer/__init__.py +++ b/backend/modelscope_studio/components/antd/layout/footer/__init__.py @@ -9,6 +9,16 @@ class AntdLayoutFooter(ModelScopeLayoutComponent): """ + Ant Design: https://ant.design/components/layout + + Handling the overall layout of a page. + + Component overview: + - Layout: The layout wrapper, in which Header Sider Content Footer or Layout itself can be nested, and can be placed in any parent container. + - Header: The top layout with the default style, in which any element can be nested, and must be placed in Layout. + - Sider: The sidebar with default style and basic functions, in which any element can be nested, and must be placed in Layout. + - Content: The content layout with the default style, in which any element can be nested, and must be placed in Layout. + - Footer: The bottom layout with the default style, in which any element can be nested, and must be placed in Layout. """ EVENTS = [ EventListener("click", diff --git a/backend/modelscope_studio/components/antd/layout/header/__init__.py b/backend/modelscope_studio/components/antd/layout/header/__init__.py index 2221b533..9a3cd114 100644 --- a/backend/modelscope_studio/components/antd/layout/header/__init__.py +++ b/backend/modelscope_studio/components/antd/layout/header/__init__.py @@ -9,6 +9,16 @@ class AntdLayoutHeader(ModelScopeLayoutComponent): """ + Ant Design: https://ant.design/components/layout + + Handling the overall layout of a page. + + Component overview: + - Layout: The layout wrapper, in which Header Sider Content Footer or Layout itself can be nested, and can be placed in any parent container. + - Header: The top layout with the default style, in which any element can be nested, and must be placed in Layout. + - Sider: The sidebar with default style and basic functions, in which any element can be nested, and must be placed in Layout. + - Content: The content layout with the default style, in which any element can be nested, and must be placed in Layout. + - Footer: The bottom layout with the default style, in which any element can be nested, and must be placed in Layout. """ EVENTS = [ EventListener("click", diff --git a/backend/modelscope_studio/components/antd/layout/sider/__init__.py b/backend/modelscope_studio/components/antd/layout/sider/__init__.py index d8bf6f12..0f87ad87 100644 --- a/backend/modelscope_studio/components/antd/layout/sider/__init__.py +++ b/backend/modelscope_studio/components/antd/layout/sider/__init__.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any +from typing import Any, Literal from gradio.events import EventListener @@ -9,23 +9,52 @@ class AntdLayoutSider(ModelScopeLayoutComponent): """ + Ant Design: https://ant.design/components/layout + + Handling the overall layout of a page. + + Component overview: + - Layout: The layout wrapper, in which Header Sider Content Footer or Layout itself can be nested, and can be placed in any parent container. + - Header: The top layout with the default style, in which any element can be nested, and must be placed in Layout. + - Sider: The sidebar with default style and basic functions, in which any element can be nested, and must be placed in Layout. + - Content: The content layout with the default style, in which any element can be nested, and must be placed in Layout. + - Footer: The bottom layout with the default style, in which any element can be nested, and must be placed in Layout. """ EVENTS = [ EventListener("click", callback=lambda block: block._internal.update( bind_click_event=True)), - EventListener("breakpoint", - callback=lambda block: block._internal.update( - bind_breakpoint_event=True)), - EventListener("collapse", - callback=lambda block: block._internal.update( - bind_collapse_event=True)), + EventListener( + "breakpoint", + callback=lambda block: block._internal.update(bind_breakpoint_event + =True), + doc="The callback function, executed when breakpoints changed."), + EventListener( + "collapse", + callback=lambda block: block._internal.update(bind_collapse_event= + True), + doc= + "The callback function, executed by clicking the trigger or activating the responsive layout." + ), ] + SLOTS = ['trigger'] + def __init__( self, props: dict | None = None, *, + breakpoint: Literal['xs', 'sm', 'md', 'lg', 'xl', 'xxl'] + | None = None, + collapsed: bool | None = None, + collapsed_width: int | float = 80, + collapsible: bool = False, + default_collapsed: bool = False, + reverse_arrow: bool = False, + theme: Literal['light', 'dark'] | None = None, + trigger: str | None = 'default', + width: int | float | str = 200, + zero_width_trigger_style: dict | None = None, as_item: str | None = None, _internal: None = None, # gradio properties @@ -35,6 +64,19 @@ def __init__( elem_style: dict | None = None, render: bool = True, **kwargs): + """ + Parameters: + breakpoint: Breakpoints of the responsive layout. + collapsed: To set the current status. + collapsed_width: Width of the collapsed sidebar, by setting to 0 a special trigger will appear. + collapsible: Whether can be collapsed. + default_collapsed: To set the initial status. + reverse_arrow: Reverse direction of arrow, for a sider that expands from the right. + theme: Color theme of the sidebar. + trigger: Specify the customized trigger, set to null to hide the trigger. + width: Width of the sidebar. + zero_width_trigger_style: To customize the styles of the special trigger that appears when collapsed_width is 0. + """ super().__init__(visible=visible, elem_id=elem_id, elem_classes=elem_classes, @@ -43,6 +85,16 @@ def __init__( elem_style=elem_style, **kwargs) self.props = props + self.breakpoint = breakpoint + self.collapsed = collapsed + self.collapsed_width = collapsed_width + self.collapsible = collapsible + self.default_collapsed = default_collapsed + self.reverse_arrow = reverse_arrow + self.theme = theme + self.trigger = trigger + self.width = width + self.zero_width_trigger_style = zero_width_trigger_style FRONTEND_DIR = resolve_frontend_dir("layout", 'sider') diff --git a/backend/modelscope_studio/components/antd/space/__init__.py b/backend/modelscope_studio/components/antd/space/__init__.py index 1e05cc8d..8235c666 100644 --- a/backend/modelscope_studio/components/antd/space/__init__.py +++ b/backend/modelscope_studio/components/antd/space/__init__.py @@ -1,11 +1,24 @@ from __future__ import annotations +from typing import Literal + from ....utils.dev import ModelScopeLayoutComponent, resolve_frontend_dir from .compact import AntdSpaceCompact class AntdSpace(ModelScopeLayoutComponent): """ + Ant Design: https://ant.design/components/space + + Set components spacing. + + When to use: + - Avoid components clinging together and set a unified space. + - Use Space.Compact when child form components are compactly connected and the border is collapsed + + Difference with Flex component: + - Space is used to set the spacing between inline elements. It will add a wrapper element for each child element for inline alignment. Suitable for equidistant arrangement of multiple child elements in rows and columns. + - Flex is used to set the layout of block-level elements. It does not add a wrapper element. Suitable for layout of child elements in vertical or horizontal direction, and provides more flexibility and control. """ Compact = AntdSpaceCompact @@ -18,6 +31,14 @@ def __init__( self, props: dict | None = None, *, + align: Literal['start', 'end', 'center', 'baseline'] | None = None, + class_names: dict | None = None, + styles: dict | None = None, + direction: Literal['vertical', 'horizontal'] | None = 'horizontal', + size: Literal['small', 'middle', 'large'] | int | float + | list[Literal['small', 'middle', 'large'] | int | float] = 'small', + split: str | None = None, + wrap: bool = False, as_item: str | None = None, _internal: None = None, # gradio properties @@ -27,6 +48,16 @@ def __init__( elem_style: dict | None = None, render: bool = True, **kwargs): + """ + Parameters: + align: Align items. + class_names: Semantic className. + direction: The space direction. + size: The space size. + split: Set split. + styles: Semantic style. + wrap: Auto wrap line, when horizontal effective. + """ super().__init__(visible=visible, elem_id=elem_id, elem_classes=elem_classes, @@ -35,6 +66,13 @@ def __init__( elem_style=elem_style, **kwargs) self.props = props + self.align = align + self.class_names = class_names + self.styles = styles + self.direction = direction + self.size = size + self.split = split + self.wrap = wrap FRONTEND_DIR = resolve_frontend_dir("space") diff --git a/backend/modelscope_studio/components/antd/space/compact/__init__.py b/backend/modelscope_studio/components/antd/space/compact/__init__.py index 4610fe6e..90b7262c 100644 --- a/backend/modelscope_studio/components/antd/space/compact/__init__.py +++ b/backend/modelscope_studio/components/antd/space/compact/__init__.py @@ -1,10 +1,23 @@ from __future__ import annotations +from typing import Literal + from .....utils.dev import ModelScopeLayoutComponent, resolve_frontend_dir class AntdSpaceCompact(ModelScopeLayoutComponent): """ + Ant Design: https://ant.design/components/space + + Set components spacing. + + When to use: + - Avoid components clinging together and set a unified space. + - Use Space.Compact when child form components are compactly connected and the border is collapsed + + Difference with Flex component: + - Space is used to set the spacing between inline elements. It will add a wrapper element for each child element for inline alignment. Suitable for equidistant arrangement of multiple child elements in rows and columns. + - Flex is used to set the layout of block-level elements. It does not add a wrapper element. Suitable for layout of child elements in vertical or horizontal direction, and provides more flexibility and control. """ EVENTS = [] @@ -12,6 +25,9 @@ def __init__( self, props: dict | None = None, *, + block: bool = False, + direction: Literal['vertical', 'horizontal'] = 'horizontal', + size: Literal['small', 'middle', 'large'] = 'middle', as_item: str | None = None, _internal: None = None, # gradio properties @@ -21,6 +37,12 @@ def __init__( elem_style: dict | None = None, render: bool = True, **kwargs): + """ + Parameters: + block: Option to fit width to its parent's width. + direction: Set direction of layout. + size: Set child component size. + """ super().__init__(visible=visible, elem_id=elem_id, elem_classes=elem_classes, @@ -29,6 +51,9 @@ def __init__( elem_style=elem_style, **kwargs) self.props = props + self.block = block + self.direction = direction + self.size = size FRONTEND_DIR = resolve_frontend_dir("space", "compact") diff --git a/backend/modelscope_studio/components/antd/splitter/__init__.py b/backend/modelscope_studio/components/antd/splitter/__init__.py index c0978514..b4fb4e85 100644 --- a/backend/modelscope_studio/components/antd/splitter/__init__.py +++ b/backend/modelscope_studio/components/antd/splitter/__init__.py @@ -10,8 +10,11 @@ class AntdSplitter(ModelScopeLayoutComponent): """ + Ant Design: https://ant.design/components/splitter + Split panels to isolate. + When to use: Can be used to separate areas horizontally or vertically. When you need to freely drag and adjust the size of each area. When you need to specify the maximum and minimum width and height of an area. """ Panel = AntdSplitterPanel diff --git a/backend/modelscope_studio/components/antd/splitter/panel/__init__.py b/backend/modelscope_studio/components/antd/splitter/panel/__init__.py index b90aeea6..b01d0a8b 100644 --- a/backend/modelscope_studio/components/antd/splitter/panel/__init__.py +++ b/backend/modelscope_studio/components/antd/splitter/panel/__init__.py @@ -7,8 +7,11 @@ class AntdSplitterPanel(ModelScopeLayoutComponent): """ + Ant Design: https://ant.design/components/splitter + Split panels to isolate. + When to use: Can be used to separate areas horizontally or vertically. When you need to freely drag and adjust the size of each area. When you need to specify the maximum and minimum width and height of an area. """ diff --git a/backend/modelscope_studio/components/antd/typography/link/__init__.py b/backend/modelscope_studio/components/antd/typography/link/__init__.py index 03afb6d6..0fe09f34 100644 --- a/backend/modelscope_studio/components/antd/typography/link/__init__.py +++ b/backend/modelscope_studio/components/antd/typography/link/__init__.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any +from typing import Any, Literal from gradio.events import EventListener @@ -9,27 +9,40 @@ class AntdTypographyLink(ModelScopeLayoutComponent): """ + Ant Design: https://ant.design/components/typography + + Basic text writing, including headings, body text, lists, and more. + + When to use: + - When you need to display a title or paragraph contents in Articles/Blogs/Notes. + - When you need copyable/editable/ellipsis texts. """ EVENTS = [ EventListener("click", callback=lambda block: block._internal.update( - bind_click_event=True)), + bind_click_event=True), + doc="Set the handler to handle click event."), EventListener("copyable_copy", callback=lambda block: block._internal.update( - bind_copyable_copy_event=True)), + bind_copyable_copy_event=True), + doc="Called when copied text."), EventListener("editable_change", callback=lambda block: block._internal.update( - bind_editable_change_event=True)), + bind_editable_change_event=True), + doc="Called when input at textarea."), EventListener("editable_cancel", callback=lambda block: block._internal.update( - bind_editable_cancel_event=True)), + bind_editable_cancel_event=True), + doc="Called when type ESC to exit editable state."), EventListener("editable_start", callback=lambda block: block._internal.update( - bind_editable_start_event=True)), + bind_editable_start_event=True), + doc="Called when enter editable state."), EventListener("editable_end", callback=lambda block: block._internal.update( - bind_editable_end_event=True)), + bind_editable_end_event=True), + doc="Called when type ENTER to exit editable state."), ] # supported slots @@ -46,6 +59,21 @@ def __init__( value: str | None = "", props: dict | None = None, *, + href: str | None = None, + href_target: str | None = None, + code: bool = False, + copyable: bool | dict = False, + delete: bool = False, + disabled: bool = False, + editable: bool | dict = False, + ellipsis: bool = False, + keyboard: bool = False, + mark: bool = False, + strong: bool = False, + italic: bool = False, + type: Literal['secondary', 'success', 'warning', 'danger'] + | None = None, + underline: bool = False, as_item: str | None = None, _internal: None = None, # gradio properties @@ -55,6 +83,21 @@ def __init__( elem_style: dict | None = None, render: bool = True, **kwargs): + """ + Parameters: + code: Code style. + copyable: Whether to be copyable, customize it via setting an object. + delete: Deleted line style. + disabled: Disabled content. + editable: If editable. Can control edit state when is object. + ellipsis: Display ellipsis when text overflows. + keyboard: Keyboard style. + mark: Marked style. + strong: Bold style. + italic: Italic style. + type: Content type. + underline: Underlined style. + """ super().__init__(visible=visible, elem_id=elem_id, elem_classes=elem_classes, @@ -64,6 +107,20 @@ def __init__( **kwargs) self.value = value self.props = props + self.code = code + self.copyable = copyable + self.delete = delete + self.disabled = disabled + self.editable = editable + self.ellipsis = ellipsis + self.keyboard = keyboard + self.mark = mark + self.strong = strong + self.italic = italic + self.type = type + self.underline = underline + self.href = href + self.href_target = href_target FRONTEND_DIR = resolve_frontend_dir("typography", "link") diff --git a/backend/modelscope_studio/components/antd/typography/paragraph/__init__.py b/backend/modelscope_studio/components/antd/typography/paragraph/__init__.py index be82e6ad..0490f983 100644 --- a/backend/modelscope_studio/components/antd/typography/paragraph/__init__.py +++ b/backend/modelscope_studio/components/antd/typography/paragraph/__init__.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any +from typing import Any, Literal from gradio.events import EventListener @@ -9,36 +9,55 @@ class AntdTypographyParagraph(ModelScopeLayoutComponent): """ + Ant Design: https://ant.design/components/typography + + Basic text writing, including headings, body text, lists, and more. + + When to use: + - When you need to display a title or paragraph contents in Articles/Blogs/Notes. + - When you need copyable/editable/ellipsis texts. """ EVENTS = [ EventListener("click", callback=lambda block: block._internal.update( - bind_click_event=True)), + bind_click_event=True), + doc="Set the handler to handle click event."), EventListener("copyable_copy", callback=lambda block: block._internal.update( - bind_copyable_copy_event=True)), + bind_copyable_copy_event=True), + doc="Called when copied text."), EventListener("editable_change", callback=lambda block: block._internal.update( - bind_editable_change_event=True)), + bind_editable_change_event=True), + doc="Called when input at textarea."), EventListener("editable_cancel", callback=lambda block: block._internal.update( - bind_editable_cancel_event=True)), + bind_editable_cancel_event=True), + doc="Called when type ESC to exit editable state."), EventListener("editable_start", callback=lambda block: block._internal.update( - bind_editable_start_event=True)), + bind_editable_start_event=True), + doc="Called when enter editable state."), EventListener("editable_end", callback=lambda block: block._internal.update( - bind_editable_end_event=True)), - EventListener("ellipsis_expand", - callback=lambda block: block._internal.update( - bind_ellipsis_expand_event=True)), + bind_editable_end_event=True), + doc="Called when type ENTER to exit editable state."), EventListener("ellipsis_ellipsis", callback=lambda block: block._internal.update( - bind_ellipsis_ellipsis_event=True)), - EventListener("ellipsis_tooltip_open_change", + bind_ellipsis_ellipsis_event=True), + doc="Called when enter or leave ellipsis state."), + EventListener( + "ellipsis_tooltip_open_change", + callback=lambda block: block._internal.update( + bind_ellipsis_tooltip_openChange_event=True), + doc= + "Callback executed when visibility of the tooltip card is changed." + ), + EventListener("ellipsis_expand", callback=lambda block: block._internal.update( - bind_ellipsis_tooltip_openChange_event=True)), + bind_ellipsis_expand_event=True), + doc="Called when expand content."), ] # supported slots @@ -58,6 +77,18 @@ def __init__( value: str | None = "", props: dict | None = None, *, + code: bool = False, + copyable: bool | dict = False, + delete: bool = False, + disabled: bool = False, + editable: bool | dict = False, + ellipsis: bool | dict = False, + mark: bool = False, + strong: bool = False, + italic: bool = False, + type: Literal['secondary', 'success', 'warning', 'danger'] + | None = None, + underline: bool = False, as_item: str | None = None, _internal: None = None, # gradio properties @@ -67,6 +98,20 @@ def __init__( elem_style: dict | None = None, render: bool = True, **kwargs): + """ + Parameters: + code: Code style. + copyable: Whether to be copyable, customize it via setting an object. + delete: Deleted line style. + disabled: Disabled content. + editable: If editable. Can control edit state when is object. + ellipsis: Display ellipsis when text overflows, can configure rows and expandable by using object. + mark: Marked style. + strong: Bold style. + italic: Italic style. + type: Content type. + underline: Underlined style. + """ super().__init__(visible=visible, elem_id=elem_id, elem_classes=elem_classes, @@ -76,6 +121,17 @@ def __init__( **kwargs) self.value = value self.props = props + self.code = code + self.copyable = copyable + self.delete = delete + self.disabled = disabled + self.editable = editable + self.ellipsis = ellipsis + self.mark = mark + self.strong = strong + self.italic = italic + self.type = type + self.underline = underline FRONTEND_DIR = resolve_frontend_dir("typography", "paragraph") diff --git a/backend/modelscope_studio/components/antd/typography/text/__init__.py b/backend/modelscope_studio/components/antd/typography/text/__init__.py index 868ff1ec..ca446603 100644 --- a/backend/modelscope_studio/components/antd/typography/text/__init__.py +++ b/backend/modelscope_studio/components/antd/typography/text/__init__.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any +from typing import Any, Literal from gradio.events import EventListener @@ -9,33 +9,51 @@ class AntdTypographyText(ModelScopeLayoutComponent): """ + Ant Design: https://ant.design/components/typography + + Basic text writing, including headings, body text, lists, and more. + + When to use: + - When you need to display a title or paragraph contents in Articles/Blogs/Notes. + - When you need copyable/editable/ellipsis texts. """ EVENTS = [ EventListener("click", callback=lambda block: block._internal.update( - bind_click_event=True)), + bind_click_event=True), + doc="Set the handler to handle click event."), EventListener("copyable_copy", callback=lambda block: block._internal.update( - bind_copyable_copy_event=True)), + bind_copyable_copy_event=True), + doc="Called when copied text."), EventListener("editable_change", callback=lambda block: block._internal.update( - bind_editable_change_event=True)), + bind_editable_change_event=True), + doc="Called when input at textarea."), EventListener("editable_cancel", callback=lambda block: block._internal.update( - bind_editable_cancel_event=True)), + bind_editable_cancel_event=True), + doc="Called when type ESC to exit editable state."), EventListener("editable_start", callback=lambda block: block._internal.update( - bind_editable_start_event=True)), + bind_editable_start_event=True), + doc="Called when enter editable state."), EventListener("editable_end", callback=lambda block: block._internal.update( - bind_editable_end_event=True)), + bind_editable_end_event=True), + doc="Called when type ENTER to exit editable state."), EventListener("ellipsis_ellipsis", callback=lambda block: block._internal.update( - bind_ellipsis_ellipsis_event=True)), - EventListener("ellipsis_tooltip_open_change", - callback=lambda block: block._internal.update( - bind_ellipsis_tooltip_openChange_event=True)), + bind_ellipsis_ellipsis_event=True), + doc="Called when enter or leave ellipsis state."), + EventListener( + "ellipsis_tooltip_open_change", + callback=lambda block: block._internal.update( + bind_ellipsis_tooltip_openChange_event=True), + doc= + "Callback executed when visibility of the tooltip card is changed." + ), ] # supported slots @@ -55,6 +73,19 @@ def __init__( value: str | None = "", props: dict | None = None, *, + code: bool = False, + copyable: bool | dict = False, + delete: bool = False, + disabled: bool = False, + editable: bool | dict = False, + ellipsis: bool | dict = False, + keyboard: bool = False, + mark: bool = False, + strong: bool = False, + italic: bool = False, + type: Literal['secondary', 'success', 'warning', 'danger'] + | None = None, + underline: bool = False, as_item: str | None = None, _internal: None = None, # gradio properties @@ -64,6 +95,21 @@ def __init__( elem_style: dict | None = None, render: bool = True, **kwargs): + """ + Parameters: + code: Code style. + copyable: Whether to be copyable, customize it via setting an object. + delete: Deleted line style. + disabled: Disabled content. + editable: If editable. Can control edit state when is object. + ellipsis: Display ellipsis when text overflows, can't configure expandable、rows and onExpand by using object. Diff with Typography.Paragraph, Text do not have 100% width style which means it will fix width on the first ellipsis. If you want to have responsive ellipsis, please set width manually. + keyboard: Keyboard style. + mark: Marked style. + strong: Bold style. + italic: Italic style. + type: Content type. + underline: Underlined style. + """ super().__init__(visible=visible, elem_id=elem_id, elem_classes=elem_classes, @@ -73,6 +119,18 @@ def __init__( **kwargs) self.value = value self.props = props + self.code = code + self.copyable = copyable + self.delete = delete + self.disabled = disabled + self.editable = editable + self.ellipsis = ellipsis + self.keyboard = keyboard + self.mark = mark + self.strong = strong + self.italic = italic + self.type = type + self.underline = underline FRONTEND_DIR = resolve_frontend_dir("typography", "text") diff --git a/backend/modelscope_studio/components/antd/typography/title/__init__.py b/backend/modelscope_studio/components/antd/typography/title/__init__.py index 05740942..064bedca 100644 --- a/backend/modelscope_studio/components/antd/typography/title/__init__.py +++ b/backend/modelscope_studio/components/antd/typography/title/__init__.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any +from typing import Any, Literal from gradio.events import EventListener @@ -9,36 +9,55 @@ class AntdTypographyTitle(ModelScopeLayoutComponent): """ + Ant Design: https://ant.design/components/typography + + Basic text writing, including headings, body text, lists, and more. + + When to use: + - When you need to display a title or paragraph contents in Articles/Blogs/Notes. + - When you need copyable/editable/ellipsis texts. """ EVENTS = [ EventListener("click", callback=lambda block: block._internal.update( - bind_click_event=True)), + bind_click_event=True), + doc="Set the handler to handle click event."), EventListener("copyable_copy", callback=lambda block: block._internal.update( - bind_copyable_copy_event=True)), + bind_copyable_copy_event=True), + doc="Called when copied text."), EventListener("editable_change", callback=lambda block: block._internal.update( - bind_editable_change_event=True)), + bind_editable_change_event=True), + doc="Called when input at textarea."), EventListener("editable_cancel", callback=lambda block: block._internal.update( - bind_editable_cancel_event=True)), + bind_editable_cancel_event=True), + doc="Called when type ESC to exit editable state."), EventListener("editable_start", callback=lambda block: block._internal.update( - bind_editable_start_event=True)), + bind_editable_start_event=True), + doc="Called when enter editable state."), EventListener("editable_end", callback=lambda block: block._internal.update( - bind_editable_end_event=True)), - EventListener("ellipsis_expand", - callback=lambda block: block._internal.update( - bind_ellipsis_expand_event=True)), + bind_editable_end_event=True), + doc="Called when type ENTER to exit editable state."), EventListener("ellipsis_ellipsis", callback=lambda block: block._internal.update( - bind_ellipsis_ellipsis_event=True)), - EventListener("ellipsis_tooltip_open_change", + bind_ellipsis_ellipsis_event=True), + doc="Called when enter or leave ellipsis state."), + EventListener( + "ellipsis_tooltip_open_change", + callback=lambda block: block._internal.update( + bind_ellipsis_tooltip_openChange_event=True), + doc= + "Callback executed when visibility of the tooltip card is changed." + ), + EventListener("ellipsis_expand", callback=lambda block: block._internal.update( - bind_ellipsis_tooltip_openChange_event=True)), + bind_ellipsis_expand_event=True), + doc="Called when expand content."), ] # supported slots @@ -58,6 +77,18 @@ def __init__( value: str | None = "", props: dict | None = None, *, + code: bool = False, + copyable: bool | dict = False, + delete: bool = False, + disabled: bool = False, + editable: bool | dict = False, + ellipsis: bool | dict = False, + level: Literal[1, 2, 3, 4, 5] = 1, + mark: bool = False, + italic: bool = False, + type: Literal['secondary', 'success', 'warning', 'danger'] + | None = None, + underline: bool = False, as_item: str | None = None, _internal: None = None, # gradio properties @@ -67,6 +98,20 @@ def __init__( elem_style: dict | None = None, render: bool = True, **kwargs): + """ + Parameters: + code: Code style. + copyable: Whether to be copyable, customize it via setting an object. + delete: Deleted line style. + disabled: Disabled content. + editable: If editable. Can control edit state when is object. + ellipsis: Display ellipsis when text overflows, can configure rows and expandable by using object. + level: Set content importance. Match with h1, h2, h3, h4, h5. + mark: Marked style. + italic: Italic style. + type: Content type. + underline: Underlined style. + """ super().__init__(visible=visible, elem_id=elem_id, elem_classes=elem_classes, @@ -76,6 +121,17 @@ def __init__( **kwargs) self.value = value self.props = props + self.code = code + self.copyable = copyable + self.delete = delete + self.disabled = disabled + self.editable = editable + self.ellipsis = ellipsis + self.level = level + self.mark = mark + self.italic = italic + self.type = type + self.underline = underline FRONTEND_DIR = resolve_frontend_dir("typography", "title") diff --git a/frontend/antd/layout/sider/layout.sider.tsx b/frontend/antd/layout/sider/layout.sider.tsx index de7003f5..4b042ee9 100644 --- a/frontend/antd/layout/sider/layout.sider.tsx +++ b/frontend/antd/layout/sider/layout.sider.tsx @@ -11,7 +11,12 @@ export const LayoutSider = sveltify< : props.trigger + slots.trigger ? ( + + ) : props.trigger === undefined ? null : props.trigger === + 'default' ? undefined : ( + props.trigger + ) } /> ); diff --git a/frontend/antd/table/column/Index.svelte b/frontend/antd/table/column/Index.svelte index 11fe2bca..f07745a4 100644 --- a/frontend/antd/table/column/Index.svelte +++ b/frontend/antd/table/column/Index.svelte @@ -11,7 +11,6 @@ import type React from 'react'; import type { Gradio } from '@gradio/utils'; import { createFunction } from '@utils/createFunction'; - import { renderSlot } from '@utils/renderSlot'; import cls from 'classnames'; import { writable } from 'svelte/store'; diff --git a/frontend/antd/typography/Base.svelte b/frontend/antd/typography/Base.svelte index 9bf638a2..00f3c535 100644 --- a/frontend/antd/typography/Base.svelte +++ b/frontend/antd/typography/Base.svelte @@ -35,18 +35,23 @@ export let elem_classes: string[] = []; export let elem_style: React.CSSProperties = {}; - const [mergedProps, update] = getSlotContext({ - gradio, - props: $updatedProps, - _internal, - value, - visible, - elem_id, - elem_classes, - elem_style, - as_item, - restProps: $$restProps, - }); + const [mergedProps, update] = getSlotContext( + { + gradio, + props: $updatedProps, + _internal, + value, + visible, + elem_id, + elem_classes, + elem_style, + as_item, + restProps: $$restProps, + }, + { + href_target: 'target', + } + ); const setSlotParams = getSetSlotParamsFn(); const slots = getSlots(); $: update({ From 025f72825bdafbc60b4a09e577a363e43189bd1d Mon Sep 17 00:00:00 2001 From: Col0ring <1561999073@qq.com> Date: Tue, 15 Oct 2024 17:04:49 +0800 Subject: [PATCH 23/51] feat: migrate to gradio 5 --- .changeset/lemon-laws-cross.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 .changeset/lemon-laws-cross.md diff --git a/.changeset/lemon-laws-cross.md b/.changeset/lemon-laws-cross.md new file mode 100644 index 00000000..c0acb047 --- /dev/null +++ b/.changeset/lemon-laws-cross.md @@ -0,0 +1,17 @@ +--- +'@modelscope-studio/legacy-waterfall-gallery': patch +'@modelscope-studio/legacy-multimodal-input': patch +'@modelscope-studio/legacy-lifecycle': patch +'@modelscope-studio/legacy-markdown': patch +'@modelscope-studio/legacy-compiled': patch +'@modelscope-studio/legacy-chatbot': patch +'@modelscope-studio/legacy-flow': patch +'@modelscope-studio/lint-config': patch +'@modelscope-studio/changelog': patch +'@modelscope-studio/antd': patch +'@modelscope-studio/base': patch +'@modelscope-studio/frontend': patch +'modelscope_studio': patch +--- + +feat: migrate to gradio 5 From c2aaa1662fb85d2c38b54a1b97cc02c8de504f58 Mon Sep 17 00:00:00 2001 From: Col0ring <1561999073@qq.com> Date: Tue, 15 Oct 2024 19:12:33 +0800 Subject: [PATCH 24/51] chore: update versions --- .changeset/pre.json | 2 +- CHANGELOG.md | 6 ++++++ backend/modelscope_studio/version.py | 2 +- config/changelog/CHANGELOG.md | 6 ++++++ config/changelog/package.json | 2 +- config/lint-config/CHANGELOG.md | 6 ++++++ config/lint-config/package.json | 2 +- frontend/CHANGELOG.md | 6 ++++++ frontend/antd/CHANGELOG.md | 6 ++++++ frontend/antd/package.json | 2 +- frontend/base/CHANGELOG.md | 6 ++++++ frontend/base/package.json | 2 +- frontend/legacy/Chatbot/CHANGELOG.md | 6 ++++++ frontend/legacy/Chatbot/package.json | 2 +- frontend/legacy/Flow/CHANGELOG.md | 6 ++++++ frontend/legacy/Flow/package.json | 2 +- frontend/legacy/Lifecycle/CHANGELOG.md | 6 ++++++ frontend/legacy/Lifecycle/package.json | 2 +- frontend/legacy/Markdown/CHANGELOG.md | 6 ++++++ frontend/legacy/Markdown/package.json | 2 +- frontend/legacy/MultimodalInput/CHANGELOG.md | 6 ++++++ frontend/legacy/MultimodalInput/package.json | 2 +- frontend/legacy/WaterfallGallery/CHANGELOG.md | 6 ++++++ frontend/legacy/WaterfallGallery/package.json | 2 +- frontend/legacy/compiled/CHANGELOG.md | 6 ++++++ frontend/legacy/compiled/package.json | 2 +- frontend/package.json | 2 +- package.json | 2 +- pyproject.toml | 4 +++- 29 files changed, 96 insertions(+), 16 deletions(-) diff --git a/.changeset/pre.json b/.changeset/pre.json index 174d4e63..3ccff01a 100644 --- a/.changeset/pre.json +++ b/.changeset/pre.json @@ -16,5 +16,5 @@ "@modelscope-studio/legacy-waterfall-gallery": "0.4.2", "@modelscope-studio/legacy-compiled": "0.4.2" }, - "changesets": ["tough-walls-grab"] + "changesets": ["lemon-laws-cross", "tough-walls-grab"] } diff --git a/CHANGELOG.md b/CHANGELOG.md index 6a6f9021..fbbccec6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # modelscope_studio +## 1.0.0-beta.1 + +### Features + +- [`025f728`](https://github.com/modelscope/modelscope-studio/commit/025f72825bdafbc60b4a09e577a363e43189bd1d) - migrate to gradio 5. Thanks [@Col0ring](https://github.com/Col0ring)! + ## 1.0.0-beta.0 ### Features diff --git a/backend/modelscope_studio/version.py b/backend/modelscope_studio/version.py index 7dc4b0a3..9fe2a012 100644 --- a/backend/modelscope_studio/version.py +++ b/backend/modelscope_studio/version.py @@ -1 +1 @@ -__version__ = "1.0.0-beta.0" +__version__ = "1.0.0-beta.1" diff --git a/config/changelog/CHANGELOG.md b/config/changelog/CHANGELOG.md index 2b5fa459..e72e8e57 100644 --- a/config/changelog/CHANGELOG.md +++ b/config/changelog/CHANGELOG.md @@ -1,5 +1,11 @@ # @modelscope-studio/changelog +## 1.0.0-beta.1 + +### Features + +- [`025f728`](https://github.com/modelscope/modelscope-studio/commit/025f72825bdafbc60b4a09e577a363e43189bd1d) - migrate to gradio 5. Thanks [@Col0ring](https://github.com/Col0ring)! + ## 1.0.0-beta.0 ### Features diff --git a/config/changelog/package.json b/config/changelog/package.json index 3694c216..5dd90ba9 100644 --- a/config/changelog/package.json +++ b/config/changelog/package.json @@ -1,6 +1,6 @@ { "name": "@modelscope-studio/changelog", - "version": "1.0.0-beta.0", + "version": "1.0.0-beta.1", "private": false, "description": "ModelScope Studio Changelog", "repository": "git@github.com:modelscope/modelscope-studio.git", diff --git a/config/lint-config/CHANGELOG.md b/config/lint-config/CHANGELOG.md index d4de9b1f..613c5fae 100644 --- a/config/lint-config/CHANGELOG.md +++ b/config/lint-config/CHANGELOG.md @@ -1,5 +1,11 @@ # @modelscope-studio/lint-config +## 1.0.0-beta.1 + +### Features + +- [`025f728`](https://github.com/modelscope/modelscope-studio/commit/025f72825bdafbc60b4a09e577a363e43189bd1d) - migrate to gradio 5. Thanks [@Col0ring](https://github.com/Col0ring)! + ## 1.0.0-beta.0 ### Features diff --git a/config/lint-config/package.json b/config/lint-config/package.json index 9c353a01..29e58866 100644 --- a/config/lint-config/package.json +++ b/config/lint-config/package.json @@ -1,6 +1,6 @@ { "name": "@modelscope-studio/lint-config", - "version": "1.0.0-beta.0", + "version": "1.0.0-beta.1", "private": false, "description": "ModelScope Studio Lint Config", "repository": "git@github.com:modelscope/modelscope-studio.git", diff --git a/frontend/CHANGELOG.md b/frontend/CHANGELOG.md index 43f311d2..a5c582a0 100644 --- a/frontend/CHANGELOG.md +++ b/frontend/CHANGELOG.md @@ -1,5 +1,11 @@ # @modelscope-studio/frontend +## 1.0.0-beta.1 + +### Features + +- [`025f728`](https://github.com/modelscope/modelscope-studio/commit/025f72825bdafbc60b4a09e577a363e43189bd1d) - migrate to gradio 5. Thanks [@Col0ring](https://github.com/Col0ring)! + ## 1.0.0-beta.0 ### Features diff --git a/frontend/antd/CHANGELOG.md b/frontend/antd/CHANGELOG.md index 1dd888ac..690911e9 100644 --- a/frontend/antd/CHANGELOG.md +++ b/frontend/antd/CHANGELOG.md @@ -1,5 +1,11 @@ # @modelscope-studio/antd +## 1.0.0-beta.1 + +### Features + +- [`025f728`](https://github.com/modelscope/modelscope-studio/commit/025f72825bdafbc60b4a09e577a363e43189bd1d) - migrate to gradio 5. Thanks [@Col0ring](https://github.com/Col0ring)! + ## 1.0.0-beta.0 ### Features diff --git a/frontend/antd/package.json b/frontend/antd/package.json index 35e8279c..5168ca34 100644 --- a/frontend/antd/package.json +++ b/frontend/antd/package.json @@ -1,5 +1,5 @@ { "name": "@modelscope-studio/antd", - "version": "1.0.0-beta.0", + "version": "1.0.0-beta.1", "type": "module" } diff --git a/frontend/base/CHANGELOG.md b/frontend/base/CHANGELOG.md index 14f7059a..85230c4c 100644 --- a/frontend/base/CHANGELOG.md +++ b/frontend/base/CHANGELOG.md @@ -1,5 +1,11 @@ # @modelscope-studio/base +## 1.0.0-beta.1 + +### Features + +- [`025f728`](https://github.com/modelscope/modelscope-studio/commit/025f72825bdafbc60b4a09e577a363e43189bd1d) - migrate to gradio 5. Thanks [@Col0ring](https://github.com/Col0ring)! + ## 1.0.0-beta.0 ### Features diff --git a/frontend/base/package.json b/frontend/base/package.json index 31e86338..e40e6552 100644 --- a/frontend/base/package.json +++ b/frontend/base/package.json @@ -1,5 +1,5 @@ { "name": "@modelscope-studio/base", - "version": "1.0.0-beta.0", + "version": "1.0.0-beta.1", "type": "module" } diff --git a/frontend/legacy/Chatbot/CHANGELOG.md b/frontend/legacy/Chatbot/CHANGELOG.md index bcaa174a..58e01bb7 100644 --- a/frontend/legacy/Chatbot/CHANGELOG.md +++ b/frontend/legacy/Chatbot/CHANGELOG.md @@ -1,5 +1,11 @@ # @modelscope-studio/legacy-chatbot +## 1.0.0-beta.1 + +### Features + +- [`025f728`](https://github.com/modelscope/modelscope-studio/commit/025f72825bdafbc60b4a09e577a363e43189bd1d) - migrate to gradio 5. Thanks [@Col0ring](https://github.com/Col0ring)! + ## 1.0.0-beta.0 ### Features diff --git a/frontend/legacy/Chatbot/package.json b/frontend/legacy/Chatbot/package.json index 101bbdd0..32ba1029 100644 --- a/frontend/legacy/Chatbot/package.json +++ b/frontend/legacy/Chatbot/package.json @@ -1,6 +1,6 @@ { "name": "@modelscope-studio/legacy-chatbot", - "version": "1.0.0-beta.0", + "version": "1.0.0-beta.1", "private": false, "description": "ModelScope Gradio Components", "repository": "git@github.com:modelscope/modelscope-studio.git", diff --git a/frontend/legacy/Flow/CHANGELOG.md b/frontend/legacy/Flow/CHANGELOG.md index 9e46d194..832ab64a 100644 --- a/frontend/legacy/Flow/CHANGELOG.md +++ b/frontend/legacy/Flow/CHANGELOG.md @@ -1,5 +1,11 @@ # @modelscope-studio/legacy-flow +## 1.0.0-beta.1 + +### Features + +- [`025f728`](https://github.com/modelscope/modelscope-studio/commit/025f72825bdafbc60b4a09e577a363e43189bd1d) - migrate to gradio 5. Thanks [@Col0ring](https://github.com/Col0ring)! + ## 1.0.0-beta.0 ### Features diff --git a/frontend/legacy/Flow/package.json b/frontend/legacy/Flow/package.json index 1bd8735d..b4abf6ff 100644 --- a/frontend/legacy/Flow/package.json +++ b/frontend/legacy/Flow/package.json @@ -1,6 +1,6 @@ { "name": "@modelscope-studio/legacy-flow", - "version": "1.0.0-beta.0", + "version": "1.0.0-beta.1", "private": false, "description": "ModelScope Gradio Components", "repository": "git@github.com:modelscope/modelscope-studio.git", diff --git a/frontend/legacy/Lifecycle/CHANGELOG.md b/frontend/legacy/Lifecycle/CHANGELOG.md index 335ae7c6..bf4826d4 100644 --- a/frontend/legacy/Lifecycle/CHANGELOG.md +++ b/frontend/legacy/Lifecycle/CHANGELOG.md @@ -1,5 +1,11 @@ # @modelscope-studio/legacy-lifecycle +## 1.0.0-beta.1 + +### Features + +- [`025f728`](https://github.com/modelscope/modelscope-studio/commit/025f72825bdafbc60b4a09e577a363e43189bd1d) - migrate to gradio 5. Thanks [@Col0ring](https://github.com/Col0ring)! + ## 1.0.0-beta.0 ### Features diff --git a/frontend/legacy/Lifecycle/package.json b/frontend/legacy/Lifecycle/package.json index d285d85b..b6d30d4a 100644 --- a/frontend/legacy/Lifecycle/package.json +++ b/frontend/legacy/Lifecycle/package.json @@ -1,6 +1,6 @@ { "name": "@modelscope-studio/legacy-lifecycle", - "version": "1.0.0-beta.0", + "version": "1.0.0-beta.1", "private": false, "description": "ModelScope Gradio Components", "repository": "git@github.com:modelscope/modelscope-studio.git", diff --git a/frontend/legacy/Markdown/CHANGELOG.md b/frontend/legacy/Markdown/CHANGELOG.md index 11a3b9c5..a4d978db 100644 --- a/frontend/legacy/Markdown/CHANGELOG.md +++ b/frontend/legacy/Markdown/CHANGELOG.md @@ -1,5 +1,11 @@ # @modelscope-studio/legacy-markdown +## 1.0.0-beta.1 + +### Features + +- [`025f728`](https://github.com/modelscope/modelscope-studio/commit/025f72825bdafbc60b4a09e577a363e43189bd1d) - migrate to gradio 5. Thanks [@Col0ring](https://github.com/Col0ring)! + ## 1.0.0-beta.0 ### Features diff --git a/frontend/legacy/Markdown/package.json b/frontend/legacy/Markdown/package.json index e33ff967..524abcf1 100644 --- a/frontend/legacy/Markdown/package.json +++ b/frontend/legacy/Markdown/package.json @@ -1,6 +1,6 @@ { "name": "@modelscope-studio/legacy-markdown", - "version": "1.0.0-beta.0", + "version": "1.0.0-beta.1", "private": false, "description": "ModelScope Gradio Components", "repository": "git@github.com:modelscope/modelscope-studio.git", diff --git a/frontend/legacy/MultimodalInput/CHANGELOG.md b/frontend/legacy/MultimodalInput/CHANGELOG.md index d44da709..e94d93a1 100644 --- a/frontend/legacy/MultimodalInput/CHANGELOG.md +++ b/frontend/legacy/MultimodalInput/CHANGELOG.md @@ -1,5 +1,11 @@ # @modelscope-studio/legacy-multimodal-input +## 1.0.0-beta.1 + +### Features + +- [`025f728`](https://github.com/modelscope/modelscope-studio/commit/025f72825bdafbc60b4a09e577a363e43189bd1d) - migrate to gradio 5. Thanks [@Col0ring](https://github.com/Col0ring)! + ## 1.0.0-beta.0 ### Features diff --git a/frontend/legacy/MultimodalInput/package.json b/frontend/legacy/MultimodalInput/package.json index e173cdf5..ba482e4b 100644 --- a/frontend/legacy/MultimodalInput/package.json +++ b/frontend/legacy/MultimodalInput/package.json @@ -1,6 +1,6 @@ { "name": "@modelscope-studio/legacy-multimodal-input", - "version": "1.0.0-beta.0", + "version": "1.0.0-beta.1", "private": false, "description": "ModelScope Gradio Components", "repository": "git@github.com:modelscope/modelscope-studio.git", diff --git a/frontend/legacy/WaterfallGallery/CHANGELOG.md b/frontend/legacy/WaterfallGallery/CHANGELOG.md index 6a6e41b7..4e228d3c 100644 --- a/frontend/legacy/WaterfallGallery/CHANGELOG.md +++ b/frontend/legacy/WaterfallGallery/CHANGELOG.md @@ -1,5 +1,11 @@ # @modelscope-studio/legacy-waterfall-gallery +## 1.0.0-beta.1 + +### Features + +- [`025f728`](https://github.com/modelscope/modelscope-studio/commit/025f72825bdafbc60b4a09e577a363e43189bd1d) - migrate to gradio 5. Thanks [@Col0ring](https://github.com/Col0ring)! + ## 1.0.0-beta.0 ### Features diff --git a/frontend/legacy/WaterfallGallery/package.json b/frontend/legacy/WaterfallGallery/package.json index 2ab708df..993ece63 100644 --- a/frontend/legacy/WaterfallGallery/package.json +++ b/frontend/legacy/WaterfallGallery/package.json @@ -1,6 +1,6 @@ { "name": "@modelscope-studio/legacy-waterfall-gallery", - "version": "1.0.0-beta.0", + "version": "1.0.0-beta.1", "description": "ModelScope Gradio Components", "repository": "git@github.com:modelscope/modelscope-studio.git", "license": "Apache-2.0", diff --git a/frontend/legacy/compiled/CHANGELOG.md b/frontend/legacy/compiled/CHANGELOG.md index 5bb8adad..4732ed6a 100644 --- a/frontend/legacy/compiled/CHANGELOG.md +++ b/frontend/legacy/compiled/CHANGELOG.md @@ -1,5 +1,11 @@ # @modelscope-studio/legacy-compiled +## 1.0.0-beta.1 + +### Features + +- [`025f728`](https://github.com/modelscope/modelscope-studio/commit/025f72825bdafbc60b4a09e577a363e43189bd1d) - migrate to gradio 5. Thanks [@Col0ring](https://github.com/Col0ring)! + ## 1.0.0-beta.0 ### Features diff --git a/frontend/legacy/compiled/package.json b/frontend/legacy/compiled/package.json index 2e60fb64..32debb81 100644 --- a/frontend/legacy/compiled/package.json +++ b/frontend/legacy/compiled/package.json @@ -1,6 +1,6 @@ { "name": "@modelscope-studio/legacy-compiled", - "version": "1.0.0-beta.0", + "version": "1.0.0-beta.1", "private": false, "description": "ModelScope Gradio Components", "repository": "git@github.com:modelscope/modelscope-studio.git", diff --git a/frontend/package.json b/frontend/package.json index eab4bb3c..179840d3 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,6 +1,6 @@ { "name": "@modelscope-studio/frontend", - "version": "1.0.0-beta.0", + "version": "1.0.0-beta.1", "private": false, "description": "ModelScope Gradio Components", "license": "Apache-2.0", diff --git a/package.json b/package.json index 5ca3f779..fc3382a1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "modelscope_studio", - "version": "1.0.0-beta.0", + "version": "1.0.0-beta.1", "private": true, "description": "ModelScope Gradio Components", "repository": "git@github.com:modelscope/modelscope-studio.git", diff --git a/pyproject.toml b/pyproject.toml index a26cfde2..46bc0e39 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,7 +8,7 @@ build-backend = "hatchling.build" [project] name = "modelscope_studio" -version = "1.0.0-beta.0" +version = "1.0.0-beta.1" description = "A set of extension component, inluding components for conversational input and display in multimodal scenarios, as well as more components for vertical scenarios." readme = "README.md" license = "Apache-2.0" @@ -193,6 +193,8 @@ artifacts = [ "/backend/modelscope_studio/components/antd/tree_select/templates", "/backend/modelscope_studio/components/antd/tree_select/tree_node/templates", "/backend/modelscope_studio/components/antd/upload/dragger/templates", + "/backend/modelscope_studio/components/antd/splitter/templates", + "/backend/modelscope_studio/components/antd/splitter/panel/templates", "/backend/modelscope_studio/components/legacy/Chatbot/templates", "/backend/modelscope_studio/components/legacy/Flow/templates", "/backend/modelscope_studio/components/legacy/Markdown/templates", From badca56afb45a76bbf0eb7aaf4ffe4a2c2830dbe Mon Sep 17 00:00:00 2001 From: Col0ring <1561999073@qq.com> Date: Mon, 21 Oct 2024 17:56:49 +0800 Subject: [PATCH 25/51] refactor: data components --- .../components/antd/affix/__init__.py | 21 +++++- .../components/antd/anchor/__init__.py | 52 ++++++++++++-- .../components/antd/anchor/item/__init__.py | 23 ++++++ .../components/antd/breadcrumb/__init__.py | 9 +++ .../antd/breadcrumb/item/__init__.py | 15 +++- .../components/antd/collapse/__init__.py | 36 ++-------- .../components/antd/dropdown/__init__.py | 33 ++++++++- .../antd/dropdown/button/__init__.py | 44 +++++++++++- .../antd/form/item/rule/__init__.py | 5 +- .../components/antd/menu/__init__.py | 63 +++++++++++----- .../components/antd/menu/item/__init__.py | 18 +++++ .../components/antd/pagination/__init__.py | 72 ++++++++++++------- .../antd/table/expandable/__init__.py | 15 ++-- .../antd/table/row_selection/__init__.py | 35 ++------- .../components/antd/tabs/__init__.py | 15 ++-- .../components/antd/tour/__init__.py | 51 +++++++++---- .../components/antd/tour/step/__init__.py | 30 ++++++++ .../components/antd/tree/__init__.py | 27 ++----- .../antd/tree/directory_tree/__init__.py | 24 ++----- frontend/antd/anchor/item/Index.svelte | 27 ++++--- frontend/antd/badge/Index.svelte | 4 -- .../breadcrumb/item/BreadcrumbItem.svelte | 49 +++++++------ frontend/antd/collapse/Index.svelte | 7 -- frontend/antd/collapse/collapse.tsx | 3 - frontend/antd/divider/Index.svelte | 1 - .../antd/dropdown/button/dropdown.button.tsx | 17 +++-- frontend/antd/form/item/rule/Index.svelte | 8 ++- frontend/antd/menu/Index.svelte | 18 ----- frontend/antd/menu/item/Index.svelte | 8 ++- frontend/antd/menu/menu.less | 44 ++++++++++++ frontend/antd/menu/menu.tsx | 19 +---- frontend/antd/pagination/Index.svelte | 12 ---- frontend/antd/pagination/pagination.tsx | 3 - frontend/antd/table/column/Index.svelte | 59 ++++++++++----- .../antd/table/expandable/Expandable.svelte | 29 ++++---- .../antd/table/row-selection/Index.svelte | 2 - .../table/row-selection/RowSelection.svelte | 36 +++++----- frontend/antd/tabs/Index.svelte | 7 -- frontend/antd/tabs/tabs.tsx | 3 - frontend/antd/tour/Index.svelte | 15 ++-- frontend/antd/tour/step/Index.svelte | 31 ++++---- frontend/antd/tour/tour.tsx | 27 ++++--- frontend/antd/tree/Index.svelte | 22 ------ .../antd/tree/directory-tree/Index.svelte | 22 ------ frontend/antd/tree/tree-node/Index.svelte | 3 +- frontend/antd/tree/tree.tsx | 23 ------ frontend/svelte-preprocess-react/component.ts | 2 + 47 files changed, 635 insertions(+), 454 deletions(-) create mode 100644 frontend/antd/menu/menu.less diff --git a/backend/modelscope_studio/components/antd/affix/__init__.py b/backend/modelscope_studio/components/antd/affix/__init__.py index 04cf700b..ef071700 100644 --- a/backend/modelscope_studio/components/antd/affix/__init__.py +++ b/backend/modelscope_studio/components/antd/affix/__init__.py @@ -9,17 +9,28 @@ class AntdAffix(ModelScopeLayoutComponent): """ + Ant Design: https://ant.design/components/affix + + Stick an element to the viewport. + + When to use: + On longer web pages, it's helpful to stick component into the viewport. This is common for menus and actions. + + Please note that Affix should not cover other content on the page, especially when the size of the viewport is small. """ EVENTS = [ EventListener("change", callback=lambda block: block._internal.update( - bind_change_event=True)) + bind_change_event=True), + doc="Callback for when Affix state is changed.") ] def __init__( self, props: dict | None = None, *, + offset_bottom: int | float | None = None, + offset_top: int | float | None = 0, elem_target: str | None = None, as_item: str | None = None, _internal: None = None, @@ -30,6 +41,12 @@ def __init__( elem_style: dict | None = None, render: bool = True, **kwargs): + """ + Parameters: + offset_bottom: Offset from the bottom of the viewport (in pixels). + offset_top: Offset from the top of the viewport (in pixels). + elem_target: Specifies the scrollable area DOM node. + """ super().__init__(visible=visible, elem_id=elem_id, elem_classes=elem_classes, @@ -38,6 +55,8 @@ def __init__( elem_style=elem_style, **kwargs) self.props = props + self.offset_bottom = offset_bottom + self.offset_top = offset_top self.elem_target = elem_target FRONTEND_DIR = resolve_frontend_dir("affix") diff --git a/backend/modelscope_studio/components/antd/anchor/__init__.py b/backend/modelscope_studio/components/antd/anchor/__init__.py index 4ba1176b..57cf266e 100644 --- a/backend/modelscope_studio/components/antd/anchor/__init__.py +++ b/backend/modelscope_studio/components/antd/anchor/__init__.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any +from typing import Any, Literal from gradio.events import EventListener @@ -10,24 +10,45 @@ class AntdAnchor(ModelScopeLayoutComponent): """ + Ant Design: https://ant.design/components/anchor + Hyperlinks to scroll on one page. + + When to use: + For displaying anchor hyperlinks on page and jumping between them. """ Item = AntdAnchorItem EVENTS = [ EventListener("change", callback=lambda block: block._internal.update( - bind_change_event=True)), + bind_change_event=True), + doc="Listening for anchor link change"), EventListener("click", callback=lambda block: block._internal.update( - bind_click_event=True)), + bind_click_event=True), + doc="Set the handler to handle click event."), EventListener('affix_change', callback=lambda block: block._internal.update( - bind_affix_change_event=True)) + bind_affix_change_event=True), + doc="Callback for when Affix state is changed") ] + # supported slots + SLOTS = ['items'] + def __init__( self, props: dict | None = None, *, + affix: bool | dict = True, + bounds: int | float = 5, + get_container: str | None = None, + get_current_anchor: str | None = None, + offset_top: int | float = 0, + show_ink_in_fixed: bool = False, + target_offset: int | float | None = None, + items: list[dict] | None = None, + direction: Literal['vertical', 'horizontal'] = 'vertical', + replace: bool = False, as_item: str | None = None, _internal: None = None, # gradio properties @@ -37,6 +58,19 @@ def __init__( elem_style: dict | None = None, render: bool = True, **kwargs): + """ + Parameters: + affix: Fixed mode of Anchor. + bounds: Bounding distance of anchor area. + get_container: Scrolling container. + get_current_anchor: Customize the anchor highlightL. + offset_top: Pixels to offset from top when calculating position of scroll. + show_ink_in_fixed: Whether show ink-square when affix=False. + target_offset: Anchor scroll offset, default as offsetTop. + items: Data configuration option content, support nesting through children. + direction: Set Anchor direction. + replace: Replace items' href in browser history instead of pushing it. + """ super().__init__(visible=visible, elem_id=elem_id, elem_classes=elem_classes, @@ -45,6 +79,16 @@ def __init__( elem_style=elem_style, **kwargs) self.props = props + self.affix = affix + self.bounds = bounds + self.get_container = get_container + self.get_current_anchor = get_current_anchor + self.offset_top = offset_top + self.show_ink_in_fixed = show_ink_in_fixed + self.target_offset = target_offset + self.items = items + self.direction = direction + self.replace = replace FRONTEND_DIR = resolve_frontend_dir("anchor") diff --git a/backend/modelscope_studio/components/antd/anchor/item/__init__.py b/backend/modelscope_studio/components/antd/anchor/item/__init__.py index d8ceada5..69b7f2e6 100644 --- a/backend/modelscope_studio/components/antd/anchor/item/__init__.py +++ b/backend/modelscope_studio/components/antd/anchor/item/__init__.py @@ -7,6 +7,11 @@ class AntdAnchorItem(ModelScopeLayoutComponent): """ + Ant Design: https://ant.design/components/anchor + Hyperlinks to scroll on one page. + + When to use: + For displaying anchor hyperlinks on page and jumping between them. """ EVENTS = [] # supported slots @@ -14,8 +19,13 @@ class AntdAnchorItem(ModelScopeLayoutComponent): def __init__( self, + title: str | None = None, props: dict | None = None, *, + key: str | None = None, + replace: bool = False, + href: str | None = None, + href_target: str | None = None, as_item: str | None = None, _internal: None = None, # gradio properties @@ -25,6 +35,14 @@ def __init__( elem_style: dict | None = None, render: bool = True, **kwargs): + """ + Parameters: + title: The content of hyperlink. + key: The unique identifier of the Anchor Link. + href: The target of hyperlink. + href_target: Specifies where to display the linked URL. + replace: Replace item href in browser history instead of pushing it. + """ super().__init__(visible=visible, elem_id=elem_id, elem_classes=elem_classes, @@ -33,6 +51,11 @@ def __init__( elem_style=elem_style, **kwargs) self.props = props + self.title = title + self.key = key + self.replace = replace + self.href = href + self.href_target = href_target FRONTEND_DIR = resolve_frontend_dir("anchor", "item") diff --git a/backend/modelscope_studio/components/antd/breadcrumb/__init__.py b/backend/modelscope_studio/components/antd/breadcrumb/__init__.py index e65ea3fa..cc6bcfa5 100644 --- a/backend/modelscope_studio/components/antd/breadcrumb/__init__.py +++ b/backend/modelscope_studio/components/antd/breadcrumb/__init__.py @@ -8,6 +8,7 @@ class AntdBreadcrumb(ModelScopeLayoutComponent): """ + Ant Design: https://ant.design/components/breadcrumb """ Item = AntdBreadcrumbItem @@ -20,6 +21,10 @@ def __init__( self, props: dict | None = None, *, + item_render: str | None = None, + params: dict | None = None, + items: list[dict] | None = None, + separator: str | None = None, as_item: str | None = None, _internal: None = None, # gradio properties @@ -37,6 +42,10 @@ def __init__( elem_style=elem_style, **kwargs) self.props = props + self.item_render = item_render + self.params = params + self.items = items + self.separator = separator FRONTEND_DIR = resolve_frontend_dir("breadcrumb") diff --git a/backend/modelscope_studio/components/antd/breadcrumb/item/__init__.py b/backend/modelscope_studio/components/antd/breadcrumb/item/__init__.py index 23e9e765..ac6cccc7 100644 --- a/backend/modelscope_studio/components/antd/breadcrumb/item/__init__.py +++ b/backend/modelscope_studio/components/antd/breadcrumb/item/__init__.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any +from typing import Any, Literal from gradio.events import EventListener @@ -9,6 +9,7 @@ class AntdBreadcrumbItem(ModelScopeLayoutComponent): """ + Ant Design: https://ant.design/components/breadcrumb """ EVENTS = [ @@ -61,6 +62,12 @@ def __init__( title: str | None = None, props: dict | None = None, *, + dropdown_props: dict | None = None, + href: str | None = None, + path: str | None = None, + menu: dict | None = None, + type: Literal['separator'] | None = None, + separator: str | None = None, as_item: str | None = None, _internal: None = None, # gradio properties @@ -79,6 +86,12 @@ def __init__( **kwargs) self.props = props self.title = title + self.dropdown_props = dropdown_props + self.href = href + self.path = path + self.menu = menu + self.type = type + self.separator = separator FRONTEND_DIR = resolve_frontend_dir("breadcrumb", "item") diff --git a/backend/modelscope_studio/components/antd/collapse/__init__.py b/backend/modelscope_studio/components/antd/collapse/__init__.py index 5cdff9ff..7be1dbaa 100644 --- a/backend/modelscope_studio/components/antd/collapse/__init__.py +++ b/backend/modelscope_studio/components/antd/collapse/__init__.py @@ -4,12 +4,11 @@ from gradio.events import EventListener -from ....utils.dev import ModelScopeDataLayoutComponent, resolve_frontend_dir +from ....utils.dev import ModelScopeLayoutComponent, resolve_frontend_dir from .item import AntdCollapseItem -# as inputs, outputs -class AntdCollapse(ModelScopeDataLayoutComponent): +class AntdCollapse(ModelScopeLayoutComponent): """ """ Item = AntdCollapseItem @@ -37,8 +36,7 @@ def __init__( elem_style: dict | None = None, render: bool = True, **kwargs): - super().__init__(value=value, - visible=visible, + super().__init__(visible=visible, elem_id=elem_id, elem_classes=elem_classes, render=render, @@ -51,34 +49,12 @@ def __init__( @property def skip_api(self): - return False + return True - def api_info(self) -> dict[str, Any]: - return { - "anyOf": [{ - "type": "number" - }, { - "type": "string" - }, { - "type": "array", - "items": { - "anyOf": [{ - "type": "number" - }, { - "type": "string" - }] - } - }] - } - - def preprocess( - self, payload: str | int | float | list[str | int | float] - ) -> str | int | float | list[str | int | float]: + def preprocess(self, payload: None) -> None: return payload - def postprocess( - self, value: str | int | float | list[str | int | float] - ) -> str | int | float | list[str | int | float]: + def postprocess(self, value: None) -> None: return value def example_payload(self) -> Any: diff --git a/backend/modelscope_studio/components/antd/dropdown/__init__.py b/backend/modelscope_studio/components/antd/dropdown/__init__.py index 14dbdba4..fd50af01 100644 --- a/backend/modelscope_studio/components/antd/dropdown/__init__.py +++ b/backend/modelscope_studio/components/antd/dropdown/__init__.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any +from typing import Any, Literal from gradio.events import EventListener @@ -10,6 +10,7 @@ class AntdDropdown(ModelScopeLayoutComponent): """ + Ant Design: https://ant.design/components/dropdown """ Button = AntdDropdownButton EVENTS = [ @@ -39,8 +40,23 @@ class AntdDropdown(ModelScopeLayoutComponent): def __init__( self, props: dict | None = None, - inner_elem_style: dict | None = None, *, + arrow: dict | bool = False, + auto_adjust_overflow: bool = True, + auto_focus: bool = False, + disabled: bool | None = None, + destroy_popup_on_hide: bool = False, + dropdown_render: str | None = None, + get_popup_container: str | None = None, + menu: dict | None = None, + overlay_class_name: str | None = None, + overlay_style: dict | None = None, + placement: Literal['topLeft', 'top', 'topRight', 'bottomLeft', + 'bottom', 'bottomRight'] = "bottomLeft", + trigger: list[Literal['click', 'hover', + 'contextMenu']] = ['hover'], + open: bool | None = None, + inner_elem_style: dict | None = None, as_item: str | None = None, _internal: None = None, # gradio properties @@ -58,6 +74,19 @@ def __init__( elem_style=elem_style, **kwargs) self.props = props + self.arrow = arrow + self.auto_adjust_overflow = auto_adjust_overflow + self.auto_focus = auto_focus + self.disabled = disabled + self.destroy_popup_on_hide = destroy_popup_on_hide + self.dropdown_render = dropdown_render + self.get_popup_container = get_popup_container + self.menu = menu + self.overlay_class_name = overlay_class_name + self.overlay_style = overlay_style + self.placement = placement + self.trigger = trigger + self.open = open self.inner_elem_style = inner_elem_style FRONTEND_DIR = resolve_frontend_dir("dropdown") diff --git a/backend/modelscope_studio/components/antd/dropdown/button/__init__.py b/backend/modelscope_studio/components/antd/dropdown/button/__init__.py index c393cc2d..e6e59df9 100644 --- a/backend/modelscope_studio/components/antd/dropdown/button/__init__.py +++ b/backend/modelscope_studio/components/antd/dropdown/button/__init__.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any +from typing import Any, Literal from gradio.events import EventListener @@ -9,6 +9,7 @@ class AntdDropdownButton(ModelScopeLayoutComponent): """ + Ant Design: https://ant.design/components/dropdown """ EVENTS = [ @@ -43,6 +44,28 @@ def __init__( value: str | None = "Run", props: dict | None = None, *, + arrow: dict | bool = False, + auto_adjust_overflow: bool = True, + auto_focus: bool = False, + disabled: bool | None = None, + destroy_popup_on_hide: bool = False, + dropdown_render: str | None = None, + get_popup_container: str | None = None, + menu: dict | None = None, + overlay_class_name: str | None = None, + overlay_style: dict | None = None, + placement: Literal['topLeft', 'top', 'topRight', 'bottomLeft', + 'bottom', 'bottomRight'] = "bottomLeft", + trigger: list[Literal['click', 'hover', + 'contextMenu']] = ['hover'], + open: bool | None = None, + buttons_render: str | None = None, + loading: bool | dict = False, + danger: bool | None = None, + icon: str | None = None, + size: Literal["large", "middle", "small"] | None = None, + type: Literal["primary", "dashed", "link", "text", "default"] + | None = None, as_item: str | None = None, _internal: None = None, # gradio properties @@ -61,6 +84,25 @@ def __init__( **kwargs) self.props = props self.value = value + self.arrow = arrow + self.auto_adjust_overflow = auto_adjust_overflow + self.auto_focus = auto_focus + self.disabled = disabled + self.destroy_popup_on_hide = destroy_popup_on_hide + self.dropdown_render = dropdown_render + self.get_popup_container = get_popup_container + self.menu = menu + self.overlay_class_name = overlay_class_name + self.overlay_style = overlay_style + self.placement = placement + self.trigger = trigger + self.open = open + self.buttons_render = buttons_render + self.loading = loading + self.danger = danger + self.icon = icon + self.size = size + self.type = type FRONTEND_DIR = resolve_frontend_dir("dropdown", "button") diff --git a/backend/modelscope_studio/components/antd/form/item/rule/__init__.py b/backend/modelscope_studio/components/antd/form/item/rule/__init__.py index c2991c21..e5486595 100644 --- a/backend/modelscope_studio/components/antd/form/item/rule/__init__.py +++ b/backend/modelscope_studio/components/antd/form/item/rule/__init__.py @@ -1,10 +1,11 @@ from __future__ import annotations -from ......utils.dev import ModelScopeDataLayoutComponent, resolve_frontend_dir +from ......utils.dev import ModelScopeLayoutComponent, resolve_frontend_dir -class AntdFormItemRule(ModelScopeDataLayoutComponent): +class AntdFormItemRule(ModelScopeLayoutComponent): """ + Ant Design: https://ant.design/components/dropdown """ EVENTS = [] diff --git a/backend/modelscope_studio/components/antd/menu/__init__.py b/backend/modelscope_studio/components/antd/menu/__init__.py index 067ba781..b814f0a4 100644 --- a/backend/modelscope_studio/components/antd/menu/__init__.py +++ b/backend/modelscope_studio/components/antd/menu/__init__.py @@ -1,22 +1,16 @@ from __future__ import annotations -from typing import Any, List +from typing import Any, Literal -from gradio.data_classes import GradioModel from gradio.events import EventListener -from ....utils.dev import ModelScopeDataLayoutComponent, resolve_frontend_dir +from ....utils.dev import ModelScopeLayoutComponent, resolve_frontend_dir from .item import AntdMenuItem -class MenuData(GradioModel): - open_keys: List[str] = [] - selected_keys: List[str] = [] - - -# as inputs, outputs -class AntdMenu(ModelScopeDataLayoutComponent): +class AntdMenu(ModelScopeLayoutComponent): """ + Ant Design: https://ant.design/components/menu """ Item = AntdMenuItem @@ -37,13 +31,29 @@ class AntdMenu(ModelScopeDataLayoutComponent): # supported slots SLOTS = ["expandIcon", 'overflowedIndicator', "items"] - data_model = MenuData def __init__( self, - value: MenuData | dict | None = None, props: dict | None = None, *, + open_keys: list[str] | None = None, + selected_keys: list[str] | None = None, + selectable: bool = True, + default_open_keys: list[str] | None = None, + default_selected_keys: list[str] | None = None, + expand_icon: str | None = None, + force_sub_menu_render: bool | None = False, + inline_collapsed: bool | None = None, + inline_indent: int = 24, + items: list[dict] | None = None, + mode: Literal['vertical', 'horizontal', 'inline'] + | None = 'vertical', + multiple: bool | None = False, + overflowed_indicator: str | None = None, + sub_menu_close_delay: int | float = 0.1, + sub_menu_open_delay: int | float = 0, + theme: Literal['light', 'dark'] | None = None, + trigger_sub_menu_action: Literal['click', 'hover'] = 'hover', as_item: str | None = None, _internal: None = None, # gradio properties @@ -53,8 +63,7 @@ def __init__( elem_style: dict | None = None, render: bool = True, **kwargs): - super().__init__(value=value, - visible=visible, + super().__init__(visible=visible, elem_id=elem_id, elem_classes=elem_classes, render=render, @@ -62,19 +71,35 @@ def __init__( elem_style=elem_style, **kwargs) self.props = props + self.open_keys = open_keys + self.selected_keys = selected_keys + self.selectable = selectable + self.default_open_keys = default_open_keys + self.default_selected_keys = default_selected_keys + self.expand_icon = expand_icon + self.force_sub_menu_render = force_sub_menu_render + self.inline_collapsed = inline_collapsed + self.inline_indent = inline_indent + self.items = items + self.mode = mode + self.multiple = multiple + self.overflowed_indicator = overflowed_indicator + self.sub_menu_close_delay = sub_menu_close_delay + self.sub_menu_open_delay = sub_menu_open_delay + self.theme = theme + self.trigger_sub_menu_action = trigger_sub_menu_action FRONTEND_DIR = resolve_frontend_dir("menu") @property def skip_api(self): - return False + return True - def preprocess(self, payload: dict | MenuData) -> dict | MenuData: + def preprocess(self, payload: None) -> None: return payload - def postprocess(self, value: dict | MenuData | None) -> MenuData: - if isinstance(value, dict): - value = MenuData(**value) + def postprocess(self, value: None) -> None: + return value def example_payload(self) -> Any: diff --git a/backend/modelscope_studio/components/antd/menu/item/__init__.py b/backend/modelscope_studio/components/antd/menu/item/__init__.py index 2f4a4f5e..f20c1cf5 100644 --- a/backend/modelscope_studio/components/antd/menu/item/__init__.py +++ b/backend/modelscope_studio/components/antd/menu/item/__init__.py @@ -25,6 +25,15 @@ def __init__( label: str | None = None, props: dict | None = None, *, + title: str | None = None, + danger: bool = False, + disabled: bool = False, + extra: str | None = None, + icon: str | None = None, + key: str | None = None, + theme: Literal['dark', 'light'] = None, + popup_class_name: str | None = None, + popup_offset: tuple[int | float, int | float] | None = None, as_item: str | None = None, _internal: None = None, # gradio properties @@ -43,6 +52,15 @@ def __init__( **kwargs) self.label = label self.props = props + self.title = title + self.danger = danger + self.disabled = disabled + self.extra = extra + self.icon = icon + self.key = key + self.theme = theme + self.popup_class_name = popup_class_name + self.popup_offset = popup_offset FRONTEND_DIR = resolve_frontend_dir("menu", "item") diff --git a/backend/modelscope_studio/components/antd/pagination/__init__.py b/backend/modelscope_studio/components/antd/pagination/__init__.py index 2cb9b5d3..d857ae44 100644 --- a/backend/modelscope_studio/components/antd/pagination/__init__.py +++ b/backend/modelscope_studio/components/antd/pagination/__init__.py @@ -1,21 +1,15 @@ from __future__ import annotations -from typing import Optional, Union +from typing import Literal -from gradio.data_classes import GradioModel from gradio.events import EventListener -from ....utils.dev import ModelScopeDataLayoutComponent, resolve_frontend_dir +from ....utils.dev import ModelScopeLayoutComponent, resolve_frontend_dir -class PaginationData(GradioModel): - page: int - page_size: Optional[Union[int, None]] = None - - -# as inputs, outputs -class AntdPagination(ModelScopeDataLayoutComponent): +class AntdPagination(ModelScopeLayoutComponent): """ + Ant Design: https://ant.design/components/pagination """ EVENTS = [ EventListener("change", @@ -29,13 +23,28 @@ class AntdPagination(ModelScopeDataLayoutComponent): # supported slots SLOTS = ['showQuickJumper.goButton', 'itemRender'] - data_model = PaginationData - def __init__( self, - value: int | dict | PaginationData | None = None, props: dict | None = None, *, + align: Literal['start', 'center', 'end'] | None = None, + current: int | None = None, + default_current: int | None = 1, + default_page_size: int | None = 10, + page_size: int | None = None, + disabled: bool | None = None, + hide_on_single_page: bool = False, + item_render: str | None = None, + page_size_options: list[str] | list[int] = [10, 20, 50, 100], + responsive: bool | None = None, + show_less_items: bool | None = None, + show_quick_jumper: bool | dict | None = None, + show_size_changer: bool | dict | None = None, + show_title: bool = True, + show_total: str | None = None, + simple: bool | dict | None = None, + size: Literal['small', 'default'] = 'default', + total: int = 0, as_item: str | None = None, _internal: None = None, # gradio properties @@ -45,8 +54,7 @@ def __init__( elem_style: dict | None = None, render: bool = True, **kwargs): - super().__init__(value=value, - visible=visible, + super().__init__(visible=visible, elem_id=elem_id, elem_classes=elem_classes, render=render, @@ -54,27 +62,39 @@ def __init__( elem_style=elem_style, **kwargs) self.props = props + self.align = align + self.current = current + self.page_size = page_size + self.total = total + self.default_current = default_current + self.default_page_size = default_page_size + self.disabled = disabled + self.hide_on_single_page = hide_on_single_page + self.item_render = item_render + self.page_size_options = page_size_options + self.responsive = responsive + self.show_less_items = show_less_items + self.show_quick_jumper = show_quick_jumper + self.show_size_changer = show_size_changer + self.show_title = show_title + self.show_total = show_total + self.simple = simple + self.size = size FRONTEND_DIR = resolve_frontend_dir("pagination") @property def skip_api(self): - return False + return True - def preprocess(self, - payload: PaginationData | dict) -> PaginationData | dict: + def preprocess(self, payload: None) -> None: return payload - def postprocess(self, - value: PaginationData | dict | int) -> PaginationData: - if isinstance(value, int): - value = dict(page=value) - if isinstance(value, dict): - value = PaginationData(**value) + def postprocess(self, value: None) -> None: return value def example_payload(self) -> None: - return {"page": 1, "page_size": 10} + return None def example_value(self) -> None: - return {"page": 1, "page_size": 10} + return None diff --git a/backend/modelscope_studio/components/antd/table/expandable/__init__.py b/backend/modelscope_studio/components/antd/table/expandable/__init__.py index 87196eb6..b7f324a3 100644 --- a/backend/modelscope_studio/components/antd/table/expandable/__init__.py +++ b/backend/modelscope_studio/components/antd/table/expandable/__init__.py @@ -1,14 +1,12 @@ from __future__ import annotations -from typing import Any - from gradio.events import EventListener -from .....utils.dev import ModelScopeDataLayoutComponent, resolve_frontend_dir +from .....utils.dev import ModelScopeLayoutComponent, resolve_frontend_dir # as inputs, outputs -class AntdTableExpandable(ModelScopeDataLayoutComponent): +class AntdTableExpandable(ModelScopeLayoutComponent): """ """ EVENTS = [ @@ -25,7 +23,6 @@ class AntdTableExpandable(ModelScopeDataLayoutComponent): def __init__( self, - value: list[str] | None = None, props: dict | None = None, *, as_item: str | None = None, @@ -37,8 +34,7 @@ def __init__( elem_style: dict | None = None, render: bool = True, **kwargs): - super().__init__(value=value, - visible=visible, + super().__init__(visible=visible, elem_id=elem_id, elem_classes=elem_classes, render=render, @@ -51,10 +47,7 @@ def __init__( @property def skip_api(self): - return False - - def api_info(self) -> dict[str, Any]: - return {"type": "array", "items": {"type": "string"}} + return True def preprocess(self, payload: list[str] | None) -> list[str] | None: return payload diff --git a/backend/modelscope_studio/components/antd/table/row_selection/__init__.py b/backend/modelscope_studio/components/antd/table/row_selection/__init__.py index 871bbcdf..627608d5 100644 --- a/backend/modelscope_studio/components/antd/table/row_selection/__init__.py +++ b/backend/modelscope_studio/components/antd/table/row_selection/__init__.py @@ -1,15 +1,13 @@ from __future__ import annotations -from typing import Any - from gradio.events import EventListener -from .....utils.dev import ModelScopeDataLayoutComponent, resolve_frontend_dir +from .....utils.dev import ModelScopeLayoutComponent, resolve_frontend_dir from .selection import AntdTableRowSelectionSelection # as inputs, outputs -class AntdTableRowSelection(ModelScopeDataLayoutComponent): +class AntdTableRowSelection(ModelScopeLayoutComponent): """ """ Selection = AntdTableRowSelectionSelection @@ -44,7 +42,6 @@ class AntdTableRowSelection(ModelScopeDataLayoutComponent): def __init__( self, - value: list[str] | list[int | float] | None = None, props: dict | None = None, *, as_item: str | None = None, @@ -56,8 +53,7 @@ def __init__( elem_style: dict | None = None, render: bool = True, **kwargs): - super().__init__(value=value, - visible=visible, + super().__init__(visible=visible, elem_id=elem_id, elem_classes=elem_classes, render=render, @@ -70,31 +66,12 @@ def __init__( @property def skip_api(self): - return False - - def api_info(self) -> dict[str, Any]: - return { - "anyOf": [{ - "type": "array", - "items": { - "type": "string" - } - }, { - "type": "array", - "items": { - "type": "number" - } - }] - } + return True - def preprocess( - self, payload: list[str] | list[int | float] | None - ) -> list[str] | list[int | float] | None: + def preprocess(self, payload: None) -> None: return payload - def postprocess( - self, value: list[str] | list[int | float] | None - ) -> list[str] | list[int | float] | None: + def postprocess(self, value: None) -> None: return value diff --git a/backend/modelscope_studio/components/antd/tabs/__init__.py b/backend/modelscope_studio/components/antd/tabs/__init__.py index 0339fd3b..0b464456 100644 --- a/backend/modelscope_studio/components/antd/tabs/__init__.py +++ b/backend/modelscope_studio/components/antd/tabs/__init__.py @@ -4,12 +4,12 @@ from gradio.events import EventListener -from ....utils.dev import ModelScopeDataLayoutComponent, resolve_frontend_dir +from ....utils.dev import ModelScopeLayoutComponent, resolve_frontend_dir from .item import AntdTabsItem # as inputs, outputs -class AntdTabs(ModelScopeDataLayoutComponent): +class AntdTabs(ModelScopeLayoutComponent): """ """ Item = AntdTabsItem @@ -37,9 +37,9 @@ class AntdTabs(ModelScopeDataLayoutComponent): def __init__( self, - value: str | None = None, props: dict | None = None, *, + active_key: str | None = None, as_item: str | None = None, _internal: None = None, # gradio properties @@ -49,8 +49,7 @@ def __init__( elem_style: dict | None = None, render: bool = True, **kwargs): - super().__init__(value=value, - visible=visible, + super().__init__(visible=visible, elem_id=elem_id, elem_classes=elem_classes, render=render, @@ -58,15 +57,13 @@ def __init__( elem_style=elem_style, **kwargs) self.props = props + self.active_key = active_key FRONTEND_DIR = resolve_frontend_dir("tabs") @property def skip_api(self): - return False - - def api_info(self) -> dict[str, Any]: - return {"type": "string"} + return True def preprocess(self, payload: str | None) -> str | None: return payload diff --git a/backend/modelscope_studio/components/antd/tour/__init__.py b/backend/modelscope_studio/components/antd/tour/__init__.py index 0cc23d55..06d4d46a 100644 --- a/backend/modelscope_studio/components/antd/tour/__init__.py +++ b/backend/modelscope_studio/components/antd/tour/__init__.py @@ -1,16 +1,16 @@ from __future__ import annotations -from typing import Any +from typing import Literal from gradio.events import EventListener -from ....utils.dev import ModelScopeDataLayoutComponent, resolve_frontend_dir +from ....utils.dev import ModelScopeLayoutComponent, resolve_frontend_dir from .step import AntdTourStep -# as inputs, outputs -class AntdTour(ModelScopeDataLayoutComponent): +class AntdTour(ModelScopeLayoutComponent): """ + Ant Design: https://ant.design/components/tour """ Step = AntdTourStep EVENTS = [ @@ -26,14 +26,29 @@ class AntdTour(ModelScopeDataLayoutComponent): ] # supported slots - SLOTS = ['closeIcon'] + SLOTS = ['closeIcon', 'indicatorsRender'] def __init__( self, - value: int | None = None, props: dict | None = None, *, open: bool | None = None, + current: int | None = None, + arrow: bool | dict | None = True, + close_icon: str | None = None, + disabled_interaction: bool | None = False, + gap: dict | None = None, + placement: Literal['center', 'left', 'leftTop', 'leftBottom', + 'right' + 'rightTop', 'rightBottom', 'top', 'topLeft', + 'topRight', 'bottom', 'bottomLeft', + 'bottomRight'] = 'bottom', + mask: bool | dict = True, + type: Literal['default', 'primary'] = 'default', + scroll_into_view_options: bool | dict = True, + indicators_render: str | None = None, + z_index: int | None = None, + get_popup_container: str | None = None, as_item: str | None = None, _internal: None = None, # gradio properties @@ -43,8 +58,7 @@ def __init__( elem_style: dict | None = None, render: bool = True, **kwargs): - super().__init__(value=value, - visible=visible, + super().__init__(visible=visible, elem_id=elem_id, elem_classes=elem_classes, render=render, @@ -53,20 +67,29 @@ def __init__( **kwargs) self.props = props self.open = open + self.current = current + self.arrow = arrow + self.close_icon = close_icon + self.disabled_interaction = disabled_interaction + self.gap = gap + self.placement = placement + self.mask = mask + self.type = type + self.scroll_into_view_options = scroll_into_view_options + self.indicators_render = indicators_render + self.z_index = z_index + self.get_popup_container = get_popup_container FRONTEND_DIR = resolve_frontend_dir("tour") @property def skip_api(self): - return False + return True - def api_info(self) -> dict[str, Any]: - return {"type": "number"} - - def preprocess(self, payload: None | int) -> None | int: + def preprocess(self, payload: None) -> None: return payload - def postprocess(self, value: None | int) -> None | int: + def postprocess(self, value: None) -> None: return value diff --git a/backend/modelscope_studio/components/antd/tour/step/__init__.py b/backend/modelscope_studio/components/antd/tour/step/__init__.py index 479c12b0..d93229b3 100644 --- a/backend/modelscope_studio/components/antd/tour/step/__init__.py +++ b/backend/modelscope_studio/components/antd/tour/step/__init__.py @@ -1,5 +1,7 @@ from __future__ import annotations +from typing import Literal + from gradio.events import EventListener from .....utils.dev import ModelScopeLayoutComponent, resolve_frontend_dir @@ -30,6 +32,22 @@ def __init__( self, props: dict | None = None, *, + elem_target: str | None = None, + arrow: bool | dict | None = True, + close_icon: str | None = None, + cover: str | None = None, + title: str | None = None, + description: str | None = None, + placement: Literal['center', 'left', 'leftTop', 'leftBottom', + 'right' + 'rightTop', 'rightBottom', 'top', 'topLeft', + 'topRight', 'bottom', 'bottomLeft', + 'bottomRight'] = 'bottom', + mask: bool | dict = True, + type: Literal['default', 'primary'] = 'default', + next_button_props_click: dict | None = None, + prev_button_props_click: dict | None = None, + scroll_into_view_options: bool | dict = True, as_item: str | None = None, _internal: None = None, # gradio properties @@ -47,6 +65,18 @@ def __init__( elem_style=elem_style, **kwargs) self.props = props + self.elem_target = elem_target + self.arrow = arrow + self.close_icon = close_icon + self.cover = cover + self.title = title + self.description = description + self.placement = placement + self.mask = mask + self.type = type + self.next_button_props_click = next_button_props_click + self.prev_button_props_click = prev_button_props_click + self.scroll_into_view_options = scroll_into_view_options FRONTEND_DIR = resolve_frontend_dir("tour", "step") diff --git a/backend/modelscope_studio/components/antd/tree/__init__.py b/backend/modelscope_studio/components/antd/tree/__init__.py index f4857f36..9520c9f8 100644 --- a/backend/modelscope_studio/components/antd/tree/__init__.py +++ b/backend/modelscope_studio/components/antd/tree/__init__.py @@ -1,23 +1,15 @@ from __future__ import annotations -from typing import Any, List, Union +from typing import Any -from gradio.data_classes import GradioModel from gradio.events import EventListener -from ....utils.dev import ModelScopeDataLayoutComponent, resolve_frontend_dir +from ....utils.dev import ModelScopeLayoutComponent, resolve_frontend_dir from .directory_tree import AntdTreeDirectoryTree from .tree_node import AntdTreeTreeNode -class TreeData(GradioModel): - expanded_keys: List[str] = [] - selected_keys: List[str] = [] - checked_keys: Union[List[str], dict] = [] - - -# as inputs, outputs -class AntdTree(ModelScopeDataLayoutComponent): +class AntdTree(ModelScopeLayoutComponent): """ """ TreeNode = AntdTreeTreeNode @@ -68,11 +60,9 @@ class AntdTree(ModelScopeDataLayoutComponent): 'treeData', 'draggable.icon', ] - data_model = TreeData def __init__( self, - value: TreeData | dict | None = None, props: dict | None = None, *, as_item: str | None = None, @@ -84,8 +74,7 @@ def __init__( elem_style: dict | None = None, render: bool = True, **kwargs): - super().__init__(value=value, - visible=visible, + super().__init__(visible=visible, elem_id=elem_id, elem_classes=elem_classes, render=render, @@ -98,14 +87,12 @@ def __init__( @property def skip_api(self): - return False + return True - def preprocess(self, payload: dict | TreeData) -> dict | TreeData: + def preprocess(self, payload: None) -> None: return payload - def postprocess(self, value: dict | TreeData | None) -> TreeData: - if isinstance(value, dict): - value = TreeData(**value) + def postprocess(self, value: None | None) -> None: return value def example_payload(self) -> Any: diff --git a/backend/modelscope_studio/components/antd/tree/directory_tree/__init__.py b/backend/modelscope_studio/components/antd/tree/directory_tree/__init__.py index a4ad54e5..fee397f7 100644 --- a/backend/modelscope_studio/components/antd/tree/directory_tree/__init__.py +++ b/backend/modelscope_studio/components/antd/tree/directory_tree/__init__.py @@ -1,21 +1,14 @@ from __future__ import annotations -from typing import Any, List, Union +from typing import Any -from gradio.data_classes import GradioModel from gradio.events import EventListener -from .....utils.dev import ModelScopeDataLayoutComponent, resolve_frontend_dir - - -class TreeData(GradioModel): - expanded_keys: List[str] = [] - selected_keys: List[str] = [] - checked_keys: Union[List[str], dict] = [] +from .....utils.dev import ModelScopeLayoutComponent, resolve_frontend_dir # as inputs, outputs -class AntdTreeDirectoryTree(ModelScopeDataLayoutComponent): +class AntdTreeDirectoryTree(ModelScopeLayoutComponent): """ """ @@ -64,11 +57,9 @@ class AntdTreeDirectoryTree(ModelScopeDataLayoutComponent): 'treeData', 'draggable.icon', ] - data_model = TreeData def __init__( self, - value: TreeData | dict | None = None, props: dict | None = None, *, as_item: str | None = None, @@ -80,8 +71,7 @@ def __init__( elem_style: dict | None = None, render: bool = True, **kwargs): - super().__init__(value=value, - visible=visible, + super().__init__(visible=visible, elem_id=elem_id, elem_classes=elem_classes, render=render, @@ -96,12 +86,10 @@ def __init__( def skip_api(self): return False - def preprocess(self, payload: dict | TreeData) -> dict | TreeData: + def preprocess(self, payload: None) -> None: return payload - def postprocess(self, value: dict | TreeData | None) -> TreeData: - if isinstance(value, dict): - value = TreeData(**value) + def postprocess(self, value: None) -> None: return value def example_payload(self) -> Any: diff --git a/frontend/antd/anchor/item/Index.svelte b/frontend/antd/anchor/item/Index.svelte index a712147d..29f06320 100644 --- a/frontend/antd/anchor/item/Index.svelte +++ b/frontend/antd/anchor/item/Index.svelte @@ -31,17 +31,22 @@ export let elem_classes: string[] = []; export let elem_style: React.CSSProperties = {}; const slotKey = getSlotKey(); - const [mergedProps, update] = getSlotContext({ - gradio, - props: $updatedProps, - _internal, - visible, - elem_id, - elem_classes, - elem_style, - as_item, - restProps: $$restProps, - }); + const [mergedProps, update] = getSlotContext( + { + gradio, + props: $updatedProps, + _internal, + visible, + elem_id, + elem_classes, + elem_style, + as_item, + restProps: $$restProps, + }, + { + href_target: 'target', + } + ); const slots = getSlots(); $: update({ gradio, diff --git a/frontend/antd/badge/Index.svelte b/frontend/antd/badge/Index.svelte index f69fc73c..88aeeadf 100644 --- a/frontend/antd/badge/Index.svelte +++ b/frontend/antd/badge/Index.svelte @@ -21,7 +21,6 @@ layout?: boolean; } = {}; - export let count = 0; export let as_item: string | undefined; // gradio properties export let visible = true; @@ -33,7 +32,6 @@ gradio, props: $updatedProps, _internal, - count, visible, elem_id, elem_classes, @@ -46,7 +44,6 @@ gradio, props: $updatedProps, _internal, - count, visible, elem_id, elem_classes, @@ -63,7 +60,6 @@ ...$mergedProps.props, ...bindEvents($mergedProps), slots: $slots, - count: $mergedProps.props.count || $mergedProps.count, }; diff --git a/frontend/antd/breadcrumb/item/BreadcrumbItem.svelte b/frontend/antd/breadcrumb/item/BreadcrumbItem.svelte index 0345c307..9be22c30 100644 --- a/frontend/antd/breadcrumb/item/BreadcrumbItem.svelte +++ b/frontend/antd/breadcrumb/item/BreadcrumbItem.svelte @@ -27,7 +27,6 @@ layout?: boolean; index?: number; } = {}; - export let title: string = ''; export let as_item: string | undefined; // gradio properties export let visible = true; @@ -45,7 +44,6 @@ elem_classes, elem_style, as_item, - title, restProps: $$restProps, }); const slots = getSlots(); @@ -58,7 +56,6 @@ elem_classes, elem_style, as_item, - title, restProps: $$restProps, }); const setItem = getSetItemFn(); @@ -69,9 +66,12 @@ } = getMenuItems(['menu.items', 'dropdownProps.menu.items']); $: { const menu = { + ...($mergedProps.restProps.menu || {}), ...($mergedProps.props.menu || {}), items: - $mergedProps.props.menu?.items || $menuItems.length > 0 + $mergedProps.props.menu?.items || + $$restProps.restProps.menu?.items || + $menuItems.length > 0 ? renderItems($menuItems) : undefined, expandIcon: @@ -84,15 +84,20 @@ { clone: true, } - ) || $mergedProps.props.menu?.expandIcon, + ) || + $mergedProps.props.menu?.expandIcon || + $mergedProps.restProps.menu?.expandIcon, overflowedIndicator: renderSlot($slots['menu.overflowedIndicator']) || - $mergedProps.props.menu?.overflowedIndicator, + $mergedProps.props.menu?.overflowedIndicator || + $mergedProps.restProps.menu?.overflowedIndicator, }; const dropdownMenu = { + ...($mergedProps.restProps.dropdownProps?.menu || {}), ...($mergedProps.props.dropdownProps?.menu || {}), items: $mergedProps.props.dropdownProps?.menu?.items || + $$restProps.restProps.dropdownProps?.menu?.items || $dropdownMenuItems.length > 0 ? renderItems($dropdownMenuItems) : undefined, @@ -106,13 +111,17 @@ { clone: true, } - ) || $mergedProps.props.dropdownProps?.menu?.expandIcon, + ) || + $mergedProps.props.dropdownProps?.menu?.expandIcon || + $mergedProps.restProps.dropdownProps?.menu?.expandIcon, overflowedIndicator: renderSlot($slots['dropdownProps.menu.overflowedIndicator']) || - $mergedProps.props.dropdownProps?.menu?.overflowedIndicator, + $mergedProps.props.dropdownProps?.menu?.overflowedIndicator || + $mergedProps.restProps.dropdownProps?.menu?.overflowedIndicator, }; const dropdownProps = { + ...($mergedProps.restProps.dropdownProps || {}), ...($mergedProps.props.dropdownProps || {}), dropdownRender: $slots['dropdownProps.dropdownRender'] ? renderParamsSlot( @@ -125,34 +134,30 @@ clone: true, } ) - : createFunction($mergedProps.props.dropdownProps?.dropdownRender), + : createFunction( + $mergedProps.props.dropdownProps?.dropdownRender || + $mergedProps.restProps.dropdownProps?.dropdownRender + ), menu: Object.values(dropdownMenu).filter(Boolean).length > 0 ? dropdownMenu : undefined, }; - const currentMergedProps = { - ...$mergedProps, + + setItem($slotKey, $mergedProps._internal.index || 0, { props: { + style: $mergedProps.elem_style, + className: cls($mergedProps.elem_classes, 'ms-gr-antd-breadcrumb-item'), + id: $mergedProps.elem_id, ...$mergedProps.restProps, ...$mergedProps.props, - title: $mergedProps.props.title || title, + ...bindEvents($mergedProps), menu: Object.values(menu).filter(Boolean).length > 0 ? menu : undefined, dropdownProps: Object.values(dropdownProps).filter(Boolean).length > 0 ? dropdownProps : undefined, }, - }; - - setItem($slotKey, $mergedProps._internal.index || 0, { - props: { - style: $mergedProps.elem_style, - className: cls($mergedProps.elem_classes, 'ms-gr-antd-breadcrumb-item'), - id: $mergedProps.elem_id, - ...currentMergedProps.props, - ...bindEvents(currentMergedProps), - }, slots: { title: $slots.title, }, diff --git a/frontend/antd/collapse/Index.svelte b/frontend/antd/collapse/Index.svelte index ce6d1404..4ab19a1a 100644 --- a/frontend/antd/collapse/Index.svelte +++ b/frontend/antd/collapse/Index.svelte @@ -26,7 +26,6 @@ export let _internal: { layout?: boolean; } = {}; - export let value: string | number | (string | number)[] | undefined; export let as_item: string | undefined; // gradio properties export let visible = true; @@ -43,7 +42,6 @@ elem_classes, elem_style, as_item, - value, restProps: $$restProps, }); const setSlotParams = getSetSlotParamsFn(); @@ -57,7 +55,6 @@ elem_classes, elem_style, as_item, - value, restProps: $$restProps, }); @@ -75,10 +72,6 @@ {...bindEvents($mergedProps)} slots={$slots} slotItems={$items.length > 0 ? $items : $children} - activeKey={$mergedProps.props.activeKey || $mergedProps.value} - onValueChange={(val) => { - value = val; - }} {setSlotParams} > diff --git a/frontend/antd/collapse/collapse.tsx b/frontend/antd/collapse/collapse.tsx index bfb86512..2bceb0de 100644 --- a/frontend/antd/collapse/collapse.tsx +++ b/frontend/antd/collapse/collapse.tsx @@ -11,7 +11,6 @@ type CollapseProps = GetProps; export const Collapse = sveltify< CollapseProps & { slotItems: Item[]; - onValueChange: CollapseProps['onChange']; setSlotParams: SetSlotParams; }, ['expandIcon'] @@ -22,7 +21,6 @@ export const Collapse = sveltify< slotItems, children, onChange, - onValueChange, setSlotParams, ...props }) => { @@ -32,7 +30,6 @@ export const Collapse = sveltify< { - onValueChange?.(key); onChange?.(key); }} expandIcon={ diff --git a/frontend/antd/divider/Index.svelte b/frontend/antd/divider/Index.svelte index 3d8a75d9..b9ef09c0 100644 --- a/frontend/antd/divider/Index.svelte +++ b/frontend/antd/divider/Index.svelte @@ -59,7 +59,6 @@ className: cls($mergedProps.elem_classes, 'ms-gr-antd-divider'), id: $mergedProps.elem_id, ...$mergedProps.restProps, - ...$mergedProps.restProps, ...$mergedProps.props, ...bindEvents($mergedProps), slots: $slots, diff --git a/frontend/antd/dropdown/button/dropdown.button.tsx b/frontend/antd/dropdown/button/dropdown.button.tsx index 6a0e44dc..851674d2 100644 --- a/frontend/antd/dropdown/button/dropdown.button.tsx +++ b/frontend/antd/dropdown/button/dropdown.button.tsx @@ -29,11 +29,13 @@ export const DropdownButton = sveltify< menuItems, children, dropdownRender, + buttonsRender, setSlotParams, ...props }) => { const getPopupContainerFunction = useFunction(getPopupContainer); const dropdownRenderFunction = useFunction(dropdownRender); + const buttonsRenderFunction = useFunction(buttonsRender); const buttonsRenderTargets = useTargets(children, 'buttonsRender'); return ( ; }); } - : props.buttonsRender + : buttonsRenderFunction } menu={{ ...props.menu, @@ -68,14 +70,11 @@ export const DropdownButton = sveltify< getPopupContainer={getPopupContainerFunction} dropdownRender={ slots.dropdownRender - ? renderParamsSlot( - { - slots, - setSlotParams, - key: 'dropdownRender', - }, - { clone: true } - ) + ? renderParamsSlot({ + slots, + setSlotParams, + key: 'dropdownRender', + }) : dropdownRenderFunction } /> diff --git a/frontend/antd/form/item/rule/Index.svelte b/frontend/antd/form/item/rule/Index.svelte index 8741bb79..949470a2 100644 --- a/frontend/antd/form/item/rule/Index.svelte +++ b/frontend/antd/form/item/rule/Index.svelte @@ -56,8 +56,12 @@ ...$mergedProps.restProps, ...$mergedProps.props, ...bindEvents($mergedProps), - transform: createFunction($mergedProps.props.transform), - validator: createFunction($mergedProps.props.validator), + transform: createFunction( + $mergedProps.props.transform || $mergedProps.restProps.transform + ), + validator: createFunction( + $mergedProps.props.validator || $mergedProps.restProps.validator + ), }, slots: {}, }); diff --git a/frontend/antd/menu/Index.svelte b/frontend/antd/menu/Index.svelte index a9d915f2..7e26f124 100644 --- a/frontend/antd/menu/Index.svelte +++ b/frontend/antd/menu/Index.svelte @@ -26,10 +26,6 @@ export let _internal: { layout?: boolean; } = {}; - export let value: { - open_keys?: string[]; - selected_keys?: string[]; - } = {}; export let as_item: string | undefined; // gradio properties export let visible = true; @@ -46,7 +42,6 @@ elem_classes, elem_style, as_item, - value, restProps: $$restProps, }); const slots = getSlots(); @@ -59,7 +54,6 @@ elem_classes, elem_style, as_item, - value, restProps: $$restProps, }); const setSlotParams = getSetSlotParamsFn(); @@ -77,18 +71,6 @@ {...bindEvents($mergedProps)} slots={$slots} slotItems={$items.length > 0 ? $items : $children} - openKeys={$mergedProps.props.openKeys || - $mergedProps.value?.open_keys || - undefined} - selectedKeys={$mergedProps.props.selectedKeys || - $mergedProps.value?.selected_keys || - undefined} - onValueChange={({ openKeys, selectedKeys }) => { - value = { - open_keys: openKeys, - selected_keys: selectedKeys, - }; - }} {setSlotParams} > diff --git a/frontend/antd/menu/item/Index.svelte b/frontend/antd/menu/item/Index.svelte index 17ca1dae..451e1558 100644 --- a/frontend/antd/menu/item/Index.svelte +++ b/frontend/antd/menu/item/Index.svelte @@ -76,7 +76,13 @@ ...$mergedProps.props, ...bindEvents($mergedProps), }, - slots: $slots, + slots: { + ...$slots, + icon: { + el: $slots.icon, + clone: true, + }, + }, children: $items.length > 0 ? $items : undefined, }); diff --git a/frontend/antd/menu/menu.less b/frontend/antd/menu/menu.less new file mode 100644 index 00000000..758f4b7f --- /dev/null +++ b/frontend/antd/menu/menu.less @@ -0,0 +1,44 @@ +.ms-gr-antd-container { + .ms-gr-ant-menu + .ms-gr-ant-menu-item + react-child:has(.ms-gr-ant-menu-item-icon) + + span, + .ms-gr-ant-menu + .ms-gr-ant-menu-submenu-title + react-child:has(.ms-gr-ant-menu-item-icon) + + span { + margin-inline-start: var(--ms-gr-ant-menu-icon-margin-inline-end); + opacity: 1; + transition: + opacity var(--ms-gr-ant-motion-duration-slow) + var(--ms-gr-ant-motion-ease-in-out), + margin var(--ms-gr-ant-motion-duration-slow), + color var(--ms-gr-ant-motion-duration-slow); + } + + .ms-gr-ant-menu-inline-collapsed + > .ms-gr-ant-menu-item + react-child:has(.ms-gr-ant-menu-item-icon) + + span, + .ms-gr-ant-menu-inline-collapsed + > .ms-gr-ant-menu-item-group + > .ms-gr-ant-menu-item-group-list + > .ms-gr-ant-menu-item + react-child:has(.ms-gr-ant-menu-item-icon) + + span, + .ms-gr-ant-menu-inline-collapsed + > .ms-gr-ant-menu-item-group + > .ms-gr-ant-menu-item-group-list + > .ms-gr-ant-menu-submenu + > .ms-gr-ant-menu-submenu-title + react-child:has(.ms-gr-ant-menu-item-icon) + + span, + .ms-gr-ant-menu-inline-collapsed + > .ms-gr-ant-menu-submenu + > .ms-gr-ant-menu-submenu-title + react-child:has(.ms-gr-ant-menu-item-icon) + + span { + display: inline-block; + opacity: 0; + } +} diff --git a/frontend/antd/menu/menu.tsx b/frontend/antd/menu/menu.tsx index c985cfe0..0b549159 100644 --- a/frontend/antd/menu/menu.tsx +++ b/frontend/antd/menu/menu.tsx @@ -10,13 +10,11 @@ import type { ItemType } from 'antd/es/menu/interface'; import { type Item } from './context'; +import './menu.less'; + export const Menu = sveltify< GetProps & { slotItems: Item[]; - onValueChange: (options: { - openKeys: string[]; - selectedKeys: string[]; - }) => void; setSlotParams: SetSlotParams; }, ['expandIcon', 'overflowedIndicator'] @@ -26,7 +24,6 @@ export const Menu = sveltify< items, slotItems, children, - onValueChange, onOpenChange, onSelect, onDeselect, @@ -40,24 +37,12 @@ export const Menu = sveltify< {...omitUndefinedProps(props)} onOpenChange={(openKeys) => { onOpenChange?.(openKeys); - onValueChange?.({ - openKeys, - selectedKeys: props.selectedKeys || [], - }); }} onSelect={(e) => { onSelect?.(e); - onValueChange?.({ - openKeys: props.openKeys || [], - selectedKeys: e.selectedKeys, - }); }} onDeselect={(e) => { onDeselect?.(e); - onValueChange?.({ - openKeys: props.openKeys || [], - selectedKeys: e.selectedKeys, - }); }} items={useMemo(() => { // ['label','icon',"title"] diff --git a/frontend/antd/pagination/Index.svelte b/frontend/antd/pagination/Index.svelte index 8ce664dd..8c141378 100644 --- a/frontend/antd/pagination/Index.svelte +++ b/frontend/antd/pagination/Index.svelte @@ -73,18 +73,6 @@ {...$mergedProps.props} {...bindEvents($mergedProps)} slots={$slots} - current={$mergedProps.props.current || - $mergedProps.value?.page || - undefined} - pageSize={$mergedProps.props.pageSize || - $mergedProps.value?.page_size || - undefined} - onValueChange={(page, pageSize) => { - value = { - page, - page_size: pageSize, - }; - }} {setSlotParams} > diff --git a/frontend/antd/pagination/pagination.tsx b/frontend/antd/pagination/pagination.tsx index becb29ff..af3e7492 100644 --- a/frontend/antd/pagination/pagination.tsx +++ b/frontend/antd/pagination/pagination.tsx @@ -8,7 +8,6 @@ import { type GetProps, Pagination as APagination } from 'antd'; export const Pagination = sveltify< GetProps & { - onValueChange: (page: number, pageSize: number) => void; children?: React.ReactNode; setSlotParams: SetSlotParams; }, @@ -16,7 +15,6 @@ export const Pagination = sveltify< >( ({ slots, - onValueChange, showTotal, showQuickJumper, onChange, @@ -42,7 +40,6 @@ export const Pagination = sveltify< : itemRenderFunction } onChange={(page, pageSize) => { - onValueChange(page, pageSize); onChange?.(page, pageSize); }} showQuickJumper={ diff --git a/frontend/antd/table/column/Index.svelte b/frontend/antd/table/column/Index.svelte index f07745a4..18297136 100644 --- a/frontend/antd/table/column/Index.svelte +++ b/frontend/antd/table/column/Index.svelte @@ -58,7 +58,10 @@ const setColumnItem = getSetColumnItemFn(); const setSlotParams = getSetSlotParamsFn(); $: { - const showSorterTooltip = $mergedProps.props.showSorterTooltip; + const showSorterTooltip = + $mergedProps.props.showSorterTooltip || + $mergedProps.restProps.showSorterTooltip; + const sorter = $mergedProps.props.sorter || $mergedProps.restProps.sorter; setColumnItem( $slotKey, $mergedProps._internal.index || 0, @@ -75,9 +78,17 @@ ...$mergedProps.restProps, ...$mergedProps.props, ...bindEvents($mergedProps), - render: createFunction($mergedProps.props.render), - filterIcon: createFunction($mergedProps.props.filterIcon), - filterDropdown: createFunction($mergedProps.props.filterDropdown), + render: createFunction( + $mergedProps.props.render || $mergedProps.restProps.render + ), + filterIcon: createFunction( + $mergedProps.props.filterIcon || + $mergedProps.restProps.filterIcon + ), + filterDropdown: createFunction( + $mergedProps.props.filterDropdown || + $mergedProps.restProps.filterDropdown + ), showSorterTooltip: typeof showSorterTooltip === 'object' ? { @@ -95,46 +106,60 @@ } : showSorterTooltip, sorter: - typeof $mergedProps.props.sorter === 'object' + typeof sorter === 'object' ? { - ...$mergedProps.props.sorter, - compare: - createFunction($mergedProps.props.sorter.compare) || - $mergedProps.props.sorter.compare, + ...sorter, + compare: createFunction(sorter.compare) || sorter.compare, } - : createFunction($mergedProps.props.sorter) || - $mergedProps.props.sorter, + : createFunction(sorter) || $mergedProps.props.sorter, filterSearch: - createFunction($mergedProps.props.filterSearch) || - $mergedProps.props.filterSearch, + createFunction( + $mergedProps.props.filterSearch || + $mergedProps.restProps.filterSearch + ) || + $mergedProps.props.filterSearch || + $mergedProps.restProps.filterSearch, shouldCellUpdate: createFunction( - $mergedProps.props.shouldCellUpdate + $mergedProps.props.shouldCellUpdate || + $mergedProps.restProps.shouldCellUpdate + ), + onCell: createFunction( + $mergedProps.props.onCell || $mergedProps.restProps.onCell + ), + onFilter: createFunction( + $mergedProps.props.onFilter || $mergedProps.restProps.onFilter + ), + onHeaderCell: createFunction( + $mergedProps.props.onHeaderCell || + $mergedProps.restProps.onHeaderCell ), - onCell: createFunction($mergedProps.props.onCell), - onFilter: createFunction($mergedProps.props.onFilter), - onHeaderCell: createFunction($mergedProps.props.onHeaderCell), }, slots: { ...$slots, filterIcon: { el: $slots.filterIcon, callback: setSlotParams, + clone: true, }, filterDropdown: { el: $slots.filterDropdown, callback: setSlotParams, + clone: true, }, sortIcon: { el: $slots.sortIcon, callback: setSlotParams, + clone: true, }, title: { el: $slots.title, callback: setSlotParams, + clone: true, }, render: { el: $slots.render, callback: setSlotParams, + clone: true, }, }, } diff --git a/frontend/antd/table/expandable/Expandable.svelte b/frontend/antd/table/expandable/Expandable.svelte index 5a997ee3..92998c8d 100644 --- a/frontend/antd/table/expandable/Expandable.svelte +++ b/frontend/antd/table/expandable/Expandable.svelte @@ -26,7 +26,6 @@ } = {}; export let as_item: string | undefined; - export let value: string[]; // gradio properties export let visible = true; @@ -44,7 +43,6 @@ elem_classes, elem_style, as_item, - value, restProps: $$restProps, }); const slots = getSlots(); @@ -57,7 +55,6 @@ elem_classes, elem_style, as_item, - value, restProps: $$restProps, }); const setSlotParams = getSetSlotParamsFn(); @@ -73,31 +70,37 @@ 'ms-gr-antd-table-expandable' ), id: $mergedProps.elem_id, - expandedRowKeys: $mergedProps.value, ...$mergedProps.restProps, ...$mergedProps.props, ...events, - onExpandedRowsChange: (expandedKeys: string[]) => { - events?.onExpandedRowsChange?.(expandedKeys); - value = expandedKeys; - }, expandedRowClassName: createFunction( - $mergedProps.props.expandedRowClassName + $mergedProps.props.expandedRowClassName || + $mergedProps.restProps.expandedRowClassName + ), + expandedRowRender: createFunction( + $mergedProps.props.expandedRowRender || + $mergedProps.restProps.expandedRowRender + ), + rowExpandable: createFunction( + $mergedProps.props.rowExpandable || + $mergedProps.restProps.rowExpandable ), - expandedRowRender: createFunction($mergedProps.props.expandedRowRender), - rowExpandable: createFunction($mergedProps.props.rowExpandable), - expandIcon: $mergedProps.props.expandIcon, - columnTitle: $mergedProps.props.columnTitle, + expandIcon: + $mergedProps.props.expandIcon || $mergedProps.restProps.expandIcon, + columnTitle: + $mergedProps.props.columnTitle || $mergedProps.restProps.columnTitle, }, slots: { ...$slots, expandIcon: { el: $slots['expandIcon'], callback: setSlotParams, + clone: true, }, expandedRowRender: { el: $slots['expandedRowRender'], callback: setSlotParams, + clone: true, }, }, }); diff --git a/frontend/antd/table/row-selection/Index.svelte b/frontend/antd/table/row-selection/Index.svelte index 614b6e54..28c413a8 100644 --- a/frontend/antd/table/row-selection/Index.svelte +++ b/frontend/antd/table/row-selection/Index.svelte @@ -10,7 +10,6 @@ export let gradio: Gradio; export let props: Record = {}; - export let value: string[] | number[]; export let as_item: string | undefined; // gradio properties export let visible = true; @@ -25,7 +24,6 @@ {gradio} {props} {as_item} - bind:value {visible} {elem_id} {elem_classes} diff --git a/frontend/antd/table/row-selection/RowSelection.svelte b/frontend/antd/table/row-selection/RowSelection.svelte index fa28ef8c..af37a97c 100644 --- a/frontend/antd/table/row-selection/RowSelection.svelte +++ b/frontend/antd/table/row-selection/RowSelection.svelte @@ -27,7 +27,6 @@ } = {}; export let as_item: string | undefined; - export let value: string[] | number[]; // gradio properties export let visible = true; @@ -45,7 +44,6 @@ elem_classes, elem_style, as_item, - value, restProps: $$restProps, }); const setSlotParams = getSetSlotParamsFn(); @@ -59,7 +57,6 @@ elem_classes, elem_style, as_item, - value, restProps: $$restProps, }); const { selections: selectionsItems } = getSelectionItems(['selections']); @@ -74,30 +71,37 @@ 'ms-gr-antd-table-row-selection' ), id: $mergedProps.elem_id, - selectedRowKeys: $mergedProps.value, - selections: - $mergedProps.props.selections || renderItems($selectionsItems), ...$mergedProps.restProps, ...$mergedProps.props, ...events, - onChange: (selectedRowKeys: string[] | number[], ...args: any[]) => { - value = selectedRowKeys; - events?.onChange?.(...args); - }, - onCell: createFunction($mergedProps.props.onCell), - getCheckboxProps: createFunction($mergedProps.props.getCheckboxProps), - renderCell: createFunction($mergedProps.props.renderCell), - columnTitle: $mergedProps.props.columnTitle, + selections: + $mergedProps.props.selections || + $mergedProps.restProps.selections || + renderItems($selectionsItems), + onCell: createFunction( + $mergedProps.props.onCell || $mergedProps.restProps.onCell + ), + getCheckboxProps: createFunction( + $mergedProps.props.getCheckboxProps || + $mergedProps.restProps.getCheckboxProps + ), + renderCell: createFunction( + $mergedProps.props.renderCell || $mergedProps.restProps.renderCell + ), + columnTitle: + $mergedProps.props.columnTitle || $mergedProps.restProps.columnTitle, }, slots: { ...$slots, columnTitle: { el: $slots.columnTitle, - fallback: setSlotParams, + callback: setSlotParams, + clone: true, }, renderCell: { el: $slots.renderCell, - fallback: setSlotParams, + callback: setSlotParams, + clone: true, }, }, }); diff --git a/frontend/antd/tabs/Index.svelte b/frontend/antd/tabs/Index.svelte index a49dee0f..e2c1289b 100644 --- a/frontend/antd/tabs/Index.svelte +++ b/frontend/antd/tabs/Index.svelte @@ -24,7 +24,6 @@ const updatedProps = writable(props); $: updatedProps.update((prev) => ({ ...prev, ...props })); export let _internal: Record = {}; - export let value: string; export let as_item: string | undefined; // gradio properties export let visible = true; @@ -41,7 +40,6 @@ elem_classes, elem_style, as_item, - value, restProps: $$restProps, }); @@ -56,7 +54,6 @@ elem_classes, elem_style, as_item, - value, restProps: $$restProps, }); const { items, default: children } = getItems(['items', 'default']); @@ -74,10 +71,6 @@ {...bindEvents($mergedProps)} slots={$slots} slotItems={$items.length > 0 ? $items : $children} - activeKey={$mergedProps.props.activeKey ?? $mergedProps.value} - onValueChange={(activeKey) => { - value = activeKey; - }} {setSlotParams} > diff --git a/frontend/antd/tabs/tabs.tsx b/frontend/antd/tabs/tabs.tsx index 5e2161ba..30c63dcb 100644 --- a/frontend/antd/tabs/tabs.tsx +++ b/frontend/antd/tabs/tabs.tsx @@ -13,7 +13,6 @@ import { type Item } from './context'; export const Tabs = sveltify< GetProps & { slotItems: Item[]; - onValueChange: (activeKey: string) => void; setSlotParams: SetSlotParams; }, [ @@ -31,7 +30,6 @@ export const Tabs = sveltify< indicator, items, onChange, - onValueChange, slotItems, more, children, @@ -111,7 +109,6 @@ export const Tabs = sveltify< } onChange={(activeKey) => { onChange?.(activeKey); - onValueChange(activeKey); }} /> diff --git a/frontend/antd/tour/Index.svelte b/frontend/antd/tour/Index.svelte index 2df8ed55..cbd8e87c 100644 --- a/frontend/antd/tour/Index.svelte +++ b/frontend/antd/tour/Index.svelte @@ -5,7 +5,11 @@ bindEvents, importComponent, } from '@svelte-preprocess-react/component'; - import { getSlotContext, getSlots } from '@svelte-preprocess-react/slot'; + import { + getSetSlotParamsFn, + getSlotContext, + getSlots, + } from '@svelte-preprocess-react/slot'; import type React from 'react'; import type { Gradio } from '@gradio/utils'; import cls from 'classnames'; @@ -41,7 +45,7 @@ open, restProps: $$restProps, }); - + const setSlotParams = getSetSlotParamsFn(); const slots = getSlots(); $: update({ gradio, @@ -69,14 +73,9 @@ {...$mergedProps.restProps} {...$mergedProps.props} {...bindEvents($mergedProps)} - current={$mergedProps.props.current ?? $mergedProps.value} - open={$mergedProps.props.open ?? $mergedProps.open} slots={$slots} slotItems={$steps.length > 0 ? $steps : $children} - onValueChange={(options) => { - value = options.current; - open = options.open; - }} + {setSlotParams} > diff --git a/frontend/antd/tour/step/Index.svelte b/frontend/antd/tour/step/Index.svelte index 416c8e5d..5059c61f 100644 --- a/frontend/antd/tour/step/Index.svelte +++ b/frontend/antd/tour/step/Index.svelte @@ -28,17 +28,22 @@ export let elem_style: React.CSSProperties = {}; const slotKey = getSlotKey(); - const [mergedProps, update] = getSlotContext({ - gradio, - props: $updatedProps, - _internal, - visible, - elem_id, - elem_classes, - elem_style, - as_item, - restProps: $$restProps, - }); + const [mergedProps, update] = getSlotContext( + { + gradio, + props: $updatedProps, + _internal, + visible, + elem_id, + elem_classes, + elem_style, + as_item, + restProps: $$restProps, + }, + { + elem_target: 'target', + } + ); const slots = getSlots(); $: update({ @@ -61,7 +66,9 @@ ...$mergedProps.restProps, ...$mergedProps.props, ...bindEvents($mergedProps), - target: createFunction($mergedProps.props.target), + target: createFunction( + $mergedProps.props.target || $mergedProps.restProps.target + ), }, slots: $slots, }); diff --git a/frontend/antd/tour/tour.tsx b/frontend/antd/tour/tour.tsx index e22ff2d0..b596be63 100644 --- a/frontend/antd/tour/tour.tsx +++ b/frontend/antd/tour/tour.tsx @@ -1,8 +1,10 @@ import { sveltify } from '@svelte-preprocess-react'; import { ReactSlot } from '@svelte-preprocess-react/react-slot'; +import type { SetSlotParams } from '@svelte-preprocess-react/slot'; import React, { useMemo } from 'react'; import { useFunction } from '@utils/hooks/useFunction'; import { renderItems } from '@utils/renderItems'; +import { renderParamsSlot } from '@utils/renderParamsSlot'; import { type GetProps, Tour as ATour } from 'antd'; import { type Item } from './context'; @@ -11,9 +13,9 @@ export const Tour = sveltify< GetProps & { slotItems: Item[]; children?: React.ReactNode; - onValueChange: (options: { current: number; open: boolean }) => void; + setSlotParams: SetSlotParams; }, - ['closeIcon'] + ['closeIcon', 'indicatorsRender'] >( ({ slots, @@ -22,11 +24,13 @@ export const Tour = sveltify< children, onChange, onClose, - onValueChange, getPopupContainer, + setSlotParams, + indicatorsRender, ...props }) => { const getPopupContainerFunction = useFunction(getPopupContainer); + const indicatorsRenderFunction = useFunction(indicatorsRender); return ( <>
{children}
@@ -42,10 +46,6 @@ export const Tour = sveltify< }, [steps, slotItems])} onChange={(current) => { onChange?.(current); - onValueChange({ - open: true, - current: current, - }); }} closeIcon={ slots.closeIcon ? ( @@ -54,13 +54,18 @@ export const Tour = sveltify< props.closeIcon ) } + indicatorsRender={ + slots.indicatorsRender + ? renderParamsSlot({ + slots, + setSlotParams, + key: 'indicatorsRender', + }) + : indicatorsRenderFunction + } getPopupContainer={getPopupContainerFunction} onClose={(current, ...args) => { onClose?.(current, ...args); - onValueChange({ - current, - open: false, - }); }} /> diff --git a/frontend/antd/tree/Index.svelte b/frontend/antd/tree/Index.svelte index 79c1c8df..d8e7b3a7 100644 --- a/frontend/antd/tree/Index.svelte +++ b/frontend/antd/tree/Index.svelte @@ -24,11 +24,6 @@ const updatedProps = writable(props); $: updatedProps.update((prev) => ({ ...prev, ...props })); export let _internal: Record = {}; - export let value: { - expanded_keys?: string[]; - checked_keys?: string[] | { checked: string[]; halfChecked: string[] }; - selected_keys?: string[]; - } = {}; export let as_item: string | undefined; // gradio properties export let visible = true; @@ -45,7 +40,6 @@ elem_classes, elem_style, as_item, - value, restProps: $$restProps, }); @@ -59,19 +53,10 @@ elem_classes, elem_style, as_item, - value, restProps: $$restProps, }); const { treeData, default: children } = getItems(['default', 'treeData']); const setSlotParams = getSetSlotParamsFn(); - - const onValueChange = (val: Record) => { - value = { - expanded_keys: val.expandedKeys, - checked_keys: val.checkedKeys, - selected_keys: val.selectedKeys, - }; - }; @@ -86,13 +71,6 @@ {...bindEvents($mergedProps)} slots={$slots} slotItems={$treeData.length ? $treeData : $children} - selectedKeys={$mergedProps.props.selectedKeys || - $mergedProps.value.selected_keys} - expandedKeys={$mergedProps.props.expandedKeys || - $mergedProps.value.expanded_keys} - checkedKeys={$mergedProps.props.checkedKeys || - $mergedProps.value.checked_keys} - {onValueChange} {setSlotParams} > diff --git a/frontend/antd/tree/directory-tree/Index.svelte b/frontend/antd/tree/directory-tree/Index.svelte index 61ce06b2..54e02bca 100644 --- a/frontend/antd/tree/directory-tree/Index.svelte +++ b/frontend/antd/tree/directory-tree/Index.svelte @@ -24,11 +24,6 @@ const updatedProps = writable(props); $: updatedProps.update((prev) => ({ ...prev, ...props })); export let _internal: Record = {}; - export let value: { - expanded_keys?: string[]; - checked_keys?: string[] | { checked: string[]; halfChecked: string[] }; - selected_keys?: string[]; - } = {}; export let as_item: string | undefined; // gradio properties export let visible = true; @@ -45,7 +40,6 @@ elem_classes, elem_style, as_item, - value, restProps: $$restProps, }); @@ -59,20 +53,11 @@ elem_classes, elem_style, as_item, - value, restProps: $$restProps, }); const { treeData, default: children } = getItems(['default', 'treeData']); const setSlotParams = getSetSlotParamsFn(); - - const onValueChange = (val: Record) => { - value = { - expanded_keys: val.expandedKeys, - checked_keys: val.checkedKeys, - selected_keys: val.selectedKeys, - }; - }; @@ -88,13 +73,6 @@ slots={$slots} directory slotItems={$treeData.length ? $treeData : $children} - selectedKeys={$mergedProps.props.selectedKeys || - $mergedProps.value.selected_keys} - expandedKeys={$mergedProps.props.expandedKeys || - $mergedProps.value.expanded_keys} - checkedKeys={$mergedProps.props.checkedKeys || - $mergedProps.value.checked_keys} - {onValueChange} {setSlotParams} > diff --git a/frontend/antd/tree/tree-node/Index.svelte b/frontend/antd/tree/tree-node/Index.svelte index 85637610..4014a198 100644 --- a/frontend/antd/tree/tree-node/Index.svelte +++ b/frontend/antd/tree/tree-node/Index.svelte @@ -76,7 +76,8 @@ ...$slots, icon: { el: $slots.icon, - fallback: setSlotParams, + callback: setSlotParams, + clone: true, }, }, children: $items.length > 0 ? $items : undefined, diff --git a/frontend/antd/tree/tree.tsx b/frontend/antd/tree/tree.tsx index 6e12c861..4e9ec835 100644 --- a/frontend/antd/tree/tree.tsx +++ b/frontend/antd/tree/tree.tsx @@ -16,13 +16,6 @@ export const Tree = sveltify< TreeProps & { slotItems: Item[]; directory?: boolean; - onValueChange: (options: { - expandedKeys?: React.Key[]; - selectedKeys?: React.Key[]; - checkedKeys?: - | React.Key[] - | { checked: React.Key[]; halfChecked: React.Key[] }; - }) => void; setSlotParams: SetSlotParams; }, [ @@ -40,7 +33,6 @@ export const Tree = sveltify< treeData, draggable, allowDrop, - onValueChange, onCheck, onSelect, onExpand, @@ -117,27 +109,12 @@ export const Tree = sveltify< allowDrop={allowDropFunction} onSelect={(selected, ...args) => { onSelect?.(selected, ...args); - onValueChange({ - selectedKeys: selected, - expandedKeys: props.expandedKeys, - checkedKeys: props.checkedKeys, - }); }} onExpand={(expanded, ...args) => { onExpand?.(expanded, ...args); - onValueChange({ - expandedKeys: expanded, - selectedKeys: props.selectedKeys, - checkedKeys: props.checkedKeys, - }); }} onCheck={(checked, ...args) => { onCheck?.(checked, ...args); - onValueChange({ - checkedKeys: checked, - selectedKeys: props.selectedKeys, - expandedKeys: props.expandedKeys, - }); }} /> diff --git a/frontend/svelte-preprocess-react/component.ts b/frontend/svelte-preprocess-react/component.ts index 4c9ca8d8..0ad7a629 100644 --- a/frontend/svelte-preprocess-react/component.ts +++ b/frontend/svelte-preprocess-react/component.ts @@ -45,6 +45,8 @@ const gradioProps = [ 'props', 'value', 'attached_events', + 'loading_status', + 'value_is_output', ]; export function getComponentRestProps>( From eb7fec090d471316e349ef56e3feb4b8a5a5cd88 Mon Sep 17 00:00:00 2001 From: Col0ring <1561999073@qq.com> Date: Tue, 22 Oct 2024 11:31:22 +0800 Subject: [PATCH 26/51] feat: add root class name --- .../components/antd/anchor/__init__.py | 2 + .../components/antd/auto_complete/__init__.py | 47 +++++++++++- .../antd/auto_complete/option/__init__.py | 1 + .../components/antd/breadcrumb/__init__.py | 2 + .../components/antd/button/__init__.py | 2 + .../components/antd/button/group/__init__.py | 4 + .../components/antd/cascader/__init__.py | 74 ++++++++++++++++++- .../antd/cascader/option/__init__.py | 5 ++ .../antd/cascader/panel/__init__.py | 24 +++++- .../components/antd/checkbox/__init__.py | 13 +++- .../antd/checkbox/group/__init__.py | 9 +++ .../antd/checkbox/group/option/__init__.py | 1 + .../components/antd/divider/__init__.py | 2 + .../components/antd/dropdown/__init__.py | 2 + .../antd/dropdown/button/__init__.py | 2 + .../components/antd/flex/__init__.py | 2 + .../components/antd/float_button/__init__.py | 2 + .../antd/float_button/back_top/__init__.py | 2 + .../antd/float_button/group/__init__.py | 2 + .../components/antd/grid/col/__init__.py | 2 + .../components/antd/grid/row/__init__.py | 2 + .../components/antd/layout/__init__.py | 2 + .../antd/layout/content/__init__.py | 2 + .../components/antd/layout/footer/__init__.py | 2 + .../components/antd/layout/header/__init__.py | 2 + .../components/antd/menu/__init__.py | 2 + .../components/antd/pagination/__init__.py | 2 + .../components/antd/space/__init__.py | 2 + .../components/antd/space/compact/__init__.py | 2 + .../components/antd/splitter/__init__.py | 2 + .../antd/splitter/panel/__init__.py | 2 + .../components/antd/steps/__init__.py | 27 +++++++ .../components/antd/steps/item/__init__.py | 15 ++++ .../antd/typography/link/__init__.py | 2 + .../antd/typography/paragraph/__init__.py | 2 + .../antd/typography/text/__init__.py | 2 + .../antd/typography/title/__init__.py | 2 + frontend/antd/cascader/cascader.tsx | 5 +- frontend/antd/cascader/option/Index.svelte | 2 +- 39 files changed, 272 insertions(+), 7 deletions(-) diff --git a/backend/modelscope_studio/components/antd/anchor/__init__.py b/backend/modelscope_studio/components/antd/anchor/__init__.py index 57cf266e..72a7fcba 100644 --- a/backend/modelscope_studio/components/antd/anchor/__init__.py +++ b/backend/modelscope_studio/components/antd/anchor/__init__.py @@ -49,6 +49,7 @@ def __init__( items: list[dict] | None = None, direction: Literal['vertical', 'horizontal'] = 'vertical', replace: bool = False, + root_class_name: str | None = None, as_item: str | None = None, _internal: None = None, # gradio properties @@ -89,6 +90,7 @@ def __init__( self.items = items self.direction = direction self.replace = replace + self.root_class_name = root_class_name FRONTEND_DIR = resolve_frontend_dir("anchor") diff --git a/backend/modelscope_studio/components/antd/auto_complete/__init__.py b/backend/modelscope_studio/components/antd/auto_complete/__init__.py index de869eb2..f682caef 100644 --- a/backend/modelscope_studio/components/antd/auto_complete/__init__.py +++ b/backend/modelscope_studio/components/antd/auto_complete/__init__.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any +from typing import Any, Literal from gradio.events import EventListener @@ -11,6 +11,7 @@ # as inputs, outputs class AntdAutoComplete(ModelScopeDataLayoutComponent): """ + Ant Design: https://ant.design/components/auto-complete/ """ Option = AntdAutoCompleteOption @@ -48,6 +49,29 @@ def __init__( value: str | None = None, props: dict | None = None, *, + allow_clear: bool | dict = False, + auto_focus: bool = False, + backfill: bool = False, + default_active_first_option: bool = True, + default_open: bool | None = None, + default_value: str | None = None, + disabled: bool = False, + dropdown_render: str | None = None, + popup_class_name: str | None = None, + popup_match_select_width: bool | int | float = True, + filter_option: bool | str = True, + get_popup_container: str | None = None, + not_found_content: str | None = None, + open: bool | None = None, + options: list[dict] | None = None, + placeholder: str | None = None, + placement: Literal['bottomLeft', 'bottomRight', 'topLeft', + 'topRight'] | None = None, + size: Literal['small', 'middle', 'large'] | None = None, + status: Literal['error', 'warning'] | None = None, + variant: Literal['outlined', 'borderless', 'filled'] + | None = 'outlined', + root_class_name: str | None = None, as_item: str | None = None, _internal: None = None, # gradio properties @@ -66,6 +90,27 @@ def __init__( elem_style=elem_style, **kwargs) self.props = props + self.allow_clear = allow_clear + self.auto_focus = auto_focus + self.backfill = backfill + self.default_active_first_option = default_active_first_option + self.default_open = default_open + self.default_value = default_value + self.disabled = disabled + self.dropdown_render = dropdown_render + self.popup_class_name = popup_class_name + self.popup_match_select_width = popup_match_select_width + self.filter_option = filter_option + self.get_popup_container = get_popup_container + self.not_found_content = not_found_content + self.open = open + self.options = options + self.placeholder = placeholder + self.status = status + self.variant = variant + self.placement = placement + self.size = size + self.root_class_name = root_class_name FRONTEND_DIR = resolve_frontend_dir("auto-complete") diff --git a/backend/modelscope_studio/components/antd/auto_complete/option/__init__.py b/backend/modelscope_studio/components/antd/auto_complete/option/__init__.py index 5df3a1b0..71bb47c4 100644 --- a/backend/modelscope_studio/components/antd/auto_complete/option/__init__.py +++ b/backend/modelscope_studio/components/antd/auto_complete/option/__init__.py @@ -7,6 +7,7 @@ class AntdAutoCompleteOption(ModelScopeLayoutComponent): """ + Ant Design: https://ant.design/components/auto-complete/ """ EVENTS = [] diff --git a/backend/modelscope_studio/components/antd/breadcrumb/__init__.py b/backend/modelscope_studio/components/antd/breadcrumb/__init__.py index cc6bcfa5..443570b1 100644 --- a/backend/modelscope_studio/components/antd/breadcrumb/__init__.py +++ b/backend/modelscope_studio/components/antd/breadcrumb/__init__.py @@ -25,6 +25,7 @@ def __init__( params: dict | None = None, items: list[dict] | None = None, separator: str | None = None, + root_class_name: str | None = None, as_item: str | None = None, _internal: None = None, # gradio properties @@ -46,6 +47,7 @@ def __init__( self.params = params self.items = items self.separator = separator + self.root_class_name = root_class_name FRONTEND_DIR = resolve_frontend_dir("breadcrumb") diff --git a/backend/modelscope_studio/components/antd/button/__init__.py b/backend/modelscope_studio/components/antd/button/__init__.py index 7dcabaa5..6615ec47 100644 --- a/backend/modelscope_studio/components/antd/button/__init__.py +++ b/backend/modelscope_studio/components/antd/button/__init__.py @@ -69,6 +69,7 @@ def __init__( variant: Literal["outlined", "dashed", "solid", "filled", "text", "link"] | None = None, color: Literal['default', 'primary', 'danger'] | None = None, + root_class_name: str | None = None, as_item: str | None = None, _internal: None = None, # gradio properties @@ -126,6 +127,7 @@ def __init__( self.type = type self.variant = variant self.color = color + self.root_class_name = root_class_name FRONTEND_DIR = resolve_frontend_dir("button") diff --git a/backend/modelscope_studio/components/antd/button/group/__init__.py b/backend/modelscope_studio/components/antd/button/group/__init__.py index f22e7061..f4fec3ec 100644 --- a/backend/modelscope_studio/components/antd/button/group/__init__.py +++ b/backend/modelscope_studio/components/antd/button/group/__init__.py @@ -1,5 +1,7 @@ from __future__ import annotations +from typing import Literal + from .....utils.dev import ModelScopeLayoutComponent, resolve_frontend_dir @@ -13,6 +15,7 @@ def __init__( self, props: dict | None = None, *, + size: Literal['small', 'middle', 'large'] | None = None, as_item: str | None = None, _internal: None = None, # gradio properties @@ -30,6 +33,7 @@ def __init__( elem_style=elem_style, **kwargs) self.props = props + self.size = size FRONTEND_DIR = resolve_frontend_dir("button", 'group') diff --git a/backend/modelscope_studio/components/antd/cascader/__init__.py b/backend/modelscope_studio/components/antd/cascader/__init__.py index cc6ba67e..45a12e3d 100644 --- a/backend/modelscope_studio/components/antd/cascader/__init__.py +++ b/backend/modelscope_studio/components/antd/cascader/__init__.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any +from typing import Any, Literal from gradio.events import EventListener @@ -12,6 +12,7 @@ # as inputs, outputs class AntdCascader(ModelScopeDataLayoutComponent): """ + Ant Design: https://ant.design/components/cascader """ Option = AntdCascaderOption Panel = AntdCascaderPanel @@ -50,6 +51,43 @@ def __init__( value: list[str] | list[int | float] | None = None, props: dict | None = None, *, + allow_clear: bool | dict = False, + auto_clear_search_value: bool = True, + auto_focus: bool = False, + change_on_select: bool = False, + default_value: str | None = None, + disabled: bool = False, + display_render: str | None = None, + tag_render: str | None = None, + popup_class_name: str | None = None, + dropdown_render: str | None = None, + expand_icon: str | None = None, + expand_trigger: Literal['click', 'hover'] = 'click', + filed_names: dict | None = None, + get_popup_container: str | None = None, + max_tag_count: int | Literal['responsive'] | None = None, + max_tag_placeholder: str | None = None, + max_tag_text_length: int | None = None, + not_found_content: str | None = None, + open: bool | None = None, + options: list[dict] | None = None, + placeholder: str | None = None, + placement: Literal['bottomLeft', 'bottomRight', 'topLeft', + 'topRight'] = 'bottomLeft', + show_search: bool | dict = False, + size: Literal['small', 'middle', 'large'] | None = None, + status: Literal['error', 'warning'] | None = None, + suffix_icon: str | None = None, + variant: Literal['outlined', 'borderless', 'filled'] + | None = 'outlined', + multiple: bool | None = None, + show_checked_strategy: Literal['SHOW_PARENT', 'SHOW_CHILD'] + | None = None, + remove_icon: str | None = None, + search_value: str | None = None, + dropdown_menu_column_style: dict | None = None, + option_render: str | None = None, + root_class_name: str | None = None, as_item: str | None = None, _internal: None = None, # gradio properties @@ -68,6 +106,40 @@ def __init__( elem_style=elem_style, **kwargs) self.props = props + self.allow_clear = allow_clear + self.auto_clear_search_value = auto_clear_search_value + self.auto_focus = auto_focus + self.change_on_select = change_on_select + self.default_value = default_value + self.disabled = disabled + self.display_render = display_render + self.tag_render = tag_render + self.popup_class_name = popup_class_name + self.dropdown_render = dropdown_render + self.expand_icon = expand_icon + self.expand_trigger = expand_trigger + self.filed_names = filed_names + self.get_popup_container = get_popup_container + self.max_tag_count = max_tag_count + self.max_tag_placeholder = max_tag_placeholder + self.max_tag_text_length = max_tag_text_length + self.not_found_content = not_found_content + self.open = open + self.options = options + self.placeholder = placeholder + self.placement = placement + self.show_search = show_search + self.size = size + self.status = status + self.suffix_icon = suffix_icon + self.variant = variant + self.multiple = multiple + self.show_checked_strategy = show_checked_strategy + self.remove_icon = remove_icon + self.search_value = search_value + self.dropdown_menu_column_style = dropdown_menu_column_style + self.option_render = option_render + self.root_class_name = root_class_name FRONTEND_DIR = resolve_frontend_dir("cascader") diff --git a/backend/modelscope_studio/components/antd/cascader/option/__init__.py b/backend/modelscope_studio/components/antd/cascader/option/__init__.py index 01511078..e4e5c9a9 100644 --- a/backend/modelscope_studio/components/antd/cascader/option/__init__.py +++ b/backend/modelscope_studio/components/antd/cascader/option/__init__.py @@ -7,6 +7,7 @@ class AntdCascaderOption(ModelScopeLayoutComponent): """ + Ant Design: https://ant.design/components/cascader """ EVENTS = [] @@ -22,6 +23,8 @@ def __init__( label: str | None = None, props: dict | None = None, *, + disabled: bool | None = None, + is_leaf: bool | None = None, as_item: str | None = None, _internal: None = None, # gradio properties @@ -41,6 +44,8 @@ def __init__( self.props = props self.value = value self.label = label + self.disabled = disabled + self.is_leaf = is_leaf FRONTEND_DIR = resolve_frontend_dir("cascader", "option") diff --git a/backend/modelscope_studio/components/antd/cascader/panel/__init__.py b/backend/modelscope_studio/components/antd/cascader/panel/__init__.py index 1a44b629..21c48145 100644 --- a/backend/modelscope_studio/components/antd/cascader/panel/__init__.py +++ b/backend/modelscope_studio/components/antd/cascader/panel/__init__.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any +from typing import Any, Literal from gradio.events import EventListener @@ -10,6 +10,7 @@ # as inputs, outputs class AntdCascaderPanel(ModelScopeDataLayoutComponent): """ + Ant Design: https://ant.design/components/cascader """ EVENTS = [ @@ -29,6 +30,17 @@ def __init__( value: list[str] | list[int | float] | None = None, props: dict | None = None, *, + change_on_select: bool = False, + default_value: str | None = None, + expand_icon: str | None = None, + expand_trigger: Literal['click', 'hover'] = 'click', + filed_names: dict | None = None, + not_found_content: str | None = None, + options: list[dict] | None = None, + multiple: bool | None = None, + show_checked_strategy: Literal['SHOW_PARENT', 'SHOW_CHILD'] + | None = None, + root_class_name: str | None = None, as_item: str | None = None, _internal: None = None, # gradio properties @@ -47,6 +59,16 @@ def __init__( elem_style=elem_style, **kwargs) self.props = props + self.change_on_select = change_on_select + self.default_value = default_value + self.expand_icon = expand_icon + self.expand_trigger = expand_trigger + self.filed_names = filed_names + self.not_found_content = not_found_content + self.options = options + self.multiple = multiple + self.show_checked_strategy = show_checked_strategy + self.root_class_name = root_class_name FRONTEND_DIR = resolve_frontend_dir("cascader", "panel") diff --git a/backend/modelscope_studio/components/antd/checkbox/__init__.py b/backend/modelscope_studio/components/antd/checkbox/__init__.py index 9654b5d5..dd3dec6b 100644 --- a/backend/modelscope_studio/components/antd/checkbox/__init__.py +++ b/backend/modelscope_studio/components/antd/checkbox/__init__.py @@ -11,6 +11,7 @@ # as inputs, outputs class AntdCheckbox(ModelScopeDataLayoutComponent): """ + Ant Design: https://ant.design/components/checkbox """ Group = AntdCheckboxGroup @@ -22,9 +23,14 @@ class AntdCheckbox(ModelScopeDataLayoutComponent): def __init__( self, - value: bool | None = None, + value: bool | None = False, props: dict | None = None, *, + auto_focus: bool = False, + default_checked: bool = False, + disabled: bool = False, + indeterminate: bool = False, + root_class_name: str | None = None, as_item: str | None = None, _internal: None = None, # gradio properties @@ -43,6 +49,11 @@ def __init__( elem_style=elem_style, **kwargs) self.props = props + self.auto_focus = auto_focus + self.default_checked = default_checked + self.disabled = disabled + self.indeterminate = indeterminate + self.root_class_name = root_class_name FRONTEND_DIR = resolve_frontend_dir("checkbox") diff --git a/backend/modelscope_studio/components/antd/checkbox/group/__init__.py b/backend/modelscope_studio/components/antd/checkbox/group/__init__.py index 36b2027d..df3b784d 100644 --- a/backend/modelscope_studio/components/antd/checkbox/group/__init__.py +++ b/backend/modelscope_studio/components/antd/checkbox/group/__init__.py @@ -11,6 +11,7 @@ # as inputs, outputs class AntdCheckboxGroup(ModelScopeDataLayoutComponent): """ + Ant Design: https://ant.design/components/checkbox """ Option = AntdCheckboxGroupOption @@ -30,6 +31,10 @@ def __init__( value: list[str | int | float | bool] | None = None, props: dict | None = None, *, + default_value: list[str | int | float | bool] | None = None, + disabled: bool = False, + options: list[str] | list[int | float] | list[dict] | None = None, + root_class_name: str | None = None, as_item: str | None = None, _internal: None = None, # gradio properties @@ -48,6 +53,10 @@ def __init__( elem_style=elem_style, **kwargs) self.props = props + self.default_value = default_value + self.disabled = disabled + self.options = options + self.root_class_name = root_class_name FRONTEND_DIR = resolve_frontend_dir("checkbox", "group") diff --git a/backend/modelscope_studio/components/antd/checkbox/group/option/__init__.py b/backend/modelscope_studio/components/antd/checkbox/group/option/__init__.py index d9adc723..d664acd9 100644 --- a/backend/modelscope_studio/components/antd/checkbox/group/option/__init__.py +++ b/backend/modelscope_studio/components/antd/checkbox/group/option/__init__.py @@ -7,6 +7,7 @@ class AntdCheckboxGroupOption(ModelScopeLayoutComponent): """ + Ant Design: https://ant.design/components/checkbox """ EVENTS = [] diff --git a/backend/modelscope_studio/components/antd/divider/__init__.py b/backend/modelscope_studio/components/antd/divider/__init__.py index 020614d6..67a62c14 100644 --- a/backend/modelscope_studio/components/antd/divider/__init__.py +++ b/backend/modelscope_studio/components/antd/divider/__init__.py @@ -29,6 +29,7 @@ def __init__( orientation_margin: str | int | None = None, plain: bool = False, type: Literal["horizontal", "horizontal"] = "horizontal", + root_class_name: str | None = None, as_item: str | None = None, _internal: None = None, # gradio properties @@ -63,6 +64,7 @@ def __init__( self.orientation_margin = orientation_margin self.plain = plain self.type = type + self.root_class_name = root_class_name FRONTEND_DIR = resolve_frontend_dir("divider") diff --git a/backend/modelscope_studio/components/antd/dropdown/__init__.py b/backend/modelscope_studio/components/antd/dropdown/__init__.py index fd50af01..6dce67da 100644 --- a/backend/modelscope_studio/components/antd/dropdown/__init__.py +++ b/backend/modelscope_studio/components/antd/dropdown/__init__.py @@ -57,6 +57,7 @@ def __init__( 'contextMenu']] = ['hover'], open: bool | None = None, inner_elem_style: dict | None = None, + root_class_name: str | None = None, as_item: str | None = None, _internal: None = None, # gradio properties @@ -88,6 +89,7 @@ def __init__( self.trigger = trigger self.open = open self.inner_elem_style = inner_elem_style + self.root_class_name = root_class_name FRONTEND_DIR = resolve_frontend_dir("dropdown") diff --git a/backend/modelscope_studio/components/antd/dropdown/button/__init__.py b/backend/modelscope_studio/components/antd/dropdown/button/__init__.py index e6e59df9..4bc50154 100644 --- a/backend/modelscope_studio/components/antd/dropdown/button/__init__.py +++ b/backend/modelscope_studio/components/antd/dropdown/button/__init__.py @@ -66,6 +66,7 @@ def __init__( size: Literal["large", "middle", "small"] | None = None, type: Literal["primary", "dashed", "link", "text", "default"] | None = None, + root_class_name: str | None = None, as_item: str | None = None, _internal: None = None, # gradio properties @@ -103,6 +104,7 @@ def __init__( self.icon = icon self.size = size self.type = type + self.root_class_name = root_class_name FRONTEND_DIR = resolve_frontend_dir("dropdown", "button") diff --git a/backend/modelscope_studio/components/antd/flex/__init__.py b/backend/modelscope_studio/components/antd/flex/__init__.py index d6829f71..6ba4a86d 100644 --- a/backend/modelscope_studio/components/antd/flex/__init__.py +++ b/backend/modelscope_studio/components/antd/flex/__init__.py @@ -35,6 +35,7 @@ def __init__( gap: Literal["small", "middle", "large"] | str | int | float | None = None, component: str | None = None, + root_class_name: str | None = None, as_item: str | None = None, _internal: None = None, # gradio properties @@ -69,6 +70,7 @@ def __init__( self.flex = flex self.gap = gap self.component = component + self.root_class_name = root_class_name FRONTEND_DIR = resolve_frontend_dir("flex") diff --git a/backend/modelscope_studio/components/antd/float_button/__init__.py b/backend/modelscope_studio/components/antd/float_button/__init__.py index 8194e12a..b6df163d 100644 --- a/backend/modelscope_studio/components/antd/float_button/__init__.py +++ b/backend/modelscope_studio/components/antd/float_button/__init__.py @@ -44,6 +44,7 @@ def __init__( href_target: str | None = None, html_type: Literal['submit', 'reset', 'button'] | None = 'button', badge: dict | None = None, + root_class_name: str | None = None, as_item: str | None = None, _internal: None = None, # gradio properties @@ -82,6 +83,7 @@ def __init__( self.href_target = href_target self.html_type = html_type self.badge = badge + self.root_class_name = root_class_name FRONTEND_DIR = resolve_frontend_dir("float-button") diff --git a/backend/modelscope_studio/components/antd/float_button/back_top/__init__.py b/backend/modelscope_studio/components/antd/float_button/back_top/__init__.py index 4612cf21..f8ea0ca2 100644 --- a/backend/modelscope_studio/components/antd/float_button/back_top/__init__.py +++ b/backend/modelscope_studio/components/antd/float_button/back_top/__init__.py @@ -46,6 +46,7 @@ def __init__( duration: int | float = 450, elem_target: str | None = None, visibility_height: int | float = 400, + root_class_name: str | None = None, as_item: str | None = None, _internal: None = None, # gradio properties @@ -88,6 +89,7 @@ def __init__( self.duration = duration self.visibility_height = visibility_height self.elem_target = elem_target + self.root_class_name = root_class_name FRONTEND_DIR = resolve_frontend_dir("float-button", "back-top") diff --git a/backend/modelscope_studio/components/antd/float_button/group/__init__.py b/backend/modelscope_studio/components/antd/float_button/group/__init__.py index e3e24a70..264ed688 100644 --- a/backend/modelscope_studio/components/antd/float_button/group/__init__.py +++ b/backend/modelscope_studio/components/antd/float_button/group/__init__.py @@ -50,6 +50,7 @@ def __init__( html_type: Literal['submit', 'reset', 'button'] | None = 'button', badge: dict | None = None, trigger: Literal['hover', 'click'] | None = None, + root_class_name: str | None = None, as_item: str | None = None, open: bool | None = None, close_icon: str | None = None, @@ -100,6 +101,7 @@ def __init__( self.open = open self.close_icon = close_icon self.placement = placement + self.root_class_name = root_class_name FRONTEND_DIR = resolve_frontend_dir("float-button", "group") diff --git a/backend/modelscope_studio/components/antd/grid/col/__init__.py b/backend/modelscope_studio/components/antd/grid/col/__init__.py index 068d7ec0..824f1141 100644 --- a/backend/modelscope_studio/components/antd/grid/col/__init__.py +++ b/backend/modelscope_studio/components/antd/grid/col/__init__.py @@ -43,6 +43,7 @@ def __init__( lg: int | dict | None = None, xl: int | dict | None = None, xxl: int | dict | None = None, + root_class_name: str | None = None, as_item: str | None = None, _internal: None = None, # gradio properties @@ -87,6 +88,7 @@ def __init__( self.lg = lg self.xl = xl self.xxl = xxl + self.root_class_name = root_class_name FRONTEND_DIR = resolve_frontend_dir("grid", 'col') diff --git a/backend/modelscope_studio/components/antd/grid/row/__init__.py b/backend/modelscope_studio/components/antd/grid/row/__init__.py index 7e0a226f..be0febe6 100644 --- a/backend/modelscope_studio/components/antd/grid/row/__init__.py +++ b/backend/modelscope_studio/components/antd/grid/row/__init__.py @@ -39,6 +39,7 @@ def __init__( | dict[str, Literal["start", "end", "center", "space-between", 'space-around', 'space-evenly']] = "start", wrap: bool = True, + root_class_name: str | None = None, as_item: str | None = None, _internal: None = None, # gradio properties @@ -67,6 +68,7 @@ def __init__( self.gutter = gutter self.justify = justify self.wrap = wrap + self.root_class_name = root_class_name FRONTEND_DIR = resolve_frontend_dir("grid", 'row') diff --git a/backend/modelscope_studio/components/antd/layout/__init__.py b/backend/modelscope_studio/components/antd/layout/__init__.py index b8ff8d55..036d4682 100644 --- a/backend/modelscope_studio/components/antd/layout/__init__.py +++ b/backend/modelscope_studio/components/antd/layout/__init__.py @@ -41,6 +41,7 @@ def __init__( props: dict | None = None, *, has_sider: bool | None = None, + root_class_name: str | None = None, as_item: str | None = None, _internal: None = None, # gradio properties @@ -63,6 +64,7 @@ def __init__( **kwargs) self.props = props self.has_sider = has_sider + self.root_class_name = root_class_name FRONTEND_DIR = resolve_frontend_dir("layout") diff --git a/backend/modelscope_studio/components/antd/layout/content/__init__.py b/backend/modelscope_studio/components/antd/layout/content/__init__.py index 01c71c22..983f077f 100644 --- a/backend/modelscope_studio/components/antd/layout/content/__init__.py +++ b/backend/modelscope_studio/components/antd/layout/content/__init__.py @@ -30,6 +30,7 @@ def __init__( self, props: dict | None = None, *, + root_class_name: str | None = None, as_item: str | None = None, _internal: None = None, # gradio properties @@ -47,6 +48,7 @@ def __init__( elem_style=elem_style, **kwargs) self.props = props + self.root_class_name = root_class_name FRONTEND_DIR = resolve_frontend_dir("layout", 'content') diff --git a/backend/modelscope_studio/components/antd/layout/footer/__init__.py b/backend/modelscope_studio/components/antd/layout/footer/__init__.py index 2308ceee..9ce6dcc8 100644 --- a/backend/modelscope_studio/components/antd/layout/footer/__init__.py +++ b/backend/modelscope_studio/components/antd/layout/footer/__init__.py @@ -30,6 +30,7 @@ def __init__( self, props: dict | None = None, *, + root_class_name: str | None = None, as_item: str | None = None, _internal: None = None, # gradio properties @@ -47,6 +48,7 @@ def __init__( elem_style=elem_style, **kwargs) self.props = props + self.root_class_name = root_class_name FRONTEND_DIR = resolve_frontend_dir("layout", 'footer') diff --git a/backend/modelscope_studio/components/antd/layout/header/__init__.py b/backend/modelscope_studio/components/antd/layout/header/__init__.py index 9a3cd114..b8ecf7cc 100644 --- a/backend/modelscope_studio/components/antd/layout/header/__init__.py +++ b/backend/modelscope_studio/components/antd/layout/header/__init__.py @@ -30,6 +30,7 @@ def __init__( self, props: dict | None = None, *, + root_class_name: str | None = None, as_item: str | None = None, _internal: None = None, # gradio properties @@ -47,6 +48,7 @@ def __init__( elem_style=elem_style, **kwargs) self.props = props + self.root_class_name = root_class_name FRONTEND_DIR = resolve_frontend_dir("layout", 'header') diff --git a/backend/modelscope_studio/components/antd/menu/__init__.py b/backend/modelscope_studio/components/antd/menu/__init__.py index b814f0a4..4b942393 100644 --- a/backend/modelscope_studio/components/antd/menu/__init__.py +++ b/backend/modelscope_studio/components/antd/menu/__init__.py @@ -54,6 +54,7 @@ def __init__( sub_menu_open_delay: int | float = 0, theme: Literal['light', 'dark'] | None = None, trigger_sub_menu_action: Literal['click', 'hover'] = 'hover', + root_class_name: str | None = None, as_item: str | None = None, _internal: None = None, # gradio properties @@ -88,6 +89,7 @@ def __init__( self.sub_menu_open_delay = sub_menu_open_delay self.theme = theme self.trigger_sub_menu_action = trigger_sub_menu_action + self.root_class_name = root_class_name FRONTEND_DIR = resolve_frontend_dir("menu") diff --git a/backend/modelscope_studio/components/antd/pagination/__init__.py b/backend/modelscope_studio/components/antd/pagination/__init__.py index d857ae44..21748f31 100644 --- a/backend/modelscope_studio/components/antd/pagination/__init__.py +++ b/backend/modelscope_studio/components/antd/pagination/__init__.py @@ -45,6 +45,7 @@ def __init__( simple: bool | dict | None = None, size: Literal['small', 'default'] = 'default', total: int = 0, + root_class_name: str | None = None, as_item: str | None = None, _internal: None = None, # gradio properties @@ -80,6 +81,7 @@ def __init__( self.show_total = show_total self.simple = simple self.size = size + self.root_class_name = root_class_name FRONTEND_DIR = resolve_frontend_dir("pagination") diff --git a/backend/modelscope_studio/components/antd/space/__init__.py b/backend/modelscope_studio/components/antd/space/__init__.py index 8235c666..34b35f8c 100644 --- a/backend/modelscope_studio/components/antd/space/__init__.py +++ b/backend/modelscope_studio/components/antd/space/__init__.py @@ -39,6 +39,7 @@ def __init__( | list[Literal['small', 'middle', 'large'] | int | float] = 'small', split: str | None = None, wrap: bool = False, + root_class_name: str | None = None, as_item: str | None = None, _internal: None = None, # gradio properties @@ -73,6 +74,7 @@ def __init__( self.size = size self.split = split self.wrap = wrap + self.root_class_name = root_class_name FRONTEND_DIR = resolve_frontend_dir("space") diff --git a/backend/modelscope_studio/components/antd/space/compact/__init__.py b/backend/modelscope_studio/components/antd/space/compact/__init__.py index 90b7262c..52f5f48a 100644 --- a/backend/modelscope_studio/components/antd/space/compact/__init__.py +++ b/backend/modelscope_studio/components/antd/space/compact/__init__.py @@ -28,6 +28,7 @@ def __init__( block: bool = False, direction: Literal['vertical', 'horizontal'] = 'horizontal', size: Literal['small', 'middle', 'large'] = 'middle', + root_class_name: str | None = None, as_item: str | None = None, _internal: None = None, # gradio properties @@ -54,6 +55,7 @@ def __init__( self.block = block self.direction = direction self.size = size + self.root_class_name = root_class_name FRONTEND_DIR = resolve_frontend_dir("space", "compact") diff --git a/backend/modelscope_studio/components/antd/splitter/__init__.py b/backend/modelscope_studio/components/antd/splitter/__init__.py index b4fb4e85..01bf2fa0 100644 --- a/backend/modelscope_studio/components/antd/splitter/__init__.py +++ b/backend/modelscope_studio/components/antd/splitter/__init__.py @@ -39,6 +39,7 @@ def __init__( props: dict | None = None, *, layout: Literal['horizontal', 'vertical'] | None = 'horizontal', + root_class_name: str | None = None, as_item: str | None = None, _internal: None = None, # gradio properties @@ -61,6 +62,7 @@ def __init__( **kwargs) self.props = props self.layout = layout + self.root_class_name = root_class_name FRONTEND_DIR = resolve_frontend_dir("splitter") diff --git a/backend/modelscope_studio/components/antd/splitter/panel/__init__.py b/backend/modelscope_studio/components/antd/splitter/panel/__init__.py index b01d0a8b..46e9e354 100644 --- a/backend/modelscope_studio/components/antd/splitter/panel/__init__.py +++ b/backend/modelscope_studio/components/antd/splitter/panel/__init__.py @@ -27,6 +27,7 @@ def __init__( size: int | str | None = None, collapsible: bool | dict = False, resizable: bool = True, + root_class_name: str | None = None, as_item: str | None = None, _internal: None = None, # gradio properties @@ -59,6 +60,7 @@ def __init__( self.size = size self.collapsible = collapsible self.resizable = resizable + self.root_class_name = root_class_name FRONTEND_DIR = resolve_frontend_dir("splitter", 'panel') diff --git a/backend/modelscope_studio/components/antd/steps/__init__.py b/backend/modelscope_studio/components/antd/steps/__init__.py index 92b0c7f7..8b8f5f87 100644 --- a/backend/modelscope_studio/components/antd/steps/__init__.py +++ b/backend/modelscope_studio/components/antd/steps/__init__.py @@ -1,5 +1,7 @@ from __future__ import annotations +from typing import Literal + from gradio.events import EventListener from ....utils.dev import ModelScopeLayoutComponent, resolve_frontend_dir @@ -8,6 +10,7 @@ class AntdSteps(ModelScopeLayoutComponent): """ + Ant Design: https://ant.design/components/steps """ Item = AntdStepsItem EVENTS = [ @@ -23,6 +26,18 @@ def __init__( self, props: dict | None = None, *, + current: int = 0, + direction: Literal['vertical', 'horizontal'] = "horizontal", + initial: int = 0, + label_placement: Literal['horizontal', 'vertical'] = 'horizontal', + percent: int | None = None, + progress_dot: bool | str = False, + responsive: bool = True, + size: Literal['small', 'default'] = 'default', + status: Literal['wait', 'process', 'finish', 'error'] = 'process', + type: Literal['default', 'navigation', 'inline'] = 'default', + items: list[dict] | None = None, + root_class_name: str | None = None, as_item: str | None = None, _internal: None = None, # gradio properties @@ -40,6 +55,18 @@ def __init__( elem_style=elem_style, **kwargs) self.props = props + self.current = current + self.direction = direction + self.initial = initial + self.label_placement = label_placement + self.percent = percent + self.progress_dot = progress_dot + self.responsive = responsive + self.size = size + self.status = status + self.type = type + self.items = items + self.root_class_name = root_class_name FRONTEND_DIR = resolve_frontend_dir("steps") diff --git a/backend/modelscope_studio/components/antd/steps/item/__init__.py b/backend/modelscope_studio/components/antd/steps/item/__init__.py index e23efeb8..9702c78f 100644 --- a/backend/modelscope_studio/components/antd/steps/item/__init__.py +++ b/backend/modelscope_studio/components/antd/steps/item/__init__.py @@ -1,5 +1,7 @@ from __future__ import annotations +from typing import Literal + from .....utils.dev import ModelScopeLayoutComponent, resolve_frontend_dir @@ -15,6 +17,13 @@ def __init__( self, props: dict | None = None, *, + description: str | None = None, + disabled: bool | None = False, + icon: str | None = None, + status: Literal['wait', 'process', 'finish', 'error'] + | None = None, + sub_title: str | None = None, + title: str | None = None, as_item: str | None = None, _internal: None = None, # gradio properties @@ -32,6 +41,12 @@ def __init__( elem_style=elem_style, **kwargs) self.props = props + self.description = description + self.disabled = disabled + self.icon = icon + self.status = status + self.sub_title = sub_title + self.title = title FRONTEND_DIR = resolve_frontend_dir("steps", "item") diff --git a/backend/modelscope_studio/components/antd/typography/link/__init__.py b/backend/modelscope_studio/components/antd/typography/link/__init__.py index 0fe09f34..9adfa26d 100644 --- a/backend/modelscope_studio/components/antd/typography/link/__init__.py +++ b/backend/modelscope_studio/components/antd/typography/link/__init__.py @@ -74,6 +74,7 @@ def __init__( type: Literal['secondary', 'success', 'warning', 'danger'] | None = None, underline: bool = False, + root_class_name: str | None = None, as_item: str | None = None, _internal: None = None, # gradio properties @@ -121,6 +122,7 @@ def __init__( self.underline = underline self.href = href self.href_target = href_target + self.root_class_name = root_class_name FRONTEND_DIR = resolve_frontend_dir("typography", "link") diff --git a/backend/modelscope_studio/components/antd/typography/paragraph/__init__.py b/backend/modelscope_studio/components/antd/typography/paragraph/__init__.py index 0490f983..48f07710 100644 --- a/backend/modelscope_studio/components/antd/typography/paragraph/__init__.py +++ b/backend/modelscope_studio/components/antd/typography/paragraph/__init__.py @@ -89,6 +89,7 @@ def __init__( type: Literal['secondary', 'success', 'warning', 'danger'] | None = None, underline: bool = False, + root_class_name: str | None = None, as_item: str | None = None, _internal: None = None, # gradio properties @@ -132,6 +133,7 @@ def __init__( self.italic = italic self.type = type self.underline = underline + self.root_class_name = root_class_name FRONTEND_DIR = resolve_frontend_dir("typography", "paragraph") diff --git a/backend/modelscope_studio/components/antd/typography/text/__init__.py b/backend/modelscope_studio/components/antd/typography/text/__init__.py index ca446603..f3734322 100644 --- a/backend/modelscope_studio/components/antd/typography/text/__init__.py +++ b/backend/modelscope_studio/components/antd/typography/text/__init__.py @@ -86,6 +86,7 @@ def __init__( type: Literal['secondary', 'success', 'warning', 'danger'] | None = None, underline: bool = False, + root_class_name: str | None = None, as_item: str | None = None, _internal: None = None, # gradio properties @@ -131,6 +132,7 @@ def __init__( self.italic = italic self.type = type self.underline = underline + self.root_class_name = root_class_name FRONTEND_DIR = resolve_frontend_dir("typography", "text") diff --git a/backend/modelscope_studio/components/antd/typography/title/__init__.py b/backend/modelscope_studio/components/antd/typography/title/__init__.py index 064bedca..cffcde10 100644 --- a/backend/modelscope_studio/components/antd/typography/title/__init__.py +++ b/backend/modelscope_studio/components/antd/typography/title/__init__.py @@ -89,6 +89,7 @@ def __init__( type: Literal['secondary', 'success', 'warning', 'danger'] | None = None, underline: bool = False, + root_class_name: str | None = None, as_item: str | None = None, _internal: None = None, # gradio properties @@ -132,6 +133,7 @@ def __init__( self.italic = italic self.type = type self.underline = underline + self.root_class_name = root_class_name FRONTEND_DIR = resolve_frontend_dir("typography", "title") diff --git a/frontend/antd/cascader/cascader.tsx b/frontend/antd/cascader/cascader.tsx index 1dcbda4d..d92e2585 100644 --- a/frontend/antd/cascader/cascader.tsx +++ b/frontend/antd/cascader/cascader.tsx @@ -19,7 +19,7 @@ function getConfig(value: T): Partial> { export const Cascader = sveltify< CascaderProps & { onValueChange: (value: string[] | number[]) => void; - onLoadData?: (...args: any[]) => void; + onLoadData: (...args: any[]) => void; optionItems: Item[]; setSlotParams: SetSlotParams; }, @@ -48,11 +48,11 @@ export const Cascader = sveltify< maxTagPlaceholder, dropdownRender, optionRender, - onLoadData, showSearch, optionItems, options, setSlotParams, + onLoadData, ...props }) => { const getPopupContainerFunction = useFunction(getPopupContainer); @@ -67,6 +67,7 @@ export const Cascader = sveltify< const showSearchFilterFunction = useFunction(showSearchConfig.filter); const showSearchRenderFunction = useFunction(showSearchConfig.render); const showSearchSortFunction = useFunction(showSearchConfig.sort); + return ( <>
{children}
diff --git a/frontend/antd/cascader/option/Index.svelte b/frontend/antd/cascader/option/Index.svelte index 41099d11..ebf6958a 100644 --- a/frontend/antd/cascader/option/Index.svelte +++ b/frontend/antd/cascader/option/Index.svelte @@ -61,7 +61,7 @@ restProps: $$restProps, }); const setItem = getSetItemFn(); - const { default: items } = getItems(); + const { default: items } = getItems(['default']); $: setItem($slotKey, $mergedProps._internal.index || 0, { props: { From d5fd6d16981dbb8cb8837ccf8affd101ebb33e31 Mon Sep 17 00:00:00 2001 From: Col0ring <1561999073@qq.com> Date: Tue, 22 Oct 2024 11:39:11 +0800 Subject: [PATCH 27/51] fix: ts lint --- frontend/antd/cascader/cascader.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/antd/cascader/cascader.tsx b/frontend/antd/cascader/cascader.tsx index d92e2585..7a7334f8 100644 --- a/frontend/antd/cascader/cascader.tsx +++ b/frontend/antd/cascader/cascader.tsx @@ -19,7 +19,7 @@ function getConfig(value: T): Partial> { export const Cascader = sveltify< CascaderProps & { onValueChange: (value: string[] | number[]) => void; - onLoadData: (...args: any[]) => void; + onLoadData?: (...args: any[]) => void; optionItems: Item[]; setSlotParams: SetSlotParams; }, From 288275343e1076d0d40659fefd2708928467d7aa Mon Sep 17 00:00:00 2001 From: Col0ring <1561999073@qq.com> Date: Tue, 29 Oct 2024 14:39:14 +0800 Subject: [PATCH 28/51] feat: params for data entry components --- .../components/antd/color_picker/__init__.py | 39 +++++++ .../components/antd/date_picker/__init__.py | 92 +++++++++++++++- .../antd/date_picker/preset/__init__.py | 1 + .../antd/date_picker/range_picker/__init__.py | 90 ++++++++++++++- .../components/antd/form/__init__.py | 45 +++++++- .../components/antd/form/item/__init__.py | 63 +++++++++++ .../antd/form/item/rule/__init__.py | 30 +++++ .../components/antd/input/__init__.py | 38 +++++++ .../components/antd/input/otp/__init__.py | 23 +++- .../antd/input/password/__init__.py | 43 +++++++- .../components/antd/input/search/__init__.py | 43 +++++++- .../antd/input/textarea/__init__.py | 33 +++++- .../components/antd/input_number/__init__.py | 63 ++++++++++- .../components/antd/mentions/__init__.py | 37 ++++++- .../antd/mentions/option/__init__.py | 1 + .../components/antd/radio/__init__.py | 3 + .../components/antd/radio/button/__init__.py | 3 + .../components/antd/radio/group/__init__.py | 21 +++- .../antd/radio/group/option/__init__.py | 1 + .../components/antd/rate/__init__.py | 27 ++++- .../components/antd/select/__init__.py | 94 +++++++++++++++- .../components/antd/select/option/__init__.py | 3 + .../components/antd/slider/__init__.py | 38 ++++++- .../components/antd/slider/mark/__init__.py | 1 + .../components/antd/switch/__init__.py | 21 +++- .../components/antd/time_picker/__init__.py | 62 ++++++++++- .../antd/time_picker/range_picker/__init__.py | 64 ++++++++++- .../components/antd/transfer/__init__.py | 43 +++++++- .../components/antd/tree_select/__init__.py | 104 +++++++++++++++++- .../antd/tree_select/tree_node/__init__.py | 13 +++ .../components/antd/upload/__init__.py | 53 ++++++++- frontend/antd/date-picker/date-picker.tsx | 3 + frontend/antd/form/Index.svelte | 37 ++++--- frontend/antd/form/form.tsx | 65 +++++++---- frontend/antd/form/item/rule/Index.svelte | 51 ++++++--- .../antd/input/password/input.password.tsx | 12 ++ frontend/antd/radio/Index.svelte | 14 +-- frontend/antd/radio/button/Index.svelte | 14 +-- frontend/antd/radio/group/Index.svelte | 29 +++-- frontend/antd/rate/rate.tsx | 5 +- frontend/antd/select/select.tsx | 5 +- frontend/antd/slider/Index.svelte | 8 +- frontend/antd/slider/slider.tsx | 18 ++- frontend/antd/transfer/Index.svelte | 29 +++-- frontend/antd/tree-select/tree-select.tsx | 8 +- frontend/antd/upload/Index.svelte | 29 +++-- 46 files changed, 1371 insertions(+), 148 deletions(-) diff --git a/backend/modelscope_studio/components/antd/color_picker/__init__.py b/backend/modelscope_studio/components/antd/color_picker/__init__.py index 061dd1a4..a23ad83d 100644 --- a/backend/modelscope_studio/components/antd/color_picker/__init__.py +++ b/backend/modelscope_studio/components/antd/color_picker/__init__.py @@ -11,6 +11,7 @@ # as inputs, outputs class AntdColorPicker(ModelScopeDataLayoutComponent): """ + Ant Design: https://ant.design/components/color-picker """ Preset = AntdColorPickerPreset @@ -41,6 +42,26 @@ def __init__( props: dict | None = None, *, value_format: Literal['hex', 'rgb', 'hsb'] = 'hex', + allow_clear: bool = False, + arrow: bool | dict = True, + presets: list[dict] | None = None, + preset_items: list[dict] | None = None, + disabled: bool | None = None, + disabled_alpha: bool | None = None, + destroy_tooltip_on_hide: bool | None = None, + format: Literal['hex', 'rgb', 'hsb'] | None = 'hex', + mode: Literal['single', 'gradient'] + | list[Literal['single', 'gradient']] | None = 'single', + open: bool | None = None, + default_value: str | None = None, + default_format: Literal['hex', 'rgb', 'hsb'] | None = None, + show_text: bool | str | None = None, + placement: Literal['bottomLeft', 'bottomRight', 'topLeft', + 'topRight'] | None = 'bottomLeft', + trigger: Literal['hover', 'click'] = 'click', + panel_render: str | None = None, + size: Literal['small', 'middle', 'large'] | None = None, + root_class_name: str | None = None, as_item: str | None = None, _internal: None = None, # gradio properties @@ -60,6 +81,24 @@ def __init__( **kwargs) self.props = props self.value_format = value_format + self.allow_clear = allow_clear + self.arrow = arrow + self.presets = presets + self.preset_items = preset_items + self.disabled = disabled + self.disabled_alpha = disabled_alpha + self.destroy_tooltip_on_hide = destroy_tooltip_on_hide + self.format = format + self.mode = mode + self.open = open + self.default_value = default_value + self.default_format = default_format + self.show_text = show_text + self.placement = placement + self.trigger = trigger + self.panel_render = panel_render + self.size = size + self.root_class_name = root_class_name FRONTEND_DIR = resolve_frontend_dir("color-picker") diff --git a/backend/modelscope_studio/components/antd/date_picker/__init__.py b/backend/modelscope_studio/components/antd/date_picker/__init__.py index 17df3dad..022d5f81 100644 --- a/backend/modelscope_studio/components/antd/date_picker/__init__.py +++ b/backend/modelscope_studio/components/antd/date_picker/__init__.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any +from typing import Any, Literal from gradio.events import EventListener @@ -9,9 +9,10 @@ from .range_picker import AntdDatePickerRangePicker -# as inputs, outputs +# aas inputs, outputs class AntdDatePicker(ModelScopeDataLayoutComponent): """ + Ant Design: https://ant.design/components/date-picker """ Preset = AntdDatePickerPreset RangePicker = AntdDatePickerRangePicker @@ -49,6 +50,51 @@ def __init__( value: str | int | float | list[str | int | float] | None = None, props: dict | None = None, *, + allow_clear: bool | dict = True, + auto_focus: bool = False, + cell_render: str | None = None, + components: dict | None = None, + disabled: bool = False, + disabled_date: str | None = None, + format: str | list[str] | None = None, + order: bool = True, + preserve_invalid_on_blur: bool = False, + input_read_only: bool = False, + locale: dict | None = None, + mode: Literal['time', 'date', 'month', 'year', 'decade'] + | None = None, + need_confirm: bool | None = None, + next_icon: str | None = None, + open: bool | None = None, + panel_render: str | None = None, + picker: Literal['date', 'week', 'month', 'quarter', + 'year'] = 'date', + placement: Literal['bottomLeft', 'bottomRight', 'topLeft', + 'topRight'] = 'bottomLeft', + placeholder: str | None = None, + popup_class_name: str | None = None, + popup_style: dict | None = None, + get_popup_container: str | None = None, + min_date: str | int | float | None = None, + max_date: str | int | float | None = None, + prev_icon: str | None = None, + size: Literal['large', 'middle', 'small'] | None = None, + presets: list[dict] | None = None, + status: Literal['error', 'warning'] | None = None, + suffix_icon: str | None = None, + super_next_icon: str | None = None, + super_prev_icon: str | None = None, + variant: Literal['outlined', 'borderless', 'filled'] = 'outlined', + default_picker_value: str | int | float | None = None, + default_value: str | int | float | None = None, + disabled_time: str | None = None, + multiple: bool = False, + picker_value: str | int | float | None = None, + render_extra_footer: str | None = None, + show_now: bool | None = None, + show_time: bool | dict | None = None, + show_week: bool | None = None, + root_class_name: str | None = None, as_item: str | None = None, _internal: None = None, # gradio properties @@ -67,6 +113,48 @@ def __init__( elem_style=elem_style, **kwargs) self.props = props + self.order = order + self.preserve_invalid_on_blur = preserve_invalid_on_blur + self.components = components + self.locale = locale + self.allow_clear = allow_clear + self.auto_focus = auto_focus + self.cell_render = cell_render + self.disabled = disabled + self.disabled_date = disabled_date + self.format = format + self.input_read_only = input_read_only + self.mode = mode + self.need_confirm = need_confirm + self.next_icon = next_icon + self.open = open + self.panel_render = panel_render + self.picker = picker + self.placement = placement + self.placeholder = placeholder + self.popup_class_name = popup_class_name + self.popup_style = popup_style + self.get_popup_container = get_popup_container + self.min_date = min_date + self.max_date = max_date + self.prev_icon = prev_icon + self.size = size + self.presets = presets + self.status = status + self.suffix_icon = suffix_icon + self.super_next_icon = super_next_icon + self.super_prev_icon = super_prev_icon + self.variant = variant + self.default_picker_value = default_picker_value + self.default_value = default_value + self.disabled_time = disabled_time + self.multiple = multiple + self.picker_value = picker_value + self.render_extra_footer = render_extra_footer + self.show_now = show_now + self.show_time = show_time + self.show_week = show_week + self.root_class_name = root_class_name FRONTEND_DIR = resolve_frontend_dir("date-picker") diff --git a/backend/modelscope_studio/components/antd/date_picker/preset/__init__.py b/backend/modelscope_studio/components/antd/date_picker/preset/__init__.py index a2e6908b..1f8b2493 100644 --- a/backend/modelscope_studio/components/antd/date_picker/preset/__init__.py +++ b/backend/modelscope_studio/components/antd/date_picker/preset/__init__.py @@ -5,6 +5,7 @@ class AntdDatePickerPreset(ModelScopeLayoutComponent): """ + Ant Design: https://ant.design/components/date-picker """ EVENTS = [] diff --git a/backend/modelscope_studio/components/antd/date_picker/range_picker/__init__.py b/backend/modelscope_studio/components/antd/date_picker/range_picker/__init__.py index ec9cfe0d..41a59066 100644 --- a/backend/modelscope_studio/components/antd/date_picker/range_picker/__init__.py +++ b/backend/modelscope_studio/components/antd/date_picker/range_picker/__init__.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any +from typing import Any, Literal from gradio.events import EventListener @@ -10,6 +10,7 @@ # as inputs, outputs class AntdDatePickerRangePicker(ModelScopeDataLayoutComponent): """ + Ant Design: https://ant.design/components/date-picker """ EVENTS = [ @@ -46,6 +47,51 @@ def __init__( value: tuple[str | int | float, str | int | float] | None = None, props: dict | None = None, *, + allow_clear: bool | dict = True, + auto_focus: bool = False, + cell_render: str | None = None, + components: dict | None = None, + disabled: bool = False, + disabled_date: str | None = None, + format: str | list[str] | None = None, + order: bool = True, + preserve_invalid_on_blur: bool = False, + input_read_only: bool = False, + locale: dict | None = None, + mode: Literal['time', 'date', 'month', 'year', 'decade'] + | None = None, + need_confirm: bool | None = None, + next_icon: str | None = None, + open: bool | None = None, + panel_render: str | None = None, + picker: Literal['date', 'week', 'month', 'quarter', + 'year'] = 'date', + placement: Literal['bottomLeft', 'bottomRight', 'topLeft', + 'topRight'] = 'bottomLeft', + placeholder: str | None = None, + popup_class_name: str | None = None, + popup_style: dict | None = None, + get_popup_container: str | None = None, + min_date: str | int | float | None = None, + max_date: str | int | float | None = None, + prev_icon: str | None = None, + size: Literal['large', 'middle', 'small'] | None = None, + presets: list[dict] | None = None, + status: Literal['error', 'warning'] | None = None, + suffix_icon: str | None = None, + super_next_icon: str | None = None, + super_prev_icon: str | None = None, + variant: Literal['outlined', 'borderless', 'filled'] = 'outlined', + allow_empty: tuple[bool, bool] | None = None, + default_picker_value: str | int | float | None = None, + default_value: str | int | float | None = None, + disabled_time: str | None = None, + id: dict | None = None, + picker_value: str | int | float | None = None, + render_extra_footer: str | None = None, + show_time: bool | dict | None = None, + separator: str | None = None, + root_class_name: str | None = None, as_item: str | None = None, _internal: None = None, # gradio properties @@ -64,6 +110,48 @@ def __init__( elem_style=elem_style, **kwargs) self.props = props + self.order = order + self.preserve_invalid_on_blur = preserve_invalid_on_blur + self.components = components + self.locale = locale + self.allow_clear = allow_clear + self.auto_focus = auto_focus + self.cell_render = cell_render + self.disabled = disabled + self.disabled_date = disabled_date + self.format = format + self.input_read_only = input_read_only + self.mode = mode + self.need_confirm = need_confirm + self.next_icon = next_icon + self.open = open + self.panel_render = panel_render + self.picker = picker + self.placement = placement + self.placeholder = placeholder + self.popup_class_name = popup_class_name + self.popup_style = popup_style + self.get_popup_container = get_popup_container + self.min_date = min_date + self.max_date = max_date + self.prev_icon = prev_icon + self.size = size + self.presets = presets + self.status = status + self.suffix_icon = suffix_icon + self.super_next_icon = super_next_icon + self.super_prev_icon = super_prev_icon + self.variant = variant + self.allow_empty = allow_empty + self.default_picker_value = default_picker_value + self.default_value = default_value + self.disabled_time = disabled_time + self.id = id + self.picker_value = picker_value + self.render_extra_footer = render_extra_footer + self.show_time = show_time + self.separator = separator + self.root_class_name = root_class_name FRONTEND_DIR = resolve_frontend_dir("date-picker", 'range-picker') diff --git a/backend/modelscope_studio/components/antd/form/__init__.py b/backend/modelscope_studio/components/antd/form/__init__.py index baaf00bb..93fce2c0 100644 --- a/backend/modelscope_studio/components/antd/form/__init__.py +++ b/backend/modelscope_studio/components/antd/form/__init__.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Union +from typing import Literal, Union from gradio.data_classes import GradioRootModel from gradio.events import EventListener @@ -15,6 +15,7 @@ class AntdFormData(GradioRootModel): class AntdForm(ModelScopeDataLayoutComponent): """ + Ant Design: https://ant.design/components/form """ Item = AntdFormItem EVENTS = [ @@ -35,13 +36,33 @@ class AntdForm(ModelScopeDataLayoutComponent): data_model = AntdFormData # supported slots - SLOTS = [] + SLOTS = ["requiredMark"] def __init__( self, value: dict | None = None, props: dict | None = None, *, + colon: bool = True, + disabled: bool = False, + component: str | False | None = None, + feedback_icons: str | None = None, + initial_values: dict | None = None, + label_align: Literal['left', 'right'] = 'right', + label_col: dict | None = None, + label_wrap: bool = False, + layout: Literal['horizontal', 'vertical', 'inline'] = 'horizontal', + form_name: str | None = None, + preserve: bool = True, + required_mark: bool | Literal['optional'] | str | None = None, + scroll_to_first_error: bool | dict = False, + size: Literal['small', 'middle', 'large'] | None = None, + validate_messages: dict | None = None, + validate_trigger: str | list[str] = 'onChange', + variant: Literal['outlined', 'borderless', 'filled'] = 'outlined', + wrapper_col: dict | None = None, + clear_on_destroy: bool = False, + root_class_name: str | None = None, as_item: str | None = None, _internal: None = None, # gradio properties @@ -60,6 +81,26 @@ def __init__( elem_style=elem_style, **kwargs) self.props = props + self.colon = colon + self.disabled = disabled + self.component = component + self.feedback_icons = feedback_icons + self.initial_values = initial_values + self.label_align = label_align + self.label_col = label_col + self.label_wrap = label_wrap + self.layout = layout + self.form_name = form_name + self.preserve = preserve + self.required_mark = required_mark + self.scroll_to_first_error = scroll_to_first_error + self.size = size + self.validate_messages = validate_messages + self.validate_trigger = validate_trigger + self.variant = variant + self.wrapper_col = wrapper_col + self.clear_on_destroy = clear_on_destroy + self.root_class_name = root_class_name FRONTEND_DIR = resolve_frontend_dir("form") diff --git a/backend/modelscope_studio/components/antd/form/item/__init__.py b/backend/modelscope_studio/components/antd/form/item/__init__.py index 6a11c53d..465185ac 100644 --- a/backend/modelscope_studio/components/antd/form/item/__init__.py +++ b/backend/modelscope_studio/components/antd/form/item/__init__.py @@ -1,5 +1,7 @@ from __future__ import annotations +from typing import Literal + from .....utils.dev import ModelScopeLayoutComponent, resolve_frontend_dir from .rule import AntdFormItemRule @@ -22,6 +24,38 @@ def __init__( *, form_name: str | int | float | list[str | int | float] | None = None, + colon: bool | None = None, + dependencies: list[str | int | float | list[str | int | float]] + | None = None, + extra: str | None = None, + get_value_from_event: str | None = None, + get_value_props: str | None = None, + has_feedback: bool | dict = False, + help: str | None = None, + hidden: bool = False, + html_for: str | None = None, + initial_value: str | int | float | list | dict | None = None, + label_align: str | None = None, + label_col: dict | None = None, + message_variants: dict | None = None, + normalize: str | None = None, + no_style: bool = False, + preserve: bool = True, + required: bool = False, + rules: list[dict] | None = None, + should_update: str | None = None, + tooltip: str | dict | None = None, + trigger: str | list[str] = 'onChange', + validate_debounce: int | float | None = None, + validate_first: bool | Literal['parallel'] = False, + validate_status: Literal['error', 'success', 'warning', + 'validating'] + | None = None, + validate_trigger: str | list[str] = 'onChange', + value_prop_name: str | None = None, + wrapper_col: dict | None = None, + layout: Literal['horizontal', 'vertical'] | None = None, + root_class_name: str | None = None, as_item: str | None = None, _internal: None = None, # gradio properties @@ -41,6 +75,35 @@ def __init__( self.label = label self.form_name = form_name self.props = props + self.colon = colon + self.dependencies = dependencies + self.extra = extra + self.get_value_from_event = get_value_from_event + self.get_value_props = get_value_props + self.has_feedback = has_feedback + self.help = help + self.hidden = hidden + self.html_for = html_for + self.initial_value = initial_value + self.label_align = label_align + self.label_col = label_col + self.message_variants = message_variants + self.normalize = normalize + self.no_style = no_style + self.preserve = preserve + self.required = required + self.rules = rules + self.should_update = should_update + self.tooltip = tooltip + self.trigger = trigger + self.validate_debounce = validate_debounce + self.validate_first = validate_first + self.validate_status = validate_status + self.validate_trigger = validate_trigger + self.value_prop_name = value_prop_name + self.wrapper_col = wrapper_col + self.layout = layout + self.root_class_name = root_class_name FRONTEND_DIR = resolve_frontend_dir("form", "item") diff --git a/backend/modelscope_studio/components/antd/form/item/rule/__init__.py b/backend/modelscope_studio/components/antd/form/item/rule/__init__.py index e5486595..787eb4dc 100644 --- a/backend/modelscope_studio/components/antd/form/item/rule/__init__.py +++ b/backend/modelscope_studio/components/antd/form/item/rule/__init__.py @@ -13,6 +13,21 @@ def __init__( self, props: dict | None = None, *, + default_field: dict | str | None = None, + enum: list | None = None, + fields: dict | None = None, + len: int | None = None, + max: int | float | None = None, + message: str | None = None, + min: int | float | None = None, + pattern: str | None = None, + required: bool | None = None, + transform: str | None = None, + type: str | None = None, + validator_trigger: str | list[str] | None = None, + validator: str | None = None, + warning_only: bool | None = None, + whitespace: bool | None = None, as_item: str | None = None, _internal: None = None, # gradio properties @@ -30,6 +45,21 @@ def __init__( elem_style=elem_style, **kwargs) self.props = props + self.default_field = default_field + self.enum = enum + self.fields = fields + self.len = len + self.max = max + self.message = message + self.min = min + self.pattern = pattern + self.required = required + self.transform = transform + self.type = type + self.validator_trigger = validator_trigger + self.validator = validator + self.warning_only = warning_only + self.whitespace = whitespace FRONTEND_DIR = resolve_frontend_dir("form", ["item", "rule"]) diff --git a/backend/modelscope_studio/components/antd/input/__init__.py b/backend/modelscope_studio/components/antd/input/__init__.py index 162f4057..075413f6 100644 --- a/backend/modelscope_studio/components/antd/input/__init__.py +++ b/backend/modelscope_studio/components/antd/input/__init__.py @@ -3,6 +3,7 @@ from typing import Any from gradio.events import EventListener +from typing_extensions import Literal from ....utils.dev import ModelScopeDataLayoutComponent, resolve_frontend_dir from .otp import AntdInputOTP @@ -14,6 +15,7 @@ # as inputs, outputs class AntdInput(ModelScopeDataLayoutComponent): """ + Ant Design: https://ant.design/components/input """ Textarea = AntdInputTextarea Password = AntdInputPassword @@ -43,6 +45,24 @@ def __init__( value: str | None = None, props: dict | None = None, *, + addon_after: str | None = None, + addon_before: str | None = None, + allow_clear: bool | dict | None = None, + class_names: dict | None = None, + count: dict | None = None, + default_value: str | None = None, + disabled: bool = False, + max_length: int | None = None, + prefix: str | None = None, + show_count: bool | str = False, + size: Literal['large', 'middle', 'small'] | None = None, + status: Literal['error', 'warning'] | None = None, + styles: dict | None = None, + suffix: str | None = None, + type: str | None = 'text', + placeholder: str | None = None, + variant: Literal['outlined', 'borderless', 'filled'] = 'outlined', + root_class_name: str | None = None, as_item: str | None = None, _internal: None = None, # gradio properties @@ -61,6 +81,24 @@ def __init__( elem_style=elem_style, **kwargs) self.props = props + self.addon_after = addon_after + self.addon_before = addon_before + self.allow_clear = allow_clear + self.class_names = class_names + self.count = count + self.default_value = default_value + self.disabled = disabled + self.max_length = max_length + self.prefix = prefix + self.show_count = show_count + self.size = size + self.status = status + self.styles = styles + self.suffix = suffix + self.type = type + self.placeholder = placeholder + self.variant = variant + self.root_class_name = root_class_name FRONTEND_DIR = resolve_frontend_dir("input") diff --git a/backend/modelscope_studio/components/antd/input/otp/__init__.py b/backend/modelscope_studio/components/antd/input/otp/__init__.py index 2df53eb2..f5fb8fcc 100644 --- a/backend/modelscope_studio/components/antd/input/otp/__init__.py +++ b/backend/modelscope_studio/components/antd/input/otp/__init__.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any +from typing import Any, Literal from gradio.events import EventListener @@ -10,6 +10,7 @@ # as inputs, outputs class AntdInputOTP(ModelScopeDataLayoutComponent): """ + Ant Design: https://ant.design/components/input """ EVENTS = [ EventListener("change", @@ -25,6 +26,16 @@ def __init__( value: str | None = None, props: dict | None = None, *, + default_value: str | None = None, + disabled: bool = False, + formatter: str | None = None, + mask: str | bool | None = None, + length: int = 6, + placeholder: str = '口', + size: Literal['large', 'middle', 'small'] | None = None, + status: Literal['error', 'warning'] | None = None, + variant: Literal['outline', 'borderless', 'filled'] | None = None, + root_class_name: str | None = None, as_item: str | None = None, _internal: None = None, # gradio properties @@ -43,6 +54,16 @@ def __init__( elem_style=elem_style, **kwargs) self.props = props + self.default_value = default_value + self.disabled = disabled + self.formatter = formatter + self.mask = mask + self.length = length + self.placeholder = placeholder + self.size = size + self.status = status + self.variant = variant + self.root_class_name = root_class_name FRONTEND_DIR = resolve_frontend_dir("input", "otp") diff --git a/backend/modelscope_studio/components/antd/input/password/__init__.py b/backend/modelscope_studio/components/antd/input/password/__init__.py index ce4afbe1..7871a738 100644 --- a/backend/modelscope_studio/components/antd/input/password/__init__.py +++ b/backend/modelscope_studio/components/antd/input/password/__init__.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any +from typing import Any, Literal from gradio.events import EventListener @@ -10,6 +10,7 @@ # as inputs, outputs class AntdInputPassword(ModelScopeDataLayoutComponent): """ + Ant Design: https://ant.design/components/input """ EVENTS = [ EventListener("change", @@ -37,6 +38,26 @@ def __init__( value: str | None = None, props: dict | None = None, *, + icon_render: str | None = None, + visiable_toggle: bool | dict | None = True, + addon_after: str | None = None, + addon_before: str | None = None, + allow_clear: bool | dict | None = None, + class_names: dict | None = None, + count: dict | None = None, + default_value: str | None = None, + disabled: bool = False, + max_length: int | None = None, + prefix: str | None = None, + show_count: bool | str = False, + size: Literal['large', 'middle', 'small'] | None = None, + status: Literal['error', 'warning'] | None = None, + styles: dict | None = None, + suffix: str | None = None, + type: str | None = 'text', + placeholder: str | None = None, + variant: Literal['outlined', 'borderless', 'filled'] = 'outlined', + root_class_name: str | None = None, as_item: str | None = None, _internal: None = None, # gradio properties @@ -55,6 +76,26 @@ def __init__( elem_style=elem_style, **kwargs) self.props = props + self.icon_render = icon_render + self.visiable_toggle = visiable_toggle + self.addon_after = addon_after + self.addon_before = addon_before + self.allow_clear = allow_clear + self.class_names = class_names + self.count = count + self.default_value = default_value + self.disabled = disabled + self.max_length = max_length + self.prefix = prefix + self.show_count = show_count + self.size = size + self.status = status + self.styles = styles + self.suffix = suffix + self.type = type + self.placeholder = placeholder + self.variant = variant + self.root_class_name = root_class_name FRONTEND_DIR = resolve_frontend_dir("input", "password") diff --git a/backend/modelscope_studio/components/antd/input/search/__init__.py b/backend/modelscope_studio/components/antd/input/search/__init__.py index e7e62667..c5c5f949 100644 --- a/backend/modelscope_studio/components/antd/input/search/__init__.py +++ b/backend/modelscope_studio/components/antd/input/search/__init__.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any +from typing import Any, Literal from gradio.events import EventListener @@ -10,6 +10,7 @@ # as inputs, outputs class AntdInputSearch(ModelScopeDataLayoutComponent): """ + Ant Design: https://ant.design/components/input """ EVENTS = [ EventListener("change", @@ -37,6 +38,26 @@ def __init__( value: str | None = None, props: dict | None = None, *, + enter_button: str | bool | None = None, + loading: bool = False, + addon_after: str | None = None, + addon_before: str | None = None, + allow_clear: bool | dict | None = None, + class_names: dict | None = None, + count: dict | None = None, + default_value: str | None = None, + disabled: bool = False, + max_length: int | None = None, + prefix: str | None = None, + show_count: bool | str = False, + size: Literal['large', 'middle', 'small'] | None = None, + status: Literal['error', 'warning'] | None = None, + styles: dict | None = None, + suffix: str | None = None, + type: str | None = 'text', + placeholder: str | None = None, + variant: Literal['outlined', 'borderless', 'filled'] = 'outlined', + root_class_name: str | None = None, as_item: str | None = None, _internal: None = None, # gradio properties @@ -55,6 +76,26 @@ def __init__( elem_style=elem_style, **kwargs) self.props = props + self.enter_button = enter_button + self.loading = loading + self.addon_after = addon_after + self.addon_before = addon_before + self.allow_clear = allow_clear + self.class_names = class_names + self.count = count + self.default_value = default_value + self.disabled = disabled + self.max_length = max_length + self.prefix = prefix + self.show_count = show_count + self.size = size + self.status = status + self.styles = styles + self.suffix = suffix + self.type = type + self.placeholder = placeholder + self.variant = variant + self.root_class_name = root_class_name FRONTEND_DIR = resolve_frontend_dir("input", "search") diff --git a/backend/modelscope_studio/components/antd/input/textarea/__init__.py b/backend/modelscope_studio/components/antd/input/textarea/__init__.py index 2e754f7e..8dcb699d 100644 --- a/backend/modelscope_studio/components/antd/input/textarea/__init__.py +++ b/backend/modelscope_studio/components/antd/input/textarea/__init__.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any +from typing import Any, Literal from gradio.events import EventListener @@ -10,6 +10,7 @@ # as inputs, outputs class AntdInputTextarea(ModelScopeDataLayoutComponent): """ + Ant Design: https://ant.design/components/input """ EVENTS = [ EventListener("change", @@ -31,6 +32,21 @@ def __init__( value: str | None = None, props: dict | None = None, *, + auto_size: bool | dict | None = None, + allow_clear: bool | dict | None = None, + class_names: dict | None = None, + count: dict | None = None, + default_value: str | None = None, + disabled: bool = False, + max_length: int | None = None, + show_count: bool | str = False, + size: Literal['large', 'middle', 'small'] | None = None, + status: Literal['error', 'warning'] | None = None, + styles: dict | None = None, + type: str | None = 'text', + placeholder: str | None = None, + variant: Literal['outlined', 'borderless', 'filled'] = 'outlined', + root_class_name: str | None = None, as_item: str | None = None, _internal: None = None, # gradio properties @@ -49,6 +65,21 @@ def __init__( elem_style=elem_style, **kwargs) self.props = props + self.auto_size = auto_size + self.allow_clear = allow_clear + self.class_names = class_names + self.count = count + self.default_value = default_value + self.disabled = disabled + self.max_length = max_length + self.show_count = show_count + self.size = size + self.status = status + self.styles = styles + self.type = type + self.placeholder = placeholder + self.variant = variant + self.root_class_name = root_class_name FRONTEND_DIR = resolve_frontend_dir("input", "textarea") diff --git a/backend/modelscope_studio/components/antd/input_number/__init__.py b/backend/modelscope_studio/components/antd/input_number/__init__.py index 03939055..02ba0f23 100644 --- a/backend/modelscope_studio/components/antd/input_number/__init__.py +++ b/backend/modelscope_studio/components/antd/input_number/__init__.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any +from typing import Any, Literal from gradio.events import EventListener @@ -10,6 +10,7 @@ # as inputs, outputs class AntdInputNumber(ModelScopeDataLayoutComponent): """ + Ant Design: https://ant.design/components/input-number """ EVENTS = [ @@ -36,9 +37,34 @@ class AntdInputNumber(ModelScopeDataLayoutComponent): def __init__( self, - value: int | None = None, + value: int | float | None = None, props: dict | None = None, *, + addon_after: str | None = None, + addon_before: str | None = None, + auto_focus: bool = False, + change_on_blur: bool | None = None, + change_on_wheel: bool | None = True, + controls: bool | dict | None = None, + decimal_separator: str | None = None, + placeholder: str | None = None, + default_value: int | None = None, + disabled: bool = False, + formatter: str | None = None, + keyboard: bool = True, + max: int | float | None = None, + min: int | float | None = None, + parser: str | None = None, + precision: int | float | None = None, + prefix: str | None = None, + read_only: bool = False, + size: Literal['large', 'middle', 'small'] | None = None, + status: Literal['error', 'warning'] | None = None, + step: int | float | None = 1, + string_mode: bool = False, + suffix: str | None = None, + variant: Literal['outlined', 'borderless', 'filled'] = 'outlined', + root_class_name: str | None = None, as_item: str | None = None, _internal: None = None, # gradio properties @@ -57,6 +83,31 @@ def __init__( elem_style=elem_style, **kwargs) self.props = props + self.addon_after = addon_after + self.addon_before = addon_before + self.auto_focus = auto_focus + self.change_on_blur = change_on_blur + self.change_on_wheel = change_on_wheel + self.controls = controls + self.decimal_separator = decimal_separator + self.placeholder = placeholder + self.default_value = default_value + self.disabled = disabled + self.formatter = formatter + self.keyboard = keyboard + self.max = max + self.min = min + self.parser = parser + self.precision = precision + self.prefix = prefix + self.read_only = read_only + self.size = size + self.status = status + self.step = step + self.string_mode = string_mode + self.suffix = suffix + self.variant = variant + self.root_class_name = root_class_name FRONTEND_DIR = resolve_frontend_dir("input-number") @@ -67,13 +118,17 @@ def skip_api(self): def api_info(self) -> dict[str, Any]: return {"type": "number"} - def preprocess(self, payload: None | int) -> None | int: + def preprocess(self, payload: None | int | float) -> None | int | float: if isinstance(payload, str): + if '.' in payload: + return float(payload) return int(payload) return payload - def postprocess(self, value: None | int) -> None | int: + def postprocess(self, value: None | int | float) -> None | int | float: if isinstance(value, str): + if '.' in value: + return float(value) return int(value) return value diff --git a/backend/modelscope_studio/components/antd/mentions/__init__.py b/backend/modelscope_studio/components/antd/mentions/__init__.py index 27498d44..b54a083d 100644 --- a/backend/modelscope_studio/components/antd/mentions/__init__.py +++ b/backend/modelscope_studio/components/antd/mentions/__init__.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any +from typing import Any, Literal from gradio.events import EventListener @@ -11,6 +11,7 @@ # as inputs, outputs class AntdMentions(ModelScopeDataLayoutComponent): """ + Ant Design: https://ant.design/components/mentions """ Option = AntdMentionsOption @@ -46,6 +47,23 @@ def __init__( value: str | None = None, props: dict | None = None, *, + allow_clear: bool | dict | None = None, + auto_focus: bool = False, + auto_size: bool | dict | None = None, + default_value: str | None = None, + filter_option: bool | str | None = None, + disabled: bool | None = None, + read_only: bool | None = None, + get_popup_container: str | None = None, + not_found_content: str | None = None, + options: list[dict] | None = None, + placement: Literal['top', 'bottom'] | None = None, + prefix: str | list[str] | None = '@', + split: str | None = None, + status: Literal['error', 'warning'] | None = None, + validate_search: str | None = None, + variant: Literal['outlined', 'borderless', 'filled'] = 'outlined', + root_class_name: str | None = None, as_item: str | None = None, _internal: None = None, # gradio properties @@ -64,6 +82,23 @@ def __init__( elem_style=elem_style, **kwargs) self.props = props + self.allow_clear = allow_clear + self.auto_focus = auto_focus + self.auto_size = auto_size + self.default_value = default_value + self.filter_option = filter_option + self.disabled = disabled + self.read_only = read_only + self.get_popup_container = get_popup_container + self.not_found_content = not_found_content + self.options = options + self.placement = placement + self.prefix = prefix + self.split = split + self.status = status + self.validate_search = validate_search + self.variant = variant + self.root_class_name = root_class_name FRONTEND_DIR = resolve_frontend_dir("mentions") diff --git a/backend/modelscope_studio/components/antd/mentions/option/__init__.py b/backend/modelscope_studio/components/antd/mentions/option/__init__.py index f8f7a9ec..9f03ea25 100644 --- a/backend/modelscope_studio/components/antd/mentions/option/__init__.py +++ b/backend/modelscope_studio/components/antd/mentions/option/__init__.py @@ -7,6 +7,7 @@ class AntdMentionsOption(ModelScopeLayoutComponent): """ + Ant Design: https://ant.design/components/mentions """ EVENTS = [] diff --git a/backend/modelscope_studio/components/antd/radio/__init__.py b/backend/modelscope_studio/components/antd/radio/__init__.py index a475c1fb..c0876219 100644 --- a/backend/modelscope_studio/components/antd/radio/__init__.py +++ b/backend/modelscope_studio/components/antd/radio/__init__.py @@ -12,6 +12,7 @@ # as inputs, outputs class AntdRadio(ModelScopeDataLayoutComponent): """ + Ant Design: https://ant.design/components/radio """ Group = AntdRadioGroup Button = AntdRadioButton @@ -31,6 +32,7 @@ def __init__( auto_focus: bool | None = None, default_checked: bool | None = None, disabled: bool | None = None, + root_class_name: str | None = None, as_item: str | None = None, _internal: None = None, # gradio properties @@ -53,6 +55,7 @@ def __init__( self.auto_focus = auto_focus self.default_checked = default_checked self.disabled = disabled + self.root_class_name = root_class_name FRONTEND_DIR = resolve_frontend_dir("radio") diff --git a/backend/modelscope_studio/components/antd/radio/button/__init__.py b/backend/modelscope_studio/components/antd/radio/button/__init__.py index bd5d527e..f72d5ba5 100644 --- a/backend/modelscope_studio/components/antd/radio/button/__init__.py +++ b/backend/modelscope_studio/components/antd/radio/button/__init__.py @@ -10,6 +10,7 @@ # as inputs, outputs class AntdRadioButton(ModelScopeDataLayoutComponent): """ + Ant Design: https://ant.design/components/radio """ EVENTS = [ @@ -27,6 +28,7 @@ def __init__( auto_focus: bool | None = None, default_checked: bool | None = None, disabled: bool | None = None, + root_class_name: str | None = None, as_item: str | None = None, _internal: None = None, # gradio properties @@ -49,6 +51,7 @@ def __init__( self.auto_focus = auto_focus self.default_checked = default_checked self.disabled = disabled + self.root_class_name = root_class_name FRONTEND_DIR = resolve_frontend_dir("radio", 'button') diff --git a/backend/modelscope_studio/components/antd/radio/group/__init__.py b/backend/modelscope_studio/components/antd/radio/group/__init__.py index 37338a25..e83cf879 100644 --- a/backend/modelscope_studio/components/antd/radio/group/__init__.py +++ b/backend/modelscope_studio/components/antd/radio/group/__init__.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any +from typing import Any, Literal from gradio.events import EventListener @@ -11,6 +11,7 @@ # as inputs, outputs class AntdRadioGroup(ModelScopeDataLayoutComponent): """ + Ant Design: https://ant.design/components/radio """ Option = AntdRadioGroupOption @@ -27,6 +28,15 @@ def __init__( value: Any | None = None, props: dict | None = None, *, + button_style: Literal['outline', 'solid'] | None = 'outline', + default_value: Any | None = None, + disabled: bool | None = None, + form_name: str | None = None, + options: list[str] | list[int | float] | list[dict] | None = None, + option_type: Literal['default', 'button'] | None = 'default', + size: Literal['small', 'middle', 'large'] | None = None, + block: bool | None = None, + root_class_name: str | None = None, as_item: str | None = None, _internal: None = None, # gradio properties @@ -45,6 +55,15 @@ def __init__( elem_style=elem_style, **kwargs) self.props = props + self.button_style = button_style + self.default_value = default_value + self.disabled = disabled + self.form_name = form_name + self.options = options + self.option_type = option_type + self.size = size + self.block = block + self.root_class_name = root_class_name FRONTEND_DIR = resolve_frontend_dir("radio", "group") diff --git a/backend/modelscope_studio/components/antd/radio/group/option/__init__.py b/backend/modelscope_studio/components/antd/radio/group/option/__init__.py index d888d6c3..4dbbb21b 100644 --- a/backend/modelscope_studio/components/antd/radio/group/option/__init__.py +++ b/backend/modelscope_studio/components/antd/radio/group/option/__init__.py @@ -7,6 +7,7 @@ class AntdRadioGroupOption(ModelScopeLayoutComponent): """ + Ant Design: https://ant.design/components/radio """ EVENTS = [] diff --git a/backend/modelscope_studio/components/antd/rate/__init__.py b/backend/modelscope_studio/components/antd/rate/__init__.py index e6693916..cf5a2236 100644 --- a/backend/modelscope_studio/components/antd/rate/__init__.py +++ b/backend/modelscope_studio/components/antd/rate/__init__.py @@ -10,6 +10,7 @@ # as inputs, outputs class AntdRate(ModelScopeDataLayoutComponent): """ + Ant Design: https://ant.design/components/rate """ EVENTS = [ @@ -35,9 +36,19 @@ class AntdRate(ModelScopeDataLayoutComponent): def __init__( self, - value: int | None = None, + value: int | float | None = None, props: dict | None = None, *, + allow_clear: bool | None = None, + allow_half: bool | None = None, + auto_focus: bool | None = None, + character: str | None = None, + count: int | float | None = 5, + default_value: int | float | None = 0, + disabled: bool | None = None, + keyboard: bool | None = None, + tooltips: list[str] | None = None, + root_class_name: str | None = None, as_item: str | None = None, _internal: None = None, # gradio properties @@ -56,6 +67,16 @@ def __init__( elem_style=elem_style, **kwargs) self.props = props + self.allow_clear = allow_clear + self.allow_half = allow_half + self.auto_focus = auto_focus + self.character = character + self.count = count + self.default_value = default_value + self.disabled = disabled + self.keyboard = keyboard + self.tooltips = tooltips + self.root_class_name = root_class_name FRONTEND_DIR = resolve_frontend_dir("rate") @@ -66,10 +87,10 @@ def skip_api(self): def api_info(self) -> dict[str, Any]: return {"type": "number"} - def preprocess(self, payload: None | int) -> None | int: + def preprocess(self, payload: None | int | float) -> None | int | float: return payload - def postprocess(self, value: None | int) -> None | int: + def postprocess(self, value: None | int | float) -> None | int | float: return value diff --git a/backend/modelscope_studio/components/antd/select/__init__.py b/backend/modelscope_studio/components/antd/select/__init__.py index 3cb5c8d9..fb05bc8a 100644 --- a/backend/modelscope_studio/components/antd/select/__init__.py +++ b/backend/modelscope_studio/components/antd/select/__init__.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any +from typing import Any, Literal from gradio.events import EventListener @@ -11,6 +11,7 @@ # as inputs, outputs class AntdSelect(ModelScopeDataLayoutComponent): """ + Ant Design: https://ant.design/components/select """ Option = AntdSelectOption @@ -53,6 +54,53 @@ def __init__( value: str | int | float | list[float | int | str] | None = None, props: dict | None = None, *, + allow_clear: bool | dict | None = None, + auto_clear_search_value: bool | None = None, + auto_focus: bool | None = None, + default_active_first_option: bool | None = True, + default_open: bool | None = None, + default_value: str | int | float | list[float | int | str] + | None = None, + disabled: bool | None = False, + popup_class_name: str | None = None, + popup_match_select_width: bool | int | float | None = True, + dropdown_render: str | None = None, + dropdown_style: dict | None = None, + field_names: dict | None = None, + filter_option: bool | str | None = None, + filter_sort: bool | None = None, + get_popup_container: str | None = None, + label_in_value: bool | None = False, + list_height: int | None = None, + loading: bool | None = None, + max_count: int | None = None, + max_tag_count: int | Literal['responsive'] | None = None, + max_tag_placeholder: str | None = None, + max_tag_text_length: int | None = None, + menu_item_selected_icon: str | None = None, + mode: Literal['multiple', 'tags'] | None = None, + not_found_content: str | None = None, + open: bool | None = None, + option_filter_prop: str | None = None, + option_label_prop: str | None = None, + options: list[dict] | None = None, + option_render: str | None = None, + placeholder: str | None = None, + placement: Literal['bottomLeft', 'bottomRight', 'topLeft', + 'topRight'] | None = 'bottomLeft', + remove_icon: str | None = None, + search_value: str | None = None, + show_search: bool | None = None, + size: Literal['large', 'middle', 'small'] | None = None, + status: Literal['error', 'warning'] | None = None, + suffix_icon: str | None = None, + tag_render: str | None = None, + label_render: str | None = None, + token_separators: list[str] | None = None, + variant: Literal['outlined', 'borderless', 'filled'] + | None = 'outlined', + virtual: bool | None = True, + root_class_name: str | None = None, as_item: str | None = None, _internal: None = None, # gradio properties @@ -73,6 +121,50 @@ def __init__( elem_style=elem_style, **kwargs) self.props = props + self.allow_clear = allow_clear + self.auto_clear_search_value = auto_clear_search_value + self.auto_focus = auto_focus + self.default_active_first_option = default_active_first_option + self.default_open = default_open + self.default_value = default_value + self.disabled = disabled + self.popup_class_name = popup_class_name + self.popup_match_select_width = popup_match_select_width + self.get_popup_container = get_popup_container + self.dropdown_render = dropdown_render + self.dropdown_style = dropdown_style + self.field_names = field_names + self.filter_option = filter_option + self.filter_sort = filter_sort + self.label_in_value = label_in_value + self.list_height = list_height + self.loading = loading + self.max_count = max_count + self.max_tag_count = max_tag_count + self.max_tag_placeholder = max_tag_placeholder + self.max_tag_text_length = max_tag_text_length + self.menu_item_selected_icon = menu_item_selected_icon + self.mode = mode + self.not_found_content = not_found_content + self.open = open + self.option_filter_prop = option_filter_prop + self.option_label_prop = option_label_prop + self.options = options + self.option_render = option_render + self.placeholder = placeholder + self.placement = placement + self.remove_icon = remove_icon + self.search_value = search_value + self.show_search = show_search + self.size = size + self.status = status + self.suffix_icon = suffix_icon + self.tag_render = tag_render + self.label_render = label_render + self.token_separators = token_separators + self.variant = variant + self.virtual = virtual + self.root_class_name = root_class_name FRONTEND_DIR = resolve_frontend_dir("select") diff --git a/backend/modelscope_studio/components/antd/select/option/__init__.py b/backend/modelscope_studio/components/antd/select/option/__init__.py index b33f4e07..fcd4df74 100644 --- a/backend/modelscope_studio/components/antd/select/option/__init__.py +++ b/backend/modelscope_studio/components/antd/select/option/__init__.py @@ -7,6 +7,7 @@ class AntdSelectOption(ModelScopeLayoutComponent): """ + Ant Design: https://ant.design/components/select """ EVENTS = [] @@ -22,6 +23,7 @@ def __init__( *, title: str | None = None, disabled: bool | None = None, + key: str | int | float | None = None, as_item: str | None = None, _internal: None = None, # gradio properties @@ -43,6 +45,7 @@ def __init__( self.label = label self.disabled = disabled self.title = title + self.key = key FRONTEND_DIR = resolve_frontend_dir("select", "option") diff --git a/backend/modelscope_studio/components/antd/slider/__init__.py b/backend/modelscope_studio/components/antd/slider/__init__.py index 2a118402..986742c8 100644 --- a/backend/modelscope_studio/components/antd/slider/__init__.py +++ b/backend/modelscope_studio/components/antd/slider/__init__.py @@ -11,6 +11,7 @@ # as inputs, outputs class AntdSlider(ModelScopeDataLayoutComponent): """ + Ant Design: https://ant.design/components/slider """ Mark = AntdSliderMark @@ -24,13 +25,31 @@ class AntdSlider(ModelScopeDataLayoutComponent): ] # supported slots - SLOTS = ['marks'] + SLOTS = ['marks', 'tooltip.formatter'] def __init__( self, value: int | float | tuple[int | float, int | float] | None = None, props: dict | None = None, *, + auto_focus: bool | None = None, + class_names: dict | None = None, + default_value: int | float | tuple[int | float, int | float] + | None = None, + disabled: bool | None = None, + dots: bool | None = False, + included: bool | None = True, + keyboard: bool | None = True, + marks: dict | None = None, + max: int | float | None = 100, + min: int | float | None = 0, + range: bool | dict | None = False, + reverse: bool | None = False, + step: int | float | None = 1, + styles: dict | None = None, + tooltip: dict | None = None, + vertical: bool | None = None, + root_class_name: str | None = None, as_item: str | None = None, _internal: None = None, # gradio properties @@ -49,6 +68,23 @@ def __init__( elem_style=elem_style, **kwargs) self.props = props + self.auto_focus = auto_focus + self.class_names = class_names + self.default_value = default_value + self.disabled = disabled + self.dots = dots + self.included = included + self.keyboard = keyboard + self.marks = marks + self.max = max + self.min = min + self.range = range + self.reverse = reverse + self.step = step + self.styles = styles + self.tooltip = tooltip + self.vertical = vertical + self.root_class_name = root_class_name FRONTEND_DIR = resolve_frontend_dir("slider") diff --git a/backend/modelscope_studio/components/antd/slider/mark/__init__.py b/backend/modelscope_studio/components/antd/slider/mark/__init__.py index 106a6e49..4b503b71 100644 --- a/backend/modelscope_studio/components/antd/slider/mark/__init__.py +++ b/backend/modelscope_studio/components/antd/slider/mark/__init__.py @@ -7,6 +7,7 @@ class AntdSliderMark(ModelScopeLayoutComponent): """ + Ant Design: https://ant.design/components/slider """ EVENTS = [] diff --git a/backend/modelscope_studio/components/antd/switch/__init__.py b/backend/modelscope_studio/components/antd/switch/__init__.py index 6cbd922f..a9724955 100644 --- a/backend/modelscope_studio/components/antd/switch/__init__.py +++ b/backend/modelscope_studio/components/antd/switch/__init__.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any +from typing import Any, Literal from gradio.events import EventListener @@ -10,6 +10,7 @@ # as inputs, outputs class AntdSwitch(ModelScopeDataLayoutComponent): """ + Ant Design: https://ant.design/components/switch """ EVENTS = [ @@ -29,6 +30,15 @@ def __init__( value: bool | None = False, props: dict | None = None, *, + auto_focus: bool | None = None, + checked: bool | None = None, + checked_children: str | None = None, + default_checked: bool | None = None, + disabled: bool | None = None, + loading: bool | None = None, + size: Literal['default', 'small'] | None = None, + un_checked_children: str | None = None, + root_class_name: str | None = None, as_item: str | None = None, _internal: None = None, # gradio properties @@ -47,6 +57,15 @@ def __init__( elem_style=elem_style, **kwargs) self.props = props + self.auto_focus = auto_focus + self.checked = checked + self.checked_children = checked_children + self.default_checked = default_checked + self.disabled = disabled + self.loading = loading + self.size = size + self.un_checked_children = un_checked_children + self.root_class_name = root_class_name FRONTEND_DIR = resolve_frontend_dir("switch") diff --git a/backend/modelscope_studio/components/antd/time_picker/__init__.py b/backend/modelscope_studio/components/antd/time_picker/__init__.py index 1e48911e..cbb1d362 100644 --- a/backend/modelscope_studio/components/antd/time_picker/__init__.py +++ b/backend/modelscope_studio/components/antd/time_picker/__init__.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any +from typing import Any, Literal from gradio.events import EventListener @@ -11,6 +11,7 @@ # as inputs, outputs class AntdTimePicker(ModelScopeDataLayoutComponent): """ + Ant Design: https://ant.design/components/time-picker """ RangePicker = AntdTimePickerRangePicker @@ -44,6 +45,37 @@ def __init__( value: str | int | float | None = None, props: dict | None = None, *, + allow_clear: bool | dict | None = None, + auto_focus: bool | None = None, + cell_render: str | None = None, + change_on_scroll: bool | None = None, + default_value: str | int | float | None = None, + disabled: bool | None = None, + disabled_time: str | None = None, + format: str | None = 'HH:mm:ss', + get_popup_container: dict | None = None, + hide_disabled_options: bool | None = None, + hour_step: int | None = 1, + input_read_only: bool | None = False, + minute_step: int | None = 1, + need_confirm: bool | None = None, + open: bool | None = None, + placeholder: str | list[str] | None = None, + placement: Literal['bottomLeft', 'bottomRight', 'topLeft', + 'topRight'] + | None = 'bottomLeft', + popup_class_name: str | None = None, + popup_style: dict | None = None, + render_extra_footer: str | None = None, + second_step: int | None = 1, + show_now: bool | None = True, + size: Literal['large', 'middle', 'small'] | None = None, + status: Literal['error', 'warning'] | None = None, + suffix_icon: str | None = None, + use_12_hours: bool | None = False, + variant: Literal['outlined', 'borderless', 'filled'] + | None = 'outlined', + root_class_name: str | None = None, as_item: str | None = None, _internal: None = None, # gradio properties @@ -62,6 +94,34 @@ def __init__( elem_style=elem_style, **kwargs) self.props = props + self.allow_clear = allow_clear + self.auto_focus = auto_focus + self.cell_render = cell_render + self.change_on_scroll = change_on_scroll + self.default_value = default_value + self.disabled = disabled + self.disabled_time = disabled_time + self.format = format + self.get_popup_container = get_popup_container + self.hide_disabled_options = hide_disabled_options + self.hour_step = hour_step + self.input_read_only = input_read_only + self.minute_step = minute_step + self.need_confirm = need_confirm + self.open = open + self.placeholder = placeholder + self.placement = placement + self.popup_class_name = popup_class_name + self.popup_style = popup_style + self.render_extra_footer = render_extra_footer + self.second_step = second_step + self.show_now = show_now + self.size = size + self.status = status + self.suffix_icon = suffix_icon + self.use_12_hours = use_12_hours + self.variant = variant + self.root_class_name = root_class_name FRONTEND_DIR = resolve_frontend_dir("time-picker") diff --git a/backend/modelscope_studio/components/antd/time_picker/range_picker/__init__.py b/backend/modelscope_studio/components/antd/time_picker/range_picker/__init__.py index 38b40103..a3e4cd8c 100644 --- a/backend/modelscope_studio/components/antd/time_picker/range_picker/__init__.py +++ b/backend/modelscope_studio/components/antd/time_picker/range_picker/__init__.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any +from typing import Any, Literal from gradio.events import EventListener @@ -10,6 +10,7 @@ # as inputs, outputs class AntdTimePickerRangePicker(ModelScopeDataLayoutComponent): """ + Ant Design: https://ant.design/components/time-picker """ EVENTS = [ @@ -46,6 +47,38 @@ def __init__( value: tuple[str | int | float, str | int | float] | None = None, props: dict | None = None, *, + order: bool = True, + allow_clear: bool | dict | None = None, + auto_focus: bool | None = None, + cell_render: str | None = None, + change_on_scroll: bool | None = None, + default_value: str | int | float | None = None, + disabled: bool | None = None, + disabled_time: str | None = None, + format: str | None = 'HH:mm:ss', + get_popup_container: dict | None = None, + hide_disabled_options: bool | None = None, + hour_step: int | None = 1, + input_read_only: bool | None = False, + minute_step: int | None = 1, + need_confirm: bool | None = None, + open: bool | None = None, + placeholder: str | list[str] | None = None, + placement: Literal['bottomLeft', 'bottomRight', 'topLeft', + 'topRight'] + | None = 'bottomLeft', + popup_class_name: str | None = None, + popup_style: dict | None = None, + render_extra_footer: str | None = None, + second_step: int | None = 1, + show_now: bool | None = True, + size: Literal['large', 'middle', 'small'] | None = None, + status: Literal['error', 'warning'] | None = None, + suffix_icon: str | None = None, + use_12_hours: bool | None = False, + variant: Literal['outlined', 'borderless', 'filled'] + | None = 'outlined', + root_class_name: str | None = None, as_item: str | None = None, _internal: None = None, # gradio properties @@ -64,6 +97,35 @@ def __init__( elem_style=elem_style, **kwargs) self.props = props + self.order = order + self.allow_clear = allow_clear + self.auto_focus = auto_focus + self.cell_render = cell_render + self.change_on_scroll = change_on_scroll + self.default_value = default_value + self.disabled = disabled + self.disabled_time = disabled_time + self.format = format + self.get_popup_container = get_popup_container + self.hide_disabled_options = hide_disabled_options + self.hour_step = hour_step + self.input_read_only = input_read_only + self.minute_step = minute_step + self.need_confirm = need_confirm + self.open = open + self.placeholder = placeholder + self.placement = placement + self.popup_class_name = popup_class_name + self.popup_style = popup_style + self.render_extra_footer = render_extra_footer + self.second_step = second_step + self.show_now = show_now + self.size = size + self.status = status + self.suffix_icon = suffix_icon + self.use_12_hours = use_12_hours + self.variant = variant + self.root_class_name = root_class_name FRONTEND_DIR = resolve_frontend_dir("time-picker", 'range-picker') diff --git a/backend/modelscope_studio/components/antd/transfer/__init__.py b/backend/modelscope_studio/components/antd/transfer/__init__.py index 761f1f16..0348ac93 100644 --- a/backend/modelscope_studio/components/antd/transfer/__init__.py +++ b/backend/modelscope_studio/components/antd/transfer/__init__.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any +from typing import Any, Literal from gradio.events import EventListener @@ -10,6 +10,7 @@ # as inputs, outputs class AntdTransfer(ModelScopeDataLayoutComponent): """ + Ant Design: https://ant.design/components/transfer """ EVENTS = [ @@ -38,6 +39,26 @@ def __init__( value: list[float | int | str] | None = None, props: dict | None = None, *, + data_source: list[dict] | None = None, + disabled: bool | None = None, + selections_icon: str | None = None, + filter_option: str | None = None, + footer: str | None = None, + list_style: dict | str | None = None, + locale: dict | None = None, + one_way: bool | None = False, + operations: list[str] | None = None, + operations_style: dict | None = None, + pagination: bool | dict | None = False, + item_render: str | None = None, + select_all_labels: list[str] | None = None, + selected_keys: list[str] | list[int | float] | None = None, + show_search: bool | None = False, + show_select_all: bool | None = True, + status: Literal['error', 'warning'] | None = None, + target_keys: list[str] | list[int | float] | None = None, + titles: list[str] | None = None, + root_class_name: str | None = None, as_item: str | None = None, _internal: None = None, # gradio properties @@ -58,6 +79,26 @@ def __init__( elem_style=elem_style, **kwargs) self.props = props + self.data_source = data_source + self.disabled = disabled + self.selections_icon = selections_icon + self.filter_option = filter_option + self.footer = footer + self.list_style = list_style + self.locale = locale + self.one_way = one_way + self.operations = operations + self.operations_style = operations_style + self.pagination = pagination + self.item_render = item_render + self.select_all_labels = select_all_labels + self.selected_keys = selected_keys + self.show_search = show_search + self.show_select_all = show_select_all + self.status = status + self.target_keys = target_keys + self.titles = titles + self.root_class_name = root_class_name FRONTEND_DIR = resolve_frontend_dir("transfer") diff --git a/backend/modelscope_studio/components/antd/tree_select/__init__.py b/backend/modelscope_studio/components/antd/tree_select/__init__.py index 1d38f895..5f3c82f1 100644 --- a/backend/modelscope_studio/components/antd/tree_select/__init__.py +++ b/backend/modelscope_studio/components/antd/tree_select/__init__.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any +from typing import Any, Literal from gradio.events import EventListener @@ -11,6 +11,7 @@ # as inputs, outputs class AntdTreeSelect(ModelScopeDataLayoutComponent): """ + Ant Design: https://ant.design/components/tree-select """ TreeNode = AntdTreeSelectTreeNode @@ -33,6 +34,9 @@ class AntdTreeSelect(ModelScopeDataLayoutComponent): EventListener("dropdown_visible_change", callback=lambda block: block._internal.update( bind_dropdownVisibleChange_event=True)), + EventListener("load_data", + callback=lambda block: block._internal.update( + bind_loadData_event=True)), ] # supported slots @@ -52,6 +56,56 @@ def __init__( value: str | list[str] | None = None, props: dict | None = None, *, + allow_clear: bool | dict | None = None, + auto_clear_search_value: bool | None = True, + auto_focus: bool | None = None, + default_value: str | list[str] | None = None, + disabled: bool | None = False, + popup_class_name: str | None = None, + popup_match_select_width: bool | float | int | None = True, + dropdown_render: str | None = None, + dropdown_style: dict | None = None, + field_names: dict | None = None, + filter_tree_node: str | bool | None = None, + get_popup_container: dict | None = None, + label_in_value: bool | None = False, + list_height: int | None = 256, + loading: bool | None = None, + max_tag_count: int | None = None, + max_tag_placeholder: str | None = None, + max_tag_text_length: int | None = None, + multiple: bool | None = None, + not_found_content: str | None = None, + placeholder: str | None = None, + placement: Literal['bottomLeft', 'bottomRight', 'topLeft', + 'topRight'] | None = 'bottomLeft', + search_value: str | None = None, + show_checked_strategy: Literal['SHOW_ALL', 'SHOW_PARENT', + 'SHOW_CHILD'] | None = None, + show_search: bool | None = None, + size: Literal['large', 'middle', 'small'] | None = None, + status: Literal['error', 'warning'] | None = None, + suffix_icon: str | None = None, + switcher_icon: str | None = None, + tag_render: str | None = None, + tree_checkable: bool | None = False, + tree_check_strictly: bool | None = False, + tree_data: list[dict] | None = None, + tree_data_simple_mode: bool | dict | None = False, + tree_title_render: str | None = None, + tree_default_expand_all: bool | None = False, + tree_default_expanded_keys: list[str] | None = None, + tree_expand_action: str | bool = False, + tree_expanded_keys: list[str] | None = None, + tree_icon: bool | None = None, + tree_line: bool | dict | None = None, + tree_loaded_keys: list[str] | None = None, + tree_node_filter_prop: str | None = None, + tree_node_label_prop: str | None = None, + variant: Literal['outline', 'borderless', 'solid'] + | None = 'outline', + virtual: bool | None = True, + root_class_name: str | None = None, as_item: str | None = None, _internal: None = None, # gradio properties @@ -70,6 +124,54 @@ def __init__( elem_style=elem_style, **kwargs) self.props = props + self.allow_clear = allow_clear + self.auto_focus = auto_focus + self.auto_clear_search_value = auto_clear_search_value + self.default_value = default_value + self.disabled = disabled + self.popup_class_name = popup_class_name + self.popup_match_select_width = popup_match_select_width + self.dropdown_render = dropdown_render + self.dropdown_style = dropdown_style + self.field_names = field_names + self.filter_tree_node = filter_tree_node + self.get_popup_container = get_popup_container + self.label_in_value = label_in_value + self.list_height = list_height + self.loading = loading + self.max_tag_count = max_tag_count + self.max_tag_placeholder = max_tag_placeholder + self.max_tag_text_length = max_tag_text_length + self.multiple = multiple + self.not_found_content = not_found_content + self.placeholder = placeholder + self.placement = placement + self.search_value = search_value + self.show_checked_strategy = show_checked_strategy + self.show_search = show_search + self.size = size + self.status = status + self.suffix_icon = suffix_icon + self.switcher_icon = switcher_icon + self.tag_render = tag_render + self.tree_checkable = tree_checkable + self.tree_check_strictly = tree_check_strictly + self.tree_data = tree_data + self.tree_data_simple_mode = tree_data_simple_mode + self.tree_title_render = tree_title_render + self.tree_default_expand_all = tree_default_expand_all + self.tree_default_expanded_keys = tree_default_expanded_keys + self.tree_expand_action = tree_expand_action + self.tree_expanded_keys = tree_expanded_keys + self.tree_icon = tree_icon + self.tree_line = tree_line + self.tree_loaded_keys = tree_loaded_keys + self.tree_node_filter_prop = tree_node_filter_prop + self.tree_node_label_prop = tree_node_label_prop + self.variant = variant + self.virtual = virtual + self.root_class_name = root_class_name + self.root_class_name = root_class_name FRONTEND_DIR = resolve_frontend_dir("tree-select") diff --git a/backend/modelscope_studio/components/antd/tree_select/tree_node/__init__.py b/backend/modelscope_studio/components/antd/tree_select/tree_node/__init__.py index f40b850f..6d960dd0 100644 --- a/backend/modelscope_studio/components/antd/tree_select/tree_node/__init__.py +++ b/backend/modelscope_studio/components/antd/tree_select/tree_node/__init__.py @@ -7,6 +7,7 @@ class AntdTreeSelectTreeNode(ModelScopeLayoutComponent): """ + Ant Design: https://ant.design/components/tree-select """ EVENTS = [] @@ -20,6 +21,12 @@ def __init__( title: str | None = None, props: dict | None = None, *, + disabled: bool = False, + selectable: bool = True, + checkable: bool | None = None, + disable_checkbox: bool = False, + is_leaf: bool = False, + key: str | None = None, as_item: str | None = None, _internal: None = None, # gradio properties @@ -38,6 +45,12 @@ def __init__( **kwargs) self.value = value self.title = title + self.disabled = disabled + self.selectable = selectable + self.checkable = checkable + self.disable_checkbox = disable_checkbox + self.is_leaf = is_leaf + self.key = key self.props = props FRONTEND_DIR = resolve_frontend_dir("tree-select", "tree-node") diff --git a/backend/modelscope_studio/components/antd/upload/__init__.py b/backend/modelscope_studio/components/antd/upload/__init__.py index 5edcdc58..362428a6 100644 --- a/backend/modelscope_studio/components/antd/upload/__init__.py +++ b/backend/modelscope_studio/components/antd/upload/__init__.py @@ -2,7 +2,7 @@ import tempfile from pathlib import Path -from typing import TYPE_CHECKING, Any, Callable +from typing import TYPE_CHECKING, Any, Callable, Literal import gradio_client.utils as client_utils from gradio import processing_utils @@ -22,6 +22,7 @@ # as inputs, outputs class AntdUpload(ModelScopeDataLayoutComponent): """ + Ant Design: https://ant.design/components/upload """ Dragger = AntdUploadDragger @@ -60,6 +61,31 @@ def __init__( value: list[str] | Callable | None = None, props: dict | None = None, *, + accept: str | None = None, + action: str | None = None, + before_upload: str | None = None, + custom_request: str | None = None, + data: dict | str | None = None, + default_file_list: list[dict] | None = None, + directory: bool | None = False, + disabled: bool = False, + file_list: list[dict] | None = None, + headers: dict | None = None, + icon_render: str | None = None, + is_image_url: str | None = None, + item_render: str | None = None, + list_type: Literal['text', 'picture', 'picture-card', + 'picture-circle'] | None = None, + max_count: int | None = None, + method: str | None = None, + multiple: bool | None = False, + form_name: str | None = None, + open_file_dialog_on_click: bool | None = True, + preview_file: str | None = None, + progress: dict | None = None, + show_upload_list: bool | dict | None = True, + with_credentials: bool | None = False, + root_class_name: str | None = None, as_item: str | None = None, _internal: None = None, # gradio properties @@ -84,8 +110,31 @@ def __init__( inputs=inputs, render=render, **kwargs) - self.props = props + self.accept = accept + self.action = action + self.before_upload = before_upload + self.custom_request = custom_request + self.data = data + self.default_file_list = default_file_list + self.directory = directory + self.disabled = disabled + self.file_list = file_list + self.headers = headers + self.icon_render = icon_render + self.is_image_url = is_image_url + self.item_render = item_render + self.list_type = list_type + self.max_count = max_count + self.method = method + self.multiple = multiple + self.form_name = form_name + self.open_file_dialog_on_click = open_file_dialog_on_click + self.preview_file = preview_file + self.progress = progress + self.show_upload_list = show_upload_list + self.with_credentials = with_credentials + self.root_class_name = root_class_name FRONTEND_DIR = resolve_frontend_dir("upload") diff --git a/frontend/antd/date-picker/date-picker.tsx b/frontend/antd/date-picker/date-picker.tsx index 9b2316dc..7d4bbc3d 100644 --- a/frontend/antd/date-picker/date-picker.tsx +++ b/frontend/antd/date-picker/date-picker.tsx @@ -62,6 +62,7 @@ export const DatePicker = sveltify< ({ slots, disabledDate, + disabledTime, value, defaultValue, defaultPickerValue, @@ -83,6 +84,7 @@ export const DatePicker = sveltify< ...props }) => { const disabledDateFunction = useFunction(disabledDate); + const disabledTimeFunction = useFunction(disabledTime); const getPopupContainerFunction = useFunction(getPopupContainer); const cellRenderFunction = useFunction(cellRender); const panelRenderFunction = useFunction(panelRender); @@ -129,6 +131,7 @@ export const DatePicker = sveltify< maxDate={validMaxDate} showTime={validShowTime} disabledDate={disabledDateFunction} + disabledTime={disabledTimeFunction} getPopupContainer={getPopupContainerFunction} cellRender={ slots.cellRender diff --git a/frontend/antd/form/Index.svelte b/frontend/antd/form/Index.svelte index 169ae42b..7e5d612b 100644 --- a/frontend/antd/form/Index.svelte +++ b/frontend/antd/form/Index.svelte @@ -5,7 +5,11 @@ bindEvents, importComponent, } from '@svelte-preprocess-react/component'; - import { getSlotContext, getSlots } from '@svelte-preprocess-react/slot'; + import { + getSetSlotParamsFn, + getSlotContext, + getSlots, + } from '@svelte-preprocess-react/slot'; import type React from 'react'; import type { Gradio } from '@gradio/utils'; import cls from 'classnames'; @@ -28,18 +32,24 @@ export let elem_classes: string[] = []; export let elem_style: React.CSSProperties = {}; - const [mergedProps, update] = getSlotContext({ - gradio, - props: $updatedProps, - _internal, - visible, - elem_id, - elem_classes, - elem_style, - as_item, - value, - restProps: $$restProps, - }); + const [mergedProps, update] = getSlotContext( + { + gradio, + props: $updatedProps, + _internal, + visible, + elem_id, + elem_classes, + elem_style, + as_item, + value, + restProps: $$restProps, + }, + { + form_name: 'name', + } + ); + const setSlotParams = getSetSlotParamsFn(); const slots = getSlots(); $: update({ gradio, @@ -69,6 +79,7 @@ onValueChange={(v) => { value = v; }} + {setSlotParams} > diff --git a/frontend/antd/form/form.tsx b/frontend/antd/form/form.tsx index 3e6e24c4..bfbebce8 100644 --- a/frontend/antd/form/form.tsx +++ b/frontend/antd/form/form.tsx @@ -1,31 +1,58 @@ import { sveltify } from '@svelte-preprocess-react'; +import type { SetSlotParams } from '@svelte-preprocess-react/slot'; import { useEffect } from 'react'; import { useFunction } from '@utils/hooks/useFunction'; +import { renderParamsSlot } from '@utils/renderParamsSlot'; import { Form as AForm, type GetProps } from 'antd'; export const Form = sveltify< GetProps & { value: Record; onValueChange: (value: Record) => void; + setSlotParams: SetSlotParams; + }, + ['requiredMark'] +>( + ({ + value, + onValueChange, + requiredMark, + onValuesChange, + feedbackIcons, + setSlotParams, + slots, + ...props + }) => { + const [form] = AForm.useForm(); + const feedbackIconsFunction = useFunction(feedbackIcons); + const requiredMarkFunction = useFunction(requiredMark); + useEffect(() => { + form.setFieldsValue(value); + }, [form, value]); + return ( + { + onValueChange(values); + onValuesChange?.(changedValues, values); + }} + /> + ); } ->(({ value, onValueChange, onValuesChange, feedbackIcons, ...props }) => { - const [form] = AForm.useForm(); - const feedbackIconsFunction = useFunction(feedbackIcons); - useEffect(() => { - form.setFieldsValue(value); - }, [form, value]); - return ( - { - onValueChange(values); - onValuesChange?.(changedValues, values); - }} - /> - ); -}); +); export default Form; diff --git a/frontend/antd/form/item/rule/Index.svelte b/frontend/antd/form/item/rule/Index.svelte index 949470a2..e1289d08 100644 --- a/frontend/antd/form/item/rule/Index.svelte +++ b/frontend/antd/form/item/rule/Index.svelte @@ -51,20 +51,43 @@ restProps: $$restProps, }); const setRuleItem = getSetRuleItemFn(); - $: setRuleItem($slotKey, $mergedProps._internal.index || 0, { - props: { - ...$mergedProps.restProps, - ...$mergedProps.props, - ...bindEvents($mergedProps), - transform: createFunction( - $mergedProps.props.transform || $mergedProps.restProps.transform - ), - validator: createFunction( - $mergedProps.props.validator || $mergedProps.restProps.validator - ), - }, - slots: {}, - }); + $: { + const pattern = + $mergedProps.props.pattern || $mergedProps.restProps.pattern; + setRuleItem($slotKey, $mergedProps._internal.index || 0, { + props: { + ...$mergedProps.restProps, + ...$mergedProps.props, + ...bindEvents($mergedProps), + pattern: (() => { + if (typeof pattern === 'string' && pattern.startsWith('/')) { + const match = pattern.match(/^\/(.+)\/([gimuy]*)$/); + if (match) { + const [, regex, flags] = match; + return new RegExp(regex, flags); + } + } + return new RegExp(pattern); + })() + ? new RegExp(pattern) + : undefined, + defaultField: + createFunction( + $mergedProps.props.defaultField || + $mergedProps.restProps.defaultField + ) || + $mergedProps.props.defaultField || + $mergedProps.restProps.defaultField, + transform: createFunction( + $mergedProps.props.transform || $mergedProps.restProps.transform + ), + validator: createFunction( + $mergedProps.props.validator || $mergedProps.restProps.validator + ), + }, + slots: {}, + }); + } diff --git a/frontend/base/application/Index.svelte b/frontend/base/application/Index.svelte index d3bfe3cc..04b327f3 100644 --- a/frontend/base/application/Index.svelte +++ b/frontend/base/application/Index.svelte @@ -2,118 +2,16 @@ -{#if visible} -
- -
-{/if} - - +{#await awaitedApplication then Application} + + + +{/await} diff --git a/frontend/base/div/Index.svelte b/frontend/base/div/Index.svelte index 3a3cbbd1..2fb5b12d 100644 --- a/frontend/base/div/Index.svelte +++ b/frontend/base/div/Index.svelte @@ -105,7 +105,7 @@ {/if} diff --git a/frontend/base/each/Index.svelte b/frontend/base/each/Index.svelte index 1ddbce6e..a37efda5 100644 --- a/frontend/base/each/Index.svelte +++ b/frontend/base/each/Index.svelte @@ -44,7 +44,7 @@ {/if} diff --git a/frontend/base/filter/Index.svelte b/frontend/base/filter/Index.svelte index 7cd358e7..a928800e 100644 --- a/frontend/base/filter/Index.svelte +++ b/frontend/base/filter/Index.svelte @@ -54,7 +54,7 @@ {/if} diff --git a/frontend/base/span/Index.svelte b/frontend/base/span/Index.svelte index 4c856369..10e369cc 100644 --- a/frontend/base/span/Index.svelte +++ b/frontend/base/span/Index.svelte @@ -105,7 +105,7 @@ {/if} diff --git a/frontend/base/text/global.css b/frontend/base/text/global.css index 9d7608a9..ef5f61b6 100644 --- a/frontend/base/text/global.css +++ b/frontend/base/text/global.css @@ -1,3 +1,3 @@ -.ms-gr-antd-noop-class { +.ms-gr-noop-class { display: none; } diff --git a/frontend/legacy/Chatbot/Awaited.svelte b/frontend/legacy/Chatbot/Awaited.svelte new file mode 100644 index 00000000..7b55ea55 --- /dev/null +++ b/frontend/legacy/Chatbot/Awaited.svelte @@ -0,0 +1,227 @@ + + + + + + {#if loading_status} + + {/if} +
+ {#if show_label} + + {/if} + gradio.dispatch('change', value)} + on:select={(e) => gradio.dispatch('select', e.detail)} + on:like={(e) => gradio.dispatch('like', e.detail)} + on:share={(e) => gradio.dispatch('share', e.detail)} + on:error={(e) => gradio.dispatch('error', e.detail)} + on:custom={(e) => gradio.dispatch('custom', e.detail)} + on:flushed={(e) => gradio.dispatch('flushed', e.detail)} + avatar_images={_avatar_images} + {avatar_image_align} + {avatar_image_width} + {sanitize_html} + {enable_base64} + {preview} + {bubble_full_width} + {line_breaks} + {layout} + {proxy_url} + {root} + {custom_components} + theme={gradio.theme} + /> +
+
+ + diff --git a/frontend/legacy/Chatbot/Index.svelte b/frontend/legacy/Chatbot/Index.svelte index f8f6108a..ee35d17f 100644 --- a/frontend/legacy/Chatbot/Index.svelte +++ b/frontend/legacy/Chatbot/Index.svelte @@ -1,225 +1,14 @@ - + - - {#if loading_status} - - {/if} -
- {#if show_label} - - {/if} - gradio.dispatch('change', value)} - on:select={(e) => gradio.dispatch('select', e.detail)} - on:like={(e) => gradio.dispatch('like', e.detail)} - on:share={(e) => gradio.dispatch('share', e.detail)} - on:error={(e) => gradio.dispatch('error', e.detail)} - on:custom={(e) => gradio.dispatch('custom', e.detail)} - on:flushed={(e) => gradio.dispatch('flushed', e.detail)} - avatar_images={_avatar_images} - {avatar_image_align} - {avatar_image_width} - {sanitize_html} - {enable_base64} - {preview} - {bubble_full_width} - {line_breaks} - {layout} - {proxy_url} - {root} - {custom_components} - theme={gradio.theme} - /> -
-
- - +{#await awaitedChatbot then Chatbot} + + + +{/await} diff --git a/frontend/legacy/Flow/Awaited.svelte b/frontend/legacy/Flow/Awaited.svelte new file mode 100644 index 00000000..479294c3 --- /dev/null +++ b/frontend/legacy/Flow/Awaited.svelte @@ -0,0 +1,128 @@ + + + + + + {#if loading_status} + + {/if} + gradio.dispatch('custom', e.detail)} + on:change={(e) => { + const { value: newValue, data_changed } = e.detail; + if (sync_on_data_change) { + if (!data_changed) { + _value = newValue; + } + } else { + value = newValue; + } + gradio.dispatch('change', newValue); + if (data_changed) { + if (sync_on_data_change) { + value = newValue; + } + gradio.dispatch('data_change', newValue); + } + }} + /> + diff --git a/frontend/legacy/Flow/Index.svelte b/frontend/legacy/Flow/Index.svelte index 479294c3..74f042d2 100644 --- a/frontend/legacy/Flow/Index.svelte +++ b/frontend/legacy/Flow/Index.svelte @@ -1,128 +1,14 @@ - - {#if loading_status} - - {/if} - gradio.dispatch('custom', e.detail)} - on:change={(e) => { - const { value: newValue, data_changed } = e.detail; - if (sync_on_data_change) { - if (!data_changed) { - _value = newValue; - } - } else { - value = newValue; - } - gradio.dispatch('change', newValue); - if (data_changed) { - if (sync_on_data_change) { - value = newValue; - } - gradio.dispatch('data_change', newValue); - } - }} - /> - +{#await awaitedFlow then Flow} + + + +{/await} diff --git a/frontend/legacy/Markdown/Awaited.svelte b/frontend/legacy/Markdown/Awaited.svelte new file mode 100644 index 00000000..17f728e3 --- /dev/null +++ b/frontend/legacy/Markdown/Awaited.svelte @@ -0,0 +1,92 @@ + + + + +
+ gradio.dispatch('change')} + on:custom={(e) => gradio.dispatch('custom', e.detail)} + {enable_latex} + {latex_single_dollar_delimiter} + {latex_delimiters} + {sanitize_html} + {line_breaks} + {header_links} + /> +
+
+ + diff --git a/frontend/legacy/Markdown/Index.svelte b/frontend/legacy/Markdown/Index.svelte index 17f728e3..1e739dc8 100644 --- a/frontend/legacy/Markdown/Index.svelte +++ b/frontend/legacy/Markdown/Index.svelte @@ -1,92 +1,14 @@ - - - -
- gradio.dispatch('change')} - on:custom={(e) => gradio.dispatch('custom', e.detail)} - {enable_latex} - {latex_single_dollar_delimiter} - {latex_delimiters} - {sanitize_html} - {line_breaks} - {header_links} - /> -
-
- - +{#await awaitedMarkdown then Markdown} + + + +{/await} diff --git a/frontend/legacy/MultimodalInput/Awaited.svelte b/frontend/legacy/MultimodalInput/Awaited.svelte new file mode 100644 index 00000000..82a91f9b --- /dev/null +++ b/frontend/legacy/MultimodalInput/Awaited.svelte @@ -0,0 +1,305 @@ + + + + + + + + {#if loading_status} + + {/if} + {#if show_label && label} + {label} + {/if} +
+ { + value.text = e.detail; + gradio.dispatch('change', value); + }} + on:input={() => gradio.dispatch('input')} + on:submit={() => { + if (uploading) { + return; + } + gradio.dispatch('submit'); + }} + on:blur={() => gradio.dispatch('blur')} + on:select={(e) => gradio.dispatch('select', e.detail)} + on:focus={() => gradio.dispatch('focus')} + disabled={!interactive} + /> +
+
+ + {#each _sources as source} + {#if source === 'upload'} + + { + if (_upload_button_props.file_count === 'single') { + value.files = e.detail; + } else { + value.files = [...value.files, ...e.detail]; + } + gradio.dispatch('upload'); + gradio.dispatch('change', value); + }} + on:click + /> + + {:else if source === 'microphone'} + + { + gradio.dispatch('error', e.detail); + }} + on:change={(e) => { + if (_upload_button_props.file_count === 'single') { + value.files = [e.detail]; + } else { + value.files = [...value.files, e.detail]; + } + gradio.dispatch('upload'); + gradio.dispatch('change', value); + }} + /> + + {:else if source === 'webcam'} + + { + gradio.dispatch('error', e.detail); + }} + on:change={(e) => { + if (_upload_button_props.file_count === 'single') { + value.files = [e.detail]; + } else { + value.files = [...value.files, e.detail]; + } + gradio.dispatch('upload'); + gradio.dispatch('change', value); + }} + /> + + {/if} + {/each} + + + gradio.dispatch('submit')} + /> + +
+ {#if value.files?.length} + { + value.files = value.files.filter((_, i) => i !== e.detail); + gradio.dispatch('change', value); + }} + loading={uploading} + theme={gradio.theme} + i18n={gradio.i18n} + value={value.files} + props={_file_preview_props} + disabled={!interactive} + /> + {/if} +
+ + diff --git a/frontend/legacy/MultimodalInput/Index.svelte b/frontend/legacy/MultimodalInput/Index.svelte index 82a91f9b..42174716 100644 --- a/frontend/legacy/MultimodalInput/Index.svelte +++ b/frontend/legacy/MultimodalInput/Index.svelte @@ -1,305 +1,16 @@ - - - - {#if loading_status} - - {/if} - {#if show_label && label} - {label} - {/if} -
- { - value.text = e.detail; - gradio.dispatch('change', value); - }} - on:input={() => gradio.dispatch('input')} - on:submit={() => { - if (uploading) { - return; - } - gradio.dispatch('submit'); - }} - on:blur={() => gradio.dispatch('blur')} - on:select={(e) => gradio.dispatch('select', e.detail)} - on:focus={() => gradio.dispatch('focus')} - disabled={!interactive} - /> -
-
- - {#each _sources as source} - {#if source === 'upload'} - - { - if (_upload_button_props.file_count === 'single') { - value.files = e.detail; - } else { - value.files = [...value.files, ...e.detail]; - } - gradio.dispatch('upload'); - gradio.dispatch('change', value); - }} - on:click - /> - - {:else if source === 'microphone'} - - { - gradio.dispatch('error', e.detail); - }} - on:change={(e) => { - if (_upload_button_props.file_count === 'single') { - value.files = [e.detail]; - } else { - value.files = [...value.files, e.detail]; - } - gradio.dispatch('upload'); - gradio.dispatch('change', value); - }} - /> - - {:else if source === 'webcam'} - - { - gradio.dispatch('error', e.detail); - }} - on:change={(e) => { - if (_upload_button_props.file_count === 'single') { - value.files = [e.detail]; - } else { - value.files = [...value.files, e.detail]; - } - gradio.dispatch('upload'); - gradio.dispatch('change', value); - }} - /> - - {/if} - {/each} - - - gradio.dispatch('submit')} - /> - -
- {#if value.files?.length} - { - value.files = value.files.filter((_, i) => i !== e.detail); - gradio.dispatch('change', value); - }} - loading={uploading} - theme={gradio.theme} - i18n={gradio.i18n} - value={value.files} - props={_file_preview_props} - disabled={!interactive} - /> - {/if} -
- - +{#await awaitedMultimodalInput then MultimodalInput} + + + +{/await} diff --git a/frontend/legacy/compiled/src/Markdown/math.ts b/frontend/legacy/compiled/src/Markdown/math.ts index 1a4bb772..1a72e612 100644 --- a/frontend/legacy/compiled/src/Markdown/math.ts +++ b/frontend/legacy/compiled/src/Markdown/math.ts @@ -61,7 +61,7 @@ export const resolveDelimiters = function ( text: string, delimiters: RenderMathInElementSpecificOptionsDelimiters[] = [] ) { - if (delimiters.length === 0) { + if (!delimiters || (Array.isArray(delimiters) && delimiters.length === 0)) { return text; } let index: number; diff --git a/frontend/plugin.js b/frontend/plugin.js index a1903132..18bb9dc9 100644 --- a/frontend/plugin.js +++ b/frontend/plugin.js @@ -73,11 +73,7 @@ export const ModelScopeStudioVitePlugin = ({ external = true } = {}) => { }, renderChunk(code, chunk) { const id = chunk.fileName; - if (id.includes('@svelte-preprocess-react/inject')) { - throw new Error(id); - } if ( - !id.includes('@svelte-preprocess-react/inject') && ['.jsx', '.js', '.cjs', '.esm', '.tsx', '.ts'].some((ext) => id.endsWith(ext) ) diff --git a/frontend/svelte-preprocess-react/react-slot.tsx b/frontend/svelte-preprocess-react/react-slot.tsx index ed0fa6b8..ab7b114b 100644 --- a/frontend/svelte-preprocess-react/react-slot.tsx +++ b/frontend/svelte-preprocess-react/react-slot.tsx @@ -69,6 +69,7 @@ function cloneElementWithEvents(element: HTMLElement) { portals.push(...portalsChildren); clonedElement.appendChild(clonedChild); // clonedElement.replaceChild(clonedChild, clonedElement.children[i]); + // text } else if (child.nodeType === 3) { clonedElement.appendChild(child.cloneNode()); diff --git a/frontend/utils/upload.ts b/frontend/utils/upload.ts index 5e906072..0b1c54c0 100644 --- a/frontend/utils/upload.ts +++ b/frontend/utils/upload.ts @@ -69,20 +69,35 @@ function is_url(str: string): boolean { } } +function get_gradio_version(): string { + const el = document.querySelector('.gradio-container'); + if (!el) { + return ''; + } + const match = el.className.match(/gradio-container-(.+)/); + return match ? match[1] : ''; +} +const gradio_version = get_gradio_version(); + export function get_fetchable_url_or_file( path: string | null, server_url: string, proxy_url: string | null ): string { + const version = gradio_version[0]; + const prefix = +version >= 5 ? 'gradio_api/' : ''; + if (path == null) { - return proxy_url ? `/proxy=${proxy_url}file=` : `${server_url}/file=`; + return proxy_url + ? `/proxy=${proxy_url}${prefix}file=` + : `${server_url}${prefix}file=`; } if (is_url(path)) { return path; } return proxy_url - ? `/proxy=${proxy_url}file=${path}` - : `${server_url}/file=${path}`; + ? `/proxy=${proxy_url}${prefix}file=${path}` + : `${server_url}/${prefix}file=${path}`; } // for <= gradio 4.19.1 diff --git a/pyproject.toml b/pyproject.toml index 46bc0e39..190bfc6c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -18,7 +18,7 @@ keywords = [ "gradio-custom-component", "modelscope-studio", 'antd', - "gradio-template-Chatbot", + 'gradio-antd' ] # Add dependencies here dependencies = ["gradio>=4.0,<6.0"] From b727d598ee110898e474354a4e5b48979ded25f4 Mon Sep 17 00:00:00 2001 From: Col0ring <1561999073@qq.com> Date: Thu, 31 Oct 2024 18:41:19 +0800 Subject: [PATCH 30/51] chore: update versions --- .changeset/pre.json | 2 +- CHANGELOG.md | 6 ++++++ backend/modelscope_studio/version.py | 2 +- config/changelog/CHANGELOG.md | 6 ++++++ config/changelog/package.json | 2 +- config/lint-config/CHANGELOG.md | 6 ++++++ config/lint-config/package.json | 2 +- frontend/CHANGELOG.md | 6 ++++++ frontend/antd/CHANGELOG.md | 6 ++++++ frontend/antd/config-provider/Index.svelte | 8 +++++++- frontend/antd/package.json | 2 +- frontend/base/CHANGELOG.md | 6 ++++++ frontend/base/package.json | 2 +- frontend/legacy/Chatbot/CHANGELOG.md | 6 ++++++ frontend/legacy/Chatbot/package.json | 2 +- frontend/legacy/Flow/CHANGELOG.md | 6 ++++++ frontend/legacy/Flow/package.json | 2 +- frontend/legacy/Lifecycle/CHANGELOG.md | 6 ++++++ frontend/legacy/Lifecycle/package.json | 2 +- frontend/legacy/Markdown/CHANGELOG.md | 6 ++++++ frontend/legacy/Markdown/package.json | 2 +- frontend/legacy/MultimodalInput/CHANGELOG.md | 6 ++++++ frontend/legacy/MultimodalInput/package.json | 2 +- frontend/legacy/WaterfallGallery/CHANGELOG.md | 6 ++++++ frontend/legacy/WaterfallGallery/package.json | 2 +- frontend/legacy/compiled/CHANGELOG.md | 6 ++++++ frontend/legacy/compiled/package.json | 2 +- frontend/package.json | 2 +- package.json | 2 +- pyproject.toml | 2 +- 30 files changed, 101 insertions(+), 17 deletions(-) diff --git a/.changeset/pre.json b/.changeset/pre.json index 3ccff01a..bb3c1741 100644 --- a/.changeset/pre.json +++ b/.changeset/pre.json @@ -16,5 +16,5 @@ "@modelscope-studio/legacy-waterfall-gallery": "0.4.2", "@modelscope-studio/legacy-compiled": "0.4.2" }, - "changesets": ["lemon-laws-cross", "tough-walls-grab"] + "changesets": ["five-actors-compete", "lemon-laws-cross", "tough-walls-grab"] } diff --git a/CHANGELOG.md b/CHANGELOG.md index fbbccec6..30987114 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # modelscope_studio +## 1.0.0-beta.2 + +### Features + +- [`9e5da52`](https://github.com/modelscope/modelscope-studio/commit/9e5da52fc739c6862225192fecf95f6bfd7923ad) - complete components params in Python. Thanks [@Col0ring](https://github.com/Col0ring)! + ## 1.0.0-beta.1 ### Features diff --git a/backend/modelscope_studio/version.py b/backend/modelscope_studio/version.py index 9fe2a012..80256cd3 100644 --- a/backend/modelscope_studio/version.py +++ b/backend/modelscope_studio/version.py @@ -1 +1 @@ -__version__ = "1.0.0-beta.1" +__version__ = "1.0.0-beta.2" diff --git a/config/changelog/CHANGELOG.md b/config/changelog/CHANGELOG.md index e72e8e57..016e312d 100644 --- a/config/changelog/CHANGELOG.md +++ b/config/changelog/CHANGELOG.md @@ -1,5 +1,11 @@ # @modelscope-studio/changelog +## 1.0.0-beta.2 + +### Features + +- [`9e5da52`](https://github.com/modelscope/modelscope-studio/commit/9e5da52fc739c6862225192fecf95f6bfd7923ad) - complete components params in Python. Thanks [@Col0ring](https://github.com/Col0ring)! + ## 1.0.0-beta.1 ### Features diff --git a/config/changelog/package.json b/config/changelog/package.json index 5dd90ba9..08828747 100644 --- a/config/changelog/package.json +++ b/config/changelog/package.json @@ -1,6 +1,6 @@ { "name": "@modelscope-studio/changelog", - "version": "1.0.0-beta.1", + "version": "1.0.0-beta.2", "private": false, "description": "ModelScope Studio Changelog", "repository": "git@github.com:modelscope/modelscope-studio.git", diff --git a/config/lint-config/CHANGELOG.md b/config/lint-config/CHANGELOG.md index 613c5fae..0bd95fd4 100644 --- a/config/lint-config/CHANGELOG.md +++ b/config/lint-config/CHANGELOG.md @@ -1,5 +1,11 @@ # @modelscope-studio/lint-config +## 1.0.0-beta.2 + +### Features + +- [`9e5da52`](https://github.com/modelscope/modelscope-studio/commit/9e5da52fc739c6862225192fecf95f6bfd7923ad) - complete components params in Python. Thanks [@Col0ring](https://github.com/Col0ring)! + ## 1.0.0-beta.1 ### Features diff --git a/config/lint-config/package.json b/config/lint-config/package.json index 29e58866..f5c28270 100644 --- a/config/lint-config/package.json +++ b/config/lint-config/package.json @@ -1,6 +1,6 @@ { "name": "@modelscope-studio/lint-config", - "version": "1.0.0-beta.1", + "version": "1.0.0-beta.2", "private": false, "description": "ModelScope Studio Lint Config", "repository": "git@github.com:modelscope/modelscope-studio.git", diff --git a/frontend/CHANGELOG.md b/frontend/CHANGELOG.md index a5c582a0..a0c80424 100644 --- a/frontend/CHANGELOG.md +++ b/frontend/CHANGELOG.md @@ -1,5 +1,11 @@ # @modelscope-studio/frontend +## 1.0.0-beta.2 + +### Features + +- [`9e5da52`](https://github.com/modelscope/modelscope-studio/commit/9e5da52fc739c6862225192fecf95f6bfd7923ad) - complete components params in Python. Thanks [@Col0ring](https://github.com/Col0ring)! + ## 1.0.0-beta.1 ### Features diff --git a/frontend/antd/CHANGELOG.md b/frontend/antd/CHANGELOG.md index 690911e9..181443d3 100644 --- a/frontend/antd/CHANGELOG.md +++ b/frontend/antd/CHANGELOG.md @@ -1,5 +1,11 @@ # @modelscope-studio/antd +## 1.0.0-beta.2 + +### Features + +- [`9e5da52`](https://github.com/modelscope/modelscope-studio/commit/9e5da52fc739c6862225192fecf95f6bfd7923ad) - complete components params in Python. Thanks [@Col0ring](https://github.com/Col0ring)! + ## 1.0.0-beta.1 ### Features diff --git a/frontend/antd/config-provider/Index.svelte b/frontend/antd/config-provider/Index.svelte index 473226f3..7ddc556f 100644 --- a/frontend/antd/config-provider/Index.svelte +++ b/frontend/antd/config-provider/Index.svelte @@ -2,7 +2,11 @@ @@ -67,7 +76,7 @@ {...$mergedProps.props} {...bindEvents($mergedProps)} slots={$slots} - src={$mergedProps.props.src || $mergedProps.src} + src={$mergedProps.props.src || src} > diff --git a/frontend/antd/float-button/back-top/Index.svelte b/frontend/antd/float-button/back-top/Index.svelte index 317122da..8251b193 100644 --- a/frontend/antd/float-button/back-top/Index.svelte +++ b/frontend/antd/float-button/back-top/Index.svelte @@ -43,7 +43,7 @@ restProps: $$restProps, }, { - elem_target: 'target', + get_target: 'target', } ); const slots = getSlots(); diff --git a/frontend/antd/grid/col/Index.svelte b/frontend/antd/grid/col/Index.svelte index 6420e27a..8b4d275c 100644 --- a/frontend/antd/grid/col/Index.svelte +++ b/frontend/antd/grid/col/Index.svelte @@ -60,7 +60,7 @@ style: $mergedProps.elem_style, className: cls($mergedProps.elem_classes, 'ms-gr-antd-col'), id: $mergedProps.elem_id, - + ...$mergedProps.restProps, ...$mergedProps.props, ...bindEvents($mergedProps), }, diff --git a/frontend/antd/image/Index.svelte b/frontend/antd/image/Index.svelte index 31493a88..83b4fa9b 100644 --- a/frontend/antd/image/Index.svelte +++ b/frontend/antd/image/Index.svelte @@ -11,6 +11,7 @@ getSlots, } from '@svelte-preprocess-react/slot'; import type React from 'react'; + import type { FileData } from '@gradio/client'; import type { Gradio } from '@gradio/utils'; import cls from 'classnames'; import { writable } from 'svelte/store'; @@ -21,7 +22,7 @@ export let props: Record = {}; const updatedProps = writable(props); $: updatedProps.update((prev) => ({ ...prev, ...props })); - export let src = ''; + export let value: string | FileData = ''; export let _internal: { layout?: boolean; } = {}; @@ -42,7 +43,7 @@ elem_classes, elem_style, as_item, - src, + value, restProps: $$restProps, }); const setSlotParams = getSetSlotParamsFn(); @@ -56,9 +57,17 @@ elem_classes, elem_style, as_item, - src, + value, restProps: $$restProps, }); + let src = ''; + $: { + if (typeof $mergedProps.value === 'object' && $mergedProps.value) { + src = $mergedProps.value.url || ''; + } else { + src = $mergedProps.value; + } + } {#if $mergedProps.visible} @@ -71,7 +80,7 @@ {...$mergedProps.props} {...bindEvents($mergedProps)} slots={$slots} - src={$mergedProps.props.src || $mergedProps.src} + src={$mergedProps.props.src || src} {setSlotParams} > diff --git a/frontend/antd/tour/step/Index.svelte b/frontend/antd/tour/step/Index.svelte index 5059c61f..8f381fc9 100644 --- a/frontend/antd/tour/step/Index.svelte +++ b/frontend/antd/tour/step/Index.svelte @@ -41,7 +41,7 @@ restProps: $$restProps, }, { - elem_target: 'target', + get_target: 'target', } ); diff --git a/frontend/legacy/Chatbot/Index.svelte b/frontend/legacy/Chatbot/Index.svelte index ee35d17f..9888cea2 100644 --- a/frontend/legacy/Chatbot/Index.svelte +++ b/frontend/legacy/Chatbot/Index.svelte @@ -3,12 +3,13 @@ -{#await awaitedChatbot then Chatbot} - +{#await AwaitedChatbot then Chatbot} + {/await} diff --git a/frontend/legacy/Flow/Index.svelte b/frontend/legacy/Flow/Index.svelte index 74f042d2..ed37b002 100644 --- a/frontend/legacy/Flow/Index.svelte +++ b/frontend/legacy/Flow/Index.svelte @@ -3,12 +3,13 @@ -{#await awaitedFlow then Flow} - +{#await AwaitedFlow then Flow} + {/await} diff --git a/frontend/legacy/Markdown/Awaited.svelte b/frontend/legacy/Markdown/Awaited.svelte index 17f728e3..909826db 100644 --- a/frontend/legacy/Markdown/Awaited.svelte +++ b/frontend/legacy/Markdown/Awaited.svelte @@ -31,13 +31,13 @@ // custom export let enable_latex: boolean; export let latex_single_dollar_delimiter: boolean; - export let latex_delimiters: MarkdownProps['latex_delimiters']; + export let latex_delimiters: MarkdownProps['latex_delimiters'] = []; export let enable_base64 = false; export let preview = true; export let custom_components: CustomComponents = {}; const redirect_src_url = (src: string): string => { const replaceStr = `${root}${proxy_url ? `/proxy=${proxy_url.endsWith('/') ? proxy_url.slice(0, -1) : proxy_url}` : ''}/file=`; - return src.includes(replaceStr) + return src?.includes(replaceStr) ? src : src.replaceAll('/file=', replaceStr); }; diff --git a/frontend/legacy/Markdown/Index.svelte b/frontend/legacy/Markdown/Index.svelte index 1e739dc8..c60b47a2 100644 --- a/frontend/legacy/Markdown/Index.svelte +++ b/frontend/legacy/Markdown/Index.svelte @@ -3,12 +3,13 @@ -{#await awaitedMarkdown then Markdown} - +{#await AwaitedMarkdown then Markdown} + {/await} diff --git a/frontend/legacy/MultimodalInput/Index.svelte b/frontend/legacy/MultimodalInput/Index.svelte index 42174716..2a27f751 100644 --- a/frontend/legacy/MultimodalInput/Index.svelte +++ b/frontend/legacy/MultimodalInput/Index.svelte @@ -3,14 +3,15 @@ -{#await awaitedMultimodalInput then MultimodalInput} - +{#await AwaitedMultimodalInput then MultimodalInput} + {/await} diff --git a/frontend/svelte-preprocess-react/component.ts b/frontend/svelte-preprocess-react/component.ts index 96f04292..20e97943 100644 --- a/frontend/svelte-preprocess-react/component.ts +++ b/frontend/svelte-preprocess-react/component.ts @@ -107,10 +107,30 @@ export function bindEvents< } return arg; }); + let serializedPayload; + try { + serializedPayload = JSON.parse(JSON.stringify(payload)); + } catch { + serializedPayload = payload.map((item) => { + if (item && typeof item === 'object') { + return Object.fromEntries( + Object.entries(item).filter(([_, v]) => { + try { + JSON.stringify(v); + return true; + } catch { + return false; + } + }) + ); + } + return item; + }); + } return gradio.dispatch( event.replace(/[A-Z]/g, (letter) => '_' + letter.toLowerCase()), { - payload, + payload: serializedPayload, component: { ...component, ...omit(originalRestProps, gradioProps), From a0176a5d03298c95b6791c10ee6f1d139372e7d2 Mon Sep 17 00:00:00 2001 From: Col0ring <1561999073@qq.com> Date: Mon, 4 Nov 2024 16:29:07 +0800 Subject: [PATCH 33/51] fix: lint --- docs/helper/Docs.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/docs/helper/Docs.py b/docs/helper/Docs.py index 06905cf1..99f0a010 100644 --- a/docs/helper/Docs.py +++ b/docs/helper/Docs.py @@ -89,11 +89,12 @@ def _render_demo(self, demo_name, prefix='', suffix='', fixed=False): with antd.Row(align="stretch", wrap=False): with antd.Col(span=10): with antd.Flex(elem_style=dict(height='100%')): - gr.Markdown( - f"""{prefix + "\n" if prefix else ""}```python + prefix = prefix + "\n" if prefix else "" + suffix = "\n" + suffix if suffix else "" + gr.Markdown(f"""{prefix}```python {content} -```{"\n" + suffix if suffix else ""}""", - header_links=True) +```{suffix}""", + header_links=True) antd.Divider(type="vertical", variant="dashed", elem_style=dict(height='100%')) From f28deb1a8aeb426c50e891d9b7b1a1f3224a6cad Mon Sep 17 00:00:00 2001 From: Col0ring <1561999073@qq.com> Date: Mon, 4 Nov 2024 18:16:24 +0800 Subject: [PATCH 34/51] docs: build docs --- docs/__init__.py | 74 +++++++------------------------------- docs/helper/Docs.py | 87 +++++++++++++++++++++------------------------ docs/helper/Site.py | 82 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 135 insertions(+), 108 deletions(-) diff --git a/docs/__init__.py b/docs/__init__.py index 809e38cf..ad07a4f0 100644 --- a/docs/__init__.py +++ b/docs/__init__.py @@ -1,9 +1,8 @@ import os -import gradio as gr +from helper.Site import Site import modelscope_studio.components.antd as antd -import modelscope_studio.components.base as ms def get_docs(file_path: str): @@ -53,63 +52,14 @@ def get_docs(file_path: str): }] }] - -def render_docs(items: list): - for item in items: - if "children" in item: - render_docs(item["children"]) - elif "key" in item: - key = item["key"].replace("-", "_") - if key in docs: - with antd.Tabs.Item(key=key): - docs[key].docs.render() - - -def on_menu_select(e: gr.EventData): - selected_menu = e._data["payload"][0]["key"] - return gr.update(selected_keys=[selected_menu]), gr.update( - active_key=selected_menu) - - -with gr.Blocks(css=""" -.gradio-container { - max-width: 100% !important; - padding: 0 !important; -} -""") as demo: - with ms.Application(): - with antd.ConfigProvider(): - with antd.Layout(elem_style=dict( - height= - "calc(100vh - var(--size-4) - var(--body-text-size) * 1.5)" - )): - with antd.Layout.Sider(elem_style=dict( - height="100vh", overflow="auto", position="relative")): - with antd.Flex( - justify="center", - elem_style=dict( - position="sticky", - top=0, - padding="8px 4px", - marginBottom=8, - borderBottom="1px solid rgba(255,255,255,0.2)") - ): - antd.Image(os.path.join(os.path.dirname(__file__), - "./resources/modelscope.png"), - preview=False, - width="100%") - layout_menu = antd.Menu( - default_selected_keys=[default_active_key], - mode="inline", - theme="dark", - items=layout_menu_items) - with antd.Layout(): - with antd.Layout.Content( - elem_style=dict(padding=12, overflow="auto")): - with antd.Tabs( - default_active_key=default_active_key, - render_tab_bar="() => null") as layout_tabs: - render_docs(layout_menu_items) - layout_menu.select(fn=on_menu_select, outputs=[layout_menu, layout_tabs]) - -demo.launch() +site = Site(menus=layout_menu_items, + docs=docs, + default_active_key=default_active_key, + logo=antd.Image(os.path.join(os.path.dirname(__file__), + "./resources/modelscope.png"), + preview=False, + width="100%")) +demo = site.render() + +if __name__ == "__main__": + demo.launch() diff --git a/docs/helper/Docs.py b/docs/helper/Docs.py index 99f0a010..1086ce4b 100644 --- a/docs/helper/Docs.py +++ b/docs/helper/Docs.py @@ -9,50 +9,6 @@ from .parse_markdown import parse_markdown - -def remove_formatter(markdown_text): - pattern = r"^ *---[\s\S]*?---" - - replaced_text = re.sub(pattern, "", markdown_text) - - return replaced_text - - -def list_demos(dir_path: str, prefix=''): - result = [] - if (not os.path.isdir(dir_path)): - return result - for name in os.listdir(dir_path): - path = os.path.join(dir_path, name) - - if os.path.isfile(path): - result.append(prefix + name) - elif os.path.isdir(path): - sub_prefix = prefix + name + '/' - result.extend(list_demos(path, sub_prefix)) - - return result - - -def get_demo_modules(file_path: str): - import importlib.util - - demos = [ - demo for demo in list_demos( - os.path.join(os.path.dirname(file_path), "demos")) - if demo.endswith(".py") and not demo.startswith("__") - ] - demo_modules = {} - for demo in demos: - demo_name = demo.split(".")[0] - spec = importlib.util.spec_from_file_location( - "demo", os.path.join(os.path.dirname(file_path), "demos", demo)) - module = importlib.util.module_from_spec(spec) - spec.loader.exec_module(module) - demo_modules[demo_name] = module - return demo_modules - - is_modelscope_studio = os.getenv('MODELSCOPE_ENVIRONMENT') == 'studio' @@ -60,12 +16,12 @@ class Docs: def __init__(self, file_path: str): self.file_path = file_path - self.demo_modules = get_demo_modules(file_path) # default current directory self.markdown_files = [ filename for filename in os.listdir(os.path.dirname(file_path)) if filename.endswith(".md") ] + self.demo_modules = self._get_demo_modules() if is_modelscope_studio: self.markdown_files = list( filter( @@ -77,6 +33,45 @@ def __init__(self, file_path: str): filter(lambda x: not x.endswith("-zh_CN.md"), self.markdown_files)) + def _remove_formatter(self, markdown_text): + pattern = r"^ *---[\s\S]*?---" + replaced_text = re.sub(pattern, "", markdown_text) + return replaced_text + + def _list_demos(self, dir_path: str, prefix=''): + result = [] + if (not os.path.isdir(dir_path)): + return result + for name in os.listdir(dir_path): + path = os.path.join(dir_path, name) + + if os.path.isfile(path): + result.append(prefix + name) + elif os.path.isdir(path): + sub_prefix = prefix + name + '/' + result.extend(self._list_demos(path, sub_prefix)) + + return result + + def _get_demo_modules(self): + import importlib.util + + demos = [ + demo for demo in self._list_demos( + os.path.join(os.path.dirname(self.file_path), "demos")) + if demo.endswith(".py") and not demo.startswith("__") + ] + demo_modules = {} + for demo in demos: + demo_name = demo.split(".")[0] + spec = importlib.util.spec_from_file_location( + "demo", + os.path.join(os.path.dirname(self.file_path), "demos", demo)) + module = importlib.util.module_from_spec(spec) + spec.loader.exec_module(module) + demo_modules[demo_name] = module + return demo_modules + def _read_file(self, relative_path: str): with open(os.path.join(os.path.dirname(self.file_path), relative_path), "r") as f: @@ -106,7 +101,7 @@ def _render_demo(self, demo_name, prefix='', suffix='', fixed=False): module.demo.render() def _render_markdown(self, markdown_file): - items = parse_markdown(remove_formatter( + items = parse_markdown(self._remove_formatter( self._read_file(markdown_file)), read_file=self._read_file) for item in items: diff --git a/docs/helper/Site.py b/docs/helper/Site.py index e69de29b..2c8002bc 100644 --- a/docs/helper/Site.py +++ b/docs/helper/Site.py @@ -0,0 +1,82 @@ +import gradio as gr +from gradio.components.base import Component + +import modelscope_studio.components.antd as antd +import modelscope_studio.components.base as ms + + +class Site: + + def __init__(self, + menus: list, + docs: dict, + default_active_key: str | None = None, + logo: Component | None = None): + self.menus = menus + self.docs = docs + self.default_active_key = default_active_key + self.logo = logo + + def _render_docs(self, items: list): + for item in items: + if "children" in item: + self._render_docs(item["children"]) + elif "key" in item: + key = item["key"].replace("-", "_") + if key in self.docs: + with antd.Tabs.Item(key=key): + self.docs[key].docs.render() + + def render(self): + + def on_menu_select(e: gr.EventData): + selected_menu = e._data["payload"][0]["key"] + return gr.update(selected_keys=[selected_menu]), gr.update( + active_key=selected_menu) + + with gr.Blocks(css=""" +.gradio-container { + max-width: 100% !important; + padding: 0 !important; +} +""") as demo: + with ms.Application(): + with antd.ConfigProvider(): + with antd.Layout(elem_style=dict( + height= + "calc(100vh - var(--size-4) - var(--body-text-size) * 1.5)" + )): + with antd.Layout.Sider( + elem_style=dict(height="100vh", + overflow="auto", + position="relative")): + if self.logo: + with antd.Flex( + justify="center", + elem_style=dict( + position="sticky", + top=0, + padding="8px 4px", + marginBottom=8, + borderBottom= + "1px solid rgba(255,255,255,0.2)") + ): + self.logo.render() + + layout_menu = antd.Menu(default_selected_keys=[ + self.default_active_key + ], + mode="inline", + theme="dark", + items=self.menus) + with antd.Layout(): + with antd.Layout.Content(elem_style=dict( + padding=12, overflow="auto")): + with antd.Tabs(default_active_key=self. + default_active_key, + render_tab_bar="() => null" + ) as layout_tabs: + self._render_docs(self.menus) + layout_menu.select(fn=on_menu_select, + outputs=[layout_menu, layout_tabs]) + return demo From b0feb6cb8bd8dc0a2e8c4887b994e7e5665a2090 Mon Sep 17 00:00:00 2001 From: Col0ring <1561999073@qq.com> Date: Mon, 4 Nov 2024 20:04:29 +0800 Subject: [PATCH 35/51] docs: update layout --- docs/__init__.py | 23 +++++++--- docs/helper/Site.py | 103 ++++++++++++++++++++++++++++---------------- 2 files changed, 84 insertions(+), 42 deletions(-) diff --git a/docs/__init__.py b/docs/__init__.py index ad07a4f0..4ad4cd24 100644 --- a/docs/__init__.py +++ b/docs/__init__.py @@ -29,9 +29,9 @@ def get_docs(file_path: str): docs = get_docs(__file__) -default_active_key = "button" +default_active_tab = "antd" -layout_menu_items = [{ +antd_menu_items = [{ "label": "General", "type": @@ -43,7 +43,9 @@ def get_docs(file_path: str): "label": "FloatButton", "key": "float_button" }] -}, { +}] + +base_menu_items = [{ "label": "Layout", "type": "group", "children": [{ @@ -51,10 +53,21 @@ def get_docs(file_path: str): "key": "divider" }] }] +tabs = [{ + "label": "Base", + "key": "base", + "default_active_key": "divider", + "menus": base_menu_items +}, { + "label": "Antd", + "key": "antd", + "default_active_key": "button", + "menus": antd_menu_items +}] -site = Site(menus=layout_menu_items, +site = Site(tabs=tabs, docs=docs, - default_active_key=default_active_key, + default_active_tab=default_active_tab, logo=antd.Image(os.path.join(os.path.dirname(__file__), "./resources/modelscope.png"), preview=False, diff --git a/docs/helper/Site.py b/docs/helper/Site.py index 2c8002bc..aeafccbe 100644 --- a/docs/helper/Site.py +++ b/docs/helper/Site.py @@ -8,13 +8,16 @@ class Site: def __init__(self, - menus: list, + tabs: list, docs: dict, - default_active_key: str | None = None, + default_active_tab: str | None = None, logo: Component | None = None): - self.menus = menus + self.tabs = tabs self.docs = docs - self.default_active_key = default_active_key + self.default_active_tab = default_active_tab + self.default_active_menu = next( + (item for item in self.tabs if item["key"] == default_active_tab), + {}) self.logo = logo def _render_docs(self, items: list): @@ -29,7 +32,18 @@ def _render_docs(self, items: list): def render(self): - def on_menu_select(e: gr.EventData): + def on_tab_menu_select(e: gr.EventData): + selected_tab = e._data["payload"][0]["key"] + item = next( + (item for item in self.tabs if item["key"] == selected_tab), + {}) + + return gr.update(selected_keys=[selected_tab]), gr.update( + selected_keys=[item["default_active_key"]], + items=item["menus"]), gr.update( + active_key=item["default_active_key"]) + + def on_layout_menu_select(e: gr.EventData): selected_menu = e._data["payload"][0]["key"] return gr.update(selected_keys=[selected_menu]), gr.update( active_key=selected_menu) @@ -46,37 +60,52 @@ def on_menu_select(e: gr.EventData): height= "calc(100vh - var(--size-4) - var(--body-text-size) * 1.5)" )): - with antd.Layout.Sider( - elem_style=dict(height="100vh", - overflow="auto", - position="relative")): - if self.logo: - with antd.Flex( - justify="center", - elem_style=dict( - position="sticky", - top=0, - padding="8px 4px", - marginBottom=8, - borderBottom= - "1px solid rgba(255,255,255,0.2)") - ): - self.logo.render() + with antd.Layout.Header(elem_style=dict( + padding='0 16px')): + with antd.Flex(align='center', gap=8): + if self.logo: + with antd.Flex(justify="center", + align='center', + elem_style=dict( + width=200, + height='100%')): + self.logo.render() + tab_menu = antd.Menu( + theme="dark", + mode="horizontal", + default_selected_keys=[ + self.default_active_tab + ], + items=self.tabs, + elem_style=dict(flex=1, minWidth=0)) + with antd.Layout(elem_style=dict( + height="calc(100% - 64px)")): + with antd.Layout.Sider(elem_style=dict( + height="calc(100vh - 64px)", + overflow="auto", + position="relative")): + + layout_menu = antd.Menu( + default_selected_keys=[ + self.default_active_menu["key"] + ], + mode="inline", + theme="dark", + items=self.default_active_menu["menus"]) + with antd.Layout(): + with antd.Layout.Content(elem_style=dict( + padding=12, overflow="auto")): + with antd.Tabs(default_active_key=self. + default_active_menu["key"], + render_tab_bar="() => null" + ) as rendered_tabs: + for tab in self.tabs: + self._render_docs(tab["menus"]) - layout_menu = antd.Menu(default_selected_keys=[ - self.default_active_key - ], - mode="inline", - theme="dark", - items=self.menus) - with antd.Layout(): - with antd.Layout.Content(elem_style=dict( - padding=12, overflow="auto")): - with antd.Tabs(default_active_key=self. - default_active_key, - render_tab_bar="() => null" - ) as layout_tabs: - self._render_docs(self.menus) - layout_menu.select(fn=on_menu_select, - outputs=[layout_menu, layout_tabs]) + layout_menu.select( + fn=on_layout_menu_select, + outputs=[layout_menu, rendered_tabs]) + tab_menu.select( + fn=on_tab_menu_select, + outputs=[tab_menu, layout_menu, rendered_tabs]) return demo From 7e04c6b751fc39852005eb60764d05f9e0e105c2 Mon Sep 17 00:00:00 2001 From: Col0ring <1561999073@qq.com> Date: Tue, 5 Nov 2024 16:13:57 +0800 Subject: [PATCH 36/51] feat: update docs --- docs/__init__.py | 50 ++++++++++++------ .../base/application/README-zh_CN.md | 7 +++ docs/components/base/application/README.md | 7 +++ docs/components/base/application/app.py | 6 +++ .../base/application/demos/basic.py | 14 +++++ docs/helper/Docs.py | 1 - docs/helper/Site.py | 41 ++++++++------ docs/resources/gradio.png | Bin 0 -> 52484 bytes docs/resources/modelscope.png | Bin 2677 -> 9547 bytes 9 files changed, 94 insertions(+), 32 deletions(-) create mode 100644 docs/components/base/application/README-zh_CN.md create mode 100644 docs/components/base/application/README.md create mode 100644 docs/components/base/application/app.py create mode 100644 docs/components/base/application/demos/basic.py create mode 100644 docs/resources/gradio.png diff --git a/docs/__init__.py b/docs/__init__.py index 4ad4cd24..bf964f34 100644 --- a/docs/__init__.py +++ b/docs/__init__.py @@ -1,17 +1,20 @@ import os +from typing import Literal from helper.Site import Site import modelscope_studio.components.antd as antd +import modelscope_studio.components.base as ms -def get_docs(file_path: str): +def get_docs(file_path: str, type: Literal["antd", "base"]): import importlib.util components = [] - antd_dir = os.path.join(os.path.dirname(file_path), "components", "antd") - for dir in os.listdir(antd_dir): - abs_dir = os.path.join(antd_dir, dir) + components_dir = os.path.join(os.path.dirname(file_path), "components", + type) + for dir in os.listdir(components_dir): + abs_dir = os.path.join(components_dir, dir) if os.path.isdir(abs_dir): app_file = os.path.join(abs_dir, "app.py") if os.path.exists(app_file): @@ -20,17 +23,20 @@ def get_docs(file_path: str): docs = {} for component in components: spec = importlib.util.spec_from_file_location( - "doc", os.path.join(antd_dir, component, "app.py")) + "doc", os.path.join(components_dir, component, "app.py")) module = importlib.util.module_from_spec(spec) spec.loader.exec_module(module) docs[component] = module return docs -docs = get_docs(__file__) +base_docs = get_docs(__file__, "base") +antd_docs = get_docs(__file__, "antd") default_active_tab = "antd" +base_menu_items = [{"label": "Application", "key": "application"}] + antd_menu_items = [{ "label": "General", @@ -43,9 +49,7 @@ def get_docs(file_path: str): "label": "FloatButton", "key": "float_button" }] -}] - -base_menu_items = [{ +}, { "label": "Layout", "type": "group", "children": [{ @@ -53,10 +57,11 @@ def get_docs(file_path: str): "key": "divider" }] }] + tabs = [{ "label": "Base", "key": "base", - "default_active_key": "divider", + "default_active_key": "application", "menus": base_menu_items }, { "label": "Antd", @@ -65,13 +70,28 @@ def get_docs(file_path: str): "menus": antd_menu_items }] + +def logo(): + with antd.Flex(align='center', gap=8): + antd.Image(os.path.join(os.path.dirname(__file__), + "./resources/modelscope.png"), + preview=False, + height=32) + ms.Span('✖️') + antd.Image(os.path.join(os.path.dirname(__file__), + "./resources/gradio.png"), + preview=False, + height=64) + + site = Site(tabs=tabs, - docs=docs, + docs={ + **antd_docs, + **base_docs + }, default_active_tab=default_active_tab, - logo=antd.Image(os.path.join(os.path.dirname(__file__), - "./resources/modelscope.png"), - preview=False, - width="100%")) + logo=logo) + demo = site.render() if __name__ == "__main__": diff --git a/docs/components/base/application/README-zh_CN.md b/docs/components/base/application/README-zh_CN.md new file mode 100644 index 00000000..9e161d44 --- /dev/null +++ b/docs/components/base/application/README-zh_CN.md @@ -0,0 +1,7 @@ +# Button + +See [Ant Design](https://ant.design/components/button/) for more information. + +## Examples + + diff --git a/docs/components/base/application/README.md b/docs/components/base/application/README.md new file mode 100644 index 00000000..e8ce3499 --- /dev/null +++ b/docs/components/base/application/README.md @@ -0,0 +1,7 @@ +# Application + +A Provider for all components of modelscope_studio. + +## Examples + + diff --git a/docs/components/base/application/app.py b/docs/components/base/application/app.py new file mode 100644 index 00000000..0018b7c1 --- /dev/null +++ b/docs/components/base/application/app.py @@ -0,0 +1,6 @@ +from helper.Docs import Docs + +docs = Docs(__file__) + +if __name__ == "__main__": + docs.render().queue().launch() diff --git a/docs/components/base/application/demos/basic.py b/docs/components/base/application/demos/basic.py new file mode 100644 index 00000000..14d84d05 --- /dev/null +++ b/docs/components/base/application/demos/basic.py @@ -0,0 +1,14 @@ +import gradio as gr + +import modelscope_studio.components.antd as antd +import modelscope_studio.components.base as ms + +with gr.Blocks() as demo: + with ms.Application(): + with antd.ConfigProvider(): + antd.Button("Primary Button", type="primary") + antd.Divider() + antd.Input() + +if __name__ == "__main__": + demo.queue().launch() diff --git a/docs/helper/Docs.py b/docs/helper/Docs.py index 1086ce4b..5fb6244c 100644 --- a/docs/helper/Docs.py +++ b/docs/helper/Docs.py @@ -4,7 +4,6 @@ import gradio as gr import modelscope_studio.components.antd as antd -import modelscope_studio.components.base as ms import modelscope_studio.components.legacy as mgr from .parse_markdown import parse_markdown diff --git a/docs/helper/Site.py b/docs/helper/Site.py index aeafccbe..dd3fd423 100644 --- a/docs/helper/Site.py +++ b/docs/helper/Site.py @@ -1,3 +1,5 @@ +from typing import Callable + import gradio as gr from gradio.components.base import Component @@ -11,11 +13,11 @@ def __init__(self, tabs: list, docs: dict, default_active_tab: str | None = None, - logo: Component | None = None): + logo: Component | Callable | None = None): self.tabs = tabs self.docs = docs self.default_active_tab = default_active_tab - self.default_active_menu = next( + self.default_active_tab_item = next( (item for item in self.tabs if item["key"] == default_active_tab), {}) self.logo = logo @@ -61,17 +63,20 @@ def on_layout_menu_select(e: gr.EventData): "calc(100vh - var(--size-4) - var(--body-text-size) * 1.5)" )): with antd.Layout.Header(elem_style=dict( - padding='0 16px')): + padding='0 16px', + backgroundColor= + "var(--ms-gr-ant-color-bg-container)")): with antd.Flex(align='center', gap=8): if self.logo: - with antd.Flex(justify="center", - align='center', - elem_style=dict( - width=200, - height='100%')): - self.logo.render() + with antd.Flex( + justify="center", + align='center', + elem_style=dict(height='100%')): + if callable(self.logo): + self.logo() + else: + self.logo.render() tab_menu = antd.Menu( - theme="dark", mode="horizontal", default_selected_keys=[ self.default_active_tab @@ -83,20 +88,24 @@ def on_layout_menu_select(e: gr.EventData): with antd.Layout.Sider(elem_style=dict( height="calc(100vh - 64px)", overflow="auto", - position="relative")): + position="relative", + backgroundColor= + "var(--ms-gr-ant-color-bg-container)")): layout_menu = antd.Menu( default_selected_keys=[ - self.default_active_menu["key"] + self.default_active_tab_item[ + "default_active_key"] ], mode="inline", - theme="dark", - items=self.default_active_menu["menus"]) + items=self.default_active_tab_item["menus"] + ) with antd.Layout(): with antd.Layout.Content(elem_style=dict( - padding=12, overflow="auto")): + padding='12px 28px', overflow="auto")): with antd.Tabs(default_active_key=self. - default_active_menu["key"], + default_active_tab_item[ + "default_active_key"], render_tab_bar="() => null" ) as rendered_tabs: for tab in self.tabs: diff --git a/docs/resources/gradio.png b/docs/resources/gradio.png new file mode 100644 index 0000000000000000000000000000000000000000..8b0eedf4af724e36d28caa72882695cb0a5e5e06 GIT binary patch literal 52484 zcmeFZ_g9nK(>@%Ef+8RyqEdpQf*^v@L?GAz0R>Td3yOerkq&{xic&?SNQ+97E?ruJ zpdejpq$Ys$l28)@NxnOHp7&39fBKxWT&{Ii_TIB+&&)M*&D`hB9er)?{m1u1AP{by zn>X%4ARGh;gcZxV7yK7bGM z-f`!v{gM0V+n0}$te;PY3CNlm@?F)uy6=>HX>5A{Zn4geb>Bn04faM7pRnvsfgn_mVhE|X7eq=oh`847BOF;*A5 zJQe=?@$A_GA18EEO^;skOh%r#KVG=s8J85=m(D>dXbP(ApXQt>ii(!)pd+-8{o5Wj z;#{B;?N+N=@VZ(xw_L^_odgNV=ybu2My~aSEfT%@{@eOjq*)Bc(N&(&$~j7O<{;WB z2D9v#jrOZ))Lq=(PTljL)~biHN_)K?)NB=Lm-}+!9nYXVe(F;4G1eNg>iEI`e)Msn zuS@?W=P0iHIk`Bg4uY{RK2FbV8uHF4W&8J&E6pycNusz*s@$4xLnjbK6!?u`h6DRb zUb@B(f2z!X8(r3SkzDFlQx$=J-yStA@bz(kXqaHXz~AckK}ErDW{+?k5#ILK26qsf zd4-Ql8})aj4pk89R9Pu8)pEgk7$q8}loR~YJE>7G4nu#kL80HZzYWg`3_|7veoAMB zK;GUH>eBCuAOySh4SX?4*h{i2$ApB;dzpYuQRc;nt+bafT9r^Nk!4Q z_jwEAR#*>-r!^2DyjYP%fkJkG!+L;*^r%2T&_b6s1n+G1-eM!XN8OOx$W+xm2V2`g zdT?gz+DTVv7=f0{*{i&yML3V*0OzN3j^*)H{NgY`%oIzhdW`+qitwY zc05w=rDdhw=jKt{$`?+mdFYEh7OV&R{%vWJ?;UCS&^<$IpIyTQQ^vSh5GF3e{;i9!|cnf{y-^ekC-Nv9|a>iW<`Qm*>H!T^%Gt&L7McrwgyzOuFPdbHiFh z)?nla6e;XOd_#b0a!mS< zYP_+dt(_|)TAH;TvE`g(fuOW;%WEN87RSo(Tav&cW^Z?~I zx-Nj7saK8itXU~7>?AuM$F)PWabU+Edo@2+=jbsNl0GaxtOSedkj`dBm;%gW&J9~Th`?lFWLbfUjn#UmoeN87V^w71$!Fun# zEC|!&UenyPffF<0LfXi`@4>mzU(oS3eV1fLMVY=MSl{&!cuy_X+8jxlv@B3){>2VV zb?`Kbc(*NqXfA2oweZ!eq^ig)sLC7!GnD}~brF&A?eZl;a6UV!RHQz-Kj9S~9e+F% zoG2H>PO^52raxJFE)r-{v7V6EoNNw4g*t!8on)CgJx#m{9}#*^R~_pab6EV22tr11ZxQXHp|Y< zU`g7yt*g6lYn#PMsL{q>$vg!2t8?iztfDrGM}2|)JjVt>o$p0xTO7_C(}0c#F^yuG zo1pQnz&%1NIIvd_f)|(OJMQ()bB-!| zaN+lm0`?I~hmMzTKJ}TajPPX&D+>1eZJJ99N=VB#K`hJ4^#VhCUOtdfHyk`>a2p%u zymSya&)VU7N6Q|^jVteWLxdbRJ1Mp3PGLt!V6LAF1YIx!uW%i-aS#IU{1F7yd%eg? zfEtJDXVifqs3t-6o0FN~Bj>|hS7fAK;L=DgE|?83Pxt^V^Y_)`9=ElX#^MVj{v8)| z7UiKhkZIy&U43R=vXmKE&KN-OgVQ|c)Wt9Z+@qrP+QHJ86cq0-|AI`FQ|FqOU8I0t2=OWUBMBl^Ht0 znr#+D4bTkQX~$72`8GJ}D=^s9ydtx$SmBq%C8+~_Y4!u)GzFK`c%DaThl0mUGsi<; z5?TFOb}q3}IPs-Jhsu2$wR^8JO%tMakp(d`FKuklW(mQY=F{uU!3}#)Evx}k-?w2r zm&S>=Tsj1xpPgT0vHO|ae| z7`P=O!@5%QV3CFzIBf9+1e4y?L0%QC#}&#gKp?jJ`|(LfZjeIEnSl#PxXwXZat=|j z9{r{e*M1Ewp>VSxw9(00Jf`({XXd>QKT3UAL zr@AcK98~sKWclm;vaahktE&KDt#c3om~e*{37%VKPUv66V5M|&0t~9zh|UsBDgdXg zOR*pvlT^R1qf+*guosyZOLoXG)5uiVN;KbBeuMvs-!?L44ygf@=L&Q9uJp0|Hj zDdV+!NH6a$4Krm_3*#IkKfPWAa`e zH2h|1njB3Cmdq9HXIj;oXuUFQtk7YN-^pjeZce9=>9l{}Krmh#aZ<>b8UfPOY3*bm zAcEF*E%pSp7JGqKCQ=(62V4O!#Egay%9u}=oyS}lAci7Zy?o;4-pNXVXHT`M-vgj~ zyU3u+srE#$dT#mkU2`E@Kr{|DIBpbBC3@DZ!CfG;zTinsB#p6Y=@2@N86DK!dhc95 zb#3!Mj9{APCddsn=l#mT?>|}sl!yl`MD_Jan)W<%j%NSr0O8*Rs$n)~<)XuUs3taX4EjEZ4*`g>C zM!XIJp(M4|aTmqGy(u~S2->;bwQAHxcuX207nsl$i9_{%Edf$cuRDkivd?$`^$CJH zw7~*-3om#-tw2|o@z~L(cJu58IpCR55KRBKT5CT=Sv`reflPJlm&|uM1#rhua=>Q5 ze&$i*{hz0`lk9=Hn0QGVi$BDkXds)^uMzPIh9H@5UYTL#XW0l;9{HRNJle!s4lRUHsI(Ft6) z?4wmGw3!ej;%_s+&BL?o<^Xgi)Pc*?eX)d7wyCrR-q&>PLmz9p+75LE3S|0jW3lXy_j zEPMt94N!*{f4wp;BX82qX?som_z(CQRF^SC<1WasqrZK9t3IGx2k=avEkLbb`rtJg21#vy@A#h5<=g~TMq>> z!M1uIVeQkM{2hDY*lmY#HAH2RnKd)N{Jl{EBSyydu6}{u*o91(EXz)?p|quARJRt@RB20=r;IO0Wr!wU`LwT zMlqVMRb5u_7%OSMvAlK-Ot65Q#g;Ua+0TdJ z1sXX705H2ZAygwZ%4Y+Zv~4bsJG-c?tPfsT7-^@VHWfUk*UwS%77J1wp9~hrY#=XB z=5ydw{CQ&_vVt^v9|08aT|c@KvLB?}c#XWlPD%h9AFfB{T3e73ju-@qW`~#{~ec$|xSxfw~ZMD1;ug zGC9?I!F_&48%bH~DPX0HfMQ_7HvcueA0Pm6p1J$OeT1Ov6%W)+im(c-TYj4f&Za+C zwy*Y0rwZd7ki~(Ph}w%GG}Vbos0i#5#Yp=g1U2$nfG8VAq5+CxH}@T8qi`EuuNj^R z{tVLCZXx;)P6F~Ys_Qlc?WTk7k4`qt+|9(}02rg*9I7W*T>JEu$SfRE`b+HFHlN%8 zZd5Rh%}QTjBo(>=&H*gG4#A#wUScEa7$mo>^i@l$X9k3C%S`MU*{adDbP

sbPDiNJA?I{Y$Sk{q+s9lQ{VW3f>Y{Up=<1TTU5 z%HyV*ND7l>FrGVTY6#4u={kfL#E-imJ?Hl8w38@H@7LT)BtHN~vWh@q#q){A{~i z*(j9$%ztk3*(|Rt3iyG>UDIYg=x*}#Rfrvw%vanM40OZiB{I7-|3B*TCN^h5s!?7%3P^>yk{*%?+!2P-9oog{t&kr!~A>dL;tWu3|5V9KoOyE%SE zUMpU8jN*jI_3o zex>S8ZVDFE`*p%Hy8#neKotM|Ek2N!u8#7Ify*AM_lP6}k7j}7HF7mHh{QHWpl*X~ zbNhji*RFB+DrzLadcP^fMLt30RN8(oj*b>shT}UzTN661tGzX}xgm-AyZ5#$qn{O# z8=49B9~lSImaj4CN!P$7BU~WZg>j$Vqo3(xewswGTlO zSGNx{4O&iUUb^QQXA90i2f!(@3=%@i>g`oaN6fp{N~(*qQp)+NJp^_!)pTubZk}Rx zv6aOa4lkxQ_+P0F*e`mK@%c`njOPs&RL&`;VLKQtWUT*f3M-RhU2A&(3Pc8dPJ+jA zo75=z)@*~d38Ob+^uS#eb{{W9!U~+MlX(5p#&` z{IV(2y6X?T79|8lZU!*6-gAI02YCp{9yMz;`B<`^9c^4zM+213yRh$utBaJqfuvaW z!n7`v?mU0~JgC`uscJB6=~~WaDBlhA!SR(=Q1^ELd{Ld8)Li-PJ?fF`YrMnYjiyts zGa0=6{XgexCdlX>cz#_)k2L17t&&Ldf9P%!B9UCQ64c6dL?nn*Uw=g#A$uCdku}W3oLXiMMNZQu z^Y*2!B?rB04fm~e%&C188kF?F$J1AK2o9V62mq=`d>_QxwKr^CmG3RmZU_XW9oIdi z$Z01~oV2gArz55#H$wpz8=MY-DFcc;IGg@*{aU(kU~lcyRu6mLxKb42ltNL+nfa(M z1@h~J4f+?$&*x>{OJ!@z(W3eKumsXeJ@kd-=1h;rq&F)n!CuF)%Q7p68a0kSU6g}H zU!K=lO0Ws*$3_MO%+GSkDE}DQ(Ftn5)qnm#=6vePN)uqE#4pTrzNR7v^-h?7T=+iw zLnQDop_f-$HYXB>qGLS~rrN=Bg>L95J9^v~qV}kABrZ;?&)Se7U^kuAo$$G{)g~>B zgMjR={OW79`5;E{!tCim+Ko?U+jWbY4HQ4}Z9w4;B?{u2YQF`qi$0W^9xF=62yXmb zJpF@n4u4nD6dtq3Xf0Z8`Zq-(D|iJ35lsY7C`hI1g`=Ue`V8XYaiu2(`Bwa1>otaC z{gv7x?a@)w!VsClxP?h7!W|(Th9we95>lvp_wv5!a*FC@g@|O(yXL-fHsNju0rx{k zGTrZ9FCrbW=~jEGBT_8Hjh$qYZD{w|3Tde-Jeh+1X9LT<&yriO))hUjWgKE>`O+2+q57E6cgKaNXo@`0pm({*KP}>5nm9o6p^`uVC|?!Yiwqn^$10 z?a0n+0jei|=adxSO9iGqqt}|c1@A8tOSV67lq4J&Ry8_cBo$l7d$68Om4-P}5fUvZ z#eiWXYW=+xw+GH+O}ET9PX-)mg_`8IsnR$AvOwC zwMTuUGMnFW;azBVsv1YS24d~`93ZlY|I)&og&tY)*BTd|QR*VRXV06PT^!=S9Q127 zJS9}KU{h(OIBe(Z(^kWKt8a6SRGi{5QF=4yt*hb6us$It>)*kO$nlB!Tf*sEQ$M*T zh})HkvGA_$+O}tfK7$q0gPq4!st}!L0jU<}hD_RXEj@3@QtDcrna;@AUDb+}&5y~0 z3OzyJR_7D5p}?pUeX~OZHj4eXriz%Pqit=o7DS_E`@@5!snI|U`Fm4Tyhw?_^2)^( zbaU`bzy)kbA3ynQ=KM^F%%V1Ni7dAtV*5@h^?jPqC$dcGAtoI!kMdB!f9eXVbSk(V z9S#YRyhgtLUsk_F^_knFrQ%(yGB~hWynpeT)3WTypn#>6c3r^d`-qAT+PR|rRZ2mR z25z&-S_bs|tT|ijT^*%&M7Oy$1^Wg&LlsR7!bYWS5R-BfY#r`0WAfxs0AlmvRkbhl z%&);@lcgrzYJ(eMjNI<}H@UsF2z^8xv@hMNClQn3~XB;qxv?`aZ4awNufiT{3P}rV_{y+y=9ML7u*4CUD{)|a)20(uB({{^BRfwl| zn-8w-4Q?R6PRB}v;o)k@xW$l?w9 z$SwF$w3{*X>Nwoev+3cohgL;R=ji6@y^VKc1|_K>(<0>$#~KU0SSdPufZ(b5d4KA3 zdH2HKqKG!ne(OQKk~Q7u+DA1Za?Uj{qQ+7pCjphd{X&2Npyhmc~!W%sN2)jap`*kI3`9UV{<1y2DUty-zLQuBkLV z68Pxip7PT{kAlrSTVmMQ*tWeXT--uKmS=pw+He!NUJmh3kg?+QlvgU{z0RGwNRt2C zA!d9;=J;wNc#=~?qY@p_VIeEnN%#}d5D}Th)w?bZPgs*^-B`e1$vzsFS&9lYAeiD`<$JJ z)_nGgI$4AFz`0@kESp#*;Q8W8#Dm9_eGmYMKN(f#>P{N zhLWZ>sT*Az2X8E8j3w|8}9UVzsdYd=X@#Bvw@V~WpcTI8jG&Vgh z`XG^;*}6OuRxW#t%+!|SOo{b_#lO8Omc80-B?;a`WNV0=dk0ddoU;`B$CwFTfN6K2 z6*%2qSenbxQmN^ong!lvC+2;g|F0^^^j;%z&kbs+EMgiOTCX5Vk#!uR^M)0h7_nhY z<-I1iF*eHPk&jdJ7L)FkF5m75r{q*9cuf#%+Aa|1hx$ObCN$1rOVQ7Ej>R*r>&?)E zT4~TPNJ|~j6HE{WZBLk6gwJ%LI_QCi8ScM=8!YVF9w>;j=5`{}H-66YGUECi-#3bzVGvzr0-Lfc+#!wEdCD!NBii~m%;iS-c)7iV z>$_xSZ4P3Wu@O}(bz&D|CuOLgKFAdvWDq=yXy+&T$N!pGqT`34b&&mAUZtd6b z8(CXJsdAm%yLa!Vr{C|<-D;Yz7TJ?%0$fn7<{R?7Y|hUMw0O^cW4!VR3~RP+oi2!q z>I+l;D4t;>`h6q18U~C?Ljf37a2$+ytGoO`zQztR3%!p?k4E<;^jP!#K!4Owi;#Tp zB0I2PeY?axlK!GArJv)q$^in`RBPVG5%iUxCNz1`bx;iV4-5q4wVG}pG2!(~_?=4C zjl;fP^DpuQO=wns(esuYqOy{89l;K`fq`!Z=DlZCV_2?OdTHh=nPdn(;Rne;v-3C5 zdX$;FlAe+?P<={Wg_Ue<2pVL7nu?)50d#jl4@0hX&e)u>3@U{saeRHy+fQe#{SNPS z?n)|HNhyVd=p(D1hJtYW5pgVCTm(r2Sgp9K^|N6w@7@}u+6+o9Sd zW`qK56y>Ws)Z1{~wa6!dI)FScqr9SdiCTQgSwdTF)w@Q{fyWK{(Uoeab~}H6=KRl6 z#l7jo9ii0cRs->WjK}|8`sp>I?p*t635~ zi(jtWiNCcuc4Fg|)m~zqNIkNW9uG>gln*A1n}Ig$BnIFWjhS;6O{P7$13oRvYkwIm z8%%FYr?c@&_Z>Eo7o9C=ZNtXJIM9B7d@(3ZT~I zo#l!4(8#aNP#U&VsRTjvtR z=q14CyZ`;!B`fh^aU}C#drFpfilIJ66l27Yvdmfh{vxSF3J3e6e2MZy|0o{x)0>N} z+-}`=PbM{7Su!t0rWOSMsQN|I(?&y&npI$H!gx6Gf-;xorbm35GXF*LN2(@KL>Art~fT`iT=T>46x*tN|zc2d>; z-8lsJUL2UkNpZ)S7S^4?9K+8)eUbDz@avsI%;(r9e`OAmq4KeNv4y-o4VNM~(j+bk zsvDXPPy56dZGnc-Jh^b!+wPwe$diqjEdQQ3*E00mv~VZN98#ZAPCvV(3|esXG_J8V zXg&T2qi#eJ{a08;Rvoi7X5>~YQTHvtJN!OZ zkjvV=%Dbhi_I%d5ZC~y{L5s6Q^k$w+AXB*yQa8DLPX{t;5!S`?GKI zF&)IUdBplH>s*PQbE7y=ZtyoVV0L$Q-_z=oS&+GK-u=nU>^xD~aYoJ{r2a=^VceW1 z-xbD3$LHjoy(F?G1ykbVFocstUm=8qT$W=cCukEw4EvVAkXGvUTZ^@~m$R)awXF|7 z-D#VoKxZH66DUPGL6zH$@T6tXZD8{2szCacZfHnUj6O~can{&0fbub`km0$ssBgV- z7Db$s`K~cyjvF1SOid6y7Bn>r6{ zlNbAnsq$EyO%iP@YV})J3rmL{m`A~f{-@czxwb~QUh~l@?+}VjKwT)0vy_z0Uy41l znA)7G2G~$_OUqJvR;t30?eIAHlmyXgSiE$RZ}WxgWJNHHWYL|&PSS-Cw>1`w(*qxCUjF8|T|1)&tnX}a#n!8`-;z+rUo~gcD?CFix-ZF&j`ECF7PWAYhQSDB z>Aw-mW{HM%@sp3SpwW~Ef#nrMCIcmQ%-u;((eE?OP5FEOdD1&66YOtgIscp4(E%)o zXp^eV7=58|TISC#Kli}gq+l+W=Bl;C*x{u!5z7DCuYMs6!+cB&-;t(lko!)~nf#+w1Ld5*_*@_AlFasMK)1q&eec}vh<{nG?5!7V$Aa)EoKRk@8A?=^-Ab`L#b>S!|ns zJ7;ulFFo5F*~9FBfTrqGm6fse&zxh(3NU#($ecXY#}{Iy!Kmm_biM|HHo0=KyScXr zxb-fr1IvRddkjF+c>Hf#=hJK|j(4%`Rcxs)y<=69pWK9jU?diLI=K%>qkTgH-IZVQ zR +D@9s@5h4_V;=!}0wFtK<6`w?bhKPzIHx6_cgqC6P+dO<3f9-Pai_-B;L!-QZ-JYiz=5zaB?U0S~~k6yn1a@w@_qhaTw+E+`9 zFppg1()VXcx4^g{dbTMpg_Sa9NwblZRjKxZzA~kwz51Th2zth^Zw z&p_ndJ}nh_`!Pdp^|P1{^fZqB&WDVnf0Lkgmwcx5L2qR&$S@-v`Z_^SFg05=|G`EY zbJnO@`ol97qkOujaPR#|-F<{ONQj_arWx&dOuS*!i{pMY3X`$Ce}rW{aXfDB8z5Z{ z=FXf)F+%##$Hyl_j@d^yy>!xiv79^v@XqJ=eu~I^>YU(4Y0n#Kqk-6K#tmvO=O`9H z%5Bj9QqER=g-wf+Z}`9xbhx#DL-f=aoj$+)T!OOm(>h>uqY4t@8OqzDVlK@wlPj?x zTzNY70G{IrRH)fAy*PvEvDom1hdD||n;$%1`FI8)Yh4)P#w3Q9FGB)Pqb!bHoorP& zcL(4-5}A+C&_R<|h7low_i4{&*FwJge%}_~Ln1D{W)59}x{s(DK8YBg2rKhoCrW6J z0vUCHjE#oU5s$MrSZ-AXmV|OTU*t_$Bay%m<2|1M<%pJ9HYCQYKel{uppah~TkC&S zxDkF-TNeVXSXG($<@DObr4hGtUs{MG_qI@~yr|kx{kGn;4S~7QXX{pbNS5LV_;&pr zs*E@Sp;T~tEm<&2cAykYAy&(Rq07=9Dz)Y=y7Y3V%LH}3Z<<VMjLfu+WtHzAt-xV*2-!rY{9E|_0UY7W94VYwfP=j z(Nb!Ut}DJMHHrzoAn{l7o9m%X9362L{&M!fIHOyH^NP*$tWRa8?7yIVpJyacMZB3V zV5X;Ai+pM3+Q1C$bD2^_3V!Gh3_)B5@l9(j6-@Zts{7h3eT|a7kdW!J8<9(?Hy4u1 z61qE#&L*@)hllP|20Z?F=8n*IRIW&T_7-^C57i|uqVIUmsbBFJNOO-RUGtNw@ffSM zk3M_Y1%A=@Jtz}oQTXy}Ie~93e9Zcm#Mc0w)Mpp-cxsoAhz=nV1wR6aVqEP*9~+!Z z;V4j$xV9N*xWODwYc+-73#lLGL}}v^XBsv&!Xb2yU8N01<2^*>j2|p)`32d2JR{5# z=Zq9bnU0#Q5CWW(Bik@{H?(F7w40q@v@9Dn2}q?nj)33>1YvO6r2`DxGVL|efK9xf zzc&&I`FqyL;)A|G+RRB5Qtlb~(}0tcMtUIPm8>op>AUUc#x({iB9A=zUenO7o7knr z=rzqqFt1OYn)?AlpbUz*3bbe0GaTW3Mg+rq4yJ@L9GkfRH0cIy=WUOt!IApBGQ;s)<{WB`2<)^0|Rz=f(SDDI_O7domAl6VAMyVtEHznkIfFK9yI>77e zI>gsn zlKc%)5&tV+ulJ{8dg1vY7w11S2l+uE-|wMD!p5x#1|6|OHV`g#6QJd| zJZJUq-{a$B%F{m8MvmyB*~}D$>cRW1TPtcJ?Yy%+KmVH)5=RhC3xj_L;O*T+>bj^Q zh-h*oh4Pa!Hl0hM6n96%7o|=jt`%l8PK#&>uB5zm(84iZi3aY zNW4pX%#nuQo>;3^pJterCJ1Rk@4}S=LvWgpcAjpw-Qv6Hwq131DXbgr7u@Gps?n%6 z80j`^H})-PQ1eS4&&>$F|I!i>jA^uAXJ!BBQc%yo1|s~SEMG#~RCDA4swq5%tF?a% zOtIrThR_kUUq&%Sw75xClXB^iPY~~%>9BQW*0sU|1ZaeX0LvU*YlQ*^*VFbe$3Kvd zz|5gCcaeVcF~!LP6Sz#;Nd)|u4|ccvo}YxjiF7+G-x=EPxJfYa=Y2SC@ZxA&GwrQC zd5MqrTUzqVh!sCt^$hFhiFfv_l(a(lL*AWX-jnIgkC^lN&0dS81%{=97NDz%Z+hO{ zFRpsqNcr~Q4CqW%BsV*JvI_or3zPA_T=LD@${YVnw9ZR{(xpo`hU@G&;*ap06(Rr4 z*%@Mf(E(fk^*vj#RWB;)H~lo<5W_O1sC-GlQ5@&KCOw>)iDX5U*2ZxWa-~w%;w~eyEca##O}f2z?Qb%ksKl#=bUK=gRyXp!*7)E{Y6z zT%{_2a_4$;vNrN7<^0nCQ-C&;&4M1nx)tbS*|!rit_ulf%PNn7c`=wZ%T53@>57ye z0$+X1Ii(pYz=Vo!dWm~uFFEHyFhQ)8**!?p1ru52;$+@DakXOs2fO9JZ!Zn9O@0XZ z6<-h)9Vfszh;9^7U;j7-=wy&0mY8r4dbWvP)^Ap8ZTOha{bM%%qx$xlCZTg|eroz<5}zHy9KKW4JK|vy8!C_LZXS?{jB1 zw6G)dZcCNR*(VMQM?Zb~G+4`YmXjAp*!W`g4{!_@En@YJsrCj^NTh9^&Mm{3nr8_5r0VJHoYQ`?rD z6ap7z@hk<`$J1{0XCfTAy|4BCxGXi#-fQy5-SF?ruDWe|e;6@-oXsXYm)bl?vfRg) z*5hyja=l+$pAC8a;m(MA+!datE-O@|_e_Im#IQzbozB#8|ID$-Sgt3zIP7`o%SrKU z3z)ma{Z$-r)F14o~X8J||zT=SWyQexQw`elw`#)iP6^Qan$~pE4uM@(XEJ5Qu`9q6JOZP}H9VYxCf)gMviVTBd#c zWrcv}2-}PI3Mbq3S4CLxmMrLS35)ZePhQ77oYvKR6_ly5Q|HXh3ae+uST`^tj&WHw zEabUTxabc&HtjpazT+^dUZnl??)UA)Zq>Q7#%HqZl_}MQuU6h( z=qYYe$xqH~g_7AbC9)fzAcrMl{it`@58Qrvt-|Z1 zG}3pe(A}~Yf!35~SOm47d zeb>Rcu~#VGER=yp!I6vi?tA&uh=2F^N9Mo>w(C60zj#lWp7d|{6M3Yq>MqXb8TgLJ z7Jjdj{$Vt;Cs+MS$e55S`Zc-j?eXs@Dph34&jS0Q*uvO;&~ffDH80UW8&yi1nC!$J zu#P1vD=4gUtsUK->S#=i?lq40D(IBhM~i-)cB4L-1?ZRjOdwj?O;p4D(P>Gi*8)u> zwxUq7S*Wgz^X*NSw-$6hv>78E>_W=U8F7R^f`f|^_EF+;eLBE5W2J|yN4|E(SId{~ zn(bHCty3)b&*kDmprgE$Ed-?^dso!@W%blN5|G?cr2itK*(iLt)G z7WCL}=Nz`~N7ot7ZLlIsnf+zkzgp-HkI?q#$l3P~6Yow$D3~Du+P6pH{aJd47sF1%;GQ zx1l;K=ei|++KQ<)q?u;~d70GCu(H6NfvHyZ2!4sN!FoA3kXtrG;a`qx)?=Tdc;AED zo94!}-a|R2 zB=>CBiH8su9EvV}uQwY#=?`L^1=zA9N`H~xd^n@e zGo!b9#3%6=*>CD^kOM#Sxw4th^{Z*J2Z~8EPlA5fHb%xQ^Pf)QBYi(eI#inY;r9pK zHkBXsMYC|l357(QkmB-~E#XXC>}4Jf)-hGSCEp_-Yo0S0zG!b*S7;#kryjo1hlIto^x>_**fwz!ft(zNNrpEx;cDn@7vWW~s= zy&sAkfpx44T+`W5UFXJ!Kv9<>bE>V|_Z9rJjOAdlI07< zxgEGBO^6{LJo$I>BNw+>W%MhpYd`p(PmxD${adyibJI8YOdPjcx?WGUYu0l>nfmp6 zt&t>&7mufHf1PfmO^CxJa0Hdf++%&;#J>%*K-f8BzDIJdzT={JQ%@qCeQ2il`u z(d6VlRiU4%tTv7;c+r`h<{Lk77i!kTz0gDE?1Y@FV3(h>j zV`~!f+T1ts`SBrI0NrmNB-xbdw3`JLQdvvYyM!@j#%~^>pQB_`Q3kMddVTwI;nio` zxhJw4O>UfwS-O5w=$2G@P`*A6=E@2?7O>Jar>3CqVJuW z7nQ`i}4Ih0YYARju&Xn@Fxl8 z?BydFoFM3l5lnOWKX?+x6WkQXPX{;Fe^FOBH#tpyj%<5dTw|T>0=>wh!MnnCKTFDa zcd} z?!fB-qJI2~ul#Rn99>3W4{}=U?io)WxVW)i^OwM77Hk>BbFH33gdK6^iTwyI{=UlU z=<6vSF)m-lfzIH)k!z}NZm{yQKn}8BVu3gClkEDHKX_VZPnqJx_8y=2|iK> zU*59V#Zy-bJqp)eWx1#*e#C@m+i6~JuS*$#o(Opb`~@iP&OlhruYBJ3BOWm<%B9oi zvhSYSvG5xD`c3135etMBqE47&fgUai9&^lVRtob=-LqrFjySC-n7j6mj7hMb0 zc{i@Hg{w*)fR64;BFv6}47@QGip6JkeC2&_t49p=obi9Y9PTIg83gky8IQ%E)xKcG zsQ1jp_Wf-?S}raBo45wEyv@HgCWUmUkRo_!)ra1ycf3&_RD5O_Nq~+aBJhDD2Bc z&fiY*s)q(`2AYzS3g_%@3-iYi?GC7I(Y+Ohexn6&9W!R^2m)}7iD2S`=c|8nb8kFT zpDj26^=v7(aQKy&y_eT_)AkMvr1e%{ehJ^-(}KXhbOtGMD*7S`PDY<-x~jp+mz7j3 z3%bI{R$_!2kl?+vsh^q1>>JFzkneIP)-bpyyzgcVk*NDnDTc^NdB;gv#~aHS@QTTn z;c@g#wP~xyOG8*iTdye<>%z)$R(g8a7uuc@@p?x-6)G~x#x=)Bs@~6wpOZ4j1eEMZG}GsR8_x`^X(i2!T7|38%(LEyPTEzez@IS zE#ahCm57ui3d0QkOc~onltjO z-jSwmngcC+X#*9s2q!zfH#Kx7NyV)U}kdv?B*WM)<*E`;wJk^v}l|>HiYJU$SR_dVr445fbG>Z5XMNT)?Z|pMj zN*ikX>r)znIsVq-i^I(_H|A}o4w7V7`yhjndTn*)YY8j3zqr}Pn}JiOQx`VyW_giw zj|(~kNSmN6MHRR@G^cJWSm9;1PaRS{=F=5E?DxSqa7;b9zdtqrASMv?BEGbp?`uog zCm(@_b+yg-_xDI{&z3134)5KJ||5NVR zK8h9M+{us#C)&6?IgfsFR6LOE;so`>sUV6|6()#@s~%iepC`m1g6 zasm8@%Lv~AJJpb5R7DGrhB)<%TL=NyeJH@%F)Gwr8?8VL-vfuLlC*n~SmoV4bz?|5Gs z?mnn>ni_2EUpRs-ZKcPOT}rdJJ>bNtcjmo6gDZ|EcT0OOGu&n&!V&+XyX{2?uv8v` z)3x29n2mSNeOxn)yE!waU2yizCayj@xc-b#zO*v~g#88m`rJdsiU803{Q~a1yu!<8uU4Q4Yjw>%`B1v*j7q_?NpLq#+S%N8!0A+na*hQrR5?SZBD@ zO1IQrto}B0Eo@0;_NeIzq}i*=&sbA5rc;E~4qwUsZAQwa8NoUm*=P}qLhI3Xk~=Sj zLDzH++9Yq-I$@op&)ZTPb7#c&dgqvo`A^h75M(u~&JLdA3Y}6)pfUrwv}lmhf{>1x*BMIY?kG3TnAfKkKjaUUl zAuh%EqKqOU#=j){D6rG7L#QCuRh7?!Xll#E=gsWuzTLH#8DYJ_PwdcuQczMbv}Q)n znNjbBQ}5kbzObXx=_UCo)jenK<&H-*&efsSSA-rU+6Slio@gNUR5u?LrmpZQ=ne5P zYor98ywV~Eh4n&VwFYVJ_n=SwXrjh#D`7GYqt><;;L7Z^QY$a6nq2WAB=JmhixD&u zXcYqt&#^S26P#gY?0pAy=9N^JVts}2ZG~A_Fx$eY_xcBVdwcZ)cJyH zS?`?fAXfw51h>gTRLQB}7bt0DTC_5g|wkY}(9-RDUAp}9m(V}&2V(<*AVhie37(yBdrE^PL zYaQfgV5JATQUpKdZd*s)k_o5@woXmk-l!7T%j2vbRqxWtL%}qHF+XF- zQ6lOm^#EVhk$HE?KBEs>IadZep)MiyLL_)h>9>#rb{H|LGXYBerpwY+KrVn#Lyj#( zfMMj(XJ(ZaM8WiaMI(lw&xJM7B$t5^t!C||eO~cMe{Wf&Zi>V`$$)*UHfk3ai?k$J z*L*KGxy6xRmmuurLFG0SJ~bg%Jktm7I^G%F#a?{w89l}MRB_FpInS`yBly_ZvcfR+ zN>Pccp2ghXnQUDKuevn*Z=Y0Sq~PGViTWt0%37k9>MSrlo~bG9{Mg{+=;b>-MpGJC zfg+lLrNmX{RY< zdjVtm3XHXFP5naP!7*s~>8yqshjWzuSRSP#sTXUOJ-o5qAJ|y4h8bVO8 zJ^Sw?lEpW>d1El@f5?aiik{1o}@sB-*}mT)PX?$wJ^3-xRDb~WE5 z$h~rH(~2aD{V9`j(Ap1>4k;<4f54Sfov%;pb*mKw?=7t)55g3ZP9&uaCdPQ?Ws`@; zs}R>3B%V7BW~r0l#G&AG!_qTxOkIVrJt%LANSg!Gr6`0H{>hW|iOay|#R%($sRxwx zYJzMQErI6G#Z;QDF;1`C%1Q5Am>aDsqd)jp1h3y~DEq`Uh+}3UHgpY0+FNjUn~3{{*eWSPB-E0LI1S%wXrq%%gWDRkV|tF~33tIsEmhS);%zYe-x<4l znElhOct@|GWcbNsd&q6ycZc2~hllVj*oEF_tLRUqj{c(*5EA9+$LTF7g#8))I&T2o zm(=HD3tF9N$}fd%u;HVKe)R3v5|PoMC!|kOtBlatV`EqxJL6Tt)5u(+`Q*9#%Oi3I z5CIt=gxq*ni%jQoPSajkuk{k~PL}o4UQx3nMCbY1`OksmYUK(c#nqM8vs)?NS1ppz zo{C^u@KF2Wta8@!BR(fZLL5XG1!Stq+OK8dzVO{R->~iFo}Vu}Sw!7e&xJ@wT)X0; zRygon*PH#>hi69x*YUT+RbHtwLSgG1)7njZYkk(uR3uBqm4%AWz8@j@K{*yp3M7)# z{sSRIG5w8-^zG(H+@o0uSt)}`SK4a#ukOSTPA&_Fbn$`G8--K{-EOWuDOHGnra-PZ zW!u8z?&j4>m04dtHfpc)l!vKZNBQiYh+mthB21P|#uL{NVy`XlF}aJ5_zkRn0Lg3h zq+geJbUgH(4Y?D@YuHdgAGNxL&<4BM89c-}@6yrM>YVwJ2E&gmn^^Le+p6^yRLHEAm( z9Aj?W(+uk+X|(YRREI@e#WWOQ@6p`b7G>Dm+mMj!K`|IHvWs zvRBi{<@74>>r@#MK8fD-?4Y{tPHq<()}T$QHa9)J+ieFn86&Lg2EreVI8K@=#$sm= zP{?Z1H?3EG!D^Y~Ms3b?iTBp-*`I5SY9GGeJW|7b)6dG=kmQVu*&=B9h{v=Gmps z*-8@YMJM66t=PDx!9K!Fp+JReyc3hwPaIQU;pU0wlHUSm(LtNyR=%cxL>qb_RDo4o z(}4^3Z@SDA5AZGcnmZrqsN0 zecC)$FHaz;ZBS%lh!dgjOi~5bEoD22g<86(l??hyv=SY9OGw5w>EkHnUQ#J(S zgZhOGU)SH-_8RDSQ*-ja&9xQ~rvKN*0#sl8=|tmft=n<}+_*lm%`m8Ivf- zqDDc{O;3Y(t1)lFunIZ9uG93kvHT5(N;5eE%$e6s_S^|BlnoD|#P01_Cp*6HodVl0 zV{>+&bz9ewg7hcic46Ho}FrJ;`VGnC}a`&lHUQHB=I~$!a5e`FAC%&nfap z+L=nxyvx-H-710PXa6eMV+|h0@t>ISPu@)pL50RY4Cc%uI7@;Ys&G7k@Yx1@cEBThXp&r13o! z*=jCqC&x7Z{%cu&3V<|tQ63JT^ee{rF4RULM=YDGJM!?O-JL@L6KSt#OC$Mzrc$xA z>O^m@!iOyl4GnMprQcpDEJv1lC;E5~#>-jk3rX5v_yI`w`?YY%(LlWz(3Xg4fs?=nahA7!?KL`#wIfyCxC zUJfYsG6a6|*j-g{DbGE3Hi&Bs(t3C^jw(Wq|OGSf#eFTBe;^s^dzVtpqEsyXy;KcgOP;#6Rn~zdLf)D`y`DT=RfF>CaFk zS6W+eF!2J!S`mWC5N(kA3Hp2nC`?Axp94X(u!#xAUw}3tp#f#^M{A2VF5J@|7uQ#K z`0Ue-j%rtKYf6dC*(D4^Ve^NP`hRN}o}!Dq^RT{PE;Ku{_rVt`#Cv_eQHsx&c;j2r z;sv3d=o3Bq2WPzSZFZS9Fg(ZcSZL?``(^jmT$^15V~I{@-e6Ncoi8{C=TH{VFeY7b z^!tnecu)pDO3ZF_kdjKIo^?^o=ECD7z9H#qml%`JCsdlI-XL+=Nca@{N~Ak8*?+EJ z-+CCAKP_^G7h5Q!zLmIE&(iwx)Q{yrN6|o=9!WC`=SJ;b(yJjGDe~gF-Awl054ngZ zd@t5CMcCuh3JE*K!ThIU<3kU~2v*&!a&w}Su>2=)-?+ARN8TKeoNIU4Zcd%K75|Eo z;>L$qikS-63wE6O$y{BM)JCwvUp02gF;`BsE+?864AKu zLd=t4z3$8&zga>7!-P@BWy980lyj45`EaaGxZTS?tM^aL_BviEuIzy}39b=ihHOLv zI@S# z5Q?+>nTG5PeG!Z$+|$)u)BJm79#+ho=O86$B-%_Nw&4!#@^D?!rz#yi{md8>%@7~T z!-SKEqeRJ?%I_0kQOq?xl>ozKW?_7-*K+Pknc5CreW18h>nag5N*gCfdn;-G1h5nf z#qP5dv?|VCh}}-U+Lq_}iESf84PQxB5dbSq&DGFVMR8N_AwlXLHM?K3)7at0AKRxD zW%$F#YDG#^j3A}PK*7PIk++(5NL+WOUr(bv>}cw3D1Vc>QiMdSpMb#Scz{=TGJ?0c zeJWgvjp}nt3_%-0?r-VWnF(7Tw}7!LBGV(Cd3epF>}7O~?`?`jA<>co$*C_%=XaF~ z0bDW^@JCoKp;GKhu{885w9?zD_Jo}UyUO+Rli?n$9Y&J{GF^PiO#YGoYQ7x~l8ioa z>raQHeS1biz2R1E`CE{WsadQLUJL^gD#q2E)BYj1>d(joA?X5nNg=>;ixv0$zF?JrghY3RqqnY7~YTHheE=GIhe zHja1w1~~SrrW|f9l@}!S%M)*f(F`c2;IBF=lyOw2yLLiW(Gk- zTKABublpK{p^?@(#uf6#=YFqIEAcRT@;$Z=gsp|s?9X?c7>mkK%l2Vdrw{gEFDI#V zcz@z&h)}COb8uL7-TBcGO6PB>UH&IH>7Uc~49SUTBBe=BO{f#r?2(K~F#?4`F?jSB zdqB7k_f06#4virk>Tc4K>lH#uMu+zLa$PiWy`yvJITsdA6M=-c!S@l`%v<1*)`N}w z(FZW!7ghZ(rdCpw3Z@%E4EzZ2RrEiKe0UkHRj^A@d#b1|Dx(^b)hVgotZW(`fQ#A6 z;fM)IKVFx;VlL=A2!`;+M{z!6@=pKPH&NoCV)&J@h0YHOso}%xsP<5JWs`r`)pwcq1fcs~)#!)_Vf_cKOW-5KU7bxmh%8Qe{x zxeqs^?QMelnLvq8tQ9@uoXLHXpHIG4)g2@LN8)q79~pkbRBT>7hZ1j-d_2=lsJ)I( z9%eeZY|h=bedi_EYehaE zHu4aCac_aKV6DE+`jJe$Q*>>pNYuZ4^BVu^13_qVYi{~$&sFj(?6u8X26w@JM8h;| zxyspxteR2F+Eec=LHp|ond0N0!o4pWeI>9UWWN;keqdb`aAPoAga*v+0xh{TlWKg* z?2`@<6LX54iLRY8eblA&?tFnyCW>#WP#5j~bXswnWLUrJknJV&*rnVF8E;1?;zHh0@k?kx zL(5Q;VP}WLan~tZS>~ObPd!`Lu@i*8bMSrT+O#OXt?^HTQZpEO;dfv;k(n4dM{tJp zcFEAL23`1=vU1tOnDw7)EN%z>O}ZmjA#~YUmQCYA^ld61TAuN&5tX)9CIr!H*5da| zfnM&vUsdMM3$!RNfTaHA6!-AmA&0=TQz+0BBfDc{lvWFk5PKa>?^mv4=-0srytF}7 za;rP2y14RVg$|JfBA09($F%51oAXQNty9NuE|(qXGdqWhC%T*8>vYWpw!h;i7Y7!Y zh5sDh!Xfl5qkz0xZdepDDCTLt`h?|soXXdCG1Ovj4f<>qSPFSC#s6`hk=TOa3E2JD zZe3S8Wwh{*k~OaDcLT_?+1M0r<==s$W52Tj>tObmkqJafYc}Van%9J&;~UZ~~ZU+9tYEpJii;bF-#M_EwH z$Gs+Fu!ceR-`?Om9S~J90Z~Gcu>KZXD~AlGg_LB&$lZFY>@&>t8{Wm=a&u7?qDt&~ zXB_|r@^SoTlo2gg1L}0R7iPyBcfAe7DfOOI^!HcGTiAOsi2!}o9uj)Ru)aWe%IdOa zqsuYv!Mu*)W!ImYbvdclgj7FI=+J(W!udKwm=REFo~H^rJ6+j7GMJCM{n84s80gpU zLJ!)6X&5ZRn#hGK6*&}H6%W0)@<<(8WUOLT}lGfQI#;vGDpR!p5- zY2g<(bWxr+5ZnW9M2EYkTb1$pxj(WtSmb|=em_6V7s8=ewkUNDgefub^T69{e7A+C z!QQ_crDVk$8$Vsk1Y!50U(fbJxMM~Ro3=&EOq0^3om0QRK;*Dostgj30msX@Rj%#g z3E%m(u?zl6{QK{a0Ibfj{&!(lm6((TpB+y2+QhH#b#ywt!G{Pkt1|W`gh)%Hv7Id z*fPF_iS5=B*ZWW6@Sraj9X@QT2z_FlQ)??@Jw&u!`}|abY@ASxt&vL0-rrAQcy~Wj ze6`3dpba@gQ0W=TbGWvk$CFv2_oy@P_ z;Z}B2H}6O_ln^xccCC7Q6i$VH^fa=~d>O9_zUXzqz+t2ITmHd3e2WlVSO1|bTvJWx zl|0z?gU$Lz^rQMSl9)u-=5xqL$`&LGmKIGRgC_wV8@KJZyjVS}U$UJ?W-#aP7eKsfRnki6Aa+c)TDA*QHV~mipB=iTEvt_FXb<;{ zF@2uHOAI*FMSxZ=S(8%gE&-CD`(@*33JVm^a5I8 zb>Z*$HD?#BT=FUN3-df)Sa1U)fBHn#KjIFep==P1o9S5vAraK!#GAzb-z1XYpD@3_ zdA`iFc0Q80x~iWCvE>G@!Mq3CEn8eOB_F;PqEH1YM12m=zhjlpv>09Q|w2ZdRi= zqqM(*@Jb;8%Zoy4{1dSwqgF}|Lap*(PXU-80>iI->*n#k9|a;_{l)bx2e$;2=~sKw&0Sg-s4=MUjKmot>N8R*{f9n6 zY8y|i&KD-6xN-f(Y?3_UXY&X;hxDQ6*Lg!8b-4V$kM$gXVG_3i{=x1v>t*7ddtw#E zugS&e(}290zYZlq!u;=6K)Go4ntC%E-?aH$$%2>tuqn+XKOj4(6iSCaLHLJ3iB6=k zsbHk^oo4iVi%(76S`@$f&(zlDPRq4$b3Jcj4L*bYRine>z`lyY-aM*9*q9FY)D_cG z%3olNZa7c>H>IU5CXsY8WSrTX?K>dAeAM76^OtFBFG%KMSGytz9|_rnG+*CmK@HT} zygCQP78qyl%LlysYaDtQa=f{pIUiEXzZ8H=w9XV|DY`DRjd+2QJ6_$B!-EGDf`Fw` zCquVzACiPWmNcxS#W~$gzbB?$LN1Di+_;dU zQ~lUuy^Wu?{iXUP9w53m#K{2bY`E$*_v>(@B_=NNGB5mlX9mL)u?35?5wH(F{m#>= zO{kI8?Kd&6MZqADB%1zY#QwZhz&wt7I?T)8c2_6a#M?XNtVzs&mN*8p+6z%*D4R8V zCbq?m#$CO!#E*JBFUc_f$1J-a`IzhYDUIvB~fxuvA&W3W}x6z)%6O1 zH>&7; z^X+nH#&ZUlt?egc(j>vWLJ=1}Xu!m@Pwaa1Q-phZ2XIFPwgpT#uvS-(W}Xx#eu$G% zKVmLNFW71KVqzG#C9)}xxeW${>kFK966%?y^l_T6QDTI{w z36^T{^uNLW$P3QWWaxYxgJuWde!#*`Zzs`XLV=fnYF*89`*su{6Tey4)A;(#<&K}6 z-|-{2cb;-SjF6+C9CLRjq|sSzIka|z;_fJ7VHxCLQnNep18 zBBx*)!I<$Yap-+pUB_pbn?IXs9XefTH3})M(hSv*Y(0gr|ZSis_q zS0Q6?c*|eZd-5=b>aDL#BHTK5CFl6U5$DdUR3FSSz3Sl19!mfUe@0Hlle}*asX$Ho zC5@qsHcf{ovvwIaV5(XN)efBp+|%6*>sXKEU;Z0df&NkAIzm6y0P+iJ;BYjqVfSf) z&3TO`r|=}D{5CnW-~I8ayUW96>gMO1fT_FT+|Z^P1I0C#gG9rZ=eYkcSzhHlUQz7* zWoF-ySp_l+QaX929m5LhOwmo+^h}c9^M$xU@ue-|d$a#JRH4>4zU5@vtZx8d=!xi) zfjtqEBU4EOVVkNk{kMcmA$sLA3e3koRj}Ok#yviilTo|Ezk2zg)QLi>nsd$K%^f}; zdW0Upu9M5o(XaQ)JR(T$M=FZA*b{_o+m40!WvY`ozC3qH(I-&6CKejqz2ditgDEt!q8AH-$ z?LB#KC$)2r( z@T5++(4xg1HKC2MxY{Db9Ph#%as%M=Ze+nSi@=hXEhv0Ul?B*xH}fL%i_qINd!&}K zgbpXK55u}Xby~rG)-nHk!q1cMUf3Xl@6DfgqV_!G#n^PnuzEuPHrW1C3cp#-hpJP+ ziD9&xBr#|I`YkE|IA8ivs?yBtTSQ*%v)0BHnrx?r{@bq#N7tH=cp_Dr9H z*0N9KL$WAf#JbscWT9&&4BvC~d%$++n6K%{izIOz4L5O%HWszp+X!uhim)Z_BauN? zPu|0y^d2-RutvBr50h;?lF2kCNZQo8xBIAK^8SU+klC{Z=X8n0=svB(%jZ2=cS>&B zvXeRG@*vuf~iN{84ErNocn_ z0dWNw+X7}q%szsy{OC8^kkmvrg&Ui~ZU?o4&6&~+Su@`+Az%war|>grbx3(E{Qi^} zA%|SSGO#sj&CK!njyCWU!#~UInrz@<|7c0z0}BHDISAm-7?w_!l15~d+z#1`FW3a6 z(T|q(LC6HB8ukF91R2$JKx69p$1y_nNY|*&!IY)W?nOFODxW_#x4;DOY{`FvCE$xi z%*e0My`ywFWulbAEk$AXf{H|GQvYCXiY$&{z4v@WKyP3nPW_wTrvD!=5GA1_W6j9Q zegpl!FDFJzK43s;{RlD-?WUi!8a~xDUgNIEm$-ciat=?;3m&t60D6N51$OC1;~`#f zqZVH?uJRDTlwA>>&L#98Hk@Msl#Z~rev{9#S4MPw@@22dSSoyI{4qc#d^7;4mJM|e z%8QkbCVMz= zqXY573EfQvFTmoe8f0?%G1eJ>(VEU7=d*%plitOpriWy{FFDsw;R`9kJi)nezf&Mo zziT}D7A1X(m(e#_et}{AJ)SRD(oeLOSX76a&mLSrC^jdmoNLHJuzM|BGS=2#p#Hb^ zR<_qE$~>a+>O5jFEy~*8QXXpnhs#T|5(Uid2xr_j6@b%3-yso-0A02|0YQvAP#)@l z^zAOEvVPK!&%;}4SnH;JPM%`I&+{8iMR6%`5lNkc2E7#y5LqDATcGfzW9?)sUo;D` zEXMPy!Gd7JDus1#?w~*^YDdHl5Z@8~rB=f(b&!xq(U8k~1w<%T0X1YWDD(O_iWw(k z18E5jyZhqv>59fe`fE=}Hw^Lk9&hp+^b7RR9)fX=;@U%Z)sGa(j!~%fi4gsT88U8O zu!#qFmWDGwxI&-oBXdlF10g)Mg7;?6E%L)%(yL1S+|-qJ?ptWJ5^v+|)!Vm&q@)a6 zQ*mz}7IRN$P{labtz|DPb&qMj1Qi+)@n_d?Rqw@*G{Svh)$Stj0MYD#@KAddHcU{4 zFUXd$Vs3c1@RIF%!UGxzv7HaH+FXtLK-&On*$83g@G^Xxd7VW-6BUhJ$A<-rI4KRxfdkay3)p+>Y*C>cM>5($rjuCG(K(AuqrisC zvA88QSlZSoZT`TldLIwGs2?g@XpvfWTRX^?(WoZ~!QC zS7d3d)@n6+bqi*6(BKPzT(DTh2jprp@&gVHfU$Np>FNRPsBBcQWi8RREZmjHJQK7vC1@!NN)0#qP5t{L?{_N%wm$$c#c%2+z~!!ya;;XGmrAhCfGTr!x~=Nc+dt;2&tFbgz`kwufGC4aX+E| z`GLux+e-TrUT;0?%zcZ;nUahEz&9lYkD0U(u9%Jzz5bsoS32=GX!eApe`s&wBUuDI1&LjYOm~x3ZWdi9H0UjIV83%uyO-WR_|E?A3ghi->5+-dv&Jfwd7G0>*TT10 zA#~m}T#cQ60jwc4hTz0F@nU(DS~K@rohhFugHVpfJ`)5ZtJdtACFsKLq}U^$&}BS} z|L|F15b0eO3g%U6PQXIRowr}U9*q+=-5}nAVy{8qlZkV&vZ{NOep3A=d1%eS3pT4+ zIiJ7gIS(C@*=?YnphwU-x%;`;ws&UDu7ByK{9fnJM$%-&Tri&Woa5a;|F-h^=21nj ziv{O2XUXNouAv${AwGQCp>0PROcb{5Tgnpl@nKS69Zlwp$_m=9VNcC=F4C6I>5&{D6OvFASyaJV^psY`D)9*(zIK{7ECO48l zIWPjQw>Zyb#ykHfVFyH_FaGcd{c>h+_dbfXh|KCG&73=(G0G7!tUi15a3I*3`;(5A z1yQDJiv{@d^e3aSp2QDZPt~54|M9sFTCS0OeQuapSnbqHgO!~%C8-+-t5YY?b!u9QvceN+n2}z(=q-`<-v-7Xvvrxf_1kx92vAW z6Yo0W)yOa0IhLe9(RHe7E;Se_`js_w{GLt?LTjz@z0ti3qyI>b{am&4#*^^vD<sDYYk&G|4WBz zFeC5fh@8=*WI5i>#r3TtG5JL3&Fl9PHBw|9 zZa}Zr>DdqFWw=&m%!tmXh5;izhWC_%bT<+XW&K{5FOmro^3;0SG5g7iROo*4Sq z_%hdXyf2@jEgJxC-}Hesaa@;HrTYPm$E$Yy#gMa5><#cZndcvQP*eKBpfI*20l;r( z!PUHs8Ob{_`#sS2pXG96315mtX?u z!ElM{E0pqYA7udgi}aioYsiq~7q`>b*%-(Xj*)Ppo4HtK zUYc%s_Osx5cPlda_H4__mWTot!TtJZpwJ6*lAKu(nWA<4FM(QM?<&pS6N@6Vev<<2 zSd+Y0SQOWUIa%RC9=Dz#notv*^y`fg9-y(+$%lJdQA7L-YmoR3WvZ60RVB`(5>~(oeZa6f4(4VteY{y356|!$`dvss}`_U z0iZm76iU_FFCIfY>4q zId!vmi3?~UPw&Yc$w*|xg1&-T9IF+j&n=;~^IPO>PJdILi{5+YB{~Mcu!t(SzHrT9 z`H@nya`oK%x%841i#$LAka%r=0YL(d&tEgNO*;S<$>PvbpVP9^|KdHtW8(`kH+A(l zAfFmMmI?Zxuk&MHG851%s8jf_2kO10CLZ{}|A=acO!QSgFh%(-9egLL_90j*az1@}NG0$HW@VLX!d-KM4g2eI z!RMw@0HF6;=7W(kxhFpHQe*e|5Z?Ssm_kkpvO4uVE#tbVfm!Xx+cd|O*}fymTJqz` z;g!vTZQf3%Kr&=8S63`O4LcAAKKdvIAS>4c%^e{D8MN6y0;D_T;T`J$)TjU;&;$O^ z{K>;2;$?+aI!Zrp!uKd69WrTUqErcPsy{*>Qjg)Td2`(^wKmlUcNNq(<#P(3mMpwq z_lBP&c{CEmnE@{bO2Ak(qD-b)pzO9M6C30pIHmq6akwvVl_6@T{XG z??9H9*t?HUgRcrjtG%EquP$$|obuv7os_3=0+gxQZ`C*B-$;x3q-2+DZx9t12#VyR z3`fH;{$&sGGl{iy%sg%X$k6g$-q>)9$E1WiBP;SUnBZlx=L;~k^Aw8QX6eSO|fIRGP*{=NDJRz{0Yf1%}FP-O~bpW!*b;C zE9%7mHzQ;k2Vc5!eX~*X6U%Wzay4qs9dHK|KU2QoWENkT*Ax;dEtq4kmiM%FMOo8& zt?0LJN7zQJ22N2Wj2gdhg}{>)Qsw1<63rPEp=YTbFY2%@<%xDrbP^4))h)^yAvz4K zjr#rV?$s&CR`{(~&J*`5gpRAsk4~o~O_QdSLlU`yvLy^M$&J|Jo zEeYK3wQI&EQUBG~HK}!ZsfWqHIsVM4TH{Q6KKjm;o)w@_L~iIdg*`#*Q~H6mI~u7s zl{w6h(>MQ{IP8~v5ZaE<{TGyK8$^puk)3YgB2aGCLth{O&*hHw9-Bl&s1@d}A$f|` zlEFSYJ3&t}3@E8Saky0!T^4g@Zg!$(`GdlQPsP3~7OQTA*JHqIgxPGvw2dYd zT7!Kp29H7`N2UnPUBPr5b%Ltaf6m&x+tCpD7a|jQVc$Z|+D*+?fxWdT->&^MC45I* z^+NM!AcMHXu)1JRmNGa)M0v~2Rhy@-u^ayVmG(Sw0OdcBTM)e@F^DG1mgvvy(Wy4D zFZc%!c9YlC7d%qi@k4-O!gE+Fe^RmZcmR@$V3$~&3rI^Xu7NQYINyzk7)^Z)mO3Xg zckh9Q@Fli6%vp$?9}N!8N13gCK?GS8<8rLC*0xeaa5G@FRagv3RMV4 zTzT&KkWxCMBrz(YX3BI|dM949=S`q-nYXcLpGo?Ebfn@7U5+;BzXZym+qacLmI&RA z>WHX?W4|8%chP_0<77U%+37ty0;)4*A@9gnoC>VEnK!UJ(PRd%GSBqDQhhdt0B(fp z4R_b^RYs)-qeS`}nII+p9OfU_gDEbSzDVR0-N6MLvY=d-cFEKPlgOH~oZ%3#+XrG6 z=UTq=vk06)iC$5ve2uwO=*4|@0eOK9t)RW27B}m8%=xeI0>OE!wY1_mIAX3N+NnUw zm<;K}3VQ*#dED*VynNP*1&iZQZTK`Ic<@$G(tu~fTK!n$8+#J=*GqA*ntc9E0!{vp zLC7c;#!{W_h-JsYc{WtVr!FpWk325b$E%HjA26d#oR7~p$RgxYd-CYqU#nB6 zv*q!VgHd=(IIutMIudf2Qkx&Q(LH4Uz7|H>g!w$O0~!?#zRUwYlhB*X2%jPFBxtmNy?f6U{W6tRvFraHUR9%+8qNrr` z7o=%cbW647_0Qq8){l5Ha*q>FuiVXq3JI346aISnF_%30$7IxS9&fUck)^BGX!j=NoOamhPh zQpS2Rxz>6|bpEh?Hwbm@=r_g?#|g^HDe650IFvh8a=_#if`Wu!==>aYq)^7f)&BKRq6@DA~=ih#R4!ZpEDp4N5U* z*AQ&N({r{;9aq}Qx2w)UVS8Xc+maXWNWJ_RZAq5Sp8fUE4>TD8VG^-x?}U#Rn=i-? zo;O|EKMMDuf|Mj8^?dxX%%4MJdgA#iQ#A0JjG7>4S}8+Ny4Z{yyZL+t?OK;%={yM6 z_@hvyt8%k56HcRN1#=I&9Y@AUH@Obq28!aMjMXPgZoIyG4K#ZGGPCI!cmWAQX9l~n zjIaxq#u+R*+jziz3{iBO(|6v6IJ1{}TwyN4phyFeCye9I1F*LuRItWzGjByts~xCa ze^mSm|8?}NFomKb!#+$_h#aHTd$Z6Tt4@XGFK#_avn);@+jmFF??41>&x5wT(dMe1 zwJ!aCjGk`VRbGIU7zrGl_trwDySj~?zv=tfn*Vv>;iCT~g=;(@ONs!_lBdrZ#f8wj zQ+S)*#93KCn~zAe6~1(1K4%FEt3K68$I+3K;wuF%CxCYABX(|0ydW*q|ElSY6e^6^ z1`#x&Vs$_T!?Oi&%|ANyMolBWd!jisdcy)R=f-J~caA3<`6xHtGt^G$V?P@|PV9bcP!XDfY zn7I427EU`ysGU3f@udoS<?etIuq_AIr1myhV=~2;;PZ_y^%KQx1b4KRZK# zQ+dd3(1=2jCjfk>q91;TvFALGjp~WK>3L6%%{5s}cMTD=2()ej`(87%UlOxQB8RVD zADOw*-R9A@zv&Q}x}wzLRdMXJjal56T>}$F#G2 zo%K&1x>5S+QTiRgc1jXX&aIMpWeb3I-hfdBE(Yfk2C55M^W=;y+B^o_Vr1{XC5Th{ zab$XsrS0jgAII6!o-e$Nu=>Sr-}3Pn$XS@n2YRb|U)xsm9&EQ)YZkgWD*Xw(u>Y9K}h5|uZa>$R27h(`bodYSXCRyr>iCe_M+t_6+PFrYF9i?_bR;6e`E6o86+=V_lWHa=NKQ`xcXbWr-;j^ zLh8vc_|7GXyxwPi)F=IXN9StXhsbwKZp`+Pmy`ihXx5tn1K-`~z+kgco3;Dw&D?4& zxw+=vdI0zwMiWh4+jLzQa>0)PzXn~TDL_T3_l!f>#KEBizV6bl3zbg+fr@7b0;-oa zC4}@GD1ZGb8}(OmGU7!+4FqPFc@lcA3eSqBwH_ zm=CV(O>E8V9-UffMJEr-{yR&xLh}drIAO~Odzpd)8cvN*1P3Po^+MIj-YtXGanqvH z;`2*j7dSL@hHNp=6bg#jcCR`lp0oxGUHT=M@+Vq|^{!V4F!+@Joa!EJx79?6&9CE! zz&=~ipK&Vfx~~{$Nbl5-?AsTOf8%ihazpj`U>^K7Xu~Z0W{n_Y2#uLAzVIca<8X=hWUEV#O1S}b4l_nq+O_UrXQ?)j> zDa=2CxbItUJ(ASRaV+H&VDpIvNs_GX-E?PPp`ny%^-K%?SR3H_!({eC^9nJrbNL+l zk1Pr0&m+ELgqw<`%~>cXUFozGL|_GC{<4NhsD3##ot?sPOZGg(K2~>CPD!#v>S$BS z&z3)DeeNmtcY9taUO5ow`t6tD*`k8?Qwy(doHj2JerXtUTmc{|{AlWo?lSyy<= zs;Cfc=iWiCylC`(?eO~ZsXs-Zz#!Q576>I~jZRRcypahIti zYHOGR9JTA$6Cg;CFCnl((08+wnezv97LOwvT%gcgHU-fFql1uQRBZ2$gp*0bx)B$a zh$7IYJO0z^1!n12A80R{Ny#|AE|qma*#Wdg!%gvU>pw?oC2c0BtqP~ zB=p7>Ond%%rTW2TK(Q?zLy{r4_qZZPiDB&LU5EG=(cjyEi1nL0{h#cx*-JZA4p*P( zU#d)mkL;)hG^Wau()e4$o<9{7WPSNLbgT;TdQ*_}V#Vi#_678EeA!M`k;zP=QQtY} z)y-BpVVCtEOU_n8v`o`(BOxj_=D6=%CxjTb`Irlhk}IAp?Ye6d6p}Vp)slSB_7QPD zo(P#6PINoN8huosL1xT5eRG2FOr3~Eo!!6mpYQvm!84iu^pr!%s)XZh1Bl3oDHp1h7ArmTdM+bp_$$NljP%dk;T)deVyHO{TDapC+v$C6$@kq(lAyE zumf1efbF0Sk9VJTuik^IuMX0k*K_-8N>&;prao-FZ`nzIzu_~{i6SwV{+%Kqgh^dZ zcZid6N3o{tWl9aBjlPN=n0ILo} zEmqIBHq@^%8@3KEa#%dt3HOcmxz?7-te}aTB+XqQaP6<0WGtUc#%vzot4K@N*M)Qn zXOhX2#lf^c&-c2nfCopx_`XW&eVkWJ1O1Rv!=qS@h%522Yw!fdt;C=&GtKihX`T_@ z%78Gf+UyQ(GUQ!EX^R+7+5MOkxX=hlsenDZl?4Y`>?|~(NadbG^4P0U6niRifl{9G zgv^dzses~(>IuYd<|%M&3}m~jRbOf+vA*(8_J0o)zAsOGZpA{pZH!r$s%Tv1!)jW} zD7}n6+^;U=;o)E4o)(pQUew|D;V0O0l3|%9f|q|^-o8}kRG8Mro(PBx z-V=1N3Mg#6zbecRPN6ShLy^)3&DDIa#v=eNruxsxvIjJ31wHn*$VDX}Ih;h1hrXK!Pe!JCryYd64kb&})(K3dWr&hjfWB=FQcYih2Y=4KMpgf9sKv5B* zU|k2f|X80q)4>^0zyQZv?NLsDUsfLuc3q_5R$x;=)K>+ z;a%%yEtWqVXU?2Gv-{qkLBq-HWtLywh0yVMnF*cV0d(lHkIIDQ%Udp^w{wbLkabHv z{>0~}f>A~ctInfW-`{$BTvHhGR?M9j59L9c@{o1aDz98_mNhLu!?!9O_;~+ODHacZ z#Z_LGJSerUn{UQ8ZUfk5w>l2D$Ufc+f4FS}roeaC;}LJ_w4KJuGYf(oVylIoCsRb% z9}E7j*Sa=g8ar{I<}WF=NK>L&PBj~c!z=>p*6(l%dRK0Oo4AvHqYQdLOEt$PNU;1A z)zEme@3hFOG(b#4t!?MTbO;93jGsm?aLTLyl2^bbD9QUzv@!=ci5#1Xd(o1)PH#fL zsB*gMl>|cugVhPywfmj{R(lHHGPdTn!VCSJJdAGWUz_azwO8ctuIc~)N_4$f=ZUKk z_hVL=Lt~Mk`AGi_z^c6bEI^zW52EQYw-cBix($`HyXhF8}>>2`D8r~9WT(V;=Xg9pc! z%)ok*lkXtyKVRIhG{3r{&I)%s%1sEMBufi2yc0GTn?7HAKO8tTk@8X*bc;qpzq9@Y zu*|&Z5j`j(p0%`Iuqd@wGydEuOpv|<1X6_PN})YX1s&+d-c3&T6xTMB(bm&jCLOx-?LS z3!(DQ#ZFI@*Y$GTUlTS2vh~X!Hwqw4T>&MAd$R51ggU-AwrXsdeD0)w;u1oS6TqSa zv^pChtAppgq z+1t9T24=r{lL+JX8o*z%mc;4>j)GhqXddF6lXg}k9-I^F1)0o2fGv9oMDibNF!3+n zY#%tUG+y_`@to*-`-DKOVi7O`cwliZg%655r7bNwowv$&mZ1Y7oIM%a0>n!0^H=NvC4eS{vR9-NO8vq}C)`KrHmYu@{A3k9B2ABo zizlSME{zKNXZ@8VeD^-%n}*yPRr)!7_s?q4Z-mw#nyRmMgH?#a^xgw62>{(qA4WB< zOU$JS>fBmfKV=;<38<~%vBYi7+_wF4mhaYl~|6|%!!a1Vzkzoa?;mTXb%+-#>7HEE}Gv(N}@pkrs+LS-synbk6+T`N_%@+Cb55?x^F~NM0pbKH|BW9B< zv*Hd87l|yD-il4kjCzki4X)xVIbBa){HSh$k29*m5d7t_=(v=f8YbXB8sGjr5o+1Ppl{gXo?HzgaW9^ zPSkGh%G@`6W#^D4j#eNK2rBx>iTTlsT9O%&p5((7T?KJ|Mt`|G%>q;olo~sBdWJ|( z8r?erfjrv_k`W-hDhHt7V+m>a#ZyJX3TlW>q*P@Y9JD#dU&JjgZKszuDO^8Na0t<< zm=$Px*{SRztuvC-L+lK45ws*3`{Y?^O4tn!`X5KeD2?m%ob4po&z+o1o{h9(I66&9 zNFT14h!E;&os%KZ(iI|^D;`d!yW&*={3||Qe5&kJ7RRNj%jZ<$XtN4TcC1SbNr;x@T%c8m6kwzX4F5@$Km1ot;>1{1 zpuI!4hHB%JG5H+e$bBH!lJu*NaRUKe@&M^ZLHdKkQ`tvmN@ow+`=mOLXcQF)(vLb;i$(dp~*x!1liQ`Q{4 z8sRIq_g;mhv@pMt^-{HIysd-k<*m$A_zjCH+V;MUoUmSRuYPorALv~T000t}he7Y~ zL|KaV5vWHFi(Bw-uLi1>I`9;`Te9pTjNz$d0Tw+`fcr*7~nXn>QKhd(?T_(BI@ z{(}T+cDBv+)yB}vP9_{2rwZ4fzkt9xA+M-l@UY>Z;P--ufKTAJZ2Wco-0MQoz|VPy zF3y2KcKQ$Y(hP3=@!O)hM`=Txpj6UsW2py5Gh4`Y9-N2`tawcs^d}(K2jWjpfw~FO zd17$Ptnb3e3Uoo>vzM*ZiH^Ih!`gkpJv$%}3*BnQ{m?yJv=Om1gNUX^vp$6?a3tTj z>k<(ez>oiG_X1RjB)~XTk6CRU-R+KFUEDb(UKa{4M%cg5&W~n&BG`&NIqs&h>!Ttl zNH_gARHr!Jo#OG6@BFp^08lnKTQ`K>=MjS@mrSsb;>BxSpfwbywwQXT>uqc)?A!e| z`s)SCm(PdzQNGIv8~-3nyK_g9za`z#DF4V}?3weYD?Xh|QvCGF{Y*Z|M4R=M;YDRgYAYC}7t=$bsJXrK1;+3ziRLl-QO6H(hQN&g0gpn&}4&757>y9{R za59STFdFopZr%8G>1*g~PdSgD!Moz@7WxOy$FQ3ZDpqCh zzYpi2p$DuN?Bjtw*tMiV__^8un^^ad^D`{JAB)`vZ=Na@fI#kCoB8&C1sU?7maM+K zgKtK?{ffO`s`C%fG+qjt#w|Ch1g?P`|22^R6fKhZ5DUvvXx{~0q`3gVSKn*z6;*Fv zj>g{iz8j~#Pw4~6#`ekayZw7#1K^%u_d~q&%m+5{jv}{>&*x~=c-S=#Sg^{;`@H3D z`e**A`o`L-Gv^a8yvzQJsd=es)2Yt0@0CB$b<=TyHZ=XfKxvKA=Ui)TBrBNLF)HRv* zLfPcVrw_$p`_Dc5BEWOxbMe9Z{k!;~Ja!^J*I(3Z(b=;5m8X~DrOKgPPyIXRF18Nb z@M5g0PWebhSDDfV4L-RJFankcH9kD}%*=cZs}2oWKheD@k>}HAEyfVPVU$D9--Hc3 z4Olb}xT%~>)A|4`l7Gz6L}pbWk{S ziB+C(Gk~97(MU>cXgi-v7ry17Ht_aJHrsr&ZX;0Z%jp;`0F&ZVr3xpuIra#A=&?P& zke*7>Z%#`aSgXjblX)^y?hZv57R6Ww+7f6d+I>Q4Z66BC^Q~mADIphRcFt43I2#6$ z{dqO8?aHT@3RwngpQyJ*$j$?2wLNIP4n7XYAu-~)_%wS(myr8jwi}g@v?K_@@su$l z6c(@AP_mR5qB++T)0QM%Hl$d?!^-pR-%MKY8*&Hhj~He#n?|gHNDZIEyY7EkgE{Iu zs9Mp^dpf>FXocWg1;p%MO>MZS3~li(o7A4)vc??!HaJ>&_s7&RsDQQn<6tMf{?Y(r zEa52Ps{pkn?|bj2??bJr#5e88l1^&;tg9jREANFMG8(LYmF4Hw2vWxqDdJz*#cq1M zr_(zJUR&?-sm6s3sNXeE-=Jwh5~Xlc~RE(wvE4+Rtl2}l20j1_tnq1_$q`Jtmn4XjA7*yYfwQizj)Jd#~QD?Wm#M>0jIt4sF_2ow+gm&9%>3a4I7uA@C0Q=?;aF$Dd6RAKRwBK}^ihK~~v#P}%^y5comg^VuuwUpClKv!> z-Wx?Vwc4Az^YZ0VbEJut8=?5$yeOK;aF3}iHUptGi6)1NDD}keKQ#;Q6n^xA=XYiP zTw)SYy~4Qd*o- zPuf&RuhN1hIXIJCRK=hRF0FU3qVL~^nkaVnm>XM*QU?RNzB#Y6Ygv6sf%Lma?{wPv zM0>9!?-`y6r49ZXjgJ_BB4z`}Mnnjb1AWMB39TNV3PhaPKmW|1rG6VYg&DoLP&nT3 zw(l_Gf>E+-ChgJj)Uf)&52tz)C93~?((OP#K9dHP_?f6GTBV80+U8L-nccEJ;gqJZ zJt#Gwl}PzfyOs}QZTLo%f&&5>O6}gkj*S*FtuZ$)30uPJS5rw?)Y2gi>ylDwRjmgc zRQ;52x2zHdE{nmo_MeH=y3X=@cb#otTz58nA2W9LDl@jXe01?!Ni~d(4Y`NuG0T%o zXsY-%>R&7%U#@)=y(qxAI*t~fDlC2NjYtGrrl1iH1p15~aU~8%b zGGyHcn~CY}-%mjJ*DVI@(7-q&&3N#PZA(Va0Q)5}%f@MEOnh^jb$e_l)tTvbknW>R zt{J+}QNk(W)G=b6)l$!c5O(FpW0TA&m4=x;VEbTU;4eaxY>pBeUOn4Ymr7$MPZ%ki zi-y%juyFapf{QaX>f3Gb;;S{XVRaP*oGG)*`wCX#MUOz#GEUXw46t~J6#EW2SnpvLlqt4*`*R5?2+IoP%S?ClHrur789+YY(qW@48Gjl1bvCs56C^>(`^yYiNTWTs%%SH}r)xn?AXT!g`&g%bUo!g|ZC%_^DpJIN&+)|m9V^5c5 z#;Q^Z3e@%cu!x999VKt^NU9*=L9lBHJ}ODlCu!gWvRtu_hjlFl6}iRNe;}jdUuY{uscKo_vy5PG*@li4?^&LJ}QoG?wGw6@Y=zL_3by6L69 zcuRu8Y#$=u93<}(*$B|*!Oww>egB48qsyobXpFW+h7GDTy=UNTn&rS%#WJF^m05;1t1`mO;J*)$+ei)>o3MbMsJ##l33 z>2Al-8j6g$>H~=bfqMgj*o9X<6MUP0JU1bAIGg1WPFk19xYHlEEu7ksu(v0w<3c*C zci!czBwkv%`~!Q|mk{7n{7X7Lb<=$;;(^?y&45kMStMcBXOwSKnKC^WC+-o}G4)VQ zpqHS(e#r!L^%TAldUgKk@j( z#qnKpycXh$xOxx{JNIyYGIQ5Cctfh*tD5d_7G8GV!6;NhpsScx{oRL*23;uKW=CDl zDrF+;0n)kpsq&s*YcS(U=e>1nlk@GxQf%w%LK=?sfper1HN)D*7Y&D z#m75#Vm)SY#dewMM4fuH>&x8o`Y)1j zL=T>RA&$8!DTE=|VxqRypqRKIr zT-4OEc>)&Zy3Zm_p@%@VXT;&c;nSAC(P39UPu6#?sGK|pXVQLG*m&Kgc2nt6Lzvq5 z*CZ$Q#;vS@md70qv`EdGh1DM1T94CPs@T@i@Rw1d5DlIrS`{*BQIvCzm7AUe$$gDl zrEs3S+csd(cF{4IwhSF!J?&FOtAHCyRtkDP&lg@$rl6l8DF*r?YVe!B8p;{3G##bO zJ=DV~=Car;1e-S7J2^SE@0nK^+LM=a&YjxN7&EbFV^DNv^o1-|6n#vY7MqPp8i-BN zjOxo_2=vTd{Upn3V3{%>_MjQ_Md9UaL?3?Dx6Rqlg;5mobCC63N2BJBb?L^}2L#m0 z{q-5QsOo`Kj!46#Z-mW9)n7>8h`W$ZZN4nylbzH1&atiZOgqc8A;WpuqXz~oWrfkY zYhUM-STsg&mzyQF2kC6>xNOa_uv%pPF$x}PyZ0E+3`o4Stu<8b0 zOrn=^lhCjr4{Sq_)j|FQCvaM3+zQW%sd(|(&m2)2>pOSJ*f&@1l(+XR92wuGHS2q zBb)$TR#pYz;6Na!n{wHDi4r_$FCAJWFUo}%6_BV6Hs;B7&$v|`#VDgyy{L=Y3rkvB z;32g_d8eUdouFsY{MBGhi4nshX$f7G}gq;TespV9eK%%3V^Q79b_)zyg(0fR%S8z~d#aC0(ULv0^;Sd1u1?quIy;4T|V zmtg>JbIJ9L9-Di}=a;cS?uXI(J^Ix#a#28IkAd$Z8G@^}$G%XuJE*=Cdk%~$%Do_5 z`{E-CXP%&AhpAPhMrxHZ&Y19*sr>R~Ha5F=Yu+>SJcS!r)+FoK7BPM=0rTJxv2S(f zcx!9AVM+Mgf$8spY#DtJQG!6arE+Cjn-`c%NNoB2Ep!w=eN~wxyg$tdvnWf#j(ixM z*{xsGCKDAl7SR5o8aSb5d=;AHbBnr-EN|hhbgw8-lLUc$xv{^iT5=}G7F!5O%LJZP zbGT;fRG;)fLnkc7`s_+{q1t;!Z4>94bc0+^nZ(y3#=-${2G`=};;DCnhK7HF^ce)w zcaJ_xIR+gj$PuSb5*^weq>A};r>1zj#nGausk9HH+jhe)RmtZDbKK!BzD;3q@rPS;5IDQlGjIkpL5>Tu;Fuhb9#E-6(|s3(>$v#FuA1uPR^1O9!1KuRR}I=^P-}7H|f=A z`bdXkUO~lbCoJ9`i#kiKfJp=l7SO?l9wh>e4>!?uP&LALE1;L8rJdecYJRvS+q^RC zxzXK@9t6{R|DE=1719unU1CY_XzBBy+ak`A@?rREw{u#Jp?w08S`X9+ zv#xS}Ez>P{GsrAQq%M=1Vg1k2GO4n*1t2&=AQ?Jy*_4QoMHw4CevZyxF1<_n43y#e zxT9oJHnbo2ALeZVr^Dx?Rm#L^FMGK8SKI2=xwJditPQUsDqrze?uc>S|39P2r}FwT!0?` zT=?G0-#@zmH3xJXEGbUk6Z7^zr;dGfQxOCp-YM9S85SjnzOX*wu3L=XNWQLMi`|H= z+&?@Pz8~iy$RT%7l;gn5Vpr>Zj1fX28ZgLFqHAJ7D?HJm22KBdw(SjmOP5aZ6tf$6 zYDQ(!=m(mzc%h|A$ze?2;3^B#y0h7HI-)dvBTetH#6ay&wcE$LZicXa`P`%<1_{n9*t7F}iHE&-S z40yFXXzfkKn~0@i3UIMJjWKSQ4*giK6rq1w7H9l2{2ZNd?zusrTSf7lzX}oCZ2k3~ zzCJ)Mfk3ABM>e!cx*gk`+CsP7LVutX_1RdvYU<-a$^?6$Y^+Uazf4OmVE(gKV z(v%U=JAYAAOuAOf-7NhtSJV2GgMsG{=6y_G6x!pRiyUf} zRTYFs0zHD@JLe~Va*3pAJN~QCOos*+TvFY>l*Ek|&Ay%!&h3(jNgYzr0&+(Td3Ya| z%!@k3i<Xe^7e~U%=;YPg>TuPhS=bM@9ci%veJ9d)C0LLF9;vSOyU`8fXmw&A8_k2B8lQM-|{B_YH z+iEwDzj^+xWJRl;`tPoEzr$HFgXuJaR^~{hrkiE_H#+APL8)D3vYI)5=JVi1l5>C$ zj{rWzX1bn5r0$`O`t@iWs{H77p={+YC-9&hG*mdnT$u42415=`7VE6<6Zl2011*94 zSH<21TsJ=FmSACCsIN1#TNTy5`Ju^V6zTUOhpU-?Moy+Xl6}uI&Hi#n?PqJo@}OX9 z?v0rq=#W`d@-C#H>c~}KSPeDsu*92uK9>1dOuIZcWx@j7e0-5v)WIK5obtPnZ2a>z zzvl)EDXQqk%@4-jo0frGVx3Yv6{?R$?#FKK8D9N&xXxkW=gjg?GS+8Gnjl@_I;0|h zQ!05EP&ixzP?C4kq(GA_=c9C?tHJxT{y!3n%L$AR31dRBv(8~P>FPcVXRY#Y<8PiD zFpHK+D1*k_wi9KDdy@ShOq1re^K)M5o}>8MUJ-vlp3)lf4#XvSQO@HL)XhRaf3;6Z z%_V|l+&lz-oicHZ9mH3=~K$5F6T&9AdYi2XQrQCnH04O zK0m&``+FcR0bb0Farp@@iH~7}U&Ln)RD@q}J-#QrU_)jNXA;xRU?e!(25;7l)@c`< zhRLJqx$&7hckVDA`t1-3AXhqL?5<`JDyCxt(>H+7TcZ`SwbFZUwB5rpZZ`EBETrdM z;C%m`+m7fHm4_EY2&NqC&y_UesNFbQ1T!S1{94WOy5N6vwHk z12*=w)4~PSr1+C|4lvQ_IlH*u-B$$UvNz<@6syoGjvf?5ud!Vr^_moGam%|yW;SUv-sC}{|>K$ zpr$>bqJXh6sV8yuz1MAj`_*wkMfd#!2Y}uHCaq7#oZe6@b$L;s(wX||h`Ju6(wbjM zBFSLko|zP9IwGuPP?(+W`8Uw36^B-Lce>5ep;ZApJ}Ia5d*roNoW8N&MPCp{+ck`F zA*ql5h!A``6-LZ>y4o=Ci=kPS&ZYR03a}5Opu_R{o&+RECk&mw@L`! zX;>MbEW_QF3Z#(Mg&^h)UcT3r)b0p85fAJt#0bYU*4OxHb2R@>+1=DRd|pjI<6)D}*3gQLeXp_8XP^c0Jydd7bSV0x9F1 zzC_Y)V14E3aK0;O=WUFe|5bi&aEm+cH-wNOpRiHUK%|_(75d^>?rVDT-A2on*N=;O zKl&rtJVPg^t^xPDh)X_Kk0630h3SYPpFACChlRkeJ3WQ!!bD#*eKg7P&Zq-rD&Xh& z&ew?AIGISvNI-610s{$lJot4yr2#}xGv?J+TzKzI#^%7o&-v$Ed~noJi5fdc4!!p9 zMGi=o1Dhlq_*9sq)GCY;C$9sBv%x0p8ws>?*7Z;H5gv}_THo(1Ek;0!>AOO|Ssv@D z%sJ3FB9YrBt1+uScsZOx!>T@lk#bV^pQ`h zY)F;}-nKcpe%|(U<&Sc{FGsd+-CB(G-N+01H23UYL99oM%LFrZ#EE;(r`>?m6U%&> zm=?<9tPv5&x9K_>Mbo~mJ#%SrcTldP4=&J~jBAIB#x(8GbjO<_4)@Tw9@tAbRMN)< z*bpj;{9xzzZ=u_-GN~1OA~}Rxh=V_7Y1MYCbs1Ok1~fn-VLFVv$e;PO4yK3RGhTu- zJf%rgM!Y-~iD1{{`QJHn51Wo9Zm?|@cPBMTXS9HPLb2ye>w@J84n-hs)k_X-X*wu& zF=yl{A_2iXEvd{tX{LI5H%Fn0ohXDyQ9`y0b{-Q1Y1m; zI!GJ>=Dk)zznh>@DK|bjI+q>t<%1NZFu8m~rs%09*HVRi?9`o^f%cl|pj-u)cu~N0 zw;x+7Jo$rBVAXUkvq?s7P)5=ax(!~(c+JlgNTw$#au1NAgFjxUbr5+Jf-xM^ zp6STD`L?eKSff(yss9!j7dBt=#kG@4rayIfm15V zPlwgXdUWvk(VjehoB}oh6E@8#N{Afwsk65|5Zo}fZ3|8uBs>P+aQBAz`hKoKpE5iG z9NG*d=bS$ipzoe3feyx(L>a1o>kXR8z^Qz(&>1eF-EbQEw>tBI3$}a!F)Y8zeYxj# z=i{0Me&=uRYYDs#mVWFY(KTcVzw!7(tB0i(WI1G`b+mH(#4Ka`L~oPS`ZJPdj|!3WS&v){^cg$6eKq%tDmr4a5VQq%xY#VNA8gNb<5SrK^0P8hgM?(_& zyToZRLN)Ko?TWK<7SzKIoYF1`#3~o~S=VM5oC&t@u#N$qdGJP)+D*#}Oz+JZTU@Y} zIu0CBdR?+!qa8DSqi?%Vwyp!0=OCKL`h57S?(iW$=8$q<~2GU`(TNq9>35F1gIZ-Xmo*vuvmyrT)Wo(O(_Rf;9N`J%oGc(%$&X#hK`m6*TFmB$j-GYqbY$E2Q>Q`fJx` z3PZ@^{B+B$^c|5OS{2yJ*LcMJE^92Zb>={m%srWk3j8_PTQ+l)2AKfedDYYv%zEUe^W z9<<%OA403iOX=^^FHMOK8Mmux&Kc%G1UE`I<%~X8JpkFgtq6Du$68ZVg_nF3O+qxu zK-Wfria_o!CZkAA^T-7TNLh>|Z=pvEl4UIF(yb2I{e7O%xS`M*&at~B86yD*BF-`S z^~Ql4f1j#l`00TJ16$8zD_x}R@`q#T%s-h2@VxAT^XaAsXekL%9@e7dwk3k&fwZ0Z z|NYcF4uSpWgAvlyDj$a+S0xh=ThD22J0SOW?y|w9*+PqF)DElN!zLhGUYCy62i0tx zUr?$7%3tl^lmApTy#`fHf1W^ow|xcmLT#-{(iMN|g(mA~nt;gr^Z2DqzE5DL?_uUU z=rB2T9D?!DaA*CVCr{n@JM+Pk(I|>JbN~tSsX^{RXsMj%VSWGB$Nc(jj=9!@9LnKZ zOdR*CRZV(f{~=Z+bbu65`cQ~(^P#+ho-f9B?ptAwnaJPO)D{|>m_!~#h6}QLC$nbc zphNK`Q?Cmvn01-eq_kviH3!!)`uqR?_s{<*@IMOte?ftuZB#bT4dY+mW9xVA=dAdW MuCY$ug*#9FA3CA^@&Et; literal 0 HcmV?d00001 diff --git a/docs/resources/modelscope.png b/docs/resources/modelscope.png index 96dd7a4d2cd4982574f85c351aab33542609bf95..1fb167d3fefdd804744be42404612032e4fc534f 100644 GIT binary patch literal 9547 zcmeHNc{r5q+eXM5$ueb$B*qfGw(LubeaITZ;FV>vyky^+iW1Rcm!)OwYql(74JC%G zWtYmn)R1kM-y_kap6~nXJH9`Duj3fc-E-Z~J@<88=Xssi{U}5Srb0_~go=oWh*nMY ztS%7|ISnxGpdbf+M=wsV0~ca9T@_`bTnyVJ@DDGWi)xp(w21hDF$EDR@ev}jttr4q zo|tuae4dz(Xy5nyBt%5F?1@N!%z**dt)F|qXX}~m>%J7?AG3jbDI`0y$!Svd?Tm>! zwjNtOt)K*4C|y*I-H3>odA2^pYP!c4h=`6~Q9G-o??pU2=pTkM@ZZ1SHb+CP%WqIH zt&th~YK}@UU+3K23z;R9GY1ZuhUMgJ7BHA1`W&=OAD*zfYu}mLQDlI$VHMNT8+P~9 zAwAb+cu;^^|6QD!MgJ3~iR+Bt96t|ribkqMFJUlf&pB)h_G_7R-23sQ@khh+*o3me z7NcAAvJ~{3ir0vUNl5n$kUi8drKu|aaa*frtdnxjMyrcA!MujWWyXXIGS!5#c=O#g z);8|d3Fn%VwVw8Vawxal#}*fJ`RY^Z-`A3$)a)sE&&G_?Rkw6wN95_Yo(h`06j76+ ze#W@fMAyrHv)pINA-er$p)YhGcAXv~W*O`A+rEl4Q#zjq6l?rxyIT${9;AmXD*Y4k z2XD5_MOupR_L7k47!dovkN+FGJtX)SHvi3(fxA8)Wf=-scTQuJ>_M&0`Ihs#f78~_ z9e~sqm!&)F=jQWJsV6S9@+7&I-6erud6Qgkk*+ljt%L@-7467##GY1d6V8;bYiU_JK?sk=lsw=V;8?YSFeY`B*_YrhE3a>1RH5i+Qvsn%?lO~zRcmDJ zvD?dA3efI_-1qPci;o+6IqJRLOllxzoRX&bY+kML`tngv*F4Xa4OH}zF|Acuq*BJj z0q*ZxSz=fa2$>QW?q>L{WPcYIq%tWfc~E{|BuL@y(olr!`vV) zQ9nd0#hirXhEJ_HS1G*p(w&>vs7SAEiB zuGOTNV|9fOYt!dV0JFRJLQXx>U+QUN35rKM2z!X4fcwn zz5#q=Ei_P~w`AdSfim)twrqe?Z*Ig;X`SN$?E6x|fZH?;HmCM%J3mrU6Ycqoaj2jR zn@e{xAAf&e>3DYnd3C+|cU{kSB}UdZ)6Q-Olb_pVtvrKTkEShMQ;Cd`;f(Cn<(cq6 zLHIOJ=|KMIgS3}o_)H!av5z6A4?0(@&#_k==?ItjrOLupfd%iuqqhmcPkr@_m+u5B z#;B|@s)yOSFJ_rfTx8;EdD|2Qg)lVn?VgW-Rtfa-iKMTkbg2*o1$mtmrx8JYy%;PJ z=?{TK!8&yX_ISJl3qDmKQS{l4V2MZs66GErZ31Rj0upr{?zlG-J87Rf&MA`KS=0rV zNGc#7jHC$D-@2#m?dtFXC{9d88G_mG0p4+5><8nZG$jSil$cO4nEg879a(K37zex5 zfZ(LrXGDQ<6!4CZqNfCmgD@aC(pnlhV0KQxJEi;*Fb=wJan#<#0nAPYct`a=rM~9x z#5)GNnOF2DJNaVd>+ALTvazBy51pK5ZST*ohbvY;Bj}h7y5CQq^uH|Gs!))=VT2f7 zEt_*QoSr$>Cg(iZ1-;erQ7=^XsgQ5eJE_HaU-`|!lEwbp^42f7Q@xzIeWad*MAnr? ztc<;rmmLe!NM@sJ%VX~k7J6qFaBM(E6#E)~*eJ_3(fxJX@`0OaVTfvp`Od_!bm@6BSKf+g$PR!@m3(q#p{9HBRX&bf{5FR`6zG<9tg=FfD_Ls&;9QZKJWowZ&pVgg}W zdKQ4y+=qISAa=;pYc=q&*peSg_e;6hV!S&OfChKhsS`WY-J?6!jP#JOgPn$8V9N!- zSPp{?g4p3qa36Sg@gy($8FG&7`dK!emTj*ym@OtU*MFd ztJRdrqji(+s?TU)lS$!`ww$u%mu|^xQN`%))4q|Sy|S(Yn-}KX=za^EB9@ecmIhX4 zKbrx)8PknI!+3F@#Csdsx==%zJ%`VD*(9wavP_2Gx}(f-%2kF5HJm|<0$k55WXdBl zH_KSYomz^!Pl&ACO8gScZ{kEd*%t{5uxCO{8|m=|J8tAwoQI!AuFOHkw1X>b7rRdd zuhLGZZ8|Kn2UizLCUe{_zoi&&V# zca7NbUeS_dlbt;1ZC@-{o>YLEm28{=)^{+T0BTlPPa_BnQse;`thK14!0aMG&9W?# z*l}s6(C@%?2{?{+*&6bL)vTbcn)S4JuK@30Iz0j)iF~0hSl_{?33vy|xeF#o{-h_S z^)l6enrQ^+=kId)d%vp)Ha}XA)uU?TSgTSWzGwCRQvKs}ok98&ZAajx%CM#gB zh8s&4=7Ml{HV*17?ou;q!@w+z#nd;)!){^mB9pdv;giY}h{0Z1-<`BSs8D>R#F)n=ugtHv46v zc)Lm5!SZgtNSVn<$wL{2eqrKI{vnyEDQHY&{c^zU=YVGK$<6O)jUAv96z`MmomyTocO@>Ci}>Ar?zk3!{t^?xVuKeK_E7Yw4}Os0*gkAGKK}8ci}fj zC9UtT_a|(}-0qqp)hE0^SHoRai7RpZCc^IZXW!bgp{r{~><$KQS0-zQiKUK4`es_1 z6Ea`Wo~<*L_L@R8MXfC@if;tBBo-M=`RpF1RY<6kX<4JVOw4g7jTeEC$fgofI(zW`_d#)s1CW1_58D5YQuk^V28n z>j`tI4wTf$x*7UCc;8t~#}WD3Atp_Fk2&Qe$tlg2o9zj?8t5B6ajw=}DC+%Y&g|b; z2I)o8V{7K*k~eiu+K=X3h+siabnwnp;A=L|i=z&IU%p+XChz#vjSmcj`y+7ME&;%z zo-r^v+r;o~(QmFxfc3umTksbUsCzf|W9od09=bBAE>O8ljVOv=im`S=>X)5S6@F9uwf*NBLpw^EnM%$oE&EL?$m2)i=mMNV(y~0Ia>{ai&Iy^lWi5R+ ztc7;LbO;!Z$Klo%mqK7G%~Ox$aT$qYb-lsWZ`gllt`?)0n8=IEDwPGWR>#3dsd^L% zS%z+5qoHM~eWc{2SNgo%ay>_Lm?K0b)9A*_s#BR8J|9c|a^Kc0aKl+{eat-RQ8dP(Aa=MEP~lvalYa1=01?|n5u%U1q7-3roUr;KPf@?5 z4|LYz)r|1&HyA#ddgwr&&q1mm%pzw|CXY=H+NoO1+nvO9VHoxtbYs5j~zz=HN+q( zybsK-M)Hs+aSXD}LTTXDhV*FSExMyV&T)4=>C&p-x%71z*d$4L`}w^tttuXCvPtwF z4N8;46+{ef4m`)0o=)qWWaG!m+HO_XpCCYX)6+w;gUdy?I;IpRk_r$1#j1gcI#c_I zrRmfpMqU1;Ta#{X|2!!o$125G1b7QqufyVOr9*!%vE^`)5>OW$>LZs_3DzczL^M#t z1owTk{{wWl0?i1L|Axpr{?}da z_O3-r@aMEzQ@i9yL6JbKyz0v{;+|A!L*>vDqJ8;+p1Gc8NxhGc`Oda3!}whB60?cQ zmB-qq&1h#<`$c^{ob2HisG=gEn=AcvV@SW*l857K&BlJKkR~QyeV{A*cCD(STALqf9p0M~DG0COfh`5>{ znP%W+7K--rPU=1?ws7cM6Uhy7n1RMF{_w*0l%-ES%TH2~BXwPHb&%sX_;kI-TFH2< z?m6T`C1sxKNMvMPIn(UOXDc$RO-$?^xepVASR?`)hlr>$Pf$o(iR|kt*MAI^EnKV> zHVB>8ppNbAkZAI0obD^Q8ti*A_#saH$>^(Wu(tm$&}4|YX2*jaUh4t&1Y@6rB|uCU zC{M2n9Ka5rG(dTRVBR=@z@r^_o2JCwlnDi~i#!70b6Pm-=doZn^;-i)Zh(Au*|JhW z$XDY6RKL;6f1M{}^iHh)_snY^C>{8bxs+y-Q$bEt1*V^lbW5Zw3I}!A#`)YZlx!}C z$UqzCaD2<<<7s48uPnZtlh>VUfV3dk8drv-S#01ovwU9D+Jc;i=A%{NGqmd*tl07M1%bRr4{hl5Gs>j_N101H z_3|vi$2j^w1SLaX7R(xcIBzPMHW^v>nIVF0A{|GkZ-H_5w@qnay2vOq+C1C&rH3l= zFCEGlEmVwq#i-Oiq1>7$xQ3;M+2jy~bVcaCDBusmJ{p_RSLYN%1@id<(dc7=Xt^vB zlx*%z81J@ZH<>N&{{c+JS`yYCGe2W0v?Q~ira(zsU<7`yC27*a`CMWAmO3JN$i6Q3 zRAcb#A*DiPDc5+V9~asz53%<$=Ek#7SzfxoAge~HYgeto~+{Yiom0hxP zB)Q=zGZy2Drgr8aqxjf195e1H424fCm$WST?4n)vgh-)nQweUgE@A&}GLiSma56OK zQ{A|CZ~Z#33kS4Ks<4al*W0^70x?#Ei~NDn6B38HyC*0+vs0vi;Cyb;T*3V5~=w z0IY-OgxnkI{anSc=gSrCyU>KP05?8_vTGD4_x zW9-?NNoBH(C2NFl`u=?HpYO-}}6fYEKC$o z=0=ZQC&>+EyH3-Pr@4>#!>RMlVbu94+WvF%k=rrUeQnx6P%LIcm&&ZAJOqBhE;8Jc z4p`$%eIu{QIjgQAf;89cP-Z$FW+2+)PJuLbqP%+vIb;=>*!56m1&+R!oEx!MZX0a5pRT zX3Z6Eo_Cn|p$l35XtN1vsEpu!vvED0+=$Kbb1qi6qn+7^#5vGgm{X|8fluE%V+_ZE z>T->#E2q4l53#bhW2Ez|HW#??&-n<-h}sjuJEodQ(^WHK7Te-DLsXLKEJ;6e`{oE_y9oe99;Zdrji6WvOyH0|lqg4kF0h2^lA;75Q6&4jIS zQ|4sMo-*Dn6_LB^Ay69`-=y23o1v%$XyVBg;%ht?B}jX@qhO(_XDANGvitl4sj?gv ze)X?E5e!+SnIOfPJP;j6{Jrm4O~mM`5RT1()D_0S3Omv>?_8_aB)UnVR=F3;gK{l( zj)C^#a7%$O)zUK>+)Xdm^hi8BWq^I@q~lB04TD@Y#Y3^EDG9g-#RBl-S%JOd>_fRZj>ZPjYT$#Oz&j#bx z$n*eoH{(R8Oyn>6166h;B})P88Z`kXaDT8V;BBQHDKZ|Etoo?{cu$dvi)4JR4rN{f zP_Gs7MQ=xlp#lfgt}G#x@T^4(H!Hv$nu*RB#tH0TO8t?q;ebK7Jud24C_d``Hh5P0m_lyl*)?|Qa{S|t=j8a&hkv~iQ!R!L1vM2Qqk62 zk*Wmd(;wu8l105r9wU=aj~zC$#HeOOFkiPq3EHC)>c@MZ<#>-W_OOw>(6BP)HHbh@ zrX_X`_0+x_JCnc1@^sDp-mGM$gSXX~4#Sggb@yb_cXX zftuWJ@8CgI@kJLs2G%4_g$<(I;tNP7*I%}XEBfxeedJb#{^^WWO@3Mk$@}@EKP^(x zWfS4>Jfnq%HCqgpoCrvJ{{uc!-RJY)Zv35QtJMcrd%Hy}I?R5FQ;_aA%x6Q0DswLf zTxJcnQC$uLVl!R*XJ+E^m)9Il_=Lz_x(eBstQ?u;Kb9kTxd4qHx%z}^Iwoab87=s*YF>fH1qe~Avuz|hEHW{MKYUA_s~g$NCxpZD z4ncpfy?(8|*Dr1(V^m{b0bbtGBvcW9Z21P7O*7kMl25yM#)^H{S{zg)4`a+Jggkz8 zZ;MjrjyLxD?c*9C4RCJ8U?#vf)x=Y1ngBb5u6+b`}d$bKM%sY9`Ks~^9vd`t+8 zSjv(*u&#u{WeY&bzp*iJ?Dd}~1F5z2BL zeg~$i0G(2?$MrNYIlV26Tk5Jnulqq5=^BG!fAusx^T#d z3d#5MC#pQ`n&-@h?y3h*!FY9e8M$s}2Hd}nEfQpFm`|pcOS|6Rg(NSo7*@9G@X^HIgRabGL};GQ7z-ksRM%5n-^8ed z`-r7zAuR=s69x#d<;ir|=%^5VOqQvr;B$VJ@h54#Lk85HC@C#&-g~nxAUJq2OE1Hw zx)UJil_{68#eIw=vI&*Cq}voimlzFqor}LY*{Kwk+mR;1wK4!%(N$X~xwXbG#{EXI zbiFD!*D%gj^!XIL85sa=E-ma{F|GgQSqsT{Q|T#+xP4$?16teayApG^n!nzu#6YeWyDzIV%=9qimnY-^Q;V@pnN{eye{$3y-(M_=T^ zTBl|6LnvOhg?l8+L;&6=kimgx0rAYdEu~h}F;8qgn9bv4>@#8{N_^=!1b2RrR@jAz zXi&S>uS;xD9Q;BPHRC1-HL)el9DTiuy&qHqSdvU4jZ6z{+yQoEjOr|^Ya`$%ETZ!{ zHie+>*i%V0)9vlCzB!_o&?hthx%08#ea{xqi%rViDZgu+u`$wmZ~U*%=_^lkhrnmt zIhRl8J&E5bsG}}A@k;ovTcqz*jOEpJ0#7C&9#ezCVPz6`t=h*gGGGL)qfO}iSo)yF z)`Z@&3dCOCgp+bx1-EJ1&z%&@n)JH)iK9~&oh{Q#aM~H zk^YO^n?EXA=pN6Ql+NjL!EfXbro*r$@2CDH()@j Date: Tue, 5 Nov 2024 20:24:23 +0800 Subject: [PATCH 37/51] docs: migrating legacy docs --- .../components/antd/modal/__init__.py | 6 +- docs/__init__.py | 98 ------------- docs/api/app.py | 2 +- docs/app.py | 131 ++++++++++++++---- docs/components/WaterfallGallery/app.py | 6 - .../{ => legacy}/Chatbot/README-zh_CN.md | 0 .../components/{ => legacy}/Chatbot/README.md | 0 .../Chatbot}/app.py | 2 +- .../{ => legacy}/Chatbot/demos/accordion.py | 0 .../{ => legacy}/Chatbot/demos/basic.py | 0 .../{ => legacy}/Chatbot/demos/chart.py | 0 .../Chatbot/demos/message_config.py | 0 .../{ => legacy}/Chatbot/demos/multi_bots.py | 0 .../{ => legacy}/Chatbot/demos/multimodal.py | 0 .../{ => legacy}/Chatbot/demos/select-box.py | 0 docs/components/{ => legacy}/Docs.py | 0 .../{ => legacy}/Flow/README-zh_CN.md | 0 docs/components/{ => legacy}/Flow/README.md | 0 .../{Chatbot => legacy/Flow}/app.py | 2 +- .../{ => legacy}/Flow/define_schema-zh_CN.md | 0 .../{ => legacy}/Flow/define_schema.md | 0 .../{ => legacy}/Flow/demos/basic.py | 0 .../Flow/demos/component_options.py | 0 .../Flow/demos/custom_node_type.py | 0 .../Flow/schema/agents_schema.json | 0 .../{ => legacy}/Flow/schema/agents_schema.py | 0 .../{ => legacy}/Lifecycle/README-zh_CN.md | 0 .../{ => legacy}/Lifecycle/README.md | 0 .../{Flow => legacy/Lifecycle}/app.py | 2 +- .../{ => legacy}/Lifecycle/demos/basic.py | 0 .../Lifecycle/demos/language_adaptation.py | 0 .../Lifecycle/demos/theme_adaptation.py | 0 .../{ => legacy}/Markdown/README-zh_CN.md | 0 .../{ => legacy}/Markdown/README.md | 0 docs/components/{ => legacy}/Markdown/app.py | 2 +- .../Markdown/custom_tags/accordion-zh_CN.md | 0 .../Markdown/custom_tags/accordion.md | 0 .../Markdown/custom_tags/chart-zh_CN.md | 0 .../Markdown/custom_tags/chart.md | 0 .../Markdown/custom_tags/select-box-zh_CN.md | 0 .../Markdown/custom_tags/select-box.md | 0 .../{ => legacy}/Markdown/demos/accordion.py | 0 .../{ => legacy}/Markdown/demos/basic.py | 0 .../{ => legacy}/Markdown/demos/chart.py | 0 .../{ => legacy}/Markdown/demos/custom-tag.py | 0 .../Markdown/demos/custom-tag2.py | 0 .../Markdown/demos/custom-tag3.py | 0 .../Markdown/demos/custom-tag4.py | 0 .../custom_tags/accordion/accordion-title.py | 0 .../demos/custom_tags/accordion/basic.py | 0 .../Markdown/demos/custom_tags/chart/basic.py | 0 .../demos/custom_tags/select-box/basic.py | 0 .../custom_tags/select-box/card_shape.py | 0 .../select-box/card_shape_width_auto.py | 0 .../custom_tags/select-box/python_events.py | 0 .../{ => legacy}/Markdown/demos/multimodal.py | 0 .../{ => legacy}/Markdown/demos/select-box.py | 0 .../MultimodalInput/README-zh_CN.md | 0 .../{ => legacy}/MultimodalInput/README.md | 0 .../MultimodalInput}/app.py | 2 +- .../MultimodalInput/demos/basic.py | 0 .../MultimodalInput/demos/config_buttons.py | 0 .../MultimodalInput/demos/upload_sources.py | 0 .../MultimodalInput/demos/with_chatbot.py | 0 docs/{ => components/legacy}/README-zh_CN.md | 0 docs/{ => components/legacy}/README.md | 0 .../WaterfallGallery/README-zh_CN.md | 0 .../{ => legacy}/WaterfallGallery/README.md | 0 .../components/legacy/WaterfallGallery/app.py | 6 + .../WaterfallGallery/demos/basic.py | 0 .../demos/like_click_feedback.py | 0 .../WaterfallGallery/demos/load_more.py | 0 .../demos/responsive_columns.py | 0 docs/components/legacy/app.py | 35 +++++ .../components/{ => legacy}/parse_markdown.py | 0 .../{ => legacy}/resources/audio.wav | Bin .../{ => legacy}/resources/bot.jpeg | Bin .../custom_components/custom_select.js | 0 .../components/{ => legacy}/resources/dog.mp4 | Bin .../{ => legacy}/resources/image-bot.jpeg | Bin .../{ => legacy}/resources/modelscope.svg | 0 .../{ => legacy}/resources/music-bot.jpeg | Bin .../{ => legacy}/resources/screen.jpeg | Bin .../{ => legacy}/resources/user.jpeg | Bin docs/components/{ => legacy}/tab-link.js | 0 docs/helper/Site.py | 77 ++++++---- docs/legacy_app.py | 6 + frontend/legacy/Chatbot/Awaited.svelte | 4 +- frontend/legacy/Markdown/Awaited.svelte | 3 +- frontend/utils/upload.ts | 5 +- 90 files changed, 219 insertions(+), 170 deletions(-) delete mode 100644 docs/__init__.py delete mode 100644 docs/components/WaterfallGallery/app.py rename docs/components/{ => legacy}/Chatbot/README-zh_CN.md (100%) rename docs/components/{ => legacy}/Chatbot/README.md (100%) rename docs/components/{MultimodalInput => legacy/Chatbot}/app.py (68%) rename docs/components/{ => legacy}/Chatbot/demos/accordion.py (100%) rename docs/components/{ => legacy}/Chatbot/demos/basic.py (100%) rename docs/components/{ => legacy}/Chatbot/demos/chart.py (100%) rename docs/components/{ => legacy}/Chatbot/demos/message_config.py (100%) rename docs/components/{ => legacy}/Chatbot/demos/multi_bots.py (100%) rename docs/components/{ => legacy}/Chatbot/demos/multimodal.py (100%) rename docs/components/{ => legacy}/Chatbot/demos/select-box.py (100%) rename docs/components/{ => legacy}/Docs.py (100%) rename docs/components/{ => legacy}/Flow/README-zh_CN.md (100%) rename docs/components/{ => legacy}/Flow/README.md (100%) rename docs/components/{Chatbot => legacy/Flow}/app.py (68%) rename docs/components/{ => legacy}/Flow/define_schema-zh_CN.md (100%) rename docs/components/{ => legacy}/Flow/define_schema.md (100%) rename docs/components/{ => legacy}/Flow/demos/basic.py (100%) rename docs/components/{ => legacy}/Flow/demos/component_options.py (100%) rename docs/components/{ => legacy}/Flow/demos/custom_node_type.py (100%) rename docs/components/{ => legacy}/Flow/schema/agents_schema.json (100%) rename docs/components/{ => legacy}/Flow/schema/agents_schema.py (100%) rename docs/components/{ => legacy}/Lifecycle/README-zh_CN.md (100%) rename docs/components/{ => legacy}/Lifecycle/README.md (100%) rename docs/components/{Flow => legacy/Lifecycle}/app.py (68%) rename docs/components/{ => legacy}/Lifecycle/demos/basic.py (100%) rename docs/components/{ => legacy}/Lifecycle/demos/language_adaptation.py (100%) rename docs/components/{ => legacy}/Lifecycle/demos/theme_adaptation.py (100%) rename docs/components/{ => legacy}/Markdown/README-zh_CN.md (100%) rename docs/components/{ => legacy}/Markdown/README.md (100%) rename docs/components/{ => legacy}/Markdown/app.py (90%) rename docs/components/{ => legacy}/Markdown/custom_tags/accordion-zh_CN.md (100%) rename docs/components/{ => legacy}/Markdown/custom_tags/accordion.md (100%) rename docs/components/{ => legacy}/Markdown/custom_tags/chart-zh_CN.md (100%) rename docs/components/{ => legacy}/Markdown/custom_tags/chart.md (100%) rename docs/components/{ => legacy}/Markdown/custom_tags/select-box-zh_CN.md (100%) rename docs/components/{ => legacy}/Markdown/custom_tags/select-box.md (100%) rename docs/components/{ => legacy}/Markdown/demos/accordion.py (100%) rename docs/components/{ => legacy}/Markdown/demos/basic.py (100%) rename docs/components/{ => legacy}/Markdown/demos/chart.py (100%) rename docs/components/{ => legacy}/Markdown/demos/custom-tag.py (100%) rename docs/components/{ => legacy}/Markdown/demos/custom-tag2.py (100%) rename docs/components/{ => legacy}/Markdown/demos/custom-tag3.py (100%) rename docs/components/{ => legacy}/Markdown/demos/custom-tag4.py (100%) rename docs/components/{ => legacy}/Markdown/demos/custom_tags/accordion/accordion-title.py (100%) rename docs/components/{ => legacy}/Markdown/demos/custom_tags/accordion/basic.py (100%) rename docs/components/{ => legacy}/Markdown/demos/custom_tags/chart/basic.py (100%) rename docs/components/{ => legacy}/Markdown/demos/custom_tags/select-box/basic.py (100%) rename docs/components/{ => legacy}/Markdown/demos/custom_tags/select-box/card_shape.py (100%) rename docs/components/{ => legacy}/Markdown/demos/custom_tags/select-box/card_shape_width_auto.py (100%) rename docs/components/{ => legacy}/Markdown/demos/custom_tags/select-box/python_events.py (100%) rename docs/components/{ => legacy}/Markdown/demos/multimodal.py (100%) rename docs/components/{ => legacy}/Markdown/demos/select-box.py (100%) rename docs/components/{ => legacy}/MultimodalInput/README-zh_CN.md (100%) rename docs/components/{ => legacy}/MultimodalInput/README.md (100%) rename docs/components/{Lifecycle => legacy/MultimodalInput}/app.py (68%) rename docs/components/{ => legacy}/MultimodalInput/demos/basic.py (100%) rename docs/components/{ => legacy}/MultimodalInput/demos/config_buttons.py (100%) rename docs/components/{ => legacy}/MultimodalInput/demos/upload_sources.py (100%) rename docs/components/{ => legacy}/MultimodalInput/demos/with_chatbot.py (100%) rename docs/{ => components/legacy}/README-zh_CN.md (100%) rename docs/{ => components/legacy}/README.md (100%) rename docs/components/{ => legacy}/WaterfallGallery/README-zh_CN.md (100%) rename docs/components/{ => legacy}/WaterfallGallery/README.md (100%) create mode 100644 docs/components/legacy/WaterfallGallery/app.py rename docs/components/{ => legacy}/WaterfallGallery/demos/basic.py (100%) rename docs/components/{ => legacy}/WaterfallGallery/demos/like_click_feedback.py (100%) rename docs/components/{ => legacy}/WaterfallGallery/demos/load_more.py (100%) rename docs/components/{ => legacy}/WaterfallGallery/demos/responsive_columns.py (100%) create mode 100644 docs/components/legacy/app.py rename docs/components/{ => legacy}/parse_markdown.py (100%) rename docs/components/{ => legacy}/resources/audio.wav (100%) rename docs/components/{ => legacy}/resources/bot.jpeg (100%) rename docs/components/{ => legacy}/resources/custom_components/custom_select.js (100%) rename docs/components/{ => legacy}/resources/dog.mp4 (100%) rename docs/components/{ => legacy}/resources/image-bot.jpeg (100%) rename docs/components/{ => legacy}/resources/modelscope.svg (100%) rename docs/components/{ => legacy}/resources/music-bot.jpeg (100%) rename docs/components/{ => legacy}/resources/screen.jpeg (100%) rename docs/components/{ => legacy}/resources/user.jpeg (100%) rename docs/components/{ => legacy}/tab-link.js (100%) create mode 100644 docs/legacy_app.py diff --git a/backend/modelscope_studio/components/antd/modal/__init__.py b/backend/modelscope_studio/components/antd/modal/__init__.py index 3b1384a7..b223bb41 100644 --- a/backend/modelscope_studio/components/antd/modal/__init__.py +++ b/backend/modelscope_studio/components/antd/modal/__init__.py @@ -12,9 +12,9 @@ class AntdModal(ModelScopeLayoutComponent): Ant Design: https://ant.design/components/modal """ EVENTS = [ - EventListener("ok", - callback=lambda block: block._internal.update( - bind_cancel_event=True)), + EventListener( + "ok", + callback=lambda block: block._internal.update(bind_ok_event=True)), EventListener("cancel", callback=lambda block: block._internal.update( bind_cancel_event=True)) diff --git a/docs/__init__.py b/docs/__init__.py deleted file mode 100644 index bf964f34..00000000 --- a/docs/__init__.py +++ /dev/null @@ -1,98 +0,0 @@ -import os -from typing import Literal - -from helper.Site import Site - -import modelscope_studio.components.antd as antd -import modelscope_studio.components.base as ms - - -def get_docs(file_path: str, type: Literal["antd", "base"]): - import importlib.util - - components = [] - components_dir = os.path.join(os.path.dirname(file_path), "components", - type) - for dir in os.listdir(components_dir): - abs_dir = os.path.join(components_dir, dir) - if os.path.isdir(abs_dir): - app_file = os.path.join(abs_dir, "app.py") - if os.path.exists(app_file): - components.append(dir) - - docs = {} - for component in components: - spec = importlib.util.spec_from_file_location( - "doc", os.path.join(components_dir, component, "app.py")) - module = importlib.util.module_from_spec(spec) - spec.loader.exec_module(module) - docs[component] = module - return docs - - -base_docs = get_docs(__file__, "base") -antd_docs = get_docs(__file__, "antd") - -default_active_tab = "antd" - -base_menu_items = [{"label": "Application", "key": "application"}] - -antd_menu_items = [{ - "label": - "General", - "type": - "group", - "children": [{ - "label": "Button", - "key": "button" - }, { - "label": "FloatButton", - "key": "float_button" - }] -}, { - "label": "Layout", - "type": "group", - "children": [{ - "label": "Divider", - "key": "divider" - }] -}] - -tabs = [{ - "label": "Base", - "key": "base", - "default_active_key": "application", - "menus": base_menu_items -}, { - "label": "Antd", - "key": "antd", - "default_active_key": "button", - "menus": antd_menu_items -}] - - -def logo(): - with antd.Flex(align='center', gap=8): - antd.Image(os.path.join(os.path.dirname(__file__), - "./resources/modelscope.png"), - preview=False, - height=32) - ms.Span('✖️') - antd.Image(os.path.join(os.path.dirname(__file__), - "./resources/gradio.png"), - preview=False, - height=64) - - -site = Site(tabs=tabs, - docs={ - **antd_docs, - **base_docs - }, - default_active_tab=default_active_tab, - logo=logo) - -demo = site.render() - -if __name__ == "__main__": - demo.launch() diff --git a/docs/api/app.py b/docs/api/app.py index 85d6e013..6f651d0b 100644 --- a/docs/api/app.py +++ b/docs/api/app.py @@ -1,6 +1,6 @@ import os -from components.Docs import Docs +from components.legacy.Docs import Docs def resolve(relative_path: str): diff --git a/docs/app.py b/docs/app.py index 1d93e6b4..986d12d5 100644 --- a/docs/app.py +++ b/docs/app.py @@ -1,30 +1,107 @@ -import gradio as gr -from api.app import docs as api_docs -from components.Chatbot.app import docs as chatbot_docs -from components.Docs import Docs -from components.Flow.app import docs as flow_docs -from components.Lifecycle.app import docs as lifecycle_docs -from components.Markdown.app import docs as markdown_docs -from components.MultimodalInput.app import docs as multimodel_input_docs -from components.WaterfallGallery.app import docs as waterfall_gallery_docs - -readme_docs = Docs(__file__) - -docs = [ - ["Quick Start", readme_docs], - ["API", api_docs], - ["Chatbot", chatbot_docs], - ["MultimodalInput", multimodel_input_docs], - ["Markdown", markdown_docs], - ["Lifecycle", lifecycle_docs], - ["WaterfallGallery", waterfall_gallery_docs], - ["Flow", flow_docs], +import os +from typing import Literal + +from helper.Site import Site +from legacy_app import legacy_demo + +import modelscope_studio.components.antd as antd +import modelscope_studio.components.base as ms + + +def get_docs(file_path: str, type: Literal["antd", "base"]): + import importlib.util + + components = [] + components_dir = os.path.join(os.path.dirname(file_path), "components", + type) + for dir in os.listdir(components_dir): + abs_dir = os.path.join(components_dir, dir) + if os.path.isdir(abs_dir): + app_file = os.path.join(abs_dir, "app.py") + if os.path.exists(app_file): + components.append(dir) + + docs = {} + for component in components: + spec = importlib.util.spec_from_file_location( + "doc", os.path.join(components_dir, component, "app.py")) + module = importlib.util.module_from_spec(spec) + spec.loader.exec_module(module) + docs[component] = module + return docs + + +base_docs = get_docs(__file__, "base") +antd_docs = get_docs(__file__, "antd") + +default_active_tab = "antd" + +base_menu_items = [{"label": "Application", "key": "application"}] + +antd_menu_items = [{ + "label": + "General", + "type": + "group", + "children": [{ + "label": "Button", + "key": "button" + }, { + "label": "FloatButton", + "key": "float_button" + }] +}, { + "label": "Layout", + "type": "group", + "children": [{ + "label": "Divider", + "key": "divider" + }] +}] + +tabs = [ + { + "label": "Base", + "key": "base", + "default_active_key": "application", + "menus": base_menu_items + }, + { + "label": "Antd", + "key": "antd", + "default_active_key": "button", + "menus": antd_menu_items + }, + { + "label": "Legacy", + "key": "legacy", + "content": legacy_demo + }, ] -with gr.Blocks() as demo: - with gr.Tabs() as components_tabs: - for doc in docs: - with gr.TabItem(doc[0], id=doc[0]): - doc[1].render(components_tabs) -demo.queue().launch() +def logo(): + with antd.Flex(align='center', gap=8): + antd.Image(os.path.join(os.path.dirname(__file__), + "./resources/modelscope.png"), + preview=False, + height=32) + ms.Span('✖️') + antd.Image(os.path.join(os.path.dirname(__file__), + "./resources/gradio.png"), + preview=False, + height=64) + + +site = Site(tabs=tabs, + docs={ + **antd_docs, + **base_docs + }, + default_active_tab=default_active_tab, + logo=logo) + +demo = site.render() + +if __name__ == "__main__": + demo.launch() diff --git a/docs/components/WaterfallGallery/app.py b/docs/components/WaterfallGallery/app.py deleted file mode 100644 index 77372ef2..00000000 --- a/docs/components/WaterfallGallery/app.py +++ /dev/null @@ -1,6 +0,0 @@ -from components.Docs import Docs - -docs = Docs(__file__) - -if __name__ == "__main__": - docs.render().queue().launch() diff --git a/docs/components/Chatbot/README-zh_CN.md b/docs/components/legacy/Chatbot/README-zh_CN.md similarity index 100% rename from docs/components/Chatbot/README-zh_CN.md rename to docs/components/legacy/Chatbot/README-zh_CN.md diff --git a/docs/components/Chatbot/README.md b/docs/components/legacy/Chatbot/README.md similarity index 100% rename from docs/components/Chatbot/README.md rename to docs/components/legacy/Chatbot/README.md diff --git a/docs/components/MultimodalInput/app.py b/docs/components/legacy/Chatbot/app.py similarity index 68% rename from docs/components/MultimodalInput/app.py rename to docs/components/legacy/Chatbot/app.py index 77372ef2..ea841f78 100644 --- a/docs/components/MultimodalInput/app.py +++ b/docs/components/legacy/Chatbot/app.py @@ -1,4 +1,4 @@ -from components.Docs import Docs +from components.legacy.Docs import Docs docs = Docs(__file__) diff --git a/docs/components/Chatbot/demos/accordion.py b/docs/components/legacy/Chatbot/demos/accordion.py similarity index 100% rename from docs/components/Chatbot/demos/accordion.py rename to docs/components/legacy/Chatbot/demos/accordion.py diff --git a/docs/components/Chatbot/demos/basic.py b/docs/components/legacy/Chatbot/demos/basic.py similarity index 100% rename from docs/components/Chatbot/demos/basic.py rename to docs/components/legacy/Chatbot/demos/basic.py diff --git a/docs/components/Chatbot/demos/chart.py b/docs/components/legacy/Chatbot/demos/chart.py similarity index 100% rename from docs/components/Chatbot/demos/chart.py rename to docs/components/legacy/Chatbot/demos/chart.py diff --git a/docs/components/Chatbot/demos/message_config.py b/docs/components/legacy/Chatbot/demos/message_config.py similarity index 100% rename from docs/components/Chatbot/demos/message_config.py rename to docs/components/legacy/Chatbot/demos/message_config.py diff --git a/docs/components/Chatbot/demos/multi_bots.py b/docs/components/legacy/Chatbot/demos/multi_bots.py similarity index 100% rename from docs/components/Chatbot/demos/multi_bots.py rename to docs/components/legacy/Chatbot/demos/multi_bots.py diff --git a/docs/components/Chatbot/demos/multimodal.py b/docs/components/legacy/Chatbot/demos/multimodal.py similarity index 100% rename from docs/components/Chatbot/demos/multimodal.py rename to docs/components/legacy/Chatbot/demos/multimodal.py diff --git a/docs/components/Chatbot/demos/select-box.py b/docs/components/legacy/Chatbot/demos/select-box.py similarity index 100% rename from docs/components/Chatbot/demos/select-box.py rename to docs/components/legacy/Chatbot/demos/select-box.py diff --git a/docs/components/Docs.py b/docs/components/legacy/Docs.py similarity index 100% rename from docs/components/Docs.py rename to docs/components/legacy/Docs.py diff --git a/docs/components/Flow/README-zh_CN.md b/docs/components/legacy/Flow/README-zh_CN.md similarity index 100% rename from docs/components/Flow/README-zh_CN.md rename to docs/components/legacy/Flow/README-zh_CN.md diff --git a/docs/components/Flow/README.md b/docs/components/legacy/Flow/README.md similarity index 100% rename from docs/components/Flow/README.md rename to docs/components/legacy/Flow/README.md diff --git a/docs/components/Chatbot/app.py b/docs/components/legacy/Flow/app.py similarity index 68% rename from docs/components/Chatbot/app.py rename to docs/components/legacy/Flow/app.py index 77372ef2..ea841f78 100644 --- a/docs/components/Chatbot/app.py +++ b/docs/components/legacy/Flow/app.py @@ -1,4 +1,4 @@ -from components.Docs import Docs +from components.legacy.Docs import Docs docs = Docs(__file__) diff --git a/docs/components/Flow/define_schema-zh_CN.md b/docs/components/legacy/Flow/define_schema-zh_CN.md similarity index 100% rename from docs/components/Flow/define_schema-zh_CN.md rename to docs/components/legacy/Flow/define_schema-zh_CN.md diff --git a/docs/components/Flow/define_schema.md b/docs/components/legacy/Flow/define_schema.md similarity index 100% rename from docs/components/Flow/define_schema.md rename to docs/components/legacy/Flow/define_schema.md diff --git a/docs/components/Flow/demos/basic.py b/docs/components/legacy/Flow/demos/basic.py similarity index 100% rename from docs/components/Flow/demos/basic.py rename to docs/components/legacy/Flow/demos/basic.py diff --git a/docs/components/Flow/demos/component_options.py b/docs/components/legacy/Flow/demos/component_options.py similarity index 100% rename from docs/components/Flow/demos/component_options.py rename to docs/components/legacy/Flow/demos/component_options.py diff --git a/docs/components/Flow/demos/custom_node_type.py b/docs/components/legacy/Flow/demos/custom_node_type.py similarity index 100% rename from docs/components/Flow/demos/custom_node_type.py rename to docs/components/legacy/Flow/demos/custom_node_type.py diff --git a/docs/components/Flow/schema/agents_schema.json b/docs/components/legacy/Flow/schema/agents_schema.json similarity index 100% rename from docs/components/Flow/schema/agents_schema.json rename to docs/components/legacy/Flow/schema/agents_schema.json diff --git a/docs/components/Flow/schema/agents_schema.py b/docs/components/legacy/Flow/schema/agents_schema.py similarity index 100% rename from docs/components/Flow/schema/agents_schema.py rename to docs/components/legacy/Flow/schema/agents_schema.py diff --git a/docs/components/Lifecycle/README-zh_CN.md b/docs/components/legacy/Lifecycle/README-zh_CN.md similarity index 100% rename from docs/components/Lifecycle/README-zh_CN.md rename to docs/components/legacy/Lifecycle/README-zh_CN.md diff --git a/docs/components/Lifecycle/README.md b/docs/components/legacy/Lifecycle/README.md similarity index 100% rename from docs/components/Lifecycle/README.md rename to docs/components/legacy/Lifecycle/README.md diff --git a/docs/components/Flow/app.py b/docs/components/legacy/Lifecycle/app.py similarity index 68% rename from docs/components/Flow/app.py rename to docs/components/legacy/Lifecycle/app.py index 77372ef2..ea841f78 100644 --- a/docs/components/Flow/app.py +++ b/docs/components/legacy/Lifecycle/app.py @@ -1,4 +1,4 @@ -from components.Docs import Docs +from components.legacy.Docs import Docs docs = Docs(__file__) diff --git a/docs/components/Lifecycle/demos/basic.py b/docs/components/legacy/Lifecycle/demos/basic.py similarity index 100% rename from docs/components/Lifecycle/demos/basic.py rename to docs/components/legacy/Lifecycle/demos/basic.py diff --git a/docs/components/Lifecycle/demos/language_adaptation.py b/docs/components/legacy/Lifecycle/demos/language_adaptation.py similarity index 100% rename from docs/components/Lifecycle/demos/language_adaptation.py rename to docs/components/legacy/Lifecycle/demos/language_adaptation.py diff --git a/docs/components/Lifecycle/demos/theme_adaptation.py b/docs/components/legacy/Lifecycle/demos/theme_adaptation.py similarity index 100% rename from docs/components/Lifecycle/demos/theme_adaptation.py rename to docs/components/legacy/Lifecycle/demos/theme_adaptation.py diff --git a/docs/components/Markdown/README-zh_CN.md b/docs/components/legacy/Markdown/README-zh_CN.md similarity index 100% rename from docs/components/Markdown/README-zh_CN.md rename to docs/components/legacy/Markdown/README-zh_CN.md diff --git a/docs/components/Markdown/README.md b/docs/components/legacy/Markdown/README.md similarity index 100% rename from docs/components/Markdown/README.md rename to docs/components/legacy/Markdown/README.md diff --git a/docs/components/Markdown/app.py b/docs/components/legacy/Markdown/app.py similarity index 90% rename from docs/components/Markdown/app.py rename to docs/components/legacy/Markdown/app.py index 4e59b254..7b991a9d 100644 --- a/docs/components/Markdown/app.py +++ b/docs/components/legacy/Markdown/app.py @@ -1,6 +1,6 @@ import os -from components.Docs import Docs +from components.legacy.Docs import Docs def resolve(relative_path: str): diff --git a/docs/components/Markdown/custom_tags/accordion-zh_CN.md b/docs/components/legacy/Markdown/custom_tags/accordion-zh_CN.md similarity index 100% rename from docs/components/Markdown/custom_tags/accordion-zh_CN.md rename to docs/components/legacy/Markdown/custom_tags/accordion-zh_CN.md diff --git a/docs/components/Markdown/custom_tags/accordion.md b/docs/components/legacy/Markdown/custom_tags/accordion.md similarity index 100% rename from docs/components/Markdown/custom_tags/accordion.md rename to docs/components/legacy/Markdown/custom_tags/accordion.md diff --git a/docs/components/Markdown/custom_tags/chart-zh_CN.md b/docs/components/legacy/Markdown/custom_tags/chart-zh_CN.md similarity index 100% rename from docs/components/Markdown/custom_tags/chart-zh_CN.md rename to docs/components/legacy/Markdown/custom_tags/chart-zh_CN.md diff --git a/docs/components/Markdown/custom_tags/chart.md b/docs/components/legacy/Markdown/custom_tags/chart.md similarity index 100% rename from docs/components/Markdown/custom_tags/chart.md rename to docs/components/legacy/Markdown/custom_tags/chart.md diff --git a/docs/components/Markdown/custom_tags/select-box-zh_CN.md b/docs/components/legacy/Markdown/custom_tags/select-box-zh_CN.md similarity index 100% rename from docs/components/Markdown/custom_tags/select-box-zh_CN.md rename to docs/components/legacy/Markdown/custom_tags/select-box-zh_CN.md diff --git a/docs/components/Markdown/custom_tags/select-box.md b/docs/components/legacy/Markdown/custom_tags/select-box.md similarity index 100% rename from docs/components/Markdown/custom_tags/select-box.md rename to docs/components/legacy/Markdown/custom_tags/select-box.md diff --git a/docs/components/Markdown/demos/accordion.py b/docs/components/legacy/Markdown/demos/accordion.py similarity index 100% rename from docs/components/Markdown/demos/accordion.py rename to docs/components/legacy/Markdown/demos/accordion.py diff --git a/docs/components/Markdown/demos/basic.py b/docs/components/legacy/Markdown/demos/basic.py similarity index 100% rename from docs/components/Markdown/demos/basic.py rename to docs/components/legacy/Markdown/demos/basic.py diff --git a/docs/components/Markdown/demos/chart.py b/docs/components/legacy/Markdown/demos/chart.py similarity index 100% rename from docs/components/Markdown/demos/chart.py rename to docs/components/legacy/Markdown/demos/chart.py diff --git a/docs/components/Markdown/demos/custom-tag.py b/docs/components/legacy/Markdown/demos/custom-tag.py similarity index 100% rename from docs/components/Markdown/demos/custom-tag.py rename to docs/components/legacy/Markdown/demos/custom-tag.py diff --git a/docs/components/Markdown/demos/custom-tag2.py b/docs/components/legacy/Markdown/demos/custom-tag2.py similarity index 100% rename from docs/components/Markdown/demos/custom-tag2.py rename to docs/components/legacy/Markdown/demos/custom-tag2.py diff --git a/docs/components/Markdown/demos/custom-tag3.py b/docs/components/legacy/Markdown/demos/custom-tag3.py similarity index 100% rename from docs/components/Markdown/demos/custom-tag3.py rename to docs/components/legacy/Markdown/demos/custom-tag3.py diff --git a/docs/components/Markdown/demos/custom-tag4.py b/docs/components/legacy/Markdown/demos/custom-tag4.py similarity index 100% rename from docs/components/Markdown/demos/custom-tag4.py rename to docs/components/legacy/Markdown/demos/custom-tag4.py diff --git a/docs/components/Markdown/demos/custom_tags/accordion/accordion-title.py b/docs/components/legacy/Markdown/demos/custom_tags/accordion/accordion-title.py similarity index 100% rename from docs/components/Markdown/demos/custom_tags/accordion/accordion-title.py rename to docs/components/legacy/Markdown/demos/custom_tags/accordion/accordion-title.py diff --git a/docs/components/Markdown/demos/custom_tags/accordion/basic.py b/docs/components/legacy/Markdown/demos/custom_tags/accordion/basic.py similarity index 100% rename from docs/components/Markdown/demos/custom_tags/accordion/basic.py rename to docs/components/legacy/Markdown/demos/custom_tags/accordion/basic.py diff --git a/docs/components/Markdown/demos/custom_tags/chart/basic.py b/docs/components/legacy/Markdown/demos/custom_tags/chart/basic.py similarity index 100% rename from docs/components/Markdown/demos/custom_tags/chart/basic.py rename to docs/components/legacy/Markdown/demos/custom_tags/chart/basic.py diff --git a/docs/components/Markdown/demos/custom_tags/select-box/basic.py b/docs/components/legacy/Markdown/demos/custom_tags/select-box/basic.py similarity index 100% rename from docs/components/Markdown/demos/custom_tags/select-box/basic.py rename to docs/components/legacy/Markdown/demos/custom_tags/select-box/basic.py diff --git a/docs/components/Markdown/demos/custom_tags/select-box/card_shape.py b/docs/components/legacy/Markdown/demos/custom_tags/select-box/card_shape.py similarity index 100% rename from docs/components/Markdown/demos/custom_tags/select-box/card_shape.py rename to docs/components/legacy/Markdown/demos/custom_tags/select-box/card_shape.py diff --git a/docs/components/Markdown/demos/custom_tags/select-box/card_shape_width_auto.py b/docs/components/legacy/Markdown/demos/custom_tags/select-box/card_shape_width_auto.py similarity index 100% rename from docs/components/Markdown/demos/custom_tags/select-box/card_shape_width_auto.py rename to docs/components/legacy/Markdown/demos/custom_tags/select-box/card_shape_width_auto.py diff --git a/docs/components/Markdown/demos/custom_tags/select-box/python_events.py b/docs/components/legacy/Markdown/demos/custom_tags/select-box/python_events.py similarity index 100% rename from docs/components/Markdown/demos/custom_tags/select-box/python_events.py rename to docs/components/legacy/Markdown/demos/custom_tags/select-box/python_events.py diff --git a/docs/components/Markdown/demos/multimodal.py b/docs/components/legacy/Markdown/demos/multimodal.py similarity index 100% rename from docs/components/Markdown/demos/multimodal.py rename to docs/components/legacy/Markdown/demos/multimodal.py diff --git a/docs/components/Markdown/demos/select-box.py b/docs/components/legacy/Markdown/demos/select-box.py similarity index 100% rename from docs/components/Markdown/demos/select-box.py rename to docs/components/legacy/Markdown/demos/select-box.py diff --git a/docs/components/MultimodalInput/README-zh_CN.md b/docs/components/legacy/MultimodalInput/README-zh_CN.md similarity index 100% rename from docs/components/MultimodalInput/README-zh_CN.md rename to docs/components/legacy/MultimodalInput/README-zh_CN.md diff --git a/docs/components/MultimodalInput/README.md b/docs/components/legacy/MultimodalInput/README.md similarity index 100% rename from docs/components/MultimodalInput/README.md rename to docs/components/legacy/MultimodalInput/README.md diff --git a/docs/components/Lifecycle/app.py b/docs/components/legacy/MultimodalInput/app.py similarity index 68% rename from docs/components/Lifecycle/app.py rename to docs/components/legacy/MultimodalInput/app.py index 77372ef2..ea841f78 100644 --- a/docs/components/Lifecycle/app.py +++ b/docs/components/legacy/MultimodalInput/app.py @@ -1,4 +1,4 @@ -from components.Docs import Docs +from components.legacy.Docs import Docs docs = Docs(__file__) diff --git a/docs/components/MultimodalInput/demos/basic.py b/docs/components/legacy/MultimodalInput/demos/basic.py similarity index 100% rename from docs/components/MultimodalInput/demos/basic.py rename to docs/components/legacy/MultimodalInput/demos/basic.py diff --git a/docs/components/MultimodalInput/demos/config_buttons.py b/docs/components/legacy/MultimodalInput/demos/config_buttons.py similarity index 100% rename from docs/components/MultimodalInput/demos/config_buttons.py rename to docs/components/legacy/MultimodalInput/demos/config_buttons.py diff --git a/docs/components/MultimodalInput/demos/upload_sources.py b/docs/components/legacy/MultimodalInput/demos/upload_sources.py similarity index 100% rename from docs/components/MultimodalInput/demos/upload_sources.py rename to docs/components/legacy/MultimodalInput/demos/upload_sources.py diff --git a/docs/components/MultimodalInput/demos/with_chatbot.py b/docs/components/legacy/MultimodalInput/demos/with_chatbot.py similarity index 100% rename from docs/components/MultimodalInput/demos/with_chatbot.py rename to docs/components/legacy/MultimodalInput/demos/with_chatbot.py diff --git a/docs/README-zh_CN.md b/docs/components/legacy/README-zh_CN.md similarity index 100% rename from docs/README-zh_CN.md rename to docs/components/legacy/README-zh_CN.md diff --git a/docs/README.md b/docs/components/legacy/README.md similarity index 100% rename from docs/README.md rename to docs/components/legacy/README.md diff --git a/docs/components/WaterfallGallery/README-zh_CN.md b/docs/components/legacy/WaterfallGallery/README-zh_CN.md similarity index 100% rename from docs/components/WaterfallGallery/README-zh_CN.md rename to docs/components/legacy/WaterfallGallery/README-zh_CN.md diff --git a/docs/components/WaterfallGallery/README.md b/docs/components/legacy/WaterfallGallery/README.md similarity index 100% rename from docs/components/WaterfallGallery/README.md rename to docs/components/legacy/WaterfallGallery/README.md diff --git a/docs/components/legacy/WaterfallGallery/app.py b/docs/components/legacy/WaterfallGallery/app.py new file mode 100644 index 00000000..ea841f78 --- /dev/null +++ b/docs/components/legacy/WaterfallGallery/app.py @@ -0,0 +1,6 @@ +from components.legacy.Docs import Docs + +docs = Docs(__file__) + +if __name__ == "__main__": + docs.render().queue().launch() diff --git a/docs/components/WaterfallGallery/demos/basic.py b/docs/components/legacy/WaterfallGallery/demos/basic.py similarity index 100% rename from docs/components/WaterfallGallery/demos/basic.py rename to docs/components/legacy/WaterfallGallery/demos/basic.py diff --git a/docs/components/WaterfallGallery/demos/like_click_feedback.py b/docs/components/legacy/WaterfallGallery/demos/like_click_feedback.py similarity index 100% rename from docs/components/WaterfallGallery/demos/like_click_feedback.py rename to docs/components/legacy/WaterfallGallery/demos/like_click_feedback.py diff --git a/docs/components/WaterfallGallery/demos/load_more.py b/docs/components/legacy/WaterfallGallery/demos/load_more.py similarity index 100% rename from docs/components/WaterfallGallery/demos/load_more.py rename to docs/components/legacy/WaterfallGallery/demos/load_more.py diff --git a/docs/components/WaterfallGallery/demos/responsive_columns.py b/docs/components/legacy/WaterfallGallery/demos/responsive_columns.py similarity index 100% rename from docs/components/WaterfallGallery/demos/responsive_columns.py rename to docs/components/legacy/WaterfallGallery/demos/responsive_columns.py diff --git a/docs/components/legacy/app.py b/docs/components/legacy/app.py new file mode 100644 index 00000000..b379d049 --- /dev/null +++ b/docs/components/legacy/app.py @@ -0,0 +1,35 @@ +import gradio as gr +from api.app import docs as api_docs +from components.legacy.Chatbot.app import docs as chatbot_docs +from components.legacy.Docs import Docs +from components.legacy.Flow.app import docs as flow_docs +from components.legacy.Lifecycle.app import docs as lifecycle_docs +from components.legacy.Markdown.app import docs as markdown_docs +from components.legacy.MultimodalInput.app import docs as multimodel_input_docs +from components.legacy.WaterfallGallery.app import \ + docs as waterfall_gallery_docs + +import modelscope_studio.components.base as ms + +readme_docs = Docs(__file__) + +docs = [ + ["Quick Start", readme_docs], + ["API", api_docs], + ["Chatbot", chatbot_docs], + ["MultimodalInput", multimodel_input_docs], + ["Markdown", markdown_docs], + ["Lifecycle", lifecycle_docs], + ["WaterfallGallery", waterfall_gallery_docs], + ["Flow", flow_docs], +] + +with gr.Blocks() as legacy_demo: + with ms.Application(): + with gr.Tabs() as components_tabs: + for doc in docs: + with gr.TabItem(doc[0], id=doc[0]): + doc[1].render(components_tabs) + +if __name__ == "__main__": + legacy_demo.launch() diff --git a/docs/components/parse_markdown.py b/docs/components/legacy/parse_markdown.py similarity index 100% rename from docs/components/parse_markdown.py rename to docs/components/legacy/parse_markdown.py diff --git a/docs/components/resources/audio.wav b/docs/components/legacy/resources/audio.wav similarity index 100% rename from docs/components/resources/audio.wav rename to docs/components/legacy/resources/audio.wav diff --git a/docs/components/resources/bot.jpeg b/docs/components/legacy/resources/bot.jpeg similarity index 100% rename from docs/components/resources/bot.jpeg rename to docs/components/legacy/resources/bot.jpeg diff --git a/docs/components/resources/custom_components/custom_select.js b/docs/components/legacy/resources/custom_components/custom_select.js similarity index 100% rename from docs/components/resources/custom_components/custom_select.js rename to docs/components/legacy/resources/custom_components/custom_select.js diff --git a/docs/components/resources/dog.mp4 b/docs/components/legacy/resources/dog.mp4 similarity index 100% rename from docs/components/resources/dog.mp4 rename to docs/components/legacy/resources/dog.mp4 diff --git a/docs/components/resources/image-bot.jpeg b/docs/components/legacy/resources/image-bot.jpeg similarity index 100% rename from docs/components/resources/image-bot.jpeg rename to docs/components/legacy/resources/image-bot.jpeg diff --git a/docs/components/resources/modelscope.svg b/docs/components/legacy/resources/modelscope.svg similarity index 100% rename from docs/components/resources/modelscope.svg rename to docs/components/legacy/resources/modelscope.svg diff --git a/docs/components/resources/music-bot.jpeg b/docs/components/legacy/resources/music-bot.jpeg similarity index 100% rename from docs/components/resources/music-bot.jpeg rename to docs/components/legacy/resources/music-bot.jpeg diff --git a/docs/components/resources/screen.jpeg b/docs/components/legacy/resources/screen.jpeg similarity index 100% rename from docs/components/resources/screen.jpeg rename to docs/components/legacy/resources/screen.jpeg diff --git a/docs/components/resources/user.jpeg b/docs/components/legacy/resources/user.jpeg similarity index 100% rename from docs/components/resources/user.jpeg rename to docs/components/legacy/resources/user.jpeg diff --git a/docs/components/tab-link.js b/docs/components/legacy/tab-link.js similarity index 100% rename from docs/components/tab-link.js rename to docs/components/legacy/tab-link.js diff --git a/docs/helper/Site.py b/docs/helper/Site.py index dd3fd423..4a79db66 100644 --- a/docs/helper/Site.py +++ b/docs/helper/Site.py @@ -39,11 +39,26 @@ def on_tab_menu_select(e: gr.EventData): item = next( (item for item in self.tabs if item["key"] == selected_tab), {}) + if "content" in item: + return { + tab_menu: gr.update(selected_keys=[selected_tab]), + layout_content: gr.update(visible=False), + render_tabs: gr.update(active_key=selected_tab) + } - return gr.update(selected_keys=[selected_tab]), gr.update( - selected_keys=[item["default_active_key"]], - items=item["menus"]), gr.update( - active_key=item["default_active_key"]) + return { + tab_menu: + gr.update(selected_keys=[selected_tab]), + sider_menu: + gr.update(selected_keys=[item.get("default_active_key", None)], + items=item.get("menus", [])), + layout_content_tabs: + gr.update(active_key=item.get("default_active_key", None)), + layout_content: + gr.update(visible=True), + render_tabs: + gr.update(active_key=selected_tab) + } def on_layout_menu_select(e: gr.EventData): selected_menu = e._data["payload"][0]["key"] @@ -78,13 +93,22 @@ def on_layout_menu_select(e: gr.EventData): self.logo.render() tab_menu = antd.Menu( mode="horizontal", - default_selected_keys=[ - self.default_active_tab - ], + selected_keys=[self.default_active_tab], items=self.tabs, elem_style=dict(flex=1, minWidth=0)) + # custom render + with antd.Tabs(active_key=self.default_active_tab, + render_tab_bar="() => null", + elem_style=dict( + maxHeight="100%", + overflow="auto")) as render_tabs: + for tab in self.tabs: + if "content" in tab: + with antd.Tabs.Item(key=tab["key"]): + tab["content"].render() + # menus render with antd.Layout(elem_style=dict( - height="calc(100% - 64px)")): + height="calc(100% - 64px)")) as layout_content: with antd.Layout.Sider(elem_style=dict( height="calc(100vh - 64px)", overflow="auto", @@ -92,29 +116,34 @@ def on_layout_menu_select(e: gr.EventData): backgroundColor= "var(--ms-gr-ant-color-bg-container)")): - layout_menu = antd.Menu( - default_selected_keys=[ - self.default_active_tab_item[ - "default_active_key"] + sider_menu = antd.Menu( + selected_keys=[ + self.default_active_tab_item.get( + "default_active_key", None) ], mode="inline", - items=self.default_active_tab_item["menus"] - ) + items=self.default_active_tab_item.get( + "menus", [])) with antd.Layout(): with antd.Layout.Content(elem_style=dict( padding='12px 28px', overflow="auto")): - with antd.Tabs(default_active_key=self. - default_active_tab_item[ - "default_active_key"], + with antd.Tabs(active_key=self. + default_active_tab_item.get( + "default_active_key", + None), render_tab_bar="() => null" - ) as rendered_tabs: + ) as layout_content_tabs: for tab in self.tabs: - self._render_docs(tab["menus"]) + self._render_docs( + tab.get("menus", [])) - layout_menu.select( + sider_menu.select( fn=on_layout_menu_select, - outputs=[layout_menu, rendered_tabs]) - tab_menu.select( - fn=on_tab_menu_select, - outputs=[tab_menu, layout_menu, rendered_tabs]) + outputs=[sider_menu, layout_content_tabs]) + tab_menu.select(fn=on_tab_menu_select, + outputs=[ + tab_menu, sider_menu, + layout_content_tabs, + layout_content, render_tabs + ]) return demo diff --git a/docs/legacy_app.py b/docs/legacy_app.py new file mode 100644 index 00000000..d7b855df --- /dev/null +++ b/docs/legacy_app.py @@ -0,0 +1,6 @@ +from components.legacy.app import legacy_demo + +demo = legacy_demo + +if __name__ == "__main__": + demo.launch() diff --git a/frontend/legacy/Chatbot/Awaited.svelte b/frontend/legacy/Chatbot/Awaited.svelte index 7b55ea55..d0260566 100644 --- a/frontend/legacy/Chatbot/Awaited.svelte +++ b/frontend/legacy/Chatbot/Awaited.svelte @@ -14,7 +14,7 @@ MarkdownCustomData, MarkdownProps, } from '@modelscope-studio/legacy-compiled'; - import { normalise_file } from '@utils/upload'; + import { gradio_version, normalise_file } from '@utils/upload'; import ChatBot from './shared/ChatBot.svelte'; import { @@ -88,7 +88,7 @@ let _avatar_images: [AvatarImage[], AvatarImage[]]; const redirect_src_url = (src: string): string => { - const replaceStr = `${root}${proxy_url ? `/proxy=${proxy_url.endsWith('/') ? proxy_url.slice(0, -1) : proxy_url}` : ''}/file=`; + const replaceStr = `${root}${proxy_url ? `/proxy=${proxy_url.endsWith('/') ? proxy_url.slice(0, -1) : proxy_url}` : ''}${gradio_version >= 5 ? '/gradio_api' : ''}/file=`; return src.includes(replaceStr) ? src : src.replaceAll('/file=', replaceStr); diff --git a/frontend/legacy/Markdown/Awaited.svelte b/frontend/legacy/Markdown/Awaited.svelte index 909826db..206d8663 100644 --- a/frontend/legacy/Markdown/Awaited.svelte +++ b/frontend/legacy/Markdown/Awaited.svelte @@ -8,6 +8,7 @@ MarkdownCustomData, MarkdownProps, } from '@modelscope-studio/legacy-compiled'; + import { gradio_version } from '@utils/upload'; import Markdown from './shared/Markdown.svelte'; @@ -36,7 +37,7 @@ export let preview = true; export let custom_components: CustomComponents = {}; const redirect_src_url = (src: string): string => { - const replaceStr = `${root}${proxy_url ? `/proxy=${proxy_url.endsWith('/') ? proxy_url.slice(0, -1) : proxy_url}` : ''}/file=`; + const replaceStr = `${root}${proxy_url ? `/proxy=${proxy_url.endsWith('/') ? proxy_url.slice(0, -1) : proxy_url}` : ''}${gradio_version >= 5 ? '/gradio_api' : ''}/file=`; return src?.includes(replaceStr) ? src : src.replaceAll('/file=', replaceStr); diff --git a/frontend/utils/upload.ts b/frontend/utils/upload.ts index 0b1c54c0..476f2bbb 100644 --- a/frontend/utils/upload.ts +++ b/frontend/utils/upload.ts @@ -77,15 +77,14 @@ function get_gradio_version(): string { const match = el.className.match(/gradio-container-(.+)/); return match ? match[1] : ''; } -const gradio_version = get_gradio_version(); +export const gradio_version = +get_gradio_version()[0]; export function get_fetchable_url_or_file( path: string | null, server_url: string, proxy_url: string | null ): string { - const version = gradio_version[0]; - const prefix = +version >= 5 ? 'gradio_api/' : ''; + const prefix = gradio_version >= 5 ? 'gradio_api/' : ''; if (path == null) { return proxy_url From 73d20bee18a01fb620d6090cd73f99905ce2f840 Mon Sep 17 00:00:00 2001 From: Col0ring <1561999073@qq.com> Date: Wed, 6 Nov 2024 12:16:47 +0800 Subject: [PATCH 38/51] docs: lazy load --- docs/components/legacy/Docs.py | 2 +- docs/helper/Site.py | 153 ++++++++++++++++++--------------- 2 files changed, 83 insertions(+), 72 deletions(-) diff --git a/docs/components/legacy/Docs.py b/docs/components/legacy/Docs.py index 71d863bb..55b1c358 100644 --- a/docs/components/legacy/Docs.py +++ b/docs/components/legacy/Docs.py @@ -153,7 +153,7 @@ def render_markdown(self, def render(self, components_tabs=None): def tab_link_click(data: gr.EventData): - tab: str = data._data["value"].get("tab", '') + tab: str = data._data.get("value", {}).get("tab", '') component_tab: str = data._data["value"].get("component_tab", '') if tab and tabs: return {tabs: gr.update(selected=tab)} diff --git a/docs/helper/Site.py b/docs/helper/Site.py index 4a79db66..65c9c7f4 100644 --- a/docs/helper/Site.py +++ b/docs/helper/Site.py @@ -37,34 +37,15 @@ def render(self): def on_tab_menu_select(e: gr.EventData): selected_tab = e._data["payload"][0]["key"] item = next( - (item for item in self.tabs if item["key"] == selected_tab), - {}) - if "content" in item: - return { - tab_menu: gr.update(selected_keys=[selected_tab]), - layout_content: gr.update(visible=False), - render_tabs: gr.update(active_key=selected_tab) - } + (item for item in tab_components if item.key == selected_tab), + tab_components[0]) return { - tab_menu: - gr.update(selected_keys=[selected_tab]), - sider_menu: - gr.update(selected_keys=[item.get("default_active_key", None)], - items=item.get("menus", [])), - layout_content_tabs: - gr.update(active_key=item.get("default_active_key", None)), - layout_content: - gr.update(visible=True), - render_tabs: - gr.update(active_key=selected_tab) + tab_menu: gr.update(selected_keys=[selected_tab]), + tabs: gr.update(active_key=selected_tab), + item: gr.update(visible=True) } - def on_layout_menu_select(e: gr.EventData): - selected_menu = e._data["payload"][0]["key"] - return gr.update(selected_keys=[selected_menu]), gr.update( - active_key=selected_menu) - with gr.Blocks(css=""" .gradio-container { max-width: 100% !important; @@ -96,54 +77,84 @@ def on_layout_menu_select(e: gr.EventData): selected_keys=[self.default_active_tab], items=self.tabs, elem_style=dict(flex=1, minWidth=0)) - # custom render - with antd.Tabs(active_key=self.default_active_tab, - render_tab_bar="() => null", - elem_style=dict( - maxHeight="100%", - overflow="auto")) as render_tabs: + + with antd.Tabs( + active_key=self.default_active_tab, + render_tab_bar="() => null", + ) as tabs: + tab_components = [] for tab in self.tabs: - if "content" in tab: - with antd.Tabs.Item(key=tab["key"]): - tab["content"].render() - # menus render - with antd.Layout(elem_style=dict( - height="calc(100% - 64px)")) as layout_content: - with antd.Layout.Sider(elem_style=dict( - height="calc(100vh - 64px)", - overflow="auto", - position="relative", - backgroundColor= - "var(--ms-gr-ant-color-bg-container)")): + with antd.Tabs.Item( + key=tab["key"], + elem_style=dict( + height= + "calc(100vh - var(--size-4) - var(--body-text-size) * 1.5 - 64px)" + ), + visible=True if self.default_active_tab + == tab["key"] else False) as tab_item: + tab_components.append(tab_item) + if "content" in tab: + # custom render + with ms.Div(elem_style=dict( + maxHeight="100%", + overflow="auto")): + tab["content"].render() + elif "menus" in tab: + # menus render + with antd.Layout(elem_style=dict( + height='100%')): + with antd.Layout.Sider( + elem_style=dict( + height= + "calc(100vh - 64px)", + overflow="auto", + position="relative", + backgroundColor= + "var(--ms-gr-ant-color-bg-container)" + )): + + sider_menu = antd.Menu( + selected_keys=[ + tab.get( + "default_active_key", + None) + ], + mode="inline", + items=tab.get("menus", [])) + with antd.Layout(): + with antd.Layout.Content( + elem_style=dict( + padding='12px 28px', + overflow="auto")): + with antd.Tabs( + active_key=tab.get( + "default_active_key", + None), + render_tab_bar= + "() => null" + ) as layout_content_tabs: + self._render_docs( + tab.get( + "menus", [])) - sider_menu = antd.Menu( - selected_keys=[ - self.default_active_tab_item.get( - "default_active_key", None) - ], - mode="inline", - items=self.default_active_tab_item.get( - "menus", [])) - with antd.Layout(): - with antd.Layout.Content(elem_style=dict( - padding='12px 28px', overflow="auto")): - with antd.Tabs(active_key=self. - default_active_tab_item.get( - "default_active_key", - None), - render_tab_bar="() => null" - ) as layout_content_tabs: - for tab in self.tabs: - self._render_docs( - tab.get("menus", [])) + def on_layout_menu_select( + e: gr.EventData): + selected_menu = e._data[ + "payload"][0]["key"] + return gr.update( + selected_keys=[ + selected_menu + ] + ), gr.update( + active_key=selected_menu) - sider_menu.select( - fn=on_layout_menu_select, - outputs=[sider_menu, layout_content_tabs]) - tab_menu.select(fn=on_tab_menu_select, - outputs=[ - tab_menu, sider_menu, - layout_content_tabs, - layout_content, render_tabs - ]) + sider_menu.select( + fn=on_layout_menu_select, + outputs=[ + sider_menu, + layout_content_tabs + ]) + tab_menu.select( + fn=on_tab_menu_select, + outputs=[tab_menu, tabs, *tab_components]) return demo From c5187f0f70f21725591c84444487acb31f707dea Mon Sep 17 00:00:00 2001 From: Col0ring <1561999073@qq.com> Date: Wed, 6 Nov 2024 20:22:40 +0800 Subject: [PATCH 39/51] docs: overview --- .../components/antd/__init__.py | 3 +- .../components/antd/components.py | 2 +- .../components/antd/icon/__init__.py | 4 +- .../antd/icon/iconfont_provider/__init__.py | 2 +- .../components/antd/input/__init__.py | 2 +- .../antd/input/password/__init__.py | 2 +- .../components/antd/input/search/__init__.py | 2 +- .../antd/input/textarea/__init__.py | 2 +- docs/app.py | 25 ++++--- docs/components/antd/button/demos/basic.py | 10 ++- .../antd/float_button/demos/basic.py | 9 ++- docs/components/antd/icon/README-zh_CN.md | 7 ++ docs/components/antd/icon/README.md | 9 +++ docs/components/antd/icon/app.py | 6 ++ docs/components/antd/icon/demos/basic.py | 20 ++++++ docs/components/antd/icon/demos/iconfont.py | 22 ++++++ docs/components/antd/overview/README-zh_CN.md | 7 ++ docs/components/antd/overview/README.md | 68 +++++++++++++++++++ docs/components/antd/overview/app.py | 6 ++ .../demos/integrate_other_components.py | 17 +++++ .../antd/overview/demos/limit_event.py | 18 +++++ .../antd/overview/demos/limit_function.py | 13 ++++ .../demos/limit_function_with_event.py | 21 ++++++ .../antd/overview/demos/limit_react_node.py | 22 ++++++ .../demos/limit_react_node_function.py | 0 .../antd/overview/demos/quick_start.py | 12 ++++ .../antd/typography/README-zh_CN.md | 7 ++ docs/components/antd/typography/README.md | 7 ++ docs/components/antd/typography/app.py | 6 ++ .../components/antd/typography/demos/basic.py | 23 +++++++ docs/helper/Docs.py | 17 ++++- docs/helper/Site.py | 41 ++++++++--- docs/helper/parse_markdown.py | 3 +- frontend/antd/input/input.tsx | 25 +++++-- .../antd/input/password/input.password.tsx | 24 +++++-- frontend/antd/input/search/input.search.tsx | 24 +++++-- .../antd/input/textarea/input.textarea.tsx | 24 +++++-- frontend/base/application/Application.svelte | 7 +- 38 files changed, 456 insertions(+), 63 deletions(-) create mode 100644 docs/components/antd/icon/README-zh_CN.md create mode 100644 docs/components/antd/icon/README.md create mode 100644 docs/components/antd/icon/app.py create mode 100644 docs/components/antd/icon/demos/basic.py create mode 100644 docs/components/antd/icon/demos/iconfont.py create mode 100644 docs/components/antd/overview/README-zh_CN.md create mode 100644 docs/components/antd/overview/README.md create mode 100644 docs/components/antd/overview/app.py create mode 100644 docs/components/antd/overview/demos/integrate_other_components.py create mode 100644 docs/components/antd/overview/demos/limit_event.py create mode 100644 docs/components/antd/overview/demos/limit_function.py create mode 100644 docs/components/antd/overview/demos/limit_function_with_event.py create mode 100644 docs/components/antd/overview/demos/limit_react_node.py create mode 100644 docs/components/antd/overview/demos/limit_react_node_function.py create mode 100644 docs/components/antd/overview/demos/quick_start.py create mode 100644 docs/components/antd/typography/README-zh_CN.md create mode 100644 docs/components/antd/typography/README.md create mode 100644 docs/components/antd/typography/app.py create mode 100644 docs/components/antd/typography/demos/basic.py diff --git a/backend/modelscope_studio/components/antd/__init__.py b/backend/modelscope_studio/components/antd/__init__.py index 3dfd2d6b..d1e17f65 100644 --- a/backend/modelscope_studio/components/antd/__init__.py +++ b/backend/modelscope_studio/components/antd/__init__.py @@ -51,7 +51,8 @@ from .grid.col import AntdCol as Col from .grid.row import AntdRow as Row from .icon import AntdIcon as Icon -from .icon.iconfont_provider import AntdIconfontProvider as IconfontProvider +from .icon.iconfont_provider import \ + AntdIconIconfontProvider as IconIconfontProvider from .image import AntdImage as Image from .image.preview_group import AntdImagePreviewGroup as ImagePreviewGroup from .input import AntdInput as Input diff --git a/backend/modelscope_studio/components/antd/components.py b/backend/modelscope_studio/components/antd/components.py index ba3fca49..581dd774 100644 --- a/backend/modelscope_studio/components/antd/components.py +++ b/backend/modelscope_studio/components/antd/components.py @@ -49,7 +49,7 @@ from .grid.col import AntdCol from .grid.row import AntdRow from .icon import AntdIcon -from .icon.iconfont_provider import AntdIconfontProvider +from .icon.iconfont_provider import AntdIconIconfontProvider from .image import AntdImage from .image.preview_group import AntdImagePreviewGroup from .input import AntdInput diff --git a/backend/modelscope_studio/components/antd/icon/__init__.py b/backend/modelscope_studio/components/antd/icon/__init__.py index 4c2d6a8b..a59b0cf7 100644 --- a/backend/modelscope_studio/components/antd/icon/__init__.py +++ b/backend/modelscope_studio/components/antd/icon/__init__.py @@ -3,7 +3,7 @@ from gradio.events import EventListener from ....utils.dev import ModelScopeComponent, resolve_frontend_dir -from .iconfont_provider import AntdIconfontProvider +from .iconfont_provider import AntdIconIconfontProvider class AntdIcon(ModelScopeComponent): @@ -13,7 +13,7 @@ class AntdIcon(ModelScopeComponent): Semantic vector graphics. """ - IconfontProvider = AntdIconfontProvider + IconfontProvider = AntdIconIconfontProvider EVENTS = [ EventListener("click", diff --git a/backend/modelscope_studio/components/antd/icon/iconfont_provider/__init__.py b/backend/modelscope_studio/components/antd/icon/iconfont_provider/__init__.py index be9540a4..d6445020 100644 --- a/backend/modelscope_studio/components/antd/icon/iconfont_provider/__init__.py +++ b/backend/modelscope_studio/components/antd/icon/iconfont_provider/__init__.py @@ -3,7 +3,7 @@ from .....utils.dev import ModelScopeLayoutComponent, resolve_frontend_dir -class AntdIconfontProvider(ModelScopeLayoutComponent): +class AntdIconIconfontProvider(ModelScopeLayoutComponent): """ Ant Design: https://ant.design/components/icon diff --git a/backend/modelscope_studio/components/antd/input/__init__.py b/backend/modelscope_studio/components/antd/input/__init__.py index 075413f6..6c1ce97a 100644 --- a/backend/modelscope_studio/components/antd/input/__init__.py +++ b/backend/modelscope_studio/components/antd/input/__init__.py @@ -54,7 +54,7 @@ def __init__( disabled: bool = False, max_length: int | None = None, prefix: str | None = None, - show_count: bool | str = False, + show_count: bool | dict = False, size: Literal['large', 'middle', 'small'] | None = None, status: Literal['error', 'warning'] | None = None, styles: dict | None = None, diff --git a/backend/modelscope_studio/components/antd/input/password/__init__.py b/backend/modelscope_studio/components/antd/input/password/__init__.py index 7871a738..c11ab936 100644 --- a/backend/modelscope_studio/components/antd/input/password/__init__.py +++ b/backend/modelscope_studio/components/antd/input/password/__init__.py @@ -49,7 +49,7 @@ def __init__( disabled: bool = False, max_length: int | None = None, prefix: str | None = None, - show_count: bool | str = False, + show_count: bool | dict = False, size: Literal['large', 'middle', 'small'] | None = None, status: Literal['error', 'warning'] | None = None, styles: dict | None = None, diff --git a/backend/modelscope_studio/components/antd/input/search/__init__.py b/backend/modelscope_studio/components/antd/input/search/__init__.py index c5c5f949..0bf6d701 100644 --- a/backend/modelscope_studio/components/antd/input/search/__init__.py +++ b/backend/modelscope_studio/components/antd/input/search/__init__.py @@ -49,7 +49,7 @@ def __init__( disabled: bool = False, max_length: int | None = None, prefix: str | None = None, - show_count: bool | str = False, + show_count: bool | dict = False, size: Literal['large', 'middle', 'small'] | None = None, status: Literal['error', 'warning'] | None = None, styles: dict | None = None, diff --git a/backend/modelscope_studio/components/antd/input/textarea/__init__.py b/backend/modelscope_studio/components/antd/input/textarea/__init__.py index 8dcb699d..7c2007df 100644 --- a/backend/modelscope_studio/components/antd/input/textarea/__init__.py +++ b/backend/modelscope_studio/components/antd/input/textarea/__init__.py @@ -39,7 +39,7 @@ def __init__( default_value: str | None = None, disabled: bool = False, max_length: int | None = None, - show_count: bool | str = False, + show_count: bool | dict = False, size: Literal['large', 'middle', 'small'] | None = None, status: Literal['error', 'warning'] | None = None, styles: dict | None = None, diff --git a/docs/app.py b/docs/app.py index 986d12d5..611906cb 100644 --- a/docs/app.py +++ b/docs/app.py @@ -2,11 +2,12 @@ from typing import Literal from helper.Site import Site -from legacy_app import legacy_demo import modelscope_studio.components.antd as antd import modelscope_studio.components.base as ms +# from legacy_app import legacy_demo + def get_docs(file_path: str, type: Literal["antd", "base"]): import importlib.util @@ -39,6 +40,9 @@ def get_docs(file_path: str, type: Literal["antd", "base"]): base_menu_items = [{"label": "Application", "key": "application"}] antd_menu_items = [{ + "label": "Overview", + "key": "overview" +}, { "label": "General", "type": @@ -49,6 +53,9 @@ def get_docs(file_path: str, type: Literal["antd", "base"]): }, { "label": "FloatButton", "key": "float_button" + }, { + "label": "Icon", + "key": "icon" }] }, { "label": "Layout", @@ -69,14 +76,14 @@ def get_docs(file_path: str, type: Literal["antd", "base"]): { "label": "Antd", "key": "antd", - "default_active_key": "button", + "default_active_key": "overview", "menus": antd_menu_items }, - { - "label": "Legacy", - "key": "legacy", - "content": legacy_demo - }, + # { + # "label": "Legacy", + # "key": "legacy", + # "content": legacy_demo + # }, ] @@ -85,12 +92,12 @@ def logo(): antd.Image(os.path.join(os.path.dirname(__file__), "./resources/modelscope.png"), preview=False, - height=32) + height=20) ms.Span('✖️') antd.Image(os.path.join(os.path.dirname(__file__), "./resources/gradio.png"), preview=False, - height=64) + height=40) site = Site(tabs=tabs, diff --git a/docs/components/antd/button/demos/basic.py b/docs/components/antd/button/demos/basic.py index 1ece2c70..887efeeb 100644 --- a/docs/components/antd/button/demos/basic.py +++ b/docs/components/antd/button/demos/basic.py @@ -7,12 +7,20 @@ with ms.Application(): with antd.ConfigProvider(): with antd.Flex(gap="small", wrap=True): - antd.Button("Primary Button", type="primary") + btn = antd.Button("Primary Button", type="primary") + btn.click(lambda: print("clicked")) with antd.Button(): ms.Text("Default Button") antd.Button("Dashed Button", type="dashed") antd.Button("Text Button", type="text") antd.Button("Link Button", type="link") + antd.Button("Filled", color="default", variant="filled") + antd.Button("Filled", color="danger", variant="filled") + with antd.Button(type="primary", loading=True): + ms.Text("Loading") + with ms.Slot("icon"): + antd.Icon("PoweroffOutlined") + antd.Button("Block", type="primary", block=True) if __name__ == "__main__": demo.queue().launch() diff --git a/docs/components/antd/float_button/demos/basic.py b/docs/components/antd/float_button/demos/basic.py index e6ffc756..c0ab7f93 100644 --- a/docs/components/antd/float_button/demos/basic.py +++ b/docs/components/antd/float_button/demos/basic.py @@ -12,12 +12,19 @@ antd.Icon("QuestionCircleOutlined") antd.FloatButton(badge=dict(count=123, overflowCount=999)) antd.FloatButton.BackTop(visibility_height=0) + antd.FloatButton(type="primary", elem_style=dict(insetInlineEnd=24 + 70)) + with antd.FloatButton(elem_style=dict(insetInlineEnd=24 + 70 + 70)): with ms.Slot("icon"): antd.Icon("QuestionCircleOutlined") - + with antd.FloatButton(type="primary", + description="Tooltip", + elem_style=dict(insetInlineEnd=24 + 140 + + 70)): + with ms.Slot("tooltip"): + ms.Div("Documents") if __name__ == "__main__": demo.queue().launch() diff --git a/docs/components/antd/icon/README-zh_CN.md b/docs/components/antd/icon/README-zh_CN.md new file mode 100644 index 00000000..809ae866 --- /dev/null +++ b/docs/components/antd/icon/README-zh_CN.md @@ -0,0 +1,7 @@ +# Button + +See [Ant Design](https://ant.design/components/float-button/) for more information. + +## Examples + + diff --git a/docs/components/antd/icon/README.md b/docs/components/antd/icon/README.md new file mode 100644 index 00000000..4305174e --- /dev/null +++ b/docs/components/antd/icon/README.md @@ -0,0 +1,9 @@ +# Icon + +Semantic vector graphics. See [Ant Design](https://ant.design/components/icon/) for more information. + +## Examples + + + + diff --git a/docs/components/antd/icon/app.py b/docs/components/antd/icon/app.py new file mode 100644 index 00000000..0018b7c1 --- /dev/null +++ b/docs/components/antd/icon/app.py @@ -0,0 +1,6 @@ +from helper.Docs import Docs + +docs = Docs(__file__) + +if __name__ == "__main__": + docs.render().queue().launch() diff --git a/docs/components/antd/icon/demos/basic.py b/docs/components/antd/icon/demos/basic.py new file mode 100644 index 00000000..edb488dd --- /dev/null +++ b/docs/components/antd/icon/demos/basic.py @@ -0,0 +1,20 @@ +import gradio as gr + +import modelscope_studio.components.antd as antd +import modelscope_studio.components.base as ms + +with gr.Blocks() as demo: + with ms.Application(): + with antd.ConfigProvider(): + with antd.Space(): + antd.Icon("HomeOutlined") + antd.Icon("SettingFilled") + antd.Icon("SmileOutlined") + antd.Icon("SyncOutlined", spin=True) + antd.Icon("SmileOutlined", rotate=180) + antd.Icon("LoadingOutlined") + antd.Icon("SmileTwoTone") + icon = antd.Icon("HeartTwoTone", two_tone_color="#eb2f96") + icon.click(lambda: print("clicked")) +if __name__ == "__main__": + demo.queue().launch() diff --git a/docs/components/antd/icon/demos/iconfont.py b/docs/components/antd/icon/demos/iconfont.py new file mode 100644 index 00000000..d724724e --- /dev/null +++ b/docs/components/antd/icon/demos/iconfont.py @@ -0,0 +1,22 @@ +import gradio as gr + +import modelscope_studio.components.antd as antd +import modelscope_studio.components.base as ms + +with gr.Blocks() as demo: + with ms.Application(): + with antd.ConfigProvider(): + # If you are using [iconfont.cn](https://www.iconfont.cn/), you can use the icons in your project gracefully. + with antd.Icon.IconfontProvider(script_url=[ + "//at.alicdn.com/t/font_8d5l8fzk5b87iudi.js", + "//at.alicdn.com/t/font_1788592_a5xf2bdic3u.js" + ]): + with antd.Space(): + antd.Icon("icon-python") + antd.Icon("icon-tuichu") + antd.Icon("icon-facebook", + elem_style=dict(color="#1877F2")) + antd.Icon("icon-twitter") + +if __name__ == "__main__": + demo.queue().launch() diff --git a/docs/components/antd/overview/README-zh_CN.md b/docs/components/antd/overview/README-zh_CN.md new file mode 100644 index 00000000..809ae866 --- /dev/null +++ b/docs/components/antd/overview/README-zh_CN.md @@ -0,0 +1,7 @@ +# Button + +See [Ant Design](https://ant.design/components/float-button/) for more information. + +## Examples + + diff --git a/docs/components/antd/overview/README.md b/docs/components/antd/overview/README.md new file mode 100644 index 00000000..c7e3507c --- /dev/null +++ b/docs/components/antd/overview/README.md @@ -0,0 +1,68 @@ +# 概览 + +`modelscope_studio`集成了 [Ant Design](https://ant.design/components/icon/) 的组件,并支持大部分的组件属性,您只需要引入`antd`模块即可直接使用。 + +```python +import modelscope_studio.components.antd as antd +``` + +## 快速开始 + + + +注意:其中`ms.Application`与`antd.ConfigProvider`是必须的。 + +- `Application` 包含了`modelscope_studio`中所有的组件依赖,请确保`modelscope_studio`所有导出的组件都被其包裹,否则页面将会无法成功预览。 +- `ConfigProvider` 与 Ant Design 中的功能一致,除此之外,我们还加了一些额外的适配来兼容 Gradio 的样式。因此,为了保证页面样式正常,所有的`antd`组件需要包裹在该组件下。 + +## 属性限制 + +由于 Python 的类型限制,一些组件属性的支持形式有所不同。 + +### 事件 + +在`antd`中,所有以`onXxx`形式绑定的事件,均改为了`gradio`的事件绑定形式,如`onClick`、`onChange`等。如果您想要获取事件参数,也需要绑定`gr.EventData`,所有的事件参数都通过数组的形式保存在`e._data["payload"]`中。 + + + +### ReactNode + +在 Python 中无法直接将某个组件作为参数,因此我们提供了插槽机制,您可以使用`ms.Slot`来包裹需要被渲染的模块。 + + + +**注:** + +- 您可以通过查看组件的`SLOTS`属性获取所有支持的插槽。 +- 如果您只想渲染一段字符串或数字,您依然可以直接将其作为组件的属性传入,无需使用`ms.Slot`。下面两种写法效果是一样的,并且更推荐直接作为组件属性传入: + + ```python + antd.Card(title="Card Title") + + with antd.Card(): + ms.Slot("title"): + ms.Text("Card Title") + ``` + +### 普通函数((...args) => {}) + +为了支持在 Python 直接传入 Javascript 函数,我们将其改为了`str`类型。因此,您只需要传递普通的函数字符串即可,它会在前端被自动编译为 Javascript 函数。 + + + +我们在全局注入了事件通知对象,您可以通过在函数中调用`window.ms_globals.dispatch`来主动向 Python 端发送事件,在 Python 端可以通过`ms.Application.custom`事件接收。 + + + +### 返回 ReactNode 的函数 ((...args) => ReactNode) + +当您的 Javascript 函数返回值为 ReactNode 时,我们提供了两种处理方式: + +- 将它当做普通的 ReactNode 值,继续使用`ms.Slot`来渲染模块。 +- 将其当做普通函数,通过`window.ms_globals.React`与`window.ms_globals.antd`等全局变量在前端生成 ReactNode(注意此时不能使用 jsx,需要使用 `React.createElement`)。 + +## 集成其他 Gradio 组件 + +某些组件的插槽可能只支持`modelscope_studio`中的组件,如果您想要支持其他的 Gradio 组件,您需要使用`Fragment`来将其包裹。 + + diff --git a/docs/components/antd/overview/app.py b/docs/components/antd/overview/app.py new file mode 100644 index 00000000..0018b7c1 --- /dev/null +++ b/docs/components/antd/overview/app.py @@ -0,0 +1,6 @@ +from helper.Docs import Docs + +docs = Docs(__file__) + +if __name__ == "__main__": + docs.render().queue().launch() diff --git a/docs/components/antd/overview/demos/integrate_other_components.py b/docs/components/antd/overview/demos/integrate_other_components.py new file mode 100644 index 00000000..5749b5c1 --- /dev/null +++ b/docs/components/antd/overview/demos/integrate_other_components.py @@ -0,0 +1,17 @@ +import gradio as gr + +import modelscope_studio.components.antd as antd +import modelscope_studio.components.base as ms + +with gr.Blocks() as demo: + with ms.Application(): + with antd.ConfigProvider(): + with antd.Space(): + antd.Button("1") + antd.Button("2") + # other gradio components + with ms.Fragment(): + gr.Button("3") + +if __name__ == "__main__": + demo.queue().launch() diff --git a/docs/components/antd/overview/demos/limit_event.py b/docs/components/antd/overview/demos/limit_event.py new file mode 100644 index 00000000..f41e652b --- /dev/null +++ b/docs/components/antd/overview/demos/limit_event.py @@ -0,0 +1,18 @@ +import gradio as gr + +import modelscope_studio.components.antd as antd +import modelscope_studio.components.base as ms + + +def on_change(e: gr.EventData): + print(e._data["payload"]) + + +with gr.Blocks() as demo: + with ms.Application(): + with antd.ConfigProvider(): + rate = antd.Rate() + rate.change(on_change) + +if __name__ == "__main__": + demo.queue().launch() diff --git a/docs/components/antd/overview/demos/limit_function.py b/docs/components/antd/overview/demos/limit_function.py new file mode 100644 index 00000000..03cd7a75 --- /dev/null +++ b/docs/components/antd/overview/demos/limit_function.py @@ -0,0 +1,13 @@ +import gradio as gr + +import modelscope_studio.components.antd as antd +import modelscope_studio.components.base as ms + +with gr.Blocks() as demo: + with ms.Application(): + with antd.ConfigProvider(): + antd.Input(show_count=dict(formatter="""({ count }) => { + return `${count} characters`; + }""")) +if __name__ == "__main__": + demo.queue().launch() diff --git a/docs/components/antd/overview/demos/limit_function_with_event.py b/docs/components/antd/overview/demos/limit_function_with_event.py new file mode 100644 index 00000000..61eb45a8 --- /dev/null +++ b/docs/components/antd/overview/demos/limit_function_with_event.py @@ -0,0 +1,21 @@ +import gradio as gr + +import modelscope_studio.components.antd as antd +import modelscope_studio.components.base as ms + + +def on_custom(e: gr.EventData): + print(e._data) + + +with gr.Blocks() as demo: + with ms.Application() as app: + with antd.ConfigProvider(): + antd.Input(show_count=dict(formatter="""({ count }) => { + window.ms_globals.dispatch({ type: "input_count_change", payload: count }); + return `${count} characters`; + }""")) + app.custom(on_custom) + +if __name__ == "__main__": + demo.queue().launch() diff --git a/docs/components/antd/overview/demos/limit_react_node.py b/docs/components/antd/overview/demos/limit_react_node.py new file mode 100644 index 00000000..70cf6f4b --- /dev/null +++ b/docs/components/antd/overview/demos/limit_react_node.py @@ -0,0 +1,22 @@ +import gradio as gr + +import modelscope_studio.components.antd as antd +import modelscope_studio.components.base as ms + +with gr.Blocks() as demo: + with ms.Application(): + with antd.ConfigProvider(): + with antd.Card(): + ms.Div("Card Content") + ms.Div("Card Content") + ms.Div("Card Content") + # slots + with ms.Slot("title"): + ms.Text("Card Title") + with ms.Slot("extra"): + with antd.Button(): + ms.Text("GitHub") + with ms.Slot("icon"): + antd.Icon("GithubOutlined") +if __name__ == "__main__": + demo.queue().launch() diff --git a/docs/components/antd/overview/demos/limit_react_node_function.py b/docs/components/antd/overview/demos/limit_react_node_function.py new file mode 100644 index 00000000..e69de29b diff --git a/docs/components/antd/overview/demos/quick_start.py b/docs/components/antd/overview/demos/quick_start.py new file mode 100644 index 00000000..e2e76aea --- /dev/null +++ b/docs/components/antd/overview/demos/quick_start.py @@ -0,0 +1,12 @@ +import gradio as gr + +import modelscope_studio.components.antd as antd +import modelscope_studio.components.base as ms + +with gr.Blocks() as demo: + with ms.Application(): + with antd.ConfigProvider(): + antd.Button("Hello Ant Design", type="primary") + +if __name__ == "__main__": + demo.queue().launch() diff --git a/docs/components/antd/typography/README-zh_CN.md b/docs/components/antd/typography/README-zh_CN.md new file mode 100644 index 00000000..809ae866 --- /dev/null +++ b/docs/components/antd/typography/README-zh_CN.md @@ -0,0 +1,7 @@ +# Button + +See [Ant Design](https://ant.design/components/float-button/) for more information. + +## Examples + + diff --git a/docs/components/antd/typography/README.md b/docs/components/antd/typography/README.md new file mode 100644 index 00000000..d22a0ae0 --- /dev/null +++ b/docs/components/antd/typography/README.md @@ -0,0 +1,7 @@ +# FloatButton + +A button that floats at the top of the page. See [Ant Design](https://ant.design/components/float-button/) for more information. + +## Examples + + diff --git a/docs/components/antd/typography/app.py b/docs/components/antd/typography/app.py new file mode 100644 index 00000000..0018b7c1 --- /dev/null +++ b/docs/components/antd/typography/app.py @@ -0,0 +1,6 @@ +from helper.Docs import Docs + +docs = Docs(__file__) + +if __name__ == "__main__": + docs.render().queue().launch() diff --git a/docs/components/antd/typography/demos/basic.py b/docs/components/antd/typography/demos/basic.py new file mode 100644 index 00000000..e6ffc756 --- /dev/null +++ b/docs/components/antd/typography/demos/basic.py @@ -0,0 +1,23 @@ +import gradio as gr + +import modelscope_studio.components.antd as antd +import modelscope_studio.components.base as ms + +with gr.Blocks() as demo: + with ms.Application(): + with antd.ConfigProvider(): + with antd.FloatButton.Group(shape="circle", + elem_style=dict(insetInlineEnd=24)): + with antd.FloatButton(badge=dict(count=12)): + antd.Icon("QuestionCircleOutlined") + antd.FloatButton(badge=dict(count=123, overflowCount=999)) + antd.FloatButton.BackTop(visibility_height=0) + antd.FloatButton(type="primary", + elem_style=dict(insetInlineEnd=24 + 70)) + with antd.FloatButton(elem_style=dict(insetInlineEnd=24 + 70 + + 70)): + with ms.Slot("icon"): + antd.Icon("QuestionCircleOutlined") + +if __name__ == "__main__": + demo.queue().launch() diff --git a/docs/helper/Docs.py b/docs/helper/Docs.py index 5fb6244c..dc0bdbc8 100644 --- a/docs/helper/Docs.py +++ b/docs/helper/Docs.py @@ -4,6 +4,7 @@ import gradio as gr import modelscope_studio.components.antd as antd +import modelscope_studio.components.base as ms import modelscope_studio.components.legacy as mgr from .parse_markdown import parse_markdown @@ -76,10 +77,19 @@ def _read_file(self, relative_path: str): "r") as f: return f.read() - def _render_demo(self, demo_name, prefix='', suffix='', fixed=False): + def _render_demo(self, + demo_name, + prefix='', + suffix='', + fixed=False, + title=''): content = self._read_file(f"./demos/{demo_name}.py") module = self.demo_modules[demo_name] - with antd.Card(styles=dict(body=dict(padding=10))): + with antd.Card(styles=dict(body=dict(padding=10)), + elem_style=dict(margin="8px 0")): + if title: + with ms.Slot("title"): + ms.Text(title) with antd.Row(align="stretch", wrap=False): with antd.Col(span=10): with antd.Flex(elem_style=dict(height='100%')): @@ -110,7 +120,8 @@ def _render_markdown(self, markdown_file): self._render_demo(item["name"], prefix=item["prefix"], suffix=item["suffix"], - fixed=item["fixed"]) + fixed=item["fixed"], + title=item["title"]) def render(self): with gr.Blocks() as demo: diff --git a/docs/helper/Site.py b/docs/helper/Site.py index 65c9c7f4..608ce2ef 100644 --- a/docs/helper/Site.py +++ b/docs/helper/Site.py @@ -22,15 +22,21 @@ def __init__(self, {}) self.logo = logo - def _render_docs(self, items: list): + def _render_docs(self, items: list, tab: dict): + docs_tabs = [] for item in items: if "children" in item: - self._render_docs(item["children"]) + docs_tabs.extend(self._render_docs(item["children"], tab)) elif "key" in item: key = item["key"].replace("-", "_") if key in self.docs: - with antd.Tabs.Item(key=key): + with antd.Tabs.Item( + key=key, + visible=True if tab.get("default_active_key") + == key else False) as docs_tab: + docs_tabs.append(docs_tab) self.docs[key].docs.render() + return docs_tabs def render(self): @@ -133,26 +139,39 @@ def on_tab_menu_select(e: gr.EventData): render_tab_bar= "() => null" ) as layout_content_tabs: - self._render_docs( + docs_tabs = self._render_docs( tab.get( - "menus", [])) + "menus", []), + tab) def on_layout_menu_select( e: gr.EventData): selected_menu = e._data[ "payload"][0]["key"] - return gr.update( - selected_keys=[ + item = next( + (item for item in docs_tabs + if item.key == + selected_menu), + docs_tabs[0]) + return { + sider_menu: + gr.update(selected_keys=[ selected_menu - ] - ), gr.update( - active_key=selected_menu) + ]), + layout_content_tabs: + gr.update( + active_key=selected_menu + ), + item: + gr.update(visible=True) + } sider_menu.select( fn=on_layout_menu_select, outputs=[ sider_menu, - layout_content_tabs + layout_content_tabs, + *docs_tabs ]) tab_menu.select( fn=on_tab_menu_select, diff --git a/docs/helper/parse_markdown.py b/docs/helper/parse_markdown.py index 2bcd1e5a..73f58104 100644 --- a/docs/helper/parse_markdown.py +++ b/docs/helper/parse_markdown.py @@ -46,7 +46,8 @@ def handle_starttag(self, tag: str, attrs) -> None: "name": dict(attrs)["name"], "fixed": "fixed" in dict(attrs), "prefix": "", - "suffix": "" + "suffix": "", + "title": dict(attrs).get("title", "") }) elif tag == "file": content = self.read_file(dict(attrs)["src"]) diff --git a/frontend/antd/input/input.tsx b/frontend/antd/input/input.tsx index 90507ecf..1f82b601 100644 --- a/frontend/antd/input/input.tsx +++ b/frontend/antd/input/input.tsx @@ -1,7 +1,9 @@ import { sveltify } from '@svelte-preprocess-react'; import { ReactSlot } from '@svelte-preprocess-react/react-slot'; import type { SetSlotParams } from '@svelte-preprocess-react/slot'; +import { useMemo } from 'react'; import { useFunction } from '@utils/hooks/useFunction'; +import { omitUndefinedProps } from '@utils/omitUndefinedProps'; import { renderParamsSlot } from '@utils/renderParamsSlot'; import { type GetProps, Input as AInput } from 'antd'; @@ -36,6 +38,7 @@ export const Input = sveltify< const showCountFunction = useFunction( typeof showCount === 'object' ? showCount.formatter : undefined ); + return ( <>

{children}
@@ -57,16 +60,26 @@ export const Input = sveltify< } : typeof showCount === 'object' && showCountFunction ? { + ...showCount, formatter: showCountFunction, } : showCount } - count={{ - ...count, - exceedFormatter: countExceedFormatterFunction, - strategy: countStrategyFunction, - show: countShowFunction || count?.show, - }} + count={useMemo( + () => + omitUndefinedProps({ + ...count, + exceedFormatter: countExceedFormatterFunction, + strategy: countStrategyFunction, + show: countShowFunction || count?.show, + }), + [ + count, + countExceedFormatterFunction, + countStrategyFunction, + countShowFunction, + ] + )} addonAfter={ slots.addonAfter ? ( diff --git a/frontend/antd/input/password/input.password.tsx b/frontend/antd/input/password/input.password.tsx index e526fc6c..9b6cf153 100644 --- a/frontend/antd/input/password/input.password.tsx +++ b/frontend/antd/input/password/input.password.tsx @@ -1,7 +1,9 @@ import { sveltify } from '@svelte-preprocess-react'; import { ReactSlot } from '@svelte-preprocess-react/react-slot'; import type { SetSlotParams } from '@svelte-preprocess-react/slot'; +import { useMemo } from 'react'; import { useFunction } from '@utils/hooks/useFunction'; +import { omitUndefinedProps } from '@utils/omitUndefinedProps'; import { renderParamsSlot } from '@utils/renderParamsSlot'; import { type GetProps, Input as AInput } from 'antd'; @@ -70,16 +72,26 @@ export const InputPassword = sveltify< } : typeof showCount === 'object' && showCountFunction ? { + ...showCount, formatter: showCountFunction, } : showCount } - count={{ - ...count, - exceedFormatter: countExceedFormatterFunction, - strategy: countStrategyFunction, - show: countShowFunction || count?.show, - }} + count={useMemo( + () => + omitUndefinedProps({ + ...count, + exceedFormatter: countExceedFormatterFunction, + strategy: countStrategyFunction, + show: countShowFunction || count?.show, + }), + [ + count, + countExceedFormatterFunction, + countStrategyFunction, + countShowFunction, + ] + )} addonAfter={ slots.addonAfter ? ( diff --git a/frontend/antd/input/search/input.search.tsx b/frontend/antd/input/search/input.search.tsx index debfbe4b..e2d140d4 100644 --- a/frontend/antd/input/search/input.search.tsx +++ b/frontend/antd/input/search/input.search.tsx @@ -1,7 +1,9 @@ import { sveltify } from '@svelte-preprocess-react'; import { ReactSlot } from '@svelte-preprocess-react/react-slot'; import type { SetSlotParams } from '@svelte-preprocess-react/slot'; +import { useMemo } from 'react'; import { useFunction } from '@utils/hooks/useFunction'; +import { omitUndefinedProps } from '@utils/omitUndefinedProps'; import { renderParamsSlot } from '@utils/renderParamsSlot'; import { type GetProps, Input as AInput } from 'antd'; @@ -59,16 +61,26 @@ export const InputSearch = sveltify< } : typeof showCount === 'object' && showCountFunction ? { + ...showCount, formatter: showCountFunction, } : showCount } - count={{ - ...count, - exceedFormatter: countExceedFormatterFunction, - strategy: countStrategyFunction, - show: countShowFunction || count?.show, - }} + count={useMemo( + () => + omitUndefinedProps({ + ...count, + exceedFormatter: countExceedFormatterFunction, + strategy: countStrategyFunction, + show: countShowFunction || count?.show, + }), + [ + count, + countExceedFormatterFunction, + countStrategyFunction, + countShowFunction, + ] + )} enterButton={ slots.enterButton ? ( diff --git a/frontend/antd/input/textarea/input.textarea.tsx b/frontend/antd/input/textarea/input.textarea.tsx index 3c44bde9..38b4ed5a 100644 --- a/frontend/antd/input/textarea/input.textarea.tsx +++ b/frontend/antd/input/textarea/input.textarea.tsx @@ -1,7 +1,9 @@ import { sveltify } from '@svelte-preprocess-react'; import { ReactSlot } from '@svelte-preprocess-react/react-slot'; import type { SetSlotParams } from '@svelte-preprocess-react/slot'; +import { useMemo } from 'react'; import { useFunction } from '@utils/hooks/useFunction'; +import { omitUndefinedProps } from '@utils/omitUndefinedProps'; import { renderParamsSlot } from '@utils/renderParamsSlot'; import { type GetProps, Input as AInput } from 'antd'; @@ -51,16 +53,26 @@ export const InputTextarea = sveltify< } : typeof showCount === 'object' && showCountFunction ? { + ...showCount, formatter: showCountFunction, } : showCount } - count={{ - ...count, - exceedFormatter: countExceedFormatterFunction, - strategy: countStrategyFunction, - show: countShowFunction || count?.show, - }} + count={useMemo( + () => + omitUndefinedProps({ + ...count, + exceedFormatter: countExceedFormatterFunction, + strategy: countStrategyFunction, + show: countShowFunction || count?.show, + }), + [ + count, + countExceedFormatterFunction, + countStrategyFunction, + countShowFunction, + ] + )} allowClear={ slots['allowClear.clearIcon'] ? { diff --git a/frontend/base/application/Application.svelte b/frontend/base/application/Application.svelte index 2e2b7819..304e19da 100644 --- a/frontend/base/application/Application.svelte +++ b/frontend/base/application/Application.svelte @@ -87,11 +87,10 @@ gradio.dispatch('unmount', get_data()); } }); - + window.ms_globals.dispatch = (...args) => { + gradio.dispatch('custom', args); + }; onMount(() => { - window.ms_globals.dispatch = (...args) => { - gradio.dispatch('custom', args); - }; requestAnimationFrame(() => { on_mount(); }); From dfcb18b4e4cb440caec03f1ff03882cb939d7d04 Mon Sep 17 00:00:00 2001 From: Col0ring <1561999073@qq.com> Date: Thu, 7 Nov 2024 15:02:54 +0800 Subject: [PATCH 40/51] fix: compatible input method languages --- docs/components/antd/overview/README-zh_CN.md | 74 +++++++++++++++++- docs/components/antd/overview/README.md | 9 ++- .../antd/overview/demos/limit_function.py | 5 +- .../demos/limit_react_node_function.py | 0 .../limit_react_node_function_by_function.py | 75 +++++++++++++++++++ .../limit_react_node_function_by_slot.py | 15 ++++ frontend/antd/auto-complete/auto-complete.tsx | 8 +- frontend/antd/cascader/cascader.tsx | 9 ++- .../antd/cascader/panel/cascader.panel.tsx | 8 +- frontend/antd/input-number/input-number.tsx | 8 +- frontend/antd/input/input.tsx | 10 ++- frontend/antd/input/otp/input.otp.tsx | 9 ++- .../antd/input/password/input.password.tsx | 9 ++- frontend/antd/input/search/input.search.tsx | 9 ++- .../antd/input/textarea/input.textarea.tsx | 8 +- frontend/antd/mentions/mentions.tsx | 9 ++- frontend/base/each/Each.svelte | 2 - frontend/svelte-preprocess-react/slot.ts | 12 +-- frontend/utils/hooks/useValueChange.ts | 28 +++++++ 19 files changed, 276 insertions(+), 31 deletions(-) delete mode 100644 docs/components/antd/overview/demos/limit_react_node_function.py create mode 100644 docs/components/antd/overview/demos/limit_react_node_function_by_function.py create mode 100644 docs/components/antd/overview/demos/limit_react_node_function_by_slot.py create mode 100644 frontend/utils/hooks/useValueChange.ts diff --git a/docs/components/antd/overview/README-zh_CN.md b/docs/components/antd/overview/README-zh_CN.md index 809ae866..4b9cd50e 100644 --- a/docs/components/antd/overview/README-zh_CN.md +++ b/docs/components/antd/overview/README-zh_CN.md @@ -1,7 +1,73 @@ -# Button +# 概览 -See [Ant Design](https://ant.design/components/float-button/) for more information. +`modelscope_studio`集成了 [Ant Design](https://ant.design/components/icon/) 的组件,并支持大部分的组件属性,您只需要引入`antd`模块即可直接使用。 -## Examples +```python +import modelscope_studio.components.antd as antd +``` - +## 快速开始 + + + +注意:其中`ms.Application`与`antd.ConfigProvider`是必须的。 + +- `Application` 包含了`modelscope_studio`中所有的组件依赖,请确保`modelscope_studio`所有导出的组件都被其包裹,否则页面将会无法成功预览。 +- `ConfigProvider` 与 Ant Design 中的功能一致,除此之外,我们还加了一些额外的适配来兼容 Gradio 的样式。因此,为了保证页面样式正常,所有的`antd`组件需要包裹在该组件下。 + +## 属性限制 + +由于 Python 的类型限制,一些组件属性的支持形式有所不同。 + +### 事件 + +在`antd`中,所有以`onXxx`形式绑定的事件,均改为了`gradio`的事件绑定形式,如`onClick`、`onChange`等。如果您想要获取事件参数,也需要绑定`gr.EventData`,所有的事件参数都通过数组的形式保存在`e._data["payload"]`中。 + + + +### ReactNode + +在 Python 中无法直接将某个组件作为参数,因此我们提供了插槽机制,您可以使用`ms.Slot`来包裹需要被渲染的模块。 + + + +**注:** + +- 您可以通过查看组件的`SLOTS`属性获取所有支持的插槽。 +- 如果您只想渲染一段字符串或数字,您依然可以直接将其作为组件的属性传入,无需使用`ms.Slot`。下面两种写法效果是一样的,并且更推荐直接作为组件属性传入: + + ```python + antd.Card(title="Card Title") + + with antd.Card(): + ms.Slot("title"): + ms.Text("Card Title") + ``` + +### 普通函数((...args) => {}) + +为了支持在 Python 直接传入 Javascript 函数,我们将其改为了`str`类型。因此,您只需要传递普通的函数字符串即可,它会在前端被自动编译为 Javascript 函数。 + + + +我们在全局注入了事件通知对象,您可以通过在函数中调用`window.ms_globals.dispatch`来主动向 Python 端发送事件,在 Python 端可以通过`ms.Application.custom`事件接收。 + + + +### 返回 ReactNode 的函数 ((...args) => ReactNode) + +当您的 Javascript 函数返回值为 ReactNode 时,我们提供了两种处理方式: + +1. 将其当做普通的 ReactNode 值,继续使用`ms.Slot`来渲染模块,在此基础上,`ms.Slot`还支持传入`params_mapping`参数,该参数同样接收一个 Javascript 函数字符串,它可以将函数的参数映射为当前`slot`环境的上下文(具体请参考`ms.Each`)。 + + + +2. 将其当做普通函数,通过`window.ms_globals.React`与`window.ms_globals.antd`等全局变量在前端生成 ReactNode(注意此时不能使用 jsx,需要使用 `React.createElement`)。 + + + +## 集成其他 Gradio 组件 + +某些组件的插槽可能只支持`modelscope_studio`中的组件,如果您想要支持其他的 Gradio 组件,您需要使用`Fragment`来将其包裹。 + + diff --git a/docs/components/antd/overview/README.md b/docs/components/antd/overview/README.md index c7e3507c..4b9cd50e 100644 --- a/docs/components/antd/overview/README.md +++ b/docs/components/antd/overview/README.md @@ -58,8 +58,13 @@ import modelscope_studio.components.antd as antd 当您的 Javascript 函数返回值为 ReactNode 时,我们提供了两种处理方式: -- 将它当做普通的 ReactNode 值,继续使用`ms.Slot`来渲染模块。 -- 将其当做普通函数,通过`window.ms_globals.React`与`window.ms_globals.antd`等全局变量在前端生成 ReactNode(注意此时不能使用 jsx,需要使用 `React.createElement`)。 +1. 将其当做普通的 ReactNode 值,继续使用`ms.Slot`来渲染模块,在此基础上,`ms.Slot`还支持传入`params_mapping`参数,该参数同样接收一个 Javascript 函数字符串,它可以将函数的参数映射为当前`slot`环境的上下文(具体请参考`ms.Each`)。 + + + +2. 将其当做普通函数,通过`window.ms_globals.React`与`window.ms_globals.antd`等全局变量在前端生成 ReactNode(注意此时不能使用 jsx,需要使用 `React.createElement`)。 + + ## 集成其他 Gradio 组件 diff --git a/docs/components/antd/overview/demos/limit_function.py b/docs/components/antd/overview/demos/limit_function.py index 03cd7a75..646efb1f 100644 --- a/docs/components/antd/overview/demos/limit_function.py +++ b/docs/components/antd/overview/demos/limit_function.py @@ -7,7 +7,8 @@ with ms.Application(): with antd.ConfigProvider(): antd.Input(show_count=dict(formatter="""({ count }) => { - return `${count} characters`; - }""")) + return `${count} characters`; + }""")) + if __name__ == "__main__": demo.queue().launch() diff --git a/docs/components/antd/overview/demos/limit_react_node_function.py b/docs/components/antd/overview/demos/limit_react_node_function.py deleted file mode 100644 index e69de29b..00000000 diff --git a/docs/components/antd/overview/demos/limit_react_node_function_by_function.py b/docs/components/antd/overview/demos/limit_react_node_function_by_function.py new file mode 100644 index 00000000..d0046788 --- /dev/null +++ b/docs/components/antd/overview/demos/limit_react_node_function_by_function.py @@ -0,0 +1,75 @@ +import gradio as gr + +import modelscope_studio.components.antd as antd +import modelscope_studio.components.base as ms + + +def on_custom(e: gr.EventData): + print(e._data) + + +with gr.Blocks() as demo: + with ms.Application() as app: + with antd.ConfigProvider(): + with antd.Table([ + { + "key": '1', + "name": 'Mike', + "age": 32, + "address": '10 Downing Street', + }, + { + "key": '2', + "name": 'John', + "age": 42, + "address": '11 Downing Street', + }, + ], + pagination=False): + antd.Table.Column(title="Name", data_index="name", key="name") + antd.Table.Column(title="Age", data_index="age", key="age") + antd.Table.Column(title="Address", + data_index="address", + key="address") + antd.Table.Column(title="Action", + key="action", + column_render="""(_, record) => { + const React = window.ms_globals.React; + const antd = window.ms_globals.antd; + const dispatch = window.ms_globals.dispatch; + return React.createElement(antd.Space, { + size: "middle", + children: [ + React.createElement(antd.Button, { + type: "link", + onClick: () => { + dispatch({ + type: "table_column_action", + payload: { + action: "invite", + record, + }, + }); + }, + children: "Invite " + record.name + }), + React.createElement(antd.Button, { + type: "link", + children: "Delete", + onClick: () => { + dispatch({ + type: "table_column_action", + payload: { + action: "delete", + record, + }, + }); + }, + }), + ], + }); + }""") + + app.custom(on_custom) +if __name__ == "__main__": + demo.queue().launch() diff --git a/docs/components/antd/overview/demos/limit_react_node_function_by_slot.py b/docs/components/antd/overview/demos/limit_react_node_function_by_slot.py new file mode 100644 index 00000000..6d543362 --- /dev/null +++ b/docs/components/antd/overview/demos/limit_react_node_function_by_slot.py @@ -0,0 +1,15 @@ +import gradio as gr + +import modelscope_studio.components.antd as antd +import modelscope_studio.components.base as ms + +with gr.Blocks() as demo: + with ms.Application(): + with antd.ConfigProvider(): + with antd.Statistic(title="Active Users", value=112893): + with ms.Slot("formatter", + params_mapping="(value) => ({ text: { value }})"): + antd.Typography.Text(type="success", as_item="text") + +if __name__ == "__main__": + demo.queue().launch() diff --git a/frontend/antd/auto-complete/auto-complete.tsx b/frontend/antd/auto-complete/auto-complete.tsx index d45eb139..36b6cd1b 100644 --- a/frontend/antd/auto-complete/auto-complete.tsx +++ b/frontend/antd/auto-complete/auto-complete.tsx @@ -4,6 +4,7 @@ import { ReactSlot } from '@svelte-preprocess-react/react-slot'; import type { SetSlotParams } from '@svelte-preprocess-react/slot'; import { forwardRef, useMemo } from 'react'; import { useFunction } from '@utils/hooks/useFunction'; +import { useValueChange } from '@utils/hooks/useValueChange'; import { renderItems } from '@utils/renderItems'; import { renderParamsSlot } from '@utils/renderParamsSlot'; import { AutoComplete as AAutoComplete, type GetProps } from 'antd'; @@ -54,6 +55,10 @@ export const AutoComplete = sveltify< const getPopupContainerFunction = useFunction(getPopupContainer); const filterOptionFunction = useFunction(filterOption); const dropdownRenderFunction = useFunction(dropdownRender); + const [value, setValue] = useValueChange({ + onValueChange, + value: props.value, + }); return ( <> {slots.children ? null : ( @@ -62,6 +67,7 @@ export const AutoComplete = sveltify< { onChange?.(v, ...args); - onValueChange(v as string); + setValue(v as string); }} notFoundContent={ slots.notFoundContent ? ( diff --git a/frontend/antd/cascader/cascader.tsx b/frontend/antd/cascader/cascader.tsx index 7a7334f8..888c21a1 100644 --- a/frontend/antd/cascader/cascader.tsx +++ b/frontend/antd/cascader/cascader.tsx @@ -3,6 +3,7 @@ import { ReactSlot } from '@svelte-preprocess-react/react-slot'; import type { SetSlotParams } from '@svelte-preprocess-react/slot'; import { useMemo } from 'react'; import { useFunction } from '@utils/hooks/useFunction'; +import { useValueChange } from '@utils/hooks/useValueChange'; import { renderItems } from '@utils/renderItems'; import { renderParamsSlot } from '@utils/renderParamsSlot'; import { Cascader as ACascader, type CascaderProps } from 'antd'; @@ -67,13 +68,17 @@ export const Cascader = sveltify< const showSearchFilterFunction = useFunction(showSearchConfig.filter); const showSearchRenderFunction = useFunction(showSearchConfig.render); const showSearchSortFunction = useFunction(showSearchConfig.sort); - + const [value, setValue] = useValueChange({ + onValueChange, + value: props.value, + }); return ( <>
{children}
{ return ( options || @@ -130,7 +135,7 @@ export const Cascader = sveltify< } onChange={(v, ...args) => { onChange?.(v, ...args); - onValueChange(v); + setValue(v); }} suffixIcon={ slots.suffixIcon ? ( diff --git a/frontend/antd/cascader/panel/cascader.panel.tsx b/frontend/antd/cascader/panel/cascader.panel.tsx index fccdd7d9..eac65d3c 100644 --- a/frontend/antd/cascader/panel/cascader.panel.tsx +++ b/frontend/antd/cascader/panel/cascader.panel.tsx @@ -1,6 +1,7 @@ import { sveltify } from '@svelte-preprocess-react'; import { ReactSlot } from '@svelte-preprocess-react/react-slot'; import { useMemo } from 'react'; +import { useValueChange } from '@utils/hooks/useValueChange'; import { renderItems } from '@utils/renderItems'; import { Cascader as ACascader, type CascaderPanelProps } from 'antd'; @@ -25,11 +26,16 @@ export const CascaderPanel = sveltify< options, ...props }) => { + const [value, setValue] = useValueChange({ + onValueChange, + value: props.value, + }); return ( <>
{children}
{ return ( options || @@ -41,7 +47,7 @@ export const CascaderPanel = sveltify< loadData={onLoadData} onChange={(v, ...args) => { onChange?.(v, ...args); - onValueChange(v); + setValue(v); }} expandIcon={ slots.expandIcon ? ( diff --git a/frontend/antd/input-number/input-number.tsx b/frontend/antd/input-number/input-number.tsx index 3d039817..ef4d9b4f 100644 --- a/frontend/antd/input-number/input-number.tsx +++ b/frontend/antd/input-number/input-number.tsx @@ -1,6 +1,7 @@ import { sveltify } from '@svelte-preprocess-react'; import { ReactSlot } from '@svelte-preprocess-react/react-slot'; import { useFunction } from '@utils/hooks/useFunction'; +import { useValueChange } from '@utils/hooks/useValueChange'; import { type GetProps, InputNumber as AInputNumber } from 'antd'; export const InputNumber = sveltify< @@ -28,15 +29,20 @@ export const InputNumber = sveltify< }) => { const formatterFunction = useFunction(formatter); const parserFunction = useFunction(parser); + const [value, setValue] = useValueChange({ + onValueChange, + value: props.value, + }); return ( <>
{children}
{ onChange?.(v); - onValueChange(v); + setValue(v); }} parser={parserFunction} formatter={formatterFunction} diff --git a/frontend/antd/input/input.tsx b/frontend/antd/input/input.tsx index 1f82b601..2d801914 100644 --- a/frontend/antd/input/input.tsx +++ b/frontend/antd/input/input.tsx @@ -1,8 +1,9 @@ import { sveltify } from '@svelte-preprocess-react'; import { ReactSlot } from '@svelte-preprocess-react/react-slot'; import type { SetSlotParams } from '@svelte-preprocess-react/slot'; -import { useMemo } from 'react'; +import { useEffect, useMemo, useState } from 'react'; import { useFunction } from '@utils/hooks/useFunction'; +import { useValueChange } from '@utils/hooks/useValueChange'; import { omitUndefinedProps } from '@utils/omitUndefinedProps'; import { renderParamsSlot } from '@utils/renderParamsSlot'; import { type GetProps, Input as AInput } from 'antd'; @@ -38,16 +39,21 @@ export const Input = sveltify< const showCountFunction = useFunction( typeof showCount === 'object' ? showCount.formatter : undefined ); + const [value, setValue] = useValueChange({ + onValueChange, + value: props.value, + }); return ( <>
{children}
{ onChange?.(e); - onValueChange(e.target.value); + setValue(e.target.value); }} showCount={ slots['showCount.formatter'] diff --git a/frontend/antd/input/otp/input.otp.tsx b/frontend/antd/input/otp/input.otp.tsx index dd0d0d40..b4938a04 100644 --- a/frontend/antd/input/otp/input.otp.tsx +++ b/frontend/antd/input/otp/input.otp.tsx @@ -1,5 +1,6 @@ import { sveltify } from '@svelte-preprocess-react'; import { useFunction } from '@utils/hooks/useFunction'; +import { useValueChange } from '@utils/hooks/useValueChange'; import { type GetProps, Input as AInput } from 'antd'; export const InputOTP = sveltify< @@ -8,14 +9,20 @@ export const InputOTP = sveltify< } >(({ formatter, onValueChange, onChange, elRef, ...props }) => { const formatterFunction = useFunction(formatter); + const [value, setValue] = useValueChange({ + onValueChange, + value: props.value, + }); + return ( { onChange?.(v); - onValueChange(v); + setValue(v); }} /> ); diff --git a/frontend/antd/input/password/input.password.tsx b/frontend/antd/input/password/input.password.tsx index 9b6cf153..48b106f3 100644 --- a/frontend/antd/input/password/input.password.tsx +++ b/frontend/antd/input/password/input.password.tsx @@ -3,6 +3,7 @@ import { ReactSlot } from '@svelte-preprocess-react/react-slot'; import type { SetSlotParams } from '@svelte-preprocess-react/slot'; import { useMemo } from 'react'; import { useFunction } from '@utils/hooks/useFunction'; +import { useValueChange } from '@utils/hooks/useValueChange'; import { omitUndefinedProps } from '@utils/omitUndefinedProps'; import { renderParamsSlot } from '@utils/renderParamsSlot'; import { type GetProps, Input as AInput } from 'antd'; @@ -41,16 +42,20 @@ export const InputPassword = sveltify< typeof showCount === 'object' ? showCount.formatter : undefined ); const iconRenderFunction = useFunction(iconRender); - + const [value, setValue] = useValueChange({ + onValueChange, + value: props.value, + }); return ( <>
{children}
{ onChange?.(e); - onValueChange(e.target.value); + setValue(e.target.value); }} iconRender={ slots.iconRender diff --git a/frontend/antd/input/search/input.search.tsx b/frontend/antd/input/search/input.search.tsx index e2d140d4..e4bd8dcf 100644 --- a/frontend/antd/input/search/input.search.tsx +++ b/frontend/antd/input/search/input.search.tsx @@ -3,6 +3,7 @@ import { ReactSlot } from '@svelte-preprocess-react/react-slot'; import type { SetSlotParams } from '@svelte-preprocess-react/slot'; import { useMemo } from 'react'; import { useFunction } from '@utils/hooks/useFunction'; +import { useValueChange } from '@utils/hooks/useValueChange'; import { omitUndefinedProps } from '@utils/omitUndefinedProps'; import { renderParamsSlot } from '@utils/renderParamsSlot'; import { type GetProps, Input as AInput } from 'antd'; @@ -39,16 +40,20 @@ export const InputSearch = sveltify< const showCountFunction = useFunction( typeof showCount === 'object' ? showCount.formatter : undefined ); - + const [value, setValue] = useValueChange({ + onValueChange, + value: props.value, + }); return ( <>
{children}
{ onChange?.(e); - onValueChange(e.target.value); + setValue(e.target.value); }} showCount={ slots['showCount.formatter'] diff --git a/frontend/antd/input/textarea/input.textarea.tsx b/frontend/antd/input/textarea/input.textarea.tsx index 38b4ed5a..9f489b2b 100644 --- a/frontend/antd/input/textarea/input.textarea.tsx +++ b/frontend/antd/input/textarea/input.textarea.tsx @@ -3,6 +3,7 @@ import { ReactSlot } from '@svelte-preprocess-react/react-slot'; import type { SetSlotParams } from '@svelte-preprocess-react/slot'; import { useMemo } from 'react'; import { useFunction } from '@utils/hooks/useFunction'; +import { useValueChange } from '@utils/hooks/useValueChange'; import { omitUndefinedProps } from '@utils/omitUndefinedProps'; import { renderParamsSlot } from '@utils/renderParamsSlot'; import { type GetProps, Input as AInput } from 'antd'; @@ -31,6 +32,10 @@ export const InputTextarea = sveltify< const showCountFunction = useFunction( typeof showCount === 'object' ? showCount.formatter : undefined ); + const [value, setValue] = useValueChange({ + onValueChange, + value: props.value, + }); return ( <> @@ -38,9 +43,10 @@ export const InputTextarea = sveltify< { onChange?.(e); - onValueChange(e.target.value); + setValue(e.target.value); }} showCount={ slots['showCount.formatter'] diff --git a/frontend/antd/mentions/mentions.tsx b/frontend/antd/mentions/mentions.tsx index 476d494c..114a013f 100644 --- a/frontend/antd/mentions/mentions.tsx +++ b/frontend/antd/mentions/mentions.tsx @@ -2,6 +2,7 @@ import { sveltify } from '@svelte-preprocess-react'; import { ReactSlot } from '@svelte-preprocess-react/react-slot'; import { useMemo } from 'react'; import { useFunction } from '@utils/hooks/useFunction'; +import { useValueChange } from '@utils/hooks/useValueChange'; import { renderItems } from '@utils/renderItems'; import { type GetProps, Mentions as AMentions } from 'antd'; @@ -30,13 +31,17 @@ export const Mentions = sveltify< const getPopupContainerFunction = useFunction(getPopupContainer); const filterOptionFunction = useFunction(filterOption); const validateSearchFunction = useFunction(validateSearch); + const [value, setValue] = useValueChange({ + onValueChange, + value: props.value, + }); return ( <>
{children}
- { return ( options || @@ -47,7 +52,7 @@ export const Mentions = sveltify< }, [optionItems, options])} onChange={(v, ...args) => { onChange?.(v, ...args); - onValueChange(v); + setValue(v); }} validateSearch={validateSearchFunction} notFoundContent={ diff --git a/frontend/base/each/Each.svelte b/frontend/base/each/Each.svelte index 7399fd5b..b803cd1d 100644 --- a/frontend/base/each/Each.svelte +++ b/frontend/base/each/Each.svelte @@ -13,12 +13,10 @@ setSlotContext({ ...context_value, ...value, - restProps: $$restProps, }); $: setSlotContext({ ...context_value, ...value, - restProps: $$restProps, }); diff --git a/frontend/svelte-preprocess-react/slot.ts b/frontend/svelte-preprocess-react/slot.ts index 365d55bf..faa03051 100644 --- a/frontend/svelte-preprocess-react/slot.ts +++ b/frontend/svelte-preprocess-react/slot.ts @@ -118,8 +118,8 @@ export function getSlotContext< const as_item = get(ctx)?.as_item || props.as_item; const initialCtxValue: Record = ctx ? as_item - ? (get(ctx)[as_item as keyof T] as Record) - : get(ctx) + ? (get(ctx)?.[as_item as keyof T] as Record) || {} + : get(ctx) || {} : {}; const mergeRestProps = ( restProps?: Record, @@ -156,11 +156,11 @@ export function getSlotContext< ctx.subscribe((ctxValue) => { const { as_item: merged_as_item } = get(mergedProps); if (merged_as_item) { - ctxValue = (ctxValue as Record)[merged_as_item]; + ctxValue = (ctxValue as Record)?.[merged_as_item]; } mergedProps.update((prev) => ({ ...prev, - ...ctxValue, + ...(ctxValue || {}), restProps: mergeRestProps(prev.restProps, ctxValue), })); }); @@ -169,8 +169,8 @@ export function getSlotContext< mergedProps, (v) => { const ctxValue: Record = v.as_item - ? (get(ctx)[v.as_item as keyof T] as Record) - : get(ctx); + ? (get(ctx)?.[v.as_item as keyof T] as Record) || {} + : get(ctx) || {}; return mergedProps.set({ ...v, ...ctxValue, diff --git a/frontend/utils/hooks/useValueChange.ts b/frontend/utils/hooks/useValueChange.ts new file mode 100644 index 00000000..0dacc936 --- /dev/null +++ b/frontend/utils/hooks/useValueChange.ts @@ -0,0 +1,28 @@ +import { useEffect, useRef, useState } from 'react'; + +export interface UseValueChangeProps { + value: T; + onValueChange: (value: P) => void; +} + +export function useValueChange({ + value, + onValueChange, +}: UseValueChangeProps) { + const [mergedValue, setMergedValue] = useState(value); + const onValueChangeRef = useRef(onValueChange); + onValueChangeRef.current = onValueChange; + const mergedValueRef = useRef(mergedValue); + mergedValueRef.current = mergedValue; + useEffect(() => { + onValueChangeRef.current(mergedValue as unknown as P); + }, [mergedValue]); + + useEffect(() => { + if (value !== mergedValueRef.current) { + setMergedValue(value); + } + }, [value]); + + return [mergedValue, setMergedValue] as const; +} From fd65f6ec442f5bf9e6a71770564f41bb0de0022f Mon Sep 17 00:00:00 2001 From: Col0ring <1561999073@qq.com> Date: Thu, 7 Nov 2024 16:57:46 +0800 Subject: [PATCH 41/51] docs: update --- .../components/antd/menu/item/__init__.py | 2 + docs/app.py | 76 +++++++++++------ docs/components/antd/button/README-zh_CN.md | 2 +- docs/components/antd/divider/README-zh_CN.md | 4 +- .../antd/float_button/README-zh_CN.md | 4 +- docs/components/antd/icon/README-zh_CN.md | 6 +- docs/components/antd/typography/README.md | 4 +- .../components/antd/typography/demos/basic.py | 24 +++--- docs/components/base/overview/README-zh_CN.md | 7 ++ docs/components/base/overview/README.md | 7 ++ docs/components/base/overview/app.py | 6 ++ docs/components/base/overview/demos/basic.py | 14 ++++ docs/helper/Site.py | 81 +++++++++++-------- frontend/antd/typography/Base.svelte | 1 + frontend/antd/typography/typography.base.tsx | 8 +- 15 files changed, 166 insertions(+), 80 deletions(-) create mode 100644 docs/components/base/overview/README-zh_CN.md create mode 100644 docs/components/base/overview/README.md create mode 100644 docs/components/base/overview/app.py create mode 100644 docs/components/base/overview/demos/basic.py diff --git a/backend/modelscope_studio/components/antd/menu/item/__init__.py b/backend/modelscope_studio/components/antd/menu/item/__init__.py index f20c1cf5..605f4f3f 100644 --- a/backend/modelscope_studio/components/antd/menu/item/__init__.py +++ b/backend/modelscope_studio/components/antd/menu/item/__init__.py @@ -32,6 +32,7 @@ def __init__( icon: str | None = None, key: str | None = None, theme: Literal['dark', 'light'] = None, + type: Literal['group'] | None = None, popup_class_name: str | None = None, popup_offset: tuple[int | float, int | float] | None = None, as_item: str | None = None, @@ -59,6 +60,7 @@ def __init__( self.icon = icon self.key = key self.theme = theme + self.type = type self.popup_class_name = popup_class_name self.popup_offset = popup_offset diff --git a/docs/app.py b/docs/app.py index 611906cb..61a91006 100644 --- a/docs/app.py +++ b/docs/app.py @@ -35,9 +35,19 @@ def get_docs(file_path: str, type: Literal["antd", "base"]): base_docs = get_docs(__file__, "base") antd_docs = get_docs(__file__, "antd") -default_active_tab = "antd" +default_active_tab = "base" -base_menu_items = [{"label": "Application", "key": "application"}] +base_menu_items = [{ + "label": "Overview", + "key": "overview" +}, { + "label": "Core", + "type": "group", + "children": [{ + "label": "Application", + "key": "application" + }] +}] antd_menu_items = [{ "label": "Overview", @@ -56,6 +66,9 @@ def get_docs(file_path: str, type: Literal["antd", "base"]): }, { "label": "Icon", "key": "icon" + }, { + "label": "Typography", + "key": "typography" }] }, { "label": "Layout", @@ -66,18 +79,43 @@ def get_docs(file_path: str, type: Literal["antd", "base"]): }] }] + +def logo(): + with antd.Flex(align='center', gap=8): + antd.Image(os.path.join(os.path.dirname(__file__), + "./resources/modelscope.png"), + preview=False, + height=20) + ms.Span('✖️') + antd.Image(os.path.join(os.path.dirname(__file__), + "./resources/gradio.png"), + preview=False, + height=40) + + +def more_components(): + with antd.Button(type="link", + href="https://ant.design/components/overview/", + href_target="_blank"): + ms.Text("More Components") + + with ms.Slot("icon"): + antd.Icon("ExportOutlined") + + tabs = [ { "label": "Base", "key": "base", - "default_active_key": "application", + "default_active_key": "overview", "menus": base_menu_items }, { "label": "Antd", "key": "antd", "default_active_key": "overview", - "menus": antd_menu_items + "menus": antd_menu_items, + "extra_menu_footer": more_components }, # { # "label": "Legacy", @@ -86,27 +124,15 @@ def get_docs(file_path: str, type: Literal["antd", "base"]): # }, ] - -def logo(): - with antd.Flex(align='center', gap=8): - antd.Image(os.path.join(os.path.dirname(__file__), - "./resources/modelscope.png"), - preview=False, - height=20) - ms.Span('✖️') - antd.Image(os.path.join(os.path.dirname(__file__), - "./resources/gradio.png"), - preview=False, - height=40) - - -site = Site(tabs=tabs, - docs={ - **antd_docs, - **base_docs - }, - default_active_tab=default_active_tab, - logo=logo) +site = Site( + tabs=tabs, + docs={ + # match the key of tabs + "antd": antd_docs, + "base": base_docs + }, + default_active_tab=default_active_tab, + logo=logo) demo = site.render() diff --git a/docs/components/antd/button/README-zh_CN.md b/docs/components/antd/button/README-zh_CN.md index 9e161d44..065a0795 100644 --- a/docs/components/antd/button/README-zh_CN.md +++ b/docs/components/antd/button/README-zh_CN.md @@ -1,6 +1,6 @@ # Button -See [Ant Design](https://ant.design/components/button/) for more information. +To trigger an operation. See [Ant Design](https://ant.design/components/button/) for more information. ## Examples diff --git a/docs/components/antd/divider/README-zh_CN.md b/docs/components/antd/divider/README-zh_CN.md index 9e161d44..36464d04 100644 --- a/docs/components/antd/divider/README-zh_CN.md +++ b/docs/components/antd/divider/README-zh_CN.md @@ -1,6 +1,6 @@ -# Button +# Divider -See [Ant Design](https://ant.design/components/button/) for more information. +A divider line separates different content. See [Ant Design](https://ant.design/components/divider/) for more information. ## Examples diff --git a/docs/components/antd/float_button/README-zh_CN.md b/docs/components/antd/float_button/README-zh_CN.md index e0730d7c..0c7d28f3 100644 --- a/docs/components/antd/float_button/README-zh_CN.md +++ b/docs/components/antd/float_button/README-zh_CN.md @@ -1,6 +1,6 @@ -# Button +# FloatButton -See [Ant Design](https://ant.design/components/float-button/) for more information. +A button that floats at the top of the page. See [Ant Design](https://ant.design/components/float-button/) for more information. ## Examples diff --git a/docs/components/antd/icon/README-zh_CN.md b/docs/components/antd/icon/README-zh_CN.md index 809ae866..4305174e 100644 --- a/docs/components/antd/icon/README-zh_CN.md +++ b/docs/components/antd/icon/README-zh_CN.md @@ -1,7 +1,9 @@ -# Button +# Icon -See [Ant Design](https://ant.design/components/float-button/) for more information. +Semantic vector graphics. See [Ant Design](https://ant.design/components/icon/) for more information. ## Examples + + diff --git a/docs/components/antd/typography/README.md b/docs/components/antd/typography/README.md index d22a0ae0..cefa66ef 100644 --- a/docs/components/antd/typography/README.md +++ b/docs/components/antd/typography/README.md @@ -1,6 +1,6 @@ -# FloatButton +# Typography -A button that floats at the top of the page. See [Ant Design](https://ant.design/components/float-button/) for more information. +Basic text writing, including headings, body text, lists, and more. See [Ant Design](https://ant.design/components/typography/) for more information. ## Examples diff --git a/docs/components/antd/typography/demos/basic.py b/docs/components/antd/typography/demos/basic.py index e6ffc756..0bb2e584 100644 --- a/docs/components/antd/typography/demos/basic.py +++ b/docs/components/antd/typography/demos/basic.py @@ -3,21 +3,21 @@ import modelscope_studio.components.antd as antd import modelscope_studio.components.base as ms + +def on_edit(e: gr.EventData): + return gr.update(value=e._data["payload"][0]) + + with gr.Blocks() as demo: with ms.Application(): with antd.ConfigProvider(): - with antd.FloatButton.Group(shape="circle", - elem_style=dict(insetInlineEnd=24)): - with antd.FloatButton(badge=dict(count=12)): - antd.Icon("QuestionCircleOutlined") - antd.FloatButton(badge=dict(count=123, overflowCount=999)) - antd.FloatButton.BackTop(visibility_height=0) - antd.FloatButton(type="primary", - elem_style=dict(insetInlineEnd=24 + 70)) - with antd.FloatButton(elem_style=dict(insetInlineEnd=24 + 70 + - 70)): - with ms.Slot("icon"): - antd.Icon("QuestionCircleOutlined") + antd.Typography.Title("Hello, World!", level=3) + antd.Typography.Text("Hello, World!", disabled=True) + antd.Typography.Text("Hello, World!", type="danger") + antd.Typography.Paragraph('This is a copyable text.', + copyable=True) + p = antd.Typography.Paragraph('This is an editable text.') + p.editable_change(on_edit, outputs=[p]) if __name__ == "__main__": demo.queue().launch() diff --git a/docs/components/base/overview/README-zh_CN.md b/docs/components/base/overview/README-zh_CN.md new file mode 100644 index 00000000..9e161d44 --- /dev/null +++ b/docs/components/base/overview/README-zh_CN.md @@ -0,0 +1,7 @@ +# Button + +See [Ant Design](https://ant.design/components/button/) for more information. + +## Examples + + diff --git a/docs/components/base/overview/README.md b/docs/components/base/overview/README.md new file mode 100644 index 00000000..177490f6 --- /dev/null +++ b/docs/components/base/overview/README.md @@ -0,0 +1,7 @@ +# Overview + +A Provider for all components of modelscope_studio. + +## Examples + + diff --git a/docs/components/base/overview/app.py b/docs/components/base/overview/app.py new file mode 100644 index 00000000..0018b7c1 --- /dev/null +++ b/docs/components/base/overview/app.py @@ -0,0 +1,6 @@ +from helper.Docs import Docs + +docs = Docs(__file__) + +if __name__ == "__main__": + docs.render().queue().launch() diff --git a/docs/components/base/overview/demos/basic.py b/docs/components/base/overview/demos/basic.py new file mode 100644 index 00000000..14d84d05 --- /dev/null +++ b/docs/components/base/overview/demos/basic.py @@ -0,0 +1,14 @@ +import gradio as gr + +import modelscope_studio.components.antd as antd +import modelscope_studio.components.base as ms + +with gr.Blocks() as demo: + with ms.Application(): + with antd.ConfigProvider(): + antd.Button("Primary Button", type="primary") + antd.Divider() + antd.Input() + +if __name__ == "__main__": + demo.queue().launch() diff --git a/docs/helper/Site.py b/docs/helper/Site.py index 608ce2ef..74381f3a 100644 --- a/docs/helper/Site.py +++ b/docs/helper/Site.py @@ -29,13 +29,14 @@ def _render_docs(self, items: list, tab: dict): docs_tabs.extend(self._render_docs(item["children"], tab)) elif "key" in item: key = item["key"].replace("-", "_") - if key in self.docs: + tab_docs = self.docs.get(tab["key"], {}) + if key in tab_docs: with antd.Tabs.Item( key=key, visible=True if tab.get("default_active_key") == key else False) as docs_tab: docs_tabs.append(docs_tab) - self.docs[key].docs.render() + tab_docs[key].docs.render() return docs_tabs def render(self): @@ -118,7 +119,6 @@ def on_tab_menu_select(e: gr.EventData): backgroundColor= "var(--ms-gr-ant-color-bg-container)" )): - sider_menu = antd.Menu( selected_keys=[ tab.get( @@ -127,6 +127,16 @@ def on_tab_menu_select(e: gr.EventData): ], mode="inline", items=tab.get("menus", [])) + if "extra_menu_footer" in tab: + if callable(tab[ + "extra_menu_footer"] + ): + tab["extra_menu_footer"]( + ) + else: + tab["extra_menu_footer"].render( + ) + with antd.Layout(): with antd.Layout.Content( elem_style=dict( @@ -144,35 +154,42 @@ def on_tab_menu_select(e: gr.EventData): "menus", []), tab) - def on_layout_menu_select( - e: gr.EventData): - selected_menu = e._data[ - "payload"][0]["key"] - item = next( - (item for item in docs_tabs - if item.key == - selected_menu), - docs_tabs[0]) - return { - sider_menu: - gr.update(selected_keys=[ - selected_menu - ]), - layout_content_tabs: - gr.update( - active_key=selected_menu - ), - item: - gr.update(visible=True) - } - - sider_menu.select( - fn=on_layout_menu_select, - outputs=[ - sider_menu, - layout_content_tabs, - *docs_tabs - ]) + def on_layout_menu_select_wrapper( + tabs, sider_menu, + layout_content_tabs): + + def on_layout_menu_select( + e: gr.EventData): + selected_menu = e._data["payload"][ + 0]["key"] + + item = next( + (item for item in tabs + if item.key == selected_menu), + tabs[0]) + + return { + sider_menu: + gr.update(selected_keys=[ + selected_menu + ]), + layout_content_tabs: + gr.update( + active_key=selected_menu), + item: + gr.update(visible=True) + } + + return on_layout_menu_select + + sider_menu.select( + fn=on_layout_menu_select_wrapper( + docs_tabs, sider_menu, + layout_content_tabs), + outputs=[ + sider_menu, layout_content_tabs, + *docs_tabs + ]) tab_menu.select( fn=on_tab_menu_select, outputs=[tab_menu, tabs, *tab_components]) diff --git a/frontend/antd/typography/Base.svelte b/frontend/antd/typography/Base.svelte index 00f3c535..bab3ee82 100644 --- a/frontend/antd/typography/Base.svelte +++ b/frontend/antd/typography/Base.svelte @@ -80,6 +80,7 @@ {...$mergedProps.props} {...bindEvents($mergedProps)} slots={$slots} + value={$mergedProps.value} {setSlotParams} > {#if $mergedProps._internal.layout} diff --git a/frontend/antd/typography/typography.base.tsx b/frontend/antd/typography/typography.base.tsx index 84c13f2d..ef60ab6e 100644 --- a/frontend/antd/typography/typography.base.tsx +++ b/frontend/antd/typography/typography.base.tsx @@ -3,6 +3,7 @@ import { ReactSlot } from '@svelte-preprocess-react/react-slot'; import type { SetSlotParams } from '@svelte-preprocess-react/slot'; import React, { useMemo } from 'react'; import { useSlotsChildren } from '@utils/hooks/useSlotsChildren'; +import { omitUndefinedProps } from '@utils/omitUndefinedProps'; import { renderParamsSlot } from '@utils/renderParamsSlot'; import { type GetProps, Typography } from 'antd'; import type { EllipsisConfig } from 'antd/es/typography/Base'; @@ -24,6 +25,7 @@ export const TypographyBase = sveltify< GetProps & { component: 'title' | 'paragraph' | 'text' | 'link'; setSlotParams: SetSlotParams; + value?: string; }, [ // list @@ -47,6 +49,7 @@ export const TypographyBase = sveltify< editable, ellipsis, setSlotParams, + value, ...props }) => { const copyableTooltipsTargets = useTargets(children, 'copyable.tooltips'); @@ -88,7 +91,8 @@ export const TypographyBase = sveltify< className={cls(className, `ms-gr-antd-typography-${component}`)} copyable={ supportCopy - ? { + ? omitUndefinedProps({ + text: value, ...getConfig(copyable), tooltips: copyableTooltipsTargets.length > 0 @@ -102,7 +106,7 @@ export const TypographyBase = sveltify< return ; }) : copyableConfig.icon, - } + }) : undefined } editable={ From 53b4f51905a2d3753d830e3b8f5e0568bee6f809 Mon Sep 17 00:00:00 2001 From: Col0ring <1561999073@qq.com> Date: Thu, 7 Nov 2024 20:08:02 +0800 Subject: [PATCH 42/51] docs: update --- docs/app.py | 39 ++++++++++++- docs/components/antd/overview/README-zh_CN.md | 2 +- docs/components/antd/overview/README.md | 46 ++++++++-------- .../base/application/README-zh_CN.md | 17 +++++- docs/components/base/application/README.md | 15 ++++- .../base/application/demos/custom_event.py | 20 +++++++ .../application/demos/language_adaptation.py | 39 +++++++++++++ .../application/demos/theme_adaptation.py | 34 ++++++++++++ docs/components/base/overview/README-zh_CN.md | 55 +++++++++++++++++-- docs/components/base/overview/README.md | 53 +++++++++++++++++- .../components/base/overview/demos/example.py | 12 ++++ docs/components/base/slot/README-zh_CN.md | 16 ++++++ docs/components/base/slot/README.md | 16 ++++++ docs/components/base/slot/app.py | 6 ++ .../base/{overview => slot}/demos/basic.py | 0 .../base/slot/demos/language_adaptation.py | 39 +++++++++++++ .../base/slot/demos/theme_adaptation.py | 33 +++++++++++ 17 files changed, 406 insertions(+), 36 deletions(-) create mode 100644 docs/components/base/application/demos/custom_event.py create mode 100644 docs/components/base/application/demos/language_adaptation.py create mode 100644 docs/components/base/application/demos/theme_adaptation.py create mode 100644 docs/components/base/overview/demos/example.py create mode 100644 docs/components/base/slot/README-zh_CN.md create mode 100644 docs/components/base/slot/README.md create mode 100644 docs/components/base/slot/app.py rename docs/components/base/{overview => slot}/demos/basic.py (100%) create mode 100644 docs/components/base/slot/demos/language_adaptation.py create mode 100644 docs/components/base/slot/demos/theme_adaptation.py diff --git a/docs/app.py b/docs/app.py index 61a91006..395b83a6 100644 --- a/docs/app.py +++ b/docs/app.py @@ -41,11 +41,46 @@ def get_docs(file_path: str, type: Literal["antd", "base"]): "label": "Overview", "key": "overview" }, { - "label": "Core", - "type": "group", + "label": + "Core", + "type": + "group", "children": [{ "label": "Application", "key": "application" + }, { + "label": "Slot", + "key": "slot" + }, { + "label": "Fragment", + "key": "fragment" + }] +}, { + "label": + "Layout", + "type": + "group", + "children": [{ + "label": "Div", + "key": "div" + }, { + "label": "Span", + "key": "span" + }, { + "label": "Text", + "key": "text" + }] +}, { + "label": + "Flow-Control", + "type": + "group", + "children": [{ + "label": "Each", + "key": "each" + }, { + "label": "Filter", + "key": "filter" }] }] diff --git a/docs/components/antd/overview/README-zh_CN.md b/docs/components/antd/overview/README-zh_CN.md index 4b9cd50e..e4ab567a 100644 --- a/docs/components/antd/overview/README-zh_CN.md +++ b/docs/components/antd/overview/README-zh_CN.md @@ -1,6 +1,6 @@ # 概览 -`modelscope_studio`集成了 [Ant Design](https://ant.design/components/icon/) 的组件,并支持大部分的组件属性,您只需要引入`antd`模块即可直接使用。 +`modelscope_studio`集成了 [Ant Design](https://ant.design/) 的组件,并支持大部分的组件属性,您只需要引入`antd`模块即可直接使用。 ```python import modelscope_studio.components.antd as antd diff --git a/docs/components/antd/overview/README.md b/docs/components/antd/overview/README.md index 4b9cd50e..82bb9278 100644 --- a/docs/components/antd/overview/README.md +++ b/docs/components/antd/overview/README.md @@ -1,40 +1,40 @@ -# 概览 +# Overview -`modelscope_studio`集成了 [Ant Design](https://ant.design/components/icon/) 的组件,并支持大部分的组件属性,您只需要引入`antd`模块即可直接使用。 +`modelscope_studio` integrates [Ant Design](https://ant.design/) components and supports most component properties. You can use them directly by importing the `antd` module. ```python import modelscope_studio.components.antd as antd ``` -## 快速开始 +## Quick Start -注意:其中`ms.Application`与`antd.ConfigProvider`是必须的。 +Note: Both `ms.Application` and `antd.ConfigProvider` are required. -- `Application` 包含了`modelscope_studio`中所有的组件依赖,请确保`modelscope_studio`所有导出的组件都被其包裹,否则页面将会无法成功预览。 -- `ConfigProvider` 与 Ant Design 中的功能一致,除此之外,我们还加了一些额外的适配来兼容 Gradio 的样式。因此,为了保证页面样式正常,所有的`antd`组件需要包裹在该组件下。 +- `Application` contains all component dependencies in `modelscope_studio`. Please ensure that all components exported from `modelscope_studio` are wrapped by it, otherwise the page will not be successfully previewed. +- `ConfigProvider` functions the same as in Ant Design. Additionally, we have added some extra adaptations to be compatible with Gradio's styles. Therefore, to ensure normal page styling, all `antd` components need to be wrapped within this component. -## 属性限制 +## Property Limitations -由于 Python 的类型限制,一些组件属性的支持形式有所不同。 +Due to Python's type restrictions, the support for some component properties differs. -### 事件 +### Events -在`antd`中,所有以`onXxx`形式绑定的事件,均改为了`gradio`的事件绑定形式,如`onClick`、`onChange`等。如果您想要获取事件参数,也需要绑定`gr.EventData`,所有的事件参数都通过数组的形式保存在`e._data["payload"]`中。 +In `antd`, all events bound in the form of `onXxx` have been changed to Gradio's event binding form, such as `onClick`, `onChange`, etc. If you want to get event parameters, you also need to bind `gr.EventData`. All event parameters are stored in the form of an array in `e._data["payload"]`. ### ReactNode -在 Python 中无法直接将某个组件作为参数,因此我们提供了插槽机制,您可以使用`ms.Slot`来包裹需要被渲染的模块。 +In Python, it's not possible to directly pass a component as a parameter, so we provide a slot mechanism. You can use `ms.Slot` to wrap the module that needs to be rendered. -**注:** +**Note:** -- 您可以通过查看组件的`SLOTS`属性获取所有支持的插槽。 -- 如果您只想渲染一段字符串或数字,您依然可以直接将其作为组件的属性传入,无需使用`ms.Slot`。下面两种写法效果是一样的,并且更推荐直接作为组件属性传入: +- You can view the `SLOTS` property of the component to get all supported slots. +- If you only want to render a string or number, you can still pass it directly as a component property without using `ms.Slot`. The following two ways of writing have the same effect, and it's more recommended to pass it directly as a component property: ```python antd.Card(title="Card Title") @@ -44,30 +44,30 @@ import modelscope_studio.components.antd as antd ms.Text("Card Title") ``` -### 普通函数((...args) => {}) +### Regular Functions ((...args) => {}) -为了支持在 Python 直接传入 Javascript 函数,我们将其改为了`str`类型。因此,您只需要传递普通的函数字符串即可,它会在前端被自动编译为 Javascript 函数。 +To support passing JavaScript functions directly in Python, we have changed them to `str` type. Therefore, you only need to pass a regular function string, and it will be automatically compiled into a JavaScript function on the frontend. -我们在全局注入了事件通知对象,您可以通过在函数中调用`window.ms_globals.dispatch`来主动向 Python 端发送事件,在 Python 端可以通过`ms.Application.custom`事件接收。 +We have injected a global event notification object. You can actively send events to the Python side by calling `window.ms_globals.dispatch` in the function, which can be received on the Python side through the `ms.Application.custom` event. -### 返回 ReactNode 的函数 ((...args) => ReactNode) +### Functions Returning ReactNode ((...args) => ReactNode) -当您的 Javascript 函数返回值为 ReactNode 时,我们提供了两种处理方式: +When your JavaScript function returns a ReactNode, we provide two handling methods: -1. 将其当做普通的 ReactNode 值,继续使用`ms.Slot`来渲染模块,在此基础上,`ms.Slot`还支持传入`params_mapping`参数,该参数同样接收一个 Javascript 函数字符串,它可以将函数的参数映射为当前`slot`环境的上下文(具体请参考`ms.Each`)。 +1. Treat it as a regular ReactNode value and continue using `ms.Slot` to render the module. Additionally, `ms.Slot` supports passing a `params_mapping` parameter, which also accepts a JavaScript function string. It can map the function's parameters to the context of the current `slot` environment (refer to `ms.Each` for details). -2. 将其当做普通函数,通过`window.ms_globals.React`与`window.ms_globals.antd`等全局变量在前端生成 ReactNode(注意此时不能使用 jsx,需要使用 `React.createElement`)。 +2. Treat it as a regular function and generate ReactNode on the frontend using global variables like `window.ms_globals.React` and `window.ms_globals.antd` (note that JSX cannot be used here, you need to use `React.createElement`). -## 集成其他 Gradio 组件 +## Integrating Other Gradio Components -某些组件的插槽可能只支持`modelscope_studio`中的组件,如果您想要支持其他的 Gradio 组件,您需要使用`Fragment`来将其包裹。 +Some component slots may only support components from `modelscope_studio`. If you want to support other Gradio components, you need to wrap them with `Fragment`. diff --git a/docs/components/base/application/README-zh_CN.md b/docs/components/base/application/README-zh_CN.md index 9e161d44..3582511e 100644 --- a/docs/components/base/application/README-zh_CN.md +++ b/docs/components/base/application/README-zh_CN.md @@ -1,7 +1,20 @@ -# Button +# Application -See [Ant Design](https://ant.design/components/button/) for more information. +应用的根组件,该组件包含了所有`modelscope_studio`的组件依赖,需要确保所有从`modelscope_studio`导出的组件都被其包裹,否则页面将会无法成功预览。 + +该组件还可以监听用户页面的生命周期,并获取当前用户的环境信息,您可以 + +- 获取当前用户的语言、页面主题、user agent 和屏幕状态。 +- 监听页面行为并触发相应事件(页面加载、尺寸变化、页面关闭等)。 + +另外,该组件还提供了`custom`事件,您可以通过在任意 Javascript 函数中调用`window.ms_globals.dispatch`主动向 Python 端发送事件,在 Python 端可以通过`ms.Application.custom`事件接收。 ## Examples + + + + + + diff --git a/docs/components/base/application/README.md b/docs/components/base/application/README.md index e8ce3499..49721844 100644 --- a/docs/components/base/application/README.md +++ b/docs/components/base/application/README.md @@ -1,7 +1,20 @@ # Application -A Provider for all components of modelscope_studio. +The root component of the application, this component contains all the component dependencies of `modelscope_studio`. It is necessary to ensure that all components exported from `modelscope_studio` are wrapped by it, otherwise the page will not be successfully previewed. + +In addition, this component can also listen to the lifecycle of the user's page and obtain the current user's environment information, you can: + +- Obtain the current user's language, page theme, user agent, and screen status. +- Listen to page behaviors and trigger corresponding events (page loading, size changes, page closing, etc.). + +In addition, this component provides the `custom` event, you can send events to the Python side by calling `window.ms_globals.dispatch` in any Javascript function, and receive the events on the Python side through the `ms.Application.custom` event. ## Examples + + + + + + diff --git a/docs/components/base/application/demos/custom_event.py b/docs/components/base/application/demos/custom_event.py new file mode 100644 index 00000000..78945a61 --- /dev/null +++ b/docs/components/base/application/demos/custom_event.py @@ -0,0 +1,20 @@ +import gradio as gr + +import modelscope_studio.components.antd as antd +import modelscope_studio.components.base as ms + + +def on_custom(e: gr.EventData): + print(e) + + +with gr.Blocks() as demo: + with ms.Application() as app: + with antd.ConfigProvider(): + gr.HTML( + """""" + ) + + app.custom(on_custom) +if __name__ == "__main__": + demo.queue().launch() diff --git a/docs/components/base/application/demos/language_adaptation.py b/docs/components/base/application/demos/language_adaptation.py new file mode 100644 index 00000000..b1ae2170 --- /dev/null +++ b/docs/components/base/application/demos/language_adaptation.py @@ -0,0 +1,39 @@ +import time + +import gradio as gr + +import modelscope_studio.components.base as ms + +messages = { + 'en': { + "hello": "Hello" + }, + 'en-US': { + "hello": "Hello" + }, + 'zh-CN': { + "hello": "你好" + } +} + +default_lang = "en" + + +def mount(e: gr.EventData, _state): + lang = e._data["language"] + if (lang in messages): + _state["current_lang"] = lang + yield 'Switch Language...', _state + time.sleep(2) + yield messages[lang]["hello"], _state + + +with gr.Blocks() as demo: + with ms.Application() as app: + state = gr.State({"current_lang": default_lang}) + markdown = gr.Markdown(value=messages[default_lang]["hello"]) + + app.mount(fn=mount, inputs=[state], outputs=[markdown, state]) + +if __name__ == "__main__": + demo.queue().launch() diff --git a/docs/components/base/application/demos/theme_adaptation.py b/docs/components/base/application/demos/theme_adaptation.py new file mode 100644 index 00000000..4d9cb2ef --- /dev/null +++ b/docs/components/base/application/demos/theme_adaptation.py @@ -0,0 +1,34 @@ +import gradio as gr + +import modelscope_studio.components.antd as antd +import modelscope_studio.components.base as ms + + +def mount(e: gr.EventData, _state): + _state["theme"] = e._data["theme"] + yield _state + + +def fn(_state): + theme = _state["theme"] + color = '000/fff' if theme == 'dark' else 'fff/000' + yield gr.update( + value=f"https://dummyimage.com/200x100/{color}.png&text={theme}") + + +with gr.Blocks() as demo: + state = gr.State({"theme": "light"}) + with ms.Application() as app: + with antd.ConfigProvider(): + btn = antd.Button( + "Run", + type="primary", + block=True, + ) + image = antd.Image() + + app.mount(fn=mount, inputs=[state], outputs=[state]) + btn.click(fn=fn, inputs=[state], outputs=[image]) + +if __name__ == "__main__": + demo.queue().launch() diff --git a/docs/components/base/overview/README-zh_CN.md b/docs/components/base/overview/README-zh_CN.md index 9e161d44..a36457aa 100644 --- a/docs/components/base/overview/README-zh_CN.md +++ b/docs/components/base/overview/README-zh_CN.md @@ -1,7 +1,54 @@ -# Button +# ModelScope Studio -See [Ant Design](https://ant.design/components/button/) for more information. +

+ + + ✖️ + + +

-## Examples +

+GitHub | 🤖 ModelScope Studio | 🤗 Hugging Face Space - +`modelscope_studio`是一个基于 Gradio 的三方组件库,在原有 Gradio 组件的基础上延伸了更多的组件和使用形式。 + +目前支持的 UI 库: + +- [Ant Design](https://ant.design/) + +## 何时使用 + +比起 Gradio 自身的组件,`modelscope_studio`更加注重页面布局和组件的灵活性,如果您想要构建更漂亮的用户界面,我们非常推荐您使用`modelscope_studio`。然而,当您的应用需要 Gradio 在 Python 端更多地处理内置数据时,`modelscope_studio`可能不是最好的选择,但仍然可以使用`modelscope_studio`的布局和展示组件来帮助您构建页面。 + +## 依赖 + +- Gradio >= 4.0 + +## 安装 + +> 目前`modelscope_studio` 1.0 版本仍在开发中,您可以通过安装`beta`版本提前使用。 + +```sh +pip install modelscope_studio~=1.0.0b +``` + +## 示例 + + + +## 迁移到 1.0 + +如果您在之前使用了`modelscope_studio`的组件,并且想要在新版本中继续使用。不需要对原有组件做任何修改,只需要在外层引入`ms.Application`即可。 + +```python +import gradio as gr +import modelscope_studio.components.base as ms +import modelscope_studio.components.legacy as mgr + +with gr.Blocks() as demo: + with ms.Application(): + mgr.Chatbot() + +demo.launch() +``` diff --git a/docs/components/base/overview/README.md b/docs/components/base/overview/README.md index 177490f6..09405b9f 100644 --- a/docs/components/base/overview/README.md +++ b/docs/components/base/overview/README.md @@ -1,7 +1,54 @@ -# Overview +# ModelScope Studio -A Provider for all components of modelscope_studio. +

+ + + ✖️ + + +

+ +

+GitHub | 🤖 ModelScope Studio | 🤗 Hugging Face Space + +`modelscope_studio` is a third-party component library based on Gradio, extending more components and usage forms on top of the original Gradio components. + +Currently supported UI libraries: + +- [Ant Design](https://ant.design/) + +## When to Use + +Compared to Gradio's own components, `modelscope_studio` focuses more on page layout and component flexibility. If you want to build a more beautiful user interface, we highly recommend using `modelscope_studio`. However, when your application needs Gradio to handle more built-in data on the Python side, `modelscope_studio` may not be the best choice, but you can still use `modelscope_studio`'s layout and display components to help you build pages. + +## Dependencies + +- Gradio >= 4.0 + +## Installation + +> Currently, `modelscope_studio` version 1.0 is still under development. You can use the `beta` version in advance. + +```sh +pip install modelscope_studio~=1.0.0b +``` ## Examples - + + +## Migration to 1.0 + +If you have previously used `modelscope_studio` components and want to continue using them in the new version, no modifications to the original components are needed. You just need to introduce `ms.Application` in the outer layer. + +```python +import gradio as gr +import modelscope_studio.components.base as ms +import modelscope_studio.components.legacy as mgr + +with gr.Blocks() as demo: + with ms.Application(): + mgr.Chatbot() + +demo.launch() +``` diff --git a/docs/components/base/overview/demos/example.py b/docs/components/base/overview/demos/example.py new file mode 100644 index 00000000..a5551f18 --- /dev/null +++ b/docs/components/base/overview/demos/example.py @@ -0,0 +1,12 @@ +import gradio as gr + +import modelscope_studio.components.antd as antd +import modelscope_studio.components.base as ms + +with gr.Blocks() as demo: + with ms.Application(): + with antd.ConfigProvider(): + antd.DatePicker() + +if __name__ == "__main__": + demo.queue().launch() diff --git a/docs/components/base/slot/README-zh_CN.md b/docs/components/base/slot/README-zh_CN.md new file mode 100644 index 00000000..1a08a5ec --- /dev/null +++ b/docs/components/base/slot/README-zh_CN.md @@ -0,0 +1,16 @@ +# Application + +The root component of the application, this component contains all the component dependencies of `modelscope_studio`. It is necessary to ensure that all components exported from `modelscope_studio` are wrapped by it, otherwise the page will not be successfully previewed. + +In addition, this component can also listen to the lifecycle of the user's page and obtain the current user's environment information. + +- Obtain the current user's language, page theme, user agent, and screen status. +- Listen to page behaviors and trigger corresponding events (page loading, size changes, page closing, etc.). + +## Examples + + + + + + diff --git a/docs/components/base/slot/README.md b/docs/components/base/slot/README.md new file mode 100644 index 00000000..7641dd6e --- /dev/null +++ b/docs/components/base/slot/README.md @@ -0,0 +1,16 @@ +# Application + +应用的根组件,该组件包含了所有`modelscope_studio`的组件依赖,需要确保所有从`modelscope_studio`导出的组件都被其包裹,否则页面将会无法成功预览。 + +除此之外,该组件还可以监听用户页面的生命周期,并获取当前用户的环境信息。 + +- 获取当前用户的语言、页面主题、user agent 和屏幕状态。 +- 监听页面行为并触发相应事件(页面加载、尺寸变化、页面关闭等)。 + +## Examples + + + + + + diff --git a/docs/components/base/slot/app.py b/docs/components/base/slot/app.py new file mode 100644 index 00000000..0018b7c1 --- /dev/null +++ b/docs/components/base/slot/app.py @@ -0,0 +1,6 @@ +from helper.Docs import Docs + +docs = Docs(__file__) + +if __name__ == "__main__": + docs.render().queue().launch() diff --git a/docs/components/base/overview/demos/basic.py b/docs/components/base/slot/demos/basic.py similarity index 100% rename from docs/components/base/overview/demos/basic.py rename to docs/components/base/slot/demos/basic.py diff --git a/docs/components/base/slot/demos/language_adaptation.py b/docs/components/base/slot/demos/language_adaptation.py new file mode 100644 index 00000000..b1ae2170 --- /dev/null +++ b/docs/components/base/slot/demos/language_adaptation.py @@ -0,0 +1,39 @@ +import time + +import gradio as gr + +import modelscope_studio.components.base as ms + +messages = { + 'en': { + "hello": "Hello" + }, + 'en-US': { + "hello": "Hello" + }, + 'zh-CN': { + "hello": "你好" + } +} + +default_lang = "en" + + +def mount(e: gr.EventData, _state): + lang = e._data["language"] + if (lang in messages): + _state["current_lang"] = lang + yield 'Switch Language...', _state + time.sleep(2) + yield messages[lang]["hello"], _state + + +with gr.Blocks() as demo: + with ms.Application() as app: + state = gr.State({"current_lang": default_lang}) + markdown = gr.Markdown(value=messages[default_lang]["hello"]) + + app.mount(fn=mount, inputs=[state], outputs=[markdown, state]) + +if __name__ == "__main__": + demo.queue().launch() diff --git a/docs/components/base/slot/demos/theme_adaptation.py b/docs/components/base/slot/demos/theme_adaptation.py new file mode 100644 index 00000000..58cddd35 --- /dev/null +++ b/docs/components/base/slot/demos/theme_adaptation.py @@ -0,0 +1,33 @@ +import gradio as gr + +import modelscope_studio.components.antd as antd +import modelscope_studio.components.base as ms + + +def mount(e: gr.EventData, _state): + _state["theme"] = e._data["theme"] + yield _state + + +def fn(_state): + theme = _state["theme"] + color = '000/fff' if theme == 'dark' else 'fff/000' + yield gr.update( + value=f"https://dummyimage.com/200x100/{color}.png&text={theme}") + + +with gr.Blocks() as demo: + with ms.Application() as app: + state = gr.State({"theme": "light"}) + btn = antd.Button( + "Run", + type="primary", + block=True, + ) + image = antd.Image() + + app.mount(fn=mount, inputs=[state], outputs=[state]) + btn.click(fn=fn, inputs=[state], outputs=[image]) + +if __name__ == "__main__": + demo.queue().launch() From d726b2ec816bc38987b41e31c4d19ee17e16b6cd Mon Sep 17 00:00:00 2001 From: Col0ring <1561999073@qq.com> Date: Fri, 8 Nov 2024 18:00:18 +0800 Subject: [PATCH 43/51] feat: Each and context value handler --- .../components/base/filter/__init__.py | 2 +- docs/app.py | 52 ++++++++------ .../base/application/README-zh_CN.md | 2 +- .../base/application/demos/custom_event.py | 2 +- docs/components/base/div/README-zh_CN.md | 7 ++ docs/components/base/div/README.md | 7 ++ docs/components/base/div/app.py | 6 ++ docs/components/base/div/demos/basic.py | 12 ++++ docs/components/base/each/README-zh_CN.md | 27 ++++++++ docs/components/base/each/README.md | 27 ++++++++ docs/components/base/each/app.py | 6 ++ docs/components/base/each/demos/basic.py | 35 ++++++++++ .../components/base/each/demos/use_as_item.py | 69 +++++++++++++++++++ .../base/each/demos/use_context_value.py | 69 +++++++++++++++++++ docs/components/base/filter/README-zh_CN.md | 21 ++++++ docs/components/base/filter/README.md | 21 ++++++ docs/components/base/filter/app.py | 6 ++ docs/components/base/filter/demos/basic.py | 20 ++++++ .../base/filter/demos/use_as_item.py | 27 ++++++++ .../base/filter/demos/use_params_mapping.py | 26 +++++++ docs/components/base/fragment/README-zh_CN.md | 9 +++ docs/components/base/fragment/README.md | 9 +++ docs/components/base/fragment/app.py | 6 ++ docs/components/base/fragment/demos/basic.py | 22 ++++++ docs/components/base/slot/README-zh_CN.md | 18 ++--- docs/components/base/slot/README.md | 16 ++--- docs/components/base/slot/demos/basic.py | 15 +++- .../base/slot/demos/language_adaptation.py | 39 ----------- .../base/slot/demos/theme_adaptation.py | 33 --------- docs/components/base/span/README-zh_CN.md | 7 ++ docs/components/base/span/README.md | 7 ++ docs/components/base/span/app.py | 6 ++ docs/components/base/span/demos/basic.py | 12 ++++ docs/components/base/text/README-zh_CN.md | 7 ++ docs/components/base/text/README.md | 7 ++ docs/components/base/text/app.py | 6 ++ docs/components/base/text/demos/basic.py | 11 +++ docs/components/legacy/Docs.py | 4 +- docs/helper/Docs.py | 3 +- docs/helper/Site.py | 3 +- docs/helper/env.py | 3 + frontend/base/each/Each.svelte | 17 ++--- frontend/svelte-preprocess-react/slot.ts | 33 ++++++--- 43 files changed, 598 insertions(+), 139 deletions(-) create mode 100644 docs/components/base/div/README-zh_CN.md create mode 100644 docs/components/base/div/README.md create mode 100644 docs/components/base/div/app.py create mode 100644 docs/components/base/div/demos/basic.py create mode 100644 docs/components/base/each/README-zh_CN.md create mode 100644 docs/components/base/each/README.md create mode 100644 docs/components/base/each/app.py create mode 100644 docs/components/base/each/demos/basic.py create mode 100644 docs/components/base/each/demos/use_as_item.py create mode 100644 docs/components/base/each/demos/use_context_value.py create mode 100644 docs/components/base/filter/README-zh_CN.md create mode 100644 docs/components/base/filter/README.md create mode 100644 docs/components/base/filter/app.py create mode 100644 docs/components/base/filter/demos/basic.py create mode 100644 docs/components/base/filter/demos/use_as_item.py create mode 100644 docs/components/base/filter/demos/use_params_mapping.py create mode 100644 docs/components/base/fragment/README-zh_CN.md create mode 100644 docs/components/base/fragment/README.md create mode 100644 docs/components/base/fragment/app.py create mode 100644 docs/components/base/fragment/demos/basic.py delete mode 100644 docs/components/base/slot/demos/language_adaptation.py delete mode 100644 docs/components/base/slot/demos/theme_adaptation.py create mode 100644 docs/components/base/span/README-zh_CN.md create mode 100644 docs/components/base/span/README.md create mode 100644 docs/components/base/span/app.py create mode 100644 docs/components/base/span/demos/basic.py create mode 100644 docs/components/base/text/README-zh_CN.md create mode 100644 docs/components/base/text/README.md create mode 100644 docs/components/base/text/app.py create mode 100644 docs/components/base/text/demos/basic.py create mode 100644 docs/helper/env.py diff --git a/backend/modelscope_studio/components/base/filter/__init__.py b/backend/modelscope_studio/components/base/filter/__init__.py index 2e962e82..2cefc6fc 100644 --- a/backend/modelscope_studio/components/base/filter/__init__.py +++ b/backend/modelscope_studio/components/base/filter/__init__.py @@ -11,8 +11,8 @@ class ModelScopeFilter(ModelScopeLayoutComponent): EVENTS = [] def __init__(self, - *, params_mapping: str | None = None, + *, as_item: str | None = None, _internal: None = None, visible: bool = True, diff --git a/docs/app.py b/docs/app.py index 395b83a6..90870c99 100644 --- a/docs/app.py +++ b/docs/app.py @@ -1,12 +1,18 @@ import os from typing import Literal +from helper.env import is_modelscope_studio from helper.Site import Site +from legacy_app import legacy_demo import modelscope_studio.components.antd as antd import modelscope_studio.components.base as ms -# from legacy_app import legacy_demo + +def get_text(text: str, cn_text: str): + if is_modelscope_studio: + return cn_text + return text def get_docs(file_path: str, type: Literal["antd", "base"]): @@ -38,11 +44,11 @@ def get_docs(file_path: str, type: Literal["antd", "base"]): default_active_tab = "base" base_menu_items = [{ - "label": "Overview", + "label": get_text("Overview", "概览"), "key": "overview" }, { "label": - "Core", + get_text("Core", "核心"), "type": "group", "children": [{ @@ -57,7 +63,7 @@ def get_docs(file_path: str, type: Literal["antd", "base"]): }] }, { "label": - "Layout", + get_text("Layout", "布局"), "type": "group", "children": [{ @@ -72,7 +78,7 @@ def get_docs(file_path: str, type: Literal["antd", "base"]): }] }, { "label": - "Flow-Control", + get_text("Render", "渲染"), "type": "group", "children": [{ @@ -85,31 +91,33 @@ def get_docs(file_path: str, type: Literal["antd", "base"]): }] antd_menu_items = [{ - "label": "Overview", + "label": get_text("Overview", "概览"), "key": "overview" }, { "label": - "General", + get_text("General", "通用"), "type": "group", "children": [{ - "label": "Button", + "label": get_text("Button", "Button 按钮"), "key": "button" }, { - "label": "FloatButton", + "label": get_text("FloatButton", "FloatButton 悬浮按钮"), "key": "float_button" }, { - "label": "Icon", + "label": get_text("Icon", "图标"), "key": "icon" }, { - "label": "Typography", + "label": get_text("Typography", "Typography 排版"), "key": "typography" }] }, { - "label": "Layout", - "type": "group", + "label": + get_text("Layout", "布局"), + "type": + "group", "children": [{ - "label": "Divider", + "label": get_text("Divider", "Divider 分割线"), "key": "divider" }] }] @@ -132,7 +140,7 @@ def more_components(): with antd.Button(type="link", href="https://ant.design/components/overview/", href_target="_blank"): - ms.Text("More Components") + ms.Text(get_text("More Components", "更多组件")) with ms.Slot("icon"): antd.Icon("ExportOutlined") @@ -140,23 +148,23 @@ def more_components(): tabs = [ { - "label": "Base", + "label": get_text("Base Components", "基础组件"), "key": "base", "default_active_key": "overview", "menus": base_menu_items }, { - "label": "Antd", + "label": get_text("Antd Components", "Antd 组件"), "key": "antd", "default_active_key": "overview", "menus": antd_menu_items, "extra_menu_footer": more_components }, - # { - # "label": "Legacy", - # "key": "legacy", - # "content": legacy_demo - # }, + { + "label": get_text("Version 0.x", "0.x 版本"), + "key": "legacy", + "content": legacy_demo + }, ] site = Site( diff --git a/docs/components/base/application/README-zh_CN.md b/docs/components/base/application/README-zh_CN.md index 3582511e..d73dbb8c 100644 --- a/docs/components/base/application/README-zh_CN.md +++ b/docs/components/base/application/README-zh_CN.md @@ -9,7 +9,7 @@ 另外,该组件还提供了`custom`事件,您可以通过在任意 Javascript 函数中调用`window.ms_globals.dispatch`主动向 Python 端发送事件,在 Python 端可以通过`ms.Application.custom`事件接收。 -## Examples +## 示例 diff --git a/docs/components/base/application/demos/custom_event.py b/docs/components/base/application/demos/custom_event.py index 78945a61..3251dca2 100644 --- a/docs/components/base/application/demos/custom_event.py +++ b/docs/components/base/application/demos/custom_event.py @@ -5,7 +5,7 @@ def on_custom(e: gr.EventData): - print(e) + print(e._data) with gr.Blocks() as demo: diff --git a/docs/components/base/div/README-zh_CN.md b/docs/components/base/div/README-zh_CN.md new file mode 100644 index 00000000..34937273 --- /dev/null +++ b/docs/components/base/div/README-zh_CN.md @@ -0,0 +1,7 @@ +# Div + +同 HTML 中的`div`标签,用于辅助布局,可以绑定常用的 HTML 事件,具体事件请查看`EVENTS`属性。 + +## 示例 + + diff --git a/docs/components/base/div/README.md b/docs/components/base/div/README.md new file mode 100644 index 00000000..76615738 --- /dev/null +++ b/docs/components/base/div/README.md @@ -0,0 +1,7 @@ +# Div + +Same as the `div` tag in HTML, used for layout assistance, can bind common HTML events, please refer to the `EVENTS` property for specific events. + +## Examples + + diff --git a/docs/components/base/div/app.py b/docs/components/base/div/app.py new file mode 100644 index 00000000..0018b7c1 --- /dev/null +++ b/docs/components/base/div/app.py @@ -0,0 +1,6 @@ +from helper.Docs import Docs + +docs = Docs(__file__) + +if __name__ == "__main__": + docs.render().queue().launch() diff --git a/docs/components/base/div/demos/basic.py b/docs/components/base/div/demos/basic.py new file mode 100644 index 00000000..ca614f9b --- /dev/null +++ b/docs/components/base/div/demos/basic.py @@ -0,0 +1,12 @@ +import gradio as gr + +import modelscope_studio.components.antd as antd +import modelscope_studio.components.base as ms + +with gr.Blocks() as demo: + with ms.Application(): + with ms.Div(elem_style=dict(color="red", fontSize=22)): + ms.Text("Hello Div") + +if __name__ == "__main__": + demo.queue().launch() diff --git a/docs/components/base/each/README-zh_CN.md b/docs/components/base/each/README-zh_CN.md new file mode 100644 index 00000000..d2fb4257 --- /dev/null +++ b/docs/components/base/each/README-zh_CN.md @@ -0,0 +1,27 @@ +# Each + +辅助渲染组件,该组件支持传入列表作为参数,并会在前端遍历被包裹的组件,将列表的每一项注入当前遍历的上下文中,被包裹的组件属性会在前端被相应的上下文属性替换(只支持从`modelscope_studio`中导出的组件)。 + +## 何时使用 + +- 当被遍历的组件中全部都是`modelscope_studio`组件或非`modelscope_studio`的组件值不与被遍历的值绑定时; +- 当需要遍历展示的列表长度无法确定时; + +## 示例 + + + +`modelscope_studio`中的每个组件都有一个`as_item`参数(包括`Each`组件本身),指定该参数值后可以直接基于上下文的值做过滤,逻辑上类似`ctx_value = ctx_value["as_item"]`。该特性通常在需要遍历多个组件时使用,可以有效避免属性冲突。 + + + +如果您需要为所有的列表项的组件都添加某些统一的属性,您还可以传入`context_value`参数,该参数会与列表项的上下文深度合并,共同传递给前端组件。 + + + +### API + +| 属性 | 类型 | 默认值 | 描述 | +| ------------- | ---- | ------ | ---------------- | +| value | list | None | 组件的数据源 | +| context_value | dict | None | 统一的上下文参数 | diff --git a/docs/components/base/each/README.md b/docs/components/base/each/README.md new file mode 100644 index 00000000..2c22674d --- /dev/null +++ b/docs/components/base/each/README.md @@ -0,0 +1,27 @@ +# Each + +A helper rendering component that supports passing a list as a parameter and will traverse the wrapped components on the front end, injecting each item of the list into the current traversal context. The attributes of the wrapped components will be replaced by corresponding context properties on the front end (only supports components exported from `modelscope_studio`). + +## When to Use + +- When all components being traversed are `modelscope_studio` components or non-`modelscope_studio` components whose values do not bind to the traversed values. +- When the length of the list to be traversed is uncertain. + +## Examples + + + +Each component within `modelscope_studio` has an `as_item` parameter (including the `Each` component itself). Specifying this parameter value allows filtering based directly on the context value, similar logically to `ctx_value = ctx_value["as_item"]`. This feature is typically used when multiple components need to be iterated over, effectively avoiding property conflicts. + + + +If you need to add certain unified properties to all list item components, you can also pass in the `context_value` parameter. This parameter will be deeply merged with the list item's context and passed together to the front-end component. + + + +### API + +| Attribute | Type | Default Value | Description | +| ------------- | ---- | ------------- | ----------------------------- | +| value | list | None | Data source for the component | +| context_value | dict | None | Unified context parameters | diff --git a/docs/components/base/each/app.py b/docs/components/base/each/app.py new file mode 100644 index 00000000..0018b7c1 --- /dev/null +++ b/docs/components/base/each/app.py @@ -0,0 +1,6 @@ +from helper.Docs import Docs + +docs = Docs(__file__) + +if __name__ == "__main__": + docs.render().queue().launch() diff --git a/docs/components/base/each/demos/basic.py b/docs/components/base/each/demos/basic.py new file mode 100644 index 00000000..ca274360 --- /dev/null +++ b/docs/components/base/each/demos/basic.py @@ -0,0 +1,35 @@ +import gradio as gr + +import modelscope_studio.components.antd as antd +import modelscope_studio.components.base as ms + +data = [{ + "message": "Success Text", + "description": + "Success Description Success Description Success Description Success Description", + "type": "success" +}, { + "message": "Info Text", + "description": + "Info Description Info Description Info Description Info Description", + "type": "info" +}, { + "message": "Warning Text", + "description": + "Warning Description Warning Description Warning Description Warning Description", + "type": "warning" +}, { + "message": "Error Text", + "description": + "Error Description Error Description Error Description Error Description", + "type": "error" +}] + +with gr.Blocks() as demo: + with ms.Application(): + with antd.Space(direction="vertical"): + with ms.Each(value=data): + antd.Alert() + +if __name__ == "__main__": + demo.queue().launch() diff --git a/docs/components/base/each/demos/use_as_item.py b/docs/components/base/each/demos/use_as_item.py new file mode 100644 index 00000000..a2982911 --- /dev/null +++ b/docs/components/base/each/demos/use_as_item.py @@ -0,0 +1,69 @@ +import gradio as gr + +import modelscope_studio.components.antd as antd +import modelscope_studio.components.base as ms + +data = [{ + "card": { + "title": "Success Card Title", + }, + "each": { + "value": [{ + "value": "Card Content" + }, { + "value": "Card Content" + }, { + "value": "Card Content" + }] + } +}, { + "card": { + "title": "Info Card Title", + }, + "each": { + "value": [{ + "value": "Card Content" + }, { + "value": "Card Content" + }, { + "value": "Card Content" + }] + } +}, { + "card": { + "title": "Warning Card Title", + }, + "each": { + "value": [{ + "value": "Card Content" + }, { + "value": "Card Content" + }, { + "value": "Card Content" + }] + } +}, { + "card": { + "title": "Error Card Title", + }, + "each": { + "value": [{ + "value": "Card Content" + }, { + "value": "Card Content" + }, { + "value": "Card Content" + }] + } +}] + +with gr.Blocks() as demo: + with ms.Application(): + with ms.Each(value=data): + with antd.Card(as_item="card"): + # Inner loop + with ms.Each(as_item="each"): + antd.Typography.Paragraph() + +if __name__ == "__main__": + demo.queue().launch() diff --git a/docs/components/base/each/demos/use_context_value.py b/docs/components/base/each/demos/use_context_value.py new file mode 100644 index 00000000..2e6e0f19 --- /dev/null +++ b/docs/components/base/each/demos/use_context_value.py @@ -0,0 +1,69 @@ +import gradio as gr + +import modelscope_studio.components.antd as antd +import modelscope_studio.components.base as ms + +data = [{ + "card": { + "title": "Success Card Title", + }, + "each": { + "value": [{ + "value": "Card Content" + }, { + "value": "Card Content" + }, { + "value": "Card Content" + }] + } +}, { + "card": { + "title": "Info Card Title", + }, + "each": { + "value": [{ + "value": "Card Content" + }, { + "value": "Card Content" + }, { + "value": "Card Content" + }] + } +}, { + "card": { + "title": "Warning Card Title", + }, + "each": { + "value": [{ + "value": "Card Content" + }, { + "value": "Card Content" + }, { + "value": "Card Content" + }] + } +}, { + "card": { + "title": "Error Card Title", + }, + "each": { + "value": [{ + "value": "Card Content" + }, { + "value": "Card Content" + }, { + "value": "Card Content" + }] + } +}] + +with gr.Blocks() as demo: + with ms.Application(): + with ms.Each(value=data, context_value={"card": {"hoverable": True}}): + with antd.Card(as_item="card"): + # Inner loop + with ms.Each(as_item="each"): + antd.Typography.Paragraph() + +if __name__ == "__main__": + demo.queue().launch() diff --git a/docs/components/base/filter/README-zh_CN.md b/docs/components/base/filter/README-zh_CN.md new file mode 100644 index 00000000..488c422f --- /dev/null +++ b/docs/components/base/filter/README-zh_CN.md @@ -0,0 +1,21 @@ +# Filter + +辅助渲染组件,该组件需要与`Each`组件配合使用,用于过滤`Each`组件中的上下文信息。 + +该组件的`as_item`参数有所不同,它会将过滤后的上下文信息作为基础继续往下传递,适合在多个模块组件的`Each`组件遍历中使用。 + +同时,您也可以传入`params_mapping`参数,该参数允许用户通过 Javascript 函数的形式自定义过滤上下文信息。 + +而如果不传入任何参数,该组件会阻断`Each`组件的上下文传递,让属性的覆盖失效。 + +## 示例 + + + + + + + +### API + +| Property | Type | Default Value | Description | +| -------------- | ---- | ------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | +| params_mapping | str | None | This value is a string of a Javascript function, allowing users to customize the filtering of context information via a JavaScript function. | diff --git a/docs/components/base/filter/app.py b/docs/components/base/filter/app.py new file mode 100644 index 00000000..0018b7c1 --- /dev/null +++ b/docs/components/base/filter/app.py @@ -0,0 +1,6 @@ +from helper.Docs import Docs + +docs = Docs(__file__) + +if __name__ == "__main__": + docs.render().queue().launch() diff --git a/docs/components/base/filter/demos/basic.py b/docs/components/base/filter/demos/basic.py new file mode 100644 index 00000000..54f66581 --- /dev/null +++ b/docs/components/base/filter/demos/basic.py @@ -0,0 +1,20 @@ +import gradio as gr + +import modelscope_studio.components.antd as antd +import modelscope_studio.components.base as ms + +data = [{"value": "Hello"}, {"value": "World"}] + +with gr.Blocks() as demo: + with ms.Application(): + with antd.Space(direction="vertical"): + antd.Divider("Without Filter") + with ms.Each(value=data): + antd.Button() + antd.Divider("With Filter") + with ms.Each(value=data): + with ms.Filter(): + antd.Button("Run") + +if __name__ == "__main__": + demo.queue().launch() diff --git a/docs/components/base/filter/demos/use_as_item.py b/docs/components/base/filter/demos/use_as_item.py new file mode 100644 index 00000000..a6fc55c0 --- /dev/null +++ b/docs/components/base/filter/demos/use_as_item.py @@ -0,0 +1,27 @@ +import gradio as gr + +import modelscope_studio.components.antd as antd +import modelscope_studio.components.base as ms + +data = [{ + "title": "Card Title", + "btn": { + "value": "Hello" + } +}, { + "title": "Card Title", + "btn": { + "value": "World" + } +}] + +with gr.Blocks() as demo: + with ms.Application(): + with antd.Space(direction="vertical"): + with ms.Each(value=data): + with antd.Card(): + with ms.Filter(as_item="btn"): + antd.Button() + +if __name__ == "__main__": + demo.queue().launch() diff --git a/docs/components/base/filter/demos/use_params_mapping.py b/docs/components/base/filter/demos/use_params_mapping.py new file mode 100644 index 00000000..e048ca7d --- /dev/null +++ b/docs/components/base/filter/demos/use_params_mapping.py @@ -0,0 +1,26 @@ +import gradio as gr + +import modelscope_studio.components.antd as antd +import modelscope_studio.components.base as ms + +data = [{ + "title": "Card Title", + "desc": "Hello" +}, { + "title": "Card Title", + "desc": "World" +}] + +with gr.Blocks() as demo: + with ms.Application(): + with antd.Space(direction="vertical"): + with ms.Each(value=data): + with antd.Card(): + with ms.Filter( + params_mapping= + """(props) => ({ value: props.desc, type: props.desc === 'World' ? 'primary' : 'default' })""" + ): + antd.Button() + +if __name__ == "__main__": + demo.queue().launch() diff --git a/docs/components/base/fragment/README-zh_CN.md b/docs/components/base/fragment/README-zh_CN.md new file mode 100644 index 00000000..c6018905 --- /dev/null +++ b/docs/components/base/fragment/README-zh_CN.md @@ -0,0 +1,9 @@ +# Fragment + +分段组件,该组件本身不会参与页面布局,它的主要作用是组合多个子组件,并将它们共同包装为`modelscope_studio`组件。 + +> 部分组件的插槽仅支持从`modelscope_studio`中导出的组件,如果您需要插入其他组件,就需要使用`Fragment`组件进行包裹。 + +## 示例 + + diff --git a/docs/components/base/fragment/README.md b/docs/components/base/fragment/README.md new file mode 100644 index 00000000..02bc4b45 --- /dev/null +++ b/docs/components/base/fragment/README.md @@ -0,0 +1,9 @@ +# Fragment + +A fragment component that does not participate in page layout itself. Its main purpose is to combine multiple child components and wrap them together as a `modelscope_studio` component. + +> Some component slots only support components exported from `modelscope_studio`. If you need to insert other components, you'll need to wrap them with the `Fragment` component. + +## Examples + + diff --git a/docs/components/base/fragment/app.py b/docs/components/base/fragment/app.py new file mode 100644 index 00000000..0018b7c1 --- /dev/null +++ b/docs/components/base/fragment/app.py @@ -0,0 +1,6 @@ +from helper.Docs import Docs + +docs = Docs(__file__) + +if __name__ == "__main__": + docs.render().queue().launch() diff --git a/docs/components/base/fragment/demos/basic.py b/docs/components/base/fragment/demos/basic.py new file mode 100644 index 00000000..4f82b3ea --- /dev/null +++ b/docs/components/base/fragment/demos/basic.py @@ -0,0 +1,22 @@ +import gradio as gr + +import modelscope_studio.components.antd as antd +import modelscope_studio.components.base as ms + +with gr.Blocks() as demo: + with ms.Application(): + with antd.ConfigProvider(): + antd.Divider("Without Fragment") + with antd.Space(): + antd.Button("Antd Button") + antd.Button("Antd Button") + gr.Button("Gradio Button") + antd.Divider("With Fragment") + with antd.Space(): + antd.Button("Antd Button") + antd.Button("Antd Button") + with ms.Fragment(): + gr.Button("Gradio Button") + +if __name__ == "__main__": + demo.queue().launch() diff --git a/docs/components/base/slot/README-zh_CN.md b/docs/components/base/slot/README-zh_CN.md index 1a08a5ec..376a2617 100644 --- a/docs/components/base/slot/README-zh_CN.md +++ b/docs/components/base/slot/README-zh_CN.md @@ -1,16 +1,16 @@ -# Application +# Slot -The root component of the application, this component contains all the component dependencies of `modelscope_studio`. It is necessary to ensure that all components exported from `modelscope_studio` are wrapped by it, otherwise the page will not be successfully previewed. +插槽组件,需要与`modelscope_studio`中的其他组件一起使用,可以传入指定插槽名称,从而将该组件插入到目标组件的指定位置。 -In addition, this component can also listen to the lifecycle of the user's page and obtain the current user's environment information. +`modelscope_studio`中组件的插槽可以通过获取`SLOTS`属性查看。 -- Obtain the current user's language, page theme, user agent, and screen status. -- Listen to page behaviors and trigger corresponding events (page loading, size changes, page closing, etc.). - -## Examples +## 示例 - +### API - +| 属性 | 类型 | 默认值 | 描述 | +| -------------- | ---- | ------ | -------------------------------------------------------------------------------------------------------------------------- | +| value | str | None | 插槽名称 | +| params_mapping | str | None | 该值为一个 Javascript 的函数字符串,当对应插槽可以接受参数时,通过此参数可以将参数映射为插槽的上下文,具体请参考`Each`组件 | diff --git a/docs/components/base/slot/README.md b/docs/components/base/slot/README.md index 7641dd6e..a8c4fc4b 100644 --- a/docs/components/base/slot/README.md +++ b/docs/components/base/slot/README.md @@ -1,16 +1,16 @@ -# Application +# Slot -应用的根组件,该组件包含了所有`modelscope_studio`的组件依赖,需要确保所有从`modelscope_studio`导出的组件都被其包裹,否则页面将会无法成功预览。 +A slot component that needs to be used with other components in `modelscope_studio`. You can pass in a specified slot name to insert this component into the specified position of the target component. -除此之外,该组件还可以监听用户页面的生命周期,并获取当前用户的环境信息。 - -- 获取当前用户的语言、页面主题、user agent 和屏幕状态。 -- 监听页面行为并触发相应事件(页面加载、尺寸变化、页面关闭等)。 +The slots of components in `modelscope_studio` can be viewed by getting the `SLOTS` property. ## Examples - +### API - +| Attribute | Type | Default Value | Description | +| -------------- | ---- | ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| value | str | None | Slot name | +| params_mapping | str | None | This value is a string of a Javascript function. When the corresponding slot can accept parameters, the parameters can be mapped to the slot context through this parameter, please refer to the `Each` component for details. | diff --git a/docs/components/base/slot/demos/basic.py b/docs/components/base/slot/demos/basic.py index 14d84d05..7123e0a3 100644 --- a/docs/components/base/slot/demos/basic.py +++ b/docs/components/base/slot/demos/basic.py @@ -6,9 +6,18 @@ with gr.Blocks() as demo: with ms.Application(): with antd.ConfigProvider(): - antd.Button("Primary Button", type="primary") - antd.Divider() - antd.Input() + with antd.Card(): + ms.Div("Card Content") + ms.Div("Card Content") + ms.Div("Card Content") + # slots + with ms.Slot("title"): + ms.Text("Card Title") + with ms.Slot("extra"): + with antd.Button(): + ms.Text("GitHub") + with ms.Slot("icon"): + antd.Icon("GithubOutlined") if __name__ == "__main__": demo.queue().launch() diff --git a/docs/components/base/slot/demos/language_adaptation.py b/docs/components/base/slot/demos/language_adaptation.py deleted file mode 100644 index b1ae2170..00000000 --- a/docs/components/base/slot/demos/language_adaptation.py +++ /dev/null @@ -1,39 +0,0 @@ -import time - -import gradio as gr - -import modelscope_studio.components.base as ms - -messages = { - 'en': { - "hello": "Hello" - }, - 'en-US': { - "hello": "Hello" - }, - 'zh-CN': { - "hello": "你好" - } -} - -default_lang = "en" - - -def mount(e: gr.EventData, _state): - lang = e._data["language"] - if (lang in messages): - _state["current_lang"] = lang - yield 'Switch Language...', _state - time.sleep(2) - yield messages[lang]["hello"], _state - - -with gr.Blocks() as demo: - with ms.Application() as app: - state = gr.State({"current_lang": default_lang}) - markdown = gr.Markdown(value=messages[default_lang]["hello"]) - - app.mount(fn=mount, inputs=[state], outputs=[markdown, state]) - -if __name__ == "__main__": - demo.queue().launch() diff --git a/docs/components/base/slot/demos/theme_adaptation.py b/docs/components/base/slot/demos/theme_adaptation.py deleted file mode 100644 index 58cddd35..00000000 --- a/docs/components/base/slot/demos/theme_adaptation.py +++ /dev/null @@ -1,33 +0,0 @@ -import gradio as gr - -import modelscope_studio.components.antd as antd -import modelscope_studio.components.base as ms - - -def mount(e: gr.EventData, _state): - _state["theme"] = e._data["theme"] - yield _state - - -def fn(_state): - theme = _state["theme"] - color = '000/fff' if theme == 'dark' else 'fff/000' - yield gr.update( - value=f"https://dummyimage.com/200x100/{color}.png&text={theme}") - - -with gr.Blocks() as demo: - with ms.Application() as app: - state = gr.State({"theme": "light"}) - btn = antd.Button( - "Run", - type="primary", - block=True, - ) - image = antd.Image() - - app.mount(fn=mount, inputs=[state], outputs=[state]) - btn.click(fn=fn, inputs=[state], outputs=[image]) - -if __name__ == "__main__": - demo.queue().launch() diff --git a/docs/components/base/span/README-zh_CN.md b/docs/components/base/span/README-zh_CN.md new file mode 100644 index 00000000..22ed1ed9 --- /dev/null +++ b/docs/components/base/span/README-zh_CN.md @@ -0,0 +1,7 @@ +# Span + +同 HTML 中的`span`标签,用于辅助布局,可以绑定常用的 HTML 事件,具体事件请查看`EVENTS`属性。 + +## 示例 + + diff --git a/docs/components/base/span/README.md b/docs/components/base/span/README.md new file mode 100644 index 00000000..df2c4b44 --- /dev/null +++ b/docs/components/base/span/README.md @@ -0,0 +1,7 @@ +# Span + +Same as the `span` tag in HTML, used for layout assistance, can bind common HTML events, please refer to the `EVENTS` property for specific events. + +## Examples + + diff --git a/docs/components/base/span/app.py b/docs/components/base/span/app.py new file mode 100644 index 00000000..0018b7c1 --- /dev/null +++ b/docs/components/base/span/app.py @@ -0,0 +1,6 @@ +from helper.Docs import Docs + +docs = Docs(__file__) + +if __name__ == "__main__": + docs.render().queue().launch() diff --git a/docs/components/base/span/demos/basic.py b/docs/components/base/span/demos/basic.py new file mode 100644 index 00000000..ed722ca8 --- /dev/null +++ b/docs/components/base/span/demos/basic.py @@ -0,0 +1,12 @@ +import gradio as gr + +import modelscope_studio.components.antd as antd +import modelscope_studio.components.base as ms + +with gr.Blocks() as demo: + with ms.Application(): + with ms.Span(elem_style=dict(color="red", fontSize=22)): + ms.Text("Hello Span") + +if __name__ == "__main__": + demo.queue().launch() diff --git a/docs/components/base/text/README-zh_CN.md b/docs/components/base/text/README-zh_CN.md new file mode 100644 index 00000000..d932c34b --- /dev/null +++ b/docs/components/base/text/README-zh_CN.md @@ -0,0 +1,7 @@ +# Text + +纯文本字符串,类似 HTML 中的`textNode`,用于辅助布局。 + +## 示例 + + diff --git a/docs/components/base/text/README.md b/docs/components/base/text/README.md new file mode 100644 index 00000000..902e8054 --- /dev/null +++ b/docs/components/base/text/README.md @@ -0,0 +1,7 @@ +# Text + +Plain text string, similar to `textNode` in HTML, used for layout assistance. + +## Examples + + diff --git a/docs/components/base/text/app.py b/docs/components/base/text/app.py new file mode 100644 index 00000000..0018b7c1 --- /dev/null +++ b/docs/components/base/text/app.py @@ -0,0 +1,6 @@ +from helper.Docs import Docs + +docs = Docs(__file__) + +if __name__ == "__main__": + docs.render().queue().launch() diff --git a/docs/components/base/text/demos/basic.py b/docs/components/base/text/demos/basic.py new file mode 100644 index 00000000..e6ec5d4e --- /dev/null +++ b/docs/components/base/text/demos/basic.py @@ -0,0 +1,11 @@ +import gradio as gr + +import modelscope_studio.components.antd as antd +import modelscope_studio.components.base as ms + +with gr.Blocks() as demo: + with ms.Application(): + ms.Text("Hello Text") + +if __name__ == "__main__": + demo.queue().launch() diff --git a/docs/components/legacy/Docs.py b/docs/components/legacy/Docs.py index 55b1c358..ca095155 100644 --- a/docs/components/legacy/Docs.py +++ b/docs/components/legacy/Docs.py @@ -3,6 +3,7 @@ from typing import Callable import gradio as gr +from helper.env import is_modelscope_studio import modelscope_studio as mgr @@ -62,9 +63,6 @@ def get_demo_modules(file_path: str): return demo_modules -is_modelscope_studio = os.getenv('MODELSCOPE_ENVIRONMENT') == 'studio' - - class Docs: def __init__(self, file_path: str, markdown_files: list = None): diff --git a/docs/helper/Docs.py b/docs/helper/Docs.py index dc0bdbc8..c072332e 100644 --- a/docs/helper/Docs.py +++ b/docs/helper/Docs.py @@ -7,10 +7,9 @@ import modelscope_studio.components.base as ms import modelscope_studio.components.legacy as mgr +from .env import is_modelscope_studio from .parse_markdown import parse_markdown -is_modelscope_studio = os.getenv('MODELSCOPE_ENVIRONMENT') == 'studio' - class Docs: diff --git a/docs/helper/Site.py b/docs/helper/Site.py index 74381f3a..0dceed7b 100644 --- a/docs/helper/Site.py +++ b/docs/helper/Site.py @@ -137,7 +137,8 @@ def on_tab_menu_select(e: gr.EventData): tab["extra_menu_footer"].render( ) - with antd.Layout(): + with antd.Layout(elem_style=dict( + width=0)): with antd.Layout.Content( elem_style=dict( padding='12px 28px', diff --git a/docs/helper/env.py b/docs/helper/env.py new file mode 100644 index 00000000..8e342808 --- /dev/null +++ b/docs/helper/env.py @@ -0,0 +1,3 @@ +import os + +is_modelscope_studio = not os.getenv('MODELSCOPE_ENVIRONMENT') == 'studio' diff --git a/frontend/base/each/Each.svelte b/frontend/base/each/Each.svelte index b803cd1d..7dc7783b 100644 --- a/frontend/base/each/Each.svelte +++ b/frontend/base/each/Each.svelte @@ -2,6 +2,7 @@ diff --git a/frontend/svelte-preprocess-react/slot.ts b/frontend/svelte-preprocess-react/slot.ts index faa03051..91f1f911 100644 --- a/frontend/svelte-preprocess-react/slot.ts +++ b/frontend/svelte-preprocess-react/slot.ts @@ -1,3 +1,4 @@ +import { isUndefined } from 'lodash-es'; import { getContext, setContext } from 'svelte'; import { get, type Writable, writable } from 'svelte/store'; @@ -71,6 +72,16 @@ export function getSetSlotContextFn() { }; } +function ensureObjectCtxValue(ctxValue: any) { + if (isUndefined(ctxValue)) { + return {}; + } + + return typeof ctxValue === 'object' && !Array.isArray(ctxValue) + ? ctxValue + : { value: ctxValue }; +} + /** * * will run `resetSlotKey` inside @@ -116,11 +127,14 @@ export function getSlotContext< } const ctx = getContext(slotContextKey) as Writable; const as_item = get(ctx)?.as_item || props.as_item; - const initialCtxValue: Record = ctx - ? as_item - ? (get(ctx)?.[as_item as keyof T] as Record) || {} - : get(ctx) || {} - : {}; + const initialCtxValue: Record = ensureObjectCtxValue( + ctx + ? as_item + ? (get(ctx)?.[as_item as keyof T] as Record) || {} + : get(ctx) || {} + : {} + ); + const mergeRestProps = ( restProps?: Record, ctxValue?: Record @@ -158,6 +172,7 @@ export function getSlotContext< if (merged_as_item) { ctxValue = (ctxValue as Record)?.[merged_as_item]; } + ctxValue = ensureObjectCtxValue(ctxValue); mergedProps.update((prev) => ({ ...prev, ...(ctxValue || {}), @@ -168,9 +183,11 @@ export function getSlotContext< return [ mergedProps, (v) => { - const ctxValue: Record = v.as_item - ? (get(ctx)?.[v.as_item as keyof T] as Record) || {} - : get(ctx) || {}; + const ctxValue: Record = ensureObjectCtxValue( + v.as_item + ? (get(ctx)?.[v.as_item as keyof T] as Record) || {} + : get(ctx) || {} + ); return mergedProps.set({ ...v, ...ctxValue, From 3b852642b873c07087e44ad45c8c32650d1ce6fd Mon Sep 17 00:00:00 2001 From: Col0ring <1561999073@qq.com> Date: Fri, 8 Nov 2024 18:14:06 +0800 Subject: [PATCH 44/51] docs: update readme --- README-zh_CN.md | 82 +++++++++------------------------------ README.md | 100 +++++++++++++++++------------------------------- 2 files changed, 53 insertions(+), 129 deletions(-) diff --git a/README-zh_CN.md b/README-zh_CN.md index 50f7847c..83e307c8 100644 --- a/README-zh_CN.md +++ b/README-zh_CN.md @@ -1,4 +1,4 @@ -

ModelScope Studio

+# ModelScope Studio

@@ -14,86 +14,40 @@ 中文  |  English  |  日本語

-`modelscope_studio` 是一套基于 gradio 4.x 的扩展组件库,致力于服务于 ModelScope 创空间中对于 gradio 应用的各类扩展需求,目前主要聚集在对话场景增强、多模态场景以及一些其他垂直场景支持。 - ## 安装 ```sh -pip install modelscope_studio +pip install modelscope_studio~=1.0.0b ``` -## 快速开始 +## 示例 ```python -import time import gradio as gr -import modelscope_studio as mgr -def submit(_input, _chatbot): - print('text:', _input.text) - print('files: ', _input.files) - _chatbot.append([_input, None]) - yield _chatbot - time.sleep(1) - _chatbot[-1][1] = [{ - "flushing": False, - "text": 'bot1: ' + _input.text + '!' - }, { - "text": 'bot2: ' + _input.text + '!' - }] - yield { - chatbot: _chatbot, - } +import modelscope_studio.components.antd as antd +import modelscope_studio.components.base as ms with gr.Blocks() as demo: - chatbot = mgr.Chatbot(height=400) - - input = mgr.MultimodalInput() - input.submit(fn=submit, inputs=[input, chatbot], outputs=[chatbot]) + with ms.Application(): + with antd.ConfigProvider(): + antd.DatePicker() demo.queue().launch() ``` -![quickstart](./resources/quickstart.png) - -## 组件文档 - -目前已支持的组件包括: - -- Chatbot: gradio Chatbot 扩展组件,支持输出多模态内容、支持多 bot 场景、支持对话内容内的自定义渲染组件及事件交互。 -- MultimodalInput: 多模态输入框,支持上传文件、录音、照相等功能。 -- Markdown: gradio Markdown 扩展组件,支持输出多模态内容(音频、视频、语音、文件、文本)。 -- Lifecycle: 生命周期组件,用于获取当前用户的环境信息。 -- WaterfallGallery: gradio Gallery 扩展组件,支持瀑布流的图像展示。 -- Flow: 基于 [reactflow](https://reactflow.dev/) 的 Flow 组件,支持通过 schema 定制节点渲染。 -- 更多组件... - -详细使用参见 [文档与示例](https://modelscope.cn/studios/modelscope/modelscope-studio/summary) - -## 开发 - -将仓库克隆到本地: - -```sh -git clone git@github.com:modelscope/modelscope-studio.git -cd modelscope-studio -# for backend -pip install -e '.' -# for frontend -npm install pnpm -g - -pnpm install -pnpm build -``` +## 迁移到 1.0 -运行 Demo! +如果您在之前使用了`modelscope_studio`的组件,并且想要在新版本中继续使用。不需要对原有组件做任何修改,只需要在外层引入`ms.Application`即可。 -```sh -gradio docs/app.py -``` +```python +import gradio as gr +import modelscope_studio.components.base as ms +import modelscope_studio.components.legacy as mgr -或者像下面这样运行单个 Demo: +with gr.Blocks() as demo: + with ms.Application(): + mgr.Chatbot() -```sh -gradio docs/components/Chatbot/demos/basic.py +demo.launch() ``` diff --git a/README.md b/README.md index 737cd15c..e9e1ce8d 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -

ModelScope Studio

+# ModelScope Studio

@@ -11,89 +11,59 @@

GitHub | 🤖 ModelScope Studio | 🤗 Hugging Face Space
- 中文  |  English  |  日本語 + 中文  |  English  |  日本語

-`modelscope_studio` is a set of extension component libraries based on gradio 4.x, dedicated to serving the various extension needs of gradio applications within the ModelScope Studio. It mainly focuses on enhancing conversational scenarios, supporting multimodal contexts, and providing assistance for various other specialized scenarios. +`modelscope_studio` is a third-party component library based on Gradio, extending more components and usage forms on top of the original Gradio components. -## Install +Currently supported UI libraries: -```sh -pip install modelscope_studio -``` +- [Ant Design](https://ant.design/) -## Quickstart +## When to Use -```python -import time -import gradio as gr -import modelscope_studio as mgr - -def submit(_input, _chatbot): - print('text:', _input.text) - print('files: ', _input.files) - _chatbot.append([_input, None]) - yield _chatbot - time.sleep(1) - _chatbot[-1][1] = [{ - "flushing": False, - "text": 'bot1: ' + _input.text + '!' - }, { - "text": 'bot2: ' + _input.text + '!' - }] - yield { - chatbot: _chatbot, - } +Compared to Gradio's own components, `modelscope_studio` focuses more on page layout and component flexibility. If you want to build a more beautiful user interface, we highly recommend using `modelscope_studio`. However, when your application needs Gradio to handle more built-in data on the Python side, `modelscope_studio` may not be the best choice, but you can still use `modelscope_studio`'s layout and display components to help you build pages. -with gr.Blocks() as demo: - chatbot = mgr.Chatbot(height=400) +## Dependencies - input = mgr.MultimodalInput() - input.submit(fn=submit, inputs=[input, chatbot], outputs=[chatbot]) +- Gradio >= 4.0 -demo.queue().launch() -``` - -![quickstart](./resources/quickstart.png) +## Installation -## Component Docs +> Currently, `modelscope_studio` version 1.0 is still under development. You can use the `beta` version in advance. -The currently supported components include: +```sh +pip install modelscope_studio~=1.0.0b +``` -- Chatbot: Gradio Chatbot extension component, supports multi-modal content output, multi-bot scenarios, and custom rendering components and event interactions within the conversation content. -- MultimodalInput: A multi-modal input box, supporting functions such as file upload, recording, and photography. -- Markdown: Gradio Markdown extension component, supports the output of multi-modal content (audio, video, voice, files, text). -- Lifecycle: A Lifecycle component for getting the current user's environment information. -- WaterfallGallery: Gradio Gallery extension component, supports waterfall-style image display. -- Flow: A Flow component implemented based on [reactflow](https://reactflow.dev/), supports customization of node rendering through a schema. -- More components... +## Example -For detailed usage, see [Documentation and Examples](https://modelscope.cn/studios/modelscope/modelscope-studio/summary) +```python +import gradio as gr -## Development +import modelscope_studio.components.antd as antd +import modelscope_studio.components.base as ms -Clone this repo locally: +with gr.Blocks() as demo: + with ms.Application(): + with antd.ConfigProvider(): + antd.DatePicker() -```sh -git clone git@github.com:modelscope/modelscope-studio.git -cd modelscope-studio -# for backend -pip install -e '.' -# for frontend -npm install pnpm -g - -pnpm install -pnpm build +demo.queue().launch() ``` -Run demo! +## Migration to 1.0 -```sh -gradio docs/app.py -``` +If you have previously used `modelscope_studio` components and want to continue using them in the new version, no modifications to the original components are needed. You just need to introduce `ms.Application` in the outer layer. -or run a single demo like this: +```python +import gradio as gr +import modelscope_studio.components.base as ms +import modelscope_studio.components.legacy as mgr -```sh -gradio docs/components/Chatbot/demos/basic.py +with gr.Blocks() as demo: + with ms.Application(): + mgr.Chatbot() + +demo.launch() ``` From 96a0557e1dc1e11dcab45f0be6e8a1db9a9901a4 Mon Sep 17 00:00:00 2001 From: Col0ring <1561999073@qq.com> Date: Fri, 8 Nov 2024 18:20:24 +0800 Subject: [PATCH 45/51] docs: update readme --- README-zh_CN.md | 7 ++++++- README.md | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/README-zh_CN.md b/README-zh_CN.md index 83e307c8..5c821168 100644 --- a/README-zh_CN.md +++ b/README-zh_CN.md @@ -20,7 +20,7 @@ pip install modelscope_studio~=1.0.0b ``` -## 示例 +## 快速开始 ```python import gradio as gr @@ -36,6 +36,11 @@ with gr.Blocks() as demo: demo.queue().launch() ``` +## 文档与示例 + +- [ModelScope](https://modelscope.cn/studios/modelscope/modelscope-studio) +- [Hugging Face](https://huggingface.co/spaces/modelscope/modelscope-studio) + ## 迁移到 1.0 如果您在之前使用了`modelscope_studio`的组件,并且想要在新版本中继续使用。不需要对原有组件做任何修改,只需要在外层引入`ms.Application`即可。 diff --git a/README.md b/README.md index e9e1ce8d..414098d4 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,7 @@ Compared to Gradio's own components, `modelscope_studio` focuses more on page la pip install modelscope_studio~=1.0.0b ``` -## Example +## Quick Start ```python import gradio as gr @@ -52,6 +52,11 @@ with gr.Blocks() as demo: demo.queue().launch() ``` +## Documentation and Examples + +- [ModelScope](https://modelscope.cn/studios/modelscope/modelscope-studio) +- [Hugging Face](https://huggingface.co/spaces/modelscope/modelscope-studio) + ## Migration to 1.0 If you have previously used `modelscope_studio` components and want to continue using them in the new version, no modifications to the original components are needed. You just need to introduce `ms.Application` in the outer layer. From 9f3c59c9c5a0bf8af3980588cb07a467323b1d17 Mon Sep 17 00:00:00 2001 From: Col0ring <1561999073@qq.com> Date: Fri, 8 Nov 2024 18:22:41 +0800 Subject: [PATCH 46/51] feat: add new features --- .changeset/fuzzy-goats-retire.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 .changeset/fuzzy-goats-retire.md diff --git a/.changeset/fuzzy-goats-retire.md b/.changeset/fuzzy-goats-retire.md new file mode 100644 index 00000000..db0d20b5 --- /dev/null +++ b/.changeset/fuzzy-goats-retire.md @@ -0,0 +1,17 @@ +--- +'@modelscope-studio/legacy-waterfall-gallery': patch +'@modelscope-studio/legacy-multimodal-input': patch +'@modelscope-studio/legacy-lifecycle': patch +'@modelscope-studio/legacy-markdown': patch +'@modelscope-studio/legacy-compiled': patch +'@modelscope-studio/legacy-chatbot': patch +'@modelscope-studio/legacy-flow': patch +'@modelscope-studio/lint-config': patch +'@modelscope-studio/changelog': patch +'@modelscope-studio/antd': patch +'@modelscope-studio/base': patch +'@modelscope-studio/frontend': patch +'modelscope_studio': patch +--- + +feat: add new features From c20ef7f66fa412edd184f18a3fc7de4058ca5297 Mon Sep 17 00:00:00 2001 From: Col0ring <1561999073@qq.com> Date: Fri, 8 Nov 2024 18:25:09 +0800 Subject: [PATCH 47/51] chore: update versions --- .changeset/pre.json | 7 ++++++- CHANGELOG.md | 6 ++++++ backend/modelscope_studio/version.py | 2 +- config/changelog/CHANGELOG.md | 6 ++++++ config/changelog/package.json | 2 +- config/lint-config/CHANGELOG.md | 6 ++++++ config/lint-config/package.json | 2 +- frontend/CHANGELOG.md | 6 ++++++ frontend/antd/CHANGELOG.md | 6 ++++++ frontend/antd/package.json | 2 +- frontend/base/CHANGELOG.md | 6 ++++++ frontend/base/package.json | 2 +- frontend/legacy/Chatbot/CHANGELOG.md | 6 ++++++ frontend/legacy/Chatbot/package.json | 2 +- frontend/legacy/Flow/CHANGELOG.md | 6 ++++++ frontend/legacy/Flow/package.json | 2 +- frontend/legacy/Lifecycle/CHANGELOG.md | 6 ++++++ frontend/legacy/Lifecycle/package.json | 2 +- frontend/legacy/Markdown/CHANGELOG.md | 6 ++++++ frontend/legacy/Markdown/package.json | 2 +- frontend/legacy/MultimodalInput/CHANGELOG.md | 6 ++++++ frontend/legacy/MultimodalInput/package.json | 2 +- frontend/legacy/WaterfallGallery/CHANGELOG.md | 6 ++++++ frontend/legacy/WaterfallGallery/package.json | 2 +- frontend/legacy/compiled/CHANGELOG.md | 6 ++++++ frontend/legacy/compiled/package.json | 2 +- frontend/package.json | 2 +- package.json | 2 +- pyproject.toml | 2 +- 29 files changed, 99 insertions(+), 16 deletions(-) diff --git a/.changeset/pre.json b/.changeset/pre.json index bb3c1741..7e81b4cd 100644 --- a/.changeset/pre.json +++ b/.changeset/pre.json @@ -16,5 +16,10 @@ "@modelscope-studio/legacy-waterfall-gallery": "0.4.2", "@modelscope-studio/legacy-compiled": "0.4.2" }, - "changesets": ["five-actors-compete", "lemon-laws-cross", "tough-walls-grab"] + "changesets": [ + "five-actors-compete", + "fuzzy-goats-retire", + "lemon-laws-cross", + "tough-walls-grab" + ] } diff --git a/CHANGELOG.md b/CHANGELOG.md index 30987114..c892fd7d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # modelscope_studio +## 1.0.0-beta.3 + +### Features + +- [`9f3c59c`](https://github.com/modelscope/modelscope-studio/commit/9f3c59c9c5a0bf8af3980588cb07a467323b1d17) - add new features. Thanks [@Col0ring](https://github.com/Col0ring)! + ## 1.0.0-beta.2 ### Features diff --git a/backend/modelscope_studio/version.py b/backend/modelscope_studio/version.py index 80256cd3..81a2814f 100644 --- a/backend/modelscope_studio/version.py +++ b/backend/modelscope_studio/version.py @@ -1 +1 @@ -__version__ = "1.0.0-beta.2" +__version__ = "1.0.0-beta.3" diff --git a/config/changelog/CHANGELOG.md b/config/changelog/CHANGELOG.md index 016e312d..3f7c9db5 100644 --- a/config/changelog/CHANGELOG.md +++ b/config/changelog/CHANGELOG.md @@ -1,5 +1,11 @@ # @modelscope-studio/changelog +## 1.0.0-beta.3 + +### Features + +- [`9f3c59c`](https://github.com/modelscope/modelscope-studio/commit/9f3c59c9c5a0bf8af3980588cb07a467323b1d17) - add new features. Thanks [@Col0ring](https://github.com/Col0ring)! + ## 1.0.0-beta.2 ### Features diff --git a/config/changelog/package.json b/config/changelog/package.json index 08828747..2a08709e 100644 --- a/config/changelog/package.json +++ b/config/changelog/package.json @@ -1,6 +1,6 @@ { "name": "@modelscope-studio/changelog", - "version": "1.0.0-beta.2", + "version": "1.0.0-beta.3", "private": false, "description": "ModelScope Studio Changelog", "repository": "git@github.com:modelscope/modelscope-studio.git", diff --git a/config/lint-config/CHANGELOG.md b/config/lint-config/CHANGELOG.md index 0bd95fd4..db8acc17 100644 --- a/config/lint-config/CHANGELOG.md +++ b/config/lint-config/CHANGELOG.md @@ -1,5 +1,11 @@ # @modelscope-studio/lint-config +## 1.0.0-beta.3 + +### Features + +- [`9f3c59c`](https://github.com/modelscope/modelscope-studio/commit/9f3c59c9c5a0bf8af3980588cb07a467323b1d17) - add new features. Thanks [@Col0ring](https://github.com/Col0ring)! + ## 1.0.0-beta.2 ### Features diff --git a/config/lint-config/package.json b/config/lint-config/package.json index f5c28270..37410bf3 100644 --- a/config/lint-config/package.json +++ b/config/lint-config/package.json @@ -1,6 +1,6 @@ { "name": "@modelscope-studio/lint-config", - "version": "1.0.0-beta.2", + "version": "1.0.0-beta.3", "private": false, "description": "ModelScope Studio Lint Config", "repository": "git@github.com:modelscope/modelscope-studio.git", diff --git a/frontend/CHANGELOG.md b/frontend/CHANGELOG.md index a0c80424..266ba8f6 100644 --- a/frontend/CHANGELOG.md +++ b/frontend/CHANGELOG.md @@ -1,5 +1,11 @@ # @modelscope-studio/frontend +## 1.0.0-beta.3 + +### Features + +- [`9f3c59c`](https://github.com/modelscope/modelscope-studio/commit/9f3c59c9c5a0bf8af3980588cb07a467323b1d17) - add new features. Thanks [@Col0ring](https://github.com/Col0ring)! + ## 1.0.0-beta.2 ### Features diff --git a/frontend/antd/CHANGELOG.md b/frontend/antd/CHANGELOG.md index 181443d3..84fdccf4 100644 --- a/frontend/antd/CHANGELOG.md +++ b/frontend/antd/CHANGELOG.md @@ -1,5 +1,11 @@ # @modelscope-studio/antd +## 1.0.0-beta.3 + +### Features + +- [`9f3c59c`](https://github.com/modelscope/modelscope-studio/commit/9f3c59c9c5a0bf8af3980588cb07a467323b1d17) - add new features. Thanks [@Col0ring](https://github.com/Col0ring)! + ## 1.0.0-beta.2 ### Features diff --git a/frontend/antd/package.json b/frontend/antd/package.json index 0e4e7b0b..4ff6028f 100644 --- a/frontend/antd/package.json +++ b/frontend/antd/package.json @@ -1,5 +1,5 @@ { "name": "@modelscope-studio/antd", - "version": "1.0.0-beta.2", + "version": "1.0.0-beta.3", "type": "module" } diff --git a/frontend/base/CHANGELOG.md b/frontend/base/CHANGELOG.md index 79e32068..62b1e37f 100644 --- a/frontend/base/CHANGELOG.md +++ b/frontend/base/CHANGELOG.md @@ -1,5 +1,11 @@ # @modelscope-studio/base +## 1.0.0-beta.3 + +### Features + +- [`9f3c59c`](https://github.com/modelscope/modelscope-studio/commit/9f3c59c9c5a0bf8af3980588cb07a467323b1d17) - add new features. Thanks [@Col0ring](https://github.com/Col0ring)! + ## 1.0.0-beta.2 ### Features diff --git a/frontend/base/package.json b/frontend/base/package.json index a2b80764..cf6bd982 100644 --- a/frontend/base/package.json +++ b/frontend/base/package.json @@ -1,5 +1,5 @@ { "name": "@modelscope-studio/base", - "version": "1.0.0-beta.2", + "version": "1.0.0-beta.3", "type": "module" } diff --git a/frontend/legacy/Chatbot/CHANGELOG.md b/frontend/legacy/Chatbot/CHANGELOG.md index 3aa96b96..f78d546a 100644 --- a/frontend/legacy/Chatbot/CHANGELOG.md +++ b/frontend/legacy/Chatbot/CHANGELOG.md @@ -1,5 +1,11 @@ # @modelscope-studio/legacy-chatbot +## 1.0.0-beta.3 + +### Features + +- [`9f3c59c`](https://github.com/modelscope/modelscope-studio/commit/9f3c59c9c5a0bf8af3980588cb07a467323b1d17) - add new features. Thanks [@Col0ring](https://github.com/Col0ring)! + ## 1.0.0-beta.2 ### Features diff --git a/frontend/legacy/Chatbot/package.json b/frontend/legacy/Chatbot/package.json index 8049e077..b01f370c 100644 --- a/frontend/legacy/Chatbot/package.json +++ b/frontend/legacy/Chatbot/package.json @@ -1,6 +1,6 @@ { "name": "@modelscope-studio/legacy-chatbot", - "version": "1.0.0-beta.2", + "version": "1.0.0-beta.3", "private": false, "description": "ModelScope Gradio Components", "repository": "git@github.com:modelscope/modelscope-studio.git", diff --git a/frontend/legacy/Flow/CHANGELOG.md b/frontend/legacy/Flow/CHANGELOG.md index c386f6e7..b4e5cff0 100644 --- a/frontend/legacy/Flow/CHANGELOG.md +++ b/frontend/legacy/Flow/CHANGELOG.md @@ -1,5 +1,11 @@ # @modelscope-studio/legacy-flow +## 1.0.0-beta.3 + +### Features + +- [`9f3c59c`](https://github.com/modelscope/modelscope-studio/commit/9f3c59c9c5a0bf8af3980588cb07a467323b1d17) - add new features. Thanks [@Col0ring](https://github.com/Col0ring)! + ## 1.0.0-beta.2 ### Features diff --git a/frontend/legacy/Flow/package.json b/frontend/legacy/Flow/package.json index 350b17af..17e97ef6 100644 --- a/frontend/legacy/Flow/package.json +++ b/frontend/legacy/Flow/package.json @@ -1,6 +1,6 @@ { "name": "@modelscope-studio/legacy-flow", - "version": "1.0.0-beta.2", + "version": "1.0.0-beta.3", "private": false, "description": "ModelScope Gradio Components", "repository": "git@github.com:modelscope/modelscope-studio.git", diff --git a/frontend/legacy/Lifecycle/CHANGELOG.md b/frontend/legacy/Lifecycle/CHANGELOG.md index 23d6d808..9debc9fe 100644 --- a/frontend/legacy/Lifecycle/CHANGELOG.md +++ b/frontend/legacy/Lifecycle/CHANGELOG.md @@ -1,5 +1,11 @@ # @modelscope-studio/legacy-lifecycle +## 1.0.0-beta.3 + +### Features + +- [`9f3c59c`](https://github.com/modelscope/modelscope-studio/commit/9f3c59c9c5a0bf8af3980588cb07a467323b1d17) - add new features. Thanks [@Col0ring](https://github.com/Col0ring)! + ## 1.0.0-beta.2 ### Features diff --git a/frontend/legacy/Lifecycle/package.json b/frontend/legacy/Lifecycle/package.json index 72eb41e8..9ec85375 100644 --- a/frontend/legacy/Lifecycle/package.json +++ b/frontend/legacy/Lifecycle/package.json @@ -1,6 +1,6 @@ { "name": "@modelscope-studio/legacy-lifecycle", - "version": "1.0.0-beta.2", + "version": "1.0.0-beta.3", "private": false, "description": "ModelScope Gradio Components", "repository": "git@github.com:modelscope/modelscope-studio.git", diff --git a/frontend/legacy/Markdown/CHANGELOG.md b/frontend/legacy/Markdown/CHANGELOG.md index d320820a..fc6665ed 100644 --- a/frontend/legacy/Markdown/CHANGELOG.md +++ b/frontend/legacy/Markdown/CHANGELOG.md @@ -1,5 +1,11 @@ # @modelscope-studio/legacy-markdown +## 1.0.0-beta.3 + +### Features + +- [`9f3c59c`](https://github.com/modelscope/modelscope-studio/commit/9f3c59c9c5a0bf8af3980588cb07a467323b1d17) - add new features. Thanks [@Col0ring](https://github.com/Col0ring)! + ## 1.0.0-beta.2 ### Features diff --git a/frontend/legacy/Markdown/package.json b/frontend/legacy/Markdown/package.json index 10120650..210e089e 100644 --- a/frontend/legacy/Markdown/package.json +++ b/frontend/legacy/Markdown/package.json @@ -1,6 +1,6 @@ { "name": "@modelscope-studio/legacy-markdown", - "version": "1.0.0-beta.2", + "version": "1.0.0-beta.3", "private": false, "description": "ModelScope Gradio Components", "repository": "git@github.com:modelscope/modelscope-studio.git", diff --git a/frontend/legacy/MultimodalInput/CHANGELOG.md b/frontend/legacy/MultimodalInput/CHANGELOG.md index 22e418bd..df8efc23 100644 --- a/frontend/legacy/MultimodalInput/CHANGELOG.md +++ b/frontend/legacy/MultimodalInput/CHANGELOG.md @@ -1,5 +1,11 @@ # @modelscope-studio/legacy-multimodal-input +## 1.0.0-beta.3 + +### Features + +- [`9f3c59c`](https://github.com/modelscope/modelscope-studio/commit/9f3c59c9c5a0bf8af3980588cb07a467323b1d17) - add new features. Thanks [@Col0ring](https://github.com/Col0ring)! + ## 1.0.0-beta.2 ### Features diff --git a/frontend/legacy/MultimodalInput/package.json b/frontend/legacy/MultimodalInput/package.json index f8c487c5..9ba4cc53 100644 --- a/frontend/legacy/MultimodalInput/package.json +++ b/frontend/legacy/MultimodalInput/package.json @@ -1,6 +1,6 @@ { "name": "@modelscope-studio/legacy-multimodal-input", - "version": "1.0.0-beta.2", + "version": "1.0.0-beta.3", "private": false, "description": "ModelScope Gradio Components", "repository": "git@github.com:modelscope/modelscope-studio.git", diff --git a/frontend/legacy/WaterfallGallery/CHANGELOG.md b/frontend/legacy/WaterfallGallery/CHANGELOG.md index 5f39bf58..84374802 100644 --- a/frontend/legacy/WaterfallGallery/CHANGELOG.md +++ b/frontend/legacy/WaterfallGallery/CHANGELOG.md @@ -1,5 +1,11 @@ # @modelscope-studio/legacy-waterfall-gallery +## 1.0.0-beta.3 + +### Features + +- [`9f3c59c`](https://github.com/modelscope/modelscope-studio/commit/9f3c59c9c5a0bf8af3980588cb07a467323b1d17) - add new features. Thanks [@Col0ring](https://github.com/Col0ring)! + ## 1.0.0-beta.2 ### Features diff --git a/frontend/legacy/WaterfallGallery/package.json b/frontend/legacy/WaterfallGallery/package.json index b0e4a549..46eefcb2 100644 --- a/frontend/legacy/WaterfallGallery/package.json +++ b/frontend/legacy/WaterfallGallery/package.json @@ -1,6 +1,6 @@ { "name": "@modelscope-studio/legacy-waterfall-gallery", - "version": "1.0.0-beta.2", + "version": "1.0.0-beta.3", "description": "ModelScope Gradio Components", "repository": "git@github.com:modelscope/modelscope-studio.git", "license": "Apache-2.0", diff --git a/frontend/legacy/compiled/CHANGELOG.md b/frontend/legacy/compiled/CHANGELOG.md index bb1f3b3a..88c0808f 100644 --- a/frontend/legacy/compiled/CHANGELOG.md +++ b/frontend/legacy/compiled/CHANGELOG.md @@ -1,5 +1,11 @@ # @modelscope-studio/legacy-compiled +## 1.0.0-beta.3 + +### Features + +- [`9f3c59c`](https://github.com/modelscope/modelscope-studio/commit/9f3c59c9c5a0bf8af3980588cb07a467323b1d17) - add new features. Thanks [@Col0ring](https://github.com/Col0ring)! + ## 1.0.0-beta.2 ### Features diff --git a/frontend/legacy/compiled/package.json b/frontend/legacy/compiled/package.json index 1dabd844..66bc4060 100644 --- a/frontend/legacy/compiled/package.json +++ b/frontend/legacy/compiled/package.json @@ -1,6 +1,6 @@ { "name": "@modelscope-studio/legacy-compiled", - "version": "1.0.0-beta.2", + "version": "1.0.0-beta.3", "private": false, "description": "ModelScope Gradio Components", "repository": "git@github.com:modelscope/modelscope-studio.git", diff --git a/frontend/package.json b/frontend/package.json index 1bb83e43..7b5df8ec 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,6 +1,6 @@ { "name": "@modelscope-studio/frontend", - "version": "1.0.0-beta.2", + "version": "1.0.0-beta.3", "private": false, "description": "ModelScope Gradio Components", "license": "Apache-2.0", diff --git a/package.json b/package.json index 350102ca..d01e1887 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "modelscope_studio", - "version": "1.0.0-beta.2", + "version": "1.0.0-beta.3", "private": true, "description": "ModelScope Gradio Components", "repository": "git@github.com:modelscope/modelscope-studio.git", diff --git a/pyproject.toml b/pyproject.toml index 2eecff00..57d0371b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,7 +8,7 @@ build-backend = "hatchling.build" [project] name = "modelscope_studio" -version = "1.0.0-beta.2" +version = "1.0.0-beta.3" description = "A set of extension component, inluding components for conversational input and display in multimodal scenarios, as well as more components for vertical scenarios." readme = "README.md" license = "Apache-2.0" From 4c078514a5e2d93279c430ccfba1ef841dcc3a58 Mon Sep 17 00:00:00 2001 From: Col0ring <1561999073@qq.com> Date: Mon, 11 Nov 2024 09:51:20 +0800 Subject: [PATCH 48/51] docs: update --- docs/app.py | 2 +- docs/helper/env.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/app.py b/docs/app.py index 90870c99..697394e0 100644 --- a/docs/app.py +++ b/docs/app.py @@ -105,7 +105,7 @@ def get_docs(file_path: str, type: Literal["antd", "base"]): "label": get_text("FloatButton", "FloatButton 悬浮按钮"), "key": "float_button" }, { - "label": get_text("Icon", "图标"), + "label": get_text("Icon", "Icon 图标"), "key": "icon" }, { "label": get_text("Typography", "Typography 排版"), diff --git a/docs/helper/env.py b/docs/helper/env.py index 8e342808..f8bcd124 100644 --- a/docs/helper/env.py +++ b/docs/helper/env.py @@ -1,3 +1,3 @@ import os -is_modelscope_studio = not os.getenv('MODELSCOPE_ENVIRONMENT') == 'studio' +is_modelscope_studio = os.getenv('MODELSCOPE_ENVIRONMENT') == 'studio' From bd4bbbc6dcab92d7599753f43078927f5356a022 Mon Sep 17 00:00:00 2001 From: Col0ring <1561999073@qq.com> Date: Mon, 11 Nov 2024 13:51:19 +0800 Subject: [PATCH 49/51] docs: update --- README-zh_CN.md | 22 +++++++++++++--- README.md | 8 +++--- docs/Dockerfile | 15 ----------- .../base/overview => }/README-zh_CN.md | 2 +- docs/{components/base/overview => }/README.md | 19 +++++++++++++- docs/app.py | 26 ++++++++++++++----- docs/components/base/overview/app.py | 6 ----- docs/components/legacy/README-zh_CN.md | 2 +- docs/components/legacy/README.md | 18 +------------ .../base/overview => }/demos/example.py | 0 docs/helper/Site.py | 18 ++++++------- docs/requirements.txt | 2 +- 12 files changed, 74 insertions(+), 64 deletions(-) delete mode 100644 docs/Dockerfile rename docs/{components/base/overview => }/README-zh_CN.md (92%) rename docs/{components/base/overview => }/README.md (81%) delete mode 100644 docs/components/base/overview/app.py rename docs/{components/base/overview => }/demos/example.py (100%) diff --git a/README-zh_CN.md b/README-zh_CN.md index 5c821168..cee7328c 100644 --- a/README-zh_CN.md +++ b/README-zh_CN.md @@ -1,3 +1,5 @@ +> 当前文档版本为 `1.0 beta`,如果您正在使用以前的`modelscope_studio`版本,请跳转至 [legacy](https://github.com/modelscope/modelscope-studio/tree/legacy) 分支查看。 + # ModelScope Studio

@@ -9,11 +11,25 @@

-GitHub | 🤖 ModelScope Studio | 🤗 Hugging Face Space +GitHub | 🤖 ModelScope Studio | 🤗 Hugging Face Space
中文  |  English  |  日本語

+`modelscope_studio`是一个基于 Gradio 的三方组件库,在原有 Gradio 组件的基础上延伸了更多的组件和使用形式。 + +目前支持的 UI 库: + +- [Ant Design](https://ant.design/) + +## 何时使用 + +比起 Gradio 自身的组件,`modelscope_studio`更加注重页面布局和组件的灵活性,如果您想要构建更漂亮的用户界面,我们非常推荐您使用`modelscope_studio`。然而,当您的应用需要 Gradio 在 Python 端更多地处理内置数据时,`modelscope_studio`可能不是最好的选择,但仍然可以使用`modelscope_studio`的布局和展示组件来帮助您构建页面。 + +## 依赖 + +- Gradio >= 4.0 + ## 安装 ```sh @@ -38,8 +54,8 @@ demo.queue().launch() ## 文档与示例 -- [ModelScope](https://modelscope.cn/studios/modelscope/modelscope-studio) -- [Hugging Face](https://huggingface.co/spaces/modelscope/modelscope-studio) +- ModelScope: [中文](https://modelscope.cn/studios/modelscope/modelscope-studio-beta) +- Hugging Face: [English](<(https://huggingface.co/spaces/modelscope/modelscope-studio-beta)>) ## 迁移到 1.0 diff --git a/README.md b/README.md index 414098d4..b07f664a 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +> The current document version is `1.0 beta`. If you are using a previous version of `modelscope_studio`, please switch to the [legacy](https://github.com/modelscope/modelscope-studio/tree/legacy) branch for reference. + # ModelScope Studio

@@ -9,7 +11,7 @@

-GitHub | 🤖 ModelScope Studio | 🤗 Hugging Face Space +GitHub | 🤖 ModelScope Studio | 🤗 Hugging Face Space
中文  |  English  |  日本語

@@ -54,8 +56,8 @@ demo.queue().launch() ## Documentation and Examples -- [ModelScope](https://modelscope.cn/studios/modelscope/modelscope-studio) -- [Hugging Face](https://huggingface.co/spaces/modelscope/modelscope-studio) +- ModelScope: [中文](https://modelscope.cn/studios/modelscope/modelscope-studio-beta) +- Hugging Face: [English](<(https://huggingface.co/spaces/modelscope/modelscope-studio-beta)>) ## Migration to 1.0 diff --git a/docs/Dockerfile b/docs/Dockerfile deleted file mode 100644 index 02d9fbef..00000000 --- a/docs/Dockerfile +++ /dev/null @@ -1,15 +0,0 @@ -FROM python:3.9 - -WORKDIR /code - -COPY --link --chown=1000 . . - -RUN mkdir -p /tmp/cache/ -RUN chmod a+rwx -R /tmp/cache/ -ENV TRANSFORMERS_CACHE=/tmp/cache/ - -RUN pip install --no-cache-dir -r requirements.txt - -ENV PYTHONUNBUFFERED=1 GRADIO_ALLOW_FLAGGING=never GRADIO_NUM_PORTS=1 GRADIO_SERVER_NAME=0.0.0.0 GRADIO_SERVER_PORT=7860 SYSTEM=spaces - -CMD ["python", "app.py"] diff --git a/docs/components/base/overview/README-zh_CN.md b/docs/README-zh_CN.md similarity index 92% rename from docs/components/base/overview/README-zh_CN.md rename to docs/README-zh_CN.md index a36457aa..f569b710 100644 --- a/docs/components/base/overview/README-zh_CN.md +++ b/docs/README-zh_CN.md @@ -9,7 +9,7 @@

-GitHub | 🤖 ModelScope Studio | 🤗 Hugging Face Space +GitHub | 🤖 ModelScope Studio | 🤗 Hugging Face Space `modelscope_studio`是一个基于 Gradio 的三方组件库,在原有 Gradio 组件的基础上延伸了更多的组件和使用形式。 diff --git a/docs/components/base/overview/README.md b/docs/README.md similarity index 81% rename from docs/components/base/overview/README.md rename to docs/README.md index 09405b9f..b862f3d4 100644 --- a/docs/components/base/overview/README.md +++ b/docs/README.md @@ -1,3 +1,20 @@ +--- +tags: + - gradio-custom-component + - component library + - Ant Design + - modelscope-studio +title: modelscope-studio +colorFrom: blue +colorTo: gray +short_description: A third-party component library based on Gradio. +sdk: gradio +pinned: false +header: mini +app_file: app.py +license: apache-2.0 +--- + # ModelScope Studio

@@ -9,7 +26,7 @@

-GitHub | 🤖 ModelScope Studio | 🤗 Hugging Face Space +GitHub | 🤖 ModelScope Studio | 🤗 Hugging Face Space `modelscope_studio` is a third-party component library based on Gradio, extending more components and usage forms on top of the original Gradio components. diff --git a/docs/app.py b/docs/app.py index 697394e0..bd9e1604 100644 --- a/docs/app.py +++ b/docs/app.py @@ -1,6 +1,7 @@ import os from typing import Literal +from helper.Docs import Docs from helper.env import is_modelscope_studio from helper.Site import Site from legacy_app import legacy_demo @@ -34,19 +35,23 @@ def get_docs(file_path: str, type: Literal["antd", "base"]): "doc", os.path.join(components_dir, component, "app.py")) module = importlib.util.module_from_spec(spec) spec.loader.exec_module(module) - docs[component] = module + docs[component] = module.docs return docs +index_docs = {"modelscope_studio": Docs(__file__)} + base_docs = get_docs(__file__, "base") antd_docs = get_docs(__file__, "antd") -default_active_tab = "base" +default_active_tab = "index" + +index_menu_items = [{ + "label": get_text("ModelScope-Studio", "ModelScope-Studio"), + "key": "modelscope_studio" +}] base_menu_items = [{ - "label": get_text("Overview", "概览"), - "key": "overview" -}, { "label": get_text("Core", "核心"), "type": @@ -147,10 +152,16 @@ def more_components(): tabs = [ + { + "label": get_text("Overview", "预览"), + "key": "index", + "default_active_key": "modelscope_studio", + "menus": index_menu_items + }, { "label": get_text("Base Components", "基础组件"), "key": "base", - "default_active_key": "overview", + "default_active_key": "application", "menus": base_menu_items }, { @@ -171,6 +182,7 @@ def more_components(): tabs=tabs, docs={ # match the key of tabs + "index": index_docs, "antd": antd_docs, "base": base_docs }, @@ -180,4 +192,4 @@ def more_components(): demo = site.render() if __name__ == "__main__": - demo.launch() + demo.queue().launch(ssr_mode=False) diff --git a/docs/components/base/overview/app.py b/docs/components/base/overview/app.py deleted file mode 100644 index 0018b7c1..00000000 --- a/docs/components/base/overview/app.py +++ /dev/null @@ -1,6 +0,0 @@ -from helper.Docs import Docs - -docs = Docs(__file__) - -if __name__ == "__main__": - docs.render().queue().launch() diff --git a/docs/components/legacy/README-zh_CN.md b/docs/components/legacy/README-zh_CN.md index fa6b2694..578a1739 100644 --- a/docs/components/legacy/README-zh_CN.md +++ b/docs/components/legacy/README-zh_CN.md @@ -9,7 +9,7 @@

-GitHub | 🤖 ModelScope Studio | 🤗 Hugging Face Space +GitHub | 🤖 ModelScope Studio | 🤗 Hugging Face Space `modelscope_studio` 是一套基于 gradio 4.x 的扩展组件库,致力于服务于 ModelScope 创空间中对于 gradio 应用的各类扩展需求,目前主要聚集在对话场景增强、多模态场景以及一些其他垂直场景支持。 diff --git a/docs/components/legacy/README.md b/docs/components/legacy/README.md index d66732f7..821b96fa 100644 --- a/docs/components/legacy/README.md +++ b/docs/components/legacy/README.md @@ -1,19 +1,3 @@ ---- -tags: - - gradio-custom-component - - Chatbot - - MutilmodalInput - - Markdown - - gradio-template-Chatbot - - gradio-template-Markdown -title: modelscope-studio -colorFrom: blue -colorTo: gray -sdk: docker -pinned: false -license: apache-2.0 ---- -

ModelScope Studio

@@ -25,7 +9,7 @@ license: apache-2.0

-GitHub | 🤖 ModelScope Studio | 🤗 Hugging Face Space +GitHub | 🤖 ModelScope Studio | 🤗 Hugging Face Space `modelscope_studio` is a set of extension component libraries based on gradio 4.x, dedicated to serving the various extension needs of gradio applications within the ModelScope Studio. It mainly focuses on enhancing conversational scenarios, supporting multimodal contexts, and providing assistance for various other specialized scenarios. diff --git a/docs/components/base/overview/demos/example.py b/docs/demos/example.py similarity index 100% rename from docs/components/base/overview/demos/example.py rename to docs/demos/example.py diff --git a/docs/helper/Site.py b/docs/helper/Site.py index 0dceed7b..2b8bda34 100644 --- a/docs/helper/Site.py +++ b/docs/helper/Site.py @@ -36,7 +36,7 @@ def _render_docs(self, items: list, tab: dict): visible=True if tab.get("default_active_key") == key else False) as docs_tab: docs_tabs.append(docs_tab) - tab_docs[key].docs.render() + tab_docs[key].render() return docs_tabs def render(self): @@ -183,14 +183,14 @@ def on_layout_menu_select( return on_layout_menu_select - sider_menu.select( - fn=on_layout_menu_select_wrapper( - docs_tabs, sider_menu, - layout_content_tabs), - outputs=[ - sider_menu, layout_content_tabs, - *docs_tabs - ]) + sider_menu.select( + fn=on_layout_menu_select_wrapper( + docs_tabs, sider_menu, + layout_content_tabs), + outputs=[ + sider_menu, layout_content_tabs, + *docs_tabs + ]) tab_menu.select( fn=on_tab_menu_select, outputs=[tab_menu, tabs, *tab_components]) diff --git a/docs/requirements.txt b/docs/requirements.txt index b4f81f0e..793fbae6 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,2 +1,2 @@ modelscope_studio -modelscope_studio-0.4.0-py3-none-any.whl +modelscope_studio-1.0.0b3-py3-none-any.whl From 8cbbf1464ab2ae61212c7e5612b46ec630f6440d Mon Sep 17 00:00:00 2001 From: Col0ring <1561999073@qq.com> Date: Mon, 11 Nov 2024 14:00:30 +0800 Subject: [PATCH 50/51] docs: update --- README-zh_CN.md | 22 ++++++++++++++++++++++ README.md | 22 ++++++++++++++++++++++ 2 files changed, 44 insertions(+) diff --git a/README-zh_CN.md b/README-zh_CN.md index cee7328c..2e09d7ff 100644 --- a/README-zh_CN.md +++ b/README-zh_CN.md @@ -72,3 +72,25 @@ with gr.Blocks() as demo: demo.launch() ``` + +## 开发 + +将仓库克隆到本地: + +```sh +git clone git@github.com:modelscope/modelscope-studio.git +cd modelscope-studio +# for backend +pip install -e '.' +# for frontend +npm install pnpm -g + +pnpm install +pnpm build +``` + +运行 `gradio cc dev` 启动 demo: + +```sh +gradio cc dev docs/app.py +``` diff --git a/README.md b/README.md index b07f664a..69ac70b1 100644 --- a/README.md +++ b/README.md @@ -74,3 +74,25 @@ with gr.Blocks() as demo: demo.launch() ``` + +## Development + +Clone this repo locally: + +```sh +git clone git@github.com:modelscope/modelscope-studio.git +cd modelscope-studio +# for backend +pip install -e '.' +# for frontend +npm install pnpm -g + +pnpm install +pnpm build +``` + +Run `gradio cc dev` to start demo: + +```sh +gradio docs/app.py +``` From fa696650c40ef67443068c07f646776c315ffe40 Mon Sep 17 00:00:00 2001 From: Col0ring <1561999073@qq.com> Date: Mon, 11 Nov 2024 14:04:20 +0800 Subject: [PATCH 51/51] docs: update --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 69ac70b1..d53a59b8 100644 --- a/README.md +++ b/README.md @@ -94,5 +94,5 @@ pnpm build Run `gradio cc dev` to start demo: ```sh -gradio docs/app.py +gradio cc dev docs/app.py ```