pyzed-ui 0.2.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (190) hide show
  1. pyzed_ui-0.2.0/.github/workflows/ci.yml +82 -0
  2. pyzed_ui-0.2.0/.github/workflows/docs.yml +91 -0
  3. pyzed_ui-0.2.0/.github/workflows/pr-title.yml +33 -0
  4. pyzed_ui-0.2.0/.github/workflows/release.yml +202 -0
  5. pyzed_ui-0.2.0/.gitignore +9 -0
  6. pyzed_ui-0.2.0/CHANGELOG.md +54 -0
  7. pyzed_ui-0.2.0/Cargo.lock +5422 -0
  8. pyzed_ui-0.2.0/Cargo.toml +44 -0
  9. pyzed_ui-0.2.0/LICENSE +21 -0
  10. pyzed_ui-0.2.0/PKG-INFO +229 -0
  11. pyzed_ui-0.2.0/README.md +210 -0
  12. pyzed_ui-0.2.0/RELEASING.md +58 -0
  13. pyzed_ui-0.2.0/assets/fonts/IBMPlexMono-Medium.ttf +0 -0
  14. pyzed_ui-0.2.0/assets/fonts/IBMPlexMono-Regular.ttf +0 -0
  15. pyzed_ui-0.2.0/assets/fonts/IBMPlexSans-Medium.ttf +0 -0
  16. pyzed_ui-0.2.0/assets/fonts/IBMPlexSans-Regular.ttf +0 -0
  17. pyzed_ui-0.2.0/assets/fonts/IBMPlexSans-SemiBold.ttf +0 -0
  18. pyzed_ui-0.2.0/assets/fonts/LICENSE-IBM-Plex.txt +93 -0
  19. pyzed_ui-0.2.0/assets/fonts/LICENSE-Lucide.txt +43 -0
  20. pyzed_ui-0.2.0/assets/fonts/lucide.ttf +0 -0
  21. pyzed_ui-0.2.0/cliff.toml +58 -0
  22. pyzed_ui-0.2.0/docs/.gitignore +5 -0
  23. pyzed_ui-0.2.0/docs/astro.config.mjs +55 -0
  24. pyzed_ui-0.2.0/docs/package-lock.json +5051 -0
  25. pyzed_ui-0.2.0/docs/package.json +16 -0
  26. pyzed_ui-0.2.0/docs/public/favicon.svg +5 -0
  27. pyzed_ui-0.2.0/docs/screenshots/components-dark.png +0 -0
  28. pyzed_ui-0.2.0/docs/screenshots/components-light.png +0 -0
  29. pyzed_ui-0.2.0/docs/screenshots/counter.png +0 -0
  30. pyzed_ui-0.2.0/docs/screenshots/zed-command-palette.png +0 -0
  31. pyzed_ui-0.2.0/docs/screenshots/zed-file-finder.png +0 -0
  32. pyzed_ui-0.2.0/docs/screenshots/zed-one-dark.png +0 -0
  33. pyzed_ui-0.2.0/docs/screenshots/zed-one-light.png +0 -0
  34. pyzed_ui-0.2.0/docs/scripts/api_docs.py +1261 -0
  35. pyzed_ui-0.2.0/docs/scripts/component_shots.py +373 -0
  36. pyzed_ui-0.2.0/docs/scripts/example_shots.py +114 -0
  37. pyzed_ui-0.2.0/docs/scripts/gen_api.py +175 -0
  38. pyzed_ui-0.2.0/docs/scripts/sync-changelog.mjs +66 -0
  39. pyzed_ui-0.2.0/docs/src/assets/components/badges.png +0 -0
  40. pyzed_ui-0.2.0/docs/src/assets/components/buttons.png +0 -0
  41. pyzed_ui-0.2.0/docs/src/assets/components/card.png +0 -0
  42. pyzed_ui-0.2.0/docs/src/assets/components/charts.png +0 -0
  43. pyzed_ui-0.2.0/docs/src/assets/components/content.png +0 -0
  44. pyzed_ui-0.2.0/docs/src/assets/components/controls.png +0 -0
  45. pyzed_ui-0.2.0/docs/src/assets/components/editor.png +0 -0
  46. pyzed_ui-0.2.0/docs/src/assets/components/empty.png +0 -0
  47. pyzed_ui-0.2.0/docs/src/assets/components/feedback.png +0 -0
  48. pyzed_ui-0.2.0/docs/src/assets/components/forms.png +0 -0
  49. pyzed_ui-0.2.0/docs/src/assets/components/list.png +0 -0
  50. pyzed_ui-0.2.0/docs/src/assets/components/media.png +0 -0
  51. pyzed_ui-0.2.0/docs/src/assets/components/menu.png +0 -0
  52. pyzed_ui-0.2.0/docs/src/assets/components/modal.png +0 -0
  53. pyzed_ui-0.2.0/docs/src/assets/components/palette.png +0 -0
  54. pyzed_ui-0.2.0/docs/src/assets/components/split.png +0 -0
  55. pyzed_ui-0.2.0/docs/src/assets/components/table.png +0 -0
  56. pyzed_ui-0.2.0/docs/src/assets/components/tabs.png +0 -0
  57. pyzed_ui-0.2.0/docs/src/assets/components/terminal.png +0 -0
  58. pyzed_ui-0.2.0/docs/src/assets/components/text.png +0 -0
  59. pyzed_ui-0.2.0/docs/src/assets/components/toasts.png +0 -0
  60. pyzed_ui-0.2.0/docs/src/assets/components/tree.png +0 -0
  61. pyzed_ui-0.2.0/docs/src/assets/components/workspace.png +0 -0
  62. pyzed_ui-0.2.0/docs/src/assets/examples/clock.png +0 -0
  63. pyzed_ui-0.2.0/docs/src/assets/examples/image_viewer.png +0 -0
  64. pyzed_ui-0.2.0/docs/src/assets/examples/markdown_viewer.png +0 -0
  65. pyzed_ui-0.2.0/docs/src/assets/examples/qr_code.png +0 -0
  66. pyzed_ui-0.2.0/docs/src/assets/examples/stopwatch.png +0 -0
  67. pyzed_ui-0.2.0/docs/src/assets/examples/todos.png +0 -0
  68. pyzed_ui-0.2.0/docs/src/assets/logo.svg +5 -0
  69. pyzed_ui-0.2.0/docs/src/assets/tutorials/downloads.png +0 -0
  70. pyzed_ui-0.2.0/docs/src/assets/tutorials/game-of-life.png +0 -0
  71. pyzed_ui-0.2.0/docs/src/assets/tutorials/mini-editor-palette.png +0 -0
  72. pyzed_ui-0.2.0/docs/src/assets/tutorials/mini-editor.png +0 -0
  73. pyzed_ui-0.2.0/docs/src/assets/tutorials/multi-window.png +0 -0
  74. pyzed_ui-0.2.0/docs/src/assets/tutorials/step1.png +0 -0
  75. pyzed_ui-0.2.0/docs/src/assets/tutorials/step2.png +0 -0
  76. pyzed_ui-0.2.0/docs/src/assets/tutorials/step3.png +0 -0
  77. pyzed_ui-0.2.0/docs/src/assets/tutorials/step4.png +0 -0
  78. pyzed_ui-0.2.0/docs/src/assets/tutorials/step5.png +0 -0
  79. pyzed_ui-0.2.0/docs/src/assets/tutorials/styling.png +0 -0
  80. pyzed_ui-0.2.0/docs/src/assets/tutorials/todo.png +0 -0
  81. pyzed_ui-0.2.0/docs/src/components/LatestRelease.astro +51 -0
  82. pyzed_ui-0.2.0/docs/src/components/SiteTitle.astro +35 -0
  83. pyzed_ui-0.2.0/docs/src/content/docs/components/basics.md +100 -0
  84. pyzed_ui-0.2.0/docs/src/content/docs/components/code.md +66 -0
  85. pyzed_ui-0.2.0/docs/src/content/docs/components/content.md +90 -0
  86. pyzed_ui-0.2.0/docs/src/content/docs/components/controls.md +50 -0
  87. pyzed_ui-0.2.0/docs/src/content/docs/components/data.md +87 -0
  88. pyzed_ui-0.2.0/docs/src/content/docs/components/forms.md +77 -0
  89. pyzed_ui-0.2.0/docs/src/content/docs/components/lists.md +99 -0
  90. pyzed_ui-0.2.0/docs/src/content/docs/components/navigation.md +71 -0
  91. pyzed_ui-0.2.0/docs/src/content/docs/components/overlays.md +125 -0
  92. pyzed_ui-0.2.0/docs/src/content/docs/components/overview.md +56 -0
  93. pyzed_ui-0.2.0/docs/src/content/docs/components/workspace.md +70 -0
  94. pyzed_ui-0.2.0/docs/src/content/docs/examples.md +89 -0
  95. pyzed_ui-0.2.0/docs/src/content/docs/getting-started/installation.mdx +88 -0
  96. pyzed_ui-0.2.0/docs/src/content/docs/getting-started/introduction.md +40 -0
  97. pyzed_ui-0.2.0/docs/src/content/docs/getting-started/new-project.md +47 -0
  98. pyzed_ui-0.2.0/docs/src/content/docs/getting-started/quickstart.md +105 -0
  99. pyzed_ui-0.2.0/docs/src/content/docs/guides/architecture.md +134 -0
  100. pyzed_ui-0.2.0/docs/src/content/docs/guides/async.md +150 -0
  101. pyzed_ui-0.2.0/docs/src/content/docs/guides/canvas.md +78 -0
  102. pyzed_ui-0.2.0/docs/src/content/docs/guides/commands.md +125 -0
  103. pyzed_ui-0.2.0/docs/src/content/docs/guides/contributing-docs.md +52 -0
  104. pyzed_ui-0.2.0/docs/src/content/docs/guides/how-it-works.md +55 -0
  105. pyzed_ui-0.2.0/docs/src/content/docs/guides/icons-fonts.md +59 -0
  106. pyzed_ui-0.2.0/docs/src/content/docs/guides/keyboard.md +53 -0
  107. pyzed_ui-0.2.0/docs/src/content/docs/guides/layout.md +107 -0
  108. pyzed_ui-0.2.0/docs/src/content/docs/guides/testing.md +51 -0
  109. pyzed_ui-0.2.0/docs/src/content/docs/guides/theming.md +131 -0
  110. pyzed_ui-0.2.0/docs/src/content/docs/guides/windows.md +123 -0
  111. pyzed_ui-0.2.0/docs/src/content/docs/index.mdx +96 -0
  112. pyzed_ui-0.2.0/docs/src/content/docs/reference/app.md +212 -0
  113. pyzed_ui-0.2.0/docs/src/content/docs/reference/cli.md +33 -0
  114. pyzed_ui-0.2.0/docs/src/content/docs/reference/command.md +285 -0
  115. pyzed_ui-0.2.0/docs/src/content/docs/reference/draw.md +288 -0
  116. pyzed_ui-0.2.0/docs/src/content/docs/reference/icons.md +71 -0
  117. pyzed_ui-0.2.0/docs/src/content/docs/reference/theme.md +381 -0
  118. pyzed_ui-0.2.0/docs/src/content/docs/reference/ui.md +1587 -0
  119. pyzed_ui-0.2.0/docs/src/content/docs/reference/widgets.md +1167 -0
  120. pyzed_ui-0.2.0/docs/src/content/docs/tutorials/background-tasks.mdx +95 -0
  121. pyzed_ui-0.2.0/docs/src/content/docs/tutorials/step-by-step.mdx +85 -0
  122. pyzed_ui-0.2.0/docs/src/content/docs/tutorials/todo-app.mdx +108 -0
  123. pyzed_ui-0.2.0/docs/src/content/docs/tutorials/zed-like-editor.mdx +110 -0
  124. pyzed_ui-0.2.0/docs/src/content.config.ts +7 -0
  125. pyzed_ui-0.2.0/docs/src/styles/custom.css +80 -0
  126. pyzed_ui-0.2.0/docs/tsconfig.json +5 -0
  127. pyzed_ui-0.2.0/examples/clock.py +64 -0
  128. pyzed_ui-0.2.0/examples/context_menu.py +65 -0
  129. pyzed_ui-0.2.0/examples/counter.py +42 -0
  130. pyzed_ui-0.2.0/examples/download_progress.py +107 -0
  131. pyzed_ui-0.2.0/examples/downloads.py +106 -0
  132. pyzed_ui-0.2.0/examples/gallery.py +240 -0
  133. pyzed_ui-0.2.0/examples/game_of_life.py +107 -0
  134. pyzed_ui-0.2.0/examples/image_viewer.py +73 -0
  135. pyzed_ui-0.2.0/examples/markdown_viewer.py +65 -0
  136. pyzed_ui-0.2.0/examples/mini_editor.py +154 -0
  137. pyzed_ui-0.2.0/examples/multi_window.py +88 -0
  138. pyzed_ui-0.2.0/examples/panes.py +88 -0
  139. pyzed_ui-0.2.0/examples/qr_code.py +31 -0
  140. pyzed_ui-0.2.0/examples/screenshots.py +77 -0
  141. pyzed_ui-0.2.0/examples/stopwatch.py +79 -0
  142. pyzed_ui-0.2.0/examples/styling.py +103 -0
  143. pyzed_ui-0.2.0/examples/todo.py +123 -0
  144. pyzed_ui-0.2.0/examples/todos.py +137 -0
  145. pyzed_ui-0.2.0/examples/tutorial/README.md +69 -0
  146. pyzed_ui-0.2.0/examples/tutorial/step1_hello.py +19 -0
  147. pyzed_ui-0.2.0/examples/tutorial/step2_state.py +43 -0
  148. pyzed_ui-0.2.0/examples/tutorial/step3_layout.py +42 -0
  149. pyzed_ui-0.2.0/examples/tutorial/step4_async.py +51 -0
  150. pyzed_ui-0.2.0/examples/tutorial/step5_notes.py +64 -0
  151. pyzed_ui-0.2.0/examples/websocket_stream.py +65 -0
  152. pyzed_ui-0.2.0/examples/zed_editor.py +444 -0
  153. pyzed_ui-0.2.0/pyproject.toml +32 -0
  154. pyzed_ui-0.2.0/python/pyzed/__init__.py +155 -0
  155. pyzed_ui-0.2.0/python/pyzed/__main__.py +5 -0
  156. pyzed_ui-0.2.0/python/pyzed/_async.py +106 -0
  157. pyzed_ui-0.2.0/python/pyzed/_lucide.py +2183 -0
  158. pyzed_ui-0.2.0/python/pyzed/app.py +159 -0
  159. pyzed_ui-0.2.0/python/pyzed/cli.py +48 -0
  160. pyzed_ui-0.2.0/python/pyzed/draw.py +164 -0
  161. pyzed_ui-0.2.0/python/pyzed/icons.py +96 -0
  162. pyzed_ui-0.2.0/python/pyzed/templates/app.py.tmpl +82 -0
  163. pyzed_ui-0.2.0/python/pyzed/theme.py +912 -0
  164. pyzed_ui-0.2.0/python/pyzed/ui/__init__.py +140 -0
  165. pyzed_ui-0.2.0/python/pyzed/ui/base.py +360 -0
  166. pyzed_ui-0.2.0/python/pyzed/ui/controls.py +313 -0
  167. pyzed_ui-0.2.0/python/pyzed/ui/display.py +470 -0
  168. pyzed_ui-0.2.0/python/pyzed/ui/editor.py +152 -0
  169. pyzed_ui-0.2.0/python/pyzed/ui/inputs.py +181 -0
  170. pyzed_ui-0.2.0/python/pyzed/ui/lists.py +255 -0
  171. pyzed_ui-0.2.0/python/pyzed/ui/navigation.py +183 -0
  172. pyzed_ui-0.2.0/python/pyzed/ui/overlays.py +299 -0
  173. pyzed_ui-0.2.0/python/pyzed/ui/workspace.py +215 -0
  174. pyzed_ui-0.2.0/python/pyzed/zed_themes/LICENSE +73 -0
  175. pyzed_ui-0.2.0/python/pyzed/zed_themes/ayu.json +1228 -0
  176. pyzed_ui-0.2.0/python/pyzed/zed_themes/gruvbox.json +2539 -0
  177. pyzed_ui-0.2.0/python/pyzed/zed_themes/one.json +843 -0
  178. pyzed_ui-0.2.0/scripts/changelog.py +127 -0
  179. pyzed_ui-0.2.0/src/app.rs +1338 -0
  180. pyzed_ui-0.2.0/src/editor.rs +635 -0
  181. pyzed_ui-0.2.0/src/extra.rs +1749 -0
  182. pyzed_ui-0.2.0/src/fonts.rs +47 -0
  183. pyzed_ui-0.2.0/src/highlighter.rs +243 -0
  184. pyzed_ui-0.2.0/src/lib.rs +29 -0
  185. pyzed_ui-0.2.0/src/render.rs +953 -0
  186. pyzed_ui-0.2.0/src/sticky.rs +836 -0
  187. pyzed_ui-0.2.0/src/style.rs +349 -0
  188. pyzed_ui-0.2.0/src/widget.rs +1259 -0
  189. pyzed_ui-0.2.0/tests/test_features.py +395 -0
  190. pyzed_ui-0.2.0/tests/test_pyzed.py +112 -0
