@gurpinderjitsingh/recipe-ui 0.1.5 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/dist/cjs/app-modal_7.cjs.entry.js +9 -7
  2. package/dist/cjs/app-toast.cjs.entry.js +1 -1
  3. package/dist/cjs/loader.cjs.js +1 -1
  4. package/dist/cjs/recipe-ui.cjs.js +1 -1
  5. package/dist/collection/components/app-toast/app-toast.js +1 -1
  6. package/dist/collection/components/meal-plan-day/meal-plan-day.css +149 -13
  7. package/dist/collection/components/meal-plan-day/meal-plan-day.js +23 -8
  8. package/dist/collection/components/recipe-card/recipe-card.js +1 -1
  9. package/dist/collection/components/recipe-filter-bar/recipe-filter-bar.js +1 -1
  10. package/dist/collection/components/recipe-form/recipe-form.js +1 -1
  11. package/dist/collection/components/recipe-rating/recipe-rating.js +1 -1
  12. package/dist/collection/components/recipe-search-bar/recipe-search-bar.js +1 -1
  13. package/dist/components/app-toast.js +1 -1
  14. package/dist/components/index.js +1 -1
  15. package/dist/components/meal-plan-day.js +1 -1
  16. package/dist/components/{p-BRKGu69u.js → p-BUu-OE2n.js} +1 -1
  17. package/dist/components/{p-B4H61SFd.js → p-Bi4G3e9f.js} +1 -1
  18. package/dist/components/{p-BekLK-Pb.js → p-Bj2iIXUo.js} +1 -1
  19. package/dist/components/p-BqnbT3UL.js +1 -0
  20. package/dist/components/{p-DsyQvPDo.js → p-DXdnWxeM.js} +1 -1
  21. package/dist/components/p-S4266va_.js +1 -0
  22. package/dist/components/{p-COHQTgKC.js → p-Xf30T5IO.js} +1 -1
  23. package/dist/components/recipe-card.js +1 -1
  24. package/dist/components/recipe-filter-bar.js +1 -1
  25. package/dist/components/recipe-form.js +1 -1
  26. package/dist/components/recipe-rating.js +1 -1
  27. package/dist/components/recipe-search-bar.js +1 -1
  28. package/dist/esm/app-modal_7.entry.js +9 -7
  29. package/dist/esm/app-toast.entry.js +1 -1
  30. package/dist/esm/loader.js +1 -1
  31. package/dist/esm/recipe-ui.js +1 -1
  32. package/dist/recipe-ui/{p-6ef28048.entry.js → p-531fb6c4.entry.js} +1 -1
  33. package/dist/recipe-ui/p-a8cd146e.entry.js +1 -0
  34. package/dist/recipe-ui/recipe-ui.esm.js +1 -1
  35. package/dist/types/components/meal-plan-day/meal-plan-day.d.ts +2 -7
  36. package/dist/types/components.d.ts +11 -28
  37. package/package.json +1 -1
  38. package/dist/components/p-BZBToMAv.js +0 -1
  39. package/dist/components/p-kbrkhGSm.js +0 -1
  40. package/dist/recipe-ui/p-697b1175.entry.js +0 -1
@@ -19,7 +19,7 @@ const RecipeCard = class {
19
19
  };
20
20
  }
21
21
  render() {
22
- return (index.h("div", { key: 'abd19b1d63409b52cf66f348131f5f6f77bb47a6', class: "card", onClick: () => this.cardClick.emit() }, index.h("div", { key: '1292c3f6dfe7d3b399943004f764c41a3d072188', class: "image-wrap" }, this.image ? index.h("img", { src: this.image, alt: this.recipeTitle }) : index.h("div", { class: "placeholder" }), index.h("button", { key: '0efdc01af349d011ca0e11c4df5438b79876b467', class: { 'fav-btn': true, active: this.favorite }, onClick: this.onFavoriteClick, "aria-label": "Toggle favorite" }, this.favorite ? '★' : '☆')), index.h("div", { key: '66c2c4d845d9cc082c07f24f5d827313f6ad51c4', class: "body" }, index.h("h3", { key: '779fc629c3b97b6158f99440d9bb17fafb708dd3' }, this.recipeTitle), this.category && index.h("span", { key: '259ec599a43a5c8a279ad5993ba36f8602125b76', class: "category" }, this.category), index.h("div", { key: '58ab20f9682b4b73b7d027571496641cbfa76d0b', class: "actions" }, index.h("slot", { key: '28103422d993e58b133c2350e37c06fddf24300f', name: "actions" })))));
22
+ return (index.h("div", { key: 'ab4f6e822f8b961d15c49d488af4e9b617ae71d2', class: "card", onClick: () => this.cardClick.emit() }, index.h("div", { key: 'f57fc00e484283bd223f7e8557af7e76de33217e', class: "image-wrap" }, this.image ? index.h("img", { src: this.image, alt: this.recipeTitle }) : index.h("div", { class: "placeholder" }), index.h("button", { key: '2f05b10aa6de8f6d51e0a216567a65900011a198', class: { 'fav-btn': true, active: this.favorite }, onClick: this.onFavoriteClick, "aria-label": "Toggle favorite" }, this.favorite ? '★' : '☆')), index.h("div", { key: 'bb120c622bef2e7ae8abfedf31ba988a66d393c3', class: "body" }, index.h("h3", { key: '2b0115c0ae28b302e35a00e0ed1a70d0b20712ab' }, this.recipeTitle), this.category && index.h("span", { key: '388a88c469547f04e7af2b1da0d303a28f499481', class: "category" }, this.category), index.h("div", { key: 'ff8e56f5a2ce08736ec9cef2a17bbcc2aad4b946', class: "actions" }, index.h("slot", { key: '8952391cb6163493dc5ab27b690c4375ef535ac4', name: "actions" })))));
23
23
  }
24
24
  };
25
25
  RecipeCard.style = recipeCardCss();
@@ -55,7 +55,7 @@ const RecipeSearchBar = class {
55
55
  this.internalValue = newVal;
56
56
  }
57
57
  render() {
58
- return (index.h("div", { key: 'fe5eb2928308fb2496badd784e684b19df52501a', class: "wrap" }, index.h("input", { key: '3d4abb23a1155075a8889e015819b37a8569f6f5', type: "search", placeholder: this.placeholder, value: this.internalValue, onInput: this.onInput, onKeyDown: this.onKeyDown }), index.h("button", { key: 'f33f95b5bfcad9146903a2eb4448932a1d68edb7', onClick: () => this.search.emit({ value: this.internalValue }), "aria-label": "Search" }, "\uD83D\uDD0D")));
58
+ return (index.h("div", { key: 'eb622258d322ed13168a4e4da4f6fecc67c5e3ea', class: "wrap" }, index.h("input", { key: '5594cf8585234e21e4529a069ad9621631c9e103', type: "search", placeholder: this.placeholder, value: this.internalValue, onInput: this.onInput, onKeyDown: this.onKeyDown }), index.h("button", { key: '7540e7232d5071a65360c8196deda3461bfa8308', onClick: () => this.search.emit({ value: this.internalValue }), "aria-label": "Search" }, "\uD83D\uDD0D")));
59
59
  }
