@gurpinderjitsingh/recipe-ui 0.1.0 → 0.1.2
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.
- package/dist/cjs/app-globals-V2Kpy_OQ.js +5 -0
- package/dist/cjs/app-modal_7.cjs.entry.js +233 -0
- package/dist/cjs/app-toast.cjs.entry.js +26 -0
- package/dist/cjs/index-CRcwY0Fb.js +1574 -0
- package/dist/cjs/index.cjs.js +16 -0
- package/dist/cjs/loader.cjs.js +13 -0
- package/dist/cjs/recipe-ui.cjs.js +25 -0
- package/dist/collection/collection-manifest.json +20 -0
- package/dist/collection/components/app-modal/app-modal.css +12 -0
- package/dist/collection/components/app-modal/app-modal.js +87 -0
- package/dist/collection/components/app-toast/app-toast.css +9 -0
- package/dist/collection/components/app-toast/app-toast.js +111 -0
- package/dist/collection/components/meal-plan-day/meal-plan-day.css +19 -0
- package/dist/collection/components/meal-plan-day/meal-plan-day.js +111 -0
- package/dist/collection/components/recipe-card/recipe-card.css +23 -0
- package/dist/collection/components/recipe-card/recipe-card.js +149 -0
- package/dist/collection/components/recipe-filter-bar/recipe-filter-bar.css +7 -0
- package/dist/collection/components/recipe-filter-bar/recipe-filter-bar.js +92 -0
- package/dist/collection/components/recipe-form/recipe-form.css +19 -0
- package/dist/{recipe-ui/recipe-form-D_DZ8L9Q.js → collection/components/recipe-form/recipe-form.js} +105 -21
- package/dist/collection/components/recipe-rating/recipe-rating.css +5 -0
- package/dist/collection/components/recipe-rating/recipe-rating.js +107 -0
- package/dist/collection/components/recipe-search-bar/recipe-search-bar.css +11 -0
- package/dist/collection/components/recipe-search-bar/recipe-search-bar.js +140 -0
- package/dist/collection/index.js +12 -0
- package/dist/components/app-modal.js +1 -0
- package/dist/components/app-toast.js +1 -0
- package/dist/components/index.js +1 -0
- package/dist/components/meal-plan-day.js +1 -0
- package/dist/components/p-B4H61SFd.js +1 -0
- package/dist/components/p-BJJZH_Cc.js +1 -0
- package/dist/components/p-BJU3HdRm.js +1 -0
- package/dist/components/p-BRKGu69u.js +1 -0
- package/dist/components/p-BZBToMAv.js +1 -0
- package/dist/components/p-BekLK-Pb.js +1 -0
- package/dist/components/p-COHQTgKC.js +1 -0
- package/dist/components/p-DsyQvPDo.js +1 -0
- package/dist/components/p-kbrkhGSm.js +1 -0
- package/dist/components/recipe-card.js +1 -0
- package/dist/components/recipe-filter-bar.js +1 -0
- package/dist/components/recipe-form.js +1 -0
- package/dist/components/recipe-rating.js +1 -0
- package/dist/components/recipe-search-bar.js +1 -0
- package/dist/esm/app-globals-DQuL1Twl.js +3 -0
- package/dist/esm/app-modal_7.entry.js +225 -0
- package/dist/{recipe-ui/app-toast-DjuZTKj8.js → esm/app-toast.entry.js} +3 -6
- package/dist/esm/index-CrZUP9M-.js +1567 -0
- package/dist/esm/index.js +3 -0
- package/dist/esm/loader.js +11 -0
- package/dist/esm/recipe-ui.js +21 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/recipe-ui/index.esm.js +1 -17
- package/dist/recipe-ui/p-6ef28048.entry.js +1 -0
- package/dist/recipe-ui/p-CrZUP9M-.js +3 -0
- package/dist/recipe-ui/p-DQuL1Twl.js +1 -0
- package/dist/recipe-ui/p-e2f3c9b9.entry.js +1 -0
- package/dist/recipe-ui/recipe-ui.esm.js +1 -50
- package/package.json +1 -1
- package/dist/recipe-ui/app-modal-BL_aVG1A.js +0 -23
- package/dist/recipe-ui/app-modal-BL_aVG1A.js.map +0 -1
- package/dist/recipe-ui/app-modal.entry.js +0 -5
- package/dist/recipe-ui/app-modal.entry.js.map +0 -1
- package/dist/recipe-ui/app-toast-DjuZTKj8.js.map +0 -1
- package/dist/recipe-ui/app-toast.entry.js +0 -5
- package/dist/recipe-ui/app-toast.entry.js.map +0 -1
- package/dist/recipe-ui/index-DV5P9Jd8.js +0 -4656
- package/dist/recipe-ui/index-DV5P9Jd8.js.map +0 -1
- package/dist/recipe-ui/index.esm.js.map +0 -1
- package/dist/recipe-ui/meal-plan-day-9rmKiM44.js +0 -23
- package/dist/recipe-ui/meal-plan-day-9rmKiM44.js.map +0 -1
- package/dist/recipe-ui/meal-plan-day.entry.js +0 -5
- package/dist/recipe-ui/meal-plan-day.entry.js.map +0 -1
- package/dist/recipe-ui/recipe-card-91fhJAz5.js +0 -28
- package/dist/recipe-ui/recipe-card-91fhJAz5.js.map +0 -1
- package/dist/recipe-ui/recipe-card.entry.js +0 -5
- package/dist/recipe-ui/recipe-card.entry.js.map +0 -1
- package/dist/recipe-ui/recipe-filter-bar-DV-B7Ybe.js +0 -25
- package/dist/recipe-ui/recipe-filter-bar-DV-B7Ybe.js.map +0 -1
- package/dist/recipe-ui/recipe-filter-bar.entry.js +0 -5
- package/dist/recipe-ui/recipe-filter-bar.entry.js.map +0 -1
- package/dist/recipe-ui/recipe-form-D_DZ8L9Q.js.map +0 -1
- package/dist/recipe-ui/recipe-form.entry.js +0 -5
- package/dist/recipe-ui/recipe-form.entry.js.map +0 -1
- package/dist/recipe-ui/recipe-rating-BZDgwNdK.js +0 -23
- package/dist/recipe-ui/recipe-rating-BZDgwNdK.js.map +0 -1
- package/dist/recipe-ui/recipe-rating.entry.js +0 -5
- package/dist/recipe-ui/recipe-rating.entry.js.map +0 -1
- package/dist/recipe-ui/recipe-search-bar-BVbznAHF.js +0 -47
- package/dist/recipe-ui/recipe-search-bar-BVbznAHF.js.map +0 -1
- package/dist/recipe-ui/recipe-search-bar.entry.js +0 -5
- package/dist/recipe-ui/recipe-search-bar.entry.js.map +0 -1
- package/dist/recipe-ui/recipe-ui.esm.js.map +0 -1
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { app_modal as AppModal, meal_plan_day as MealPlanDay, recipe_card as RecipeCard, recipe_filter_bar as RecipeFilterBar, recipe_form as RecipeForm, recipe_rating as RecipeRating, recipe_search_bar as RecipeSearchBar } from './app-modal.meal-plan-day.recipe-card.recipe-filter-bar.recipe-form.recipe-rating.recipe-search-bar.entry.js';
|
|
2
|
+
export { app_toast as AppToast } from './app-toast.entry.js';
|
|
3
|
+
import './index-CrZUP9M-.js';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { b as bootstrapLazy } from './index-CrZUP9M-.js';
|
|
2
|
+
export { s as setNonce } from './index-CrZUP9M-.js';
|
|
3
|
+
import { g as globalScripts } from './app-globals-DQuL1Twl.js';
|
|
4
|
+
|
|
5
|
+
const defineCustomElements = async (win, options) => {
|
|
6
|
+
if (typeof window === 'undefined') return undefined;
|
|
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);
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export { defineCustomElements };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { p as promiseResolve, b as bootstrapLazy } from './index-CrZUP9M-.js';
|
|
2
|
+
export { s as setNonce } from './index-CrZUP9M-.js';
|
|
3
|
+
import { g as globalScripts } from './app-globals-DQuL1Twl.js';
|
|
4
|
+
|
|
5
|
+
/*
|
|
6
|
+
Stencil Client Patch Browser v4.44.0 | MIT Licensed | https://stenciljs.com
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
var patchBrowser = () => {
|
|
10
|
+
const importMeta = import.meta.url;
|
|
11
|
+
const opts = {};
|
|
12
|
+
if (importMeta !== "") {
|
|
13
|
+
opts.resourcesUrl = new URL(".", importMeta).href;
|
|
14
|
+
}
|
|
15
|
+
return promiseResolve(opts);
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
patchBrowser().then(async (options) => {
|
|
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);
|
|
21
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require('./cjs/index.cjs.js');
|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './esm/index.js';
|
|
@@ -1,17 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
export { R as RecipeSearchBar } from './recipe-search-bar-BVbznAHF.js';
|
|
3
|
-
export { R as RecipeFilterBar } from './recipe-filter-bar-DV-B7Ybe.js';
|
|
4
|
-
export { R as RecipeRating } from './recipe-rating-BZDgwNdK.js';
|
|
5
|
-
export { R as RecipeForm } from './recipe-form-D_DZ8L9Q.js';
|
|
6
|
-
export { M as MealPlanDay } from './meal-plan-day-9rmKiM44.js';
|
|
7
|
-
export { A as AppModal } from './app-modal-BL_aVG1A.js';
|
|
8
|
-
export { A as AppToast } from './app-toast-DjuZTKj8.js';
|
|
9
|
-
import './index-DV5P9Jd8.js';
|
|
10
|
-
|
|
11
|
-
// Barrel export of all component classes. Not required for the actual
|
|
12
|
-
// dist-custom-elements build (Stencil discovers @Component-decorated
|
|
13
|
-
// classes automatically via stencil.config.ts), but useful if a consumer
|
|
14
|
-
// ever wants typed access to the component classes themselves.
|
|
15
|
-
//# sourceMappingURL=index.esm.js.map
|
|
16
|
-
|
|
17
|
-
//# sourceMappingURL=index.esm.js.map
|
|
1
|
+
export{app_modal as AppModal,meal_plan_day as MealPlanDay,recipe_card as RecipeCard,recipe_filter_bar as RecipeFilterBar,recipe_form as RecipeForm,recipe_rating as RecipeRating,recipe_search_bar as RecipeSearchBar}from"./app-modal.meal-plan-day.recipe-card.recipe-filter-bar.recipe-form.recipe-rating.recipe-search-bar.entry.esm.js";export{app_toast as AppToast}from"./app-toast.entry.esm.js";import"./p-CrZUP9M-.js";
|
|
@@ -0,0 +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}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
function t(t,e,n){const o="undefined"!=typeof HTMLElement?HTMLElement.prototype:null;for(;t&&t!==o;){const o=Object.getOwnPropertyDescriptor(t,e);if(o&&(!n||o.get))return o;t=Object.getPrototypeOf(t)}}var e,n=(e,n)=>{var o;Object.entries(null!=(o=n.o.t)?o:{}).map((([o,[l]])=>{if(31&l||32&l){const l=e[o],i=t(Object.getPrototypeOf(e),o,!0)||Object.getOwnPropertyDescriptor(e,o);i&&Object.defineProperty(e,o,{get(){return i.get.call(this)},set(t){i.set.call(this,t)},configurable:!0,enumerable:!0}),n.l.has(o)?e[o]=n.l.get(o):void 0!==l&&(e[o]=l)}}))},o=t=>{if(t.__stencil__getHostRef)return t.__stencil__getHostRef()},l=(t,e)=>{e&&(t.__stencil__getHostRef=()=>e,e.i=t,512&e.o.u&&n(t,e))},i=(t,e)=>e in t,s=(t,e)=>(0,console.error)(t,e),r=new Map,c=new Map,u=new Map,f="undefined"!=typeof window?window:{},a={u:0,p:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,e,n,o)=>t.addEventListener(e,n,o),rel:(t,e,n,o)=>t.removeEventListener(e,n,o),ce:(t,e)=>new CustomEvent(t,e)},d=t=>Promise.resolve(t),p=(()=>{try{return!!f.document.adoptedStyleSheets&&(new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync)}catch(t){}return!1})(),h=!!p&&(()=>!!f.document&&Object.getOwnPropertyDescriptor(f.document.adoptedStyleSheets,"length").writable)(),m=!1,v=[],y=[],b=()=>{var t;return(null==(t=f.document)?void 0:t.hidden)?j(g):a.raf(g)},$=(t,e)=>n=>{t.push(n),m||(m=!0,e&&4&a.u?j(g):b())},w=t=>{for(let e=0;e<t.length;e++)try{t[e](performance.now())}catch(t){s(t)}t.length=0},g=()=>{w(v),w(y),(m=v.length>0)&&b()},j=t=>d().then(t),S=$(y,!0);function O(){const t=this.attachShadow({mode:"open"});void 0===e&&(e=null),e&&(h?t.adoptedStyleSheets.push(e):t.adoptedStyleSheets=[...t.adoptedStyleSheets,e])}function k(t){var e,n,o;return null!=(o=null==(n=null==(e=t.head)?void 0:e.querySelector('meta[name="csp-nonce"]'))?void 0:n.getAttribute("content"))?o:void 0}var M,E=new WeakMap,C=t=>"sc-"+t.h,N=t=>"object"==(t=typeof t)||"function"===t,x=(t,e,...n)=>{let o=null,l=null,i=!1,r=!1;const c=[],u=e=>{for(let n=0;n<e.length;n++)if(o=e[n],Array.isArray(o))u(o);else if(null!=o&&"boolean"!=typeof o){if(i="function"!=typeof t&&!N(o))o+="";else if("function"!=typeof t&&void 0===o.u){s("Invalid vNode child");continue}i&&r?c[c.length-1].m+=o:c.push(i?A(null,o):o),r=i}};if(u(n),e){e.key&&(l=e.key);{const t=e.className||e.class;t&&(e.class="object"!=typeof t?t:Object.keys(t).filter((e=>t[e])).join(" "))}}const f=A(t,null);return f.v=e,c.length>0&&(f.$=c),f.j=l,f},A=(t,e)=>({u:0,S:t,m:null!=e?e:null,O:null,$:null,v:null,j:null}),L={},R=t=>{if(!t)return;const e=Object.keys(t);if(0===e.length)return;let n=!1;for(const o of e){if(n)break;for(const e of t[o])if("string"==typeof e){n=!0;break}}if(!n)return t;const o={};for(const n of e)o[n]=t[n].map((t=>"string"==typeof t?{[t]:0}:t));return o},T=(t,e)=>null==t||N(t)?t:4&e?"false"!==t&&(""===t||!!t):2&e?"string"==typeof t?parseFloat(t):"number"==typeof t?t:NaN:1&e?t+"":t,D=(t,e)=>{const n=(t=>{var e;return null==(e=o(t))?void 0:e.$hostElement$})(t);return{emit:t=>P(n,e,{bubbles:!0,composed:!0,cancelable:!0,detail:t})}},P=(t,e,n)=>{const o=a.ce(e,n);return t.dispatchEvent(o),o},H=(t,e,n,l,s,r)=>{if(n===l)return;let c=i(t,e),u=e.toLowerCase();if("class"===e){const e=t.classList,o=W(n);let i=W(l);e.remove(...o.filter((t=>t&&!i.includes(t)))),e.add(...i.filter((t=>t&&!o.includes(t))))}else if("key"===e);else if(c||"o"!==e[0]||"n"!==e[1]){if("a"===e[0]&&e.startsWith("attr:")){const n=e.slice(5);let i;{const e=o(t);if(e&&e.o&&e.o.t){const t=e.o.t[n];t&&t[1]&&(i=t[1])}}return i||(i=n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()),void(null==l||!1===l?!1===l&&""!==t.getAttribute(i)||t.removeAttribute(i):t.setAttribute(i,!0===l?"":l))}if("p"===e[0]&&e.startsWith("prop:")){const n=e.slice(5);try{t[n]=l}catch(t){}return}{const o=N(l);if((c||o&&null!==l)&&!s)try{if(t.tagName.includes("-"))t[e]!==l&&(t[e]=l);else{const o=null==l?"":l;"list"===e?c=!1:null!=n&&t[e]===o||("function"==typeof t.__lookupSetter__(e)?t[e]=o:t.setAttribute(e,o))}}catch(t){}null==l||!1===l?!1===l&&""!==t.getAttribute(e)||t.removeAttribute(e):(!c||4&r||s)&&!o&&1===t.nodeType&&t.setAttribute(e,l=!0===l?"":l)}}else if(e="-"===e[2]?e.slice(3):i(f,u)?u.slice(2):u[2]+e.slice(3),n||l){const o=e.endsWith(z);e=e.replace(F,""),n&&a.rel(t,e,n,o),l&&a.ael(t,e,l,o)}},U=/\s/,W=t=>("object"==typeof t&&t&&"baseVal"in t&&(t=t.baseVal),t&&"string"==typeof t?t.split(U):[]),z="Capture",F=RegExp(z+"$"),V=(t,e,n)=>{const o=11===e.O.nodeType&&e.O.host?e.O.host:e.O,l=t&&t.v||{},i=e.v||{};for(const t of q(Object.keys(l)))t in i||H(o,t,l[t],void 0,n,e.u);for(const t of q(Object.keys(i)))H(o,t,l[t],i[t],n,e.u)};function q(t){return t.includes("ref")?[...t.filter((t=>"ref"!==t)),"ref"]:t}var B=!1,G=!1,I=(t,e,n)=>{const o=e.$[n];let l,i,s=0;if(null!=o.m)l=o.O=f.document.createTextNode(o.m);else{if(!f.document)throw Error("You are trying to render a Stencil component in an environment that doesn't support the DOM.");if(l=o.O=f.document.createElement(o.S),V(null,o,G),o.$){const e="template"===o.S?l.content:l;for(s=0;s<o.$.length;++s)i=I(t,o,s),i&&e.appendChild(i)}}return l["s-hn"]=M,l},Y=(t,e,n,o,l,i)=>{let s,r=t;for(r.shadowRoot&&r.tagName===M&&(r=r.shadowRoot),"template"===n.S&&(r=r.content);l<=i;++l)o[l]&&(s=I(null,n,l),s&&(o[l].O=s,K(r,s,e)))},Z=(t,e,n)=>{for(let o=e;o<=n;++o){const e=t[o];if(e){const t=e.O;t&&t.remove()}}},_=(t,e,n=!1)=>t.S===e.S&&(n?(n&&!t.j&&e.j&&(t.j=e.j),!0):t.j===e.j),J=(t,e,n=!1)=>{const o=e.O=t.O,l=t.$,i=e.$,s=e.m;null==s?("slot"!==e.S||B||t.k!==e.k&&(e.O["s-sn"]=e.k||"",(t=>{a.u|=1;const e=t.closest(M.toLowerCase());if(null!=e){const n=Array.from(e.__childNodes||e.childNodes).find((t=>t["s-cr"])),o=Array.from(t.__childNodes||t.childNodes);for(const t of n?o.reverse():o)null!=t["s-sh"]&&(K(e,t,null!=n?n:null),t["s-sh"]=void 0)}a.u&=-2})(e.O.parentElement)),V(t,e,G),null!==l&&null!==i?((t,e,n,o,l=!1)=>{let i,s,r=0,c=0,u=0,f=0,a=e.length-1,d=e[0],p=e[a],h=o.length-1,m=o[0],v=o[h];const y="template"===n.S?t.content:t;for(;r<=a&&c<=h;)if(null==d)d=e[++r];else if(null==p)p=e[--a];else if(null==m)m=o[++c];else if(null==v)v=o[--h];else if(_(d,m,l))J(d,m,l),d=e[++r],m=o[++c];else if(_(p,v,l))J(p,v,l),p=e[--a],v=o[--h];else if(_(d,v,l))J(d,v,l),K(y,d.O,p.O.nextSibling),d=e[++r],v=o[--h];else if(_(p,m,l))J(p,m,l),K(y,p.O,d.O),p=e[--a],m=o[++c];else{for(u=-1,f=r;f<=a;++f)if(e[f]&&null!==e[f].j&&e[f].j===m.j){u=f;break}u>=0?(s=e[u],s.S!==m.S?i=I(e&&e[c],n,u):(J(s,m,l),e[u]=void 0,i=s.O),m=o[++c]):(i=I(e&&e[c],n,c),m=o[++c]),i&&K(d.O.parentNode,i,d.O)}r>a?Y(t,null==o[h+1]?null:o[h+1].O,n,o,c,h):c>h&&Z(e,r,a)})(o,l,e,i,n):null!==i?(null!==t.m&&(o.textContent=""),Y(o,null,e,i,0,i.length-1)):!n&&null!==l&&Z(l,0,l.length-1)):t.m!==s&&(o.data=s)},K=(t,e,n)=>t.__insertBefore?t.__insertBefore(e,n):null==t?void 0:t.insertBefore(e,n),Q=(t,e)=>{if(e&&!t.M&&e["s-p"]){const n=e["s-p"].push(new Promise((o=>t.M=()=>{e["s-p"].splice(n-1,1),o()})))}},X=(t,e)=>{if(t.u|=16,4&t.u)return void(t.u|=512);Q(t,t.C);const n=()=>tt(t,e);if(!e)return S(n);queueMicrotask((()=>{n()}))},tt=(t,e)=>{const n=t.$hostElement$,o=t.i;if(!o)throw Error(`Can't render component <${n.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let l;return e?(t.N.length&&t.N.forEach((t=>t(n))),l=rt(o,"componentWillLoad",void 0,n)):l=rt(o,"componentWillUpdate",void 0,n),l=et(l,(()=>rt(o,"componentWillRender",void 0,n))),et(l,(()=>ot(t,o,e)))},et=(t,e)=>nt(t)?t.then(e).catch((t=>{console.error(t),e()})):e(),nt=t=>t instanceof Promise||t&&t.then&&"function"==typeof t.then,ot=async(t,e,n)=>{var o;const l=t.$hostElement$,i=l["s-rc"];n&&(t=>{const e=t.o,n=t.$hostElement$,o=e.u,l=((t,e)=>{var n,o,l;const i=C(e),s=u.get(i);if(!f.document)return i;if(t=11===t.nodeType?t:f.document,s)if("string"==typeof s){let l,r=E.get(t=t.head||t);if(r||E.set(t,r=new Set),!r.has(i)){l=f.document.createElement("style"),l.textContent=s;const c=null!=(n=a.A)?n:k(f.document);if(null!=c&&l.setAttribute("nonce",c),!(1&e.u))if("HEAD"===t.nodeName){const e=t.querySelectorAll("link[rel=preconnect]"),n=e.length>0?e[e.length-1].nextSibling:t.querySelector("style");t.insertBefore(l,(null==n?void 0:n.parentNode)===t?n:null)}else if("host"in t)if(p){const e=new(null!=(o=t.defaultView)?o:t.ownerDocument.defaultView).CSSStyleSheet;e.replaceSync(s),h?t.adoptedStyleSheets.unshift(e):t.adoptedStyleSheets=[e,...t.adoptedStyleSheets]}else{const e=t.querySelector("style");e?e.textContent=s+e.textContent:t.prepend(l)}else t.append(l);1&e.u&&t.insertBefore(l,null),4&e.u&&(l.textContent+="slot-fb{display:contents}slot-fb[hidden]{display:none}"),r&&r.add(i)}}else{let e=E.get(t);if(e||E.set(t,e=new Set),!e.has(i)){const n=null!=(l=t.defaultView)?l:t.ownerDocument.defaultView;let o;if(s.constructor===n.CSSStyleSheet)o=s;else{o=new n.CSSStyleSheet;for(let t=0;t<s.cssRules.length;t++)o.insertRule(s.cssRules[t].cssText,t)}h?t.adoptedStyleSheets.push(o):t.adoptedStyleSheets=[...t.adoptedStyleSheets,o],e.add(i)}}return i})(n.shadowRoot?n.shadowRoot:n.getRootNode(),e);10&o&&(n["s-sc"]=l,n.classList.add(l+"-h"))})(t);lt(t,e,l,n),i&&(i.map((t=>t())),l["s-rc"]=void 0);{const e=null!=(o=l["s-p"])?o:[],n=()=>it(t);0===e.length?n():(Promise.all(e).then(n).catch(n),t.u|=4,e.length=0)}},lt=(t,e,n,o)=>{try{e=e.render(),t.u&=-17,t.u|=2,((t,e,n=!1)=>{const o=t.$hostElement$,l=t.o,i=t.L||A(null,null),s=(t=>t&&t.S===L)(e)?e:x(null,null,e);if(M=o.tagName,n&&s.v)for(const t of Object.keys(s.v))o.hasAttribute(t)&&!["key","ref","style","class"].includes(t)&&(s.v[t]=o[t]);s.S=null,s.u|=4,t.L=s,s.O=i.O=o.shadowRoot||o,B=!(!(1&l.u)||128&l.u),J(i,s,n)})(t,e,o)}catch(e){s(e,t.$hostElement$)}return null},it=t=>{const e=t.$hostElement$,n=t.i,o=t.C;rt(n,"componentDidRender",void 0,e),64&t.u?rt(n,"componentDidUpdate",void 0,e):(t.u|=64,ct(e),rt(n,"componentDidLoad",void 0,e),t.R(e),o||st()),t.M&&(t.M(),t.M=void 0),512&t.u&&j((()=>X(t,!1))),t.u&=-517},st=()=>{j((()=>P(f,"appload",{detail:{namespace:"recipe-ui"}})))},rt=(t,e,n,o)=>{if(t&&t[e])try{return t[e](n)}catch(t){s(t,o)}},ct=t=>t.classList.add("hydrated"),ut=(t,e,n,l)=>{const i=o(t);if(!i)return;if(!i)throw Error(`Couldn't find host element for "${l.h}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/stenciljs/core/issues/5457).`);const r=i.$hostElement$,c=i.l.get(e),u=i.u,f=i.i;if(n=T(n,l.t[e][0]),!(8&u&&void 0!==c||n===c||Number.isNaN(c)&&Number.isNaN(n))){if(i.l.set(e,n),l.T){const t=l.T[e];t&&t.map((t=>{try{const[[o,l]]=Object.entries(t);(128&u||1&l)&&(f?f[o](n,c,e):i.N.push((()=>{i.i[o](n,c,e)})))}catch(t){s(t,r)}}))}if(2&u){if(f.componentShouldUpdate&&!1===f.componentShouldUpdate(n,c,e)&&!(16&u))return;16&u||X(i,!1)}}},ft=(e,n,l)=>{var i,s;const r=e.prototype;{e.watchers&&!n.T&&(n.T=R(e.watchers)),e.deserializers&&!n.D&&(n.D=e.deserializers),e.serializers&&!n.P&&(n.P=e.serializers);const c=Object.entries(null!=(i=n.t)?i:{});if(c.map((([e,[i]])=>{if(31&i||2&l&&32&i){const{get:s,set:c}=t(r,e)||{};s&&(n.t[e][0]|=2048),c&&(n.t[e][0]|=4096),(1&l||!s)&&Object.defineProperty(r,e,{get(){{if(!(2048&n.t[e][0]))return((t,e)=>o(this).l.get(e))(0,e);const t=o(this),l=t?t.i:r;if(!l)return;return l[e]}},configurable:!0,enumerable:!0}),Object.defineProperty(r,e,{set(t){const s=o(this);if(s){if(c)return void 0===(32&i?this[e]:s.$hostElement$[e])&&s.l.get(e)&&(t=s.l.get(e)),c.call(this,T(t,i)),void ut(this,e,t=32&i?this[e]:s.$hostElement$[e],n);{if(!(1&l&&4096&n.t[e][0]))return ut(this,e,t,n),void(1&l&&!s.i&&s.N.push((()=>{4096&n.t[e][0]&&s.i[e]!==s.l.get(e)&&(s.i[e]=t)})));const o=()=>{const o=s.i[e];!s.l.get(e)&&o&&s.l.set(e,o),s.i[e]=T(t,i),ut(this,e,s.i[e],n)};s.i?o():s.N.push((()=>{o()}))}}}})}})),1&l){const t=new Map;r.attributeChangedCallback=function(e,l,i){a.jmp((()=>{var s;const u=t.get(e),f=o(this);if(this.hasOwnProperty(u)&&(i=this[u],delete this[u]),r.hasOwnProperty(u)&&"number"==typeof this[u]&&this[u]==i)return;if(null==u){const t=null==f?void 0:f.u;if(f&&t&&!(8&t)&&i!==l){const o=f.i,r=null==(s=n.T)?void 0:s[e];null==r||r.forEach((n=>{const[[s,r]]=Object.entries(n);null!=o[s]&&(128&t||1&r)&&o[s].call(o,i,l,e)}))}return}const a=c.find((([t])=>t===u)),d=a&&4&a[1][0],p=d&&null===i&&void 0===this[u];d&&(i=null!==i&&"false"!==i);const h=Object.getOwnPropertyDescriptor(r,u);p||i==this[u]||h.get&&!h.set||(this[u]=i)}))},e.observedAttributes=Array.from(new Set([...Object.keys(null!=(s=n.T)?s:{}),...c.filter((([t,e])=>31&e[0])).map((([e,n])=>{const o=n[1]||e;return t.set(o,e),o}))]))}}return e},at=async(t,e,n)=>{var o;let l;try{if(!(32&e.u)){if(e.u|=32,e.u&=-1025,n.H){const i=((t,e)=>{var n;const o=t.h.replace(/-/g,"_"),l=t.H;if(!l)return;const i=r.get(l);if(i)return i[o];const u=null!=(n=c.get(l))?n:0,f=[u>0?"s-retry="+u:"",""].filter(Boolean).join("&");
|
|
2
|
+
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/
|
|
3
|
+
return import(`./${l}.entry.js${f?"?"+f:""}`).then((t=>(c.delete(l),r.set(l,t),t[o])),(t=>{c.set(l,u+1),s(t,e.$hostElement$)}))})(n,e);if(i&&"then"in i){const t=()=>{};l=await i,t()}else l=i;if(!l)throw e.u&=-33,e.U=(null!=(o=e.U)?o:0)+1,e.U<3&&(e.u|=1024),Error(`Constructor for "${n.h}#${e.W}" was not found`);l.isProxied||(n.T=R(l.watchers),n.P=l.serializers,n.D=l.deserializers,ft(l,n,2),l.isProxied=!0);const u=()=>{};e.u|=8;try{new l(e)}catch(e){s(e,t)}e.u&=-9,e.u|=128,u(),dt(e.i,t)}else l=t.constructor,customElements.whenDefined(t.localName).then((()=>e.u|=128));if(l&&l.style){let t;"string"==typeof l.style&&(t=l.style);const e=C(n);if(!u.has(e)){const o=()=>{};((t,e,n)=>{let o=u.get(t);p&&n?(o=o||new CSSStyleSheet,"string"==typeof o?o=e:o.replaceSync(e)):o=e,u.set(t,o)})(e,t,!!(1&n.u)),o()}}}const i=e.C,f=()=>X(e,!0);i&&i["s-rc"]?i["s-rc"].push(f):f()}catch(n){s(n,t),e.M&&(e.M(),e.M=void 0),!e.R||1024&e.u||e.R(t)}},dt=(t,e)=>{rt(t,"connectedCallback",void 0,e)},pt=(t,e)=>{rt(t,"disconnectedCallback",void 0,e||t)},ht=(t,e={})=>{var n;if(!f.document)return void console.warn("Stencil: No document found. Skipping bootstrapping lazy components.");const l=[],i=e.exclude||[],s=f.customElements,r=f.document.head,c=r.querySelector("meta[charset]"),u=f.document.createElement("style"),d=[];let p,h=!0;if(Object.assign(a,e),a.p=new URL(e.resourcesUrl||"./",f.document.baseURI).href,t.map((t=>{t[1].map((e=>{var n,r;const c={u:e[0],h:e[1],t:e[2],F:e[3]};c.t=e[2],c.T=R(e[4]),c.P=null!=(n=e[5])?n:{},c.D=null!=(r=e[6])?r:{};const u=c.h,f=class extends HTMLElement{"s-p";"s-rc";hasRegisteredEventListeners=!1;constructor(t){if(super(t),((t,e)=>{const n={u:0,$hostElement$:t,o:e,l:new Map,V:new Map};n.q=new Promise((t=>n.R=t)),t["s-p"]=[],t["s-rc"]=[],n.N=[];const o=n;t.__stencil__getHostRef=()=>o})(t=this,c),1&c.u)if(t.shadowRoot){if("open"!==t.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${c.h}! Mode is set to ${t.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else O.call(t,c)}connectedCallback(){o(this)&&(this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0),p&&(clearTimeout(p),p=null),h?d.push(this):a.jmp((()=>(t=>{if(!(1&a.u)){const e=o(t);if(!e)return;const n=e.o,l=()=>{};if(1&e.u)(null==e?void 0:e.i)?dt(e.i,t):1024&e.u?setTimeout((()=>at(t,e,n)),1e3):(null==e?void 0:e.q)&&e.q.then((()=>dt(e.i,t)));else{e.u|=1;{let n=t;for(;n=n.parentNode||n.host;)if(n["s-p"]){Q(e,e.C=n);break}}n.t&&Object.entries(n.t).map((([e,[n]])=>{if(31&n&&Object.prototype.hasOwnProperty.call(t,e)){const n=t[e];delete t[e],t[e]=n}})),at(t,e,n)}l()}})(this))))}disconnectedCallback(){a.jmp((()=>(async t=>{if(!(1&a.u)){const e=o(t);(null==e?void 0:e.i)?pt(e.i,t):(null==e?void 0:e.q)&&e.q.then((()=>pt(e.i,t)))}E.has(t)&&E.delete(t),t.shadowRoot&&E.has(t.shadowRoot)&&E.delete(t.shadowRoot)})(this))),j((()=>{var t;const e=o(this);if(!e)return;const n=d.findIndex((t=>t===this));n>-1&&d.splice(n,1),(null==(t=null==e?void 0:e.L)?void 0:t.O)instanceof Node&&!e.L.O.isConnected&&delete e.L.O}))}componentOnReady(){var t;return null==(t=o(this))?void 0:t.q}};c.H=t[0],i.includes(u)||s.get(u)||(l.push(u),s.define(u,ft(f,c,1)))}))})),l.length>0&&(u.textContent+=l.sort()+"{visibility:hidden}.hydrated{visibility:inherit}",u.innerHTML.length)){u.setAttribute("data-styles","");const t=null!=(n=a.A)?n:k(f.document);null!=t&&u.setAttribute("nonce",t),r.insertBefore(u,c?c.nextSibling:r.firstChild)}h=!1,d.length?d.map((t=>t.connectedCallback())):a.jmp((()=>p=setTimeout(st,30)))},mt=t=>a.A=t;export{ht as b,D as c,x as h,d as p,l as r,mt as s}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const o=()=>{};export{o as g}
|
|
@@ -0,0 +1 @@
|
|
|
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 r=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))))}};r.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 o=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})},"★"))))}};o.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:"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,r as recipe_filter_bar,d as recipe_form,o as recipe_rating,s as recipe_search_bar}
|
|
@@ -1,50 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
export { s as setNonce } from './index-DV5P9Jd8.js';
|
|
3
|
-
|
|
4
|
-
/*
|
|
5
|
-
Stencil Client Patch Browser v4.44.0 | MIT Licensed | https://stenciljs.com
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
var patchBrowser = () => {
|
|
9
|
-
if (BUILD.isDev && !BUILD.isTesting) {
|
|
10
|
-
consoleDevInfo("Running in development mode.");
|
|
11
|
-
}
|
|
12
|
-
if (BUILD.cloneNodeFix) {
|
|
13
|
-
patchCloneNodeFix(H.prototype);
|
|
14
|
-
}
|
|
15
|
-
const scriptElm = BUILD.scriptDataOpts ? win.document && Array.from(win.document.querySelectorAll("script")).find(
|
|
16
|
-
(s) => new RegExp(`/${NAMESPACE}(\\.esm)?\\.js($|\\?|#)`).test(s.src) || s.getAttribute("data-stencil-namespace") === NAMESPACE
|
|
17
|
-
) : null;
|
|
18
|
-
const importMeta = import.meta.url;
|
|
19
|
-
const opts = BUILD.scriptDataOpts ? (scriptElm || {})["data-opts"] || {} : {};
|
|
20
|
-
if (importMeta !== "") {
|
|
21
|
-
opts.resourcesUrl = new URL(".", importMeta).href;
|
|
22
|
-
}
|
|
23
|
-
return promiseResolve(opts);
|
|
24
|
-
};
|
|
25
|
-
var patchCloneNodeFix = (HTMLElementPrototype) => {
|
|
26
|
-
const nativeCloneNodeFn = HTMLElementPrototype.cloneNode;
|
|
27
|
-
HTMLElementPrototype.cloneNode = function(deep) {
|
|
28
|
-
if (this.nodeName === "TEMPLATE") {
|
|
29
|
-
return nativeCloneNodeFn.call(this, deep);
|
|
30
|
-
}
|
|
31
|
-
const clonedNode = nativeCloneNodeFn.call(this, false);
|
|
32
|
-
const srcChildNodes = this.childNodes;
|
|
33
|
-
if (deep) {
|
|
34
|
-
for (let i = 0; i < srcChildNodes.length; i++) {
|
|
35
|
-
if (srcChildNodes[i].nodeType !== 2) {
|
|
36
|
-
clonedNode.appendChild(srcChildNodes[i].cloneNode(true));
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
return clonedNode;
|
|
41
|
-
};
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
patchBrowser().then(async (options) => {
|
|
45
|
-
await globalScripts();
|
|
46
|
-
return bootstrapLazy([["app-modal",[[257,"app-modal",{"open":[4],"modalTitle":[1,"modal-title"]}]]],["app-toast",[[1,"app-toast",{"message":[1],"type":[1],"duration":[2]}]]],["meal-plan-day",[[1,"meal-plan-day",{"day":[1],"meals":[16]}]]],["recipe-card",[[257,"recipe-card",{"recipeTitle":[1,"recipe-title"],"image":[1],"category":[1],"favorite":[4]}]]],["recipe-filter-bar",[[1,"recipe-filter-bar",{"categories":[16],"active":[1]}]]],["recipe-form",[[257,"recipe-form",{"initialData":[1,"initial-data"],"title":[32],"image":[32],"category":[32],"ingredients":[32],"instructions":[32],"errors":[32]},null,{"initialData":[{"onInitialDataChange":0}]}]]],["recipe-rating",[[1,"recipe-rating",{"value":[2],"readonly":[4],"max":[2]}]]],["recipe-search-bar",[[1,"recipe-search-bar",{"placeholder":[1],"value":[1],"debounceMs":[2,"debounce-ms"],"internalValue":[32]},null,{"value":[{"onValuePropChange":0}]}]]]], options);
|
|
47
|
-
});
|
|
48
|
-
//# sourceMappingURL=recipe-ui.esm.js.map
|
|
49
|
-
|
|
50
|
-
//# sourceMappingURL=recipe-ui.esm.js.map
|
|
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-e2f3c9b9",[[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))));
|
package/package.json
CHANGED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, a as createEvent, h } from './index-DV5P9Jd8.js';
|
|
2
|
-
|
|
3
|
-
const appModalCss = () => `: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}`;
|
|
4
|
-
|
|
5
|
-
const AppModal = class {
|
|
6
|
-
constructor(hostRef) {
|
|
7
|
-
registerInstance(this, hostRef);
|
|
8
|
-
this.close = createEvent(this, "close", 7);
|
|
9
|
-
this.open = false;
|
|
10
|
-
this.modalTitle = '';
|
|
11
|
-
}
|
|
12
|
-
render() {
|
|
13
|
-
if (!this.open)
|
|
14
|
-
return null;
|
|
15
|
-
return (h("div", { class: "overlay", onClick: () => this.close.emit() }, h("div", { class: "dialog", onClick: (e) => e.stopPropagation() }, h("div", { class: "header" }, h("h2", null, this.modalTitle), h("button", { class: "close-btn", onClick: () => this.close.emit(), "aria-label": "Close" }, "\u2715")), h("div", { class: "body" }, h("slot", null)))));
|
|
16
|
-
}
|
|
17
|
-
};
|
|
18
|
-
AppModal.style = appModalCss();
|
|
19
|
-
|
|
20
|
-
export { AppModal as A };
|
|
21
|
-
//# sourceMappingURL=app-modal-BL_aVG1A.js.map
|
|
22
|
-
|
|
23
|
-
//# sourceMappingURL=app-modal-BL_aVG1A.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"app-modal-BL_aVG1A.js","sources":["src/components/app-modal/app-modal.css?tag=app-modal&encapsulation=shadow","src/components/app-modal/app-modal.tsx"],"sourcesContent":[":host { font-family: system-ui, sans-serif; }\n.overlay {\n position: fixed; inset: 0; background: rgba(0, 0, 0, 0.45);\n display: flex; align-items: center; justify-content: center; z-index: 1000;\n}\n.dialog {\n background: #fff; border-radius: 12px; min-width: 320px; max-width: 90vw;\n max-height: 85vh; overflow-y: auto; padding: 20px; box-shadow: 0 10px 40px rgba(0,0,0,0.2);\n}\n.header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }\n.header h2 { margin: 0; font-size: 18px; }\n.close-btn { border: none; background: none; font-size: 16px; cursor: pointer; color: #666; }\n","import { Component, Prop, Event, EventEmitter, h } from '@stencil/core';\n\n/** Generic modal dialog. Body content is provided via the default slot. */\n@Component({\n tag: 'app-modal',\n styleUrl: 'app-modal.css',\n shadow: true,\n})\nexport class AppModal {\n @Prop() open: boolean = false;\n @Prop() modalTitle: string = '';\n\n @Event() close: EventEmitter<void>;\n\n render() {\n if (!this.open) return null;\n return (\n <div class=\"overlay\" onClick={() => this.close.emit()}>\n <div class=\"dialog\" onClick={(e) => e.stopPropagation()}>\n <div class=\"header\">\n <h2>{this.modalTitle}</h2>\n <button class=\"close-btn\" onClick={() => this.close.emit()} aria-label=\"Close\">\n ✕\n </button>\n </div>\n <div class=\"body\">\n <slot></slot>\n </div>\n </div>\n </div>\n );\n }\n}\n"],"names":[],"mappings":";;AAAA,MAAM,WAAW,GAAG,MAAM,CAAC,qhBAAqhB,CAAC;;MCQpiB,QAAQ,GAAA,MAAA;AALrB,IAAA,WAAA,CAAA,OAAA,EAAA;;;AAMU,QAAA,IAAA,CAAA,IAAI,GAAY,KAAK;AACrB,QAAA,IAAA,CAAA,UAAU,GAAW,EAAE;AAsBhC;IAlBC,MAAM,GAAA;QACJ,IAAI,CAAC,IAAI,CAAC,IAAI;AAAE,YAAA,OAAO,IAAI;QAC3B,QACE,CAAA,CAAA,KAAA,EAAA,EAAK,KAAK,EAAC,SAAS,EAAC,OAAO,EAAE,MAAM,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,EAAA,EACnD,CAAA,CAAA,KAAA,EAAA,EAAK,KAAK,EAAC,QAAQ,EAAC,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,eAAe,EAAE,EAAA,EACrD,CAAA,CAAA,KAAA,EAAA,EAAK,KAAK,EAAC,QAAQ,EAAA,EACjB,CAAA,CAAA,IAAA,EAAA,IAAA,EAAK,IAAI,CAAC,UAAU,CAAM,EAC1B,CAAA,CAAA,QAAA,EAAA,EAAQ,KAAK,EAAC,WAAW,EAAC,OAAO,EAAE,MAAM,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,EAAA,YAAA,EAAa,OAAO,aAErE,CACL,EACN,CAAA,CAAA,KAAA,EAAA,EAAK,KAAK,EAAC,MAAM,EAAA,EACf,CAAA,CAAA,MAAA,EAAA,IAAA,CAAa,CACT,CACF,CACF;;;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"file":"app-modal.entry.js","mappings":";","names":[],"sources":[],"sourcesContent":[],"version":3}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"app-toast-DjuZTKj8.js","sources":["src/components/app-toast/app-toast.css?tag=app-toast&encapsulation=shadow","src/components/app-toast/app-toast.tsx"],"sourcesContent":[":host { font-family: system-ui, sans-serif; display: block; }\n.toast {\n display: flex; align-items: center; gap: 10px; padding: 10px 16px;\n border-radius: 8px; color: #fff; font-size: 14px; box-shadow: 0 4px 12px rgba(0,0,0,0.15);\n}\n.toast.success { background: #2ecc71; }\n.toast.error { background: #e74c3c; }\n.toast.info { background: #3498db; }\nbutton { border: none; background: none; color: inherit; cursor: pointer; margin-left: auto; }\n","import { Component, Prop, Event, EventEmitter, h } from '@stencil/core';\n\n/** Simple notification toast. Auto-dismisses after `duration` ms if > 0. */\n@Component({\n tag: 'app-toast',\n styleUrl: 'app-toast.css',\n shadow: true,\n})\nexport class AppToast {\n @Prop() message: string = '';\n @Prop() type: 'success' | 'error' | 'info' = 'info';\n @Prop() duration: number = 3000;\n\n @Event() dismiss: EventEmitter<void>;\n\n componentDidLoad() {\n if (this.duration > 0) {\n setTimeout(() => this.dismiss.emit(), this.duration);\n }\n }\n\n render() {\n return (\n <div class={`toast ${this.type}`}>\n <span>{this.message}</span>\n <button onClick={() => this.dismiss.emit()} aria-label=\"Dismiss\">✕</button>\n </div>\n );\n }\n}\n"],"names":[],"mappings":";;AAAA,MAAM,WAAW,GAAG,MAAM,CAAC,6XAA6X,CAAC;;MCQ5Y,QAAQ,GAAA,MAAA;AALrB,IAAA,WAAA,CAAA,OAAA,EAAA;;;AAMU,QAAA,IAAA,CAAA,OAAO,GAAW,EAAE;AACpB,QAAA,IAAA,CAAA,IAAI,GAAiC,MAAM;AAC3C,QAAA,IAAA,CAAA,QAAQ,GAAW,IAAI;AAkBhC;IAdC,gBAAgB,GAAA;AACd,QAAA,IAAI,IAAI,CAAC,QAAQ,GAAG,CAAC,EAAE;AACrB,YAAA,UAAU,CAAC,MAAM,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,IAAI,CAAC,QAAQ,CAAC;;;IAIxD,MAAM,GAAA;AACJ,QAAA,QACE,4DAAK,KAAK,EAAE,SAAS,IAAI,CAAC,IAAI,CAAA,CAAE,EAAA,EAC9B,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,EAAO,IAAI,CAAC,OAAO,CAAQ,EAC3B,CAAA,CAAA,QAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAQ,OAAO,EAAE,MAAM,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,EAAA,YAAA,EAAa,SAAS,EAAA,EAAA,QAAA,CAAW,CACvE;;;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"file":"app-toast.entry.js","mappings":";","names":[],"sources":[],"sourcesContent":[],"version":3}
|