mirror of
https://github.com/directus/directus.git
synced 2026-04-25 03:00:53 -04:00
* move files from directus/visual-editing repo - exclude tooling such as prettier, eslint, … - flatten test-website * docs(visual-editing): update test website readme for monorepo setup Reflects that the test website now lives inside the Directus monorepo at packages/visual-editing/test-website, drops the separate-repo clone step, fixes a few typos, and collapses the multiple example URLs down to a single versioned entry. Note: the template URL in the directus-template-cli command still points at github.com/directus/visual-editing; it will be updated to the new or updated directus/visual-editing-template repository. * fix(visual-editing): prevent edit handler firing twice on overlay button clicks The overlay rect forwarded every click to the edit button, so clicks that already bubbled up from the edit or AI button triggered the edit handler a second time. Skip forwarding when the click target is contained within either button. * chore(visual-editing): convert package to monorepo workspace conventions - Point the package repository URL and readme link at the monorepo and bump the license copyright year. - Switch runtime/dev dependencies to the workspace catalog, drop the package-local pnpm-lock.yaml, engines, and packageManager fields, and add @reach/observe-rect to the root catalog. - Add explicit return types on the public entry functions to satisfy the stricter shared tsconfig. - Swap vitest from jsdom to happy-dom to match the rest of the repo. - Review note: Rebuild \`pnpm build\` * refactor: share visual-editing types between package and studio app The Studio app used to keep a duplicated copy of EditConfig, SavedData, and related postMessage types, with a comment instructing maintainers to keep them in sync with the visual-editing package. Now that both live in the same repo, expose them from a dedicated @directus/visual- editing/types subpath and consume them from the app instead. - Add src/types.ts as the public types entry and update tsdown to emit it as a second dual-format build, alongside the main entry. - Reuse PrimaryKey from @directus/types in the shared type file instead of duplicating it locally. - Declare @directus/visual-editing as a workspace dependency of the app and import the shared types from @directus/visual-editing/types in the Studio editing layer. - Review note: Rebuild \`pnpm build\` * chore(visual-editing): clean up test-website workspace setup - Relink @directus/visual-editing from link:../../.. to link:.. to match the new in-repo location and drop the package-local engines and packageManager fields. - Ignore the generated pnpm-lock.yaml and tell Nuxt to ignore .DS_Store so macOS dev runs stay quiet. - Add an empty pnpm-workspace.yaml with an unimport 6.0.2 override to work around the nitropack/@nuxt/nitro-server duplicate-import warning so the test-website install stays clean. - Fix an indentation glitch on @tailwindcss/typography in package.json. * chore(visual-editing): update stylelint and eslint to ignore test-website files * set isolatedDeclarations to false in compilerOptions * lint * update ignore patterns for test-website files * rename license * remove LICENSE * add license to stylelintignore * share sameOrigin via @directus/utils/browser * fix hydration error * update test-website readme * add @directus/utils to changeset --------- Co-authored-by: Rob Luton <rob.luton@gmail.com>