60
60
  static get watchers() { return {
61
61
  "value": [{
@@ -79,7 +79,7 @@ const RecipeFilterBar = class {
79
79
  }
80
80
  render() {
81
81
  const cats = Array.isArray(this.categories) ? this.categories : [];
82
- return (index.h("div", { key: '13bc63f39ebfc55c0f05c035b63036121f7b3930', class: "wrap" }, index.h("button", { key: '8aeb99775268204433a8f9831eca9873066c7b9e', class: { chip: true, active: this.active === '' }, onClick: () => this.select('') }, "All"), cats.map((c) => (index.h("button", { class: { chip: true, active: this.active === c }, onClick: () => this.select(c) }, c)))));
82
+ return (index.h("div", { key: '084a1e0d79a1916d07277e1c080ff779aba1aa79', class: "wrap" }, index.h("button", { key: 'f0b9b529d1dca7f98621404b174837b5b21163e7', class: { chip: true, active: this.active === '' }, onClick: () => this.select('') }, "All"), cats.map((c) => (index.h("button", { class: { chip: true, active: this.active === c }, onClick: () => this.select(c) }, c)))));
83
83
  }
84
84
  };
85
85
  RecipeFilterBar.style = recipeFilterBarCss();
@@ -96,7 +96,7 @@ const RecipeRating = class {
96
96
  }
97
97
  render() {
98
98
  const stars = Array.from({ length: this.max }, (_, i) => i + 1);
99
- return (index.h("div", { key: '1e1c67012185e7aaecfcc89671532946262a6957', class: "wrap", role: this.readonly ? undefined : 'radiogroup' }, stars.map((s) => (index.h("span", { class: { star: true, filled: s <= this.value, clickable: !this.readonly }, onClick: () => !this.readonly && this.ratingChange.emit({ value: s }) }, "\u2605")))));
99
+ return (index.h("div", { key: '19cb1bd17a6dc207c7e556ae026a4f343a784f50', class: "wrap", role: this.readonly ? undefined : 'radiogroup' }, stars.map((s) => (index.h("span", { class: { star: true, filled: s <= this.value, clickable: !this.readonly }, onClick: () => !this.readonly && this.ratingChange.emit({ value: s }) }, "\u2605")))));
100
100
  }
101
101
  };
102
102
  RecipeRating.style = recipeRatingCss();
@@ -180,7 +180,7 @@ const RecipeForm = class {
180
180
  this.ingredients = next;
181
181
  }
182
182
  render() {
183
- return (index.h("form", { key: 'bb5c6c7f1b421b55515994f0256c5b39ea781632', onSubmit: this.onSubmit }, index.h("slot", { key: '16940e4c8368aa6b546254ff8db7b28885a4409b', name: "header" }), index.h("label", { key: '7e3d6ba3231039ecdcca6a4c4314cf27038e1732' }, "Title", index.h("input", { key: 'f86056de021f040b8bbf3bf67a0d40ba526ad754', type: "text", value: this.title, onInput: (e) => (this.title = e.target.value) }), this.errors.title && index.h("span", { key: '54d552a15e037f54b2c6f0fd13cb4b685c25c76c', class: "error" }, this.errors.title)), index.h("label", { key: '376da4904e7919b5540ee8dabf494f6aab053523' }, "Image URL", index.h("input", { key: '761b64f0e5153ca0e2bf61a7db4c4106ae2f79ef', type: "text", value: this.image, onInput: (e) => (this.image = e.target.value) })), index.h("label", { key: '0b7ff19b8718540b08921bb7f301be5cacf0df36' }, "Category", index.h("input", { key: '4f1bae8316d588e93006a12e0d824579ddbece43', type: "text", value: this.category, onInput: (e) => (this.category = e.target.value) })), index.h("div", { key: '280d98b91621defa547dbcc35c0cb6da55a67b5f', class: "field" }, index.h("span", { key: '96a015e055b434441eba85dcb89470823d0ebcc8' }, "Ingredients"), this.ingredients.map((ing, i) => (index.h("div", { class: "ingredient-row" }, index.h("input", { type: "text", value: ing, onInput: (e) => this.updateIngredient(i, e.target.value) }), index.h("button", { type: "button", onClick: () => this.removeIngredient(i), "aria-label": "Remove" }, "\u2715")))), index.h("button", { key: '697cda22eb5bdf42e50ac40669619fbc04140405', type: "button", class: "add-btn", onClick: this.addIngredient }, "+ Add ingredient"), this.errors.ingredients && index.h("span", { key: '6a46c393bdd9af8e1e1255792d5532daf433f25b', class: "error" }, this.errors.ingredients)), index.h("label", { key: '6abdbe72d381c3a0a56c46560a92b1e533fcce2a' }, "Instructions", index.h("textarea", { key: '1d3b62d6543e42a4cd0755522f657c13e2d1e4a7', rows: 5, onInput: (e) => (this.instructions = e.target.value) }, this.instructions), this.errors.instructions && index.h("span", { key: 'b5845bb5cd0ddd40de21f074307513d376a05f56', class: "error" }, this.errors.instructions)), index.h("div", { key: '778adeff176e2d2b080aad59602db6e92a69ea1c', class: "footer" }, index.h("slot", { key: 'c9584d6606ed33f616eb8f3035aa4a0fd5086af3', name: "footer" }), index.h("button", { key: 'b2e17dfb528996a1e6a8a1f8aac36b36e3b07c3a', type: "button", class: "cancel-btn", onClick: () => this.cancel.emit() }, "Cancel"), index.h("button", { key: 'a9e91907aa44c8587a2c492f869d0cb5daa942fe', type: "submit", class: "save-btn" }, "Save Recipe"))));
183
+ return (index.h("form", { key: '6699f62ff8027114e5a0e3d154f8743048cf4d96', onSubmit: this.onSubmit }, index.h("slot", { key: '8de0f7e758feb4fc6f1ea877c4acd7c41cbe13ed', name: "header" }), index.h("label", { key: '881275928734c4eabfee6d22b35cddad1af03853' }, "Title", index.h("input", { key: 'a55ae352c35cec0b2391061d48153151a7dc5e6b', type: "text", value: this.title, onInput: (e) => (this.title = e.target.value) }), this.errors.title && index.h("span", { key: 'dbace66ddaab5ab5096acb39822c7cd3a18923be', class: "error" }, this.errors.title)), index.h("label", { key: 'ae1bcdb323ccaa03307b6a283fcc395ef49954c5' }, "Image URL", index.h("input", { key: '6ee9483689e0304c0ae28ab755dc93e117d4952e', type: "text", value: this.image, onInput: (e) => (this.image = e.target.value) })), index.h("label", { key: '751b54959a8e2c85e98f2b192a4d8aa83d8ebafe' }, "Category", index.h("input", { key: '83f852c74727b86a1a8a6c9a0d93e9ffdb3f33f3', type: "text", value: this.category, onInput: (e) => (this.category = e.target.value) })), index.h("div", { key: '6a7c99a86d601ed51ece26c85b4b45766a2dafdf', class: "field" }, index.h("span", { key: 'ee082917bb3b90ec45ce1feea234c374f7fc35a0' }, "Ingredients"), this.ingredients.map((ing, i) => (index.h("div", { class: "ingredient-row" }, index.h("input", { type: "text", value: ing, onInput: (e) => this.updateIngredient(i, e.target.value) }), index.h("button", { type: "button", onClick: () => this.removeIngredient(i), "aria-label": "Remove" }, "\u2715")))), index.h("button", { key: '4f81107c94bf8810dfc14aa58d5afcf55d8e126d', type: "button", class: "add-btn", onClick: this.addIngredient }, "+ Add ingredient"), this.errors.ingredients && index.h("span", { key: 'd87cc375b194c187b64def1ef9840797dab1d456', class: "error" }, this.errors.ingredients)), index.h("label", { key: 'dc6c04a5a2b5cc7d1912f535b8904125ce74af56' }, "Instructions", index.h("textarea", { key: '0c9c4b09da5b3f24addb66c18fccad7c900bebcb', rows: 5, onInput: (e) => (this.instructions = e.target.value) }, this.instructions), this.errors.instructions && index.h("span", { key: 'f430772f46e5298b2a2522aaef2822a59df61a08', class: "error" }, this.errors.instructions)), index.h("div", { key: '337abce7c4f93a9fbb90917e6b407dfb5b95039d', class: "footer" }, index.h("slot", { key: 'b8b610485f592592afb6cef682faeb13d52da6ea', name: "footer" }), index.h("button", { key: 'faf249c9be390b5d574300d0ff24bcd0c5603a3c', type: "button", class: "cancel-btn", onClick: () => this.cancel.emit() }, "Cancel"), index.h("button", { key: '527146d147778940c28e5357c100d1809cbcd6df', type: "submit", class: "save-btn" }, "Save Recipe"))));
184
184
  }
185
185
  static get watchers() { return {
186
186
  "initialData": [{
@@ -190,7 +190,7 @@ const RecipeForm = class {
190
190
  };
191
191
  RecipeForm.style = recipeFormCss();
192
192
 
193
- const mealPlanDayCss = () => `:host{display:block;font-family:system-ui, sans-serif}.day-col{border:1px solid #eee;border-radius:10px;padding:10px;min-width:150px;display:flex;flex-direction:column;gap:8px;background:#fafafa}h3{margin:0;font-size:13px;text-transform:uppercase;letter-spacing:0.04em;color:#555}.meals{display:flex;flex-direction:column;gap:6px;min-height:40px}.meal-chip{display:flex;align-items:center;gap:6px;background:#fff;border:1px solid #eee;border-radius:8px;padding:4px 6px;font-size:12px}.meal-chip img{width:24px;height:24px;border-radius:4px;object-fit:cover}.meal-chip .title{flex:1}.meal-chip button{border:none;background:none;cursor:pointer;color:#999}.empty{font-size:12px;color:#aaa;margin:4px 0}.add-btn{border:1px dashed #ccc;background:none;border-radius:8px;padding:6px;font-size:12px;cursor:pointer;color:#666}`;
193
+ const mealPlanDayCss = () => `:host{display:block;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif}.day-col{background:#ffffff;border:1px solid #e8eaed;border-radius:12px;padding:14px;min-width:160px;display:flex;flex-direction:column;gap:10px;box-shadow:0 1px 2px rgba(16, 24, 40, 0.04);transition:box-shadow 0.15s ease, border-color 0.15s ease}.day-col:hover{box-shadow:0 4px 12px rgba(16, 24, 40, 0.08);border-color:#d8dce1}.col-header{display:flex;align-items:center;gap:6px;padding-bottom:8px;border-bottom:1px solid #f0f1f3}.col-header .icon{font-size:15px;line-height:1}.col-header h3{margin:0;font-size:12.5px;font-weight:700;text-transform:uppercase;letter-spacing:0.05em;color:#4b5563;flex:1}.count-badge{background:#eef2ff;color:#4338ca;font-size:10.5px;font-weight:700;padding:1px 7px;border-radius:999px;line-height:1.5}.meals{display:flex;flex-direction:column;gap:6px;min-height:44px}.meal-chip{display:flex;align-items:center;gap:8px;background:#f9fafb;border:1px solid #eef0f2;border-radius:9px;padding:6px 8px;font-size:12.5px;transition:background 0.12s ease}.meal-chip:hover{background:#f3f4f6}.thumb{width:28px;height:28px;border-radius:6px;overflow:hidden;flex-shrink:0;background:#e5e7eb}.thumb img{width:100%;height:100%;object-fit:cover;display:block}.meal-chip .title{flex:1;color:#1f2937;font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.remove-btn{border:none;background:none;cursor:pointer;color:#9ca3af;font-size:11px;line-height:1;padding:3px;border-radius:5px;transition:color 0.12s ease, background 0.12s ease}.remove-btn:hover{color:#dc2626;background:#fef2f2}.empty{font-size:12px;color:#9ca3af;margin:6px 0;text-align:center;font-style:italic}.add-btn{display:flex;align-items:center;justify-content:center;gap:4px;border:1.5px dashed #d1d5db;background:none;border-radius:9px;padding:7px;font-size:12px;font-weight:600;cursor:pointer;color:#6b7280;transition:border-color 0.12s ease, color 0.12s ease, background 0.12s ease}.add-btn:hover{border-color:#6366f1;color:#4f46e5;background:#f5f5ff}.plus{font-size:14px;line-height:1}`;
194
194
 
195
195
  const MealPlanDay = class {
196
196
  constructor(hostRef) {
@@ -199,10 +199,12 @@ const MealPlanDay = class {
199
199
  this.removeMeal = index.createEvent(this, "removeMeal");
200
200
  this.day = '';
201
201
  this.meals = [];
202
+ /** Optional emoji/icon shown next to the label, e.g. "🌅" */
203
+ this.icon = '';
202
204
  }
203
205
  render() {
204
206
  const meals = Array.isArray(this.meals) ? this.meals : [];
205
- return (index.h("div", { key: '7a0b592fd4b8d9971d7f4912cecb5f9126be11b3', class: "day-col" }, index.h("h3", { key: 'b0f1f6a717ad409e6339219ea2f71b73d73bb1f3' }, this.day), index.h("div", { key: '2c978721af3aad27042572dd7825d5f2b5b659fb', class: "meals" }, meals.map((m) => (index.h("div", { class: "meal-chip" }, m.image && index.h("img", { src: m.image, alt: m.title }), index.h("span", { class: "title" }, m.title), index.h("button", { onClick: () => this.removeMeal.emit({ day: this.day, mealId: m.id }), "aria-label": "Remove meal" }, "\u2715")))), meals.length === 0 && index.h("p", { key: '326b5f3201df2416f43debc7257918a60a6ab6dd', class: "empty" }, "No meals planned")), index.h("button", { key: '3532de633a1f6cb83bb70f91a2df8fe1a9fcbc14', class: "add-btn", onClick: () => this.assignMeal.emit({ day: this.day }) }, "+ Add meal")));
207
+ return (index.h("div", { key: 'cd4f194f1eeb5f53a029f380c40aa0b4ec2f32f4', class: "day-col" }, index.h("div", { key: 'd88966142d5101fc522d5de89b6d4cab72cbbbf3', class: "col-header" }, this.icon && index.h("span", { key: '5a9a27a3a1909bcf7295ec7eeccf309e5e2d1ae0', class: "icon" }, this.icon), index.h("h3", { key: 'fd1fa2f1274cc1f6bd8917959015722cb69002ba' }, this.day), meals.length > 0 && index.h("span", { key: 'feff3bc91b52203dba19f7a87c56d3813fc95cdd', class: "count-badge" }, meals.length)), index.h("div", { key: '4afee9ce77bf1447bf9e32efc7e2f9b9571873e7', class: "meals" }, meals.map((m) => (index.h("div", { class: "meal-chip" }, index.h("div", { class: "thumb" }, m.image && index.h("img", { src: m.image, alt: m.title })), index.h("span", { class: "title" }, m.title), index.h("button", { class: "remove-btn", onClick: () => this.removeMeal.emit({ day: this.day, mealId: m.id }), "aria-label": `Remove ${m.title}` }, "\u2715")))), meals.length === 0 && index.h("p", { key: '9a4002b1b4516fc5ff6ef8f9a2e0a7f5e8465cbd', class: "empty" }, "No meal planned")), index.h("button", { key: '2cef3c5f7d0e89303cb8989f78eefb95c426683f', class: "add-btn", onClick: () => this.assignMeal.emit({ day: this.day }) }, index.h("span", { key: 'ae54b56f8f0b01f45029e36919764ae31f3a38b9', class: "plus" }, "+"), " Add meal")));
206
208
  }
207
209
  };
208
210
  MealPlanDay.style = mealPlanDayCss();
@@ -18,7 +18,7 @@ const AppToast = class {
18
18
  }
19
19
  }
20
20
  render() {
21
- return (index.h("div", { key: 'd9dcb405ffd97bfa44fee10fe49103bd021938a2', class: `toast ${this.type}` }, index.h("span", { key: '5fd291b9766dc41189f49c11c836654d6663c8d1' }, this.message), index.h("button", { key: '9f93921f20b17520ce339378c5a1ca66ef6a04bc', onClick: () => this.dismiss.emit(), "aria-label": "Dismiss" }, "\u2715")));
21
+ return (index.h("div", { key: '73ab8ea44ad155052616ffbc424e1d8f13b8116f', class: `toast ${this.type}` }, index.h("span", { key: '301487550c2f4f50cdcc6d0a138b9e968cde385f' }, this.message), index.h("button", { key: '4e9de348002a397a25450142d9fa1fa07ca84d54', onClick: () => this.dismiss.emit(), "aria-label": "Dismiss" }, "\u2715")));
22
22
  }
23
23
  };
24
24
  AppToast.style = appToastCss();
@@ -6,7 +6,7 @@ var appGlobals = require('./app-globals-V2Kpy_OQ.js');
6
6
  const defineCustomElements = async (win, options) => {
7
7
  if (typeof window === 'undefined') return undefined;
8
8
  await appGlobals.globalScripts();
9
- return index.bootstrapLazy([["app-modal_7.cjs",[[257,"app-modal",{"open":[4],"modalTitle":[1,"modal-title"]}],[1,"meal-plan-day",{"day":[1],"meals":[16]}],[257,"recipe-card",{"recipeTitle":[1,"recipe-title"],"image":[1],"category":[1],"favorite":[4]}],[1,"recipe-filter-bar",{"categories":[16],"active":[1]}],[257,"recipe-form",{"initialData":[1,"initial-data"],"title":[32],"image":[32],"category":[32],"ingredients":[32],"instructions":[32],"errors":[32]},null,{"initialData":[{"onInitialDataChange":0}]}],[1,"recipe-rating",{"value":[2],"readonly":[4],"max":[2]}],[1,"recipe-search-bar",{"placeholder":[1],"value":[1],"debounceMs":[2,"debounce-ms"],"internalValue":[32]},null,{"value":[{"onValuePropChange":0}]}]]],["app-toast.cjs",[[1,"app-toast",{"message":[1],"type":[1],"duration":[2]}]]]], options);
9
+ return index.bootstrapLazy([["app-modal_7.cjs",[[257,"app-modal",{"open":[4],"modalTitle":[1,"modal-title"]}],[1,"meal-plan-day",{"day":[1],"meals":[16],"icon":[1]}],[257,"recipe-card",{"recipeTitle":[1,"recipe-title"],"image":[1],"category":[1],"favorite":[4]}],[1,"recipe-filter-bar",{"categories":[16],"active":[1]}],[257,"recipe-form",{"initialData":[1,"initial-data"],"title":[32],"image":[32],"category":[32],"ingredients":[32],"instructions":[32],"errors":[32]},null,{"initialData":[{"onInitialDataChange":0}]}],[1,"recipe-rating",{"value":[2],"readonly":[4],"max":[2]}],[1,"recipe-search-bar",{"placeholder":[1],"value":[1],"debounceMs":[2,"debounce-ms"],"internalValue":[32]},null,{"value":[{"onValuePropChange":0}]}]]],["app-toast.cjs",[[1,"app-toast",{"message":[1],"type":[1],"duration":[2]}]]]], options);
10
10
  };
11
11
 
12
12
  exports.setNonce = index.setNonce;
@@ -19,7 +19,7 @@ var patchBrowser = () => {
19
19
 
20
20
  patchBrowser().then(async (options) => {
21
21
  await appGlobals.globalScripts();
22
- return index.bootstrapLazy([["app-modal_7.cjs",[[257,"app-modal",{"open":[4],"modalTitle":[1,"modal-title"]}],[1,"meal-plan-day",{"day":[1],"meals":[16]}],[257,"recipe-card",{"recipeTitle":[1,"recipe-title"],"image":[1],"category":[1],"favorite":[4]}],[1,"recipe-filter-bar",{"categories":[16],"active":[1]}],[257,"recipe-form",{"initialData":[1,"initial-data"],"title":[32],"image":[32],"category":[32],"ingredients":[32],"instructions":[32],"errors":[32]},null,{"initialData":[{"onInitialDataChange":0}]}],[1,"recipe-rating",{"value":[2],"readonly":[4],"max":[2]}],[1,"recipe-search-bar",{"placeholder":[1],"value":[1],"debounceMs":[2,"debounce-ms"],"internalValue":[32]},null,{"value":[{"onValuePropChange":0}]}]]],["app-toast.cjs",[[1,"app-toast",{"message":[1],"type":[1],"duration":[2]}]]]], options);
22
+ return index.bootstrapLazy([["app-modal_7.cjs",[[257,"app-modal",{"open":[4],"modalTitle":[1,"modal-title"]}],[1,"meal-plan-day",{"day":[1],"meals":[16],"icon":[1]}],[257,"recipe-card",{"recipeTitle":[1,"recipe-title"],"image":[1],"category":[1],"favorite":[4]}],[1,"recipe-filter-bar",{"categories":[16],"active":[1]}],[257,"recipe-form",{"initialData":[1,"initial-data"],"title":[32],"image":[32],"category":[32],"ingredients":[32],"instructions":[32],"errors":[32]},null,{"initialData":[{"onInitialDataChange":0}]}],[1,"recipe-rating",{"value":[2],"readonly":[4],"max":[2]}],[1,"recipe-search-bar",{"placeholder":[1],"value":[1],"debounceMs":[2,"debounce-ms"],"internalValue":[32]},null,{"value":[{"onValuePropChange":0}]}]]],["app-toast.cjs",[[1,"app-toast",{"message":[1],"type":[1],"duration":[2]}]]]], options);
23
23
  });
24
24
 
25
25
  exports.setNonce = index.setNonce;
@@ -12,7 +12,7 @@ export class AppToast {
12
12
  }
13
13
  }
14
14
  render() {
15
- return (h("div", { key: 'd9dcb405ffd97bfa44fee10fe49103bd021938a2', class: `toast ${this.type}` }, h("span", { key: '5fd291b9766dc41189f49c11c836654d6663c8d1' }, this.message), h("button", { key: '9f93921f20b17520ce339378c5a1ca66ef6a04bc', onClick: () => this.dismiss.emit(), "aria-label": "Dismiss" }, "\u2715")));
15
+ return (h("div", { key: '73ab8ea44ad155052616ffbc424e1d8f13b8116f', class: `toast ${this.type}` }, h("span", { key: '301487550c2f4f50cdcc6d0a138b9e968cde385f' }, this.message), h("button", { key: '4e9de348002a397a25450142d9fa1fa07ca84d54', onClick: () => this.dismiss.emit(), "aria-label": "Dismiss" }, "\u2715")));
16
16
  }
17
17
  static get is() { return "app-toast"; }
18
18
  static get encapsulation() { return "shadow"; }
@@ -1,19 +1,155 @@
1
- :host { display: block; font-family: system-ui, sans-serif; }
1
+ :host {
2
+ display: block;
3
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
4
+ }
5
+
2
6
  .day-col {
3
- border: 1px solid #eee; border-radius: 10px; padding: 10px; min-width: 150px;
4
- display: flex; flex-direction: column; gap: 8px; background: #fafafa;
7
+ background: #ffffff;
8
+ border: 1px solid #e8eaed;
9
+ border-radius: 12px;
10
+ padding: 14px;
11
+ min-width: 160px;
12
+ display: flex;
13
+ flex-direction: column;
14
+ gap: 10px;
15
+ box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
16
+ transition: box-shadow 0.15s ease, border-color 0.15s ease;
17
+ }
18
+
19
+ .day-col:hover {
20
+ box-shadow: 0 4px 12px rgba(16, 24, 40, 0.08);
21
+ border-color: #d8dce1;
22
+ }
23
+
24
+ .col-header {
25
+ display: flex;
26
+ align-items: center;
27
+ gap: 6px;
28
+ padding-bottom: 8px;
29
+ border-bottom: 1px solid #f0f1f3;
30
+ }
31
+
32
+ .col-header .icon {
33
+ font-size: 15px;
34
+ line-height: 1;
5
35
  }
6
- h3 { margin: 0; font-size: 13px; text-transform: uppercase; letter-spacing: 0.04em; color: #555; }
7
- .meals { display: flex; flex-direction: column; gap: 6px; min-height: 40px; }
36
+
37
+ .col-header h3 {
38
+ margin: 0;
39
+ font-size: 12.5px;
40
+ font-weight: 700;
41
+ text-transform: uppercase;
42
+ letter-spacing: 0.05em;
43
+ color: #4b5563;
44
+ flex: 1;
45
+ }
46
+
47
+ .count-badge {
48
+ background: #eef2ff;
49
+ color: #4338ca;
50
+ font-size: 10.5px;
51
+ font-weight: 700;
52
+ padding: 1px 7px;
53
+ border-radius: 999px;
54
+ line-height: 1.5;
55
+ }
56
+
57
+ .meals {
58
+ display: flex;
59
+ flex-direction: column;
60
+ gap: 6px;
61
+ min-height: 44px;
62
+ }
63
+
8
64
  .meal-chip {
9
- display: flex; align-items: center; gap: 6px; background: #fff; border: 1px solid #eee;
10
- border-radius: 8px; padding: 4px 6px; font-size: 12px;
65
+ display: flex;
66
+ align-items: center;
67
+ gap: 8px;
68
+ background: #f9fafb;
69
+ border: 1px solid #eef0f2;
70
+ border-radius: 9px;
71
+ padding: 6px 8px;
72
+ font-size: 12.5px;
73
+ transition: background 0.12s ease;
74
+ }
75
+
76
+ .meal-chip:hover {
77
+ background: #f3f4f6;
11
78
  }
12
- .meal-chip img { width: 24px; height: 24px; border-radius: 4px; object-fit: cover; }
13
- .meal-chip .title { flex: 1; }
14
- .meal-chip button { border: none; background: none; cursor: pointer; color: #999; }
15
- .empty { font-size: 12px; color: #aaa; margin: 4px 0; }
79
+
80
+ .thumb {
81
+ width: 28px;
82
+ height: 28px;
83
+ border-radius: 6px;
84
+ overflow: hidden;
85
+ flex-shrink: 0;
86
+ background: #e5e7eb;
87
+ }
88
+
89
+ .thumb img {
90
+ width: 100%;
91
+ height: 100%;
92
+ object-fit: cover;
93
+ display: block;
94
+ }
95
+
96
+ .meal-chip .title {
97
+ flex: 1;
98
+ color: #1f2937;
99
+ font-weight: 500;
100
+ white-space: nowrap;
101
+ overflow: hidden;
102
+ text-overflow: ellipsis;
103
+ }
104
+
105
+ .remove-btn {
106
+ border: none;
107
+ background: none;
108
+ cursor: pointer;
109
+ color: #9ca3af;
110
+ font-size: 11px;
111
+ line-height: 1;
112
+ padding: 3px;
113
+ border-radius: 5px;
114
+ transition: color 0.12s ease, background 0.12s ease;
115
+ }
116
+
117
+ .remove-btn:hover {
118
+ color: #dc2626;
119
+ background: #fef2f2;
120
+ }
121
+
122
+ .empty {
123
+ font-size: 12px;
124
+ color: #9ca3af;
125
+ margin: 6px 0;
126
+ text-align: center;
127
+ font-style: italic;
128
+ }
129
+
16
130
  .add-btn {
17
- border: 1px dashed #ccc; background: none; border-radius: 8px; padding: 6px;
18
- font-size: 12px; cursor: pointer; color: #666;
131
+ display: flex;
132
+ align-items: center;
133
+ justify-content: center;
134
+ gap: 4px;
135
+ border: 1.5px dashed #d1d5db;
136
+ background: none;
137
+ border-radius: 9px;
138
+ padding: 7px;
139
+ font-size: 12px;
140
+ font-weight: 600;
141
+ cursor: pointer;
142
+ color: #6b7280;
143
+ transition: border-color 0.12s ease, color 0.12s ease, background 0.12s ease;
144
+ }
145
+
146
+ .add-btn:hover {
147
+ border-color: #6366f1;
148
+ color: #4f46e5;
149
+ background: #f5f5ff;
19
150
  }
151
+
152
+ .plus {
153
+ font-size: 14px;
154
+ line-height: 1;
155
+ }
@@ -1,19 +1,14 @@
1
1
  import { h } from "@stencil/core";
2
- /**
3
- * One column of the weekly meal planner, representing a single day.
4
- * `meals` is the list of recipes currently assigned to this day.
5
- * Emits `removeMeal` when a meal's remove button is clicked, and
6
- * `assignMeal` when the "+ Add meal" button is clicked (the parent app
7
- * is expected to open its own picker/modal and then update `meals`).
8
- */
9
2
  export class MealPlanDay {
10
3
  constructor() {
11
4
  this.day = '';
12
5
  this.meals = [];
6
+ /** Optional emoji/icon shown next to the label, e.g. "🌅" */
7
+ this.icon = '';
13
8
  }
14
9
  render() {
15
10
  const meals = Array.isArray(this.meals) ? this.meals : [];
16
- return (h("div", { key: '7a0b592fd4b8d9971d7f4912cecb5f9126be11b3', class: "day-col" }, h("h3", { key: 'b0f1f6a717ad409e6339219ea2f71b73d73bb1f3' }, this.day), h("div", { key: '2c978721af3aad27042572dd7825d5f2b5b659fb', class: "meals" }, meals.map((m) => (h("div", { class: "meal-chip" }, m.image && h("img", { src: m.image, alt: m.title }), h("span", { class: "title" }, m.title), h("button", { onClick: () => this.removeMeal.emit({ day: this.day, mealId: m.id }), "aria-label": "Remove meal" }, "\u2715")))), meals.length === 0 && h("p", { key: '326b5f3201df2416f43debc7257918a60a6ab6dd', class: "empty" }, "No meals planned")), h("button", { key: '3532de633a1f6cb83bb70f91a2df8fe1a9fcbc14', class: "add-btn", onClick: () => this.assignMeal.emit({ day: this.day }) }, "+ Add meal")));
11
+ return (h("div", { key: 'cd4f194f1eeb5f53a029f380c40aa0b4ec2f32f4', class: "day-col" }, h("div", { key: 'd88966142d5101fc522d5de89b6d4cab72cbbbf3', class: "col-header" }, this.icon && h("span", { key: '5a9a27a3a1909bcf7295ec7eeccf309e5e2d1ae0', class: "icon" }, this.icon), h("h3", { key: 'fd1fa2f1274cc1f6bd8917959015722cb69002ba' }, this.day), meals.length > 0 && h("span", { key: 'feff3bc91b52203dba19f7a87c56d3813fc95cdd', class: "count-badge" }, meals.length)), h("div", { key: '4afee9ce77bf1447bf9e32efc7e2f9b9571873e7', class: "meals" }, meals.map((m) => (h("div", { class: "meal-chip" }, h("div", { class: "thumb" }, m.image && h("img", { src: m.image, alt: m.title })), h("span", { class: "title" }, m.title), h("button", { class: "remove-btn", onClick: () => this.removeMeal.emit({ day: this.day, mealId: m.id }), "aria-label": `Remove ${m.title}` }, "\u2715")))), meals.length === 0 && h("p", { key: '9a4002b1b4516fc5ff6ef8f9a2e0a7f5e8465cbd', class: "empty" }, "No meal planned")), h("button", { key: '2cef3c5f7d0e89303cb8989f78eefb95c426683f', class: "add-btn", onClick: () => this.assignMeal.emit({ day: this.day }) }, h("span", { key: 'ae54b56f8f0b01f45029e36919764ae31f3a38b9', class: "plus" }, "+"), " Add meal")));
17
12
  }
18
13
  static get is() { return "meal-plan-day"; }
19
14
  static get encapsulation() { return "shadow"; }
@@ -72,6 +67,26 @@ export class MealPlanDay {
72
67
  "getter": false,
73
68
  "setter": false,
74
69
  "defaultValue": "[]"
70
+ },
71
+ "icon": {
72
+ "type": "string",
73
+ "mutable": false,
74
+ "complexType": {
75
+ "original": "string",
76
+ "resolved": "string",
77
+ "references": {}
78
+ },
79
+ "required": false,
80
+ "optional": false,
81
+ "docs": {
82
+ "tags": [],
83
+ "text": "Optional emoji/icon shown next to the label, e.g. \"\uD83C\uDF05\""
84
+ },
85
+ "getter": false,
86
+ "setter": false,
87
+ "reflect": false,
88
+ "attribute": "icon",
89
+ "defaultValue": "''"
75
90
  }
76
91
  };
77
92
  }
@@ -17,7 +17,7 @@ export class RecipeCard {
17
17
  };
18
18
  }
19
19
  render() {
20
- return (h("div", { key: 'abd19b1d63409b52cf66f348131f5f6f77bb47a6', class: "card", onClick: () => this.cardClick.emit() }, h("div", { key: '1292c3f6dfe7d3b399943004f764c41a3d072188', class: "image-wrap" }, this.image ? h("img", { src: this.image, alt: this.recipeTitle }) : h("div", { class: "placeholder" }), h("button", { key: '0efdc01af349d011ca0e11c4df5438b79876b467', class: { 'fav-btn': true, active: this.favorite }, onClick: this.onFavoriteClick, "aria-label": "Toggle favorite" }, this.favorite ? '★' : '☆')), h("div", { key: '66c2c4d845d9cc082c07f24f5d827313f6ad51c4', class: "body" }, h("h3", { key: '779fc629c3b97b6158f99440d9bb17fafb708dd3' }, this.recipeTitle), this.category && h("span", { key: '259ec599a43a5c8a279ad5993ba36f8602125b76', class: "category" }, this.category), h("div", { key: '58ab20f9682b4b73b7d027571496641cbfa76d0b', class: "actions" }, h("slot", { key: '28103422d993e58b133c2350e37c06fddf24300f', name: "actions" })))));
20
+ return (h("div", { key: 'ab4f6e822f8b961d15c49d488af4e9b617ae71d2', class: "card", onClick: () => this.cardClick.emit() }, h("div", { key: 'f57fc00e484283bd223f7e8557af7e76de33217e', class: "image-wrap" }, this.image ? h("img", { src: this.image, alt: this.recipeTitle }) : h("div", { class: "placeholder" }), h("button", { key: '2f05b10aa6de8f6d51e0a216567a65900011a198', class: { 'fav-btn': true, active: this.favorite }, onClick: this.onFavoriteClick, "aria-label": "Toggle favorite" }, this.favorite ? '★' : '☆')), h("div", { key: 'bb120c622bef2e7ae8abfedf31ba988a66d393c3', class: "body" }, h("h3", { key: '2b0115c0ae28b302e35a00e0ed1a70d0b20712ab' }, this.recipeTitle), this.category && h("span", { key: '388a88c469547f04e7af2b1da0d303a28f499481', class: "category" }, this.category), h("div", { key: 'ff8e56f5a2ce08736ec9cef2a17bbcc2aad4b946', class: "actions" }, h("slot", { key: '8952391cb6163493dc5ab27b690c4375ef535ac4', name: "actions" })))));
21
21
  }
22
22
  static get is() { return "recipe-card"; }
23
23
  static get encapsulation() { return "shadow"; }
@@ -15,7 +15,7 @@ export class RecipeFilterBar {
15
15
  }
16
16
  render() {
17
17
  const cats = Array.isArray(this.categories) ? this.categories : [];
18
- return (h("div", { key: '13bc63f39ebfc55c0f05c035b63036121f7b3930', class: "wrap" }, h("button", { key: '8aeb99775268204433a8f9831eca9873066c7b9e', class: { chip: true, active: this.active === '' }, onClick: () => this.select('') }, "All"), cats.map((c) => (h("button", { class: { chip: true, active: this.active === c }, onClick: () => this.select(c) }, c)))));
18
+ return (h("div", { key: '084a1e0d79a1916d07277e1c080ff779aba1aa79', class: "wrap" }, h("button", { key: 'f0b9b529d1dca7f98621404b174837b5b21163e7', class: { chip: true, active: this.active === '' }, onClick: () => this.select('') }, "All"), cats.map((c) => (h("button", { class: { chip: true, active: this.active === c }, onClick: () => this.select(c) }, c)))));
19
19
  }
20
20
  static get is() { return "recipe-filter-bar"; }
21
21
  static get encapsulation() { return "shadow"; }
@@ -78,7 +78,7 @@ export class RecipeForm {
78
78
  this.ingredients = next;
79
79
  }
80
80
  render() {
81
- return (h("form", { key: 'bb5c6c7f1b421b55515994f0256c5b39ea781632', onSubmit: this.onSubmit }, h("slot", { key: '16940e4c8368aa6b546254ff8db7b28885a4409b', name: "header" }), h("label", { key: '7e3d6ba3231039ecdcca6a4c4314cf27038e1732' }, "Title", h("input", { key: 'f86056de021f040b8bbf3bf67a0d40ba526ad754', type: "text", value: this.title, onInput: (e) => (this.title = e.target.value) }), this.errors.title && h("span", { key: '54d552a15e037f54b2c6f0fd13cb4b685c25c76c', class: "error" }, this.errors.title)), h("label", { key: '376da4904e7919b5540ee8dabf494f6aab053523' }, "Image URL", h("input", { key: '761b64f0e5153ca0e2bf61a7db4c4106ae2f79ef', type: "text", value: this.image, onInput: (e) => (this.image = e.target.value) })), h("label", { key: '0b7ff19b8718540b08921bb7f301be5cacf0df36' }, "Category", h("input", { key: '4f1bae8316d588e93006a12e0d824579ddbece43', type: "text", value: this.category, onInput: (e) => (this.category = e.target.value) })), h("div", { key: '280d98b91621defa547dbcc35c0cb6da55a67b5f', class: "field" }, h("span", { key: '96a015e055b434441eba85dcb89470823d0ebcc8' }, "Ingredients"), this.ingredients.map((ing, i) => (h("div", { class: "ingredient-row" }, h("input", { type: "text", value: ing, onInput: (e) => this.updateIngredient(i, e.target.value) }), h("button", { type: "button", onClick: () => this.removeIngredient(i), "aria-label": "Remove" }, "\u2715")))), h("button", { key: '697cda22eb5bdf42e50ac40669619fbc04140405', type: "button", class: "add-btn", onClick: this.addIngredient }, "+ Add ingredient"), this.errors.ingredients && h("span", { key: '6a46c393bdd9af8e1e1255792d5532daf433f25b', class: "error" }, this.errors.ingredients)), h("label", { key: '6abdbe72d381c3a0a56c46560a92b1e533fcce2a' }, "Instructions", h("textarea", { key: '1d3b62d6543e42a4cd0755522f657c13e2d1e4a7', rows: 5, onInput: (e) => (this.instructions = e.target.value) }, this.instructions), this.errors.instructions && h("span", { key: 'b5845bb5cd0ddd40de21f074307513d376a05f56', class: "error" }, this.errors.instructions)), h("div", { key: '778adeff176e2d2b080aad59602db6e92a69ea1c', class: "footer" }, h("slot", { key: 'c9584d6606ed33f616eb8f3035aa4a0fd5086af3', name: "footer" }), h("button", { key: 'b2e17dfb528996a1e6a8a1f8aac36b36e3b07c3a', type: "button", class: "cancel-btn", onClick: () => this.cancel.emit() }, "Cancel"), h("button", { key: 'a9e91907aa44c8587a2c492f869d0cb5daa942fe', type: "submit", class: "save-btn" }, "Save Recipe"))));
81
+ return (h("form", { key: '6699f62ff8027114e5a0e3d154f8743048cf4d96', onSubmit: this.onSubmit }, h("slot", { key: '8de0f7e758feb4fc6f1ea877c4acd7c41cbe13ed', name: "header" }), h("label", { key: '881275928734c4eabfee6d22b35cddad1af03853' }, "Title", h("input", { key: 'a55ae352c35cec0b2391061d48153151a7dc5e6b', type: "text", value: this.title, onInput: (e) => (this.title = e.target.value) }), this.errors.title && h("span", { key: 'dbace66ddaab5ab5096acb39822c7cd3a18923be', class: "error" }, this.errors.title)), h("label", { key: 'ae1bcdb323ccaa03307b6a283fcc395ef49954c5' }, "Image URL", h("input", { key: '6ee9483689e0304c0ae28ab755dc93e117d4952e', type: "text", value: this.image, onInput: (e) => (this.image = e.target.value) })), h("label", { key: '751b54959a8e2c85e98f2b192a4d8aa83d8ebafe' }, "Category", h("input", { key: '83f852c74727b86a1a8a6c9a0d93e9ffdb3f33f3', type: "text", value: this.category, onInput: (e) => (this.category = e.target.value) })), h("div", { key: '6a7c99a86d601ed51ece26c85b4b45766a2dafdf', class: "field" }, h("span", { key: 'ee082917bb3b90ec45ce1feea234c374f7fc35a0' }, "Ingredients"), this.ingredients.map((ing, i) => (h("div", { class: "ingredient-row" }, h("input", { type: "text", value: ing, onInput: (e) => this.updateIngredient(i, e.target.value) }), h("button", { type: "button", onClick: () => this.removeIngredient(i), "aria-label": "Remove" }, "\u2715")))), h("button", { key: '4f81107c94bf8810dfc14aa58d5afcf55d8e126d', type: "button", class: "add-btn", onClick: this.addIngredient }, "+ Add ingredient"), this.errors.ingredients && h("span", { key: 'd87cc375b194c187b64def1ef9840797dab1d456', class: "error" }, this.errors.ingredients)), h("label", { key: 'dc6c04a5a2b5cc7d1912f535b8904125ce74af56' }, "Instructions", h("textarea", { key: '0c9c4b09da5b3f24addb66c18fccad7c900bebcb', rows: 5, onInput: (e) => (this.instructions = e.target.value) }, this.instructions), this.errors.instructions && h("span", { key: 'f430772f46e5298b2a2522aaef2822a59df61a08', class: "error" }, this.errors.instructions)), h("div", { key: '337abce7c4f93a9fbb90917e6b407dfb5b95039d', class: "footer" }, h("slot", { key: 'b8b610485f592592afb6cef682faeb13d52da6ea', name: "footer" }), h("button", { key: 'faf249c9be390b5d574300d0ff24bcd0c5603a3c', type: "button", class: "cancel-btn", onClick: () => this.cancel.emit() }, "Cancel"), h("button", { key: '527146d147778940c28e5357c100d1809cbcd6df', type: "submit", class: "save-btn" }, "Save Recipe"))));
82
82
  }
83
83
  static get is() { return "recipe-form"; }
84
84
  static get encapsulation() { return "shadow"; }
@@ -8,7 +8,7 @@ export class RecipeRating {
8
8
  }
9
9
  render() {
10
10
  const stars = Array.from({ length: this.max }, (_, i) => i + 1);
11
- return (h("div", { key: '1e1c67012185e7aaecfcc89671532946262a6957', class: "wrap", role: this.readonly ? undefined : 'radiogroup' }, stars.map((s) => (h("span", { class: { star: true, filled: s <= this.value, clickable: !this.readonly }, onClick: () => !this.readonly && this.ratingChange.emit({ value: s }) }, "\u2605")))));
11
+ return (h("div", { key: '19cb1bd17a6dc207c7e556ae026a4f343a784f50', class: "wrap", role: this.readonly ? undefined : 'radiogroup' }, stars.map((s) => (h("span", { class: { star: true, filled: s <= this.value, clickable: !this.readonly }, onClick: () => !this.readonly && this.ratingChange.emit({ value: s }) }, "\u2605")))));
12
12
  }
13
13
  static get is() { return "recipe-rating"; }
14
14
  static get encapsulation() { return "shadow"; }
@@ -30,7 +30,7 @@ export class RecipeSearchBar {
30
30
  this.internalValue = newVal;
31
31
  }
32
32
  render() {
33
- return (h("div", { key: 'fe5eb2928308fb2496badd784e684b19df52501a', class: "wrap" }, h("input", { key: '3d4abb23a1155075a8889e015819b37a8569f6f5', type: "search", placeholder: this.placeholder, value: this.internalValue, onInput: this.onInput, onKeyDown: this.onKeyDown }), h("button", { key: 'f33f95b5bfcad9146903a2eb4448932a1d68edb7', onClick: () => this.search.emit({ value: this.internalValue }), "aria-label": "Search" }, "\uD83D\uDD0D")));
33
+ return (h("div", { key: 'eb622258d322ed13168a4e4da4f6fecc67c5e3ea', class: "wrap" }, h("input", { key: '5594cf8585234e21e4529a069ad9621631c9e103', type: "search", placeholder: this.placeholder, value: this.internalValue, onInput: this.onInput, onKeyDown: this.onKeyDown }), h("button", { key: '7540e7232d5071a65360c8196deda3461bfa8308', onClick: () => this.search.emit({ value: this.internalValue }), "aria-label": "Search" }, "\uD83D\uDD0D")));
34
34
  }
35
35
  static get is() { return "recipe-search-bar"; }
36
36
  static get encapsulation() { return "shadow"; }
@@ -1 +1 @@
1
- import{A as o,d as s}from"./p-BekLK-Pb.js";const p=o,r=s;export{p as AppToast,r as defineCustomElement}
1
+ import{A as o,d as s}from"./p-Bj2iIXUo.js";const p=o,r=s;export{p as AppToast,r as defineCustomElement}
@@ -1 +1 @@
1
- export{g as getAssetPath,r as render,s as setAssetPath,a as setNonce,b as setPlatformOptions}from"./p-BJU3HdRm.js";export{R as RecipeCard}from"./p-B4H61SFd.js";export{R as RecipeSearchBar}from"./p-COHQTgKC.js";export{R as RecipeFilterBar}from"./p-kbrkhGSm.js";export{R as RecipeRating}from"./p-BRKGu69u.js";export{R as RecipeForm}from"./p-DsyQvPDo.js";export{M as MealPlanDay}from"./p-BZBToMAv.js";export{A as AppModal}from"./p-Dp1sKtrN.js";export{A as AppToast}from"./p-BekLK-Pb.js";
1
+ export{g as getAssetPath,r as render,s as setAssetPath,a as setNonce,b as setPlatformOptions}from"./p-BJU3HdRm.js";export{R as RecipeCard}from"./p-Bi4G3e9f.js";export{R as RecipeSearchBar}from"./p-Xf30T5IO.js";export{R as RecipeFilterBar}from"./p-BqnbT3UL.js";export{R as RecipeRating}from"./p-BUu-OE2n.js";export{R as RecipeForm}from"./p-DXdnWxeM.js";export{M as MealPlanDay}from"./p-S4266va_.js";export{A as AppModal}from"./p-Dp1sKtrN.js";export{A as AppToast}from"./p-Bj2iIXUo.js";
@@ -1 +1 @@
1
- import{M as o,d as s}from"./p-BZBToMAv.js";const p=o,r=s;export{p as MealPlanDay,r as defineCustomElement}
1
+ import{M as o,d as s}from"./p-S4266va_.js";const a=o,p=s;export{a as MealPlanDay,p as defineCustomElement}
@@ -1 +1 @@
1
- import{t as s,p as t,H as e,c as i,h as a}from"./p-BJU3HdRm.js";const r=t(class extends e{constructor(s){super(),!1!==s&&this.__registerHost(),this.__attachShadow(),this.ratingChange=i(this,"ratingChange"),this.value=0,this.readonly=!1,this.max=5}render(){const s=Array.from({length:this.max},((s,t)=>t+1));return a("div",{key:"1e1c67012185e7aaecfcc89671532946262a6957",class:"wrap",role:this.readonly?void 0:"radiogroup"},s.map((s=>a("span",{class:{star:!0,filled:s<=this.value,clickable:!this.readonly},onClick:()=>!this.readonly&&this.ratingChange.emit({value:s})},"★"))))}static get style(){return":host{display:inline-block;font-family:system-ui, sans-serif}.wrap{display:flex;gap:2px}.star{font-size:18px;color:#ddd}.star.filled{color:#f5a623}.star.clickable{cursor:pointer}"}},[1,"recipe-rating",{value:[2],readonly:[4],max:[2]}]);function c(){"undefined"!=typeof customElements&&["recipe-rating"].forEach((t=>{"recipe-rating"===t&&(customElements.get(s(t))||customElements.define(s(t),r))}))}c();export{r as R,c as d}
1
+ import{t as s,p as t,H as e,c as i,h as a}from"./p-BJU3HdRm.js";const r=t(class extends e{constructor(s){super(),!1!==s&&this.__registerHost(),this.__attachShadow(),this.ratingChange=i(this,"ratingChange"),this.value=0,this.readonly=!1,this.max=5}render(){const s=Array.from({length:this.max},((s,t)=>t+1));return a("div",{key:"19cb1bd17a6dc207c7e556ae026a4f343a784f50",class:"wrap",role:this.readonly?void 0:"radiogroup"},s.map((s=>a("span",{class:{star:!0,filled:s<=this.value,clickable:!this.readonly},onClick:()=>!this.readonly&&this.ratingChange.emit({value:s})},"★"))))}static get style(){return":host{display:inline-block;font-family:system-ui, sans-serif}.wrap{display:flex;gap:2px}.star{font-size:18px;color:#ddd}.star.filled{color:#f5a623}.star.clickable{cursor:pointer}"}},[1,"recipe-rating",{value:[2],readonly:[4],max:[2]}]);function l(){"undefined"!=typeof customElements&&["recipe-rating"].forEach((t=>{"recipe-rating"===t&&(customElements.get(s(t))||customElements.define(s(t),r))}))}l();export{r as R,l as d}
@@ -1 +1 @@
1
- import{t as e,p as t,H as a,c as i,h as s}from"./p-BJU3HdRm.js";const r=t(class extends a{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.favoriteToggle=i(this,"favoriteToggle"),this.cardClick=i(this,"cardClick"),this.category="",this.favorite=!1,this.onFavoriteClick=e=>{e.stopPropagation(),this.favoriteToggle.emit({favorite:!this.favorite})}}render(){return s("div",{key:"abd19b1d63409b52cf66f348131f5f6f77bb47a6",class:"card",onClick:()=>this.cardClick.emit()},s("div",{key:"1292c3f6dfe7d3b399943004f764c41a3d072188",class:"image-wrap"},this.image?s("img",{src:this.image,alt:this.recipeTitle}):s("div",{class:"placeholder"}),s("button",{key:"0efdc01af349d011ca0e11c4df5438b79876b467",class:{"fav-btn":!0,active:this.favorite},onClick:this.onFavoriteClick,"aria-label":"Toggle favorite"},this.favorite?"★":"☆")),s("div",{key:"66c2c4d845d9cc082c07f24f5d827313f6ad51c4",class:"body"},s("h3",{key:"779fc629c3b97b6158f99440d9bb17fafb708dd3"},this.recipeTitle),this.category&&s("span",{key:"259ec599a43a5c8a279ad5993ba36f8602125b76",class:"category"},this.category),s("div",{key:"58ab20f9682b4b73b7d027571496641cbfa76d0b",class:"actions"},s("slot",{key:"28103422d993e58b133c2350e37c06fddf24300f",name:"actions"}))))}static get style(){return":host{display:block;font-family:system-ui, sans-serif}.card{border:1px solid #e5e5e5;border-radius:12px;overflow:hidden;cursor:pointer;background:#fff;transition:box-shadow 0.15s ease, transform 0.15s ease}.card:hover{box-shadow:0 4px 16px rgba(0, 0, 0, 0.08);transform:translateY(-2px)}.image-wrap{position:relative;aspect-ratio:4 / 3;background:#f2f2f2}.image-wrap img{width:100%;height:100%;object-fit:cover;display:block}.placeholder{width:100%;height:100%;background:linear-gradient(135deg, #eee, #ddd)}.fav-btn{position:absolute;top:8px;right:8px;border:none;background:rgba(255, 255, 255, 0.9);border-radius:50%;width:32px;height:32px;font-size:16px;cursor:pointer;color:#f5a623}.fav-btn.active{color:#ff6b35}.body{padding:12px 14px}h3{margin:0 0 4px;font-size:15px;line-height:1.3}.category{font-size:12px;color:#777;text-transform:uppercase;letter-spacing:0.03em}.actions{margin-top:8px}"}},[257,"recipe-card",{recipeTitle:[1,"recipe-title"],image:[1],category:[1],favorite:[4]}]);function o(){"undefined"!=typeof customElements&&["recipe-card"].forEach((t=>{"recipe-card"===t&&(customElements.get(e(t))||customElements.define(e(t),r))}))}o();export{r as R,o as d}
1
+ import{t as e,p as a,H as t,c as i,h as s}from"./p-BJU3HdRm.js";const r=a(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.favoriteToggle=i(this,"favoriteToggle"),this.cardClick=i(this,"cardClick"),this.category="",this.favorite=!1,this.onFavoriteClick=e=>{e.stopPropagation(),this.favoriteToggle.emit({favorite:!this.favorite})}}render(){return s("div",{key:"ab4f6e822f8b961d15c49d488af4e9b617ae71d2",class:"card",onClick:()=>this.cardClick.emit()},s("div",{key:"f57fc00e484283bd223f7e8557af7e76de33217e",class:"image-wrap"},this.image?s("img",{src:this.image,alt:this.recipeTitle}):s("div",{class:"placeholder"}),s("button",{key:"2f05b10aa6de8f6d51e0a216567a65900011a198",class:{"fav-btn":!0,active:this.favorite},onClick:this.onFavoriteClick,"aria-label":"Toggle favorite"},this.favorite?"★":"☆")),s("div",{key:"bb120c622bef2e7ae8abfedf31ba988a66d393c3",class:"body"},s("h3",{key:"2b0115c0ae28b302e35a00e0ed1a70d0b20712ab"},this.recipeTitle),this.category&&s("span",{key:"388a88c469547f04e7af2b1da0d303a28f499481",class:"category"},this.category),s("div",{key:"ff8e56f5a2ce08736ec9cef2a17bbcc2aad4b946",class:"actions"},s("slot",{key:"8952391cb6163493dc5ab27b690c4375ef535ac4",name:"actions"}))))}static get style(){return":host{display:block;font-family:system-ui, sans-serif}.card{border:1px solid #e5e5e5;border-radius:12px;overflow:hidden;cursor:pointer;background:#fff;transition:box-shadow 0.15s ease, transform 0.15s ease}.card:hover{box-shadow:0 4px 16px rgba(0, 0, 0, 0.08);transform:translateY(-2px)}.image-wrap{position:relative;aspect-ratio:4 / 3;background:#f2f2f2}.image-wrap img{width:100%;height:100%;object-fit:cover;display:block}.placeholder{width:100%;height:100%;background:linear-gradient(135deg, #eee, #ddd)}.fav-btn{position:absolute;top:8px;right:8px;border:none;background:rgba(255, 255, 255, 0.9);border-radius:50%;width:32px;height:32px;font-size:16px;cursor:pointer;color:#f5a623}.fav-btn.active{color:#ff6b35}.body{padding:12px 14px}h3{margin:0 0 4px;font-size:15px;line-height:1.3}.category{font-size:12px;color:#777;text-transform:uppercase;letter-spacing:0.03em}.actions{margin-top:8px}"}},[257,"recipe-card",{recipeTitle:[1,"recipe-title"],image:[1],category:[1],favorite:[4]}]);function o(){"undefined"!=typeof customElements&&["recipe-card"].forEach((a=>{"recipe-card"===a&&(customElements.get(e(a))||customElements.define(e(a),r))}))}o();export{r as R,o as d}
@@ -1 +1 @@
1
- import{t as s,p as t,H as e,c as o,h as a}from"./p-BJU3HdRm.js";const i=t(class extends e{constructor(s){super(),!1!==s&&this.__registerHost(),this.__attachShadow(),this.dismiss=o(this,"dismiss"),this.message="",this.type="info",this.duration=3e3}componentDidLoad(){this.duration>0&&setTimeout((()=>this.dismiss.emit()),this.duration)}render(){return a("div",{key:"d9dcb405ffd97bfa44fee10fe49103bd021938a2",class:`toast ${this.type}`},a("span",{key:"5fd291b9766dc41189f49c11c836654d6663c8d1"},this.message),a("button",{key:"9f93921f20b17520ce339378c5a1ca66ef6a04bc",onClick:()=>this.dismiss.emit(),"aria-label":"Dismiss"},"✕"))}static get style(){return":host{font-family:system-ui, sans-serif;display:block}.toast{display:flex;align-items:center;gap:10px;padding:10px 16px;border-radius:8px;color:#fff;font-size:14px;box-shadow:0 4px 12px rgba(0,0,0,0.15)}.toast.success{background:#2ecc71}.toast.error{background:#e74c3c}.toast.info{background:#3498db}button{border:none;background:none;color:inherit;cursor:pointer;margin-left:auto}"}},[1,"app-toast",{message:[1],type:[1],duration:[2]}]);function n(){"undefined"!=typeof customElements&&["app-toast"].forEach((t=>{"app-toast"===t&&(customElements.get(s(t))||customElements.define(s(t),i))}))}n();export{i as A,n as d}
1
+ import{t as s,p as t,H as e,c as a,h as o}from"./p-BJU3HdRm.js";const i=t(class extends e{constructor(s){super(),!1!==s&&this.__registerHost(),this.__attachShadow(),this.dismiss=a(this,"dismiss"),this.message="",this.type="info",this.duration=3e3}componentDidLoad(){this.duration>0&&setTimeout((()=>this.dismiss.emit()),this.duration)}render(){return o("div",{key:"73ab8ea44ad155052616ffbc424e1d8f13b8116f",class:`toast ${this.type}`},o("span",{key:"301487550c2f4f50cdcc6d0a138b9e968cde385f"},this.message),o("button",{key:"4e9de348002a397a25450142d9fa1fa07ca84d54",onClick:()=>this.dismiss.emit(),"aria-label":"Dismiss"},"✕"))}static get style(){return":host{font-family:system-ui, sans-serif;display:block}.toast{display:flex;align-items:center;gap:10px;padding:10px 16px;border-radius:8px;color:#fff;font-size:14px;box-shadow:0 4px 12px rgba(0,0,0,0.15)}.toast.success{background:#2ecc71}.toast.error{background:#e74c3c}.toast.info{background:#3498db}button{border:none;background:none;color:inherit;cursor:pointer;margin-left:auto}"}},[1,"app-toast",{message:[1],type:[1],duration:[2]}]);function n(){"undefined"!=typeof customElements&&["app-toast"].forEach((t=>{"app-toast"===t&&(customElements.get(s(t))||customElements.define(s(t),i))}))}n();export{i as A,n as d}
@@ -0,0 +1 @@
1
+ import{t as s,p as t,H as e,c as i,h as r}from"./p-BJU3HdRm.js";const a=t(class extends e{constructor(s){super(),!1!==s&&this.__registerHost(),this.__attachShadow(),this.filterChange=i(this,"filterChange"),this.categories=[],this.active=""}select(s){this.filterChange.emit({value:s})}render(){const s=Array.isArray(this.categories)?this.categories:[];return r("div",{key:"084a1e0d79a1916d07277e1c080ff779aba1aa79",class:"wrap"},r("button",{key:"f0b9b529d1dca7f98621404b174837b5b21163e7",class:{chip:!0,active:""===this.active},onClick:()=>this.select("")},"All"),s.map((s=>r("button",{class:{chip:!0,active:this.active===s},onClick:()=>this.select(s)},s))))}static get style(){return":host{display:block;font-family:system-ui, sans-serif}.wrap{display:flex;flex-wrap:wrap;gap:8px}.chip{border:1px solid #ddd;background:#fff;border-radius:999px;padding:6px 14px;font-size:13px;cursor:pointer;color:#444}.chip.active{background:#ff6b35;border-color:#ff6b35;color:#fff}"}},[1,"recipe-filter-bar",{categories:[16],active:[1]}]);function c(){"undefined"!=typeof customElements&&["recipe-filter-bar"].forEach((t=>{"recipe-filter-bar"===t&&(customElements.get(s(t))||customElements.define(s(t),a))}))}c();export{a as R,c as d}
@@ -1 +1 @@
1
- import{t as e,p as t,H as i,c as a,h as s}from"./p-BJU3HdRm.js";const n=t(class extends i{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.save=a(this,"save"),this.cancel=a(this,"cancel"),this.title="",this.image="",this.category="",this.ingredients=[""],this.instructions="",this.errors={},this.onSubmit=e=>{if(e.preventDefault(),!this.validate())return;const t={id:this.initialData?.id,title:this.title.trim(),image:this.image.trim(),category:this.category.trim(),ingredients:this.ingredients.map((e=>e.trim())).filter(Boolean),instructions:this.instructions.trim()};this.save.emit(t)},this.addIngredient=()=>{this.ingredients=[...this.ingredients,""]},this.removeIngredient=e=>{this.ingredients=this.ingredients.filter(((t,i)=>i!==e))}}componentWillLoad(){this.loadInitialData()}onInitialDataChange(){this.loadInitialData()}loadInitialData(){let e;if("string"==typeof this.initialData&&this.initialData)try{e=JSON.parse(this.initialData)}catch{e=void 0}else this.initialData&&"object"==typeof this.initialData&&(e=this.initialData);e&&(this.title=e.title??"",this.image=e.image??"",this.category=e.category??"",this.ingredients=e.ingredients?.length?[...e.ingredients]:[""],this.instructions=e.instructions??"")}validate(){const e={};return this.title.trim()||(e.title="Title is required."),0===this.ingredients.map((e=>e.trim())).filter(Boolean).length&&(e.ingredients="Add at least one ingredient."),this.instructions.trim()||(e.instructions="Instructions are required."),this.errors=e,0===Object.keys(e).length}updateIngredient(e,t){const i=[...this.ingredients];i[e]=t,this.ingredients=i}render(){return s("form",{key:"bb5c6c7f1b421b55515994f0256c5b39ea781632",onSubmit:this.onSubmit},s("slot",{key:"16940e4c8368aa6b546254ff8db7b28885a4409b",name:"header"}),s("label",{key:"7e3d6ba3231039ecdcca6a4c4314cf27038e1732"},"Title",s("input",{key:"f86056de021f040b8bbf3bf67a0d40ba526ad754",type:"text",value:this.title,onInput:e=>this.title=e.target.value}),this.errors.title&&s("span",{key:"54d552a15e037f54b2c6f0fd13cb4b685c25c76c",class:"error"},this.errors.title)),s("label",{key:"376da4904e7919b5540ee8dabf494f6aab053523"},"Image URL",s("input",{key:"761b64f0e5153ca0e2bf61a7db4c4106ae2f79ef",type:"text",value:this.image,onInput:e=>this.image=e.target.value})),s("label",{key:"0b7ff19b8718540b08921bb7f301be5cacf0df36"},"Category",s("input",{key:"4f1bae8316d588e93006a12e0d824579ddbece43",type:"text",value:this.category,onInput:e=>this.category=e.target.value})),s("div",{key:"280d98b91621defa547dbcc35c0cb6da55a67b5f",class:"field"},s("span",{key:"96a015e055b434441eba85dcb89470823d0ebcc8"},"Ingredients"),this.ingredients.map(((e,t)=>s("div",{class:"ingredient-row"},s("input",{type:"text",value:e,onInput:e=>this.updateIngredient(t,e.target.value)}),s("button",{type:"button",onClick:()=>this.removeIngredient(t),"aria-label":"Remove"},"✕")))),s("button",{key:"697cda22eb5bdf42e50ac40669619fbc04140405",type:"button",class:"add-btn",onClick:this.addIngredient},"+ Add ingredient"),this.errors.ingredients&&s("span",{key:"6a46c393bdd9af8e1e1255792d5532daf433f25b",class:"error"},this.errors.ingredients)),s("label",{key:"6abdbe72d381c3a0a56c46560a92b1e533fcce2a"},"Instructions",s("textarea",{key:"1d3b62d6543e42a4cd0755522f657c13e2d1e4a7",rows:5,onInput:e=>this.instructions=e.target.value},this.instructions),this.errors.instructions&&s("span",{key:"b5845bb5cd0ddd40de21f074307513d376a05f56",class:"error"},this.errors.instructions)),s("div",{key:"778adeff176e2d2b080aad59602db6e92a69ea1c",class:"footer"},s("slot",{key:"c9584d6606ed33f616eb8f3035aa4a0fd5086af3",name:"footer"}),s("button",{key:"b2e17dfb528996a1e6a8a1f8aac36b36e3b07c3a",type:"button",class:"cancel-btn",onClick:()=>this.cancel.emit()},"Cancel"),s("button",{key:"a9e91907aa44c8587a2c492f869d0cb5daa942fe",type:"submit",class:"save-btn"},"Save Recipe")))}static get watchers(){return{initialData:[{onInitialDataChange:0}]}}static get style(){return":host{display:block;font-family:system-ui, sans-serif}form{display:flex;flex-direction:column;gap:14px}label{display:flex;flex-direction:column;gap:4px;font-size:13px;color:#333;font-weight:600}input,textarea{font-weight:400;padding:8px 10px;border:1px solid #ddd;border-radius:6px;font-size:14px;font-family:inherit}.field{display:flex;flex-direction:column;gap:6px;font-size:13px;font-weight:600}.ingredient-row{display:flex;gap:6px}.ingredient-row input{flex:1}.ingredient-row button{border:none;background:#f4f4f4;border-radius:6px;cursor:pointer;width:30px}.add-btn{align-self:flex-start;border:1px dashed #bbb;background:none;border-radius:6px;padding:6px 10px;cursor:pointer;font-size:13px;color:#555}.error{color:#e74c3c;font-size:12px;font-weight:400}.footer{display:flex;justify-content:flex-end;gap:10px;margin-top:6px}.cancel-btn{border:1px solid #ddd;background:#fff;border-radius:8px;padding:8px 16px;cursor:pointer}.save-btn{border:none;background:#ff6b35;color:#fff;border-radius:8px;padding:8px 18px;cursor:pointer;font-weight:600}"}},[257,"recipe-form",{initialData:[1,"initial-data"],title:[32],image:[32],category:[32],ingredients:[32],instructions:[32],errors:[32]},void 0,{initialData:[{onInitialDataChange:0}]}]);function d(){"undefined"!=typeof customElements&&["recipe-form"].forEach((t=>{"recipe-form"===t&&(customElements.get(e(t))||customElements.define(e(t),n))}))}d();export{n as R,d}
1
+ import{t as e,p as t,H as i,c as a,h as s}from"./p-BJU3HdRm.js";const n=t(class extends i{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.save=a(this,"save"),this.cancel=a(this,"cancel"),this.title="",this.image="",this.category="",this.ingredients=[""],this.instructions="",this.errors={},this.onSubmit=e=>{if(e.preventDefault(),!this.validate())return;const t={id:this.initialData?.id,title:this.title.trim(),image:this.image.trim(),category:this.category.trim(),ingredients:this.ingredients.map((e=>e.trim())).filter(Boolean),instructions:this.instructions.trim()};this.save.emit(t)},this.addIngredient=()=>{this.ingredients=[...this.ingredients,""]},this.removeIngredient=e=>{this.ingredients=this.ingredients.filter(((t,i)=>i!==e))}}componentWillLoad(){this.loadInitialData()}onInitialDataChange(){this.loadInitialData()}loadInitialData(){let e;if("string"==typeof this.initialData&&this.initialData)try{e=JSON.parse(this.initialData)}catch{e=void 0}else this.initialData&&"object"==typeof this.initialData&&(e=this.initialData);e&&(this.title=e.title??"",this.image=e.image??"",this.category=e.category??"",this.ingredients=e.ingredients?.length?[...e.ingredients]:[""],this.instructions=e.instructions??"")}validate(){const e={};return this.title.trim()||(e.title="Title is required."),0===this.ingredients.map((e=>e.trim())).filter(Boolean).length&&(e.ingredients="Add at least one ingredient."),this.instructions.trim()||(e.instructions="Instructions are required."),this.errors=e,0===Object.keys(e).length}updateIngredient(e,t){const i=[...this.ingredients];i[e]=t,this.ingredients=i}render(){return s("form",{key:"6699f62ff8027114e5a0e3d154f8743048cf4d96",onSubmit:this.onSubmit},s("slot",{key:"8de0f7e758feb4fc6f1ea877c4acd7c41cbe13ed",name:"header"}),s("label",{key:"881275928734c4eabfee6d22b35cddad1af03853"},"Title",s("input",{key:"a55ae352c35cec0b2391061d48153151a7dc5e6b",type:"text",value:this.title,onInput:e=>this.title=e.target.value}),this.errors.title&&s("span",{key:"dbace66ddaab5ab5096acb39822c7cd3a18923be",class:"error"},this.errors.title)),s("label",{key:"ae1bcdb323ccaa03307b6a283fcc395ef49954c5"},"Image URL",s("input",{key:"6ee9483689e0304c0ae28ab755dc93e117d4952e",type:"text",value:this.image,onInput:e=>this.image=e.target.value})),s("label",{key:"751b54959a8e2c85e98f2b192a4d8aa83d8ebafe"},"Category",s("input",{key:"83f852c74727b86a1a8a6c9a0d93e9ffdb3f33f3",type:"text",value:this.category,onInput:e=>this.category=e.target.value})),s("div",{key:"6a7c99a86d601ed51ece26c85b4b45766a2dafdf",class:"field"},s("span",{key:"ee082917bb3b90ec45ce1feea234c374f7fc35a0"},"Ingredients"),this.ingredients.map(((e,t)=>s("div",{class:"ingredient-row"},s("input",{type:"text",value:e,onInput:e=>this.updateIngredient(t,e.target.value)}),s("button",{type:"button",onClick:()=>this.removeIngredient(t),"aria-label":"Remove"},"✕")))),s("button",{key:"4f81107c94bf8810dfc14aa58d5afcf55d8e126d",type:"button",class:"add-btn",onClick:this.addIngredient},"+ Add ingredient"),this.errors.ingredients&&s("span",{key:"d87cc375b194c187b64def1ef9840797dab1d456",class:"error"},this.errors.ingredients)),s("label",{key:"dc6c04a5a2b5cc7d1912f535b8904125ce74af56"},"Instructions",s("textarea",{key:"0c9c4b09da5b3f24addb66c18fccad7c900bebcb",rows:5,onInput:e=>this.instructions=e.target.value},this.instructions),this.errors.instructions&&s("span",{key:"f430772f46e5298b2a2522aaef2822a59df61a08",class:"error"},this.errors.instructions)),s("div",{key:"337abce7c4f93a9fbb90917e6b407dfb5b95039d",class:"footer"},s("slot",{key:"b8b610485f592592afb6cef682faeb13d52da6ea",name:"footer"}),s("button",{key:"faf249c9be390b5d574300d0ff24bcd0c5603a3c",type:"button",class:"cancel-btn",onClick:()=>this.cancel.emit()},"Cancel"),s("button",{key:"527146d147778940c28e5357c100d1809cbcd6df",type:"submit",class:"save-btn"},"Save Recipe")))}static get watchers(){return{initialData:[{onInitialDataChange:0}]}}static get style(){return":host{display:block;font-family:system-ui, sans-serif}form{display:flex;flex-direction:column;gap:14px}label{display:flex;flex-direction:column;gap:4px;font-size:13px;color:#333;font-weight:600}input,textarea{font-weight:400;padding:8px 10px;border:1px solid #ddd;border-radius:6px;font-size:14px;font-family:inherit}.field{display:flex;flex-direction:column;gap:6px;font-size:13px;font-weight:600}.ingredient-row{display:flex;gap:6px}.ingredient-row input{flex:1}.ingredient-row button{border:none;background:#f4f4f4;border-radius:6px;cursor:pointer;width:30px}.add-btn{align-self:flex-start;border:1px dashed #bbb;background:none;border-radius:6px;padding:6px 10px;cursor:pointer;font-size:13px;color:#555}.error{color:#e74c3c;font-size:12px;font-weight:400}.footer{display:flex;justify-content:flex-end;gap:10px;margin-top:6px}.cancel-btn{border:1px solid #ddd;background:#fff;border-radius:8px;padding:8px 16px;cursor:pointer}.save-btn{border:none;background:#ff6b35;color:#fff;border-radius:8px;padding:8px 18px;cursor:pointer;font-weight:600}"}},[257,"recipe-form",{initialData:[1,"initial-data"],title:[32],image:[32],category:[32],ingredients:[32],instructions:[32],errors:[32]},void 0,{initialData:[{onInitialDataChange:0}]}]);function d(){"undefined"!=typeof customElements&&["recipe-form"].forEach((t=>{"recipe-form"===t&&(customElements.get(e(t))||customElements.define(e(t),n))}))}d();export{n as R,d}
@@ -0,0 +1 @@
1
+ import{t as e,p as a,H as o,c as s,h as t}from"./p-BJU3HdRm.js";const i=a(class extends o{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.assignMeal=s(this,"assignMeal"),this.removeMeal=s(this,"removeMeal"),this.day="",this.meals=[],this.icon=""}render(){const e=Array.isArray(this.meals)?this.meals:[];return t("div",{key:"cd4f194f1eeb5f53a029f380c40aa0b4ec2f32f4",class:"day-col"},t("div",{key:"d88966142d5101fc522d5de89b6d4cab72cbbbf3",class:"col-header"},this.icon&&t("span",{key:"5a9a27a3a1909bcf7295ec7eeccf309e5e2d1ae0",class:"icon"},this.icon),t("h3",{key:"fd1fa2f1274cc1f6bd8917959015722cb69002ba"},this.day),e.length>0&&t("span",{key:"feff3bc91b52203dba19f7a87c56d3813fc95cdd",class:"count-badge"},e.length)),t("div",{key:"4afee9ce77bf1447bf9e32efc7e2f9b9571873e7",class:"meals"},e.map((e=>t("div",{class:"meal-chip"},t("div",{class:"thumb"},e.image&&t("img",{src:e.image,alt:e.title})),t("span",{class:"title"},e.title),t("button",{class:"remove-btn",onClick:()=>this.removeMeal.emit({day:this.day,mealId:e.id}),"aria-label":`Remove ${e.title}`},"✕")))),0===e.length&&t("p",{key:"9a4002b1b4516fc5ff6ef8f9a2e0a7f5e8465cbd",class:"empty"},"No meal planned")),t("button",{key:"2cef3c5f7d0e89303cb8989f78eefb95c426683f",class:"add-btn",onClick:()=>this.assignMeal.emit({day:this.day})},t("span",{key:"ae54b56f8f0b01f45029e36919764ae31f3a38b9",class:"plus"},"+")," Add meal"))}static get style(){return":host{display:block;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif}.day-col{background:#ffffff;border:1px solid #e8eaed;border-radius:12px;padding:14px;min-width:160px;display:flex;flex-direction:column;gap:10px;box-shadow:0 1px 2px rgba(16, 24, 40, 0.04);transition:box-shadow 0.15s ease, border-color 0.15s ease}.day-col:hover{box-shadow:0 4px 12px rgba(16, 24, 40, 0.08);border-color:#d8dce1}.col-header{display:flex;align-items:center;gap:6px;padding-bottom:8px;border-bottom:1px solid #f0f1f3}.col-header .icon{font-size:15px;line-height:1}.col-header h3{margin:0;font-size:12.5px;font-weight:700;text-transform:uppercase;letter-spacing:0.05em;color:#4b5563;flex:1}.count-badge{background:#eef2ff;color:#4338ca;font-size:10.5px;font-weight:700;padding:1px 7px;border-radius:999px;line-height:1.5}.meals{display:flex;flex-direction:column;gap:6px;min-height:44px}.meal-chip{display:flex;align-items:center;gap:8px;background:#f9fafb;border:1px solid #eef0f2;border-radius:9px;padding:6px 8px;font-size:12.5px;transition:background 0.12s ease}.meal-chip:hover{background:#f3f4f6}.thumb{width:28px;height:28px;border-radius:6px;overflow:hidden;flex-shrink:0;background:#e5e7eb}.thumb img{width:100%;height:100%;object-fit:cover;display:block}.meal-chip .title{flex:1;color:#1f2937;font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.remove-btn{border:none;background:none;cursor:pointer;color:#9ca3af;font-size:11px;line-height:1;padding:3px;border-radius:5px;transition:color 0.12s ease, background 0.12s ease}.remove-btn:hover{color:#dc2626;background:#fef2f2}.empty{font-size:12px;color:#9ca3af;margin:6px 0;text-align:center;font-style:italic}.add-btn{display:flex;align-items:center;justify-content:center;gap:4px;border:1.5px dashed #d1d5db;background:none;border-radius:9px;padding:7px;font-size:12px;font-weight:600;cursor:pointer;color:#6b7280;transition:border-color 0.12s ease, color 0.12s ease, background 0.12s ease}.add-btn:hover{border-color:#6366f1;color:#4f46e5;background:#f5f5ff}.plus{font-size:14px;line-height:1}"}},[1,"meal-plan-day",{day:[1],meals:[16],icon:[1]}]);function d(){"undefined"!=typeof customElements&&["meal-plan-day"].forEach((a=>{"meal-plan-day"===a&&(customElements.get(e(a))||customElements.define(e(a),i))}))}d();export{i as M,d}
@@ -1 +1 @@
1
- import{t as e,p as t,H as s,c as a,h as i}from"./p-BJU3HdRm.js";const r=t(class extends s{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.search=a(this,"search"),this.placeholder="Search recipes...",this.value="",this.debounceMs=350,this.internalValue="",this.onInput=e=>{this.internalValue=e.target.value,clearTimeout(this.timer),this.timer=setTimeout((()=>{this.search.emit({value:this.internalValue})}),this.debounceMs)},this.onKeyDown=e=>{"Enter"===e.key&&(clearTimeout(this.timer),this.search.emit({value:this.internalValue}))}}componentWillLoad(){this.internalValue=this.value}onValuePropChange(e){this.internalValue=e}render(){return i("div",{key:"fe5eb2928308fb2496badd784e684b19df52501a",class:"wrap"},i("input",{key:"3d4abb23a1155075a8889e015819b37a8569f6f5",type:"search",placeholder:this.placeholder,value:this.internalValue,onInput:this.onInput,onKeyDown:this.onKeyDown}),i("button",{key:"f33f95b5bfcad9146903a2eb4448932a1d68edb7",onClick:()=>this.search.emit({value:this.internalValue}),"aria-label":"Search"},"🔍"))}static get watchers(){return{value:[{onValuePropChange:0}]}}static get style(){return":host{display:block;font-family:system-ui, sans-serif}.wrap{display:flex;gap:6px}input{flex:1;padding:10px 14px;border-radius:8px;border:1px solid #ddd;font-size:14px;outline:none}input:focus{border-color:#ff6b35}button{border:none;background:#ff6b35;color:#fff;border-radius:8px;padding:0 16px;cursor:pointer;font-size:15px}"}},[1,"recipe-search-bar",{placeholder:[1],value:[1],debounceMs:[2,"debounce-ms"],internalValue:[32]},void 0,{value:[{onValuePropChange:0}]}]);function o(){"undefined"!=typeof customElements&&["recipe-search-bar"].forEach((t=>{"recipe-search-bar"===t&&(customElements.get(e(t))||customElements.define(e(t),r))}))}o();export{r as R,o as d}
1
+ import{t as e,p as t,H as s,c as a,h as i}from"./p-BJU3HdRm.js";const r=t(class extends s{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.search=a(this,"search"),this.placeholder="Search recipes...",this.value="",this.debounceMs=350,this.internalValue="",this.onInput=e=>{this.internalValue=e.target.value,clearTimeout(this.timer),this.timer=setTimeout((()=>{this.search.emit({value:this.internalValue})}),this.debounceMs)},this.onKeyDown=e=>{"Enter"===e.key&&(clearTimeout(this.timer),this.search.emit({value:this.internalValue}))}}componentWillLoad(){this.internalValue=this.value}onValuePropChange(e){this.internalValue=e}render(){return i("div",{key:"eb622258d322ed13168a4e4da4f6fecc67c5e3ea",class:"wrap"},i("input",{key:"5594cf8585234e21e4529a069ad9621631c9e103",type:"search",placeholder:this.placeholder,value:this.internalValue,onInput:this.onInput,onKeyDown:this.onKeyDown}),i("button",{key:"7540e7232d5071a65360c8196deda3461bfa8308",onClick:()=>this.search.emit({value:this.internalValue}),"aria-label":"Search"},"🔍"))}static get watchers(){return{value:[{onValuePropChange:0}]}}static get style(){return":host{display:block;font-family:system-ui, sans-serif}.wrap{display:flex;gap:6px}input{flex:1;padding:10px 14px;border-radius:8px;border:1px solid #ddd;font-size:14px;outline:none}input:focus{border-color:#ff6b35}button{border:none;background:#ff6b35;color:#fff;border-radius:8px;padding:0 16px;cursor:pointer;font-size:15px}"}},[1,"recipe-search-bar",{placeholder:[1],value:[1],debounceMs:[2,"debounce-ms"],internalValue:[32]},void 0,{value:[{onValuePropChange:0}]}]);function o(){"undefined"!=typeof customElements&&["recipe-search-bar"].forEach((t=>{"recipe-search-bar"===t&&(customElements.get(e(t))||customElements.define(e(t),r))}))}o();export{r as R,o as d}
@@ -1 +1 @@
1
- import{R as o,d as s}from"./p-B4H61SFd.js";const p=o,r=s;export{p as RecipeCard,r as defineCustomElement}
1
+ import{R as o,d as s}from"./p-Bi4G3e9f.js";const p=o,r=s;export{p as RecipeCard,r as defineCustomElement}
@@ -1 +1 @@
1
- import{R as o,d as r}from"./p-kbrkhGSm.js";const s=o,m=r;export{s as RecipeFilterBar,m as defineCustomElement}
1
+ import{R as o,d as s}from"./p-BqnbT3UL.js";const p=o,r=s;export{p as RecipeFilterBar,r as defineCustomElement}
@@ -1 +1 @@
1
- import{R as o,d as s}from"./p-DsyQvPDo.js";const p=o,r=s;export{p as RecipeForm,r as defineCustomElement}
1
+ import{R as o,d as s}from"./p-DXdnWxeM.js";const p=o,r=s;export{p as RecipeForm,r as defineCustomElement}
@@ -1 +1 @@
1
- import{R as o,d as s}from"./p-BRKGu69u.js";const p=o,r=s;export{p as RecipeRating,r as defineCustomElement}
1
+ import{R as o,d as s}from"./p-BUu-OE2n.js";const p=o,r=s;export{p as RecipeRating,r as defineCustomElement}
@@ -1 +1 @@
1
- import{R as o,d as s}from"./p-COHQTgKC.js";const p=o,r=s;export{p as RecipeSearchBar,r as defineCustomElement}
1
+ import{R as o,d as s}from"./p-Xf30T5IO.js";const p=o,r=s;export{p as RecipeSearchBar,r as defineCustomElement}
@@ -17,7 +17,7 @@ const RecipeCard = class {
17
17
  };
