fastled 1.1.67__tar.gz → 1.1.69__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 (116) hide show
  1. fastled-1.1.69/.github/workflows/build_webpage.yml +34 -0
  2. {fastled-1.1.67 → fastled-1.1.69}/.github/workflows/publish_release.yml +11 -5
  3. {fastled-1.1.67 → fastled-1.1.69}/PKG-INFO +8 -4
  4. {fastled-1.1.67 → fastled-1.1.69}/README.md +7 -3
  5. fastled-1.1.69/build_site.py +20 -0
  6. {fastled-1.1.67 → fastled-1.1.69}/src/fastled/__init__.py +10 -1
  7. fastled-1.1.69/src/fastled/site/build.py +409 -0
  8. {fastled-1.1.67 → fastled-1.1.69}/src/fastled.egg-info/PKG-INFO +8 -4
  9. {fastled-1.1.67 → fastled-1.1.69}/src/fastled.egg-info/SOURCES.txt +3 -6
  10. fastled-1.1.67/build_examples.py +0 -46
  11. fastled-1.1.67/docs/fastled.js +0 -19
  12. fastled-1.1.67/docs/fastled.wasm +0 -0
  13. fastled-1.1.67/docs/index.css +0 -158
  14. fastled-1.1.67/docs/index.html +0 -113
  15. fastled-1.1.67/docs/index.js +0 -1269
  16. {fastled-1.1.67 → fastled-1.1.69}/.aiderignore +0 -0
  17. {fastled-1.1.67 → fastled-1.1.69}/.github/workflows/build_multi_docker_image.yml +0 -0
  18. {fastled-1.1.67 → fastled-1.1.69}/.github/workflows/lint.yml +0 -0
  19. {fastled-1.1.67 → fastled-1.1.69}/.github/workflows/test_build_exe.yml +0 -0
  20. {fastled-1.1.67 → fastled-1.1.69}/.github/workflows/test_macos.yml +0 -0
  21. {fastled-1.1.67 → fastled-1.1.69}/.github/workflows/test_ubuntu.yml +0 -0
  22. {fastled-1.1.67 → fastled-1.1.69}/.github/workflows/test_win.yml +0 -0
  23. {fastled-1.1.67 → fastled-1.1.69}/.gitignore +0 -0
  24. {fastled-1.1.67 → fastled-1.1.69}/.pylintrc +0 -0
  25. {fastled-1.1.67 → fastled-1.1.69}/.vscode/launch.json +0 -0
  26. {fastled-1.1.67 → fastled-1.1.69}/.vscode/settings.json +0 -0
  27. {fastled-1.1.67 → fastled-1.1.69}/.vscode/tasks.json +0 -0
  28. {fastled-1.1.67 → fastled-1.1.69}/LICENSE +0 -0
  29. {fastled-1.1.67 → fastled-1.1.69}/MANIFEST.in +0 -0
  30. {fastled-1.1.67 → fastled-1.1.69}/TODO.md +0 -0
  31. {fastled-1.1.67 → fastled-1.1.69}/build_exe.py +0 -0
  32. {fastled-1.1.67 → fastled-1.1.69}/clean +0 -0
  33. {fastled-1.1.67 → fastled-1.1.69}/examples/Blink/Blink.ino +0 -0
  34. {fastled-1.1.67 → fastled-1.1.69}/examples/Chromancer/Chromancer.ino +0 -0
  35. {fastled-1.1.67 → fastled-1.1.69}/examples/Chromancer/detail.h +0 -0
  36. {fastled-1.1.67 → fastled-1.1.69}/examples/Chromancer/gary_woos_wled_port/gary_woos_wled_ledmap.h +0 -0
  37. {fastled-1.1.67 → fastled-1.1.69}/examples/Chromancer/gary_woos_wled_port/presets.json +0 -0
  38. {fastled-1.1.67 → fastled-1.1.69}/examples/Chromancer/gary_woos_wled_port/presets.min.json +0 -0
  39. {fastled-1.1.67 → fastled-1.1.69}/examples/Chromancer/gen.py +0 -0
  40. {fastled-1.1.67 → fastled-1.1.69}/examples/Chromancer/mapping.h +0 -0
  41. {fastled-1.1.67 → fastled-1.1.69}/examples/Chromancer/net.h +0 -0
  42. {fastled-1.1.67 → fastled-1.1.69}/examples/Chromancer/output.json +0 -0
  43. {fastled-1.1.67 → fastled-1.1.69}/examples/Chromancer/ripple.h +0 -0
  44. {fastled-1.1.67 → fastled-1.1.69}/examples/Chromancer/screenmap.json.h +0 -0
  45. {fastled-1.1.67 → fastled-1.1.69}/examples/ColorPalette/ColorPalette.ino +0 -0
  46. {fastled-1.1.67 → fastled-1.1.69}/examples/ColorTemperature/ColorTemperature.ino +0 -0
  47. {fastled-1.1.67 → fastled-1.1.69}/examples/Cylon/Cylon.ino +0 -0
  48. {fastled-1.1.67 → fastled-1.1.69}/examples/DemoReel100/DemoReel100.ino +0 -0
  49. {fastled-1.1.67 → fastled-1.1.69}/examples/Esp32Rmt51/Esp32Rmt51.ino +0 -0
  50. {fastled-1.1.67 → fastled-1.1.69}/examples/EspI2SDemo/EspI2SDemo.ino +0 -0
  51. {fastled-1.1.67 → fastled-1.1.69}/examples/Fire2012/Fire2012.ino +0 -0
  52. {fastled-1.1.67 → fastled-1.1.69}/examples/Fire2012WithPalette/Fire2012WithPalette.ino +0 -0
  53. {fastled-1.1.67 → fastled-1.1.69}/examples/FirstLight/FirstLight.ino +0 -0
  54. {fastled-1.1.67 → fastled-1.1.69}/examples/FxEngine/FxEngine.ino +0 -0
  55. {fastled-1.1.67 → fastled-1.1.69}/examples/Noise/Noise.ino +0 -0
  56. {fastled-1.1.67 → fastled-1.1.69}/examples/NoisePlayground/NoisePlayground.ino +0 -0
  57. {fastled-1.1.67 → fastled-1.1.69}/examples/NoisePlusPalette/NoisePlusPalette.ino +0 -0
  58. {fastled-1.1.67 → fastled-1.1.69}/examples/OctoWS2811/OctoWS2811.ino +0 -0
  59. {fastled-1.1.67 → fastled-1.1.69}/examples/Pacifica/Pacifica.ino +0 -0
  60. {fastled-1.1.67 → fastled-1.1.69}/examples/Pride2015/Pride2015.ino +0 -0
  61. {fastled-1.1.67 → fastled-1.1.69}/examples/TwinkleFox/TwinkleFox.ino +0 -0
  62. {fastled-1.1.67 → fastled-1.1.69}/examples/Video/Gfx2Video/Gfx2Video.ino +0 -0
  63. {fastled-1.1.67 → fastled-1.1.69}/examples/WasmScreenCoords/WasmScreenCoords.ino +0 -0
  64. {fastled-1.1.67 → fastled-1.1.69}/examples/Water/Water.ino +0 -0
  65. {fastled-1.1.67 → fastled-1.1.69}/examples/XYMatrix/XYMatrix.ino +0 -0
  66. {fastled-1.1.67 → fastled-1.1.69}/examples/wasm/wasm.ino +0 -0
  67. {fastled-1.1.67 → fastled-1.1.69}/install +0 -0
  68. {fastled-1.1.67 → fastled-1.1.69}/lint +0 -0
  69. {fastled-1.1.67 → fastled-1.1.69}/pyproject.toml +0 -0
  70. {fastled-1.1.67 → fastled-1.1.69}/requirements.testing.txt +0 -0
  71. {fastled-1.1.67 → fastled-1.1.69}/setup.cfg +0 -0
  72. {fastled-1.1.67 → fastled-1.1.69}/setup.py +0 -0
  73. {fastled-1.1.67 → fastled-1.1.69}/src/fastled/app.py +0 -0
  74. {fastled-1.1.67 → fastled-1.1.69}/src/fastled/assets/example.txt +0 -0
  75. {fastled-1.1.67 → fastled-1.1.69}/src/fastled/cli.py +0 -0
  76. {fastled-1.1.67 → fastled-1.1.69}/src/fastled/client_server.py +0 -0
  77. {fastled-1.1.67 → fastled-1.1.69}/src/fastled/compile_server.py +0 -0
  78. {fastled-1.1.67 → fastled-1.1.69}/src/fastled/compile_server_impl.py +0 -0
  79. {fastled-1.1.67 → fastled-1.1.69}/src/fastled/docker_manager.py +0 -0
  80. {fastled-1.1.67 → fastled-1.1.69}/src/fastled/filewatcher.py +0 -0
  81. {fastled-1.1.67 → fastled-1.1.69}/src/fastled/keyboard.py +0 -0
  82. {fastled-1.1.67 → fastled-1.1.69}/src/fastled/live_client.py +0 -0
  83. {fastled-1.1.67 → fastled-1.1.69}/src/fastled/open_browser.py +0 -0
  84. {fastled-1.1.67 → fastled-1.1.69}/src/fastled/parse_args.py +0 -0
  85. {fastled-1.1.67 → fastled-1.1.69}/src/fastled/paths.py +0 -0
  86. {fastled-1.1.67 → fastled-1.1.69}/src/fastled/project_init.py +0 -0
  87. {fastled-1.1.67 → fastled-1.1.69}/src/fastled/select_sketch_directory.py +0 -0
  88. {fastled-1.1.67 → fastled-1.1.69}/src/fastled/settings.py +0 -0
  89. {fastled-1.1.67 → fastled-1.1.69}/src/fastled/sketch.py +0 -0
  90. {fastled-1.1.67 → fastled-1.1.69}/src/fastled/spinner.py +0 -0
  91. {fastled-1.1.67 → fastled-1.1.69}/src/fastled/string_diff.py +0 -0
  92. {fastled-1.1.67 → fastled-1.1.69}/src/fastled/test/examples.py +0 -0
  93. {fastled-1.1.67 → fastled-1.1.69}/src/fastled/types.py +0 -0
  94. {fastled-1.1.67 → fastled-1.1.69}/src/fastled/util.py +0 -0
  95. {fastled-1.1.67 → fastled-1.1.69}/src/fastled/web_compile.py +0 -0
  96. {fastled-1.1.67 → fastled-1.1.69}/src/fastled.egg-info/dependency_links.txt +0 -0
  97. {fastled-1.1.67 → fastled-1.1.69}/src/fastled.egg-info/entry_points.txt +0 -0
  98. {fastled-1.1.67 → fastled-1.1.69}/src/fastled.egg-info/requires.txt +0 -0
  99. {fastled-1.1.67 → fastled-1.1.69}/src/fastled.egg-info/top_level.txt +0 -0
  100. {fastled-1.1.67 → fastled-1.1.69}/test +0 -0
  101. {fastled-1.1.67 → fastled-1.1.69}/tests/test_api.py +0 -0
  102. {fastled-1.1.67 → fastled-1.1.69}/tests/test_bad_ino.py +0 -0
  103. {fastled-1.1.67 → fastled-1.1.69}/tests/test_cli.py +0 -0
  104. {fastled-1.1.67 → fastled-1.1.69}/tests/test_compile_server.py +0 -0
  105. {fastled-1.1.67 → fastled-1.1.69}/tests/test_docker_linux_on_windows.py +0 -0
  106. {fastled-1.1.67 → fastled-1.1.69}/tests/test_embedded_data.py +0 -0
  107. {fastled-1.1.67 → fastled-1.1.69}/tests/test_examples.py +0 -0
  108. {fastled-1.1.67 → fastled-1.1.69}/tests/test_filechanger.py +0 -0
  109. {fastled-1.1.67 → fastled-1.1.69}/tests/test_ino/bad/bad.ino +0 -0
  110. {fastled-1.1.67 → fastled-1.1.69}/tests/test_ino/embedded/data/bigdata.dat +0 -0
  111. {fastled-1.1.67 → fastled-1.1.69}/tests/test_ino/embedded/wasm.ino +0 -0
  112. {fastled-1.1.67 → fastled-1.1.69}/tests/test_ino/wasm/wasm.ino +0 -0
  113. {fastled-1.1.67 → fastled-1.1.69}/tests/test_project_init.py +0 -0
  114. {fastled-1.1.67 → fastled-1.1.69}/tests/test_server_and_client_seperatly.py +0 -0
  115. {fastled-1.1.67 → fastled-1.1.69}/tests/test_webcompile.py +0 -0
  116. {fastled-1.1.67 → fastled-1.1.69}/upload_package.sh +0 -0
