diff --git a/AGENTS.md b/AGENTS.md index dc54f9a..3485eeb 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -182,6 +182,12 @@ worktree so a test can see it. Read it in place. - `python-multiplatform` exposes Kotlin declarations under their **Kotlin** names (`androidx.compose.material3`). It must never map `androidx` to `pythonx` or rename any Kotlin namespace. Do not propose, add, or depend on such a feature there, including in test harnesses. +- What the rule forbids is renaming a **namespace**. Turning a Kotlin member name or keyword into + `snake_case` (`fillMaxWidth` to `fill_max_width`, `onClick` to `on_click`) is the binder's own + feature since python-multiplatform #131, by the same rule as `pythonx.compose._reexport.python_name`; + depending on it is allowed, and this package keeps no member resolver or keyword wrapper of its + own. What stays here: the module grouping, the snake-case-only `pythonx` surface, aliases, objects + and grouped constants, the value-class allowlist, the app root and the Pythonic stubs. - `pythonx/` is a **real package on disk**. Its modules import the `androidx.compose.*` modules the binder exposes and restructure them Pythonically. A design in which something else synthesises `pythonx.*` (for example with `__path__ = []`) and the on-disk files cannot be imported is ruled diff --git a/PROJECT.md b/PROJECT.md index d064889..178a568 100644 --- a/PROJECT.md +++ b/PROJECT.md @@ -27,7 +27,7 @@ Compose(`androidx.compose.*`)를 파이썬에서 쓰기 위한 pip 패키지 **` | 상태 | 항목 | |---|---| -| 구현 | 매핑 매니페스트 `pythonx-map.toml`, `@Composable` 항등 데코레이터, 실제 디스크 패키지 `pythonx` 와 모듈 수준 규칙 기반 재노출(snake_case 이름·키워드·시그니처, 오버로드 디스패치, 값 클래스 허용 목록), 실제 Compose 1.11.1 에서 생성한 `.pyi` 스텁과 `py.typed`(wheel 포함, mypy 로 검사), `Alignment`/`Arrangement` 상수(평면 `Alignment.End` 와 묶음 `Alignment.Horizontal.End` 모두, #9), proxy 메서드의 snake_case 키워드 인자(`m.padding(padding_values=...)`, python-multiplatform `describe_member` 필요; Kotlin 이름도 실행 시 그대로 통하고 스텁은 snake_case 만) | +| 구현 | 매핑 매니페스트 `pythonx-map.toml`, `@Composable` 항등 데코레이터, 실제 디스크 패키지 `pythonx` 와 모듈 수준 규칙 기반 재노출(snake_case 이름·키워드·시그니처, 오버로드 디스패치, 값 클래스 허용 목록), 실제 Compose 1.11.1 에서 생성한 `.pyi` 스텁과 `py.typed`(wheel 포함, mypy 로 검사), `Alignment`/`Arrangement` 상수(평면 `Alignment.End` 와 묶음 `Alignment.Horizontal.End` 모두, #9), proxy 메서드의 snake_case 이름과 키워드 인자(`m.padding(padding_values=...)`; python-multiplatform #131 이 바인더 쪽에서 제공하므로 #131 이상 필요; Kotlin 이름도 실행 시 그대로 통하고 스텁은 snake_case 만) | | 부분 | 선언형 앱 루트 `@app`·`state`·`app_root`(#11; 로직은 테스트됨, 바인더 경로는 #38 모양의 가짜 호스트로 테스트됨, 실제 Compose 증거는 E2E 모듈 #19; 숫자·문자열 상태는 python-multiplatform #69 부터 왕복됨), 배포 설정, Material 3 위젯(렌더 증거는 python-multiplatform 에만), `Icon`(import 만 됨)·`DefaultIcons`(`Icons.Default` alias, 가짜 호스트로만 테스트됨, 스텁에서는 `DefaultIcons.Add` 가 `ImageVector`; `DefaultIcons.Add` 로 쓴다; 노트북의 `DefaultIcons.Add()` 가 아님), `TextField(state=...)`·`TextFieldState`(#10; `pythonx.compose.foundation.text.input`, 가짜 호스트로 테스트됨, 노트북의 `text_state=`/`padding=` 는 `state=`/`modifier=Modifier.padding(8)`; IME 조합 증거는 python-multiplatform E2E #26) | | 계획 | `remember_saveable`·색 스킴·코루틴 스코프 | @@ -39,11 +39,11 @@ uv run --with pytest --with mypy pytest tests -q python-multiplatform develop 31c092f0+ 251 passed, 1 skipped describe_member 없는 체크아웃 같은 수, 그중 7 개 건너뜀 (python-multiplatform #54 이전) describe(module, name) 없는 체크아웃 같은 수, 그중 13 개 건너뜀 (python-multiplatform #36 이전) - 그보다 오래된 체크아웃 거기에 5 개 더 건너뜀 (member resolver 없음) + 그보다 오래된 체크아웃 거기에 5 개 더 건너뜀 (#131 이전, snake_case 이름 없음) ``` `describe_member`(python-multiplatform #54)가 없는 바인더에서는 메서드 키워드를 확인하는 7 개가(Kotlin 키워드로 되돌아가는 2 개는 실행됨), `describe(module, name)`(python-multiplatform #36)이 없는 바인더에서는 묶음 상수를 확인하는 13 개가, -member resolver(python-multiplatform `ba4c6f49`)가 없는 바인더에서는 proxy 의 snake_case 메서드를 부르는 +#131(python-multiplatform, snake_case 이름·키워드) 이전 바인더에서는 proxy 의 snake_case 메서드를 부르는 5 개가 더 건너뛴다. 두 환경 모두의 건너뜀 1 개는 worktree 에 없는 `UI.ipynb` 의 테스트다. 건너뜀은 통과가 아니다. 체크아웃 없이 통과하는 134 개 중 61 개는 타입 스텁과 wheel 을 검사하고(SPEC S1.2), 나머지 다수는 *부재*(옛 토큰·삭제된 파일이 없음)를 확인하는 것이라 기능 진척으로 세지 않는다. @@ -98,7 +98,10 @@ uv run python .github/scripts/check_guide.py # 가이드: HTML 파싱, 링크 - 배포 이름은 `pythonx-compose`. - `pythonx` 는 디스크에 존재하는 실제 패키지이고, 그 코드가 `androidx` 모듈을 가져와 재구성한다. - 바인더(`python-multiplatform`)는 Kotlin 네임스페이스를 절대 바꾸지 않는다. `androidx → pythonx` - 매핑은 이 저장소의 일이고, `pythonx-map.toml` 이 그 매니페스트다. + 매핑은 이 저장소의 일이고, `pythonx-map.toml` 이 그 매니페스트다. 이름과 키워드의 snake_case 변환은 + python-multiplatform #131 부터 바인더의 기능이다(규칙은 이 패키지의 `python_name` 과 같다). 이 저장소는 + 모듈 묶음, snake_case 만 나열하는 pythonx 표면, 별칭, 객체와 묶음 상수, 값 클래스 허용 목록, 앱 루트, + Pythonic 스텁을 맡고, 프록시의 snake_case 에는 python-multiplatform #131 이상이 필요하다(#79). - Kotlin 확장 함수는 수신 객체 프록시의 메서드로 보인다. - `@Composable` 데코레이터는 유지한다. - `.pyi` 스텁은 패키지에 포함되어 배포된다. diff --git a/README.md b/README.md index e1214ec..c6d7b81 100644 --- a/README.md +++ b/README.md @@ -55,7 +55,9 @@ proofs are still pending. See [Status](#-status). `Alignment.Horizontal.End` is `Alignment.End`. - **`@Composable` stays.** Screens are decorated Python functions. - **A real package.** `pythonx/` is ordinary Python source that imports `androidx.compose.*` and - reshapes it. The binder never renames anything. Renaming is this package's job. + reshapes it. The binder never renames a namespace. Since python-multiplatform #131 it serves + `snake_case` names and keywords itself, by this package's rule; this package keeps the module + grouping and the `snake_case`-only surface. - **One manifest.** [`pythonx-map.toml`](https://github.com/thisisthepy/pythonx-compose/blob/main/pythonx/compose/pythonx-map.toml) says which `pythonx.compose.*` module stands for which Kotlin package. It lives inside the package and ships in the wheel. The runtime and the `.pyi` generator read the same file, so what your editor completes is what the interpreter diff --git a/docs/INTENT.md b/docs/INTENT.md index d99274c..65177f4 100644 --- a/docs/INTENT.md +++ b/docs/INTENT.md @@ -57,12 +57,17 @@ package `pythonx.compose`. modules** and **restructures them** so they can be used Pythonically. It is not a namespace that something else synthesises at run time. -### 2.3 The binder never renames; renaming is this package's job +### 2.3 The binder never renames a namespace; this package groups the namespaces `python-multiplatform` (the binder) exposes Kotlin declarations to Python **under their Kotlin -names**: `androidx.compose.material3` in Kotlin is `androidx.compose.material3` in Python. The -binder must never turn `androidx` into `pythonx` or rename any other Kotlin namespace. Mapping -`androidx.compose.*` to `pythonx.compose.*` is done **here, in real Python code**. +namespaces**: `androidx.compose.material3` in Kotlin is `androidx.compose.material3` in Python. The +binder must never turn `androidx` into `pythonx` or rename any other Kotlin namespace. Grouping +`androidx.compose.*` into `pythonx.compose.*` is done **here, in real Python code**. + +Pythonic spellings *inside* a namespace (snake_case names and keyword arguments) are the binder's own +feature. The maintainer confirmed it (2026-10-03, relayed by the ecosystem lead): "파이썬 형태로 +인자랑 바꿔주는건 원래 python-multiplatform 자체에서 지원하는 기능". python-multiplatform #131 +restored it, by this package's rule, after a narrower reading of this section had removed it. `pythonx-map.toml` in this repository is the mapping manifest: which `pythonx.compose.*` module stands for which Kotlin package, and which value classes may be written as raw numbers. @@ -101,8 +106,8 @@ types) even though the runtime resolves bindings on demand. - **Not the binder.** Embedding CPython, the FFI, upcalls and the artefact walker belong to `python-multiplatform`. This package depends on that surface; it does not reimplement it. -- **Not a renamer inside the binder.** Nothing that maps `androidx` to `pythonx` may live in - `python-multiplatform` (§2.3). +- **Not a namespace renamer inside the binder.** Nothing that maps `androidx` to `pythonx` may live in + `python-multiplatform` (§2.3). Snake_case names and keywords within a namespace are the binder's. - **Not a reimplementation of Compose.** Widgets are Compose's own; this package changes how they are named and reached from Python, not what they do. - **Not an invented API.** Parameters that do not exist in Kotlin (for example the notebook's diff --git a/docs/SPEC.md b/docs/SPEC.md index 5cc6bfb..61eeca2 100644 --- a/docs/SPEC.md +++ b/docs/SPEC.md @@ -74,8 +74,8 @@ and the name the interpreter resolves cannot drift. - **What is generated.** `pythonx/compose/**/__init__.pyi` for every module in `pythonx-map.toml`, beside its `__init__.py`, and an empty `pythonx/compose/py.typed`. The stubs are committed; regenerating them from the same input produces no diff. -- **From what.** python-multiplatform's CI artefact `kotlin-stubs` (workflow run 37103737430, - commit `a5028618`): Kotlin-named stubs for Compose 1.11.1, one `androidx/compose/.../__init__.pyi` +- **From what.** python-multiplatform's CI artefact `kotlin-stubs` (workflow run 37131041879, + commit `452cc807`, python-multiplatform #131): Kotlin-named stubs for Compose 1.11.1, one `androidx/compose/.../__init__.pyi` per Kotlin package. `uv run python scripts/gen_stubs.py ` converts them; the first line of every generated stub records the artefact, run and commit it came from. - **The rule is the runtime's** (`_reexport.py`), applied by `scripts/gen_stubs.py`: @@ -84,11 +84,21 @@ and the name the interpreter resolves cannot drift. snake_case, except the positional-only `receiver` and anonymous `__aN` slots; keyword-only markers and the binder's `@overload` sets, in the binder's order, are kept; - a stub class keeps its name. Its extension members (`Modifier.fill_max_width`, a - `ClassVar` of a callable `Protocol`) are renamed with `python_name`, the member resolver's rule, + `ClassVar` of a callable `Protocol`) are renamed with `python_name`, the binder's rule since #131, and the protocol's `__call__` parameters are snake_case like a module function's (the receiver and anonymous slots keep their names), because the runtime translates a method's keywords (S4.1); the stubs are Pythonic-only, so a method's Kotlin keyword, which still works at run time, fails a type check; + - one name per declaration. Since python-multiplatform #131 the binder's stubs name a name twice: + a module stub carries `fill_max_width = fillMaxWidth` beside the Kotlin-named def, a proxy class + an alias `ClassVar` or property per member, and its signature keywords are already `snake_case` + where it has an alias. The generator drops the alias lines and the repeated member, because + renaming the Kotlin-named declaration by the same rule yields the same name, so no Kotlin + second name and no line such as `fill_max_width = fill_max_width` reaches the stubs; + `python_name` and `snake_case` are idempotent on a `snake_case` name, so a keyword the binder + already spells that way is unchanged. A name the binder declares as a callable module + (`PaddingValues: _PaddingValues_callable_module`, whose `__call__` holds the explicit overloads + and whose members are its constants) is that declaration, with no base-name `def` beside it; - a Kotlin object served as a sub-package (`Alignment`, `Arrangement`) becomes a class of that name in its parent module's stub, its constants `ClassVar`s and its functions snake_case static methods (an explicit overload set, `spaced_by__Dp`, also gets its base name `spaced_by`). A sub-package directory holding only `__init__.pyi` would be a namespace @@ -124,11 +134,12 @@ and the name the interpreter resolves cannot drift. from `pythonx.compose.layout`; a name lent under another one is assigned its path in the source's stub, `DefaultIcons = Icons.Default`, which upstream types as `Icons.Filled`); names a package defines itself (`runtime.Composable`) are carried over. -- **How it is verified.** `tests/test_stubs.py` converts three fixtures: the fake host's +- **How it is verified.** `tests/test_stubs.py` converts five fixtures: the fake host's declarations in the old and the current upstream format (and the current format with an object in its parent stub), and a third in the format of python-multiplatform #53/#44/#38 (nested types, object functions, property setters), and a fourth in the format of #71/#68 (a nested type with two bases, icons as typed - properties), and checks the generated signatures against `inspect.signature` at run time. + properties), and a fifth in the format of #131 (alias lines, alias members, a callable module), and checks + the generated signatures against `inspect.signature` at run time. `TheCommittedStubs` regenerates from `.tmp/kotlin-stubs.zip` and requires the committed files to be identical (it skips where the artefact is absent, which includes CI). `tests/test_typing.py` runs mypy over small programs against the committed stubs: correct code passes, a misspelled @@ -229,6 +240,13 @@ working, and lists Kotlin names only in `dir()`. This package no longer register the same. The stubs are Pythonic-only (§1, S1.2), so a type checker flags a Kotlin keyword the runtime accepts. +Division of labour since #131: the binder renames names and keywords (it never renames a namespace, +INTENT §2.3). This package keeps the module grouping (`pythonx-map.toml`), the snake-case-only +`pythonx` surface (a module lists and serves `snake_case` names only, where the binder's own +`androidx.*` serves both), the aliases, the objects and their grouped constants, the value-class +allowlist, the app root, and the Pythonic stubs. pythonx-compose needs python-multiplatform at #131 or +later for `snake_case` names and keywords on a proxy; on an older binder those calls skip in the suite. + ## 4. Naming ### S4.1 Kotlin parameters, `snake_case`: `implemented` @@ -239,6 +257,11 @@ type suffix (`padding__Dp_Dp`); a name the reverse rule cannot invert still reso rule is only ever applied forward to the module's real names; the camelCase spelling is not a second name. +Who does it: the binder renames names and keywords since python-multiplatform #131, with this +package's rule (`pythonx.compose._reexport.python_name`, pinned equal to the binder's by +`tests/test_chain.py::TheBindersNamingRuleIsThisPackages`). This package keeps the policy that a +`pythonx` module lists and serves the `snake_case` spelling only, and the stubs name only it. + Implemented for module-level names and keywords and for method names on a binder proxy (`tests/test_chain.py::Names`, 8 tests; `TheChain`) and for a method's keywords on a binder proxy (`tests/test_chain.py::MethodKeywords`, 5 tests; served by the binder since python-multiplatform @@ -379,7 +402,7 @@ proxy class itself. Evidence: `tests/test_chain.py::TheChain` (8 tests) and `tests/test_modifier_module.py::TheModifierSeam` (5 tests), against python-multiplatform `ba4c6f49`. -A snake_case method resolved through the member rule leaves the binder's class Kotlin-named. +A snake_case method is served by the binder (python-multiplatform #131) and leaves its class Kotlin-named in `dir()`. ### S6.2 The empty-`Modifier` seam: `partial` diff --git a/docs/guide/concepts.html b/docs/guide/concepts.html index b18981e..be1e719 100644 --- a/docs/guide/concepts.html +++ b/docs/guide/concepts.html @@ -32,14 +32,14 @@

The two layers두 계층

-

python-multiplatform, the binder, embeds CPython in a Kotlin Multiplatform app and exposes Kotlin declarations to Python under their Kotlin names: androidx.compose.material3 is androidx.compose.material3. It never renames a namespace.

python-multiplatform(바인더)는 Kotlin Multiplatform 앱에 CPython 을 임베딩하고, Kotlin 선언을 Kotlin 이름 그대로 파이썬에 노출합니다: androidx.compose.material3 는 androidx.compose.material3 입니다. 네임스페이스 이름을 절대 바꾸지 않습니다.

+

python-multiplatform, the binder, embeds CPython in a Kotlin Multiplatform app and exposes Kotlin declarations to Python under their Kotlin names: androidx.compose.material3 is androidx.compose.material3. It never renames a namespace. Since python-multiplatform #131 it does serve snake_case names and keywords on its own callables and proxies, by the rule this package wrote.

python-multiplatform(바인더)는 Kotlin Multiplatform 앱에 CPython 을 임베딩하고, Kotlin 선언을 Kotlin 이름 그대로 파이썬에 노출합니다: androidx.compose.material3 는 androidx.compose.material3 입니다. 네임스페이스 이름을 절대 바꾸지 않습니다. 다만 python-multiplatform #131 부터는 이 패키지가 정한 규칙대로 자신의 함수와 프록시에서 snake_case 이름과 키워드를 제공합니다.

pythonx-compose, this package, is real Python on disk. Its modules import those androidx.compose.* modules and restructure them into pythonx.compose.*.

pythonx-compose(이 패키지)는 디스크에 있는 실제 파이썬입니다. 이 패키지의 모듈이 androidx.compose.* 를 import 해 pythonx.compose.* 로 재구성합니다.

@Composable def Screen()your Pythonpythonx.composethis package · real .pyandroidx.compose.*Kotlin names · binderComposeJetpack / Multiplatformpythonx-map.tomlthe one mapping.pyi stubsin the wheel@Composable def Screen()your Pythonpythonx.composethis package · real .pyandroidx.compose.*Kotlin names · binderComposeJetpack / Multiplatformpythonx-map.toml→ pythonx.compose, .pyi

The naming rule이름 규칙

-

Expose the original Kotlin declarations and parameters with Pythonic names. A name that starts upper-case (a type, an object, a composable) keeps its Kotlin spelling. Every other name is reached by its snake_case spelling only; the camelCase spelling is not a second name. An explicit overload keeps its type suffix.

Kotlin 의 원래 선언과 매개변수를 파이썬다운 이름으로 노출합니다. 대문자로 시작하는 이름(타입, 객체, 컴포저블)은 Kotlin 표기를 유지합니다. 그 밖의 이름은 snake_case 표기로만 접근하며, camelCase 표기가 또 하나의 이름이 되지는 않습니다. 명시적 오버로드는 타입 접미사를 유지합니다.

+

Expose the original Kotlin declarations and parameters with Pythonic names. A name that starts upper-case (a type, an object, a composable) keeps its Kotlin spelling. Every other name is reached by its snake_case spelling only; the camelCase spelling is not a second name. An explicit overload keeps its type suffix. Turning a Kotlin name or keyword into snake_case is the binder's work since python-multiplatform #131 (its python_name is this package's rule, and a test pins that the two agree). This package decides what the pythonx surface lists: snake_case only, with no camelCase second name.

Kotlin 의 원래 선언과 매개변수를 파이썬다운 이름으로 노출합니다. 대문자로 시작하는 이름(타입, 객체, 컴포저블)은 Kotlin 표기를 유지합니다. 그 밖의 이름은 snake_case 표기로만 접근하며, camelCase 표기가 또 하나의 이름이 되지는 않습니다. 명시적 오버로드는 타입 접미사를 유지합니다. Kotlin 이름과 키워드를 snake_case 로 바꾸는 일은 python-multiplatform #131 부터 바인더가 합니다(바인더의 python_name 은 이 패키지의 규칙이며, 둘이 일치함을 테스트가 확인합니다). pythonx 표면에 무엇을 나열할지는 이 패키지가 정하며, snake_case 만 나열하고 camelCase 두 번째 이름은 두지 않습니다.