18
18
  }
19
19
  render() {
20
- return (h("div", { key: 'abd19b1d63409b52cf66f348131f5f6f77bb47a6', class: "card", onClick: () => this.cardClick.emit() }, h("div", { key: '1292c3f6dfe7d3b399943004f764c41a3d072188', class: "image-wrap" }, this.image ? h("img", { src: this.image, alt: this.recipeTitle }) : h("div", { class: "placeholder" }), h("button", { key: '0efdc01af349d011ca0e11c4df5438b79876b467', class: { 'fav-btn': true, active: this.favorite }, onClick: this.onFavoriteClick, "aria-label": "Toggle favorite" }, this.favorite ? '★' : '☆')), h("div", { key: '66c2c4d845d9cc082c07f24f5d827313f6ad51c4', class: "body" }, h("h3", { key: '779fc629c3b97b6158f99440d9bb17fafb708dd3' }, this.recipeTitle), this.category && h("span", { key: '259ec599a43a5c8a279ad5993ba36f8602125b76', class: "category" }, this.category), h("div", { key: '58ab20f9682b4b73b7d027571496641cbfa76d0b', class: "actions" }, h("slot", { key: '28103422d993e58b133c2350e37c06fddf24300f', name: "actions" })))));
20
+ return (h("div", { key: 'ab4f6e822f8b961d15c49d488af4e9b617ae71d2', class: "card", onClick: () => this.cardClick.emit() }, h("div", { key: 'f57fc00e484283bd223f7e8557af7e76de33217e', class: "image-wrap" }, this.image ? h("img", { src: this.image, alt: this.recipeTitle }) : h("div", { class: "placeholder" }), h("button", { key: '2f05b10aa6de8f6d51e0a216567a65900011a198', class: { 'fav-btn': true, active: this.favorite }, onClick: this.onFavoriteClick, "aria-label": "Toggle favorite" }, this.favorite ? '★' : '☆')), h("div", { key: 'bb120c622bef2e7ae8abfedf31ba988a66d393c3', class: "body" }, h("h3", { key: '2b0115c0ae28b302e35a00e0ed1a70d0b20712ab' }, this.recipeTitle), this.category && h("span", { key: '388a88c469547f04e7af2b1da0d303a28f499481', class: "category" }, this.category), h("div", { key: 'ff8e56f5a2ce08736ec9cef2a17bbcc2aad4b946', class: "actions" }, h("slot", { key: '8952391cb6163493dc5ab27b690c4375ef535ac4', name: "actions" })))));
21
21
  }
