Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
796c600d72 | ||
|
|
226e811c7b | ||
|
|
9086eb696f | ||
|
|
4241fe3607 | ||
|
|
e0821fade4 | ||
|
|
d3ba6154f0 | ||
|
|
d00bf35c66 | ||
|
|
d661fa1838 | ||
|
|
97564e33c5 | ||
|
|
a59a567967 | ||
|
|
adf8ed6b56 | ||
|
|
6a70707f67 | ||
|
|
4ade3939ae | ||
|
|
6cd0c3b136 | ||
|
|
bd4a26f6ac | ||
|
|
8dba975894 | ||
|
|
bc70549edd | ||
|
|
37664889c6 | ||
|
|
b04e318c3c | ||
|
|
7398f2df1a | ||
|
|
421e589408 | ||
|
|
9bd82f7246 | ||
|
|
1fca5c8ad9 | ||
|
|
cab110d4c1 | ||
|
|
1df788d716 | ||
|
|
7e79c20f7d | ||
|
|
d17b40796c | ||
|
|
121e19b33d | ||
|
|
a4e4f9cb52 | ||
|
|
a442264953 | ||
|
|
1118aa2af8 | ||
|
|
32ff42d583 | ||
|
|
7895cac17f | ||
|
|
b891f6c35e | ||
|
|
307abbf085 | ||
|
|
9acbdb8367 | ||
|
|
7409057b9c | ||
|
|
89e5bde8e7 | ||
|
|
5ecad4a845 | ||
|
|
a402ae02e9 | ||
|
|
cd58dde773 | ||
|
|
2926b4af71 | ||
|
|
614453aa32 | ||
|
|
0f6b8dee67 |
@@ -1,47 +1,28 @@
|
||||
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
|
||||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
|
||||
|
||||
name: Build Python package and docs
|
||||
|
||||
on:
|
||||
push:
|
||||
tags-ignore:
|
||||
- '**'
|
||||
pull_request:
|
||||
paths:
|
||||
- doc/**
|
||||
- src/**
|
||||
- poetry.lock
|
||||
- poetry.toml
|
||||
- pyproject.toml
|
||||
- setup.cfg
|
||||
|
||||
on: push
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-22.04
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
with:
|
||||
submodules: recursive
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
pip install poetry
|
||||
poetry run python -m pip install --upgrade pip
|
||||
poetry run python -m pip install --upgrade setuptools
|
||||
pipx install poetry
|
||||
poetry install
|
||||
- name: Lint Python code
|
||||
run: poetry run flake8
|
||||
run: poetry run ruff check
|
||||
- name: Check Python formatting
|
||||
run: poetry run ruff format --check
|
||||
- name: Build package
|
||||
run: poetry build
|
||||
- name: Lint docs
|
||||
run: poetry run doc8
|
||||
- name: Build html docs for Read the Docs
|
||||
run: poetry run make -C doc html
|
||||
- name: Install IDE docs dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install dvisvgm preview-latex-style texlive texlive-fonts-extra texlive-latex-extra
|
||||
- name: Build html docs for Pybricks Code IDE
|
||||
run: poetry run make -C doc html TAG=ide
|
||||
|
||||
@@ -5,7 +5,7 @@ on: [push, pull_request]
|
||||
jobs:
|
||||
test:
|
||||
if: github.ref_type != 'tag'
|
||||
runs-on: ubuntu-22.04
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- run: pipx install poetry
|
||||
|
||||
@@ -11,7 +11,7 @@ permissions:
|
||||
|
||||
jobs:
|
||||
publish_ide_docs:
|
||||
runs-on: ubuntu-22.04
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- name: Get version from tag
|
||||
run: |
|
||||
@@ -19,24 +19,15 @@ jobs:
|
||||
NPM_VERSION=$(echo "$VERSION" | sed 's/\([0-9]\)a\([0-9]\)/\1-alpha.\2/;s/\([0-9]\)b\([0-9]\)/\1-beta.\2/;s/\([0-9]\)rc\([0-9]\)/\1-rc.\2/')
|
||||
echo "VERSION=$VERSION" >> $GITHUB_ENV
|
||||
echo "NPM_VERSION=$NPM_VERSION" >> $GITHUB_ENV
|
||||
- name: Ubuntu packages
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y dvisvgm preview-latex-style texlive texlive-fonts-extra texlive-latex-extra
|
||||
echo "NPM_TAG=$(echo "$NPM_VERSION" | grep -q '-' && echo 'next' || echo 'latest')" >> $GITHUB_ENV
|
||||
- uses: actions/checkout@v6
|
||||
with:
|
||||
submodules: recursive
|
||||
- name: Set up Python 3.8
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: 3.8
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
pip install poetry
|
||||
poetry run python -m pip install --upgrade pip
|
||||
poetry run python -m pip install --upgrade setuptools
|
||||
pipx install poetry
|
||||
poetry install --only=doc
|
||||
- uses: actions/setup-node@v4
|
||||
- uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version: '24'
|
||||
registry-url: 'https://registry.npmjs.org'
|
||||
@@ -44,5 +35,5 @@ jobs:
|
||||
working-directory: npm/ide-docs
|
||||
- run: yarn build
|
||||
working-directory: npm/ide-docs
|
||||
- run: npm publish
|
||||
- run: npm publish --tag "$NPM_TAG"
|
||||
working-directory: npm/ide-docs
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
name: Release @pybricks/images
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- '@pybricks/images/**'
|
||||
|
||||
jobs:
|
||||
publish_ide_docs:
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
# Setup .npmrc file to publish to npm
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '22.x'
|
||||
registry-url: 'https://registry.npmjs.org'
|
||||
- run: ./build.py
|
||||
working-directory: npm/images
|
||||
- run: yarn publish
|
||||
working-directory: npm/images/build
|
||||
env:
|
||||
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}
|
||||
@@ -11,7 +11,7 @@ permissions:
|
||||
|
||||
jobs:
|
||||
publish_jedi:
|
||||
runs-on: ubuntu-22.04
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- name: Get version from tag
|
||||
@@ -20,20 +20,20 @@ jobs:
|
||||
NPM_VERSION=$(echo "$VERSION" | sed 's/\([0-9]\)a\([0-9]\)/\1-alpha.\2/;s/\([0-9]\)b\([0-9]\)/\1-beta.\2/;s/\([0-9]\)rc\([0-9]\)/\1-rc.\2/')
|
||||
echo "VERSION=$VERSION" >> $GITHUB_ENV
|
||||
echo "NPM_VERSION=$NPM_VERSION" >> $GITHUB_ENV
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.11'
|
||||
echo "NPM_TAG=$(echo "$NPM_VERSION" | grep -q '-' && echo 'next' || echo 'latest')" >> $GITHUB_ENV
|
||||
- name: Install poetry
|
||||
run: pipx install poetry
|
||||
- name: Set pybricks-jedi version
|
||||
run: poetry version "$VERSION"
|
||||
working-directory: jedi
|
||||
- uses: actions/setup-node@v4
|
||||
- name: Set pybricks version and update jedi dependency pin
|
||||
run: |
|
||||
poetry version "$VERSION"
|
||||
sed -i "s/^pybricks = \".*\"/pybricks = \"$VERSION\"/" jedi/pyproject.toml
|
||||
- uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version: '24'
|
||||
registry-url: 'https://registry.npmjs.org'
|
||||
- run: ./build.py "$NPM_VERSION"
|
||||
working-directory: npm/jedi
|
||||
- run: npm publish
|
||||
working-directory: npm/jedi/build
|
||||
- run: python jedi/build.py "$NPM_VERSION"
|
||||
- run: npm publish --tag "$NPM_TAG"
|
||||
working-directory: jedi/npm-build
|
||||
|
||||
@@ -11,7 +11,7 @@ permissions:
|
||||
jobs:
|
||||
create_release:
|
||||
name: Create release on GitHub
|
||||
runs-on: ubuntu-22.04
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v6
|
||||
@@ -36,7 +36,7 @@ jobs:
|
||||
-F CHANGELOG.md \
|
||||
$PRERELEASE_FLAG
|
||||
build_and_publish:
|
||||
runs-on: ubuntu-22.04
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- run: pipx run poetry build
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
build/
|
||||
build-*/
|
||||
_build/
|
||||
npm-build/
|
||||
|
||||
# Tests
|
||||
######################
|
||||
|
||||
@@ -6,9 +6,9 @@
|
||||
version: 2
|
||||
|
||||
build:
|
||||
os: "ubuntu-22.04"
|
||||
os: "ubuntu-24.04"
|
||||
tools:
|
||||
python: "3.10"
|
||||
python: "3.12"
|
||||
jobs:
|
||||
post_create_environment:
|
||||
- pip install poetry
|
||||
@@ -18,7 +18,3 @@ build:
|
||||
# Build documentation in the doc/main/ directory with Sphinx
|
||||
sphinx:
|
||||
configuration: doc/main/conf.py
|
||||
|
||||
# Optionally build your docs in additional formats such as PDF
|
||||
formats:
|
||||
- pdf
|
||||
|
||||
@@ -5,9 +5,9 @@
|
||||
// List of extensions which should be recommended for users of this workspace.
|
||||
"recommendations": [
|
||||
"ms-python.python",
|
||||
"ms-python.black-formatter"
|
||||
"charliermarsh.ruff"
|
||||
],
|
||||
// List of extensions recommended by VS Code that should not be recommended for users of this workspace.
|
||||
"unwantedRecommendations": [
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,14 +4,9 @@
|
||||
},
|
||||
"python.defaultInterpreterPath": ".venv/bin/python",
|
||||
"python.autoComplete.extraPaths": ["jedi/src"],
|
||||
"python.formatting.provider": "none",
|
||||
"python.linting.pylintEnabled": false,
|
||||
"python.linting.flake8Enabled": true,
|
||||
"python.linting.pycodestyleEnabled": false,
|
||||
"python.linting.enabled": true,
|
||||
"[python]": {
|
||||
"editor.formatOnSave": true,
|
||||
"editor.defaultFormatter": "ms-python.black-formatter"
|
||||
"editor.defaultFormatter": "charliermarsh.ruff"
|
||||
},
|
||||
"python.languageServer": "Pylance",
|
||||
"python.testing.pytestArgs": [
|
||||
|
||||
@@ -1,333 +1,5 @@
|
||||
# Changelog
|
||||
|
||||
<!-- refer to https://keepachangelog.com/en/1.0.0/ for guidance -->
|
||||
See [pybricks-micropython/CHANGELOG.md][changelog] for the changes in each release.
|
||||
|
||||
## Unreleased
|
||||
|
||||
## 4.0.0b4 - 2026-05-29
|
||||
|
||||
### Changed
|
||||
|
||||
- Bump node version.
|
||||
|
||||
## 4.0.0b3 - 2026-05-29
|
||||
|
||||
### Changed
|
||||
|
||||
- Fixed NPM publishing permissions.
|
||||
|
||||
## 4.0.0b2 - 2026-05-29
|
||||
|
||||
### Changed
|
||||
|
||||
- Change NPM publishing to trusted publishers.
|
||||
|
||||
|
||||
## 4.0.0b1 - 2026-05-29
|
||||
|
||||
### Changed
|
||||
|
||||
- Updated API for firmware 4.0.0bx. See upstream changelog for details.
|
||||
- Updated release pipeline to publish rtd, npm/docs and npm/jedi on tag.
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fixed `DriveBase.angle` reporting an incorrect return type.
|
||||
|
||||
## 3.6.1 - 2025-05-01
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fixed missing `hub.system.info` method on some hubs.
|
||||
|
||||
## 3.6.0 - 2025-03-11
|
||||
|
||||
### Changed
|
||||
|
||||
- Update API for firmware 3.6.0. See upstream changelog for details.
|
||||
|
||||
## 3.6.0b5 - 2025-02-26
|
||||
|
||||
### Changed
|
||||
|
||||
- Update API for firmware 3.6.0b5. See upstream changelog for details.
|
||||
|
||||
## 3.5.0 - 2024-04-11
|
||||
|
||||
### Changed
|
||||
- Bump version to 3.5.0 without additional changes.
|
||||
|
||||
## 3.5.0b2 - 2024-04-05
|
||||
|
||||
### Added
|
||||
|
||||
- Added `pybricks.pupdevices.Remote.disconnect` method.
|
||||
- Added blocks for `up`, `ready` and `stationary` for IMUs.
|
||||
- Added `last` and `chr` parameters to `read_input_byte` and add blocks.
|
||||
- Added block for the `in` operation.
|
||||
- Add double ternary block.
|
||||
|
||||
## 3.5.0b1 - 2024-03-11
|
||||
|
||||
### Added
|
||||
|
||||
- Added `XboxController.rumble` method.
|
||||
- Added block icons for `hub.system.set_stop_button` and `hub.system.shutdown`.
|
||||
- Added program stop block (`raise SystemExit`).
|
||||
|
||||
## 3.4.1 - 2024-03-11
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fixed Read The Docs virtual environment workflow.
|
||||
|
||||
## 3.4.0 - 2024-03-11
|
||||
|
||||
### Changed
|
||||
|
||||
- Update list block screenshots to match implementation.
|
||||
|
||||
## 3.4.0b5 - 2024-03-05
|
||||
|
||||
### Changed
|
||||
|
||||
- Updates for v3.4.0b3 firmware (out of sync with docs).
|
||||
- Changed `hub.button` to `hub.buttons` on single button hubs. Access via
|
||||
`hub.button` will keep working in the firmware for backwards compatibility.
|
||||
|
||||
## 3.4.0b4 - 2024-02-14
|
||||
|
||||
### Added
|
||||
|
||||
- Added `pybricks.iodevices.XboxController` class.
|
||||
|
||||
### Changed
|
||||
|
||||
- Changed `buttons.pressed` return type to set.
|
||||
|
||||
## 3.4.0b3 - 2024-01-30
|
||||
|
||||
### Added
|
||||
|
||||
- Added `pybricks.robotics.Car` class.
|
||||
|
||||
### Changed
|
||||
|
||||
- Changed `pybricks.robotics.DriveBase` icon to two wheels instead of steering
|
||||
wheel, which will be used for the new car class.
|
||||
|
||||
## 3.4.0b2 - 2023-11-28
|
||||
|
||||
### Changed
|
||||
- Include first batch of block coding images.
|
||||
|
||||
## 3.3.0 - 2023-11-24
|
||||
|
||||
### Changed
|
||||
- Bump beta version to release version with no further changes.
|
||||
|
||||
## 3.3.0c1 - 2023-11-20
|
||||
|
||||
### Added
|
||||
- Enabled tilt and orientation config for `MoveHub()`.
|
||||
- Documented `Motor.close()`
|
||||
|
||||
## Fixed
|
||||
- Fixed missing awaitable for `Remote.light` and LWP3 writes.
|
||||
|
||||
## 3.3.0b9 - 2023-10-26
|
||||
|
||||
### Changed
|
||||
- Changed the beta feature for using the hub's gyro. Gyro control can now be
|
||||
toggled using `use_gyro` instead of using a separate `GyroDriveBase` class.
|
||||
- Documentation updates to match firmware 3.3.0b5--3.3.0b9 updates.
|
||||
|
||||
### Added
|
||||
- Added `set` to `ubuiltins` module.
|
||||
- Basic multitasking docs.
|
||||
- Awaitable keyword for awaitable methods and functions.
|
||||
|
||||
## 3.3.0b5 - 2023-05-16
|
||||
|
||||
### Added
|
||||
- Documented new `hub.ble` methods.
|
||||
|
||||
## 3.3.0b4 - 2023-04-21
|
||||
|
||||
### Added
|
||||
- Documented `integral_deadzone` in `Control.pid()`.
|
||||
- Documented `Motor.model`. This can be used to view the estimated motor
|
||||
state and change its settings.
|
||||
- Added `rotation`, `orientation`, `ready`, `stationary` and `settings` methods
|
||||
to `IMU` class.
|
||||
- Added `GyroDriveBase` class to `pybricks.robotics`.
|
||||
|
||||
### Changed
|
||||
- Change implementation status of `IMU.heading` and `IMU.reset_heading`. They
|
||||
are now implemented, with some limitations as noted in a note box.
|
||||
- Moved `Matrix` and `vector` from `pybricks.geometry` to `pybricks.tools`.
|
||||
- Moved `Axis` from `pybricks.geometry` to `pybricks.parameters`.
|
||||
|
||||
### Removed
|
||||
- Removed `pybricks.geometry` module.
|
||||
|
||||
## 3.2.0 - 2022-12-20
|
||||
|
||||
### Changed
|
||||
- Changed module TOC headings to make it easier to find things.
|
||||
|
||||
## 3.2.0c1 - 2022-12-09
|
||||
|
||||
### Changed
|
||||
- Updated "front" side of the Technic Hub to be consistent with
|
||||
the Prime Hub.
|
||||
|
||||
## 3.2.0b6 - 2022-12-02
|
||||
|
||||
### Added
|
||||
- Documented ``Stop.NONE`` and ``Stop.COAST_SMART``.
|
||||
- Documented ``ujson`` module.
|
||||
- Added `done` and `stalled` methods for `DriveBase`.
|
||||
|
||||
### Changed
|
||||
- Changed `PrimeHub.display.image()` to `PrimeHub.display.icon()` and renamed
|
||||
its kwarg from `image` to `icon`.
|
||||
- Improved presentation and docstrings of the ``ubuiltins`` and other
|
||||
MicroPython modules
|
||||
- Moved the random numbers example for Move Hub to the Move Hub page.
|
||||
- Moved `done()`, `stalled()`, `load()` from `Control` to `Motor` object.
|
||||
|
||||
## 3.2.0b5 - 2022-11-11
|
||||
|
||||
### Fixed
|
||||
- Fixed Jedi code completion for `Color` and `Icon` classes in `pybricks.parameters`.
|
||||
|
||||
## 3.2.0b4 - 2022-10-21
|
||||
|
||||
### Added
|
||||
- Code auto-completion for `EssentialHub`.
|
||||
- Added `System.storage` method.
|
||||
|
||||
### Fixed
|
||||
- Fixed some type hints in `parameters` submodule.
|
||||
|
||||
## 3.2.0b1-r3 - 2022-06-26
|
||||
|
||||
### Fixed
|
||||
- Fixed more type hints and improved compatibility with jedi.
|
||||
|
||||
## 3.2.0b1-r2 - 2022-06-24
|
||||
|
||||
### Changed
|
||||
- Moved remaining type hints from `.pyi` files to the python stub modules, and
|
||||
fixed numerous errors in the type hints throughout.
|
||||
|
||||
## 3.2.0b1-r1 - 2022-06-09
|
||||
|
||||
### Added
|
||||
- Added `__init__.py` to `pybricks` package.
|
||||
|
||||
## 3.2.0b1 - 2022-06-02
|
||||
|
||||
### Added
|
||||
- Code auto-completion for `hub.charger`, `hub.imu` and `hub.system`.
|
||||
- Moved typing from several `.pyi` files to the actual python modules.
|
||||
|
||||
### Fixed
|
||||
- Fixed code completion for `DCMotor` and `Motor` classes in MS Python VS Code extension.
|
||||
- Fixed missing `DCMotor` type in `ev3devices`.
|
||||
- Fixed type hint for `Motor.reset_angle()` in `pupdevices`.
|
||||
|
||||
### Changed
|
||||
- Setter for acceleration can now also be used to set acceleration and
|
||||
deceleration to different values, using a two-valued tuple.
|
||||
|
||||
## 3.1.0 - 2021-12-16
|
||||
|
||||
### Added
|
||||
- Added maximum voltage setter for `DCMotor` and `Motor`.
|
||||
- Documented `DriveBase.curve()` method.
|
||||
|
||||
### Changed
|
||||
- Removed `duty` setting from `Control.limits` method.
|
||||
- Removed `integral_range` setting from `Control.pid` method.
|
||||
|
||||
### Fixed
|
||||
- Fixed link to Color Light Matrix page.
|
||||
- Fixed link to Inventor Hub page.
|
||||
|
||||
## 3.1.0rc1 - 2021-11-19
|
||||
|
||||
### Added
|
||||
- Added `ColorLightMatrix` class.
|
||||
- Added `LWP3Device` class.
|
||||
|
||||
**NOTE: version number after this point were from JavaScript package and do
|
||||
not correspond to Pybricks firmware version numbers.**
|
||||
|
||||
## 1.6.0 - 2021-08-30
|
||||
|
||||
### Added
|
||||
- MicroPython module documentation.
|
||||
- Examples for hub system functions including stop button and shutdown.
|
||||
|
||||
### Changed
|
||||
- Build IDE docs as main docs with minor changes, instead of a completely
|
||||
separate build.
|
||||
- Moved motor control documentation to the motor page.
|
||||
|
||||
## 1.5.0 - 2021-07-01
|
||||
|
||||
### Added
|
||||
- Documentation for Powered Up Remote Control.
|
||||
|
||||
## 1.4.0 - 2021-06-23
|
||||
|
||||
### Added
|
||||
- Enabled beta content that was hidden for the 3.0 release.
|
||||
- Added notice about using the latest beta version.
|
||||
|
||||
## 1.3.3 - 2021-05-21
|
||||
|
||||
### Changed
|
||||
- Match example snippet styling to IDE.
|
||||
- Add more examples.
|
||||
|
||||
## 1.3.2 - 2021-04-26
|
||||
|
||||
### Changed
|
||||
- Theme style fixes.
|
||||
- Example code fixes
|
||||
- Match doc version to firmware version.
|
||||
|
||||
## 1.3.1 - 2021-04-12
|
||||
|
||||
### Changed
|
||||
- Upgrade sphinx and rtd-theme to fix style issues.
|
||||
|
||||
## 1.3.0 - 2021-04-12
|
||||
|
||||
### Removed
|
||||
- Removed features which not be in the official 3.0 release. These features
|
||||
are still in beta. They'll come back in future releases once tested.
|
||||
|
||||
## 1.2.0 - 2021-04-09
|
||||
|
||||
### Changed
|
||||
- Moved installation guide to external site.
|
||||
|
||||
## 1.1.1 - 2021-02-14
|
||||
|
||||
### Added
|
||||
- Added installation guide.
|
||||
- Various documentation fixes.
|
||||
|
||||
## 1.1.0 - 2021-01-28
|
||||
|
||||
### Added
|
||||
- Scrollbar styling.
|
||||
|
||||
## 1.0.0 - 2021-01-25
|
||||
|
||||
### Added
|
||||
- Sphinx build output.
|
||||
[changelog]: https://github.com/pybricks/pybricks-micropython/blob/master/CHANGELOG.md
|
||||
|
||||
@@ -168,6 +168,18 @@ Building all release artifacts (docs, jedi, npm packages):
|
||||
# Linux/macOS only
|
||||
./build-all.sh
|
||||
|
||||
** version notes **
|
||||
|
||||
This repository is frequently updated to stay in sync with the firmware
|
||||
implementation.
|
||||
|
||||
Major and minor versions are synchronized with `pybricks-micropython`, which
|
||||
leads. Patch versions and prerelease version numbers may differ, as they may
|
||||
be bumped for every small change or typo in the docs.
|
||||
|
||||
The version for this repository is also used for the `@pybricks/jedi` and
|
||||
`@pybricks/ide-docs` npm packages.
|
||||
|
||||
[vscode]: https://code.visualstudio.com/
|
||||
[git]: https://git-scm.com/
|
||||
[python]: https://www.python.org/
|
||||
|
||||
@@ -4,6 +4,26 @@ set -euo pipefail
|
||||
|
||||
REPO_ROOT="$(realpath "$(dirname "${BASH_SOURCE[0]}")")"
|
||||
|
||||
# Option: --pybricks-code <path> copies built npm packages into that
|
||||
# checkout's node_modules/@pybricks/ for easy local testing.
|
||||
PYBRICKS_CODE=""
|
||||
while [[ $# -gt 0 ]]; do
|
||||
case "$1" in
|
||||
--pybricks-code)
|
||||
PYBRICKS_CODE="$(realpath "$2")"
|
||||
shift 2
|
||||
;;
|
||||
*)
|
||||
echo "usage: $0 [--pybricks-code <path-to-pybricks-code-checkout>]" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
if [[ -n "$PYBRICKS_CODE" && ! -d "$PYBRICKS_CODE/node_modules/@pybricks" ]]; then
|
||||
echo "error: $PYBRICKS_CODE/node_modules/@pybricks not found (run yarn install there first)" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Activate the project venv so python/make/etc. all use it without poetry run
|
||||
source "$REPO_ROOT/.venv/bin/activate"
|
||||
|
||||
@@ -13,35 +33,57 @@ VERSION=$(grep '^version = ' "$REPO_ROOT/pyproject.toml" | head -1 | sed 's/vers
|
||||
NPM_VERSION=$(echo "$VERSION" | sed 's/\([0-9]\)a\([0-9]\)/\1-alpha.\2/;s/\([0-9]\)b\([0-9]\)/\1-beta.\2/;s/\([0-9]\)rc\([0-9]\)/\1-rc.\2/')
|
||||
echo "==> Building version $VERSION (npm: $NPM_VERSION)"
|
||||
|
||||
# lint
|
||||
# lint (same as CI build.yml)
|
||||
echo "==> Linting"
|
||||
cd "$REPO_ROOT"
|
||||
flake8
|
||||
ruff check
|
||||
ruff format --check
|
||||
doc8
|
||||
|
||||
# pybricks-jedi wheel (from local source)
|
||||
# Python package
|
||||
echo "==> Building Python package"
|
||||
rm -rf "$REPO_ROOT/dist" # stale wheels would get globbed into the jedi npm package
|
||||
poetry build
|
||||
|
||||
# pybricks-jedi tests (own poetry env, same as CI jedi.yml)
|
||||
echo "==> Testing pybricks-jedi"
|
||||
cd "$REPO_ROOT/jedi"
|
||||
poetry run pytest -vv
|
||||
|
||||
echo "==> Building pybricks-jedi wheel"
|
||||
cd "$REPO_ROOT/jedi"
|
||||
rm -rf dist/
|
||||
poetry build --format=wheel
|
||||
|
||||
# @pybricks/jedi npm package
|
||||
echo "==> Building @pybricks/jedi"
|
||||
cd "$REPO_ROOT"
|
||||
python3 npm/jedi/build.py "$NPM_VERSION"
|
||||
cd "$REPO_ROOT/jedi"
|
||||
rm -rf dist # build.py globs dist/*.whl, stale wheels would get shipped
|
||||
python3 build.py "$NPM_VERSION"
|
||||
|
||||
# @pybricks/ide-docs npm package
|
||||
echo "==> Building @pybricks/ide-docs"
|
||||
# html docs for Read the Docs
|
||||
echo "==> Building Read the Docs html docs"
|
||||
cd "$REPO_ROOT"
|
||||
make -C doc clean html
|
||||
|
||||
# @pybricks/ide-docs npm package (builds the TAG=ide docs)
|
||||
echo "==> Building @pybricks/ide-docs"
|
||||
make -C doc clean
|
||||
cd "$REPO_ROOT/npm/ide-docs"
|
||||
yarn build
|
||||
|
||||
echo ""
|
||||
echo "Build complete."
|
||||
echo " jedi npm package : npm/jedi/build/"
|
||||
echo " python package : dist/"
|
||||
echo " jedi npm package : jedi/npm-build/"
|
||||
echo " ide-docs : npm/ide-docs/html/"
|
||||
|
||||
if [[ -n "$PYBRICKS_CODE" ]]; then
|
||||
DEST="$PYBRICKS_CODE/node_modules/@pybricks"
|
||||
echo "==> Copying packages to $DEST"
|
||||
rm -rf "$DEST/jedi" "$DEST/ide-docs"
|
||||
mkdir -p "$DEST/jedi" "$DEST/ide-docs"
|
||||
cp -r "$REPO_ROOT/jedi/npm-build/." "$DEST/jedi/"
|
||||
cp -r "$REPO_ROOT/npm/ide-docs/package.json" \
|
||||
"$REPO_ROOT/npm/ide-docs/LICENSE" \
|
||||
"$REPO_ROOT/npm/ide-docs/README.md" \
|
||||
"$REPO_ROOT/npm/ide-docs/html" \
|
||||
"$DEST/ide-docs/"
|
||||
echo "Copied @pybricks/jedi and @pybricks/ide-docs. Restart the dev server to pick them up."
|
||||
fi
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
import os
|
||||
import re
|
||||
import sys
|
||||
import tomllib
|
||||
|
||||
from docutils import nodes
|
||||
from docutils.parsers.rst.directives import flag
|
||||
@@ -30,7 +31,6 @@ from sphinx.application import Sphinx
|
||||
from sphinx.addnodes import pending_xref
|
||||
from sphinx.environment import BuildEnvironment
|
||||
from sphinx.util.nodes import make_refnode
|
||||
import toml
|
||||
|
||||
TOP_DIR = os.path.abspath(os.path.join("..", ".."))
|
||||
sys.path.insert(0, os.path.join(TOP_DIR, "src"))
|
||||
@@ -40,7 +40,8 @@ sys.path.append(os.path.abspath("../common/extensions"))
|
||||
# this line of code grabbed from docs.readthedocs.org
|
||||
ON_RTD = os.environ.get("READTHEDOCS", None) == "True"
|
||||
|
||||
_pyproject = toml.load(os.path.join(TOP_DIR, "pyproject.toml"))
|
||||
with open(os.path.join(TOP_DIR, "pyproject.toml"), "rb") as _f:
|
||||
_pyproject = tomllib.load(_f)
|
||||
|
||||
# -- General configuration ------------------------------------------------
|
||||
|
||||
@@ -55,11 +56,13 @@ extensions = [
|
||||
"sphinx.ext.autodoc",
|
||||
"sphinx.ext.napoleon",
|
||||
"sphinx.ext.todo",
|
||||
"sphinx.ext.mathjax",
|
||||
# Custom Pybricks extensions
|
||||
"awaitable",
|
||||
"blockimg",
|
||||
"color",
|
||||
"classlink",
|
||||
"docstring_signature",
|
||||
"nestedmethod",
|
||||
"requirements",
|
||||
"requirements-static",
|
||||
"versionchanged",
|
||||
@@ -71,8 +74,7 @@ templates_path = ["../common/_templates"]
|
||||
# The suffix(es) of source filenames.
|
||||
# You can specify multiple suffix as a list of string:
|
||||
#
|
||||
# source_suffix = ['.rst', '.md']
|
||||
source_suffix = ".rst"
|
||||
source_suffix = {".rst": "restructuredtext"}
|
||||
|
||||
# The master toctree document.
|
||||
master_doc = "index"
|
||||
@@ -134,6 +136,15 @@ nitpick_ignore = [
|
||||
# not sure why, but this is needed for typing.IO in uselect
|
||||
nitpick_ignore.append(("py:obj", "typing.IO"))
|
||||
|
||||
# MaybeAwaitable* stub types have no documented target; the awaitable
|
||||
# extension renders them as an "await" prefix instead, but the raw names can
|
||||
# still leak into signatures (e.g. overloads), so suppress those warnings.
|
||||
# Likewise, collections.abc types have no link target without intersphinx.
|
||||
nitpick_ignore_regex = [
|
||||
("py:class", r"MaybeAwaitable\w*"),
|
||||
("py:class", r"collections\.abc\.\w+"),
|
||||
]
|
||||
|
||||
# -- Autodoc options ------------------------------------------------------
|
||||
|
||||
autodoc_member_order = "bysource"
|
||||
@@ -146,10 +157,18 @@ add_module_names = False # Hide module name
|
||||
|
||||
# -- Options for HTML output ----------------------------------------------
|
||||
|
||||
import sphinx_rtd_theme
|
||||
|
||||
# The theme to use for HTML and HTML Help pages. Since sphinx-rtd-theme 1.2
|
||||
# themes are registered via entry points, so setting html_theme is all that
|
||||
# is needed (no extensions entry or html_theme_path).
|
||||
html_theme = "sphinx_rtd_theme"
|
||||
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
|
||||
|
||||
# Theme options are theme-specific and customize the look and feel of a theme
|
||||
# further. For a list of options available for each theme, see the
|
||||
# documentation.
|
||||
html_theme_options = {
|
||||
# Hide the next/previous buttons at the bottom of each page.
|
||||
"prev_next_buttons_location": None,
|
||||
}
|
||||
|
||||
html_show_sourcelink = False
|
||||
html_copy_source = False
|
||||
@@ -158,38 +177,11 @@ html_context = {
|
||||
"disclaimer": _DISCLAIMER,
|
||||
}
|
||||
|
||||
# The theme to use for HTML and HTML Help pages. See the documentation for
|
||||
# a list of builtin themes.
|
||||
#
|
||||
# html_theme = 'alabaster'
|
||||
|
||||
# Theme options are theme-specific and customize the look and feel of a theme
|
||||
# further. For a list of options available for each theme, see the
|
||||
# documentation.
|
||||
#
|
||||
html_theme_options = {
|
||||
"style_external_links": True,
|
||||
"logo_only": True,
|
||||
"style_nav_header_background": "#0088ce", # Pybricks blue
|
||||
}
|
||||
|
||||
# Add any paths that contain custom static files (such as style sheets) here,
|
||||
# relative to this directory. They are copied after the builtin static files,
|
||||
# so a file named "default.css" will overwrite the builtin "default.css".
|
||||
html_static_path = ["../common/_static"]
|
||||
|
||||
# Custom sidebar templates, must be a dictionary that maps document names
|
||||
# to template names.
|
||||
#
|
||||
# This is required for the alabaster theme
|
||||
# refs: http://alabaster.readthedocs.io/en/latest/installation.html#sidebars
|
||||
html_sidebars = {
|
||||
"**": [
|
||||
"relations.html", # needs 'show_related': True theme option to display
|
||||
"searchbox.html",
|
||||
]
|
||||
}
|
||||
|
||||
# Don't hyperlink to larger images for scaled images.
|
||||
html_scaled_image_link = False
|
||||
|
||||
@@ -199,64 +191,11 @@ html_scaled_image_link = False
|
||||
htmlhelp_basename = "Pybricksdoc"
|
||||
|
||||
|
||||
# -- Options for LaTeX output ---------------------------------------------
|
||||
|
||||
latex_elements = {
|
||||
# The paper size ('letterpaper' or 'a4paper').
|
||||
#
|
||||
# 'papersize': 'letterpaper',
|
||||
# The font size ('10pt', '11pt' or '12pt').
|
||||
#
|
||||
# 'pointsize': '10pt',
|
||||
# Additional stuff for the LaTeX preamble.
|
||||
#
|
||||
"preamble": r"""
|
||||
\usepackage{CJKutf8}
|
||||
\makeatletter
|
||||
\fancypagestyle{normal}{
|
||||
\fancyhf{}
|
||||
\fancyfoot[R]{{\py@HeaderFamily\thepage}}
|
||||
\fancyfoot[C]{\raisebox{-7mm}{\tiny %(disclaimer)s}}
|
||||
\fancyhead[L]{{\py@HeaderFamily \@title}}
|
||||
\fancyhead[R]{{\py@HeaderFamily \py@release}}
|
||||
\renewcommand{\headrulewidth}{0.4pt}
|
||||
\renewcommand{\footrulewidth}{0.4pt}
|
||||
}
|
||||
\fancypagestyle{plain}{
|
||||
\fancyhf{}
|
||||
\fancyfoot[R]{{\py@HeaderFamily\thepage}}
|
||||
\fancyfoot[C]{\raisebox{-7mm}{\tiny %(disclaimer)s}}
|
||||
\renewcommand{\headrulewidth}{0.4pt}
|
||||
\renewcommand{\footrulewidth}{0.4pt}
|
||||
}
|
||||
\makeatother
|
||||
"""
|
||||
% {
|
||||
"disclaimer": " ".join((_DISCLAIMER, "©", copyright)),
|
||||
},
|
||||
# Latex figure (float) alignment
|
||||
#
|
||||
# 'figure_align': 'htbp',
|
||||
"extraclassoptions": "openany,oneside",
|
||||
"releasename": "Version",
|
||||
}
|
||||
|
||||
# Grouping the document tree into LaTeX files. List of tuples
|
||||
# (source start file, target name, title,
|
||||
# author, documentclass [howto, manual, or own class]).
|
||||
latex_documents = [
|
||||
(master_doc, "".join([project, "-v", version, ".tex"]), _TITLE, author, "manual"),
|
||||
]
|
||||
|
||||
# -- Content control -----------------------------------------------------
|
||||
|
||||
|
||||
exclude_patterns = [
|
||||
"ev3devices.rst",
|
||||
"hubs/ev3brick.rst",
|
||||
"media.rst",
|
||||
"messaging.rst",
|
||||
"nxtdevices.rst",
|
||||
"tools/datalog.rst",
|
||||
"*.rst.txt",
|
||||
]
|
||||
@@ -364,9 +303,35 @@ def on_missing_reference(
|
||||
return nodes.Text(f"{ret_type}: {ret_unit}")
|
||||
|
||||
|
||||
def on_build_finished(app: Sphinx, exception):
|
||||
if exception or app.builder.name != "html":
|
||||
return
|
||||
import json
|
||||
from sphinx.util.inventory import InventoryFile
|
||||
|
||||
inv_path = os.path.join(app.outdir, "objects.inv")
|
||||
if not os.path.exists(inv_path):
|
||||
return
|
||||
|
||||
with open(inv_path, "rb") as f:
|
||||
inv = InventoryFile.load(f, "", lambda base, uri: base + uri)
|
||||
|
||||
index = {}
|
||||
for type_key, entries in inv.items():
|
||||
if not type_key.startswith("py:"):
|
||||
continue
|
||||
for name, item in entries.items():
|
||||
index[name] = item.uri
|
||||
|
||||
out_path = os.path.join(app.outdir, "namespace_index.json")
|
||||
with open(out_path, "w") as f:
|
||||
json.dump(index, f, indent=2, sort_keys=True)
|
||||
|
||||
|
||||
def setup(app: Sphinx):
|
||||
app.add_directive("availability", AvailabilityDirective)
|
||||
app.connect("missing-reference", on_missing_reference)
|
||||
app.connect("build-finished", on_build_finished)
|
||||
|
||||
|
||||
# -- Python domain hacks ---------------------------------------------------
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
"""Show ``await`` in front of multitasking functions and methods.
|
||||
|
||||
The Pybricks API returns awaitable objects when a run loop is active but
|
||||
blocks otherwise. Such functions are annotated with ``MaybeAwaitable*``
|
||||
return types. This extension:
|
||||
|
||||
* makes autodoc treat functions/methods returning ``MaybeAwaitable*`` as
|
||||
async (there is no public hook for this, so ``is_async`` is patched);
|
||||
* renders the signature prefix as ``await`` (linked to the multitasking
|
||||
section in tools) instead of ``async``, which better matches how users
|
||||
call these functions.
|
||||
"""
|
||||
|
||||
from collections.abc import Sequence
|
||||
|
||||
from docutils import nodes
|
||||
from sphinx.addnodes import desc_sig_keyword
|
||||
from sphinx.application import Sphinx
|
||||
from sphinx.domains.python import PyFunction, PyMethod, type_to_xref
|
||||
from sphinx.ext.autodoc._property_types import _FunctionDefProperties
|
||||
|
||||
|
||||
def _is_async(self: _FunctionDefProperties) -> bool:
|
||||
if "async" in self.properties:
|
||||
return True
|
||||
|
||||
try:
|
||||
return_type = self._obj.__annotations__["return"]
|
||||
except (AttributeError, KeyError):
|
||||
return False
|
||||
|
||||
return "MaybeAwaitable" in str(return_type)
|
||||
|
||||
|
||||
class _AwaitPrefixMixin:
|
||||
"""Replaces the ``async`` keyword prefix with a linked ``await``."""
|
||||
|
||||
def get_signature_prefix(self, sig: str) -> Sequence[nodes.Node]:
|
||||
prefix = []
|
||||
for node in super().get_signature_prefix(sig):
|
||||
if isinstance(node, desc_sig_keyword) and node.astext() == "async":
|
||||
node = type_to_xref("await", self.env, suppress_prefix=True)
|
||||
prefix.append(node)
|
||||
return prefix
|
||||
|
||||
|
||||
class PybricksPyFunction(_AwaitPrefixMixin, PyFunction):
|
||||
pass
|
||||
|
||||
|
||||
class PybricksPyMethod(_AwaitPrefixMixin, PyMethod):
|
||||
pass
|
||||
|
||||
|
||||
def setup(app: Sphinx):
|
||||
_FunctionDefProperties.is_async = property(_is_async)
|
||||
|
||||
app.add_directive_to_domain("py", "function", PybricksPyFunction, override=True)
|
||||
app.add_directive_to_domain("py", "method", PybricksPyMethod, override=True)
|
||||
|
||||
return {"parallel_read_safe": True}
|
||||
@@ -1,7 +1,8 @@
|
||||
from docutils.parsers.rst import Directive
|
||||
from docutils import nodes
|
||||
from pathlib import Path
|
||||
|
||||
from docutils import nodes
|
||||
from docutils.parsers.rst import Directive
|
||||
|
||||
SPHINX_IMAGE_PATH = "blockimg"
|
||||
|
||||
|
||||
|
||||
@@ -3,7 +3,6 @@ from docutils.parsers.rst import Directive
|
||||
|
||||
|
||||
class PybricksClasslinkDirective(Directive):
|
||||
|
||||
required_arguments = 1
|
||||
optional_arguments = 1
|
||||
|
||||
@@ -13,7 +12,7 @@ class PybricksClasslinkDirective(Directive):
|
||||
link = name if len(self.arguments) == 1 else self.arguments[1]
|
||||
|
||||
html = (
|
||||
'<a href="{0}.html">'.format(link.lower())
|
||||
f'<a href="{link.lower()}.html">'
|
||||
+ '<dl class="py class">'
|
||||
+ "<dt>"
|
||||
+ '<em class="property">class </em>'
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
from colorsys import hsv_to_rgb
|
||||
|
||||
from docutils import nodes
|
||||
from docutils.parsers.rst import Directive
|
||||
|
||||
from pybricks.parameters import Color
|
||||
from colorsys import hsv_to_rgb
|
||||
|
||||
|
||||
class PybricksColorDirective(Directive):
|
||||
|
||||
required_arguments = 1
|
||||
|
||||
def run(self):
|
||||
@@ -19,19 +20,17 @@ class PybricksColorDirective(Directive):
|
||||
r, g, b = hsv_to_rgb(color.h / 360, color.s / 100, color.v / 100)
|
||||
|
||||
# Convert RGB to HEX
|
||||
rgbhex = "#{0:02x}{1:02x}{2:02x}".format(
|
||||
round(r * 255), round(g * 255), round(b * 255)
|
||||
)
|
||||
rgbhex = f"#{round(r * 255):02x}{round(g * 255):02x}{round(b * 255):02x}"
|
||||
|
||||
# Render a small block of the given color
|
||||
css = "background-color: {0}; color: {0}; width: 50px;".format(rgbhex)
|
||||
css = f"background-color: {rgbhex}; color: {rgbhex}; width: 50px;"
|
||||
|
||||
if name == "WHITE":
|
||||
css += (
|
||||
"border-style: solid; border-width: 0.5px;" + "border-color: #666666;"
|
||||
)
|
||||
|
||||
html = '<div id="test" style="{0}">_</div>'.format(css)
|
||||
html = f'<div id="test" style="{css}">_</div>'
|
||||
|
||||
# Return the node
|
||||
node = nodes.raw("", html, format="html")
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
"""Make explicit docstring signatures win over ``@overload`` signatures.
|
||||
|
||||
Workaround for https://github.com/sphinx-doc/sphinx/issues/10436: when a
|
||||
function or method has overloads, autodoc unconditionally replaces the
|
||||
signature(s) found in the docstring with the overload signatures. Classes
|
||||
already behave correctly, so this only patches the function/method path. There
|
||||
is no event hook for this in autodoc's new (Sphinx 9) pipeline, so
|
||||
``_format_signatures`` is wrapped: when a docstring signature is present,
|
||||
``autodoc_typehints`` is set to ``'none'`` for that single call, which
|
||||
disables only the overload substitution branch.
|
||||
"""
|
||||
|
||||
from sphinx.application import Sphinx
|
||||
from sphinx.ext.autodoc._dynamic import _loader, _signatures
|
||||
from sphinx.ext.autodoc._shared import _AutodocConfig
|
||||
|
||||
_orig_format_signatures = _signatures._format_signatures
|
||||
|
||||
|
||||
def _format_signatures(**kwargs):
|
||||
config: _AutodocConfig = kwargs["config"]
|
||||
docstrings = kwargs.get("docstrings")
|
||||
options = kwargs["options"]
|
||||
props = kwargs["props"]
|
||||
|
||||
if (
|
||||
kwargs.get("args") is None
|
||||
and docstrings
|
||||
and config.autodoc_docstring_signature
|
||||
and config.autodoc_typehints != "none"
|
||||
and props.obj_type in {"function", "method", "decorator"}
|
||||
):
|
||||
# Probe on a copy: extraction strips signature lines from docstrings.
|
||||
docstring_signatures = _signatures._extract_signatures_from_docstrings(
|
||||
[list(lines) for lines in docstrings],
|
||||
props=props,
|
||||
tab_width=options._tab_width,
|
||||
)
|
||||
if docstring_signatures:
|
||||
values = {name: getattr(config, name) for name in _AutodocConfig.__slots__}
|
||||
values["autodoc_typehints"] = "none"
|
||||
kwargs["config"] = _AutodocConfig(**values)
|
||||
|
||||
return _orig_format_signatures(**kwargs)
|
||||
|
||||
|
||||
def setup(app: Sphinx):
|
||||
_signatures._format_signatures = _format_signatures
|
||||
_loader._format_signatures = _format_signatures
|
||||
|
||||
return {"parallel_read_safe": True}
|
||||
@@ -0,0 +1,41 @@
|
||||
"""Provides the ``autonestedmethod`` directive.
|
||||
|
||||
Like ``automethod``, but resolves dotted names such as ``control.limits``
|
||||
relative to the class documented by the enclosing ``autoclass`` directive.
|
||||
Plain ``automethod`` treats everything before the last dot as a module/class
|
||||
path, so ``control.limits`` would be looked up as an attribute of the current
|
||||
*module* instead of the current class. Resolving the class here keeps shared
|
||||
include fragments module-neutral.
|
||||
"""
|
||||
|
||||
from sphinx.util import logging
|
||||
from sphinx.util.docutils import SphinxDirective
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class AutoNestedMethodDirective(SphinxDirective):
|
||||
required_arguments = 1
|
||||
has_content = False
|
||||
|
||||
def run(self):
|
||||
current = self.env.current_document
|
||||
module = current.autodoc_module or self.env.ref_context.get("py:module")
|
||||
cls = current.autodoc_class or self.env.ref_context.get("py:class")
|
||||
|
||||
if not module or not cls:
|
||||
logger.warning(
|
||||
"autonestedmethod:: %s used outside of an autoclass context",
|
||||
self.arguments[0],
|
||||
location=self.get_location(),
|
||||
)
|
||||
return []
|
||||
|
||||
return self.parse_text_to_nodes(
|
||||
f".. automethod:: {module}::{cls}.{self.arguments[0]}"
|
||||
)
|
||||
|
||||
|
||||
def setup(app):
|
||||
app.add_directive("autonestedmethod", AutoNestedMethodDirective)
|
||||
return {"parallel_read_safe": True}
|
||||
@@ -1,8 +1,7 @@
|
||||
from os import path, makedirs
|
||||
from os import makedirs, path
|
||||
|
||||
from docutils import nodes
|
||||
from docutils.parsers.rst import Directive
|
||||
|
||||
from sphinx.util.osutil import copyfile
|
||||
|
||||
# Base feature set.
|
||||
@@ -17,35 +16,44 @@ FEATURES_MEDIUM = FEATURES_SMALL | {
|
||||
"pybricks-frozen",
|
||||
}
|
||||
|
||||
# Large feature set.
|
||||
FEATURES_LARGE = FEATURES_MEDIUM | {
|
||||
"ble-extra", # Extra features such as pairing or multiple connections.
|
||||
}
|
||||
|
||||
# Features per hub.
|
||||
HUB_FEATURES = {
|
||||
"movehub": {"movehub", "pup"} | FEATURES_SMALL,
|
||||
"cityhub": {"cityhub", "pup"} | FEATURES_MEDIUM,
|
||||
"technichub": {"technichub", "gyro", "xbox-controller", "pup"} | FEATURES_MEDIUM,
|
||||
"movehub": {"movehub", "ble", "pupdevices"} | FEATURES_SMALL,
|
||||
"cityhub": {"cityhub", "ble", "pupdevices"} | FEATURES_MEDIUM,
|
||||
"technichub": {"technichub", "gyro", "xbox-controller", "ble", "pupdevices"}
|
||||
| FEATURES_MEDIUM,
|
||||
"primehub": {
|
||||
"primehub",
|
||||
"inventorhub",
|
||||
"light-matrix",
|
||||
"gyro",
|
||||
"xbox-controller",
|
||||
"pup",
|
||||
"ble",
|
||||
"ble-extra",
|
||||
"pupdevices",
|
||||
}
|
||||
| FEATURES_LARGE,
|
||||
| FEATURES_MEDIUM,
|
||||
"inventorhub": {
|
||||
"primehub",
|
||||
"inventorhub",
|
||||
"light-matrix",
|
||||
"gyro",
|
||||
"xbox-controller",
|
||||
"pup",
|
||||
"ble",
|
||||
"ble-extra",
|
||||
"pupdevices",
|
||||
}
|
||||
| FEATURES_LARGE,
|
||||
"essentialhub": {"essentialhub", "gyro", "xbox-controller", "pup"} | FEATURES_LARGE,
|
||||
| FEATURES_MEDIUM,
|
||||
"essentialhub": {
|
||||
"essentialhub",
|
||||
"gyro",
|
||||
"xbox-controller",
|
||||
"ble",
|
||||
"ble-extra",
|
||||
"pupdevices",
|
||||
}
|
||||
| FEATURES_MEDIUM,
|
||||
"ev3brick": {"ev3devices", "nxtdevices", "image"} | FEATURES_MEDIUM,
|
||||
}
|
||||
|
||||
|
||||
@@ -63,7 +71,7 @@ class PybricksRequirementsStaticDirective(Directive):
|
||||
makedirs(destdir)
|
||||
|
||||
for hub in HUB_FEATURES:
|
||||
uri = "compat_{0}.png".format(hub)
|
||||
uri = f"compat_{hub}.png"
|
||||
src_uri = path.join(env.app.builder.srcdir, "diagrams", uri)
|
||||
build_uri = path.join(env.app.builder.outdir, "_images", uri)
|
||||
copyfile(src_uri, build_uri)
|
||||
@@ -94,17 +102,17 @@ class PybricksRequirementsStaticDirective(Directive):
|
||||
)
|
||||
|
||||
# Generate full table.
|
||||
html = """
|
||||
html = f"""
|
||||
<div class="wy-table-responsive">
|
||||
<table class="docutils align-default requirements-table">
|
||||
<tbody>
|
||||
<tr>
|
||||
{0}
|
||||
{compat_row}
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
""".format(compat_row)
|
||||
"""
|
||||
|
||||
# Return the node.
|
||||
node = nodes.raw("", html, format="html")
|
||||
|
||||
@@ -22,12 +22,13 @@
|
||||
|
||||
|
||||
import os
|
||||
from docutils.parsers.rst import Directive, directives
|
||||
from docutils import nodes
|
||||
from docutils.statemachine import StringList
|
||||
from sphinx.util.osutil import copyfile
|
||||
from sphinx.util import logging
|
||||
from typing import ClassVar
|
||||
|
||||
from docutils import nodes
|
||||
from docutils.parsers.rst import Directive, directives
|
||||
from docutils.statemachine import StringList
|
||||
from sphinx.util import logging
|
||||
from sphinx.util.osutil import copyfile
|
||||
|
||||
CSS_FILE = "requirements.css"
|
||||
JS_FILE = "requirements.js"
|
||||
@@ -35,7 +36,7 @@ JS_FILE = "requirements.js"
|
||||
|
||||
class PybricksRequirementsDirective(Directive):
|
||||
has_content = True
|
||||
option_spec = {"header": directives.unchanged}
|
||||
option_spec: ClassVar = {"header": directives.unchanged}
|
||||
|
||||
required_arguments = 0
|
||||
optional_arguments = 10
|
||||
|
||||
@@ -4,12 +4,12 @@
|
||||
* deprecated
|
||||
when building documentation with the 'ide' tag.
|
||||
"""
|
||||
|
||||
from docutils import nodes
|
||||
from docutils.parsers.rst import Directive
|
||||
|
||||
|
||||
class PybricksVersionDirective(Directive):
|
||||
|
||||
has_content = True
|
||||
|
||||
def run(self):
|
||||
@@ -19,7 +19,7 @@ class PybricksVersionDirective(Directive):
|
||||
|
||||
|
||||
def setup(app):
|
||||
if "ide" in app.tags.tags:
|
||||
if app.tags.has("ide"):
|
||||
app.add_directive_to_domain(
|
||||
"py", "deprecated", PybricksVersionDirective, override=True
|
||||
)
|
||||
|
||||
|
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 25 KiB |
|
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 28 KiB |
@@ -0,0 +1,994 @@
|
||||
<!-- Copyright (c) 2024 The Pybricks Authors. All rights reserved. -->
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 275.3828125 42" class="blocklySvg pybricks_renderer-renderer pybricks-zelos-light-theme" width="275.3828125" height="42" style="background-color: transparent"><style xmlns="http://www.w3.org/1999/xhtml">.pybricks_renderer-renderer.pybricks-zelos-light-theme .blocklyText,
|
||||
.pybricks_renderer-renderer.pybricks-zelos-light-theme .blocklyFlyoutLabelText {
|
||||
font: bold 12pt "Helvetica Neue", "Segoe UI", Helvetica, sans-serif;
|
||||
}
|
||||
.pybricks_renderer-renderer.pybricks-zelos-light-theme .blocklyText {
|
||||
fill: #fff;
|
||||
}
|
||||
.pybricks_renderer-renderer.pybricks-zelos-light-theme .blocklyNonEditableText>rect:not(.blocklyDropdownRect),
|
||||
.pybricks_renderer-renderer.pybricks-zelos-light-theme .blocklyEditableText>rect:not(.blocklyDropdownRect) {
|
||||
fill: #fff;
|
||||
}
|
||||
.pybricks_renderer-renderer.pybricks-zelos-light-theme .blocklyNonEditableText>text,
|
||||
.pybricks_renderer-renderer.pybricks-zelos-light-theme .blocklyEditableText>text,
|
||||
.pybricks_renderer-renderer.pybricks-zelos-light-theme .blocklyNonEditableText>g>text,
|
||||
.pybricks_renderer-renderer.pybricks-zelos-light-theme .blocklyEditableText>g>text {
|
||||
fill: #575E75;
|
||||
}
|
||||
.pybricks_renderer-renderer.pybricks-zelos-light-theme .blocklyFlyoutLabelText {
|
||||
fill: #575E75;
|
||||
}
|
||||
.pybricks_renderer-renderer.pybricks-zelos-light-theme .blocklyText.blocklyBubbleText {
|
||||
fill: #575E75;
|
||||
}
|
||||
.pybricks_renderer-renderer.pybricks-zelos-light-theme .blocklyDraggable:not(.blocklyDisabled)
|
||||
.blocklyEditableText:not(.editing):hover>rect,
|
||||
.pybricks_renderer-renderer.pybricks-zelos-light-theme .blocklyDraggable:not(.blocklyDisabled)
|
||||
.blocklyEditableText:not(.editing):hover>.blocklyPath {
|
||||
stroke: #fff;
|
||||
stroke-width: 2;
|
||||
}
|
||||
.pybricks_renderer-renderer.pybricks-zelos-light-theme .blocklyHtmlInput {
|
||||
font-family: "Helvetica Neue", "Segoe UI", Helvetica, sans-serif;
|
||||
font-weight: bold;
|
||||
color: #575E75;
|
||||
}
|
||||
.pybricks_renderer-renderer.pybricks-zelos-light-theme .blocklyDropdownText {
|
||||
fill: #fff !important;
|
||||
}
|
||||
.pybricks_renderer-renderer.pybricks-zelos-light-theme.blocklyWidgetDiv .goog-menuitem,
|
||||
.pybricks_renderer-renderer.pybricks-zelos-light-theme.blocklyDropDownDiv .goog-menuitem {
|
||||
font-family: "Helvetica Neue", "Segoe UI", Helvetica, sans-serif;
|
||||
}
|
||||
.pybricks_renderer-renderer.pybricks-zelos-light-theme.blocklyDropDownDiv .goog-menuitem-content {
|
||||
color: #fff;
|
||||
}
|
||||
.pybricks_renderer-renderer.pybricks-zelos-light-theme .blocklyHighlightedConnectionPath {
|
||||
stroke: #ffffff;
|
||||
}
|
||||
.pybricks_renderer-renderer.pybricks-zelos-light-theme .blocklyDisabled > .blocklyOutlinePath {
|
||||
fill: url(#blocklyDisabledPattern770586695409901)
|
||||
}
|
||||
.pybricks_renderer-renderer.pybricks-zelos-light-theme .blocklyInsertionMarker>.blocklyPath {
|
||||
fill-opacity: 0.2;
|
||||
stroke: none;
|
||||
}
|
||||
|
||||
.blocklySvg {
|
||||
background-color: #fff;
|
||||
outline: none;
|
||||
overflow: hidden; /* IE overflows by default. */
|
||||
position: absolute;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.blocklyWidgetDiv {
|
||||
display: none;
|
||||
position: absolute;
|
||||
z-index: 99999; /* big value for bootstrap3 compatibility */
|
||||
}
|
||||
|
||||
.injectionDiv {
|
||||
height: 100%;
|
||||
position: relative;
|
||||
overflow: hidden; /* So blocks in drag surface disappear at edges */
|
||||
touch-action: none;
|
||||
}
|
||||
|
||||
.blocklyNonSelectable {
|
||||
user-select: none;
|
||||
-ms-user-select: none;
|
||||
-webkit-user-select: none;
|
||||
}
|
||||
|
||||
.blocklyBlockCanvas.blocklyCanvasTransitioning,
|
||||
.blocklyBubbleCanvas.blocklyCanvasTransitioning {
|
||||
transition: transform .5s;
|
||||
}
|
||||
|
||||
.blocklyTooltipDiv {
|
||||
background-color: #ffffc7;
|
||||
border: 1px solid #ddc;
|
||||
box-shadow: 4px 4px 20px 1px rgba(0,0,0,.15);
|
||||
color: #000;
|
||||
display: none;
|
||||
font: 9pt sans-serif;
|
||||
opacity: .9;
|
||||
padding: 2px;
|
||||
position: absolute;
|
||||
z-index: 100000; /* big value for bootstrap3 compatibility */
|
||||
}
|
||||
|
||||
.blocklyDropDownDiv {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
z-index: 1000;
|
||||
display: none;
|
||||
border: 1px solid;
|
||||
border-color: #dadce0;
|
||||
background-color: #fff;
|
||||
border-radius: 2px;
|
||||
padding: 4px;
|
||||
box-shadow: 0 0 3px 1px rgba(0,0,0,.3);
|
||||
}
|
||||
|
||||
.blocklyDropDownDiv.blocklyFocused {
|
||||
box-shadow: 0 0 6px 1px rgba(0,0,0,.3);
|
||||
}
|
||||
|
||||
.blocklyDropDownContent {
|
||||
max-height: 300px; /* @todo: spec for maximum height. */
|
||||
overflow: auto;
|
||||
overflow-x: hidden;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.blocklyDropDownArrow {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
z-index: -1;
|
||||
background-color: inherit;
|
||||
border-color: inherit;
|
||||
}
|
||||
|
||||
.blocklyDropDownButton {
|
||||
display: inline-block;
|
||||
float: left;
|
||||
padding: 0;
|
||||
margin: 4px;
|
||||
border-radius: 4px;
|
||||
outline: none;
|
||||
border: 1px solid;
|
||||
transition: box-shadow .1s;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.blocklyArrowTop {
|
||||
border-top: 1px solid;
|
||||
border-left: 1px solid;
|
||||
border-top-left-radius: 4px;
|
||||
border-color: inherit;
|
||||
}
|
||||
|
||||
.blocklyArrowBottom {
|
||||
border-bottom: 1px solid;
|
||||
border-right: 1px solid;
|
||||
border-bottom-right-radius: 4px;
|
||||
border-color: inherit;
|
||||
}
|
||||
|
||||
.blocklyResizeSE {
|
||||
cursor: se-resize;
|
||||
fill: #aaa;
|
||||
}
|
||||
|
||||
.blocklyResizeSW {
|
||||
cursor: sw-resize;
|
||||
fill: #aaa;
|
||||
}
|
||||
|
||||
.blocklyResizeLine {
|
||||
stroke: #515A5A;
|
||||
stroke-width: 1;
|
||||
}
|
||||
|
||||
.blocklyHighlightedConnectionPath {
|
||||
fill: none;
|
||||
stroke: #fc3;
|
||||
stroke-width: 4px;
|
||||
}
|
||||
|
||||
.blocklyPathLight {
|
||||
fill: none;
|
||||
stroke-linecap: round;
|
||||
stroke-width: 1;
|
||||
}
|
||||
|
||||
.blocklySelected>.blocklyPathLight {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.blocklyDraggable {
|
||||
cursor: grab;
|
||||
cursor: -webkit-grab;
|
||||
}
|
||||
|
||||
.blocklyDragging {
|
||||
cursor: grabbing;
|
||||
cursor: -webkit-grabbing;
|
||||
}
|
||||
|
||||
/* Changes cursor on mouse down. Not effective in Firefox because of
|
||||
https://bugzilla.mozilla.org/show_bug.cgi?id=771241 */
|
||||
.blocklyDraggable:active {
|
||||
cursor: grabbing;
|
||||
cursor: -webkit-grabbing;
|
||||
}
|
||||
|
||||
.blocklyDragging.blocklyDraggingDelete {
|
||||
cursor: url("https://blockly-demo.appspot.com/static/media/handdelete.cur"), auto;
|
||||
}
|
||||
|
||||
.blocklyDragging>.blocklyPath,
|
||||
.blocklyDragging>.blocklyPathLight {
|
||||
fill-opacity: .8;
|
||||
stroke-opacity: .8;
|
||||
}
|
||||
|
||||
.blocklyDragging>.blocklyPathDark {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.blocklyDisabled>.blocklyPath {
|
||||
fill-opacity: .5;
|
||||
stroke-opacity: .5;
|
||||
}
|
||||
|
||||
.blocklyDisabled>.blocklyPathLight,
|
||||
.blocklyDisabled>.blocklyPathDark {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.blocklyInsertionMarker>.blocklyPath,
|
||||
.blocklyInsertionMarker>.blocklyPathLight,
|
||||
.blocklyInsertionMarker>.blocklyPathDark {
|
||||
fill-opacity: .2;
|
||||
stroke: none;
|
||||
}
|
||||
|
||||
.blocklyMultilineText {
|
||||
font-family: monospace;
|
||||
}
|
||||
|
||||
.blocklyNonEditableText>text {
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.blocklyFlyout {
|
||||
position: absolute;
|
||||
z-index: 20;
|
||||
}
|
||||
|
||||
.blocklyText text {
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
/*
|
||||
Don't allow users to select text. It gets annoying when trying to
|
||||
drag a block and selected text moves instead.
|
||||
*/
|
||||
.blocklySvg text {
|
||||
user-select: none;
|
||||
-ms-user-select: none;
|
||||
-webkit-user-select: none;
|
||||
cursor: inherit;
|
||||
}
|
||||
|
||||
.blocklyHidden {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.blocklyFieldDropdown:not(.blocklyHidden) {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.blocklyIconGroup {
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.blocklyIconGroup:not(:hover),
|
||||
.blocklyIconGroupReadonly {
|
||||
opacity: .6;
|
||||
}
|
||||
|
||||
.blocklyIconShape {
|
||||
fill: #00f;
|
||||
stroke: #fff;
|
||||
stroke-width: 1px;
|
||||
}
|
||||
|
||||
.blocklyIconSymbol {
|
||||
fill: #fff;
|
||||
}
|
||||
|
||||
.blocklyMinimalBody {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.blocklyHtmlInput {
|
||||
border: none;
|
||||
border-radius: 4px;
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
outline: none;
|
||||
padding: 0;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
display: block;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
/* Remove the increase and decrease arrows on the field number editor */
|
||||
input.blocklyHtmlInput[type=number]::-webkit-inner-spin-button,
|
||||
input.blocklyHtmlInput[type=number]::-webkit-outer-spin-button {
|
||||
-webkit-appearance: none;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
input[type=number] {
|
||||
-moz-appearance: textfield;
|
||||
}
|
||||
|
||||
.blocklyMainBackground {
|
||||
stroke-width: 1;
|
||||
stroke: #c6c6c6; /* Equates to #ddd due to border being off-pixel. */
|
||||
}
|
||||
|
||||
.blocklyMutatorBackground {
|
||||
fill: #fff;
|
||||
stroke: #ddd;
|
||||
stroke-width: 1;
|
||||
}
|
||||
|
||||
.blocklyFlyoutBackground {
|
||||
fill: #ddd;
|
||||
fill-opacity: .8;
|
||||
}
|
||||
|
||||
.blocklyMainWorkspaceScrollbar {
|
||||
z-index: 20;
|
||||
}
|
||||
|
||||
.blocklyFlyoutScrollbar {
|
||||
z-index: 30;
|
||||
}
|
||||
|
||||
.blocklyScrollbarHorizontal,
|
||||
.blocklyScrollbarVertical {
|
||||
position: absolute;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.blocklyScrollbarBackground {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.blocklyScrollbarHandle {
|
||||
fill: #ccc;
|
||||
}
|
||||
|
||||
.blocklyScrollbarBackground:hover+.blocklyScrollbarHandle,
|
||||
.blocklyScrollbarHandle:hover {
|
||||
fill: #bbb;
|
||||
}
|
||||
|
||||
/* Darken flyout scrollbars due to being on a grey background. */
|
||||
/* By contrast, workspace scrollbars are on a white background. */
|
||||
.blocklyFlyout .blocklyScrollbarHandle {
|
||||
fill: #bbb;
|
||||
}
|
||||
|
||||
.blocklyFlyout .blocklyScrollbarBackground:hover+.blocklyScrollbarHandle,
|
||||
.blocklyFlyout .blocklyScrollbarHandle:hover {
|
||||
fill: #aaa;
|
||||
}
|
||||
|
||||
.blocklyInvalidInput {
|
||||
background: #faa;
|
||||
}
|
||||
|
||||
.blocklyVerticalMarker {
|
||||
stroke-width: 3px;
|
||||
fill: rgba(255,255,255,.5);
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.blocklyComputeCanvas {
|
||||
position: absolute;
|
||||
width: 0;
|
||||
height: 0;
|
||||
}
|
||||
|
||||
.blocklyNoPointerEvents {
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.blocklyContextMenu {
|
||||
border-radius: 4px;
|
||||
max-height: 100%;
|
||||
}
|
||||
|
||||
.blocklyDropdownMenu {
|
||||
border-radius: 2px;
|
||||
padding: 0 !important;
|
||||
}
|
||||
|
||||
.blocklyDropdownMenu .blocklyMenuItem {
|
||||
/* 28px on the left for icon or checkbox. */
|
||||
padding-left: 28px;
|
||||
}
|
||||
|
||||
/* BiDi override for the resting state. */
|
||||
.blocklyDropdownMenu .blocklyMenuItemRtl {
|
||||
/* Flip left/right padding for BiDi. */
|
||||
padding-left: 5px;
|
||||
padding-right: 28px;
|
||||
}
|
||||
|
||||
.blocklyWidgetDiv .blocklyMenu {
|
||||
background: #fff;
|
||||
border: 1px solid transparent;
|
||||
box-shadow: 0 0 3px 1px rgba(0,0,0,.3);
|
||||
font: normal 13px Arial, sans-serif;
|
||||
margin: 0;
|
||||
outline: none;
|
||||
padding: 4px 0;
|
||||
position: absolute;
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
max-height: 100%;
|
||||
z-index: 20000; /* Arbitrary, but some apps depend on it... */
|
||||
}
|
||||
|
||||
.blocklyWidgetDiv .blocklyMenu.blocklyFocused {
|
||||
box-shadow: 0 0 6px 1px rgba(0,0,0,.3);
|
||||
}
|
||||
|
||||
.blocklyDropDownDiv .blocklyMenu {
|
||||
background: inherit; /* Compatibility with gapi, reset from goog-menu */
|
||||
border: inherit; /* Compatibility with gapi, reset from goog-menu */
|
||||
font: normal 13px "Helvetica Neue", Helvetica, sans-serif;
|
||||
outline: none;
|
||||
position: relative; /* Compatibility with gapi, reset from goog-menu */
|
||||
z-index: 20000; /* Arbitrary, but some apps depend on it... */
|
||||
}
|
||||
|
||||
/* State: resting. */
|
||||
.blocklyMenuItem {
|
||||
border: none;
|
||||
color: #000;
|
||||
cursor: pointer;
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
/* 7em on the right for shortcut. */
|
||||
min-width: 7em;
|
||||
padding: 6px 15px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
/* State: disabled. */
|
||||
.blocklyMenuItemDisabled {
|
||||
color: #ccc;
|
||||
cursor: inherit;
|
||||
}
|
||||
|
||||
/* State: hover. */
|
||||
.blocklyMenuItemHighlight {
|
||||
background-color: rgba(0,0,0,.1);
|
||||
}
|
||||
|
||||
/* State: selected/checked. */
|
||||
.blocklyMenuItemCheckbox {
|
||||
height: 16px;
|
||||
position: absolute;
|
||||
width: 16px;
|
||||
}
|
||||
|
||||
.blocklyMenuItemSelected .blocklyMenuItemCheckbox {
|
||||
background: url(https://blockly-demo.appspot.com/static/media/sprites.png) no-repeat -48px -16px;
|
||||
float: left;
|
||||
margin-left: -24px;
|
||||
position: static; /* Scroll with the menu. */
|
||||
}
|
||||
|
||||
.blocklyMenuItemRtl .blocklyMenuItemCheckbox {
|
||||
float: right;
|
||||
margin-right: -24px;
|
||||
}
|
||||
|
||||
|
||||
.blocklyZoom>image, .blocklyZoom>svg>image {
|
||||
opacity: .4;
|
||||
}
|
||||
|
||||
.blocklyZoom>image:hover, .blocklyZoom>svg>image:hover {
|
||||
opacity: .6;
|
||||
}
|
||||
|
||||
.blocklyZoom>image:active, .blocklyZoom>svg>image:active {
|
||||
opacity: .8;
|
||||
}
|
||||
|
||||
|
||||
.blocklyCommentForeignObject {
|
||||
position: relative;
|
||||
z-index: 0;
|
||||
}
|
||||
|
||||
.blocklyCommentRect {
|
||||
fill: #E7DE8E;
|
||||
stroke: #bcA903;
|
||||
stroke-width: 1px;
|
||||
}
|
||||
|
||||
.blocklyCommentTarget {
|
||||
fill: transparent;
|
||||
stroke: #bcA903;
|
||||
}
|
||||
|
||||
.blocklyCommentTargetFocused {
|
||||
fill: none;
|
||||
}
|
||||
|
||||
.blocklyCommentHandleTarget {
|
||||
fill: none;
|
||||
}
|
||||
|
||||
.blocklyCommentHandleTargetFocused {
|
||||
fill: transparent;
|
||||
}
|
||||
|
||||
.blocklyFocused>.blocklyCommentRect {
|
||||
fill: #B9B272;
|
||||
stroke: #B9B272;
|
||||
}
|
||||
|
||||
.blocklySelected>.blocklyCommentTarget {
|
||||
stroke: #fc3;
|
||||
stroke-width: 3px;
|
||||
}
|
||||
|
||||
.blocklyCommentDeleteIcon {
|
||||
cursor: pointer;
|
||||
fill: #000;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.blocklySelected > .blocklyCommentDeleteIcon {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.blocklyDeleteIconShape {
|
||||
fill: #000;
|
||||
stroke: #000;
|
||||
stroke-width: 1px;
|
||||
}
|
||||
|
||||
.blocklyDeleteIconShape.blocklyDeleteIconHighlighted {
|
||||
stroke: #fc3;
|
||||
}
|
||||
|
||||
|
||||
.blocklyCommentTextarea {
|
||||
background-color: #fef49c;
|
||||
border: 0;
|
||||
display: block;
|
||||
margin: 0;
|
||||
outline: 0;
|
||||
padding: 3px;
|
||||
resize: none;
|
||||
text-overflow: hidden;
|
||||
}
|
||||
|
||||
|
||||
.blocklyAngleCircle {
|
||||
stroke: #444;
|
||||
stroke-width: 1;
|
||||
fill: #ddd;
|
||||
fill-opacity: 0.8;
|
||||
}
|
||||
|
||||
.blocklyAngleMarks {
|
||||
stroke: #444;
|
||||
stroke-width: 1;
|
||||
}
|
||||
|
||||
.blocklyAngleGauge {
|
||||
fill: #f88;
|
||||
fill-opacity: 0.8;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.blocklyAngleLine {
|
||||
stroke: #f00;
|
||||
stroke-width: 2;
|
||||
stroke-linecap: round;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
|
||||
.blocklyColourTable {
|
||||
border-collapse: collapse;
|
||||
display: block;
|
||||
outline: none;
|
||||
padding: 1px;
|
||||
}
|
||||
|
||||
.blocklyColourTable>tr>td {
|
||||
border: 0.5px solid #888;
|
||||
box-sizing: border-box;
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
height: 20px;
|
||||
padding: 0;
|
||||
width: 20px;
|
||||
}
|
||||
|
||||
.blocklyColourTable>tr>td.blocklyColourHighlighted {
|
||||
border-color: #eee;
|
||||
box-shadow: 2px 2px 7px 2px rgba(0, 0, 0, 0.3);
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.blocklyColourSelected, .blocklyColourSelected:hover {
|
||||
border-color: #eee !important;
|
||||
outline: 1px solid #333;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
|
||||
.blocklyHtmlTextAreaInput {
|
||||
font-family: monospace;
|
||||
resize: none;
|
||||
overflow: hidden;
|
||||
height: 100%;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.blocklyHtmlTextAreaInputOverflowedY {
|
||||
overflow-y: scroll;
|
||||
}
|
||||
|
||||
|
||||
.blocklyFlyoutButton {
|
||||
fill: #888;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.blocklyFlyoutButtonShadow {
|
||||
fill: #666;
|
||||
}
|
||||
|
||||
.blocklyFlyoutButton:hover {
|
||||
fill: #aaa;
|
||||
}
|
||||
|
||||
.blocklyFlyoutLabel {
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.blocklyFlyoutLabelBackground {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
|
||||
.blocklyTreeRow:not(.blocklyTreeSelected):hover {
|
||||
background-color: rgba(255, 255, 255, .2);
|
||||
}
|
||||
|
||||
.blocklyToolboxDiv[layout="h"] .blocklyToolboxCategory {
|
||||
margin: 1px 5px 1px 0;
|
||||
}
|
||||
|
||||
.blocklyToolboxDiv[dir="RTL"][layout="h"] .blocklyToolboxCategory {
|
||||
margin: 1px 0 1px 5px;
|
||||
}
|
||||
|
||||
.blocklyTreeRow {
|
||||
height: 22px;
|
||||
line-height: 22px;
|
||||
margin-bottom: 3px;
|
||||
padding-right: 8px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.blocklyToolboxDiv[dir="RTL"] .blocklyTreeRow {
|
||||
margin-left: 8px;
|
||||
padding-right: 0;
|
||||
}
|
||||
|
||||
.blocklyTreeIcon {
|
||||
background-image: url(https://blockly-demo.appspot.com/static/media/sprites.png);
|
||||
height: 16px;
|
||||
vertical-align: middle;
|
||||
visibility: hidden;
|
||||
width: 16px;
|
||||
}
|
||||
|
||||
.blocklyTreeIconClosed {
|
||||
background-position: -32px -1px;
|
||||
}
|
||||
|
||||
.blocklyToolboxDiv[dir="RTL"] .blocklyTreeIconClosed {
|
||||
background-position: 0 -1px;
|
||||
}
|
||||
|
||||
.blocklyTreeSelected>.blocklyTreeIconClosed {
|
||||
background-position: -32px -17px;
|
||||
}
|
||||
|
||||
.blocklyToolboxDiv[dir="RTL"] .blocklyTreeSelected>.blocklyTreeIconClosed {
|
||||
background-position: 0 -17px;
|
||||
}
|
||||
|
||||
.blocklyTreeIconOpen {
|
||||
background-position: -16px -1px;
|
||||
}
|
||||
|
||||
.blocklyTreeSelected>.blocklyTreeIconOpen {
|
||||
background-position: -16px -17px;
|
||||
}
|
||||
|
||||
.blocklyTreeLabel {
|
||||
cursor: default;
|
||||
font: 16px sans-serif;
|
||||
padding: 0 3px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.blocklyToolboxDelete .blocklyTreeLabel {
|
||||
cursor: url("https://blockly-demo.appspot.com/static/media/handdelete.cur"), auto;
|
||||
}
|
||||
|
||||
.blocklyTreeSelected .blocklyTreeLabel {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
|
||||
.blocklyTreeSeparator {
|
||||
border-bottom: solid #e5e5e5 1px;
|
||||
height: 0;
|
||||
margin: 5px 0;
|
||||
}
|
||||
|
||||
.blocklyToolboxDiv[layout="h"] .blocklyTreeSeparator {
|
||||
border-right: solid #e5e5e5 1px;
|
||||
border-bottom: none;
|
||||
height: auto;
|
||||
margin: 0 5px 0 5px;
|
||||
padding: 5px 0;
|
||||
width: 0;
|
||||
}
|
||||
|
||||
|
||||
.blocklyToolboxDelete {
|
||||
cursor: url("https://blockly-demo.appspot.com/static/media/handdelete.cur"), auto;
|
||||
}
|
||||
|
||||
.blocklyToolboxGrab {
|
||||
cursor: url("https://blockly-demo.appspot.com/static/media/handclosed.cur"), auto;
|
||||
cursor: grabbing;
|
||||
cursor: -webkit-grabbing;
|
||||
}
|
||||
|
||||
/* Category tree in Toolbox. */
|
||||
.blocklyToolboxDiv {
|
||||
background-color: #ddd;
|
||||
overflow-x: visible;
|
||||
overflow-y: auto;
|
||||
padding: 4px 0 4px 0;
|
||||
position: absolute;
|
||||
z-index: 70; /* so blocks go under toolbox when dragging */
|
||||
-webkit-tap-highlight-color: transparent; /* issue #1345 */
|
||||
}
|
||||
|
||||
.blocklyToolboxContents {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.blocklyToolboxContents:focus {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
|
||||
.blocklyColourTable {
|
||||
border-collapse: collapse;
|
||||
display: block;
|
||||
outline: none;
|
||||
padding: 1px;
|
||||
}
|
||||
|
||||
.blocklyColourTable>tr>td {
|
||||
border: 0.5px solid #888;
|
||||
box-sizing: border-box;
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
height: 20px;
|
||||
padding: 0;
|
||||
width: 20px;
|
||||
}
|
||||
|
||||
.blocklyColourTable>tr>td.blocklyColourHighlighted {
|
||||
border-color: #eee;
|
||||
box-shadow: 2px 2px 7px 2px rgba(0, 0, 0, 0.3);
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.blocklyColourSelected, .blocklyColourSelected:hover {
|
||||
border-color: #eee !important;
|
||||
outline: 1px solid #333;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
|
||||
.fieldColourSliderContainer {
|
||||
padding: 4px;
|
||||
}
|
||||
.fieldColourSliderContainer hr {
|
||||
border: none;
|
||||
border-top: 1px solid #bbb;
|
||||
}
|
||||
.fieldColourSliderLabel {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
font: 12pt "Helvetica Neue", "Segoe UI", Helvetica, sans-serif;
|
||||
}
|
||||
.fieldColourEyedropper {
|
||||
appearance: none;
|
||||
position: relative;
|
||||
border: none;
|
||||
border-radius: 4px;
|
||||
background: transparent;
|
||||
font: inherit;
|
||||
color: inherit;
|
||||
cursor: pointer;
|
||||
width: 100%;
|
||||
margin: 0;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.fieldColourEyedropper:hover {
|
||||
background: rgba(0,0,0,0.1)
|
||||
}
|
||||
.fieldColourEyedropper input {
|
||||
opacity: 0;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
}
|
||||
.fieldColourEyedropper::before {
|
||||
content: "Eyedropper";
|
||||
}
|
||||
.fieldColourEyedropper::after {
|
||||
content: "";
|
||||
margin-left: 8px;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
background: currentColor;
|
||||
pointer-events: none;
|
||||
-webkit-mask-image: var(--customize-dial-symbol);
|
||||
-webkit-mask-repeat: no-repeat;
|
||||
-webkit-mask-position: center;
|
||||
mask-image: var(--customize-dial-symbol);
|
||||
mask-repeat: no-repeat;
|
||||
mask-position: center;
|
||||
--customize-dial-symbol: url('data:image/svg+xml, <svg xmlns="http://www.w3.org/2000/svg" width="24px" height="24px" viewBox="0 0 24 24"> <path stroke="black" strokewidth="1.414" fill="none" d="m 13 8 L 6 15 Q 3 18 2 21 Q 0 23 .5 23.5 Q 1 24 3 22 Q 6 21 9 18 L 16 11"/> <path fill="black" d="m 12 7 Q 11 6 12 5 Q 13 4 14 5 Q 15 6 16 5 Q 20 -1 22.5 1.5 Q 25 4 19 8 Q 18 9 19 10 Q 20 11 19 12 Q 18 13 17 12"/> </svg>');
|
||||
}
|
||||
.fieldColourSlider {
|
||||
-webkit-appearance: none;
|
||||
width: 150px;
|
||||
height: 24px;
|
||||
margin: 4px 8px 24px 8px;
|
||||
padding: 0;
|
||||
}
|
||||
.fieldColourSlider:last-child {
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
.fieldColourSlider:focus {
|
||||
outline: none;
|
||||
}
|
||||
/* Webkit */
|
||||
.fieldColourSlider::-webkit-slider-runnable-track {
|
||||
background: var(--slider-track-background);
|
||||
border-radius: 8px;
|
||||
height: 16px;
|
||||
}
|
||||
.fieldColourSlider::-webkit-slider-thumb {
|
||||
-webkit-appearance: none;
|
||||
background: #fff;
|
||||
border-radius: 50%;
|
||||
box-shadow: 0 0 0 4px rgba(0,0,0,.15);
|
||||
cursor: pointer;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
margin-top: -4px;
|
||||
}
|
||||
/* Firefox */
|
||||
.fieldColourSlider::-moz-range-track {
|
||||
background: var(--slider-track-background);
|
||||
border-radius: 8px;
|
||||
height: 16px;
|
||||
}
|
||||
.fieldColourSlider::-moz-range-thumb {
|
||||
background: #fff;
|
||||
border: none;
|
||||
border-radius: 50%;
|
||||
box-shadow: 0 0 0 4px rgba(0,0,0,.15);
|
||||
cursor: pointer;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
}
|
||||
.fieldColourSlider::-moz-focus-outer {
|
||||
/* override the focus border style */
|
||||
border: 0;
|
||||
}
|
||||
/* IE */
|
||||
.fieldColourSlider::-ms-track {
|
||||
background: var(--slider-track-background);
|
||||
border-radius: 12px;
|
||||
width: 100%;
|
||||
height: 24px;
|
||||
/* remove default tick marks */
|
||||
color: transparent;
|
||||
}
|
||||
.fieldColourSlider::-ms-fill-lower {
|
||||
background: transparent;
|
||||
}
|
||||
.fieldColourSlider::-ms-fill-upper {
|
||||
background: transparent;
|
||||
}
|
||||
.fieldColourSlider::-ms-thumb {
|
||||
background: #fff;
|
||||
border: none;
|
||||
border-radius: 50%;
|
||||
box-shadow: 0 0 0 4px rgba(0,0,0,.15);
|
||||
cursor: pointer;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
}
|
||||
|
||||
|
||||
.blocklyMultilineText {
|
||||
fill: #fff !important;
|
||||
}
|
||||
|
||||
|
||||
.blocklyMultiselect>image, .blocklyMultiselect>svg>image {
|
||||
opacity: .2;
|
||||
}
|
||||
|
||||
.blocklyMultiselect>image:hover, .blocklyMultiselect>svg>image:hover {
|
||||
opacity: .4;
|
||||
}
|
||||
|
||||
.blocklyMultiselect>image:active, .blocklyMultiselect>svg>image:active {
|
||||
opacity: .6;
|
||||
}
|
||||
|
||||
|
||||
.controlsIconStyleLightTheme {
|
||||
opacity: 0.2;
|
||||
}
|
||||
.controlsIconStyleLightTheme:hover {
|
||||
opacity: 0.4;
|
||||
}
|
||||
.controlsIconStyleLightTheme:active {
|
||||
opacity: 0.6;
|
||||
}
|
||||
|
||||
|
||||
.controlsIconStyleDarkTheme {
|
||||
opacity: 0.4;
|
||||
filter: invert(1);
|
||||
}
|
||||
.controlsIconStyleDarkTheme:hover {
|
||||
opacity: 0.6;
|
||||
filter: invert(1);
|
||||
}
|
||||
.controlsIconStyleDarkTheme:active {
|
||||
opacity: 0.8;
|
||||
filter: invert(1);
|
||||
}
|
||||
|
||||
</style><g transform="translate(1, 1)"><g data-id="yHRh+a$N=A!M1D(8v*f[" class="blocklyDraggable"><path class="blocklyPath" stroke="#4585a1" fill="#5cb1d6" d=" m 20,0 h 233.3828125 a 20 20 0 0,1 20,20 v 0 a 20 20 0 0,1 -20,20 V 40 h -233.3828125 a 20 20 0 0,1 -20,-20 v 0 a 20 20 0 0,1 20,-20 z "/><g data-id="q33[pxK@e!ZG[~ugQ_H_" transform="translate(56, 4)" style="display: block;"><path class="blocklyPath" stroke="#4585a1" fill="#4e96b6" d=" m 16,0 h 51.1171875 a 16 16 0 0,1 16,16 v 0 a 16 16 0 0,1 -16,16 V 32 h -51.1171875 a 16 16 0 0,1 -16,-16 v 0 a 16 16 0 0,1 16,-16 z "/><g class="blocklyEditableText" transform="translate(12,7)" style="cursor: default;"><text class="blocklyText blocklyDropdownText" dominant-baseline="central" text-anchor="start" x="0" y="9">radio</text><image style="display: none;"/><image height="12px" width="12px" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="data:image/svg+xml;base64,PHN2ZyBpZD0iTGF5ZXJfMSIgZGF0YS1uYW1lPSJMYXllciAxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMi43MSIgaGVpZ2h0PSI4Ljc5IiB2aWV3Qm94PSIwIDAgMTIuNzEgOC43OSI+PHRpdGxlPmRyb3Bkb3duLWFycm93PC90aXRsZT48ZyBvcGFjaXR5PSIwLjEiPjxwYXRoIGQ9Ik0xMi43MSwyLjQ0QTIuNDEsMi40MSwwLDAsMSwxMiw0LjE2TDguMDgsOC4wOGEyLjQ1LDIuNDUsMCwwLDEtMy40NSwwTDAuNzIsNC4xNkEyLjQyLDIuNDIsMCwwLDEsMCwyLjQ0LDIuNDgsMi40OCwwLDAsMSwuNzEuNzFDMSwwLjQ3LDEuNDMsMCw2LjM2LDBTMTEuNzUsMC40NiwxMiwuNzFBMi40NCwyLjQ0LDAsMCwxLDEyLjcxLDIuNDRaIiBmaWxsPSIjMjMxZjIwIi8+PC9nPjxwYXRoIGQ9Ik02LjM2LDcuNzlhMS40MywxLjQzLDAsMCwxLTEtLjQyTDEuNDIsMy40NWExLjQ0LDEuNDQsMCwwLDEsMC0yYzAuNTYtLjU2LDkuMzEtMC41Niw5Ljg3LDBhMS40NCwxLjQ0LDAsMCwxLDAsMkw3LjM3LDcuMzdBMS40MywxLjQzLDAsMCwxLDYuMzYsNy43OVoiIGZpbGw9IiNmZmYiLz48L3N2Zz4=" transform="translate(47.1171875,3)"/></g></g><g transform="translate(12,7)"><image height="25px" width="25px" alt="" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyNSAyNSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwLCAwKSI+CiAgICA8cGF0aCBkPSJtMSAxNy43NyAxMC44ODUtMTAuODg1LTUuNTgxOS01LjU4MTl2MjIuMzkzbDUuNjc0NC01LjY3NDQtMTAuODU1LTEwLjg1NSIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjZmZmIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS13aWR0aD0iMiIvPgo8cGF0aCBkPSJtMjAuMjEzIDMuNWExMi43MjggMTIuNzI4IDAgMCAxIDMuNzI3OSA5IDEyLjcyOCAxMi43MjggMCAwIDEtMy43Mjc5IDkiIGZpbGw9Im5vbmUiIHN0cm9rZT0iI2ZmZiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBzdHJva2Utd2lkdGg9IjIiLz4KPHBhdGggZD0ibTE3LjA1OSA3LjQwNzVhNy4yMDE4IDcuMjAxOCAwIDAgMSAyLjEwOTMgNS4wOTI0IDcuMjAxOCA3LjIwMTggMCAwIDEtMi4xMDkzIDUuMDkyNCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjZmZmIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS13aWR0aD0iMiIvPgogIDwvZz4KPC9zdmc+"/></g><g transform="translate(45,4.5)"><image height="30px" width="3px" alt="" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAzIDMwIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogIDxnIHRyYW5zZm9ybT0idHJhbnNsYXRlKDAsIDApIj4KICAgIDxwYXRoIGQ9Im0yLjUgMC41djI5IiBmaWxsPSJub25lIiBzdHJva2U9IiMwMDAiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLW9wYWNpdHk9Ii4yNjI1Ii8+CiAgPC9nPgo8L3N2Zz4="/></g><g transform="translate(147.1171875,11)"><text class="blocklyText" dominant-baseline="central" x="0" y="9">observe</text></g><g class="blocklyEditableText" transform="translate(216.484375,5.4)" style="cursor: default;"><rect rx="4" ry="4" x="0" y="0" height="29.2" width="44.8984375" class="blocklyFieldRect blocklyDropdownRect" stroke="#4585a1" fill="transparent"/><text class="blocklyText blocklyDropdownText" dominant-baseline="central" text-anchor="start" x="8" y="14.6">0</text><image style="display: none;"/><image height="12px" width="12px" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="data:image/svg+xml;base64,PHN2ZyBpZD0iTGF5ZXJfMSIgZGF0YS1uYW1lPSJMYXllciAxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMi43MSIgaGVpZ2h0PSI4Ljc5IiB2aWV3Qm94PSIwIDAgMTIuNzEgOC43OSI+PHRpdGxlPmRyb3Bkb3duLWFycm93PC90aXRsZT48ZyBvcGFjaXR5PSIwLjEiPjxwYXRoIGQ9Ik0xMi43MSwyLjQ0QTIuNDEsMi40MSwwLDAsMSwxMiw0LjE2TDguMDgsOC4wOGEyLjQ1LDIuNDUsMCwwLDEtMy40NSwwTDAuNzIsNC4xNkEyLjQyLDIuNDIsMCwwLDEsMCwyLjQ0LDIuNDgsMi40OCwwLDAsMSwuNzEuNzFDMSwwLjQ3LDEuNDMsMCw2LjM2LDBTMTEuNzUsMC40NiwxMiwuNzFBMi40NCwyLjQ0LDAsMCwxLDEyLjcxLDIuNDRaIiBmaWxsPSIjMjMxZjIwIi8+PC9nPjxwYXRoIGQ9Ik02LjM2LDcuNzlhMS40MywxLjQzLDAsMCwxLTEtLjQyTDEuNDIsMy40NWExLjQ0LDEuNDQsMCwwLDEsMC0yYzAuNTYtLjU2LDkuMzEtMC41Niw5Ljg3LDBhMS40NCwxLjQ0LDAsMCwxLDAsMkw3LjM3LDcuMzdBMS40MywxLjQzLDAsMCwxLDYuMzYsNy43OVoiIGZpbGw9IiNmZmYiLz48L3N2Zz4=" transform="translate(24.8984375,8.6)"/></g></g></g></svg>
|
||||
|
After Width: | Height: | Size: 25 KiB |
|
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 32 KiB |
|
After Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 31 KiB |
|
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 30 KiB |
|
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 31 KiB |
|
After Width: | Height: | Size: 31 KiB |
|
After Width: | Height: | Size: 28 KiB |
|
After Width: | Height: | Size: 25 KiB |
|
After Width: | Height: | Size: 26 KiB |
@@ -0,0 +1,994 @@
|
||||
<!-- Copyright (c) 2024 The Pybricks Authors. All rights reserved. -->
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 371.5265625 52" class="blocklySvg pybricks_renderer-renderer pybricks-zelos-light-theme" width="371.5265625" height="52" style="background-color: transparent"><style xmlns="http://www.w3.org/1999/xhtml">.pybricks_renderer-renderer.pybricks-zelos-light-theme .blocklyText,
|
||||
.pybricks_renderer-renderer.pybricks-zelos-light-theme .blocklyFlyoutLabelText {
|
||||
font: bold 12pt "Helvetica Neue", "Segoe UI", Helvetica, sans-serif;
|
||||
}
|
||||
.pybricks_renderer-renderer.pybricks-zelos-light-theme .blocklyText {
|
||||
fill: #fff;
|
||||
}
|
||||
.pybricks_renderer-renderer.pybricks-zelos-light-theme .blocklyNonEditableText>rect:not(.blocklyDropdownRect),
|
||||
.pybricks_renderer-renderer.pybricks-zelos-light-theme .blocklyEditableText>rect:not(.blocklyDropdownRect) {
|
||||
fill: #fff;
|
||||
}
|
||||
.pybricks_renderer-renderer.pybricks-zelos-light-theme .blocklyNonEditableText>text,
|
||||
.pybricks_renderer-renderer.pybricks-zelos-light-theme .blocklyEditableText>text,
|
||||
.pybricks_renderer-renderer.pybricks-zelos-light-theme .blocklyNonEditableText>g>text,
|
||||
.pybricks_renderer-renderer.pybricks-zelos-light-theme .blocklyEditableText>g>text {
|
||||
fill: #575E75;
|
||||
}
|
||||
.pybricks_renderer-renderer.pybricks-zelos-light-theme .blocklyFlyoutLabelText {
|
||||
fill: #575E75;
|
||||
}
|
||||
.pybricks_renderer-renderer.pybricks-zelos-light-theme .blocklyText.blocklyBubbleText {
|
||||
fill: #575E75;
|
||||
}
|
||||
.pybricks_renderer-renderer.pybricks-zelos-light-theme .blocklyDraggable:not(.blocklyDisabled)
|
||||
.blocklyEditableText:not(.editing):hover>rect,
|
||||
.pybricks_renderer-renderer.pybricks-zelos-light-theme .blocklyDraggable:not(.blocklyDisabled)
|
||||
.blocklyEditableText:not(.editing):hover>.blocklyPath {
|
||||
stroke: #fff;
|
||||
stroke-width: 2;
|
||||
}
|
||||
.pybricks_renderer-renderer.pybricks-zelos-light-theme .blocklyHtmlInput {
|
||||
font-family: "Helvetica Neue", "Segoe UI", Helvetica, sans-serif;
|
||||
font-weight: bold;
|
||||
color: #575E75;
|
||||
}
|
||||
.pybricks_renderer-renderer.pybricks-zelos-light-theme .blocklyDropdownText {
|
||||
fill: #fff !important;
|
||||
}
|
||||
.pybricks_renderer-renderer.pybricks-zelos-light-theme.blocklyWidgetDiv .goog-menuitem,
|
||||
.pybricks_renderer-renderer.pybricks-zelos-light-theme.blocklyDropDownDiv .goog-menuitem {
|
||||
font-family: "Helvetica Neue", "Segoe UI", Helvetica, sans-serif;
|
||||
}
|
||||
.pybricks_renderer-renderer.pybricks-zelos-light-theme.blocklyDropDownDiv .goog-menuitem-content {
|
||||
color: #fff;
|
||||
}
|
||||
.pybricks_renderer-renderer.pybricks-zelos-light-theme .blocklyHighlightedConnectionPath {
|
||||
stroke: #ffffff;
|
||||
}
|
||||
.pybricks_renderer-renderer.pybricks-zelos-light-theme .blocklyDisabled > .blocklyOutlinePath {
|
||||
fill: url(#blocklyDisabledPattern770586695409901)
|
||||
}
|
||||
.pybricks_renderer-renderer.pybricks-zelos-light-theme .blocklyInsertionMarker>.blocklyPath {
|
||||
fill-opacity: 0.2;
|
||||
stroke: none;
|
||||
}
|
||||
|
||||
.blocklySvg {
|
||||
background-color: #fff;
|
||||
outline: none;
|
||||
overflow: hidden; /* IE overflows by default. */
|
||||
position: absolute;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.blocklyWidgetDiv {
|
||||
display: none;
|
||||
position: absolute;
|
||||
z-index: 99999; /* big value for bootstrap3 compatibility */
|
||||
}
|
||||
|
||||
.injectionDiv {
|
||||
height: 100%;
|
||||
position: relative;
|
||||
overflow: hidden; /* So blocks in drag surface disappear at edges */
|
||||
touch-action: none;
|
||||
}
|
||||
|
||||
.blocklyNonSelectable {
|
||||
user-select: none;
|
||||
-ms-user-select: none;
|
||||
-webkit-user-select: none;
|
||||
}
|
||||
|
||||
.blocklyBlockCanvas.blocklyCanvasTransitioning,
|
||||
.blocklyBubbleCanvas.blocklyCanvasTransitioning {
|
||||
transition: transform .5s;
|
||||
}
|
||||
|
||||
.blocklyTooltipDiv {
|
||||
background-color: #ffffc7;
|
||||
border: 1px solid #ddc;
|
||||
box-shadow: 4px 4px 20px 1px rgba(0,0,0,.15);
|
||||
color: #000;
|
||||
display: none;
|
||||
font: 9pt sans-serif;
|
||||
opacity: .9;
|
||||
padding: 2px;
|
||||
position: absolute;
|
||||
z-index: 100000; /* big value for bootstrap3 compatibility */
|
||||
}
|
||||
|
||||
.blocklyDropDownDiv {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
z-index: 1000;
|
||||
display: none;
|
||||
border: 1px solid;
|
||||
border-color: #dadce0;
|
||||
background-color: #fff;
|
||||
border-radius: 2px;
|
||||
padding: 4px;
|
||||
box-shadow: 0 0 3px 1px rgba(0,0,0,.3);
|
||||
}
|
||||
|
||||
.blocklyDropDownDiv.blocklyFocused {
|
||||
box-shadow: 0 0 6px 1px rgba(0,0,0,.3);
|
||||
}
|
||||
|
||||
.blocklyDropDownContent {
|
||||
max-height: 300px; /* @todo: spec for maximum height. */
|
||||
overflow: auto;
|
||||
overflow-x: hidden;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.blocklyDropDownArrow {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
z-index: -1;
|
||||
background-color: inherit;
|
||||
border-color: inherit;
|
||||
}
|
||||
|
||||
.blocklyDropDownButton {
|
||||
display: inline-block;
|
||||
float: left;
|
||||
padding: 0;
|
||||
margin: 4px;
|
||||
border-radius: 4px;
|
||||
outline: none;
|
||||
border: 1px solid;
|
||||
transition: box-shadow .1s;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.blocklyArrowTop {
|
||||
border-top: 1px solid;
|
||||
border-left: 1px solid;
|
||||
border-top-left-radius: 4px;
|
||||
border-color: inherit;
|
||||
}
|
||||
|
||||
.blocklyArrowBottom {
|
||||
border-bottom: 1px solid;
|
||||
border-right: 1px solid;
|
||||
border-bottom-right-radius: 4px;
|
||||
border-color: inherit;
|
||||
}
|
||||
|
||||
.blocklyResizeSE {
|
||||
cursor: se-resize;
|
||||
fill: #aaa;
|
||||
}
|
||||
|
||||
.blocklyResizeSW {
|
||||
cursor: sw-resize;
|
||||
fill: #aaa;
|
||||
}
|
||||
|
||||
.blocklyResizeLine {
|
||||
stroke: #515A5A;
|
||||
stroke-width: 1;
|
||||
}
|
||||
|
||||
.blocklyHighlightedConnectionPath {
|
||||
fill: none;
|
||||
stroke: #fc3;
|
||||
stroke-width: 4px;
|
||||
}
|
||||
|
||||
.blocklyPathLight {
|
||||
fill: none;
|
||||
stroke-linecap: round;
|
||||
stroke-width: 1;
|
||||
}
|
||||
|
||||
.blocklySelected>.blocklyPathLight {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.blocklyDraggable {
|
||||
cursor: grab;
|
||||
cursor: -webkit-grab;
|
||||
}
|
||||
|
||||
.blocklyDragging {
|
||||
cursor: grabbing;
|
||||
cursor: -webkit-grabbing;
|
||||
}
|
||||
|
||||
/* Changes cursor on mouse down. Not effective in Firefox because of
|
||||
https://bugzilla.mozilla.org/show_bug.cgi?id=771241 */
|
||||
.blocklyDraggable:active {
|
||||
cursor: grabbing;
|
||||
cursor: -webkit-grabbing;
|
||||
}
|
||||
|
||||
.blocklyDragging.blocklyDraggingDelete {
|
||||
cursor: url("https://blockly-demo.appspot.com/static/media/handdelete.cur"), auto;
|
||||
}
|
||||
|
||||
.blocklyDragging>.blocklyPath,
|
||||
.blocklyDragging>.blocklyPathLight {
|
||||
fill-opacity: .8;
|
||||
stroke-opacity: .8;
|
||||
}
|
||||
|
||||
.blocklyDragging>.blocklyPathDark {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.blocklyDisabled>.blocklyPath {
|
||||
fill-opacity: .5;
|
||||
stroke-opacity: .5;
|
||||
}
|
||||
|
||||
.blocklyDisabled>.blocklyPathLight,
|
||||
.blocklyDisabled>.blocklyPathDark {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.blocklyInsertionMarker>.blocklyPath,
|
||||
.blocklyInsertionMarker>.blocklyPathLight,
|
||||
.blocklyInsertionMarker>.blocklyPathDark {
|
||||
fill-opacity: .2;
|
||||
stroke: none;
|
||||
}
|
||||
|
||||
.blocklyMultilineText {
|
||||
font-family: monospace;
|
||||
}
|
||||
|
||||
.blocklyNonEditableText>text {
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.blocklyFlyout {
|
||||
position: absolute;
|
||||
z-index: 20;
|
||||
}
|
||||
|
||||
.blocklyText text {
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
/*
|
||||
Don't allow users to select text. It gets annoying when trying to
|
||||
drag a block and selected text moves instead.
|
||||
*/
|
||||
.blocklySvg text {
|
||||
user-select: none;
|
||||
-ms-user-select: none;
|
||||
-webkit-user-select: none;
|
||||
cursor: inherit;
|
||||
}
|
||||
|
||||
.blocklyHidden {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.blocklyFieldDropdown:not(.blocklyHidden) {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.blocklyIconGroup {
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.blocklyIconGroup:not(:hover),
|
||||
.blocklyIconGroupReadonly {
|
||||
opacity: .6;
|
||||
}
|
||||
|
||||
.blocklyIconShape {
|
||||
fill: #00f;
|
||||
stroke: #fff;
|
||||
stroke-width: 1px;
|
||||
}
|
||||
|
||||
.blocklyIconSymbol {
|
||||
fill: #fff;
|
||||
}
|
||||
|
||||
.blocklyMinimalBody {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.blocklyHtmlInput {
|
||||
border: none;
|
||||
border-radius: 4px;
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
outline: none;
|
||||
padding: 0;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
display: block;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
/* Remove the increase and decrease arrows on the field number editor */
|
||||
input.blocklyHtmlInput[type=number]::-webkit-inner-spin-button,
|
||||
input.blocklyHtmlInput[type=number]::-webkit-outer-spin-button {
|
||||
-webkit-appearance: none;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
input[type=number] {
|
||||
-moz-appearance: textfield;
|
||||
}
|
||||
|
||||
.blocklyMainBackground {
|
||||
stroke-width: 1;
|
||||
stroke: #c6c6c6; /* Equates to #ddd due to border being off-pixel. */
|
||||
}
|
||||
|
||||
.blocklyMutatorBackground {
|
||||
fill: #fff;
|
||||
stroke: #ddd;
|
||||
stroke-width: 1;
|
||||
}
|
||||
|
||||
.blocklyFlyoutBackground {
|
||||
fill: #ddd;
|
||||
fill-opacity: .8;
|
||||
}
|
||||
|
||||
.blocklyMainWorkspaceScrollbar {
|
||||
z-index: 20;
|
||||
}
|
||||
|
||||
.blocklyFlyoutScrollbar {
|
||||
z-index: 30;
|
||||
}
|
||||
|
||||
.blocklyScrollbarHorizontal,
|
||||
.blocklyScrollbarVertical {
|
||||
position: absolute;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.blocklyScrollbarBackground {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.blocklyScrollbarHandle {
|
||||
fill: #ccc;
|
||||
}
|
||||
|
||||
.blocklyScrollbarBackground:hover+.blocklyScrollbarHandle,
|
||||
.blocklyScrollbarHandle:hover {
|
||||
fill: #bbb;
|
||||
}
|
||||
|
||||
/* Darken flyout scrollbars due to being on a grey background. */
|
||||
/* By contrast, workspace scrollbars are on a white background. */
|
||||
.blocklyFlyout .blocklyScrollbarHandle {
|
||||
fill: #bbb;
|
||||
}
|
||||
|
||||
.blocklyFlyout .blocklyScrollbarBackground:hover+.blocklyScrollbarHandle,
|
||||
.blocklyFlyout .blocklyScrollbarHandle:hover {
|
||||
fill: #aaa;
|
||||
}
|
||||
|
||||
.blocklyInvalidInput {
|
||||
background: #faa;
|
||||
}
|
||||
|
||||
.blocklyVerticalMarker {
|
||||
stroke-width: 3px;
|
||||
fill: rgba(255,255,255,.5);
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.blocklyComputeCanvas {
|
||||
position: absolute;
|
||||
width: 0;
|
||||
height: 0;
|
||||
}
|
||||
|
||||
.blocklyNoPointerEvents {
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.blocklyContextMenu {
|
||||
border-radius: 4px;
|
||||
max-height: 100%;
|
||||
}
|
||||
|
||||
.blocklyDropdownMenu {
|
||||
border-radius: 2px;
|
||||
padding: 0 !important;
|
||||
}
|
||||
|
||||
.blocklyDropdownMenu .blocklyMenuItem {
|
||||
/* 28px on the left for icon or checkbox. */
|
||||
padding-left: 28px;
|
||||
}
|
||||
|
||||
/* BiDi override for the resting state. */
|
||||
.blocklyDropdownMenu .blocklyMenuItemRtl {
|
||||
/* Flip left/right padding for BiDi. */
|
||||
padding-left: 5px;
|
||||
padding-right: 28px;
|
||||
}
|
||||
|
||||
.blocklyWidgetDiv .blocklyMenu {
|
||||
background: #fff;
|
||||
border: 1px solid transparent;
|
||||
box-shadow: 0 0 3px 1px rgba(0,0,0,.3);
|
||||
font: normal 13px Arial, sans-serif;
|
||||
margin: 0;
|
||||
outline: none;
|
||||
padding: 4px 0;
|
||||
position: absolute;
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
max-height: 100%;
|
||||
z-index: 20000; /* Arbitrary, but some apps depend on it... */
|
||||
}
|
||||
|
||||
.blocklyWidgetDiv .blocklyMenu.blocklyFocused {
|
||||
box-shadow: 0 0 6px 1px rgba(0,0,0,.3);
|
||||
}
|
||||
|
||||
.blocklyDropDownDiv .blocklyMenu {
|
||||
background: inherit; /* Compatibility with gapi, reset from goog-menu */
|
||||
border: inherit; /* Compatibility with gapi, reset from goog-menu */
|
||||
font: normal 13px "Helvetica Neue", Helvetica, sans-serif;
|
||||
outline: none;
|
||||
position: relative; /* Compatibility with gapi, reset from goog-menu */
|
||||
z-index: 20000; /* Arbitrary, but some apps depend on it... */
|
||||
}
|
||||
|
||||
/* State: resting. */
|
||||
.blocklyMenuItem {
|
||||
border: none;
|
||||
color: #000;
|
||||
cursor: pointer;
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
/* 7em on the right for shortcut. */
|
||||
min-width: 7em;
|
||||
padding: 6px 15px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
/* State: disabled. */
|
||||
.blocklyMenuItemDisabled {
|
||||
color: #ccc;
|
||||
cursor: inherit;
|
||||
}
|
||||
|
||||
/* State: hover. */
|
||||
.blocklyMenuItemHighlight {
|
||||
background-color: rgba(0,0,0,.1);
|
||||
}
|
||||
|
||||
/* State: selected/checked. */
|
||||
.blocklyMenuItemCheckbox {
|
||||
height: 16px;
|
||||
position: absolute;
|
||||
width: 16px;
|
||||
}
|
||||
|
||||
.blocklyMenuItemSelected .blocklyMenuItemCheckbox {
|
||||
background: url(https://blockly-demo.appspot.com/static/media/sprites.png) no-repeat -48px -16px;
|
||||
float: left;
|
||||
margin-left: -24px;
|
||||
position: static; /* Scroll with the menu. */
|
||||
}
|
||||
|
||||
.blocklyMenuItemRtl .blocklyMenuItemCheckbox {
|
||||
float: right;
|
||||
margin-right: -24px;
|
||||
}
|
||||
|
||||
|
||||
.blocklyZoom>image, .blocklyZoom>svg>image {
|
||||
opacity: .4;
|
||||
}
|
||||
|
||||
.blocklyZoom>image:hover, .blocklyZoom>svg>image:hover {
|
||||
opacity: .6;
|
||||
}
|
||||
|
||||
.blocklyZoom>image:active, .blocklyZoom>svg>image:active {
|
||||
opacity: .8;
|
||||
}
|
||||
|
||||
|
||||
.blocklyCommentForeignObject {
|
||||
position: relative;
|
||||
z-index: 0;
|
||||
}
|
||||
|
||||
.blocklyCommentRect {
|
||||
fill: #E7DE8E;
|
||||
stroke: #bcA903;
|
||||
stroke-width: 1px;
|
||||
}
|
||||
|
||||
.blocklyCommentTarget {
|
||||
fill: transparent;
|
||||
stroke: #bcA903;
|
||||
}
|
||||
|
||||
.blocklyCommentTargetFocused {
|
||||
fill: none;
|
||||
}
|
||||
|
||||
.blocklyCommentHandleTarget {
|
||||
fill: none;
|
||||
}
|
||||
|
||||
.blocklyCommentHandleTargetFocused {
|
||||
fill: transparent;
|
||||
}
|
||||
|
||||
.blocklyFocused>.blocklyCommentRect {
|
||||
fill: #B9B272;
|
||||
stroke: #B9B272;
|
||||
}
|
||||
|
||||
.blocklySelected>.blocklyCommentTarget {
|
||||
stroke: #fc3;
|
||||
stroke-width: 3px;
|
||||
}
|
||||
|
||||
.blocklyCommentDeleteIcon {
|
||||
cursor: pointer;
|
||||
fill: #000;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.blocklySelected > .blocklyCommentDeleteIcon {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.blocklyDeleteIconShape {
|
||||
fill: #000;
|
||||
stroke: #000;
|
||||
stroke-width: 1px;
|
||||
}
|
||||
|
||||
.blocklyDeleteIconShape.blocklyDeleteIconHighlighted {
|
||||
stroke: #fc3;
|
||||
}
|
||||
|
||||
|
||||
.blocklyCommentTextarea {
|
||||
background-color: #fef49c;
|
||||
border: 0;
|
||||
display: block;
|
||||
margin: 0;
|
||||
outline: 0;
|
||||
padding: 3px;
|
||||
resize: none;
|
||||
text-overflow: hidden;
|
||||
}
|
||||
|
||||
|
||||
.blocklyAngleCircle {
|
||||
stroke: #444;
|
||||
stroke-width: 1;
|
||||
fill: #ddd;
|
||||
fill-opacity: 0.8;
|
||||
}
|
||||
|
||||
.blocklyAngleMarks {
|
||||
stroke: #444;
|
||||
stroke-width: 1;
|
||||
}
|
||||
|
||||
.blocklyAngleGauge {
|
||||
fill: #f88;
|
||||
fill-opacity: 0.8;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.blocklyAngleLine {
|
||||
stroke: #f00;
|
||||
stroke-width: 2;
|
||||
stroke-linecap: round;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
|
||||
.blocklyColourTable {
|
||||
border-collapse: collapse;
|
||||
display: block;
|
||||
outline: none;
|
||||
padding: 1px;
|
||||
}
|
||||
|
||||
.blocklyColourTable>tr>td {
|
||||
border: 0.5px solid #888;
|
||||
box-sizing: border-box;
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
height: 20px;
|
||||
padding: 0;
|
||||
width: 20px;
|
||||
}
|
||||
|
||||
.blocklyColourTable>tr>td.blocklyColourHighlighted {
|
||||
border-color: #eee;
|
||||
box-shadow: 2px 2px 7px 2px rgba(0, 0, 0, 0.3);
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.blocklyColourSelected, .blocklyColourSelected:hover {
|
||||
border-color: #eee !important;
|
||||
outline: 1px solid #333;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
|
||||
.blocklyHtmlTextAreaInput {
|
||||
font-family: monospace;
|
||||
resize: none;
|
||||
overflow: hidden;
|
||||
height: 100%;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.blocklyHtmlTextAreaInputOverflowedY {
|
||||
overflow-y: scroll;
|
||||
}
|
||||
|
||||
|
||||
.blocklyFlyoutButton {
|
||||
fill: #888;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.blocklyFlyoutButtonShadow {
|
||||
fill: #666;
|
||||
}
|
||||
|
||||
.blocklyFlyoutButton:hover {
|
||||
fill: #aaa;
|
||||
}
|
||||
|
||||
.blocklyFlyoutLabel {
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.blocklyFlyoutLabelBackground {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
|
||||
.blocklyTreeRow:not(.blocklyTreeSelected):hover {
|
||||
background-color: rgba(255, 255, 255, .2);
|
||||
}
|
||||
|
||||
.blocklyToolboxDiv[layout="h"] .blocklyToolboxCategory {
|
||||
margin: 1px 5px 1px 0;
|
||||
}
|
||||
|
||||
.blocklyToolboxDiv[dir="RTL"][layout="h"] .blocklyToolboxCategory {
|
||||
margin: 1px 0 1px 5px;
|
||||
}
|
||||
|
||||
.blocklyTreeRow {
|
||||
height: 22px;
|
||||
line-height: 22px;
|
||||
margin-bottom: 3px;
|
||||
padding-right: 8px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.blocklyToolboxDiv[dir="RTL"] .blocklyTreeRow {
|
||||
margin-left: 8px;
|
||||
padding-right: 0;
|
||||
}
|
||||
|
||||
.blocklyTreeIcon {
|
||||
background-image: url(https://blockly-demo.appspot.com/static/media/sprites.png);
|
||||
height: 16px;
|
||||
vertical-align: middle;
|
||||
visibility: hidden;
|
||||
width: 16px;
|
||||
}
|
||||
|
||||
.blocklyTreeIconClosed {
|
||||
background-position: -32px -1px;
|
||||
}
|
||||
|
||||
.blocklyToolboxDiv[dir="RTL"] .blocklyTreeIconClosed {
|
||||
background-position: 0 -1px;
|
||||
}
|
||||
|
||||
.blocklyTreeSelected>.blocklyTreeIconClosed {
|
||||
background-position: -32px -17px;
|
||||
}
|
||||
|
||||
.blocklyToolboxDiv[dir="RTL"] .blocklyTreeSelected>.blocklyTreeIconClosed {
|
||||
background-position: 0 -17px;
|
||||
}
|
||||
|
||||
.blocklyTreeIconOpen {
|
||||
background-position: -16px -1px;
|
||||
}
|
||||
|
||||
.blocklyTreeSelected>.blocklyTreeIconOpen {
|
||||
background-position: -16px -17px;
|
||||
}
|
||||
|
||||
.blocklyTreeLabel {
|
||||
cursor: default;
|
||||
font: 16px sans-serif;
|
||||
padding: 0 3px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.blocklyToolboxDelete .blocklyTreeLabel {
|
||||
cursor: url("https://blockly-demo.appspot.com/static/media/handdelete.cur"), auto;
|
||||
}
|
||||
|
||||
.blocklyTreeSelected .blocklyTreeLabel {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
|
||||
.blocklyTreeSeparator {
|
||||
border-bottom: solid #e5e5e5 1px;
|
||||
height: 0;
|
||||
margin: 5px 0;
|
||||
}
|
||||
|
||||
.blocklyToolboxDiv[layout="h"] .blocklyTreeSeparator {
|
||||
border-right: solid #e5e5e5 1px;
|
||||
border-bottom: none;
|
||||
height: auto;
|
||||
margin: 0 5px 0 5px;
|
||||
padding: 5px 0;
|
||||
width: 0;
|
||||
}
|
||||
|
||||
|
||||
.blocklyToolboxDelete {
|
||||
cursor: url("https://blockly-demo.appspot.com/static/media/handdelete.cur"), auto;
|
||||
}
|
||||
|
||||
.blocklyToolboxGrab {
|
||||
cursor: url("https://blockly-demo.appspot.com/static/media/handclosed.cur"), auto;
|
||||
cursor: grabbing;
|
||||
cursor: -webkit-grabbing;
|
||||
}
|
||||
|
||||
/* Category tree in Toolbox. */
|
||||
.blocklyToolboxDiv {
|
||||
background-color: #ddd;
|
||||
overflow-x: visible;
|
||||
overflow-y: auto;
|
||||
padding: 4px 0 4px 0;
|
||||
position: absolute;
|
||||
z-index: 70; /* so blocks go under toolbox when dragging */
|
||||
-webkit-tap-highlight-color: transparent; /* issue #1345 */
|
||||
}
|
||||
|
||||
.blocklyToolboxContents {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.blocklyToolboxContents:focus {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
|
||||
.blocklyColourTable {
|
||||
border-collapse: collapse;
|
||||
display: block;
|
||||
outline: none;
|
||||
padding: 1px;
|
||||
}
|
||||
|
||||
.blocklyColourTable>tr>td {
|
||||
border: 0.5px solid #888;
|
||||
box-sizing: border-box;
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
height: 20px;
|
||||
padding: 0;
|
||||
width: 20px;
|
||||
}
|
||||
|
||||
.blocklyColourTable>tr>td.blocklyColourHighlighted {
|
||||
border-color: #eee;
|
||||
box-shadow: 2px 2px 7px 2px rgba(0, 0, 0, 0.3);
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.blocklyColourSelected, .blocklyColourSelected:hover {
|
||||
border-color: #eee !important;
|
||||
outline: 1px solid #333;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
|
||||
.fieldColourSliderContainer {
|
||||
padding: 4px;
|
||||
}
|
||||
.fieldColourSliderContainer hr {
|
||||
border: none;
|
||||
border-top: 1px solid #bbb;
|
||||
}
|
||||
.fieldColourSliderLabel {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
font: 12pt "Helvetica Neue", "Segoe UI", Helvetica, sans-serif;
|
||||
}
|
||||
.fieldColourEyedropper {
|
||||
appearance: none;
|
||||
position: relative;
|
||||
border: none;
|
||||
border-radius: 4px;
|
||||
background: transparent;
|
||||
font: inherit;
|
||||
color: inherit;
|
||||
cursor: pointer;
|
||||
width: 100%;
|
||||
margin: 0;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.fieldColourEyedropper:hover {
|
||||
background: rgba(0,0,0,0.1)
|
||||
}
|
||||
.fieldColourEyedropper input {
|
||||
opacity: 0;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
}
|
||||
.fieldColourEyedropper::before {
|
||||
content: "Eyedropper";
|
||||
}
|
||||
.fieldColourEyedropper::after {
|
||||
content: "";
|
||||
margin-left: 8px;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
background: currentColor;
|
||||
pointer-events: none;
|
||||
-webkit-mask-image: var(--customize-dial-symbol);
|
||||
-webkit-mask-repeat: no-repeat;
|
||||
-webkit-mask-position: center;
|
||||
mask-image: var(--customize-dial-symbol);
|
||||
mask-repeat: no-repeat;
|
||||
mask-position: center;
|
||||
--customize-dial-symbol: url('data:image/svg+xml, <svg xmlns="http://www.w3.org/2000/svg" width="24px" height="24px" viewBox="0 0 24 24"> <path stroke="black" strokewidth="1.414" fill="none" d="m 13 8 L 6 15 Q 3 18 2 21 Q 0 23 .5 23.5 Q 1 24 3 22 Q 6 21 9 18 L 16 11"/> <path fill="black" d="m 12 7 Q 11 6 12 5 Q 13 4 14 5 Q 15 6 16 5 Q 20 -1 22.5 1.5 Q 25 4 19 8 Q 18 9 19 10 Q 20 11 19 12 Q 18 13 17 12"/> </svg>');
|
||||
}
|
||||
.fieldColourSlider {
|
||||
-webkit-appearance: none;
|
||||
width: 150px;
|
||||
height: 24px;
|
||||
margin: 4px 8px 24px 8px;
|
||||
padding: 0;
|
||||
}
|
||||
.fieldColourSlider:last-child {
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
.fieldColourSlider:focus {
|
||||
outline: none;
|
||||
}
|
||||
/* Webkit */
|
||||
.fieldColourSlider::-webkit-slider-runnable-track {
|
||||
background: var(--slider-track-background);
|
||||
border-radius: 8px;
|
||||
height: 16px;
|
||||
}
|
||||
.fieldColourSlider::-webkit-slider-thumb {
|
||||
-webkit-appearance: none;
|
||||
background: #fff;
|
||||
border-radius: 50%;
|
||||
box-shadow: 0 0 0 4px rgba(0,0,0,.15);
|
||||
cursor: pointer;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
margin-top: -4px;
|
||||
}
|
||||
/* Firefox */
|
||||
.fieldColourSlider::-moz-range-track {
|
||||
background: var(--slider-track-background);
|
||||
border-radius: 8px;
|
||||
height: 16px;
|
||||
}
|
||||
.fieldColourSlider::-moz-range-thumb {
|
||||
background: #fff;
|
||||
border: none;
|
||||
border-radius: 50%;
|
||||
box-shadow: 0 0 0 4px rgba(0,0,0,.15);
|
||||
cursor: pointer;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
}
|
||||
.fieldColourSlider::-moz-focus-outer {
|
||||
/* override the focus border style */
|
||||
border: 0;
|
||||
}
|
||||
/* IE */
|
||||
.fieldColourSlider::-ms-track {
|
||||
background: var(--slider-track-background);
|
||||
border-radius: 12px;
|
||||
width: 100%;
|
||||
height: 24px;
|
||||
/* remove default tick marks */
|
||||
color: transparent;
|
||||
}
|
||||
.fieldColourSlider::-ms-fill-lower {
|
||||
background: transparent;
|
||||
}
|
||||
.fieldColourSlider::-ms-fill-upper {
|
||||
background: transparent;
|
||||
}
|
||||
.fieldColourSlider::-ms-thumb {
|
||||
background: #fff;
|
||||
border: none;
|
||||
border-radius: 50%;
|
||||
box-shadow: 0 0 0 4px rgba(0,0,0,.15);
|
||||
cursor: pointer;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
}
|
||||
|
||||
|
||||
.blocklyMultilineText {
|
||||
fill: #fff !important;
|
||||
}
|
||||
|
||||
|
||||
.blocklyMultiselect>image, .blocklyMultiselect>svg>image {
|
||||
opacity: .2;
|
||||
}
|
||||
|
||||
.blocklyMultiselect>image:hover, .blocklyMultiselect>svg>image:hover {
|
||||
opacity: .4;
|
||||
}
|
||||
|
||||
.blocklyMultiselect>image:active, .blocklyMultiselect>svg>image:active {
|
||||
opacity: .6;
|
||||
}
|
||||
|
||||
|
||||
.controlsIconStyleLightTheme {
|
||||
opacity: 0.2;
|
||||
}
|
||||
.controlsIconStyleLightTheme:hover {
|
||||
opacity: 0.4;
|
||||
}
|
||||
.controlsIconStyleLightTheme:active {
|
||||
opacity: 0.6;
|
||||
}
|
||||
|
||||
|
||||
.controlsIconStyleDarkTheme {
|
||||
opacity: 0.4;
|
||||
filter: invert(1);
|
||||
}
|
||||
.controlsIconStyleDarkTheme:hover {
|
||||
opacity: 0.6;
|
||||
filter: invert(1);
|
||||
}
|
||||
.controlsIconStyleDarkTheme:active {
|
||||
opacity: 0.8;
|
||||
filter: invert(1);
|
||||
}
|
||||
|
||||
</style><g transform="translate(1, 5)"><g data-id="v{m!~$1f5l%h:MFI]d8M" class="blocklyDraggable"><path class="blocklyPath" stroke="#4585a1" fill="#5cb1d6" d=" m 0,0 m 0,4 a 4 4 0 0,1 4,-4 h 5 l 0,-4 10,0 0,4 10,0 0,-4 10,0 0,4 h 326.5265625 a 4 4 0 0,1 4,4 v 6 V 38 V 40 V 40 a 4 4 0 0,1 -4,4 h -326.5265625 l 0,-4 -10,0 0,4 -10,0 0,-4 -10,0 0,4 h -5 a 4 4 0 0,1 -4,-4 z "/><g transform="translate(8,6.5)"><image height="30px" width="28.8px" alt="" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyNSAyNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwLCAwKSI+CiAgICA8cmVjdCB4PSI0LjUiIHk9IjEuNSIgd2lkdGg9IjE2IiBoZWlnaHQ9IjIyIiByeD0iNC4wODU5IiByeT0iNC4wODU5IiBmaWxsPSJub25lIiBzdG9wLWNvbG9yPSIjMDAwMDAwIiBzdHJva2U9IiNmZmYiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgc3Ryb2tlLXdpZHRoPSIzIi8+CjxwYXRoIGQ9Im04LjgyNjIgNS43NTg5aDcuMzQ3NiIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjZmZmIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS13aWR0aD0iMiIvPgo8Y2lyY2xlIGN4PSIxMi41IiBjeT0iMTcuNDY0IiByPSIyIiBmaWxsPSIjZmZmIiBzdG9wLWNvbG9yPSIjMDAwMDAwIi8+CiAgPC9nPgo8L3N2Zz4="/></g><g transform="translate(44.8,6.5)"><image height="30px" width="2px" alt="" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyIDMwIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogIDxnIHRyYW5zZm9ybT0idHJhbnNsYXRlKDAsIDApIj4KICAgIDxwYXRoIGQ9Im0wLjUgMC41djI5IiBmaWxsPSJub25lIiBzdHJva2U9IiMwMDAiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLW9wYWNpdHk9Ii4yNjI1Ii8+CiAgPC9nPgo8L3N2Zz4="/></g><g class="blocklyEditableText" transform="translate(54.8,7.4)" style="cursor: text;"><rect rx="4" ry="4" x="0" y="0" height="29.2" width="59.578125" class="blocklyFieldRect" stroke="#4585a1" style="display: block; fill: rgb(78, 150, 182);"/><text class="blocklyText" dominant-baseline="central" style="fill: rgb(255, 255, 255);" x="8" y="14.6">smart</text></g><g class="blocklyEditableText" transform="translate(122.378125,7.4)" style="cursor: default;"><rect rx="4" ry="4" x="0" y="0" height="29.2" width="129.34375" class="blocklyFieldRect blocklyDropdownRect" stroke="#4585a1" fill="transparent"/><text class="blocklyText blocklyDropdownText" dominant-baseline="central" text-anchor="start" x="8" y="14.6">line follower</text><image style="display: none;"/><image height="12px" width="12px" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="data:image/svg+xml;base64,PHN2ZyBpZD0iTGF5ZXJfMSIgZGF0YS1uYW1lPSJMYXllciAxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMi43MSIgaGVpZ2h0PSI4Ljc5IiB2aWV3Qm94PSIwIDAgMTIuNzEgOC43OSI+PHRpdGxlPmRyb3Bkb3duLWFycm93PC90aXRsZT48ZyBvcGFjaXR5PSIwLjEiPjxwYXRoIGQ9Ik0xMi43MSwyLjQ0QTIuNDEsMi40MSwwLDAsMSwxMiw0LjE2TDguMDgsOC4wOGEyLjQ1LDIuNDUsMCwwLDEtMy40NSwwTDAuNzIsNC4xNkEyLjQyLDIuNDIsMCwwLDEsMCwyLjQ0LDIuNDgsMi40OCwwLDAsMSwuNzEuNzFDMSwwLjQ3LDEuNDMsMCw2LjM2LDBTMTEuNzUsMC40NiwxMiwuNzFBMi40NCwyLjQ0LDAsMCwxLDEyLjcxLDIuNDRaIiBmaWxsPSIjMjMxZjIwIi8+PC9nPjxwYXRoIGQ9Ik02LjM2LDcuNzlhMS40MywxLjQzLDAsMCwxLTEtLjQyTDEuNDIsMy40NWExLjQ0LDEuNDQsMCwwLDEsMC0yYzAuNTYtLjU2LDkuMzEtMC41Niw5Ljg3LDBhMS40NCwxLjQ0LDAsMCwxLDAsMkw3LjM3LDcuMzdBMS40MywxLjQzLDAsMCwxLDYuMzYsNy43OVoiIGZpbGw9IiNmZmYiLz48L3N2Zz4=" transform="translate(109.34375,8.6)"/></g><g class="blocklyEditableText" transform="translate(259.721875,7.4)" style="cursor: default;"><rect rx="4" ry="4" x="0" y="0" height="29.2" width="101.8046875" class="blocklyFieldRect blocklyDropdownRect" stroke="#4585a1" fill="transparent"/><text class="blocklyText blocklyDropdownText" dominant-baseline="central" text-anchor="start" x="8" y="14.6">dark line</text><image style="display: none;"/><image height="12px" width="12px" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="data:image/svg+xml;base64,PHN2ZyBpZD0iTGF5ZXJfMSIgZGF0YS1uYW1lPSJMYXllciAxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMi43MSIgaGVpZ2h0PSI4Ljc5IiB2aWV3Qm94PSIwIDAgMTIuNzEgOC43OSI+PHRpdGxlPmRyb3Bkb3duLWFycm93PC90aXRsZT48ZyBvcGFjaXR5PSIwLjEiPjxwYXRoIGQ9Ik0xMi43MSwyLjQ0QTIuNDEsMi40MSwwLDAsMSwxMiw0LjE2TDguMDgsOC4wOGEyLjQ1LDIuNDUsMCwwLDEtMy40NSwwTDAuNzIsNC4xNkEyLjQyLDIuNDIsMCwwLDEsMCwyLjQ0LDIuNDgsMi40OCwwLDAsMSwuNzEuNzFDMSwwLjQ3LDEuNDMsMCw2LjM2LDBTMTEuNzUsMC40NiwxMiwuNzFBMi40NCwyLjQ0LDAsMCwxLDEyLjcxLDIuNDRaIiBmaWxsPSIjMjMxZjIwIi8+PC9nPjxwYXRoIGQ9Ik02LjM2LDcuNzlhMS40MywxLjQzLDAsMCwxLTEtLjQyTDEuNDIsMy40NWExLjQ0LDEuNDQsMCwwLDEsMC0yYzAuNTYtLjU2LDkuMzEtMC41Niw5Ljg3LDBhMS40NCwxLjQ0LDAsMCwxLDAsMkw3LjM3LDcuMzdBMS40MywxLjQzLDAsMCwxLDYuMzYsNy43OVoiIGZpbGw9IiNmZmYiLz48L3N2Zz4=" transform="translate(81.8046875,8.6)"/></g></g></g></svg>
|
||||
|
After Width: | Height: | Size: 25 KiB |
|
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 29 KiB |
|
After Width: | Height: | Size: 25 KiB |
|
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 25 KiB |
@@ -1,5 +1,5 @@
|
||||
<!-- Copyright (c) 2023 The Pybricks Authors. All rights reserved. -->
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 162.1359375 52" class="blocklySvg pybricks_renderer-renderer pybricks-zelos-light-theme" width="162.1359375" height="52" style="background-color: transparent"><style xmlns="http://www.w3.org/1999/xhtml">.pybricks_renderer-renderer.pybricks-zelos-light-theme .blocklyText,
|
||||
<!-- Copyright (c) 2024 The Pybricks Authors. All rights reserved. -->
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 142.1359375 52" class="blocklySvg pybricks_renderer-renderer pybricks-zelos-light-theme" width="142.1359375" height="52" style="background-color: transparent"><style xmlns="http://www.w3.org/1999/xhtml">.pybricks_renderer-renderer.pybricks-zelos-light-theme .blocklyText,
|
||||
.pybricks_renderer-renderer.pybricks-zelos-light-theme .blocklyFlyoutLabelText {
|
||||
font: bold 12pt "Helvetica Neue", "Segoe UI", Helvetica, sans-serif;
|
||||
}
|
||||
@@ -48,7 +48,7 @@ color: #fff;
|
||||
stroke: #ffffff;
|
||||
}
|
||||
.pybricks_renderer-renderer.pybricks-zelos-light-theme .blocklyDisabled > .blocklyOutlinePath {
|
||||
fill: url(#blocklyDisabledPattern9387213926908944)
|
||||
fill: url(#blocklyDisabledPattern770586695409901)
|
||||
}
|
||||
.pybricks_renderer-renderer.pybricks-zelos-light-theme .blocklyInsertionMarker>.blocklyPath {
|
||||
fill-opacity: 0.2;
|
||||
@@ -949,15 +949,9 @@ input[type=number] {
|
||||
}
|
||||
|
||||
|
||||
.controlsIconStyle {
|
||||
opacity: 0.2;
|
||||
}
|
||||
.controlsIconStyle:hover {
|
||||
opacity: 0.4;
|
||||
}
|
||||
.controlsIconStyle:active {
|
||||
opacity: 0.6;
|
||||
}
|
||||
.blocklyMultilineText {
|
||||
fill: #fff !important;
|
||||
}
|
||||
|
||||
|
||||
.blocklyMultiselect>image, .blocklyMultiselect>svg>image {
|
||||
@@ -972,4 +966,29 @@ input[type=number] {
|
||||
opacity: .6;
|
||||
}
|
||||
|
||||
</style><g transform="translate(1, 5)"><g data-id="AGU@JJxqaZ900CU1q4O~" class="blocklyDraggable"><path class="blocklyPath" stroke="#3971bf" fill="#4c97ff" d=" m 0,0 m 0,4 a 4 4 0 0,1 4,-4 h 5 l 0,-4 10,0 0,4 10,0 0,-4 10,0 0,4 h 117.13593750000001 a 4 4 0 0,1 4,4 v 6 V 38 V 40 V 40 a 4 4 0 0,1 -4,4 h -117.13593750000001 l 0,-4 -10,0 0,4 -10,0 0,-4 -10,0 0,4 h -5 a 4 4 0 0,1 -4,-4 z "/><g transform="translate(8,6.5)"><image height="30px" width="28.8px" alt="*" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyNSAyNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwLCAwKSI+CiAgICA8Zz4KPHJlY3QgdHJhbnNmb3JtPSJzY2FsZSgtMSkiIHg9Ii0yMS40NDIiIHk9Ii0yNC45IiB3aWR0aD0iMTcuOCIgaGVpZ2h0PSIyNC44IiByeD0iMCIgcnk9IjAiIGZpbGw9IiNmZmYiIHN0cm9rZT0iIzFiMjkzMyIgc3Ryb2tlLWxpbmVjYXA9InNxdWFyZSIgc3Ryb2tlLXdpZHRoPSIuMiIvPgo8cmVjdCB0cmFuc2Zvcm09InNjYWxlKC0xKSIgeD0iLTEzLjg3OCIgeT0iLTI0LjgyMiIgd2lkdGg9IjIuNjcwMyIgaGVpZ2h0PSI0LjI0MjQiIGZpbGw9IiM4MzliZmYiLz4KPHJlY3QgdHJhbnNmb3JtPSJzY2FsZSgtMSkiIHg9Ii0xNS4yOTIiIHk9Ii0xOS4zODUiIHdpZHRoPSI1LjUiIGhlaWdodD0iNS41IiByeD0iLjQwNDI0IiByeT0iLjQwNDI0IiBmaWxsPSIjMDBiZTBhIi8+CjwvZz4KICA8L2c+Cjwvc3ZnPg=="/></g><g transform="translate(44.8,6.5)"><image height="30px" width="2px" alt="*" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyIDMwIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogIDxnIHRyYW5zZm9ybT0idHJhbnNsYXRlKDAsIDApIj4KICAgIDxwYXRoIGQ9Im0wLjUgMC41djI5IiBmaWxsPSJub25lIiBzdHJva2U9IiMwMDAiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLW9wYWNpdHk9Ii4yNjI1Ii8+CiAgPC9nPgo8L3N2Zz4="/></g><g class="blocklyEditableText" transform="translate(54.8,6.9)" style="cursor: text;"><rect rx="4" ry="4" x="0" y="0" height="30.2" width="77.3359375" class="blocklyFieldRect" stroke="#3971bf" style="display: block; fill: rgb(65, 128, 217);"/><text class="blocklyText" dominant-baseline="central" style="fill: rgb(255, 255, 255);" x="8" y="15.1">city hub</text></g><g transform="translate(140.1359375,6.5)"><image height="30px" width="12px" alt="" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAxMiAzMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwLCAwKSI+CiAgICA8cGF0aCBkPSJtMi40NzM4IDUuNzk2OCA3LjUwOTYgOS40MDI3LTcuNTA5NiA5LjQwMjciIGZpbGw9Im5vbmUiIHN0cm9rZT0iI2ZmZiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBzdHJva2Utd2lkdGg9IjQiLz4KICA8L2c+Cjwvc3ZnPg==" style="cursor: pointer;"/></g></g></g></svg>
|
||||
|
||||
.controlsIconStyleLightTheme {
|
||||
opacity: 0.2;
|
||||
}
|
||||
.controlsIconStyleLightTheme:hover {
|
||||
opacity: 0.4;
|
||||
}
|
||||
.controlsIconStyleLightTheme:active {
|
||||
opacity: 0.6;
|
||||
}
|
||||
|
||||
|
||||
.controlsIconStyleDarkTheme {
|
||||
opacity: 0.4;
|
||||
filter: invert(1);
|
||||
}
|
||||
.controlsIconStyleDarkTheme:hover {
|
||||
opacity: 0.6;
|
||||
filter: invert(1);
|
||||
}
|
||||
.controlsIconStyleDarkTheme:active {
|
||||
opacity: 0.8;
|
||||
filter: invert(1);
|
||||
}
|
||||
|
||||
</style><g transform="translate(1, 5)"><g data-id="x8^AN=nIc/70bNA=C]ql" class="blocklyDraggable"><path class="blocklyPath" stroke="#3971bf" fill="#4c97ff" d=" m 0,0 m 0,4 a 4 4 0 0,1 4,-4 h 5 l 0,-4 10,0 0,4 10,0 0,-4 10,0 0,4 h 97.13593750000001 a 4 4 0 0,1 4,4 v 6 V 38 V 40 V 40 a 4 4 0 0,1 -4,4 h -97.13593750000001 l 0,-4 -10,0 0,4 -10,0 0,-4 -10,0 0,4 h -5 a 4 4 0 0,1 -4,-4 z "/><g transform="translate(8,6.5)"><image height="30px" width="28.8px" alt="" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyNSAyNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwLCAwKSI+CiAgICA8Zz4KPHJlY3QgdHJhbnNmb3JtPSJzY2FsZSgtMSkiIHg9Ii0yMS40NDIiIHk9Ii0yNC45IiB3aWR0aD0iMTcuOCIgaGVpZ2h0PSIyNC44IiByeD0iMCIgcnk9IjAiIGZpbGw9IiNmZmYiIHN0cm9rZT0iIzFiMjkzMyIgc3Ryb2tlLWxpbmVjYXA9InNxdWFyZSIgc3Ryb2tlLXdpZHRoPSIuMiIvPgo8cmVjdCB0cmFuc2Zvcm09InNjYWxlKC0xKSIgeD0iLTEzLjg3OCIgeT0iLTI0LjgyMiIgd2lkdGg9IjIuNjcwMyIgaGVpZ2h0PSI0LjI0MjQiIGZpbGw9IiM4MzliZmYiLz4KPHJlY3QgdHJhbnNmb3JtPSJzY2FsZSgtMSkiIHg9Ii0xNS4yOTIiIHk9Ii0xOS4zODUiIHdpZHRoPSI1LjUiIGhlaWdodD0iNS41IiByeD0iLjQwNDI0IiByeT0iLjQwNDI0IiBmaWxsPSIjMDBiZTBhIi8+CjwvZz4KICA8L2c+Cjwvc3ZnPg=="/></g><g transform="translate(44.8,6.5)"><image height="30px" width="2px" alt="" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyIDMwIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogIDxnIHRyYW5zZm9ybT0idHJhbnNsYXRlKDAsIDApIj4KICAgIDxwYXRoIGQ9Im0wLjUgMC41djI5IiBmaWxsPSJub25lIiBzdHJva2U9IiMwMDAiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLW9wYWNpdHk9Ii4yNjI1Ii8+CiAgPC9nPgo8L3N2Zz4="/></g><g class="blocklyEditableText" transform="translate(54.8,7.4)" style="cursor: text;"><rect rx="4" ry="4" x="0" y="0" height="29.2" width="77.3359375" class="blocklyFieldRect" stroke="#3971bf" style="display: block; fill: rgb(65, 128, 217);"/><text class="blocklyText" dominant-baseline="central" style="fill: rgb(255, 255, 255);" x="8" y="14.6">city hub</text></g></g></g></svg>
|
||||
|
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 22 KiB |
@@ -1,4 +1,4 @@
|
||||
<!-- Copyright (c) 2023 The Pybricks Authors. All rights reserved. -->
|
||||
<!-- Copyright (c) 2024 The Pybricks Authors. All rights reserved. -->
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 203.05 52" class="blocklySvg pybricks_renderer-renderer pybricks-zelos-light-theme" width="203.05" height="52" style="background-color: transparent"><style xmlns="http://www.w3.org/1999/xhtml">.pybricks_renderer-renderer.pybricks-zelos-light-theme .blocklyText,
|
||||
.pybricks_renderer-renderer.pybricks-zelos-light-theme .blocklyFlyoutLabelText {
|
||||
font: bold 12pt "Helvetica Neue", "Segoe UI", Helvetica, sans-serif;
|
||||
@@ -48,7 +48,7 @@ color: #fff;
|
||||
stroke: #ffffff;
|
||||
}
|
||||
.pybricks_renderer-renderer.pybricks-zelos-light-theme .blocklyDisabled > .blocklyOutlinePath {
|
||||
fill: url(#blocklyDisabledPattern8106945446883995)
|
||||
fill: url(#blocklyDisabledPattern770586695409901)
|
||||
}
|
||||
.pybricks_renderer-renderer.pybricks-zelos-light-theme .blocklyInsertionMarker>.blocklyPath {
|
||||
fill-opacity: 0.2;
|
||||
@@ -949,15 +949,9 @@ input[type=number] {
|
||||
}
|
||||
|
||||
|
||||
.controlsIconStyle {
|
||||
opacity: 0.2;
|
||||
}
|
||||
.controlsIconStyle:hover {
|
||||
opacity: 0.4;
|
||||
}
|
||||
.controlsIconStyle:active {
|
||||
opacity: 0.6;
|
||||
}
|
||||
.blocklyMultilineText {
|
||||
fill: #fff !important;
|
||||
}
|
||||
|
||||
|
||||
.blocklyMultiselect>image, .blocklyMultiselect>svg>image {
|
||||
@@ -972,4 +966,29 @@ input[type=number] {
|
||||
opacity: .6;
|
||||
}
|
||||
|
||||
</style><g transform="translate(1, 5)"><g data-id="{Jrf7Nz~mk-.f{~B||f-" class="blocklyDraggable"><path class="blocklyPath" stroke="#3971bf" fill="#4c97ff" d=" m 0,0 m 0,4 a 4 4 0 0,1 4,-4 h 5 l 0,-4 10,0 0,4 10,0 0,-4 10,0 0,4 h 158.05 a 4 4 0 0,1 4,4 v 6 V 38 V 40 V 40 a 4 4 0 0,1 -4,4 h -158.05 l 0,-4 -10,0 0,4 -10,0 0,-4 -10,0 0,4 h -5 a 4 4 0 0,1 -4,-4 z "/><g transform="translate(8,6.5)"><image height="30px" width="28.8px" alt="*" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyNSAyNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwLCAwKSI+CiAgICA8Zz4KPHJlY3QgeD0iMS42Mjg2IiB5PSIzLjc0NiIgd2lkdGg9IjIxLjgiIGhlaWdodD0iMTYuNzUyIiByeD0iMS45NzY0IiByeT0iMS45NzY0IiBmaWxsPSIjZjRmNGY0IiBzdHJva2U9IiMxYjI5MzMiIHN0cm9rZS1saW5lY2FwPSJzcXVhcmUiIHN0cm9rZS13aWR0aD0iLjIiLz4KPHJlY3QgeD0iMTAuMzI0IiB5PSI5Ljk1ODciIHdpZHRoPSI0LjQwODgiIGhlaWdodD0iNC40MTE1IiBmaWxsPSIjZjRmNGY0IiBzdHJva2U9IiMxYjI5MzMiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgc3Ryb2tlLXdpZHRoPSIuMTY3Ii8+CjxyZWN0IHg9IjExLjE4MyIgeT0iMTYuMDc4IiB3aWR0aD0iMi42OTA3IiBoZWlnaHQ9IjQuNDExNSIgZmlsbD0iIzgzOWJmZiIvPgo8L2c+CiAgPC9nPgo8L3N2Zz4="/></g><g transform="translate(44.8,6.5)"><image height="30px" width="2px" alt="*" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyIDMwIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogIDxnIHRyYW5zZm9ybT0idHJhbnNsYXRlKDAsIDApIj4KICAgIDxwYXRoIGQ9Im0wLjUgMC41djI5IiBmaWxsPSJub25lIiBzdHJva2U9IiMwMDAiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLW9wYWNpdHk9Ii4yNjI1Ii8+CiAgPC9nPgo8L3N2Zz4="/></g><g class="blocklyEditableText" transform="translate(54.8,7.4)" style="cursor: text;"><rect rx="4" ry="4" x="0" y="0" height="29.2" width="118.25" class="blocklyFieldRect" stroke="#3971bf" style="display: block; fill: rgb(65, 128, 217);"/><text class="blocklyText" dominant-baseline="central" style="fill: rgb(255, 255, 255);" x="8" y="14.6">essential hub</text></g><g transform="translate(181.05,6.5)"><image height="30px" width="12px" alt="" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAxMiAzMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwLCAwKSI+CiAgICA8cGF0aCBkPSJtMi40NzM4IDUuNzk2OCA3LjUwOTYgOS40MDI3LTcuNTA5NiA5LjQwMjciIGZpbGw9Im5vbmUiIHN0cm9rZT0iI2ZmZiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBzdHJva2Utd2lkdGg9IjQiLz4KICA8L2c+Cjwvc3ZnPg==" style="cursor: pointer;"/></g></g></g></svg>
|
||||
|
||||
.controlsIconStyleLightTheme {
|
||||
opacity: 0.2;
|
||||
}
|
||||
.controlsIconStyleLightTheme:hover {
|
||||
opacity: 0.4;
|
||||
}
|
||||
.controlsIconStyleLightTheme:active {
|
||||
opacity: 0.6;
|
||||
}
|
||||
|
||||
|
||||
.controlsIconStyleDarkTheme {
|
||||
opacity: 0.4;
|
||||
filter: invert(1);
|
||||
}
|
||||
.controlsIconStyleDarkTheme:hover {
|
||||
opacity: 0.6;
|
||||
filter: invert(1);
|
||||
}
|
||||
.controlsIconStyleDarkTheme:active {
|
||||
opacity: 0.8;
|
||||
filter: invert(1);
|
||||
}
|
||||
|
||||
</style><g transform="translate(1, 5)"><g data-id="%NMD$cHdMIS^c1w|gyTX" class="blocklyDraggable"><path class="blocklyPath" stroke="#3971bf" fill="#4c97ff" d=" m 0,0 m 0,4 a 4 4 0 0,1 4,-4 h 5 l 0,-4 10,0 0,4 10,0 0,-4 10,0 0,4 h 158.05 a 4 4 0 0,1 4,4 v 6 V 38 V 40 V 40 a 4 4 0 0,1 -4,4 h -158.05 l 0,-4 -10,0 0,4 -10,0 0,-4 -10,0 0,4 h -5 a 4 4 0 0,1 -4,-4 z "/><g transform="translate(8,6.5)"><image height="30px" width="28.8px" alt="" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyNSAyNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwLCAwKSI+CiAgICA8Zz4KPHJlY3QgeD0iMS42Mjg2IiB5PSIzLjc0NiIgd2lkdGg9IjIxLjgiIGhlaWdodD0iMTYuNzUyIiByeD0iMS45NzY0IiByeT0iMS45NzY0IiBmaWxsPSIjZjRmNGY0IiBzdHJva2U9IiMxYjI5MzMiIHN0cm9rZS1saW5lY2FwPSJzcXVhcmUiIHN0cm9rZS13aWR0aD0iLjIiLz4KPHJlY3QgeD0iMTAuMzI0IiB5PSI5Ljk1ODciIHdpZHRoPSI0LjQwODgiIGhlaWdodD0iNC40MTE1IiBmaWxsPSIjZjRmNGY0IiBzdHJva2U9IiMxYjI5MzMiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgc3Ryb2tlLXdpZHRoPSIuMTY3Ii8+CjxyZWN0IHg9IjExLjE4MyIgeT0iMTYuMDc4IiB3aWR0aD0iMi42OTA3IiBoZWlnaHQ9IjQuNDExNSIgZmlsbD0iIzgzOWJmZiIvPgo8L2c+CiAgPC9nPgo8L3N2Zz4="/></g><g transform="translate(44.8,6.5)"><image height="30px" width="2px" alt="" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyIDMwIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogIDxnIHRyYW5zZm9ybT0idHJhbnNsYXRlKDAsIDApIj4KICAgIDxwYXRoIGQ9Im0wLjUgMC41djI5IiBmaWxsPSJub25lIiBzdHJva2U9IiMwMDAiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLW9wYWNpdHk9Ii4yNjI1Ii8+CiAgPC9nPgo8L3N2Zz4="/></g><g class="blocklyEditableText" transform="translate(54.8,7.4)" style="cursor: text;"><rect rx="4" ry="4" x="0" y="0" height="29.2" width="118.25" class="blocklyFieldRect" stroke="#3971bf" style="display: block; fill: rgb(65, 128, 217);"/><text class="blocklyText" dominant-baseline="central" style="fill: rgb(255, 255, 255);" x="8" y="14.6">essential hub</text></g><g transform="translate(181.05,6.5)"><image height="30px" width="12px" alt="" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAxMiAzMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwLCAwKSI+CiAgICA8cGF0aCBkPSJtMi40NzM4IDUuNzk2OCA3LjUwOTYgOS40MDI3LTcuNTA5NiA5LjQwMjciIGZpbGw9Im5vbmUiIHN0cm9rZT0iI2ZmZiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBzdHJva2Utd2lkdGg9IjQiLz4KICA8L2c+Cjwvc3ZnPg==" style="cursor: pointer;"/></g></g></g></svg>
|
||||
|
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 26 KiB |
@@ -1,4 +1,4 @@
|
||||
<!-- Copyright (c) 2023 The Pybricks Authors. All rights reserved. -->
|
||||
<!-- Copyright (c) 2024 The Pybricks Authors. All rights reserved. -->
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 197.6828125 52" class="blocklySvg pybricks_renderer-renderer pybricks-zelos-light-theme" width="197.6828125" height="52" style="background-color: transparent"><style xmlns="http://www.w3.org/1999/xhtml">.pybricks_renderer-renderer.pybricks-zelos-light-theme .blocklyText,
|
||||
.pybricks_renderer-renderer.pybricks-zelos-light-theme .blocklyFlyoutLabelText {
|
||||
font: bold 12pt "Helvetica Neue", "Segoe UI", Helvetica, sans-serif;
|
||||
@@ -48,7 +48,7 @@ color: #fff;
|
||||
stroke: #ffffff;
|
||||
}
|
||||
.pybricks_renderer-renderer.pybricks-zelos-light-theme .blocklyDisabled > .blocklyOutlinePath {
|
||||
fill: url(#blocklyDisabledPattern8106945446883995)
|
||||
fill: url(#blocklyDisabledPattern770586695409901)
|
||||
}
|
||||
.pybricks_renderer-renderer.pybricks-zelos-light-theme .blocklyInsertionMarker>.blocklyPath {
|
||||
fill-opacity: 0.2;
|
||||
@@ -949,15 +949,9 @@ input[type=number] {
|
||||
}
|
||||
|
||||
|
||||
.controlsIconStyle {
|
||||
opacity: 0.2;
|
||||
}
|
||||
.controlsIconStyle:hover {
|
||||
opacity: 0.4;
|
||||
}
|
||||
.controlsIconStyle:active {
|
||||
opacity: 0.6;
|
||||
}
|
||||
.blocklyMultilineText {
|
||||
fill: #fff !important;
|
||||
}
|
||||
|
||||
|
||||
.blocklyMultiselect>image, .blocklyMultiselect>svg>image {
|
||||
@@ -972,4 +966,29 @@ input[type=number] {
|
||||
opacity: .6;
|
||||
}
|
||||
|
||||
</style><g transform="translate(1, 5)"><g data-id="Q5w{_w)*b:I1hX^{3=1Q" class="blocklyDraggable"><path class="blocklyPath" stroke="#3971bf" fill="#4c97ff" d=" m 0,0 m 0,4 a 4 4 0 0,1 4,-4 h 5 l 0,-4 10,0 0,4 10,0 0,-4 10,0 0,4 h 152.6828125 a 4 4 0 0,1 4,4 v 6 V 38 V 40 V 40 a 4 4 0 0,1 -4,4 h -152.6828125 l 0,-4 -10,0 0,4 -10,0 0,-4 -10,0 0,4 h -5 a 4 4 0 0,1 -4,-4 z "/><g transform="translate(8,6.5)"><image height="30px" width="28.8px" alt="*" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyNSAyNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwLCAwKSI+CiAgICA8Zz4KPHJlY3QgeD0iMy41ODM0IiB5PSIuMDgzNDQ5IiB3aWR0aD0iMTcuOCIgaGVpZ2h0PSIyNC44IiByeD0iMS45NzY0IiByeT0iMS45NzY0IiBmaWxsPSIjZjRmNGY0IiBzdHJva2U9IiMxYjI5MzMiIHN0cm9rZS1saW5lY2FwPSJzcXVhcmUiIHN0cm9rZS13aWR0aD0iLjIiLz4KPGNpcmNsZSBjeD0iMTIuNSIgY3k9IjIwLjUzMyIgcj0iMi40NSIgZmlsbD0iIzgzOWJmZiIgc3Ryb2tlPSIjMDAwIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS13aWR0aD0iLjEiLz4KPGcgdHJhbnNmb3JtPSJtYXRyaXgoMS4xOTk5IDAgMCAxLjE5OTkgLTIuNDk5NiAtMS40MDkpIiBmaWxsPSIjZmZkZTAwIiBzdHJva2Utd2lkdGg9Ii44MzMzNyI+CjxyZWN0IHg9IjcuNSIgeT0iNC4wMDA1IiB3aWR0aD0iMyIgaGVpZ2h0PSIzIi8+CjxyZWN0IHg9IjExIiB5PSI0IiB3aWR0aD0iMyIgaGVpZ2h0PSIzIi8+CjxyZWN0IHg9IjE0LjUiIHk9IjQuMDAwNSIgd2lkdGg9IjMiIGhlaWdodD0iMyIvPgo8cmVjdCB4PSI3LjUiIHk9IjcuNTAwNSIgd2lkdGg9IjMiIGhlaWdodD0iMyIvPgo8cmVjdCB4PSIxMSIgeT0iNy41IiB3aWR0aD0iMyIgaGVpZ2h0PSIzIi8+CjxyZWN0IHg9IjE0LjUiIHk9IjcuNTAwNSIgd2lkdGg9IjMiIGhlaWdodD0iMyIvPgo8cmVjdCB4PSI3LjUiIHk9IjExIiB3aWR0aD0iMyIgaGVpZ2h0PSIzIi8+CjxyZWN0IHg9IjExIiB5PSIxMSIgd2lkdGg9IjMiIGhlaWdodD0iMyIvPgo8cmVjdCB4PSIxNC41IiB5PSIxMSIgd2lkdGg9IjMiIGhlaWdodD0iMyIvPgo8L2c+CjwvZz4KICA8L2c+Cjwvc3ZnPg=="/></g><g transform="translate(44.8,6.5)"><image height="30px" width="2px" alt="*" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyIDMwIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogIDxnIHRyYW5zZm9ybT0idHJhbnNsYXRlKDAsIDApIj4KICAgIDxwYXRoIGQ9Im0wLjUgMC41djI5IiBmaWxsPSJub25lIiBzdHJva2U9IiMwMDAiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLW9wYWNpdHk9Ii4yNjI1Ii8+CiAgPC9nPgo8L3N2Zz4="/></g><g class="blocklyEditableText" transform="translate(54.8,7.4)" style="cursor: text;"><rect rx="4" ry="4" x="0" y="0" height="29.2" width="112.8828125" class="blocklyFieldRect" stroke="#3971bf" style="display: block; fill: rgb(65, 128, 217);"/><text class="blocklyText" dominant-baseline="central" style="fill: rgb(255, 255, 255);" x="8" y="14.6">inventor hub</text></g><g transform="translate(175.6828125,6.5)"><image height="30px" width="12px" alt="" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAxMiAzMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwLCAwKSI+CiAgICA8cGF0aCBkPSJtMi40NzM4IDUuNzk2OCA3LjUwOTYgOS40MDI3LTcuNTA5NiA5LjQwMjciIGZpbGw9Im5vbmUiIHN0cm9rZT0iI2ZmZiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBzdHJva2Utd2lkdGg9IjQiLz4KICA8L2c+Cjwvc3ZnPg==" style="cursor: pointer;"/></g></g></g></svg>
|
||||
|
||||
.controlsIconStyleLightTheme {
|
||||
opacity: 0.2;
|
||||
}
|
||||
.controlsIconStyleLightTheme:hover {
|
||||
opacity: 0.4;
|
||||
}
|
||||
.controlsIconStyleLightTheme:active {
|
||||
opacity: 0.6;
|
||||
}
|
||||
|
||||
|
||||
.controlsIconStyleDarkTheme {
|
||||
opacity: 0.4;
|
||||
filter: invert(1);
|
||||
}
|
||||
.controlsIconStyleDarkTheme:hover {
|
||||
opacity: 0.6;
|
||||
filter: invert(1);
|
||||
}
|
||||
.controlsIconStyleDarkTheme:active {
|
||||
opacity: 0.8;
|
||||
filter: invert(1);
|
||||
}
|
||||
|
||||
</style><g transform="translate(1, 5)"><g data-id="]ZWmx={.=ydSt2,}36m?" class="blocklyDraggable"><path class="blocklyPath" stroke="#3971bf" fill="#4c97ff" d=" m 0,0 m 0,4 a 4 4 0 0,1 4,-4 h 5 l 0,-4 10,0 0,4 10,0 0,-4 10,0 0,4 h 152.6828125 a 4 4 0 0,1 4,4 v 6 V 38 V 40 V 40 a 4 4 0 0,1 -4,4 h -152.6828125 l 0,-4 -10,0 0,4 -10,0 0,-4 -10,0 0,4 h -5 a 4 4 0 0,1 -4,-4 z "/><g transform="translate(8,6.5)"><image height="30px" width="28.8px" alt="" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyNSAyNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwLCAwKSI+CiAgICA8Zz4KPHJlY3QgeD0iMy41ODM0IiB5PSIuMDgzNDQ5IiB3aWR0aD0iMTcuOCIgaGVpZ2h0PSIyNC44IiByeD0iMS45NzY0IiByeT0iMS45NzY0IiBmaWxsPSIjZjRmNGY0IiBzdHJva2U9IiMxYjI5MzMiIHN0cm9rZS1saW5lY2FwPSJzcXVhcmUiIHN0cm9rZS13aWR0aD0iLjIiLz4KPGNpcmNsZSBjeD0iMTIuNSIgY3k9IjIwLjUzMyIgcj0iMi40NSIgZmlsbD0iIzgzOWJmZiIgc3Ryb2tlPSIjMDAwIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS13aWR0aD0iLjEiLz4KPGcgdHJhbnNmb3JtPSJtYXRyaXgoMS4xOTk5IDAgMCAxLjE5OTkgLTIuNDk5NiAtMS40MDkpIiBmaWxsPSIjZmZkZTAwIiBzdHJva2Utd2lkdGg9Ii44MzMzNyI+CjxyZWN0IHg9IjcuNSIgeT0iNC4wMDA1IiB3aWR0aD0iMyIgaGVpZ2h0PSIzIi8+CjxyZWN0IHg9IjExIiB5PSI0IiB3aWR0aD0iMyIgaGVpZ2h0PSIzIi8+CjxyZWN0IHg9IjE0LjUiIHk9IjQuMDAwNSIgd2lkdGg9IjMiIGhlaWdodD0iMyIvPgo8cmVjdCB4PSI3LjUiIHk9IjcuNTAwNSIgd2lkdGg9IjMiIGhlaWdodD0iMyIvPgo8cmVjdCB4PSIxMSIgeT0iNy41IiB3aWR0aD0iMyIgaGVpZ2h0PSIzIi8+CjxyZWN0IHg9IjE0LjUiIHk9IjcuNTAwNSIgd2lkdGg9IjMiIGhlaWdodD0iMyIvPgo8cmVjdCB4PSI3LjUiIHk9IjExIiB3aWR0aD0iMyIgaGVpZ2h0PSIzIi8+CjxyZWN0IHg9IjExIiB5PSIxMSIgd2lkdGg9IjMiIGhlaWdodD0iMyIvPgo8cmVjdCB4PSIxNC41IiB5PSIxMSIgd2lkdGg9IjMiIGhlaWdodD0iMyIvPgo8L2c+CjwvZz4KICA8L2c+Cjwvc3ZnPg=="/></g><g transform="translate(44.8,6.5)"><image height="30px" width="2px" alt="" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyIDMwIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogIDxnIHRyYW5zZm9ybT0idHJhbnNsYXRlKDAsIDApIj4KICAgIDxwYXRoIGQ9Im0wLjUgMC41djI5IiBmaWxsPSJub25lIiBzdHJva2U9IiMwMDAiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLW9wYWNpdHk9Ii4yNjI1Ii8+CiAgPC9nPgo8L3N2Zz4="/></g><g class="blocklyEditableText" transform="translate(54.8,7.4)" style="cursor: text;"><rect rx="4" ry="4" x="0" y="0" height="29.2" width="112.8828125" class="blocklyFieldRect" stroke="#3971bf" style="display: block; fill: rgb(65, 128, 217);"/><text class="blocklyText" dominant-baseline="central" style="fill: rgb(255, 255, 255);" x="8" y="14.6">inventor hub</text></g><g transform="translate(175.6828125,6.5)"><image height="30px" width="12px" alt="" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAxMiAzMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwLCAwKSI+CiAgICA8cGF0aCBkPSJtMi40NzM4IDUuNzk2OCA3LjUwOTYgOS40MDI3LTcuNTA5NiA5LjQwMjciIGZpbGw9Im5vbmUiIHN0cm9rZT0iI2ZmZiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBzdHJva2Utd2lkdGg9IjQiLz4KICA8L2c+Cjwvc3ZnPg==" style="cursor: pointer;"/></g></g></g></svg>
|
||||
|
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 27 KiB |
@@ -1,4 +1,4 @@
|
||||
<!-- Copyright (c) 2023 The Pybricks Authors. All rights reserved. -->
|
||||
<!-- Copyright (c) 2024 The Pybricks Authors. All rights reserved. -->
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 176.3625 52" class="blocklySvg pybricks_renderer-renderer pybricks-zelos-light-theme" width="176.3625" height="52" style="background-color: transparent"><style xmlns="http://www.w3.org/1999/xhtml">.pybricks_renderer-renderer.pybricks-zelos-light-theme .blocklyText,
|
||||
.pybricks_renderer-renderer.pybricks-zelos-light-theme .blocklyFlyoutLabelText {
|
||||
font: bold 12pt "Helvetica Neue", "Segoe UI", Helvetica, sans-serif;
|
||||
@@ -48,7 +48,7 @@ color: #fff;
|
||||
stroke: #ffffff;
|
||||
}
|
||||
.pybricks_renderer-renderer.pybricks-zelos-light-theme .blocklyDisabled > .blocklyOutlinePath {
|
||||
fill: url(#blocklyDisabledPattern8106945446883995)
|
||||
fill: url(#blocklyDisabledPattern770586695409901)
|
||||
}
|
||||
.pybricks_renderer-renderer.pybricks-zelos-light-theme .blocklyInsertionMarker>.blocklyPath {
|
||||
fill-opacity: 0.2;
|
||||
@@ -949,15 +949,9 @@ input[type=number] {
|
||||
}
|
||||
|
||||
|
||||
.controlsIconStyle {
|
||||
opacity: 0.2;
|
||||
}
|
||||
.controlsIconStyle:hover {
|
||||
opacity: 0.4;
|
||||
}
|
||||
.controlsIconStyle:active {
|
||||
opacity: 0.6;
|
||||
}
|
||||
.blocklyMultilineText {
|
||||
fill: #fff !important;
|
||||
}
|
||||
|
||||
|
||||
.blocklyMultiselect>image, .blocklyMultiselect>svg>image {
|
||||
@@ -972,4 +966,29 @@ input[type=number] {
|
||||
opacity: .6;
|
||||
}
|
||||
|
||||
</style><g transform="translate(1, 5)"><g data-id="xK?mk5x/iFU?4h[XPhb@" class="blocklyDraggable"><path class="blocklyPath" stroke="#3971bf" fill="#4c97ff" d=" m 0,0 m 0,4 a 4 4 0 0,1 4,-4 h 5 l 0,-4 10,0 0,4 10,0 0,-4 10,0 0,4 h 131.3625 a 4 4 0 0,1 4,4 v 6 V 38 V 40 V 40 a 4 4 0 0,1 -4,4 h -131.3625 l 0,-4 -10,0 0,4 -10,0 0,-4 -10,0 0,4 h -5 a 4 4 0 0,1 -4,-4 z "/><g transform="translate(8,6.5)"><image height="30px" width="28.8px" alt="*" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyNSAyNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwLCAwKSI+CiAgICA8Zz4KPHBhdGggZD0ibTYuNDY4OCAwLjE0MDYydjE1LjU4M2gxLjV2My41MjM0aC0xLjV2NS45MDdoMTEuODAxdi01LjkwN2gtMS41di0zLjUyMzRoMS41di0xNS41ODN6IiBmaWxsPSIjZmZmIiBzdHJva2U9IiMxYjI5MzMiIHN0cm9rZS1saW5lY2FwPSJzcXVhcmUiIHN0cm9rZS13aWR0aD0iLjIiLz4KPHJlY3QgdHJhbnNmb3JtPSJzY2FsZSgtMSkiIHg9Ii0xMy4yNDgiIHk9Ii0xMi44MjkiIHdpZHRoPSIxLjc1OTEiIGhlaWdodD0iMi43OTk0IiBmaWxsPSIjODM5YmZmIi8+CjxyZWN0IHRyYW5zZm9ybT0ic2NhbGUoLTEpIiB4PSItMTQuMTgiIHk9Ii05LjI0MTEiIHdpZHRoPSIzLjYyMzMiIGhlaWdodD0iMy42MjkyIiByeD0iLjQwNDI0IiByeT0iLjQwNDI0IiBmaWxsPSIjMDBiZTBhIi8+CjwvZz4KICA8L2c+Cjwvc3ZnPg=="/></g><g transform="translate(44.8,6.5)"><image height="30px" width="2px" alt="*" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyIDMwIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogIDxnIHRyYW5zZm9ybT0idHJhbnNsYXRlKDAsIDApIj4KICAgIDxwYXRoIGQ9Im0wLjUgMC41djI5IiBmaWxsPSJub25lIiBzdHJva2U9IiMwMDAiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLW9wYWNpdHk9Ii4yNjI1Ii8+CiAgPC9nPgo8L3N2Zz4="/></g><g class="blocklyEditableText" transform="translate(54.8,7.4)" style="cursor: text;"><rect rx="4" ry="4" x="0" y="0" height="29.2" width="91.5625" class="blocklyFieldRect" stroke="#3971bf" style="display: block; fill: rgb(65, 128, 217);"/><text class="blocklyText" dominant-baseline="central" style="fill: rgb(255, 255, 255);" x="8" y="14.6">move hub</text></g><g transform="translate(154.3625,6.5)"><image height="30px" width="12px" alt="" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAxMiAzMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwLCAwKSI+CiAgICA8cGF0aCBkPSJtMi40NzM4IDUuNzk2OCA3LjUwOTYgOS40MDI3LTcuNTA5NiA5LjQwMjciIGZpbGw9Im5vbmUiIHN0cm9rZT0iI2ZmZiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBzdHJva2Utd2lkdGg9IjQiLz4KICA8L2c+Cjwvc3ZnPg==" style="cursor: pointer;"/></g></g></g></svg>
|
||||
|
||||
.controlsIconStyleLightTheme {
|
||||
opacity: 0.2;
|
||||
}
|
||||
.controlsIconStyleLightTheme:hover {
|
||||
opacity: 0.4;
|
||||
}
|
||||
.controlsIconStyleLightTheme:active {
|
||||
opacity: 0.6;
|
||||
}
|
||||
|
||||
|
||||
.controlsIconStyleDarkTheme {
|
||||
opacity: 0.4;
|
||||
filter: invert(1);
|
||||
}
|
||||
.controlsIconStyleDarkTheme:hover {
|
||||
opacity: 0.6;
|
||||
filter: invert(1);
|
||||
}
|
||||
.controlsIconStyleDarkTheme:active {
|
||||
opacity: 0.8;
|
||||
filter: invert(1);
|
||||
}
|
||||
|
||||
</style><g transform="translate(1, 5)"><g data-id="m:~uM;VAgHYD~%We#NrJ" class="blocklyDraggable"><path class="blocklyPath" stroke="#3971bf" fill="#4c97ff" d=" m 0,0 m 0,4 a 4 4 0 0,1 4,-4 h 5 l 0,-4 10,0 0,4 10,0 0,-4 10,0 0,4 h 131.3625 a 4 4 0 0,1 4,4 v 6 V 38 V 40 V 40 a 4 4 0 0,1 -4,4 h -131.3625 l 0,-4 -10,0 0,4 -10,0 0,-4 -10,0 0,4 h -5 a 4 4 0 0,1 -4,-4 z "/><g transform="translate(8,6.5)"><image height="30px" width="28.8px" alt="" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyNSAyNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwLCAwKSI+CiAgICA8Zz4KPHBhdGggZD0ibTYuNDY4OCAwLjE0MDYydjE1LjU4M2gxLjV2My41MjM0aC0xLjV2NS45MDdoMTEuODAxdi01LjkwN2gtMS41di0zLjUyMzRoMS41di0xNS41ODN6IiBmaWxsPSIjZmZmIiBzdHJva2U9IiMxYjI5MzMiIHN0cm9rZS1saW5lY2FwPSJzcXVhcmUiIHN0cm9rZS13aWR0aD0iLjIiLz4KPHJlY3QgdHJhbnNmb3JtPSJzY2FsZSgtMSkiIHg9Ii0xMy4yNDgiIHk9Ii0xMi44MjkiIHdpZHRoPSIxLjc1OTEiIGhlaWdodD0iMi43OTk0IiBmaWxsPSIjODM5YmZmIi8+CjxyZWN0IHRyYW5zZm9ybT0ic2NhbGUoLTEpIiB4PSItMTQuMTgiIHk9Ii05LjI0MTEiIHdpZHRoPSIzLjYyMzMiIGhlaWdodD0iMy42MjkyIiByeD0iLjQwNDI0IiByeT0iLjQwNDI0IiBmaWxsPSIjMDBiZTBhIi8+CjwvZz4KICA8L2c+Cjwvc3ZnPg=="/></g><g transform="translate(44.8,6.5)"><image height="30px" width="2px" alt="" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyIDMwIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogIDxnIHRyYW5zZm9ybT0idHJhbnNsYXRlKDAsIDApIj4KICAgIDxwYXRoIGQ9Im0wLjUgMC41djI5IiBmaWxsPSJub25lIiBzdHJva2U9IiMwMDAiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLW9wYWNpdHk9Ii4yNjI1Ii8+CiAgPC9nPgo8L3N2Zz4="/></g><g class="blocklyEditableText" transform="translate(54.8,7.4)" style="cursor: text;"><rect rx="4" ry="4" x="0" y="0" height="29.2" width="91.5625" class="blocklyFieldRect" stroke="#3971bf" style="display: block; fill: rgb(65, 128, 217);"/><text class="blocklyText" dominant-baseline="central" style="fill: rgb(255, 255, 255);" x="8" y="14.6">move hub</text></g><g transform="translate(154.3625,6.5)"><image height="30px" width="12px" alt="" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAxMiAzMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwLCAwKSI+CiAgICA8cGF0aCBkPSJtMi40NzM4IDUuNzk2OCA3LjUwOTYgOS40MDI3LTcuNTA5NiA5LjQwMjciIGZpbGw9Im5vbmUiIHN0cm9rZT0iI2ZmZiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBzdHJva2Utd2lkdGg9IjQiLz4KICA8L2c+Cjwvc3ZnPg==" style="cursor: pointer;"/></g></g></g></svg>
|
||||
|
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 23 KiB |
|
After Width: | Height: | Size: 26 KiB |
@@ -1,4 +1,4 @@
|
||||
<!-- Copyright (c) 2023 The Pybricks Authors. All rights reserved. -->
|
||||
<!-- Copyright (c) 2024 The Pybricks Authors. All rights reserved. -->
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 178.1359375 52" class="blocklySvg pybricks_renderer-renderer pybricks-zelos-light-theme" width="178.1359375" height="52" style="background-color: transparent"><style xmlns="http://www.w3.org/1999/xhtml">.pybricks_renderer-renderer.pybricks-zelos-light-theme .blocklyText,
|
||||
.pybricks_renderer-renderer.pybricks-zelos-light-theme .blocklyFlyoutLabelText {
|
||||
font: bold 12pt "Helvetica Neue", "Segoe UI", Helvetica, sans-serif;
|
||||
@@ -48,7 +48,7 @@ color: #fff;
|
||||
stroke: #ffffff;
|
||||
}
|
||||
.pybricks_renderer-renderer.pybricks-zelos-light-theme .blocklyDisabled > .blocklyOutlinePath {
|
||||
fill: url(#blocklyDisabledPattern8106945446883995)
|
||||
fill: url(#blocklyDisabledPattern770586695409901)
|
||||
}
|
||||
.pybricks_renderer-renderer.pybricks-zelos-light-theme .blocklyInsertionMarker>.blocklyPath {
|
||||
fill-opacity: 0.2;
|
||||
@@ -949,15 +949,9 @@ input[type=number] {
|
||||
}
|
||||
|
||||
|
||||
.controlsIconStyle {
|
||||
opacity: 0.2;
|
||||
}
|
||||
.controlsIconStyle:hover {
|
||||
opacity: 0.4;
|
||||
}
|
||||
.controlsIconStyle:active {
|
||||
opacity: 0.6;
|
||||
}
|
||||
.blocklyMultilineText {
|
||||
fill: #fff !important;
|
||||
}
|
||||
|
||||
|
||||
.blocklyMultiselect>image, .blocklyMultiselect>svg>image {
|
||||
@@ -972,4 +966,29 @@ input[type=number] {
|
||||
opacity: .6;
|
||||
}
|
||||
|
||||
</style><g transform="translate(1, 5)"><g data-id="L)zR+;mugupgeNNgUL9#" class="blocklyDraggable"><path class="blocklyPath" stroke="#3971bf" fill="#4c97ff" d=" m 0,0 m 0,4 a 4 4 0 0,1 4,-4 h 5 l 0,-4 10,0 0,4 10,0 0,-4 10,0 0,4 h 133.1359375 a 4 4 0 0,1 4,4 v 6 V 38 V 40 V 40 a 4 4 0 0,1 -4,4 h -133.1359375 l 0,-4 -10,0 0,4 -10,0 0,-4 -10,0 0,4 h -5 a 4 4 0 0,1 -4,-4 z "/><g transform="translate(8,6.5)"><image height="30px" width="28.8px" alt="*" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyNSAyNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwLCAwKSI+CiAgICA8Zz4KPHJlY3QgeD0iMy41ODM0IiB5PSIuMDgzNDQ5IiB3aWR0aD0iMTcuOCIgaGVpZ2h0PSIyNC44IiByeD0iMS45NzY0IiByeT0iMS45NzY0IiBmaWxsPSIjZjRmNGY0IiBzdHJva2U9IiMxYjI5MzMiIHN0cm9rZS1saW5lY2FwPSJzcXVhcmUiIHN0cm9rZS13aWR0aD0iLjIiLz4KPGNpcmNsZSBjeD0iMTIuNSIgY3k9IjIwLjUzMyIgcj0iMi40NSIgZmlsbD0iIzgzOWJmZiIgc3Ryb2tlPSIjMDAwIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS13aWR0aD0iLjEiLz4KPGcgdHJhbnNmb3JtPSJtYXRyaXgoMS4xOTk5IDAgMCAxLjE5OTkgLTIuNDk5NiAtMS40MDkpIiBmaWxsPSIjZmZkZTAwIiBzdHJva2Utd2lkdGg9Ii44MzMzNyI+CjxyZWN0IHg9IjcuNSIgeT0iNC4wMDA1IiB3aWR0aD0iMyIgaGVpZ2h0PSIzIi8+CjxyZWN0IHg9IjExIiB5PSI0IiB3aWR0aD0iMyIgaGVpZ2h0PSIzIi8+CjxyZWN0IHg9IjE0LjUiIHk9IjQuMDAwNSIgd2lkdGg9IjMiIGhlaWdodD0iMyIvPgo8cmVjdCB4PSI3LjUiIHk9IjcuNTAwNSIgd2lkdGg9IjMiIGhlaWdodD0iMyIvPgo8cmVjdCB4PSIxMSIgeT0iNy41IiB3aWR0aD0iMyIgaGVpZ2h0PSIzIi8+CjxyZWN0IHg9IjE0LjUiIHk9IjcuNTAwNSIgd2lkdGg9IjMiIGhlaWdodD0iMyIvPgo8cmVjdCB4PSI3LjUiIHk9IjExIiB3aWR0aD0iMyIgaGVpZ2h0PSIzIi8+CjxyZWN0IHg9IjExIiB5PSIxMSIgd2lkdGg9IjMiIGhlaWdodD0iMyIvPgo8cmVjdCB4PSIxNC41IiB5PSIxMSIgd2lkdGg9IjMiIGhlaWdodD0iMyIvPgo8L2c+CjwvZz4KICA8L2c+Cjwvc3ZnPg=="/></g><g transform="translate(44.8,6.5)"><image height="30px" width="2px" alt="*" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyIDMwIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogIDxnIHRyYW5zZm9ybT0idHJhbnNsYXRlKDAsIDApIj4KICAgIDxwYXRoIGQ9Im0wLjUgMC41djI5IiBmaWxsPSJub25lIiBzdHJva2U9IiMwMDAiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLW9wYWNpdHk9Ii4yNjI1Ii8+CiAgPC9nPgo8L3N2Zz4="/></g><g class="blocklyEditableText" transform="translate(54.8,7.4)" style="cursor: text;"><rect rx="4" ry="4" x="0" y="0" height="29.2" width="93.3359375" class="blocklyFieldRect" stroke="#3971bf" style="display: block; fill: rgb(65, 128, 217);"/><text class="blocklyText" dominant-baseline="central" style="fill: rgb(255, 255, 255);" x="8" y="14.6">prime hub</text></g><g transform="translate(156.1359375,6.5)"><image height="30px" width="12px" alt="" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAxMiAzMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwLCAwKSI+CiAgICA8cGF0aCBkPSJtMi40NzM4IDUuNzk2OCA3LjUwOTYgOS40MDI3LTcuNTA5NiA5LjQwMjciIGZpbGw9Im5vbmUiIHN0cm9rZT0iI2ZmZiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBzdHJva2Utd2lkdGg9IjQiLz4KICA8L2c+Cjwvc3ZnPg==" style="cursor: pointer;"/></g></g></g></svg>
|
||||
|
||||
.controlsIconStyleLightTheme {
|
||||
opacity: 0.2;
|
||||
}
|
||||
.controlsIconStyleLightTheme:hover {
|
||||
opacity: 0.4;
|
||||
}
|
||||
.controlsIconStyleLightTheme:active {
|
||||
opacity: 0.6;
|
||||
}
|
||||
|
||||
|
||||
.controlsIconStyleDarkTheme {
|
||||
opacity: 0.4;
|
||||
filter: invert(1);
|
||||
}
|
||||
.controlsIconStyleDarkTheme:hover {
|
||||
opacity: 0.6;
|
||||
filter: invert(1);
|
||||
}
|
||||
.controlsIconStyleDarkTheme:active {
|
||||
opacity: 0.8;
|
||||
filter: invert(1);
|
||||
}
|
||||
|
||||
</style><g transform="translate(1, 5)"><g data-id="$so[Yep]~$*_qL%{w@6^" class="blocklyDraggable"><path class="blocklyPath" stroke="#3971bf" fill="#4c97ff" d=" m 0,0 m 0,4 a 4 4 0 0,1 4,-4 h 5 l 0,-4 10,0 0,4 10,0 0,-4 10,0 0,4 h 133.1359375 a 4 4 0 0,1 4,4 v 6 V 38 V 40 V 40 a 4 4 0 0,1 -4,4 h -133.1359375 l 0,-4 -10,0 0,4 -10,0 0,-4 -10,0 0,4 h -5 a 4 4 0 0,1 -4,-4 z "/><g transform="translate(8,6.5)"><image height="30px" width="28.8px" alt="" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyNSAyNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwLCAwKSI+CiAgICA8Zz4KPHJlY3QgeD0iMy41ODM0IiB5PSIuMDgzNDQ5IiB3aWR0aD0iMTcuOCIgaGVpZ2h0PSIyNC44IiByeD0iMS45NzY0IiByeT0iMS45NzY0IiBmaWxsPSIjZjRmNGY0IiBzdHJva2U9IiMxYjI5MzMiIHN0cm9rZS1saW5lY2FwPSJzcXVhcmUiIHN0cm9rZS13aWR0aD0iLjIiLz4KPGNpcmNsZSBjeD0iMTIuNSIgY3k9IjIwLjUzMyIgcj0iMi40NSIgZmlsbD0iIzgzOWJmZiIgc3Ryb2tlPSIjMDAwIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS13aWR0aD0iLjEiLz4KPGcgdHJhbnNmb3JtPSJtYXRyaXgoMS4xOTk5IDAgMCAxLjE5OTkgLTIuNDk5NiAtMS40MDkpIiBmaWxsPSIjZmZkZTAwIiBzdHJva2Utd2lkdGg9Ii44MzMzNyI+CjxyZWN0IHg9IjcuNSIgeT0iNC4wMDA1IiB3aWR0aD0iMyIgaGVpZ2h0PSIzIi8+CjxyZWN0IHg9IjExIiB5PSI0IiB3aWR0aD0iMyIgaGVpZ2h0PSIzIi8+CjxyZWN0IHg9IjE0LjUiIHk9IjQuMDAwNSIgd2lkdGg9IjMiIGhlaWdodD0iMyIvPgo8cmVjdCB4PSI3LjUiIHk9IjcuNTAwNSIgd2lkdGg9IjMiIGhlaWdodD0iMyIvPgo8cmVjdCB4PSIxMSIgeT0iNy41IiB3aWR0aD0iMyIgaGVpZ2h0PSIzIi8+CjxyZWN0IHg9IjE0LjUiIHk9IjcuNTAwNSIgd2lkdGg9IjMiIGhlaWdodD0iMyIvPgo8cmVjdCB4PSI3LjUiIHk9IjExIiB3aWR0aD0iMyIgaGVpZ2h0PSIzIi8+CjxyZWN0IHg9IjExIiB5PSIxMSIgd2lkdGg9IjMiIGhlaWdodD0iMyIvPgo8cmVjdCB4PSIxNC41IiB5PSIxMSIgd2lkdGg9IjMiIGhlaWdodD0iMyIvPgo8L2c+CjwvZz4KICA8L2c+Cjwvc3ZnPg=="/></g><g transform="translate(44.8,6.5)"><image height="30px" width="2px" alt="" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyIDMwIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogIDxnIHRyYW5zZm9ybT0idHJhbnNsYXRlKDAsIDApIj4KICAgIDxwYXRoIGQ9Im0wLjUgMC41djI5IiBmaWxsPSJub25lIiBzdHJva2U9IiMwMDAiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLW9wYWNpdHk9Ii4yNjI1Ii8+CiAgPC9nPgo8L3N2Zz4="/></g><g class="blocklyEditableText" transform="translate(54.8,7.4)" style="cursor: text;"><rect rx="4" ry="4" x="0" y="0" height="29.2" width="93.3359375" class="blocklyFieldRect" stroke="#3971bf" style="display: block; fill: rgb(65, 128, 217);"/><text class="blocklyText" dominant-baseline="central" style="fill: rgb(255, 255, 255);" x="8" y="14.6">prime hub</text></g><g transform="translate(156.1359375,6.5)"><image height="30px" width="12px" alt="" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAxMiAzMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwLCAwKSI+CiAgICA8cGF0aCBkPSJtMi40NzM4IDUuNzk2OCA3LjUwOTYgOS40MDI3LTcuNTA5NiA5LjQwMjciIGZpbGw9Im5vbmUiIHN0cm9rZT0iI2ZmZiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBzdHJva2Utd2lkdGg9IjQiLz4KICA8L2c+Cjwvc3ZnPg==" style="cursor: pointer;"/></g></g></g></svg>
|
||||
|
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 27 KiB |
@@ -1,4 +1,4 @@
|
||||
<!-- Copyright (c) 2023 The Pybricks Authors. All rights reserved. -->
|
||||
<!-- Copyright (c) 2024 The Pybricks Authors. All rights reserved. -->
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 190.58125 52" class="blocklySvg pybricks_renderer-renderer pybricks-zelos-light-theme" width="190.58125" height="52" style="background-color: transparent"><style xmlns="http://www.w3.org/1999/xhtml">.pybricks_renderer-renderer.pybricks-zelos-light-theme .blocklyText,
|
||||
.pybricks_renderer-renderer.pybricks-zelos-light-theme .blocklyFlyoutLabelText {
|
||||
font: bold 12pt "Helvetica Neue", "Segoe UI", Helvetica, sans-serif;
|
||||
@@ -48,7 +48,7 @@ color: #fff;
|
||||
stroke: #ffffff;
|
||||
}
|
||||
.pybricks_renderer-renderer.pybricks-zelos-light-theme .blocklyDisabled > .blocklyOutlinePath {
|
||||
fill: url(#blocklyDisabledPattern8106945446883995)
|
||||
fill: url(#blocklyDisabledPattern770586695409901)
|
||||
}
|
||||
.pybricks_renderer-renderer.pybricks-zelos-light-theme .blocklyInsertionMarker>.blocklyPath {
|
||||
fill-opacity: 0.2;
|
||||
@@ -949,15 +949,9 @@ input[type=number] {
|
||||
}
|
||||
|
||||
|
||||
.controlsIconStyle {
|
||||
opacity: 0.2;
|
||||
}
|
||||
.controlsIconStyle:hover {
|
||||
opacity: 0.4;
|
||||
}
|
||||
.controlsIconStyle:active {
|
||||
opacity: 0.6;
|
||||
}
|
||||
.blocklyMultilineText {
|
||||
fill: #fff !important;
|
||||
}
|
||||
|
||||
|
||||
.blocklyMultiselect>image, .blocklyMultiselect>svg>image {
|
||||
@@ -972,4 +966,29 @@ input[type=number] {
|
||||
opacity: .6;
|
||||
}
|
||||
|
||||
</style><g transform="translate(1, 5)"><g data-id="3CD}BAMY1jnM,4Xoo;QM" class="blocklyDraggable"><path class="blocklyPath" stroke="#3971bf" fill="#4c97ff" d=" m 0,0 m 0,4 a 4 4 0 0,1 4,-4 h 5 l 0,-4 10,0 0,4 10,0 0,-4 10,0 0,4 h 145.58125 a 4 4 0 0,1 4,4 v 6 V 38 V 40 V 40 a 4 4 0 0,1 -4,4 h -145.58125 l 0,-4 -10,0 0,4 -10,0 0,-4 -10,0 0,4 h -5 a 4 4 0 0,1 -4,-4 z "/><g transform="translate(8,6.5)"><image height="30px" width="28.8px" alt="*" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyNSAyNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwLCAwKSI+CiAgICA8Zz4KPHJlY3QgdHJhbnNmb3JtPSJzY2FsZSgtMSkiIHg9Ii0yMy40NDIiIHk9Ii04LjQiIHdpZHRoPSIyMS44IiBoZWlnaHQ9IjguMyIgcng9IjEuMjgwNiIgcnk9IjEuMjgwNiIgZmlsbD0iIzc3NyIgc3Ryb2tlPSIjMWIyOTMzIiBzdHJva2UtbGluZWNhcD0ic3F1YXJlIiBzdHJva2Utd2lkdGg9Ii4yIi8+CjxyZWN0IHRyYW5zZm9ybT0ic2NhbGUoLTEpIiB4PSItMjMuNDQyIiB5PSItMjQuOSIgd2lkdGg9IjIxLjgiIGhlaWdodD0iOC4zIiByeD0iMS4yODA2IiByeT0iMS4yODA2IiBmaWxsPSIjNzc3IiBzdHJva2U9IiMxYjI5MzMiIHN0cm9rZS1saW5lY2FwPSJzcXVhcmUiIHN0cm9rZS13aWR0aD0iLjIiLz4KPHJlY3QgdHJhbnNmb3JtPSJzY2FsZSgtMSkiIHg9Ii0yMS40NDIiIHk9Ii0yNC45IiB3aWR0aD0iMTcuOCIgaGVpZ2h0PSIyNC44IiByeD0iMCIgcnk9IjAiIGZpbGw9IiNjOWM5YzkiIHN0cm9rZT0iIzFiMjkzMyIgc3Ryb2tlLWxpbmVjYXA9InNxdWFyZSIgc3Ryb2tlLXdpZHRoPSIuMiIvPgo8cmVjdCB0cmFuc2Zvcm09InNjYWxlKC0xKSIgeD0iLTEzLjg3OCIgeT0iLTI0LjgyMiIgd2lkdGg9IjIuNjcwMyIgaGVpZ2h0PSI0LjI0MjQiIGZpbGw9IiM4MzliZmYiLz4KPHJlY3QgdHJhbnNmb3JtPSJzY2FsZSgtMSkiIHg9Ii0xNS4yOTIiIHk9Ii0xOS4zODUiIHdpZHRoPSI1LjUiIGhlaWdodD0iNS41IiByeD0iLjQwNDI0IiByeT0iLjQwNDI0IiBmaWxsPSIjMDBiZTBhIi8+CjwvZz4KICA8L2c+Cjwvc3ZnPg=="/></g><g transform="translate(44.8,6.5)"><image height="30px" width="2px" alt="*" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyIDMwIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogIDxnIHRyYW5zZm9ybT0idHJhbnNsYXRlKDAsIDApIj4KICAgIDxwYXRoIGQ9Im0wLjUgMC41djI5IiBmaWxsPSJub25lIiBzdHJva2U9IiMwMDAiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLW9wYWNpdHk9Ii4yNjI1Ii8+CiAgPC9nPgo8L3N2Zz4="/></g><g class="blocklyEditableText" transform="translate(54.8,7.4)" style="cursor: text;"><rect rx="4" ry="4" x="0" y="0" height="29.2" width="105.78125" class="blocklyFieldRect" stroke="#3971bf" style="display: block; fill: rgb(65, 128, 217);"/><text class="blocklyText" dominant-baseline="central" style="fill: rgb(255, 255, 255);" x="8" y="14.6">technic hub</text></g><g transform="translate(168.58125,6.5)"><image height="30px" width="12px" alt="" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAxMiAzMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwLCAwKSI+CiAgICA8cGF0aCBkPSJtMi40NzM4IDUuNzk2OCA3LjUwOTYgOS40MDI3LTcuNTA5NiA5LjQwMjciIGZpbGw9Im5vbmUiIHN0cm9rZT0iI2ZmZiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBzdHJva2Utd2lkdGg9IjQiLz4KICA8L2c+Cjwvc3ZnPg==" style="cursor: pointer;"/></g></g></g></svg>
|
||||
|
||||
.controlsIconStyleLightTheme {
|
||||
opacity: 0.2;
|
||||
}
|
||||
.controlsIconStyleLightTheme:hover {
|
||||
opacity: 0.4;
|
||||
}
|
||||
.controlsIconStyleLightTheme:active {
|
||||
opacity: 0.6;
|
||||
}
|
||||
|
||||
|
||||
.controlsIconStyleDarkTheme {
|
||||
opacity: 0.4;
|
||||
filter: invert(1);
|
||||
}
|
||||
.controlsIconStyleDarkTheme:hover {
|
||||
opacity: 0.6;
|
||||
filter: invert(1);
|
||||
}
|
||||
.controlsIconStyleDarkTheme:active {
|
||||
opacity: 0.8;
|
||||
filter: invert(1);
|
||||
}
|
||||
|
||||
</style><g transform="translate(1, 5)"><g data-id=")(Y5*G-E2$SXHQ*S.:4g" class="blocklyDraggable"><path class="blocklyPath" stroke="#3971bf" fill="#4c97ff" d=" m 0,0 m 0,4 a 4 4 0 0,1 4,-4 h 5 l 0,-4 10,0 0,4 10,0 0,-4 10,0 0,4 h 145.58125 a 4 4 0 0,1 4,4 v 6 V 38 V 40 V 40 a 4 4 0 0,1 -4,4 h -145.58125 l 0,-4 -10,0 0,4 -10,0 0,-4 -10,0 0,4 h -5 a 4 4 0 0,1 -4,-4 z "/><g transform="translate(8,6.5)"><image height="30px" width="28.8px" alt="" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyNSAyNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwLCAwKSI+CiAgICA8Zz4KPHJlY3QgdHJhbnNmb3JtPSJzY2FsZSgtMSkiIHg9Ii0yMy40NDIiIHk9Ii04LjQiIHdpZHRoPSIyMS44IiBoZWlnaHQ9IjguMyIgcng9IjEuMjgwNiIgcnk9IjEuMjgwNiIgZmlsbD0iIzc3NyIgc3Ryb2tlPSIjMWIyOTMzIiBzdHJva2UtbGluZWNhcD0ic3F1YXJlIiBzdHJva2Utd2lkdGg9Ii4yIi8+CjxyZWN0IHRyYW5zZm9ybT0ic2NhbGUoLTEpIiB4PSItMjMuNDQyIiB5PSItMjQuOSIgd2lkdGg9IjIxLjgiIGhlaWdodD0iOC4zIiByeD0iMS4yODA2IiByeT0iMS4yODA2IiBmaWxsPSIjNzc3IiBzdHJva2U9IiMxYjI5MzMiIHN0cm9rZS1saW5lY2FwPSJzcXVhcmUiIHN0cm9rZS13aWR0aD0iLjIiLz4KPHJlY3QgdHJhbnNmb3JtPSJzY2FsZSgtMSkiIHg9Ii0yMS40NDIiIHk9Ii0yNC45IiB3aWR0aD0iMTcuOCIgaGVpZ2h0PSIyNC44IiByeD0iMCIgcnk9IjAiIGZpbGw9IiNjOWM5YzkiIHN0cm9rZT0iIzFiMjkzMyIgc3Ryb2tlLWxpbmVjYXA9InNxdWFyZSIgc3Ryb2tlLXdpZHRoPSIuMiIvPgo8cmVjdCB0cmFuc2Zvcm09InNjYWxlKC0xKSIgeD0iLTEzLjg3OCIgeT0iLTI0LjgyMiIgd2lkdGg9IjIuNjcwMyIgaGVpZ2h0PSI0LjI0MjQiIGZpbGw9IiM4MzliZmYiLz4KPHJlY3QgdHJhbnNmb3JtPSJzY2FsZSgtMSkiIHg9Ii0xNS4yOTIiIHk9Ii0xOS4zODUiIHdpZHRoPSI1LjUiIGhlaWdodD0iNS41IiByeD0iLjQwNDI0IiByeT0iLjQwNDI0IiBmaWxsPSIjMDBiZTBhIi8+CjwvZz4KICA8L2c+Cjwvc3ZnPg=="/></g><g transform="translate(44.8,6.5)"><image height="30px" width="2px" alt="" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyIDMwIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogIDxnIHRyYW5zZm9ybT0idHJhbnNsYXRlKDAsIDApIj4KICAgIDxwYXRoIGQ9Im0wLjUgMC41djI5IiBmaWxsPSJub25lIiBzdHJva2U9IiMwMDAiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLW9wYWNpdHk9Ii4yNjI1Ii8+CiAgPC9nPgo8L3N2Zz4="/></g><g class="blocklyEditableText" transform="translate(54.8,7.4)" style="cursor: text;"><rect rx="4" ry="4" x="0" y="0" height="29.2" width="105.78125" class="blocklyFieldRect" stroke="#3971bf" style="display: block; fill: rgb(65, 128, 217);"/><text class="blocklyText" dominant-baseline="central" style="fill: rgb(255, 255, 255);" x="8" y="14.6">technic hub</text></g><g transform="translate(168.58125,6.5)"><image height="30px" width="12px" alt="" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAxMiAzMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwLCAwKSI+CiAgICA8cGF0aCBkPSJtMi40NzM4IDUuNzk2OCA3LjUwOTYgOS40MDI3LTcuNTA5NiA5LjQwMjciIGZpbGw9Im5vbmUiIHN0cm9rZT0iI2ZmZiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBzdHJva2Utd2lkdGg9IjQiLz4KICA8L2c+Cjwvc3ZnPg==" style="cursor: pointer;"/></g></g></g></svg>
|
||||
|
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 24 KiB |
|
After Width: | Height: | Size: 27 KiB |
@@ -1,148 +0,0 @@
|
||||
.. pybricks-requirements::
|
||||
|
||||
Other blocks
|
||||
=====================================================
|
||||
|
||||
Most blocks correspond directly to one of the documented Python commands. This
|
||||
page lists the remaining blocks.
|
||||
|
||||
This page will be expanded with more details in the next release.
|
||||
|
||||
Math
|
||||
------------------------
|
||||
|
||||
See also :mod:`umath` for other math operations.
|
||||
|
||||
.. blockimg:: pybricks_blockMathFormula
|
||||
|
||||
.. blockimg:: pybricks_blockMathOp_modulo
|
||||
|
||||
.. blockimg:: pybricks_blockMathArithmetic_add
|
||||
|
||||
.. blockimg:: pybricks_blockMathArithmetic_minus
|
||||
|
||||
.. blockimg:: pybricks_blockMathArithmetic_multiply
|
||||
|
||||
.. blockimg:: pybricks_blockMathArithmetic_divide
|
||||
|
||||
.. blockimg:: pybricks_blockMathArithmetic_power
|
||||
|
||||
Logic
|
||||
--------------------------
|
||||
|
||||
.. blockimg:: pybricks_blockLogicCompareDouble
|
||||
|
||||
.. blockimg:: pybricks_blockLogicCompare_eq
|
||||
|
||||
.. blockimg:: pybricks_blockLogicCompare_gte
|
||||
|
||||
.. blockimg:: pybricks_blockLogicCompare_gt
|
||||
|
||||
.. blockimg:: pybricks_blockLogicCompare_lte
|
||||
|
||||
.. blockimg:: pybricks_blockLogicCompare_lt
|
||||
|
||||
.. blockimg:: pybricks_blockLogicCompare_neq
|
||||
|
||||
.. blockimg:: pybricks_blockLogicIsNone_is_none
|
||||
|
||||
.. blockimg:: pybricks_blockLogicIsNone_is_not_none
|
||||
|
||||
.. blockimg:: pybricks_blockLogicIsNone_not
|
||||
|
||||
.. blockimg:: pybricks_blockLogicOperation_and
|
||||
|
||||
.. blockimg:: pybricks_blockLogicOperation_or
|
||||
|
||||
.. blockimg:: pybricks_blockLogicTernary
|
||||
|
||||
.. blockimg:: pybricks_blockLogicTernaryDouble
|
||||
|
||||
.. blockimg:: pybricks_blockIsIn
|
||||
|
||||
Flow
|
||||
--------------------------
|
||||
|
||||
.. blockimg:: pybricks_blockFlowBreakContinue_break
|
||||
|
||||
.. blockimg:: pybricks_blockFlowBreakContinue_continue
|
||||
|
||||
.. blockimg:: pybricks_blockFlowForEach_loop_for
|
||||
|
||||
.. blockimg:: pybricks_blockFlowForEach_loop_for_list
|
||||
|
||||
.. blockimg:: pybricks_blockFlowForEach_loop_for_range
|
||||
|
||||
.. blockimg:: pybricks_blockFlowRepeat
|
||||
|
||||
.. blockimg:: pybricks_blockFlowWhile_until
|
||||
|
||||
.. blockimg:: pybricks_blockFlowWhile_while
|
||||
|
||||
|
||||
.. blockimg:: pybricks_blockIfElse_if_else
|
||||
|
||||
.. blockimg:: pybricks_blockIfElse_if_else_else
|
||||
|
||||
.. blockimg:: pybricks_blockIfElse_if_only
|
||||
|
||||
|
||||
Device and system setup
|
||||
--------------------------
|
||||
|
||||
.. blockimg:: pybricks_blockGlobalSetup
|
||||
|
||||
Waiting
|
||||
------------------------
|
||||
|
||||
.. blockimg:: pybricks_blockWaitTime
|
||||
|
||||
.. blockimg:: pybricks_blockWaitUntil
|
||||
|
||||
.. blockimg:: pybricks_blockWaitForever
|
||||
|
||||
|
||||
|
||||
Variables
|
||||
--------------------------
|
||||
|
||||
.. blockimg:: pybricks_variables_setup_any
|
||||
|
||||
.. blockimg:: pybricks_blockVariableGetValue
|
||||
|
||||
.. blockimg:: pybricks_blockVariableSetValue
|
||||
|
||||
Multitasking
|
||||
--------------------------
|
||||
|
||||
.. blockimg:: pybricks_blockGlobalStart
|
||||
|
||||
.. blockimg:: pybricks_blockMultiTask
|
||||
|
||||
Your own tasks
|
||||
--------------------------
|
||||
|
||||
.. blockimg:: pybricks_variables_setup_function_basic
|
||||
|
||||
.. blockimg:: pybricks_variables_setup_function_with_args
|
||||
|
||||
.. blockimg:: pybricks_blockTaskReturn
|
||||
|
||||
External tasks
|
||||
--------------------------
|
||||
|
||||
.. blockimg:: pybricks_variables_setup_imported_function
|
||||
|
||||
.. blockimg:: pybricks_blockImportTaskCallStatement
|
||||
|
||||
.. blockimg:: pybricks_blockImportTaskCallValue
|
||||
|
||||
Comments
|
||||
--------------------------
|
||||
|
||||
.. blockimg:: pybricks_blockComment
|
||||
|
||||
Stopping programs
|
||||
--------------------------
|
||||
|
||||
.. blockimg:: pybricks_blockProgramStop
|
||||
@@ -0,0 +1,124 @@
|
||||
.. rubric:: Measuring
|
||||
|
||||
.. blockimg:: pybricks_blockMotorMeasure_motor_angle
|
||||
|
||||
.. automethod:: angle
|
||||
|
||||
.. blockimg:: pybricks_blockMotorResetAngle
|
||||
|
||||
.. automethod:: reset_angle
|
||||
|
||||
.. blockimg:: pybricks_blockMotorMeasure_motor_speed
|
||||
|
||||
.. blockimg:: pybricks_blockMotorMeasure_motor_get_speed_average
|
||||
|
||||
.. automethod:: speed
|
||||
|
||||
.. blockimg:: pybricks_blockMotorMeasure_motor_load
|
||||
|
||||
.. automethod:: load
|
||||
|
||||
.. blockimg:: pybricks_blockMotorMeasure_motor_stalled
|
||||
|
||||
.. automethod:: stalled
|
||||
|
||||
.. rubric:: Stopping
|
||||
|
||||
.. blockimg:: pybricks_blockMotorStop_Motor_coast
|
||||
|
||||
.. automethod:: stop
|
||||
|
||||
.. blockimg:: pybricks_blockMotorStop_Motor_brake
|
||||
|
||||
.. automethod:: brake
|
||||
|
||||
.. blockimg:: pybricks_blockMotorStop_Motor_hold
|
||||
|
||||
.. automethod:: hold
|
||||
|
||||
.. rubric:: Running forever
|
||||
|
||||
.. blockimg:: pybricks_blockMotorRun_run
|
||||
|
||||
.. automethod:: run
|
||||
|
||||
.. blockimg:: pybricks_blockMotorDuty_Motor
|
||||
|
||||
.. automethod:: dc
|
||||
|
||||
.. rubric:: Running by a fixed amount
|
||||
|
||||
.. automethod:: run_time
|
||||
|
||||
.. blockimg:: pybricks_blockMotorRun_run_angle
|
||||
|
||||
.. automethod:: run_angle
|
||||
|
||||
.. blockimg:: pybricks_blockMotorRun_run_target
|
||||
|
||||
.. automethod:: run_target
|
||||
|
||||
.. blockimg:: pybricks_blockMotorRun_run_until_stalled
|
||||
|
||||
.. automethod:: run_until_stalled
|
||||
|
||||
.. blockimg:: pybricks_blockMotorTrack
|
||||
|
||||
.. automethod:: track_target
|
||||
|
||||
.. automethod:: done
|
||||
|
||||
.. rubric:: Motor settings
|
||||
|
||||
.. blockimg:: pybricks_blockMotorConfigure_motor_max_voltage
|
||||
|
||||
.. automethod:: settings
|
||||
|
||||
.. automethod:: close
|
||||
|
||||
.. rubric:: Control settings
|
||||
|
||||
.. pybricks-requirements:: pybricks-common-control
|
||||
|
||||
.. blockimg:: pybricks_blockMotorConfigure_motor_max_speed
|
||||
|
||||
.. blockimg:: pybricks_blockMotorConfigure_motor_acceleration
|
||||
|
||||
.. blockimg:: pybricks_blockMotorConfigure_motor_max_torque
|
||||
|
||||
.. autonestedmethod:: control.limits
|
||||
|
||||
.. pybricks-requirements:: pybricks-common-control
|
||||
|
||||
.. autonestedmethod:: control.pid
|
||||
|
||||
.. pybricks-requirements:: pybricks-common-control
|
||||
|
||||
.. blockimg:: pybricks_blockMotorConfigure_motor_target_tolerances
|
||||
|
||||
.. autonestedmethod:: control.target_tolerances
|
||||
|
||||
.. pybricks-requirements:: pybricks-common-control
|
||||
|
||||
.. autonestedmethod:: control.stall_tolerances
|
||||
|
||||
.. pybricks-requirements:: pybricks-common-control
|
||||
|
||||
.. attribute:: control.scale
|
||||
|
||||
Number of degrees that the motor turns to complete one degree at the
|
||||
output of the gear train. This is the gear ratio determined from the
|
||||
``gears`` argument when initializing the motor.
|
||||
|
||||
.. versionchanged:: 3.2
|
||||
|
||||
The :meth:`done`, :meth:`stalled` and :meth:`load` methods have been
|
||||
moved.
|
||||
|
||||
.. pybricks-requirements:: pybricks-common-control
|
||||
|
||||
.. autonestedmethod:: model.state
|
||||
|
||||
.. pybricks-requirements:: pybricks-common-control
|
||||
|
||||
.. autonestedmethod:: model.settings
|
||||
@@ -1,5 +1,3 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
#
|
||||
# Pybricks documentation build configuration file
|
||||
#
|
||||
@@ -8,17 +6,15 @@ import sys
|
||||
|
||||
# General information about the project.
|
||||
project = "pybricks"
|
||||
copyright = "2018-2023 The Pybricks Authors"
|
||||
copyright = "2018-2026 The Pybricks Authors"
|
||||
author = ""
|
||||
|
||||
_TITLE = "Pybricks Modules and Examples"
|
||||
_DISCLAIMER = "LEGO, the LEGO logo, MINDSTORMS and the MINDSTORMS EV3 logo are\
|
||||
trademarks and/or copyrights of the LEGO Group of companies \
|
||||
which does not sponsor, authorize or endorse this site."
|
||||
|
||||
html_favicon = "../common/images/favicon.ico"
|
||||
html_logo = "../common/images/pybricks-logo-rtd.png"
|
||||
latex_logo = "../common/images/pybricks-logo-large.png"
|
||||
|
||||
# Build main docs for RTD by default.
|
||||
# Since tags cannot be passed via the TAG make variable on read the docs,
|
||||
@@ -29,29 +25,19 @@ if os.environ.get("READTHEDOCS", None) == "True":
|
||||
# HACK: this allows Number type alias to be imported by Sphinx
|
||||
os.environ["SPHINX_BUILD"] = "True"
|
||||
|
||||
html_css_files = ["css/blocks.css"]
|
||||
html_css_files = ["css/theme_overrides.css", "css/blocks.css"]
|
||||
|
||||
# Additional configuration of the IDE docs
|
||||
if "ide" in tags.tags: # noqa F821
|
||||
if tags.has("ide"): # noqa F821
|
||||
_DISCLAIMER = ""
|
||||
html_show_copyright = False
|
||||
html_show_sphinx = False
|
||||
html_css_files.append("css/ide.css")
|
||||
html_js_files = ["js/ide.js"]
|
||||
|
||||
imgmath_image_format = "svg"
|
||||
imgmath_use_preview = True # requires Sphinx v3
|
||||
imgmath_latex_preamble = r"""
|
||||
\usepackage{newtxsf}
|
||||
"""
|
||||
|
||||
exec(open(os.path.abspath("../common/conf.py")).read())
|
||||
|
||||
# Additional configuration of the IDE docs
|
||||
if "ide" in tags.tags: # noqa F821
|
||||
extensions.remove("sphinx.ext.mathjax") # noqa F821
|
||||
extensions.append("sphinx.ext.imgmath") # noqa F821
|
||||
html_theme_options["prev_next_buttons_location"] = None # noqa F821
|
||||
# Shared config must run in this namespace so it sees the globals above.
|
||||
with open(os.path.abspath("../common/conf.py")) as _f:
|
||||
exec(_f.read()) # noqa: S102
|
||||
|
||||
# Build hub specific example scripts.
|
||||
sys.path.append(os.path.abspath("../../examples/pup/hub_common"))
|
||||
|
||||
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 15 KiB |
@@ -1,134 +0,0 @@
|
||||
:mod:`ev3devices <pybricks.ev3devices>` -- EV3 devices
|
||||
======================================================
|
||||
|
||||
.. automodule:: pybricks.ev3devices
|
||||
:no-members:
|
||||
|
||||
Motors
|
||||
^^^^^^^^^^^^
|
||||
|
||||
.. _fig_ev3motors:
|
||||
|
||||
.. figure:: ../main/diagrams/ev3motors.png
|
||||
:width: 100 %
|
||||
|
||||
EV3-compatible motors. The arrows indicate the default positive direction.
|
||||
|
||||
.. autoclass:: pybricks.ev3devices.Motor
|
||||
:noindex:
|
||||
:no-members:
|
||||
|
||||
.. rubric:: Measuring
|
||||
|
||||
.. automethod:: pybricks.ev3devices.Motor.angle
|
||||
|
||||
.. automethod:: pybricks.ev3devices.Motor.reset_angle
|
||||
|
||||
.. automethod:: pybricks.ev3devices.Motor.speed
|
||||
|
||||
.. automethod:: pybricks.ev3devices.Motor.load
|
||||
|
||||
.. automethod:: pybricks.ev3devices.Motor.stalled
|
||||
|
||||
.. rubric:: Stopping
|
||||
|
||||
.. automethod:: pybricks.ev3devices.Motor.stop
|
||||
|
||||
.. automethod:: pybricks.ev3devices.Motor.brake
|
||||
|
||||
.. automethod:: pybricks.ev3devices.Motor.hold
|
||||
|
||||
.. rubric:: Running forever
|
||||
|
||||
.. automethod:: pybricks.ev3devices.Motor.run
|
||||
|
||||
.. automethod:: pybricks.ev3devices.Motor.dc
|
||||
|
||||
.. rubric:: Running by a fixed amount
|
||||
|
||||
.. automethod:: pybricks.ev3devices.Motor.run_time
|
||||
|
||||
.. automethod:: pybricks.ev3devices.Motor.run_angle
|
||||
|
||||
.. automethod:: pybricks.ev3devices.Motor.run_target
|
||||
|
||||
.. automethod:: pybricks.ev3devices.Motor.track_target
|
||||
|
||||
.. automethod:: pybricks.ev3devices.Motor.run_until_stalled
|
||||
|
||||
.. automethod:: pybricks.ev3devices.Motor.done
|
||||
|
||||
.. rubric:: Motor settings
|
||||
|
||||
.. automethod:: pybricks.ev3devices.Motor.settings
|
||||
|
||||
.. rubric:: Control settings
|
||||
|
||||
.. automethod:: pybricks.ev3devices.Motor.control.limits
|
||||
|
||||
.. automethod:: pybricks.ev3devices.Motor.control.pid
|
||||
|
||||
.. automethod:: pybricks.ev3devices.Motor.control.target_tolerances
|
||||
|
||||
.. automethod:: pybricks.ev3devices.Motor.control.stall_tolerances
|
||||
|
||||
.. attribute:: control.scale
|
||||
|
||||
Number of degrees that the motor turns to complete one degree at the
|
||||
output of the gear train. This is the gear ratio determined from the
|
||||
``gears`` argument when initializing the motor.
|
||||
|
||||
Touch Sensor
|
||||
^^^^^^^^^^^^
|
||||
|
||||
.. figure:: ../main/cad/output/ev3device-touch.png
|
||||
:width: 18 %
|
||||
|
||||
.. autoclass:: pybricks.ev3devices.TouchSensor
|
||||
|
||||
Color Sensor
|
||||
^^^^^^^^^^^^
|
||||
|
||||
.. figure:: ../main/cad/output/ev3device-color.png
|
||||
:width: 18 %
|
||||
|
||||
.. autoclass:: pybricks.ev3devices.ColorSensor
|
||||
|
||||
Infrared Sensor and Beacon
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Each method of this class puts the sensor in a different *mode*. Switching
|
||||
modes takes about one second on this sensor. To make sure that your program
|
||||
runs quickly, use only of these methods in your program.
|
||||
|
||||
.. figure:: ../main/cad/output/ev3device-infrared.png
|
||||
:width: 60 %
|
||||
|
||||
.. autoclass:: pybricks.ev3devices.InfraredSensor
|
||||
|
||||
Ultrasonic Sensor
|
||||
^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. figure:: ../main/cad/output/ev3device-ultrasonic.png
|
||||
:width: 22 %
|
||||
|
||||
.. autoclass:: pybricks.ev3devices.UltrasonicSensor
|
||||
|
||||
Gyroscopic Sensor
|
||||
^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. figure:: ../main/cad/output/ev3device-gyro.png
|
||||
:width: 18 %
|
||||
|
||||
.. autoclass:: pybricks.ev3devices.GyroSensor
|
||||
:no-members:
|
||||
|
||||
.. automethod:: pybricks.ev3devices.GyroSensor.speed
|
||||
|
||||
.. automethod:: pybricks.ev3devices.GyroSensor.angle
|
||||
|
||||
If you use the :meth:`.angle` method, you cannot use the
|
||||
:meth:`.speed` method in the same program. Doing so would reset the
|
||||
sensor angle to zero every time you read the speed.
|
||||
|
||||
.. automethod:: pybricks.ev3devices.GyroSensor.reset_angle
|
||||
@@ -0,0 +1,9 @@
|
||||
.. pybricks-requirements:: ev3devices
|
||||
|
||||
Color Sensor
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. figure:: ../../main/cad/output/ev3device-color.png
|
||||
:width: 18 %
|
||||
|
||||
.. autoclass:: pybricks.ev3devices.ColorSensor
|
||||
@@ -0,0 +1,16 @@
|
||||
.. pybricks-requirements:: ev3devices
|
||||
|
||||
Gyroscopic Sensor
|
||||
^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. figure:: ../../main/cad/output/ev3device-gyro.png
|
||||
:width: 18 %
|
||||
|
||||
.. autoclass:: pybricks.ev3devices.GyroSensor
|
||||
:no-members:
|
||||
|
||||
.. automethod:: pybricks.ev3devices.GyroSensor.speed
|
||||
|
||||
.. automethod:: pybricks.ev3devices.GyroSensor.angle
|
||||
|
||||
.. automethod:: pybricks.ev3devices.GyroSensor.reset_angle
|
||||
@@ -0,0 +1,54 @@
|
||||
.. pybricks-requirements:: ev3devices
|
||||
|
||||
:mod:`ev3devices <pybricks.ev3devices>` -- EV3 motors and sensors
|
||||
=================================================================
|
||||
|
||||
.. automodule:: pybricks.ev3devices
|
||||
:no-members:
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
:hidden:
|
||||
|
||||
motor
|
||||
touchsensor
|
||||
colorsensor
|
||||
infraredsensor
|
||||
ultrasonicsensor
|
||||
gyrosensor
|
||||
|
||||
.. pybricks-classlink:: Motor ../ev3devices/motor
|
||||
|
||||
.. figure:: ../../main/cad/output/ev3device-motors.png
|
||||
:width: 100 %
|
||||
:target: ../ev3devices/motor.html
|
||||
|
||||
.. pybricks-classlink:: TouchSensor
|
||||
|
||||
.. figure:: ../../main/cad/output/ev3device-touch.png
|
||||
:width: 18 %
|
||||
:target: touchsensor.html
|
||||
|
||||
.. pybricks-classlink:: ColorSensor
|
||||
|
||||
.. figure:: ../../main/cad/output/ev3device-color.png
|
||||
:width: 18 %
|
||||
:target: colorsensor.html
|
||||
|
||||
.. pybricks-classlink:: InfraredSensor
|
||||
|
||||
.. figure:: ../../main/cad/output/ev3device-infrared.png
|
||||
:width: 60 %
|
||||
:target: infraredsensor.html
|
||||
|
||||
.. pybricks-classlink:: UltrasonicSensor
|
||||
|
||||
.. figure:: ../../main/cad/output/ev3device-ultrasonic.png
|
||||
:width: 22 %
|
||||
:target: ultrasonicsensor.html
|
||||
|
||||
.. pybricks-classlink:: GyroSensor
|
||||
|
||||
.. figure:: ../../main/cad/output/ev3device-gyro.png
|
||||
:width: 18 %
|
||||
:target: gyrosensor.html
|
||||
@@ -0,0 +1,13 @@
|
||||
.. pybricks-requirements:: ev3devices
|
||||
|
||||
Infrared Sensor and Beacon
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Each method of this class puts the sensor in a different *mode*. Switching
|
||||
modes takes about one second on this sensor. To make sure that your program
|
||||
runs quickly, use only one of these methods in your program.
|
||||
|
||||
.. figure:: ../../main/cad/output/ev3device-infrared.png
|
||||
:width: 60 %
|
||||
|
||||
.. autoclass:: pybricks.ev3devices.InfraredSensor
|
||||
@@ -0,0 +1,21 @@
|
||||
.. pybricks-requirements:: ev3devices
|
||||
|
||||
Motors with rotation sensors
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. _fig_ev3motors:
|
||||
|
||||
.. figure:: ../../main/diagrams/ev3motors.png
|
||||
:width: 100 %
|
||||
:alt: ev3motors
|
||||
|
||||
EV3 and NXT motors with rotation sensors. The arrows indicate the default
|
||||
positive direction.
|
||||
|
||||
.. blockimg:: pybricks_variables_set_motor
|
||||
|
||||
.. autoclass:: pybricks.ev3devices.Motor
|
||||
:no-members:
|
||||
:no-index:
|
||||
|
||||
.. include:: ../common/motor_members.rst.txt
|
||||
@@ -0,0 +1,9 @@
|
||||
.. pybricks-requirements:: ev3devices
|
||||
|
||||
Touch Sensor
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. figure:: ../../main/cad/output/ev3device-touch.png
|
||||
:width: 18 %
|
||||
|
||||
.. autoclass:: pybricks.ev3devices.TouchSensor
|
||||
@@ -0,0 +1,9 @@
|
||||
.. pybricks-requirements:: ev3devices
|
||||
|
||||
Ultrasonic Sensor
|
||||
^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. figure:: ../../main/cad/output/ev3device-ultrasonic.png
|
||||
:width: 22 %
|
||||
|
||||
.. autoclass:: pybricks.ev3devices.UltrasonicSensor
|
||||
@@ -7,8 +7,6 @@ City Hub
|
||||
|
||||
.. blockimg:: pybricks_variables_set_city_hub_option0
|
||||
|
||||
.. blockimg:: pybricks_variables_set_city_hub_option3
|
||||
|
||||
.. autoclass:: pybricks.hubs.CityHub
|
||||
:no-members:
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ Essential Hub
|
||||
|
||||
.. blockimg:: pybricks_variables_set_essential_hub_option0
|
||||
|
||||
.. blockimg:: pybricks_variables_set_essential_hub_option4
|
||||
.. blockimg:: pybricks_variables_set_essential_hub_option1
|
||||
|
||||
.. autoclass:: pybricks.hubs.EssentialHub
|
||||
:no-members:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
MINDSTORMS EV3 Brick
|
||||
EV3 Brick
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. figure:: ../../main/cad/output/ev3device-ev3.png
|
||||
@@ -17,20 +17,18 @@ MINDSTORMS EV3 Brick
|
||||
|
||||
.. automethod:: pybricks.hubs::EV3Brick.light.off
|
||||
|
||||
.. automethod:: pybricks.hubs::EV3Brick.light.blink
|
||||
|
||||
.. automethod:: pybricks.hubs::EV3Brick.light.animate
|
||||
|
||||
.. rubric:: Using the speaker
|
||||
|
||||
.. automethod:: pybricks.hubs::EV3Brick.speaker.volume
|
||||
|
||||
.. automethod:: pybricks.hubs::EV3Brick.speaker.beep
|
||||
|
||||
.. automethod:: pybricks.hubs::EV3Brick.speaker.play_notes
|
||||
|
||||
.. automethod:: pybricks.hubs::EV3Brick.speaker.play_file
|
||||
|
||||
.. automethod:: pybricks.hubs::EV3Brick.speaker.say
|
||||
|
||||
.. automethod:: pybricks.hubs::EV3Brick.speaker.set_speech_options
|
||||
|
||||
.. automethod:: pybricks.hubs::EV3Brick.speaker.set_volume
|
||||
|
||||
.. rubric:: Using the screen
|
||||
|
||||
.. |this image| replace:: the screen
|
||||
@@ -60,10 +58,10 @@ MINDSTORMS EV3 Brick
|
||||
.. automethod:: pybricks.hubs::EV3Brick.screen.draw_circle
|
||||
|
||||
.. autoattribute:: pybricks.hubs::EV3Brick.screen.width
|
||||
:annotation: = 178
|
||||
|
||||
.. autoattribute:: pybricks.hubs::EV3Brick.screen.height
|
||||
|
||||
.. automethod:: pybricks.hubs::EV3Brick.screen.save
|
||||
:annotation: = 128
|
||||
|
||||
.. rubric:: Using the battery
|
||||
|
||||
@@ -83,122 +81,8 @@ Turn the light on and change the color
|
||||
Screen examples
|
||||
---------------------
|
||||
|
||||
Show an image on the screen
|
||||
***************************
|
||||
|
||||
.. literalinclude::
|
||||
../../../examples/ev3/screen_image/main.py
|
||||
|
||||
Drawing shapes on the screen
|
||||
****************************
|
||||
|
||||
.. literalinclude::
|
||||
../../../examples/ev3/screen_draw/main.py
|
||||
|
||||
Using different fonts
|
||||
*********************
|
||||
|
||||
.. raw:: latex
|
||||
|
||||
\begin{CJK}{UTF8}{gbsn}
|
||||
|
||||
.. literalinclude::
|
||||
../../../examples/ev3/screen_print/main.py
|
||||
|
||||
.. raw:: latex
|
||||
|
||||
\end{CJK}
|
||||
|
||||
.. rubric:: Available languages and voices for speech
|
||||
|
||||
.. [#espeak_lang]
|
||||
|
||||
You can choose the following languages:
|
||||
|
||||
- ``'af'``: Afrikaans
|
||||
- ``'an'``: Aragonese
|
||||
- ``'bg'``: Bulgarian
|
||||
- ``'bs'``: Bosnian
|
||||
- ``'ca'``: Catalan
|
||||
- ``'cs'``: Czech
|
||||
- ``'cy'``: Welsh
|
||||
- ``'da'``: Danish
|
||||
- ``'de'``: German
|
||||
- ``'el'``: Greek
|
||||
- ``'en'``: English (default)
|
||||
- ``'en-gb'``: English (United Kingdom)
|
||||
- ``'en-sc'``: English (Scotland)
|
||||
- ``'en-uk-north'``: English (United Kingdom, Northern)
|
||||
- ``'en-uk-rp'``: English (United Kingdom, Received Pronunciation)
|
||||
- ``'en-uk-wmids'``: English (United Kingdom, West Midlands)
|
||||
- ``'en-us'``: English (United States)
|
||||
- ``'en-wi'``: English (West Indies)
|
||||
- ``'eo'``: Esperanto
|
||||
- ``'es'``: Spanish
|
||||
- ``'es-la'``: Spanish (Latin America)
|
||||
- ``'et'``: Estonian
|
||||
- ``'fa'``: Persian
|
||||
- ``'fa-pin'``: Persian
|
||||
- ``'fi'``: Finnish
|
||||
- ``'fr-be'``: French (Belgium)
|
||||
- ``'fr-fr'``: French (France)
|
||||
- ``'ga'``: Irish
|
||||
- ``'grc'``: Greek
|
||||
- ``'hi'``: Hindi
|
||||
- ``'hr'``: Croatian
|
||||
- ``'hu'``: Hungarian
|
||||
- ``'hy'``: Armenian
|
||||
- ``'hy-west'``: Armenian (Western)
|
||||
- ``'id'``: Indonesian
|
||||
- ``'is'``: Icelandic
|
||||
- ``'it'``: Italian
|
||||
- ``'jbo'``: Lojban
|
||||
- ``'ka'``: Georgian
|
||||
- ``'kn'``: Kannada
|
||||
- ``'ku'``: Kurdish
|
||||
- ``'la'``: Latin
|
||||
- ``'lfn'``: Lingua Franca Nova
|
||||
- ``'lt'``: Lithuanian
|
||||
- ``'lv'``: Latvian
|
||||
- ``'mk'``: Macedonian
|
||||
- ``'ml'``: Malayalam
|
||||
- ``'ms'``: Malay
|
||||
- ``'ne'``: Nepali
|
||||
- ``'nl'``: Dutch
|
||||
- ``'no'``: Norwegian
|
||||
- ``'pa'``: Punjabi
|
||||
- ``'pl'``: Polish
|
||||
- ``'pt-br'``: Portuguese (Brazil)
|
||||
- ``'pt-pt'``: Portuguese (Portugal)
|
||||
- ``'ro'``: Romanian
|
||||
- ``'ru'``: Russian
|
||||
- ``'sk'``: Slovak
|
||||
- ``'sq'``: Albanian
|
||||
- ``'sr'``: Serbian
|
||||
- ``'sv'``: Swedish
|
||||
- ``'sw'``: Swahili
|
||||
- ``'ta'``: Tamil
|
||||
- ``'tr'``: Turkish
|
||||
- ``'vi'``: Vietnamese
|
||||
- ``'vi-hue'``: Vietnamese (Hue)
|
||||
- ``'vi-sgn'``: Vietnamese (Saigon)
|
||||
- ``'zh'``: Mandarin Chinese
|
||||
- ``'zh-yue'``: Cantonese Chinese
|
||||
|
||||
You can choose the following voices:
|
||||
|
||||
- ``'f1'``: female variant 1
|
||||
- ``'f2'``: female variant 2
|
||||
- ``'f3'``: female variant 3
|
||||
- ``'f4'``: female variant 4
|
||||
- ``'f5'``: female variant 5
|
||||
- ``'m1'``: male variant 1
|
||||
- ``'m2'``: male variant 2
|
||||
- ``'m3'``: male variant 3
|
||||
- ``'m4'``: male variant 4
|
||||
- ``'m5'``: male variant 5
|
||||
- ``'m6'``: male variant 6
|
||||
- ``'m7'``: male variant 7
|
||||
- ``'croak'``: croak
|
||||
- ``'whisper'``: whisper
|
||||
- ``'whisperf'``: female whisper
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
technichub
|
||||
primehub
|
||||
essentialhub
|
||||
ev3brick
|
||||
|
||||
.. pybricks-classlink:: MoveHub
|
||||
|
||||
@@ -50,3 +51,11 @@
|
||||
.. figure:: ../../main/cad/output/hub-essential.png
|
||||
:width: 25%
|
||||
:target: essentialhub.html
|
||||
|
||||
.. pybricks-classlink:: EV3Brick
|
||||
|
||||
.. figure:: ../../main/cad/output/ev3device-ev3.png
|
||||
:width: 25%
|
||||
:target: ev3brick.html
|
||||
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ Move Hub
|
||||
|
||||
.. blockimg:: pybricks_variables_set_move_hub_option0
|
||||
|
||||
.. blockimg:: pybricks_variables_set_move_hub_option4
|
||||
.. blockimg:: pybricks_variables_set_move_hub_option1
|
||||
|
||||
.. autoclass:: pybricks.hubs.MoveHub
|
||||
:no-members:
|
||||
|
||||
@@ -8,7 +8,9 @@ Prime Hub / Inventor Hub
|
||||
|
||||
.. blockimg:: pybricks_variables_set_inventor_hub_option0
|
||||
|
||||
.. blockimg:: pybricks_variables_set_inventor_hub_option4
|
||||
.. blockimg:: pybricks_variables_set_inventor_hub_option1
|
||||
|
||||
.. currentmodule:: pybricks.hubs
|
||||
|
||||
.. class:: InventorHub
|
||||
|
||||
@@ -19,7 +21,7 @@ Prime Hub / Inventor Hub
|
||||
|
||||
.. blockimg:: pybricks_variables_set_prime_hub_option0
|
||||
|
||||
.. blockimg:: pybricks_variables_set_prime_hub_option4
|
||||
.. blockimg:: pybricks_variables_set_prime_hub_option1
|
||||
|
||||
.. autoclass:: pybricks.hubs.PrimeHub
|
||||
:no-members:
|
||||
|
||||
@@ -8,7 +8,7 @@ Technic Hub
|
||||
|
||||
.. blockimg:: pybricks_variables_set_technic_hub_option0
|
||||
|
||||
.. blockimg:: pybricks_variables_set_technic_hub_option4
|
||||
.. blockimg:: pybricks_variables_set_technic_hub_option1
|
||||
|
||||
.. autoclass:: pybricks.hubs.TechnicHub
|
||||
:no-members:
|
||||
|
||||
@@ -1,19 +1,24 @@
|
||||
Pybricks Documentation
|
||||
Pybricks Reference Manual
|
||||
==================================================================
|
||||
|
||||
`Pybricks <https://pybricks.com/>`_ is Python coding for smart LEGO® hubs.
|
||||
Run MicroPython scripts
|
||||
directly on the hub, and get full control of your motors and sensors.
|
||||
.. only:: ide
|
||||
|
||||
Pybricks runs on LEGO® BOOST, City, Technic, MINDSTORMS®, and SPIKE®. You
|
||||
can code using Windows, Mac, Linux, Chromebook, and Android.
|
||||
This documentation details all available functions and classes in Pybricks.
|
||||
For example, you can find the meaning of specific function parameters like
|
||||
motor speed.
|
||||
|
||||
Click on any device below to see its documentation. Use the menu on the left
|
||||
to find documentation for additional modules. You may need to click the ☰ icon
|
||||
above to reveal this menu.
|
||||
If you are new to Pybricks, we recommend starting with the `Pybricks learn`_
|
||||
guide instead.
|
||||
|
||||
.. only:: main
|
||||
|
||||
`Pybricks <https://pybricks.com/>`_ is Python coding for smart LEGO® hubs.
|
||||
Run MicroPython scripts
|
||||
directly on the hub, and get full control of your motors and sensors.
|
||||
|
||||
Pybricks runs on LEGO® BOOST, City, Technic, MINDSTORMS®, and SPIKE®. You
|
||||
can code using Windows, Mac, Linux, Chromebook, and Android.
|
||||
|
||||
.. note:: You are viewing the stand-alone version of the documentation. To
|
||||
learn more about Pybricks and to start coding, visit
|
||||
the `Pybricks website`_
|
||||
@@ -21,8 +26,13 @@ above to reveal this menu.
|
||||
.. note:: Are you using LEGO MINDSTORMS EV3? Check out the
|
||||
`EV3 documentation`_ instead.
|
||||
|
||||
Click on any device below to see its documentation. Use the menu on the left
|
||||
to find documentation for additional modules. You may need to click the ☰ icon
|
||||
above to reveal this menu.
|
||||
|
||||
.. _EV3 documentation: https://pybricks.com/ev3-micropython/
|
||||
.. _Pybricks website: https://pybricks.com/
|
||||
.. _Pybricks learn: https://pybricks.com/learn/
|
||||
|
||||
.. rubric:: Programmable hubs
|
||||
|
||||
@@ -44,6 +54,12 @@ above to reveal this menu.
|
||||
:width: 70 %
|
||||
:target: pupdevices/dcmotor.html
|
||||
|
||||
.. rubric:: EV3 motors and sensors
|
||||
|
||||
.. figure:: ../main/cad/output/ev3device-all.png
|
||||
:width: 100 %
|
||||
:target: ev3devices/index.html
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
:caption: Table of contents
|
||||
@@ -56,6 +72,8 @@ above to reveal this menu.
|
||||
|
||||
hubs/index
|
||||
pupdevices/index
|
||||
ev3devices/index
|
||||
nxtdevices/index
|
||||
iodevices/index
|
||||
parameters/index
|
||||
tools/index
|
||||
@@ -63,13 +81,6 @@ above to reveal this menu.
|
||||
messaging/index
|
||||
signaltypes
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
:caption: Code with blocks
|
||||
:hidden:
|
||||
|
||||
blocks/index
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
:caption: MicroPython modules
|
||||
|
||||
@@ -14,14 +14,12 @@ automatically detect the motor and use the correct and safe settings.
|
||||
:width: 40 %
|
||||
|
||||
.. autoclass:: pybricks.iodevices.DCMotor
|
||||
:noindex:
|
||||
:no-members:
|
||||
|
||||
.. automethod:: pybricks.iodevices.DCMotor.dc
|
||||
:noindex:
|
||||
|
||||
.. automethod:: pybricks.iodevices.DCMotor.brake
|
||||
:noindex:
|
||||
|
||||
.. automethod:: pybricks.iodevices.DCMotor.stop
|
||||
:noindex:
|
||||
|
||||
.. automethod:: pybricks.iodevices.DCMotor.settings
|
||||
|
||||
@@ -41,7 +41,7 @@ LEGO protocol devices
|
||||
:width: 80 %
|
||||
:target: lwp3device.html
|
||||
|
||||
.. pybricks-requirements:: ev3 pybricks-iodevices
|
||||
.. pybricks-requirements:: pybricks-iodevices
|
||||
|
||||
.. pybricks-classlink:: LUMPDevice
|
||||
|
||||
@@ -83,7 +83,7 @@ Generic protocols
|
||||
|
||||
|uart-wired| |uart-wireless|
|
||||
|
||||
.. pybricks-requirements:: ev3 pybricks-iodevices
|
||||
.. pybricks-requirements:: pybricks-iodevices
|
||||
|
||||
.. pybricks-classlink:: I2CDevice
|
||||
|
||||
@@ -91,7 +91,7 @@ Generic protocols
|
||||
:width: 20 %
|
||||
:target: i2cdevice.html
|
||||
|
||||
.. pybricks-requirements:: ev3 pybricks-iodevices
|
||||
.. pybricks-requirements:: pybricks-iodevices
|
||||
|
||||
.. pybricks-classlink:: AnalogSensor
|
||||
|
||||
@@ -99,7 +99,7 @@ Generic protocols
|
||||
:width: 20 %
|
||||
:target: analogsensor.html
|
||||
|
||||
.. pybricks-requirements:: ev3 pybricks-iodevices
|
||||
.. pybricks-requirements:: pybricks-iodevices
|
||||
|
||||
.. pybricks-classlink:: DCMotor
|
||||
|
||||
|
||||
@@ -4,24 +4,42 @@
|
||||
.. automodule:: pybricks.messaging
|
||||
:no-members:
|
||||
|
||||
.. pybricks-requirements:: pup
|
||||
.. pybricks-requirements:: ble
|
||||
|
||||
.. blockimg:: pybricks_variables_set_ble_radio
|
||||
|
||||
.. autoclass:: pybricks.messaging.BLERadio
|
||||
:no-members:
|
||||
|
||||
.. blockimg:: pybricks_blockBleBroadcast2
|
||||
|
||||
.. automethod:: pybricks.messaging.BLERadio.broadcast
|
||||
|
||||
.. blockimg:: pybricks_blockBleObserve2
|
||||
|
||||
.. automethod:: pybricks.messaging.BLERadio.observe
|
||||
|
||||
.. automethod:: pybricks.messaging.BLERadio.signal_strength
|
||||
|
||||
.. automethod:: pybricks.messaging.BLERadio.version
|
||||
|
||||
.. blockimg:: pybricks_variables_set_app_data_app_data_color_tracker
|
||||
|
||||
.. blockimg:: pybricks_variables_set_app_data_app_data_teachable_machine
|
||||
|
||||
.. blockimg:: pybricks_variables_set_app_data_app_data_object_detection
|
||||
|
||||
.. blockimg:: pybricks_variables_set_app_data_app_data_line_follower
|
||||
|
||||
.. blockimg:: pybricks_variables_set_app_data_app_data_custom
|
||||
|
||||
.. autoclass:: pybricks.messaging.AppData
|
||||
:no-members:
|
||||
|
||||
.. automethod:: pybricks.messaging.AppData.get_bytes
|
||||
|
||||
.. blockimg:: pybricks_blockAppDataGetValues
|
||||
|
||||
.. automethod:: pybricks.messaging.AppData.write_bytes
|
||||
|
||||
.. automethod:: pybricks.messaging.AppData.configure
|
||||
|
||||
@@ -54,7 +54,6 @@ This section lists all available exceptions in alphabetical order.
|
||||
.. _OSError:
|
||||
|
||||
.. autoclass:: ubuiltins.OSError
|
||||
:noindex:
|
||||
|
||||
.. autoclass:: ubuiltins.OverflowError
|
||||
:no-members:
|
||||
|
||||
@@ -1,101 +0,0 @@
|
||||
:mod:`nxtdevices <pybricks.nxtdevices>` -- NXT devices
|
||||
======================================================
|
||||
|
||||
.. automodule:: pybricks.nxtdevices
|
||||
:no-members:
|
||||
|
||||
NXT Motor
|
||||
^^^^^^^^^^^^^^^^
|
||||
This motor works just like a LEGO MINDSTORMS EV3 Large Motor. You can use it in
|
||||
your programs using the :mod:`Motor <.ev3devices>` class.
|
||||
|
||||
NXT Touch Sensor
|
||||
^^^^^^^^^^^^^^^^
|
||||
|
||||
.. figure:: ../main/cad/output/nxtdevice-touch.png
|
||||
:width: 18 %
|
||||
|
||||
.. autoclass:: pybricks.nxtdevices.TouchSensor
|
||||
:no-members:
|
||||
|
||||
.. automethod:: pybricks.nxtdevices.TouchSensor.pressed
|
||||
|
||||
NXT Light Sensor
|
||||
^^^^^^^^^^^^^^^^
|
||||
|
||||
.. figure:: ../main/cad/output/nxtdevice-light.png
|
||||
:width: 18 %
|
||||
|
||||
.. autoclass:: pybricks.nxtdevices.LightSensor
|
||||
|
||||
NXT Color Sensor
|
||||
^^^^^^^^^^^^^^^^
|
||||
|
||||
.. figure:: ../main/cad/output/nxtdevice-color.png
|
||||
:width: 18 %
|
||||
|
||||
.. autoclass:: pybricks.nxtdevices.ColorSensor
|
||||
:no-members:
|
||||
|
||||
.. automethod:: pybricks.nxtdevices.ColorSensor.color
|
||||
|
||||
.. automethod:: pybricks.nxtdevices.ColorSensor.ambient
|
||||
|
||||
.. automethod:: pybricks.nxtdevices.ColorSensor.reflection
|
||||
|
||||
.. automethod:: pybricks.nxtdevices.ColorSensor.rgb
|
||||
|
||||
.. rubric:: Advanced color sensing
|
||||
|
||||
.. automethod:: pybricks.nxtdevices.ColorSensor.hsv
|
||||
|
||||
.. automethod:: pybricks.nxtdevices.ColorSensor.detectable_colors
|
||||
|
||||
.. rubric:: Built-in light
|
||||
|
||||
This sensor has a built-in light. You can make it red, green, blue, or turn
|
||||
it off.
|
||||
|
||||
.. automethod:: pybricks.nxtdevices::ColorSensor.light.on
|
||||
|
||||
.. automethod:: pybricks.nxtdevices::ColorSensor.light.off
|
||||
|
||||
NXT Ultrasonic Sensor
|
||||
^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. figure:: ../main/cad/output/nxtdevice-ultrasonic.png
|
||||
:width: 24 %
|
||||
|
||||
.. autoclass:: pybricks.nxtdevices.UltrasonicSensor
|
||||
|
||||
NXT Sound Sensor
|
||||
^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. figure:: ../main/cad/output/nxtdevice-sound.png
|
||||
:width: 18 %
|
||||
|
||||
.. autoclass:: pybricks.nxtdevices.SoundSensor
|
||||
|
||||
NXT Temperature Sensor
|
||||
^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. figure:: ../main/cad/output/nxtdevice-temperature.png
|
||||
:width: 32 %
|
||||
|
||||
.. autoclass:: pybricks.nxtdevices.TemperatureSensor
|
||||
|
||||
NXT Energy Meter
|
||||
^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. figure:: ../main/cad/output/nxtdevice-energy.png
|
||||
:width: 30 %
|
||||
|
||||
.. autoclass:: pybricks.nxtdevices.EnergyMeter
|
||||
|
||||
Vernier Adapter
|
||||
^^^^^^^^^^^^^^^^^
|
||||
.. autoclass:: pybricks.nxtdevices.VernierAdapter
|
||||
|
||||
**Example: Using the Surface Temperature Sensor.**
|
||||
|
||||
.. literalinclude:: ../../examples/ev3/vernier_surface_temperature/main.py
|
||||
@@ -0,0 +1,33 @@
|
||||
.. pybricks-requirements:: nxtdevices
|
||||
|
||||
NXT Color Sensor
|
||||
^^^^^^^^^^^^^^^^
|
||||
|
||||
.. figure:: ../../main/cad/output/nxtdevice-color.png
|
||||
:width: 18 %
|
||||
|
||||
.. autoclass:: pybricks.nxtdevices.ColorSensor
|
||||
:no-members:
|
||||
|
||||
.. automethod:: pybricks.nxtdevices.ColorSensor.color
|
||||
|
||||
.. automethod:: pybricks.nxtdevices.ColorSensor.ambient
|
||||
|
||||
.. automethod:: pybricks.nxtdevices.ColorSensor.reflection
|
||||
|
||||
.. automethod:: pybricks.nxtdevices.ColorSensor.rgb
|
||||
|
||||
.. rubric:: Advanced color sensing
|
||||
|
||||
.. automethod:: pybricks.nxtdevices.ColorSensor.hsv
|
||||
|
||||
.. automethod:: pybricks.nxtdevices.ColorSensor.detectable_colors
|
||||
|
||||
.. rubric:: Built-in light
|
||||
|
||||
This sensor has a built-in light. You can make it red, green, blue, or turn
|
||||
it off.
|
||||
|
||||
.. automethod:: pybricks.nxtdevices::ColorSensor.light.on
|
||||
|
||||
.. automethod:: pybricks.nxtdevices::ColorSensor.light.off
|
||||
@@ -0,0 +1,9 @@
|
||||
.. pybricks-requirements:: nxtdevices
|
||||
|
||||
NXT Energy Meter
|
||||
^^^^^^^^^^^^^^^^
|
||||
|
||||
.. figure:: ../../main/cad/output/nxtdevice-energy.png
|
||||
:width: 30 %
|
||||
|
||||
.. autoclass:: pybricks.nxtdevices.EnergyMeter
|
||||
@@ -0,0 +1,71 @@
|
||||
.. pybricks-requirements:: nxtdevices
|
||||
|
||||
:mod:`nxtdevices <pybricks.nxtdevices>` -- NXT motors and sensors
|
||||
=================================================================
|
||||
|
||||
.. automodule:: pybricks.nxtdevices
|
||||
:no-members:
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
:hidden:
|
||||
|
||||
motor
|
||||
touchsensor
|
||||
lightsensor
|
||||
colorsensor
|
||||
ultrasonicsensor
|
||||
soundsensor
|
||||
temperaturesensor
|
||||
energymeter
|
||||
vernieradapter
|
||||
|
||||
.. pybricks-classlink:: Motor ../nxtdevices/motor
|
||||
|
||||
.. figure:: ../../main/cad/output/ev3device-motors.png
|
||||
:width: 100 %
|
||||
:target: ../nxtdevices/motor.html
|
||||
|
||||
.. pybricks-classlink:: TouchSensor
|
||||
|
||||
.. figure:: ../../main/cad/output/nxtdevice-touch.png
|
||||
:width: 18 %
|
||||
:target: touchsensor.html
|
||||
|
||||
.. pybricks-classlink:: LightSensor
|
||||
|
||||
.. figure:: ../../main/cad/output/nxtdevice-light.png
|
||||
:width: 18 %
|
||||
:target: lightsensor.html
|
||||
|
||||
.. pybricks-classlink:: ColorSensor
|
||||
|
||||
.. figure:: ../../main/cad/output/nxtdevice-color.png
|
||||
:width: 18 %
|
||||
:target: colorsensor.html
|
||||
|
||||
.. pybricks-classlink:: UltrasonicSensor
|
||||
|
||||
.. figure:: ../../main/cad/output/nxtdevice-ultrasonic.png
|
||||
:width: 24 %
|
||||
:target: ultrasonicsensor.html
|
||||
|
||||
.. pybricks-classlink:: SoundSensor
|
||||
|
||||
.. figure:: ../../main/cad/output/nxtdevice-sound.png
|
||||
:width: 18 %
|
||||
:target: soundsensor.html
|
||||
|
||||
.. pybricks-classlink:: TemperatureSensor
|
||||
|
||||
.. figure:: ../../main/cad/output/nxtdevice-temperature.png
|
||||
:width: 32 %
|
||||
:target: temperaturesensor.html
|
||||
|
||||
.. pybricks-classlink:: EnergyMeter
|
||||
|
||||
.. figure:: ../../main/cad/output/nxtdevice-energy.png
|
||||
:width: 30 %
|
||||
:target: energymeter.html
|
||||
|
||||
.. pybricks-classlink:: VernierAdapter
|
||||
@@ -0,0 +1,9 @@
|
||||
.. pybricks-requirements:: nxtdevices
|
||||
|
||||
NXT Light Sensor
|
||||
^^^^^^^^^^^^^^^^
|
||||
|
||||
.. figure:: ../../main/cad/output/nxtdevice-light.png
|
||||
:width: 18 %
|
||||
|
||||
.. autoclass:: pybricks.nxtdevices.LightSensor
|
||||
@@ -0,0 +1,21 @@
|
||||
.. pybricks-requirements:: ev3devices nxtdevices
|
||||
|
||||
Motors with rotation sensors
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. _fig_nxtmotors:
|
||||
|
||||
.. figure:: ../../main/diagrams/ev3motors.png
|
||||
:width: 100 %
|
||||
:alt: ev3motors
|
||||
|
||||
EV3 and NXT motors with rotation sensors. The arrows indicate the default
|
||||
positive direction.
|
||||
|
||||
.. blockimg:: pybricks_variables_set_motor
|
||||
|
||||
.. autoclass:: pybricks.nxtdevices.Motor
|
||||
:no-members:
|
||||
:no-index:
|
||||
|
||||
.. include:: ../common/motor_members.rst.txt
|
||||
@@ -0,0 +1,9 @@
|
||||
.. pybricks-requirements:: nxtdevices
|
||||
|
||||
NXT Sound Sensor
|
||||
^^^^^^^^^^^^^^^^
|
||||
|
||||
.. figure:: ../../main/cad/output/nxtdevice-sound.png
|
||||
:width: 18 %
|
||||
|
||||
.. autoclass:: pybricks.nxtdevices.SoundSensor
|
||||
@@ -0,0 +1,9 @@
|
||||
.. pybricks-requirements:: nxtdevices
|
||||
|
||||
NXT Temperature Sensor
|
||||
^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. figure:: ../../main/cad/output/nxtdevice-temperature.png
|
||||
:width: 32 %
|
||||
|
||||
.. autoclass:: pybricks.nxtdevices.TemperatureSensor
|
||||
@@ -0,0 +1,12 @@
|
||||
.. pybricks-requirements:: nxtdevices
|
||||
|
||||
NXT Touch Sensor
|
||||
^^^^^^^^^^^^^^^^
|
||||
|
||||
.. figure:: ../../main/cad/output/nxtdevice-touch.png
|
||||
:width: 18 %
|
||||
|
||||
.. autoclass:: pybricks.nxtdevices.TouchSensor
|
||||
:no-members:
|
||||
|
||||
.. automethod:: pybricks.nxtdevices.TouchSensor.pressed
|
||||
@@ -0,0 +1,9 @@
|
||||
.. pybricks-requirements:: nxtdevices
|
||||
|
||||
NXT Ultrasonic Sensor
|
||||
^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. figure:: ../../main/cad/output/nxtdevice-ultrasonic.png
|
||||
:width: 24 %
|
||||
|
||||
.. autoclass:: pybricks.nxtdevices.UltrasonicSensor
|
||||
@@ -0,0 +1,15 @@
|
||||
.. pybricks-requirements:: nxtdevices
|
||||
|
||||
Vernier Adapter
|
||||
^^^^^^^^^^^^^^^
|
||||
|
||||
.. autoclass:: pybricks.nxtdevices.VernierAdapter
|
||||
|
||||
Examples
|
||||
-------------------
|
||||
|
||||
Using the Surface Temperature Sensor
|
||||
************************************
|
||||
|
||||
.. literalinclude::
|
||||
../../../examples/ev3/vernier_surface_temperature/main.py
|
||||
@@ -6,5 +6,14 @@ Axis
|
||||
.. autoclass:: pybricks.parameters.Axis
|
||||
:no-members:
|
||||
|
||||
.. autoattribute:: pybricks.parameters.Axis.X
|
||||
:annotation: = vector(1, 0, 0)
|
||||
|
||||
.. autoattribute:: pybricks.parameters.Axis.Y
|
||||
:annotation: = vector(0, 1, 0)
|
||||
|
||||
.. autoattribute:: pybricks.parameters.Axis.Z
|
||||
:annotation: = vector(0, 0, 1)
|
||||
|
||||
On Move Hub, doing math with these vectors is not supported. The axes can still
|
||||
be used to set up the hub orientation.
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
Button
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. currentmodule:: pybricks.parameters
|
||||
|
||||
.. class:: Button
|
||||
|
||||
.. rubric:: Remote and hub buttons
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
Direction
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. currentmodule:: pybricks.parameters
|
||||
|
||||
.. class:: Direction
|
||||
|
||||
Rotational direction for positive speed or angle values.
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
.. pybricks-requirements:: image
|
||||
|
||||
Font
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. autoclass:: pybricks.parameters.Font
|
||||
:no-members:
|
||||
|
||||
.. autoattribute:: pybricks.parameters.Font.DEFAULT
|
||||
:annotation:
|
||||
|
||||
.. autoattribute:: pybricks.parameters.Font.TERMINUS_16
|
||||
:annotation:
|
||||
|
||||
.. autoattribute:: pybricks.parameters.Font.LIBERATIONSANS_14
|
||||
:annotation:
|
||||
|
||||
.. autoattribute:: pybricks.parameters.Font.MONO_8X5_8
|
||||
:annotation:
|
||||
|
||||
.. autoattribute:: pybricks.parameters.Font.family
|
||||
|
||||
.. autoattribute:: pybricks.parameters.Font.style
|
||||
|
||||
.. autoattribute:: pybricks.parameters.Font.width
|
||||
|
||||
.. autoattribute:: pybricks.parameters.Font.height
|
||||
|
||||
.. automethod:: pybricks.parameters.Font.text_width
|
||||
|
||||
.. automethod:: pybricks.parameters.Font.text_height
|
||||
@@ -0,0 +1,59 @@
|
||||
.. pybricks-requirements:: image
|
||||
|
||||
Image
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. |this image| replace:: this image
|
||||
|
||||
.. autoclass:: pybricks.parameters.Image
|
||||
:no-members:
|
||||
|
||||
.. automethod:: pybricks.parameters.Image.empty
|
||||
|
||||
.. rubric:: Drawing text
|
||||
|
||||
There are two ways to draw text on images. :meth:`draw_text` lets text be
|
||||
placed precisely on the image or :meth:`print` can be used to automatically
|
||||
print text on a new line.
|
||||
|
||||
.. automethod:: pybricks.parameters.Image.draw_text
|
||||
|
||||
.. automethod:: pybricks.parameters.Image.print
|
||||
|
||||
.. automethod:: pybricks.parameters.Image.set_font
|
||||
|
||||
|
||||
.. rubric:: Drawing images
|
||||
|
||||
A copy of another image can be drawn on an image. Also consider using
|
||||
sub-images to copy part of an image.
|
||||
|
||||
.. automethod:: pybricks.parameters.Image.draw_image
|
||||
|
||||
|
||||
.. rubric:: Drawing shapes
|
||||
|
||||
These are the methods to draw basic shapes, including points, lines,
|
||||
rectangles and circles.
|
||||
|
||||
.. automethod:: pybricks.parameters.Image.draw_pixel
|
||||
|
||||
.. automethod:: pybricks.parameters.Image.draw_line
|
||||
|
||||
.. automethod:: pybricks.parameters.Image.draw_box
|
||||
|
||||
.. automethod:: pybricks.parameters.Image.draw_circle
|
||||
|
||||
|
||||
.. rubric:: Image properties
|
||||
|
||||
.. autoattribute:: pybricks.parameters.Image.width
|
||||
|
||||
.. autoattribute:: pybricks.parameters.Image.height
|
||||
|
||||
|
||||
.. rubric:: Replacing the entire image
|
||||
|
||||
.. automethod:: pybricks.parameters.Image.clear
|
||||
|
||||
.. automethod:: pybricks.parameters.Image.load_image
|
||||
@@ -0,0 +1,209 @@
|
||||
.. pybricks-requirements:: image
|
||||
|
||||
ImageFile
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Note: Not all images are included in the firmware yet. This is a work in progress.
|
||||
|
||||
.. currentmodule:: pybricks.parameters
|
||||
|
||||
.. class:: ImageFile
|
||||
|
||||
.. rubric:: **Information**
|
||||
|
||||
.. data:: ACCEPT
|
||||
|
||||
.. image:: ../../../media/ev3dev-media/images/mono/information/accept.png
|
||||
:width: 15 %
|
||||
|
||||
.. data:: BACKWARD
|
||||
|
||||
.. image:: ../../../media/ev3dev-media/images/mono/information/backward.png
|
||||
:width: 15 %
|
||||
|
||||
.. data:: DECLINE
|
||||
|
||||
.. image:: ../../../media/ev3dev-media/images/mono/information/decline.png
|
||||
:width: 15 %
|
||||
|
||||
.. data:: FORWARD
|
||||
|
||||
.. image:: ../../../media/ev3dev-media/images/mono/information/forward.png
|
||||
:width: 15 %
|
||||
|
||||
.. data:: LEFT
|
||||
|
||||
.. image:: ../../../media/ev3dev-media/images/mono/information/left.png
|
||||
:width: 15 %
|
||||
|
||||
.. data:: NO_GO
|
||||
|
||||
.. image:: ../../../media/ev3dev-media/images/mono/information/no_go.png
|
||||
:width: 15 %
|
||||
|
||||
.. data:: QUESTION_MARK
|
||||
|
||||
.. image:: ../../../media/ev3dev-media/images/mono/information/question_mark.png
|
||||
:width: 15 %
|
||||
|
||||
.. data:: RIGHT
|
||||
|
||||
.. image:: ../../../media/ev3dev-media/images/mono/information/right.png
|
||||
:width: 15 %
|
||||
|
||||
.. data:: STOP_1
|
||||
|
||||
.. image:: ../../../media/ev3dev-media/images/mono/information/stop_1.png
|
||||
:width: 15 %
|
||||
|
||||
.. data:: STOP_2
|
||||
|
||||
.. image:: ../../../media/ev3dev-media/images/mono/information/stop_2.png
|
||||
:width: 15 %
|
||||
|
||||
.. data:: THUMBS_DOWN
|
||||
|
||||
.. image:: ../../../media/ev3dev-media/images/mono/information/thumbs_down.png
|
||||
:width: 15 %
|
||||
|
||||
.. data:: THUMBS_UP
|
||||
|
||||
.. image:: ../../../media/ev3dev-media/images/mono/information/thumbs_up.png
|
||||
:width: 15 %
|
||||
|
||||
.. data:: WARNING
|
||||
|
||||
.. image:: ../../../media/ev3dev-media/images/mono/information/warning.png
|
||||
:width: 15 %
|
||||
|
||||
.. rubric:: **LEGO**
|
||||
|
||||
.. data:: EV3
|
||||
|
||||
.. image:: ../../../media/ev3dev-media/images/mono/lego/ev3.png
|
||||
:width: 15 %
|
||||
|
||||
.. data:: EV3_ICON
|
||||
|
||||
.. image:: ../../../media/ev3dev-media/images/mono/lego/ev3_icon.png
|
||||
:width: 15 %
|
||||
|
||||
.. rubric:: **Objects**
|
||||
|
||||
.. data:: TARGET
|
||||
|
||||
.. image:: ../../../media/ev3dev-media/images/mono/objects/target.png
|
||||
:width: 15 %
|
||||
|
||||
.. rubric:: **Eyes**
|
||||
|
||||
.. data:: ANGRY
|
||||
|
||||
.. image:: ../../../media/ev3dev-media/images/mono/eyes/angry.png
|
||||
:width: 15 %
|
||||
|
||||
.. data:: AWAKE
|
||||
|
||||
.. image:: ../../../media/ev3dev-media/images/mono/eyes/awake.png
|
||||
:width: 15 %
|
||||
|
||||
.. data:: BOTTOM_LEFT
|
||||
|
||||
.. image:: ../../../media/ev3dev-media/images/mono/eyes/bottom_left.png
|
||||
:width: 15 %
|
||||
|
||||
|
||||
.. data:: BOTTOM_RIGHT
|
||||
|
||||
.. image:: ../../../media/ev3dev-media/images/mono/eyes/bottom_right.png
|
||||
:width: 15 %
|
||||
|
||||
.. data:: CRAZY_1
|
||||
|
||||
.. image:: ../../../media/ev3dev-media/images/mono/eyes/crazy_1.png
|
||||
:width: 15 %
|
||||
|
||||
.. data:: CRAZY_2
|
||||
|
||||
.. image:: ../../../media/ev3dev-media/images/mono/eyes/crazy_2.png
|
||||
:width: 15 %
|
||||
|
||||
.. data:: DIZZY
|
||||
|
||||
.. image:: ../../../media/ev3dev-media/images/mono/eyes/dizzy.png
|
||||
:width: 15 %
|
||||
|
||||
.. data:: DOWN
|
||||
|
||||
.. image:: ../../../media/ev3dev-media/images/mono/eyes/down.png
|
||||
:width: 15 %
|
||||
|
||||
.. data:: EVIL
|
||||
|
||||
.. image:: ../../../media/ev3dev-media/images/mono/eyes/evil.png
|
||||
:width: 15 %
|
||||
|
||||
.. data:: KNOCKED_OUT
|
||||
|
||||
.. image:: ../../../media/ev3dev-media/images/mono/eyes/knocked_out.png
|
||||
:width: 15 %
|
||||
|
||||
.. data:: MIDDLE_LEFT
|
||||
|
||||
.. image:: ../../../media/ev3dev-media/images/mono/eyes/middle_left.png
|
||||
:width: 15 %
|
||||
|
||||
.. data:: MIDDLE_RIGHT
|
||||
|
||||
.. image:: ../../../media/ev3dev-media/images/mono/eyes/middle_right.png
|
||||
:width: 15 %
|
||||
|
||||
.. data:: NEUTRAL
|
||||
|
||||
.. image:: ../../../media/ev3dev-media/images/mono/eyes/neutral.png
|
||||
:width: 15 %
|
||||
|
||||
.. data:: PINCHED_LEFT
|
||||
|
||||
.. image:: ../../../media/ev3dev-media/images/mono/eyes/pinched_left.png
|
||||
:width: 15 %
|
||||
|
||||
.. data:: PINCHED_MIDDLE
|
||||
|
||||
.. image:: ../../../media/ev3dev-media/images/mono/eyes/pinched_middle.png
|
||||
:width: 15 %
|
||||
|
||||
.. data:: PINCHED_RIGHT
|
||||
|
||||
.. image:: ../../../media/ev3dev-media/images/mono/eyes/pinched_right.png
|
||||
:width: 15 %
|
||||
|
||||
.. data:: SLEEPING
|
||||
|
||||
.. image:: ../../../media/ev3dev-media/images/mono/eyes/sleeping.png
|
||||
:width: 15 %
|
||||
|
||||
.. data:: TIRED_LEFT
|
||||
|
||||
.. image:: ../../../media/ev3dev-media/images/mono/eyes/tired_left.png
|
||||
:width: 15 %
|
||||
|
||||
.. data:: TIRED_MIDDLE
|
||||
|
||||
.. image:: ../../../media/ev3dev-media/images/mono/eyes/tired_middle.png
|
||||
:width: 15 %
|
||||
|
||||
.. data:: TIRED_RIGHT
|
||||
|
||||
.. image:: ../../../media/ev3dev-media/images/mono/eyes/tired_right.png
|
||||
:width: 15 %
|
||||
|
||||
.. data:: UP
|
||||
|
||||
.. image:: ../../../media/ev3dev-media/images/mono/eyes/up.png
|
||||
:width: 15 %
|
||||
|
||||
.. data:: WINKING
|
||||
|
||||
.. image:: ../../../media/ev3dev-media/images/mono/eyes/winking.png
|
||||
:width: 15 %
|
||||
@@ -14,7 +14,10 @@
|
||||
button
|
||||
color
|
||||
direction
|
||||
font
|
||||
icon
|
||||
image
|
||||
imagefile
|
||||
port
|
||||
side
|
||||
stop
|
||||
@@ -27,8 +30,14 @@
|
||||
|
||||
.. pybricks-classlink:: Direction
|
||||
|
||||
.. pybricks-classlink:: Font
|
||||
|
||||
.. pybricks-classlink:: Icon
|
||||
|
||||
.. pybricks-classlink:: Image
|
||||
|
||||
.. pybricks-classlink:: ImageFile
|
||||
|
||||
.. pybricks-classlink:: Port
|
||||
|
||||
.. pybricks-classlink:: Side
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
Port
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. currentmodule:: pybricks.parameters
|
||||
|
||||
.. class:: Port
|
||||
|
||||
Input and output ports:
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
Side
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. currentmodule:: pybricks.parameters
|
||||
|
||||
.. class:: Side
|
||||
|
||||
Side of a hub or a sensor. These devices are
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
Stop
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. currentmodule:: pybricks.parameters
|
||||
|
||||
.. class:: Stop
|
||||
|
||||
Action after the motor stops.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.. pybricks-requirements::
|
||||
.. pybricks-requirements:: pupdevices
|
||||
|
||||
Color and Distance Sensor
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.. pybricks-requirements::
|
||||
.. pybricks-requirements:: pupdevices
|
||||
|
||||
Color Light Matrix
|
||||
^^^^^^^^^^^^^^^^^^
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.. pybricks-requirements::
|
||||
.. pybricks-requirements:: pupdevices
|
||||
|
||||
Color Sensor
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||