@ssingh465/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.
- package/LICENSE +21 -0
- package/dist/components/index.d.ts +47 -0
- package/dist/components/index.js +1 -0
- package/dist/components/spike-panel.d.ts +11 -0
- package/dist/components/spike-panel.js +1 -0
- package/dist/types/components/spike-panel/spike-panel.cmp.test.d.ts +1 -0
- package/dist/types/components/spike-panel/spike-panel.d.ts +18 -0
- package/dist/types/components.d.ts +86 -0
- package/dist/types/index.d.ts +10 -0
- package/dist/types/stencil-public-runtime.d.ts +1873 -0
- package/package.json +56 -0
- package/readme.md +34 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Shubhanshu Singh
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Get the base path to where the assets can be found. Use "setAssetPath(path)"
|
|
3
|
+
* if the path needs to be customized.
|
|
4
|
+
*/
|
|
5
|
+
export declare const getAssetPath: (path: string) => string;
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Used to manually set the base path where assets can be found.
|
|
9
|
+
* If the script is used as "module", it's recommended to use "import.meta.url",
|
|
10
|
+
* such as "setAssetPath(import.meta.url)". Other options include
|
|
11
|
+
* "setAssetPath(document.currentScript.src)", or using a bundler's replace plugin to
|
|
12
|
+
* dynamically set the path at build time, such as "setAssetPath(process.env.ASSET_PATH)".
|
|
13
|
+
* But do note that this configuration depends on how your script is bundled, or lack of
|
|
14
|
+
* bundling, and where your assets can be loaded from. Additionally custom bundling
|
|
15
|
+
* will have to ensure the static assets are copied to its build directory.
|
|
16
|
+
*/
|
|
17
|
+
export declare const setAssetPath: (path: string) => void;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Used to specify a nonce value that corresponds with an application's CSP.
|
|
21
|
+
* When set, the nonce will be added to all dynamically created script and style tags at runtime.
|
|
22
|
+
* Alternatively, the nonce value can be set on a meta tag in the DOM head
|
|
23
|
+
* (<meta name="csp-nonce" content="{ nonce value here }" />) which
|
|
24
|
+
* will result in the same behavior.
|
|
25
|
+
*/
|
|
26
|
+
export declare const setNonce: (nonce: string) => void
|
|
27
|
+
|
|
28
|
+
export interface SetPlatformOptions {
|
|
29
|
+
raf?: (c: FrameRequestCallback) => number;
|
|
30
|
+
ael?: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
|
|
31
|
+
rel?: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
|
|
32
|
+
}
|
|
33
|
+
export declare const setPlatformOptions: (opts: SetPlatformOptions) => void;
|
|
34
|
+
|
|
35
|
+
export * from '../types';
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Utility to define all custom elements within this package using the tag name provided in the component's source.
|
|
39
|
+
* When defining each custom element, it will also check it's safe to define by:
|
|
40
|
+
*
|
|
41
|
+
* 1. Ensuring the "customElements" registry is available in the global context (window).
|
|
42
|
+
* 2. Ensuring that the component tag name is not already defined.
|
|
43
|
+
*
|
|
44
|
+
* Use the standard [customElements.define()](https://developer.mozilla.org/en-US/docs/Web/API/CustomElementRegistry/define)
|
|
45
|
+
* method instead to define custom elements individually, or to provide a different tag name.
|
|
46
|
+
*/
|
|
47
|
+
export declare const defineCustomElements: (opts?: any) => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{transformTag as e}from"@stencil/core/internal/client";export{getAssetPath,render,setAssetPath,setNonce,setPlatformOptions}from"@stencil/core/internal/client";import{SpikePanel as t}from"./spike-panel.js";const s=s=>{"undefined"!=typeof customElements&&[t].forEach((t=>{customElements.get(e(t.is))||customElements.define(e(t.is),t,s)}))};export{s as defineCustomElements}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface SpikePanel extends Components.SpikePanel, HTMLElement {}
|
|
4
|
+
export const SpikePanel: {
|
|
5
|
+
prototype: SpikePanel;
|
|
6
|
+
new (): SpikePanel;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{proxyCustomElement as e,HTMLElement as t,createEvent as s,h as i,Host as a,transformTag as n}from"@stencil/core/internal/client";const o=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.spikeaction=s(this,"spikeaction",7)}note;spikeaction;handleClick=()=>{this.spikeaction.emit(this.note??{from:"spike-panel",message:"no note received"})};render(){return i(a,{key:"221dd6681d3ec4376f20d01ba93dc4c07f415ae8"},i("p",{key:"71640f42c20370557f006e79b4f319836cf9ad86"},this.note?`From ${this.note.from}: ${this.note.message}`:"Waiting for an object property..."),i("button",{key:"4d6ae7f247fc84a79072bd305a35b8ad3d28d2ed",type:"button",onClick:this.handleClick},"Emit spikeaction"),i("div",{key:"b7b0c0f4e67a52aef9ff944ec7dbabaa37155aa4",class:"slot-wrap"},i("slot",{key:"968e5f3f190e29a59c315f4b01acb8b722abfb6a"})))}static get style(){return":host{display:block;border:1px solid #ccc;border-radius:8px;padding:1rem;font-family:system-ui, sans-serif}button{cursor:pointer}.slot-wrap{margin-top:0.75rem}"}},[769,"spike-panel",{note:[16]}]),c=o,r=function(){"undefined"!=typeof customElements&&["spike-panel"].forEach((e=>{"spike-panel"===e&&(customElements.get(n(e))||customElements.define(n(e),o))}))};export{c as SpikePanel,r as defineCustomElement}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { EventEmitter } from '../../stencil-public-runtime';
|
|
2
|
+
export interface SpikeNote {
|
|
3
|
+
from: string;
|
|
4
|
+
message: string;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Phase 0 integration spike only. Proves the Stencil <-> SvelteKit seam
|
|
8
|
+
* (object property, custom event, slot) end to end. Not part of the
|
|
9
|
+
* production component set built in Phase 3.
|
|
10
|
+
*/
|
|
11
|
+
export declare class SpikePanel {
|
|
12
|
+
/** Arrives as an object property once the element has upgraded (D-05). */
|
|
13
|
+
note?: SpikeNote;
|
|
14
|
+
/** Lowercase per D-12, so it binds as a plain Svelte `on*` attribute. */
|
|
15
|
+
spikeaction: EventEmitter<SpikeNote>;
|
|
16
|
+
private handleClick;
|
|
17
|
+
render(): any;
|
|
18
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
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 { SpikeNote } from "./components/spike-panel/spike-panel";
|
|
9
|
+
export { SpikeNote } from "./components/spike-panel/spike-panel";
|
|
10
|
+
export namespace Components {
|
|
11
|
+
/**
|
|
12
|
+
* Phase 0 integration spike only. Proves the Stencil <-> SvelteKit seam
|
|
13
|
+
* (object property, custom event, slot) end to end. Not part of the
|
|
14
|
+
* production component set built in Phase 3.
|
|
15
|
+
*/
|
|
16
|
+
interface SpikePanel {
|
|
17
|
+
/**
|
|
18
|
+
* Arrives as an object property once the element has upgraded (D-05).
|
|
19
|
+
*/
|
|
20
|
+
"note"?: SpikeNote;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
export interface SpikePanelCustomEvent<T> extends CustomEvent<T> {
|
|
24
|
+
detail: T;
|
|
25
|
+
target: HTMLSpikePanelElement;
|
|
26
|
+
}
|
|
27
|
+
declare global {
|
|
28
|
+
interface HTMLSpikePanelElementEventMap {
|
|
29
|
+
"spikeaction": SpikeNote;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Phase 0 integration spike only. Proves the Stencil <-> SvelteKit seam
|
|
33
|
+
* (object property, custom event, slot) end to end. Not part of the
|
|
34
|
+
* production component set built in Phase 3.
|
|
35
|
+
*/
|
|
36
|
+
interface HTMLSpikePanelElement extends Components.SpikePanel, HTMLStencilElement {
|
|
37
|
+
addEventListener<K extends keyof HTMLSpikePanelElementEventMap>(type: K, listener: (this: HTMLSpikePanelElement, ev: SpikePanelCustomEvent<HTMLSpikePanelElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
|
|
38
|
+
addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
39
|
+
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
40
|
+
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
41
|
+
removeEventListener<K extends keyof HTMLSpikePanelElementEventMap>(type: K, listener: (this: HTMLSpikePanelElement, ev: SpikePanelCustomEvent<HTMLSpikePanelElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
|
|
42
|
+
removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
43
|
+
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
44
|
+
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
45
|
+
}
|
|
46
|
+
var HTMLSpikePanelElement: {
|
|
47
|
+
prototype: HTMLSpikePanelElement;
|
|
48
|
+
new (): HTMLSpikePanelElement;
|
|
49
|
+
};
|
|
50
|
+
interface HTMLElementTagNameMap {
|
|
51
|
+
"spike-panel": HTMLSpikePanelElement;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
declare namespace LocalJSX {
|
|
55
|
+
/**
|
|
56
|
+
* Phase 0 integration spike only. Proves the Stencil <-> SvelteKit seam
|
|
57
|
+
* (object property, custom event, slot) end to end. Not part of the
|
|
58
|
+
* production component set built in Phase 3.
|
|
59
|
+
*/
|
|
60
|
+
interface SpikePanel {
|
|
61
|
+
/**
|
|
62
|
+
* Arrives as an object property once the element has upgraded (D-05).
|
|
63
|
+
*/
|
|
64
|
+
"note"?: SpikeNote;
|
|
65
|
+
/**
|
|
66
|
+
* Lowercase per D-12, so it binds as a plain Svelte `on*` attribute.
|
|
67
|
+
*/
|
|
68
|
+
"onSpikeaction"?: (event: SpikePanelCustomEvent<SpikeNote>) => void;
|
|
69
|
+
}
|
|
70
|
+
interface IntrinsicElements {
|
|
71
|
+
"spike-panel": SpikePanel;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
export { LocalJSX as JSX };
|
|
75
|
+
declare module "@stencil/core" {
|
|
76
|
+
export namespace JSX {
|
|
77
|
+
interface IntrinsicElements {
|
|
78
|
+
/**
|
|
79
|
+
* Phase 0 integration spike only. Proves the Stencil <-> SvelteKit seam
|
|
80
|
+
* (object property, custom event, slot) end to end. Not part of the
|
|
81
|
+
* production component set built in Phase 3.
|
|
82
|
+
*/
|
|
83
|
+
"spike-panel": LocalJSX.IntrinsicElements["spike-panel"] & JSXBase.HTMLAttributes<HTMLSpikePanelElement>;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview entry point for your component library
|
|
3
|
+
*
|
|
4
|
+
* This is the entry point for your component library. Use this file to export utilities,
|
|
5
|
+
* constants or data structure that accompany your components.
|
|
6
|
+
*
|
|
7
|
+
* DO NOT use this file to export your components. Instead, use the recommended approaches
|
|
8
|
+
* to consume components of this package as outlined in the `README.md`.
|
|
9
|
+
*/
|
|
10
|
+
export type * from './components.d.ts';
|