22
22
  };
23
23
  RecipeCard.style = recipeCardCss();
@@ -53,7 +53,7 @@ const RecipeSearchBar = class {
53
53
  this.internalValue = newVal;
54
54
  }
55
55
  render() {
56
- return (h("div", { key: 'fe5eb2928308fb2496badd784e684b19df52501a', class: "wrap" }, h("input", { key: '3d4abb23a1155075a8889e015819b37a8569f6f5', type: "search", placeholder: this.placeholder, value: this.internalValue, onInput: this.onInput, onKeyDown: this.onKeyDown }), h("button", { key: 'f33f95b5bfcad9146903a2eb4448932a1d68edb7', onClick: () => this.search.emit({ value: this.internalValue }), "aria-label": "Search" }, "\uD83D\uDD0D")));
56
+ return (h("div", { key: 'eb622258d322ed13168a4e4da4f6fecc67c5e3ea', class: "wrap" }, h("input", { key: '5594cf8585234e21e4529a069ad9621631c9e103', type: "search", placeholder: this.placeholder, value: this.internalValue, onInput: this.onInput, onKeyDown: this.onKeyDown }), h("button", { key: '7540e7232d5071a65360c8196deda3461bfa8308', onClick: () => this.search.emit({ value: this.internalValue }), "aria-label": "Search" }, "\uD83D\uDD0D")));
57
57
  }
