diff --git a/src/content-modules/Browse.svelte b/src/content-modules/Browse.svelte index 98c95b23..b6464f6f 100644 --- a/src/content-modules/Browse.svelte +++ b/src/content-modules/Browse.svelte @@ -7,18 +7,12 @@ import type { PaletteWrap } from "../stores/example-palette-store"; import type { LintResult } from "../lib/ColorLint"; - import PalPreview from "../components/PalPreview.svelte"; - import MiniPalPreview from "../components/MiniPalPreview.svelte"; import LintCustomizationModal from "../linting/LintCustomizationModal.svelte"; import { lint } from "../lib/api-calls"; import Tooltip from "../components/Tooltip.svelte"; - import { debounce } from "vega"; import { buttonStyle } from "../lib/styles"; - // let lintCache: Record = Object.fromEntries( - // $examplePalStore.palettes.map((_, idx) => [idx, false]) - // ); onMount(async () => { // wait for the palettes to be loaded while ($examplePalStore.palettes.length === 0) { @@ -37,32 +31,6 @@ }); } - // $: updateSearchDebounced = debounce(2000, async () => { - // // for (let idx = 0; idx < $examplePalStore.palettes.length; idx++) { - // // const pal = $examplePalStore.palettes[idx]; - // // console.log("linting", pal.palette.name); - // // const res = await lint(pal.palette, false); - // // lintCache[idx] = res; - // // } - // $examplePalStore.palettes.forEach(async (pal, index) => { - // lint(pal.palette, false).then((res) => { - // examplePalStore.postLint(index, res); - // }); - // }); - // }); - // $: updateSearchDebounced(); - - $: groupsByTypes = $examplePalStore.palettes.reduce( - (acc, pal, idx) => { - if (acc[pal.palette.type]) { - acc[pal.palette.type].push([idx, pal]); - } else { - acc[pal.palette.type] = [[idx, pal]]; - } - return acc; - }, - {} as Record - ); // todo add the local ones as well const lintMarks = { pass: "✅", diff --git a/src/stores/example-palette-store.ts b/src/stores/example-palette-store.ts index 9dcd2159..5ba22a73 100644 --- a/src/stores/example-palette-store.ts +++ b/src/stores/example-palette-store.ts @@ -36,14 +36,7 @@ export const VegaColors = { tableau20: "4c78a89ecae9f58518ffbf7954a24b88d27ab79a20f2cf5b43989483bcb6e45756ff9d9879706ebab0acd67195fcbfd2b279a2d6a5c99e765fd8b5a5", accent: "7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666", - // dark2: "1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666", - // paired: - // "a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928", - // pastel1: "fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2", - // pastel2: "b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc", set1: "e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999", - // set2: "66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3", - // set3: "8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f", }; async function buildAllExamples(): Promise { @@ -76,7 +69,7 @@ const storeName = "color-buddy-example-palettes"; function serializeStore(store: StoreData) { const outputStore = { ...store } as any; - outputStore.palettes = outputStore.palettes.map((x) => { + outputStore.palettes = outputStore.palettes.map((x: any) => { const palette = x.palette; return { palette: {