Skip to content

Commit

Permalink
feat: fix issues & add component docs (#35)
Browse files Browse the repository at this point in the history
  • Loading branch information
Col0ring authored Nov 29, 2024
1 parent afc3d18 commit 5875180
Show file tree
Hide file tree
Showing 308 changed files with 5,024 additions and 645 deletions.
17 changes: 17 additions & 0 deletions .changeset/chilly-lemons-pretend.md
Original file line number Diff line number Diff line change
@@ -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 AutoLoading
17 changes: 17 additions & 0 deletions .changeset/late-cameras-speak.md
Original file line number Diff line number Diff line change
@@ -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
---

fix: component paramters in Python
3 changes: 3 additions & 0 deletions .changeset/pre.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,12 @@
"@modelscope-studio/legacy-compiled": "0.4.2"
},
"changesets": [
"chilly-lemons-pretend",
"five-actors-compete",
"fuzzy-goats-retire",
"lemon-laws-cross",
"slimy-feet-nail",
"spotty-seals-poke",
"tough-walls-grab"
]
}
17 changes: 17 additions & 0 deletions .changeset/slimy-feet-nail.md
Original file line number Diff line number Diff line change
@@ -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
---

fix: known component issues
17 changes: 17 additions & 0 deletions .changeset/spotty-seals-poke.md
Original file line number Diff line number Diff line change
@@ -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
---

fix: auto_loading & cloned node
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
# modelscope_studio

## 1.0.0-beta.6

### Fixes

