feat(lab): Migrate lab to main repo. (#4521)

* Add directory

* Add lab check script

* Delete duplicated icons

* Fix the lab page

* Adjust paths

* update lockfile

* update lockfile

* fix(lab/planet): replace with guideline-compliant design

* Add install step

* Add second install step

* Adjust lab in site

* try this

* Fix workflow

* Add cspell

* Format code

* Temporary delete icons for copilot review

* Place back lab icons

* Apply suggestions from code review

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Update lock file

* Revert svg changes

* Fix list

* Rename filenames

* Format tsconfig

---------

Co-authored-by: Karsa <contact@karsa.org>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Eric Fennis
2026-07-24 15:05:40 +02:00
committed by GitHub
parent 1d578ab536
commit 9ecaafbc4d
738 changed files with 17615 additions and 1039 deletions

View File

@@ -16,7 +16,7 @@ export const externalLibContext = {
};
const externalLibIconNodesAPI = {
lab: 'https://lab.lucide.dev/api/icon-details',
lab: `${import.meta.env.DEV ? 'http://localhost:3000' : ''}/api/lab/icon-details`,
};
export function useExternalLibs(): ExternalLibContext {
@@ -32,13 +32,15 @@ export function useExternalLibs(): ExternalLibContext {
newExternalIconNodes[lib] = savedIconNodes[lib];
} else {
const response = await fetch(externalLibIconNodesAPI[lib]);
const iconNodes = await response.json();
const iconDetails = await response.json();
if (iconNodes) {
newExternalIconNodes[lib] = Object.values(iconNodes).map((iconEntity: IconEntity) => ({
...iconEntity,
externalLibrary: lib,
}));
if (iconDetails) {
newExternalIconNodes[lib] = Object.values(iconDetails).map((iconEntity: IconEntity) => {
return {
...iconEntity,
externalLibrary: lib,
};
});
}
}
}