wc-img-ai 0.0.2 → 0.0.3
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/wc-img-ai.js +3 -0
- package/package.json +5 -1
- package/types/ai-image.d.ts +16 -1
package/dist/wc-img-ai.js
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wc-img-ai",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.3",
|
|
5
5
|
"description": "Use AI to generate images for your img tags.",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "John Romani",
|
|
@@ -21,6 +21,10 @@
|
|
|
21
21
|
"dist",
|
|
22
22
|
"types"
|
|
23
23
|
],
|
|
24
|
+
"main": "./dist/wc-img-ai.js",
|
|
25
|
+
"exports": {
|
|
26
|
+
".": "./dist/wc-img-ai.js"
|
|
27
|
+
},
|
|
24
28
|
"devDependencies": {
|
|
25
29
|
"@typescript-eslint/eslint-plugin": "^6.17.0",
|
|
26
30
|
"@typescript-eslint/parser": "^6.17.0",
|
package/types/ai-image.d.ts
CHANGED
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
export declare class AIImage extends HTMLImageElement {
|
|
2
|
+
static get observedAttributes(): string[];
|
|
3
|
+
private _fallbackSrc;
|
|
4
|
+
private _prompt;
|
|
5
|
+
private _originalSrc;
|
|
6
|
+
private svgPlaceholder;
|
|
7
|
+
private _endpoint;
|
|
8
|
+
private ph_w;
|
|
9
|
+
private ph_h;
|
|
10
|
+
constructor();
|
|
11
|
+
get src(): string;
|
|
12
|
+
set src(value: string);
|
|
13
|
+
set fallbackSrc(value: string | null);
|
|
14
|
+
attributeChangedCallback(name: string, _oldValue: string, newValue: string): void;
|
|
15
|
+
protected getGeneratedImage: (endpoint: string, prompt: string, width: number, height: number) => Promise<string | undefined>;
|
|
16
|
+
}
|
|
1
17
|
declare global {
|
|
2
18
|
interface AIImage extends HTMLImageElement {
|
|
3
19
|
"data-fallback"?: string;
|
|
@@ -6,4 +22,3 @@ declare global {
|
|
|
6
22
|
"ai-image": AIImage;
|
|
7
23
|
}
|
|
8
24
|
}
|
|
9
|
-
export {};
|