- [`6a38225`](https://github.com/modelscope/modelscope-studio/commit/6a38225363c7db871c9593e524fe73ebebff1016) - auto_loading & cloned node. Thanks [@Col0ring](https://github.com/Col0ring)!

## 1.0.0-beta.5

### Features

- [`af9aa4f`](https://github.com/modelscope/modelscope-studio/commit/af9aa4fe598ae23dbe88163202aab2d44d5a133d) - add AutoLoading. Thanks [@Col0ring](https://github.com/Col0ring)!

## 1.0.0-beta.4

### Fixes

- [`107d733`](https://github.com/modelscope/modelscope-studio/commit/107d733cb4ee01f346d165cbe192c514b38ac905) - known component issues. Thanks [@Col0ring](https://github.com/Col0ring)!

## 1.0.0-beta.3

### Features
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ demo.queue().launch()

## 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.
If you have used the `modelscope_studio` component before and want to continue using it in the new version, you do not need to make any changes to the original component, just import `ms.Application` in the outer layer.

```python
import gradio as gr
Expand Down
1 change: 1 addition & 0 deletions backend/modelscope_studio/components/antd/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
from .form import AntdForm as Form
from .form.item import AntdFormItem as FormItem
from .form.item.rule import AntdFormItemRule as FormItemRule
from .form.provider import AntdFormProvider as FormProvider
from .grid.col import AntdCol as Col
from .grid.row import AntdRow as Row
from .icon import AntdIcon as Icon
Expand Down
4 changes: 2 additions & 2 deletions backend/modelscope_studio/components/antd/anchor/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ def __init__(
get_container: str | None = None,
get_current_anchor: str | None = None,
offset_top: int | float = 0,
show_ink_in_fixed: bool = False,
show_ink_in_fixed: bool | None = None,
target_offset: int | float | None = None,
items: list[dict] | None = None,
direction: Literal['vertical', 'horizontal'] = 'vertical',
replace: bool = False,
replace: bool | None = None,
root_class_name: str | None = None,
as_item: str | None = None,
_internal: None = None,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def __init__(
props: dict | None = None,
*,
key: str | None = None,
replace: bool = False,
replace: bool | None = None,
href: str | None = None,
href_target: str | None = None,
as_item: str | None = None,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,12 @@ def __init__(
props: dict | None = None,
*,
allow_clear: bool | dict = False,
auto_focus: bool = False,
backfill: bool = False,
auto_focus: bool | None = None,
backfill: bool | None = None,
default_active_first_option: bool = True,
default_open: bool | None = None,
default_value: str | None = None,
disabled: bool = False,
disabled: bool | None = None,
dropdown_render: str | None = None,
popup_class_name: str | None = None,
popup_match_select_width: bool | int | float = True,
Expand All @@ -70,7 +70,7 @@ def __init__(
size: Literal['small', 'middle', 'large'] | None = None,
status: Literal['error', 'warning'] | None = None,
variant: Literal['outlined', 'borderless', 'filled']
| None = 'outlined',
| None = None,
root_class_name: str | None = None,
as_item: str | None = None,
_internal: None = None,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@ class AntdAutoCompleteOption(ModelScopeLayoutComponent):
EVENTS = []

# supported slots
SLOTS = [
'label',
]
SLOTS = ['label', 'options']

def __init__(
self,
Expand Down
4 changes: 2 additions & 2 deletions backend/modelscope_studio/components/antd/badge/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ def __init__(
*,
color: str | None = None,
class_names: dict | None = None,
dot: bool = False,
dot: bool | None = None,
offset: tuple[int | float, int | float] | None = None,
overflow_count: int = 99,
show_zero: bool = False,
show_zero: bool | None = None,
size: Literal['small', 'default'] | None = None,
status: Literal['success', 'processing', 'default', 'error',
'warning'] | None = None,
Expand Down
10 changes: 5 additions & 5 deletions backend/modelscope_studio/components/antd/button/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,16 @@ def __init__(
props: dict | None = None,
*,
auto_insert_space: bool = True,
block: bool = False,
block: bool | None = None,
class_names: dict | None = None,
danger: bool = False,
disabled: bool = False,
ghost: bool = False,
danger: bool | None = None,
disabled: bool | None = None,
ghost: bool | None = None,
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,
loading: bool | None = None,
shape: Literal["default", "circle", "round"] | None = "default",
size: Literal["large", "middle", "small"] | None = None,
styles: dict | None = None,
Expand Down
4 changes: 2 additions & 2 deletions backend/modelscope_studio/components/antd/card/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ def __init__(
cover: str | None = None,
default_active_tab_key: str | None = None,
extra: str | None = None,
hoverable: bool = False,
loading: bool = False,
hoverable: bool | None = None,
loading: bool | None = None,
size: Literal["default", "small"] | None = None,
tab_bar_extra_content: str | None = None,
tab_list: list[str] | str | None = None,
Expand Down
12 changes: 6 additions & 6 deletions backend/modelscope_studio/components/antd/carousel/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,21 @@ def __init__(
self,
props: dict | None = None,
*,
arrows: bool = False,
autoplay: bool = False,
arrows: bool | None = None,
autoplay: bool | None = None,
autoplay_speed: int | float = 3000,
adaptive_height: bool = False,
adaptive_height: bool | None = None,
dot_position: Literal['top', 'bottom', 'left', 'right'] = 'bottom',
dots: bool | dict = True,
draggable: bool = False,
fade: bool = False,
draggable: bool | None = None,
fade: bool | None = None,
infinite: bool = True,
speed: int = 500,
easing: str = 'linear',
effect: Literal['scrollx', 'fade'] = 'scrollx',
after_change: str | None = None,
before_change: str | None = None,
wait_for_animate: bool = False,
wait_for_animate: bool | None = None,
root_class_name: str | None = None,
as_item: str | None = None,
_internal: None = None,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@ def __init__(
*,
allow_clear: bool | dict = False,
auto_clear_search_value: bool = True,
auto_focus: bool = False,
change_on_select: bool = False,
auto_focus: bool | None = None,
change_on_select: bool | None = None,
default_value: str | None = None,
disabled: bool = False,
disabled: bool | None = None,
display_render: str | None = None,
tag_render: str | None = None,
popup_class_name: str | None = None,
Expand All @@ -79,7 +79,7 @@ def __init__(
status: Literal['error', 'warning'] | None = None,
suffix_icon: str | None = None,
variant: Literal['outlined', 'borderless', 'filled']
| None = 'outlined',
| None = None,
multiple: bool | None = None,
show_checked_strategy: Literal['SHOW_PARENT', 'SHOW_CHILD']
| None = None,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def __init__(
value: list[str] | list[int | float] | None = None,
props: dict | None = None,
*,
change_on_select: bool = False,
change_on_select: bool | None = None,
default_value: str | None = None,
expand_icon: str | None = None,
expand_trigger: Literal['click', 'hover'] = 'click',
Expand Down
10 changes: 5 additions & 5 deletions backend/modelscope_studio/components/antd/checkbox/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ class AntdCheckbox(ModelScopeDataLayoutComponent):

def __init__(
self,
value: bool | None = False,
value: bool | None = None,
props: dict | None = None,
*,
auto_focus: bool = False,
default_checked: bool = False,
disabled: bool = False,
indeterminate: bool = False,
auto_focus: bool | None = None,
default_checked: bool | None = None,
disabled: bool | None = None,
indeterminate: bool | None = None,
root_class_name: str | None = None,
as_item: str | None = None,
_internal: None = None,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def __init__(
props: dict | None = None,
*,
default_value: list[str | int | float | bool] | None = None,
disabled: bool = False,
disabled: bool | None = None,
options: list[str] | list[int | float] | list[dict] | None = None,
root_class_name: str | None = None,
as_item: str | None = None,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class AntdCheckboxGroupOption(ModelScopeLayoutComponent):

def __init__(
self,
value: str | None = None,
value: str | int | float | bool | None = None,
props: dict | None = None,
*,
label: str | None = None,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,17 @@ def __init__(
self,
props: dict | None = None,
*,
accordion: bool = False,
accordion: bool | None = None,
active_key: str | float | list[int | float] | list[str]
| None = None,
bordered: bool = True,
collapsible: Literal['header', 'icon', 'disabled'] | None = None,
default_active_key: str | float | list[int | float] | list[str]
| None = None,
destroy_inactive_panel: bool = False,
destroy_inactive_panel: bool | None = None,
expand_icon: str | None = None,
expand_icon_position: Literal['start', 'end'] | None = None,
ghost: bool = False,
ghost: bool | None = None,
items: list[dict] | None = None,
size: Literal['large', 'middle', 'small'] | None = None,
root_class_name: str | None = None,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def __init__(
class_names: dict | None = None,
collapsible: Literal['header', 'icon', 'disabled'] | None = None,
extra: str | None = None,
force_render: bool = False,
force_render: bool | None = None,
show_arrow: bool = True,
styles: dict | None = None,
as_item: str | None = None,
Expand Down
Loading

0 comments on commit 5875180

Please sign in to comment.