mapcan 0.26.1__tar.gz → 0.27.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {mapcan-0.26.1 → mapcan-0.27.1}/PKG-INFO +1 -1
- {mapcan-0.26.1 → mapcan-0.27.1}/docs/web.md +16 -5
- {mapcan-0.26.1 → mapcan-0.27.1}/pyproject.toml +1 -1
- {mapcan-0.26.1 → mapcan-0.27.1}/src/mapcan/__init__.py +1 -1
- {mapcan-0.26.1 → mapcan-0.27.1}/src/mapcan/launcher.py +11 -3
- {mapcan-0.26.1 → mapcan-0.27.1}/src/mapcan/locale/ru.py +3 -0
- mapcan-0.27.1/src/mapcan/updates.py +315 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/src/mapcan/web/app.py +33 -4
- mapcan-0.27.1/src/mapcan/web/static/assets/index-D5QwuTW6.css +1 -0
- mapcan-0.27.1/src/mapcan/web/static/assets/index-lMMr5t8a.js +37 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/src/mapcan/web/static/index.html +2 -2
- mapcan-0.27.1/tests/test_update_install.py +324 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/tests/test_updates.py +5 -4
- mapcan-0.26.1/src/mapcan/updates.py +0 -85
- mapcan-0.26.1/src/mapcan/web/static/assets/index-C9XHypw4.js +0 -37
- mapcan-0.26.1/src/mapcan/web/static/assets/index-DFi-dbfG.css +0 -1
- {mapcan-0.26.1 → mapcan-0.27.1}/.gitignore +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/LICENSE +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/NOTICE +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/README.md +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/THIRD_PARTY_NOTICES.md +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/docs/ci-example.md +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/docs/cli.md +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/docs/format-changelog.md +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/docs/format.md +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/docs/images/demo-dark.gif +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/docs/images/demo-light.gif +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/docs/images/document-pages-dark.png +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/docs/images/document-pages-light.png +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/docs/images/vscode-demo-dark.gif +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/docs/images/vscode-demo-light.gif +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/docs/images/vscode-hover-dark.png +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/docs/images/vscode-hover-light.png +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/docs/images/vscode-map-dark.png +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/docs/images/vscode-map-light.png +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/docs/images/vscode-problems-dark.png +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/docs/images/vscode-problems-light.png +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/docs/images/vscode-quickfix-dark.gif +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/docs/images/vscode-quickfix-light.gif +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/docs/images/web-frame-dark.png +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/docs/images/web-frame-light.png +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/docs/logo-dark.svg +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/docs/logo-light.svg +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/docs/templates.md +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/docs/zephyr.md +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/examples/canopen-node.yaml +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/examples/j1939.yaml +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/examples/minimal.yaml +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/examples/structures.yaml +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/examples/tractor/powertrain.yaml +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/examples/tractor/tractor.yaml +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/examples/vehicle-can.yaml +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/examples/zephyr/CMakeLists.txt +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/examples/zephyr/prj.conf +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/examples/zephyr/src/main.c +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/schema/mapcan-part-v1.schema.json +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/schema/mapcan-part.schema.json +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/schema/mapcan-v1.schema.json +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/schema/mapcan.schema.json +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/src/mapcan/bits.py +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/src/mapcan/canopen.py +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/src/mapcan/cli.py +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/src/mapcan/codegen/__init__.py +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/src/mapcan/codegen/c.py +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/src/mapcan/codegen/common.py +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/src/mapcan/codegen/py.py +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/src/mapcan/codegen/zephyr.py +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/src/mapcan/diagnostics.py +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/src/mapcan/diff.py +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/src/mapcan/docmodel.py +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/src/mapcan/export/__init__.py +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/src/mapcan/export/dbc.py +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/src/mapcan/export/eds.py +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/src/mapcan/export/pdf.py +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/src/mapcan/export/text.py +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/src/mapcan/export/xlsx.py +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/src/mapcan/extras.py +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/src/mapcan/fmt.py +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/src/mapcan/fonts/OFL-PTSerif.txt +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/src/mapcan/fonts/OFL.txt +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/src/mapcan/fonts/PT_Sans-Web-Bold.ttf +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/src/mapcan/fonts/PT_Sans-Web-BoldItalic.ttf +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/src/mapcan/fonts/PT_Sans-Web-Italic.ttf +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/src/mapcan/fonts/PT_Sans-Web-Regular.ttf +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/src/mapcan/fonts/PT_Serif-Web-Bold.ttf +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/src/mapcan/fonts/PT_Serif-Web-BoldItalic.ttf +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/src/mapcan/fonts/PT_Serif-Web-Italic.ttf +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/src/mapcan/fonts/PT_Serif-Web-Regular.ttf +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/src/mapcan/i18n.py +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/src/mapcan/importers/__init__.py +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/src/mapcan/importers/dbc.py +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/src/mapcan/importers/eds.py +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/src/mapcan/layout.py +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/src/mapcan/loader.py +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/src/mapcan/locale/__init__.py +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/src/mapcan/lsp/__init__.py +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/src/mapcan/lsp/analysis.py +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/src/mapcan/lsp/edits.py +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/src/mapcan/lsp/exports.py +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/src/mapcan/lsp/server.py +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/src/mapcan/model.py +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/src/mapcan/od.py +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/src/mapcan/protocols.py +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/src/mapcan/resolve.py +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/src/mapcan/schema.py +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/src/mapcan/structures.py +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/src/mapcan/templates/document.html.j2 +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/src/mapcan/templates/document.md.j2 +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/src/mapcan/templates/pdf/gost-19.typ +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/src/mapcan/templates/pdf/gost-2.105.typ +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/src/mapcan/templates/pdf/gost-7.32.typ +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/src/mapcan/templates/pdf/lib.typ +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/src/mapcan/templates/pdf/mapcan.typ +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/src/mapcan/templates/xlsx_style.yaml +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/src/mapcan/units.py +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/src/mapcan/upgrade.py +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/src/mapcan/userconfig.py +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/src/mapcan/validate.py +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/src/mapcan/web/__init__.py +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/src/mapcan/web/devicefile.py +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/src/mapcan/web/examples.py +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/src/mapcan/web/newmap.py +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/src/mapcan/web/session.py +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/src/mapcan/web/static/OFL-Sora.txt +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/src/mapcan/web/static/favicon.svg +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/src/mapcan/web/yamlops.py +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/tests/__init__.py +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/tests/conftest.py +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/tests/data/bit_layouts.json +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/tests/data/canopen-od.yaml +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/tests/data/invalid_map.yaml +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/tests/data/legacy.yaml +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/tests/data/logo.png +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/tests/data/logo.svg +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/tests/data/reference.yaml +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/tests/data/v1/canopen-node.yaml +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/tests/data/v1/j1939.yaml +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/tests/data/v1/reference.yaml +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/tests/data/v1/vehicle-can.yaml +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/tests/data/vendor-io.eds +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/tests/data/zephyr_stub/zephyr/drivers/can.h +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/tests/data/zephyr_stub/zephyr/kernel.h +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/tests/golden/reference.md +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/tests/golden/reference_bus1.h +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/tests/test_auth.py +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/tests/test_cli.py +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/tests/test_codegen.py +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/tests/test_device_file.py +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/tests/test_diff.py +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/tests/test_direction.py +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/tests/test_eds.py +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/tests/test_eds_import.py +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/tests/test_exchange.py +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/tests/test_export.py +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/tests/test_extras.py +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/tests/test_fmt.py +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/tests/test_format_v1.py +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/tests/test_i18n.py +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/tests/test_import.py +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/tests/test_include.py +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/tests/test_j1939.py +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/tests/test_launcher.py +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/tests/test_loader_fast.py +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/tests/test_lsp.py +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/tests/test_lsp_edits.py +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/tests/test_lsp_server.py +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/tests/test_model.py +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/tests/test_new_signal.py +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/tests/test_od.py +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/tests/test_source.py +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/tests/test_structures.py +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/tests/test_templates.py +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/tests/test_titles.py +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/tests/test_units.py +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/tests/test_upgrade.py +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/tests/test_validate.py +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/tests/test_web.py +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/tests/test_web_errors.py +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/tests/test_web_session.py +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/tests/test_workspace.py +0 -0
- {mapcan-0.26.1 → mapcan-0.27.1}/tests/test_yamlops.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: mapcan
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.27.1
|
|
4
4
|
Summary: A YAML map of CAN signals as the single source of truth: validation, Excel/PDF/Markdown/HTML, DBC, C/Python code
|
|
5
5
|
Project-URL: Homepage, https://github.com/ordu1453/mapcan
|
|
6
6
|
Project-URL: Documentation, https://github.com/ordu1453/mapcan/blob/main/docs/format.md
|
|
@@ -22,10 +22,19 @@ mapcan app --browser # the same in a browser tab
|
|
|
22
22
|
current map has unsaved changes, the editor asks what to do with them first.
|
|
23
23
|
* **Port.** 8765, or any free port if it is taken. The window opens once the server is ready.
|
|
24
24
|
* **Closing the window** with unsaved changes asks for confirmation.
|
|
25
|
-
* **Updates.**
|
|
26
|
-
[latest release](https://github.com/ordu1453/mapcan/releases/latest)
|
|
27
|
-
|
|
28
|
-
the
|
|
25
|
+
* **Updates.** Every time the editor starts it checks the
|
|
26
|
+
[latest release](https://github.com/ordu1453/mapcan/releases/latest) (reloading the page within a day
|
|
27
|
+
uses the saved answer, so GitHub is not asked again). When there is a newer
|
|
28
|
+
version, a chip appears in the top bar, right of **Save** (only the icon below 1600 px of width);
|
|
29
|
+
its popover opens by itself once per version and shows what is new.
|
|
30
|
+
With the Windows installer, **Download and update** downloads the installer in the background
|
|
31
|
+
(you can keep working), checks it against `SHA256SUMS.txt` of the same release (a file whose
|
|
32
|
+
checksum is missing or does not match is never run) and the chip turns into **Restart**. The
|
|
33
|
+
restart asks what to do with unsaved changes, closes the window, runs the installer silently and
|
|
34
|
+
opens the new version; settings and files in `~/.mapcan` are not touched. The downloaded installer
|
|
35
|
+
is kept in `~/.mapcan/updates` until the next version. With `pipx`, `uv tool` or `pip` the popover
|
|
36
|
+
shows the command to run in a terminal instead. **Skip this version** hides the chip until the
|
|
37
|
+
next one. To turn the check off, set the environment variable `MAPCAN_NO_UPDATE_CHECK=1`.
|
|
29
38
|
* **Files.** Window settings, the theme and the selected PDF template are stored in
|
|
30
39
|
`~/.mapcan/webview/`; the desktop app's error log is `~/.mapcan/mapcan.log`.
|
|
31
40
|
|
|
@@ -178,7 +187,9 @@ available at `http://127.0.0.1:8765/api/docs`.
|
|
|
178
187
|
|---|---|---|
|
|
179
188
|
| GET | `/api/meta` | mapcan version, profile, recent files, whether a map is open |
|
|
180
189
|
| GET/PUT | `/api/user` | Author profile `{name, github}` |
|
|
181
|
-
| GET | `/api/update` | Newer version on GitHub Releases: `{current, latest, newer, url, installer}` (`mapcan app` and local `serve` only) |
|
|
190
|
+
| GET | `/api/update` | Newer version on GitHub Releases: `{current, latest, newer, url, installer, size, notes, kind, command, can_apply, state, progress, error}`; `kind` is `installer`, `command` or `manual`, `state` is `idle`, `downloading`, `ready` or `error` (`mapcan app` and local `serve` only) |
|
|
191
|
+
| POST | `/api/update/download`, `/api/update/cancel` | Start or cancel the background download of the installer (Windows installer builds); `409 update-unavailable` if there is nothing to install |
|
|
192
|
+
| POST | `/api/update/apply` | Close the window and run the downloaded installer; only in `mapcan app`, `409 update-not-ready` before the download is finished |
|
|
182
193
|
| POST | `/api/instance/activate` | `{token, path}`: a second launch hands the file to the running instance (the token is in `~/.mapcan/instance.json`) |
|
|
183
194
|
| GET | `/api/fs/list?dir=` | Folders and YAML files for the file dialog |
|
|
184
195
|
| POST | `/api/file/open`, `/api/file/new`, `/api/file/example`, `/api/file/import_dbc`, `/api/file/save_as`, `/api/file/close` | File operations; `409 unsaved` means there are unsaved changes (pass `force: true` to proceed) |
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "mapcan"
|
|
3
|
-
version = "0.
|
|
3
|
+
version = "0.27.1"
|
|
4
4
|
description = "A YAML map of CAN signals as the single source of truth: validation, Excel/PDF/Markdown/HTML, DBC, C/Python code"
|
|
5
5
|
# readme: built from README.md with absolute links for PyPI (see fancy-pypi-readme below)
|
|
6
6
|
dynamic = ["readme"]
|
|
@@ -22,7 +22,7 @@ import urllib.request
|
|
|
22
22
|
import webbrowser
|
|
23
23
|
from pathlib import Path
|
|
24
24
|
|
|
25
|
-
from . import __version__
|
|
25
|
+
from . import __version__, updates
|
|
26
26
|
from .i18n import _
|
|
27
27
|
from .userconfig import config_dir
|
|
28
28
|
|
|
@@ -228,6 +228,13 @@ def run(path: Path | None = None, *, window: bool = True, readonly: bool = False
|
|
|
228
228
|
webview = _webview() if window else None
|
|
229
229
|
win = None
|
|
230
230
|
minimized = False
|
|
231
|
+
quitting = False # the editor is closing itself to update: no questions
|
|
232
|
+
|
|
233
|
+
def on_quit() -> None:
|
|
234
|
+
nonlocal quitting
|
|
235
|
+
quitting = True
|
|
236
|
+
if win is not None:
|
|
237
|
+
win.destroy()
|
|
231
238
|
|
|
232
239
|
def on_activate() -> None:
|
|
233
240
|
if win is not None:
|
|
@@ -252,7 +259,7 @@ def run(path: Path | None = None, *, window: bool = True, readonly: bool = False
|
|
|
252
259
|
|
|
253
260
|
app = create_app(session, cwd=cwd.resolve(), readonly=readonly, check_updates=check_updates,
|
|
254
261
|
instance_token=token if single_instance else None, on_activate=on_activate,
|
|
255
|
-
allowed_hosts=LOCAL_HOSTS, mode="app")
|
|
262
|
+
on_quit=on_quit if webview is not None else None, allowed_hosts=LOCAL_HOSTS, mode="app")
|
|
256
263
|
server = ServerThread(app, host, port)
|
|
257
264
|
try:
|
|
258
265
|
server.start()
|
|
@@ -268,7 +275,7 @@ def run(path: Path | None = None, *, window: bool = True, readonly: bool = False
|
|
|
268
275
|
|
|
269
276
|
def on_closing() -> bool:
|
|
270
277
|
s = wsp.session
|
|
271
|
-
if s is None or not s.dirty:
|
|
278
|
+
if quitting or s is None or not s.dirty:
|
|
272
279
|
return True
|
|
273
280
|
answer = _ask_save(_("“{name}” has unsaved changes.\n\nSave before closing?", name=s.path.name))
|
|
274
281
|
if answer is None:
|
|
@@ -312,6 +319,7 @@ def run(path: Path | None = None, *, window: bool = True, readonly: bool = False
|
|
|
312
319
|
if single_instance:
|
|
313
320
|
_remove_instance(token)
|
|
314
321
|
server.stop()
|
|
322
|
+
updates.UPDATER.launch_pending() # the update the user asked for, now that nothing is running
|
|
315
323
|
return 0
|
|
316
324
|
|
|
317
325
|
|
|
@@ -647,6 +647,9 @@ RU: dict[str, str] = {
|
|
|
647
647
|
"на сервере есть коммиты, которых нет здесь: сначала получите изменения (pull)",
|
|
648
648
|
"the editor is running in read-only mode": "редактор запущен в режиме только для чтения",
|
|
649
649
|
"invalid instance token": "неверный токен экземпляра",
|
|
650
|
+
"update checks are turned off": "проверка обновлений выключена",
|
|
651
|
+
"there is no installer to update to": "нет установщика, до которого можно обновиться",
|
|
652
|
+
"the update is not downloaded yet": "обновление ещё не скачано",
|
|
650
653
|
"{path}: characters {chars} are not in the {encoding} encoding and were written as '?'":
|
|
651
654
|
"{path}: символы {chars} не входят в кодировку {encoding} и записаны как «?»",
|
|
652
655
|
"invalid Host header": "недопустимый заголовок Host",
|
|
@@ -0,0 +1,315 @@
|
|
|
1
|
+
"""Check for a new mapcan version on GitHub Releases and, for the Windows installer, update from the app.
|
|
2
|
+
|
|
3
|
+
The editor asks GitHub on every start; the result is also cached for a day in ``~/.mapcan/update.json``
|
|
4
|
+
(for page reloads and the command line), so that GitHub is not contacted more often than needed.
|
|
5
|
+
The check is turned off by the environment variable ``MAPCAN_NO_UPDATE_CHECK=1``.
|
|
6
|
+
|
|
7
|
+
The installer is downloaded in the background to ``~/.mapcan/updates/`` and checked against the
|
|
8
|
+
``SHA256SUMS.txt`` of the same release; a file whose checksum is missing or does not match is never run.
|
|
9
|
+
The app runs it only when the user asks, after the window is closed (:meth:`Updater.launch_pending`).
|
|
10
|
+
"""
|
|
11
|
+
|
|
12
|
+
from __future__ import annotations
|
|
13
|
+
|
|
14
|
+
import hashlib
|
|
15
|
+
import json
|
|
16
|
+
import os
|
|
17
|
+
import re
|
|
18
|
+
import subprocess
|
|
19
|
+
import sys
|
|
20
|
+
import threading
|
|
21
|
+
import time
|
|
22
|
+
import urllib.request
|
|
23
|
+
from pathlib import Path
|
|
24
|
+
|
|
25
|
+
from . import __version__
|
|
26
|
+
from .userconfig import config_dir
|
|
27
|
+
|
|
28
|
+
REPO = "ordu1453/mapcan"
|
|
29
|
+
API_URL = f"https://api.github.com/repos/{REPO}/releases/latest"
|
|
30
|
+
RELEASES_URL = f"https://github.com/{REPO}/releases/latest"
|
|
31
|
+
CACHE_TTL = 24 * 3600
|
|
32
|
+
SUMS_NAME = "SHA256SUMS.txt"
|
|
33
|
+
INSTALLER_NAME = re.compile(r"mapcan-\d+\.\d+\.\d+-setup\.exe")
|
|
34
|
+
NOTES_LIMIT = 5
|
|
35
|
+
CHUNK = 256 * 1024
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
def parse_version(v: str) -> tuple[int, ...] | None:
|
|
39
|
+
""""v1.2.3" / "1.2" → (1, 2, 3) / (1, 2, 0); pre-releases and garbage → None."""
|
|
40
|
+
m = re.fullmatch(r"v?(\d+)\.(\d+)(?:\.(\d+))?", v.strip())
|
|
41
|
+
return (int(m[1]), int(m[2]), int(m[3] or 0)) if m else None
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
def is_newer(latest: str, current: str = __version__) -> bool:
|
|
45
|
+
a, b = parse_version(latest), parse_version(current)
|
|
46
|
+
return a is not None and b is not None and a > b
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
def disabled() -> bool:
|
|
50
|
+
flag = os.environ.get("MAPCAN_NO_UPDATE_CHECK") or os.environ.get("CANMAP_NO_UPDATE_CHECK") or ""
|
|
51
|
+
return flag.strip() not in ("", "0")
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
def _notes(body: str) -> list[str]:
|
|
55
|
+
"""The bullet points of the release notes as plain text (the body is Markdown written on GitHub)."""
|
|
56
|
+
out = []
|
|
57
|
+
for line in body.splitlines():
|
|
58
|
+
m = re.match(r"\s*[-*]\s+(.*\S)", line)
|
|
59
|
+
if not m:
|
|
60
|
+
continue
|
|
61
|
+
text = re.sub(r"\[([^\]]*)\]\([^)]*\)", r"\1", m[1])
|
|
62
|
+
text = re.sub(r"[*_`]", "", text).strip()
|
|
63
|
+
if text:
|
|
64
|
+
out.append(text[:200])
|
|
65
|
+
if len(out) == NOTES_LIMIT:
|
|
66
|
+
break
|
|
67
|
+
return out
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
def _fetch(timeout: float) -> dict:
|
|
71
|
+
req = urllib.request.Request(API_URL, headers={
|
|
72
|
+
"Accept": "application/vnd.github+json",
|
|
73
|
+
"User-Agent": f"mapcan/{__version__}",
|
|
74
|
+
})
|
|
75
|
+
with urllib.request.urlopen(req, timeout=timeout) as r: # noqa: S310 — a fixed https address
|
|
76
|
+
data = json.load(r)
|
|
77
|
+
assets = data.get("assets", [])
|
|
78
|
+
installer = next((a for a in assets if a.get("name", "").endswith("-setup.exe")), None)
|
|
79
|
+
sums = next((a for a in assets if a.get("name") == SUMS_NAME), None)
|
|
80
|
+
return {"latest": str(data.get("tag_name", "")).lstrip("v"),
|
|
81
|
+
"url": data.get("html_url") or RELEASES_URL,
|
|
82
|
+
"installer": installer["browser_download_url"] if installer else None,
|
|
83
|
+
"size": installer.get("size") if installer else None,
|
|
84
|
+
"sums": sums["browser_download_url"] if sums else None,
|
|
85
|
+
"notes": _notes(str(data.get("body") or ""))}
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
def empty() -> dict:
|
|
89
|
+
"""The answer when there is nothing to say (checks are off or GitHub is unreachable)."""
|
|
90
|
+
return {"current": __version__, "latest": None, "newer": False, "url": RELEASES_URL, "installer": None,
|
|
91
|
+
"size": None, "sums": None, "notes": []}
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
def check(timeout: float = 4.0, use_cache: bool = True) -> dict:
|
|
95
|
+
"""Information about the latest version: {current, latest, newer, url, installer, size, sums, notes}.
|
|
96
|
+
|
|
97
|
+
Network errors are not raised: if GitHub is unreachable, ``newer`` = False.
|
|
98
|
+
"""
|
|
99
|
+
result = empty()
|
|
100
|
+
if disabled():
|
|
101
|
+
return result
|
|
102
|
+
cache = config_dir() / "update.json"
|
|
103
|
+
info = None
|
|
104
|
+
if use_cache:
|
|
105
|
+
try:
|
|
106
|
+
cached = json.loads(cache.read_text(encoding="utf-8"))
|
|
107
|
+
if time.time() - float(cached.get("checked", 0)) < CACHE_TTL:
|
|
108
|
+
info = cached
|
|
109
|
+
except (OSError, ValueError, TypeError):
|
|
110
|
+
pass
|
|
111
|
+
if info is None:
|
|
112
|
+
try:
|
|
113
|
+
info = {**_fetch(timeout), "checked": time.time()}
|
|
114
|
+
except Exception: # noqa: BLE001 — no network, API rate limit, unexpected response
|
|
115
|
+
return result
|
|
116
|
+
try:
|
|
117
|
+
cache.parent.mkdir(parents=True, exist_ok=True)
|
|
118
|
+
cache.write_text(json.dumps(info), encoding="utf-8")
|
|
119
|
+
except OSError:
|
|
120
|
+
pass
|
|
121
|
+
latest = info.get("latest") or None
|
|
122
|
+
result.update(latest=latest, newer=bool(latest) and is_newer(latest),
|
|
123
|
+
url=info.get("url") or RELEASES_URL, installer=info.get("installer"),
|
|
124
|
+
size=info.get("size"), sums=info.get("sums"), notes=info.get("notes") or [])
|
|
125
|
+
return result
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
# --------------------------------------------------------------------------- how mapcan was installed
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
def install_kind() -> tuple[str, str | None]:
|
|
132
|
+
"""How this copy was installed: ("installer", None) can update itself, ("command", cmd) is updated in a
|
|
133
|
+
terminal, ("manual", None) is a portable build that is replaced by hand."""
|
|
134
|
+
if getattr(sys, "frozen", False):
|
|
135
|
+
return ("installer", None) if os.name == "nt" else ("manual", None)
|
|
136
|
+
exe = sys.executable.replace("\\", "/").lower()
|
|
137
|
+
if "/pipx/" in exe:
|
|
138
|
+
return "command", "pipx upgrade mapcan"
|
|
139
|
+
if "/uv/tools/" in exe:
|
|
140
|
+
return "command", "uv tool upgrade mapcan"
|
|
141
|
+
return "command", "pip install --upgrade mapcan"
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
# --------------------------------------------------------------------------- download and install
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
class UpdateError(Exception):
|
|
148
|
+
"""A failed download; ``code`` is what the editor shows: network, checksum, no-checksum, disk."""
|
|
149
|
+
|
|
150
|
+
def __init__(self, code: str):
|
|
151
|
+
super().__init__(code)
|
|
152
|
+
self.code = code
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
def _open(url: str | None, timeout: float = 20.0):
|
|
156
|
+
if not url or not url.startswith("https://github.com/"):
|
|
157
|
+
raise UpdateError("network")
|
|
158
|
+
req = urllib.request.Request(url, headers={"User-Agent": f"mapcan/{__version__}"})
|
|
159
|
+
return urllib.request.urlopen(req, timeout=timeout) # noqa: S310 — https://github.com/ only, checked above
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
def parse_sums(text: str) -> dict[str, str]:
|
|
163
|
+
"""``sha256sum`` output: "<hash> <name>" (a "*" before the name marks binary mode)."""
|
|
164
|
+
out = {}
|
|
165
|
+
for line in text.splitlines():
|
|
166
|
+
m = re.fullmatch(r"([0-9a-fA-F]{64})\s+\*?(\S.*?)\s*", line)
|
|
167
|
+
if m:
|
|
168
|
+
out[m[2]] = m[1].lower()
|
|
169
|
+
return out
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
def _sha256(path: Path) -> str:
|
|
173
|
+
h = hashlib.sha256()
|
|
174
|
+
with open(path, "rb") as f:
|
|
175
|
+
while chunk := f.read(CHUNK):
|
|
176
|
+
h.update(chunk)
|
|
177
|
+
return h.hexdigest()
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
class Updater:
|
|
181
|
+
"""One background download at a time. States: idle, downloading, ready, error."""
|
|
182
|
+
|
|
183
|
+
def __init__(self) -> None:
|
|
184
|
+
self._lock = threading.Lock()
|
|
185
|
+
self._cancel = threading.Event()
|
|
186
|
+
self._thread: threading.Thread | None = None
|
|
187
|
+
self.pending: Path | None = None
|
|
188
|
+
self._reset()
|
|
189
|
+
|
|
190
|
+
def _reset(self) -> None:
|
|
191
|
+
self.state, self.done, self.total = "idle", 0, 0
|
|
192
|
+
self.error: str | None = None
|
|
193
|
+
self.version: str | None = None
|
|
194
|
+
self.path: Path | None = None
|
|
195
|
+
|
|
196
|
+
def status(self) -> dict:
|
|
197
|
+
with self._lock:
|
|
198
|
+
progress = min(1.0, self.done / self.total) if self.total else 0.0
|
|
199
|
+
return {"state": self.state, "progress": progress, "error": self.error, "version": self.version}
|
|
200
|
+
|
|
201
|
+
def start(self, info: dict) -> None:
|
|
202
|
+
"""Start downloading the installer of ``info`` (a result of :func:`check`); no-op while one is running."""
|
|
203
|
+
with self._lock:
|
|
204
|
+
if self.state == "downloading":
|
|
205
|
+
return
|
|
206
|
+
self._reset()
|
|
207
|
+
self.state, self.version = "downloading", info.get("latest")
|
|
208
|
+
self.total = int(info.get("size") or 0)
|
|
209
|
+
self._cancel.clear()
|
|
210
|
+
self._thread = threading.Thread(target=self._run, args=(dict(info),), daemon=True, name="mapcan-update")
|
|
211
|
+
self._thread.start()
|
|
212
|
+
|
|
213
|
+
def cancel(self) -> None:
|
|
214
|
+
self._cancel.set()
|
|
215
|
+
thread = self._thread
|
|
216
|
+
if thread is not None and thread.is_alive():
|
|
217
|
+
thread.join(timeout=5)
|
|
218
|
+
with self._lock:
|
|
219
|
+
if self.state == "downloading":
|
|
220
|
+
self._reset()
|
|
221
|
+
|
|
222
|
+
def _fail(self, code: str) -> None:
|
|
223
|
+
with self._lock:
|
|
224
|
+
if self._cancel.is_set():
|
|
225
|
+
self._reset()
|
|
226
|
+
else:
|
|
227
|
+
self.state, self.error = "error", code
|
|
228
|
+
|
|
229
|
+
def _finish(self, path: Path) -> None:
|
|
230
|
+
with self._lock:
|
|
231
|
+
self.state, self.path, self.done = "ready", path, self.total or self.done
|
|
232
|
+
|
|
233
|
+
def _run(self, info: dict) -> None:
|
|
234
|
+
try:
|
|
235
|
+
name = f"mapcan-{info['latest']}-setup.exe"
|
|
236
|
+
if not INSTALLER_NAME.fullmatch(name):
|
|
237
|
+
raise UpdateError("network")
|
|
238
|
+
if not info.get("sums"):
|
|
239
|
+
raise UpdateError("no-checksum")
|
|
240
|
+
with _open(info["sums"]) as r:
|
|
241
|
+
expected = parse_sums(r.read(1_000_000).decode("utf-8", "replace")).get(name)
|
|
242
|
+
if not expected:
|
|
243
|
+
raise UpdateError("no-checksum")
|
|
244
|
+
folder = config_dir() / "updates"
|
|
245
|
+
folder.mkdir(parents=True, exist_ok=True)
|
|
246
|
+
for old in folder.glob("mapcan-*"):
|
|
247
|
+
if old.name != name:
|
|
248
|
+
old.unlink(missing_ok=True)
|
|
249
|
+
final, part = folder / name, folder / (name + ".part")
|
|
250
|
+
if final.is_file() and _sha256(final) == expected:
|
|
251
|
+
self._finish(final)
|
|
252
|
+
return
|
|
253
|
+
digest = hashlib.sha256()
|
|
254
|
+
with _open(info.get("installer")) as r, open(part, "wb") as f:
|
|
255
|
+
total = int(r.headers.get("Content-Length") or info.get("size") or 0)
|
|
256
|
+
with self._lock:
|
|
257
|
+
self.total = total
|
|
258
|
+
while chunk := r.read(CHUNK):
|
|
259
|
+
if self._cancel.is_set():
|
|
260
|
+
raise UpdateError("cancelled")
|
|
261
|
+
f.write(chunk)
|
|
262
|
+
digest.update(chunk)
|
|
263
|
+
with self._lock:
|
|
264
|
+
self.done += len(chunk)
|
|
265
|
+
if digest.hexdigest() != expected:
|
|
266
|
+
part.unlink(missing_ok=True)
|
|
267
|
+
raise UpdateError("checksum")
|
|
268
|
+
os.replace(part, final)
|
|
269
|
+
self._finish(final)
|
|
270
|
+
except UpdateError as e:
|
|
271
|
+
self._fail(e.code)
|
|
272
|
+
except OSError as e:
|
|
273
|
+
self._fail("disk" if isinstance(e, PermissionError) or getattr(e, "errno", None) in (13, 28) else "network")
|
|
274
|
+
except Exception: # noqa: BLE001 — whatever fails in the background must not take the editor down
|
|
275
|
+
self._fail("network")
|
|
276
|
+
|
|
277
|
+
def apply(self) -> bool:
|
|
278
|
+
"""Mark the downloaded installer to be run when the app exits (:meth:`launch_pending`)."""
|
|
279
|
+
with self._lock:
|
|
280
|
+
if self.state != "ready" or self.path is None or not self.path.is_file():
|
|
281
|
+
return False
|
|
282
|
+
self.pending = self.path
|
|
283
|
+
return True
|
|
284
|
+
|
|
285
|
+
def launch_pending(self) -> bool:
|
|
286
|
+
"""Run the installer chosen by :meth:`apply`; called after the window and the server are closed.
|
|
287
|
+
|
|
288
|
+
It closes any mapcan process left over and starts the new version when it is done (``/restart=1`` is
|
|
289
|
+
read by packaging/mapcan.iss).
|
|
290
|
+
"""
|
|
291
|
+
path, self.pending = self.pending, None
|
|
292
|
+
if path is None or os.name != "nt":
|
|
293
|
+
return False
|
|
294
|
+
flags = getattr(subprocess, "DETACHED_PROCESS", 0) | getattr(subprocess, "CREATE_NEW_PROCESS_GROUP", 0)
|
|
295
|
+
try:
|
|
296
|
+
subprocess.Popen([str(path), "/SILENT", "/CLOSEAPPLICATIONS", "/restart=1"], # noqa: S603
|
|
297
|
+
close_fds=True, creationflags=flags)
|
|
298
|
+
except OSError:
|
|
299
|
+
return False
|
|
300
|
+
return True
|
|
301
|
+
|
|
302
|
+
|
|
303
|
+
UPDATER = Updater()
|
|
304
|
+
|
|
305
|
+
|
|
306
|
+
def payload(result: dict, *, can_apply: bool = False) -> dict:
|
|
307
|
+
"""What /api/update answers: the check, how this copy is updated and the state of the download."""
|
|
308
|
+
kind, command = install_kind()
|
|
309
|
+
st = UPDATER.status()
|
|
310
|
+
if st["version"] and st["version"] != result.get("latest"): # a download of an older version is stale
|
|
311
|
+
st = {"state": "idle", "progress": 0.0, "error": None, "version": None}
|
|
312
|
+
return {"current": result["current"], "latest": result["latest"], "newer": result["newer"], "url": result["url"],
|
|
313
|
+
"installer": result["installer"], "size": result["size"], "notes": result["notes"],
|
|
314
|
+
"kind": kind, "command": command, "can_apply": can_apply and kind == "installer",
|
|
315
|
+
"state": st["state"], "progress": st["progress"], "error": st["error"]}
|
|
@@ -543,7 +543,7 @@ def _remote_error(e: HTTPException, upstream: str | None) -> Exception:
|
|
|
543
543
|
def create_app(session: EditorSession | None = None, poll_interval: float = 1.0,
|
|
544
544
|
cwd: Path | None = None, readonly: bool | None = None, *,
|
|
545
545
|
check_updates: bool = False, instance_token: str | None = None,
|
|
546
|
-
on_activate: Callable[[], None] | None = None,
|
|
546
|
+
on_activate: Callable[[], None] | None = None, on_quit: Callable[[], None] | None = None,
|
|
547
547
|
allowed_hosts: Collection[str] | None = None, auth_token: str | None = None,
|
|
548
548
|
mode: str = "serve") -> FastAPI:
|
|
549
549
|
"""The editor application.
|
|
@@ -554,6 +554,7 @@ def create_app(session: EditorSession | None = None, poll_interval: float = 1.0,
|
|
|
554
554
|
``check_updates``: answer /api/update with information from GitHub Releases;
|
|
555
555
|
``instance_token`` allows /api/instance/activate (mapcan run again
|
|
556
556
|
passes the file to the running instance), ``on_activate`` brings the window to the front;
|
|
557
|
+
``on_quit`` closes the app window without asking (the editor updates itself and restarts);
|
|
557
558
|
``mode``: "app" (the app window) or "serve" (for a bug report).
|
|
558
559
|
"""
|
|
559
560
|
hub = Hub()
|
|
@@ -642,12 +643,40 @@ def create_app(session: EditorSession | None = None, poll_interval: float = 1.0,
|
|
|
642
643
|
async def get_meta() -> dict:
|
|
643
644
|
return wsp.meta()
|
|
644
645
|
|
|
646
|
+
can_apply = mode == "app" and on_quit is not None
|
|
647
|
+
first_check = [True] # the first check after the editor starts asks GitHub; page reloads use the day's cache
|
|
648
|
+
|
|
645
649
|
@app.get("/api/update")
|
|
646
650
|
async def get_update() -> dict:
|
|
647
651
|
if not check_updates:
|
|
648
|
-
return
|
|
649
|
-
|
|
650
|
-
|
|
652
|
+
return updates.payload(updates.empty(), can_apply=False)
|
|
653
|
+
use_cache, first_check[0] = not first_check[0], False
|
|
654
|
+
result = await run_in_threadpool(updates.check, 4.0, use_cache)
|
|
655
|
+
return updates.payload(result, can_apply=can_apply)
|
|
656
|
+
|
|
657
|
+
@app.post("/api/update/download")
|
|
658
|
+
async def update_download() -> dict:
|
|
659
|
+
if not check_updates:
|
|
660
|
+
raise AppError(409, "update-unavailable", _("update checks are turned off"))
|
|
661
|
+
result = await run_in_threadpool(updates.check, 4.0, False) # fresh: the cache may lack the checksum file
|
|
662
|
+
payload = updates.payload(result, can_apply=can_apply)
|
|
663
|
+
if not result["newer"] or payload["kind"] != "installer" or not result["installer"]:
|
|
664
|
+
raise AppError(409, "update-unavailable", _("there is no installer to update to"))
|
|
665
|
+
updates.UPDATER.start(result)
|
|
666
|
+
return updates.payload(result, can_apply=can_apply)
|
|
667
|
+
|
|
668
|
+
@app.post("/api/update/cancel")
|
|
669
|
+
async def update_cancel() -> dict:
|
|
670
|
+
await run_in_threadpool(updates.UPDATER.cancel)
|
|
671
|
+
return updates.payload(await run_in_threadpool(updates.check), can_apply=can_apply)
|
|
672
|
+
|
|
673
|
+
@app.post("/api/update/apply")
|
|
674
|
+
async def update_apply() -> dict:
|
|
675
|
+
if not can_apply or not updates.UPDATER.apply():
|
|
676
|
+
raise AppError(409, "update-not-ready", _("the update is not downloaded yet"))
|
|
677
|
+
# After the response is sent: the window closes, then the installer starts (see launcher.run)
|
|
678
|
+
asyncio.get_running_loop().call_later(0.3, on_quit)
|
|
679
|
+
return {"ok": True}
|
|
651
680
|
|
|
652
681
|
@app.post("/api/instance/activate")
|
|
653
682
|
async def activate(body: ActivateBody) -> dict:
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.ask-message[data-v-d698de9b]{white-space:pre-line;margin:0 0 16px;max-width:480px}.ask-input[data-v-d698de9b]{display:block;width:100%;box-sizing:border-box;margin:0 0 16px}.sdo-details[data-v-9ff57d84]{margin-top:16px}@font-face{font-family:Sora Wordmark;src:url(data:font/woff2;base64,d09GMgABAAAAAAUUABAAAAAACngAAAS4AAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGhobgR4cKgZgP1NUQVQqAEwRCAqFNIRVATYCJAMYCw4ABCAFiCQHIAwHG/EIUVRxeim+OLAbf2wIhUVphzYNQhgzWEX09ij1KOItZQW3sIyHaOzbm9nFzdpPqLer/IhpPEhQTfIlMkmyZmgnw+fpvwziq5MiWTvX6SAWSZMhzZr3xSN0ko6Sr7gbGUDFiUy4VXARewIWev//96q+n6n5GJs32SKhaMzGXjTmagEDWAr2U3EurUBPsVqRgunUmg6oT2ZPLlVZhj5CoC8ghBpQvby3qUxCtm5v7gYJF48hASSo8HEMXTgVFEAUdUxVioae0spPhM3ahekm2Z9C6DalZJFtqGgde52i8nQ4PWsqubzm8TJROHkjpAHYUyIGcZgpG4FEMWh+mnwJuOQYcV86p7ZBpHgHOTy/YaJQIfQUGArDWCEtZziEQQqIHmUigETBUKHB48KsBPTWU0rHeAnERWhqSNOEXc+6nnY96Xo8xXAI6ccbgNAd9EUf/CbmAaCCKoUQcmytddhopS4zJ9mrz82D0TzQ+8Y5vZsvX/a5+fw5174+2+oorI+jN6D75QHd+veL3tG80PvGs2dLvfDq8uiNFy/C1tMHxdXkvM86e7DQttPsbld5Gk9rke6J2X5Blj0EHA4YubHPYrHhfXrWmOnysY0pzSsxKy650xYzIktPo64n/dRNz+J/w4sXvXTI0MqHL7FlRx7ErLh1CXD5NvN7Q43i2+j8z2MLInIRiTd3kJayZpyoI6NJbU2Hev0ejBU3cIhbtqnxbCOiqRuUdbsL9quVeGoD1hGavHGGDq3FCnpmG+3eljZ7vHmAMLWW2+lmSdE0OTqpQoUFSJXlnJe2oV7f2koAW2o9T9a2yZnyNLPSX9fGG2qaJUs1F1p1BO4nFFfH9AR1RT22qxs/ElpTy8+yABe+7l1Ur1bsqrBF2TsriqrIEDC6K/SnmE841MvV6t24zWhA9Pa70Ym95faoUXbhMusJWn1JM+MVvgHQNz+se5eU7eYZxuyqHMLpRjljy7IVso7mYcLqdJsqWKzlODevSekroLW6d50q2epKQq7pFWQA7SC5+nuuHxmw9n/PUn7D93qmBQB+/j3s+c923uhW6ltAdwmC++LuNliClDuE5D7dyyk9bcjpKfL9sLn3ItTmgRliJ0U6JBL8TEVigM+KqL3QSg2Enloh9fccivmOQTXSG+hmtF/Q3cgMhZ7GZy70sjW7oY/luQN9LUwb9IvJ8Y/X3/INlwn6lr1vq4fBa6gSIJoniOfHQSCTIkaVoG4cBtQlIMgNahcUMIHhhUC0WRBOhElWnHQZIpKYUSh+vOy6WTxIXgHTKBI3ajC3PFOPsRUBQgz+mE4Mv1mmuAWZkIrSnEWrtiBZwwIcZggMrfIg3ouJSvghgxB7OZ7VlccFntGAgElQ7YRxSSMmFBCOm7sAKuhBjdQo77XQ2oKyvNx88zfQyQ6xm+RhdpIEDOTofOucdGlofzcOT1qC7pgLLGQOGmNAmXa6r/FiCCQMH2gWgQ8jCEKXZLBBM6iNCMzwDzZzkH7+9iOjJqe7dIsHN0zpMrfZ3HhT3Dym2u1zLlkUcjtRWkfN0YgZ3NaoxHvh7eLWWiWmlTz2k+FHaVOrGU32YZ7SF6sxFxLk5hIwxScU6NpiSf3H6OplvQ0AAA==) format("woff2");font-weight:800;font-display:block}:root{--bg: #f6f7f9;--panel: #ffffff;--fg: #1d2329;--muted: #66717c;--line: #d6dce2;--line-strong: #b9c2cb;--accent: #1f4e79;--accent-fg: #ffffff;--accent-soft: #e3edf7;--hover: #eef2f6;--error: #c62828;--error-soft: #fdecea;--warning: #b26a00;--warning-soft: #fff4e0;--info: #2e6da4;--info-soft: #e8f1fa;--ok: #2e7d32;--grid-empty: #eceff2;--shadow: 0 6px 24px rgba(16, 24, 32, .14);--y-key: #1f4e79;--y-str: #2e7d32;--y-num: #a3420e;--y-tag: #7b3fa0;--mono: "Cascadia Mono", "DejaVu Sans Mono", Consolas, monospace;--brand-map: #1e40af;--brand-can: #d97706;color-scheme:light}@media(prefers-color-scheme:dark){:root:not([data-theme=light]){--bg: #14181c;--panel: #1b2026;--fg: #e3e8ec;--muted: #94a0ab;--line: #2e363e;--line-strong: #43505b;--accent: #6ea8dc;--accent-fg: #0d1a26;--accent-soft: #1f3347;--hover: #232a31;--error: #ff6b6b;--error-soft: #3a1f21;--warning: #f0a646;--warning-soft: #3a2d17;--info: #7bb4e8;--info-soft: #1d2c3b;--ok: #6cc070;--grid-empty: #262d34;--shadow: 0 6px 24px rgba(0, 0, 0, .5);--y-key: #7fb6e6;--y-str: #9ccc8a;--y-num: #e8a36b;--y-tag: #c79be0;--brand-map: #ffffff;--brand-can: #fbbf24;color-scheme:dark}}:root[data-theme=dark]{--bg: #14181c;--panel: #1b2026;--fg: #e3e8ec;--muted: #94a0ab;--line: #2e363e;--line-strong: #43505b;--accent: #6ea8dc;--accent-fg: #0d1a26;--accent-soft: #1f3347;--hover: #232a31;--error: #ff6b6b;--error-soft: #3a1f21;--warning: #f0a646;--warning-soft: #3a2d17;--info: #7bb4e8;--info-soft: #1d2c3b;--ok: #6cc070;--grid-empty: #262d34;--shadow: 0 6px 24px rgba(0, 0, 0, .5);--y-key: #7fb6e6;--y-str: #9ccc8a;--y-num: #e8a36b;--y-tag: #c79be0;--brand-map: #ffffff;--brand-can: #fbbf24;color-scheme:dark}*{box-sizing:border-box}html,body,#app{height:100%;margin:0}body{background:var(--bg);color:var(--fg);font:13px/1.4 Segoe UI,system-ui,-apple-system,sans-serif}.mono{font-family:var(--mono);font-size:12px}.muted{color:var(--muted)}.spacer{flex:1}h2,h3,h4{margin:0}ul.plain{margin:0;padding-left:16px}button,.button,select,input,textarea{font:inherit;color:inherit}button,.button{display:inline-flex;align-items:center;gap:4px;padding:4px 10px;border:1px solid var(--line-strong);border-radius:5px;background:var(--panel);cursor:pointer;text-decoration:none;white-space:nowrap}button:hover:not(:disabled),.button:hover{background:var(--hover)}button:disabled{opacity:.45;cursor:default}button.primary{background:var(--accent);border-color:var(--accent);color:var(--accent-fg)}button.primary:hover:not(:disabled){filter:brightness(1.1);background:var(--accent)}button.small,.button.small{padding:2px 8px;font-size:12px}button.icon{padding:2px 7px;min-width:26px;justify-content:center}button.icon.danger:hover{color:var(--error);border-color:var(--error)}button.icon.attention{color:var(--warning);border-color:var(--warning)}button.link{border:none;background:none;color:var(--accent);padding:0 4px}input,select,textarea{border:1px solid var(--line-strong);border-radius:4px;background:var(--panel);padding:4px 6px;min-width:0}input:focus,select:focus,textarea:focus{outline:2px solid var(--accent);outline-offset:-1px}input[readonly],textarea[readonly]{background:var(--bg)}.app{display:flex;flex-direction:column;height:100%}.topbar{position:relative;display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center;gap:12px;min-height:52px;padding:0 12px;background:var(--panel);border-bottom:1px solid var(--line)}.tb-left,.tb-center,.tb-right{display:flex;align-items:center;gap:8px;min-width:0}.tb-right{justify-content:flex-end}.topbar .spacer{flex:1;min-width:0}.topbar .i{width:16px;height:16px;flex:none;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}.topbar .i.chev{width:12px;height:12px;stroke-width:1.8;color:var(--muted)}.topbar .i.tiny{width:12px;height:12px}.topbar button:focus-visible,.topbar a:focus-visible{outline:2px solid var(--accent);outline-offset:1px}.brandbtn{display:inline-flex;align-items:center;gap:6px;height:34px;padding:0 8px;border:0;border-radius:6px;background:none}.ib{display:inline-grid;place-items:center;width:30px;height:30px;padding:0;border:0;border-radius:6px;background:none;color:var(--muted)}.ib:hover:not(:disabled){background:var(--hover);color:var(--fg)}.ib.attention{color:var(--warning)}.ibgroup{display:inline-flex;gap:2px}.vsep{width:1px;height:20px;flex:none;background:var(--line)}.docpill{display:flex;align-items:center;gap:8px;height:36px;padding:0 6px 0 14px;border:1px solid var(--line-strong);border-radius:18px;background:var(--panel);min-width:0}.docpill .fileic{color:var(--muted)}.docpill .nm{max-width:220px;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.docpill .state{display:inline-flex;align-items:center;gap:4px;font-size:12px;color:var(--muted);white-space:nowrap}.docpill .state.unsaved{color:var(--warning)}.docpill .pill{border:0;height:28px;padding:0 6px}.docpill .pill:hover{background:var(--hover)}.tag{display:inline-flex;align-items:center;gap:5px;height:24px;padding:0 10px;border-radius:12px;background:var(--hover);color:var(--muted);font-size:12px;white-space:nowrap}.tag.warn{background:var(--warning-soft);color:var(--warning)}.seg{display:inline-flex;margin-left:6px;padding:2px;border-radius:8px;background:var(--hover)}.seg button{padding:3px 12px;border:0;border-radius:6px;background:none;color:var(--muted)}.seg button:hover:not(:disabled):not([aria-pressed=true]){background:none;color:var(--fg)}.seg button[aria-pressed=true]{background:var(--panel);color:var(--fg);box-shadow:0 0 0 1px var(--line)}.pill{display:inline-flex;align-items:center;gap:6px;height:28px;padding:0 10px;border:1px solid var(--line-strong);border-radius:14px;background:none;white-space:nowrap}.pill .cnt{display:inline-flex;align-items:center;gap:1px;color:var(--warning);font-size:12px;font-variant-numeric:tabular-nums}.pill .pending{color:var(--warning)}.ob{display:inline-flex;align-items:center;gap:6px;height:30px;padding:0 10px;white-space:nowrap}.split,.split .menu{display:inline-flex}.split .save{display:inline-flex;align-items:center;gap:6px;height:30px;padding:0 12px;border-radius:6px 0 0 6px;font-weight:500}.split .dd{display:inline-grid;place-items:center;width:26px;height:30px;padding:0;border-radius:0 6px 6px 0;border-left:1px solid color-mix(in srgb,var(--accent-fg) 35%,transparent)}.split .dd .i{color:inherit}.split.clean .primary{background:var(--panel);border-color:var(--line-strong);color:var(--fg)}.split.clean .primary:hover:not(:disabled){background:var(--hover);filter:none}.split.clean .dd{border-left-color:var(--line-strong)}.avatar-btn{display:inline-flex;align-items:center;gap:4px;height:30px;padding:0 6px 0 2px;border:0;border-radius:15px;background:none}.avatar{display:inline-grid;place-items:center;width:26px;height:26px;border-radius:50%;background:var(--accent-soft);color:var(--accent);font-size:11px;font-weight:600}.avatar.big{width:32px;height:32px;font-size:12px}.avatar-btn.empty .avatar{background:var(--hover);color:var(--muted);border:1px dashed var(--line-strong)}.more{display:none}.badge{padding:1px 6px;border-radius:10px;background:var(--hover);color:var(--muted);font-size:11px}.badge.warning{background:var(--warning-soft);color:var(--warning)}.export-menu{position:relative}.dropdown{position:absolute;right:0;top:calc(100% + 4px);z-index:20;min-width:200px;padding:4px;background:var(--panel);border:1px solid var(--line);border-radius:6px;box-shadow:var(--shadow);display:flex;flex-direction:column}.dropdown button,.dropdown a{border:none;background:none;text-align:left;padding:5px 10px;border-radius:4px;color:var(--fg);text-decoration:none;display:block}.dropdown button:hover,.dropdown a:hover{background:var(--hover)}.dd-title{font-size:12px;color:var(--muted);padding:6px 10px 2px}.disk-banner{display:flex;align-items:center;gap:8px;padding:6px 12px;background:var(--warning-soft);border-bottom:1px solid var(--warning);color:var(--fg)}.loading{padding:40px;color:var(--muted)}.workspace{flex:1;min-height:0;display:grid;grid-template-columns:minmax(240px,320px) 1fr}.workspace.no-tree{grid-template-columns:1fr}.content{min-width:0;min-height:0;overflow:auto}.tree-panel{display:flex;flex-direction:column;min-height:0;border-right:1px solid var(--line);background:var(--panel)}.tree-search{padding:8px;border-bottom:1px solid var(--line);display:flex;flex-direction:column;gap:4px}.tree-search input{width:100%}.tree,.tree ul{list-style:none;margin:0;padding:0}.tree{overflow:auto;flex:1;padding:4px 0 16px}.tree-row{display:flex;align-items:center;gap:6px;min-height:26px;padding:2px 10px 2px 6px;cursor:pointer;white-space:nowrap;border-left:2px solid transparent}.tree-row.two{min-height:42px}.tree-row:hover{background:var(--hover)}.tree-row.selected{background:var(--accent-soft);border-left-color:var(--accent)}.tree-row.match .tlabel{background:var(--warning-soft);border-radius:3px}.twisty{display:inline-flex;width:12px;flex:none;color:var(--muted)}.twisty.hidden{visibility:hidden}.chev{width:12px;height:12px;flex:none;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}@media(prefers-reduced-motion:no-preference){.chev{transition:transform .12s ease}}.chev.open{transform:rotate(90deg)}.ticon{flex:none;color:var(--muted)}.tree-row.two .ticon{width:18px;height:18px}.ticon.device{color:var(--accent)}.ticon.frame.tx{color:var(--ok)}.ticon.frame.rx{color:var(--warning)}.ticon.frame:not(.tx):not(.rx){color:var(--info)}.tbody{display:flex;flex-direction:column;min-width:0;flex:1}.tline{display:flex;align-items:center;gap:4px;min-width:0}.tree-row.two .tlabel{font-weight:500}.tlabel{overflow:hidden;text-overflow:ellipsis}.tline2{display:flex;gap:10px;font-size:12px;color:var(--muted);white-space:nowrap;overflow:hidden}.tline2 .mono{font-size:11.5px}.tsub{color:var(--muted);margin-left:auto;padding-left:8px}.ident{color:var(--muted);font-family:var(--mono);font-size:.85em;margin-left:6px}.tree-row.link .tlabel{font-style:italic;color:var(--muted)}.link-mark{width:12px;height:12px;flex:none;fill:none;stroke:var(--muted);stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}.tree-row.included .tlabel{color:var(--muted)}.tbadge{width:14px;height:14px;flex:none;margin-left:4px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.tbadge.error{color:var(--error)}.tbadge.warning{color:var(--warning)}.tbadge.info{color:var(--info)}.tbadge.nested{opacity:.6}.tree-group{padding-right:10px}.tree-group button{display:flex;align-items:center;gap:6px;width:100%;min-height:26px;padding:0;border:0;background:none;color:var(--fg);font:inherit;font-size:12px;font-weight:500;text-align:left;cursor:pointer}.tree-group button:hover{background:var(--hover)}.tree-group button:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}.tree-group .chev{color:var(--muted)}.tree-group .dir{width:13px;height:13px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.tree-group.tx .dir{color:var(--ok)}.tree-group.rx .dir{color:var(--warning)}.tree-group .gcount{margin-left:auto;color:var(--muted);font-weight:400;font-variant-numeric:tabular-nums}.tree li.grp-tx,.tree li.grp-rx{position:relative}.tree li.grp-tx:before,.tree li.grp-rx:before{content:"";position:absolute;left:var(--rule);top:0;bottom:0;width:2px;border-radius:1px;pointer-events:none;background:color-mix(in srgb,var(--ok) 55%,var(--line))}.tree li.grp-rx:before{background:color-mix(in srgb,var(--warning) 55%,var(--line))}.node-editor{padding:14px 18px 32px;display:flex;flex-direction:column;gap:12px;max-width:1100px}.ne-head{display:flex;align-items:flex-start;gap:12px;justify-content:space-between;flex-wrap:wrap}.ne-head h2{font-size:18px;display:flex;align-items:center;gap:8px;margin-top:2px}.ne-actions{display:flex;gap:6px;flex-wrap:wrap}.crumbs{color:var(--muted);font-size:12px}.crumbs a{cursor:pointer}.crumbs a:hover{color:var(--accent);text-decoration:underline}.crumbs{display:flex;align-items:center;flex-wrap:wrap;gap:2px}.crumbs .sep{width:12px;height:12px;margin:0 2px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;color:var(--line-strong)}.crumbs a{padding:1px 4px;border-radius:4px;text-decoration:none}.crumbs a:hover{background:var(--hover);text-decoration:none}.crumbs a:last-child{color:var(--fg)}.vsep{width:1px;height:16px;background:var(--line-strong)}.inl{width:12px;height:12px;vertical-align:-2px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}button.icon .i{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.kind-badge{font-size:11px;font-weight:600;padding:2px 6px;border-radius:4px;background:var(--accent-soft);color:var(--accent)}.id-badge{font-size:13px;padding:1px 6px;border:1px solid var(--line-strong);border-radius:4px}.card{background:var(--panel);border:1px solid var(--line);border-radius:8px;padding:12px 14px}.card>h3{font-size:13px;margin-bottom:10px;display:flex;gap:8px;align-items:baseline}.card>h3 .card-actions{margin-left:auto;display:flex;gap:6px;align-self:center;font-weight:400}.card>h3.sub{margin-top:14px}.banner{padding:6px 10px;border-radius:6px;border:1px solid}.frame-route{margin:0;display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 6px}.frame-route a{cursor:pointer;color:var(--accent)}.frame-route a:hover{text-decoration:underline}.node-editor.workspace{max-width:1280px}.ne-plain{display:contents}.ne-split{display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:12px;align-items:start}.ne-main{display:flex;flex-direction:column;gap:12px;min-width:0}.ne-side{position:sticky;top:0;min-width:0;max-height:calc(100vh - 110px);overflow-y:auto}@media(max-width:1000px){.ne-split{grid-template-columns:minmax(0,1fr)}.ne-side{position:static;max-height:none}}.ne-head .i,.insp .i,.cap .i{width:14px;height:14px;flex:none;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.ne-actions .icon{padding:4px 6px}table.list tr.sel td{background:var(--accent-soft)}.sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.cap-wrap{position:relative;width:fit-content;margin-bottom:8px}.cap{display:inline-flex;align-items:stretch;border:1px solid var(--line);border-radius:999px;background:var(--panel);font-size:12px;overflow:hidden}.cap-seg{display:inline-flex;align-items:center;gap:6px;padding:3px 11px;cursor:pointer;color:inherit}.cap-seg+.cap-seg{border-left:1px solid var(--line)}button.cap-seg{border:0;border-left:1px solid var(--line);border-radius:0;background:none}.cap-seg:hover:not(.plain){background:var(--hover)}.cap-seg .u{color:var(--muted)}.cap-seg.tx{background:color-mix(in srgb,var(--ok) 14%,var(--panel));color:var(--ok);font-weight:600}.cap-seg.rx,button.cap-seg.rx{background:color-mix(in srgb,var(--warning) 14%,var(--panel));color:var(--warning);font-weight:600}.cap-seg.tx:hover:not(.plain),button.cap-seg.rx:hover:not(:disabled){background:color-mix(in srgb,currentColor 20%,var(--panel))}.cap .chev{width:12px;height:12px}.cap-menu{position:absolute;z-index:30;top:calc(100% + 4px);left:0;min-width:240px;max-height:320px;overflow-y:auto;background:var(--panel);border:1px solid var(--line);border-radius:8px;box-shadow:var(--shadow);padding:4px}.cap-menu h6{margin:4px 10px 2px;font-size:11.5px;font-weight:400;color:var(--muted)}.cap-menu h6.cap-add{margin-top:6px;padding-top:6px;border-top:1px solid var(--line)}.cap-item{display:flex;align-items:center;gap:8px;padding:4px 10px;border-radius:6px}.cap-item:hover{background:var(--hover)}.cap-item a{flex:1;cursor:pointer}.cap-item .icon{border:0;background:none;padding:2px 4px}.cap-item.add{cursor:pointer;color:var(--accent)}.cap-empty{margin:4px 10px}.card.insp{padding:8px 14px 12px}.insp-tabs{display:flex;gap:2px;border-bottom:1px solid var(--line-strong);margin-bottom:4px}.insp-tabs button{display:inline-flex;align-items:center;gap:4px;min-width:0;border:0;border-radius:6px 6px 0 0;background:none;padding:6px 10px;margin-bottom:-1px;border-bottom:2px solid transparent;color:var(--muted);white-space:nowrap}.insp-tabs button .muted{overflow:hidden;text-overflow:ellipsis}.insp-tabs button.on{color:var(--fg);font-weight:600;border-bottom-color:var(--accent)}.insp-tabs button:disabled{opacity:.5;cursor:default}.insp-tabs .swatch{margin-right:2px;flex:none}.insp .form-row{grid-template-columns:minmax(0,1fr);gap:0;padding:0;border-top:1px solid var(--line)}.insp .form-row:first-child{border-top:0}.insp .form-section{padding:0;font-size:13px;letter-spacing:0;text-transform:none;color:var(--fg)}.sec-toggle{width:100%;display:flex;align-items:center;gap:10px;border:0;background:none;padding:9px 4px;text-align:left;border-radius:6px;font-weight:600}.sec-toggle:hover:not(:disabled){background:var(--hover)}.sec-toggle .i{width:12px;height:12px;color:var(--muted);transition:transform .12s}.sec-toggle[aria-expanded=true] .i{transform:rotate(90deg)}.sec-toggle .nm{min-width:96px}.sec-toggle .sum{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--muted);font-weight:400}.insp .form-grid{grid-template-columns:repeat(2,minmax(0,1fr));padding:2px 4px 14px}.insp .form-grid>.field{grid-column:1 / -1}.insp .form-grid>.field.half,.insp .form-grid>.field.bool{grid-column:span 1}.insp .form-grid.pair{grid-template-columns:repeat(2,minmax(0,1fr))}.insp .req-note{margin:8px 4px 0}.insp-foot{display:flex;gap:8px;flex-wrap:wrap;padding-top:10px;margin-top:8px;border-top:1px solid var(--line)}.insp-foot .danger{margin-left:auto;color:var(--error)}@media(prefers-reduced-motion:reduce){.sec-toggle .i{transition:none}}.timeline{list-style:none;margin:0;padding:0 0 0 22px;position:relative}.timeline:before{content:"";position:absolute;left:5px;top:8px;bottom:8px;width:2px;background:var(--line);border-radius:2px}.tl-entry{position:relative;padding:2px 0 18px}.tl-entry:last-child{padding-bottom:2px}.tl-entry:before{content:"";position:absolute;left:-22px;top:6px;width:12px;height:12px;box-sizing:border-box;border-radius:50%;background:var(--panel);border:2px solid var(--accent)}.tl-entry.latest:before{background:var(--accent)}.tl-head{display:flex;align-items:baseline;gap:10px;flex-wrap:wrap}.tl-ver{border:0;background:none;padding:0;font-weight:600;font-size:14px;color:var(--fg);cursor:pointer}.tl-ver:hover{color:var(--accent);text-decoration:underline}.tl-who{margin-left:auto;display:inline-flex;gap:8px;align-items:baseline}.tl-who a{color:var(--muted)}.tl-changes{margin:6px 0 0;padding-left:18px}.tl-changes li{margin:2px 0}.empty-state{text-align:center;padding:34px 20px 38px}.empty-state .es-icon{width:44px;height:44px;margin:0 auto 10px;border-radius:50%;background:var(--accent-soft);color:var(--accent);display:grid;place-items:center}.empty-state .es-icon .i{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.empty-state h4{margin:0 0 4px;font-size:15px}.empty-state p{margin:0 auto 14px;max-width:54ch}.doc-tabs{margin:0 0 12px}.cap-seg.ok{background:color-mix(in srgb,var(--ok) 14%,var(--panel));color:var(--ok);font-weight:600}.cap-seg.plain{cursor:default}.insp-title{padding:6px 4px 8px;font-weight:600;border-bottom:1px solid var(--line-strong);margin-bottom:4px}table.exchange tr.grp td{padding:12px 6px 4px;font-weight:600;border-bottom:1px solid var(--line)}table.exchange tr.grp:first-child td,table.exchange thead+tbody tr.grp:first-child td{padding-top:6px}table.exchange tr.grp .gi{display:inline-flex;align-items:center;gap:8px}table.exchange tr.grp.tx .gi{color:var(--ok)}table.exchange tr.grp.rx .gi{color:var(--warning)}table.exchange tr.grp .muted{font-weight:400}table.exchange tr.none td{padding:8px 6px}.dir{display:inline-flex;vertical-align:-2px}.dir.tx{color:var(--ok)}.dir.rx{color:var(--warning)}.dir .i{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.exchange .icon .i,table.list .icon .i{width:12px;height:12px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round}table.exchange .icon,table.list td.act .icon{border:0;background:none;padding:2px 5px}.banner.error{background:var(--error-soft);border-color:var(--error)}.banner.warning{background:var(--warning-soft);border-color:var(--warning)}.banner .fix{margin-left:8px}.banner.info{background:var(--info-soft);border-color:var(--info)}.form-rows{display:flex;flex-direction:column}.form-row{display:grid;grid-template-columns:112px 1fr;gap:14px;padding:10px 0;border-top:1px solid var(--line)}.form-row:first-child{border-top:0;padding-top:0}.form-row:last-child{padding-bottom:0}.form-section{margin:0;padding-top:2px;font-size:11px;font-weight:600;letter-spacing:.04em;text-transform:uppercase;color:var(--muted)}.form-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(120px,1fr));gap:8px 12px}.form-grid>.field{grid-column:span 2}.form-grid>.field.half,.form-grid>.field.bool{grid-column:span 1}.field{display:flex;flex-direction:column;gap:3px;min-width:0}.form-grid>.field.wide{grid-column:1 / -1}.form-grid.pair{grid-template-columns:1fr 1fr}.form-grid.pair>.field.wide{grid-column:span 1}.field.bool{flex-direction:row-reverse;justify-content:flex-end;align-items:center;gap:6px;align-self:end;min-height:30px}.field.position-hint{justify-content:flex-end;padding-bottom:7px}@media(max-width:760px){.form-row{grid-template-columns:1fr;gap:6px}.form-grid>.field,.form-grid.pair>.field.wide{grid-column:1 / -1}}.field-label{font-size:11px;color:var(--muted)}.field input,.field select,.field textarea{width:100%}.field.error input,.field.error select{border-color:var(--error);background:var(--error-soft)}.field.warning input,.field.warning select{border-color:var(--warning);background:var(--warning-soft)}.field.missing input,.field.missing select{border-color:var(--warning);border-style:dashed}.field.error .field-label{color:var(--error)}.field.warning .field-label{color:var(--warning)}.field.flash input,.field.flash select{animation:field-flash 1.6s ease-out}@keyframes field-flash{0%,40%{box-shadow:0 0 0 3px var(--accent)}to{box-shadow:0 0 0 0 transparent}}.req{color:var(--error);margin-left:2px;font-weight:600}.req-note{font-size:11px;font-weight:400}.field-msg{font-size:11px}.field-msg.error{color:var(--error)}.field-msg.warning,.field-msg.missing{color:var(--warning)}.field-msg.info{color:var(--info)}.field-hint{font-size:11px;color:var(--muted)}.chips{display:flex;flex-wrap:wrap;gap:4px}.chips button.dev-chip{padding:2px 10px;border-radius:12px;font-size:12px;color:var(--muted)}.chips button.dev-chip.on{background:var(--accent-soft);border-color:var(--accent);color:var(--accent)}.chips button.dev-chip.unknown{border-color:var(--error);color:var(--error);background:var(--error-soft)}.help-tip{position:relative;display:inline-flex;align-items:center;justify-content:center;width:13px;height:13px;margin-right:4px;border:1px solid var(--muted);border-radius:50%;font-size:9px;font-weight:600;line-height:1;color:var(--muted);cursor:help;vertical-align:1px}.help-tip:hover,.help-tip.open,.help-tip:focus-visible{border-color:var(--accent);color:var(--accent)}.help-pop{display:none;position:absolute;z-index:30;top:18px;left:-6px;width:max-content;max-width:320px;padding:7px 9px;border:1px solid var(--line-strong);border-radius:5px;background:var(--panel);color:var(--fg);font-size:12px;font-weight:400;line-height:1.4;white-space:pre-line;box-shadow:0 4px 14px #0000002e;cursor:auto}.help-tip.flip .help-pop{left:auto;right:-6px}.help-tip:hover .help-pop,.help-tip.open .help-pop{display:block}.checkbox{height:27px;display:flex;align-items:center}.checkbox input{width:auto}table{border-collapse:collapse;width:100%}th{text-align:left;font-weight:600;font-size:11px;color:var(--muted);padding:4px 6px;border-bottom:1px solid var(--line)}td{padding:3px 6px;border-bottom:1px solid var(--line);vertical-align:top}table.list tr.clickable{cursor:pointer}table.list tr.clickable:hover{background:var(--hover)}table.list .act{width:1%;text-align:right;white-space:nowrap}.od-note{margin:0 0 8px}.od-scroll{overflow-x:auto}.od-table{table-layout:fixed;min-width:420px}.od-table .od-c-twisty{width:22px}.od-table .od-c-index{width:110px}.od-table .od-c-act{width:52px}.od-table td{vertical-align:middle;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.od-table .od-twisty{cursor:pointer;color:var(--muted);-webkit-user-select:none;user-select:none;padding:3px 0;text-align:center;text-overflow:clip}.od-table tr.od-area td{cursor:pointer;-webkit-user-select:none;user-select:none;font-weight:600;color:var(--muted);padding-top:12px;border-bottom:1px solid var(--line-strong)}.od-table tr.od-area td .mono{color:var(--accent);margin-right:4px}.od-table tr.od-area:hover td{background:var(--hover)}.od-table tr.od-group td{font-weight:600}.od-table tr.od-entry td:nth-child(4){padding-left:22px}.od-table .od-name{cursor:pointer}.od-table .od-name:hover{color:var(--accent);text-decoration:underline}.od-table input.od-rename{width:100%;padding:0 4px;border:none;outline:none;background:var(--hover)}.od-table tr.error .od-name{color:var(--error)}.od-table tr.warning .od-name{color:var(--warning)}.od-table tr.od-inherited td,.od-table tr.od-standard td,.od-table tr.od-unused td{color:var(--muted)}.od-table .od-badge{font-size:11px;margin-left:6px}.od-table .act{text-align:right}.od-table .od-icon+.od-icon{margin-left:8px}.od-table .od-icon{display:inline-flex;align-items:center;justify-content:center;vertical-align:middle;box-sizing:border-box;width:16px;height:16px;min-width:0;margin:0;padding:0;border:none;border-radius:0;background:none;color:var(--muted);cursor:pointer}.od-table .od-icon svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round}.od-table .od-icon svg .od-fill{fill:currentColor;stroke:none}.od-table button.od-icon:hover:not(:disabled){background:none;color:var(--accent)}.od-table input.od-icon{appearance:none;-webkit-appearance:none;border:1.8px solid currentColor;border-radius:3px}.od-table input.od-icon:hover:not(:disabled){color:var(--accent)}.od-table input.od-icon:checked{border-color:var(--accent);background:var(--accent) no-repeat center / 12px 12px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3.2 3.2L13 4.8' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")}.od-table input.od-icon:focus-visible,.od-table button.od-icon:focus-visible{outline:2px solid var(--accent);outline-offset:1px}.od-table .od-lock{cursor:default}.swatch{display:inline-block;width:12px;height:12px;border-radius:3px;border:1px solid var(--line-strong)}.subtable header{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}.subtable .header-actions{margin-left:auto;display:flex;gap:6px;align-items:center}.structure-import{position:relative;display:inline-flex}.structure-import-menu{position:absolute;right:0;top:calc(100% + 4px);z-index:20;min-width:180px;display:flex;flex-direction:column;padding:4px;background:var(--panel);border:1px solid var(--line);border-radius:8px;box-shadow:var(--shadow)}.structure-import-menu button{border:none;background:none;text-align:left;padding:5px 10px;border-radius:6px;white-space:nowrap}.subtable td input{width:100%;border-color:transparent;background:transparent}.subtable td input:hover{border-color:var(--line)}.subtable td input:focus{background:var(--panel)}.subtable .num{width:90px}.subtable .act{width:64px;text-align:right;white-space:nowrap}.subtable .pick{width:1%}.subtable .pick input,.subtable td.pick input{width:auto}.subtable .flag-shift{margin-left:auto;margin-right:8px;display:flex;gap:6px;align-items:center;font-size:12px}.subtable tr.error td:first-child{box-shadow:inset 3px 0 var(--error)}.subtable tr.warning td:first-child{box-shadow:inset 3px 0 var(--warning)}.bitgrid-wrap{display:flex;flex-direction:column;gap:10px}.mux-bar{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.mux-label{color:var(--muted)}.mux-label b{color:var(--fg);font-weight:600}.mux-seg{display:inline-flex;flex-wrap:wrap;border:1px solid var(--line-strong);border-radius:7px;overflow:hidden;background:var(--panel)}.mux-seg button{display:inline-flex;align-items:center;gap:8px;border:0;border-radius:0;background:none;padding:4px 12px}.mux-seg button+button{border-left:1px solid var(--line-strong)}.mux-seg button.on{background:var(--accent-soft);color:var(--accent);font-weight:600}.mux-seg .mux-v{font-size:11.5px;color:var(--muted);background:var(--hover);border-radius:4px;padding:0 5px;font-weight:400}.mux-seg button.on .mux-v{color:var(--accent);background:color-mix(in srgb,var(--accent) 16%,transparent)}.bitgrid{display:grid;grid-template-columns:52px repeat(8,minmax(58px,1fr));gap:0;position:relative;-webkit-user-select:none;user-select:none}.bg-byte,.bg-head.corner{grid-column:1;display:flex;align-items:center;color:var(--muted);font-family:var(--mono);font-size:12px}.bg-byte{padding-left:6px}.bg-head{grid-row:1;text-align:center;font-size:11.5px;line-height:26px;color:var(--muted);font-variant-numeric:tabular-nums}.bg-head.edge{color:var(--fg);font-weight:600}.bg-head.corner{font-family:inherit;font-size:11.5px;padding-left:6px}.bg-cell{position:relative;padding:2px;background-clip:content-box;border-radius:6px;cursor:crosshair;transition:filter .08s}.bg-cell.empty{background-color:var(--grid-empty)}.bg-cell:not(.empty){cursor:grab;border-radius:0;padding-left:0;padding-right:0}.bg-cell.run-l{padding-left:2px;border-top-left-radius:8px;border-bottom-left-radius:8px}.bg-cell.run-r{padding-right:2px;border-top-right-radius:8px;border-bottom-right-radius:8px}.bg-cell:hover{filter:brightness(.94)}.bitgrid.has-selection .bg-cell:not(.empty):not(.selected),.bitgrid.has-selection .bg-label:not(.mine),.bitgrid.has-selection .bg-field-label:not(.mine){opacity:.55}.bg-cell.selected:after{content:"";position:absolute;inset:0;pointer-events:none;z-index:2;border:0 solid var(--accent);border-top-width:2px;border-bottom-width:2px}.bg-cell.selected.run-l:after{border-left-width:2px;border-top-left-radius:8px;border-bottom-left-radius:8px}.bg-cell.selected.run-r:after{border-right-width:2px;border-top-right-radius:8px;border-bottom-right-radius:8px}.bg-cell.flag-selected{box-shadow:inset 0 0 0 2px var(--accent);cursor:grab}.bg-cell.synthetic{cursor:pointer}.bg-cell.conflict{background-image:repeating-linear-gradient(45deg,rgba(198,40,40,.35) 0 6px,transparent 6px 12px)}.bg-cell.preview{box-shadow:inset 0 0 0 2px var(--accent);background-color:var(--accent-soft)}.bg-cell.preview-bad{box-shadow:inset 0 0 0 2px var(--error)}.bg-cell.field-bit{background-color:color-mix(in srgb,var(--sig) 38%,var(--panel))}.bg-cell.field-bit:not(.no-flag):before{content:"";position:absolute;inset:12px 0 5px;pointer-events:none;box-sizing:border-box;background:var(--sig);border:1px solid color-mix(in srgb,var(--sig) 70%,#000);border-left-width:0;border-right-width:0}.bg-cell.field-bit.pill-l:before{left:5px;border-left-width:1px;border-top-left-radius:4px;border-bottom-left-radius:4px}.bg-cell.field-bit.pill-r:before{right:5px;border-right-width:1px;border-top-right-radius:4px;border-bottom-right-radius:4px}.bg-cell.field-bit:not(.pill-l):before{left:-1px}.bg-cell.field-bit:not(.pill-r):before{right:-1px}.bg-cell.field-bit.flag-selected{box-shadow:none}.bg-cell.field-bit.flag-selected:before{border-color:var(--accent);border-top-width:2px;border-bottom-width:2px}.bg-cell.field-bit.flag-selected.pill-l:before{border-left-width:2px}.bg-cell.field-bit.flag-selected.pill-r:before{border-right-width:2px}.bg-field-label{position:relative;z-index:1;pointer-events:none;display:flex;align-items:flex-start;padding:3px 12px 0;font-size:10.5px;line-height:12px;color:#1d2329a6;overflow:hidden}.bg-field-label span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.bg-label.on-pill{padding-top:13px;padding-bottom:5px}.grip{position:absolute;top:0;bottom:0;width:8px;background:transparent;cursor:ew-resize;z-index:3}.grip.lo{right:0}.grip.hi{left:0}.bg-label{position:relative;z-index:1;pointer-events:none;display:flex;align-items:center;justify-content:center;padding:0 6px;font-size:12px;color:#1d2329;overflow:hidden}.bg-label span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.bg-label.selected{font-weight:600}.bg-lock{position:absolute;top:5px;right:7px;width:12px;height:12px;fill:none;stroke:currentColor;stroke-width:1.5;opacity:.7}.od-kind{float:right;width:auto;margin-left:12px;padding:2px 6px;font-size:11px}.bg-label.conflict{color:#b71c1c;font-weight:700;outline:2px solid var(--error);outline-offset:-2px}.bitgrid-info{display:flex;align-items:center;gap:16px;flex-wrap:wrap;min-height:46px;padding:8px 12px;background:var(--accent-soft);border-radius:8px}.bitgrid-info.hint{background:none;padding-left:0;padding-right:0;color:var(--muted)}.bitgrid-info .sw{width:10px;align-self:stretch;border-radius:3px;flex:none}.bitgrid-info .who{display:flex;flex-direction:column;min-width:120px}.bitgrid-info .who b{font-weight:600}.bitgrid-info dl{display:flex;gap:22px;margin:0;flex-wrap:wrap}.bitgrid-info dt{color:var(--muted);font-size:11.5px}.bitgrid-info dd{margin:0}.card>h3.layout-head{align-items:center;margin-bottom:12px;min-height:28px}.layout-head .chip{font-family:var(--mono);font-size:12px;font-weight:400;padding:1px 7px;background:var(--hover);border:1px solid var(--line);border-radius:5px}.layout-head .layout-meta{margin-left:auto;display:flex;align-items:center;gap:14px;font-weight:400}.layout-head .free{display:inline-flex;align-items:center;gap:6px;color:var(--muted)}.layout-head .i{width:14px;height:14px;flex:none;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.view-switch{display:inline-flex;border:1px solid var(--line-strong);border-radius:6px;overflow:hidden}.view-switch button{border:0;border-radius:0;padding:3px 11px;background:none}.view-switch button+button{border-left:1px solid var(--line-strong)}.view-switch button.on{background:var(--accent-soft);color:var(--accent);font-weight:600}.ribbon{display:flex;flex-direction:column;gap:14px;-webkit-user-select:none;user-select:none}.rb{display:grid;position:relative}.rb-n{font-size:10.5px;color:var(--muted);text-align:center;font-variant-numeric:tabular-nums}.rb-n.b0{color:var(--fg);font-weight:600}.rb-byte{background:var(--grid-empty);margin:0 1px;border-radius:6px}.rb-byte.odd{background:color-mix(in srgb,var(--grid-empty) 70%,var(--panel))}.rb-sig{position:relative;z-index:1;margin:0 1px;border-radius:6px;padding:0 3px;display:flex;flex-direction:column;align-items:center;justify-content:center;overflow:hidden;color:#1d2329;cursor:pointer;transition:opacity .12s}.rb-sig span{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px}.rb-sig small{font-size:10.5px;opacity:.75;font-family:var(--mono)}.ribbon.has-selection .rb-sig:not(.sel){opacity:.55}.rb-sig.sel{box-shadow:0 0 0 2px var(--accent);z-index:2;font-weight:600}.rb-bl{font-size:11.5px;color:var(--muted);padding-top:5px;margin:4px 1px 0;border-top:1px solid var(--line-strong);font-family:var(--mono)}.yaml-editor{display:flex;flex-direction:column;height:100%}.yaml-bar{display:flex;align-items:center;gap:8px;padding:6px 12px;border-bottom:1px solid var(--line);background:var(--panel)}.yaml-file{max-width:40%}.yaml-hint,.yaml-problem{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.yaml-problem{display:flex;align-items:center;gap:8px;color:var(--error)}.yaml-problem .link{color:inherit;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:left}.yaml-body{flex:1;display:flex;min-height:0}.gutter{overflow:hidden;padding:6px 0;min-width:52px;text-align:right;color:var(--muted);background:var(--panel);border-right:1px solid var(--line)}.gutter div{padding-right:8px}.gutter .error{background:var(--error-soft);color:var(--error);font-weight:700}.gutter .warning{background:var(--warning-soft);color:var(--warning)}.gutter .info{color:var(--info)}.gutter .in-node{box-shadow:inset 3px 0 var(--accent);color:var(--fg)}.yaml-code{flex:1;position:relative;min-width:0;overflow:hidden;background:var(--panel)}.yaml-body textarea,.yaml-hl{position:absolute;inset:0;width:100%;height:100%;margin:0;border:none;border-radius:0;padding:6px 10px;white-space:pre;tab-size:2;overflow:auto}.yaml-body textarea{resize:none;background:transparent;color:transparent;caret-color:var(--fg)}.yaml-body textarea::selection{background:color-mix(in srgb,var(--accent) 30%,transparent)}.yaml-hl{overflow:hidden;color:var(--fg);background:transparent;pointer-events:none}.yaml-hl code{font:inherit;display:inline-block;padding:0 40px 40px 0}.yaml-suggest{position:absolute;z-index:5;min-width:220px;max-width:420px;background:var(--panel);border:1px solid var(--line-strong);border-radius:6px;box-shadow:var(--shadow);font-size:13px}.yaml-suggest ul{list-style:none;margin:0;padding:2px 0;max-height:176px;overflow:auto}.yaml-suggest li{display:flex;justify-content:space-between;gap:16px;padding:2px 8px;cursor:pointer;white-space:nowrap}.yaml-suggest li.active{background:var(--accent-soft)}.yaml-suggest-doc{border-top:1px solid var(--line);padding:4px 8px;color:var(--muted)}.yaml-node{position:absolute;left:0;right:0;background:var(--accent-soft);pointer-events:none}.y-key{color:var(--y-key)}.y-str{color:var(--y-str)}.y-num,.y-bool{color:var(--y-num)}.y-comment{color:var(--muted);font-style:italic}.y-punct{color:var(--muted)}.y-anchor,.y-tag{color:var(--y-tag)}.history-changes{display:flex;flex-direction:column;gap:6px}.history-change{display:flex;align-items:flex-start;gap:6px}.history-change .field{flex:1}.history-change-act{display:flex;gap:2px;padding-top:18px}.history-add{display:flex;gap:6px;margin-top:4px}.history-add input{flex:1}.diag-panel{border-top:1px solid var(--line-strong);background:var(--panel);max-height:32vh;display:flex;flex-direction:column}.diag-panel header{display:flex;align-items:center;gap:6px;min-height:28px;padding:0 8px;font-size:12px}.diag-panel header>button{display:inline-flex;align-items:center;gap:5px;padding:2px 6px;border:0;border-radius:4px;background:none;color:inherit;font:inherit;cursor:pointer}.diag-panel header>button:hover{background:var(--hover)}.diag-panel header>button:focus-visible{outline:2px solid var(--accent);outline-offset:1px}.diag-panel .i{width:14px;height:14px;flex:none;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.diag-toggle{margin-right:6px}.diag-toggle b{font-weight:600}.diag-toggle .chev{color:var(--muted)}.diag-toggle .chev.up{transform:rotate(-90deg)}.diag-count{font-variant-numeric:tabular-nums}.diag-count b{font-weight:600}.diag-count.error{color:var(--error)}.diag-count.warning{color:var(--warning)}.diag-count.info{color:var(--info)}.diag-count.zero,.diag-count.off{color:var(--muted)}.diag-count.off .i,.diag-count.off b{opacity:.55}.diag-count-name{color:var(--muted)}.diag-first{min-width:0;flex:1;justify-content:flex-start;color:var(--muted);text-align:left}.diag-first .msg{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.diag-first:hover{color:var(--fg)}.ok{color:var(--ok)}.diag-panel header.clean .diag-count{order:3;margin-left:auto}.diag-valid{display:inline-flex;align-items:center;gap:6px;color:var(--ok)}.diag-panel ul{list-style:none;margin:0;padding:0;overflow:auto;border-top:1px solid var(--line)}.diag-panel li{display:grid;grid-template-columns:16px 64px 110px minmax(0,1fr) minmax(0,260px);align-items:center;gap:8px;min-height:26px;padding:2px 12px 2px 9px;border-left:3px solid transparent;border-top:1px solid var(--line);cursor:pointer}.diag-panel li:first-child{border-top:0}.diag-panel li:hover{background:var(--hover)}.diag-panel li.error{border-left-color:var(--error)}.diag-panel li.warning{border-left-color:var(--warning)}.diag-panel li.info{border-left-color:var(--info)}.diag-panel li.error .lvl{color:var(--error)}.diag-panel li.warning .lvl{color:var(--warning)}.diag-panel li.info .lvl{color:var(--info)}.diag-panel li.empty{display:block;border-left-color:transparent;cursor:default}.diag-panel .path{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@media(prefers-reduced-motion:no-preference){.diag-toggle .chev{transition:transform .12s ease}}.modal-backdrop{position:fixed;inset:0;background:#0a101673;display:flex;align-items:center;justify-content:center;z-index:50}.modal{background:var(--panel);border-radius:10px;box-shadow:var(--shadow);width:min(640px,94vw);max-height:90vh;display:flex;flex-direction:column}.modal.wide{width:min(1100px,96vw);height:88vh}.modal header{display:flex;align-items:center;gap:8px;padding:10px 14px;border-bottom:1px solid var(--line)}.modal header h3{flex:1;font-size:15px}.modal-body{padding:12px 14px;overflow:auto;flex:1;display:flex;flex-direction:column;gap:10px}.preview-frame{flex:1;width:100%;border:1px solid var(--line);border-radius:6px;background:#fff}.md-preview{flex:1;margin:0;padding:10px;background:var(--bg);border-radius:6px;overflow:auto;white-space:pre-wrap}.diff-source{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.diff-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(320px,1fr));gap:10px}.diff-list section{border:1px solid var(--line);border-radius:6px;padding:8px 10px}.diff-list ul{margin:4px 0 0;padding-left:18px}.history-form{border-top:1px solid var(--line);padding-top:10px;display:flex;flex-direction:column;gap:8px;align-items:flex-start}.history-form .form-grid{width:100%}.toasts{position:fixed;right:16px;bottom:16px;display:flex;flex-direction:column;gap:8px;z-index:60}.toast{padding:8px 12px;border-radius:6px;box-shadow:var(--shadow);max-width:420px;background:var(--panel);border-left:4px solid var(--info)}.toast.error{border-left-color:var(--error)}@media(max-width:760px){.workspace{grid-template-columns:1fr;grid-template-rows:40% 1fr}.tree-panel{border-right:none;border-bottom:1px solid var(--line)}}@media(max-width:1320px){.exp-label{display:none}}@media(max-width:1150px){.save-label,.git-name{display:none}.split .save{padding:0 8px}}@media(max-width:1000px){.topbar{grid-template-columns:auto minmax(0,1fr) auto}.tb-center{justify-content:center}.topbar .brandmark-word,.opt-hist,.opt-refresh{display:none}.menu.opt-export>.ob,.menu.opt-user>.avatar-btn{display:none}.menu.opt-export,.menu.opt-user{position:static}.more{display:block}}@media(max-width:680px){.menu.opt-git>.pill{display:none}.menu.opt-git{position:static}.docpill .vsep{display:none}.docpill{padding-right:14px}}@media(max-width:520px){.opt-seg{display:none}.docpill .nm{max-width:120px}}.brandmark{display:inline-flex;align-items:center;gap:.4em;font-size:15px;line-height:1}.brandmark-icon{width:1.45em;height:1.45em;flex:none}.brandmark-word{font-family:Sora Wordmark,Segoe UI,system-ui,sans-serif;font-weight:800;letter-spacing:-.01em}.brandmark-map{color:var(--brand-map)}.brandmark-can{color:var(--brand-can)}.menu{position:relative}.dropdown kbd{margin-left:auto;padding-left:16px;font-family:var(--mono);font-size:11px;color:var(--muted)}.dropdown button{display:flex;align-items:baseline;gap:6px;width:100%}.dropdown button:disabled{opacity:.45}.dd-dir{font-size:11px;overflow:hidden;text-overflow:ellipsis;max-width:220px}.dd-sep{height:1px;background:var(--line);margin:4px 6px}.dd-note{font-size:12px;color:var(--muted);padding:4px 10px;max-width:280px}.dd-row{display:flex;align-items:stretch}.dd-row>:first-child{flex:1;min-width:0;display:flex;align-items:baseline;gap:6px}.dropdown .dd-dl{flex:none;width:30px;text-align:center;padding:5px 0;color:var(--muted)}.dropdown .dd-dl:hover{color:var(--accent)}.export-menu{min-width:220px}.dd-lang{align-items:center;gap:8px;padding:4px 10px;font-size:12px;color:var(--muted)}.dd-lang select{flex:1}.git-menu{min-width:280px}.git-head{padding:6px 10px;display:flex;flex-direction:column;gap:2px;font-size:12px}.git-head .git-last{max-width:260px;white-space:nowrap}.git-warn{color:var(--warning)}.git-log{width:100%;border-collapse:collapse;font-size:13px}.git-log td{padding:4px 6px;border-top:1px solid var(--line);vertical-align:top}.git-log td.nowrap{white-space:nowrap}.git-log .git-log-subject{width:100%}.git-log .badge{margin-right:4px}.checkbox.wide{grid-column:1 / -1;gap:6px}a.gh{color:var(--accent);margin-left:4px}.start{flex:1;display:flex;align-items:flex-start;justify-content:center;padding:8vh 16px;overflow:auto}.start-grid{width:min(860px,100%);display:grid;grid-template-columns:minmax(0,300px) minmax(0,1fr);gap:20px 32px;align-items:start}.start-side h1{margin:0 0 20px;display:flex;align-items:center;gap:10px}.start-actions{display:grid;gap:8px}.start-act{display:grid;grid-template-columns:32px minmax(0,1fr);gap:10px;align-items:center;text-align:left;padding:10px 12px;white-space:normal;border-radius:8px;border-color:var(--line)}.start-act:hover:not(:disabled){border-color:var(--line-strong)}.start-act b{display:block;font-weight:600}.start-act .d{display:block;color:var(--muted);font-size:12px}.start-act .ic{width:32px;height:32px;border-radius:8px;display:grid;place-items:center;background:var(--accent-soft);color:var(--accent)}.start-act.main{border-color:var(--accent)}.start-act.main .ic{background:var(--accent);color:var(--accent-fg)}.start-act .i{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}.start-files{min-width:0}.start-files h2{font-size:13px;font-weight:600;margin:0 0 10px;padding:4px 0}.start-files .structure-tabs{margin-bottom:10px}.start-list{list-style:none;margin:0;padding:0;border:1px solid var(--line);border-radius:8px;background:var(--panel);overflow:hidden}.start-list li+li{border-top:1px solid var(--line)}.start-list button{width:100%;display:grid;grid-template-columns:16px minmax(0,1fr);gap:10px;align-items:center;padding:8px 12px;border:0;border-radius:0;background:none;text-align:left;white-space:normal}.start-list button:hover{background:var(--hover)}.start-list .i{width:16px;height:16px;color:var(--muted);fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}.start-list .body{min-width:0;display:flex;flex-direction:column}.start-list .nm{font-weight:600}.start-list .pt{color:var(--muted);font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.start-links{grid-column:1 / -1;display:flex;gap:16px;flex-wrap:wrap;margin:12px 0 0;font-size:12px;color:var(--muted)}.start-links a{color:inherit;text-decoration:none}.start-links a:hover{color:var(--fg);text-decoration:underline;text-underline-offset:2px}@media(max-width:720px){.start-grid{grid-template-columns:minmax(0,1fr)}}.fd{display:flex;gap:14px;height:100%;min-height:0}.fd-recent{width:230px;flex:none;display:flex;flex-direction:column;gap:4px;overflow:auto}.fd-recent h4{margin-bottom:4px}.fd-recent-item{flex-direction:column;align-items:flex-start;gap:0;text-align:left;white-space:normal;border-color:var(--line)}.fd-recent-item span{font-size:11px;word-break:break-all}.fd-main{flex:1;min-width:0;display:flex;flex-direction:column;gap:8px}.fd-nav{display:flex;gap:6px;align-items:center}.fd-path{flex:1}.fd-drive{width:auto}.fd-list{flex:1;min-height:160px;overflow:auto;border:1px solid var(--line);border-radius:6px;padding:4px 0}.fd-row{display:grid;grid-template-columns:20px 1fr 80px 130px;gap:8px;align-items:center;padding:3px 10px;cursor:pointer;-webkit-user-select:none;user-select:none}.fd-row:hover{background:var(--hover)}.fd-row.sel{background:var(--accent-soft)}.fd-row .fd-ico{color:var(--muted)}.fd-row.dir .fd-ico{color:var(--accent)}.fd-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.fd-row>span:nth-child(3),.fd-row>span:nth-child(4){font-size:11px;text-align:right}.fd-list>p{padding:6px 10px;margin:0}.fd-actions{display:flex;gap:8px;align-items:center}.fd-target{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dropdown.left{left:0;right:auto;min-width:280px}.dropdown .dd-icon{display:flex;align-items:center;gap:10px}.dropdown .dd-icon .i{width:16px;height:16px;flex:none;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;color:var(--muted)}.dropdown .gap{width:16px;flex:none}.dropdown .radio.on{background:var(--accent-soft);color:var(--accent)}.dropdown .radio.on .i{color:inherit}.dropdown .dd-ver{padding:5px 10px;font-size:12px;color:var(--muted)}.dropdown .dd-ver:hover{color:var(--fg);text-decoration:underline}.user-menu{min-width:240px}.dropdown .who{display:flex;align-items:center;gap:10px;padding:6px 10px}.who-text{display:flex;flex-direction:column;line-height:1.3;min-width:0}.logo-row{display:flex;gap:14px;align-items:flex-start;margin-bottom:12px}.logo-box{width:200px;height:90px;flex:none;border:1px solid var(--line);border-radius:6px;background:#fff;display:flex;align-items:center;justify-content:center;padding:6px;overflow:hidden}.logo-box.empty{background:var(--bg);border-style:dashed}.logo-box img{max-width:100%;max-height:100%;object-fit:contain}.logo-actions{display:flex;flex-direction:column;gap:4px;min-width:0}.row-actions{display:flex;gap:6px;margin-top:4px}.sub-h{font-size:12px;margin:14px 0 8px;color:var(--muted);font-weight:600}.sign-grid{grid-template-columns:repeat(auto-fill,minmax(150px,1fr))}.subtable.agree{margin-top:10px}.tpl-pick{display:flex;align-items:center;gap:6px;font-size:12px;color:var(--muted)}.tpl-pick select{min-width:240px}.tpl-desc{margin:0;font-size:12px}.preview-wrap{flex:1;position:relative;display:flex}.preview-loading{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;pointer-events:none}a.primary-link{background:var(--accent);border-color:var(--accent);color:var(--accent-fg)}.inline-rename{display:inline-flex;flex-direction:column;min-width:0;flex:1}.inline-rename input{font:inherit;padding:1px 4px;min-width:8em}.inline-rename input.invalid{border-color:var(--error)}.inline-rename .field-msg{font-size:11px;font-weight:400}h2 .renamable{cursor:text;border-radius:4px}h2 .renamable:hover{background:var(--hover)}h2 .renamable.secondary{color:var(--muted)}.suggest{position:relative;display:flex}.suggest>input{flex:1;padding-right:22px}.suggest-toggle{position:absolute;right:1px;top:1px;bottom:1px;width:20px;padding:0;border:0;background:transparent;color:var(--muted);cursor:pointer;font-size:11px}.suggest-toggle:hover{color:var(--fg)}.suggest-list{position:absolute;z-index:20;left:0;right:0;top:100%;margin-top:2px;display:grid;grid-template-columns:repeat(auto-fill,minmax(56px,1fr));gap:2px;padding:4px;max-height:min(180px,33vh);overflow-y:auto;background:var(--panel);border:1px solid var(--line-strong);border-radius:5px;box-shadow:var(--shadow)}.suggest-list button{padding:3px 4px;border:0;border-radius:3px;background:transparent;color:var(--fg);font:inherit;font-size:12px;cursor:pointer;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.suggest-list button:hover{background:var(--hover)}.suggest-list button.current{background:var(--accent-soft);font-weight:600}.structure-nav{position:relative;z-index:1}.structure-bar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:12px}.structure-bar .spacer{flex:1}.structure-tabs{display:inline-flex;gap:2px;padding:3px;max-width:100%;overflow-x:auto;background:var(--hover);border:1px solid var(--line);border-radius:8px}.structure-tabs .tab{border:0;background:none;border-radius:6px;padding:4px 12px;color:var(--muted);white-space:nowrap}.structure-tabs .tab:hover:not(.active){background:none;color:var(--fg)}.structure-tabs .tab.active{background:var(--panel);color:var(--fg);font-weight:600;box-shadow:0 0 0 1px var(--line)}.structure-tabs .tab.active:hover{background:var(--panel)}.tab-add .i{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round}.tab-add.active{background:var(--hover)}.structure-nav .structure-add{margin:10px 0 14px}.structure-add{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-top:12px}.structure-add input{flex:1;min-width:110px}.structure-values input:not([type=checkbox]){width:100%;min-width:140px}.od-table .od-dev{text-align:center}.od-table th.od-dev{font-size:11px;font-weight:600}.pill.update{border-color:var(--accent);background:var(--accent-soft);color:var(--accent);font-size:12px;font-weight:600}.pill.update:hover{background:var(--accent-soft);filter:brightness(.97)}.pill.update.ready{background:var(--accent);color:var(--accent-fg)}.pill.update.err{border-color:var(--error);background:var(--error-soft);color:var(--error)}.pill.update .i{color:inherit}.pill.update .pct{font-variant-numeric:tabular-nums}.pill.update .ring{width:14px;height:14px;flex:none;position:relative;border-radius:50%;background:conic-gradient(var(--accent) calc(var(--p, 0) * 100%),var(--line-strong) 0)}.pill.update .ring:after{content:"";position:absolute;inset:3px;border-radius:50%;background:var(--accent-soft)}@media(max-width:1600px){.pill.update .upd-label{display:none}.pill.update{padding:0 8px}}@media(max-width:1600px){.pill.update .pct{margin-left:0}}.dropdown.update-pop{width:380px;max-width:calc(100vw - 24px);padding:0;gap:0}.update-pop .up-body{padding:12px 14px}.update-pop h4{margin:0 0 2px;font-size:13px}.update-pop .up-meta{display:flex;flex-wrap:wrap;gap:2px 12px;font-size:12px;color:var(--muted)}.update-pop ul{margin:8px 0 0;padding-left:16px}.update-pop li+li{margin-top:2px}.update-pop p{margin:6px 0 0}.update-pop .up-row{display:flex;align-items:center;gap:6px;color:var(--muted);font-size:12px}.update-pop .up-row .i{width:14px;height:14px;flex:none;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}.update-pop .up-acts{display:flex;flex-wrap:wrap;gap:6px;padding:10px 14px 12px;border-top:1px solid var(--line)}.update-pop .up-acts button,.update-pop .up-acts a{display:inline-flex;align-items:center;gap:6px;width:auto;padding:4px 10px;border:1px solid var(--line-strong);border-radius:5px;background:var(--panel);text-align:center}.update-pop .up-acts button:hover:not(:disabled),.update-pop .up-acts a:hover{background:var(--hover)}.update-pop .up-acts .primary{background:var(--accent);border-color:var(--accent);color:var(--accent-fg)}.update-pop .up-acts .primary:hover:not(:disabled){background:var(--accent);filter:brightness(1.1)}.update-pop .up-acts .link{border-color:transparent;background:none;color:var(--accent)}.update-pop .up-acts .link:hover{background:var(--accent-soft)}.update-pop .up-acts .i{width:14px;height:14px;color:inherit;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}.update-pop .bar{position:relative;overflow:hidden;height:4px;margin-top:10px;border-radius:2px;background:var(--line)}.update-pop .bar i{position:absolute;inset:0;background:var(--accent);transform-origin:left;transform:scaleX(var(--p, 0))}@media(prefers-reduced-motion:no-preference){.update-pop .bar i{transition:transform .14s linear}}.update-pop .cmd{display:flex;align-items:center;gap:6px;margin-top:8px;padding:4px 4px 4px 10px;border:1px solid var(--line);border-radius:5px;background:var(--bg)}.update-pop .cmd code{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;font-family:var(--mono);font-size:12px}.update-pop .cmd button{width:auto;flex:none;padding:2px 8px;border:1px solid var(--line-strong);background:var(--panel)}
|