@@ -58,7 +58,7 @@

The naming rule이름 규

One re-export rule재노출 규칙 하나

-

Every module in pythonx-map.toml is a real file on disk whose __init__.py is one line. Nothing is resolved at import; a name is looked up in the mapped Kotlin package the first time it is read, and then lives in the module like any attribute. There is no per-widget wrapper.

pythonx-map.toml 의 모든 모듈은 디스크에 있는 실제 파일이며, __init__.py 는 한 줄입니다. import 할 때는 아무것도 해석하지 않고, 이름을 처음 읽을 때 대응된 Kotlin 패키지에서 찾은 뒤 보통의 속성처럼 모듈에 남습니다. 위젯별 래퍼는 없습니다.

+

Every module in pythonx-map.toml is a real file on disk whose __init__.py is one line. Nothing is resolved at import; a name is looked up in the mapped Kotlin package the first time it is read, and then lives in the module like any attribute. There is no per-widget wrapper, and no keyword wrapper: the callables are the binder's own. What this package keeps is the module grouping, the aliases, the objects and their grouped constants, the value-class allowlist and the app root. It needs python-multiplatform #131 or later for snake_case on proxies.

pythonx-map.toml 의 모든 모듈은 디스크에 있는 실제 파일이며, __init__.py 는 한 줄입니다. import 할 때는 아무것도 해석하지 않고, 이름을 처음 읽을 때 대응된 Kotlin 패키지에서 찾은 뒤 보통의 속성처럼 모듈에 남습니다. 위젯별 래퍼도, 키워드 래퍼도 없습니다. 호출 대상은 바인더 자신의 함수입니다. 이 패키지가 맡는 것은 모듈 묶음, 별칭, 객체와 묶음 상수, 값 클래스 허용 목록, 앱 루트입니다. 프록시에서 snake_case 를 쓰려면 python-multiplatform #131 이상이 필요합니다.

# pythonx/compose/material3/__init__.py
 from pythonx.compose._reexport import reexport
 
@@ -67,7 +67,7 @@ 

One re-export rule재노출

Extension functions are methods확장 함수는 메서드

-

Most of Modifier is Kotlin extension functions. In Python each one is a method on the receiver's proxy, so a chain reads as it does in Kotlin. The binder's proxy class keeps Kotlin names; the same naming rule is registered as the binder's member resolver, so the snake_case spelling reaches the Kotlin member.

Modifier 의 대부분은 Kotlin 확장 함수입니다. 파이썬에서는 각각이 수신 객체 프록시의 메서드가 되어, 체인이 Kotlin 에서처럼 읽힙니다. 바인더의 프록시 클래스는 Kotlin 이름을 유지하며, 같은 이름 규칙이 바인더의 멤버 리졸버로 등록되어 snake_case 표기가 Kotlin 멤버에 닿습니다.

+

Most of Modifier is Kotlin extension functions. In Python each one is a method on the receiver's proxy, so a chain reads as it does in Kotlin. The binder serves the snake_case spelling on its proxies since python-multiplatform #131 (this package registers nothing), and its class lists Kotlin names only in dir().

Modifier 의 대부분은 Kotlin 확장 함수입니다. 파이썬에서는 각각이 수신 객체 프록시의 메서드가 되어, 체인이 Kotlin 에서처럼 읽힙니다. python-multiplatform #131 부터 바인더가 프록시에서 snake_case 표기를 제공하며(이 패키지는 아무것도 등록하지 않습니다), 바인더의 클래스는 dir() 에만 Kotlin 이름을 나열합니다.

Modifier.padding(16).size(24).fill_max_width()

Keyword arguments to such a method are snake_case too: m.padding(padding_values=…), as the module function takes padding(m, padding_values=…). The resolver also hands the binder a keyword map read from the declaration's own parameter names. Kotlin's spelling (paddingValues=) still works at run time; the type stubs offer only the Pythonic one.

이런 메서드의 키워드 인자도 snake_case 입니다: m.padding(padding_values=…) 이며, 모듈 함수는 padding(m, padding_values=…) 를 받습니다. 리졸버는 선언의 실제 파라미터 이름에서 읽은 키워드 맵도 바인더에 넘깁니다. Kotlin 이름(paddingValues=)도 실행 시에는 그대로 통하지만, 타입 스텁은 Pythonic 이름만 제시합니다.

diff --git a/docs/guide/guide-modifiers.html b/docs/guide/guide-modifiers.html index 9c9d891..6fcf57a 100644 --- a/docs/guide/guide-modifiers.html +++ b/docs/guide/guide-modifiers.html @@ -40,7 +40,7 @@

Chaining체이닝from pythonx.compose.ui import Modifier m = Modifier.padding(16).size(24).fill_max_width()

-

Each link returns a new receiver; nothing is mutated. Method names are snake_case (fill_max_width reaches fillMaxWidth): the naming rule is registered as the binder's member resolver, while the binder's proxy class itself keeps Kotlin names in dir(). A name that is not bound raises AttributeError naming the type it looked on.

각 단계는 새 수신 객체를 돌려주며, 아무것도 변경하지 않습니다. 메서드 이름은 snake_case 입니다(fill_max_width 가 fillMaxWidth 에 닿음): 이름 규칙이 바인더의 멤버 리졸버로 등록되어 있고, 바인더의 프록시 클래스 자체는 dir() 에 Kotlin 이름을 유지합니다. 바인딩되지 않은 이름은 어느 타입에서 찾았는지 밝히는 AttributeError 를 냅니다.

+

Each link returns a new receiver; nothing is mutated. Method names are snake_case (fill_max_width reaches fillMaxWidth): the binder serves the snake_case spelling on its proxies since python-multiplatform #131, while its proxy class keeps Kotlin names in dir(). A name that is not bound raises AttributeError naming the type it looked on.

각 단계는 새 수신 객체를 돌려주며, 아무것도 변경하지 않습니다. 메서드 이름은 snake_case 입니다(fill_max_width 가 fillMaxWidth 에 닿음): python-multiplatform #131 부터 바인더가 프록시에서 snake_case 표기를 제공하고, 바인더의 프록시 클래스 자체는 dir() 에 Kotlin 이름을 유지합니다. 바인딩되지 않은 이름은 어느 타입에서 찾았는지 밝히는 AttributeError 를 냅니다.

@@ -54,7 +54,7 @@

Overloads오버로드

Keywords: method or module function키워드: 메서드와 모듈 함수

-

The member resolver maps keywords as well as names, so a method takes snake_case keywords exactly as the same extension does when called as a module function; inspect.signature shows them. Kotlin's own spelling still works at run time, the type stubs offer only the Pythonic one, and the mapping needs python-multiplatform's describe_member (on an older binder a method's keywords are Kotlin's):

멤버 리졸버는 이름뿐 아니라 키워드도 대응시키므로, 메서드는 같은 확장 함수를 모듈 함수로 부를 때와 똑같이 snake_case 키워드를 받고, inspect.signature 도 그 이름을 보여 줍니다. Kotlin 이름도 실행 시에는 그대로 통하고 타입 스텁은 Pythonic 이름만 제시하며, 이 대응에는 python-multiplatform 의 describe_member 가 필요합니다(오래된 바인더에서는 메서드의 키워드가 Kotlin 이름입니다):

+