@@ -0,0 +1,82 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ workflow_dispatch:
8
+
9
+ concurrency:
10
+ group: ci-${{ github.ref }}
11
+ cancel-in-progress: ${{ github.event_name == 'pull_request' }}
12
+
13
+ permissions:
14
+ contents: read
15
+
16
+ jobs:
17
+ test:
18
+ name: Lint y tests (Linux)
19
+ runs-on: ubuntu-latest
20
+ steps:
21
+ - uses: actions/checkout@v4
22
+ - uses: actions/setup-python@v5
23
+ with:
24
+ python-version: "3.12"
25
+ - uses: dtolnay/rust-toolchain@stable
26
+ with:
27
+ components: clippy, rustfmt
28
+ - uses: Swatinem/rust-cache@v2
29
+ - name: Lint Rust
30
+ run: |
31
+ cargo fmt --check
32
+ cargo clippy -- -D warnings
33
+ - name: Build and install
34
+ run: |
35
+ python -m venv .venv
36
+ .venv/bin/pip install maturin pytest
37
+ .venv/bin/maturin develop --release
38
+ - name: Run tests
39
+ run: .venv/bin/python -m pytest -q tests
40
+
41
+ wheels:
42
+ name: Wheel (${{ matrix.os }})
43
+ runs-on: ${{ matrix.os }}
44
+ strategy:
45
+ fail-fast: false
46
+ matrix:
47
+ os: [ubuntu-latest, macos-latest, windows-latest]
48
+ steps:
49
+ - uses: actions/checkout@v4
50
+ - uses: actions/setup-python@v5
51
+ with:
52
+ python-version: "3.12"
53
+ - uses: PyO3/maturin-action@v1
54
+ with:
55
+ command: build
56
+ args: --release --out dist
57
+ manylinux: "2_28"
58
+ - name: Test the wheel
59
+ shell: bash
60
+ run: |
61
+ python -m pip install pytest
62
+ python -m pip install --no-index --find-links dist pyzed-ui
63
+ python -m pytest -q tests
64
+ - uses: actions/upload-artifact@v4
65
+ with:
66
+ name: wheel-${{ matrix.os }}
67
+ path: dist/*.whl
68
+
69
+ changelog:
70
+ name: Changelog
71
+ runs-on: ubuntu-latest
72
+ steps:
73
+ - uses: actions/checkout@v4
74
+ with:
75
+ fetch-depth: 0
76
+ - uses: actions/setup-python@v5
77
+ with:
78
+ python-version: "3.12"
79
+ - name: Generate changelog
80
+ run: |
81
+ python -m pip install git-cliff
82
+ python scripts/changelog.py --preview | tee -a "$GITHUB_STEP_SUMMARY"
@@ -0,0 +1,91 @@
1
+ name: Docs
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ paths:
7
+ - "docs/**"
8
+ - "CHANGELOG.md"
9
+ - "examples/**"
10
+ - "python/**"
11
+ - "src/**"
12
+ - ".github/workflows/docs.yml"
13
+ pull_request:
14
+ paths:
15
+ - "docs/**"
16
+ - "CHANGELOG.md"
17
+ - "examples/**"
18
+ - "python/**"
19
+ - "src/**"
20
+ - ".github/workflows/docs.yml"
21
+ release:
22
+ types: [published]
23
+ workflow_dispatch:
24
+
25
+ permissions:
26
+ contents: read
27
+
28
+ concurrency:
29
+ group: docs-${{ github.ref }}
30
+ cancel-in-progress: true
31
+
32
+ jobs:
33
+ build:
34
+ name: Build site
35
+ runs-on: ubuntu-latest
36
+ steps:
37
+ - uses: actions/checkout@v4
38
+ - uses: actions/setup-node@v4
39
+ with:
40
+ node-version: 22
41
+ cache: npm
42
+ cache-dependency-path: docs/package-lock.json
43
+ - name: Install
44
+ working-directory: docs
45
+ run: npm ci
46
+ - name: Build (reads CHANGELOG.md and marks the latest stable release)
47
+ working-directory: docs
48
+ run: npm run build
49
+ - uses: actions/upload-pages-artifact@v3
50
+ with:
51
+ path: docs/dist
52
+
53
+ api-reference:
54
+ name: API reference up to date
55
+ runs-on: ubuntu-latest
56
+ if: github.event_name != 'release'
57
+ steps:
58
+ - uses: actions/checkout@v4
59
+ - uses: actions/setup-python@v5
60
+ with:
61
+ python-version: "3.12"
62
+ - uses: dtolnay/rust-toolchain@stable
63
+ - uses: Swatinem/rust-cache@v2
64
+ - name: Build and install
65
+ run: |
66
+ python -m venv .venv
67
+ .venv/bin/pip install maturin
68
+ .venv/bin/maturin develop --release
69
+ - name: Check (warnings only)
70
+ run: |
71
+ .venv/bin/python docs/scripts/gen_api.py --check | sed 's/^/::warning title=Docs::/' || true
72
+ .venv/bin/python docs/scripts/gen_api.py > /dev/null
73
+ if ! git diff --quiet -- docs/src/content/docs/reference; then
74
+ echo "::warning title=Docs::The API reference is out of date. Run 'python docs/scripts/gen_api.py' and commit the result."
75
+ git diff --stat -- docs/src/content/docs/reference
76
+ fi
77
+
78
+ deploy:
79
+ name: Deploy to GitHub Pages
80
+ needs: build
81
+ if: github.event_name != 'pull_request' && (github.ref == 'refs/heads/main' || github.event_name == 'release')
82
+ runs-on: ubuntu-latest
83
+ permissions:
84
+ pages: write
85
+ id-token: write
86
+ environment:
87
+ name: github-pages
88
+ url: ${{ steps.deployment.outputs.page_url }}
89
+ steps:
90
+ - id: deployment
91
+ uses: actions/deploy-pages@v4
@@ -0,0 +1,33 @@
1
+ name: PR title
2
+
3
+ # El changelog se genera de los commits convencionales; con "squash merge" el
4
+ # título del PR es el mensaje del commit, así que lo validamos aquí.
5
+ on:
6
+ pull_request:
7
+ types: [opened, edited, synchronize, reopened]
8
+
9
+ permissions:
10
+ pull-requests: read
11
+
12
+ jobs:
13
+ conventional:
14
+ name: Título convencional
15
+ runs-on: ubuntu-latest
16
+ steps:
17
+ - uses: amannn/action-semantic-pull-request@v5
18
+ env:
19
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
20
+ with:
21
+ types: |
22
+ feat
23
+ fix
24
+ perf
25
+ refactor
26
+ style
27
+ docs
28
+ test
29
+ build
30
+ ci
31
+ chore
32
+ revert
33
+ requireScope: false
@@ -0,0 +1,202 @@
1
+ name: Release
2
+
3
+ # Se dispara al empujar un tag vX.Y.Z (o vX.Y.Z-rc.N, -beta.N, ... para
4
+ # pre-releases). Compila wheels y sdist, los prueba, publica en PyPI con
5
+ # Trusted Publishing, crea la GitHub Release con sus notas y actualiza
6
+ # CHANGELOG.md en main y redespliega la web de documentación.
7
+ on:
8
+ push:
9
+ tags: ["v[0-9]+.[0-9]+.[0-9]+*"]
10
+ workflow_dispatch:
11
+ inputs:
12
+ tag:
13
+ description: Tag existente a (re)publicar, p. ej. v0.2.0
14
+ required: true
15
+
16
+ concurrency:
17
+ group: release
18
+ cancel-in-progress: false
19
+
20
+ permissions:
21
+ contents: read
22
+
23
+ env:
24
+ TAG: ${{ inputs.tag || github.ref_name }}
25
+
26
+ jobs:
27
+ meta:
28
+ name: Verificar versión
29
+ runs-on: ubuntu-latest
30
+ outputs:
31
+ tag: ${{ steps.meta.outputs.tag }}
32
+ prerelease: ${{ steps.meta.outputs.prerelease }}
33
+ steps:
34
+ - uses: actions/checkout@v4
35
+ with:
36
+ ref: ${{ env.TAG }}
37
+ - id: meta
38
+ name: El tag coincide con Cargo.toml
39
+ run: |
40
+ version=$(sed -n 's/^version = "\(.*\)"$/\1/p' Cargo.toml | head -n1)
41
+ if [ "v$version" != "$TAG" ]; then
42
+ echo "::error::El tag $TAG no coincide con la versión de Cargo.toml ($version)"
43
+ exit 1
44
+ fi
45
+ case "$version" in
46
+ *-*) prerelease=true ;;
47
+ *) prerelease=false ;;
48
+ esac
49
+ echo "tag=$TAG" >> "$GITHUB_OUTPUT"
50
+ echo "prerelease=$prerelease" >> "$GITHUB_OUTPUT"
51
+
52
+ wheels:
53
+ name: Wheel ${{ matrix.name }}
54
+ needs: meta
55
+ runs-on: ${{ matrix.runner }}
56
+ strategy:
57
+ fail-fast: true
58
+ matrix:
59
+ include:
60
+ - { name: linux-x86_64, runner: ubuntu-latest, target: x86_64, test: true }
61
+ - { name: linux-aarch64, runner: ubuntu-24.04-arm, target: aarch64, test: true }
62
+ - { name: macos-arm64, runner: macos-latest, target: aarch64-apple-darwin, test: true }
63
+ - { name: macos-x86_64, runner: macos-latest, target: x86_64-apple-darwin, test: false }
64
+ - { name: windows-x64, runner: windows-latest, target: x64, test: true }
65
+ steps:
66
+ - uses: actions/checkout@v4
67
+ with:
68
+ ref: ${{ needs.meta.outputs.tag }}
69
+ - uses: actions/setup-python@v5
70
+ with:
71
+ python-version: "3.12"
72
+ - uses: PyO3/maturin-action@v1
73
+ with:
74
+ command: build
75
+ target: ${{ matrix.target }}
76
+ args: --release --out dist
77
+ manylinux: "2_28"
78
+ - name: Test the wheel
79
+ if: matrix.test
80
+ shell: bash
81
+ run: |
82
+ python -m pip install pytest
83
+ python -m pip install --no-index --find-links dist pyzed-ui
84
+ python -m pytest -q tests
85
+ - uses: actions/upload-artifact@v4
86
+ with:
87
+ name: dist-${{ matrix.name }}
88
+ path: dist/*.whl
89
+
90
+ sdist:
91
+ name: sdist
92
+ needs: meta
93
+ runs-on: ubuntu-latest
94
+ steps:
95
+ - uses: actions/checkout@v4
96
+ with:
97
+ ref: ${{ needs.meta.outputs.tag }}
98
+ - uses: PyO3/maturin-action@v1
99
+ with:
100
+ command: sdist
101
+ args: --out dist
102
+ - uses: actions/upload-artifact@v4
103
+ with:
104
+ name: dist-sdist
105
+ path: dist/*.tar.gz
106
+
107
+ pypi:
108
+ name: Publicar en PyPI
109
+ needs: [meta, wheels, sdist]
110
+ runs-on: ubuntu-latest
111
+ environment:
112
+ name: pypi
113
+ url: https://pypi.org/project/pyzed-ui/
114
+ permissions:
115
+ id-token: write
116
+ steps:
117
+ - uses: actions/download-artifact@v4
118
+ with:
119
+ pattern: dist-*
120
+ merge-multiple: true
121
+ path: dist
122
+ - uses: pypa/gh-action-pypi-publish@release/v1
123
+ with:
124
+ skip-existing: true
125
+
126
+ github-release:
127
+ name: GitHub Release
128
+ needs: [meta, pypi]
129
+ runs-on: ubuntu-latest
130
+ permissions:
131
+ contents: write
132
+ steps:
133
+ - uses: actions/checkout@v4
134
+ with:
135
+ ref: ${{ needs.meta.outputs.tag }}
136
+ fetch-depth: 0
137
+ - uses: actions/setup-python@v5
138
+ with:
139
+ python-version: "3.12"
140
+ - uses: actions/download-artifact@v4
141
+ with:
142
+ pattern: dist-*
143
+ merge-multiple: true
144
+ path: dist
145
+ - name: Crear la release
146
+ env:
147
+ GH_TOKEN: ${{ github.token }}
148
+ PRERELEASE: ${{ needs.meta.outputs.prerelease }}
149
+ run: |
150
+ python -m pip install git-cliff
151
+ python scripts/changelog.py --notes "$TAG" > notes.md
152
+ printf '\n\n```\npip install pyzed-ui==%s\n```\n' "${TAG#v}" >> notes.md
153
+ flags=(--title "$TAG" --notes-file notes.md --verify-tag)
154
+ if [ "$PRERELEASE" = true ]; then flags+=(--prerelease --latest=false); else flags+=(--latest); fi
155
+ if gh release view "$TAG" >/dev/null 2>&1; then
156
+ gh release upload "$TAG" dist/* --clobber
157
+ gh release edit "$TAG" --notes-file notes.md
158
+ else
159
+ gh release create "$TAG" dist/* "${flags[@]}"
160
+ fi
161
+
162
+ changelog:
163
+ name: Actualizar CHANGELOG y docs
164
+ needs: [meta, github-release]
165
+ runs-on: ubuntu-latest
166
+ permissions:
167
+ contents: write
168
+ actions: write
169
+ steps:
170
+ - uses: actions/checkout@v4
171
+ with:
172
+ ref: main
173
+ fetch-depth: 0
174
+ - uses: actions/setup-python@v5
175
+ with:
176
+ python-version: "3.12"
177
+ - name: Añadir la versión a CHANGELOG.md
178
+ run: |
179
+ python -m pip install git-cliff
180
+ python scripts/changelog.py --update "$TAG"
181
+ - name: Commit en main
182
+ run: |
183
+ if git diff --quiet -- CHANGELOG.md; then
184
+ echo "CHANGELOG.md ya estaba al día"
185
+ exit 0
186
+ fi
187
+ git config user.name "github-actions[bot]"
188
+ git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
189
+ git add CHANGELOG.md
190
+ git commit -m "chore(release): changelog $TAG"
191
+ git push origin HEAD:main
192
+ - name: Redesplegar la web de documentación
193
+ env:
194
+ GH_TOKEN: ${{ github.token }}
195
+ run: |
196
+ # Ni el push ni la release hechos con GITHUB_TOKEN disparan otros
197
+ # workflows, así que lanzamos el de la web explícitamente (si existe).
198
+ if gh workflow view docs.yml >/dev/null 2>&1; then
199
+ gh workflow run docs.yml --ref main
200
+ else
201
+ echo "No hay workflow docs.yml todavía; nada que redesplegar."
202
+ fi
@@ -0,0 +1,9 @@
1
+ /target
2
+ __pycache__/
3
+ *.py[cod]
4
+ *.so
5
+ *.pyd
6
+ .venv/
7
+ dist/
8
+ *.egg-info/
9
+ .pytest_cache/
@@ -0,0 +1,54 @@
1
+ # Changelog
2
+
3
+ Todos los cambios relevantes de Pyzed se registran aquí. El formato sigue
4
+ [Keep a Changelog](https://keepachangelog.com/es-ES/1.1.0/) y el proyecto usa
5
+ [versionado semántico](https://semver.org/lang/es/).
6
+
7
+ Cada versión es un encabezado `## [X.Y.Z] - AAAA-MM-DD` con las secciones que apliquen:
8
+ `### Breaking changes`, `### Añadido`, `### Cambiado`, `### Corregido`, `### Eliminado`.
9
+ Las versiones con sufijo (`1.0.0-rc.1`, `0.2.0b1`) se consideran preliminares.
10
+ La web de documentación lee este archivo en cada build y marca la última versión estable.
11
+
12
+ ## [Sin publicar]
13
+
14
+ ## [0.2.0] - 2026-10-18
15
+
16
+ Primera versión publicada en PyPI como `pyzed-ui`.
17
+
18
+ ### Breaking changes
19
+
20
+ - `App.run()` lanza un error si se llama por segunda vez en el mismo proceso.
21
+
22
+ ### Añadido
23
+
24
+ - Varias ventanas por app: abrir y cerrar ventanas extra, hooks y comandos de ventana (`Window`).
25
+ - Soporte async: corrutinas, generadores y generadores async desde `update` o `Command.perform`.
26
+ - Suscripciones: temporizadores con `pz.every` y flujos con `pz.listen`.
27
+ - Widgets nuevos: `image` (mapas de bits), `image_viewer`, `canvas` con `pz.draw`, `rich_text`, `markdown`, `qr_code`, `pick_list`, `radio`, `split`, `pin`, `grid` y `responsive`; degradados y más opciones de estilo.
28
+ - Componentes nuevos en `pyzed.ui`: `select`, `radio_group`, `number_field`, `split_button`, `chip`, `disclosure`, `callout`, `table`, `facepile`, `diff_stat`, gráficos, `spinner`, `popover`, `markdown`, `split` y `stat`.
29
+ - Theming: importar temas de Zed, temas Ayu, Gruvbox y One incluidos, `Theme.generate()` y cambio automático entre claro y oscuro.
30
+ - Editor: scroll horizontal con el margen de números fijo, números de línea correctos con `wrap`, línea activa, autoscroll del cursor y PageUp/PageDown.
31
+ - Ejemplos basados en las demos de Iced (todos, game of life, reloj, cronómetro, descargas, websocket, varias ventanas, visor de imágenes, markdown, QR, estilos, menú contextual, paneles) y un tutorial de cinco pasos.
32
+ - Web de documentación con guías, tutoriales, referencia de la API e ilustraciones de componentes.
33
+ - Workflows de CI y de release: wheels para Linux, macOS y Windows publicados en PyPI.
34
+
35
+ ### Corregido
36
+
37
+ - Las imágenes se recortan y redondean bien en todos los renderizadores, también en las capturas sin GPU.
38
+
39
+ ## [0.1.0] - 2026-10-18
40
+
41
+ Primera versión.
42
+
43
+ ### Añadido
44
+
45
+ - Runtime al estilo Elm sobre Iced 0.14 (`App`, `update`, `view`, `on_start`, `on_key`).
46
+ - Mensajes como cualquier valor de Python o como callables que se llaman directamente.
47
+ - `Command`: `exit`, `focus`, `set_editor_text`, `set_editor_cursor`, `scroll_to_end`, `batch`, `message` y `perform` (trabajo en un hilo).
48
+ - `pz.post()` para enviar mensajes desde otros hilos.
49
+ - Widgets base: `text`, `column`, `row`, `container`, `center`, `button`, `text_input`, `scrollable`, `space`, `rule`, `mouse_area`, `stack`, `opaque`, `hover`, `tooltip`, `checkbox`, `toggler`, `slider`, `progress_bar`, `code_editor`, `svg` e `icon`.
50
+ - Unos 40 componentes al estilo Zed en `pyzed.ui`: botones, formularios, listas, árbol de archivos, pestañas, workspace con docks, paleta de comandos, toasts, editor de código y terminal.
51
+ - Temas One Dark, One Light y Gruvbox Dark con los tokens de color de Zed, y `Theme.derive()`.
52
+ - Fuentes IBM Plex e iconos Lucide incluidos.
53
+ - Capturas fuera de pantalla con `app.screenshot()` (sin GPU ni display).
54
+ - CLI: `pyzed new` y `pyzed icons`.