58
58
  static get watchers() { return {
59
59
  "value": [{
@@ -77,7 +77,7 @@ const RecipeFilterBar = class {
77
77
  }
78
78
  render() {
79
79
  const cats = Array.isArray(this.categories) ? this.categories : [];
80
- return (h("div", { key: '13bc63f39ebfc55c0f05c035b63036121f7b3930', class: "wrap" }, h("button", { key: '8aeb99775268204433a8f9831eca9873066c7b9e', class: { chip: true, active: this.active === '' }, onClick: () => this.select('') }, "All"), cats.map((c) => (h("button", { class: { chip: true, active: this.active === c }, onClick: () => this.select(c) }, c)))));
80
+ return (h("div", { key: '084a1e0d79a1916d07277e1c080ff779aba1aa79', class: "wrap" }, h("button", { key: 'f0b9b529d1dca7f98621404b174837b5b21163e7', class: { chip: true, active: this.active === '' }, onClick: () => this.select('') }, "All"), cats.map((c) => (h("button", { class: { chip: true, active: this.active === c }, onClick: () => this.select(c) }, c)))));
81
81
  }
82
82
  };
83
83
  RecipeFilterBar.style = recipeFilterBarCss();
@@ -94,7 +94,7 @@ const RecipeRating = class {
94
94
  }
95
95
  render() {
96
96
  const stars = Array.from({ length: this.max }, (_, i) => i + 1);
97
- return (h("div", { key: '1e1c67012185e7aaecfcc89671532946262a6957', class: "wrap", role: this.readonly ? undefined : 'radiogroup' }, stars.map((s) => (h("span", { class: { star: true, filled: s <= this.value, clickable: !this.readonly }, onClick: () => !this.readonly && this.ratingChange.emit({ value: s }) }, "\u2605")))));
97
+ return (h("div", { key: '19cb1bd17a6dc207c7e556ae026a4f343a784f50', class: "wrap", role: this.readonly ? undefined : 'radiogroup' }, stars.map((s) => (h("span", { class: { star: true, filled: s <= this.value, clickable: !this.readonly }, onClick: () => !this.readonly && this.ratingChange.emit({ value: s }) }, "\u2605")))));
98
98
  }
99
99
  };
100
100
  RecipeRating.style = recipeRatingCss();
@@ -178,7 +178,7 @@ const RecipeForm = class {
178
178
  this.ingredients = next;
179
179
  }
180
180
  render() {
181
- return (h("form", { key: 'bb5c6c7f1b421b55515994f0256c5b39ea781632', onSubmit: this.onSubmit }, h("slot", { key: '16940e4c8368aa6b546254ff8db7b28885a4409b', name: "header" }), h("label", { key: '7e3d6ba3231039ecdcca6a4c4314cf27038e1732' }, "Title", h("input", { key: 'f86056de021f040b8bbf3bf67a0d40ba526ad754', type: "text", value: this.title, onInput: (e) => (this.title = e.target.value) }), this.errors.title && h("span", { key: '54d552a15e037f54b2c6f0fd13cb4b685c25c76c', class: "error" }, this.errors.title)), h("label", { key: '376da4904e7919b5540ee8dabf494f6aab053523' }, "Image URL", h("input", { key: '761b64f0e5153ca0e2bf61a7db4c4106ae2f79ef', type: "text", value: this.image, onInput: (e) => (this.image = e.target.value) })), h("label", { key: '0b7ff19b8718540b08921bb7f301be5cacf0df36' }, "Category", h("input", { key: '4f1bae8316d588e93006a12e0d824579ddbece43', type: "text", value: this.category, onInput: (e) => (this.category = e.target.value) })), h("div", { key: '280d98b91621defa547dbcc35c0cb6da55a67b5f', class: "field" }, h("span", { key: '96a015e055b434441eba85dcb89470823d0ebcc8' }, "Ingredients"), this.ingredients.map((ing, i) => (h("div", { class: "ingredient-row" }, h("input", { type: "text", value: ing, onInput: (e) => this.updateIngredient(i, e.target.value) }), h("button", { type: "button", onClick: () => this.removeIngredient(i), "aria-label": "Remove" }, "\u2715")))), h("button", { key: '697cda22eb5bdf42e50ac40669619fbc04140405', type: "button", class: "add-btn", onClick: this.addIngredient }, "+ Add ingredient"), this.errors.ingredients && h("span", { key: '6a46c393bdd9af8e1e1255792d5532daf433f25b', class: "error" }, this.errors.ingredients)), h("label", { key: '6abdbe72d381c3a0a56c46560a92b1e533fcce2a' }, "Instructions", h("textarea", { key: '1d3b62d6543e42a4cd0755522f657c13e2d1e4a7', rows: 5, onInput: (e) => (this.instructions = e.target.value) }, this.instructions), this.errors.instructions && h("span", { key: 'b5845bb5cd0ddd40de21f074307513d376a05f56', class: "error" }, this.errors.instructions)), h("div", { key: '778adeff176e2d2b080aad59602db6e92a69ea1c', class: "footer" }, h("slot", { key: 'c9584d6606ed33f616eb8f3035aa4a0fd5086af3', name: "footer" }), h("button", { key: 'b2e17dfb528996a1e6a8a1f8aac36b36e3b07c3a', type: "button", class: "cancel-btn", onClick: () => this.cancel.emit() }, "Cancel"), h("button", { key: 'a9e91907aa44c8587a2c492f869d0cb5daa942fe', type: "submit", class: "save-btn" }, "Save Recipe"))));
181
+ return (h("form", { key: '6699f62ff8027114e5a0e3d154f8743048cf4d96', onSubmit: this.onSubmit }, h("slot", { key: '8de0f7e758feb4fc6f1ea877c4acd7c41cbe13ed', name: "header" }), h("label", { key: '881275928734c4eabfee6d22b35cddad1af03853' }, "Title", h("input", { key: 'a55ae352c35cec0b2391061d48153151a7dc5e6b', type: "text", value: this.title, onInput: (e) => (this.title = e.target.value) }), this.errors.title && h("span", { key: 'dbace66ddaab5ab5096acb39822c7cd3a18923be', class: "error" }, this.errors.title)), h("label", { key: 'ae1bcdb323ccaa03307b6a283fcc395ef49954c5' }, "Image URL", h("input", { key: '6ee9483689e0304c0ae28ab755dc93e117d4952e', type: "text", value: this.image, onInput: (e) => (this.image = e.target.value) })), h("label", { key: '751b54959a8e2c85e98f2b192a4d8aa83d8ebafe' }, "Category", h("input", { key: '83f852c74727b86a1a8a6c9a0d93e9ffdb3f33f3', type: "text", value: this.category, onInput: (e) => (this.category = e.target.value) })), h("div", { key: '6a7c99a86d601ed51ece26c85b4b45766a2dafdf', class: "field" }, h("span", { key: 'ee082917bb3b90ec45ce1feea234c374f7fc35a0' }, "Ingredients"), this.ingredients.map((ing, i) => (h("div", { class: "ingredient-row" }, h("input", { type: "text", value: ing, onInput: (e) => this.updateIngredient(i, e.target.value) }), h("button", { type: "button", onClick: () => this.removeIngredient(i), "aria-label": "Remove" }, "\u2715")))), h("button", { key: '4f81107c94bf8810dfc14aa58d5afcf55d8e126d', type: "button", class: "add-btn", onClick: this.addIngredient }, "+ Add ingredient"), this.errors.ingredients && h("span", { key: 'd87cc375b194c187b64def1ef9840797dab1d456', class: "error" }, this.errors.ingredients)), h("label", { key: 'dc6c04a5a2b5cc7d1912f535b8904125ce74af56' }, "Instructions", h("textarea", { key: '0c9c4b09da5b3f24addb66c18fccad7c900bebcb', rows: 5, onInput: (e) => (this.instructions = e.target.value) }, this.instructions), this.errors.instructions && h("span", { key: 'f430772f46e5298b2a2522aaef2822a59df61a08', class: "error" }, this.errors.instructions)), h("div", { key: '337abce7c4f93a9fbb90917e6b407dfb5b95039d', class: "footer" }, h("slot", { key: 'b8b610485f592592afb6cef682faeb13d52da6ea', name: "footer" }), h("button", { key: 'faf249c9be390b5d574300d0ff24bcd0c5603a3c', type: "button", class: "cancel-btn", onClick: () => this.cancel.emit() }, "Cancel"), h("button", { key: '527146d147778940c28e5357c100d1809cbcd6df', type: "submit", class: "save-btn" }, "Save Recipe"))));
182
182
  }
183
183
  static get watchers() { return {
184
184
  "initialData": [{
@@ -188,7 +188,7 @@ const RecipeForm = class {
188
188
  };
189
189
  RecipeForm.style = recipeFormCss();
190
190
 
191
- const mealPlanDayCss = () => `:host{display:block;font-family:system-ui, sans-serif}.day-col{border:1px solid #eee;border-radius:10px;padding:10px;min-width:150px;display:flex;flex-direction:column;gap:8px;background:#fafafa}h3{margin:0;font-size:13px;text-transform:uppercase;letter-spacing:0.04em;color:#555}.meals{display:flex;flex-direction:column;gap:6px;min-height:40px}.meal-chip{display:flex;align-items:center;gap:6px;background:#fff;border:1px solid #eee;border-radius:8px;padding:4px 6px;font-size:12px}.meal-chip img{width:24px;height:24px;border-radius:4px;object-fit:cover}.meal-chip .title{flex:1}.meal-chip button{border:none;background:none;cursor:pointer;color:#999}.empty{font-size:12px;color:#aaa;margin:4px 0}.add-btn{border:1px dashed #ccc;background:none;border-radius:8px;padding:6px;font-size:12px;cursor:pointer;color:#666}`;
191
+ const mealPlanDayCss = () => `:host{display:block;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif}.day-col{background:#ffffff;border:1px solid #e8eaed;border-radius:12px;padding:14px;min-width:160px;display:flex;flex-direction:column;gap:10px;box-shadow:0 1px 2px rgba(16, 24, 40, 0.04);transition:box-shadow 0.15s ease, border-color 0.15s ease}.day-col:hover{box-shadow:0 4px 12px rgba(16, 24, 40, 0.08);border-color:#d8dce1}.col-header{display:flex;align-items:center;gap:6px;padding-bottom:8px;border-bottom:1px solid #f0f1f3}.col-header .icon{font-size:15px;line-height:1}.col-header h3{margin:0;font-size:12.5px;font-weight:700;text-transform:uppercase;letter-spacing:0.05em;color:#4b5563;flex:1}.count-badge{background:#eef2ff;color:#4338ca;font-size:10.5px;font-weight:700;padding:1px 7px;border-radius:999px;line-height:1.5}.meals{display:flex;flex-direction:column;gap:6px;min-height:44px}.meal-chip{display:flex;align-items:center;gap:8px;background:#f9fafb;border:1px solid #eef0f2;border-radius:9px;padding:6px 8px;font-size:12.5px;transition:background 0.12s ease}.meal-chip:hover{background:#f3f4f6}.thumb{width:28px;height:28px;border-radius:6px;overflow:hidden;flex-shrink:0;background:#e5e7eb}.thumb img{width:100%;height:100%;object-fit:cover;display:block}.meal-chip .title{flex:1;color:#1f2937;font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.remove-btn{border:none;background:none;cursor:pointer;color:#9ca3af;font-size:11px;line-height:1;padding:3px;border-radius:5px;transition:color 0.12s ease, background 0.12s ease}.remove-btn:hover{color:#dc2626;background:#fef2f2}.empty{font-size:12px;color:#9ca3af;margin:6px 0;text-align:center;font-style:italic}.add-btn{display:flex;align-items:center;justify-content:center;gap:4px;border:1.5px dashed #d1d5db;background:none;border-radius:9px;padding:7px;font-size:12px;font-weight:600;cursor:pointer;color:#6b7280;transition:border-color 0.12s ease, color 0.12s ease, background 0.12s ease}.add-btn:hover{border-color:#6366f1;color:#4f46e5;background:#f5f5ff}.plus{font-size:14px;line-height:1}`;
192
192
 
193
193
  const MealPlanDay = class {
194
194
  constructor(hostRef) {
@@ -197,10 +197,12 @@ const MealPlanDay = class {
197
197
  this.removeMeal = createEvent(this, "removeMeal");
198
198
  this.day = '';
199
199
  this.meals = [];
200
+ /** Optional emoji/icon shown next to the label, e.g. "🌅" */
201
+ this.icon = '';
200
202
  }
201
203
  render() {
202
204
  const meals = Array.isArray(this.meals) ? this.meals : [];
203
- return (h("div", { key: '7a0b592fd4b8d9971d7f4912cecb5f9126be11b3', class: "day-col" }, h("h3", { key: 'b0f1f6a717ad409e6339219ea2f71b73d73bb1f3' }, this.day), h("div", { key: '2c978721af3aad27042572dd7825d5f2b5b659fb', class: "meals" }, meals.map((m) => (h("div", { class: "meal-chip" }, m.image && h("img", { src: m.image, alt: m.title }), h("span", { class: "title" }, m.title), h("button", { onClick: () => this.removeMeal.emit({ day: this.day, mealId: m.id }), "aria-label": "Remove meal" }, "\u2715")))), meals.length === 0 && h("p", { key: '326b5f3201df2416f43debc7257918a60a6ab6dd', class: "empty" }, "No meals planned")), h("button", { key: '3532de633a1f6cb83bb70f91a2df8fe1a9fcbc14', class: "add-btn", onClick: () => this.assignMeal.emit({ day: this.day }) }, "+ Add meal")));
205
+ return (h("div", { key: 'cd4f194f1eeb5f53a029f380c40aa0b4ec2f32f4', class: "day-col" }, h("div", { key: 'd88966142d5101fc522d5de89b6d4cab72cbbbf3', class: "col-header" }, this.icon && h("span", { key: '5a9a27a3a1909bcf7295ec7eeccf309e5e2d1ae0', class: "icon" }, this.icon), h("h3", { key: 'fd1fa2f1274cc1f6bd8917959015722cb69002ba' }, this.day), meals.length > 0 && h("span", { key: 'feff3bc91b52203dba19f7a87c56d3813fc95cdd', class: "count-badge" }, meals.length)), h("div", { key: '4afee9ce77bf1447bf9e32efc7e2f9b9571873e7', class: "meals" }, meals.map((m) => (h("div", { class: "meal-chip" }, h("div", { class: "thumb" }, m.image && h("img", { src: m.image, alt: m.title })), h("span", { class: "title" }, m.title), h("button", { class: "remove-btn", onClick: () => this.removeMeal.emit({ day: this.day, mealId: m.id }), "aria-label": `Remove ${m.title}` }, "\u2715")))), meals.length === 0 && h("p", { key: '9a4002b1b4516fc5ff6ef8f9a2e0a7f5e8465cbd', class: "empty" }, "No meal planned")), h("button", { key: '2cef3c5f7d0e89303cb8989f78eefb95c426683f', class: "add-btn", onClick: () => this.assignMeal.emit({ day: this.day }) }, h("span", { key: 'ae54b56f8f0b01f45029e36919764ae31f3a38b9', class: "plus" }, "+"), " Add meal")));
204
206
  }
205
207
  };
206
208
  MealPlanDay.style = mealPlanDayCss();
@@ -16,7 +16,7 @@ const AppToast = class {
16
16
  }
17
17
  }
18
18
  render() {
19
- return (h("div", { key: 'd9dcb405ffd97bfa44fee10fe49103bd021938a2', class: `toast ${this.type}` }, h("span", { key: '5fd291b9766dc41189f49c11c836654d6663c8d1' }, this.message), h("button", { key: '9f93921f20b17520ce339378c5a1ca66ef6a04bc', onClick: () => this.dismiss.emit(), "aria-label": "Dismiss" }, "\u2715")));
19
+ return (h("div", { key: '73ab8ea44ad155052616ffbc424e1d8f13b8116f', class: `toast ${this.type}` }, h("span", { key: '301487550c2f4f50cdcc6d0a138b9e968cde385f' }, this.message), h("button", { key: '4e9de348002a397a25450142d9fa1fa07ca84d54', onClick: () => this.dismiss.emit(), "aria-label": "Dismiss" }, "\u2715")));
20
20
  }
21
21
  };
22
22
  AppToast.style = appToastCss();
@@ -5,7 +5,7 @@ import { g as globalScripts } from './app-globals-DQuL1Twl.js';
5
5
  const defineCustomElements = async (win, options) => {
6
6
  if (typeof window === 'undefined') return undefined;
7
7
  await globalScripts();
8
- return bootstrapLazy([["app-modal_7",[[257,"app-modal",{"open":[4],"modalTitle":[1,"modal-title"]}],[1,"meal-plan-day",{"day":[1],"meals":[16]}],[257,"recipe-card",{"recipeTitle":[1,"recipe-title"],"image":[1],"category":[1],"favorite":[4]}],[1,"recipe-filter-bar",{"categories":[16],"active":[1]}],[257,"recipe-form",{"initialData":[1,"initial-data"],"title":[32],"image":[32],"category":[32],"ingredients":[32],"instructions":[32],"errors":[32]},null,{"initialData":[{"onInitialDataChange":0}]}],[1,"recipe-rating",{"value":[2],"readonly":[4],"max":[2]}],[1,"recipe-search-bar",{"placeholder":[1],"value":[1],"debounceMs":[2,"debounce-ms"],"internalValue":[32]},null,{"value":[{"onValuePropChange":0}]}]]],["app-toast",[[1,"app-toast",{"message":[1],"type":[1],"duration":[2]}]]]], options);
8
+ return bootstrapLazy([["app-modal_7",[[257,"app-modal",{"open":[4],"modalTitle":[1,"modal-title"]}],[1,"meal-plan-day",{"day":[1],"meals":[16],"icon":[1]}],[257,"recipe-card",{"recipeTitle":[1,"recipe-title"],"image":[1],"category":[1],"favorite":[4]}],[1,"recipe-filter-bar",{"categories":[16],"active":[1]}],[257,"recipe-form",{"initialData":[1,"initial-data"],"title":[32],"image":[32],"category":[32],"ingredients":[32],"instructions":[32],"errors":[32]},null,{"initialData":[{"onInitialDataChange":0}]}],[1,"recipe-rating",{"value":[2],"readonly":[4],"max":[2]}],[1,"recipe-search-bar",{"placeholder":[1],"value":[1],"debounceMs":[2,"debounce-ms"],"internalValue":[32]},null,{"value":[{"onValuePropChange":0}]}]]],["app-toast",[[1,"app-toast",{"message":[1],"type":[1],"duration":[2]}]]]], options);
9
9
  };
10
10
 
11
11
  export { defineCustomElements };
@@ -17,5 +17,5 @@ var patchBrowser = () => {
17
17
 
18
18
  patchBrowser().then(async (options) => {
19
19
  await globalScripts();
20
- return bootstrapLazy([["app-modal_7",[[257,"app-modal",{"open":[4],"modalTitle":[1,"modal-title"]}],[1,"meal-plan-day",{"day":[1],"meals":[16]}],[257,"recipe-card",{"recipeTitle":[1,"recipe-title"],"image":[1],"category":[1],"favorite":[4]}],[1,"recipe-filter-bar",{"categories":[16],"active":[1]}],[257,"recipe-form",{"initialData":[1,"initial-data"],"title":[32],"image":[32],"category":[32],"ingredients":[32],"instructions":[32],"errors":[32]},null,{"initialData":[{"onInitialDataChange":0}]}],[1,"recipe-rating",{"value":[2],"readonly":[4],"max":[2]}],[1,"recipe-search-bar",{"placeholder":[1],"value":[1],"debounceMs":[2,"debounce-ms"],"internalValue":[32]},null,{"value":[{"onValuePropChange":0}]}]]],["app-toast",[[1,"app-toast",{"message":[1],"type":[1],"duration":[2]}]]]], options);
20
+ return bootstrapLazy([["app-modal_7",[[257,"app-modal",{"open":[4],"modalTitle":[1,"modal-title"]}],[1,"meal-plan-day",{"day":[1],"meals":[16],"icon":[1]}],[257,"recipe-card",{"recipeTitle":[1,"recipe-title"],"image":[1],"category":[1],"favorite":[4]}],[1,"recipe-filter-bar",{"categories":[16],"active":[1]}],[257,"recipe-form",{"initialData":[1,"initial-data"],"title":[32],"image":[32],"category":[32],"ingredients":[32],"instructions":[32],"errors":[32]},null,{"initialData":[{"onInitialDataChange":0}]}],[1,"recipe-rating",{"value":[2],"readonly":[4],"max":[2]}],[1,"recipe-search-bar",{"placeholder":[1],"value":[1],"debounceMs":[2,"debounce-ms"],"internalValue":[32]},null,{"value":[{"onValuePropChange":0}]}]]],["app-toast",[[1,"app-toast",{"message":[1],"type":[1],"duration":[2]}]]]], options);
21
21
  });
@@ -1 +1 @@
1
- import{r as s,c as t,h as o}from"./p-CrZUP9M-.js";const a=class{constructor(o){s(this,o),this.dismiss=t(this,"dismiss"),this.message="",this.type="info",this.duration=3e3}componentDidLoad(){this.duration>0&&setTimeout((()=>this.dismiss.emit()),this.duration)}render(){return o("div",{key:"d9dcb405ffd97bfa44fee10fe49103bd021938a2",class:`toast ${this.type}`},o("span",{key:"5fd291b9766dc41189f49c11c836654d6663c8d1"},this.message),o("button",{key:"9f93921f20b17520ce339378c5a1ca66ef6a04bc",onClick:()=>this.dismiss.emit(),"aria-label":"Dismiss"},"✕"))}};a.style=":host{font-family:system-ui, sans-serif;display:block}.toast{display:flex;align-items:center;gap:10px;padding:10px 16px;border-radius:8px;color:#fff;font-size:14px;box-shadow:0 4px 12px rgba(0,0,0,0.15)}.toast.success{background:#2ecc71}.toast.error{background:#e74c3c}.toast.info{background:#3498db}button{border:none;background:none;color:inherit;cursor:pointer;margin-left:auto}";export{a as app_toast}
1
+ import{r as s,c as t,h as o}from"./p-CrZUP9M-.js";const a=class{constructor(o){s(this,o),this.dismiss=t(this,"dismiss"),this.message="",this.type="info",this.duration=3e3}componentDidLoad(){this.duration>0&&setTimeout((()=>this.dismiss.emit()),this.duration)}render(){return o("div",{key:"73ab8ea44ad155052616ffbc424e1d8f13b8116f",class:`toast ${this.type}`},o("span",{key:"301487550c2f4f50cdcc6d0a138b9e968cde385f"},this.message),o("button",{key:"4e9de348002a397a25450142d9fa1fa07ca84d54",onClick:()=>this.dismiss.emit(),"aria-label":"Dismiss"},"✕"))}};a.style=":host{font-family:system-ui, sans-serif;display:block}.toast{display:flex;align-items:center;gap:10px;padding:10px 16px;border-radius:8px;color:#fff;font-size:14px;box-shadow:0 4px 12px rgba(0,0,0,0.15)}.toast.success{background:#2ecc71}.toast.error{background:#e74c3c}.toast.info{background:#3498db}button{border:none;background:none;color:inherit;cursor:pointer;margin-left:auto}";export{a as app_toast}
@@ -0,0 +1 @@
1
+ import{r as e,c as t,h as a}from"./p-CrZUP9M-.js";const i=class{constructor(a){e(this,a),this.favoriteToggle=t(this,"favoriteToggle"),this.cardClick=t(this,"cardClick"),this.category="",this.favorite=!1,this.onFavoriteClick=e=>{e.stopPropagation(),this.favoriteToggle.emit({favorite:!this.favorite})}}render(){return a("div",{key:"ab4f6e822f8b961d15c49d488af4e9b617ae71d2",class:"card",onClick:()=>this.cardClick.emit()},a("div",{key:"f57fc00e484283bd223f7e8557af7e76de33217e",class:"image-wrap"},this.image?a("img",{src:this.image,alt:this.recipeTitle}):a("div",{class:"placeholder"}),a("button",{key:"2f05b10aa6de8f6d51e0a216567a65900011a198",class:{"fav-btn":!0,active:this.favorite},onClick:this.onFavoriteClick,"aria-label":"Toggle favorite"},this.favorite?"★":"☆")),a("div",{key:"bb120c622bef2e7ae8abfedf31ba988a66d393c3",class:"body"},a("h3",{key:"2b0115c0ae28b302e35a00e0ed1a70d0b20712ab"},this.recipeTitle),this.category&&a("span",{key:"388a88c469547f04e7af2b1da0d303a28f499481",class:"category"},this.category),a("div",{key:"ff8e56f5a2ce08736ec9cef2a17bbcc2aad4b946",class:"actions"},a("slot",{key:"8952391cb6163493dc5ab27b690c4375ef535ac4",name:"actions"}))))}};i.style=":host{display:block;font-family:system-ui, sans-serif}.card{border:1px solid #e5e5e5;border-radius:12px;overflow:hidden;cursor:pointer;background:#fff;transition:box-shadow 0.15s ease, transform 0.15s ease}.card:hover{box-shadow:0 4px 16px rgba(0, 0, 0, 0.08);transform:translateY(-2px)}.image-wrap{position:relative;aspect-ratio:4 / 3;background:#f2f2f2}.image-wrap img{width:100%;height:100%;object-fit:cover;display:block}.placeholder{width:100%;height:100%;background:linear-gradient(135deg, #eee, #ddd)}.fav-btn{position:absolute;top:8px;right:8px;border:none;background:rgba(255, 255, 255, 0.9);border-radius:50%;width:32px;height:32px;font-size:16px;cursor:pointer;color:#f5a623}.fav-btn.active{color:#ff6b35}.body{padding:12px 14px}h3{margin:0 0 4px;font-size:15px;line-height:1.3}.category{font-size:12px;color:#777;text-transform:uppercase;letter-spacing:0.03em}.actions{margin-top:8px}";const s=class{constructor(a){e(this,a),this.search=t(this,"search"),this.placeholder="Search recipes...",this.value="",this.debounceMs=350,this.internalValue="",this.onInput=e=>{this.internalValue=e.target.value,clearTimeout(this.timer),this.timer=setTimeout((()=>{this.search.emit({value:this.internalValue})}),this.debounceMs)},this.onKeyDown=e=>{"Enter"===e.key&&(clearTimeout(this.timer),this.search.emit({value:this.internalValue}))}}componentWillLoad(){this.internalValue=this.value}onValuePropChange(e){this.internalValue=e}render(){return a("div",{key:"eb622258d322ed13168a4e4da4f6fecc67c5e3ea",class:"wrap"},a("input",{key:"5594cf8585234e21e4529a069ad9621631c9e103",type:"search",placeholder:this.placeholder,value:this.internalValue,onInput:this.onInput,onKeyDown:this.onKeyDown}),a("button",{key:"7540e7232d5071a65360c8196deda3461bfa8308",onClick:()=>this.search.emit({value:this.internalValue}),"aria-label":"Search"},"🔍"))}static get watchers(){return{value:[{onValuePropChange:0}]}}};s.style=":host{display:block;font-family:system-ui, sans-serif}.wrap{display:flex;gap:6px}input{flex:1;padding:10px 14px;border-radius:8px;border:1px solid #ddd;font-size:14px;outline:none}input:focus{border-color:#ff6b35}button{border:none;background:#ff6b35;color:#fff;border-radius:8px;padding:0 16px;cursor:pointer;font-size:15px}";const o=class{constructor(a){e(this,a),this.filterChange=t(this,"filterChange"),this.categories=[],this.active=""}select(e){this.filterChange.emit({value:e})}render(){const e=Array.isArray(this.categories)?this.categories:[];return a("div",{key:"084a1e0d79a1916d07277e1c080ff779aba1aa79",class:"wrap"},a("button",{key:"f0b9b529d1dca7f98621404b174837b5b21163e7",class:{chip:!0,active:""===this.active},onClick:()=>this.select("")},"All"),e.map((e=>a("button",{class:{chip:!0,active:this.active===e},onClick:()=>this.select(e)},e))))}};o.style=":host{display:block;font-family:system-ui, sans-serif}.wrap{display:flex;flex-wrap:wrap;gap:8px}.chip{border:1px solid #ddd;background:#fff;border-radius:999px;padding:6px 14px;font-size:13px;cursor:pointer;color:#444}.chip.active{background:#ff6b35;border-color:#ff6b35;color:#fff}";const r=class{constructor(a){e(this,a),this.ratingChange=t(this,"ratingChange"),this.value=0,this.readonly=!1,this.max=5}render(){const e=Array.from({length:this.max},((e,t)=>t+1));return a("div",{key:"19cb1bd17a6dc207c7e556ae026a4f343a784f50",class:"wrap",role:this.readonly?void 0:"radiogroup"},e.map((e=>a("span",{class:{star:!0,filled:e<=this.value,clickable:!this.readonly},onClick:()=>!this.readonly&&this.ratingChange.emit({value:e})},"★"))))}};r.style=":host{display:inline-block;font-family:system-ui, sans-serif}.wrap{display:flex;gap:2px}.star{font-size:18px;color:#ddd}.star.filled{color:#f5a623}.star.clickable{cursor:pointer}";const c=class{constructor(a){e(this,a),this.save=t(this,"save"),this.cancel=t(this,"cancel"),this.title="",this.image="",this.category="",this.ingredients=[""],this.instructions="",this.errors={},this.onSubmit=e=>{if(e.preventDefault(),!this.validate())return;const t={id:this.initialData?.id,title:this.title.trim(),image:this.image.trim(),category:this.category.trim(),ingredients:this.ingredients.map((e=>e.trim())).filter(Boolean),instructions:this.instructions.trim()};this.save.emit(t)},this.addIngredient=()=>{this.ingredients=[...this.ingredients,""]},this.removeIngredient=e=>{this.ingredients=this.ingredients.filter(((t,a)=>a!==e))}}componentWillLoad(){this.loadInitialData()}onInitialDataChange(){this.loadInitialData()}loadInitialData(){let e;if("string"==typeof this.initialData&&this.initialData)try{e=JSON.parse(this.initialData)}catch{e=void 0}else this.initialData&&"object"==typeof this.initialData&&(e=this.initialData);e&&(this.title=e.title??"",this.image=e.image??"",this.category=e.category??"",this.ingredients=e.ingredients?.length?[...e.ingredients]:[""],this.instructions=e.instructions??"")}validate(){const e={};return this.title.trim()||(e.title="Title is required."),0===this.ingredients.map((e=>e.trim())).filter(Boolean).length&&(e.ingredients="Add at least one ingredient."),this.instructions.trim()||(e.instructions="Instructions are required."),this.errors=e,0===Object.keys(e).length}updateIngredient(e,t){const a=[...this.ingredients];a[e]=t,this.ingredients=a}render(){return a("form",{key:"6699f62ff8027114e5a0e3d154f8743048cf4d96",onSubmit:this.onSubmit},a("slot",{key:"8de0f7e758feb4fc6f1ea877c4acd7c41cbe13ed",name:"header"}),a("label",{key:"881275928734c4eabfee6d22b35cddad1af03853"},"Title",a("input",{key:"a55ae352c35cec0b2391061d48153151a7dc5e6b",type:"text",value:this.title,onInput:e=>this.title=e.target.value}),this.errors.title&&a("span",{key:"dbace66ddaab5ab5096acb39822c7cd3a18923be",class:"error"},this.errors.title)),a("label",{key:"ae1bcdb323ccaa03307b6a283fcc395ef49954c5"},"Image URL",a("input",{key:"6ee9483689e0304c0ae28ab755dc93e117d4952e",type:"text",value:this.image,onInput:e=>this.image=e.target.value})),a("label",{key:"751b54959a8e2c85e98f2b192a4d8aa83d8ebafe"},"Category",a("input",{key:"83f852c74727b86a1a8a6c9a0d93e9ffdb3f33f3",type:"text",value:this.category,onInput:e=>this.category=e.target.value})),a("div",{key:"6a7c99a86d601ed51ece26c85b4b45766a2dafdf",class:"field"},a("span",{key:"ee082917bb3b90ec45ce1feea234c374f7fc35a0"},"Ingredients"),this.ingredients.map(((e,t)=>a("div",{class:"ingredient-row"},a("input",{type:"text",value:e,onInput:e=>this.updateIngredient(t,e.target.value)}),a("button",{type:"button",onClick:()=>this.removeIngredient(t),"aria-label":"Remove"},"✕")))),a("button",{key:"4f81107c94bf8810dfc14aa58d5afcf55d8e126d",type:"button",class:"add-btn",onClick:this.addIngredient},"+ Add ingredient"),this.errors.ingredients&&a("span",{key:"d87cc375b194c187b64def1ef9840797dab1d456",class:"error"},this.errors.ingredients)),a("label",{key:"dc6c04a5a2b5cc7d1912f535b8904125ce74af56"},"Instructions",a("textarea",{key:"0c9c4b09da5b3f24addb66c18fccad7c900bebcb",rows:5,onInput:e=>this.instructions=e.target.value},this.instructions),this.errors.instructions&&a("span",{key:"f430772f46e5298b2a2522aaef2822a59df61a08",class:"error"},this.errors.instructions)),a("div",{key:"337abce7c4f93a9fbb90917e6b407dfb5b95039d",class:"footer"},a("slot",{key:"b8b610485f592592afb6cef682faeb13d52da6ea",name:"footer"}),a("button",{key:"faf249c9be390b5d574300d0ff24bcd0c5603a3c",type:"button",class:"cancel-btn",onClick:()=>this.cancel.emit()},"Cancel"),a("button",{key:"527146d147778940c28e5357c100d1809cbcd6df",type:"submit",class:"save-btn"},"Save Recipe")))}static get watchers(){return{initialData:[{onInitialDataChange:0}]}}};c.style=":host{display:block;font-family:system-ui, sans-serif}form{display:flex;flex-direction:column;gap:14px}label{display:flex;flex-direction:column;gap:4px;font-size:13px;color:#333;font-weight:600}input,textarea{font-weight:400;padding:8px 10px;border:1px solid #ddd;border-radius:6px;font-size:14px;font-family:inherit}.field{display:flex;flex-direction:column;gap:6px;font-size:13px;font-weight:600}.ingredient-row{display:flex;gap:6px}.ingredient-row input{flex:1}.ingredient-row button{border:none;background:#f4f4f4;border-radius:6px;cursor:pointer;width:30px}.add-btn{align-self:flex-start;border:1px dashed #bbb;background:none;border-radius:6px;padding:6px 10px;cursor:pointer;font-size:13px;color:#555}.error{color:#e74c3c;font-size:12px;font-weight:400}.footer{display:flex;justify-content:flex-end;gap:10px;margin-top:6px}.cancel-btn{border:1px solid #ddd;background:#fff;border-radius:8px;padding:8px 16px;cursor:pointer}.save-btn{border:none;background:#ff6b35;color:#fff;border-radius:8px;padding:8px 18px;cursor:pointer;font-weight:600}";const d=class{constructor(a){e(this,a),this.assignMeal=t(this,"assignMeal"),this.removeMeal=t(this,"removeMeal"),this.day="",this.meals=[],this.icon=""}render(){const e=Array.isArray(this.meals)?this.meals:[];return a("div",{key:"cd4f194f1eeb5f53a029f380c40aa0b4ec2f32f4",class:"day-col"},a("div",{key:"d88966142d5101fc522d5de89b6d4cab72cbbbf3",class:"col-header"},this.icon&&a("span",{key:"5a9a27a3a1909bcf7295ec7eeccf309e5e2d1ae0",class:"icon"},this.icon),a("h3",{key:"fd1fa2f1274cc1f6bd8917959015722cb69002ba"},this.day),e.length>0&&a("span",{key:"feff3bc91b52203dba19f7a87c56d3813fc95cdd",class:"count-badge"},e.length)),a("div",{key:"4afee9ce77bf1447bf9e32efc7e2f9b9571873e7",class:"meals"},e.map((e=>a("div",{class:"meal-chip"},a("div",{class:"thumb"},e.image&&a("img",{src:e.image,alt:e.title})),a("span",{class:"title"},e.title),a("button",{class:"remove-btn",onClick:()=>this.removeMeal.emit({day:this.day,mealId:e.id}),"aria-label":`Remove ${e.title}`},"✕")))),0===e.length&&a("p",{key:"9a4002b1b4516fc5ff6ef8f9a2e0a7f5e8465cbd",class:"empty"},"No meal planned")),a("button",{key:"2cef3c5f7d0e89303cb8989f78eefb95c426683f",class:"add-btn",onClick:()=>this.assignMeal.emit({day:this.day})},a("span",{key:"ae54b56f8f0b01f45029e36919764ae31f3a38b9",class:"plus"},"+")," Add meal"))}};d.style=":host{display:block;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif}.day-col{background:#ffffff;border:1px solid #e8eaed;border-radius:12px;padding:14px;min-width:160px;display:flex;flex-direction:column;gap:10px;box-shadow:0 1px 2px rgba(16, 24, 40, 0.04);transition:box-shadow 0.15s ease, border-color 0.15s ease}.day-col:hover{box-shadow:0 4px 12px rgba(16, 24, 40, 0.08);border-color:#d8dce1}.col-header{display:flex;align-items:center;gap:6px;padding-bottom:8px;border-bottom:1px solid #f0f1f3}.col-header .icon{font-size:15px;line-height:1}.col-header h3{margin:0;font-size:12.5px;font-weight:700;text-transform:uppercase;letter-spacing:0.05em;color:#4b5563;flex:1}.count-badge{background:#eef2ff;color:#4338ca;font-size:10.5px;font-weight:700;padding:1px 7px;border-radius:999px;line-height:1.5}.meals{display:flex;flex-direction:column;gap:6px;min-height:44px}.meal-chip{display:flex;align-items:center;gap:8px;background:#f9fafb;border:1px solid #eef0f2;border-radius:9px;padding:6px 8px;font-size:12.5px;transition:background 0.12s ease}.meal-chip:hover{background:#f3f4f6}.thumb{width:28px;height:28px;border-radius:6px;overflow:hidden;flex-shrink:0;background:#e5e7eb}.thumb img{width:100%;height:100%;object-fit:cover;display:block}.meal-chip .title{flex:1;color:#1f2937;font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.remove-btn{border:none;background:none;cursor:pointer;color:#9ca3af;font-size:11px;line-height:1;padding:3px;border-radius:5px;transition:color 0.12s ease, background 0.12s ease}.remove-btn:hover{color:#dc2626;background:#fef2f2}.empty{font-size:12px;color:#9ca3af;margin:6px 0;text-align:center;font-style:italic}.add-btn{display:flex;align-items:center;justify-content:center;gap:4px;border:1.5px dashed #d1d5db;background:none;border-radius:9px;padding:7px;font-size:12px;font-weight:600;cursor:pointer;color:#6b7280;transition:border-color 0.12s ease, color 0.12s ease, background 0.12s ease}.add-btn:hover{border-color:#6366f1;color:#4f46e5;background:#f5f5ff}.plus{font-size:14px;line-height:1}";const n=class{constructor(a){e(this,a),this.close=t(this,"close"),this.open=!1,this.modalTitle=""}render(){return this.open?a("div",{class:"overlay",onClick:()=>this.close.emit()},a("div",{class:"dialog",onClick:e=>e.stopPropagation()},a("div",{class:"header"},a("h2",null,this.modalTitle),a("button",{class:"close-btn",onClick:()=>this.close.emit(),"aria-label":"Close"},"✕")),a("div",{class:"body"},a("slot",null)))):null}};n.style=":host{font-family:system-ui, sans-serif}.overlay{position:fixed;inset:0;background:rgba(0, 0, 0, 0.45);display:flex;align-items:center;justify-content:center;z-index:1000}.dialog{background:#fff;border-radius:12px;min-width:320px;max-width:90vw;max-height:85vh;overflow-y:auto;padding:20px;box-shadow:0 10px 40px rgba(0,0,0,0.2)}.header{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}.header h2{margin:0;font-size:18px}.close-btn{border:none;background:none;font-size:16px;cursor:pointer;color:#666}";export{n as app_modal,d as meal_plan_day,i as recipe_card,o as recipe_filter_bar,c as recipe_form,r as recipe_rating,s as recipe_search_bar}
@@ -1 +1 @@
1
- import{p as e,b as a}from"./p-CrZUP9M-.js";export{s as setNonce}from"./p-CrZUP9M-.js";import{g as i}from"./p-DQuL1Twl.js";(()=>{const a=import.meta.url,i={};return""!==a&&(i.resourcesUrl=new URL(".",a).href),e(i)})().then((async e=>(await i(),a([["p-697b1175",[[257,"app-modal",{open:[4],modalTitle:[1,"modal-title"]}],[1,"meal-plan-day",{day:[1],meals:[16]}],[257,"recipe-card",{recipeTitle:[1,"recipe-title"],image:[1],category:[1],favorite:[4]}],[1,"recipe-filter-bar",{categories:[16],active:[1]}],[257,"recipe-form",{initialData:[1,"initial-data"],title:[32],image:[32],category:[32],ingredients:[32],instructions:[32],errors:[32]},null,{initialData:[{onInitialDataChange:0}]}],[1,"recipe-rating",{value:[2],readonly:[4],max:[2]}],[1,"recipe-search-bar",{placeholder:[1],value:[1],debounceMs:[2,"debounce-ms"],internalValue:[32]},null,{value:[{onValuePropChange:0}]}]]],["p-6ef28048",[[1,"app-toast",{message:[1],type:[1],duration:[2]}]]]],e))));
1
+ import{p as e,b as a}from"./p-CrZUP9M-.js";export{s as setNonce}from"./p-CrZUP9M-.js";import{g as i}from"./p-DQuL1Twl.js";(()=>{const a=import.meta.url,i={};return""!==a&&(i.resourcesUrl=new URL(".",a).href),e(i)})().then((async e=>(await i(),a([["p-a8cd146e",[[257,"app-modal",{open:[4],modalTitle:[1,"modal-title"]}],[1,"meal-plan-day",{day:[1],meals:[16],icon:[1]}],[257,"recipe-card",{recipeTitle:[1,"recipe-title"],image:[1],category:[1],favorite:[4]}],[1,"recipe-filter-bar",{categories:[16],active:[1]}],[257,"recipe-form",{initialData:[1,"initial-data"],title:[32],image:[32],category:[32],ingredients:[32],instructions:[32],errors:[32]},null,{initialData:[{onInitialDataChange:0}]}],[1,"recipe-rating",{value:[2],readonly:[4],max:[2]}],[1,"recipe-search-bar",{placeholder:[1],value:[1],debounceMs:[2,"debounce-ms"],internalValue:[32]},null,{value:[{onValuePropChange:0}]}]]],["p-531fb6c4",[[1,"app-toast",{message:[1],type:[1],duration:[2]}]]]],e))));
@@ -4,16 +4,11 @@ export interface PlannedMeal {
4
4
  title: string;
5
5
  image?: string;
6
6
  }
7
- /**
8
- * One column of the weekly meal planner, representing a single day.
9
- * `meals` is the list of recipes currently assigned to this day.
10
- * Emits `removeMeal` when a meal's remove button is clicked, and
11
- * `assignMeal` when the "+ Add meal" button is clicked (the parent app
12
- * is expected to open its own picker/modal and then update `meals`).
13
- */
14
7
  export declare class MealPlanDay {
15
8
  day: string;
16
9
  meals: PlannedMeal[];
10
+ /** Optional emoji/icon shown next to the label, e.g. "🌅" */
11
+ icon: string;
17
12
  assignMeal: EventEmitter<{
18
13
  day: string;
19
14
  }>;
@@ -40,18 +40,16 @@ export namespace Components {
40
40
  */
41
41
  "type": 'success' | 'error' | 'info';
42
42
  }
43
- /**
44
- * One column of the weekly meal planner, representing a single day.
45
- * `meals` is the list of recipes currently assigned to this day.
46
- * Emits `removeMeal` when a meal's remove button is clicked, and
47
- * `assignMeal` when the "+ Add meal" button is clicked (the parent app
48
- * is expected to open its own picker/modal and then update `meals`).
49
- */
50
43
  interface MealPlanDay {
51
44
  /**
52
45
  * @default ''
53
46
  */
54
47
  "day": string;
48
+ /**
49
+ * Optional emoji/icon shown next to the label, e.g. "🌅"
50
+ * @default ''
51
+ */
52
+ "icon": string;
55
53
  /**
56
54
  * @default []
57
55
  */
@@ -223,13 +221,6 @@ declare global {
223
221
  "assignMeal": { day: string };
224
222
  "removeMeal": { day: string; mealId: string };
225
223
  }
226
- /**
227
- * One column of the weekly meal planner, representing a single day.
228
- * `meals` is the list of recipes currently assigned to this day.
229
- * Emits `removeMeal` when a meal's remove button is clicked, and
230
- * `assignMeal` when the "+ Add meal" button is clicked (the parent app
231
- * is expected to open its own picker/modal and then update `meals`).
232
- */
233
224
  interface HTMLMealPlanDayElement extends Components.MealPlanDay, HTMLStencilElement {
234
225
  addEventListener<K extends keyof HTMLMealPlanDayElementEventMap>(type: K, listener: (this: HTMLMealPlanDayElement, ev: MealPlanDayCustomEvent<HTMLMealPlanDayElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
235
226
  addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
@@ -399,18 +390,16 @@ declare namespace LocalJSX {
399
390
  */
400
391
  "type"?: 'success' | 'error' | 'info';
401
392
  }
402
- /**
403
- * One column of the weekly meal planner, representing a single day.
404
- * `meals` is the list of recipes currently assigned to this day.
405
- * Emits `removeMeal` when a meal's remove button is clicked, and
406
- * `assignMeal` when the "+ Add meal" button is clicked (the parent app
407
- * is expected to open its own picker/modal and then update `meals`).
408
- */
409
393
  interface MealPlanDay {
410
394
  /**
411
395
  * @default ''
412
396
  */
413
397
  "day"?: string;
398
+ /**
399
+ * Optional emoji/icon shown next to the label, e.g. "🌅"
400
+ * @default ''
401
+ */
402
+ "icon"?: string;
414
403
  /**
415
404
  * @default []
416
405
  */
@@ -531,6 +520,7 @@ declare namespace LocalJSX {
531
520
  }
532
521
  interface MealPlanDayAttributes {
533
522
  "day": string;
523
+ "icon": string;
534
524
  }
535
525
  interface RecipeCardAttributes {
536
526
  "recipeTitle": string;
@@ -578,13 +568,6 @@ declare module "@stencil/core" {
578
568
  * Simple notification toast. Auto-dismisses after `duration` ms if > 0.
579
569
  */
580
570
  "app-toast": LocalJSX.IntrinsicElements["app-toast"] & JSXBase.HTMLAttributes<HTMLAppToastElement>;
581
- /**
582
- * One column of the weekly meal planner, representing a single day.
583
- * `meals` is the list of recipes currently assigned to this day.
584
- * Emits `removeMeal` when a meal's remove button is clicked, and
585
- * `assignMeal` when the "+ Add meal" button is clicked (the parent app
586
- * is expected to open its own picker/modal and then update `meals`).
587
- */
588
571
  "meal-plan-day": LocalJSX.IntrinsicElements["meal-plan-day"] & JSXBase.HTMLAttributes<HTMLMealPlanDayElement>;
589
572
  /**
590
573
  * Displays a summary of a recipe (image, title, category) inside a card.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gurpinderjitsingh/recipe-ui",
3
- "version": "0.1.5",
3
+ "version": "0.2.0",
4
4
  "description": "Reusable web component library for the Recipe Finder & Meal Planner app, built with StencilJS.",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.js",
@@ -1 +0,0 @@
1
- import{t as e,p as a,H as s,c as t,h as d}from"./p-BJU3HdRm.js";const i=a(class extends s{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.assignMeal=t(this,"assignMeal"),this.removeMeal=t(this,"removeMeal"),this.day="",this.meals=[]}render(){const e=Array.isArray(this.meals)?this.meals:[];return d("div",{key:"7a0b592fd4b8d9971d7f4912cecb5f9126be11b3",class:"day-col"},d("h3",{key:"b0f1f6a717ad409e6339219ea2f71b73d73bb1f3"},this.day),d("div",{key:"2c978721af3aad27042572dd7825d5f2b5b659fb",class:"meals"},e.map((e=>d("div",{class:"meal-chip"},e.image&&d("img",{src:e.image,alt:e.title}),d("span",{class:"title"},e.title),d("button",{onClick:()=>this.removeMeal.emit({day:this.day,mealId:e.id}),"aria-label":"Remove meal"},"✕")))),0===e.length&&d("p",{key:"326b5f3201df2416f43debc7257918a60a6ab6dd",class:"empty"},"No meals planned")),d("button",{key:"3532de633a1f6cb83bb70f91a2df8fe1a9fcbc14",class:"add-btn",onClick:()=>this.assignMeal.emit({day:this.day})},"+ Add meal"))}static get style(){return":host{display:block;font-family:system-ui, sans-serif}.day-col{border:1px solid #eee;border-radius:10px;padding:10px;min-width:150px;display:flex;flex-direction:column;gap:8px;background:#fafafa}h3{margin:0;font-size:13px;text-transform:uppercase;letter-spacing:0.04em;color:#555}.meals{display:flex;flex-direction:column;gap:6px;min-height:40px}.meal-chip{display:flex;align-items:center;gap:6px;background:#fff;border:1px solid #eee;border-radius:8px;padding:4px 6px;font-size:12px}.meal-chip img{width:24px;height:24px;border-radius:4px;object-fit:cover}.meal-chip .title{flex:1}.meal-chip button{border:none;background:none;cursor:pointer;color:#999}.empty{font-size:12px;color:#aaa;margin:4px 0}.add-btn{border:1px dashed #ccc;background:none;border-radius:8px;padding:6px;font-size:12px;cursor:pointer;color:#666}"}},[1,"meal-plan-day",{day:[1],meals:[16]}]);function o(){"undefined"!=typeof customElements&&["meal-plan-day"].forEach((a=>{"meal-plan-day"===a&&(customElements.get(e(a))||customElements.define(e(a),i))}))}o();export{i as M,o as d}
@@ -1 +0,0 @@
1
- import{t as e,p as s,H as t,c as i,h as r}from"./p-BJU3HdRm.js";const c=s(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.filterChange=i(this,"filterChange"),this.categories=[],this.active=""}select(e){this.filterChange.emit({value:e})}render(){const e=Array.isArray(this.categories)?this.categories:[];return r("div",{key:"13bc63f39ebfc55c0f05c035b63036121f7b3930",class:"wrap"},r("button",{key:"8aeb99775268204433a8f9831eca9873066c7b9e",class:{chip:!0,active:""===this.active},onClick:()=>this.select("")},"All"),e.map((e=>r("button",{class:{chip:!0,active:this.active===e},onClick:()=>this.select(e)},e))))}static get style(){return":host{display:block;font-family:system-ui, sans-serif}.wrap{display:flex;flex-wrap:wrap;gap:8px}.chip{border:1px solid #ddd;background:#fff;border-radius:999px;padding:6px 14px;font-size:13px;cursor:pointer;color:#444}.chip.active{background:#ff6b35;border-color:#ff6b35;color:#fff}"}},[1,"recipe-filter-bar",{categories:[16],active:[1]}]);function a(){"undefined"!=typeof customElements&&["recipe-filter-bar"].forEach((s=>{"recipe-filter-bar"===s&&(customElements.get(e(s))||customElements.define(e(s),c))}))}a();export{c as R,a as d}
@@ -1 +0,0 @@
1
- import{r as e,c as t,h as i}from"./p-CrZUP9M-.js";const a=class{constructor(i){e(this,i),this.favoriteToggle=t(this,"favoriteToggle"),this.cardClick=t(this,"cardClick"),this.category="",this.favorite=!1,this.onFavoriteClick=e=>{e.stopPropagation(),this.favoriteToggle.emit({favorite:!this.favorite})}}render(){return i("div",{key:"abd19b1d63409b52cf66f348131f5f6f77bb47a6",class:"card",onClick:()=>this.cardClick.emit()},i("div",{key:"1292c3f6dfe7d3b399943004f764c41a3d072188",class:"image-wrap"},this.image?i("img",{src:this.image,alt:this.recipeTitle}):i("div",{class:"placeholder"}),i("button",{key:"0efdc01af349d011ca0e11c4df5438b79876b467",class:{"fav-btn":!0,active:this.favorite},onClick:this.onFavoriteClick,"aria-label":"Toggle favorite"},this.favorite?"★":"☆")),i("div",{key:"66c2c4d845d9cc082c07f24f5d827313f6ad51c4",class:"body"},i("h3",{key:"779fc629c3b97b6158f99440d9bb17fafb708dd3"},this.recipeTitle),this.category&&i("span",{key:"259ec599a43a5c8a279ad5993ba36f8602125b76",class:"category"},this.category),i("div",{key:"58ab20f9682b4b73b7d027571496641cbfa76d0b",class:"actions"},i("slot",{key:"28103422d993e58b133c2350e37c06fddf24300f",name:"actions"}))))}};a.style=":host{display:block;font-family:system-ui, sans-serif}.card{border:1px solid #e5e5e5;border-radius:12px;overflow:hidden;cursor:pointer;background:#fff;transition:box-shadow 0.15s ease, transform 0.15s ease}.card:hover{box-shadow:0 4px 16px rgba(0, 0, 0, 0.08);transform:translateY(-2px)}.image-wrap{position:relative;aspect-ratio:4 / 3;background:#f2f2f2}.image-wrap img{width:100%;height:100%;object-fit:cover;display:block}.placeholder{width:100%;height:100%;background:linear-gradient(135deg, #eee, #ddd)}.fav-btn{position:absolute;top:8px;right:8px;border:none;background:rgba(255, 255, 255, 0.9);border-radius:50%;width:32px;height:32px;font-size:16px;cursor:pointer;color:#f5a623}.fav-btn.active{color:#ff6b35}.body{padding:12px 14px}h3{margin:0 0 4px;font-size:15px;line-height:1.3}.category{font-size:12px;color:#777;text-transform:uppercase;letter-spacing:0.03em}.actions{margin-top:8px}";const s=class{constructor(i){e(this,i),this.search=t(this,"search"),this.placeholder="Search recipes...",this.value="",this.debounceMs=350,this.internalValue="",this.onInput=e=>{this.internalValue=e.target.value,clearTimeout(this.timer),this.timer=setTimeout((()=>{this.search.emit({value:this.internalValue})}),this.debounceMs)},this.onKeyDown=e=>{"Enter"===e.key&&(clearTimeout(this.timer),this.search.emit({value:this.internalValue}))}}componentWillLoad(){this.internalValue=this.value}onValuePropChange(e){this.internalValue=e}render(){return i("div",{key:"fe5eb2928308fb2496badd784e684b19df52501a",class:"wrap"},i("input",{key:"3d4abb23a1155075a8889e015819b37a8569f6f5",type:"search",placeholder:this.placeholder,value:this.internalValue,onInput:this.onInput,onKeyDown:this.onKeyDown}),i("button",{key:"f33f95b5bfcad9146903a2eb4448932a1d68edb7",onClick:()=>this.search.emit({value:this.internalValue}),"aria-label":"Search"},"🔍"))}static get watchers(){return{value:[{onValuePropChange:0}]}}};s.style=":host{display:block;font-family:system-ui, sans-serif}.wrap{display:flex;gap:6px}input{flex:1;padding:10px 14px;border-radius:8px;border:1px solid #ddd;font-size:14px;outline:none}input:focus{border-color:#ff6b35}button{border:none;background:#ff6b35;color:#fff;border-radius:8px;padding:0 16px;cursor:pointer;font-size:15px}";const o=class{constructor(i){e(this,i),this.filterChange=t(this,"filterChange"),this.categories=[],this.active=""}select(e){this.filterChange.emit({value:e})}render(){const e=Array.isArray(this.categories)?this.categories:[];return i("div",{key:"13bc63f39ebfc55c0f05c035b63036121f7b3930",class:"wrap"},i("button",{key:"8aeb99775268204433a8f9831eca9873066c7b9e",class:{chip:!0,active:""===this.active},onClick:()=>this.select("")},"All"),e.map((e=>i("button",{class:{chip:!0,active:this.active===e},onClick:()=>this.select(e)},e))))}};o.style=":host{display:block;font-family:system-ui, sans-serif}.wrap{display:flex;flex-wrap:wrap;gap:8px}.chip{border:1px solid #ddd;background:#fff;border-radius:999px;padding:6px 14px;font-size:13px;cursor:pointer;color:#444}.chip.active{background:#ff6b35;border-color:#ff6b35;color:#fff}";const r=class{constructor(i){e(this,i),this.ratingChange=t(this,"ratingChange"),this.value=0,this.readonly=!1,this.max=5}render(){const e=Array.from({length:this.max},((e,t)=>t+1));return i("div",{key:"1e1c67012185e7aaecfcc89671532946262a6957",class:"wrap",role:this.readonly?void 0:"radiogroup"},e.map((e=>i("span",{class:{star:!0,filled:e<=this.value,clickable:!this.readonly},onClick:()=>!this.readonly&&this.ratingChange.emit({value:e})},"★"))))}};r.style=":host{display:inline-block;font-family:system-ui, sans-serif}.wrap{display:flex;gap:2px}.star{font-size:18px;color:#ddd}.star.filled{color:#f5a623}.star.clickable{cursor:pointer}";const d=class{constructor(i){e(this,i),this.save=t(this,"save"),this.cancel=t(this,"cancel"),this.title="",this.image="",this.category="",this.ingredients=[""],this.instructions="",this.errors={},this.onSubmit=e=>{if(e.preventDefault(),!this.validate())return;const t={id:this.initialData?.id,title:this.title.trim(),image:this.image.trim(),category:this.category.trim(),ingredients:this.ingredients.map((e=>e.trim())).filter(Boolean),instructions:this.instructions.trim()};this.save.emit(t)},this.addIngredient=()=>{this.ingredients=[...this.ingredients,""]},this.removeIngredient=e=>{this.ingredients=this.ingredients.filter(((t,i)=>i!==e))}}componentWillLoad(){this.loadInitialData()}onInitialDataChange(){this.loadInitialData()}loadInitialData(){let e;if("string"==typeof this.initialData&&this.initialData)try{e=JSON.parse(this.initialData)}catch{e=void 0}else this.initialData&&"object"==typeof this.initialData&&(e=this.initialData);e&&(this.title=e.title??"",this.image=e.image??"",this.category=e.category??"",this.ingredients=e.ingredients?.length?[...e.ingredients]:[""],this.instructions=e.instructions??"")}validate(){const e={};return this.title.trim()||(e.title="Title is required."),0===this.ingredients.map((e=>e.trim())).filter(Boolean).length&&(e.ingredients="Add at least one ingredient."),this.instructions.trim()||(e.instructions="Instructions are required."),this.errors=e,0===Object.keys(e).length}updateIngredient(e,t){const i=[...this.ingredients];i[e]=t,this.ingredients=i}render(){return i("form",{key:"bb5c6c7f1b421b55515994f0256c5b39ea781632",onSubmit:this.onSubmit},i("slot",{key:"16940e4c8368aa6b546254ff8db7b28885a4409b",name:"header"}),i("label",{key:"7e3d6ba3231039ecdcca6a4c4314cf27038e1732"},"Title",i("input",{key:"f86056de021f040b8bbf3bf67a0d40ba526ad754",type:"text",value:this.title,onInput:e=>this.title=e.target.value}),this.errors.title&&i("span",{key:"54d552a15e037f54b2c6f0fd13cb4b685c25c76c",class:"error"},this.errors.title)),i("label",{key:"376da4904e7919b5540ee8dabf494f6aab053523"},"Image URL",i("input",{key:"761b64f0e5153ca0e2bf61a7db4c4106ae2f79ef",type:"text",value:this.image,onInput:e=>this.image=e.target.value})),i("label",{key:"0b7ff19b8718540b08921bb7f301be5cacf0df36"},"Category",i("input",{key:"4f1bae8316d588e93006a12e0d824579ddbece43",type:"text",value:this.category,onInput:e=>this.category=e.target.value})),i("div",{key:"280d98b91621defa547dbcc35c0cb6da55a67b5f",class:"field"},i("span",{key:"96a015e055b434441eba85dcb89470823d0ebcc8"},"Ingredients"),this.ingredients.map(((e,t)=>i("div",{class:"ingredient-row"},i("input",{type:"text",value:e,onInput:e=>this.updateIngredient(t,e.target.value)}),i("button",{type:"button",onClick:()=>this.removeIngredient(t),"aria-label":"Remove"},"✕")))),i("button",{key:"697cda22eb5bdf42e50ac40669619fbc04140405",type:"button",class:"add-btn",onClick:this.addIngredient},"+ Add ingredient"),this.errors.ingredients&&i("span",{key:"6a46c393bdd9af8e1e1255792d5532daf433f25b",class:"error"},this.errors.ingredients)),i("label",{key:"6abdbe72d381c3a0a56c46560a92b1e533fcce2a"},"Instructions",i("textarea",{key:"1d3b62d6543e42a4cd0755522f657c13e2d1e4a7",rows:5,onInput:e=>this.instructions=e.target.value},this.instructions),this.errors.instructions&&i("span",{key:"b5845bb5cd0ddd40de21f074307513d376a05f56",class:"error"},this.errors.instructions)),i("div",{key:"778adeff176e2d2b080aad59602db6e92a69ea1c",class:"footer"},i("slot",{key:"c9584d6606ed33f616eb8f3035aa4a0fd5086af3",name:"footer"}),i("button",{key:"b2e17dfb528996a1e6a8a1f8aac36b36e3b07c3a",type:"button",class:"cancel-btn",onClick:()=>this.cancel.emit()},"Cancel"),i("button",{key:"a9e91907aa44c8587a2c492f869d0cb5daa942fe",type:"submit",class:"save-btn"},"Save Recipe")))}static get watchers(){return{initialData:[{onInitialDataChange:0}]}}};d.style=":host{display:block;font-family:system-ui, sans-serif}form{display:flex;flex-direction:column;gap:14px}label{display:flex;flex-direction:column;gap:4px;font-size:13px;color:#333;font-weight:600}input,textarea{font-weight:400;padding:8px 10px;border:1px solid #ddd;border-radius:6px;font-size:14px;font-family:inherit}.field{display:flex;flex-direction:column;gap:6px;font-size:13px;font-weight:600}.ingredient-row{display:flex;gap:6px}.ingredient-row input{flex:1}.ingredient-row button{border:none;background:#f4f4f4;border-radius:6px;cursor:pointer;width:30px}.add-btn{align-self:flex-start;border:1px dashed #bbb;background:none;border-radius:6px;padding:6px 10px;cursor:pointer;font-size:13px;color:#555}.error{color:#e74c3c;font-size:12px;font-weight:400}.footer{display:flex;justify-content:flex-end;gap:10px;margin-top:6px}.cancel-btn{border:1px solid #ddd;background:#fff;border-radius:8px;padding:8px 16px;cursor:pointer}.save-btn{border:none;background:#ff6b35;color:#fff;border-radius:8px;padding:8px 18px;cursor:pointer;font-weight:600}";const n=class{constructor(i){e(this,i),this.assignMeal=t(this,"assignMeal"),this.removeMeal=t(this,"removeMeal"),this.day="",this.meals=[]}render(){const e=Array.isArray(this.meals)?this.meals:[];return i("div",{key:"7a0b592fd4b8d9971d7f4912cecb5f9126be11b3",class:"day-col"},i("h3",{key:"b0f1f6a717ad409e6339219ea2f71b73d73bb1f3"},this.day),i("div",{key:"2c978721af3aad27042572dd7825d5f2b5b659fb",class:"meals"},e.map((e=>i("div",{class:"meal-chip"},e.image&&i("img",{src:e.image,alt:e.title}),i("span",{class:"title"},e.title),i("button",{onClick:()=>this.removeMeal.emit({day:this.day,mealId:e.id}),"aria-label":"Remove meal"},"✕")))),0===e.length&&i("p",{key:"326b5f3201df2416f43debc7257918a60a6ab6dd",class:"empty"},"No meals planned")),i("button",{key:"3532de633a1f6cb83bb70f91a2df8fe1a9fcbc14",class:"add-btn",onClick:()=>this.assignMeal.emit({day:this.day})},"+ Add meal"))}};n.style=":host{display:block;font-family:system-ui, sans-serif}.day-col{border:1px solid #eee;border-radius:10px;padding:10px;min-width:150px;display:flex;flex-direction:column;gap:8px;background:#fafafa}h3{margin:0;font-size:13px;text-transform:uppercase;letter-spacing:0.04em;color:#555}.meals{display:flex;flex-direction:column;gap:6px;min-height:40px}.meal-chip{display:flex;align-items:center;gap:6px;background:#fff;border:1px solid #eee;border-radius:8px;padding:4px 6px;font-size:12px}.meal-chip img{width:24px;height:24px;border-radius:4px;object-fit:cover}.meal-chip .title{flex:1}.meal-chip button{border:none;background:none;cursor:pointer;color:#999}.empty{font-size:12px;color:#aaa;margin:4px 0}.add-btn{border:1px dashed #ccc;background:none;border-radius:8px;padding:6px;font-size:12px;cursor:pointer;color:#666}";const c=class{constructor(i){e(this,i),this.close=t(this,"close"),this.open=!1,this.modalTitle=""}render(){return this.open?i("div",{class:"overlay",onClick:()=>this.close.emit()},i("div",{class:"dialog",onClick:e=>e.stopPropagation()},i("div",{class:"header"},i("h2",null,this.modalTitle),i("button",{class:"close-btn",onClick:()=>this.close.emit(),"aria-label":"Close"},"✕")),i("div",{class:"body"},i("slot",null)))):null}};c.style=":host{font-family:system-ui, sans-serif}.overlay{position:fixed;inset:0;background:rgba(0, 0, 0, 0.45);display:flex;align-items:center;justify-content:center;z-index:1000}.dialog{background:#fff;border-radius:12px;min-width:320px;max-width:90vw;max-height:85vh;overflow-y:auto;padding:20px;box-shadow:0 10px 40px rgba(0,0,0,0.2)}.header{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}.header h2{margin:0;font-size:18px}.close-btn{border:none;background:none;font-size:16px;cursor:pointer;color:#666}";export{c as app_modal,n as meal_plan_day,a as recipe_card,o as recipe_filter_bar,d as recipe_form,r as recipe_rating,s as recipe_search_bar}