The binder maps keywords as well as names (python-multiplatform #131), so a method takes snake_case keywords exactly as the same extension does when called as a module function; inspect.signature shows them. Kotlin's own spelling still works at run time, the type stubs offer only the Pythonic one, and the mapping needs python-multiplatform #131 or later (on an older binder a method's keywords are Kotlin's):

바인더(python-multiplatform #131)는 이름뿐 아니라 키워드도 대응시키므로, 메서드는 같은 확장 함수를 모듈 함수로 부를 때와 똑같이 snake_case 키워드를 받고, inspect.signature 도 그 이름을 보여 줍니다. Kotlin 이름도 실행 시에는 그대로 통하고 타입 스텁은 Pythonic 이름만 제시하며, 이 대응에는 python-multiplatform #131 이상이 필요합니다(오래된 바인더에서는 메서드의 키워드가 Kotlin 이름입니다):

import inspect
 import pythonx.compose.layout as layout
 
diff --git a/docs/guide/index.html b/docs/guide/index.html
index c185c15..f039ac8 100644
--- a/docs/guide/index.html
+++ b/docs/guide/index.html
@@ -68,7 +68,7 @@ 

Same widgets. Python names.

Architecture구조

Two layers, one rule about names.두 계층, 이름에 관한 규칙 하나.

@Composable def Screen()your Pythonpythonx.composethis package · real .pyandroidx.compose.*Kotlin names · binderComposeJetpack / Multiplatformpythonx-map.tomlthe one mapping.pyi stubsin the wheel@Composable def Screen()your Pythonpythonx.composethis package · real .pyandroidx.compose.*Kotlin names · binderComposeJetpack / Multiplatformpythonx-map.toml→ pythonx.compose, .pyi -
The binder exposes Kotlin under its Kotlin names and never renames. This package is real Python that imports those modules and reshapes them. One manifest says which module maps to which.바인더는 Kotlin 을 Kotlin 이름 그대로 노출하고 절대 이름을 바꾸지 않습니다. 이 패키지는 그 모듈을 import 해 재구성하는 실제 파이썬입니다. 어떤 모듈이 무엇에 대응하는지는 매니페스트 하나가 말합니다.
+
The binder exposes Kotlin under its Kotlin names, never renames a namespace, and serves snake_case names and keywords (python-multiplatform #131). This package is real Python that imports those modules and reshapes them. One manifest says which module maps to which.바인더는 Kotlin 을 Kotlin 이름 그대로 노출하고, 네임스페이스 이름은 절대 바꾸지 않으며, snake_case 이름과 키워드를 제공합니다(python-multiplatform #131). 이 패키지는 그 모듈을 import 해 재구성하는 실제 파이썬입니다. 어떤 모듈이 무엇에 대응하는지는 매니페스트 하나가 말합니다.

diff --git a/docs/guide/status.html b/docs/guide/status.html index c0bdeb1..4f8e828 100644 --- a/docs/guide/status.html +++ b/docs/guide/status.html @@ -34,7 +34,7 @@

Implemented means code in this repository and a passing test that exercises it. Tests that only assert an absence are not counted.

구현은 이 저장소의 코드와 그것을 실행하는 통과 테스트가 함께 있다는 뜻입니다. 부재만 확인하는 테스트는 세지 않습니다.

KotlinPython
- +
State상태Item항목
implemented구현Mapping manifest pythonx/compose/pythonx-map.toml: inside the package, ships in the wheel매핑 매니페스트 pythonx/compose/pythonx-map.toml: 패키지 안에 있으며 wheel 에 포함
implemented구현@Composable identity decorator@Composable 항등 데코레이터
implemented구현pythonx as a real on-disk package re-exporting androidx.compose.* by one rule: names, keywords, signatures, Dp allowlistandroidx.compose.* 를 규칙 하나로 재노출하는 실제 디스크 패키지 pythonx: 이름, 키워드, 시그니처, Dp 허용 목록
implemented구현Modifier chains with snake_case methods, overload dispatch, Dp as a numbersnake_case 메서드를 쓰는 Modifier 체인, 오버로드 디스패치, 숫자 Dp
implemented구현Column, Row, Spacer importable from material3 as well as layout (manifest [aliases])layout 뿐 아니라 material3 에서도 import 되는 Column, Row, Spacer (매니페스트 [aliases])
implemented구현Type stubs (.pyi) generated from real Compose 1.11.1 by the runtime's naming rule, with py.typed, checked with mypy (#12); many types are still Any런타임과 같은 이름 규칙으로 실제 Compose 1.11.1 에서 생성한 타입 스텁(.pyi)과 py.typed, mypy 로 검사(#12); 아직 많은 타입이 Any 입니다
implemented구현Snake-case names, keywords and signatures: modules and methods; a method's keywords need python-multiplatform's describe_member, and Kotlin's own spelling still works at run timesnake_case 이름·키워드·시그니처: 모듈과 메서드; 메서드 키워드에는 python-multiplatform 의 describe_member 가 필요하고, Kotlin 이름도 실행 시에는 그대로 통합니다
partial부분The empty Modifier: Modifier.padding(16) from the class needs an app-supplied factory against real Compose빈 Modifier: 클래스에서 시작하는 Modifier.padding(16) 은 실제 Compose 에서 앱이 제공하는 팩토리가 필요
implemented구현Alignment / Arrangement: Alignment.Center, Arrangement.End, Arrangement.spaced_by(8), and the grouped Alignment.Horizontal.End beside Alignment.EndAlignment / Arrangement: Alignment.Center, Arrangement.End, Arrangement.spaced_by(8), 그리고 Alignment.End 와 나란히 묶음 표기 Alignment.Horizontal.End
partial부분Material 3 widgets: re-exported by rule; render proofs per widget pending (#9)Material 3 위젯: 규칙으로 재노출됨; 위젯별 렌더 증거 대기(#9)
partial부분Distribution as pythonx-compose: the wheel carries the manifest, the re-export rule, the type stubs and py.typedpythonx-compose 배포: wheel 에 매니페스트, 재노출 규칙, 타입 스텁, py.typed 포함
partial부분A declared app root (@app) and Pythonic state (state), with no update call: binder path tested against a fake host shaped after python-multiplatform #38; real Compose is the E2E module (#11, #19)갱신 호출 없는 선언형 앱 루트(@app)와 파이썬다운 상태(state): 바인더 경로는 python-multiplatform #38 모양의 가짜 호스트로 테스트됨, 실제 Compose 는 E2E 모듈(#11, #19)
partial부분DefaultIcons is Icons.Default, written DefaultIcons.Add, tested against a fake host shaped after python-multiplatform #37/#38; the real draw is in python-multiplatform's render testDefaultIcons 는 Icons.Default 이며 DefaultIcons.Add 로 씁니다. python-multiplatform #37/#38 모양의 가짜 호스트로 테스트됨; 실제 그리기는 python-multiplatform 의 렌더 테스트에 있음
partial부분TextField(state=…) with TextFieldState from pythonx.compose.foundation.text.input: tested against a fake host shaped after python-multiplatform #73; the input-method (IME) composing proof is python-multiplatform E2E #26 (#10)pythonx.compose.foundation.text.input 의 TextFieldState 를 쓰는 TextField(state=…): python-multiplatform #73 모양의 가짜 호스트로 테스트됨; 입력기(IME) 조합 증거는 python-multiplatform E2E #26 (#10)
planned계획Colour schemes (36 colour parameters)색 스킴 (색 매개변수 36 개)
planned계획remember_saveable, coroutine scopesremember_saveable, 코루틴 스코프
implemented구현Mapping manifest pythonx/compose/pythonx-map.toml: inside the package, ships in the wheel매핑 매니페스트 pythonx/compose/pythonx-map.toml: 패키지 안에 있으며 wheel 에 포함
implemented구현@Composable identity decorator@Composable 항등 데코레이터
implemented구현pythonx as a real on-disk package re-exporting androidx.compose.* by one rule: names, keywords, signatures, Dp allowlistandroidx.compose.* 를 규칙 하나로 재노출하는 실제 디스크 패키지 pythonx: 이름, 키워드, 시그니처, Dp 허용 목록
implemented구현Modifier chains with snake_case methods, overload dispatch, Dp as a numbersnake_case 메서드를 쓰는 Modifier 체인, 오버로드 디스패치, 숫자 Dp
implemented구현Column, Row, Spacer importable from material3 as well as layout (manifest [aliases])layout 뿐 아니라 material3 에서도 import 되는 Column, Row, Spacer (매니페스트 [aliases])
implemented구현Type stubs (.pyi) generated from real Compose 1.11.1 by the runtime's naming rule, with py.typed, checked with mypy (#12); many types are still Any런타임과 같은 이름 규칙으로 실제 Compose 1.11.1 에서 생성한 타입 스텁(.pyi)과 py.typed, mypy 로 검사(#12); 아직 많은 타입이 Any 입니다
implemented구현Snake-case names, keywords and signatures: modules and methods; the names and keywords on a proxy are the binder's since python-multiplatform #131 (an older binder spells them in Kotlin), and Kotlin's own spelling still works at run timesnake_case 이름·키워드·시그니처: 모듈과 메서드; 프록시의 이름과 키워드는 python-multiplatform #131 부터 바인더가 제공하고(오래된 바인더는 Kotlin 이름으로 씁니다), Kotlin 이름도 실행 시에는 그대로 통합니다
partial부분The empty Modifier: Modifier.padding(16) from the class needs an app-supplied factory against real Compose빈 Modifier: 클래스에서 시작하는 Modifier.padding(16) 은 실제 Compose 에서 앱이 제공하는 팩토리가 필요
implemented구현Alignment / Arrangement: Alignment.Center, Arrangement.End, Arrangement.spaced_by(8), and the grouped Alignment.Horizontal.End beside Alignment.EndAlignment / Arrangement: Alignment.Center, Arrangement.End, Arrangement.spaced_by(8), 그리고 Alignment.End 와 나란히 묶음 표기 Alignment.Horizontal.End
partial부분Material 3 widgets: re-exported by rule; render proofs per widget pending (#9)Material 3 위젯: 규칙으로 재노출됨; 위젯별 렌더 증거 대기(#9)
partial부분Distribution as pythonx-compose: the wheel carries the manifest, the re-export rule, the type stubs and py.typedpythonx-compose 배포: wheel 에 매니페스트, 재노출 규칙, 타입 스텁, py.typed 포함
partial부분A declared app root (@app) and Pythonic state (state), with no update call: binder path tested against a fake host shaped after python-multiplatform #38; real Compose is the E2E module (#11, #19)갱신 호출 없는 선언형 앱 루트(@app)와 파이썬다운 상태(state): 바인더 경로는 python-multiplatform #38 모양의 가짜 호스트로 테스트됨, 실제 Compose 는 E2E 모듈(#11, #19)
partial부분DefaultIcons is Icons.Default, written DefaultIcons.Add, tested against a fake host shaped after python-multiplatform #37/#38; the real draw is in python-multiplatform's render testDefaultIcons 는 Icons.Default 이며 DefaultIcons.Add 로 씁니다. python-multiplatform #37/#38 모양의 가짜 호스트로 테스트됨; 실제 그리기는 python-multiplatform 의 렌더 테스트에 있음
partial부분TextField(state=…) with TextFieldState from pythonx.compose.foundation.text.input: tested against a fake host shaped after python-multiplatform #73; the input-method (IME) composing proof is python-multiplatform E2E #26 (#10)pythonx.compose.foundation.text.input 의 TextFieldState 를 쓰는 TextField(state=…): python-multiplatform #73 모양의 가짜 호스트로 테스트됨; 입력기(IME) 조합 증거는 python-multiplatform E2E #26 (#10)
planned계획Colour schemes (36 colour parameters)색 스킴 (색 매개변수 36 개)
planned계획remember_saveable, coroutine scopesremember_saveable, 코루틴 스코프

Test baseline: 140 passed, 112 skipped without a python-multiplatform checkout; 251 passed, 1 skipped with a current one. The one skip with a current checkout reads the maintainer's UI.ipynb.

테스트 기준선: python-multiplatform 체크아웃이 없으면 132 passed, 99 skipped, 최신 체크아웃이면 251 passed, 1 skipped. 최신 체크아웃에서 건너뛰는 1 개는 메인테이너의 UI.ipynb 를 읽는 테스트입니다.

diff --git a/docs/locale/README_ko.md b/docs/locale/README_ko.md index b79c9d8..b4f1c9c 100644 --- a/docs/locale/README_ko.md +++ b/docs/locale/README_ko.md @@ -53,7 +53,9 @@ def Greeting(): 수도 있습니다: `Alignment.Horizontal.End` 는 `Alignment.End` 입니다. - **`@Composable` 은 그대로.** 화면은 데코레이터가 붙은 파이썬 함수입니다. - **실제 패키지.** `pythonx/` 는 `androidx.compose.*` 를 import 해 재구성하는 평범한 파이썬 - 소스입니다. 바인더는 아무 이름도 바꾸지 않습니다. 이름을 바꾸는 것은 이 패키지의 일입니다. + 소스입니다. 바인더는 네임스페이스 이름을 바꾸지 않습니다. python-multiplatform #131 부터는 + `snake_case` 이름과 키워드를 이 패키지의 규칙대로 바인더가 직접 제공하며, 이 패키지는 모듈 묶음과 + `snake_case` 만 나열하는 표면을 맡습니다. - **하나의 매니페스트.** [`pythonx-map.toml`](https://github.com/thisisthepy/pythonx-compose/blob/main/pythonx/compose/pythonx-map.toml) 이 어떤 `pythonx.compose.*` 모듈이 어떤 Kotlin 패키지에 대응하는지 적습니다. 이 파일은 패키지 안에 있으며 wheel 에 함께 담깁니다. 런타임과 `.pyi` 생성기가 같은 파일을 읽으므로, 편집기가 자동완성하는 이름과 인터프리터가 diff --git a/pythonx/compose/__init__.pyi b/pythonx/compose/__init__.pyi index 94ee536..311d35c 100644 --- a/pythonx/compose/__init__.pyi +++ b/pythonx/compose/__init__.pyi @@ -1 +1 @@ -# GENERATED by scripts/gen_stubs.py from python-multiplatform's Kotlin-named stubs (artifact kotlin-stubs, workflow run 37103737430, commit a5028618, Compose 1.11.1). Do not edit. +# GENERATED by scripts/gen_stubs.py from python-multiplatform's Kotlin-named stubs (artifact kotlin-stubs, workflow run 37131041879, commit 452cc807, Compose 1.11.1). Do not edit. diff --git a/pythonx/compose/foundation/__init__.pyi b/pythonx/compose/foundation/__init__.pyi index 9ca1498..6783b3a 100644 --- a/pythonx/compose/foundation/__init__.pyi +++ b/pythonx/compose/foundation/__init__.pyi @@ -1,4 +1,4 @@ -# GENERATED by scripts/gen_stubs.py from python-multiplatform's Kotlin-named stubs (artifact kotlin-stubs, workflow run 37103737430, commit a5028618, Compose 1.11.1). Do not edit. +# GENERATED by scripts/gen_stubs.py from python-multiplatform's Kotlin-named stubs (artifact kotlin-stubs, workflow run 37131041879, commit 452cc807, Compose 1.11.1). Do not edit. import typing as _t class BorderStroke: diff --git a/pythonx/compose/foundation/layout/__init__.pyi b/pythonx/compose/foundation/layout/__init__.pyi index 092e758..422a5db 100644 --- a/pythonx/compose/foundation/layout/__init__.pyi +++ b/pythonx/compose/foundation/layout/__init__.pyi @@ -1,2 +1,2 @@ -# GENERATED by scripts/gen_stubs.py from python-multiplatform's Kotlin-named stubs (artifact kotlin-stubs, workflow run 37103737430, commit a5028618, Compose 1.11.1). Do not edit. +# GENERATED by scripts/gen_stubs.py from python-multiplatform's Kotlin-named stubs (artifact kotlin-stubs, workflow run 37131041879, commit 452cc807, Compose 1.11.1). Do not edit. from pythonx.compose.layout import * diff --git a/pythonx/compose/foundation/text/input/__init__.pyi b/pythonx/compose/foundation/text/input/__init__.pyi index 65a70ed..95889de 100644 --- a/pythonx/compose/foundation/text/input/__init__.pyi +++ b/pythonx/compose/foundation/text/input/__init__.pyi @@ -1,4 +1,4 @@ -# GENERATED by scripts/gen_stubs.py from python-multiplatform's Kotlin-named stubs (artifact kotlin-stubs, workflow run 37103737430, commit a5028618, Compose 1.11.1). Do not edit. +# GENERATED by scripts/gen_stubs.py from python-multiplatform's Kotlin-named stubs (artifact kotlin-stubs, workflow run 37131041879, commit 452cc807, Compose 1.11.1). Do not edit. import typing as _t class _TextFieldState_clearText(_t.Protocol): @@ -30,7 +30,7 @@ class TextFieldLineLimits: class TextFieldState: """Kotlin: androidx.compose.foundation.text.input.TextFieldState""" - def __init__(self, initialText: str = ..., initialSelection: _t.Any = ...) -> None: + def __init__(self, initial_text: str = ..., initial_selection: _t.Any = ...) -> None: """Kotlin constructor: androidx.compose.foundation.text.input.TextFieldState (androidx.compose.foundation.text.input.TextFieldState(initialText: kotlin.String, initialSelection: androidx.compose.ui.text.TextRange): androidx.compose.foundation.text.input.TextFieldState)""" ... clear_text: _t.ClassVar[_TextFieldState_clearText] diff --git a/pythonx/compose/layout/__init__.pyi b/pythonx/compose/layout/__init__.pyi index b3484c5..f2c5126 100644 --- a/pythonx/compose/layout/__init__.pyi +++ b/pythonx/compose/layout/__init__.pyi @@ -1,9 +1,19 @@ -# GENERATED by scripts/gen_stubs.py from python-multiplatform's Kotlin-named stubs (artifact kotlin-stubs, workflow run 37103737430, commit a5028618, Compose 1.11.1). Do not edit. +# GENERATED by scripts/gen_stubs.py from python-multiplatform's Kotlin-named stubs (artifact kotlin-stubs, workflow run 37131041879, commit 452cc807, Compose 1.11.1). Do not edit. import typing as _t import pythonx.compose.material3 import pythonx.compose.ui import pythonx.compose.ui.unit +class _PaddingValues_callable_module(_t.Protocol): + """Kotlin: the function PaddingValues, and the members of the module PaddingValues""" + @_t.overload + def __call__(self, all: float) -> _t.Any: ... + @_t.overload + def __call__(self, horizontal: float = ..., vertical: float = ...) -> _t.Any: ... # type: ignore[overload-cannot-match] + @_t.overload + def __call__(self, start: float = ..., top: float = ..., end: float = ..., bottom: float = ...) -> _t.Any: ... # type: ignore[overload-cannot-match] + Zero: _t.Any + class _RowScope_NavigationBarItem(_t.Protocol): def __call__(self, selected: bool, on_click: _t.Callable[[], None], icon: _t.Callable[[], None], modifier: pythonx.compose.ui.Modifier = ..., enabled: bool = ..., label: _t.Callable[[], None] | None = ..., always_show_label: bool = ..., colors: pythonx.compose.material3.NavigationBarItemColors = ..., interaction_source: _t.Any | None = ...) -> None: ... @@ -154,7 +164,7 @@ class IntrinsicSize: class MutableWindowInsets: """Kotlin: androidx.compose.foundation.layout.MutableWindowInsets""" - def __init__(self, initialInsets: _t.Any = ...) -> None: + def __init__(self, initial_insets: _t.Any = ...) -> None: """Kotlin constructor: androidx.compose.foundation.layout.MutableWindowInsets (androidx.compose.foundation.layout.MutableWindowInsets(initialInsets: androidx.compose.foundation.layout.WindowInsets): androidx.compose.foundation.layout.MutableWindowInsets)""" ... @property @@ -554,6 +564,8 @@ def wrap_content_width(receiver: pythonx.compose.ui.Modifier, /, align: pythonx. """Kotlin: androidx.compose.ui.Modifier.wrapContentWidth(align: androidx.compose.ui.Alignment.Horizontal, unbounded: kotlin.Boolean): androidx.compose.ui.Modifier""" ... +PaddingValues: _PaddingValues_callable_module + @_t.overload def Box(modifier: pythonx.compose.ui.Modifier) -> None: ... @_t.overload @@ -569,13 +581,6 @@ def FlowRow(modifier: pythonx.compose.ui.Modifier = ..., horizontal_arrangement: @_t.overload def FlowRow(modifier: pythonx.compose.ui.Modifier = ..., horizontal_arrangement: Arrangement.Horizontal = ..., vertical_arrangement: Arrangement.Vertical = ..., item_vertical_alignment: pythonx.compose.ui.Alignment.Vertical = ..., max_items_in_each_row: int = ..., max_lines: int = ..., *, content: _t.Callable[[FlowRowScope], None]) -> None: ... # type: ignore[overload-cannot-match] -@_t.overload -def PaddingValues(all: float) -> _t.Any: ... -@_t.overload -def PaddingValues(horizontal: float = ..., vertical: float = ...) -> _t.Any: ... # type: ignore[overload-cannot-match] -@_t.overload -def PaddingValues(start: float = ..., top: float = ..., end: float = ..., bottom: float = ...) -> _t.Any: ... # type: ignore[overload-cannot-match] - @_t.overload def WindowInsets() -> _t.Any: ... @_t.overload diff --git a/pythonx/compose/material/__init__.pyi b/pythonx/compose/material/__init__.pyi index 94ee536..311d35c 100644 --- a/pythonx/compose/material/__init__.pyi +++ b/pythonx/compose/material/__init__.pyi @@ -1 +1 @@ -# GENERATED by scripts/gen_stubs.py from python-multiplatform's Kotlin-named stubs (artifact kotlin-stubs, workflow run 37103737430, commit a5028618, Compose 1.11.1). Do not edit. +# GENERATED by scripts/gen_stubs.py from python-multiplatform's Kotlin-named stubs (artifact kotlin-stubs, workflow run 37131041879, commit 452cc807, Compose 1.11.1). Do not edit. diff --git a/pythonx/compose/material/icons/__init__.pyi b/pythonx/compose/material/icons/__init__.pyi index 190f8b4..8a983a3 100644 --- a/pythonx/compose/material/icons/__init__.pyi +++ b/pythonx/compose/material/icons/__init__.pyi @@ -1,4 +1,4 @@ -# GENERATED by scripts/gen_stubs.py from python-multiplatform's Kotlin-named stubs (artifact kotlin-stubs, workflow run 37103737430, commit a5028618, Compose 1.11.1). Do not edit. +# GENERATED by scripts/gen_stubs.py from python-multiplatform's Kotlin-named stubs (artifact kotlin-stubs, workflow run 37131041879, commit 452cc807, Compose 1.11.1). Do not edit. import typing as _t import pythonx.compose.ui.graphics.vector diff --git a/pythonx/compose/material3/__init__.pyi b/pythonx/compose/material3/__init__.pyi index d31f2b1..eb1635d 100644 --- a/pythonx/compose/material3/__init__.pyi +++ b/pythonx/compose/material3/__init__.pyi @@ -1,4 +1,4 @@ -# GENERATED by scripts/gen_stubs.py from python-multiplatform's Kotlin-named stubs (artifact kotlin-stubs, workflow run 37103737430, commit a5028618, Compose 1.11.1). Do not edit. +# GENERATED by scripts/gen_stubs.py from python-multiplatform's Kotlin-named stubs (artifact kotlin-stubs, workflow run 37131041879, commit 452cc807, Compose 1.11.1). Do not edit. import typing as _t import pythonx.compose.foundation import pythonx.compose.foundation.text.input @@ -14,6 +14,11 @@ import pythonx.compose.material.icons as _alias_0 DefaultIcons = _alias_0.Icons.Default +class _BottomAppBarState_callable_module(_t.Protocol): + """Kotlin: the function BottomAppBarState, and the members of the module BottomAppBarState""" + def __call__(self, initial_height_offset_limit: float, initial_height_offset: float, initial_content_offset: float) -> _t.Any: ... + Saver: _t.Any + class _ColorScheme_contentColorFor(_t.Protocol): def __call__(self, background_color: _t.Any) -> _t.Any: ... @@ -74,7 +79,7 @@ class BottomAppBarScrollBehavior: class BottomSheetScaffoldState: """Kotlin: androidx.compose.material3.BottomSheetScaffoldState""" - def __init__(self, bottomSheetState: SheetState, snackbarHostState: SnackbarHostState) -> None: + def __init__(self, bottom_sheet_state: SheetState, snackbar_host_state: SnackbarHostState) -> None: """Kotlin constructor: androidx.compose.material3.BottomSheetScaffoldState (androidx.compose.material3.BottomSheetScaffoldState(bottomSheetState: androidx.compose.material3.SheetState, snackbarHostState: androidx.compose.material3.SnackbarHostState): androidx.compose.material3.BottomSheetScaffoldState)""" ... @property @@ -88,7 +93,7 @@ class BottomSheetScaffoldState: class ButtonColors: """Kotlin: androidx.compose.material3.ButtonColors""" - def __init__(self, containerColor: _t.Any, contentColor: _t.Any, disabledContainerColor: _t.Any, disabledContentColor: _t.Any) -> None: + def __init__(self, container_color: _t.Any, content_color: _t.Any, disabled_container_color: _t.Any, disabled_content_color: _t.Any) -> None: """Kotlin constructor: androidx.compose.material3.ButtonColors (androidx.compose.material3.ButtonColors(containerColor: androidx.compose.ui.graphics.Color, contentColor: androidx.compose.ui.graphics.Color, disabledContainerColor: androidx.compose.ui.graphics.Color, disabledContentColor: androidx.compose.ui.graphics.Color): androidx.compose.material3.ButtonColors)""" ... @property @@ -113,7 +118,7 @@ class ButtonElevation: class CardColors: """Kotlin: androidx.compose.material3.CardColors""" - def __init__(self, containerColor: _t.Any, contentColor: _t.Any, disabledContainerColor: _t.Any, disabledContentColor: _t.Any) -> None: + def __init__(self, container_color: _t.Any, content_color: _t.Any, disabled_container_color: _t.Any, disabled_content_color: _t.Any) -> None: """Kotlin constructor: androidx.compose.material3.CardColors (androidx.compose.material3.CardColors(containerColor: androidx.compose.ui.graphics.Color, contentColor: androidx.compose.ui.graphics.Color, disabledContainerColor: androidx.compose.ui.graphics.Color, disabledContentColor: androidx.compose.ui.graphics.Color): androidx.compose.material3.CardColors)""" ... @property @@ -138,7 +143,7 @@ class CardElevation: class CheckboxColors: """Kotlin: androidx.compose.material3.CheckboxColors""" - def __init__(self, checkedCheckmarkColor: _t.Any, uncheckedCheckmarkColor: _t.Any, checkedBoxColor: _t.Any, uncheckedBoxColor: _t.Any, disabledCheckedBoxColor: _t.Any, disabledUncheckedBoxColor: _t.Any, disabledIndeterminateBoxColor: _t.Any, checkedBorderColor: _t.Any, uncheckedBorderColor: _t.Any, disabledBorderColor: _t.Any, disabledUncheckedBorderColor: _t.Any, disabledIndeterminateBorderColor: _t.Any) -> None: + def __init__(self, checked_checkmark_color: _t.Any, unchecked_checkmark_color: _t.Any, checked_box_color: _t.Any, unchecked_box_color: _t.Any, disabled_checked_box_color: _t.Any, disabled_unchecked_box_color: _t.Any, disabled_indeterminate_box_color: _t.Any, checked_border_color: _t.Any, unchecked_border_color: _t.Any, disabled_border_color: _t.Any, disabled_unchecked_border_color: _t.Any, disabled_indeterminate_border_color: _t.Any) -> None: """Kotlin constructor: androidx.compose.material3.CheckboxColors (androidx.compose.material3.CheckboxColors(checkedCheckmarkColor: androidx.compose.ui.graphics.Color, uncheckedCheckmarkColor: androidx.compose.ui.graphics.Color, checkedBoxColor: androidx.compose.ui.graphics.Color, uncheckedBoxColor: androidx.compose.ui.graphics.Color, disabledCheckedBoxColor: androidx.compose.ui.graphics.Color, disabledUncheckedBoxColor: androidx.compose.ui.graphics.Color, disabledIndeterminateBoxColor: androidx.compose.ui.graphics.Color, checkedBorderColor: androidx.compose.ui.graphics.Color, uncheckedBorderColor: androidx.compose.ui.graphics.Color, disabledBorderColor: androidx.compose.ui.graphics.Color, disabledUncheckedBorderColor: androidx.compose.ui.graphics.Color, disabledIndeterminateBorderColor: androidx.compose.ui.graphics.Color): androidx.compose.material3.CheckboxColors)""" ... @property @@ -192,7 +197,7 @@ class CheckboxColors: class ChipColors: """Kotlin: androidx.compose.material3.ChipColors""" - def __init__(self, containerColor: _t.Any, labelColor: _t.Any, leadingIconContentColor: _t.Any, trailingIconContentColor: _t.Any, disabledContainerColor: _t.Any, disabledLabelColor: _t.Any, disabledLeadingIconContentColor: _t.Any, disabledTrailingIconContentColor: _t.Any) -> None: + def __init__(self, container_color: _t.Any, label_color: _t.Any, leading_icon_content_color: _t.Any, trailing_icon_content_color: _t.Any, disabled_container_color: _t.Any, disabled_label_color: _t.Any, disabled_leading_icon_content_color: _t.Any, disabled_trailing_icon_content_color: _t.Any) -> None: """Kotlin constructor: androidx.compose.material3.ChipColors (androidx.compose.material3.ChipColors(containerColor: androidx.compose.ui.graphics.Color, labelColor: androidx.compose.ui.graphics.Color, leadingIconContentColor: androidx.compose.ui.graphics.Color, trailingIconContentColor: androidx.compose.ui.graphics.Color, disabledContainerColor: androidx.compose.ui.graphics.Color, disabledLabelColor: androidx.compose.ui.graphics.Color, disabledLeadingIconContentColor: androidx.compose.ui.graphics.Color, disabledTrailingIconContentColor: androidx.compose.ui.graphics.Color): androidx.compose.material3.ChipColors)""" ... @property @@ -230,7 +235,7 @@ class ChipColors: class ChipElevation: """Kotlin: androidx.compose.material3.ChipElevation""" - def __init__(self, elevation: float, pressedElevation: float, focusedElevation: float, hoveredElevation: float, draggedElevation: float, disabledElevation: float) -> None: + def __init__(self, elevation: float, pressed_elevation: float, focused_elevation: float, hovered_elevation: float, dragged_elevation: float, disabled_elevation: float) -> None: """Kotlin constructor: androidx.compose.material3.ChipElevation (androidx.compose.material3.ChipElevation(elevation: androidx.compose.ui.unit.Dp, pressedElevation: androidx.compose.ui.unit.Dp, focusedElevation: androidx.compose.ui.unit.Dp, hoveredElevation: androidx.compose.ui.unit.Dp, draggedElevation: androidx.compose.ui.unit.Dp, disabledElevation: androidx.compose.ui.unit.Dp): androidx.compose.material3.ChipElevation)""" ... @property @@ -261,11 +266,11 @@ class ChipElevation: class ColorScheme: """Kotlin: androidx.compose.material3.ColorScheme""" @_t.overload - def __init__(self, primary: _t.Any, onPrimary: _t.Any, primaryContainer: _t.Any, onPrimaryContainer: _t.Any, inversePrimary: _t.Any, secondary: _t.Any, onSecondary: _t.Any, secondaryContainer: _t.Any, onSecondaryContainer: _t.Any, tertiary: _t.Any, onTertiary: _t.Any, tertiaryContainer: _t.Any, onTertiaryContainer: _t.Any, background: _t.Any, onBackground: _t.Any, surface: _t.Any, onSurface: _t.Any, surfaceVariant: _t.Any, onSurfaceVariant: _t.Any, surfaceTint: _t.Any, inverseSurface: _t.Any, inverseOnSurface: _t.Any, error: _t.Any, onError: _t.Any, errorContainer: _t.Any, onErrorContainer: _t.Any, outline: _t.Any, outlineVariant: _t.Any, scrim: _t.Any) -> None: ... + def __init__(self, primary: _t.Any, on_primary: _t.Any, primary_container: _t.Any, on_primary_container: _t.Any, inverse_primary: _t.Any, secondary: _t.Any, on_secondary: _t.Any, secondary_container: _t.Any, on_secondary_container: _t.Any, tertiary: _t.Any, on_tertiary: _t.Any, tertiary_container: _t.Any, on_tertiary_container: _t.Any, background: _t.Any, on_background: _t.Any, surface: _t.Any, on_surface: _t.Any, surface_variant: _t.Any, on_surface_variant: _t.Any, surface_tint: _t.Any, inverse_surface: _t.Any, inverse_on_surface: _t.Any, error: _t.Any, on_error: _t.Any, error_container: _t.Any, on_error_container: _t.Any, outline: _t.Any, outline_variant: _t.Any, scrim: _t.Any) -> None: ... @_t.overload - def __init__(self, primary: _t.Any, onPrimary: _t.Any, primaryContainer: _t.Any, onPrimaryContainer: _t.Any, inversePrimary: _t.Any, secondary: _t.Any, onSecondary: _t.Any, secondaryContainer: _t.Any, onSecondaryContainer: _t.Any, tertiary: _t.Any, onTertiary: _t.Any, tertiaryContainer: _t.Any, onTertiaryContainer: _t.Any, background: _t.Any, onBackground: _t.Any, surface: _t.Any, onSurface: _t.Any, surfaceVariant: _t.Any, onSurfaceVariant: _t.Any, surfaceTint: _t.Any, inverseSurface: _t.Any, inverseOnSurface: _t.Any, error: _t.Any, onError: _t.Any, errorContainer: _t.Any, onErrorContainer: _t.Any, outline: _t.Any, outlineVariant: _t.Any, scrim: _t.Any, surfaceBright: _t.Any, surfaceDim: _t.Any, surfaceContainer: _t.Any, surfaceContainerHigh: _t.Any, surfaceContainerHighest: _t.Any, surfaceContainerLow: _t.Any, surfaceContainerLowest: _t.Any) -> None: ... # type: ignore[overload-cannot-match] + def __init__(self, primary: _t.Any, on_primary: _t.Any, primary_container: _t.Any, on_primary_container: _t.Any, inverse_primary: _t.Any, secondary: _t.Any, on_secondary: _t.Any, secondary_container: _t.Any, on_secondary_container: _t.Any, tertiary: _t.Any, on_tertiary: _t.Any, tertiary_container: _t.Any, on_tertiary_container: _t.Any, background: _t.Any, on_background: _t.Any, surface: _t.Any, on_surface: _t.Any, surface_variant: _t.Any, on_surface_variant: _t.Any, surface_tint: _t.Any, inverse_surface: _t.Any, inverse_on_surface: _t.Any, error: _t.Any, on_error: _t.Any, error_container: _t.Any, on_error_container: _t.Any, outline: _t.Any, outline_variant: _t.Any, scrim: _t.Any, surface_bright: _t.Any, surface_dim: _t.Any, surface_container: _t.Any, surface_container_high: _t.Any, surface_container_highest: _t.Any, surface_container_low: _t.Any, surface_container_lowest: _t.Any) -> None: ... # type: ignore[overload-cannot-match] @_t.overload - def __init__(self, primary: _t.Any, onPrimary: _t.Any, primaryContainer: _t.Any, onPrimaryContainer: _t.Any, inversePrimary: _t.Any, secondary: _t.Any, onSecondary: _t.Any, secondaryContainer: _t.Any, onSecondaryContainer: _t.Any, tertiary: _t.Any, onTertiary: _t.Any, tertiaryContainer: _t.Any, onTertiaryContainer: _t.Any, background: _t.Any, onBackground: _t.Any, surface: _t.Any, onSurface: _t.Any, surfaceVariant: _t.Any, onSurfaceVariant: _t.Any, surfaceTint: _t.Any, inverseSurface: _t.Any, inverseOnSurface: _t.Any, error: _t.Any, onError: _t.Any, errorContainer: _t.Any, onErrorContainer: _t.Any, outline: _t.Any, outlineVariant: _t.Any, scrim: _t.Any, surfaceBright: _t.Any, surfaceDim: _t.Any, surfaceContainer: _t.Any, surfaceContainerHigh: _t.Any, surfaceContainerHighest: _t.Any, surfaceContainerLow: _t.Any, surfaceContainerLowest: _t.Any, primaryFixed: _t.Any, primaryFixedDim: _t.Any, onPrimaryFixed: _t.Any, onPrimaryFixedVariant: _t.Any, secondaryFixed: _t.Any, secondaryFixedDim: _t.Any, onSecondaryFixed: _t.Any, onSecondaryFixedVariant: _t.Any, tertiaryFixed: _t.Any, tertiaryFixedDim: _t.Any, onTertiaryFixed: _t.Any, onTertiaryFixedVariant: _t.Any) -> None: ... # type: ignore[overload-cannot-match] + def __init__(self, primary: _t.Any, on_primary: _t.Any, primary_container: _t.Any, on_primary_container: _t.Any, inverse_primary: _t.Any, secondary: _t.Any, on_secondary: _t.Any, secondary_container: _t.Any, on_secondary_container: _t.Any, tertiary: _t.Any, on_tertiary: _t.Any, tertiary_container: _t.Any, on_tertiary_container: _t.Any, background: _t.Any, on_background: _t.Any, surface: _t.Any, on_surface: _t.Any, surface_variant: _t.Any, on_surface_variant: _t.Any, surface_tint: _t.Any, inverse_surface: _t.Any, inverse_on_surface: _t.Any, error: _t.Any, on_error: _t.Any, error_container: _t.Any, on_error_container: _t.Any, outline: _t.Any, outline_variant: _t.Any, scrim: _t.Any, surface_bright: _t.Any, surface_dim: _t.Any, surface_container: _t.Any, surface_container_high: _t.Any, surface_container_highest: _t.Any, surface_container_low: _t.Any, surface_container_lowest: _t.Any, primary_fixed: _t.Any, primary_fixed_dim: _t.Any, on_primary_fixed: _t.Any, on_primary_fixed_variant: _t.Any, secondary_fixed: _t.Any, secondary_fixed_dim: _t.Any, on_secondary_fixed: _t.Any, on_secondary_fixed_variant: _t.Any, tertiary_fixed: _t.Any, tertiary_fixed_dim: _t.Any, on_tertiary_fixed: _t.Any, on_tertiary_fixed_variant: _t.Any) -> None: ... # type: ignore[overload-cannot-match] content_color_for: _t.ClassVar[_ColorScheme_contentColorFor] content_color_for__ColorScheme_Color: _t.ClassVar[_ColorScheme_contentColorFor__ColorScheme_Color] surface_color_at_elevation: _t.ClassVar[_ColorScheme_surfaceColorAtElevation] @@ -464,7 +469,7 @@ class ColorScheme: class DatePickerColors: """Kotlin: androidx.compose.material3.DatePickerColors""" - def __init__(self, containerColor: _t.Any, titleContentColor: _t.Any, headlineContentColor: _t.Any, weekdayContentColor: _t.Any, subheadContentColor: _t.Any, navigationContentColor: _t.Any, yearContentColor: _t.Any, disabledYearContentColor: _t.Any, currentYearContentColor: _t.Any, selectedYearContentColor: _t.Any, disabledSelectedYearContentColor: _t.Any, selectedYearContainerColor: _t.Any, disabledSelectedYearContainerColor: _t.Any, dayContentColor: _t.Any, disabledDayContentColor: _t.Any, selectedDayContentColor: _t.Any, disabledSelectedDayContentColor: _t.Any, selectedDayContainerColor: _t.Any, disabledSelectedDayContainerColor: _t.Any, todayContentColor: _t.Any, todayDateBorderColor: _t.Any, dayInSelectionRangeContainerColor: _t.Any, dayInSelectionRangeContentColor: _t.Any, dividerColor: _t.Any, dateTextFieldColors: TextFieldColors) -> None: + def __init__(self, container_color: _t.Any, title_content_color: _t.Any, headline_content_color: _t.Any, weekday_content_color: _t.Any, subhead_content_color: _t.Any, navigation_content_color: _t.Any, year_content_color: _t.Any, disabled_year_content_color: _t.Any, current_year_content_color: _t.Any, selected_year_content_color: _t.Any, disabled_selected_year_content_color: _t.Any, selected_year_container_color: _t.Any, disabled_selected_year_container_color: _t.Any, day_content_color: _t.Any, disabled_day_content_color: _t.Any, selected_day_content_color: _t.Any, disabled_selected_day_content_color: _t.Any, selected_day_container_color: _t.Any, disabled_selected_day_container_color: _t.Any, today_content_color: _t.Any, today_date_border_color: _t.Any, day_in_selection_range_container_color: _t.Any, day_in_selection_range_content_color: _t.Any, divider_color: _t.Any, date_text_field_colors: TextFieldColors) -> None: """Kotlin constructor: androidx.compose.material3.DatePickerColors (androidx.compose.material3.DatePickerColors(containerColor: androidx.compose.ui.graphics.Color, titleContentColor: androidx.compose.ui.graphics.Color, headlineContentColor: androidx.compose.ui.graphics.Color, weekdayContentColor: androidx.compose.ui.graphics.Color, subheadContentColor: androidx.compose.ui.graphics.Color, navigationContentColor: androidx.compose.ui.graphics.Color, yearContentColor: androidx.compose.ui.graphics.Color, disabledYearContentColor: androidx.compose.ui.graphics.Color, currentYearContentColor: androidx.compose.ui.graphics.Color, selectedYearContentColor: androidx.compose.ui.graphics.Color, disabledSelectedYearContentColor: androidx.compose.ui.graphics.Color, selectedYearContainerColor: androidx.compose.ui.graphics.Color, disabledSelectedYearContainerColor: androidx.compose.ui.graphics.Color, dayContentColor: androidx.compose.ui.graphics.Color, disabledDayContentColor: androidx.compose.ui.graphics.Color, selectedDayContentColor: androidx.compose.ui.graphics.Color, disabledSelectedDayContentColor: androidx.compose.ui.graphics.Color, selectedDayContainerColor: androidx.compose.ui.graphics.Color, disabledSelectedDayContainerColor: androidx.compose.ui.graphics.Color, todayContentColor: androidx.compose.ui.graphics.Color, todayDateBorderColor: androidx.compose.ui.graphics.Color, dayInSelectionRangeContainerColor: androidx.compose.ui.graphics.Color, dayInSelectionRangeContentColor: androidx.compose.ui.graphics.Color, dividerColor: androidx.compose.ui.graphics.Color, dateTextFieldColors: androidx.compose.material3.TextFieldColors): androidx.compose.material3.DatePickerColors)""" ... @property @@ -627,7 +632,7 @@ class DateRangePickerState: class DefaultTooltipCaretShape(pythonx.compose.ui.graphics.Shape): """Kotlin: androidx.compose.material3.DefaultTooltipCaretShape""" - def __init__(self, caretSize: _t.Any = ...) -> None: + def __init__(self, caret_size: _t.Any = ...) -> None: """Kotlin constructor: androidx.compose.material3.DefaultTooltipCaretShape (androidx.compose.material3.DefaultTooltipCaretShape(caretSize: androidx.compose.ui.unit.DpSize): androidx.compose.material3.DefaultTooltipCaretShape)""" ... @property @@ -637,7 +642,7 @@ class DefaultTooltipCaretShape(pythonx.compose.ui.graphics.Shape): class DragHandleColors: """Kotlin: androidx.compose.material3.DragHandleColors""" - def __init__(self, color: _t.Any, pressedColor: _t.Any, draggedColor: _t.Any) -> None: + def __init__(self, color: _t.Any, pressed_color: _t.Any, dragged_color: _t.Any) -> None: """Kotlin constructor: androidx.compose.material3.DragHandleColors (androidx.compose.material3.DragHandleColors(color: androidx.compose.ui.graphics.Color, pressedColor: androidx.compose.ui.graphics.Color, draggedColor: androidx.compose.ui.graphics.Color): androidx.compose.material3.DragHandleColors)""" ... @property @@ -655,7 +660,7 @@ class DragHandleColors: class DragHandleShapes: """Kotlin: androidx.compose.material3.DragHandleShapes""" - def __init__(self, shape: pythonx.compose.ui.graphics.Shape, pressedShape: pythonx.compose.ui.graphics.Shape, draggedShape: pythonx.compose.ui.graphics.Shape) -> None: + def __init__(self, shape: pythonx.compose.ui.graphics.Shape, pressed_shape: pythonx.compose.ui.graphics.Shape, dragged_shape: pythonx.compose.ui.graphics.Shape) -> None: """Kotlin constructor: androidx.compose.material3.DragHandleShapes (androidx.compose.material3.DragHandleShapes(shape: androidx.compose.ui.graphics.Shape, pressedShape: androidx.compose.ui.graphics.Shape, draggedShape: androidx.compose.ui.graphics.Shape): androidx.compose.material3.DragHandleShapes)""" ... @property @@ -673,7 +678,7 @@ class DragHandleShapes: class DragHandleSizes: """Kotlin: androidx.compose.material3.DragHandleSizes""" - def __init__(self, size: _t.Any, pressedSize: _t.Any, draggedSize: _t.Any) -> None: + def __init__(self, size: _t.Any, pressed_size: _t.Any, dragged_size: _t.Any) -> None: """Kotlin constructor: androidx.compose.material3.DragHandleSizes (androidx.compose.material3.DragHandleSizes(size: androidx.compose.ui.unit.DpSize, pressedSize: androidx.compose.ui.unit.DpSize, draggedSize: androidx.compose.ui.unit.DpSize): androidx.compose.material3.DragHandleSizes)""" ... @property @@ -691,7 +696,7 @@ class DragHandleSizes: class DrawerState: """Kotlin: androidx.compose.material3.DrawerState""" - def __init__(self, initialValue: DrawerValue, confirmStateChange: _t.Callable[[DrawerValue], bool] = ...) -> None: + def __init__(self, initial_value: DrawerValue, confirm_state_change: _t.Callable[[DrawerValue], bool] = ...) -> None: """Kotlin constructor: androidx.compose.material3.DrawerState (androidx.compose.material3.DrawerState(initialValue: androidx.compose.material3.DrawerValue, confirmStateChange: kotlin.Function1): androidx.compose.material3.DrawerState)""" ... @property @@ -730,7 +735,7 @@ class FloatingActionButtonElevation: class IconButtonColors: """Kotlin: androidx.compose.material3.IconButtonColors""" - def __init__(self, containerColor: _t.Any, contentColor: _t.Any, disabledContainerColor: _t.Any, disabledContentColor: _t.Any) -> None: + def __init__(self, container_color: _t.Any, content_color: _t.Any, disabled_container_color: _t.Any, disabled_content_color: _t.Any) -> None: """Kotlin constructor: androidx.compose.material3.IconButtonColors (androidx.compose.material3.IconButtonColors(containerColor: androidx.compose.ui.graphics.Color, contentColor: androidx.compose.ui.graphics.Color, disabledContainerColor: androidx.compose.ui.graphics.Color, disabledContentColor: androidx.compose.ui.graphics.Color): androidx.compose.material3.IconButtonColors)""" ... @property @@ -752,7 +757,7 @@ class IconButtonColors: class IconToggleButtonColors: """Kotlin: androidx.compose.material3.IconToggleButtonColors""" - def __init__(self, containerColor: _t.Any, contentColor: _t.Any, disabledContainerColor: _t.Any, disabledContentColor: _t.Any, checkedContainerColor: _t.Any, checkedContentColor: _t.Any) -> None: + def __init__(self, container_color: _t.Any, content_color: _t.Any, disabled_container_color: _t.Any, disabled_content_color: _t.Any, checked_container_color: _t.Any, checked_content_color: _t.Any) -> None: """Kotlin constructor: androidx.compose.material3.IconToggleButtonColors (androidx.compose.material3.IconToggleButtonColors(containerColor: androidx.compose.ui.graphics.Color, contentColor: androidx.compose.ui.graphics.Color, disabledContainerColor: androidx.compose.ui.graphics.Color, disabledContentColor: androidx.compose.ui.graphics.Color, checkedContainerColor: androidx.compose.ui.graphics.Color, checkedContentColor: androidx.compose.ui.graphics.Color): androidx.compose.material3.IconToggleButtonColors)""" ... @property @@ -782,7 +787,7 @@ class IconToggleButtonColors: class ListItemColors: """Kotlin: androidx.compose.material3.ListItemColors""" - def __init__(self, containerColor: _t.Any, headlineColor: _t.Any, leadingIconColor: _t.Any, overlineColor: _t.Any, supportingTextColor: _t.Any, trailingIconColor: _t.Any, disabledHeadlineColor: _t.Any, disabledLeadingIconColor: _t.Any, disabledTrailingIconColor: _t.Any) -> None: + def __init__(self, container_color: _t.Any, headline_color: _t.Any, leading_icon_color: _t.Any, overline_color: _t.Any, supporting_text_color: _t.Any, trailing_icon_color: _t.Any, disabled_headline_color: _t.Any, disabled_leading_icon_color: _t.Any, disabled_trailing_icon_color: _t.Any) -> None: """Kotlin constructor: androidx.compose.material3.ListItemColors (androidx.compose.material3.ListItemColors(containerColor: androidx.compose.ui.graphics.Color, headlineColor: androidx.compose.ui.graphics.Color, leadingIconColor: androidx.compose.ui.graphics.Color, overlineColor: androidx.compose.ui.graphics.Color, supportingTextColor: androidx.compose.ui.graphics.Color, trailingIconColor: androidx.compose.ui.graphics.Color, disabledHeadlineColor: androidx.compose.ui.graphics.Color, disabledLeadingIconColor: androidx.compose.ui.graphics.Color, disabledTrailingIconColor: androidx.compose.ui.graphics.Color): androidx.compose.material3.ListItemColors)""" ... @property @@ -824,7 +829,7 @@ class ListItemColors: class MenuItemColors: """Kotlin: androidx.compose.material3.MenuItemColors""" - def __init__(self, textColor: _t.Any, leadingIconColor: _t.Any, trailingIconColor: _t.Any, disabledTextColor: _t.Any, disabledLeadingIconColor: _t.Any, disabledTrailingIconColor: _t.Any) -> None: + def __init__(self, text_color: _t.Any, leading_icon_color: _t.Any, trailing_icon_color: _t.Any, disabled_text_color: _t.Any, disabled_leading_icon_color: _t.Any, disabled_trailing_icon_color: _t.Any) -> None: """Kotlin constructor: androidx.compose.material3.MenuItemColors (androidx.compose.material3.MenuItemColors(textColor: androidx.compose.ui.graphics.Color, leadingIconColor: androidx.compose.ui.graphics.Color, trailingIconColor: androidx.compose.ui.graphics.Color, disabledTextColor: androidx.compose.ui.graphics.Color, disabledLeadingIconColor: androidx.compose.ui.graphics.Color, disabledTrailingIconColor: androidx.compose.ui.graphics.Color): androidx.compose.material3.MenuItemColors)""" ... @property @@ -854,7 +859,7 @@ class MenuItemColors: class ModalBottomSheetProperties: """Kotlin: androidx.compose.material3.ModalBottomSheetProperties""" - def __init__(self, shouldDismissOnBackPress: bool = ..., shouldDismissOnClickOutside: bool = ...) -> None: + def __init__(self, should_dismiss_on_back_press: bool = ..., should_dismiss_on_click_outside: bool = ...) -> None: """Kotlin constructor: androidx.compose.material3.ModalBottomSheetProperties (androidx.compose.material3.ModalBottomSheetProperties(shouldDismissOnBackPress: kotlin.Boolean, shouldDismissOnClickOutside: kotlin.Boolean): androidx.compose.material3.ModalBottomSheetProperties)""" ... @property @@ -868,7 +873,7 @@ class ModalBottomSheetProperties: class ModalWideNavigationRailProperties: """Kotlin: androidx.compose.material3.ModalWideNavigationRailProperties""" - def __init__(self, shouldDismissOnBackPress: bool = ...) -> None: + def __init__(self, should_dismiss_on_back_press: bool = ...) -> None: """Kotlin constructor: androidx.compose.material3.ModalWideNavigationRailProperties (androidx.compose.material3.ModalWideNavigationRailProperties(shouldDismissOnBackPress: kotlin.Boolean): androidx.compose.material3.ModalWideNavigationRailProperties)""" ... @property @@ -883,7 +888,7 @@ class MultiChoiceSegmentedButtonRowScope: class NavigationBarItemColors: """Kotlin: androidx.compose.material3.NavigationBarItemColors""" - def __init__(self, selectedIconColor: _t.Any, selectedTextColor: _t.Any, selectedIndicatorColor: _t.Any, unselectedIconColor: _t.Any, unselectedTextColor: _t.Any, disabledIconColor: _t.Any, disabledTextColor: _t.Any) -> None: + def __init__(self, selected_icon_color: _t.Any, selected_text_color: _t.Any, selected_indicator_color: _t.Any, unselected_icon_color: _t.Any, unselected_text_color: _t.Any, disabled_icon_color: _t.Any, disabled_text_color: _t.Any) -> None: """Kotlin constructor: androidx.compose.material3.NavigationBarItemColors (androidx.compose.material3.NavigationBarItemColors(selectedIconColor: androidx.compose.ui.graphics.Color, selectedTextColor: androidx.compose.ui.graphics.Color, selectedIndicatorColor: androidx.compose.ui.graphics.Color, unselectedIconColor: androidx.compose.ui.graphics.Color, unselectedTextColor: androidx.compose.ui.graphics.Color, disabledIconColor: androidx.compose.ui.graphics.Color, disabledTextColor: androidx.compose.ui.graphics.Color): androidx.compose.material3.NavigationBarItemColors)""" ... @property @@ -920,7 +925,7 @@ class NavigationDrawerItemColors: class NavigationItemColors: """Kotlin: androidx.compose.material3.NavigationItemColors""" - def __init__(self, selectedIconColor: _t.Any, selectedTextColor: _t.Any, selectedIndicatorColor: _t.Any, unselectedIconColor: _t.Any, unselectedTextColor: _t.Any, disabledIconColor: _t.Any, disabledTextColor: _t.Any) -> None: + def __init__(self, selected_icon_color: _t.Any, selected_text_color: _t.Any, selected_indicator_color: _t.Any, unselected_icon_color: _t.Any, unselected_text_color: _t.Any, disabled_icon_color: _t.Any, disabled_text_color: _t.Any) -> None: """Kotlin constructor: androidx.compose.material3.NavigationItemColors (androidx.compose.material3.NavigationItemColors(selectedIconColor: androidx.compose.ui.graphics.Color, selectedTextColor: androidx.compose.ui.graphics.Color, selectedIndicatorColor: androidx.compose.ui.graphics.Color, unselectedIconColor: androidx.compose.ui.graphics.Color, unselectedTextColor: androidx.compose.ui.graphics.Color, disabledIconColor: androidx.compose.ui.graphics.Color, disabledTextColor: androidx.compose.ui.graphics.Color): androidx.compose.material3.NavigationItemColors)""" ... @property @@ -954,7 +959,7 @@ class NavigationItemColors: class NavigationRailItemColors: """Kotlin: androidx.compose.material3.NavigationRailItemColors""" - def __init__(self, selectedIconColor: _t.Any, selectedTextColor: _t.Any, selectedIndicatorColor: _t.Any, unselectedIconColor: _t.Any, unselectedTextColor: _t.Any, disabledIconColor: _t.Any, disabledTextColor: _t.Any) -> None: + def __init__(self, selected_icon_color: _t.Any, selected_text_color: _t.Any, selected_indicator_color: _t.Any, unselected_icon_color: _t.Any, unselected_text_color: _t.Any, disabled_icon_color: _t.Any, disabled_text_color: _t.Any) -> None: """Kotlin constructor: androidx.compose.material3.NavigationRailItemColors (androidx.compose.material3.NavigationRailItemColors(selectedIconColor: androidx.compose.ui.graphics.Color, selectedTextColor: androidx.compose.ui.graphics.Color, selectedIndicatorColor: androidx.compose.ui.graphics.Color, unselectedIconColor: androidx.compose.ui.graphics.Color, unselectedTextColor: androidx.compose.ui.graphics.Color, disabledIconColor: androidx.compose.ui.graphics.Color, disabledTextColor: androidx.compose.ui.graphics.Color): androidx.compose.material3.NavigationRailItemColors)""" ... @property @@ -988,7 +993,7 @@ class NavigationRailItemColors: class RadioButtonColors: """Kotlin: androidx.compose.material3.RadioButtonColors""" - def __init__(self, selectedColor: _t.Any, unselectedColor: _t.Any, disabledSelectedColor: _t.Any, disabledUnselectedColor: _t.Any) -> None: + def __init__(self, selected_color: _t.Any, unselected_color: _t.Any, disabled_selected_color: _t.Any, disabled_unselected_color: _t.Any) -> None: """Kotlin constructor: androidx.compose.material3.RadioButtonColors (androidx.compose.material3.RadioButtonColors(selectedColor: androidx.compose.ui.graphics.Color, unselectedColor: androidx.compose.ui.graphics.Color, disabledSelectedColor: androidx.compose.ui.graphics.Color, disabledUnselectedColor: androidx.compose.ui.graphics.Color): androidx.compose.material3.RadioButtonColors)""" ... @property @@ -1033,7 +1038,7 @@ class RangeSliderState: class RichTooltipColors: """Kotlin: androidx.compose.material3.RichTooltipColors""" - def __init__(self, containerColor: _t.Any, contentColor: _t.Any, titleContentColor: _t.Any, actionContentColor: _t.Any) -> None: + def __init__(self, container_color: _t.Any, content_color: _t.Any, title_content_color: _t.Any, action_content_color: _t.Any) -> None: """Kotlin constructor: androidx.compose.material3.RichTooltipColors (androidx.compose.material3.RichTooltipColors(containerColor: androidx.compose.ui.graphics.Color, contentColor: androidx.compose.ui.graphics.Color, titleContentColor: androidx.compose.ui.graphics.Color, actionContentColor: androidx.compose.ui.graphics.Color): androidx.compose.material3.RichTooltipColors)""" ... @property @@ -1055,7 +1060,7 @@ class RichTooltipColors: class RippleConfiguration: """Kotlin: androidx.compose.material3.RippleConfiguration""" - def __init__(self, color: _t.Any = ..., rippleAlpha: _t.Any | None = ...) -> None: + def __init__(self, color: _t.Any = ..., ripple_alpha: _t.Any | None = ...) -> None: """Kotlin constructor: androidx.compose.material3.RippleConfiguration (androidx.compose.material3.RippleConfiguration(color: androidx.compose.ui.graphics.Color, rippleAlpha: androidx.compose.material.ripple.RippleAlpha?): androidx.compose.material3.RippleConfiguration)""" ... @property @@ -1070,9 +1075,9 @@ class RippleConfiguration: class SearchBarColors: """Kotlin: androidx.compose.material3.SearchBarColors""" @_t.overload - def __init__(self, containerColor: _t.Any, dividerColor: _t.Any) -> None: ... + def __init__(self, container_color: _t.Any, divider_color: _t.Any) -> None: ... @_t.overload - def __init__(self, containerColor: _t.Any, dividerColor: _t.Any, inputFieldColors: TextFieldColors) -> None: ... # type: ignore[overload-cannot-match] + def __init__(self, container_color: _t.Any, divider_color: _t.Any, input_field_colors: TextFieldColors) -> None: ... # type: ignore[overload-cannot-match] @property def container_color(self) -> _t.Any: """Kotlin property: androidx.compose.material3.SearchBarColors.containerColor (androidx.compose.material3.SearchBarColors.containerColor: androidx.compose.ui.graphics.Color)""" @@ -1141,7 +1146,7 @@ class SearchBarValue: class SegmentedButtonColors: """Kotlin: androidx.compose.material3.SegmentedButtonColors""" - def __init__(self, activeContainerColor: _t.Any, activeContentColor: _t.Any, activeBorderColor: _t.Any, inactiveContainerColor: _t.Any, inactiveContentColor: _t.Any, inactiveBorderColor: _t.Any, disabledActiveContainerColor: _t.Any, disabledActiveContentColor: _t.Any, disabledActiveBorderColor: _t.Any, disabledInactiveContainerColor: _t.Any, disabledInactiveContentColor: _t.Any, disabledInactiveBorderColor: _t.Any) -> None: + def __init__(self, active_container_color: _t.Any, active_content_color: _t.Any, active_border_color: _t.Any, inactive_container_color: _t.Any, inactive_content_color: _t.Any, inactive_border_color: _t.Any, disabled_active_container_color: _t.Any, disabled_active_content_color: _t.Any, disabled_active_border_color: _t.Any, disabled_inactive_container_color: _t.Any, disabled_inactive_content_color: _t.Any, disabled_inactive_border_color: _t.Any) -> None: """Kotlin constructor: androidx.compose.material3.SegmentedButtonColors (androidx.compose.material3.SegmentedButtonColors(activeContainerColor: androidx.compose.ui.graphics.Color, activeContentColor: androidx.compose.ui.graphics.Color, activeBorderColor: androidx.compose.ui.graphics.Color, inactiveContainerColor: androidx.compose.ui.graphics.Color, inactiveContentColor: androidx.compose.ui.graphics.Color, inactiveBorderColor: androidx.compose.ui.graphics.Color, disabledActiveContainerColor: androidx.compose.ui.graphics.Color, disabledActiveContentColor: androidx.compose.ui.graphics.Color, disabledActiveBorderColor: androidx.compose.ui.graphics.Color, disabledInactiveContainerColor: androidx.compose.ui.graphics.Color, disabledInactiveContentColor: androidx.compose.ui.graphics.Color, disabledInactiveBorderColor: androidx.compose.ui.graphics.Color): androidx.compose.material3.SegmentedButtonColors)""" ... @property @@ -1195,13 +1200,13 @@ class SegmentedButtonColors: class SelectableChipColors: """Kotlin: androidx.compose.material3.SelectableChipColors""" - def __init__(self, containerColor: _t.Any, labelColor: _t.Any, leadingIconColor: _t.Any, trailingIconColor: _t.Any, disabledContainerColor: _t.Any, disabledLabelColor: _t.Any, disabledLeadingIconColor: _t.Any, disabledTrailingIconColor: _t.Any, selectedContainerColor: _t.Any, disabledSelectedContainerColor: _t.Any, selectedLabelColor: _t.Any, selectedLeadingIconColor: _t.Any, selectedTrailingIconColor: _t.Any) -> None: + def __init__(self, container_color: _t.Any, label_color: _t.Any, leading_icon_color: _t.Any, trailing_icon_color: _t.Any, disabled_container_color: _t.Any, disabled_label_color: _t.Any, disabled_leading_icon_color: _t.Any, disabled_trailing_icon_color: _t.Any, selected_container_color: _t.Any, disabled_selected_container_color: _t.Any, selected_label_color: _t.Any, selected_leading_icon_color: _t.Any, selected_trailing_icon_color: _t.Any) -> None: """Kotlin constructor: androidx.compose.material3.SelectableChipColors (androidx.compose.material3.SelectableChipColors(containerColor: androidx.compose.ui.graphics.Color, labelColor: androidx.compose.ui.graphics.Color, leadingIconColor: androidx.compose.ui.graphics.Color, trailingIconColor: androidx.compose.ui.graphics.Color, disabledContainerColor: androidx.compose.ui.graphics.Color, disabledLabelColor: androidx.compose.ui.graphics.Color, disabledLeadingIconColor: androidx.compose.ui.graphics.Color, disabledTrailingIconColor: androidx.compose.ui.graphics.Color, selectedContainerColor: androidx.compose.ui.graphics.Color, disabledSelectedContainerColor: androidx.compose.ui.graphics.Color, selectedLabelColor: androidx.compose.ui.graphics.Color, selectedLeadingIconColor: androidx.compose.ui.graphics.Color, selectedTrailingIconColor: androidx.compose.ui.graphics.Color): androidx.compose.material3.SelectableChipColors)""" ... class SelectableChipElevation: """Kotlin: androidx.compose.material3.SelectableChipElevation""" - def __init__(self, elevation: float, pressedElevation: float, focusedElevation: float, hoveredElevation: float, draggedElevation: float, disabledElevation: float) -> None: + def __init__(self, elevation: float, pressed_elevation: float, focused_elevation: float, hovered_elevation: float, dragged_elevation: float, disabled_elevation: float) -> None: """Kotlin constructor: androidx.compose.material3.SelectableChipElevation (androidx.compose.material3.SelectableChipElevation(elevation: androidx.compose.ui.unit.Dp, pressedElevation: androidx.compose.ui.unit.Dp, focusedElevation: androidx.compose.ui.unit.Dp, hoveredElevation: androidx.compose.ui.unit.Dp, draggedElevation: androidx.compose.ui.unit.Dp, disabledElevation: androidx.compose.ui.unit.Dp): androidx.compose.material3.SelectableChipElevation)""" ... @property @@ -1234,7 +1239,7 @@ class SelectableDates: class Shapes: """Kotlin: androidx.compose.material3.Shapes""" - def __init__(self, extraSmall: _t.Any = ..., small: _t.Any = ..., medium: _t.Any = ..., large: _t.Any = ..., extraLarge: _t.Any = ...) -> None: + def __init__(self, extra_small: _t.Any = ..., small: _t.Any = ..., medium: _t.Any = ..., large: _t.Any = ..., extra_large: _t.Any = ...) -> None: """Kotlin constructor: androidx.compose.material3.Shapes (androidx.compose.material3.Shapes(extraSmall: androidx.compose.foundation.shape.CornerBasedShape, small: androidx.compose.foundation.shape.CornerBasedShape, medium: androidx.compose.foundation.shape.CornerBasedShape, large: androidx.compose.foundation.shape.CornerBasedShape, extraLarge: androidx.compose.foundation.shape.CornerBasedShape): androidx.compose.material3.Shapes)""" ... @property @@ -1260,7 +1265,7 @@ class Shapes: class SheetState: """Kotlin: androidx.compose.material3.SheetState""" - def __init__(self, skipPartiallyExpanded: bool, positionalThreshold: _t.Callable[[], float], velocityThreshold: _t.Callable[[], float], initialValue: SheetValue = ..., confirmValueChange: _t.Callable[[SheetValue], bool] = ..., skipHiddenState: bool = ...) -> None: + def __init__(self, skip_partially_expanded: bool, positional_threshold: _t.Callable[[], float], velocity_threshold: _t.Callable[[], float], initial_value: SheetValue = ..., confirm_value_change: _t.Callable[[SheetValue], bool] = ..., skip_hidden_state: bool = ...) -> None: """Kotlin constructor: androidx.compose.material3.SheetState (androidx.compose.material3.SheetState(skipPartiallyExpanded: kotlin.Boolean, positionalThreshold: kotlin.Function0, velocityThreshold: kotlin.Function0, initialValue: androidx.compose.material3.SheetValue, confirmValueChange: kotlin.Function1, skipHiddenState: kotlin.Boolean): androidx.compose.material3.SheetState)""" ... @property @@ -1298,7 +1303,7 @@ class SingleChoiceSegmentedButtonRowScope: class SliderColors: """Kotlin: androidx.compose.material3.SliderColors""" - def __init__(self, thumbColor: _t.Any, activeTrackColor: _t.Any, activeTickColor: _t.Any, inactiveTrackColor: _t.Any, inactiveTickColor: _t.Any, disabledThumbColor: _t.Any, disabledActiveTrackColor: _t.Any, disabledActiveTickColor: _t.Any, disabledInactiveTrackColor: _t.Any, disabledInactiveTickColor: _t.Any) -> None: + def __init__(self, thumb_color: _t.Any, active_track_color: _t.Any, active_tick_color: _t.Any, inactive_track_color: _t.Any, inactive_tick_color: _t.Any, disabled_thumb_color: _t.Any, disabled_active_track_color: _t.Any, disabled_active_tick_color: _t.Any, disabled_inactive_track_color: _t.Any, disabled_inactive_tick_color: _t.Any) -> None: """Kotlin constructor: androidx.compose.material3.SliderColors (androidx.compose.material3.SliderColors(thumbColor: androidx.compose.ui.graphics.Color, activeTrackColor: androidx.compose.ui.graphics.Color, activeTickColor: androidx.compose.ui.graphics.Color, inactiveTrackColor: androidx.compose.ui.graphics.Color, inactiveTickColor: androidx.compose.ui.graphics.Color, disabledThumbColor: androidx.compose.ui.graphics.Color, disabledActiveTrackColor: androidx.compose.ui.graphics.Color, disabledActiveTickColor: androidx.compose.ui.graphics.Color, disabledInactiveTrackColor: androidx.compose.ui.graphics.Color, disabledInactiveTickColor: androidx.compose.ui.graphics.Color): androidx.compose.material3.SliderColors)""" ... @property @@ -1415,9 +1420,9 @@ class SnackbarVisuals: class SwipeToDismissBoxState: """Kotlin: androidx.compose.material3.SwipeToDismissBoxState""" @_t.overload - def __init__(self, initialValue: SwipeToDismissBoxValue, density: _t.Any, confirmValueChange: _t.Callable[[SwipeToDismissBoxValue], bool] = ..., *, positionalThreshold: _t.Callable[[float], float]) -> None: ... + def __init__(self, initial_value: SwipeToDismissBoxValue, density: _t.Any, confirm_value_change: _t.Callable[[SwipeToDismissBoxValue], bool] = ..., *, positional_threshold: _t.Callable[[float], float]) -> None: ... @_t.overload - def __init__(self, initialValue: SwipeToDismissBoxValue, positionalThreshold: _t.Callable[[float], float]) -> None: ... # type: ignore[overload-cannot-match] + def __init__(self, initial_value: SwipeToDismissBoxValue, positional_threshold: _t.Callable[[float], float]) -> None: ... # type: ignore[overload-cannot-match] @property def current_value(self) -> SwipeToDismissBoxValue: """Kotlin property: androidx.compose.material3.SwipeToDismissBoxState.currentValue (androidx.compose.material3.SwipeToDismissBoxState.currentValue: androidx.compose.material3.SwipeToDismissBoxValue)""" @@ -1444,7 +1449,7 @@ class SwipeToDismissBoxValue: class SwitchColors: """Kotlin: androidx.compose.material3.SwitchColors""" - def __init__(self, checkedThumbColor: _t.Any, checkedTrackColor: _t.Any, checkedBorderColor: _t.Any, checkedIconColor: _t.Any, uncheckedThumbColor: _t.Any, uncheckedTrackColor: _t.Any, uncheckedBorderColor: _t.Any, uncheckedIconColor: _t.Any, disabledCheckedThumbColor: _t.Any, disabledCheckedTrackColor: _t.Any, disabledCheckedBorderColor: _t.Any, disabledCheckedIconColor: _t.Any, disabledUncheckedThumbColor: _t.Any, disabledUncheckedTrackColor: _t.Any, disabledUncheckedBorderColor: _t.Any, disabledUncheckedIconColor: _t.Any) -> None: + def __init__(self, checked_thumb_color: _t.Any, checked_track_color: _t.Any, checked_border_color: _t.Any, checked_icon_color: _t.Any, unchecked_thumb_color: _t.Any, unchecked_track_color: _t.Any, unchecked_border_color: _t.Any, unchecked_icon_color: _t.Any, disabled_checked_thumb_color: _t.Any, disabled_checked_track_color: _t.Any, disabled_checked_border_color: _t.Any, disabled_checked_icon_color: _t.Any, disabled_unchecked_thumb_color: _t.Any, disabled_unchecked_track_color: _t.Any, disabled_unchecked_border_color: _t.Any, disabled_unchecked_icon_color: _t.Any) -> None: """Kotlin constructor: androidx.compose.material3.SwitchColors (androidx.compose.material3.SwitchColors(checkedThumbColor: androidx.compose.ui.graphics.Color, checkedTrackColor: androidx.compose.ui.graphics.Color, checkedBorderColor: androidx.compose.ui.graphics.Color, checkedIconColor: androidx.compose.ui.graphics.Color, uncheckedThumbColor: androidx.compose.ui.graphics.Color, uncheckedTrackColor: androidx.compose.ui.graphics.Color, uncheckedBorderColor: androidx.compose.ui.graphics.Color, uncheckedIconColor: androidx.compose.ui.graphics.Color, disabledCheckedThumbColor: androidx.compose.ui.graphics.Color, disabledCheckedTrackColor: androidx.compose.ui.graphics.Color, disabledCheckedBorderColor: androidx.compose.ui.graphics.Color, disabledCheckedIconColor: androidx.compose.ui.graphics.Color, disabledUncheckedThumbColor: androidx.compose.ui.graphics.Color, disabledUncheckedTrackColor: androidx.compose.ui.graphics.Color, disabledUncheckedBorderColor: androidx.compose.ui.graphics.Color, disabledUncheckedIconColor: androidx.compose.ui.graphics.Color): androidx.compose.material3.SwitchColors)""" ... @property @@ -1536,7 +1541,7 @@ class TabPosition: class TextFieldColors: """Kotlin: androidx.compose.material3.TextFieldColors""" - def __init__(self, focusedTextColor: _t.Any, unfocusedTextColor: _t.Any, disabledTextColor: _t.Any, errorTextColor: _t.Any, focusedContainerColor: _t.Any, unfocusedContainerColor: _t.Any, disabledContainerColor: _t.Any, errorContainerColor: _t.Any, cursorColor: _t.Any, errorCursorColor: _t.Any, textSelectionColors: _t.Any, focusedIndicatorColor: _t.Any, unfocusedIndicatorColor: _t.Any, disabledIndicatorColor: _t.Any, errorIndicatorColor: _t.Any, focusedLeadingIconColor: _t.Any, unfocusedLeadingIconColor: _t.Any, disabledLeadingIconColor: _t.Any, errorLeadingIconColor: _t.Any, focusedTrailingIconColor: _t.Any, unfocusedTrailingIconColor: _t.Any, disabledTrailingIconColor: _t.Any, errorTrailingIconColor: _t.Any, focusedLabelColor: _t.Any, unfocusedLabelColor: _t.Any, disabledLabelColor: _t.Any, errorLabelColor: _t.Any, focusedPlaceholderColor: _t.Any, unfocusedPlaceholderColor: _t.Any, disabledPlaceholderColor: _t.Any, errorPlaceholderColor: _t.Any, focusedSupportingTextColor: _t.Any, unfocusedSupportingTextColor: _t.Any, disabledSupportingTextColor: _t.Any, errorSupportingTextColor: _t.Any, focusedPrefixColor: _t.Any, unfocusedPrefixColor: _t.Any, disabledPrefixColor: _t.Any, errorPrefixColor: _t.Any, focusedSuffixColor: _t.Any, unfocusedSuffixColor: _t.Any, disabledSuffixColor: _t.Any, errorSuffixColor: _t.Any) -> None: + def __init__(self, focused_text_color: _t.Any, unfocused_text_color: _t.Any, disabled_text_color: _t.Any, error_text_color: _t.Any, focused_container_color: _t.Any, unfocused_container_color: _t.Any, disabled_container_color: _t.Any, error_container_color: _t.Any, cursor_color: _t.Any, error_cursor_color: _t.Any, text_selection_colors: _t.Any, focused_indicator_color: _t.Any, unfocused_indicator_color: _t.Any, disabled_indicator_color: _t.Any, error_indicator_color: _t.Any, focused_leading_icon_color: _t.Any, unfocused_leading_icon_color: _t.Any, disabled_leading_icon_color: _t.Any, error_leading_icon_color: _t.Any, focused_trailing_icon_color: _t.Any, unfocused_trailing_icon_color: _t.Any, disabled_trailing_icon_color: _t.Any, error_trailing_icon_color: _t.Any, focused_label_color: _t.Any, unfocused_label_color: _t.Any, disabled_label_color: _t.Any, error_label_color: _t.Any, focused_placeholder_color: _t.Any, unfocused_placeholder_color: _t.Any, disabled_placeholder_color: _t.Any, error_placeholder_color: _t.Any, focused_supporting_text_color: _t.Any, unfocused_supporting_text_color: _t.Any, disabled_supporting_text_color: _t.Any, error_supporting_text_color: _t.Any, focused_prefix_color: _t.Any, unfocused_prefix_color: _t.Any, disabled_prefix_color: _t.Any, error_prefix_color: _t.Any, focused_suffix_color: _t.Any, unfocused_suffix_color: _t.Any, disabled_suffix_color: _t.Any, error_suffix_color: _t.Any) -> None: """Kotlin constructor: androidx.compose.material3.TextFieldColors (androidx.compose.material3.TextFieldColors(focusedTextColor: androidx.compose.ui.graphics.Color, unfocusedTextColor: androidx.compose.ui.graphics.Color, disabledTextColor: androidx.compose.ui.graphics.Color, errorTextColor: androidx.compose.ui.graphics.Color, focusedContainerColor: androidx.compose.ui.graphics.Color, unfocusedContainerColor: androidx.compose.ui.graphics.Color, disabledContainerColor: androidx.compose.ui.graphics.Color, errorContainerColor: androidx.compose.ui.graphics.Color, cursorColor: androidx.compose.ui.graphics.Color, errorCursorColor: androidx.compose.ui.graphics.Color, textSelectionColors: androidx.compose.foundation.text.selection.TextSelectionColors, focusedIndicatorColor: androidx.compose.ui.graphics.Color, unfocusedIndicatorColor: androidx.compose.ui.graphics.Color, disabledIndicatorColor: androidx.compose.ui.graphics.Color, errorIndicatorColor: androidx.compose.ui.graphics.Color, focusedLeadingIconColor: androidx.compose.ui.graphics.Color, unfocusedLeadingIconColor: androidx.compose.ui.graphics.Color, disabledLeadingIconColor: androidx.compose.ui.graphics.Color, errorLeadingIconColor: androidx.compose.ui.graphics.Color, focusedTrailingIconColor: androidx.compose.ui.graphics.Color, unfocusedTrailingIconColor: androidx.compose.ui.graphics.Color, disabledTrailingIconColor: androidx.compose.ui.graphics.Color, errorTrailingIconColor: androidx.compose.ui.graphics.Color, focusedLabelColor: androidx.compose.ui.graphics.Color, unfocusedLabelColor: androidx.compose.ui.graphics.Color, disabledLabelColor: androidx.compose.ui.graphics.Color, errorLabelColor: androidx.compose.ui.graphics.Color, focusedPlaceholderColor: androidx.compose.ui.graphics.Color, unfocusedPlaceholderColor: androidx.compose.ui.graphics.Color, disabledPlaceholderColor: androidx.compose.ui.graphics.Color, errorPlaceholderColor: androidx.compose.ui.graphics.Color, focusedSupportingTextColor: androidx.compose.ui.graphics.Color, unfocusedSupportingTextColor: androidx.compose.ui.graphics.Color, disabledSupportingTextColor: androidx.compose.ui.graphics.Color, errorSupportingTextColor: androidx.compose.ui.graphics.Color, focusedPrefixColor: androidx.compose.ui.graphics.Color, unfocusedPrefixColor: androidx.compose.ui.graphics.Color, disabledPrefixColor: androidx.compose.ui.graphics.Color, errorPrefixColor: androidx.compose.ui.graphics.Color, focusedSuffixColor: androidx.compose.ui.graphics.Color, unfocusedSuffixColor: androidx.compose.ui.graphics.Color, disabledSuffixColor: androidx.compose.ui.graphics.Color, errorSuffixColor: androidx.compose.ui.graphics.Color): androidx.compose.material3.TextFieldColors)""" ... @property @@ -1724,7 +1729,7 @@ class TextFieldLabelScope: class TimePickerColors: """Kotlin: androidx.compose.material3.TimePickerColors""" - def __init__(self, clockDialColor: _t.Any, selectorColor: _t.Any, containerColor: _t.Any, periodSelectorBorderColor: _t.Any, clockDialSelectedContentColor: _t.Any, clockDialUnselectedContentColor: _t.Any, periodSelectorSelectedContainerColor: _t.Any, periodSelectorUnselectedContainerColor: _t.Any, periodSelectorSelectedContentColor: _t.Any, periodSelectorUnselectedContentColor: _t.Any, timeSelectorSelectedContainerColor: _t.Any, timeSelectorUnselectedContainerColor: _t.Any, timeSelectorSelectedContentColor: _t.Any, timeSelectorUnselectedContentColor: _t.Any) -> None: + def __init__(self, clock_dial_color: _t.Any, selector_color: _t.Any, container_color: _t.Any, period_selector_border_color: _t.Any, clock_dial_selected_content_color: _t.Any, clock_dial_unselected_content_color: _t.Any, period_selector_selected_container_color: _t.Any, period_selector_unselected_container_color: _t.Any, period_selector_selected_content_color: _t.Any, period_selector_unselected_content_color: _t.Any, time_selector_selected_container_color: _t.Any, time_selector_unselected_container_color: _t.Any, time_selector_selected_content_color: _t.Any, time_selector_unselected_content_color: _t.Any) -> None: """Kotlin constructor: androidx.compose.material3.TimePickerColors (androidx.compose.material3.TimePickerColors(clockDialColor: androidx.compose.ui.graphics.Color, selectorColor: androidx.compose.ui.graphics.Color, containerColor: androidx.compose.ui.graphics.Color, periodSelectorBorderColor: androidx.compose.ui.graphics.Color, clockDialSelectedContentColor: androidx.compose.ui.graphics.Color, clockDialUnselectedContentColor: androidx.compose.ui.graphics.Color, periodSelectorSelectedContainerColor: androidx.compose.ui.graphics.Color, periodSelectorUnselectedContainerColor: androidx.compose.ui.graphics.Color, periodSelectorSelectedContentColor: androidx.compose.ui.graphics.Color, periodSelectorUnselectedContentColor: androidx.compose.ui.graphics.Color, timeSelectorSelectedContainerColor: androidx.compose.ui.graphics.Color, timeSelectorUnselectedContainerColor: androidx.compose.ui.graphics.Color, timeSelectorSelectedContentColor: androidx.compose.ui.graphics.Color, timeSelectorUnselectedContentColor: androidx.compose.ui.graphics.Color): androidx.compose.material3.TimePickerColors)""" ... @property @@ -1792,9 +1797,9 @@ class TooltipScope: class TopAppBarColors: """Kotlin: androidx.compose.material3.TopAppBarColors""" @_t.overload - def __init__(self, containerColor: _t.Any, scrolledContainerColor: _t.Any, navigationIconContentColor: _t.Any, titleContentColor: _t.Any, actionIconContentColor: _t.Any) -> None: ... + def __init__(self, container_color: _t.Any, scrolled_container_color: _t.Any, navigation_icon_content_color: _t.Any, title_content_color: _t.Any, action_icon_content_color: _t.Any) -> None: ... @_t.overload - def __init__(self, containerColor: _t.Any, scrolledContainerColor: _t.Any, navigationIconContentColor: _t.Any, titleContentColor: _t.Any, actionIconContentColor: _t.Any, subtitleContentColor: _t.Any) -> None: ... # type: ignore[overload-cannot-match] + def __init__(self, container_color: _t.Any, scrolled_container_color: _t.Any, navigation_icon_content_color: _t.Any, title_content_color: _t.Any, action_icon_content_color: _t.Any, subtitle_content_color: _t.Any) -> None: ... # type: ignore[overload-cannot-match] @property def action_icon_content_color(self) -> _t.Any: """Kotlin property: androidx.compose.material3.TopAppBarColors.actionIconContentColor (androidx.compose.material3.TopAppBarColors.actionIconContentColor: androidx.compose.ui.graphics.Color)""" @@ -1837,7 +1842,7 @@ class TopAppBarScrollBehavior: class Typography: """Kotlin: androidx.compose.material3.Typography""" - def __init__(self, displayLarge: _t.Any, displayMedium: _t.Any, displaySmall: _t.Any, headlineLarge: _t.Any, headlineMedium: _t.Any, headlineSmall: _t.Any, titleLarge: _t.Any, titleMedium: _t.Any, titleSmall: _t.Any, bodyLarge: _t.Any, bodyMedium: _t.Any, bodySmall: _t.Any, labelLarge: _t.Any, labelMedium: _t.Any, labelSmall: _t.Any) -> None: + def __init__(self, display_large: _t.Any, display_medium: _t.Any, display_small: _t.Any, headline_large: _t.Any, headline_medium: _t.Any, headline_small: _t.Any, title_large: _t.Any, title_medium: _t.Any, title_small: _t.Any, body_large: _t.Any, body_medium: _t.Any, body_small: _t.Any, label_large: _t.Any, label_medium: _t.Any, label_small: _t.Any) -> None: """Kotlin constructor: androidx.compose.material3.Typography (androidx.compose.material3.Typography(displayLarge: androidx.compose.ui.text.TextStyle, displayMedium: androidx.compose.ui.text.TextStyle, displaySmall: androidx.compose.ui.text.TextStyle, headlineLarge: androidx.compose.ui.text.TextStyle, headlineMedium: androidx.compose.ui.text.TextStyle, headlineSmall: androidx.compose.ui.text.TextStyle, titleLarge: androidx.compose.ui.text.TextStyle, titleMedium: androidx.compose.ui.text.TextStyle, titleSmall: androidx.compose.ui.text.TextStyle, bodyLarge: androidx.compose.ui.text.TextStyle, bodyMedium: androidx.compose.ui.text.TextStyle, bodySmall: androidx.compose.ui.text.TextStyle, labelLarge: androidx.compose.ui.text.TextStyle, labelMedium: androidx.compose.ui.text.TextStyle, labelSmall: androidx.compose.ui.text.TextStyle): androidx.compose.material3.Typography)""" ... @property @@ -1903,7 +1908,7 @@ class Typography: class WideNavigationRailColors: """Kotlin: androidx.compose.material3.WideNavigationRailColors""" - def __init__(self, containerColor: _t.Any, contentColor: _t.Any, modalContainerColor: _t.Any, modalScrimColor: _t.Any, modalContentColor: _t.Any) -> None: + def __init__(self, container_color: _t.Any, content_color: _t.Any, modal_container_color: _t.Any, modal_scrim_color: _t.Any, modal_content_color: _t.Any) -> None: """Kotlin constructor: androidx.compose.material3.WideNavigationRailColors (androidx.compose.material3.WideNavigationRailColors(containerColor: androidx.compose.ui.graphics.Color, contentColor: androidx.compose.ui.graphics.Color, modalContainerColor: androidx.compose.ui.graphics.Color, modalScrimColor: androidx.compose.ui.graphics.Color, modalContentColor: androidx.compose.ui.graphics.Color): androidx.compose.material3.WideNavigationRailColors)""" ... @property @@ -1977,10 +1982,6 @@ def BasicAlertDialog(on_dismiss_request: _t.Callable[[], None], modifier: python """Kotlin: androidx.compose.material3.BasicAlertDialog(onDismissRequest: kotlin.Function0, modifier: androidx.compose.ui.Modifier, properties: androidx.compose.ui.window.DialogProperties, content: kotlin.Function0): kotlin.Unit""" ... -def BottomAppBarState(initial_height_offset_limit: float, initial_height_offset: float, initial_content_offset: float) -> _t.Any: - """Kotlin: androidx.compose.material3.BottomAppBarState(initialHeightOffsetLimit: kotlin.Float, initialHeightOffset: kotlin.Float, initialContentOffset: kotlin.Float): androidx.compose.material3.BottomAppBarState""" - ... - def BottomAppBar__Modifier_Color_Color_Dp_PaddingValues_WindowInsets_BottomAppBarScrollBehavior_Unit(modifier: pythonx.compose.ui.Modifier = ..., container_color: _t.Any = ..., content_color: _t.Any = ..., tonal_elevation: float = ..., content_padding: _t.Any = ..., window_insets: _t.Any = ..., scroll_behavior: BottomAppBarScrollBehavior | None = ..., *, content: _t.Callable[[pythonx.compose.layout.RowScope], None]) -> None: """Kotlin: androidx.compose.material3.BottomAppBar(modifier: androidx.compose.ui.Modifier, containerColor: androidx.compose.ui.graphics.Color, contentColor: androidx.compose.ui.graphics.Color, tonalElevation: androidx.compose.ui.unit.Dp, contentPadding: androidx.compose.foundation.layout.PaddingValues, windowInsets: androidx.compose.foundation.layout.WindowInsets, scrollBehavior: androidx.compose.material3.BottomAppBarScrollBehavior?, content: kotlin.Function1): kotlin.Unit""" ... @@ -2645,6 +2646,8 @@ def surface_color_at_elevation(receiver: ColorScheme, /, elevation: float) -> _t """Kotlin: androidx.compose.material3.ColorScheme.surfaceColorAtElevation(elevation: androidx.compose.ui.unit.Dp): androidx.compose.ui.graphics.Color""" ... +BottomAppBarState: _BottomAppBarState_callable_module + def ColorScheme__Color_Color_Color_Color_Color_Color_Color_Color_Color_Color_Color_Color_Color_Color_Color_Color_Color_Color_Color_Color_Color_Color_Color_Color_Color_Color_Color_Color_Color(primary: _t.Any, on_primary: _t.Any, primary_container: _t.Any, on_primary_container: _t.Any, inverse_primary: _t.Any, secondary: _t.Any, on_secondary: _t.Any, secondary_container: _t.Any, on_secondary_container: _t.Any, tertiary: _t.Any, on_tertiary: _t.Any, tertiary_container: _t.Any, on_tertiary_container: _t.Any, background: _t.Any, on_background: _t.Any, surface: _t.Any, on_surface: _t.Any, surface_variant: _t.Any, on_surface_variant: _t.Any, surface_tint: _t.Any, inverse_surface: _t.Any, inverse_on_surface: _t.Any, error: _t.Any, on_error: _t.Any, error_container: _t.Any, on_error_container: _t.Any, outline: _t.Any, outline_variant: _t.Any, scrim: _t.Any) -> ColorScheme: """Kotlin: androidx.compose.material3.ColorScheme(primary: androidx.compose.ui.graphics.Color, onPrimary: androidx.compose.ui.graphics.Color, primaryContainer: androidx.compose.ui.graphics.Color, onPrimaryContainer: androidx.compose.ui.graphics.Color, inversePrimary: androidx.compose.ui.graphics.Color, secondary: androidx.compose.ui.graphics.Color, onSecondary: androidx.compose.ui.graphics.Color, secondaryContainer: androidx.compose.ui.graphics.Color, onSecondaryContainer: androidx.compose.ui.graphics.Color, tertiary: androidx.compose.ui.graphics.Color, onTertiary: androidx.compose.ui.graphics.Color, tertiaryContainer: androidx.compose.ui.graphics.Color, onTertiaryContainer: androidx.compose.ui.graphics.Color, background: androidx.compose.ui.graphics.Color, onBackground: androidx.compose.ui.graphics.Color, surface: androidx.compose.ui.graphics.Color, onSurface: androidx.compose.ui.graphics.Color, surfaceVariant: androidx.compose.ui.graphics.Color, onSurfaceVariant: androidx.compose.ui.graphics.Color, surfaceTint: androidx.compose.ui.graphics.Color, inverseSurface: androidx.compose.ui.graphics.Color, inverseOnSurface: androidx.compose.ui.graphics.Color, error: androidx.compose.ui.graphics.Color, onError: androidx.compose.ui.graphics.Color, errorContainer: androidx.compose.ui.graphics.Color, onErrorContainer: androidx.compose.ui.graphics.Color, outline: androidx.compose.ui.graphics.Color, outlineVariant: androidx.compose.ui.graphics.Color, scrim: androidx.compose.ui.graphics.Color): androidx.compose.material3.ColorScheme""" ... diff --git a/pythonx/compose/runtime/__init__.pyi b/pythonx/compose/runtime/__init__.pyi index 70233c9..45b26b5 100644 --- a/pythonx/compose/runtime/__init__.pyi +++ b/pythonx/compose/runtime/__init__.pyi @@ -1,4 +1,4 @@ -# GENERATED by scripts/gen_stubs.py from python-multiplatform's Kotlin-named stubs (artifact kotlin-stubs, workflow run 37103737430, commit a5028618, Compose 1.11.1). Do not edit. +# GENERATED by scripts/gen_stubs.py from python-multiplatform's Kotlin-named stubs (artifact kotlin-stubs, workflow run 37131041879, commit 452cc807, Compose 1.11.1). Do not edit. import typing as _t import pythonx.compose.ui diff --git a/pythonx/compose/ui/__init__.pyi b/pythonx/compose/ui/__init__.pyi index c3d1688..54e6c12 100644 --- a/pythonx/compose/ui/__init__.pyi +++ b/pythonx/compose/ui/__init__.pyi @@ -1,4 +1,4 @@ -# GENERATED by scripts/gen_stubs.py from python-multiplatform's Kotlin-named stubs (artifact kotlin-stubs, workflow run 37103737430, commit a5028618, Compose 1.11.1). Do not edit. +# GENERATED by scripts/gen_stubs.py from python-multiplatform's Kotlin-named stubs (artifact kotlin-stubs, workflow run 37131041879, commit 452cc807, Compose 1.11.1). Do not edit. import typing as _t import pythonx.compose.layout import pythonx.compose.runtime @@ -545,7 +545,7 @@ class _Modifier_zIndex(_t.Protocol): class BiasAbsoluteAlignment: """Kotlin: androidx.compose.ui.BiasAbsoluteAlignment""" - def __init__(self, horizontalBias: float, verticalBias: float) -> None: + def __init__(self, horizontal_bias: float, vertical_bias: float) -> None: """Kotlin constructor: androidx.compose.ui.BiasAbsoluteAlignment (androidx.compose.ui.BiasAbsoluteAlignment(horizontalBias: kotlin.Float, verticalBias: kotlin.Float): androidx.compose.ui.BiasAbsoluteAlignment)""" ... @property @@ -559,7 +559,7 @@ class BiasAbsoluteAlignment: class BiasAlignment: """Kotlin: androidx.compose.ui.BiasAlignment""" - def __init__(self, horizontalBias: float, verticalBias: float) -> None: + def __init__(self, horizontal_bias: float, vertical_bias: float) -> None: """Kotlin constructor: androidx.compose.ui.BiasAlignment (androidx.compose.ui.BiasAlignment(horizontalBias: kotlin.Float, verticalBias: kotlin.Float): androidx.compose.ui.BiasAlignment)""" ... @property diff --git a/pythonx/compose/ui/graphics/__init__.pyi b/pythonx/compose/ui/graphics/__init__.pyi index 6465aad..7e1a297 100644 --- a/pythonx/compose/ui/graphics/__init__.pyi +++ b/pythonx/compose/ui/graphics/__init__.pyi @@ -1,7 +1,41 @@ -# GENERATED by scripts/gen_stubs.py from python-multiplatform's Kotlin-named stubs (artifact kotlin-stubs, workflow run 37103737430, commit a5028618, Compose 1.11.1). Do not edit. +# GENERATED by scripts/gen_stubs.py from python-multiplatform's Kotlin-named stubs (artifact kotlin-stubs, workflow run 37131041879, commit 452cc807, Compose 1.11.1). Do not edit. import typing as _t import pythonx.compose.ui +class _BlurEffect_callable_module(_t.Protocol): + """Kotlin: the function BlurEffect, and the members of the module BlurEffect""" + def __call__(self, radius_x: float, radius_y: float, edge_treatment: _t.Any = ...) -> _t.Any: ... + BlurSigmaScale: float + +class _Color_callable_module(_t.Protocol): + """Kotlin: the function Color, and the members of the module Color""" + @_t.overload + def __call__(self, red: float, green: float, blue: float, alpha: float = ..., color_space: _t.Any = ...) -> _t.Any: ... + @_t.overload + def __call__(self, color: int) -> _t.Any: ... # type: ignore[overload-cannot-match] + @_t.overload + def __call__(self, red: int, green: int, blue: int, alpha: int = ...) -> _t.Any: ... # type: ignore[overload-cannot-match] + @_t.overload + def __call__(self, color: int) -> _t.Any: ... # type: ignore[overload-cannot-match] + Black: _t.Any + Blue: _t.Any + Cyan: _t.Any + DarkGray: _t.Any + Gray: _t.Any + Green: _t.Any + LightGray: _t.Any + Magenta: _t.Any + Red: _t.Any + Transparent: _t.Any + Unspecified: _t.Any + White: _t.Any + Yellow: _t.Any + +class _TransformOrigin_callable_module(_t.Protocol): + """Kotlin: the function TransformOrigin, and the members of the module TransformOrigin""" + def __call__(self, pivot_fraction_x: float, pivot_fraction_y: float) -> _t.Any: ... + Center: _t.Any + class _ColorFilter_asDesktopColorFilter(_t.Protocol): def __call__(self) -> _t.Any: ... @@ -19,7 +53,7 @@ class _RenderEffect_asDesktopImageFilter(_t.Protocol): class BlendModeColorFilter(ColorFilter): """Kotlin: androidx.compose.ui.graphics.BlendModeColorFilter""" - def __init__(self, color: _t.Any, blendMode: _t.Any) -> None: + def __init__(self, color: _t.Any, blend_mode: _t.Any) -> None: """Kotlin constructor: androidx.compose.ui.graphics.BlendModeColorFilter (androidx.compose.ui.graphics.BlendModeColorFilter(color: androidx.compose.ui.graphics.Color, blendMode: androidx.compose.ui.graphics.BlendMode): androidx.compose.ui.graphics.BlendModeColorFilter)""" ... @property @@ -48,7 +82,7 @@ class ColorMatrix: class ColorMatrixColorFilter(ColorFilter): """Kotlin: androidx.compose.ui.graphics.ColorMatrixColorFilter""" - def __init__(self, colorMatrix: ColorMatrix) -> None: + def __init__(self, color_matrix: ColorMatrix) -> None: """Kotlin constructor: androidx.compose.ui.graphics.ColorMatrixColorFilter (androidx.compose.ui.graphics.ColorMatrixColorFilter(colorMatrix: androidx.compose.ui.graphics.ColorMatrix): androidx.compose.ui.graphics.ColorMatrixColorFilter)""" ... @@ -187,7 +221,7 @@ class Shape: class SkiaGraphicsContext(GraphicsContext): """Kotlin: androidx.compose.ui.graphics.SkiaGraphicsContext""" - def __init__(self, measureDrawBounds: bool = ...) -> None: + def __init__(self, measure_draw_bounds: bool = ...) -> None: """Kotlin constructor: androidx.compose.ui.graphics.SkiaGraphicsContext (androidx.compose.ui.graphics.SkiaGraphicsContext(measureDrawBounds: kotlin.Boolean): androidx.compose.ui.graphics.SkiaGraphicsContext)""" ... @property @@ -212,10 +246,6 @@ class Vertices: """Kotlin property: androidx.compose.ui.graphics.Vertices.vertexMode (androidx.compose.ui.graphics.Vertices.vertexMode: androidx.compose.ui.graphics.VertexMode)""" ... -def BlurEffect(radius_x: float, radius_y: float, edge_treatment: _t.Any = ...) -> _t.Any: - """Kotlin: androidx.compose.ui.graphics.BlurEffect(radiusX: kotlin.Float, radiusY: kotlin.Float, edgeTreatment: androidx.compose.ui.graphics.TileMode): androidx.compose.ui.graphics.BlurEffect""" - ... - def Canvas(image: _t.Any) -> _t.Any: """Kotlin: androidx.compose.ui.graphics.Canvas(image: androidx.compose.ui.graphics.ImageBitmap): androidx.compose.ui.graphics.Canvas""" ... @@ -280,10 +310,6 @@ def ShaderBrush(shader: Shader) -> _t.Any: """Kotlin: androidx.compose.ui.graphics.ShaderBrush(shader: androidx.compose.ui.graphics.Shader): androidx.compose.ui.graphics.ShaderBrush""" ... -def TransformOrigin(pivot_fraction_x: float, pivot_fraction_y: float) -> _t.Any: - """Kotlin: androidx.compose.ui.graphics.TransformOrigin(pivotFractionX: kotlin.Float, pivotFractionY: kotlin.Float): androidx.compose.ui.graphics.TransformOrigin""" - ... - def add_outline(receiver: _t.Any, /, outline: Outline) -> None: """Kotlin: androidx.compose.ui.graphics.Path.addOutline(outline: androidx.compose.ui.graphics.Outline): kotlin.Unit""" ... @@ -524,14 +550,11 @@ def with_save_layer(receiver: _t.Any, /, bounds: _t.Any, paint: _t.Any, block: _ """Kotlin: androidx.compose.ui.graphics.Canvas.withSaveLayer(bounds: androidx.compose.ui.geometry.Rect, paint: androidx.compose.ui.graphics.Paint, block: kotlin.Function0): kotlin.Unit""" ... -@_t.overload -def Color(red: float, green: float, blue: float, alpha: float = ..., color_space: _t.Any = ...) -> _t.Any: ... -@_t.overload -def Color(color: int) -> _t.Any: ... # type: ignore[overload-cannot-match] -@_t.overload -def Color(red: int, green: int, blue: int, alpha: int = ...) -> _t.Any: ... # type: ignore[overload-cannot-match] -@_t.overload -def Color(color: int) -> _t.Any: ... # type: ignore[overload-cannot-match] +BlurEffect: _BlurEffect_callable_module + +Color: _Color_callable_module + +TransformOrigin: _TransformOrigin_callable_module @_t.overload def as_compose_path_effect(receiver: _t.Any, /) -> PathEffect: ... @@ -727,6 +750,10 @@ class PathOperation: def xor(self) -> _t.Any: """Kotlin property: androidx.compose.ui.graphics.xor (androidx.compose.ui.graphics.PathOperation.Companion.xor: androidx.compose.ui.graphics.PathOperation)""" ... + @property + def reverse_difference(self) -> _t.Any: + """Kotlin property: androidx.compose.ui.graphics.reverseDifference (androidx.compose.ui.graphics.PathOperation.Companion.reverseDifference: androidx.compose.ui.graphics.PathOperation)""" + ... Difference: _t.ClassVar[_t.Any] """Kotlin: androidx.compose.ui.graphics.PathOperation.Difference(): androidx.compose.ui.graphics.PathOperation""" Intersect: _t.ClassVar[_t.Any] diff --git a/pythonx/compose/ui/graphics/vector/__init__.pyi b/pythonx/compose/ui/graphics/vector/__init__.pyi index 21fc88b..86c7b2b 100644 --- a/pythonx/compose/ui/graphics/vector/__init__.pyi +++ b/pythonx/compose/ui/graphics/vector/__init__.pyi @@ -1,4 +1,4 @@ -# GENERATED by scripts/gen_stubs.py from python-multiplatform's Kotlin-named stubs (artifact kotlin-stubs, workflow run 37103737430, commit a5028618, Compose 1.11.1). Do not edit. +# GENERATED by scripts/gen_stubs.py from python-multiplatform's Kotlin-named stubs (artifact kotlin-stubs, workflow run 37131041879, commit 452cc807, Compose 1.11.1). Do not edit. import typing as _t import pythonx.compose.runtime import pythonx.compose.ui.graphics diff --git a/pythonx/compose/ui/text/__init__.pyi b/pythonx/compose/ui/text/__init__.pyi index 27b36db..9c55f19 100644 --- a/pythonx/compose/ui/text/__init__.pyi +++ b/pythonx/compose/ui/text/__init__.pyi @@ -1,8 +1,24 @@ -# GENERATED by scripts/gen_stubs.py from python-multiplatform's Kotlin-named stubs (artifact kotlin-stubs, workflow run 37103737430, commit a5028618, Compose 1.11.1). Do not edit. +# GENERATED by scripts/gen_stubs.py from python-multiplatform's Kotlin-named stubs (artifact kotlin-stubs, workflow run 37131041879, commit 452cc807, Compose 1.11.1). Do not edit. import typing as _t import pythonx.compose.ui.graphics import pythonx.compose.ui.unit +class _AnnotatedString_callable_module(_t.Protocol): + """Kotlin: the function AnnotatedString, and the members of the module AnnotatedString""" + @_t.overload + def __call__(self, text: str, paragraph_style: ParagraphStyle) -> _t.Any: ... + @_t.overload + def __call__(self, text: str, span_style: SpanStyle, paragraph_style: ParagraphStyle | None = ...) -> _t.Any: ... # type: ignore[overload-cannot-match] + Saver: _t.Any + +class _TextRange_callable_module(_t.Protocol): + """Kotlin: the function TextRange, and the members of the module TextRange""" + @_t.overload + def __call__(self, index: int) -> _t.Any: ... + @_t.overload + def __call__(self, start: int, end: int) -> _t.Any: ... # type: ignore[overload-cannot-match] + Zero: _t.Any + class LinkAnnotation: """Kotlin: androidx.compose.ui.text.LinkAnnotation""" @property @@ -20,9 +36,9 @@ class LinkInteractionListener: class MultiParagraph: """Kotlin: androidx.compose.ui.text.MultiParagraph""" @_t.overload - def __init__(self, intrinsics: MultiParagraphIntrinsics, constraints: int, maxLines: int = ..., overflow: _t.Any = ...) -> None: ... + def __init__(self, intrinsics: MultiParagraphIntrinsics, constraints: int, max_lines: int = ..., overflow: _t.Any = ...) -> None: ... @_t.overload - def __init__(self, intrinsics: MultiParagraphIntrinsics, maxLines: int = ..., ellipsis: bool = ..., *, width: float) -> None: ... # type: ignore[overload-cannot-match] + def __init__(self, intrinsics: MultiParagraphIntrinsics, max_lines: int = ..., ellipsis: bool = ..., *, width: float) -> None: ... # type: ignore[overload-cannot-match] @property def did_exceed_max_lines(self) -> bool: """Kotlin property: androidx.compose.ui.text.MultiParagraph.didExceedMaxLines (androidx.compose.ui.text.MultiParagraph.didExceedMaxLines: kotlin.Boolean)""" @@ -100,7 +116,7 @@ class ParagraphIntrinsics: class ParagraphStyle: """Kotlin: androidx.compose.ui.text.ParagraphStyle""" - def __init__(self, textAlign: _t.Any, textDirection: _t.Any, lineHeight: _t.Any, textIndent: _t.Any | None, platformStyle: _t.Any | None, lineHeightStyle: _t.Any | None, lineBreak: _t.Any, hyphens: _t.Any, textMotion: _t.Any | None) -> None: + def __init__(self, text_align: _t.Any, text_direction: _t.Any, line_height: _t.Any, text_indent: _t.Any | None, platform_style: _t.Any | None, line_height_style: _t.Any | None, line_break: _t.Any, hyphens: _t.Any, text_motion: _t.Any | None) -> None: """Kotlin constructor: androidx.compose.ui.text.ParagraphStyle (androidx.compose.ui.text.ParagraphStyle(textAlign: androidx.compose.ui.text.style.TextAlign, textDirection: androidx.compose.ui.text.style.TextDirection, lineHeight: androidx.compose.ui.unit.TextUnit, textIndent: androidx.compose.ui.text.style.TextIndent?, platformStyle: androidx.compose.ui.text.PlatformParagraphStyle?, lineHeightStyle: androidx.compose.ui.text.style.LineHeightStyle?, lineBreak: androidx.compose.ui.text.style.LineBreak, hyphens: androidx.compose.ui.text.style.Hyphens, textMotion: androidx.compose.ui.text.style.TextMotion?): androidx.compose.ui.text.ParagraphStyle)""" ... @property @@ -158,7 +174,7 @@ class ParagraphStyle: class Placeholder: """Kotlin: androidx.compose.ui.text.Placeholder""" - def __init__(self, width: _t.Any, height: _t.Any, placeholderVerticalAlign: _t.Any) -> None: + def __init__(self, width: _t.Any, height: _t.Any, placeholder_vertical_align: _t.Any) -> None: """Kotlin constructor: androidx.compose.ui.text.Placeholder (androidx.compose.ui.text.Placeholder(width: androidx.compose.ui.unit.TextUnit, height: androidx.compose.ui.unit.TextUnit, placeholderVerticalAlign: androidx.compose.ui.text.PlaceholderVerticalAlign): androidx.compose.ui.text.Placeholder)""" ... @property @@ -177,9 +193,9 @@ class Placeholder: class PlatformTextStyle: """Kotlin: androidx.compose.ui.text.PlatformTextStyle""" @_t.overload - def __init__(self, spanStyle: _t.Any | None, paragraphStyle: _t.Any | None) -> None: ... + def __init__(self, span_style: _t.Any | None, paragraph_style: _t.Any | None) -> None: ... @_t.overload - def __init__(self, textDecorationLineStyle: _t.Any | None) -> None: ... # type: ignore[overload-cannot-match] + def __init__(self, text_decoration_line_style: _t.Any | None) -> None: ... # type: ignore[overload-cannot-match] @property def paragraph_style(self) -> _t.Any | None: """Kotlin property: androidx.compose.ui.text.PlatformTextStyle.paragraphStyle (androidx.compose.ui.text.PlatformTextStyle.paragraphStyle: androidx.compose.ui.text.PlatformParagraphStyle?)""" @@ -192,9 +208,9 @@ class PlatformTextStyle: class SpanStyle: """Kotlin: androidx.compose.ui.text.SpanStyle""" @_t.overload - def __init__(self, brush: pythonx.compose.ui.graphics.Brush | None, alpha: float, fontSize: _t.Any, fontWeight: _t.Any | None, fontStyle: _t.Any | None, fontSynthesis: _t.Any | None, fontFamily: _t.Any | None, fontFeatureSettings: str | None, letterSpacing: _t.Any, baselineShift: _t.Any | None, textGeometricTransform: _t.Any | None, localeList: _t.Any | None, background: _t.Any, textDecoration: _t.Any | None, shadow: pythonx.compose.ui.graphics.Shadow | None, platformStyle: _t.Any | None, drawStyle: _t.Any | None) -> None: ... + def __init__(self, brush: pythonx.compose.ui.graphics.Brush | None, alpha: float, font_size: _t.Any, font_weight: _t.Any | None, font_style: _t.Any | None, font_synthesis: _t.Any | None, font_family: _t.Any | None, font_feature_settings: str | None, letter_spacing: _t.Any, baseline_shift: _t.Any | None, text_geometric_transform: _t.Any | None, locale_list: _t.Any | None, background: _t.Any, text_decoration: _t.Any | None, shadow: pythonx.compose.ui.graphics.Shadow | None, platform_style: _t.Any | None, draw_style: _t.Any | None) -> None: ... @_t.overload - def __init__(self, color: _t.Any, fontSize: _t.Any, fontWeight: _t.Any | None, fontStyle: _t.Any | None, fontSynthesis: _t.Any | None, fontFamily: _t.Any | None, fontFeatureSettings: str | None, letterSpacing: _t.Any, baselineShift: _t.Any | None, textGeometricTransform: _t.Any | None, localeList: _t.Any | None, background: _t.Any, textDecoration: _t.Any | None, shadow: pythonx.compose.ui.graphics.Shadow | None, platformStyle: _t.Any | None, drawStyle: _t.Any | None) -> None: ... # type: ignore[overload-cannot-match] + def __init__(self, color: _t.Any, font_size: _t.Any, font_weight: _t.Any | None, font_style: _t.Any | None, font_synthesis: _t.Any | None, font_family: _t.Any | None, font_feature_settings: str | None, letter_spacing: _t.Any, baseline_shift: _t.Any | None, text_geometric_transform: _t.Any | None, locale_list: _t.Any | None, background: _t.Any, text_decoration: _t.Any | None, shadow: pythonx.compose.ui.graphics.Shadow | None, platform_style: _t.Any | None, draw_style: _t.Any | None) -> None: ... # type: ignore[overload-cannot-match] @property def alpha(self) -> float: """Kotlin property: androidx.compose.ui.text.SpanStyle.alpha (androidx.compose.ui.text.SpanStyle.alpha: kotlin.Float)""" @@ -313,7 +329,7 @@ class TextLayoutInput: class TextLayoutResult: """Kotlin: androidx.compose.ui.text.TextLayoutResult""" - def __init__(self, layoutInput: TextLayoutInput, multiParagraph: MultiParagraph, size: _t.Any) -> None: + def __init__(self, layout_input: TextLayoutInput, multi_paragraph: MultiParagraph, size: _t.Any) -> None: """Kotlin constructor: androidx.compose.ui.text.TextLayoutResult (androidx.compose.ui.text.TextLayoutResult(layoutInput: androidx.compose.ui.text.TextLayoutInput, multiParagraph: androidx.compose.ui.text.MultiParagraph, size: androidx.compose.ui.unit.IntSize): androidx.compose.ui.text.TextLayoutResult)""" ... @property @@ -355,7 +371,7 @@ class TextLayoutResult: class TextLinkStyles: """Kotlin: androidx.compose.ui.text.TextLinkStyles""" - def __init__(self, style: SpanStyle | None = ..., focusedStyle: SpanStyle | None = ..., hoveredStyle: SpanStyle | None = ..., pressedStyle: SpanStyle | None = ...) -> None: + def __init__(self, style: SpanStyle | None = ..., focused_style: SpanStyle | None = ..., hovered_style: SpanStyle | None = ..., pressed_style: SpanStyle | None = ...) -> None: """Kotlin constructor: androidx.compose.ui.text.TextLinkStyles (androidx.compose.ui.text.TextLinkStyles(style: androidx.compose.ui.text.SpanStyle?, focusedStyle: androidx.compose.ui.text.SpanStyle?, hoveredStyle: androidx.compose.ui.text.SpanStyle?, pressedStyle: androidx.compose.ui.text.SpanStyle?): androidx.compose.ui.text.TextLinkStyles)""" ... @property @@ -377,7 +393,7 @@ class TextLinkStyles: class TextMeasurer: """Kotlin: androidx.compose.ui.text.TextMeasurer""" - def __init__(self, defaultFontFamilyResolver: _t.Any, defaultDensity: _t.Any, defaultLayoutDirection: pythonx.compose.ui.unit.LayoutDirection, cacheSize: int = ...) -> None: + def __init__(self, default_font_family_resolver: _t.Any, default_density: _t.Any, default_layout_direction: pythonx.compose.ui.unit.LayoutDirection, cache_size: int = ...) -> None: """Kotlin constructor: androidx.compose.ui.text.TextMeasurer (androidx.compose.ui.text.TextMeasurer(defaultFontFamilyResolver: androidx.compose.ui.text.font.FontFamily.Resolver, defaultDensity: androidx.compose.ui.unit.Density, defaultLayoutDirection: androidx.compose.ui.unit.LayoutDirection, cacheSize: kotlin.Int): androidx.compose.ui.text.TextMeasurer)""" ... @@ -528,6 +544,10 @@ def to_upper_case__String_LocaleList(receiver: str, /, locale_list: _t.Any) -> s """Kotlin: kotlin.String.toUpperCase(localeList: androidx.compose.ui.text.intl.LocaleList): kotlin.String""" ... +AnnotatedString: _AnnotatedString_callable_module + +TextRange: _TextRange_callable_module + def MultiParagraph__MultiParagraphIntrinsics_Constraints_Int_TextOverflow(intrinsics: MultiParagraphIntrinsics, constraints: int, max_lines: int = ..., overflow: _t.Any = ...) -> MultiParagraph: """Kotlin: androidx.compose.ui.text.MultiParagraph(intrinsics: androidx.compose.ui.text.MultiParagraphIntrinsics, constraints: androidx.compose.ui.unit.Constraints, maxLines: kotlin.Int, overflow: androidx.compose.ui.text.style.TextOverflow): androidx.compose.ui.text.MultiParagraph""" ... @@ -552,21 +572,11 @@ def SpanStyle__Color_TextUnit_FontWeight_FontStyle_FontSynthesis_FontFamily_Stri """Kotlin: androidx.compose.ui.text.SpanStyle(color: androidx.compose.ui.graphics.Color, fontSize: androidx.compose.ui.unit.TextUnit, fontWeight: androidx.compose.ui.text.font.FontWeight?, fontStyle: androidx.compose.ui.text.font.FontStyle?, fontSynthesis: androidx.compose.ui.text.font.FontSynthesis?, fontFamily: androidx.compose.ui.text.font.FontFamily?, fontFeatureSettings: kotlin.String?, letterSpacing: androidx.compose.ui.unit.TextUnit, baselineShift: androidx.compose.ui.text.style.BaselineShift?, textGeometricTransform: androidx.compose.ui.text.style.TextGeometricTransform?, localeList: androidx.compose.ui.text.intl.LocaleList?, background: androidx.compose.ui.graphics.Color, textDecoration: androidx.compose.ui.text.style.TextDecoration?, shadow: androidx.compose.ui.graphics.Shadow?, platformStyle: androidx.compose.ui.text.PlatformSpanStyle?, drawStyle: androidx.compose.ui.graphics.drawscope.DrawStyle?): androidx.compose.ui.text.SpanStyle""" ... -@_t.overload -def AnnotatedString(text: str, paragraph_style: ParagraphStyle) -> _t.Any: ... -@_t.overload -def AnnotatedString(text: str, span_style: SpanStyle, paragraph_style: ParagraphStyle | None = ...) -> _t.Any: ... # type: ignore[overload-cannot-match] - @_t.overload def Paragraph(paragraph_intrinsics: ParagraphIntrinsics, constraints: int, max_lines: int = ..., overflow: _t.Any = ...) -> _t.Any: ... @_t.overload def Paragraph(paragraph_intrinsics: ParagraphIntrinsics, max_lines: int = ..., ellipsis: bool = ..., *, width: float) -> _t.Any: ... # type: ignore[overload-cannot-match] -@_t.overload -def TextRange(index: int) -> _t.Any: ... -@_t.overload -def TextRange(start: int, end: int) -> _t.Any: ... # type: ignore[overload-cannot-match] - @_t.overload def capitalize(receiver: _t.Any, /, locale_list: _t.Any = ...) -> _t.Any: ... @_t.overload diff --git a/pythonx/compose/ui/unit/__init__.pyi b/pythonx/compose/ui/unit/__init__.pyi index c10242d..8db6b6e 100644 --- a/pythonx/compose/ui/unit/__init__.pyi +++ b/pythonx/compose/ui/unit/__init__.pyi @@ -1,6 +1,54 @@ -# GENERATED by scripts/gen_stubs.py from python-multiplatform's Kotlin-named stubs (artifact kotlin-stubs, workflow run 37103737430, commit a5028618, Compose 1.11.1). Do not edit. +# GENERATED by scripts/gen_stubs.py from python-multiplatform's Kotlin-named stubs (artifact kotlin-stubs, workflow run 37131041879, commit 452cc807, Compose 1.11.1). Do not edit. import typing as _t +class _Constraints_callable_module(_t.Protocol): + """Kotlin: the function Constraints, and the members of the module Constraints""" + def __call__(self, min_width: int = ..., max_width: int = ..., min_height: int = ..., max_height: int = ...) -> _t.Any: ... + Infinity: int + +class _DpOffset_callable_module(_t.Protocol): + """Kotlin: the function DpOffset, and the members of the module DpOffset""" + def __call__(self, x: float, y: float) -> int: ... + Unspecified: int + Zero: int + +class _DpSize_callable_module(_t.Protocol): + """Kotlin: the function DpSize, and the members of the module DpSize""" + def __call__(self, width: float, height: float) -> _t.Any: ... + Unspecified: _t.Any + Zero: _t.Any + +class _IntOffset_callable_module(_t.Protocol): + """Kotlin: the function IntOffset, and the members of the module IntOffset""" + def __call__(self, x: int, y: int) -> int: ... + Max: int + Zero: int + +class _IntRect_callable_module(_t.Protocol): + """Kotlin: the function IntRect, and the members of the module IntRect""" + @_t.overload + def __call__(self, center: int, radius: int) -> _t.Any: ... + @_t.overload + def __call__(self, top_left: int, bottom_right: int) -> _t.Any: ... # type: ignore[overload-cannot-match] + @_t.overload + def __call__(self, offset: int, size: _t.Any) -> _t.Any: ... # type: ignore[overload-cannot-match] + Zero: _t.Any + +class _IntSize_callable_module(_t.Protocol): + """Kotlin: the function IntSize, and the members of the module IntSize""" + def __call__(self, width: int, height: int) -> int: ... + Zero: int + +class _TextUnit_callable_module(_t.Protocol): + """Kotlin: the function TextUnit, and the members of the module TextUnit""" + def __call__(self, value: float, type: int) -> _t.Any: ... + Unspecified: _t.Any + +class _Velocity_callable_module(_t.Protocol): + """Kotlin: the function Velocity, and the members of the module Velocity""" + def __call__(self, x: float, y: float) -> _t.Any: ... + Zero: _t.Any + class DpRect: """Kotlin: androidx.compose.ui.unit.DpRect""" @_t.overload @@ -46,26 +94,10 @@ class FontScalingLinear: class LayoutDirection: """Kotlin: androidx.compose.ui.unit.LayoutDirection""" -def Constraints(min_width: int = ..., max_width: int = ..., min_height: int = ..., max_height: int = ...) -> _t.Any: - """Kotlin: androidx.compose.ui.unit.Constraints(minWidth: kotlin.Int, maxWidth: kotlin.Int, minHeight: kotlin.Int, maxHeight: kotlin.Int): androidx.compose.ui.unit.Constraints""" - ... - def Density(density: float, font_scale: float = ...) -> _t.Any: """Kotlin: androidx.compose.ui.unit.Density(density: kotlin.Float, fontScale: kotlin.Float): androidx.compose.ui.unit.Density""" ... -def DpOffset(x: float, y: float) -> int: - """Kotlin: androidx.compose.ui.unit.DpOffset(x: androidx.compose.ui.unit.Dp, y: androidx.compose.ui.unit.Dp): androidx.compose.ui.unit.DpOffset""" - ... - -def DpSize(width: float, height: float) -> _t.Any: - """Kotlin: androidx.compose.ui.unit.DpSize(width: androidx.compose.ui.unit.Dp, height: androidx.compose.ui.unit.Dp): androidx.compose.ui.unit.DpSize""" - ... - -def IntOffset(x: int, y: int) -> int: - """Kotlin: androidx.compose.ui.unit.IntOffset(x: kotlin.Int, y: kotlin.Int): androidx.compose.ui.unit.IntOffset""" - ... - def IntRect__IntOffset_Int(center: int, radius: int) -> _t.Any: """Kotlin: androidx.compose.ui.unit.IntRect(center: androidx.compose.ui.unit.IntOffset, radius: kotlin.Int): androidx.compose.ui.unit.IntRect""" ... @@ -78,18 +110,6 @@ def IntRect__IntOffset_IntSize(offset: int, size: _t.Any) -> _t.Any: """Kotlin: androidx.compose.ui.unit.IntRect(offset: androidx.compose.ui.unit.IntOffset, size: androidx.compose.ui.unit.IntSize): androidx.compose.ui.unit.IntRect""" ... -def IntSize(width: int, height: int) -> int: - """Kotlin: androidx.compose.ui.unit.IntSize(width: kotlin.Int, height: kotlin.Int): androidx.compose.ui.unit.IntSize""" - ... - -def TextUnit(value: float, type: int) -> _t.Any: - """Kotlin: androidx.compose.ui.unit.TextUnit(value: kotlin.Float, type: androidx.compose.ui.unit.TextUnitType): androidx.compose.ui.unit.TextUnit""" - ... - -def Velocity(x: float, y: float) -> _t.Any: - """Kotlin: androidx.compose.ui.unit.Velocity(x: kotlin.Float, y: kotlin.Float): androidx.compose.ui.unit.Velocity""" - ... - def coerce_at_least(receiver: float, /, minimum_value: float) -> float: """Kotlin: androidx.compose.ui.unit.Dp.coerceAtLeast(minimumValue: androidx.compose.ui.unit.Dp): androidx.compose.ui.unit.Dp""" ... @@ -258,6 +278,22 @@ def to_size(receiver: _t.Any, /) -> int: """Kotlin: androidx.compose.ui.unit.IntSize.toSize(): androidx.compose.ui.geometry.Size""" ... +Constraints: _Constraints_callable_module + +DpOffset: _DpOffset_callable_module + +DpSize: _DpSize_callable_module + +IntOffset: _IntOffset_callable_module + +IntRect: _IntRect_callable_module + +IntSize: _IntSize_callable_module + +TextUnit: _TextUnit_callable_module + +Velocity: _Velocity_callable_module + def DpRect__DpOffset_DpSize(origin: int, size: _t.Any) -> DpRect: """Kotlin: androidx.compose.ui.unit.DpRect(origin: androidx.compose.ui.unit.DpOffset, size: androidx.compose.ui.unit.DpSize): androidx.compose.ui.unit.DpRect""" ... @@ -266,13 +302,6 @@ def DpRect__Dp_Dp_Dp_Dp(left: float, top: float, right: float, bottom: float) -> """Kotlin: androidx.compose.ui.unit.DpRect(left: androidx.compose.ui.unit.Dp, top: androidx.compose.ui.unit.Dp, right: androidx.compose.ui.unit.Dp, bottom: androidx.compose.ui.unit.Dp): androidx.compose.ui.unit.DpRect""" ... -@_t.overload -def IntRect(center: int, radius: int) -> _t.Any: ... -@_t.overload -def IntRect(top_left: int, bottom_right: int) -> _t.Any: ... # type: ignore[overload-cannot-match] -@_t.overload -def IntRect(offset: int, size: _t.Any) -> _t.Any: ... # type: ignore[overload-cannot-match] - @_t.overload def constrain(receiver: int, /, other_constraints: int) -> _t.Any: ... @_t.overload diff --git a/scripts/gen_stubs.py b/scripts/gen_stubs.py index d1414e3..ab29ed9 100644 --- a/scripts/gen_stubs.py +++ b/scripts/gen_stubs.py @@ -17,12 +17,17 @@ input with explicit overloads only (`padding__Dp`, the first upstream format) also gets `@overload`s of the base name, fewest parameters first because a type checker takes the first match; -- a stub class keeps its name. Its members are renamed with `python_name`, which is the binder's - member-resolver rule, and the parameters of a member's callable protocol are snake_case like a - module function's, because the resolver also translates a method's keywords (the receiver and +- a stub class keeps its name. Its members are renamed with `python_name`, the binder's own + rule since #131, and the parameters of a member's callable protocol are snake_case like a + module function's, because the binder also translates a method's keywords (the receiver and anonymous slots keep their names). The stubs are Pythonic-only: a method's Kotlin keyword still works at run time and is a type error here. A static method (a function of a Kotlin object) is reached through `KotlinObject`, so its parameters are snake_case too; +- the binder's own alias names (python-multiplatform #131: `fill_max_width = fillMaxWidth` in a module + stub, an alias `ClassVar` or property per proxy member) are not carried over. Renaming the + Kotlin-named declaration by the rule above gives the same name, so each name is declared once and + no Kotlin second name or self-referential line remains. A name the binder declares as a callable + module (`PaddingValues: _PaddingValues_callable_module`) gets no base-name overloads beside it; - a Kotlin object served as a sub-package (`Alignment`) becomes a class in its parent module's stub, whether the input has it as `/__init__.pyi` or already as a class in the parent stub (python-multiplatform #44). A sub-package directory holding only `__init__.pyi` would be a @@ -188,6 +193,39 @@ def _is_static(function: ast.FunctionDef) -> bool: return any(ast.unparse(d) == "staticmethod" for d in function.decorator_list) +def _is_alias_line(node: ast.stmt) -> bool: + """`fill_max_width = fillMaxWidth`, the binder's own snake_case name (python-multiplatform #131). + + The generator names every declaration by the same rule, so the line adds nothing: dropped. + """ + return isinstance(node, ast.Assign) and isinstance(node.value, ast.Name) and all( + isinstance(target, ast.Name) for target in node.targets + ) + + +def _without_repeats(body: list[ast.stmt]) -> list[ast.stmt]: + """[body] without a member that repeats the one before it under the same name. + + The binder's alias member (`fill_max_width` beside `fillMaxWidth`, python-multiplatform #131) + is, once both are renamed, the same declaration twice. A member keeps its docstring statement. + """ + seen: set[str] = set() + kept: list[ast.stmt] = [] + skipping = False + for node in body: + if isinstance(node, ast.Expr) and kept and (skipping or isinstance(kept[-1], ast.AnnAssign)): + if not skipping: + kept.append(node) + continue + key = ast.dump(node) + skipping = key in seen and not isinstance(node, ast.ClassDef) + if skipping: + continue + seen.add(key) + kept.append(node) + return kept + + def _is_protocol(cls: ast.ClassDef) -> bool: return any(ast.unparse(base) in (f"{TYPING}.Protocol", "Protocol") for base in cls.bases) @@ -416,7 +454,7 @@ def convert(self, source: str, kotlin_package: str = "", module_name: str = "") body: list[ast.stmt] = [] explicit: dict[str, list[ast.FunctionDef]] = {} for node in tree.body: - if isinstance(node, (ast.Import, ast.ImportFrom)): + if isinstance(node, (ast.Import, ast.ImportFrom)) or _is_alias_line(node): continue if isinstance(node, ast.FunctionDef): node.name = python_name(node.name) @@ -431,7 +469,12 @@ def convert(self, source: str, kotlin_package: str = "", module_name: str = "") self._convert_class(node) body.append(node) - defined = {node.name for node in body if isinstance(node, ast.FunctionDef)} + # A name the binder declares as a callable module (`PaddingValues: _PaddingValues_callable_module`) + # is that declaration; its explicit overloads are the protocol's `__call__`, not a second name. + defined = {node.name for node in body if isinstance(node, ast.FunctionDef)} | { + node.target.id for node in body + if isinstance(node, ast.AnnAssign) and isinstance(node.target, ast.Name) + } classes = {node.name for node in body if isinstance(node, ast.ClassDef)} for base, variants in explicit.items(): if base in defined: @@ -492,6 +535,7 @@ def _convert_class(self, cls: ast.ClassDef) -> None: _rename_arguments(member.args) elif isinstance(member, ast.ClassDef): self._convert_class(member) + cls.body = _without_repeats(cls.body) def _add_object(self, body: list[ast.stmt], kotlin_package: str, name: str, imported: set[str]) -> None: """Fold the object stub `//__init__.pyi` into a class of the parent.""" diff --git a/tests/fixtures/kotlin_stubs_v5/androidx/compose/foundation/layout/__init__.pyi b/tests/fixtures/kotlin_stubs_v5/androidx/compose/foundation/layout/__init__.pyi new file mode 100644 index 0000000..5d0ba50 --- /dev/null +++ b/tests/fixtures/kotlin_stubs_v5/androidx/compose/foundation/layout/__init__.pyi @@ -0,0 +1,35 @@ +# GENERATED by python-multiplatform-gradle-plugin. Do not edit. + +import typing as _t +import androidx.compose.ui + +class _PaddingValues_callable_module(_t.Protocol): + """Kotlin: the function PaddingValues, and the members of the module PaddingValues""" + def __call__(self, all: float) -> _t.Any: ... + Zero: _t.Any + +def Column(verticalAlignment: androidx.compose.ui.Alignment.Vertical = ..., *, content: _t.Callable[[], None]) -> None: + """Kotlin: androidx.compose.foundation.layout.Column(verticalAlignment: androidx.compose.ui.Alignment.Vertical, content: kotlin.Function0): kotlin.Unit""" + ... + +def fillMaxWidth(receiver: androidx.compose.ui.Modifier, /, fraction: float = ...) -> androidx.compose.ui.Modifier: + """Kotlin: androidx.compose.ui.Modifier.fillMaxWidth(fraction: kotlin.Float): androidx.compose.ui.Modifier""" + ... + +def fillMaxHeight(receiver: androidx.compose.ui.Modifier, /, fraction: float = ...) -> androidx.compose.ui.Modifier: + """Kotlin: androidx.compose.ui.Modifier.fillMaxHeight(fraction: kotlin.Float): androidx.compose.ui.Modifier""" + ... + +def scrollable(receiver: androidx.compose.ui.Modifier, /, state: _t.Any, enabled: bool = ..., on_click: _t.Callable[[], None] = ...) -> androidx.compose.ui.Modifier: + """Kotlin: androidx.compose.ui.Modifier.scrollable(state: kotlin.Any, enabled: kotlin.Boolean, onClick: kotlin.Function0): androidx.compose.ui.Modifier""" + ... + +def PaddingValues__Dp(all: float) -> _t.Any: + """Kotlin: androidx.compose.foundation.layout.PaddingValues(all: androidx.compose.ui.unit.Dp): androidx.compose.foundation.layout.PaddingValues""" + ... + +PaddingValues: _PaddingValues_callable_module + +fill_max_height = fillMaxHeight + +fill_max_width = fillMaxWidth diff --git a/tests/fixtures/kotlin_stubs_v5/androidx/compose/ui/__init__.pyi b/tests/fixtures/kotlin_stubs_v5/androidx/compose/ui/__init__.pyi new file mode 100644 index 0000000..7698b6c --- /dev/null +++ b/tests/fixtures/kotlin_stubs_v5/androidx/compose/ui/__init__.pyi @@ -0,0 +1,44 @@ +# GENERATED by python-multiplatform-gradle-plugin. Do not edit. + +import typing as _t +import androidx.compose.ui.unit + +class _Modifier_fillMaxWidth(_t.Protocol): + def __call__(self, fraction: float = ...) -> Modifier: ... + +class _Modifier_onClick(_t.Protocol): + def __call__(self, enabled: bool = ..., on_click: _t.Callable[[], None] = ...) -> Modifier: ... + +class Modifier: + """Kotlin: androidx.compose.ui.Modifier""" + fillMaxWidth: _t.ClassVar[_Modifier_fillMaxWidth] + onClick: _t.ClassVar[_Modifier_onClick] + fill_max_width: _t.ClassVar[_Modifier_fillMaxWidth] + on_click: _t.ClassVar[_Modifier_onClick] + +class Scene: + """Kotlin: androidx.compose.ui.Scene""" + @property + def layoutDirection(self) -> androidx.compose.ui.unit.LayoutDirection: + """Kotlin property: androidx.compose.ui.Scene.layoutDirection (androidx.compose.ui.Scene.layoutDirection: androidx.compose.ui.unit.LayoutDirection)""" + ... + @layoutDirection.setter + def layoutDirection(self, value: androidx.compose.ui.unit.LayoutDirection) -> None: + """Kotlin property: androidx.compose.ui.Scene.layoutDirection=""" + ... + @property + def isMinimized(self) -> bool: + """Kotlin property: androidx.compose.ui.Scene.isMinimized (androidx.compose.ui.Scene.isMinimized: kotlin.Boolean)""" + ... + @property + def layout_direction(self) -> androidx.compose.ui.unit.LayoutDirection: + """Kotlin property: androidx.compose.ui.Scene.layoutDirection (androidx.compose.ui.Scene.layoutDirection: androidx.compose.ui.unit.LayoutDirection)""" + ... + @layout_direction.setter + def layout_direction(self, value: androidx.compose.ui.unit.LayoutDirection) -> None: + """Kotlin property: androidx.compose.ui.Scene.layoutDirection=""" + ... + @property + def is_minimized(self) -> bool: + """Kotlin property: androidx.compose.ui.Scene.isMinimized (androidx.compose.ui.Scene.isMinimized: kotlin.Boolean)""" + ... diff --git a/tests/test_stubs.py b/tests/test_stubs.py index c1dd33e..16fa412 100644 --- a/tests/test_stubs.py +++ b/tests/test_stubs.py @@ -40,6 +40,7 @@ class per bound Kotlin type with its extension members as `ClassVar`s of callabl KOTLIN_STUBS_V2 = HERE / "fixtures" / "kotlin_stubs_v2" KOTLIN_STUBS_V3 = HERE / "fixtures" / "kotlin_stubs_v3" KOTLIN_STUBS_V4 = HERE / "fixtures" / "kotlin_stubs_v4" +KOTLIN_STUBS_V5 = HERE / "fixtures" / "kotlin_stubs_v5" ARTEFACT = REPO / ".tmp" / "kotlin-stubs.zip" PACKAGE = REPO / "pythonx" COMPOSE = PACKAGE / "compose" @@ -411,6 +412,65 @@ def test_a_class_with_no_such_constants_gets_no_groups(self): self.assertEqual({}, _nested(cls)) +class TheBindersOwnAliases(unittest.TestCase): + """The format of python-multiplatform #131: the binder writes its snake_case aliases itself. + + A module stub carries `fill_max_width = fillMaxWidth` beside the Kotlin-named def, and a proxy + class carries an extra `ClassVar` or property per member. The pythonx stubs stay Pythonic-only: + one name per declaration, no Kotlin second name, no self-referential line. + """ + + def setUp(self): + self.stubs = _generated(KOTLIN_STUBS_V5) + + def test_a_module_function_has_one_declaration_under_its_pythonic_name(self): + functions = _functions(self.stubs[LAYOUT]) + for name in ("fill_max_width", "fill_max_height", "scrollable"): + with self.subTest(name=name): + self.assertEqual(1, len(functions[name])) + self.assertNotIn("fillMaxWidth", functions) + + def test_the_binders_alias_lines_are_not_carried_over(self): + tree = ast.parse(self.stubs[LAYOUT]) + self.assertEqual([], [ast.unparse(n) for n in tree.body if isinstance(n, ast.Assign)]) + + def test_a_module_the_binder_calls_has_no_second_declaration_of_its_name(self): + """`PaddingValues: _PaddingValues_callable_module` is the name; its explicit overloads add no `def`.""" + text = self.stubs[LAYOUT] + self.assertNotIn("PaddingValues", _functions(text)) + self.assertEqual(1, sum(line.startswith("PaddingValues:") for line in text.splitlines())) + self.assertIn("class _PaddingValues_callable_module", text) + + def test_no_line_assigns_a_name_to_itself(self): + for path, text in self.stubs.items(): + for line in text.splitlines(): + left, sep, right = line.partition(" = ") + with self.subTest(path=path.relative_to(PACKAGE).as_posix(), line=line): + self.assertFalse(sep and left.isidentifier() and left == right.strip()) + + def test_a_proxy_class_has_each_member_once_under_its_pythonic_name(self): + modifier = _classes(self.stubs[UI])["Modifier"] + names = [n.target.id for n in modifier.body if isinstance(n, ast.AnnAssign)] + self.assertEqual(["fill_max_width", "on_click"], names) + + def test_a_property_and_its_setter_are_kept_once(self): + scene = _classes(self.stubs[UI])["Scene"] + functions = [n for n in scene.body if isinstance(n, ast.FunctionDef)] + self.assertEqual(["layout_direction", "layout_direction", "is_minimized"], [f.name for f in functions]) + self.assertEqual( + [["property"], ["layout_direction.setter"], ["property"]], + [[ast.unparse(d) for d in f.decorator_list] for f in functions], + ) + + def test_keywords_the_binder_already_wrote_in_snake_case_stay_unchanged(self): + scrollable = _functions(self.stubs[LAYOUT])["scrollable"][0] + self.assertEqual(["receiver", "state", "enabled", "on_click"], _parameter_names(scrollable)) + for name in ("on_click", "fill_max_width", "max_height", "index_in_line", "always_show_label"): + with self.subTest(name=name): + self.assertEqual(name, gen_stubs.python_name(name)) + self.assertEqual(name, gen_stubs.snake_case(name)) + + class TheObjectAndPropertyFormat(unittest.TestCase): """The upstream format of python-multiplatform #53 (objects), #38 (properties) and #44."""