@gurpinderjitsingh/recipe-ui 0.1.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 (65) hide show
  1. package/README.md +38 -0
  2. package/dist/components/app-modal.d.ts +11 -0
  3. package/dist/components/app-toast.d.ts +11 -0
  4. package/dist/components/index.d.ts +35 -0
  5. package/dist/components/meal-plan-day.d.ts +11 -0
  6. package/dist/components/recipe-card.d.ts +11 -0
  7. package/dist/components/recipe-filter-bar.d.ts +11 -0
  8. package/dist/components/recipe-form.d.ts +11 -0
  9. package/dist/components/recipe-rating.d.ts +11 -0
  10. package/dist/components/recipe-search-bar.d.ts +11 -0
  11. package/dist/recipe-ui/app-modal-BL_aVG1A.js +23 -0
  12. package/dist/recipe-ui/app-modal-BL_aVG1A.js.map +1 -0
  13. package/dist/recipe-ui/app-modal.entry.js +5 -0
  14. package/dist/recipe-ui/app-modal.entry.js.map +1 -0
  15. package/dist/recipe-ui/app-toast-DjuZTKj8.js +27 -0
  16. package/dist/recipe-ui/app-toast-DjuZTKj8.js.map +1 -0
  17. package/dist/recipe-ui/app-toast.entry.js +5 -0
  18. package/dist/recipe-ui/app-toast.entry.js.map +1 -0
  19. package/dist/recipe-ui/index-DV5P9Jd8.js +4656 -0
  20. package/dist/recipe-ui/index-DV5P9Jd8.js.map +1 -0
  21. package/dist/recipe-ui/index.esm.js +17 -0
  22. package/dist/recipe-ui/index.esm.js.map +1 -0
  23. package/dist/recipe-ui/meal-plan-day-9rmKiM44.js +23 -0
  24. package/dist/recipe-ui/meal-plan-day-9rmKiM44.js.map +1 -0
  25. package/dist/recipe-ui/meal-plan-day.entry.js +5 -0
  26. package/dist/recipe-ui/meal-plan-day.entry.js.map +1 -0
  27. package/dist/recipe-ui/recipe-card-91fhJAz5.js +28 -0
  28. package/dist/recipe-ui/recipe-card-91fhJAz5.js.map +1 -0
  29. package/dist/recipe-ui/recipe-card.entry.js +5 -0
  30. package/dist/recipe-ui/recipe-card.entry.js.map +1 -0
  31. package/dist/recipe-ui/recipe-filter-bar-DV-B7Ybe.js +25 -0
  32. package/dist/recipe-ui/recipe-filter-bar-DV-B7Ybe.js.map +1 -0
  33. package/dist/recipe-ui/recipe-filter-bar.entry.js +5 -0
  34. package/dist/recipe-ui/recipe-filter-bar.entry.js.map +1 -0
  35. package/dist/recipe-ui/recipe-form-D_DZ8L9Q.js +95 -0
  36. package/dist/recipe-ui/recipe-form-D_DZ8L9Q.js.map +1 -0
  37. package/dist/recipe-ui/recipe-form.entry.js +5 -0
  38. package/dist/recipe-ui/recipe-form.entry.js.map +1 -0
  39. package/dist/recipe-ui/recipe-rating-BZDgwNdK.js +23 -0
  40. package/dist/recipe-ui/recipe-rating-BZDgwNdK.js.map +1 -0
  41. package/dist/recipe-ui/recipe-rating.entry.js +5 -0
  42. package/dist/recipe-ui/recipe-rating.entry.js.map +1 -0
  43. package/dist/recipe-ui/recipe-search-bar-BVbznAHF.js +47 -0
  44. package/dist/recipe-ui/recipe-search-bar-BVbznAHF.js.map +1 -0
  45. package/dist/recipe-ui/recipe-search-bar.entry.js +5 -0
  46. package/dist/recipe-ui/recipe-search-bar.entry.js.map +1 -0
  47. package/dist/recipe-ui/recipe-ui.esm.js +50 -0
  48. package/dist/recipe-ui/recipe-ui.esm.js.map +1 -0
  49. package/dist/types/components/app-modal/app-modal.d.ts +8 -0
  50. package/dist/types/components/app-toast/app-toast.d.ts +10 -0
  51. package/dist/types/components/meal-plan-day/meal-plan-day.d.ts +25 -0
  52. package/dist/types/components/recipe-card/recipe-card.d.ts +26 -0
  53. package/dist/types/components/recipe-filter-bar/recipe-filter-bar.d.ts +16 -0
  54. package/dist/types/components/recipe-form/recipe-form.d.ts +35 -0
  55. package/dist/types/components/recipe-rating/recipe-rating.d.ts +11 -0
  56. package/dist/types/components/recipe-search-bar/recipe-search-bar.d.ts +20 -0
  57. package/dist/types/components.d.ts +620 -0
  58. package/dist/types/index.d.ts +8 -0
  59. package/dist/types/stencil-public-runtime.d.ts +1872 -0
  60. package/loader/cdn.js +1 -0
  61. package/loader/index.cjs.js +1 -0
  62. package/loader/index.d.ts +24 -0
  63. package/loader/index.es2017.js +1 -0
  64. package/loader/index.js +2 -0
  65. package/package.json +38 -0
