@zerops/web-components 0.0.1
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/README.md +117 -0
- package/chunks/browser-DeGg1Z-r.js +2927 -0
- package/chunks/register-C5_R6XU0.js +24212 -0
- package/package.json +24 -0
- package/recipe-card.d.ts +51 -0
- package/recipe-card.js +1 -0
- package/recipes/zerops-showcase.json +1 -0
- package/style.css +1 -0
package/package.json
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@zerops/web-components",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "Zerops UI as framework-agnostic web components — drop a <script>, get live, deployable recipe cards on any page.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"homepage": "https://zerops.io",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/zeropsio/apps.git"
|
|
10
|
+
},
|
|
11
|
+
"type": "module",
|
|
12
|
+
"sideEffects": true,
|
|
13
|
+
"exports": {
|
|
14
|
+
"./recipe-card": {
|
|
15
|
+
"types": "./recipe-card.d.ts",
|
|
16
|
+
"default": "./recipe-card.js"
|
|
17
|
+
},
|
|
18
|
+
"./style.css": "./style.css",
|
|
19
|
+
"./recipes/*": "./recipes/*"
|
|
20
|
+
},
|
|
21
|
+
"publishConfig": {
|
|
22
|
+
"access": "public"
|
|
23
|
+
}
|
|
24
|
+
}
|
package/recipe-card.d.ts
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Importing this module registers the <zerops-recipe-card> custom element.
|
|
3
|
+
*/
|
|
4
|
+
export interface ZeropsRecipeCardElement extends HTMLElement {
|
|
5
|
+
/** Catalog slug — the element fetches the recipe from the public API. */
|
|
6
|
+
slug: string | undefined;
|
|
7
|
+
/**
|
|
8
|
+
* Pre-captured raw recipe (see the package's recipes/*.json) — renders
|
|
9
|
+
* synchronously with no API call and wins over `slug`. Accepts the object
|
|
10
|
+
* or a JSON string.
|
|
11
|
+
*/
|
|
12
|
+
recipeData: object | string | undefined;
|
|
13
|
+
/** Public API origin. Default: https://api.zerops.io */
|
|
14
|
+
apiBase: string;
|
|
15
|
+
/** App origin for detail/deploy links. Default: https://app.zerops.io */
|
|
16
|
+
appUrl: string;
|
|
17
|
+
|
|
18
|
+
addEventListener<K extends keyof ZeropsRecipeCardEventMap>(
|
|
19
|
+
type: K,
|
|
20
|
+
listener: (this: ZeropsRecipeCardElement, ev: ZeropsRecipeCardEventMap[K]) => void,
|
|
21
|
+
options?: boolean | AddEventListenerOptions,
|
|
22
|
+
): void;
|
|
23
|
+
addEventListener(
|
|
24
|
+
type: string,
|
|
25
|
+
listener: EventListenerOrEventListenerObject,
|
|
26
|
+
options?: boolean | AddEventListenerOptions,
|
|
27
|
+
): void;
|
|
28
|
+
removeEventListener<K extends keyof ZeropsRecipeCardEventMap>(
|
|
29
|
+
type: K,
|
|
30
|
+
listener: (this: ZeropsRecipeCardElement, ev: ZeropsRecipeCardEventMap[K]) => void,
|
|
31
|
+
options?: boolean | EventListenerOptions,
|
|
32
|
+
): void;
|
|
33
|
+
removeEventListener(
|
|
34
|
+
type: string,
|
|
35
|
+
listener: EventListenerOrEventListenerObject,
|
|
36
|
+
options?: boolean | EventListenerOptions,
|
|
37
|
+
): void;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export interface ZeropsRecipeCardEventMap {
|
|
41
|
+
/** Deploy clicked — detail is the app URL opened in the new tab. */
|
|
42
|
+
deployed: CustomEvent<string>;
|
|
43
|
+
/** A detail/title link was clicked. */
|
|
44
|
+
detailOpened: CustomEvent<void>;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
declare global {
|
|
48
|
+
interface HTMLElementTagNameMap {
|
|
49
|
+
'zerops-recipe-card': ZeropsRecipeCardElement;
|
|
50
|
+
}
|
|
51
|
+
}
|
package/recipe-card.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "./chunks/register-C5_R6XU0.js";
|