diff --git a/.github/nightly-signing-policy.json b/.github/nightly-signing-policy.json new file mode 100644 index 0000000000..f59894c462 --- /dev/null +++ b/.github/nightly-signing-policy.json @@ -0,0 +1,135 @@ +{ + "schema": "craft-nightly-release-policy/v3", + "repository": "storytold/vectorcraft", + "repository_id": 1398097510, + "producer_workflow_id": null, + "producer_workflow_path": ".github/workflows/nightly.yml", + "producer_tooling_revision": "605d58766e8f536564da8fc81d3676ac86816dea", + "producer_workflow_ref": "storytold/craft-common-actions/.github/workflows/nightly-unsigned.yml@605d58766e8f536564da8fc81d3676ac86816dea", + "signer_workflow_path": ".github/workflows/nightly-sign.yml", + "signer_tooling_revision": "605d58766e8f536564da8fc81d3676ac86816dea", + "release_branch": "release", + "manual_actors": [ + "bflatastic", + "dylanmtaylor", + "echelon", + "FredApps", + "skylartaylor" + ], + "max_age_seconds": 86400, + "candidate_policy": { + "schema": "craft-nightly-candidate-policy/v3", + "epoch": "vectorcraft-nightly-20261124", + "repository": "storytold/vectorcraft", + "branch": "main", + "required_workflows": [ + { + "workflow_id": 380135806, + "workflow_path": ".github/workflows/ci.yml", + "jobs": [ + { + "name": "gate / select legs", + "app_id": 15368, + "applicability": "required" + }, + { + "name": "gate / cache warm (ubuntu-24.04)", + "app_id": 15368, + "applicability": "required" + }, + { + "name": "gate / test 1/5 (ubuntu-24.04)", + "app_id": 15368, + "applicability": "required" + }, + { + "name": "gate / test 2/5 (ubuntu-24.04)", + "app_id": 15368, + "applicability": "required" + }, + { + "name": "gate / test 3/5 (ubuntu-24.04)", + "app_id": 15368, + "applicability": "required" + }, + { + "name": "gate / test 4/5 (ubuntu-24.04)", + "app_id": 15368, + "applicability": "required" + }, + { + "name": "gate / test 5/5 (ubuntu-24.04)", + "app_id": 15368, + "applicability": "required" + }, + { + "name": "gate / gate (ubuntu-24.04)", + "app_id": 15368, + "applicability": "required" + } + ] + } + ], + "sonar": { + "organization": "storytold", + "project": "storytold_vectorcraft", + "app_id": 12526, + "check_name": "SonarCloud Code Analysis", + "details_url": "https://sonarcloud.io/dashboard?id=storytold_vectorcraft&branch=main", + "issue_types": [ + "VULNERABILITY" + ], + "accepted_conditions": [], + "required_conditions": [ + { + "metric": "new_reliability_rating", + "comparator": "GT", + "error_threshold": "1" + }, + { + "metric": "new_maintainability_rating", + "comparator": "GT", + "error_threshold": "1" + }, + { + "metric": "new_coverage", + "comparator": "LT", + "error_threshold": "80" + }, + { + "metric": "new_duplicated_lines_density", + "comparator": "GT", + "error_threshold": "3" + }, + { + "metric": "new_security_hotspots_reviewed", + "comparator": "LT", + "error_threshold": "100" + } + ], + "debt": [] + } + }, + "max_artifact_bytes": 2147483648, + "automatic_signer_actors": [], + "platforms": { + "windows-x86_64": { + "unsigned_artifact_name": "nightly-unsigned-windows-x86_64", + "trust": { + "publisher_subject": "CN=Learning Machines Inc, O=Learning Machines Inc, L=Atlanta, S=Georgia, C=US" + } + }, + "linux-x86_64": { + "unsigned_artifact_name": "nightly-unsigned-linux-x86_64", + "trust": { + "fingerprint": "2B76741B414AAD6CD33E631213A005C0B9D7C3ED" + } + }, + "macos-aarch64": { + "unsigned_artifact_name": "nightly-unsigned-macos-aarch64", + "trust": { + "apple_team_id": "DJ6XS33FX8" + } + } + } +} diff --git a/.github/workflows/nightly-check.yml b/.github/workflows/nightly-check.yml new file mode 100644 index 0000000000..48d08decb3 --- /dev/null +++ b/.github/workflows/nightly-check.yml @@ -0,0 +1,72 @@ +name: Nightly check + +# The app-side Nightly pieces, checked without a feed run: the Python suites that read the archive, +# plist and signing scripts, the workflow contracts, and (on Windows) the packaging and signing +# PowerShell suites. The producer itself is .github/workflows/nightly.yml; the Apple-silicon bundle +# is built and verified by nightly-macos.yml behind the `full-ci` label. +on: + push: + branches: [main, release] + paths: [".github/workflows/nightly*.yml", "packaging/**", "apps/vectorcraft/**", "crates/ui-egui/src/os_window.rs"] + pull_request: + paths: [".github/workflows/nightly*.yml", "packaging/**", "apps/vectorcraft/**", "crates/ui-egui/src/os_window.rs"] + workflow_dispatch: + +permissions: + contents: read + +concurrency: + group: nightly-check-${{ github.ref }} + cancel-in-progress: true + +jobs: + synthetic: + name: Packaging suites and script syntax + runs-on: ubuntu-latest + timeout-minutes: 20 + steps: + - name: Harden runner + uses: step-security/harden-runner@1d88384fd173af6ecb012dfd0264a306b711241a # v2.22.4 + with: + egress-policy: audit + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + - name: Run the synthetic suites + run: python3 packaging/nightly-tests.py + - name: Parse every nightly shell script + run: | + set -euo pipefail + for script in packaging/nightly-common.sh packaging/linux/nightly.sh packaging/linux/nightly-launch.sh \ + packaging/linux/nightly-arch-tar.sh packaging/macos/nightly.sh \ + packaging/macos/nightly-lib.sh packaging/macos/nightly-sign.sh packaging/macos/nightly-verify.sh; do + bash -n "$script" + done + - name: Shellcheck + run: | + set -euo pipefail + sudo apt-get update -qq + sudo apt-get install -y -qq shellcheck + shellcheck -x -P packaging packaging/nightly-common.sh packaging/linux/nightly.sh \ + packaging/linux/nightly-launch.sh \ + packaging/macos/nightly.sh packaging/macos/nightly-lib.sh packaging/macos/nightly-sign.sh \ + packaging/macos/nightly-verify.sh + + windows: + name: Windows packaging and signing suites + runs-on: windows-latest + timeout-minutes: 20 + steps: + - name: Harden runner + uses: step-security/harden-runner@1d88384fd173af6ecb012dfd0264a306b711241a # v2.22.4 + with: + egress-policy: audit + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + - name: Nightly packaging suite + shell: pwsh + run: ./packaging/windows/nightly-package-tests.ps1 -FixtureRoot $env:RUNNER_TEMP + - name: Nightly signing suite + shell: pwsh + run: ./packaging/windows/nightly-signing-tests.ps1 -FixtureRoot $env:RUNNER_TEMP diff --git a/.github/workflows/nightly-macos.yml b/.github/workflows/nightly-macos.yml new file mode 100644 index 0000000000..59536dcf36 --- /dev/null +++ b/.github/workflows/nightly-macos.yml @@ -0,0 +1,90 @@ +name: Nightly macOS build + +# Builds the unsigned Apple-silicon VectorCraft Nightly (packaging/macos/nightly.sh) on a hosted +# macOS runner and checks the archive as the Launcher unpacks it, ending with the bundle's version +# query (packaging/macos/nightly-verify.sh --expect unsigned). No secrets and no environment: the real +# Nightly is signed and notarized by the shared release-ref signer (craft-common-actions), which calls +# packaging/macos/nightly-sign.sh. +on: + # macOS runners are shared with release builds and have a monthly minute cap: pull requests run + # this only with the `full-ci` label, never by changed paths. `labeled` so adding it starts a run. + pull_request: + types: [opened, synchronize, reopened, labeled] + workflow_dispatch: + +permissions: + contents: read + +# A newer push to a labelled PR cancels its older run. Any event that will not build (no `full-ci` +# label, or another label added) gets a group of its own, so it never cancels a real build. +concurrency: + group: nightly-macos-${{ github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'full-ci') && (github.event.action != 'labeled' || github.event.label.name == 'full-ci') && github.ref || github.run_id }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} + +jobs: + build: + name: Nightly .app (aarch64, unsigned) + if: >- + github.event_name == 'workflow_dispatch' || + (contains(github.event.pull_request.labels.*.name, 'full-ci') && + (github.event.action != 'labeled' || github.event.label.name == 'full-ci')) + runs-on: macos-15 + timeout-minutes: 120 + env: + CARGO_TERM_COLOR: always + CARGO_INCREMENTAL: 0 + RUST_BACKTRACE: 1 + steps: + - name: Harden runner + uses: step-security/harden-runner@1d88384fd173af6ecb012dfd0264a306b711241a # v2.22.4 + with: + egress-policy: audit + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + fetch-depth: 0 + # The release's pin (release.yml craft-fonts-ref), so the bundle's notices match a shipped build. + - name: Check out craft-fonts + uses: storytold/craft-common-actions/actions/checkout-craft-fonts@main + with: + ref: b076417b5880bd4154bd22f00695b1d28c6bea83 + - id: rust + uses: storytold/craft-common-actions/actions/rust-channel@main + with: + targets: aarch64-apple-darwin + - uses: step-security/dtolnay-rust-toolchain@8dd607977d06adf4ed49b190381e74c17a9dd25f # v1.0.0 + with: + toolchain: ${{ steps.rust.outputs.toolchain }} + targets: ${{ steps.rust.outputs.targets }} + components: ${{ steps.rust.outputs.components }} + # A version of the prepared Nightly form for this commit; the real one comes from the feed's + # identity job. Only nightly.sh's input checks read it. + - name: Prepare a Nightly identity for this commit + run: | + set -euo pipefail + base="$(python3 -c 'import tomllib; print(tomllib.load(open("Cargo.toml", "rb"))["workspace"]["package"]["version"].split("-")[0])')" + sha="$(git rev-parse HEAD)" + date="$(date -u +%Y-%m-%d)" + { + echo "VECTORCRAFT_BUILD_SHA=$sha" + echo "VECTORCRAFT_BUILD_DATE=$date" + echo "VECTORCRAFT_VERSION=$base-nightly.${date//-/}.$GITHUB_RUN_NUMBER.$GITHUB_RUN_ATTEMPT.g${sha:0:12}" + } >>"$GITHUB_ENV" + - name: Build the unsigned Nightly bundle + env: + VECTORCRAFT_BUILD_CHANNEL: nightly-v1 + CARGO_TARGET_DIR: ${{ runner.temp }}/nightly-targets + DIST: ${{ runner.temp }}/nightly-dist + CRAFT_FONTS_DIR: ${{ github.workspace }}/craft-fonts + run: bash packaging/macos/nightly.sh --arch aarch64 + - name: Check the archive and the bundle's version + run: bash packaging/macos/nightly-verify.sh --expect unsigned --input "$RUNNER_TEMP/nightly-dist/vectorcraft-$VECTORCRAFT_VERSION-macos-aarch64-nightly.zip" + # Keeps the verified unsigned zip briefly for keyless signer tests and hand testing. Unsigned only. + - name: Keep the unsigned archive + uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 + with: + name: vectorcraft-nightly-macos-aarch64-unsigned + path: ${{ runner.temp }}/nightly-dist/vectorcraft-${{ env.VECTORCRAFT_VERSION }}-macos-aarch64-nightly.zip + if-no-files-found: error + retention-days: 7 + compression-level: 0 diff --git a/.github/workflows/nightly-sign.yml b/.github/workflows/nightly-sign.yml new file mode 100644 index 0000000000..38cb6b24a9 --- /dev/null +++ b/.github/workflows/nightly-sign.yml @@ -0,0 +1,42 @@ +name: VectorCraft release-ref nightly signer + +# Enabled for supervised manual dispatch on release. Main/release contents must match. +# A reusable callee does not change context; this must be a real top-level release dispatch. +on: + workflow_dispatch: + inputs: + producer_run_id: + description: Exact untrusted producer Actions run ID + required: true + type: string + producer_run_attempt: + description: Exact untrusted producer Actions run attempt + required: true + type: string + +permissions: {} + +concurrency: + group: vectorcraft-nightly-release + cancel-in-progress: false + +jobs: + release: + # Actual context guards: official repository, manual dispatch, real release branch. + if: >- + github.repository == 'storytold/vectorcraft' && + github.event_name == 'workflow_dispatch' && + github.ref == 'refs/heads/release' && github.ref_type == 'branch' + permissions: + contents: write + actions: read + checks: read + attestations: write + id-token: write + uses: storytold/craft-common-actions/.github/workflows/nightly-release.yml@605d58766e8f536564da8fc81d3676ac86816dea + with: + tooling-revision: 605d58766e8f536564da8fc81d3676ac86816dea + producer_run_id: ${{ inputs.producer_run_id }} + producer_run_attempt: ${{ inputs.producer_run_attempt }} + # No secrets: inherit or raw platform values in this caller. Only the isolated native + # callee job may bind the existing release environment and export keys in its signing step. diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml new file mode 100644 index 0000000000..1139f67f9b --- /dev/null +++ b/.github/workflows/nightly.yml @@ -0,0 +1,34 @@ +name: VectorCraft unsigned nightly + +# Enabled for supervised manual runs by the reviewed manual actor only; no schedule yet. +# A later explicit opt-in may add a cadence (and turn on nightly-dispatch.yml with it). +on: + workflow_dispatch: + +permissions: + contents: read + +jobs: + unsigned: + # Actual context guards only; no inherited/platform secrets. + if: >- + github.repository == 'storytold/vectorcraft' && + github.ref == 'refs/heads/main' && github.ref_type == 'branch' && + (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch') + # Maximum for the reusable workflow. Its compiler narrows to contents/actions read; + # no OIDC, attestation write, release environment or platform secrets in compilation. + permissions: + contents: read + actions: read + attestations: write + id-token: write + uses: storytold/craft-common-actions/.github/workflows/nightly-unsigned.yml@605d58766e8f536564da8fc81d3676ac86816dea + with: + tooling-revision: 605d58766e8f536564da8fc81d3676ac86816dea + app-name: vectorcraft + manual-actors: '["bflatastic","dylanmtaylor","echelon","FredApps","skylartaylor"]' + craft-fonts-ref: b076417b5880bd4154bd22f00695b1d28c6bea83 + # One producer run builds every listed platform for one all-or-nothing release. The pin is the + # craft-common-actions main commit that merged #339 (bounded lineage compares), on top of the + # Linux/macOS signer (#342). + platforms: '["windows-x86_64","linux-x86_64","macos-aarch64"]' diff --git a/.gitignore b/.gitignore index 8c493ff12b..ee97af30f7 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,10 @@ plan/ .DS_Store # A craft-fonts checkout for CRAFT_FONTS_DIR (CI and release workflows check it out here) /craft-fonts +# The Python packaging helpers' bytecode: `nightly-archive.py` imports `nightly_paths`, and the +# producer's clean-tree check runs after a local packaging run would have written it. +__pycache__/ +# The shared nightly workflow's scratch checkouts and inputs: the producer requires a clean tree. +/.nightly-tools +/.nightly-input +/craft-i18n diff --git a/ASSETS.md b/ASSETS.md index a483174dc1..76a3d41962 100644 --- a/ASSETS.md +++ b/ASSETS.md @@ -51,6 +51,10 @@ Generated-in-code art is original and has no file to list. This covers the defau | `assets/app-icon/hicolor/scalable/apps/ai.storyteller.vectorcraft.svg` | Project owner (ArtCraft team) | Original artwork drawn in ArtCraft for VectorCraft, vectorised and rendered by `packaging/icons.sh` | MIT OR Apache-2.0 (`assets/app-icon/LICENSE.txt`) | App icon (engraved dragon) | | `assets/app-icon/vectorcraft-1024.png` | Project owner (ArtCraft team) | Original artwork drawn in ArtCraft for VectorCraft, vectorised and rendered by `packaging/icons.sh` | MIT OR Apache-2.0 (`assets/app-icon/LICENSE.txt`) | App icon (engraved dragon) | | `assets/app-icon/vectorcraft-macos-512.png` | Project owner (ArtCraft team) | Original artwork drawn in ArtCraft for VectorCraft, vectorised and rendered by `packaging/icons.sh` | MIT OR Apache-2.0 (`assets/app-icon/LICENSE.txt`) | App icon (engraved dragon) | +| `assets/app-icon/vectorcraft-nightly-1024.png` | Project owner (ArtCraft team) | Recoloured from the stable app tile by `packaging/nightly-icons.py`, original artwork drawn in ArtCraft for VectorCraft | MIT OR Apache-2.0 (`assets/app-icon/LICENSE.txt`) | Nightly `.app` master: the full tile with Apple's margin, 1024 px | +| `assets/app-icon/vectorcraft-nightly.icns` | Project owner (ArtCraft team) | Recoloured from the stable app tile by `packaging/nightly-icons.py`, original artwork drawn in ArtCraft for VectorCraft | MIT OR Apache-2.0 (`assets/app-icon/LICENSE.txt`) | Nightly macOS icon set, 16 to 1024 px | +| `assets/app-icon/vectorcraft-nightly.ico` | Project owner (ArtCraft team) | Recoloured from the stable app tile by `packaging/nightly-icons.py`, original artwork drawn in ArtCraft for VectorCraft | MIT OR Apache-2.0 (`assets/app-icon/LICENSE.txt`) | Nightly Windows icons, 16 to 256 px | +| `assets/app-icon/vectorcraft-nightly.png` | Project owner (ArtCraft team) | Recoloured from the stable app tile by `packaging/nightly-icons.py`, original artwork drawn in ArtCraft for VectorCraft | MIT OR Apache-2.0 (`assets/app-icon/LICENSE.txt`) | Nightly feed art and window icon, 1024 px | | `assets/app-icon/vectorcraft-small.svg` | Project owner (ArtCraft team) | Original artwork drawn in ArtCraft for VectorCraft, vectorised and rendered by `packaging/icons.sh` | MIT OR Apache-2.0 (`assets/app-icon/LICENSE.txt`) | App icon (engraved dragon) | | `assets/app-icon/vectorcraft.icns` | Project owner (ArtCraft team) | Original artwork drawn in ArtCraft for VectorCraft, vectorised and rendered by `packaging/icons.sh` | MIT OR Apache-2.0 (`assets/app-icon/LICENSE.txt`) | App icon (engraved dragon) | | `assets/app-icon/vectorcraft.ico` | Project owner (ArtCraft team) | Original artwork drawn in ArtCraft for VectorCraft, vectorised and rendered by `packaging/icons.sh` | MIT OR Apache-2.0 (`assets/app-icon/LICENSE.txt`) | App icon (engraved dragon) | @@ -139,12 +143,14 @@ Generated-in-code art is original and has no file to list. This covers the defau | `assets/icons/dc-arrow-fill.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | The Selection and Direct Selection arrows' fill, painted black or white under their outline | | `assets/icons/dc-arrow-tip.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | | | `assets/icons/dc-arrow-up.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | | +| `assets/icons/dc-artboard.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | | | `assets/icons/dc-artboard-options.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | | | `assets/icons/dc-artboards.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | | | `assets/icons/dc-blend.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | | | `assets/icons/dc-blend-align-page.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | | | `assets/icons/dc-blend-align-path.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | | | `assets/icons/dc-bloat.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | | +| `assets/icons/dc-blob-brush.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | | | `assets/icons/dc-cap-butt.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | | | `assets/icons/dc-cap-round.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | | | `assets/icons/dc-cap-square.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | | @@ -154,6 +160,7 @@ Generated-in-code art is original and has no file to list. This covers the defau | `assets/icons/dc-clear.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | | | `assets/icons/dc-color-guide.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | | | `assets/icons/dc-contour.svg` | VectorCraft contributors | Original work, drawn for VectorCraft (a solid rounded square inside four corner arcs, its offset outline); not derived from any other application's icon | MIT OR Apache-2.0 | | +| `assets/icons/dc-corner-tool.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | | | `assets/icons/dc-crystallize.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | | | `assets/icons/dc-cube.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | | | `assets/icons/dc-curvature-circle.svg` | VectorCraft contributors | Original work, drawn for VectorCraft (an arch with the circle that touches it at its top, and that circle's center) | MIT OR Apache-2.0 | | @@ -194,6 +201,15 @@ Generated-in-code art is original and has no file to list. This covers the defau | `assets/icons/dc-grad-stroke-along.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | | | `assets/icons/dc-grad-stroke-within.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | | | `assets/icons/dc-gradient.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | | +| `assets/icons/dc-graph-area.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | | +| `assets/icons/dc-graph-bar.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | | +| `assets/icons/dc-graph-column.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | | +| `assets/icons/dc-graph-line.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | | +| `assets/icons/dc-graph-pie.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | | +| `assets/icons/dc-graph-radar.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | | +| `assets/icons/dc-graph-scatter.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | | +| `assets/icons/dc-graph-stacked-bar.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | | +| `assets/icons/dc-graph-stacked-column.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | | | `assets/icons/dc-graphic-styles.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | | | `assets/icons/dc-grid-view.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | | | `assets/icons/dc-group-select.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | | @@ -203,6 +219,9 @@ Generated-in-code art is original and has no file to list. This covers the defau | `assets/icons/dc-join-round.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | | | `assets/icons/dc-join.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | | | `assets/icons/dc-knife.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | | +| `assets/icons/dc-lasso-enclosing.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | | +| `assets/icons/dc-lasso-polygonal.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | | +| `assets/icons/dc-lasso.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | | | `assets/icons/dc-line-cut.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | | | `assets/icons/dc-line.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | | | `assets/icons/dc-list-view.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | | @@ -210,6 +229,7 @@ Generated-in-code art is original and has no file to list. This covers the defau | `assets/icons/dc-live-select.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | | | `assets/icons/dc-mask-none.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | | | `assets/icons/dc-measure.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | | +| `assets/icons/dc-measure-inspect.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | | | `assets/icons/dc-mesh.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | | | `assets/icons/dc-mirror-cut.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | | | `assets/icons/dc-new-fill.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | | @@ -228,8 +248,10 @@ Generated-in-code art is original and has no file to list. This covers the defau | `assets/icons/dc-para-numbers.svg` | VectorCraft contributors | Original work, drawn for VectorCraft: the digits 1, 2 and 3, each before a line | MIT OR Apache-2.0 | | | `assets/icons/dc-para-right.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | | | `assets/icons/dc-para-rtl.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | | +| `assets/icons/dc-parametric-shape.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | | | `assets/icons/dc-path-eraser.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | | | `assets/icons/dc-pathfinder.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | | +| `assets/icons/dc-perspective-select.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | | | `assets/icons/dc-perspective.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | | | `assets/icons/dc-pf-crop.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | | | `assets/icons/dc-pf-divide.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | | @@ -244,26 +266,38 @@ Generated-in-code art is original and has no file to list. This covers the defau | `assets/icons/dc-place-symbol.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | | | `assets/icons/dc-polar-grid.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | | | `assets/icons/dc-polygon.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | | +| `assets/icons/dc-print-tiling.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | | | `assets/icons/dc-pucker.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | | | `assets/icons/dc-puppet.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | | | `assets/icons/dc-quick-pen.svg` | VectorCraft contributors | Original work, drawn for VectorCraft (a line and a half circle with a dot at each point) | MIT OR Apache-2.0 | | | `assets/icons/dc-rearrange.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | | +| `assets/icons/dc-recolor-arrow.svg` | VectorCraft contributors | Original work, drawn for VectorCraft (a right arrow, a Recolor Artwork row that is recolored) | MIT OR Apache-2.0 | | +| `assets/icons/dc-recolor-arrow-off.svg` | VectorCraft contributors | Original work, drawn for VectorCraft (a dashed line without a head, a Recolor Artwork row that is excluded) | MIT OR Apache-2.0 | | +| `assets/icons/dc-rect.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | | | `assets/icons/dc-rect-cut.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | | | `assets/icons/dc-rect-grid.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | | | `assets/icons/dc-reference-point.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | | | `assets/icons/dc-remove-brush.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | | | `assets/icons/dc-reshape.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | | | `assets/icons/dc-reverse.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | | +| `assets/icons/dc-rotate.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | | | `assets/icons/dc-rotate-view.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | | | `assets/icons/dc-rounded-rect.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | | | `assets/icons/dc-rule-evenodd.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | | | `assets/icons/dc-rule-nonzero.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | | +| `assets/icons/dc-scale.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | | | `assets/icons/dc-scallop.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | | | `assets/icons/dc-screen-mode.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | | | `assets/icons/dc-selection.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | | | `assets/icons/dc-shape-builder.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | | +| `assets/icons/dc-shaper.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | | +| `assets/icons/dc-shared-edge.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | | | `assets/icons/dc-shear.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | | +| `assets/icons/dc-slice-select.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | | +| `assets/icons/dc-slice.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | | +| `assets/icons/dc-slide-anchor.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | | | `assets/icons/dc-smooth.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | | +| `assets/icons/dc-spiral.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | | | `assets/icons/dc-stroke-center.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | | | `assets/icons/dc-stroke-inside.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | | | `assets/icons/dc-stroke-outside.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | | @@ -273,7 +307,15 @@ Generated-in-code art is original and has no file to list. This covers the defau | `assets/icons/dc-swatch-kinds.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | | | `assets/icons/dc-swatch-process.svg` | VectorCraft contributors | Original work, drawn for VectorCraft (a square, a process color) | MIT OR Apache-2.0 | | | `assets/icons/dc-swatch-spot.svg` | VectorCraft contributors | Original work, drawn for VectorCraft (a dot in a ring, a spot color) | MIT OR Apache-2.0 | | +| `assets/icons/dc-symbol-screener.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | | +| `assets/icons/dc-symbol-scruncher.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | | +| `assets/icons/dc-symbol-shifter.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | | +| `assets/icons/dc-symbol-sizer.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | | +| `assets/icons/dc-symbol-spinner.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | | | `assets/icons/dc-symbol-sprayer.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | | +| `assets/icons/dc-symbol-stainer.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | | +| `assets/icons/dc-symbol-styler.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | | +| `assets/icons/dc-tangent-circle.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | | | `assets/icons/dc-touch-type.svg` | VectorCraft contributors (designed by ham9zah) | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | | | `assets/icons/dc-transform-panel.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | | | `assets/icons/dc-transparency.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | | @@ -284,6 +326,7 @@ Generated-in-code art is original and has no file to list. This covers the defau | `assets/icons/dc-type-vertical.svg` | VectorCraft contributors (designed by ham9zah) | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | | | `assets/icons/dc-type-vertical-area.svg` | VectorCraft contributors (designed by ham9zah) | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | | | `assets/icons/dc-type-vertical-path.svg` | VectorCraft contributors (designed by ham9zah) | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | | +| `assets/icons/dc-warp.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | | | `assets/icons/dc-width-profile.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | | | `assets/icons/dc-width.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | | | `assets/icons/dc-wrinkle.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | | diff --git a/Cargo.lock b/Cargo.lock index d36a565ad8..0417aba6f0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1217,7 +1217,7 @@ dependencies = [ [[package]] name = "craft" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167" +source = "git+https://github.com/storytold/craft-libs?rev=b0d422cf0c23baccdaca314b916458a89c0952e0#b0d422cf0c23baccdaca314b916458a89c0952e0" dependencies = [ "craft-automation", "craft-behavior", @@ -1258,7 +1258,7 @@ dependencies = [ [[package]] name = "craft-affinity" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167" +source = "git+https://github.com/storytold/craft-libs?rev=b0d422cf0c23baccdaca314b916458a89c0952e0#b0d422cf0c23baccdaca314b916458a89c0952e0" dependencies = [ "crc32fast", "flate2", @@ -1269,7 +1269,7 @@ dependencies = [ [[package]] name = "craft-appkit" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167" +source = "git+https://github.com/storytold/craft-libs?rev=b0d422cf0c23baccdaca314b916458a89c0952e0#b0d422cf0c23baccdaca314b916458a89c0952e0" dependencies = [ "block2 0.6.2", "objc2-app-kit 0.3.2", @@ -1279,7 +1279,7 @@ dependencies = [ [[package]] name = "craft-atomic" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167" +source = "git+https://github.com/storytold/craft-libs?rev=b0d422cf0c23baccdaca314b916458a89c0952e0#b0d422cf0c23baccdaca314b916458a89c0952e0" dependencies = [ "rustix 1.1.6", ] @@ -1287,7 +1287,7 @@ dependencies = [ [[package]] name = "craft-automation" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167" +source = "git+https://github.com/storytold/craft-libs?rev=b0d422cf0c23baccdaca314b916458a89c0952e0#b0d422cf0c23baccdaca314b916458a89c0952e0" dependencies = [ "base64 0.23.1", "craft-behavior", @@ -1312,7 +1312,7 @@ dependencies = [ [[package]] name = "craft-behavior" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167" +source = "git+https://github.com/storytold/craft-libs?rev=b0d422cf0c23baccdaca314b916458a89c0952e0#b0d422cf0c23baccdaca314b916458a89c0952e0" dependencies = [ "accesskit", "bitflags 2.13.2", @@ -1330,7 +1330,7 @@ dependencies = [ [[package]] name = "craft-browse" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167" +source = "git+https://github.com/storytold/craft-libs?rev=b0d422cf0c23baccdaca314b916458a89c0952e0#b0d422cf0c23baccdaca314b916458a89c0952e0" dependencies = [ "craft-behavior", "craft-docpath", @@ -1348,7 +1348,7 @@ dependencies = [ [[package]] name = "craft-cdr" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167" +source = "git+https://github.com/storytold/craft-libs?rev=b0d422cf0c23baccdaca314b916458a89c0952e0#b0d422cf0c23baccdaca314b916458a89c0952e0" dependencies = [ "crc32fast", "flate2", @@ -1357,7 +1357,7 @@ dependencies = [ [[package]] name = "craft-cloud-ui" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167" +source = "git+https://github.com/storytold/craft-libs?rev=b0d422cf0c23baccdaca314b916458a89c0952e0#b0d422cf0c23baccdaca314b916458a89c0952e0" dependencies = [ "egui", ] @@ -1365,7 +1365,7 @@ dependencies = [ [[package]] name = "craft-cms" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167" +source = "git+https://github.com/storytold/craft-libs?rev=b0d422cf0c23baccdaca314b916458a89c0952e0#b0d422cf0c23baccdaca314b916458a89c0952e0" dependencies = [ "md-5", "rayon", @@ -1374,12 +1374,12 @@ dependencies = [ [[package]] name = "craft-codepage" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167" +source = "git+https://github.com/storytold/craft-libs?rev=b0d422cf0c23baccdaca314b916458a89c0952e0#b0d422cf0c23baccdaca314b916458a89c0952e0" [[package]] name = "craft-color-ui" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167" +source = "git+https://github.com/storytold/craft-libs?rev=b0d422cf0c23baccdaca314b916458a89c0952e0#b0d422cf0c23baccdaca314b916458a89c0952e0" dependencies = [ "craft-behavior", "craft-cms", @@ -1399,7 +1399,7 @@ dependencies = [ [[package]] name = "craft-control" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167" +source = "git+https://github.com/storytold/craft-libs?rev=b0d422cf0c23baccdaca314b916458a89c0952e0#b0d422cf0c23baccdaca314b916458a89c0952e0" dependencies = [ "getrandom 0.3.4", "serde", @@ -1409,7 +1409,7 @@ dependencies = [ [[package]] name = "craft-dds" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167" +source = "git+https://github.com/storytold/craft-libs?rev=b0d422cf0c23baccdaca314b916458a89c0952e0#b0d422cf0c23baccdaca314b916458a89c0952e0" dependencies = [ "rayon", ] @@ -1417,7 +1417,7 @@ dependencies = [ [[package]] name = "craft-dialogs" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167" +source = "git+https://github.com/storytold/craft-libs?rev=b0d422cf0c23baccdaca314b916458a89c0952e0#b0d422cf0c23baccdaca314b916458a89c0952e0" dependencies = [ "block2 0.6.2", "craft-atomic", @@ -1442,7 +1442,7 @@ dependencies = [ [[package]] name = "craft-docpath" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167" +source = "git+https://github.com/storytold/craft-libs?rev=b0d422cf0c23baccdaca314b916458a89c0952e0#b0d422cf0c23baccdaca314b916458a89c0952e0" dependencies = [ "serde", ] @@ -1450,7 +1450,7 @@ dependencies = [ [[package]] name = "craft-draw" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167" +source = "git+https://github.com/storytold/craft-libs?rev=b0d422cf0c23baccdaca314b916458a89c0952e0#b0d422cf0c23baccdaca314b916458a89c0952e0" dependencies = [ "craft-behavior", "craft-color-ui", @@ -1469,7 +1469,7 @@ dependencies = [ [[package]] name = "craft-dxf" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167" +source = "git+https://github.com/storytold/craft-libs?rev=b0d422cf0c23baccdaca314b916458a89c0952e0#b0d422cf0c23baccdaca314b916458a89c0952e0" dependencies = [ "craft-codepage", "encoding_rs", @@ -1481,12 +1481,12 @@ dependencies = [ [[package]] name = "craft-eps" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167" +source = "git+https://github.com/storytold/craft-libs?rev=b0d422cf0c23baccdaca314b916458a89c0952e0#b0d422cf0c23baccdaca314b916458a89c0952e0" [[package]] name = "craft-font-catalog" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167" +source = "git+https://github.com/storytold/craft-libs?rev=b0d422cf0c23baccdaca314b916458a89c0952e0#b0d422cf0c23baccdaca314b916458a89c0952e0" dependencies = [ "fontique", "harfrust 0.13.3", @@ -1501,7 +1501,7 @@ dependencies = [ [[package]] name = "craft-font-manager" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167" +source = "git+https://github.com/storytold/craft-libs?rev=b0d422cf0c23baccdaca314b916458a89c0952e0#b0d422cf0c23baccdaca314b916458a89c0952e0" dependencies = [ "craft-behavior", "craft-font-catalog", @@ -1514,13 +1514,13 @@ dependencies = [ "egui", "log", "serde", - "skrifa 0.44.0", + "skrifa 0.47.0", ] [[package]] name = "craft-font-store" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167" +source = "git+https://github.com/storytold/craft-libs?rev=b0d422cf0c23baccdaca314b916458a89c0952e0#b0d422cf0c23baccdaca314b916458a89c0952e0" dependencies = [ "cap-primitives", "craft-atomic", @@ -1536,17 +1536,18 @@ dependencies = [ "thiserror 2.0.21", "toml", "ureq", + "wuff", ] [[package]] name = "craft-fonts-build" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167" +source = "git+https://github.com/storytold/craft-libs?rev=b0d422cf0c23baccdaca314b916458a89c0952e0#b0d422cf0c23baccdaca314b916458a89c0952e0" [[package]] name = "craft-gif" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167" +source = "git+https://github.com/storytold/craft-libs?rev=b0d422cf0c23baccdaca314b916458a89c0952e0#b0d422cf0c23baccdaca314b916458a89c0952e0" dependencies = [ "gif", ] @@ -1554,7 +1555,7 @@ dependencies = [ [[package]] name = "craft-gzip" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167" +source = "git+https://github.com/storytold/craft-libs?rev=b0d422cf0c23baccdaca314b916458a89c0952e0#b0d422cf0c23baccdaca314b916458a89c0952e0" dependencies = [ "flate2", ] @@ -1562,7 +1563,7 @@ dependencies = [ [[package]] name = "craft-host" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167" +source = "git+https://github.com/storytold/craft-libs?rev=b0d422cf0c23baccdaca314b916458a89c0952e0#b0d422cf0c23baccdaca314b916458a89c0952e0" dependencies = [ "bitflags 2.13.2", "craft-i18n", @@ -1575,7 +1576,7 @@ dependencies = [ [[package]] name = "craft-i18n" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167" +source = "git+https://github.com/storytold/craft-libs?rev=b0d422cf0c23baccdaca314b916458a89c0952e0#b0d422cf0c23baccdaca314b916458a89c0952e0" dependencies = [ "chrono", "fixed_decimal", @@ -1603,7 +1604,7 @@ dependencies = [ [[package]] name = "craft-image-codecs" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167" +source = "git+https://github.com/storytold/craft-libs?rev=b0d422cf0c23baccdaca314b916458a89c0952e0#b0d422cf0c23baccdaca314b916458a89c0952e0" dependencies = [ "craft-dds", "craft-jpeg", @@ -1630,7 +1631,7 @@ dependencies = [ [[package]] name = "craft-imaging" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167" +source = "git+https://github.com/storytold/craft-libs?rev=b0d422cf0c23baccdaca314b916458a89c0952e0#b0d422cf0c23baccdaca314b916458a89c0952e0" dependencies = [ "craft-behavior", "craft-color-ui", @@ -1648,7 +1649,7 @@ dependencies = [ [[package]] name = "craft-jpeg" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167" +source = "git+https://github.com/storytold/craft-libs?rev=b0d422cf0c23baccdaca314b916458a89c0952e0#b0d422cf0c23baccdaca314b916458a89c0952e0" dependencies = [ "thiserror 2.0.21", ] @@ -1656,7 +1657,7 @@ dependencies = [ [[package]] name = "craft-jxl" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167" +source = "git+https://github.com/storytold/craft-libs?rev=b0d422cf0c23baccdaca314b916458a89c0952e0#b0d422cf0c23baccdaca314b916458a89c0952e0" dependencies = [ "brotli-decompressor 5.0.3", "jixel", @@ -1667,7 +1668,7 @@ dependencies = [ [[package]] name = "craft-keymap" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167" +source = "git+https://github.com/storytold/craft-libs?rev=b0d422cf0c23baccdaca314b916458a89c0952e0#b0d422cf0c23baccdaca314b916458a89c0952e0" dependencies = [ "craft-host", "craft-i18n", @@ -1682,7 +1683,7 @@ dependencies = [ [[package]] name = "craft-layers" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167" +source = "git+https://github.com/storytold/craft-libs?rev=b0d422cf0c23baccdaca314b916458a89c0952e0#b0d422cf0c23baccdaca314b916458a89c0952e0" dependencies = [ "craft-behavior", "craft-i18n", @@ -1696,7 +1697,7 @@ dependencies = [ [[package]] name = "craft-menu" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167" +source = "git+https://github.com/storytold/craft-libs?rev=b0d422cf0c23baccdaca314b916458a89c0952e0#b0d422cf0c23baccdaca314b916458a89c0952e0" dependencies = [ "craft-behavior", "craft-host", @@ -1714,7 +1715,7 @@ dependencies = [ [[package]] name = "craft-metadata" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167" +source = "git+https://github.com/storytold/craft-libs?rev=b0d422cf0c23baccdaca314b916458a89c0952e0#b0d422cf0c23baccdaca314b916458a89c0952e0" dependencies = [ "brotli-decompressor 6.3.2", "chrono", @@ -1726,7 +1727,7 @@ dependencies = [ [[package]] name = "craft-metafile" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167" +source = "git+https://github.com/storytold/craft-libs?rev=b0d422cf0c23baccdaca314b916458a89c0952e0#b0d422cf0c23baccdaca314b916458a89c0952e0" dependencies = [ "encoding_rs", "image", @@ -1737,7 +1738,7 @@ dependencies = [ [[package]] name = "craft-mime" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167" +source = "git+https://github.com/storytold/craft-libs?rev=b0d422cf0c23baccdaca314b916458a89c0952e0#b0d422cf0c23baccdaca314b916458a89c0952e0" dependencies = [ "chrono", "craft-codepage", @@ -1747,7 +1748,7 @@ dependencies = [ [[package]] name = "craft-pages" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167" +source = "git+https://github.com/storytold/craft-libs?rev=b0d422cf0c23baccdaca314b916458a89c0952e0#b0d422cf0c23baccdaca314b916458a89c0952e0" dependencies = [ "craft-behavior", "craft-keymap", @@ -1763,7 +1764,7 @@ dependencies = [ [[package]] name = "craft-pdf" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167" +source = "git+https://github.com/storytold/craft-libs?rev=b0d422cf0c23baccdaca314b916458a89c0952e0#b0d422cf0c23baccdaca314b916458a89c0952e0" dependencies = [ "hayro-interpret", "hayro-syntax", @@ -1775,7 +1776,7 @@ dependencies = [ [[package]] name = "craft-platform" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167" +source = "git+https://github.com/storytold/craft-libs?rev=b0d422cf0c23baccdaca314b916458a89c0952e0#b0d422cf0c23baccdaca314b916458a89c0952e0" dependencies = [ "async-channel", "async-io", @@ -1806,7 +1807,7 @@ dependencies = [ [[package]] name = "craft-plotter" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167" +source = "git+https://github.com/storytold/craft-libs?rev=b0d422cf0c23baccdaca314b916458a89c0952e0#b0d422cf0c23baccdaca314b916458a89c0952e0" dependencies = [ "kurbo 0.13.1", "thiserror 2.0.21", @@ -1815,7 +1816,7 @@ dependencies = [ [[package]] name = "craft-print" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167" +source = "git+https://github.com/storytold/craft-libs?rev=b0d422cf0c23baccdaca314b916458a89c0952e0#b0d422cf0c23baccdaca314b916458a89c0952e0" dependencies = [ "craft-behavior", "craft-host", @@ -1839,7 +1840,7 @@ dependencies = [ [[package]] name = "craft-proof" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167" +source = "git+https://github.com/storytold/craft-libs?rev=b0d422cf0c23baccdaca314b916458a89c0952e0#b0d422cf0c23baccdaca314b916458a89c0952e0" dependencies = [ "log", "miniz_oxide 0.9.1", @@ -1850,7 +1851,7 @@ dependencies = [ [[package]] name = "craft-ps" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167" +source = "git+https://github.com/storytold/craft-libs?rev=b0d422cf0c23baccdaca314b916458a89c0952e0#b0d422cf0c23baccdaca314b916458a89c0952e0" dependencies = [ "craft-eps", "flate2", @@ -1864,7 +1865,7 @@ dependencies = [ [[package]] name = "craft-psd" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167" +source = "git+https://github.com/storytold/craft-libs?rev=b0d422cf0c23baccdaca314b916458a89c0952e0#b0d422cf0c23baccdaca314b916458a89c0952e0" dependencies = [ "encoding_rs", "flate2", @@ -1875,7 +1876,7 @@ dependencies = [ [[package]] name = "craft-quit" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167" +source = "git+https://github.com/storytold/craft-libs?rev=b0d422cf0c23baccdaca314b916458a89c0952e0#b0d422cf0c23baccdaca314b916458a89c0952e0" dependencies = [ "dispatch2", "egui", @@ -1888,7 +1889,7 @@ dependencies = [ [[package]] name = "craft-review" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167" +source = "git+https://github.com/storytold/craft-libs?rev=b0d422cf0c23baccdaca314b916458a89c0952e0#b0d422cf0c23baccdaca314b916458a89c0952e0" dependencies = [ "base64 0.23.1", "craft-behavior", @@ -1907,7 +1908,7 @@ dependencies = [ [[package]] name = "craft-settings" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167" +source = "git+https://github.com/storytold/craft-libs?rev=b0d422cf0c23baccdaca314b916458a89c0952e0#b0d422cf0c23baccdaca314b916458a89c0952e0" dependencies = [ "craft-atomic", "craft-host", @@ -1924,7 +1925,7 @@ dependencies = [ [[package]] name = "craft-stream-codecs" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167" +source = "git+https://github.com/storytold/craft-libs?rev=b0d422cf0c23baccdaca314b916458a89c0952e0#b0d422cf0c23baccdaca314b916458a89c0952e0" dependencies = [ "fax", "hayro-ccitt", @@ -1935,7 +1936,7 @@ dependencies = [ [[package]] name = "craft-svg" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167" +source = "git+https://github.com/storytold/craft-libs?rev=b0d422cf0c23baccdaca314b916458a89c0952e0#b0d422cf0c23baccdaca314b916458a89c0952e0" dependencies = [ "craft-image-codecs", "craft-xml", @@ -1956,7 +1957,7 @@ dependencies = [ [[package]] name = "craft-table" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167" +source = "git+https://github.com/storytold/craft-libs?rev=b0d422cf0c23baccdaca314b916458a89c0952e0#b0d422cf0c23baccdaca314b916458a89c0952e0" dependencies = [ "craft-behavior", "craft-keymap", @@ -1968,7 +1969,7 @@ dependencies = [ [[package]] name = "craft-text" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167" +source = "git+https://github.com/storytold/craft-libs?rev=b0d422cf0c23baccdaca314b916458a89c0952e0#b0d422cf0c23baccdaca314b916458a89c0952e0" dependencies = [ "craft-behavior", "craft-font-manager", @@ -1993,7 +1994,7 @@ dependencies = [ [[package]] name = "craft-theme" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167" +source = "git+https://github.com/storytold/craft-libs?rev=b0d422cf0c23baccdaca314b916458a89c0952e0#b0d422cf0c23baccdaca314b916458a89c0952e0" dependencies = [ "bitflags 2.13.2", "craft-tracked", @@ -2008,7 +2009,7 @@ dependencies = [ [[package]] name = "craft-theme-store" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167" +source = "git+https://github.com/storytold/craft-libs?rev=b0d422cf0c23baccdaca314b916458a89c0952e0#b0d422cf0c23baccdaca314b916458a89c0952e0" dependencies = [ "craft-atomic", "craft-behavior", @@ -2023,7 +2024,7 @@ dependencies = [ [[package]] name = "craft-tiff" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167" +source = "git+https://github.com/storytold/craft-libs?rev=b0d422cf0c23baccdaca314b916458a89c0952e0#b0d422cf0c23baccdaca314b916458a89c0952e0" dependencies = [ "serde", "thiserror 2.0.21", @@ -2033,7 +2034,7 @@ dependencies = [ [[package]] name = "craft-time" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167" +source = "git+https://github.com/storytold/craft-libs?rev=b0d422cf0c23baccdaca314b916458a89c0952e0#b0d422cf0c23baccdaca314b916458a89c0952e0" dependencies = [ "serde", "thiserror 2.0.21", @@ -2042,7 +2043,7 @@ dependencies = [ [[package]] name = "craft-timeline" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167" +source = "git+https://github.com/storytold/craft-libs?rev=b0d422cf0c23baccdaca314b916458a89c0952e0#b0d422cf0c23baccdaca314b916458a89c0952e0" dependencies = [ "craft-behavior", "craft-keymap", @@ -2057,12 +2058,12 @@ dependencies = [ [[package]] name = "craft-tracked" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167" +source = "git+https://github.com/storytold/craft-libs?rev=b0d422cf0c23baccdaca314b916458a89c0952e0#b0d422cf0c23baccdaca314b916458a89c0952e0" [[package]] name = "craft-ui" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167" +source = "git+https://github.com/storytold/craft-libs?rev=b0d422cf0c23baccdaca314b916458a89c0952e0#b0d422cf0c23baccdaca314b916458a89c0952e0" dependencies = [ "craft-cloud-ui", "craft-ui-canvas", @@ -2076,7 +2077,7 @@ dependencies = [ [[package]] name = "craft-ui-canvas" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167" +source = "git+https://github.com/storytold/craft-libs?rev=b0d422cf0c23baccdaca314b916458a89c0952e0#b0d422cf0c23baccdaca314b916458a89c0952e0" dependencies = [ "craft-behavior", "craft-i18n", @@ -2092,7 +2093,7 @@ dependencies = [ [[package]] name = "craft-ui-contract" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167" +source = "git+https://github.com/storytold/craft-libs?rev=b0d422cf0c23baccdaca314b916458a89c0952e0#b0d422cf0c23baccdaca314b916458a89c0952e0" dependencies = [ "accesskit", "craft-behavior", @@ -2130,7 +2131,7 @@ dependencies = [ [[package]] name = "craft-ui-macros" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167" +source = "git+https://github.com/storytold/craft-libs?rev=b0d422cf0c23baccdaca314b916458a89c0952e0#b0d422cf0c23baccdaca314b916458a89c0952e0" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -2141,7 +2142,7 @@ dependencies = [ [[package]] name = "craft-ui-panels" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167" +source = "git+https://github.com/storytold/craft-libs?rev=b0d422cf0c23baccdaca314b916458a89c0952e0#b0d422cf0c23baccdaca314b916458a89c0952e0" dependencies = [ "craft-behavior", "craft-host", @@ -2159,7 +2160,7 @@ dependencies = [ [[package]] name = "craft-ui-patterns" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167" +source = "git+https://github.com/storytold/craft-libs?rev=b0d422cf0c23baccdaca314b916458a89c0952e0#b0d422cf0c23baccdaca314b916458a89c0952e0" dependencies = [ "craft-behavior", "craft-host", @@ -2180,7 +2181,7 @@ dependencies = [ [[package]] name = "craft-ui-shell" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167" +source = "git+https://github.com/storytold/craft-libs?rev=b0d422cf0c23baccdaca314b916458a89c0952e0#b0d422cf0c23baccdaca314b916458a89c0952e0" dependencies = [ "craft-behavior", "craft-host", @@ -2201,7 +2202,7 @@ dependencies = [ [[package]] name = "craft-ui-widgets" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167" +source = "git+https://github.com/storytold/craft-libs?rev=b0d422cf0c23baccdaca314b916458a89c0952e0#b0d422cf0c23baccdaca314b916458a89c0952e0" dependencies = [ "craft-behavior", "craft-host", @@ -2220,7 +2221,7 @@ dependencies = [ [[package]] name = "craft-update" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167" +source = "git+https://github.com/storytold/craft-libs?rev=b0d422cf0c23baccdaca314b916458a89c0952e0#b0d422cf0c23baccdaca314b916458a89c0952e0" dependencies = [ "chrono", "craft-host", @@ -2249,7 +2250,7 @@ dependencies = [ [[package]] name = "craft-vectorcraft-format" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167" +source = "git+https://github.com/storytold/craft-libs?rev=b0d422cf0c23baccdaca314b916458a89c0952e0#b0d422cf0c23baccdaca314b916458a89c0952e0" dependencies = [ "flate2", "serde", @@ -2260,7 +2261,7 @@ dependencies = [ [[package]] name = "craft-wayland" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167" +source = "git+https://github.com/storytold/craft-libs?rev=b0d422cf0c23baccdaca314b916458a89c0952e0#b0d422cf0c23baccdaca314b916458a89c0952e0" dependencies = [ "raw-window-handle", "wayland-backend", @@ -2270,7 +2271,7 @@ dependencies = [ [[package]] name = "craft-web-api" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167" +source = "git+https://github.com/storytold/craft-libs?rev=b0d422cf0c23baccdaca314b916458a89c0952e0#b0d422cf0c23baccdaca314b916458a89c0952e0" dependencies = [ "js-sys", "serde_json", @@ -2281,7 +2282,7 @@ dependencies = [ [[package]] name = "craft-win32" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167" +source = "git+https://github.com/storytold/craft-libs?rev=b0d422cf0c23baccdaca314b916458a89c0952e0#b0d422cf0c23baccdaca314b916458a89c0952e0" dependencies = [ "winsafe", ] @@ -2289,7 +2290,7 @@ dependencies = [ [[package]] name = "craft-window" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167" +source = "git+https://github.com/storytold/craft-libs?rev=b0d422cf0c23baccdaca314b916458a89c0952e0#b0d422cf0c23baccdaca314b916458a89c0952e0" dependencies = [ "craft-appkit", "craft-atomic", @@ -2321,7 +2322,7 @@ dependencies = [ [[package]] name = "craft-xml" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167" +source = "git+https://github.com/storytold/craft-libs?rev=b0d422cf0c23baccdaca314b916458a89c0952e0#b0d422cf0c23baccdaca314b916458a89c0952e0" dependencies = [ "quick-xml 0.41.0", "serde", @@ -2639,7 +2640,7 @@ checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" [[package]] name = "ecolor" version = "0.37.0" -source = "git+https://github.com/storytold/egui.git?rev=f5025284445ea19c35f746d96fc0b75468b3f560#f5025284445ea19c35f746d96fc0b75468b3f560" +source = "git+https://github.com/storytold/egui.git?rev=b15ffe9bfc2c8e6748533b32b708e10abaf2afec#b15ffe9bfc2c8e6748533b32b708e10abaf2afec" dependencies = [ "bytemuck", "emath", @@ -2648,7 +2649,7 @@ dependencies = [ [[package]] name = "eframe" version = "0.37.0" -source = "git+https://github.com/storytold/egui.git?rev=f5025284445ea19c35f746d96fc0b75468b3f560#f5025284445ea19c35f746d96fc0b75468b3f560" +source = "git+https://github.com/storytold/egui.git?rev=b15ffe9bfc2c8e6748533b32b708e10abaf2afec#b15ffe9bfc2c8e6748533b32b708e10abaf2afec" dependencies = [ "ahash", "bytemuck", @@ -2683,7 +2684,7 @@ dependencies = [ [[package]] name = "egui" version = "0.37.0" -source = "git+https://github.com/storytold/egui.git?rev=f5025284445ea19c35f746d96fc0b75468b3f560#f5025284445ea19c35f746d96fc0b75468b3f560" +source = "git+https://github.com/storytold/egui.git?rev=b15ffe9bfc2c8e6748533b32b708e10abaf2afec#b15ffe9bfc2c8e6748533b32b708e10abaf2afec" dependencies = [ "accesskit", "ahash", @@ -2702,7 +2703,7 @@ dependencies = [ [[package]] name = "egui-wgpu" version = "0.37.0" -source = "git+https://github.com/storytold/egui.git?rev=f5025284445ea19c35f746d96fc0b75468b3f560#f5025284445ea19c35f746d96fc0b75468b3f560" +source = "git+https://github.com/storytold/egui.git?rev=b15ffe9bfc2c8e6748533b32b708e10abaf2afec#b15ffe9bfc2c8e6748533b32b708e10abaf2afec" dependencies = [ "ahash", "bytemuck", @@ -2721,7 +2722,7 @@ dependencies = [ [[package]] name = "egui-winit" version = "0.37.0" -source = "git+https://github.com/storytold/egui.git?rev=f5025284445ea19c35f746d96fc0b75468b3f560#f5025284445ea19c35f746d96fc0b75468b3f560" +source = "git+https://github.com/storytold/egui.git?rev=b15ffe9bfc2c8e6748533b32b708e10abaf2afec#b15ffe9bfc2c8e6748533b32b708e10abaf2afec" dependencies = [ "accesskit_winit", "arboard", @@ -2746,7 +2747,7 @@ dependencies = [ [[package]] name = "egui_extras" version = "0.37.0" -source = "git+https://github.com/storytold/egui.git?rev=f5025284445ea19c35f746d96fc0b75468b3f560#f5025284445ea19c35f746d96fc0b75468b3f560" +source = "git+https://github.com/storytold/egui.git?rev=b15ffe9bfc2c8e6748533b32b708e10abaf2afec#b15ffe9bfc2c8e6748533b32b708e10abaf2afec" dependencies = [ "ahash", "egui", @@ -2760,7 +2761,7 @@ dependencies = [ [[package]] name = "egui_glow" version = "0.37.0" -source = "git+https://github.com/storytold/egui.git?rev=f5025284445ea19c35f746d96fc0b75468b3f560#f5025284445ea19c35f746d96fc0b75468b3f560" +source = "git+https://github.com/storytold/egui.git?rev=b15ffe9bfc2c8e6748533b32b708e10abaf2afec#b15ffe9bfc2c8e6748533b32b708e10abaf2afec" dependencies = [ "bytemuck", "egui", @@ -2773,7 +2774,7 @@ dependencies = [ [[package]] name = "egui_kittest" version = "0.37.0" -source = "git+https://github.com/storytold/egui.git?rev=f5025284445ea19c35f746d96fc0b75468b3f560#f5025284445ea19c35f746d96fc0b75468b3f560" +source = "git+https://github.com/storytold/egui.git?rev=b15ffe9bfc2c8e6748533b32b708e10abaf2afec#b15ffe9bfc2c8e6748533b32b708e10abaf2afec" dependencies = [ "dify", "eframe", @@ -2799,7 +2800,7 @@ checksum = "0e9c71c2167ca323c882b99918929403426e2373ea17242ff5653e0d5e1058be" [[package]] name = "emath" version = "0.37.0" -source = "git+https://github.com/storytold/egui.git?rev=f5025284445ea19c35f746d96fc0b75468b3f560#f5025284445ea19c35f746d96fc0b75468b3f560" +source = "git+https://github.com/storytold/egui.git?rev=b15ffe9bfc2c8e6748533b32b708e10abaf2afec#b15ffe9bfc2c8e6748533b32b708e10abaf2afec" dependencies = [ "bytemuck", ] @@ -2880,7 +2881,7 @@ dependencies = [ [[package]] name = "epaint" version = "0.37.0" -source = "git+https://github.com/storytold/egui.git?rev=f5025284445ea19c35f746d96fc0b75468b3f560#f5025284445ea19c35f746d96fc0b75468b3f560" +source = "git+https://github.com/storytold/egui.git?rev=b15ffe9bfc2c8e6748533b32b708e10abaf2afec#b15ffe9bfc2c8e6748533b32b708e10abaf2afec" dependencies = [ "ahash", "bytemuck", @@ -2906,7 +2907,7 @@ dependencies = [ [[package]] name = "epaint_default_fonts" version = "0.37.0" -source = "git+https://github.com/storytold/egui.git?rev=f5025284445ea19c35f746d96fc0b75468b3f560#f5025284445ea19c35f746d96fc0b75468b3f560" +source = "git+https://github.com/storytold/egui.git?rev=b15ffe9bfc2c8e6748533b32b708e10abaf2afec#b15ffe9bfc2c8e6748533b32b708e10abaf2afec" [[package]] name = "equivalent" @@ -3619,7 +3620,7 @@ checksum = "9f4d0e94ddd48749f06bbe4e5389fb9799a0c45bcaf00495042076ef05e3241a" [[package]] name = "hayro-cmap" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167" +source = "git+https://github.com/storytold/craft-libs?rev=b0d422cf0c23baccdaca314b916458a89c0952e0#b0d422cf0c23baccdaca314b916458a89c0952e0" dependencies = [ "brotli", "hayro-postscript", @@ -3628,7 +3629,7 @@ dependencies = [ [[package]] name = "hayro-interpret" version = "0.7.0" -source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167" +source = "git+https://github.com/storytold/craft-libs?rev=b0d422cf0c23baccdaca314b916458a89c0952e0#b0d422cf0c23baccdaca314b916458a89c0952e0" dependencies = [ "bitflags 2.13.2", "hayro-cmap", @@ -3646,7 +3647,7 @@ dependencies = [ [[package]] name = "hayro-jbig2" version = "0.3.0" -source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167" +source = "git+https://github.com/storytold/craft-libs?rev=b0d422cf0c23baccdaca314b916458a89c0952e0#b0d422cf0c23baccdaca314b916458a89c0952e0" dependencies = [ "fearless_simd", "hayro-ccitt", @@ -3664,12 +3665,12 @@ dependencies = [ [[package]] name = "hayro-postscript" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167" +source = "git+https://github.com/storytold/craft-libs?rev=b0d422cf0c23baccdaca314b916458a89c0952e0#b0d422cf0c23baccdaca314b916458a89c0952e0" [[package]] name = "hayro-syntax" version = "0.7.2" -source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167" +source = "git+https://github.com/storytold/craft-libs?rev=b0d422cf0c23baccdaca314b916458a89c0952e0#b0d422cf0c23baccdaca314b916458a89c0952e0" dependencies = [ "flate2", "hayro-ccitt", @@ -4646,7 +4647,7 @@ dependencies = [ [[package]] name = "krilla" version = "0.8.2" -source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167" +source = "git+https://github.com/storytold/craft-libs?rev=b0d422cf0c23baccdaca314b916458a89c0952e0#b0d422cf0c23baccdaca314b916458a89c0952e0" dependencies = [ "base64 0.22.1", "bumpalo", @@ -4803,7 +4804,7 @@ checksum = "d4a5ff6bcca6c4867b1c4fd4ef63e4db7436ef363e0ad7531d1558856bae64f4" [[package]] name = "linesweeper" version = "0.5.0" -source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167" +source = "git+https://github.com/storytold/craft-libs?rev=b0d422cf0c23baccdaca314b916458a89c0952e0#b0d422cf0c23baccdaca314b916458a89c0952e0" dependencies = [ "arrayvec", "kurbo 0.13.1", @@ -10044,6 +10045,16 @@ dependencies = [ "either", ] +[[package]] +name = "wuff" +version = "0.2.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6a992b57b3d1ee972b2e3fd9225e44793104d49818836dd812d5459187712dd" +dependencies = [ + "brotli-decompressor 6.3.2", + "bytes", +] + [[package]] name = "x11-dl" version = "2.21.0" @@ -10563,14 +10574,14 @@ dependencies = [ [[patch.unused]] name = "egui_demo_lib" version = "0.37.0" -source = "git+https://github.com/storytold/egui.git?rev=f5025284445ea19c35f746d96fc0b75468b3f560#f5025284445ea19c35f746d96fc0b75468b3f560" +source = "git+https://github.com/storytold/egui.git?rev=b15ffe9bfc2c8e6748533b32b708e10abaf2afec#b15ffe9bfc2c8e6748533b32b708e10abaf2afec" [[patch.unused]] name = "egui_inspection" version = "0.37.0" -source = "git+https://github.com/storytold/egui.git?rev=f5025284445ea19c35f746d96fc0b75468b3f560#f5025284445ea19c35f746d96fc0b75468b3f560" +source = "git+https://github.com/storytold/egui.git?rev=b15ffe9bfc2c8e6748533b32b708e10abaf2afec#b15ffe9bfc2c8e6748533b32b708e10abaf2afec" [[patch.unused]] name = "egui_system_font_provider" version = "0.37.0" -source = "git+https://github.com/storytold/egui.git?rev=f5025284445ea19c35f746d96fc0b75468b3f560#f5025284445ea19c35f746d96fc0b75468b3f560" +source = "git+https://github.com/storytold/egui.git?rev=b15ffe9bfc2c8e6748533b32b708e10abaf2afec#b15ffe9bfc2c8e6748533b32b708e10abaf2afec" diff --git a/Cargo.toml b/Cargo.toml index c03d9a7146..51693818bb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,44 +11,44 @@ rust-version = "1.95" repository = "https://github.com/storytold/vectorcraft" [workspace.dependencies] -craft-cms = { git = "https://github.com/storytold/craft-libs", rev = "a4b6d3b6ca04a65d5972339b808d1049a14c7167" } -craft-pdf = { git = "https://github.com/storytold/craft-libs", rev = "a4b6d3b6ca04a65d5972339b808d1049a14c7167", default-features = false, features = ["interpret", "write"] } -craft-docpath = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "a4b6d3b6ca04a65d5972339b808d1049a14c7167" } -craft-proof = { git = "https://github.com/storytold/craft-libs", rev = "a4b6d3b6ca04a65d5972339b808d1049a14c7167" } +craft-cms = { git = "https://github.com/storytold/craft-libs", rev = "b0d422cf0c23baccdaca314b916458a89c0952e0" } +craft-pdf = { git = "https://github.com/storytold/craft-libs", rev = "b0d422cf0c23baccdaca314b916458a89c0952e0", default-features = false, features = ["interpret", "write"] } +craft-docpath = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "b0d422cf0c23baccdaca314b916458a89c0952e0" } +craft-proof = { git = "https://github.com/storytold/craft-libs", rev = "b0d422cf0c23baccdaca314b916458a89c0952e0" } # The `.vectorcraft` envelope: its members, version, embedded images and the data after the JSON. -craft-vectorcraft-format = { git = "https://github.com/storytold/craft-libs", rev = "a4b6d3b6ca04a65d5972339b808d1049a14c7167" } -craft-gzip = { git = "https://github.com/storytold/craft-libs", rev = "a4b6d3b6ca04a65d5972339b808d1049a14c7167" } +craft-vectorcraft-format = { git = "https://github.com/storytold/craft-libs", rev = "b0d422cf0c23baccdaca314b916458a89c0952e0" } +craft-gzip = { git = "https://github.com/storytold/craft-libs", rev = "b0d422cf0c23baccdaca314b916458a89c0952e0" } # Native Affinity documents (craft-libs#914). -craft-affinity = { git = "https://github.com/storytold/craft-libs", rev = "a4b6d3b6ca04a65d5972339b808d1049a14c7167" } +craft-affinity = { git = "https://github.com/storytold/craft-libs", rev = "b0d422cf0c23baccdaca314b916458a89c0952e0" } # Bounded CDR (v1-v27) and CMX (32-bit) reader (craft-libs#778). -craft-cdr = { git = "https://github.com/storytold/craft-libs", rev = "a4b6d3b6ca04a65d5972339b808d1049a14c7167" } +craft-cdr = { git = "https://github.com/storytold/craft-libs", rev = "b0d422cf0c23baccdaca314b916458a89c0952e0" } # SVG parsing, limits, SVGZ and writer (craft-libs#778). -craft-svg = { git = "https://github.com/storytold/craft-libs", rev = "a4b6d3b6ca04a65d5972339b808d1049a14c7167", features = ["tree"] } -craft-mime = { git = "https://github.com/storytold/craft-libs", rev = "a4b6d3b6ca04a65d5972339b808d1049a14c7167" } +craft-svg = { git = "https://github.com/storytold/craft-libs", rev = "b0d422cf0c23baccdaca314b916458a89c0952e0", features = ["tree"] } +craft-mime = { git = "https://github.com/storytold/craft-libs", rev = "b0d422cf0c23baccdaca314b916458a89c0952e0" } # EPS container, previews, ASCII85 and DSC comments (craft-libs#778). -craft-eps = { git = "https://github.com/storytold/craft-libs", rev = "a4b6d3b6ca04a65d5972339b808d1049a14c7167" } +craft-eps = { git = "https://github.com/storytold/craft-libs", rev = "b0d422cf0c23baccdaca314b916458a89c0952e0" } # DXF tags, reader and writer (craft-libs#778, #926, #927). -craft-plotter = { git = "https://github.com/storytold/craft-libs", rev = "a4b6d3b6ca04a65d5972339b808d1049a14c7167" } -craft-dxf = { git = "https://github.com/storytold/craft-libs", rev = "a4b6d3b6ca04a65d5972339b808d1049a14c7167" } +craft-plotter = { git = "https://github.com/storytold/craft-libs", rev = "b0d422cf0c23baccdaca314b916458a89c0952e0" } +craft-dxf = { git = "https://github.com/storytold/craft-libs", rev = "b0d422cf0c23baccdaca314b916458a89c0952e0" } # WMF, EMF and EMF+ reader (craft-libs#778). -craft-metafile = { git = "https://github.com/storytold/craft-libs", rev = "a4b6d3b6ca04a65d5972339b808d1049a14c7167" } -craft-xml = { git = "https://github.com/storytold/craft-libs", rev = "a4b6d3b6ca04a65d5972339b808d1049a14c7167" } -craft-image-codecs = { git = "https://github.com/storytold/craft-libs", rev = "a4b6d3b6ca04a65d5972339b808d1049a14c7167" } -craft-gif = { git = "https://github.com/storytold/craft-libs", rev = "a4b6d3b6ca04a65d5972339b808d1049a14c7167" } -craft-tiff = { git = "https://github.com/storytold/craft-libs", rev = "a4b6d3b6ca04a65d5972339b808d1049a14c7167" } -craft-ps = { git = "https://github.com/storytold/craft-libs", rev = "a4b6d3b6ca04a65d5972339b808d1049a14c7167", default-features = false, features = ["read", "write"] } -craft-psd = { git = "https://github.com/storytold/craft-libs", rev = "a4b6d3b6ca04a65d5972339b808d1049a14c7167" } -craft-stream-codecs = { git = "https://github.com/storytold/craft-libs", rev = "a4b6d3b6ca04a65d5972339b808d1049a14c7167" } -craft-jxl = { git = "https://github.com/storytold/craft-libs", rev = "a4b6d3b6ca04a65d5972339b808d1049a14c7167" } -craft-codepage = { git = "https://github.com/storytold/craft-libs", rev = "a4b6d3b6ca04a65d5972339b808d1049a14c7167" } +craft-metafile = { git = "https://github.com/storytold/craft-libs", rev = "b0d422cf0c23baccdaca314b916458a89c0952e0" } +craft-xml = { git = "https://github.com/storytold/craft-libs", rev = "b0d422cf0c23baccdaca314b916458a89c0952e0" } +craft-image-codecs = { git = "https://github.com/storytold/craft-libs", rev = "b0d422cf0c23baccdaca314b916458a89c0952e0" } +craft-gif = { git = "https://github.com/storytold/craft-libs", rev = "b0d422cf0c23baccdaca314b916458a89c0952e0" } +craft-tiff = { git = "https://github.com/storytold/craft-libs", rev = "b0d422cf0c23baccdaca314b916458a89c0952e0" } +craft-ps = { git = "https://github.com/storytold/craft-libs", rev = "b0d422cf0c23baccdaca314b916458a89c0952e0", default-features = false, features = ["read", "write"] } +craft-psd = { git = "https://github.com/storytold/craft-libs", rev = "b0d422cf0c23baccdaca314b916458a89c0952e0" } +craft-stream-codecs = { git = "https://github.com/storytold/craft-libs", rev = "b0d422cf0c23baccdaca314b916458a89c0952e0" } +craft-jxl = { git = "https://github.com/storytold/craft-libs", rev = "b0d422cf0c23baccdaca314b916458a89c0952e0" } +craft-codepage = { git = "https://github.com/storytold/craft-libs", rev = "b0d422cf0c23baccdaca314b916458a89c0952e0" } # The framework facade (`craft::ui`, `craft::settings`, `craft::platform`, ...). No default features: each crate names # the members it imports. -craft = { git = "https://github.com/storytold/craft-libs", rev = "a4b6d3b6ca04a65d5972339b808d1049a14c7167" } +craft = { git = "https://github.com/storytold/craft-libs", rev = "b0d422cf0c23baccdaca314b916458a89c0952e0" } # Below the egui layer, so not through the facade: the colour harmony rules and their settings (craft-color-ui # without its `ui` feature), the colour type they work in, and the craft-fonts tables the text crate's build writes. -craft-color-ui = { git = "https://github.com/storytold/craft-libs", rev = "a4b6d3b6ca04a65d5972339b808d1049a14c7167" } -craft-theme = { git = "https://github.com/storytold/craft-libs", rev = "a4b6d3b6ca04a65d5972339b808d1049a14c7167" } -craft-fonts-build = { git = "https://github.com/storytold/craft-libs", rev = "a4b6d3b6ca04a65d5972339b808d1049a14c7167" } +craft-color-ui = { git = "https://github.com/storytold/craft-libs", rev = "b0d422cf0c23baccdaca314b916458a89c0952e0" } +craft-theme = { git = "https://github.com/storytold/craft-libs", rev = "b0d422cf0c23baccdaca314b916458a89c0952e0" } +craft-fonts-build = { git = "https://github.com/storytold/craft-libs", rev = "b0d422cf0c23baccdaca314b916458a89c0952e0" } # internal vectorcraft-geom = { path = "crates/geom" } vectorcraft-color = { path = "crates/color" } @@ -191,25 +191,25 @@ lto = "thin" codegen-units = 1 [patch.crates-io] -hayro-syntax = { git = "https://github.com/storytold/craft-libs", rev = "a4b6d3b6ca04a65d5972339b808d1049a14c7167" } -hayro-interpret = { git = "https://github.com/storytold/craft-libs", rev = "a4b6d3b6ca04a65d5972339b808d1049a14c7167" } -hayro-jbig2 = { git = "https://github.com/storytold/craft-libs", rev = "a4b6d3b6ca04a65d5972339b808d1049a14c7167" } -hayro-cmap = { git = "https://github.com/storytold/craft-libs", rev = "a4b6d3b6ca04a65d5972339b808d1049a14c7167" } -hayro-postscript = { git = "https://github.com/storytold/craft-libs", rev = "a4b6d3b6ca04a65d5972339b808d1049a14c7167" } -krilla = { git = "https://github.com/storytold/craft-libs", rev = "a4b6d3b6ca04a65d5972339b808d1049a14c7167" } -linesweeper = { git = "https://github.com/storytold/craft-libs", rev = "a4b6d3b6ca04a65d5972339b808d1049a14c7167" } -ecolor = { git = "https://github.com/storytold/egui.git", rev = "f5025284445ea19c35f746d96fc0b75468b3f560" } -emath = { git = "https://github.com/storytold/egui.git", rev = "f5025284445ea19c35f746d96fc0b75468b3f560" } -epaint = { git = "https://github.com/storytold/egui.git", rev = "f5025284445ea19c35f746d96fc0b75468b3f560" } -epaint_default_fonts = { git = "https://github.com/storytold/egui.git", rev = "f5025284445ea19c35f746d96fc0b75468b3f560" } -egui = { git = "https://github.com/storytold/egui.git", rev = "f5025284445ea19c35f746d96fc0b75468b3f560" } -egui-winit = { git = "https://github.com/storytold/egui.git", rev = "f5025284445ea19c35f746d96fc0b75468b3f560" } -egui-wgpu = { git = "https://github.com/storytold/egui.git", rev = "f5025284445ea19c35f746d96fc0b75468b3f560" } -egui_glow = { git = "https://github.com/storytold/egui.git", rev = "f5025284445ea19c35f746d96fc0b75468b3f560" } -egui_extras = { git = "https://github.com/storytold/egui.git", rev = "f5025284445ea19c35f746d96fc0b75468b3f560" } -egui_kittest = { git = "https://github.com/storytold/egui.git", rev = "f5025284445ea19c35f746d96fc0b75468b3f560" } -egui_system_font_provider = { git = "https://github.com/storytold/egui.git", rev = "f5025284445ea19c35f746d96fc0b75468b3f560" } -eframe = { git = "https://github.com/storytold/egui.git", rev = "f5025284445ea19c35f746d96fc0b75468b3f560" } -egui_demo_lib = { git = "https://github.com/storytold/egui.git", rev = "f5025284445ea19c35f746d96fc0b75468b3f560" } -egui_inspection = { git = "https://github.com/storytold/egui.git", rev = "f5025284445ea19c35f746d96fc0b75468b3f560" } +hayro-syntax = { git = "https://github.com/storytold/craft-libs", rev = "b0d422cf0c23baccdaca314b916458a89c0952e0" } +hayro-interpret = { git = "https://github.com/storytold/craft-libs", rev = "b0d422cf0c23baccdaca314b916458a89c0952e0" } +hayro-jbig2 = { git = "https://github.com/storytold/craft-libs", rev = "b0d422cf0c23baccdaca314b916458a89c0952e0" } +hayro-cmap = { git = "https://github.com/storytold/craft-libs", rev = "b0d422cf0c23baccdaca314b916458a89c0952e0" } +hayro-postscript = { git = "https://github.com/storytold/craft-libs", rev = "b0d422cf0c23baccdaca314b916458a89c0952e0" } +krilla = { git = "https://github.com/storytold/craft-libs", rev = "b0d422cf0c23baccdaca314b916458a89c0952e0" } +linesweeper = { git = "https://github.com/storytold/craft-libs", rev = "b0d422cf0c23baccdaca314b916458a89c0952e0" } +ecolor = { git = "https://github.com/storytold/egui.git", rev = "b15ffe9bfc2c8e6748533b32b708e10abaf2afec" } +emath = { git = "https://github.com/storytold/egui.git", rev = "b15ffe9bfc2c8e6748533b32b708e10abaf2afec" } +epaint = { git = "https://github.com/storytold/egui.git", rev = "b15ffe9bfc2c8e6748533b32b708e10abaf2afec" } +epaint_default_fonts = { git = "https://github.com/storytold/egui.git", rev = "b15ffe9bfc2c8e6748533b32b708e10abaf2afec" } +egui = { git = "https://github.com/storytold/egui.git", rev = "b15ffe9bfc2c8e6748533b32b708e10abaf2afec" } +egui-winit = { git = "https://github.com/storytold/egui.git", rev = "b15ffe9bfc2c8e6748533b32b708e10abaf2afec" } +egui-wgpu = { git = "https://github.com/storytold/egui.git", rev = "b15ffe9bfc2c8e6748533b32b708e10abaf2afec" } +egui_glow = { git = "https://github.com/storytold/egui.git", rev = "b15ffe9bfc2c8e6748533b32b708e10abaf2afec" } +egui_extras = { git = "https://github.com/storytold/egui.git", rev = "b15ffe9bfc2c8e6748533b32b708e10abaf2afec" } +egui_kittest = { git = "https://github.com/storytold/egui.git", rev = "b15ffe9bfc2c8e6748533b32b708e10abaf2afec" } +egui_system_font_provider = { git = "https://github.com/storytold/egui.git", rev = "b15ffe9bfc2c8e6748533b32b708e10abaf2afec" } +eframe = { git = "https://github.com/storytold/egui.git", rev = "b15ffe9bfc2c8e6748533b32b708e10abaf2afec" } +egui_demo_lib = { git = "https://github.com/storytold/egui.git", rev = "b15ffe9bfc2c8e6748533b32b708e10abaf2afec" } +egui_inspection = { git = "https://github.com/storytold/egui.git", rev = "b15ffe9bfc2c8e6748533b32b708e10abaf2afec" } winit = { git = "https://github.com/storytold/winit.git", rev = "a517b3846ee8457d84ee4975110bfda6797c44dc" } diff --git a/README.md b/README.md index 158a4ca2c8..8e51d4930e 100644 --- a/README.md +++ b/README.md @@ -257,7 +257,7 @@ All 57 approximated Photoshop-style raster filters are available. The Effect Gal **What's missing:** - reliable exchange of .ai files (layer structure in real files; the editing copy a save writes keeps live effects only on paths, compound paths and groups that qualify (at most a fill and a stroke, a non-zero fill rule when filled, no large canvas) and whose appearance and effects the art-style writer supports (see [docs/file-format-parity.md](docs/file-format-parity.md)), leaves out other objects' effects other than geometry effects, and writes live objects as their art); - an interaction-fidelity pass covering every tool's modifiers and small behaviours; -- 3D and Materials beyond the initial live Revolve (Extrude & Bevel, Inflate, Rotate, materials); +- the rest of 3D and Materials (base and Adobe Substance materials, shadows from lights after the first, ray-traced rendering, Turntable; see [docs/three-d.md](docs/three-d.md)); - CJK composition for vertical type (vertical type itself has initial support, with a Japanese interface); - scripting, and the rest of Variables (image and graph kinds, dataset import); - generative AI features. @@ -287,7 +287,9 @@ signed and published. Every bundled asset is listed with its licence in [`ASSETS |---|---|---| | x64 (64-bit Intel/AMD) | `vectorcraft--windows-x64.msi` | `vectorcraft--windows-x64-portable.zip` | | arm64 (Snapdragon and other ARM PCs) | `vectorcraft--windows-arm64.msi` | `vectorcraft--windows-arm64-portable.zip` | -| x86 (32-bit) | `vectorcraft--windows-x86.msi` | `vectorcraft--windows-x86-portable.zip` | + +For 32-bit Windows, [VectorCraft v0.22.0](https://github.com/storytold/vectorcraft/releases/tag/v0.22.0) +was the last release with both an x86 MSI and portable ZIP. Installers and executables are code-signed. @@ -306,13 +308,18 @@ Installers and executables are code-signed. | Flatpak | `vectorcraft--linux-x86_64.flatpak` | `vectorcraft--linux-aarch64.flatpak` | Sandboxed; `flatpak install --user ` | | Debian/Ubuntu | `vectorcraft--linux-x86_64.deb` | `vectorcraft--linux-aarch64.deb` | | | Fedora/RHEL/openSUSE | `vectorcraft--linux-x86_64.rpm` | `vectorcraft--linux-aarch64.rpm` | | +| Arch Linux | `vectorcraft--linux-x86_64.pkg.tar.zst` | `vectorcraft--linux-aarch64.pkg.tar.zst` | | | Tarball | `vectorcraft--linux-x86_64.tar.gz` | `vectorcraft--linux-aarch64.tar.gz` | Unpack anywhere | +RISC-V (riscv64) packages are `vectorcraft--linux-riscv64.deb`, +`vectorcraft--linux-riscv64.rpm`, and `vectorcraft--linux-riscv64.tar.gz`. + ### FreeBSD | Build | File | |---|---| | x86_64 | `vectorcraft--freebsd-x86_64.tar.gz` | +| aarch64 (ARM64) | `vectorcraft--freebsd-aarch64.tar.gz` | ### Web (WebAssembly) diff --git a/ROADMAP.md b/ROADMAP.md index 90a6100167..4d415cc0ba 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -2,7 +2,7 @@ **Stage: alpha** · next: beta, ~13 points (ready for real work ~62% → ~75%, and reliable `.ai` exchange) and ~170–270 h away -> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-11-15 · **Change:** minor (G5: built-in Neon & Glow graphic style library (Cyan Neon, Magenta Laser, Amber Tube, Electric Lime, Pulse Violet, Cobalt Phosphor); G5 estimate unchanged (3–13 h); previously: Tech Circuit brush library, G5; previously: docs tidy-up, no content change: stray notes at the top moved into the revision table; scores and estimates unchanged; previously minor: Raster effects 85% → 88%, gallery thumbnails and in-dialog preview in; headline numbers unchanged; Symbols area ~87% → ~88%: dynamic instance parts take opacity, blend, gradient and pattern on the canvas; G5 docs sync for Overlap and Pattern auto corners; previously minor: Tools stays beside the canvas with left-side panels; Hindi catalog draft complete under the translation tests; contributor loanword terminology reviewed; wider proofreading welcome; Compound Shapes add-on, beyond Illustrator; scores and estimates unchanged; Contour add-on, beyond Illustrator; scores and estimates unchanged; new gradients follow document color mode; scores and estimates unchanged) · **Target:** Adobe Illustrator 2026 (30.x) +> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-11-22 · **Change:** minor (Upcoming: G11 names what is left (#864's unit preference, #885), not the fixed Shape Builder regions and Asset Export borders, with docs/roadmap.md's 6–13 h, and the Essentials row names Shape Builder's remaining depth, #8314; previously: G5: built-in Neon & Glow graphic style library (Cyan Neon, Magenta Laser, Amber Tube, Electric Lime, Pulse Violet, Cobalt Phosphor); G5 estimate unchanged (3–13 h); previously: Tech Circuit brush library, G5; previously: docs tidy-up, no content change: stray notes at the top moved into the revision table; scores and estimates unchanged; previously minor: Raster effects 85% → 88%, gallery thumbnails and in-dialog preview in; headline numbers unchanged; Symbols area ~87% → ~88%: dynamic instance parts take opacity, blend, gradient and pattern on the canvas; G5 docs sync for Overlap and Pattern auto corners; previously minor: Tools stays beside the canvas with left-side panels; Hindi catalog draft complete under the translation tests; contributor loanword terminology reviewed; wider proofreading welcome; Compound Shapes add-on, beyond Illustrator; scores and estimates unchanged; Contour add-on, beyond Illustrator; scores and estimates unchanged; new gradients follow document color mode; scores and estimates unchanged) · **Target:** Adobe Illustrator 2026 (30.x) VectorCraft is a clean-room, open-source, pure-Rust reimplementation of the Adobe Illustrator workflow. It runs on macOS, Windows, Linux, FreeBSD and the web (WASM), and agents can drive all of it over MCP, the CLI and a JSON @@ -35,7 +35,7 @@ blocking it ([Alpha gate](docs/roadmap.md#alpha-gate)). |---|---:|---:|---:|---| | **Full Illustrator** (ready for real work; decides the stage) | **~62%** (57–67%) | **~340–560 h** | ~95–160 h | the mainstream work below, plus 3D (50–85 h), raster effects (23–39 h), advanced type (20–28 h), generative AI (30–60 h), localization (50–85 h) and ecosystem | | **Mainstream illustrator** | **~65%** (60–70%) | **~230–380 h** | ~65–110 h | the interaction-fidelity pass (60–90 h), hardening and QA (30–50 h), stability (20–35 h), performance budgets (15–25 h), `.ai` exchange (10–20 h), the remaining depth of the everyday areas | -| **Essentials user** | **~75%** (70–80%) | **~60–105 h** | ~25–45 h | launch and stability on Windows (20–35 h), in-app help and onboarding (8–15 h), basic QA (10–15 h), Shape Builder regions (4–8 h), UI polish | +| **Essentials user** | **~75%** (70–80%) | **~60–105 h** | ~25–45 h | launch and stability on Windows (20–35 h), in-app help and onboarding (8–15 h), basic QA (10–15 h), Shape Builder depth (4–8 h; #937's reproduced case is fixed, unconfirmed on the reporter's file), UI polish | Hours are Opus 5.5 agent wall-clock hours, calibrated from this repo's merged-PR timestamps (e.g. 0.7–1.2 h per Photoshop-style filter, ~0.8 h per medium feature); see [calibration](docs/target-app-parity.md#calibration). @@ -119,7 +119,7 @@ Ranked; detail in [docs/roadmap.md](docs/roadmap.md) and [docs/gaps.md](docs/gap 1. **Interaction-fidelity pass** (G1), tool by tool from [ui-parity.md](docs/ui-parity.md): 60–90 h. 2. **`.ai` files from real users** (G9): layer structure, guides, speed: 10–20 h. 3. **Launch and stability on real machines** (G10): 20–35 h. -4. **Core-tool correctness** (G11: Shape Builder regions, Asset Export borders): 8–15 h. +4. **Core-tool correctness** (G11: the unit preference reverting to points, #864, SVG export units fixed; a Transform effect in a fill's or stroke's own effects, #885; Shape Builder regions and Asset Export borders are fixed): 6–13 h. 5. **Then:** type core and advanced type (G4), the Illustrator 2026 additions (G13), 3D (G3). The Effect Gallery's filter thumbnails and in-dialog preview are in (G2). ## Progress log @@ -148,6 +148,7 @@ Ranked; detail in [docs/roadmap.md](docs/roadmap.md) and [docs/gaps.md](docs/gap - 2026-11-17: Circle tool (after the Ellipse tool in its group): two clicks or a drag draw the circle on that diameter, and a click followed by a drag from a second point to a third draws the circle through the three; Shift keeps the diameter at 45° steps, Alt rounds a two-point circle's diameter to the rulers' ticks at the current zoom, points snap to Smart Guides, and the tool shows the circle, its center, its radii and its diameter until the release, or "Circle too large" for points on one line or a circle past the canvas. `shape.circleThroughPoints` also takes two points or two selected anchor points as the ends of a diameter. One undo step per circle. A VectorCraft addition: headline numbers unchanged. - 2026-11-17: Circle Tool Options (double-click the Circle tool): Show Center, Show Radii and Show Diameter switch what the tool shows while a circle is drawn, Color sets the color of the center cross and radius lines, Anchors at Standard Positions off puts the circle's anchors at the points it was drawn through (`shape.circleThroughPoints {anchors: "points"}`), and Third Point by Dragging off draws a three-point circle with three clicks and a two-point circle with a double-click on the second point. A VectorCraft addition: headline numbers unchanged. - 2026-11-19: Quick Pen tool, in the Pen tool's group (Alt+P, Option+P on macOS): clicks or drags add straight lines, continuous arcs or sharp-corner arcs; Alt tapped on its own switches the action, C flips the last arc, `[` and `]` size it, a click on the first point closes the path and a click on an open end continues it (`path.quickPen`, part of #2660). Headline numbers unchanged. +- 2026-11-19: Quick Pen length handles: a handle beyond the start and the end of the path being drawn, or of the selected path, makes the line or arc there longer or shorter when dragged; a line keeps its direction and an arc its circle (`path.quickPenLength`, part of #2660). Headline numbers unchanged. - 2026-11-19: Quick Pen toolbar on the canvas while the tool is active: Straight Line, Continuous Arc and Sharp Corner Arc, Flip Arc, and More Options with Hide Toolbar, Pin Toolbar Position and Reset Toolbar Position; it follows the drawing beside the path's last point and its handle drags it (`tool.quickPen.flipArc`, `window.quickPenToolbar`, Window › Quick Pen Toolbar; part of #2660). Headline numbers unchanged. - 2026-10-31: Pattern libraries: Window › Swatch Libraries › Patterns and the Swatches panel's library menu open Geometric Patterns, a built-in library of eleven pattern swatches (dots, stripes, checks, a grid and shapes); clicking one adds its pattern and swatch to the document, once, and applies it to the active fill or stroke (`swatch.library.add`). - 2026-11-11: Pattern libraries: Patterns › Grit Textures, a second built-in pattern library, holds eight seamless black textures (Fine Grain, Coarse Grit, Sand, Speckle, Stipple, Scratches, Sparse Flecks and Dense Flecks) on tiles of 18 to 36 pt, each drawn the same way every time; marks that reach past a tile edge continue on the next tile, so the tiles join without a seam (`swatch.library.add`). Scores and estimates unchanged. @@ -158,6 +159,7 @@ Ranked; detail in [docs/roadmap.md](docs/roadmap.md) and [docs/gaps.md](docs/gap - 2026-11-01: Sort Objects joins the Arrange Tools add-on (Object › Plug-ins › Arrange Tools): the selected objects are sorted by width, height, area, position, opacity or stacking order (small to large, large to small or at random) and take another of those in that order, trading their values or stepping them evenly, as one undo step (`addon.arrange.sort`, #4917). - 2026-11-15: Tangent Circle joins the Path Precision Tools add-on (Object › Plug-ins › Path Precision Tools): the circles that touch two selected paths or compound paths at a set radius, or three of them (up to eight for three circles), touching each outline without crossing it; circles, rotated ellipses and other paths alike. A dialog that previews every circle or one picked by number, the current paint, one undo step (`addon.pathtools.tangentCircle`). A VectorCraft addition: headline numbers unchanged. - 2026-11-17: Add Bounding Rectangle and Add Bounding Circle join the Path Precision Tools add-on (Object › Plug-ins › Path Precision Tools): a live rectangle on the selection's geometric bounding box, or the smallest live circle that holds its outlines, around the whole selection or around each object, with the current paint and one undo step; the menu items open a dialog with Offset, One per Object and Preview (`addon.pathtools.boundingRectangle`, `addon.pathtools.boundingCircle`, #6966). A VectorCraft addition: headline numbers unchanged. +- 2026-11-22: Add Inscribed Circle joins the Path Precision Tools add-on (Object › Plug-ins › Path Precision Tools): the largest live circle inside each selected closed path or compound path, in the area it fills under its fill rule, with the current paint and one undo step (`addon.pathtools.inscribedCircle`, #6966). A VectorCraft addition: headline numbers unchanged. - 2026-11-01: New Symbols from Layers joins the Document Tools add-on (Object › Plug-ins › Document Tools): one symbol of each top-level layer's art (the layers highlighted in the Layers panel when two or more are, else every layer), named after the layer, made as New Symbol makes one; Convert Layers to Symbols also puts an instance of each in place of its layer's art. Empty layers are skipped and reported; one undo step. A VectorCraft addition: headline numbers unchanged. - 2026-11-01: Document Tools, a built-in add-on (Object › Plug-ins › Document Tools), starts with Save a Timestamped Copy: a copy of the document named `_YYYY-MM-DD_HH-MM` (UTC; `-2`, `-3`… when that name is taken) goes next to it, or into a folder picked for a document never saved, written as File › Save a Copy writes it, so the document keeps its path, title and modified state. Off on the web, which has no clock. A VectorCraft addition: headline numbers unchanged. - 2026-11-01: Divide into Dashes joins the Path Precision Tools add-on (Object › Plug-ins › Path Precision Tools): the selected paths, or only their direct-selected segments, are cut into separate open paths of a dash length measured along the curve, with an optional gap (left empty, or kept as pieces), each keeping the path's appearance; Fit to Corners and Ends stretches or squeezes the lengths so every run starts and ends on a dash. A dialog with Preview, one undo step, at most 100000 pieces. A VectorCraft addition: headline numbers unchanged. @@ -249,6 +251,7 @@ The full earlier record of what landed is kept in [docs/roadmap.md](docs/roadmap | Date | Change | Summary | |---|---|---| +| 2026-11-22 | minor | Upcoming: the G11 item names what is left, the unit preference reverting to points (#864; SVG export units are fixed) and a Transform effect in a fill's or stroke's own effects (#885), instead of Shape Builder regions and Asset Export borders, which are fixed (#937, #983 / #1037); its estimate follows docs/roadmap.md and docs/gaps.md, 8–15 → 6–13 h, #8314. The Essentials readiness row's Shape Builder item names what its 4–8 h still covers (checking #937's fix on the reporter's file, still unconfirmed). Headline numbers unchanged. | | 2026-11-15 | minor | Graphic Styles: built-in Neon & Glow graphic style library (Cyan Neon, Magenta Laser, Amber Tube, Electric Lime, Pulse Violet, Cobalt Phosphor); G5 estimate unchanged (3–13 h). | | 2026-11-14 | minor | Tech Circuit adds three original procedural brushes (Circuit Trace, Bus Lines, Terminal Nodes); ten built-in brush libraries. G5 remaining estimate 3–13 h (estimated); parity scores and headline totals unchanged. | | 2026-11-14 | minor | Gujarati (#6613): contributor proofreading completed for all 387 additions, with 11 wording corrections; 4,673 reviewed catalog rows. Status/error messages remain partial; web selection requires a bundled Gujarati face. Scores and estimates unchanged. | diff --git a/apps/vectorcraft-web/Cargo.toml b/apps/vectorcraft-web/Cargo.toml index 70709d274d..6a5d1de9b7 100644 --- a/apps/vectorcraft-web/Cargo.toml +++ b/apps/vectorcraft-web/Cargo.toml @@ -27,7 +27,7 @@ log = { workspace = true } # `wgpu` pulls egui-wgpu's defaults: WebGPU plus the WebGL2 fallback. eframe = { workspace = true, features = ["default_fonts", "wgpu", "accesskit"] } # The page command API (storytold/craft-libs#413): the request plumbing behind window.vectorcraft. -craft-web-api = { git = "https://github.com/storytold/craft-libs", rev = "a4b6d3b6ca04a65d5972339b808d1049a14c7167", version = "0.1.0" } +craft-web-api = { git = "https://github.com/storytold/craft-libs", rev = "b0d422cf0c23baccdaca314b916458a89c0952e0", version = "0.1.0" } wasm-bindgen = "0.2" serde_json = { workspace = true } diff --git a/apps/vectorcraft/Cargo.toml b/apps/vectorcraft/Cargo.toml index 81dba266e0..61a4ba381a 100644 --- a/apps/vectorcraft/Cargo.toml +++ b/apps/vectorcraft/Cargo.toml @@ -45,7 +45,7 @@ winreg = "0.55" # GPU that shows it: drawing on a GPU without a monitor reset the display driver. Safe wrappers over # Win32 (MIT); the `user` feature is User32.dll only. Only the wgpu renderer chooses an adapter. -winsafe = { version = "0.0.29", default-features = false, features = ["user"], optional = true } +winsafe = { version = "0.0.29", default-features = false, features = ["user", "shell"], optional = true } # Waits for Direct3D 12's adapter list before the window starts (src/gpu.rs, #4150). MIT OR # Apache-2.0, already in the build through eframe. pollster = "1" diff --git a/apps/vectorcraft/build.rs b/apps/vectorcraft/build.rs index 71e104fcc7..4bac638e09 100644 --- a/apps/vectorcraft/build.rs +++ b/apps/vectorcraft/build.rs @@ -1,24 +1,67 @@ -//! Windows only: embed the app icon and version info (VERSIONINFO) into `vectorcraft.exe`. +//! Windows only: embed the app icon and version info (VERSIONINFO) into `vectorcraft.exe`. Everywhere, +//! fix the build's channel and the version it reports. //! -//! On every other target this does nothing. A missing resource compiler is a warning, so a -//! cross-compile from macOS or Linux still links, unless `VECTORCRAFT_REQUIRE_WINRES=1` turns it into -//! an error (for release builds). +//! `VECTORCRAFT_BUILD_CHANNEL=nightly-v1` makes a Nightly build and needs an exact feed identity in +//! `VECTORCRAFT_VERSION` (the shared nightly workflow's name) or `VECTORCRAFT_OVERRIDE_VERSION` (what +//! this app's own packaging passes to cargo): `X.Y.Z-nightly.YYYYMMDD...g`. Unset, +//! empty or `stable` means the stable build; anything else is an error. +//! +//! On non-Windows targets the resource half does nothing. A missing resource compiler is a warning, so +//! a cross-compile from macOS or Linux still links, unless `VECTORCRAFT_REQUIRE_WINRES=1` turns it into +//! an error (for release and nightly builds). + +#[path = "src/build_channel.rs"] +mod build_channel; fn main() -> Result<(), String> { println!("cargo:rerun-if-changed=build.rs"); - println!("cargo:rerun-if-changed=../../assets/app-icon/vectorcraft.ico"); - println!("cargo:rerun-if-env-changed=VECTORCRAFT_REQUIRE_WINRES"); + println!("cargo:rustc-check-cfg=cfg(vectorcraft_nightly_v1)"); + println!("cargo:rerun-if-env-changed=VECTORCRAFT_BUILD_CHANNEL"); + println!("cargo:rerun-if-env-changed=VECTORCRAFT_VERSION"); + println!("cargo:rerun-if-env-changed=VECTORCRAFT_OVERRIDE_VERSION"); + let nightly = match std::env::var("VECTORCRAFT_BUILD_CHANNEL").as_deref() { + Ok("nightly-v1") => { + println!("cargo:rustc-cfg=vectorcraft_nightly_v1"); + true + } + // An empty value (an unset CI input) means the default stable build. + Ok("stable" | "") | Err(std::env::VarError::NotPresent) => false, + Ok(other) => return Err(format!("unsupported VECTORCRAFT_BUILD_CHANNEL {other:?} (expected stable or nightly-v1)")), + Err(std::env::VarError::NotUnicode(_)) => return Err("VECTORCRAFT_BUILD_CHANNEL is not valid Unicode".to_string()), + }; + // The stable build reports its package version, as it always has. + let built_version = if nightly { + match feed_identity() { + Some(version) if build_channel::is_nightly_version(&version) => version, + _ => { + return Err( + "nightly-v1 requires an explicit VECTORCRAFT_VERSION feed identity (X.Y.Z-nightly.YYYYMMDD...g)".to_string() + ); + } + } + } else { + std::env::var("CARGO_PKG_VERSION").unwrap_or_default() + }; + println!("cargo:rustc-env=VECTORCRAFT_BUILT_VERSION={built_version}"); + if std::env::var("CARGO_CFG_TARGET_OS").as_deref() != Ok("windows") { return Ok(()); } + println!("cargo:rerun-if-changed=../../assets/app-icon/vectorcraft.ico"); + println!("cargo:rerun-if-changed=../../assets/app-icon/vectorcraft-nightly.ico"); + println!("cargo:rerun-if-env-changed=VECTORCRAFT_REQUIRE_WINRES"); let mut res = winresource::WindowsResource::new(); - res.set_icon("../../assets/app-icon/vectorcraft.ico") - .set("ProductName", "VectorCraft") - .set("FileDescription", "VectorCraft vector illustration editor") + res.set_icon(build_channel::windows_icon_path(nightly)) + .set("ProductName", if nightly { "VectorCraft Nightly" } else { "VectorCraft" }) + .set("FileDescription", if nightly { "VectorCraft Nightly vector illustration editor" } else { "VectorCraft vector illustration editor" }) .set("CompanyName", "Learning Machines LLC") .set("LegalCopyright", "Copyright (c) the VectorCraft authors. MIT OR Apache-2.0.") .set("OriginalFilename", "vectorcraft.exe") .set("InternalName", "vectorcraft"); + if nightly { + // The Launcher verifies the PE ProductVersion against the exact feed identity, not FileVersion. + res.set("ProductVersion", &built_version); + } if let Err(e) = res.compile() { if std::env::var_os("VECTORCRAFT_REQUIRE_WINRES").is_some() { return Err(format!("embedding Windows resources failed: {e}")); @@ -27,3 +70,12 @@ fn main() -> Result<(), String> { } Ok(()) } + +/// The feed identity from `VECTORCRAFT_VERSION`, else `VECTORCRAFT_OVERRIDE_VERSION`: the shared +/// nightly workflow sets the first, this app's own packaging scripts the second. +fn feed_identity() -> Option { + ["VECTORCRAFT_VERSION", "VECTORCRAFT_OVERRIDE_VERSION"] + .into_iter() + .filter_map(|name| std::env::var(name).ok().filter(|value| !value.is_empty())) + .next() +} diff --git a/apps/vectorcraft/src/app.rs b/apps/vectorcraft/src/app.rs index 980df2bea5..c8b4f370ad 100644 --- a/apps/vectorcraft/src/app.rs +++ b/apps/vectorcraft/src/app.rs @@ -1,5 +1,6 @@ #[cfg(all(target_os = "macos", feature = "accessibility", feature = "wgpu"))] use super::gpu; +use super::nightly_session; use super::prefs::{flush, save_tick}; #[cfg(not(target_os = "macos"))] use super::single_instance; @@ -95,10 +96,17 @@ impl eframe::App for App { // A ready update installs once the process has exited. The macOS exit below skips // dropping the app, so the helper is started here. self.app.start_pending_update(); + // Every quit reaches this hook, including a macOS Cmd+Q, which ends the process inside + // AppKit's terminate before `run_native` returns: the nightly session record is finished + // here, and the return path after the event loop is then a no-op. + nightly_session::finish_once(); // Dropping the app can wait for the clipboard handles to let go: the windows leave the // screen first (`quit_windows`). #[cfg(not(any(target_os = "macos", windows)))] super::quit_windows::before_teardown(self.winit_window.as_deref()); + // Plug-ins still loading end before the launch marker does (the macOS exit below skips + // dropping the app). + self.app.session.cancel_plugin_loads(); end_before_teardown(self.frames); } } @@ -159,8 +167,9 @@ impl App { // dialog is open: what asked for it runs again on its document when it answers. They also // wait for the choice about a stopped plug-in, so they open after the plug-ins it loads, as // do the command line's files held back for it. Files later launches handed over before the - // choice ended in Safe Mode open in a new app with plug-ins. - if !self.app.file_dialog_open() && !safe_mode::choosing(&self.app) { + // choice ended in Safe Mode open in a new app with plug-ins. They wait while plug-ins load + // as well, since a plug-in may be what reads them. + if !self.app.file_dialog_open() && !safe_mode::choosing(&self.app) && !self.app.session.plugins_loading() { let held = std::mem::take(&mut self.held_files); #[cfg(target_os = "macos")] let files = open_documents::take(); @@ -210,9 +219,10 @@ pub(crate) fn bring_window_forward(ctx: &egui::Context) { } /// Open the command line's `files` now, or, while the choice about a stopped plug-in is up -/// ([`safe_mode::choosing`]), return them to open once it is made, with the plug-ins it loads. +/// ([`safe_mode::choosing`]) or plug-ins are still loading (a plug-in may be what reads one), +/// return them to open once it is made and they have loaded. pub(crate) fn open_or_hold(app: &mut VectorcraftApp, files: Vec) -> Vec { - if safe_mode::choosing(app) { + if safe_mode::choosing(app) || app.session.plugins_loading() { return files; } open_files(app, files); diff --git a/apps/vectorcraft/src/build_channel.rs b/apps/vectorcraft/src/build_channel.rs new file mode 100644 index 0000000000..9381799375 --- /dev/null +++ b/apps/vectorcraft/src/build_channel.rs @@ -0,0 +1,58 @@ +//! The build-time nightly identity shared by the build script and its pure regression tests. + +/// A nightly feed identity: `X.Y.Z-nightly.YYYYMMDD...g`, exactly. +pub fn is_nightly_version(version: &str) -> bool { + let Some((base, suffix)) = version.split_once("-nightly.") else { return false }; + let digits = |s: &str| !s.is_empty() && s.bytes().all(|b| b.is_ascii_digit()); + let base: Vec<_> = base.split('.').collect(); + let parts: Vec<_> = suffix.split('.').collect(); + base.len() == 3 + && base.iter().all(|s| digits(s)) + && parts.len() == 4 + && parts[0].len() == 8 + && digits(parts[0]) + && digits(parts[1]) + && digits(parts[2]) + && parts[3].strip_prefix('g').is_some_and(|sha| sha.len() == 12 && sha.bytes().all(|b| b.is_ascii_digit() || (b'a'..=b'f').contains(&b))) +} + +pub fn windows_icon_path(nightly: bool) -> &'static str { + if nightly { "../../assets/app-icon/vectorcraft-nightly.ico" } else { "../../assets/app-icon/vectorcraft.ico" } +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn windows_resource_uses_the_flavor_specific_icon_without_changing_stable() { + assert_eq!(windows_icon_path(false), "../../assets/app-icon/vectorcraft.ico"); + assert_eq!(windows_icon_path(true), "../../assets/app-icon/vectorcraft-nightly.ico"); + } + + #[test] + fn explicit_feed_identity_is_required_for_a_nightly_build() { + assert!(is_nightly_version("0.24.1-nightly.20261124.17.1.gabcdef012345")); + for invalid in [ + "", + "0.24.1", + "0.24.1-nightly", + "0.24.1-nightly.20261124", + "0.24.1-nightly.20261124.17.1.gABCDEF012345", + "0.24.1-nightly.20261124.17.1.gabcdef012345\n", + ] { + assert!(!is_nightly_version(invalid), "{invalid:?}"); + } + } + + #[test] + fn version_cannot_inject_a_path_or_an_extra_build_directive() { + for invalid in [ + "../0.24.1-nightly.20261124.1.1.gabcdef012345", + "0.24.1-nightly.20261124.1.1.gabcdef012345/other", + "0.24.1-nightly.20261124.1.1.gabcdef012345\ncargo:rustc-cfg=other", + ] { + assert!(!is_nightly_version(invalid)); + } + } +} diff --git a/apps/vectorcraft/src/build_flavor.rs b/apps/vectorcraft/src/build_flavor.rs new file mode 100644 index 0000000000..9450a48972 --- /dev/null +++ b/apps/vectorcraft/src/build_flavor.rs @@ -0,0 +1,76 @@ +//! Build-time channel is distinct from a launch selector. A runtime environment cannot promote a +//! stable build, and a nightly build refuses to start without its profile. +use crate::launch_profile::Profile; +use std::ffi::OsString; + +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum BuildFlavor { + Stable, + NightlyV1, +} + +pub const COMPILED: BuildFlavor = if cfg!(vectorcraft_nightly_v1) { BuildFlavor::NightlyV1 } else { BuildFlavor::Stable }; + +pub fn require_profile(flavor: BuildFlavor, profile: &Profile) -> Result<(), String> { + match (flavor, profile.is_nightly()) { + (BuildFlavor::NightlyV1, false) => Err("Open VectorCraft Nightly from ArtCraft Launcher".to_string()), + (BuildFlavor::Stable, true) => Err("This is a stable VectorCraft build; nightly-v1 requires the nightly build".to_string()), + _ => Ok(()), + } +} + +pub fn needs_native_error(flavor: BuildFlavor, desktop_session: bool) -> bool { + desktop_session && flavor == BuildFlavor::NightlyV1 +} + +/// `--version` and `-V` on their own, before any other argument is read. +pub fn version_query(args: &[OsString]) -> bool { + matches!(args, [arg] if arg == "--version" || arg == "-V") +} + +pub fn version(flavor: BuildFlavor, stable: &str) -> String { + match flavor { + BuildFlavor::Stable => stable.to_string(), + BuildFlavor::NightlyV1 => format!("{stable} (nightly-v1)"), + } +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn only_a_nightly_desktop_refusal_requests_a_native_dialog() { + assert!(needs_native_error(BuildFlavor::NightlyV1, true)); + assert!(!needs_native_error(BuildFlavor::NightlyV1, false)); + assert!(!needs_native_error(BuildFlavor::Stable, true)); + assert!(!needs_native_error(BuildFlavor::Stable, false)); + } + + #[test] + fn nightly_build_without_a_profile_is_refused_before_startup() { + let started = std::cell::Cell::new(false); + let result = require_profile(BuildFlavor::NightlyV1, &Profile::Stable).map(|()| started.set(true)); + assert!(result.unwrap_err().contains("ArtCraft Launcher")); + assert!(!started.get()); + } + + #[test] + fn stable_and_nightly_flavors_accept_only_their_own_profile() { + let nightly = Profile::NightlyV1(std::path::PathBuf::from("already validated root")); + assert!(require_profile(BuildFlavor::Stable, &Profile::Stable).is_ok()); + assert!(require_profile(BuildFlavor::Stable, &nightly).is_err()); + assert!(require_profile(BuildFlavor::NightlyV1, &nightly).is_ok()); + assert!(require_profile(BuildFlavor::NightlyV1, &Profile::Stable).is_err()); + } + + #[test] + fn nightly_version_query_is_unambiguous_and_never_reinterprets_file_arguments() { + assert_eq!(version(BuildFlavor::Stable, "0.24.1"), "0.24.1"); + assert_eq!(version(BuildFlavor::NightlyV1, "0.24.1"), "0.24.1 (nightly-v1)"); + assert!(version_query(&["--version".into()])); + assert!(version_query(&["-V".into()])); + assert!(!version_query(&["--".into(), "--version".into()])); + assert!(!version_query(&[])); + } +} diff --git a/apps/vectorcraft/src/gpu.rs b/apps/vectorcraft/src/gpu.rs index 0bf4732ed8..200bbf3095 100644 --- a/apps/vectorcraft/src/gpu.rs +++ b/apps/vectorcraft/src/gpu.rs @@ -398,6 +398,31 @@ pub fn adapter_order( order.into_iter().map(|(i, _)| i).collect() } +/// [`adapter_order`] without the adapters a restart left out after they failed (`skip`) and those +/// that crashed an earlier start (`crashed`), and `true` when that left none and the ones that +/// crashed are tried again. A crash record can't stop a start that has no other adapter to try: +/// the record may be from a start ended from outside before its first frame (#9183), which looks +/// the same as a crash in the driver. An adapter in `skip` failed in this run of the app and +/// stays left out. +pub fn order_leaving_out( + candidates: &[Candidate], + power: PowerPreference, + displays: &[DisplayGpu], + compositor: Option<(u32, u32)>, + named: Option<&str>, + skip: &[String], + crashed: &[String], +) -> (Vec, bool) { + let left_out: Vec = skip.iter().chain(crashed).cloned().collect(); + let order = adapter_order(candidates, power, displays, compositor, named, &left_out); + if !order.is_empty() || crashed.is_empty() { + return (order, false); + } + let again = adapter_order(candidates, power, displays, compositor, named, skip); + let retried = !again.is_empty(); + (again, retried) +} + /// wgpu's own ranking for a power preference: the preferred kind of GPU, the other kind, unknown, /// virtual, software. fn power_rank(t: DeviceType, power: PowerPreference) -> u8 { @@ -683,7 +708,7 @@ impl Startup { return LeftOut::default(); } }; - let (record, crash) = StartRecord::begin(previous, env!("CARGO_PKG_VERSION"), preference_name(preference)); + let (record, crash) = StartRecord::begin(previous, vectorcraft_ui_egui::os_window::version(), preference_name(preference)); let left_out = record.left_out(crash.clone(), explicit); match &crash { Some(Crash::Adapter { key, name }) => { @@ -845,10 +870,9 @@ pub fn selector( ) -> NativeAdapterSelectorMethod { let named = std::env::var(NAME_ENV).ok(); let skip = skipped(); - let left_out: Vec = skip.iter().chain(&crashed).cloned().collect(); Arc::new(move |adapters, surface| { let candidates: Vec = adapters.iter().map(|a| Candidate::new(a, surface)).collect(); - let order = adapter_order(&candidates, power, &displays, compositor, named.as_deref(), &left_out); + let (order, retried) = order_leaving_out(&candidates, power, &displays, compositor, named.as_deref(), &skip, &crashed); let listed: Vec = candidates .iter() .map(|c| { @@ -872,6 +896,9 @@ pub fn selector( }) .collect(); log::info!("graphics adapters: {}", listed.join("; ")); + if retried { + log::warn!("every graphics adapter that can show the window crashed an earlier start: trying them again"); + } let first = order.first().and_then(|&i| adapters.get(i).zip(candidates.get(i))); let Some((adapter, chosen)) = first else { startup.none_left(); diff --git a/apps/vectorcraft/src/gpu/tests.rs b/apps/vectorcraft/src/gpu/tests.rs index f424280b30..fe4a4ddcc5 100644 --- a/apps/vectorcraft/src/gpu/tests.rs +++ b/apps/vectorcraft/src/gpu/tests.rs @@ -827,3 +827,17 @@ fn pci_ids_reject_a_sign_in_the_hex_digits() { assert_eq!(pci_ids("PCI\\VEN_+10DE&DEV_2204"), None); assert_eq!(pci_ids("PCI\\VEN_10DE&DEV_+2204"), None); } + +/// #9183: a Mac lists one adapter. A start ended from outside before its first frame left it +/// recorded as crashed, and the next start left it out and had nothing to draw on. It is tried +/// again when nothing else is left; an adapter a restart left out after it failed stays out, and +/// with another adapter to try, the one that crashed is still left out. +#[test] +fn an_adapter_that_crashed_an_earlier_start_is_tried_again_when_no_other_is_left() { + let mac = [gpu("Apple M6", Backend::Metal, DeviceType::IntegratedGpu)]; + let crashed = vec![mac[0].key.clone()]; + assert_eq!(order_leaving_out(&mac, PowerPreference::LowPower, &[], None, None, &[], &crashed), (vec![0], true)); + assert_eq!(order_leaving_out(&mac, PowerPreference::LowPower, &[], None, None, &crashed, &crashed), (vec![], false)); + let two = [gpu("Apple M6", Backend::Metal, DeviceType::IntegratedGpu), gpu("llvmpipe", Backend::Gl, DeviceType::Cpu)]; + assert_eq!(order_leaving_out(&two, PowerPreference::LowPower, &[], None, None, &[], &crashed), (vec![1], false)); +} diff --git a/apps/vectorcraft/src/hang_watch.rs b/apps/vectorcraft/src/hang_watch.rs index 93c7d4e368..7e384cb6fe 100644 --- a/apps/vectorcraft/src/hang_watch.rs +++ b/apps/vectorcraft/src/hang_watch.rs @@ -137,7 +137,7 @@ impl Facts { let or_unknown = |v: &Option| v.clone().unwrap_or_else(|| "unknown".to_string()); format!( "VectorCraft {} on {} {}\nWindow system: {}; desktop: {}; session type: {}; Flatpak: {}\nGraphics: {}; {}\n", - env!("CARGO_PKG_VERSION"), + vectorcraft_ui_egui::os_window::version(), std::env::consts::OS, std::env::consts::ARCH, self.window_system, diff --git a/apps/vectorcraft/src/launch_profile.rs b/apps/vectorcraft/src/launch_profile.rs new file mode 100644 index 0000000000..2cc32f39dd --- /dev/null +++ b/apps/vectorcraft/src/launch_profile.rs @@ -0,0 +1,272 @@ +//! Launcher-owned nightly-v1 bootstrap. Selected before logging, updates, fonts or saved state. +//! Stable launches retain their original arguments and directory policy. +//! +//! The protocol is `vectorcraft --launch-profile nightly-v1 --profile-root -- [files…]`: the +//! selector and the root are separate tokens, exactly once each, and everything after `--` is a file +//! even when it looks like one of them. The Launcher's version check +//! (`… --version`) is answered before the root is validated or touched. + +use std::ffi::OsString; +use std::path::{Component, Path, PathBuf}; +use std::sync::OnceLock; + +pub const VERSION: &str = "nightly-v1"; + +#[derive(Clone, Debug, PartialEq, Eq)] +pub enum Profile { + Stable, + NightlyV1(PathBuf), +} + +impl Profile { + pub fn is_nightly(&self) -> bool { + matches!(self, Self::NightlyV1(_)) + } + + pub fn root(&self) -> Option<&Path> { + match self { + Self::Stable => None, + Self::NightlyV1(root) => Some(root), + } + } +} + +#[derive(Debug, PartialEq, Eq)] +pub struct Launch { + pub profile: Profile, + pub args: Vec, +} + +static PROFILE: OnceLock = OnceLock::new(); + +pub fn current() -> &'static Profile { + PROFILE.get().unwrap_or(&Profile::Stable) +} + +pub fn install(profile: Profile) -> Result<(), String> { + PROFILE.set(profile).map_err(|_| "the launch profile was already selected".to_string()) +} + +/// Recognize only the agreed literal selector/root pair before `--`. No filesystem or startup hook +/// runs here. +pub fn parse(args: Vec) -> Result { + let mut selector = None; + let mut root = None; + let mut other = Vec::new(); + let mut files = Vec::new(); + let mut iter = args.iter(); + let mut delimiter = false; + while let Some(arg) = iter.next() { + if arg == "--" { + delimiter = true; + files.extend(iter.cloned()); + break; + } + if arg == "--launch-profile" || arg == "--profile-root" { + let slot = if arg == "--launch-profile" { &mut selector } else { &mut root }; + if slot.is_some() { + return Err("the profile selector and root must each occur exactly once".to_string()); + } + let value = iter.next().filter(|v| !v.is_empty()).ok_or_else(|| "the profile selector/root needs a value".to_string())?; + if value.to_string_lossy().starts_with("--") { + return Err("the profile selector/root needs a value".to_string()); + } + *slot = Some(value.clone()); + } else if arg.to_string_lossy().starts_with("--launch-profile=") || arg.to_string_lossy().starts_with("--profile-root=") { + return Err("the nightly protocol requires separate literal selector/root argument tokens".to_string()); + } else { + other.push(arg.clone()); + } + } + match (selector, root) { + (None, None) => Ok(Launch { profile: Profile::Stable, args }), + (Some(version), Some(root)) if version == VERSION => { + if !delimiter || !other.is_empty() { + return Err("nightly-v1 accepts only its selector/root followed by -- and file names".to_string()); + } + let root = PathBuf::from(root); + if !root.is_absolute() || root.components().any(|c| matches!(c, Component::ParentDir)) { + return Err("the nightly profile root must be absolute and contain no parent traversal".to_string()); + } + Ok(Launch { profile: Profile::NightlyV1(root), args: std::iter::once(OsString::from("--")).chain(files).collect() }) + } + (Some(_), Some(_)) => Err("unsupported launch profile (expected nightly-v1)".to_string()), + _ => Err("--launch-profile and --profile-root must be supplied together".to_string()), + } +} + +/// The Launcher's version check: the selector/root pair followed by exactly `--version` (or `-V`), +/// answered like a plain version query. Only [`parse`]'s lexical checks apply; the root is never +/// validated or touched, and `-- --version` stays a file name. +pub fn version_query(args: &[OsString]) -> bool { + let Some((last, pair)) = args.split_last() else { return false }; + if last != "--version" && last != "-V" { + return false; + } + let lexical = pair.iter().cloned().chain(std::iter::once(OsString::from("--"))).collect(); + matches!(parse(lexical), Ok(Launch { profile: Profile::NightlyV1(_), args }) if args.len() == 1) +} + +/// Validation finishes before the caller's first startup effect. Stable never calls the nightly root +/// validator, so its portable and config resolution stays unchanged. +pub fn prepare(mut launch: Launch, validate: impl FnOnce(&Path) -> Result) -> Result { + if let Profile::NightlyV1(root) = &launch.profile { + launch.profile = Profile::NightlyV1(validate(root)?); + } + Ok(launch) +} + +/// Resolve the selected private root before the caller's first startup effect. +pub fn validate_root(root: &Path, env: impl Fn(&str) -> Option, exe: Option<&Path>) -> Result { + crate::profile_root::validate(root, env, exe, crate::prefs_dir::profile::ensure_writable) +} + +/// The arguments a child of this process starts with: a nightly launch hands its profile on, so the +/// child opens the same private profile instead of being refused ("Open VectorCraft Nightly…"), and +/// `--` keeps a file whose name starts with '-' a file. Stable's child arguments are unchanged. +pub fn child_args(files: &[String]) -> Vec { + child_args_for(current(), files) +} + +fn child_args_for(profile: &Profile, files: &[String]) -> Vec { + let mut args: Vec = match profile { + Profile::Stable => Vec::new(), + Profile::NightlyV1(root) => { + vec![OsString::from("--launch-profile"), OsString::from(VERSION), OsString::from("--profile-root"), root.clone().into_os_string()] + } + }; + args.push(OsString::from("--")); + args.extend(files.iter().map(OsString::from)); + args +} + +#[cfg(test)] +mod tests { + use super::*; + use std::cell::Cell; + + fn args(values: &[&str]) -> Vec { + values.iter().map(OsString::from).collect() + } + + fn absolute() -> &'static str { + if cfg!(windows) { r"C:\NightlyData\profiles\vectorcraft" } else { "/nightly-data/profiles/vectorcraft" } + } + + fn nightly() -> Vec { + args(&["--launch-profile", VERSION, "--profile-root", absolute(), "--"]) + } + + #[test] + fn stable_arguments_and_directory_policy_are_unchanged() { + for argv in [args(&[]), args(&["--new-instance", "a.svg"]), args(&["--", "--launch-profile", "file.svg"])] { + let launch = prepare(parse(argv.clone()).unwrap(), |_| panic!("stable must never validate a nightly root")).unwrap(); + assert_eq!(launch, Launch { profile: Profile::Stable, args: argv }); + } + } + + #[test] + fn exact_version_and_root_are_parsed_without_reinterpreting_file_names() { + let mut argv = nightly(); + argv.extend(args(&["--profile-root", "art with spaces.svg"])); + let launch = parse(argv).unwrap(); + assert_eq!(launch.profile, Profile::NightlyV1(PathBuf::from(absolute()))); + assert_eq!(launch.args, args(&["--", "--profile-root", "art with spaces.svg"])); + } + + #[test] + fn missing_duplicate_unknown_and_conflicting_profile_arguments_are_refused() { + for argv in [ + args(&["--launch-profile", VERSION]), + args(&["--profile-root", absolute()]), + args(&["--launch-profile", "future-v2", "--profile-root", absolute(), "--"]), + args(&["--launch-profile", VERSION, "--launch-profile", VERSION, "--profile-root", absolute(), "--"]), + args(&["--launch-profile", VERSION, "--profile-root", absolute(), "--profile-root", absolute(), "--"]), + args(&["--launch-profile", VERSION, "--profile-root", "relative", "--"]), + args(&["--launch-profile", VERSION, "--profile-root", "../escape", "--"]), + args(&["--launch-profile", VERSION, "--profile-root", "", "--"]), + args(&["--launch-profile", VERSION, "--profile-root", absolute(), "--new-instance", "--"]), + args(&["--launch-profile", VERSION, "--profile-root", absolute()]), + ] { + assert!(parse(argv.clone()).is_err(), "{argv:?}"); + } + } + + #[test] + fn the_launcher_version_check_is_a_version_query_only_in_its_exact_form() { + let pair = &["--launch-profile", VERSION, "--profile-root", absolute()]; + let reversed = &["--profile-root", absolute(), "--launch-profile", VERSION]; + for flag in ["--version", "-V"] { + for form in [pair, reversed] { + let mut argv = args(form); + argv.push(flag.into()); + assert!(version_query(&argv), "{argv:?}"); + } + } + for argv in [ + args(&["--version"]), + args(&["--launch-profile", VERSION, "--profile-root", absolute(), "--", "--version"]), + args(&["--launch-profile", VERSION, "--profile-root", absolute(), "--version", "--"]), + args(&["--launch-profile", VERSION, "--profile-root", absolute(), "--new-instance", "--version"]), + args(&["--launch-profile", VERSION, "--profile-root", absolute(), "--version", "--version"]), + args(&["--version", "--launch-profile", VERSION, "--profile-root", absolute()]), + args(&["--launch-profile", "future-v2", "--profile-root", absolute(), "--version"]), + args(&["--launch-profile", VERSION, "--profile-root", "relative", "--version"]), + args(&["--launch-profile", VERSION, "--version"]), + args(&["--launch-profile", VERSION, "--profile-root", absolute(), "--help"]), + ] { + assert!(!version_query(&argv), "{argv:?}"); + } + // Outside the query the strict protocol still refuses the version flag. + assert!(parse(args(&["--launch-profile", VERSION, "--profile-root", absolute(), "--version"])).is_err()); + } + + #[test] + fn failed_root_validation_never_reaches_startup_or_falls_back_to_stable() { + let reached = Cell::new(false); + let result = prepare(parse(nightly()).unwrap(), |_| Err("read-only or unsafe profile".to_string())).map(|_| reached.set(true)); + assert!(result.is_err()); + assert!(!reached.get()); + } + + #[test] + fn successful_root_validation_keeps_the_persistent_root_not_the_binary_tag() { + let checked = PathBuf::from(absolute()).join("checked"); + let launch = prepare(parse(nightly()).unwrap(), |_| Ok(checked.clone())).unwrap(); + assert_eq!(launch.profile.root(), Some(checked.as_path())); + assert!(launch.profile.is_nightly()); + } + + #[test] + fn a_joined_flag_form_is_refused() { + for joined in [format!("--launch-profile={VERSION}"), format!("--profile-root={}", absolute())] { + let argv = vec![OsString::from(joined), OsString::from("--")]; + assert!(parse(argv).is_err()); + } + } + + #[test] + fn a_stable_child_gets_the_file_delimiter_only() { + let child = child_args_for(&Profile::Stable, &["a file.svg".to_string(), "--looks-like-a-flag".to_string()]); + assert_eq!(child, args(&["--", "a file.svg", "--looks-like-a-flag"])); + } + + #[test] + fn a_nightly_child_inherits_the_selected_profile() { + let root = PathBuf::from(absolute()); + let child = child_args_for(&Profile::NightlyV1(root.clone()), &["art.svg".to_string()]); + let expected = vec![ + OsString::from("--launch-profile"), + OsString::from(VERSION), + OsString::from("--profile-root"), + root.into_os_string(), + OsString::from("--"), + OsString::from("art.svg"), + ]; + assert_eq!(child, expected); + // The child's own parse finds the same profile and the file list. + let launch = parse(child).unwrap(); + assert!(launch.profile.is_nightly()); + assert_eq!(launch.args, args(&["--", "art.svg"])); + } +} diff --git a/apps/vectorcraft/src/main.rs b/apps/vectorcraft/src/main.rs index dd9dc3f774..9bfb5ea3d2 100644 --- a/apps/vectorcraft/src/main.rs +++ b/apps/vectorcraft/src/main.rs @@ -28,6 +28,9 @@ #![cfg_attr(all(target_os = "windows", not(debug_assertions)), windows_subsystem = "windows")] mod automation_args; +#[cfg(test)] +mod build_channel; +mod build_flavor; mod clipboard; #[cfg(feature = "wgpu")] mod compositor_gpu; @@ -36,6 +39,7 @@ mod display_profile; #[cfg(feature = "wgpu")] mod gpu; mod hang_watch; +mod launch_profile; #[cfg(target_os = "linux")] mod linux_stylus; mod logging; @@ -46,11 +50,14 @@ mod mac_fonts; mod mac_tablet; #[cfg(target_os = "macos")] mod mac_window; +mod nightly_session; #[cfg(target_os = "macos")] mod open_documents; mod prefs_dir; mod presentation; mod printing; +mod process_identity; +mod profile_root; #[cfg(not(any(target_os = "macos", windows)))] mod quit_windows; #[cfg(not(target_os = "macos"))] @@ -101,9 +108,6 @@ use prefs::{load_prefs, log_dir, open_store, prefs_enabled}; const DEFAULT_SIZE: [f32; 2] = [1440.0, 900.0]; const MIN_SIZE: [f32; 2] = [800.0, 500.0]; -/// The app id every OS window carries; it matches `packaging/linux/ai.storyteller.vectorcraft.desktop`. -const WINDOW_APP_ID: &str = "ai.storyteller.vectorcraft"; - /// The window, Dock, taskbar and app-switcher icon (`assets/app-icon/`, see its README). macOS gets /// the version with Apple's transparent margin; elsewhere the full-bleed tile. The app ID matches /// `packaging/linux/ai.storyteller.vectorcraft.desktop` so Wayland docks find the launcher icon. @@ -137,7 +141,7 @@ fn adapter_summary(info: &eframe::wgpu::AdapterInfo) -> String { fn native_options(custom_titlebar: bool) -> eframe::NativeOptions { eframe::NativeOptions { viewport: egui::ViewportBuilder::default() - .with_title("VectorCraft") + .with_title(vectorcraft_ui_egui::os_window::name()) .with_inner_size(DEFAULT_SIZE) .with_min_inner_size(MIN_SIZE) .with_drag_and_drop(true) @@ -146,11 +150,35 @@ fn native_options(custom_titlebar: bool) -> eframe::NativeOptions { .with_titlebar_shown(false) .with_title_shown(false) .with_icon(app_icon()) - .with_app_id(WINDOW_APP_ID), + .with_app_id(vectorcraft_ui_egui::os_window::app_id()), + // A nightly keeps its own window state in its private profile; a stable build lets eframe + // keep it where it always did. + persistence_path: nightly_window_state(), ..Default::default() } } +/// Where eframe keeps its own saved state, if its persistence feature is ever on: a folder of its +/// own inside the nightly profile ([`nightly_root`]), never the file craft's window placement is in +/// (`/window.json`, which eframe would treat as a folder) and never the stable app's. +fn nightly_window_state() -> Option { + nightly_root().map(|root| root.join("eframe")) +} + +/// The saved window placement (the framework's `window.json`): beside the preferences, as it always +/// was, or inside a nightly's private profile so the two channels never move each other's windows. +fn placement_store() -> Store { + match nightly_root() { + Some(root) => Store::at(&root.join(craft::window::restore::FILE_NAME)), + None => Store::open("vectorcraft"), + } +} + +/// This launch's private Nightly profile, when it is one. +fn nightly_root() -> Option<&'static std::path::Path> { + launch_profile::current().root() +} + struct App { app: VectorcraftApp, /// The preferences, written through [`prefs::save_tick`] and on exit. @@ -277,7 +305,14 @@ fn read_command_line( "--new-instance" => new_instance = true, "--safe-mode" => safe_mode = true, "--version" => { - println!("vectorcraft {}", env!("CARGO_PKG_VERSION")); + // A nightly says what it is, like the early answer; a stable build's line is unchanged. + let line = match build_flavor::COMPILED { + build_flavor::BuildFlavor::Stable => format!("vectorcraft {}\n", vectorcraft_ui_egui::os_window::version()), + build_flavor::BuildFlavor::NightlyV1 => { + format!("VectorCraft {}\n", build_flavor::version(build_flavor::COMPILED, vectorcraft_ui_egui::os_window::version())) + } + }; + let _ = std::io::Write::write_all(&mut std::io::stdout(), line.as_bytes()); return Err(std::process::ExitCode::SUCCESS); } // Before anything starts, like `--version`: from a terminal or an agent's shell the app @@ -332,12 +367,158 @@ fn opens_through_xwayland(pref: Option<&str>) -> bool { true } -fn main() -> std::process::ExitCode { - // Windows: the update helper is a copy of this program started with `--finish-update`. - #[cfg(windows)] - if let Some(result) = craft::update::self_update::finish(&vectorcraft_ui_egui::UPDATE_APP, &std::env::args_os().skip(1).collect::>()) { +/// The nightly channel this build is, as a string for the log. +fn channel_name() -> &'static str { + match build_flavor::COMPILED { + build_flavor::BuildFlavor::Stable => "stable", + build_flavor::BuildFlavor::NightlyV1 => launch_profile::VERSION, + } +} + +/// Says why a nightly launch was refused, then exits 2. A window could not have shown it yet: this +/// app has no message box of its own before eframe starts (its dialogs are egui windows), so the +/// text goes to standard error, which a Launcher launch records. The desktop-session test still +/// decides whether a daily user would have seen it, for the message's wording. +fn report_launch_profile_error(error: &str) { + eprintln!("VectorCraft launch profile: {error}"); + let desktop_session = cfg!(windows) + || cfg!(target_os = "macos") + || (cfg!(target_os = "linux") && ["DISPLAY", "WAYLAND_DISPLAY"].into_iter().any(|key| std::env::var_os(key).is_some_and(|v| !v.is_empty()))); + if build_flavor::needs_native_error(build_flavor::COMPILED, desktop_session) { + eprintln!("VectorCraft Nightly: open it from ArtCraft Launcher, which starts it in its own profile"); + } +} + +/// Selects the immutable launch profile before any startup service or side effect, and returns the +/// arguments the rest of `main` reads. `None` means the process ends here (`--version` answered). +fn prepare_launch() -> Option> { + // The trusted Launcher protocol is decided before the logger, updates, fonts or any saved state. + let argv: Vec<_> = std::env::args_os().skip(1).collect(); + // A nightly answers its version before root validation, process identity, IPC or any window: + // plain `--version`/`-V`, or the Launcher's `--launch-profile nightly-v1 --profile-root + // --version`. A stable build leaves the answer to `read_command_line`, exactly as before. + if build_flavor::COMPILED == build_flavor::BuildFlavor::NightlyV1 && (build_flavor::version_query(&argv) || launch_profile::version_query(&argv)) + { + use std::io::Write as _; + let line = format!("VectorCraft {}\n", build_flavor::version(build_flavor::COMPILED, env!("VECTORCRAFT_BUILT_VERSION"))); + let _ = std::io::stdout().write_all(line.as_bytes()); + return None; + } + let early = launch_profile::parse(argv) + .and_then(|launch| { + build_flavor::require_profile(build_flavor::COMPILED, &launch.profile)?; + Ok(launch) + }) + .and_then(|launch| { + launch_profile::prepare(launch, |root| { + launch_profile::validate_root(root, |key| std::env::var_os(key), std::env::current_exe().ok().as_deref()) + }) + }) + .unwrap_or_else(|error| { + report_launch_profile_error(&error); + std::process::exit(2) + }); + let nightly = early.profile.is_nightly(); + let identity = + if nightly { vectorcraft_ui_egui::os_window::LaunchIdentity::NightlyV1 } else { vectorcraft_ui_egui::os_window::LaunchIdentity::Stable }; + let install = launch_profile::install(early.profile).and_then(|()| { + // Every data path follows the selected profile from here on: settings, logs, recovery, the + // user's libraries, plug-ins, caches and the single-instance record. + if let Some(root) = launch_profile::current().root() { + prefs_dir::profile::install_data_root(root.to_path_buf())?; + } + vectorcraft_ui_egui::os_window::select_identity(identity) + }); + if let Err(error) = install { + report_launch_profile_error(&error); + std::process::exit(2); + } + if let Err(error) = vectorcraft_ui_egui::os_window::set_version(env!("VECTORCRAFT_BUILT_VERSION")) { + report_launch_profile_error(&error); + std::process::exit(2); + } + // A nightly's taskbar identity, before the first window: otherwise Windows groups it with the + // stable app and the Launcher's own entry. + if let Err(error) = + process_identity::initialize(nightly, vectorcraft_ui_egui::os_window::id_for(vectorcraft_ui_egui::os_window::LaunchIdentity::NightlyV1)) + { + report_launch_profile_error(&error.to_string()); + // The window's identity, not the profile, failed: main's own failure status (1). + std::process::exit(1); + } + Some(early.args) +} + +/// The arguments the rest of `main` reads: a nightly's profile tokens were consumed by +/// `prepare_launch`, so what is left is `--` and the files to open. A stable launch reads its +/// arguments exactly as it always did. +fn launch_arguments(nightly: bool, arguments: &[std::ffi::OsString]) -> Vec { + if nightly { arguments.iter().map(|a| a.to_string_lossy().into_owned()).collect() } else { std::env::args().skip(1).collect() } +} + +/// The control channel's port, and the token's notice with the token itself. +type ControlChannel = (Option, Option<(String, String)>); + +/// Port and token of the control channel, or the message to print. A nightly is started by the +/// Launcher, never by an agent, so the channel and its inherited environment stay off: no token +/// file is read and nothing listens. +fn control_channel(control: &automation_args::ControlArg, nightly: bool) -> Result { + if nightly { + if control.options().port.is_some() || std::env::var_os("VECTORCRAFT_CONTROL_PORT").is_some() { + eprintln!("vectorcraft: the control channel is off in a nightly build"); + } + return Ok((None, None)); + } + let options = ControlOptions::resolve(control.options(), &EnvNames::for_app("VECTORCRAFT")).map_err(|e| e.to_string())?; + let port = options.port; + // Read before the window opens: a token file that can't be read keeps the app from starting + // rather than leaving the channel open without one. + let token = port.map(|_| options.server_token()).transpose().map_err(|e| e.to_string())?; + Ok((port, token.map(|token| (options.token_notice(&token), token)))) +} + +/// A nightly's own session record: whether the previous session did not finish normally, to be +/// reported once the window is up. This session is cleared only on a controlled return (`on_exit`, +/// or the code after the event loop). Stable keeps no record. +fn previous_nightly_session_was_unclean(nightly: bool) -> bool { + if !nightly { + return false; + } + match nightly_session::begin(nightly_root(), vectorcraft_ui_egui::os_window::version(), None) { + Ok(unclean) => unclean, + Err(e) => { + log::warn!("Nightly session health is unavailable: {e}"); + false + } + } +} + +/// The first log lines: the version and channel, then a nightly's profile root. +fn log_startup(nightly: bool) { + log::info!("VectorCraft {} ({})", vectorcraft_ui_egui::os_window::version(), channel_name()); + if nightly { + log::info!("nightly profile: {}", nightly_root().map(|root| root.display().to_string()).unwrap_or_default()); + } +} + +/// Windows: the update helper is a copy of this program started with `--finish-update`. Nightly is +/// updated by the Launcher, so it never starts one (`build_flavor` keeps its updater off). +#[cfg(windows)] +fn finish_pending_update(nightly: bool) { + if !nightly + && let Some(result) = craft::update::self_update::finish(&vectorcraft_ui_egui::UPDATE_APP, &std::env::args_os().skip(1).collect::>()) + { std::process::exit(i32::from(result.is_err())); } +} + +fn main() -> std::process::ExitCode { + // The launch profile first: a nightly build without one is refused here, before the update + // helper, the logger, fonts or any saved state, and `--version` is answered here too. + let Some(arguments) = prepare_launch() else { return std::process::ExitCode::SUCCESS }; + let nightly = launch_profile::current().is_nightly(); + #[cfg(windows)] + finish_pending_update(nightly); // Before any thread starts: the pointer must find a cursor theme on Wayland (#2450). #[cfg(target_os = "linux")] cursor_theme::apply(); @@ -348,32 +529,21 @@ fn main() -> std::process::ExitCode { let mut roots_args = automation_args::AutomationArgs::new(root_env("VECTORCRAFT_AUTOMATION_READ_ROOT"), root_env("VECTORCRAFT_AUTOMATION_WRITE_ROOT")); let mut presentation = presentation::Overrides::default(); + let given = launch_arguments(nightly, &arguments); let CommandLine { files: command_line_files, in_window_menus, new_instance, safe_mode: safe_mode_flag } = - match read_command_line(std::env::args().skip(1), &mut control, &mut roots_args, &mut presentation) { + match read_command_line(given.into_iter(), &mut control, &mut roots_args, &mut presentation) { Ok(command_line) => command_line, Err(code) => return code, }; let automation_args::AutomationArgs { read_roots, write_roots, .. } = roots_args; // After the arguments: the flags and `--version` win over a bad environment value. - let control_options = match ControlOptions::resolve(control.options(), &EnvNames::for_app("VECTORCRAFT")) { - Ok(options) => options, - Err(e) => { - eprintln!("vectorcraft: {e}"); - return std::process::ExitCode::FAILURE; - } - }; - let control_port = control_options.port; - // Read before the window opens: a token file that can't be read keeps the app from starting - // rather than leaving the channel open without one. - let control_token = match control_port.map(|_| control_options.server_token()).transpose() { - Ok(token) => token.map(|token| (control_options.token_notice(&token), token)), - Err(e) => { - eprintln!("vectorcraft: {e}"); - return std::process::ExitCode::FAILURE; - } - }; + let (control_port, control_token) = control_channel(&control, nightly).unwrap_or_else(|message| { + eprintln!("vectorcraft: {message}"); + std::process::exit(1) + }); // Before desktop services, so every start-up warning is recorded (`logging`). let logger = logging::install(); + log_startup(nightly); // Files opened from the file manager while VectorCraft runs open in its window (#4892). Before // the log file is attached: a launch that hands its files over leaves the running app's log be. #[cfg(not(target_os = "macos"))] @@ -401,13 +571,14 @@ fn main() -> std::process::ExitCode { if let Some(logger) = logger { match log_dir().filter(|_| prefs_enabled()) { Some(dir) => match logger.attach_dir(&dir) { - Ok(path) => log::info!("VectorCraft {}, log file {}", env!("CARGO_PKG_VERSION"), path.display()), + Ok(path) => log::info!("VectorCraft {}, log file {}", vectorcraft_ui_egui::os_window::version(), path.display()), // Standard error only by now (`attach_dir` gave up on the file); unlike `eprintln!`, never panics. Err(e) => log::warn!("no log file: {e}"), }, None => logger.no_file(), } } + let previous_nightly_unclean = previous_nightly_session_was_unclean(nightly); // The report a session left when it was closed while it did not answer (`hang_watch`). let previous_hang = log_dir().filter(|_| prefs_enabled()).and_then(|dir| hang_watch::take_previous(&dir)); if let Some(report) = &previous_hang { @@ -591,11 +762,11 @@ fn main() -> std::process::ExitCode { let run = |options: eframe::NativeOptions, app_creator: eframe::AppCreator<'_>| { #[cfg(target_os = "linux")] { - linux_stylus::run_native("VectorCraft", options, app_creator) + linux_stylus::run_native(vectorcraft_ui_egui::os_window::name(), options, app_creator) } #[cfg(not(target_os = "linux"))] { - eframe::run_native("VectorCraft", options, app_creator) + eframe::run_native(vectorcraft_ui_egui::os_window::name(), options, app_creator) } }; let outcome = vectorcraft_engine::guard::catch_panic(|| { @@ -605,8 +776,8 @@ fn main() -> std::process::ExitCode { let ctx = &cc.egui_ctx; let winit_window = cc.winit_window().cloned(); let spec = InstallSpec::new(shell_info, Arc::new(SystemWindows)) - .app_id(WINDOW_APP_ID) - .placement(Arc::new(Mutex::new(Store::open("vectorcraft")))) + .app_id(vectorcraft_ui_egui::os_window::app_id()) + .placement(Arc::new(Mutex::new(placement_store()))) .frame(decision); let spec = match start_pen(&winit_window) { Some(pen) => spec.pen(pen), @@ -621,11 +792,15 @@ fn main() -> std::process::ExitCode { }; let (files, file_panels) = file_service(wake, folders); let files = Arc::new(files); - craft::host::Host::builder(AppInfo { id: "vectorcraft", name: "VectorCraft", version: env!("CARGO_PKG_VERSION") }) - .i18n(vectorcraft_ui_egui::i18n::shared()) - .settings(Arc::new(settings.clone())) - .files(files.clone()) - .install(ctx); + craft::host::Host::builder(AppInfo { + id: vectorcraft_ui_egui::os_window::SETTINGS_APP_ID, + name: vectorcraft_ui_egui::os_window::name(), + version: vectorcraft_ui_egui::os_window::version(), + }) + .i18n(vectorcraft_ui_egui::i18n::shared()) + .settings(Arc::new(settings.clone())) + .files(files.clone()) + .install(ctx); let mut session = Session::new(); // The profiles loaded before come back before the preferences name any of them. prefs_dir::attach_profile_store(&mut session); @@ -636,6 +811,9 @@ fn main() -> std::process::ExitCode { let launch_dir = prefs_dir::prefs_dir().filter(|_| prefs_enabled()).map(|d| d.join("Launch")); let folder = |name: &str| prefs_dir::prefs_dir().map(|d| d.join(name).to_string_lossy().to_string()); let stopped = safe_mode::begin_launch(launch_dir.as_deref(), safe_mode_flag); + // The launch's loads of the stored plug-ins and the plug-ins folder go on on worker + // threads while the window shows; the frames install them as they finish. + session.load_plugins_in_background(true); prefs_dir::attach_plugin_store(&mut session); // File › Scripts lists the scripts of the Scripts folder next to the preferences. prefs_dir::attach_scripts_dir(&mut session); @@ -646,9 +824,14 @@ fn main() -> std::process::ExitCode { prefs_dir::attach_script_data(&mut session); let mut app = VectorcraftApp::new(session, services(winit_window.clone())); app.adopt_context(&cc.egui_ctx); - app.set_startup_update_check(true); + // A nightly is updated by the Launcher: it never checks for a stable release, which + // would install this program's own updater over the nightly build. + app.set_startup_update_check(!nightly); load_prefs(&mut app, &settings); safe_mode::after_start(&mut app, stopped); + // Loads started later (a preference change, the end of Safe Mode) are waited for, + // after the launch's own. + app.session.load_plugins_in_background(false); // The saved PDF presets live in their own folder (also read by vectorcraft-cli), // which takes over from the copy the preferences file used to hold. prefs_dir::attach_pdf_preset_store(&mut app.session); @@ -741,6 +924,17 @@ fn main() -> std::process::ExitCode { if previous_hang.is_some() && app.ui.status.is_empty() { vectorcraft_ui_egui::troubleshooting::last_session_stopped(&mut app); } + // The previous nightly session did not finish normally: say so once, in the window + // that is now up, and only then let a clean exit clear the record. + if previous_nightly_unclean { + // A graphics, plug-in or hang message may be up already: keep it, as above. + if app.ui.status.is_empty() { + app.status( + "The previous VectorCraft Nightly session did not finish normally. Nothing has been sent anywhere; Help › About has this build's version for a bug report", + ); + } + nightly_session::mark_notice_shown(); + } let mut control_server = None; if let (Some(port), Some((notice, token))) = (control_port, control_token) { match server::listen(port, token, craft::ui::runtime::windows::WindowHost::of(&cc.egui_ctx)) { @@ -803,7 +997,13 @@ fn main() -> std::process::ExitCode { ) }); // The window is gone: later launches start their own app, including the one a graphics - // failure starts again below. + // failure starts again below. A nightly's session record is finished here, by the controlled + // return, before a successor can take the profile; on macOS the window's own `on_exit` already + // did it (a Dock quit ends the process inside AppKit), so this is then a no-op. A run that + // reports a startup error has still returned in a controlled way (that error is logged and + // exits FAILURE below), so only a caught panic keeps the record for the next launch to report; + // it then also frees the lease for the successor this run may still start. + nightly_session::finish_after(outcome.is_ok()); #[cfg(not(target_os = "macos"))] single_instance::resign(); // The process ends normally from here: this launch didn't stop while a plug-in was loading. diff --git a/apps/vectorcraft/src/nightly_session.rs b/apps/vectorcraft/src/nightly_session.rs new file mode 100644 index 0000000000..5e24527592 --- /dev/null +++ b/apps/vectorcraft/src/nightly_session.rs @@ -0,0 +1,297 @@ +//! App-private Nightly session health, not telemetry and not a Launcher protocol. +//! A live owner holds a separate persistent lease; secondary launches never rewrite its record. +//! Dropping the guard does not clear the marker. Only the app's controlled return path does. + +use std::fs::{File, OpenOptions}; +use std::io::{self, Read}; +use std::path::{Path, PathBuf}; +use std::sync::{Mutex, PoisonError}; + +const RECORD: &str = "nightly-session.json"; +const LEASE: &str = "nightly-session.lock"; +const MAX_METADATA_BYTES: usize = 256; + +static SESSION: Mutex> = Mutex::new(None); +/// Set once a window has posted the interruption notice; until then the record must survive. +static NOTICE_SHOWN: std::sync::atomic::AtomicBool = std::sync::atomic::AtomicBool::new(false); + +pub struct Session { + _lease: File, + path: PathBuf, + own_record: Vec, + previous_unclean: bool, +} + +fn regular_or_missing(path: &Path) -> io::Result { + match std::fs::symlink_metadata(path) { + Ok(metadata) if metadata.file_type().is_file() && !metadata.file_type().is_symlink() => Ok(true), + Ok(_) => Err(io::Error::other("Nightly session state must be a regular file, not an alias or directory")), + Err(error) if error.kind() == io::ErrorKind::NotFound => Ok(false), + Err(error) => Err(error), + } +} + +/// Replace `path` with `bytes` without ever following a link at the destination: the temporary file +/// is created fresh in the same folder and renamed over the name, and a rename replaces the link +/// itself, never its target. A destination that is not a regular file is refused. +fn atomic_write_no_follow(path: &Path, bytes: &[u8]) -> io::Result<()> { + // A destination that is a folder or a link is refused before anything is written. + regular_or_missing(path)?; + let dir = path.parent().ok_or_else(|| io::Error::other("Nightly session state has no folder"))?; + std::fs::create_dir_all(dir)?; + let name = path.file_name().map(|name| name.to_string_lossy().into_owned()).unwrap_or_default(); + let temporary = dir.join(format!(".{name}.{}.tmp", std::process::id())); + let _ = std::fs::remove_file(&temporary); + let mut options = OpenOptions::new(); + options.write(true).create_new(true); + #[cfg(unix)] + std::os::unix::fs::OpenOptionsExt::mode(&mut options, 0o600); + let written = options.open(&temporary).and_then(|mut file| { + use std::io::Write as _; + file.write_all(bytes)?; + file.sync_all()?; + std::fs::rename(&temporary, path) + }); + if written.is_err() { + // Best effort: the temporary file is all there is to clean up. + let _ = std::fs::remove_file(&temporary); + } + if written.is_ok() + && let Ok(handle) = File::open(dir) + { + // The rename is durable once its folder is. + let _ = handle.sync_all(); + } + written +} + +impl Session { + /// This launch's record: `None` for a stable build or when another window of the same profile + /// owns it. The root must already be the validated private Nightly profile. + pub fn begin(root: Option<&Path>, version: &str, commit: Option<&str>) -> io::Result> { + let Some(root) = root else { return Ok(None) }; + if version.is_empty() || version.len() > MAX_METADATA_BYTES || commit.is_some_and(|value| value.len() > MAX_METADATA_BYTES) { + return Err(io::Error::new(io::ErrorKind::InvalidInput, "Nightly session provenance is missing or too large")); + } + let lease_path = root.join(LEASE); + regular_or_missing(&lease_path)?; + let lease = OpenOptions::new().read(true).write(true).create(true).truncate(false).open(lease_path)?; + match lease.try_lock() { + Ok(()) => {} + Err(std::fs::TryLockError::WouldBlock) => return Ok(None), + Err(std::fs::TryLockError::Error(error)) => return Err(error), + } + let path = root.join(RECORD); + let previous_unclean = regular_or_missing(&path)?; + let own_record = serde_json::to_vec(&serde_json::json!({ + "schema_version": 1, + "channel": "nightly-v1", + "version": version, + "commit": commit.filter(|value| !value.is_empty()), + }))?; + atomic_write_no_follow(&path, &own_record)?; + Ok(Some(Self { _lease: lease, path, own_record, previous_unclean })) + } + + pub fn previous_unclean(&self) -> bool { + self.previous_unclean + } + + /// Controlled return. If an earlier session's interruption was detected but no window showed it + /// yet (a renderer failure before the app callback, or the hand-off to a second window), the + /// record is left for the next owner to report; otherwise this is [`Self::complete`]. + pub fn finish(self, unclean_notice_shown: bool) -> io::Result<()> { + if self.previous_unclean && !unclean_notice_shown { + return Ok(()); + } + self.complete() + } + + /// Controlled event-loop completion, including a handled startup error. Clear before a successor + /// can take the profile. An unwind, abort, forced exit or killed process never calls this. + pub fn complete(self) -> io::Result<()> { + if !regular_or_missing(&self.path)? { + return Ok(()); + } + let mut current = Vec::new(); + File::open(&self.path)?.take(self.own_record.len() as u64 + 1).read_to_end(&mut current)?; + if current != self.own_record { + return Err(io::Error::other("Nightly session state changed; leaving it intact")); + } + std::fs::remove_file(&self.path) + } +} + +/// Starts this launch's record, keeping it until [`finish_once`]. A profile another window already +/// owns gets no record (`Ok(false)` and no notice); a failure to record is reported, never fatal. +pub fn begin(root: Option<&Path>, version: &str, commit: Option<&str>) -> Result { + let session = Session::begin(root, version, commit).map_err(|e| e.to_string())?; + let previous_unclean = session.as_ref().is_some_and(Session::previous_unclean); + *SESSION.lock().unwrap_or_else(PoisonError::into_inner) = session; + Ok(previous_unclean) +} + +/// A window showed the interruption notice: a controlled return now clears the record. +pub fn mark_notice_shown() { + NOTICE_SHOWN.store(true, std::sync::atomic::Ordering::Relaxed); +} + +/// The controlled return, by whichever path comes first (the window's `on_exit`, which every quit +/// reaches, or the code after the event loop). Later calls do nothing. +pub fn finish_once() { + let shown = NOTICE_SHOWN.load(std::sync::atomic::Ordering::Relaxed); + let watch = SESSION.lock().unwrap_or_else(PoisonError::into_inner).take(); + if let Some(watch) = watch + && let Err(error) = watch.finish(shown) + { + log::warn!("Nightly session state was left intact: {error}"); + } +} + +/// The end of a launch: a controlled return clears the record ([`finish_once`]); an abnormal one +/// (a caught panic) keeps it for the next launch to report and only frees the lease, so the +/// successor a graphics restart starts can take the profile. +pub fn finish_after(clean: bool) { + if clean { finish_once() } else { release() } +} + +/// An abnormal end: the record stays, the lease is dropped. Later calls do nothing. +fn release() { + drop(SESSION.lock().unwrap_or_else(PoisonError::into_inner).take()); +} + +#[cfg(test)] +mod tests { + use super::*; + use std::sync::atomic::{AtomicU64, Ordering}; + + struct Fixture(PathBuf); + + impl Fixture { + fn new() -> Self { + static NEXT: AtomicU64 = AtomicU64::new(0); + loop { + let path = + std::env::temp_dir().join(format!("vectorcraft-nightly-session-{}-{}", std::process::id(), NEXT.fetch_add(1, Ordering::Relaxed))); + match std::fs::create_dir(&path) { + Ok(()) => return Self(path), + Err(error) if error.kind() == std::io::ErrorKind::AlreadyExists => continue, + Err(error) => panic!("cannot create owned fixture: {error}"), + } + } + } + } + + impl Drop for Fixture { + fn drop(&mut self) { + std::fs::remove_dir_all(&self.0).unwrap(); + } + } + + #[test] + fn stable_has_no_session_side_effects() { + let fixture = Fixture::new(); + assert!(Session::begin(None, "0.24.1", None).unwrap().is_none()); + assert_eq!(std::fs::read_dir(&fixture.0).unwrap().count(), 0); + } + + #[test] + fn a_busy_secondary_reports_nothing_and_keeps_the_owner_record() { + let fixture = Fixture::new(); + let first = Session::begin(Some(&fixture.0), "nightly", Some("owned-commit")).unwrap().unwrap(); + let record = std::fs::read(fixture.0.join(RECORD)).unwrap(); + assert!(Session::begin(Some(&fixture.0), "secondary", None).unwrap().is_none()); + assert_eq!(std::fs::read(fixture.0.join(RECORD)).unwrap(), record, "a busy secondary must not replace the owner's record"); + first.complete().unwrap(); + assert!(!fixture.0.join(RECORD).exists()); + } + + #[test] + fn controlled_completion_is_clean_but_an_unfinished_owner_is_reported_next_time() { + let fixture = Fixture::new(); + let first = Session::begin(Some(&fixture.0), "first", Some("recorded-commit")).unwrap().unwrap(); + assert!(!first.previous_unclean()); + first.complete().unwrap(); + assert!(!fixture.0.join(RECORD).exists()); + let unfinished = Session::begin(Some(&fixture.0), "second", None).unwrap().unwrap(); + assert!(!unfinished.previous_unclean()); + drop(unfinished); // Unwind or abnormal ownership release, not a controlled completion. + let next = Session::begin(Some(&fixture.0), "third", None).unwrap().unwrap(); + assert!(next.previous_unclean()); + next.complete().unwrap(); + assert!(!fixture.0.join(RECORD).exists()); + } + + #[test] + fn an_interruption_no_window_showed_survives_a_handled_startup_failure() { + let fixture = Fixture::new(); + drop(Session::begin(Some(&fixture.0), "crashed", None).unwrap().unwrap()); + // The window failed before the app callback: no notice was shown. + let failed = Session::begin(Some(&fixture.0), "failed", None).unwrap().unwrap(); + assert!(failed.previous_unclean()); + failed.finish(false).unwrap(); + let retry = Session::begin(Some(&fixture.0), "retry", None).unwrap().unwrap(); + assert!(retry.previous_unclean()); + retry.finish(true).unwrap(); + assert!(!fixture.0.join(RECORD).exists(), "a session that showed the notice clears its record"); + let clean = Session::begin(Some(&fixture.0), "clean", None).unwrap().unwrap(); + assert!(!clean.previous_unclean()); + clean.finish(false).unwrap(); + assert!(!fixture.0.join(RECORD).exists()); + } + + #[test] + fn an_abnormal_end_keeps_the_record_but_frees_the_lease() { + let fixture = Fixture::new(); + assert!(!begin(Some(&fixture.0), "nightly", Some("panicked")).unwrap()); + finish_after(false); + // A second end is a no-op, and the record stays for the next launch to report. + finish_after(false); + assert!(fixture.0.join(RECORD).exists(), "a caught panic leaves its record"); + let successor = Session::begin(Some(&fixture.0), "successor", None).unwrap().unwrap(); + assert!(successor.previous_unclean(), "the successor reports the interruption"); + successor.finish(true).unwrap(); + assert!(!fixture.0.join(RECORD).exists()); + // A controlled return still clears the record it recorded. + assert!(!begin(Some(&fixture.0), "clean", None).unwrap()); + finish_after(true); + assert!(!fixture.0.join(RECORD).exists(), "a controlled return clears its record"); + } + + #[test] + fn cleanup_never_removes_an_unknown_changed_record() { + let fixture = Fixture::new(); + let watch = Session::begin(Some(&fixture.0), "nightly", None).unwrap().unwrap(); + std::fs::write(fixture.0.join(RECORD), b"replacement owned by someone else").unwrap(); + assert!(watch.complete().is_err()); + assert_eq!(std::fs::read(fixture.0.join(RECORD)).unwrap(), b"replacement owned by someone else"); + } + + #[test] + fn provenance_is_bounded_and_never_collects_documents_paths_or_diagnostics() { + let fixture = Fixture::new(); + assert!(Session::begin(Some(&fixture.0), &"x".repeat(MAX_METADATA_BYTES + 1), None).is_err()); + assert_eq!(std::fs::read_dir(&fixture.0).unwrap().count(), 0); + let watch = Session::begin(Some(&fixture.0), "nightly", None).unwrap().unwrap(); + let data: serde_json::Value = serde_json::from_slice(&std::fs::read(fixture.0.join(RECORD)).unwrap()).unwrap(); + let fields = data.as_object().unwrap().keys().map(String::as_str).collect::>(); + assert_eq!(fields, ["schema_version", "channel", "version", "commit"].into_iter().collect()); + assert!(data["commit"].is_null(), "missing provenance must not be invented"); + watch.complete().unwrap(); + } + + #[cfg(unix)] + #[test] + fn reserved_state_aliases_do_not_modify_external_files() { + let fixture = Fixture::new(); + let external = fixture.0.join("stable-document"); + std::fs::write(&external, b"stable bytes").unwrap(); + for name in [LEASE, RECORD] { + let alias = fixture.0.join(name); + std::os::unix::fs::symlink(&external, &alias).unwrap(); + assert!(Session::begin(Some(&fixture.0), "nightly", None).is_err(), "{name}"); + assert_eq!(std::fs::read(&external).unwrap(), b"stable bytes"); + std::fs::remove_file(alias).unwrap(); + } + } +} diff --git a/apps/vectorcraft/src/process_identity.rs b/apps/vectorcraft/src/process_identity.rs new file mode 100644 index 0000000000..79f812c4f1 --- /dev/null +++ b/apps/vectorcraft/src/process_identity.rs @@ -0,0 +1,82 @@ +//! Set the immutable nightly Windows identity (the taskbar group and jump-list id) before any native +//! window or COM service. Stable deliberately leaves its implicit shortcut identity unchanged, so the +//! MSI's shortcuts keep matching it. + +use std::sync::OnceLock; + +#[derive(Clone, Debug, PartialEq, Eq)] +pub enum IdentityError { + Configuration(String), +} + +impl std::fmt::Display for IdentityError { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Self::Configuration(message) => f.write_str(message), + } + } +} + +impl std::error::Error for IdentityError {} + +pub fn initialize(nightly: bool, app_id: &str) -> Result<(), IdentityError> { + // winsafe arrives with the wgpu renderer, which every desktop package builds with. + configure(nightly && cfg!(windows) && cfg!(feature = "wgpu"), app_id, |id| { + static RESULT: OnceLock> = OnceLock::new(); + RESULT + .get_or_init(|| { + #[cfg(all(windows, feature = "wgpu"))] + { + winsafe::SetCurrentProcessExplicitAppUserModelID(id) + .map_err(|error| format!("cannot set the nightly Windows identity: {error}"))?; + let actual = winsafe::GetCurrentProcessExplicitAppUserModelID() + .map_err(|error| format!("cannot read back the nightly Windows identity: {error}"))?; + if actual != id { + return Err("the native Windows identity did not match the selected nightly channel".to_string()); + } + Ok(()) + } + #[cfg(not(all(windows, feature = "wgpu")))] + { + let _ = id; + Ok(()) + } + }) + .clone() + }) + .map_err(IdentityError::Configuration) +} + +fn configure(explicit_nightly: bool, app_id: &str, set: impl FnOnce(&str) -> Result<(), String>) -> Result<(), String> { + if explicit_nightly { set(app_id) } else { Ok(()) } +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn stable_does_not_call_the_explicit_identity_api() { + configure(false, "nightly-id", |_| panic!("stable identity must remain implicit")).unwrap(); + } + + #[test] + fn nightly_applies_the_supplied_identity_once() { + let calls = std::cell::Cell::new(0); + configure(true, "nightly-id", |id| { + assert_eq!(id, "nightly-id"); + calls.set(calls.get() + 1); + Ok(()) + }) + .unwrap(); + assert_eq!(calls.get(), 1); + } + + #[test] + fn native_identity_failure_is_returned_instead_of_starting_a_window() { + let started = std::cell::Cell::new(false); + let result = configure(true, "nightly-id", |_| Err("native identity refused".to_string())).map(|()| started.set(true)); + assert_eq!(result.unwrap_err(), "native identity refused"); + assert!(!started.get()); + } +} diff --git a/apps/vectorcraft/src/profile.rs b/apps/vectorcraft/src/profile.rs index 672ae61baa..9b3a671c70 100644 --- a/apps/vectorcraft/src/profile.rs +++ b/apps/vectorcraft/src/profile.rs @@ -1,6 +1,9 @@ //! Native profile paths. Isolated profiles never migrate preferences from a user's old profile. //! //! In order: +//! 0. The profile root a nightly launch selected ([`install_data_root`]): the Launcher's private +//! folder, which every one of the app's settings, logs, recovery copies, plug-ins, caches and +//! single-instance records then follows, with no legacy migration. //! 1. `VECTORCRAFT_CONFIG_DIR`, when set (tests, agents, custom setups). //! 2. **Portable mode** (#1366), as in PhotoCraft: a marker file ([`PORTABLE_MARKERS`]) in the //! install folder puts the settings in `VectorCraftData` beside it, so a portable copy leaves @@ -24,14 +27,45 @@ pub const PORTABLE_MARKERS: [&str; 2] = ["portable.txt", "VectorCraft.portable"] /// The settings folder created in the install folder in portable mode. pub const PORTABLE_DATA_DIR: &str = "VectorCraftData"; -/// The settings folder of VectorCraft, or of DrawCraft (`legacy`). -pub fn prefs_dir(legacy: bool) -> Option { - prefs_dir_with(std::env::consts::OS, legacy, |key| std::env::var_os(key), portable_dir) +/// The profile root this process was launched with, if any: a nightly launch's private folder. +static DATA_ROOT: OnceLock = OnceLock::new(); + +/// Makes `root` this process's settings folder and everything under it, once, before anything reads +/// a path. The desktop calls it from `prepare_launch` with the root it validated; the command line +/// tool never does, so it keeps resolving the user's own folder. +// The desktop installs it from `prepare_launch`; `vectorcraft-cli` includes this file and never does. +#[allow(dead_code)] +pub(crate) fn install_data_root(root: PathBuf) -> Result<(), String> { + if !root.is_absolute() { + return Err("the data root must be absolute".to_string()); + } + DATA_ROOT.set(root).map_err(|_| "the data root was already installed".to_string()) } -/// `portable` is the portable settings folder, if any: only asked for when no override is set and -/// preferences are in use. -fn prefs_dir_with(os: &str, legacy: bool, env: impl Fn(&str) -> Option, portable: impl FnOnce() -> Option) -> Option { +/// The installed profile root, if this launch has one. +pub(crate) fn data_root() -> Option<&'static Path> { + DATA_ROOT.get().map(PathBuf::as_path) +} + +/// The settings folder of VectorCraft, or of DrawCraft (`legacy`). +pub fn prefs_dir(legacy: bool) -> Option { + prefs_dir_with(std::env::consts::OS, legacy, |key| std::env::var_os(key), portable_dir, data_root()) +} + +/// `portable` is the portable settings folder, if any: only asked for when neither the launch's +/// profile nor an override is set and preferences are in use. +fn prefs_dir_with( + os: &str, + legacy: bool, + env: impl Fn(&str) -> Option, + portable: impl FnOnce() -> Option, + root: Option<&Path>, +) -> Option { + // A nightly launch's private profile wins over everything, and a run of DrawCraft's legacy + // folder is never read into it. + if let Some(root) = root { + return (!legacy).then(|| root.to_path_buf()); + } if let Some(root) = env("VECTORCRAFT_CONFIG_DIR") { // Never fall back to DrawCraft's real profile when the isolated file does not exist. return (!legacy && !root.is_empty()).then(|| PathBuf::from(root)); @@ -125,8 +159,9 @@ fn portable_dir_in(install_dir: &Path, previous: Option<&Path>) -> Result