mirror of
https://github.com/penpot/penpot.git
synced 2026-08-28 07:38:42 +00:00
* ✨ Auto-link libraries during import based on slugified name When a Penpot file is exported without bundled libraries and then imported into a different environment, external library links are broken because library UUIDs differ across environments. This feature adds a heuristic to auto-relink libraries by matching slugified library names against shared files in the target team: - Export: embed external library metadata (id, name, slug, used-by) in the manifest when libraries are not included in the export. - Import: resolve external libraries by slugifying shared file names in the destination team and matching against manifest slugs. - Single match: auto-link silently (creates file-library-rel row). - Multiple matches: emit SSE event so the frontend shows a selection dialog for the user to pick the correct library. - No match: import continues without linking (current behavior). Backend changes: - Extended manifest schema with optional :external-libraries field - Added slugify-name, get-files-names, get-shared-files-for-team, find-shared-files-by-slug helpers in app.binfile.common - Threaded team-id into import cfg from RPC layer - Added resolve-external-libraries and auto-link-libraries in v3 - Emit :library-candidates SSE event for multi-match cases Frontend changes: - Worker captures library-candidates SSE events and forwards them - Import dialog shows auto-link notification and multi-match selection UI with select dropdowns - Added link-files-to-library! RPC helper for user selections - Added en/es translations for new UI strings Closes #9263 Signed-off-by: Andrey Antukh <niwi@niwi.nz> * ✨ Add UI for the auto-link plumbing * ♻️ Consolidate auto-link libraries with unified export-type and fix ref integrity Consolidates the auto-link libraries feature into a single coherent implementation: - Unify boolean flags (embed-assets, include-libraries, link-later) into single ::bfc/export-type parameter - Fix critical reference-integrity bug: pre-resolution no longer remaps :component-file refs when no link is created (multi-match / no-permission) - compute-link-decisions as single source of truth for auto-link logic - 80+ backend tests covering round-trip, cross-team, permissions, edge cases, and reference integrity AI-assisted-by: longcat-2.0 --------- Signed-off-by: Andrey Antukh <niwi@niwi.nz> Co-authored-by: Eva Marco <evamarcod@gmail.com>
66 lines
1.9 KiB
Clojure
66 lines
1.9 KiB
Clojure
{:paths ["src" "vendor" "resources" "test"]
|
|
:deps
|
|
{;; Carries `app.common.render-wasm.*`, shared with the headless exporter.
|
|
penpot/common
|
|
{:local/root "../common"}
|
|
|
|
org.clojure/clojure {:mvn/version "1.12.2"}
|
|
binaryage/devtools {:mvn/version "RELEASE"}
|
|
metosin/reitit-core {:mvn/version "0.10.1"}
|
|
funcool/okulary {:mvn/version "2022.04.11-16"}
|
|
|
|
funcool/tubax
|
|
{:git/tag "v2025.11.28"
|
|
:git/sha "2d9a986"
|
|
:git/url "https://github.com/funcool/tubax.git"}
|
|
|
|
funcool/potok2
|
|
{:git/tag "v2.2"
|
|
:git/sha "0f7e15a"
|
|
:git/url "https://github.com/funcool/potok.git"
|
|
:exclusions [funcool/beicon2]}
|
|
|
|
funcool/beicon2
|
|
{:git/tag "v2.3"
|
|
:git/sha "df7058a"
|
|
:git/url "https://github.com/funcool/beicon.git"}
|
|
|
|
funcool/rumext
|
|
{:git/tag "v2.25"
|
|
:git/sha "27e5a1a"
|
|
:git/url "https://github.com/funcool/rumext.git"}
|
|
|
|
instaparse/instaparse {:mvn/version "1.5.0"}
|
|
garden/garden {:git/url "https://github.com/noprompt/garden"
|
|
:git/sha "05590ecb5f6fa670856f3d1ab400aa4961047480"}
|
|
}
|
|
|
|
:aliases
|
|
{:outdated
|
|
{:extra-deps {com.github.liquidz/antq {:mvn/version "RELEASE"}}
|
|
:main-opts ["-m" "antq.core"]}
|
|
|
|
:jvm-repl
|
|
{:extra-deps
|
|
{com.bhauman/rebel-readline {:mvn/version "RELEASE"}}
|
|
:main-opts ["-m" "rebel-readline.main"]}
|
|
|
|
:dev
|
|
{:extra-paths ["dev"]
|
|
:jvm-opts ["--sun-misc-unsafe-memory-access=allow"
|
|
"--enable-native-access=ALL-UNNAMED"]
|
|
|
|
:extra-deps
|
|
{thheller/shadow-cljs {:mvn/version "3.4.11"}
|
|
com.bhauman/rebel-readline {:mvn/version "RELEASE"}
|
|
org.clojure/tools.namespace {:mvn/version "RELEASE"}
|
|
criterium/criterium {:mvn/version "0.4.6"}}}
|
|
|
|
:shadow-cljs
|
|
{:main-opts ["-m" "shadow.cljs.devtools.cli"]
|
|
:jvm-opts ["--sun-misc-unsafe-memory-access=allow"
|
|
"-Dpenpot.wasm.profile-marks=true"
|
|
"-XX:+UnlockExperimentalVMOptions"
|
|
"-XX:CompileCommand=blackhole,criterium.blackhole.Blackhole::consume"]}
|
|
}}
|