@@ -0,0 +1,11 @@
1
+ import { EventEmitter } from '../../stencil-public-runtime';
2
+ /** 5-star rating. Read-only display or interactive input. */
3
+ export declare class RecipeRating {
4
+ value: number;
5
+ readonly: boolean;
6
+ max: number;
7
+ ratingChange: EventEmitter<{
8
+ value: number;
9
+ }>;
10
+ render(): any;
11
+ }
@@ -0,0 +1,20 @@
1
+ import { EventEmitter } from '../../stencil-public-runtime';
2
+ /**
3
+ * A debounced search input. Emits `search` with the current value
4
+ * after the user stops typing (default 350ms) or presses Enter.
5
+ */
6
+ export declare class RecipeSearchBar {
7
+ placeholder: string;
8
+ value: string;
9
+ debounceMs: number;
10
+ internalValue: string;
11
+ search: EventEmitter<{
12
+ value: string;
13
+ }>;
14
+ private timer;
15
+ componentWillLoad(): void;
16
+ onValuePropChange(newVal: string): void;
17
+ private onInput;
18
+ private onKeyDown;
19
+ render(): any;
20
+ }
@@ -0,0 +1,620 @@
1
+ /* eslint-disable */
2
+ /* tslint:disable */
3
+ /**
4
+ * This is an autogenerated file created by the Stencil compiler.
5
+ * It contains typing information for all components that exist in this project.
6
+ */
7
+ import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime";
8
+ import { PlannedMeal } from "./components/meal-plan-day/meal-plan-day";
9
+ import { RecipeFormData } from "./components/recipe-form/recipe-form";
10
+ export { PlannedMeal } from "./components/meal-plan-day/meal-plan-day";
11
+ export { RecipeFormData } from "./components/recipe-form/recipe-form";
12
+ export namespace Components {
13
+ /**
14
+ * Generic modal dialog. Body content is provided via the default slot.
15
+ */
16
+ interface AppModal {
17
+ /**
18
+ * @default ''
19
+ */
20
+ "modalTitle": string;
21
+ /**
22
+ * @default false
23
+ */
24
+ "open": boolean;
25
+ }
26
+ /**
27
+ * Simple notification toast. Auto-dismisses after `duration` ms if > 0.
28
+ */
29
+ interface AppToast {
30
+ /**
31
+ * @default 3000
32
+ */
33
+ "duration": number;
34
+ /**
35
+ * @default ''
36
+ */
37
+ "message": string;
38
+ /**
39
+ * @default 'info'
40
+ */
41
+ "type": 'success' | 'error' | 'info';
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
+ interface MealPlanDay {
51
+ /**
52
+ * @default ''
53
+ */
54
+ "day": string;
55
+ /**
56
+ * @default []
57
+ */
58
+ "meals": PlannedMeal[];
59
+ }
60
+ /**
61
+ * Displays a summary of a recipe (image, title, category) inside a card.
62
+ * Emits `cardClick` when the card body is clicked and `favoriteToggle`
63
+ * when the favorite button is pressed. Accepts a named `actions` slot
64
+ * for extra buttons supplied by the consuming app.
65
+ */
66
+ interface RecipeCard {
67
+ /**
68
+ * Category / cuisine label
69
+ * @default ''
70
+ */
71
+ "category": string;
72
+ /**
73
+ * Whether this recipe is currently favorited
74
+ * @default false
75
+ */
76
+ "favorite": boolean;
77
+ /**
78
+ * Image URL
79
+ */
80
+ "image": string;
81
+ /**
82
+ * Recipe title (named recipeTitle, not title, to avoid colliding with the native HTML title/tooltip attribute every element already has)
83
+ */
84
+ "recipeTitle": string;
85
+ }
86
+ /**
87
+ * Renders a row of selectable filter chips (e.g. categories/cuisines).
88
+ * `categories` accepts either a JSON string array or an actual array
89
+ * (Stencil auto-parses complex props passed as attributes).
90
+ * Emits `filterChange` with the selected value ('' = all).
91
+ */
92
+ interface RecipeFilterBar {
93
+ /**
94
+ * @default ''
95
+ */
96
+ "active": string;
97
+ /**
98
+ * @default []
99
+ */
100
+ "categories": string[];
101
+ }
102
+ /**
103
+ * Add/edit form for user-created recipes. Performs client-side validation
104
+ * (title required, at least one non-empty ingredient, instructions required)
105
+ * and only emits `save` once the data is valid.
106
+ */
107
+ interface RecipeForm {
108
+ /**
109
+ * Pass an existing recipe (as a JSON string or object) to edit it
110
+ */
111
+ "initialData": RecipeFormData | string;
112
+ }
113
+ /**
114
+ * 5-star rating. Read-only display or interactive input.
115
+ */
116
+ interface RecipeRating {
117
+ /**
118
+ * @default 5
119
+ */
120
+ "max": number;
121
+ /**
122
+ * @default false
123
+ */
124
+ "readonly": boolean;
125
+ /**
126
+ * @default 0
127
+ */
128
+ "value": number;
129
+ }
130
+ /**
131
+ * A debounced search input. Emits `search` with the current value
132
+ * after the user stops typing (default 350ms) or presses Enter.
133
+ */
134
+ interface RecipeSearchBar {
135
+ /**
136
+ * @default 350
137
+ */
138
+ "debounceMs": number;
139
+ /**
140
+ * @default 'Search recipes...'
141
+ */
142
+ "placeholder": string;
143
+ /**
144
+ * @default ''
145
+ */
146
+ "value": string;
147
+ }
148
+ }
149
+ export interface AppModalCustomEvent<T> extends CustomEvent<T> {
150
+ detail: T;
151
+ target: HTMLAppModalElement;
152
+ }
153
+ export interface AppToastCustomEvent<T> extends CustomEvent<T> {
154
+ detail: T;
155
+ target: HTMLAppToastElement;
156
+ }
157
+ export interface MealPlanDayCustomEvent<T> extends CustomEvent<T> {
158
+ detail: T;
159
+ target: HTMLMealPlanDayElement;
160
+ }
161
+ export interface RecipeCardCustomEvent<T> extends CustomEvent<T> {
162
+ detail: T;
163
+ target: HTMLRecipeCardElement;
164
+ }
165
+ export interface RecipeFilterBarCustomEvent<T> extends CustomEvent<T> {
166
+ detail: T;
167
+ target: HTMLRecipeFilterBarElement;
168
+ }
169
+ export interface RecipeFormCustomEvent<T> extends CustomEvent<T> {
170
+ detail: T;
171
+ target: HTMLRecipeFormElement;
172
+ }
173
+ export interface RecipeRatingCustomEvent<T> extends CustomEvent<T> {
174
+ detail: T;
175
+ target: HTMLRecipeRatingElement;
176
+ }
177
+ export interface RecipeSearchBarCustomEvent<T> extends CustomEvent<T> {
178
+ detail: T;
179
+ target: HTMLRecipeSearchBarElement;
180
+ }
181
+ declare global {
182
+ interface HTMLAppModalElementEventMap {
183
+ "close": void;
184
+ }
185
+ /**
186
+ * Generic modal dialog. Body content is provided via the default slot.
187
+ */
188
+ interface HTMLAppModalElement extends Components.AppModal, HTMLStencilElement {
189
+ addEventListener<K extends keyof HTMLAppModalElementEventMap>(type: K, listener: (this: HTMLAppModalElement, ev: AppModalCustomEvent<HTMLAppModalElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
190
+ addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
191
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
192
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
193
+ removeEventListener<K extends keyof HTMLAppModalElementEventMap>(type: K, listener: (this: HTMLAppModalElement, ev: AppModalCustomEvent<HTMLAppModalElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
194
+ removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
195
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
196
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
197
+ }
198
+ var HTMLAppModalElement: {
199
+ prototype: HTMLAppModalElement;
200
+ new (): HTMLAppModalElement;
201
+ };
202
+ interface HTMLAppToastElementEventMap {
203
+ "dismiss": void;
204
+ }
205
+ /**
206
+ * Simple notification toast. Auto-dismisses after `duration` ms if > 0.
207
+ */
208
+ interface HTMLAppToastElement extends Components.AppToast, HTMLStencilElement {
209
+ addEventListener<K extends keyof HTMLAppToastElementEventMap>(type: K, listener: (this: HTMLAppToastElement, ev: AppToastCustomEvent<HTMLAppToastElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
210
+ addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
211
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
212
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
213
+ removeEventListener<K extends keyof HTMLAppToastElementEventMap>(type: K, listener: (this: HTMLAppToastElement, ev: AppToastCustomEvent<HTMLAppToastElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
214
+ removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
215
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
216
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
217
+ }
218
+ var HTMLAppToastElement: {
219
+ prototype: HTMLAppToastElement;
220
+ new (): HTMLAppToastElement;
221
+ };
222
+ interface HTMLMealPlanDayElementEventMap {
223
+ "assignMeal": { day: string };
224
+ "removeMeal": { day: string; mealId: string };
225
+ }
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
+ interface HTMLMealPlanDayElement extends Components.MealPlanDay, HTMLStencilElement {
234
+ addEventListener<K extends keyof HTMLMealPlanDayElementEventMap>(type: K, listener: (this: HTMLMealPlanDayElement, ev: MealPlanDayCustomEvent<HTMLMealPlanDayElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
235
+ addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
236
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
237
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
238
+ removeEventListener<K extends keyof HTMLMealPlanDayElementEventMap>(type: K, listener: (this: HTMLMealPlanDayElement, ev: MealPlanDayCustomEvent<HTMLMealPlanDayElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
239
+ removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
240
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
241
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
242
+ }
243
+ var HTMLMealPlanDayElement: {
244
+ prototype: HTMLMealPlanDayElement;
245
+ new (): HTMLMealPlanDayElement;
246
+ };
247
+ interface HTMLRecipeCardElementEventMap {
248
+ "favoriteToggle": { favorite: boolean };
249
+ "cardClick": void;
250
+ }
251
+ /**
252
+ * Displays a summary of a recipe (image, title, category) inside a card.
253
+ * Emits `cardClick` when the card body is clicked and `favoriteToggle`
254
+ * when the favorite button is pressed. Accepts a named `actions` slot
255
+ * for extra buttons supplied by the consuming app.
256
+ */
257
+ interface HTMLRecipeCardElement extends Components.RecipeCard, HTMLStencilElement {
258
+ addEventListener<K extends keyof HTMLRecipeCardElementEventMap>(type: K, listener: (this: HTMLRecipeCardElement, ev: RecipeCardCustomEvent<HTMLRecipeCardElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
259
+ addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
260
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
261
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
262
+ removeEventListener<K extends keyof HTMLRecipeCardElementEventMap>(type: K, listener: (this: HTMLRecipeCardElement, ev: RecipeCardCustomEvent<HTMLRecipeCardElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
263
+ removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
264
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
265
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
266
+ }
267
+ var HTMLRecipeCardElement: {
268
+ prototype: HTMLRecipeCardElement;
269
+ new (): HTMLRecipeCardElement;
270
+ };
271
+ interface HTMLRecipeFilterBarElementEventMap {
272
+ "filterChange": { value: string };
273
+ }
274
+ /**
275
+ * Renders a row of selectable filter chips (e.g. categories/cuisines).
276
+ * `categories` accepts either a JSON string array or an actual array
277
+ * (Stencil auto-parses complex props passed as attributes).
278
+ * Emits `filterChange` with the selected value ('' = all).
279
+ */
280
+ interface HTMLRecipeFilterBarElement extends Components.RecipeFilterBar, HTMLStencilElement {
281
+ addEventListener<K extends keyof HTMLRecipeFilterBarElementEventMap>(type: K, listener: (this: HTMLRecipeFilterBarElement, ev: RecipeFilterBarCustomEvent<HTMLRecipeFilterBarElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
282
+ addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
283
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
284
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
285
+ removeEventListener<K extends keyof HTMLRecipeFilterBarElementEventMap>(type: K, listener: (this: HTMLRecipeFilterBarElement, ev: RecipeFilterBarCustomEvent<HTMLRecipeFilterBarElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
286
+ removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
287
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
288
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
289
+ }
290
+ var HTMLRecipeFilterBarElement: {
291
+ prototype: HTMLRecipeFilterBarElement;
292
+ new (): HTMLRecipeFilterBarElement;
293
+ };
294
+ interface HTMLRecipeFormElementEventMap {
295
+ "save": RecipeFormData;
296
+ "cancel": void;
297
+ }
298
+ /**
299
+ * Add/edit form for user-created recipes. Performs client-side validation
300
+ * (title required, at least one non-empty ingredient, instructions required)
301
+ * and only emits `save` once the data is valid.
302
+ */
303
+ interface HTMLRecipeFormElement extends Components.RecipeForm, HTMLStencilElement {
304
+ addEventListener<K extends keyof HTMLRecipeFormElementEventMap>(type: K, listener: (this: HTMLRecipeFormElement, ev: RecipeFormCustomEvent<HTMLRecipeFormElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
305
+ addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
306
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
307
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
308
+ removeEventListener<K extends keyof HTMLRecipeFormElementEventMap>(type: K, listener: (this: HTMLRecipeFormElement, ev: RecipeFormCustomEvent<HTMLRecipeFormElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
309
+ removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
310
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
311
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
312
+ }
313
+ var HTMLRecipeFormElement: {
314
+ prototype: HTMLRecipeFormElement;
315
+ new (): HTMLRecipeFormElement;
316
+ };
317
+ interface HTMLRecipeRatingElementEventMap {
318
+ "ratingChange": { value: number };
319
+ }
320
+ /**
321
+ * 5-star rating. Read-only display or interactive input.
322
+ */
323
+ interface HTMLRecipeRatingElement extends Components.RecipeRating, HTMLStencilElement {
324
+ addEventListener<K extends keyof HTMLRecipeRatingElementEventMap>(type: K, listener: (this: HTMLRecipeRatingElement, ev: RecipeRatingCustomEvent<HTMLRecipeRatingElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
325
+ addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
326
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
327
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
328
+ removeEventListener<K extends keyof HTMLRecipeRatingElementEventMap>(type: K, listener: (this: HTMLRecipeRatingElement, ev: RecipeRatingCustomEvent<HTMLRecipeRatingElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
329
+ removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
330
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
331
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
332
+ }
333
+ var HTMLRecipeRatingElement: {
334
+ prototype: HTMLRecipeRatingElement;
335
+ new (): HTMLRecipeRatingElement;
336
+ };
337
+ interface HTMLRecipeSearchBarElementEventMap {
338
+ "search": { value: string };
339
+ }
340
+ /**
341
+ * A debounced search input. Emits `search` with the current value
342
+ * after the user stops typing (default 350ms) or presses Enter.
343
+ */
344
+ interface HTMLRecipeSearchBarElement extends Components.RecipeSearchBar, HTMLStencilElement {
345
+ addEventListener<K extends keyof HTMLRecipeSearchBarElementEventMap>(type: K, listener: (this: HTMLRecipeSearchBarElement, ev: RecipeSearchBarCustomEvent<HTMLRecipeSearchBarElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
346
+ addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
347
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
348
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
349
+ removeEventListener<K extends keyof HTMLRecipeSearchBarElementEventMap>(type: K, listener: (this: HTMLRecipeSearchBarElement, ev: RecipeSearchBarCustomEvent<HTMLRecipeSearchBarElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
350
+ removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
351
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
352
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
353
+ }
354
+ var HTMLRecipeSearchBarElement: {
355
+ prototype: HTMLRecipeSearchBarElement;
356
+ new (): HTMLRecipeSearchBarElement;
357
+ };
358
+ interface HTMLElementTagNameMap {
359
+ "app-modal": HTMLAppModalElement;
360
+ "app-toast": HTMLAppToastElement;
361
+ "meal-plan-day": HTMLMealPlanDayElement;
362
+ "recipe-card": HTMLRecipeCardElement;
363
+ "recipe-filter-bar": HTMLRecipeFilterBarElement;
364
+ "recipe-form": HTMLRecipeFormElement;
365
+ "recipe-rating": HTMLRecipeRatingElement;
366
+ "recipe-search-bar": HTMLRecipeSearchBarElement;
367
+ }
368
+ }
369
+ declare namespace LocalJSX {
370
+ /**
371
+ * Generic modal dialog. Body content is provided via the default slot.
372
+ */
373
+ interface AppModal {
374
+ /**
375
+ * @default ''
376
+ */
377
+ "modalTitle"?: string;
378
+ "onClose"?: (event: AppModalCustomEvent<void>) => void;
379
+ /**
380
+ * @default false
381
+ */
382
+ "open"?: boolean;
383
+ }
384
+ /**
385
+ * Simple notification toast. Auto-dismisses after `duration` ms if > 0.
386
+ */
387
+ interface AppToast {
388
+ /**
389
+ * @default 3000
390
+ */
391
+ "duration"?: number;
392
+ /**
393
+ * @default ''
394
+ */
395
+ "message"?: string;
396
+ "onDismiss"?: (event: AppToastCustomEvent<void>) => void;
397
+ /**
398
+ * @default 'info'
399
+ */
400
+ "type"?: 'success' | 'error' | 'info';
401
+ }
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
+ interface MealPlanDay {
410
+ /**
411
+ * @default ''
412
+ */
413
+ "day"?: string;
414
+ /**
415
+ * @default []
416
+ */
417
+ "meals"?: PlannedMeal[];
418
+ "onAssignMeal"?: (event: MealPlanDayCustomEvent<{ day: string }>) => void;
419
+ "onRemoveMeal"?: (event: MealPlanDayCustomEvent<{ day: string; mealId: string }>) => void;
420
+ }
421
+ /**
422
+ * Displays a summary of a recipe (image, title, category) inside a card.
423
+ * Emits `cardClick` when the card body is clicked and `favoriteToggle`
424
+ * when the favorite button is pressed. Accepts a named `actions` slot
425
+ * for extra buttons supplied by the consuming app.
426
+ */
427
+ interface RecipeCard {
428
+ /**
429
+ * Category / cuisine label
430
+ * @default ''
431
+ */
432
+ "category"?: string;
433
+ /**
434
+ * Whether this recipe is currently favorited
435
+ * @default false
436
+ */
437
+ "favorite"?: boolean;
438
+ /**
439
+ * Image URL
440
+ */
441
+ "image"?: string;
442
+ /**
443
+ * Fired when the card (excluding the favorite button) is clicked
444
+ */
445
+ "onCardClick"?: (event: RecipeCardCustomEvent<void>) => void;
446
+ /**
447
+ * Fired when the favorite button is toggled
448
+ */
449
+ "onFavoriteToggle"?: (event: RecipeCardCustomEvent<{ favorite: boolean }>) => void;
450
+ /**
451
+ * Recipe title (named recipeTitle, not title, to avoid colliding with the native HTML title/tooltip attribute every element already has)
452
+ */
453
+ "recipeTitle"?: string;
454
+ }
455
+ /**
456
+ * Renders a row of selectable filter chips (e.g. categories/cuisines).
457
+ * `categories` accepts either a JSON string array or an actual array
458
+ * (Stencil auto-parses complex props passed as attributes).
459
+ * Emits `filterChange` with the selected value ('' = all).
460
+ */
461
+ interface RecipeFilterBar {
462
+ /**
463
+ * @default ''
464
+ */
465
+ "active"?: string;
466
+ /**
467
+ * @default []
468
+ */
469
+ "categories"?: string[];
470
+ "onFilterChange"?: (event: RecipeFilterBarCustomEvent<{ value: string }>) => void;
471
+ }
472
+ /**
473
+ * Add/edit form for user-created recipes. Performs client-side validation
474
+ * (title required, at least one non-empty ingredient, instructions required)
475
+ * and only emits `save` once the data is valid.
476
+ */
477
+ interface RecipeForm {
478
+ /**
479
+ * Pass an existing recipe (as a JSON string or object) to edit it
480
+ */
481
+ "initialData"?: RecipeFormData | string;
482
+ "onCancel"?: (event: RecipeFormCustomEvent<void>) => void;
483
+ "onSave"?: (event: RecipeFormCustomEvent<RecipeFormData>) => void;
484
+ }
485
+ /**
486
+ * 5-star rating. Read-only display or interactive input.
487
+ */
488
+ interface RecipeRating {
489
+ /**
490
+ * @default 5
491
+ */
492
+ "max"?: number;
493
+ "onRatingChange"?: (event: RecipeRatingCustomEvent<{ value: number }>) => void;
494
+ /**
495
+ * @default false
496
+ */
497
+ "readonly"?: boolean;
498
+ /**
499
+ * @default 0
500
+ */
501
+ "value"?: number;
502
+ }
503
+ /**
504
+ * A debounced search input. Emits `search` with the current value
505
+ * after the user stops typing (default 350ms) or presses Enter.
506
+ */
507
+ interface RecipeSearchBar {
508
+ /**
509
+ * @default 350
510
+ */
511
+ "debounceMs"?: number;
512
+ "onSearch"?: (event: RecipeSearchBarCustomEvent<{ value: string }>) => void;
513
+ /**
514
+ * @default 'Search recipes...'
515
+ */
516
+ "placeholder"?: string;
517
+ /**
518
+ * @default ''
519
+ */
520
+ "value"?: string;
521
+ }
522
+
523
+ interface AppModalAttributes {
524
+ "open": boolean;
525
+ "modalTitle": string;
526
+ }
527
+ interface AppToastAttributes {
528
+ "message": string;
529
+ "type": 'success' | 'error' | 'info';
530
+ "duration": number;
531
+ }
532
+ interface MealPlanDayAttributes {
533
+ "day": string;
534
+ }
535
+ interface RecipeCardAttributes {
536
+ "recipeTitle": string;
537
+ "image": string;
538
+ "category": string;
539
+ "favorite": boolean;
540
+ }
541
+ interface RecipeFilterBarAttributes {
542
+ "active": string;
543
+ }
544
+ interface RecipeFormAttributes {
545
+ "initialData": RecipeFormData | string;
546
+ }
547
+ interface RecipeRatingAttributes {
548
+ "value": number;
549
+ "readonly": boolean;
550
+ "max": number;
551
+ }
552
+ interface RecipeSearchBarAttributes {
553
+ "placeholder": string;
554
+ "value": string;
555
+ "debounceMs": number;
556
+ }
557
+
558
+ interface IntrinsicElements {
559
+ "app-modal": Omit<AppModal, keyof AppModalAttributes> & { [K in keyof AppModal & keyof AppModalAttributes]?: AppModal[K] } & { [K in keyof AppModal & keyof AppModalAttributes as `attr:${K}`]?: AppModalAttributes[K] } & { [K in keyof AppModal & keyof AppModalAttributes as `prop:${K}`]?: AppModal[K] };
560
+ "app-toast": Omit<AppToast, keyof AppToastAttributes> & { [K in keyof AppToast & keyof AppToastAttributes]?: AppToast[K] } & { [K in keyof AppToast & keyof AppToastAttributes as `attr:${K}`]?: AppToastAttributes[K] } & { [K in keyof AppToast & keyof AppToastAttributes as `prop:${K}`]?: AppToast[K] };
561
+ "meal-plan-day": Omit<MealPlanDay, keyof MealPlanDayAttributes> & { [K in keyof MealPlanDay & keyof MealPlanDayAttributes]?: MealPlanDay[K] } & { [K in keyof MealPlanDay & keyof MealPlanDayAttributes as `attr:${K}`]?: MealPlanDayAttributes[K] } & { [K in keyof MealPlanDay & keyof MealPlanDayAttributes as `prop:${K}`]?: MealPlanDay[K] };
562
+ "recipe-card": Omit<RecipeCard, keyof RecipeCardAttributes> & { [K in keyof RecipeCard & keyof RecipeCardAttributes]?: RecipeCard[K] } & { [K in keyof RecipeCard & keyof RecipeCardAttributes as `attr:${K}`]?: RecipeCardAttributes[K] } & { [K in keyof RecipeCard & keyof RecipeCardAttributes as `prop:${K}`]?: RecipeCard[K] };
563
+ "recipe-filter-bar": Omit<RecipeFilterBar, keyof RecipeFilterBarAttributes> & { [K in keyof RecipeFilterBar & keyof RecipeFilterBarAttributes]?: RecipeFilterBar[K] } & { [K in keyof RecipeFilterBar & keyof RecipeFilterBarAttributes as `attr:${K}`]?: RecipeFilterBarAttributes[K] } & { [K in keyof RecipeFilterBar & keyof RecipeFilterBarAttributes as `prop:${K}`]?: RecipeFilterBar[K] };
564
+ "recipe-form": Omit<RecipeForm, keyof RecipeFormAttributes> & { [K in keyof RecipeForm & keyof RecipeFormAttributes]?: RecipeForm[K] } & { [K in keyof RecipeForm & keyof RecipeFormAttributes as `attr:${K}`]?: RecipeFormAttributes[K] } & { [K in keyof RecipeForm & keyof RecipeFormAttributes as `prop:${K}`]?: RecipeForm[K] };
565
+ "recipe-rating": Omit<RecipeRating, keyof RecipeRatingAttributes> & { [K in keyof RecipeRating & keyof RecipeRatingAttributes]?: RecipeRating[K] } & { [K in keyof RecipeRating & keyof RecipeRatingAttributes as `attr:${K}`]?: RecipeRatingAttributes[K] } & { [K in keyof RecipeRating & keyof RecipeRatingAttributes as `prop:${K}`]?: RecipeRating[K] };
566
+ "recipe-search-bar": Omit<RecipeSearchBar, keyof RecipeSearchBarAttributes> & { [K in keyof RecipeSearchBar & keyof RecipeSearchBarAttributes]?: RecipeSearchBar[K] } & { [K in keyof RecipeSearchBar & keyof RecipeSearchBarAttributes as `attr:${K}`]?: RecipeSearchBarAttributes[K] } & { [K in keyof RecipeSearchBar & keyof RecipeSearchBarAttributes as `prop:${K}`]?: RecipeSearchBar[K] };
567
+ }
568
+ }
569
+ export { LocalJSX as JSX };
570
+ declare module "@stencil/core" {
571
+ export namespace JSX {
572
+ interface IntrinsicElements {
573
+ /**
574
+ * Generic modal dialog. Body content is provided via the default slot.
575
+ */
576
+ "app-modal": LocalJSX.IntrinsicElements["app-modal"] & JSXBase.HTMLAttributes<HTMLAppModalElement>;
577
+ /**
578
+ * Simple notification toast. Auto-dismisses after `duration` ms if > 0.
579
+ */
580
+ "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
+ "meal-plan-day": LocalJSX.IntrinsicElements["meal-plan-day"] & JSXBase.HTMLAttributes<HTMLMealPlanDayElement>;
589
+ /**
590
+ * Displays a summary of a recipe (image, title, category) inside a card.
591
+ * Emits `cardClick` when the card body is clicked and `favoriteToggle`
592
+ * when the favorite button is pressed. Accepts a named `actions` slot
593
+ * for extra buttons supplied by the consuming app.
594
+ */
595
+ "recipe-card": LocalJSX.IntrinsicElements["recipe-card"] & JSXBase.HTMLAttributes<HTMLRecipeCardElement>;
596
+ /**
597
+ * Renders a row of selectable filter chips (e.g. categories/cuisines).
598
+ * `categories` accepts either a JSON string array or an actual array
599
+ * (Stencil auto-parses complex props passed as attributes).
600
+ * Emits `filterChange` with the selected value ('' = all).
601
+ */
602
+ "recipe-filter-bar": LocalJSX.IntrinsicElements["recipe-filter-bar"] & JSXBase.HTMLAttributes<HTMLRecipeFilterBarElement>;
603
+ /**
604
+ * Add/edit form for user-created recipes. Performs client-side validation
605
+ * (title required, at least one non-empty ingredient, instructions required)
606
+ * and only emits `save` once the data is valid.
607
+ */
608
+ "recipe-form": LocalJSX.IntrinsicElements["recipe-form"] & JSXBase.HTMLAttributes<HTMLRecipeFormElement>;
609
+ /**
610
+ * 5-star rating. Read-only display or interactive input.
611
+ */
612
+ "recipe-rating": LocalJSX.IntrinsicElements["recipe-rating"] & JSXBase.HTMLAttributes<HTMLRecipeRatingElement>;
613
+ /**
614
+ * A debounced search input. Emits `search` with the current value
615
+ * after the user stops typing (default 350ms) or presses Enter.
616
+ */
617
+ "recipe-search-bar": LocalJSX.IntrinsicElements["recipe-search-bar"] & JSXBase.HTMLAttributes<HTMLRecipeSearchBarElement>;
618
+ }
619
+ }
620
+ }
@@ -0,0 +1,8 @@
1
+ export { RecipeCard } from './components/recipe-card/recipe-card';
2
+ export { RecipeSearchBar } from './components/recipe-search-bar/recipe-search-bar';
3
+ export { RecipeFilterBar } from './components/recipe-filter-bar/recipe-filter-bar';
4
+ export { RecipeRating } from './components/recipe-rating/recipe-rating';
5
+ export { RecipeForm } from './components/recipe-form/recipe-form';
6
+ export { MealPlanDay } from './components/meal-plan-day/meal-plan-day';
7
+ export { AppModal } from './components/app-modal/app-modal';
8
+ export { AppToast } from './components/app-toast/app-toast';