fastled 1.1.66__tar.gz → 1.1.68__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.
- fastled-1.1.68/.github/workflows/build_webpage.yml +34 -0
- {fastled-1.1.66 → fastled-1.1.68}/PKG-INFO +13 -11
- {fastled-1.1.66 → fastled-1.1.68}/README.md +3 -1
- fastled-1.1.68/build_site.py +20 -0
- {fastled-1.1.66 → fastled-1.1.68}/pyproject.toml +9 -9
- {fastled-1.1.66 → fastled-1.1.68}/src/fastled/__init__.py +10 -1
- {fastled-1.1.66 → fastled-1.1.68}/src/fastled/client_server.py +14 -3
- {fastled-1.1.66 → fastled-1.1.68}/src/fastled/parse_args.py +1 -1
- {fastled-1.1.66 → fastled-1.1.68}/src/fastled/project_init.py +1 -0
- fastled-1.1.68/src/fastled/site/build.py +409 -0
- {fastled-1.1.66 → fastled-1.1.68}/src/fastled.egg-info/PKG-INFO +13 -11
- {fastled-1.1.66 → fastled-1.1.68}/src/fastled.egg-info/SOURCES.txt +3 -0
- fastled-1.1.68/src/fastled.egg-info/requires.txt +10 -0
- {fastled-1.1.66 → fastled-1.1.68}/tests/test_examples.py +0 -5
- fastled-1.1.66/src/fastled.egg-info/requires.txt +0 -10
- {fastled-1.1.66 → fastled-1.1.68}/.aiderignore +0 -0
- {fastled-1.1.66 → fastled-1.1.68}/.github/workflows/build_multi_docker_image.yml +0 -0
- {fastled-1.1.66 → fastled-1.1.68}/.github/workflows/lint.yml +0 -0
- {fastled-1.1.66 → fastled-1.1.68}/.github/workflows/publish_release.yml +0 -0
- {fastled-1.1.66 → fastled-1.1.68}/.github/workflows/test_build_exe.yml +0 -0
- {fastled-1.1.66 → fastled-1.1.68}/.github/workflows/test_macos.yml +0 -0
- {fastled-1.1.66 → fastled-1.1.68}/.github/workflows/test_ubuntu.yml +0 -0
- {fastled-1.1.66 → fastled-1.1.68}/.github/workflows/test_win.yml +0 -0
- {fastled-1.1.66 → fastled-1.1.68}/.gitignore +0 -0
- {fastled-1.1.66 → fastled-1.1.68}/.pylintrc +0 -0
- {fastled-1.1.66 → fastled-1.1.68}/.vscode/launch.json +0 -0
- {fastled-1.1.66 → fastled-1.1.68}/.vscode/settings.json +0 -0
- {fastled-1.1.66 → fastled-1.1.68}/.vscode/tasks.json +0 -0
- {fastled-1.1.66 → fastled-1.1.68}/LICENSE +0 -0
- {fastled-1.1.66 → fastled-1.1.68}/MANIFEST.in +0 -0
- {fastled-1.1.66 → fastled-1.1.68}/TODO.md +0 -0
- {fastled-1.1.66 → fastled-1.1.68}/build_exe.py +0 -0
- {fastled-1.1.66 → fastled-1.1.68}/clean +0 -0
- {fastled-1.1.66 → fastled-1.1.68}/docs/fastled.js +0 -0
- {fastled-1.1.66 → fastled-1.1.68}/docs/fastled.wasm +0 -0
- {fastled-1.1.66 → fastled-1.1.68}/docs/index.css +0 -0
- {fastled-1.1.66 → fastled-1.1.68}/docs/index.html +0 -0
- {fastled-1.1.66 → fastled-1.1.68}/docs/index.js +0 -0
- {fastled-1.1.66 → fastled-1.1.68}/examples/Blink/Blink.ino +0 -0
- {fastled-1.1.66 → fastled-1.1.68}/examples/Chromancer/Chromancer.ino +0 -0
- {fastled-1.1.66 → fastled-1.1.68}/examples/Chromancer/detail.h +0 -0
- {fastled-1.1.66 → fastled-1.1.68}/examples/Chromancer/gary_woos_wled_port/gary_woos_wled_ledmap.h +0 -0
- {fastled-1.1.66 → fastled-1.1.68}/examples/Chromancer/gary_woos_wled_port/presets.json +0 -0
- {fastled-1.1.66 → fastled-1.1.68}/examples/Chromancer/gary_woos_wled_port/presets.min.json +0 -0
- {fastled-1.1.66 → fastled-1.1.68}/examples/Chromancer/gen.py +0 -0
- {fastled-1.1.66 → fastled-1.1.68}/examples/Chromancer/mapping.h +0 -0
- {fastled-1.1.66 → fastled-1.1.68}/examples/Chromancer/net.h +0 -0
- {fastled-1.1.66 → fastled-1.1.68}/examples/Chromancer/output.json +0 -0
- {fastled-1.1.66 → fastled-1.1.68}/examples/Chromancer/ripple.h +0 -0
- {fastled-1.1.66 → fastled-1.1.68}/examples/Chromancer/screenmap.json.h +0 -0
- {fastled-1.1.66 → fastled-1.1.68}/examples/ColorPalette/ColorPalette.ino +0 -0
- {fastled-1.1.66 → fastled-1.1.68}/examples/ColorTemperature/ColorTemperature.ino +0 -0
- {fastled-1.1.66 → fastled-1.1.68}/examples/Cylon/Cylon.ino +0 -0
- {fastled-1.1.66 → fastled-1.1.68}/examples/DemoReel100/DemoReel100.ino +0 -0
- {fastled-1.1.66 → fastled-1.1.68}/examples/Esp32Rmt51/Esp32Rmt51.ino +0 -0
- {fastled-1.1.66 → fastled-1.1.68}/examples/EspI2SDemo/EspI2SDemo.ino +0 -0
- {fastled-1.1.66 → fastled-1.1.68}/examples/Fire2012/Fire2012.ino +0 -0
- {fastled-1.1.66 → fastled-1.1.68}/examples/Fire2012WithPalette/Fire2012WithPalette.ino +0 -0
- {fastled-1.1.66 → fastled-1.1.68}/examples/FirstLight/FirstLight.ino +0 -0
- {fastled-1.1.66 → fastled-1.1.68}/examples/FxEngine/FxEngine.ino +0 -0
- {fastled-1.1.66 → fastled-1.1.68}/examples/Noise/Noise.ino +0 -0
- {fastled-1.1.66 → fastled-1.1.68}/examples/NoisePlayground/NoisePlayground.ino +0 -0
- {fastled-1.1.66 → fastled-1.1.68}/examples/NoisePlusPalette/NoisePlusPalette.ino +0 -0
- {fastled-1.1.66 → fastled-1.1.68}/examples/OctoWS2811/OctoWS2811.ino +0 -0
- {fastled-1.1.66 → fastled-1.1.68}/examples/Pacifica/Pacifica.ino +0 -0
- {fastled-1.1.66 → fastled-1.1.68}/examples/Pride2015/Pride2015.ino +0 -0
- {fastled-1.1.66 → fastled-1.1.68}/examples/TwinkleFox/TwinkleFox.ino +0 -0
- {fastled-1.1.66 → fastled-1.1.68}/examples/Video/Gfx2Video/Gfx2Video.ino +0 -0
- {fastled-1.1.66 → fastled-1.1.68}/examples/WasmScreenCoords/WasmScreenCoords.ino +0 -0
- {fastled-1.1.66 → fastled-1.1.68}/examples/Water/Water.ino +0 -0
- {fastled-1.1.66 → fastled-1.1.68}/examples/XYMatrix/XYMatrix.ino +0 -0
- {fastled-1.1.66 → fastled-1.1.68}/examples/wasm/wasm.ino +0 -0
- {fastled-1.1.66 → fastled-1.1.68}/install +0 -0
- {fastled-1.1.66 → fastled-1.1.68}/lint +0 -0
- {fastled-1.1.66 → fastled-1.1.68}/requirements.testing.txt +0 -0
- {fastled-1.1.66 → fastled-1.1.68}/setup.cfg +0 -0
- {fastled-1.1.66 → fastled-1.1.68}/setup.py +0 -0
- {fastled-1.1.66 → fastled-1.1.68}/src/fastled/app.py +0 -0
- {fastled-1.1.66 → fastled-1.1.68}/src/fastled/assets/example.txt +0 -0
- {fastled-1.1.66 → fastled-1.1.68}/src/fastled/cli.py +0 -0
- {fastled-1.1.66 → fastled-1.1.68}/src/fastled/compile_server.py +0 -0
- {fastled-1.1.66 → fastled-1.1.68}/src/fastled/compile_server_impl.py +0 -0
- {fastled-1.1.66 → fastled-1.1.68}/src/fastled/docker_manager.py +0 -0
- {fastled-1.1.66 → fastled-1.1.68}/src/fastled/filewatcher.py +0 -0
- {fastled-1.1.66 → fastled-1.1.68}/src/fastled/keyboard.py +0 -0
- {fastled-1.1.66 → fastled-1.1.68}/src/fastled/live_client.py +0 -0
- {fastled-1.1.66 → fastled-1.1.68}/src/fastled/open_browser.py +0 -0
- {fastled-1.1.66 → fastled-1.1.68}/src/fastled/paths.py +0 -0
- {fastled-1.1.66 → fastled-1.1.68}/src/fastled/select_sketch_directory.py +0 -0
- {fastled-1.1.66 → fastled-1.1.68}/src/fastled/settings.py +0 -0
- {fastled-1.1.66 → fastled-1.1.68}/src/fastled/sketch.py +0 -0
- {fastled-1.1.66 → fastled-1.1.68}/src/fastled/spinner.py +0 -0
- {fastled-1.1.66 → fastled-1.1.68}/src/fastled/string_diff.py +0 -0
- {fastled-1.1.66 → fastled-1.1.68}/src/fastled/test/examples.py +0 -0
- {fastled-1.1.66 → fastled-1.1.68}/src/fastled/types.py +0 -0
- {fastled-1.1.66 → fastled-1.1.68}/src/fastled/util.py +0 -0
- {fastled-1.1.66 → fastled-1.1.68}/src/fastled/web_compile.py +0 -0
- {fastled-1.1.66 → fastled-1.1.68}/src/fastled.egg-info/dependency_links.txt +0 -0
- {fastled-1.1.66 → fastled-1.1.68}/src/fastled.egg-info/entry_points.txt +0 -0
- {fastled-1.1.66 → fastled-1.1.68}/src/fastled.egg-info/top_level.txt +0 -0
- {fastled-1.1.66 → fastled-1.1.68}/test +0 -0
- {fastled-1.1.66 → fastled-1.1.68}/tests/test_api.py +0 -0
- {fastled-1.1.66 → fastled-1.1.68}/tests/test_bad_ino.py +0 -0
- {fastled-1.1.66 → fastled-1.1.68}/tests/test_cli.py +0 -0
- {fastled-1.1.66 → fastled-1.1.68}/tests/test_compile_server.py +0 -0
- {fastled-1.1.66 → fastled-1.1.68}/tests/test_docker_linux_on_windows.py +0 -0
- {fastled-1.1.66 → fastled-1.1.68}/tests/test_embedded_data.py +0 -0
- {fastled-1.1.66 → fastled-1.1.68}/tests/test_filechanger.py +0 -0
- {fastled-1.1.66 → fastled-1.1.68}/tests/test_ino/bad/bad.ino +0 -0
- {fastled-1.1.66 → fastled-1.1.68}/tests/test_ino/embedded/data/bigdata.dat +0 -0
- {fastled-1.1.66 → fastled-1.1.68}/tests/test_ino/embedded/wasm.ino +0 -0
- {fastled-1.1.66 → fastled-1.1.68}/tests/test_ino/wasm/wasm.ino +0 -0
- {fastled-1.1.66 → fastled-1.1.68}/tests/test_project_init.py +0 -0
- {fastled-1.1.66 → fastled-1.1.68}/tests/test_server_and_client_seperatly.py +0 -0
- {fastled-1.1.66 → fastled-1.1.68}/tests/test_webcompile.py +0 -0
- {fastled-1.1.66 → fastled-1.1.68}/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
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: fastled
|
3
|
-
Version: 1.1.
|
3
|
+
Version: 1.1.68
|
4
4
|
Summary: FastLED Wasm Compiler
|
5
5
|
Home-page: https://github.com/zackees/fastled-wasm
|
6
6
|
Maintainer: Zachary Vorhies
|
@@ -10,16 +10,16 @@ Classifier: Programming Language :: Python :: 3
|
|
10
10
|
Requires-Python: >=3.9
|
11
11
|
Description-Content-Type: text/markdown
|
12
12
|
License-File: LICENSE
|
13
|
-
Requires-Dist: docker
|
14
|
-
Requires-Dist: httpx
|
15
|
-
Requires-Dist: watchdog
|
16
|
-
Requires-Dist: livereload
|
17
|
-
Requires-Dist: download
|
18
|
-
Requires-Dist: filelock
|
13
|
+
Requires-Dist: docker>=7.1.0
|
14
|
+
Requires-Dist: httpx>=0.28.1
|
15
|
+
Requires-Dist: watchdog>=6.0.0
|
16
|
+
Requires-Dist: livereload>=2.7.0
|
17
|
+
Requires-Dist: download>=0.3.5
|
18
|
+
Requires-Dist: filelock>=3.16.1
|
19
19
|
Requires-Dist: disklru>=2.0.1
|
20
|
-
Requires-Dist: appdirs
|
21
|
-
Requires-Dist: rapidfuzz
|
22
|
-
Requires-Dist: progress
|
20
|
+
Requires-Dist: appdirs>=1.4.4
|
21
|
+
Requires-Dist: rapidfuzz>=3.10.1
|
22
|
+
Requires-Dist: progress>=1.6
|
23
23
|
|
24
24
|
# FastLED Wasm compiler
|
25
25
|
|
@@ -256,8 +256,10 @@ A: `delay()` will block `loop()` which blocks the main thread of the browser. Th
|
|
256
256
|
Q: How can I get the compiled size of my FastLED sketch smaller?
|
257
257
|
A: A big chunk of space is being used by unnecessary javascript `emscripten` bundling. The wasm_compiler_settings.py file in the FastLED repo can tweak this.
|
258
258
|
|
259
|
+
|
259
260
|
# Revisions
|
260
|
-
|
261
|
+
* 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.
|
262
|
+
* 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
|
261
263
|
* 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.
|
262
264
|
* 1.1.60 - Platform executables (macos-arm/macos-x86/windows/linux-x86) now auto building with each release. Add tests.
|
263
265
|
* 1.1.52 - Add linux-arm
|
@@ -233,8 +233,10 @@ A: `delay()` will block `loop()` which blocks the main thread of the browser. Th
|
|
233
233
|
Q: How can I get the compiled size of my FastLED sketch smaller?
|
234
234
|
A: A big chunk of space is being used by unnecessary javascript `emscripten` bundling. The wasm_compiler_settings.py file in the FastLED repo can tweak this.
|
235
235
|
|
236
|
+
|
236
237
|
# Revisions
|
237
|
-
|
238
|
+
* 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.
|
239
|
+
* 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
|
238
240
|
* 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.
|
239
241
|
* 1.1.60 - Platform executables (macos-arm/macos-x86/windows/linux-x86) now auto building with each release. Add tests.
|
240
242
|
* 1.1.52 - Add linux-arm
|
@@ -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()
|
@@ -11,16 +11,16 @@ keywords = ["template-python-cmd"]
|
|
11
11
|
license = { text = "BSD 3-Clause License" }
|
12
12
|
classifiers = ["Programming Language :: Python :: 3"]
|
13
13
|
dependencies = [
|
14
|
-
"docker",
|
15
|
-
"httpx",
|
16
|
-
"watchdog",
|
17
|
-
"livereload",
|
18
|
-
"download",
|
19
|
-
"filelock",
|
14
|
+
"docker>=7.1.0",
|
15
|
+
"httpx>=0.28.1",
|
16
|
+
"watchdog>=6.0.0",
|
17
|
+
"livereload>=2.7.0",
|
18
|
+
"download>=0.3.5",
|
19
|
+
"filelock>=3.16.1",
|
20
20
|
"disklru>=2.0.1",
|
21
|
-
"appdirs",
|
22
|
-
"rapidfuzz",
|
23
|
-
"progress"
|
21
|
+
"appdirs>=1.4.4",
|
22
|
+
"rapidfuzz>=3.10.1",
|
23
|
+
"progress>=1.6"
|
24
24
|
]
|
25
25
|
|
26
26
|
dynamic = ["version"]
|
@@ -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
|
-
|
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.68"
|
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",
|
@@ -308,9 +308,20 @@ def run_client_server(args: argparse.Namespace) -> int:
|
|
308
308
|
build_mode: BuildMode = BuildMode.from_args(args)
|
309
309
|
|
310
310
|
if not force_compile and not looks_like_sketch_directory(directory):
|
311
|
-
|
312
|
-
|
313
|
-
)
|
311
|
+
# if there is only one directory in the sketch directory, use that
|
312
|
+
found_valid_child = False
|
313
|
+
if len(list(directory.iterdir())) == 1:
|
314
|
+
child_dir = next(directory.iterdir())
|
315
|
+
if looks_like_sketch_directory(child_dir):
|
316
|
+
found_valid_child = True
|
317
|
+
print(
|
318
|
+
f"The selected directory is not a valid FastLED sketch directory, the child directory {child_dir} looks like a sketch directory, using that instead."
|
319
|
+
)
|
320
|
+
directory = child_dir
|
321
|
+
if not found_valid_child:
|
322
|
+
print(
|
323
|
+
f"Error: {directory} is not a valid FastLED sketch directory, if you are sure it is, use --force-compile"
|
324
|
+
)
|
314
325
|
return 1
|
315
326
|
|
316
327
|
# If not explicitly using web compiler, check Docker installation
|
@@ -105,7 +105,7 @@ def parse_args() -> argparse.Namespace:
|
|
105
105
|
|
106
106
|
if args.init:
|
107
107
|
example = args.init if args.init is not True else None
|
108
|
-
args.directory = project_init(example)
|
108
|
+
args.directory = project_init(example, args.directory)
|
109
109
|
print("\nInitialized FastLED project in", args.directory)
|
110
110
|
print(f"Use 'fastled {args.directory}' to compile the project.")
|
111
111
|
sys.exit(0)
|
@@ -51,6 +51,7 @@ def project_init(
|
|
51
51
|
"""
|
52
52
|
host = host or DEFAULT_URL
|
53
53
|
outputdir = Path(outputdir) if outputdir is not None else Path("fastled")
|
54
|
+
outputdir.mkdir(exist_ok=True, parents=True)
|
54
55
|
if example == "PROMPT" or example is None:
|
55
56
|
try:
|
56
57
|
example = _prompt_for_example()
|
@@ -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.
|
3
|
+
Version: 1.1.68
|
4
4
|
Summary: FastLED Wasm Compiler
|
5
5
|
Home-page: https://github.com/zackees/fastled-wasm
|
6
6
|
Maintainer: Zachary Vorhies
|
@@ -10,16 +10,16 @@ Classifier: Programming Language :: Python :: 3
|
|
10
10
|
Requires-Python: >=3.9
|
11
11
|
Description-Content-Type: text/markdown
|
12
12
|
License-File: LICENSE
|
13
|
-
Requires-Dist: docker
|
14
|
-
Requires-Dist: httpx
|
15
|
-
Requires-Dist: watchdog
|
16
|
-
Requires-Dist: livereload
|
17
|
-
Requires-Dist: download
|
18
|
-
Requires-Dist: filelock
|
13
|
+
Requires-Dist: docker>=7.1.0
|
14
|
+
Requires-Dist: httpx>=0.28.1
|
15
|
+
Requires-Dist: watchdog>=6.0.0
|
16
|
+
Requires-Dist: livereload>=2.7.0
|
17
|
+
Requires-Dist: download>=0.3.5
|
18
|
+
Requires-Dist: filelock>=3.16.1
|
19
19
|
Requires-Dist: disklru>=2.0.1
|
20
|
-
Requires-Dist: appdirs
|
21
|
-
Requires-Dist: rapidfuzz
|
22
|
-
Requires-Dist: progress
|
20
|
+
Requires-Dist: appdirs>=1.4.4
|
21
|
+
Requires-Dist: rapidfuzz>=3.10.1
|
22
|
+
Requires-Dist: progress>=1.6
|
23
23
|
|
24
24
|
# FastLED Wasm compiler
|
25
25
|
|
@@ -256,8 +256,10 @@ A: `delay()` will block `loop()` which blocks the main thread of the browser. Th
|
|
256
256
|
Q: How can I get the compiled size of my FastLED sketch smaller?
|
257
257
|
A: A big chunk of space is being used by unnecessary javascript `emscripten` bundling. The wasm_compiler_settings.py file in the FastLED repo can tweak this.
|
258
258
|
|
259
|
+
|
259
260
|
# Revisions
|
260
|
-
|
261
|
+
* 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.
|
262
|
+
* 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
|
261
263
|
* 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.
|
262
264
|
* 1.1.60 - Platform executables (macos-arm/macos-x86/windows/linux-x86) now auto building with each release. Add tests.
|
263
265
|
* 1.1.52 - Add linux-arm
|
@@ -6,6 +6,7 @@ MANIFEST.in
|
|
6
6
|
README.md
|
7
7
|
TODO.md
|
8
8
|
build_exe.py
|
9
|
+
build_site.py
|
9
10
|
clean
|
10
11
|
install
|
11
12
|
lint
|
@@ -15,6 +16,7 @@ setup.py
|
|
15
16
|
test
|
16
17
|
upload_package.sh
|
17
18
|
.github/workflows/build_multi_docker_image.yml
|
19
|
+
.github/workflows/build_webpage.yml
|
18
20
|
.github/workflows/lint.yml
|
19
21
|
.github/workflows/publish_release.yml
|
20
22
|
.github/workflows/test_build_exe.yml
|
@@ -92,6 +94,7 @@ src/fastled.egg-info/entry_points.txt
|
|
92
94
|
src/fastled.egg-info/requires.txt
|
93
95
|
src/fastled.egg-info/top_level.txt
|
94
96
|
src/fastled/assets/example.txt
|
97
|
+
src/fastled/site/build.py
|
95
98
|
src/fastled/test/examples.py
|
96
99
|
tests/test_api.py
|
97
100
|
tests/test_bad_ino.py
|
@@ -5,17 +5,12 @@ from pathlib import Path
|
|
5
5
|
from tempfile import TemporaryDirectory
|
6
6
|
|
7
7
|
from fastled.compile_server import CompileServer
|
8
|
-
from fastled.paths import PROJECT_ROOT
|
9
8
|
from fastled.project_init import project_init
|
10
9
|
from fastled.web_compile import CompileResult
|
11
10
|
|
12
11
|
HERE = Path(__file__).parent
|
13
12
|
TEST_DIR = HERE / "test_ino" / "wasm"
|
14
13
|
|
15
|
-
_USE_LOCALHOST = False
|
16
|
-
_HOST = "http://localhost" if _USE_LOCALHOST else None
|
17
|
-
_PROJECT_ROOT = PROJECT_ROOT.resolve()
|
18
|
-
|
19
14
|
|
20
15
|
EXAMPLES = [
|
21
16
|
"Blink",
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{fastled-1.1.66 → fastled-1.1.68}/examples/Chromancer/gary_woos_wled_port/gary_woos_wled_ledmap.h
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|