@@ -0,0 +1,34 @@
1
+ name: Build Webpage
2
+
3
+ on:
4
+ push:
5
+ branches: [ main ]
6
+ pull_request:
7
+ branches: [ main ]
8
+
9
+ jobs:
10
+ deploy:
11
+ runs-on: ubuntu-latest
12
+ permissions:
13
+ contents: write # This allows pushing to branches
14
+
15
+ steps:
16
+ - uses: actions/checkout@v3
17
+
18
+ - name: Install UV
19
+ run: pip install uv
20
+
21
+ - name: Install dependencies
22
+ run: ./install
23
+ shell: bash
24
+
25
+ - name: Create index.html
26
+ run: |
27
+ uv run build_site.py
28
+
29
+ - name: Deploy to GitHub Pages
30
+ uses: peaceiris/actions-gh-pages@v3
31
+ with:
32
+ github_token: ${{ secrets.GITHUB_TOKEN }}
33
+ publish_dir: ./site
34
+ force_orphan: true # This creates a new orphan branch each time
@@ -139,11 +139,17 @@ jobs:
139
139
  run: |
140
140
  mkdir release
141
141
  # Rename files with platform-specific names
142
- [ -f artifacts/fastled-Windows-X64/fastled.exe ] && cp artifacts/fastled-Windows-X64/fastled.exe release/fastled-windows-x64.exe
143
- [ -f artifacts/fastled-Linux-X64/fastled ] && cp artifacts/fastled-Linux-X64/fastled release/fastled-linux-x64
144
- [ -f artifacts/fastled-Linux-ARM64/fastled ] && cp artifacts/fastled-Linux-ARM64/fastled release/fastled-linux-arm64
145
- [ -f artifacts/fastled-macOS-ARM64/fastled ] && cp artifacts/fastled-macOS-ARM64/fastled release/fastled-macos-arm64
146
- [ -f artifacts/fastled-macOS-X64/fastled ] && cp artifacts/fastled-macOS-X64/fastled release/fastled-macos-x64
142
+ mkdir -p release/windows-x64
143
+ [ -f artifacts/fastled-Windows-X64/fastled.exe ] && cp artifacts/fastled-Windows-X64/fastled.exe release/windows-x64/fastled.exe
144
+ mkdir -p release/linux-x64
145
+ [ -f artifacts/fastled-Linux-X64/fastled ] && cp artifacts/fastled-Linux-X64/fastled release/linux-x64/fastled
146
+ mkdir -p release/linux-arm64
147
+ [ -f artifacts/fastled-Linux-ARM64/fastled ] && cp artifacts/fastled-Linux-ARM64/fastled release/linux-arm64/fastled
148
+ mkdir -p release/macos-arm64
149
+ [ -f artifacts/fastled-macOS-ARM64/fastled ] && cp artifacts/fastled-macOS-ARM64/fastled release/macos-arm64/fastled
150
+ mkdir -p release/macos-x64
151
+ [ -f artifacts/fastled-macOS-X64/fastled ] && cp artifacts/fastled-macOS-X64/fastled release/macos-x64/fastled
152
+
147
153
  chmod +x release/fastled-*
