IKEA assembly, step by step: animated, manual-style 3D guides. Scan any paper manual with Together AI.
TypeScript
Draw rows of frames of different widths
Youssef70aaabf6d443
diff --git a/scripts/ikea/classify.ts b/scripts/ikea/classify.tsindex 9686140..c9eb90f 100644--- a/scripts/ikea/classify.ts+++ b/scripts/ikea/classify.ts@@ -87,8 +87,25 @@ const GATE_STORAGE = new Set(["VIHALS"]);const ROW_UNITS: Record<string, number> = { BILLY: 80, BESTÅ: 120, IVAR: 80, PAX: 100 };/** PAX frames under a pair of sliding doors: 150 is two 75s, 200 two 100s. */const PAX_SLIDE_UNITS = [100, 75];-/** The frame widths a family's combinations are made of, widest first. */-const FRAME_SIZES: Record<string, number[]> = { PAX: [100, 75, 50] };+/** The frame widths a family's combinations are made of, widest first, and the post two IVAR sections share. */+const FRAME_SIZES: Record<string, number[]> = { BILLY: [80, 40], PAX: [100, 75, 50], IVAR: [89, 48], BROR: [85, 65] };+const SHARED_POST: Record<string, number> = { IVAR: 3 };++/** Two to four frames of these widths that make up w, give or take 2 cm: the fewest frames, the widest first. */+function framesFor(w: number, sizes: number[], post = 0, most = 4): number[] | null {+ let best: number[] | null = null;+ const walk = (left: number[], from: number) => {+ const n = left.length;+ if (n >= 2) {+ const total = left.reduce((a, v) => a + v, 0) - post * (n - 1);+ if (Math.abs(total - w) <= 2 && (!best || n < best.length)) best = [...left];+ }+ if (n === most) return;+ for (let i = from; i < sizes.length; i++) walk([...left, sizes[i]], i);+ };+ walk([], 0);+ return best;+}/** Frames for one leg of a corner wardrobe: the frames that come closest to `len` cm, and how far off they are. */function legFrames(len: number, sizes: number[], least: number): [number[], number] {@@ -709,15 +726,28 @@ export function classify(f: Fact, hints: Hints): Verdict {const sliding = family === "PAX" && (kind === "sliding" || (kind === "wardrobe" && (d === 66 || d === 43)));if (sliding) {const unit = PAX_SLIDE_UNITS.find((u) => w % u === 0 && w / u >= 2 && w / u <= 3);- if (!unit) return { skip: "PAX with sliding doors over frames of different widths" };- Object.assign(x, { n: w / unit, of: "wardrobe", slides: 2, doors: undefined, shelves: hints(family, "wardrobe")?.x.shelves });+ // or frames of different widths under the doors+ const mixed = unit ? null : framesFor(w, PAX_SLIDE_UNITS, 0, 3);+ if (!unit && !mixed) return { skip: "PAX with sliding doors over frames of different widths" };+ Object.assign(x, { ...(mixed ? { u: mixed.join("+") } : { n: w / unit! }), of: "wardrobe", slides: 2, doors: undefined, shelves: hints(family, "wardrobe")?.x.shelves });for (const k of Object.keys(x) as (keyof X)[]) if (x[k] === undefined) delete x[k];return finish("cabrow");}// the rule may already know how many frames there are (PLATSA)const unit = x.n ? w / x.n : ROW_UNITS[family];const n = unit ? Math.round(w / unit) : 0;- if (!unit || n < 2 || n > 4 || n * unit !== w || !["bookcase", "cabinet", "tv", "wardrobe", "wallcab"].includes(kind)) return { skip: several };+ if (!unit || n < 2 || n > 4 || n * unit !== w || !["bookcase", "cabinet", "tv", "wardrobe", "wallcab"].includes(kind)) {+ // frames of the family's widths that aren't all alike: a wide BILLY and a narrow one, PAX 100 and 50+ const sizes = FRAME_SIZES[family];+ const mixed = !x.n && sizes && ["bookcase", "open", "cabinet", "wardrobe"].includes(kind) ? framesFor(w, sizes, SHARED_POST[family]) : null;+ if (!mixed) return { skip: several };+ x.u = mixed.join("+");+ // PAX frames on their own come without doors, with the shelves a PAX frame has+ if (kind === "wardrobe" && !multi) Object.assign(x, { doors: 0, shelves: hints(family, "wardrobe")?.x.shelves });+ for (const k of Object.keys(x) as (keyof X)[]) if (x[k] === undefined) delete x[k];+ x.of = kind as NonNullable<X["of"]>;+ return finish(kind === "bookcase" || kind === "open" ? "bookrow" : "cabrow");+ }x.n = n;x.of = kind as NonNullable<X["of"]>;return finish(kind === "bookcase" ? "bookrow" : "cabrow");diff --git a/scripts/ikea/slugs.json b/scripts/ikea/slugs.jsonindex 9561ae6..8012a9c 100644--- a/scripts/ikea/slugs.json+++ b/scripts/ikea/slugs.json@@ -91,16 +91,21 @@"BILLY / OXBERG|Bookcase with glass door, 40 × 30 × 237 cm": "billy-oxberg-bookcase-glass-door-40-x-30-x-237","BILLY / OXBERG|Bookcase with glass door, 40 × 41 × 202 cm": "billy-oxberg-bookcase-glass-door-40-x-41-x-202","BILLY / OXBERG|Bookcase with glass doors, 80 × 30 × 237 cm": "billy-oxberg-bookcase-glass-doors-80-x-30-x-237",+ "BILLY / OXBERG|Bookcase with glass-doors, 120 × 30 × 202 cm": "billy-oxberg-bookcase-glass-doors-120-x-30-x-202","BILLY / OXBERG|Bookcase with glass-doors, 80 × 41 × 202 cm": "billy-oxberg-bookcase-glass-doors-80-x-41-x-202","BILLY / OXBERG|Bookcase with panel/glass door, 40 × 30 × 202 cm": "billy-oxberg-bookcase-panel-glass-door-40-x-30-x","BILLY / OXBERG|Bookcase with panel/glass door, 40 × 41 × 202 cm": "billy-oxberg-bookcase-panel-glass-door-40-x-41-x",+ "BILLY / OXBERG|Bookcase with panel/glass doors, 120 × 30 × 202 cm": "billy-oxberg-bookcase-panel-glass-doors-120-x-30","BILLY / OXBERG|Bookcase with panel/glass doors, 160 × 30 × 202 cm": "billy-oxberg-bookcase-panel-glass-doors-160-x-30","BILLY / OXBERG|Bookcase with panel/glass doors, 80 × 30 × 202 cm": "billy-oxberg-bookcase-panel-glass-doors-80-x-30","BILLY / OXBERG|Bookcase with panel/glass doors, 80 × 41 × 202 cm": "billy-oxberg-bookcase-panel-glass-doors-80-x-41",+ "BILLY / OXBERG|Bookcase, 120 × 30 × 237 cm": "billy-oxberg-bookcase-120-x-30-x-237",+ "BILLY / OXBERG|Bookcase, 200 × 30 × 237 cm": "billy-oxberg-bookcase-200-x-30-x-237","BILLY / OXBERG|Bookcase, 80 × 30 × 202 cm": "billy-oxberg-bookcase-80-x-30-x-202","BILLY / OXBERG|Bookcase, 80 × 30 × 237 cm": "billy-oxberg-bookcase-80-x-30-x-237","BILLY|Bookcase, 120 × 28 × 237 cm": "billy-bookcase-120-x-28-x-237","BILLY|Bookcase, 160 × 28 × 202 cm": "billy-bookcase-160-x-28-x-202",+ "BILLY|Bookcase, 200 × 28 × 237 cm": "billy-bookcase-200-x-28-x-237","BILLY|Bookcase, 240 × 28 × 106 cm": "billy-bookcase-240-x-28-x-106","BILLY|Bookcase, 40 × 28 × 106 cm": "billy-bookcase-40-x-28-x-106","BILLY|Bookcase, 40 × 28 × 237 cm": "billy-bookcase-40-x-28-x-237",@@ -144,6 +149,11 @@"BRIMNES|TV bench, 216 × 41 × 54 cm": "brimnes-tv-bench-216-x-41-x-54","BROR|Cabinet with 2 doors, 76 × 40 × 66 cm": "bror-cabinet-2-doors-76-x-40-x-66","BROR|Cabinet with doors, 85 × 40 × 191 cm": "bror-cabinet-doors-85-x-40-x-191",+ "BROR|Shelving unit, 170 × 40 × 110 cm": "bror-shelving-unit-170-x-40-x-110",+ "BROR|Shelving unit, 234 × 55 × 110 cm": "bror-shelving-unit-234-x-55-x-110",+ "BROR|Shelving unit, 234 × 55 × 190 cm": "bror-shelving-unit-234-x-55-x-190",+ "BROR|Shelving unit, 254 × 40 × 190 cm": "bror-shelving-unit-254-x-40-x-190",+ "BROR|Shelving unit, 254 × 55 × 190 cm": "bror-shelving-unit-254-x-55-x-190","BROR|Shelving unit, 65 × 40 × 190 cm": "bror-shelving-unit-65-x-40-x-190","BROR|Shelving unit, 65 × 55 × 190 cm": "bror-shelving-unit-65-x-55-x-190","BROR|Shelving unit, 85 × 55 × 110 cm": "bror-shelving-unit-85-x-55-x-110",@@ -439,6 +449,9 @@"IVAR|Cabinet with doors, 160 × 30 × 83 cm": "ivar-cabinet-doors-160-x-30-x-83","IVAR|Cabinet with doors, 89 × 30 × 124 cm": "ivar-cabinet-doors-89-x-30-x-124","IVAR|Cabinet with sliding doors, 80 × 30 × 60 cm": "ivar-cabinet-sliding-doors-80-x-30-x-60",+ "IVAR|Shelving unit with doors, 134 × 30 × 179 cm": "ivar-shelving-unit-doors-134-x-30-x-179",+ "IVAR|Shelving unit with doors, 259 × 30 × 124 cm": "ivar-shelving-unit-doors-259-x-30-x-124",+ "IVAR|Shelving unit with doors, 259 × 30 × 226 cm": "ivar-shelving-unit-doors-259-x-30-x-226","IVAR|Shelving unit with doors, 89 × 30 × 124 cm": "ivar-shelving-unit-doors-89-x-30-x-124","IVAR|Shelving unit with doors, 89 × 30 × 179 cm": "ivar-shelving-unit-doors-89-x-30-x-179","IVAR|Shelving unit, 80 × 30 × 166 cm": "ivar-shelving-unit-80-x-30-x-166",@@ -941,9 +954,11 @@"PAX / BERGSBO|Corner wardrobe, 111/88 × 201 cm": "pax-bergsbo-corner-wardrobe-111-88-x-201","PAX / BERGSBO|Wardrobe": "pax-bergsbo-wardrobe","PAX / BERGSBO|Wardrobe, 100 × 60 × 201 cm": "pax-bergsbo-wardrobe-100-x-60-x-201",+ "PAX / BERGSBO|Wardrobe, 150 × 60 × 201 cm": "pax-bergsbo-wardrobe-150-x-60-x-201","PAX / BERGSBO|Wardrobe, 200 × 60 × 201 cm": "pax-bergsbo-wardrobe-200-x-60-x-201","PAX / BERGSBO|Wardrobe, 200 × 60 × 236 cm": "pax-bergsbo-wardrobe-200-x-60-x-236","PAX / FARDAL/ÅHEIM|Corner wardrobe, 111/88 × 201 cm": "pax-fardal-aheim-corner-wardrobe-111-88-x-201",+ "PAX / FARDAL|Wardrobe, 150 × 60 × 201 cm": "pax-fardal-wardrobe-150-x-60-x-201","PAX / FLISBERGET|Corner wardrobe, 111/88 × 201 cm": "pax-flisberget-corner-wardrobe-111-88-x-201","PAX / FLISBERGET|Corner wardrobe, 161/111 × 201 cm": "pax-flisberget-corner-wardrobe-161-111-x-201","PAX / FLISBERGET|Corner wardrobe, 161/88 × 201 cm": "pax-flisberget-corner-wardrobe-161-88-x-201",@@ -953,7 +968,9 @@"PAX / FORSAND|Corner wardrobe, 111/88 × 236 cm": "pax-forsand-corner-wardrobe-111-88-x-236","PAX / FORSAND|Wardrobe, 100 × 60 × 201 cm": "pax-forsand-wardrobe-100-x-60-x-201","PAX / FORSAND|Wardrobe, 100 × 60 × 236 cm": "pax-forsand-wardrobe-100-x-60-x-236",+ "PAX / FORSAND|Wardrobe, 150 × 60 × 201 cm": "pax-forsand-wardrobe-150-x-60-x-201","PAX / FORSAND|Wardrobe, 200 × 60 × 201 cm": "pax-forsand-wardrobe-200-x-60-x-201",+ "PAX / FORSAND|Wardrobe, 250 × 60 × 201 cm": "pax-forsand-wardrobe-250-x-60-x-201","PAX / FYRUDDEN|Corner wardrobe, 161/111 × 236 cm": "pax-fyrudden-corner-wardrobe-161-111-x-236","PAX / GRIMO/ÅHEIM|Corner wardrobe, 211/161 × 201 cm": "pax-grimo-aheim-corner-wardrobe-211-161-x-201","PAX / GRIMO|Corner wardrobe, 110/110 × 201 cm": "pax-grimo-corner-wardrobe-110-110-x-201",@@ -971,6 +988,7 @@"PAX / MEHAMN/AULI|Wardrobe with sliding doors, 150 × 66 × 201 cm": "pax-mehamn-auli-wardrobe-sliding-doors-150-x-66","PAX / MEHAMN/AULI|Wardrobe with sliding doors, 150 × 66 × 236 cm": "pax-mehamn-auli-wardrobe-sliding-doors-150-x-66-2","PAX / MEHAMN/AULI|Wardrobe with sliding doors, 200 × 66 × 236 cm": "pax-mehamn-auli-wardrobe-sliding-doors-200-x-66",+ "PAX / MEHAMN/AULI|Wardrobe, 250 × 66 × 201 cm": "pax-mehamn-auli-wardrobe-250-x-66-x-201","PAX / MEHAMN|Wardrobe with sliding doors, 150 × 43 × 201 cm": "pax-mehamn-wardrobe-sliding-doors-150-x-43-x-201","PAX / MEHAMN|Wardrobe with sliding doors, 150 × 43 × 236 cm": "pax-mehamn-wardrobe-sliding-doors-150-x-43-x-236","PAX / MEHAMN|Wardrobe with sliding doors, 150 × 66 × 201 cm": "pax-mehamn-wardrobe-sliding-doors-150-x-66-x-201",@@ -990,6 +1008,8 @@"PAX|Corner wardrobe, 211/213 × 236 cm": "pax-corner-wardrobe-211-213-x-236","PAX|Wardrobe frame, 50 × 58 × 201 cm": "pax-wardrobe-frame-50-x-58-x-201","PAX|Wardrobe frame, 75 × 58 × 201 cm": "pax-wardrobe-frame-75-x-58-x-201",+ "PAX|Wardrobe, 150 × 58 × 201 cm": "pax-wardrobe-150-x-58-x-201",+ "PAX|Wardrobe, 175 × 58 × 201 cm": "pax-wardrobe-175-x-58-x-201","PERSBOL|Armchair": "persbol-armchair","PINNTORP|Chair": "pinntorp-chair","PINNTORP|Gateleg table, 67/124 × 75 cm": "pinntorp-gateleg-table-67-124-x-75",diff --git a/src/data/ikea-items.ts b/src/data/ikea-items.tsindex f9b9484..a6cf0c7 100644--- a/src/data/ikea-items.ts+++ b/src/data/ikea-items.ts@@ -89,6 +89,7 @@ billy-80x106|30263844 90477385 30508648 00477337billy-80x202|00263850 10508932 40477340 50508652billy-bookcase-120-x-28-x-237|39017839billy-bookcase-160-x-28-x-202|79017837+billy-bookcase-200-x-28-x-237|89017827billy-bookcase-240-x-28-x-106|09017826billy-bookcase-40-x-28-x-106|80263832 30477331 20477379 10508625billy-bookcase-40-x-28-x-237|49217734@@ -100,6 +101,8 @@ billy-hogadal-bookcase-door-40-x-30-x-202|29562491billy-hogadal-bookcase-doors-80-x-30-x-106|79572204billy-hogadal-bookcase-doors-80-x-30-x-202|19578464 49572205billy-hogbo-bookcase-glass-doors-80-x-30-x-202|99484386 79483613+billy-oxberg-bookcase-120-x-30-x-237|59217724+billy-oxberg-bookcase-200-x-30-x-237|49017834billy-oxberg-bookcase-80-x-30-x-202|69017828billy-oxberg-bookcase-80-x-30-x-237|69217714billy-oxberg-bookcase-door-40-x-30-x-106|69287392 09483292 49483290 69483289@@ -111,10 +114,12 @@ billy-oxberg-bookcase-doors-80-x-41-x-202|59304127billy-oxberg-bookcase-glass-door-40-x-30-x-202|39287398 69581831 09581829billy-oxberg-bookcase-glass-door-40-x-30-x-237|29287445billy-oxberg-bookcase-glass-door-40-x-41-x-202|39398834+billy-oxberg-bookcase-glass-doors-120-x-30-x-202|69281804billy-oxberg-bookcase-glass-doors-80-x-30-x-237|09581909 69581911billy-oxberg-bookcase-glass-doors-80-x-41-x-202|79398832billy-oxberg-bookcase-panel-glass-door-40-x-30-x|39287421 39483337 79483340 19483338billy-oxberg-bookcase-panel-glass-door-40-x-41-x|89398841+billy-oxberg-bookcase-panel-glass-doors-120-x-30|79281790billy-oxberg-bookcase-panel-glass-doors-160-x-30|79581859 39581861 79280738 79280724 49581865 19581862billy-oxberg-bookcase-panel-glass-doors-80-x-30|69281776 69483326 29483328 89483325billy-oxberg-bookcase-panel-glass-doors-80-x-41|69398837@@ -162,6 +167,11 @@ brimnes-wardrobe|40400478 10409871 90409872brimnes-wardrobe-3-doors-117-x-190|40407922bror-cabinet-2-doors-76-x-40-x-66|50547390bror-cabinet-doors-85-x-40-x-191|50494297+bror-shelving-unit-170-x-40-x-110|29619398+bror-shelving-unit-234-x-55-x-110|09619399+bror-shelving-unit-234-x-55-x-190|39619411+bror-shelving-unit-254-x-40-x-190|79619409 49516144+bror-shelving-unit-254-x-55-x-190|19516145bror-shelving-unit-65-x-40-x-190|49619401bror-shelving-unit-65-x-55-x-190|29619402bror-shelving-unit-85-x-190|19619407 19650233 09619403 49516139@@ -488,6 +498,9 @@ ivar-shelving-unit-89-x-30-x-124|69590576 89404583ivar-shelving-unit-89-x-30-x-226|29590578ivar-shelving-unit-89-x-50-x-179|39407070 89404578ivar-shelving-unit-89-x-50-x-226|09631216+ivar-shelving-unit-doors-134-x-30-x-179|99403470+ivar-shelving-unit-doors-259-x-30-x-124|79403471+ivar-shelving-unit-doors-259-x-30-x-226|59403472ivar-shelving-unit-doors-89-x-30-x-124|39403473 89507883 59508087 09507858ivar-shelving-unit-doors-89-x-30-x-179|89403461 19403474ivar-wall-cabinet-doors-160-x-30-x-83|09417382@@ -1016,6 +1029,7 @@ pax-bergsbo-aheim-corner-wardrobe-211-161-x-236|99600041 59600038pax-bergsbo-corner-wardrobe-111-88-x-201|89600046 69600047pax-bergsbo-wardrobe|59502716pax-bergsbo-wardrobe-100-x-60-x-201|09503011 59502655 89503012 39502656+pax-bergsbo-wardrobe-150-x-60-x-201|99502328 39502331pax-bergsbo-wardrobe-200-x-60-x-201|89502545 19502544pax-bergsbo-wardrobe-200-x-60-x-236|79502635pax-corner-wardrobe-161-188-x-201|69502315 09502318 99502314 29502317@@ -1023,6 +1037,7 @@ pax-corner-wardrobe-210-180-x-236|19607126 09607122 99600036 19600035pax-corner-wardrobe-211-161-x-201|69502985 49502986 99590730 99590725 89590721 89590735pax-corner-wardrobe-211-213-x-236|99503139pax-fardal-aheim-corner-wardrobe-111-88-x-201|19502657 99502658+pax-fardal-wardrobe-150-x-60-x-201|89502381 69502382pax-flisberget-corner-wardrobe-111-88-x-201|69626151 79626160pax-flisberget-corner-wardrobe-161-111-x-201|19600021 29600025pax-flisberget-corner-wardrobe-161-88-x-201|89502649 49502651@@ -1032,7 +1047,9 @@ pax-forsand-corner-wardrobe-111-88-x-201|39600044pax-forsand-corner-wardrobe-111-88-x-236|29600030 49600029pax-forsand-wardrobe-100-x-60-x-201|79503017 09502667pax-forsand-wardrobe-100-x-60-x-236|49502665+pax-forsand-wardrobe-150-x-60-x-201|79502353 59502354 29503171 09503172 39502326 89502324 59502325 19502327pax-forsand-wardrobe-200-x-60-x-201|89503173 69503174+pax-forsand-wardrobe-250-x-60-x-201|09502728 29502727 99500292 49502726 49502712 09502714pax-frame|70458203 80458207 90458202 50458204 00458206 60458208 10458201pax-fyrudden-corner-wardrobe-161-111-x-236|59581756 29581753pax-grimo-aheim-corner-wardrobe-211-161-x-201|29502987 09502988@@ -1047,6 +1064,7 @@ pax-hasvik-wardrobe-sliding-doors-150-x-43-x-201|69626556 29626539 39626548 2962pax-lundbrasma-wardrobe-sliding-doors-150-x-66-x|69617892 79617896 99618461 89618466pax-lundbrasma-wardrobe-sliding-doors-150-x-66-x-2|29617889 89617886pax-lundbrasma-wardrobe-sliding-doors-200-x-66-x|19617903 29617907 69617910 89617914+pax-mehamn-auli-wardrobe-250-x-66-x-201|19561430pax-mehamn-auli-wardrobe-sliding-doors-150-x-43|19552157 59552155 69551706 39552156 29551713 19551718pax-mehamn-auli-wardrobe-sliding-doors-150-x-66|79608854 59608850 39608846 69608538pax-mehamn-auli-wardrobe-sliding-doors-150-x-66-2|49561424 09561421@@ -1062,6 +1080,8 @@ pax-mehamn-wardrobe-sliding-doors-200-x-66-x-236|69608779 49608775pax-tonstad-corner-wardrobe-211-161-x-201|79600037 19600040pax-tonstad-corner-wardrobe-231-161-x-236|59612060 39612056pax-tyssedal-corner-wardrobe-161-111-x-236|29603397 39603392+pax-wardrobe-150-x-58-x-201|59502561 79502560+pax-wardrobe-175-x-58-x-201|49502632 69502631pax-wardrobe-frame-50-x-58-x-201|70458217 90458221 90458216 10458215 50458218 10458220 70458222pax-wardrobe-frame-75-x-58-x-201|80458231 90458235 60458232 00458230 70458236 20458229 20458234persbol-armchair|50525915 90525923 70525924diff --git a/src/data/ikea-rows.ts b/src/data/ikea-rows.tsindex 123270a..3896724 100644--- a/src/data/ikea-rows.ts+++ b/src/data/ikea-rows.ts@@ -84,6 +84,7 @@ BILLY|bookcase|Bookcase, 80 × 39 × 202 cm|80|202|39BILLY|bookcase|Bookcase, 80 × 28 × 237 cm|80|237|28BILLY|bookcase|Bookcase, 120 × 28 × 237 cm|120|237|28BILLY|bookrow|Bookcase, 160 × 28 × 202 cm|160|202|28|n=2,of=bookcase+BILLY|bookrow|Bookcase, 200 × 28 × 237 cm|200|237|28|of=bookcase,u=80+80+40BILLY|bookrow|Bookcase, 240 × 28 × 106 cm|240|106|28|n=3,of=bookcaseBILLY / HÖGADAL|cabinet|Bookcase with door, 40 × 30 × 106 cm|40|106|30|doors=1BILLY / HÖGADAL|cabinet|Bookcase with door, 40 × 30 × 202 cm|40|202|30|doors=1@@ -92,6 +93,8 @@ BILLY / HÖGADAL|cabinet|Bookcase with doors, 80 × 30 × 202 cm|80|202|30BILLY / HÖGBO|cabinet|Bookcase with glass doors, 80 × 30 × 202 cm|80|202|30BILLY / OXBERG|bookcase|Bookcase, 80 × 30 × 202 cm|80|202|30BILLY / OXBERG|bookcase|Bookcase, 80 × 30 × 237 cm|80|237|30+BILLY / OXBERG|bookrow|Bookcase, 120 × 30 × 237 cm|120|237|30|of=bookcase,u=80+40+BILLY / OXBERG|bookrow|Bookcase, 200 × 30 × 237 cm|200|237|30|of=bookcase,u=80+80+40BILLY / OXBERG|cabinet|Bookcase with door, 40 × 30 × 106 cm|40|106|30|doors=1BILLY / OXBERG|cabinet|Bookcase with doors, 40 × 30 × 202 cm|40|202|30BILLY / OXBERG|cabinet|Bookcase with glass door, 40 × 30 × 202 cm|40|202|30|doors=1@@ -107,6 +110,8 @@ BILLY / OXBERG|cabinet|Bookcase with doors, 80 × 41 × 202 cm|80|202|41BILLY / OXBERG|cabinet|Bookcase with glass-doors, 80 × 41 × 202 cm|80|202|41BILLY / OXBERG|cabinet|Bookcase with panel/glass doors, 80 × 41 × 202 cm|80|202|41BILLY / OXBERG|cabinet|Bookcase with glass doors, 80 × 30 × 237 cm|80|237|30+BILLY / OXBERG|cabrow|Bookcase with glass-doors, 120 × 30 × 202 cm|120|202|30|of=cabinet,u=80+40+BILLY / OXBERG|cabrow|Bookcase with panel/glass doors, 120 × 30 × 202 cm|120|202|30|of=cabinet,u=80+40BILLY / OXBERG|cabrow|Bookcase with panel/glass doors, 160 × 30 × 202 cm|160|202|30|n=2,of=cabinetBINGSTA|armchair|Armchair|75|90|80BJÖRKBERGET|office|Swivel chair|60|105|64|arms=none@@ -143,6 +148,11 @@ BRIMNES|desk|Dressing table, 70 × 42 cm|70|74|42BRIMNES|nightstand|Bedside table, 39 × 41 × 53 cm|39|53|41|rows=1,knobs=noneBRIMNES|tv|TV bench, 180 × 41 × 53 cm|180|53|41|knobs=noneBRIMNES|tv|TV bench, 216 × 41 × 54 cm|216|54|41|knobs=none+BROR|bookrow|Shelving unit, 170 × 40 × 110 cm|170|110|40|of=open,u=85+85+BROR|bookrow|Shelving unit, 234 × 55 × 110 cm|234|110|55|of=open,u=85+85+65+BROR|bookrow|Shelving unit, 234 × 55 × 190 cm|234|190|55|of=open,u=85+85+65+BROR|bookrow|Shelving unit, 254 × 40 × 190 cm|254|190|40|of=open,u=85+85+85+BROR|bookrow|Shelving unit, 254 × 55 × 190 cm|254|190|55|of=open,u=85+85+85BROR|cabinet|Cabinet with 2 doors, 76 × 40 × 66 cm|76|66|40BROR|cabinet|Cabinet with doors, 85 × 40 × 191 cm|85|191|40BROR|open|Shelving unit, 65 × 40 × 190 cm|65|190|40@@ -440,8 +450,11 @@ ISMANTORP|armchair|Armchair|75|90|80IVAR|cabinet|Cabinet with doors, 89 × 30 × 124 cm|89|124|30IVAR|cabinet|Shelving unit with doors, 89 × 30 × 124 cm|89|124|30IVAR|cabinet|Shelving unit with doors, 89 × 30 × 179 cm|89|179|30+IVAR|cabrow|Shelving unit with doors, 134 × 30 × 179 cm|134|179|30|of=cabinet,u=89+48IVAR|cabrow|Cabinet with doors, 160 × 30 × 83 cm|160|83|30|n=2,of=cabinetIVAR|cabrow|Wall cabinet with doors, 160 × 30 × 83 cm|160|83|30|n=2,of=wallcab+IVAR|cabrow|Shelving unit with doors, 259 × 30 × 124 cm|259|124|30|of=cabinet,u=89+89+89+IVAR|cabrow|Shelving unit with doors, 259 × 30 × 226 cm|259|226|30|of=cabinet,u=89+89+89IVAR|open|Shelving unit, 80 × 30 × 83 cm|80|83|30IVAR|open|Shelving unit, 80 × 30 × 166 cm|80|166|30IVAR|open|Shelving unit, 89 × 30 × 124 cm|89|124|30@@ -938,6 +951,8 @@ PÅHL|desk|Desk, 96 × 58 cm|96|74|58||kids childrenPÄRONHOLMEN|backbench|Bench with backrest, outdoor|120|86|60||outdoor gardenPAX|cabinet|Add-on corner unit with 4 shelves, 53 × 58 × 201 cm|53|201|58|doors=0,shelves=4PAX|cabinet|Add-on corner unit with 4 shelves, 53 × 35 × 236 cm|53|236|35|doors=0,shelves=4+PAX|cabrow|Wardrobe, 150 × 58 × 201 cm|150|201|58|doors=0,shelves=2,of=wardrobe,u=100+50+PAX|cabrow|Wardrobe, 175 × 58 × 201 cm|175|201|58|doors=0,shelves=2,of=wardrobe,u=100+75PAX|cornerrobe|Corner wardrobe, 161/188 × 201 cm|161|201|188|doors=0,shelves=2,u=75+50,v=100PAX|cornerrobe|Corner wardrobe, 210/180 × 236 cm|180|236|210|doors=0,shelves=2,u=75+50,v=100,cu=58PAX|cornerrobe|Corner wardrobe, 211/161 × 201 cm|211|201|161|doors=0,shelves=2,u=100+75,v=75@@ -946,19 +961,23 @@ PAX|wardrobe|Wardrobe frame, 50 × 58 × 201 cm|50|201|58|doors=0,shelves=2PAX|wardrobe|Wardrobe frame, 75 × 58 × 201 cm|75|201|58|doors=0,shelves=2PAX / AULI|cabrow|Wardrobe with sliding doors, 150 × 43 × 201 cm|150|201|43|shelves=2,slides=2,n=2,of=wardrobePAX / AULI|cabrow|Wardrobe with sliding doors, 150 × 66 × 201 cm|150|201|66|shelves=2,slides=2,n=2,of=wardrobe+PAX / BERGSBO|cabrow|Wardrobe, 150 × 60 × 201 cm|150|201|60|of=wardrobe,u=100+50PAX / BERGSBO|cabrow|Wardrobe, 200 × 60 × 201 cm|200|201|60|n=2,of=wardrobePAX / BERGSBO|cabrow|Wardrobe, 200 × 60 × 236 cm|200|236|60|n=2,of=wardrobePAX / BERGSBO|cornerrobe|Corner wardrobe, 111/88 × 201 cm|111|201|88|shelves=2,u=75PAX / BERGSBO|wardrobe|Wardrobe|50|236|58PAX / BERGSBO|wardrobe|Wardrobe, 100 × 60 × 201 cm|100|201|60PAX / BERGSBO/ÅHEIM|cornerrobe|Corner wardrobe, 211/161 × 236 cm|211|236|161|shelves=2,u=100+75,v=75+PAX / FARDAL|cabrow|Wardrobe, 150 × 60 × 201 cm|150|201|60|of=wardrobe,u=100+50PAX / FARDAL/ÅHEIM|cornerrobe|Corner wardrobe, 111/88 × 201 cm|111|201|88|shelves=2,u=75PAX / FLISBERGET|cabrow|Wardrobe, 200 × 60 × 201 cm|200|201|60|n=2,of=wardrobePAX / FLISBERGET|cornerrobe|Corner wardrobe, 111/88 × 201 cm|111|201|88|shelves=2,u=75PAX / FLISBERGET|cornerrobe|Corner wardrobe, 161/88 × 201 cm|161|201|88|shelves=2,u=75+50PAX / FLISBERGET|cornerrobe|Corner wardrobe, 161/111 × 201 cm|161|201|111|shelves=2,u=100,cu=58PAX / FLISBERGET|wardrobe|Wardrobe, 100 × 60 × 201 cm|100|201|60+PAX / FORSAND|cabrow|Wardrobe, 150 × 60 × 201 cm|150|201|60|of=wardrobe,u=100+50PAX / FORSAND|cabrow|Wardrobe, 200 × 60 × 201 cm|200|201|60|n=2,of=wardrobe+PAX / FORSAND|cabrow|Wardrobe, 250 × 60 × 201 cm|250|201|60|of=wardrobe,u=100+100+50PAX / FORSAND|cornerrobe|Corner wardrobe, 111/88 × 201 cm|111|201|88|shelves=2,u=75PAX / FORSAND|cornerrobe|Corner wardrobe, 111/88 × 236 cm|111|236|88|shelves=2,u=75PAX / FORSAND|wardrobe|Wardrobe, 100 × 60 × 201 cm|100|201|60@@ -988,6 +1007,7 @@ PAX / MEHAMN/AULI|cabrow|Wardrobe with sliding doors, 150 × 43 × 201 cm|150|20PAX / MEHAMN/AULI|cabrow|Wardrobe with sliding doors, 150 × 66 × 201 cm|150|201|66|shelves=2,slides=2,n=2,of=wardrobePAX / MEHAMN/AULI|cabrow|Wardrobe with sliding doors, 150 × 66 × 236 cm|150|236|66|shelves=2,slides=2,n=2,of=wardrobe||pax-mehamn-auli-wardrobe-sliding-doors-150-x-66-2PAX / MEHAMN/AULI|cabrow|Wardrobe with sliding doors, 200 × 66 × 236 cm|200|236|66|shelves=2,slides=2,n=2,of=wardrobe+PAX / MEHAMN/AULI|cabrow|Wardrobe, 250 × 66 × 201 cm|250|201|66|shelves=2,slides=2,of=wardrobe,u=100+75+75PAX / TONSTAD|cornerrobe|Corner wardrobe, 211/161 × 201 cm|211|201|161|shelves=2,u=100+75,v=75PAX / TONSTAD|cornerrobe|Corner wardrobe, 231/161 × 236 cm|231|236|161|shelves=2,u=100+75,v=50,cu=58PAX / TYSSEDAL|cornerrobe|Corner wardrobe, 161/111 × 236 cm|161|236|111|shelves=2,u=100,cu=58diff --git a/src/lib/search.ts b/src/lib/search.tsindex 4e2c2cc..32fbfba 100644--- a/src/lib/search.ts+++ b/src/lib/search.ts@@ -16,7 +16,7 @@ export function slugify(s: string) {const CATEGORY_WORDS: [Kind, string[]][] = [["office", ["office chair", "desk chair", "swivel chair", "gaming chair", "computer chair"]],- ["bookrow", ["bookcase combination", "bookshelf combination"]],+ ["bookrow", ["bookcase combination", "bookshelf combination", "shelving combination", "shelving unit combination", "shelf combination"]],["cabrow", ["tv bench combination", "tv unit combination", "media unit combination", "cabinet combination", "wardrobe combination", "closet combination", "wall cabinet combination"]],["washstand", ["wash stand", "washstand", "vanity", "vanity unit", "bathroom vanity", "basin unit", "basin cabinet", "wash basin cabinet", "washbasin cabinet", "bathroom cabinet", "sink vanity"]],["sinkcab", ["sink cabinet", "sink base", "sink base cabinet", "sink unit", "kitchen sink cabinet", "under sink cabinet", "cabinet for sink", "sink cupboard"]],@@ -181,6 +181,8 @@ export function searchCatalog(q: string, limit = 8): Hit[] {if (!ns && !kidsQ && r.kids) score -= 1;// rows of several units, sofa sections and appliance cabinets come after the plain product, unless the query asks for themif (e.kind && (LESSER.has(e.kind) || e.cabinet?.fit) && kind !== e.kind) score -= 1;+ // and rows of frames that aren't all alike after the rows of frames that are+ if (e.row?.units) score -= 0.5;if (e.checked) score += 3;if (e.featured) score += 2;if (score > 15) hits.push({ entry: e, score, exact: ns >= 80 });