148
154
 
149
155
  - name: Create Release
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: fastled
3
- Version: 1.1.67
3
+ Version: 1.1.69
4
4
  Summary: FastLED Wasm Compiler
5
5
  Home-page: https://github.com/zackees/fastled-wasm
6
6
  Maintainer: Zachary Vorhies
@@ -35,6 +35,10 @@ Compiles an Arduino/Platformio sketch into a wasm binary that can be run directl
35
35
  [![Build Executables](https://github.com/zackees/fastled-wasm/actions/workflows/test_build_exe.yml/badge.svg)](https://github.com/zackees/fastled-wasm/actions/workflows/test_build_exe.yml)
36
36
  [![Publish Release](https://github.com/zackees/fastled-wasm/actions/workflows/publish_release.yml/badge.svg)](https://github.com/zackees/fastled-wasm/actions/workflows/publish_release.yml)
37
37
 
38
+ # Demo
39
+
40
+ https://zackees.github.io/fastled-wasm/
41
+
38
42
 
39
43
  # About
40
44
 
@@ -50,9 +54,6 @@ has the advantage that as a persistant service the compile cache will remain muc
50
54
 
51
55
  https://github.com/user-attachments/assets/64ae0e6c-5f8b-4830-ab87-dcc25bc61218
52
56
 
53
- # Demo
54
-
55
- https://zackees.github.io/fastled-wasm/
56
57
 
57
58
 
58
59
  # Install
@@ -258,6 +259,9 @@ A: A big chunk of space is being used by unnecessary javascript `emscripten` bun
258
259
 
259
260
 
260
261
  # Revisions
262
+
263
+ * 1.1.69 - Changed the binary name to `fastled.exe` instead of something like `fastled-windows-x64.exe`
264
+ * 1.1.68 - Add a site builder to fastled.Test which generates a website with a bunch of demos. This is used to build the demo site automatically.
261
265
  * 1.1.67 - Pinned all the minimum versions of dependencies so we don't bind to an out of date py dep: https://github.com/zackees/fastled-wasm/issues/3
262
266
  * 1.1.61 - Excluded non compiling examples from the Test object as part of the api - no sense in having them if they won't compile.
263
267
  * 1.1.60 - Platform executables (macos-arm/macos-x86/windows/linux-x86) now auto building with each release. Add tests.
@@ -12,6 +12,10 @@ Compiles an Arduino/Platformio sketch into a wasm binary that can be run directl
12
12
  [![Build Executables](https://github.com/zackees/fastled-wasm/actions/workflows/test_build_exe.yml/badge.svg)](https://github.com/zackees/fastled-wasm/actions/workflows/test_build_exe.yml)
13
13
  [![Publish Release](https://github.com/zackees/fastled-wasm/actions/workflows/publish_release.yml/badge.svg)](https://github.com/zackees/fastled-wasm/actions/workflows/publish_release.yml)
14
14
 
15
+ # Demo
16
+
17
+ https://zackees.github.io/fastled-wasm/
18
+
15
19
 
16
20
  # About
17
21
 
@@ -27,9 +31,6 @@ has the advantage that as a persistant service the compile cache will remain muc
27
31
 
28
32
  https://github.com/user-attachments/assets/64ae0e6c-5f8b-4830-ab87-dcc25bc61218
29
33
 
30
- # Demo
31
-
32
- https://zackees.github.io/fastled-wasm/
33
34
 
34
35
 
35
36
  # Install
@@ -235,6 +236,9 @@ A: A big chunk of space is being used by unnecessary javascript `emscripten` bun
235
236
 
236
237
 
237
238
  # Revisions
239
+
240
+ * 1.1.69 - Changed the binary name to `fastled.exe` instead of something like `fastled-windows-x64.exe`
241
+ * 1.1.68 - Add a site builder to fastled.Test which generates a website with a bunch of demos. This is used to build the demo site automatically.
238
242
  * 1.1.67 - Pinned all the minimum versions of dependencies so we don't bind to an out of date py dep: https://github.com/zackees/fastled-wasm/issues/3
239
243
  * 1.1.61 - Excluded non compiling examples from the Test object as part of the api - no sense in having them if they won't compile.
240
244
  * 1.1.60 - Platform executables (macos-arm/macos-x86/windows/linux-x86) now auto building with each release. Add tests.
@@ -0,0 +1,20 @@
1
+ import argparse
2
+
3
+ from pathlib import Path
4
+ from fastled import Test
5
+
6
+ HERE = Path(__file__).parent.resolve()
7
+ SITE = HERE / "site"
8
+
9
+ def parse_args() -> argparse.Namespace:
10
+ parser = argparse.ArgumentParser(description='Build FastLED example site')
11
+ parser.add_argument('--fast', action='store_true',
12
+ help='Skip regenerating existing examples, only rebuild index.html and CSS')
13
+ return parser.parse_args()
14
+
15
+ def main() -> None:
16
+ args = parse_args()
17
+ Test.build_site(SITE, fast=args.fast, check=True)
18
+
19
+ if __name__ == "__main__":
20
+ main()
@@ -7,9 +7,13 @@ from typing import Generator
7
7
 
8
8
  from .compile_server import CompileServer
9
9
  from .live_client import LiveClient
10
+ from .site.build import build
10
11
  from .types import BuildMode, CompileResult, CompileServerError
11
12
 
12
- __version__ = "1.1.67"
13
+ # IMPORTANT! There's a bug in github which will REJECT any version update
14
+ # that has any other change in the repo. Please bump the version as the
15
+ # ONLY change in a commit, or else the pypi update and the release will fail.
16
+ __version__ = "1.1.69"
13
17
 
14
18
 
15
19
  class Api:
@@ -117,6 +121,11 @@ class Test:
117
121
 
118
122
  return test_examples(examples=examples, host=host)
119
123
 
124
+ @staticmethod
125
+ def build_site(outputdir: Path, fast: bool | None = None, check: bool = True):
126
+ """Builds the FastLED compiler site."""
127
+ build(outputdir=outputdir, fast=fast, check=check)
128
+
120
129
 
121
130
  __all__ = [
122
131
  "Api",
@@ -0,0 +1,409 @@
1
+ import argparse
2
+ import subprocess
3
+ from pathlib import Path
4
+ from shutil import copytree, rmtree, which
5
+
6
+ CSS_CONTENT = """
7
+ /* CSS Reset & Variables */
8
+ *, *::before, *::after {
9
+ box-sizing: border-box;
10
+ margin: 0;
11
+ padding: 0;
12
+ }
13
+
14
+ :root {
15
+ --color-background: #121212;
16
+ --color-surface: #252525;
17
+ --color-surface-transparent: rgba(30, 30, 30, 0.95);
18
+ --color-text: #E0E0E0;
19
+ --spacing-sm: 5px;
20
+ --spacing-md: 10px;
21
+ --spacing-lg: 15px;
22
+ --transition-speed: 0.3s;
23
+ --font-family: 'Roboto Condensed', sans-serif;
24
+ --nav-width: 250px;
25
+ --border-radius: 5px;
26
+ }
27
+
28
+ /* Base Styles */
29
+ body {
30
+ background-color: var(--color-background);
31
+ color: var(--color-text);
32
+ margin: 0;
33
+ padding: 0;
34
+ font-family: var(--font-family);
35
+ min-height: 100vh;
36
+ display: grid;
37
+ grid-template-rows: 1fr;
38
+ }
39
+
40
+ /* Splash Screen */
41
+ .splash-screen {
42
+ position: fixed;
43
+ inset: 0;
44
+ background-color: var(--color-background);
45
+ display: flex;
46
+ justify-content: center;
47
+ align-items: center;
48
+ z-index: 2000;
49
+ transition: opacity var(--transition-speed) ease-out;
50
+ }
51
+
52
+ .splash-text {
53
+ font-size: 14vw;
54
+ color: var(--color-text);
55
+ font-weight: 300;
56
+ font-family: var(--font-family);
57
+ opacity: 0;
58
+ transition: opacity var(--transition-speed) ease-in;
59
+ }
60
+
61
+ /* Layout */
62
+ .content-wrapper {
63
+ position: relative;
64
+ width: 100%;
65
+ height: 100vh;
66
+ overflow-x: hidden;
67
+ }
68
+
69
+ /* Navigation */
70
+ .nav-trigger {
71
+ position: fixed;
72
+ left: var(--spacing-md);
73
+ top: var(--spacing-md);
74
+ padding: var(--spacing-sm) var(--spacing-lg);
75
+ z-index: 1001;
76
+ background-color: var(--color-surface);
77
+ border-radius: var(--border-radius);
78
+ display: flex;
79
+ align-items: center;
80
+ justify-content: center;
81
+ cursor: pointer;
82
+ color: var(--color-text);
83
+ font-size: 16px;
84
+ transition: background-color var(--transition-speed) ease;
85
+ }
86
+
87
+ .nav-trigger:hover {
88
+ background-color: var(--color-surface-transparent);
89
+ }
90
+
91
+ .nav-pane {
92
+ position: fixed;
93
+ left: var(--spacing-md);
94
+ top: 60px;
95
+ width: var(--nav-width);
96
+ height: auto;
97
+ background-color: var(--color-surface-transparent);
98
+ border-radius: var(--border-radius);
99
+ box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
100
+ transform: translateY(-20px);
101
+ opacity: 0;
102
+ pointer-events: none;
103
+ transition: transform var(--transition-speed) ease,
104
+ opacity var(--transition-speed) ease;
105
+ }
106
+
107
+ .nav-pane.visible {
108
+ transform: translateY(0);
109
+ opacity: 1;
110
+ pointer-events: auto;
111
+ }
112
+
113
+ /* Main Content */
114
+ .main-content {
115
+ width: 100%;
116
+ height: 100%;
117
+ padding: 0;
118
+ overflow: hidden;
119
+ }
120
+
121
+ #example-frame {
122
+ width: 100%;
123
+ height: 100%;
124
+ border: none;
125
+ background-color: var(--color-background);
126
+ overflow: auto;
127
+ }
128
+
129
+ /* Example Links */
130
+ .example-link {
131
+ margin: var(--spacing-sm) var(--spacing-md);
132
+ padding: var(--spacing-lg) var(--spacing-md);
133
+ border-radius: var(--border-radius);
134
+ display: block;
135
+ text-decoration: none;
136
+ color: var(--color-text);
137
+ background-color: var(--color-surface);
138
+ transition: background-color var(--transition-speed) ease-in-out,
139
+ box-shadow var(--transition-speed) ease-in-out;
140
+ position: relative;
141
+ padding-right: 35px;
142
+ }
143
+
144
+ .example-link:hover {
145
+ background-color: var(--color-surface-transparent);
146
+ box-shadow: var(--shadow-hover, 0 0 10px rgba(255, 255, 255, 0.1));
147
+ }
148
+
149
+ .example-link:last-child {
150
+ margin-bottom: var(--spacing-md);
151
+ }
152
+
153
+ /* Accessibility */
154
+ @media (prefers-reduced-motion: reduce) {
155
+ *, *::before, *::after {
156
+ animation-duration: 0.01ms !important;
157
+ animation-iteration-count: 1 !important;
158
+ transition-duration: 0.01ms !important;
159
+ scroll-behavior: auto !important;
160
+ }
161
+ }
162
+ """
163
+
164
+ INDEX_TEMPLATE = """<!DOCTYPE html>
165
+ <html lang="en">
166
+ <head>
167
+ <meta charset="UTF-8">
168
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
169
+ <title>FastLED Examples</title>
170
+ <link href="https://fonts.googleapis.com/css2?family=Roboto+Condensed:wght@300&display=swap" rel="stylesheet">
171
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
172
+ <link rel="stylesheet" href="index.css">
173
+ </head>
174
+ <body>
175
+ <div class="splash-screen">
176
+ <div class="splash-text">FastLED</div>
177
+ </div>
178
+ <div class="content-wrapper">
179
+ <div class="nav-trigger">Examples</div>
180
+ <nav class="nav-pane">
181
+ {example_links}
182
+ </nav>
183
+ <main class="main-content">
184
+ <iframe id="example-frame" title="Example Content"></iframe>
185
+ </main>
186
+ </div>
187
+ <script>
188
+ document.addEventListener('DOMContentLoaded', function() {{
189
+ const splashScreen = document.querySelector('.splash-screen');
190
+ const splashText = document.querySelector('.splash-text');
191
+
192
+ // Wait for font to load
193
+ document.fonts.ready.then(() => {{
194
+ // Fade in the text
195
+ splashText.style.opacity = '1';
196
+
197
+ // Wait for page load plus fade-in time before starting fade-out sequence
198
+ window.addEventListener('load', () => {{
199
+ setTimeout(() => {{
200
+ splashScreen.style.opacity = '0';
201
+ setTimeout(() => {{
202
+ splashScreen.style.display = 'none';
203
+ }}, 500); // Remove from DOM after fade completes
204
+ }}, 1500); // Wait for load + 1.5s (giving time for fade-in)
205
+ }});
206
+ }});
207
+ const links = document.querySelectorAll('.example-link');
208
+ const iframe = document.getElementById('example-frame');
209
+ const navPane = document.querySelector('.nav-pane');
210
+ const navTrigger = document.querySelector('.nav-trigger');
211
+
212
+ // First add checkmarks to all links
213
+ links.forEach(link => {{
214
+ // Add the checkmark span to each link
215
+ const checkmark = document.createElement('i');
216
+ checkmark.className = 'fas fa-check';
217
+ checkmark.style.display = 'none';
218
+ checkmark.style.position = 'absolute';
219
+ checkmark.style.right = '10px';
220
+ checkmark.style.top = '50%';
221
+ checkmark.style.transform = 'translateY(-50%)';
222
+ checkmark.style.color = '#E0E0E0';
223
+ link.appendChild(checkmark);
224
+ }});
225
+
226
+ // Now load first example and show its checkmark
227
+ if (links.length > 0) {{
228
+ // Try to find SdCard example first
229
+ let startLink = Array.from(links).find(link => link.textContent === 'SdCard') || links[0];
230
+ iframe.src = startLink.getAttribute('href');
231
+ startLink.classList.add('active');
232
+ startLink.querySelector('.fa-check').style.display = 'inline-block';
233
+ }}
234
+
235
+ // Add click handlers
236
+ links.forEach(link => {{
237
+ link.addEventListener('click', function(e) {{
238
+ e.preventDefault();
239
+ // Hide all checkmarks
240
+ links.forEach(l => {{
241
+ l.querySelector('.fa-check').style.display = 'none';
242
+ l.classList.remove('active');
243
+ }});
244
+ // Show this checkmark
245
+ this.querySelector('.fa-check').style.display = 'inline-block';
246
+ this.classList.add('active');
247
+ iframe.src = this.getAttribute('href');
248
+ hideNav(); // Hide nav after selection
249
+ }});
250
+ }});
251
+
252
+ function showNav() {{
253
+ navPane.classList.add('visible');
254
+ navPane.style.opacity = '1';
255
+ }}
256
+
257
+ function hideNav() {{
258
+ navPane.style.opacity = '0'; // Start fade out
259
+ setTimeout(() => {{
260
+ navPane.classList.remove('visible');
261
+ }}, 300);
262
+ }}
263
+
264
+ // Click handlers for nav
265
+ navTrigger.addEventListener('click', (e) => {{
266
+ e.stopPropagation();
267
+ if (navPane.classList.contains('visible')) {{
268
+ hideNav();
269
+ }} else {{
270
+ showNav();
271
+ }}
272
+ }});
273
+
274
+ // Close menu when clicking anywhere in the document
275
+ document.addEventListener('click', (e) => {{
276
+ if (navPane.classList.contains('visible') &&
277
+ !navPane.contains(e.target) &&
278
+ !navTrigger.contains(e.target)) {{
279
+ hideNav();
280
+ }}
281
+ }});
282
+
283
+ // Close when clicking iframe
284
+ iframe.addEventListener('load', () => {{
285
+ iframe.contentDocument?.addEventListener('click', () => {{
286
+ if (navPane.classList.contains('visible')) {{
287
+ hideNav();
288
+ }}
289
+ }});
290
+ }});
291
+
292
+ // Initial state
293
+ hideNav();
294
+ }});
295
+ </script>
296
+ </body>
297
+ </html>
298
+ """
299
+
300
+
301
+ EXAMPLES = ["wasm", "Chromancer", "SdCard", "NoiseRing", "LuminescentGrand", "Water"]
302
+
303
+
304
+ def _exec(cmd: str) -> None:
305
+ subprocess.run(cmd, shell=True, check=True)
306
+
307
+
308
+ def build_example(example: str, outputdir: Path) -> None:
309
+ if not which("fastled"):
310
+ raise FileNotFoundError("fastled executable not found")
311
+ src_dir = outputdir / example / "src"
312
+ _exec(f"fastled --init={example} {src_dir}")
313
+ assert src_dir.exists()
314
+ _exec(f"fastled {src_dir / example} --just-compile")
315
+ fastled_dir = src_dir / example / "fastled_js"
316
+ assert fastled_dir.exists(), f"fastled dir {fastled_dir} not found"
317
+ # now copy it to the example dir
318
+ example_dir = outputdir / example
319
+ copytree(fastled_dir, example_dir, dirs_exist_ok=True)
320
+ # now remove the src dir
321
+ rmtree(src_dir, ignore_errors=True)
322
+ print(f"Built {example} example in {example_dir}")
323
+ assert (example_dir / "fastled.wasm").exists()
324
+
325
+
326
+ def generate_css(outputdir: Path) -> None:
327
+ css_file = outputdir / "index.css"
328
+ # with open(css_file, "w") as f:
329
+ # f.write(CSS_CONTENT, encoding="utf-8")
330
+ css_file.write_text(CSS_CONTENT, encoding="utf-8")
331
+
332
+
333
+ def build_index_html(outputdir: Path) -> None:
334
+ outputdir = outputdir
335
+ assert (
336
+ outputdir.exists()
337
+ ), f"Output directory {outputdir} not found, you should run build_example first"
338
+ index_html = outputdir / "index.html"
339
+
340
+ examples = [f for f in outputdir.iterdir() if f.is_dir()]
341
+ examples = sorted(examples)
342
+
343
+ example_links = "\n".join(
344
+ f' <a class="example-link" href="{example.name}/index.html">{example.name}</a>'
345
+ for example in examples
346
+ )
347
+
348
+ with open(index_html, "w") as f:
349
+ f.write(INDEX_TEMPLATE.format(example_links=example_links))
350
+
351
+
352
+ def parse_args() -> argparse.Namespace:
353
+ parser = argparse.ArgumentParser(description="Build FastLED example site")
354
+ parser.add_argument(
355
+ "--outputdir", type=Path, help="Output directory", required=True
356
+ )
357
+ parser.add_argument(
358
+ "--fast",
359
+ action="store_true",
360
+ help="Skip regenerating existing examples, only rebuild index.html and CSS",
361
+ )
362
+ return parser.parse_args()
363
+
364
+
365
+ def build(outputdir: Path, fast: bool | None = None, check=False) -> list[Exception]:
366
+ outputdir = outputdir
367
+ fast = fast or False
368
+ errors: list[Exception] = []
369
+
370
+ for example in EXAMPLES:
371
+ example_dir = outputdir / example
372
+ if not fast or not example_dir.exists():
373
+ try:
374
+ build_example(example=example, outputdir=outputdir)
375
+ except Exception as e:
376
+ if check:
377
+ raise
378
+ errors.append(e)
379
+
380
+ try:
381
+ generate_css(outputdir=outputdir)
382
+ except Exception as e:
383
+ if check:
384
+ raise
385
+ errors.append(e)
386
+
387
+ try:
388
+ build_index_html(outputdir=outputdir)
389
+ except Exception as e:
390
+ if check:
391
+ raise
392
+ errors.append(e)
393
+
394
+ return errors
395
+
396
+
397
+ def main() -> int:
398
+ args = parse_args()
399
+ outputdir = args.outputdir
400
+ fast = args.fast
401
+ build(outputdir=outputdir, fast=fast)
402
+ return 0
403
+
404
+
405
+ if __name__ == "__main__":
406
+ import sys
407
+
408
+ sys.argv.append("--fast")
409
+ main()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: fastled
3
- Version: 1.1.67
3
+ Version: 1.1.69
4
4
  Summary: FastLED Wasm Compiler
5
5
  Home-page: https://github.com/zackees/fastled-wasm
6
6
  Maintainer: Zachary Vorhies
@@ -35,6 +35,10 @@ Compiles an Arduino/Platformio sketch into a wasm binary that can be run directl
35
35
  [![Build Executables](https://github.com/zackees/fastled-wasm/actions/workflows/test_build_exe.yml/badge.svg)](https://github.com/zackees/fastled-wasm/actions/workflows/test_build_exe.yml)
36
36
  [![Publish Release](https://github.com/zackees/fastled-wasm/actions/workflows/publish_release.yml/badge.svg)](https://github.com/zackees/fastled-wasm/actions/workflows/publish_release.yml)
37
37
 
38
+ # Demo
39
+
40
+ https://zackees.github.io/fastled-wasm/
41
+
38
42
 
39
43
  # About
40
44
 
@@ -50,9 +54,6 @@ has the advantage that as a persistant service the compile cache will remain muc
50
54
 
51
55
  https://github.com/user-attachments/assets/64ae0e6c-5f8b-4830-ab87-dcc25bc61218
52
56
 
53
- # Demo
54
-
55
- https://zackees.github.io/fastled-wasm/
56
57
 
57
58
 
58
59
  # Install
@@ -258,6 +259,9 @@ A: A big chunk of space is being used by unnecessary javascript `emscripten` bun
258
259
 
259
260
 
260
261
  # Revisions
262
+
263
+ * 1.1.69 - Changed the binary name to `fastled.exe` instead of something like `fastled-windows-x64.exe`
264
+ * 1.1.68 - Add a site builder to fastled.Test which generates a website with a bunch of demos. This is used to build the demo site automatically.
261
265
  * 1.1.67 - Pinned all the minimum versions of dependencies so we don't bind to an out of date py dep: https://github.com/zackees/fastled-wasm/issues/3
262
266
  * 1.1.61 - Excluded non compiling examples from the Test object as part of the api - no sense in having them if they won't compile.
263
267
  * 1.1.60 - Platform executables (macos-arm/macos-x86/windows/linux-x86) now auto building with each release. Add tests.
@@ -5,8 +5,8 @@ LICENSE
5
5
  MANIFEST.in
6
6
  README.md
7
7
  TODO.md
8
- build_examples.py
9
8
  build_exe.py
9
+ build_site.py
10
10
  clean
11
11
  install
12
12
  lint
@@ -16,6 +16,7 @@ setup.py
16
16
  test
17
17
  upload_package.sh
18
18
  .github/workflows/build_multi_docker_image.yml
19
+ .github/workflows/build_webpage.yml
19
20
  .github/workflows/lint.yml
20
21
  .github/workflows/publish_release.yml
21
22
  .github/workflows/test_build_exe.yml
@@ -25,11 +26,6 @@ upload_package.sh
25
26
  .vscode/launch.json
26
27
  .vscode/settings.json
27
28
  .vscode/tasks.json
28
- docs/fastled.js
29
- docs/fastled.wasm
30
- docs/index.css
31
- docs/index.html
32
- docs/index.js
33
29
  examples/Blink/Blink.ino
34
30
  examples/Chromancer/Chromancer.ino
35
31
  examples/Chromancer/detail.h
@@ -93,6 +89,7 @@ src/fastled.egg-info/entry_points.txt
93
89
  src/fastled.egg-info/requires.txt
94
90
  src/fastled.egg-info/top_level.txt
95
91
  src/fastled/assets/example.txt
92
+ src/fastled/site/build.py
96
93
  src/fastled/test/examples.py
97
94
  tests/test_api.py
98
95
  tests/test_bad_ino.py