@wave3d/element 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/README.md +59 -0
- package/dist/index.d.ts +27 -0
- package/dist/index.js +123 -0
- package/dist/index.js.map +1 -0
- package/package.json +52 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Wave Studio contributors
|
|
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.
|
package/README.md
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# @wave3d/element
|
|
2
|
+
|
|
3
|
+
The `<wave-3d>` custom element — a framework-agnostic drop-in animated **3D gradient wave** for Vue, Svelte, or plain HTML.
|
|
4
|
+
|
|
5
|
+
Poster-first and lazy: it shows a poster immediately, then upgrades to live WebGL only when the browser can run it (falling back to the poster on no-WebGL, Save-Data, reduced-motion, or context loss), with `three.js` code-split out of the initial load.
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
```sh
|
|
10
|
+
pnpm add @wave3d/element @wave3d/core three
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
`@wave3d/core` and `three` are peer dependencies.
|
|
14
|
+
|
|
15
|
+
## Usage
|
|
16
|
+
|
|
17
|
+
Importing the package registers `<wave-3d>` automatically:
|
|
18
|
+
|
|
19
|
+
```html
|
|
20
|
+
<script type="module">
|
|
21
|
+
import "@wave3d/element";
|
|
22
|
+
</script>
|
|
23
|
+
|
|
24
|
+
<wave-3d preset="Hero" poster="/wave.png" style="width:480px;height:270px"></wave-3d>
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Attributes & properties
|
|
28
|
+
|
|
29
|
+
| Attribute | What |
|
|
30
|
+
| --------- | ----------------------------------------------------- |
|
|
31
|
+
| `preset` | a built-in preset name (lazy-loads the presets chunk) |
|
|
32
|
+
| `config` | an inline JSON config |
|
|
33
|
+
| `src` | URL to a config JSON to fetch |
|
|
34
|
+
| `poster` | poster image shown before / instead of WebGL |
|
|
35
|
+
| `paused` | pause / resume the animation |
|
|
36
|
+
| `lazy` | defer the upgrade until visible |
|
|
37
|
+
| `webgl` | `auto` \| `force` \| `off` |
|
|
38
|
+
|
|
39
|
+
Also a `config` **property** (merged last, over the attributes) and a read-only `handle` getter. Config precedence: **default ← `preset` ← `src` ← `config` attribute ← `config` property**.
|
|
40
|
+
|
|
41
|
+
## Events
|
|
42
|
+
|
|
43
|
+
- `wave3d-ready` — `detail` is the live `WaveRenderer`.
|
|
44
|
+
- `wave3d-fallback` — `detail` is the fallback reason.
|
|
45
|
+
|
|
46
|
+
## Custom tag name
|
|
47
|
+
|
|
48
|
+
```ts
|
|
49
|
+
import { register } from "@wave3d/element";
|
|
50
|
+
register("my-wave"); // instead of the default <wave-3d>
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Credits
|
|
54
|
+
|
|
55
|
+
Created by [Amir Abushanab](https://github.com/Amir-Abushanab).
|
|
56
|
+
|
|
57
|
+
## License
|
|
58
|
+
|
|
59
|
+
[MIT](https://github.com/Amir-Abushanab/wave3d/blob/main/LICENSE)
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { FallbackReason, StudioConfig, StudioConfig as StudioConfig$1, WaveHandle, WaveHandle as WaveHandle$1, WaveRenderer } from "@wave3d/core";
|
|
2
|
+
|
|
3
|
+
//#region src/index.d.ts
|
|
4
|
+
declare const ElementBase: typeof HTMLElement;
|
|
5
|
+
/**
|
|
6
|
+
* `<wave-3d>` — the framework-agnostic drop-in (Vue/Svelte/plain HTML). Light DOM, `display:block`.
|
|
7
|
+
* Attributes: `config` (JSON), `src` (URL to a config JSON), `preset` (name), `poster`, `paused`,
|
|
8
|
+
* `lazy`, `webgl`. Also a `config` property and a read-only `handle` getter. Emits `wave3d-ready`
|
|
9
|
+
* (detail = renderer) and `wave3d-fallback` (detail = reason) events.
|
|
10
|
+
*/
|
|
11
|
+
declare class Wave3DElement extends ElementBase {
|
|
12
|
+
#private;
|
|
13
|
+
static get observedAttributes(): string[];
|
|
14
|
+
/** The live shell handle (null before connect / after disconnect). */
|
|
15
|
+
get handle(): WaveHandle$1 | null;
|
|
16
|
+
/** Programmatic config, merged last (over the `preset`/`src`/`config` attributes). */
|
|
17
|
+
get config(): Partial<StudioConfig$1>;
|
|
18
|
+
set config(value: Partial<StudioConfig$1>);
|
|
19
|
+
connectedCallback(): void;
|
|
20
|
+
disconnectedCallback(): void;
|
|
21
|
+
attributeChangedCallback(name: string): void;
|
|
22
|
+
}
|
|
23
|
+
/** Define the element (idempotent, SSR/Node-import-safe). */
|
|
24
|
+
declare function register(tag?: string): void;
|
|
25
|
+
//#endregion
|
|
26
|
+
export { type FallbackReason, type StudioConfig, Wave3DElement, type WaveHandle, type WaveRenderer, register };
|
|
27
|
+
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import { createWave } from "@wave3d/core";
|
|
2
|
+
//#region src/index.ts
|
|
3
|
+
const OBSERVED = [
|
|
4
|
+
"config",
|
|
5
|
+
"src",
|
|
6
|
+
"preset",
|
|
7
|
+
"poster",
|
|
8
|
+
"paused",
|
|
9
|
+
"lazy",
|
|
10
|
+
"webgl"
|
|
11
|
+
];
|
|
12
|
+
const ElementBase = typeof HTMLElement !== "undefined" ? HTMLElement : function Wave3DElementBase() {};
|
|
13
|
+
/**
|
|
14
|
+
* `<wave-3d>` — the framework-agnostic drop-in (Vue/Svelte/plain HTML). Light DOM, `display:block`.
|
|
15
|
+
* Attributes: `config` (JSON), `src` (URL to a config JSON), `preset` (name), `poster`, `paused`,
|
|
16
|
+
* `lazy`, `webgl`. Also a `config` property and a read-only `handle` getter. Emits `wave3d-ready`
|
|
17
|
+
* (detail = renderer) and `wave3d-fallback` (detail = reason) events.
|
|
18
|
+
*/
|
|
19
|
+
var Wave3DElement = class extends ElementBase {
|
|
20
|
+
static get observedAttributes() {
|
|
21
|
+
return [...OBSERVED];
|
|
22
|
+
}
|
|
23
|
+
#handle = null;
|
|
24
|
+
#config = {};
|
|
25
|
+
#debounce;
|
|
26
|
+
/** The live shell handle (null before connect / after disconnect). */
|
|
27
|
+
get handle() {
|
|
28
|
+
return this.#handle;
|
|
29
|
+
}
|
|
30
|
+
/** Programmatic config, merged last (over the `preset`/`src`/`config` attributes). */
|
|
31
|
+
get config() {
|
|
32
|
+
return this.#config;
|
|
33
|
+
}
|
|
34
|
+
set config(value) {
|
|
35
|
+
this.#config = value ?? {};
|
|
36
|
+
this.#scheduleUpdate();
|
|
37
|
+
}
|
|
38
|
+
connectedCallback() {
|
|
39
|
+
if (!this.style.display) this.style.display = "block";
|
|
40
|
+
this.#mount();
|
|
41
|
+
}
|
|
42
|
+
disconnectedCallback() {
|
|
43
|
+
clearTimeout(this.#debounce);
|
|
44
|
+
this.#handle?.destroy();
|
|
45
|
+
this.#handle = null;
|
|
46
|
+
}
|
|
47
|
+
attributeChangedCallback(name) {
|
|
48
|
+
if (!this.#handle) return;
|
|
49
|
+
if (name === "paused") if (this.#boolAttr("paused")) this.#handle.pause();
|
|
50
|
+
else this.#handle.play();
|
|
51
|
+
else this.#scheduleUpdate();
|
|
52
|
+
}
|
|
53
|
+
async #mount() {
|
|
54
|
+
const config = await this.#buildConfig();
|
|
55
|
+
if (!this.isConnected) return;
|
|
56
|
+
const options = {
|
|
57
|
+
poster: this.getAttribute("poster") ?? void 0,
|
|
58
|
+
lazy: this.#boolAttr("lazy"),
|
|
59
|
+
webgl: this.getAttribute("webgl") ?? void 0,
|
|
60
|
+
paused: this.#boolAttr("paused"),
|
|
61
|
+
onReady: (renderer) => this.dispatchEvent(new CustomEvent("wave3d-ready", { detail: renderer })),
|
|
62
|
+
onFallback: (reason) => this.dispatchEvent(new CustomEvent("wave3d-fallback", { detail: reason }))
|
|
63
|
+
};
|
|
64
|
+
this.#handle = createWave(this, config, options);
|
|
65
|
+
}
|
|
66
|
+
/** default ← preset ← src JSON ← config attribute ← config property. */
|
|
67
|
+
async #buildConfig() {
|
|
68
|
+
let base = {};
|
|
69
|
+
const presetName = this.getAttribute("preset");
|
|
70
|
+
if (presetName) {
|
|
71
|
+
const { PRESETS } = await import("@wave3d/core/presets");
|
|
72
|
+
base = PRESETS[presetName]?.() ?? {};
|
|
73
|
+
}
|
|
74
|
+
const src = this.getAttribute("src");
|
|
75
|
+
if (src) try {
|
|
76
|
+
base = {
|
|
77
|
+
...base,
|
|
78
|
+
...await fetch(src).then((r) => r.json())
|
|
79
|
+
};
|
|
80
|
+
} catch {}
|
|
81
|
+
base = {
|
|
82
|
+
...base,
|
|
83
|
+
...parseJson(this.getAttribute("config")),
|
|
84
|
+
...this.#config
|
|
85
|
+
};
|
|
86
|
+
return base;
|
|
87
|
+
}
|
|
88
|
+
#scheduleUpdate() {
|
|
89
|
+
clearTimeout(this.#debounce);
|
|
90
|
+
this.#debounce = setTimeout(() => {
|
|
91
|
+
this.#update();
|
|
92
|
+
}, 50);
|
|
93
|
+
}
|
|
94
|
+
async #update() {
|
|
95
|
+
const handle = this.#handle;
|
|
96
|
+
if (!handle) return;
|
|
97
|
+
handle.set(await this.#buildConfig());
|
|
98
|
+
}
|
|
99
|
+
/** Presence = true; `"false"`/`"0"` = false; absent = undefined (shell default). */
|
|
100
|
+
#boolAttr(name) {
|
|
101
|
+
if (!this.hasAttribute(name)) return void 0;
|
|
102
|
+
const value = this.getAttribute(name);
|
|
103
|
+
return value !== "false" && value !== "0";
|
|
104
|
+
}
|
|
105
|
+
};
|
|
106
|
+
function parseJson(json) {
|
|
107
|
+
if (!json) return {};
|
|
108
|
+
try {
|
|
109
|
+
return JSON.parse(json);
|
|
110
|
+
} catch {
|
|
111
|
+
return {};
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
/** Define the element (idempotent, SSR/Node-import-safe). */
|
|
115
|
+
function register(tag = "wave-3d") {
|
|
116
|
+
if (typeof window === "undefined" || typeof customElements === "undefined") return;
|
|
117
|
+
if (!customElements.get(tag)) customElements.define(tag, Wave3DElement);
|
|
118
|
+
}
|
|
119
|
+
register();
|
|
120
|
+
//#endregion
|
|
121
|
+
export { Wave3DElement, register };
|
|
122
|
+
|
|
123
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["#handle","#config","#scheduleUpdate","#mount","#debounce","#boolAttr","#buildConfig","#update"],"sources":["../src/index.ts"],"sourcesContent":["import { createWave } from \"@wave3d/core\";\nimport type {\n StudioConfig,\n WaveHandle,\n WaveOptions,\n WaveRenderer,\n FallbackReason,\n} from \"@wave3d/core\";\n\nconst OBSERVED = [\"config\", \"src\", \"preset\", \"poster\", \"paused\", \"lazy\", \"webgl\"] as const;\n\n// SSR-safe base: `class extends HTMLElement` evaluates HTMLElement at import time, which throws\n// under Node. Fall back to a dummy base there — the element is never instantiated server-side\n// (register() is guarded), so the missing DOM methods are never called.\nconst ElementBase: typeof HTMLElement =\n typeof HTMLElement !== \"undefined\"\n ? HTMLElement\n : (function Wave3DElementBase() {} as unknown as typeof HTMLElement);\n\n/**\n * `<wave-3d>` — the framework-agnostic drop-in (Vue/Svelte/plain HTML). Light DOM, `display:block`.\n * Attributes: `config` (JSON), `src` (URL to a config JSON), `preset` (name), `poster`, `paused`,\n * `lazy`, `webgl`. Also a `config` property and a read-only `handle` getter. Emits `wave3d-ready`\n * (detail = renderer) and `wave3d-fallback` (detail = reason) events.\n */\nexport class Wave3DElement extends ElementBase {\n static get observedAttributes(): string[] {\n return [...OBSERVED];\n }\n\n #handle: WaveHandle | null = null;\n #config: Partial<StudioConfig> = {};\n #debounce?: ReturnType<typeof setTimeout>;\n\n /** The live shell handle (null before connect / after disconnect). */\n get handle(): WaveHandle | null {\n return this.#handle;\n }\n\n /** Programmatic config, merged last (over the `preset`/`src`/`config` attributes). */\n get config(): Partial<StudioConfig> {\n return this.#config;\n }\n set config(value: Partial<StudioConfig>) {\n this.#config = value ?? {};\n this.#scheduleUpdate();\n }\n\n connectedCallback(): void {\n if (!this.style.display) this.style.display = \"block\";\n void this.#mount();\n }\n\n disconnectedCallback(): void {\n clearTimeout(this.#debounce);\n this.#handle?.destroy();\n this.#handle = null;\n }\n\n attributeChangedCallback(name: string): void {\n if (!this.#handle) return;\n if (name === \"paused\") {\n if (this.#boolAttr(\"paused\")) this.#handle.pause();\n else this.#handle.play();\n } else {\n this.#scheduleUpdate();\n }\n }\n\n async #mount(): Promise<void> {\n const config = await this.#buildConfig();\n if (!this.isConnected) return; // disconnected while the config resolved\n const options: WaveOptions = {\n poster: this.getAttribute(\"poster\") ?? undefined,\n lazy: this.#boolAttr(\"lazy\"),\n webgl: (this.getAttribute(\"webgl\") as WaveOptions[\"webgl\"]) ?? undefined,\n paused: this.#boolAttr(\"paused\"),\n onReady: (renderer: WaveRenderer) =>\n this.dispatchEvent(new CustomEvent(\"wave3d-ready\", { detail: renderer })),\n onFallback: (reason: FallbackReason) =>\n this.dispatchEvent(new CustomEvent(\"wave3d-fallback\", { detail: reason })),\n };\n this.#handle = createWave(this, config, options);\n }\n\n /** default ← preset ← src JSON ← config attribute ← config property. */\n async #buildConfig(): Promise<Partial<StudioConfig>> {\n let base: Partial<StudioConfig> = {};\n const presetName = this.getAttribute(\"preset\");\n if (presetName) {\n const { PRESETS } = await import(\"@wave3d/core/presets\");\n base = PRESETS[presetName]?.() ?? {};\n }\n const src = this.getAttribute(\"src\");\n if (src) {\n try {\n base = { ...base, ...(await fetch(src).then((r) => r.json())) };\n } catch {\n // ignore a failed/invalid config fetch — fall through to whatever we have\n }\n }\n base = { ...base, ...parseJson(this.getAttribute(\"config\")), ...this.#config };\n return base;\n }\n\n #scheduleUpdate(): void {\n clearTimeout(this.#debounce);\n this.#debounce = setTimeout(() => {\n void this.#update();\n }, 50);\n }\n\n async #update(): Promise<void> {\n const handle = this.#handle;\n if (!handle) return;\n handle.set(await this.#buildConfig());\n }\n\n /** Presence = true; `\"false\"`/`\"0\"` = false; absent = undefined (shell default). */\n #boolAttr(name: string): boolean | undefined {\n if (!this.hasAttribute(name)) return undefined;\n const value = this.getAttribute(name);\n return value !== \"false\" && value !== \"0\";\n }\n}\n\nfunction parseJson(json: string | null): Partial<StudioConfig> {\n if (!json) return {};\n try {\n return JSON.parse(json) as Partial<StudioConfig>;\n } catch {\n return {};\n }\n}\n\n/** Define the element (idempotent, SSR/Node-import-safe). */\nexport function register(tag = \"wave-3d\"): void {\n if (typeof window === \"undefined\" || typeof customElements === \"undefined\") return;\n if (!customElements.get(tag)) customElements.define(tag, Wave3DElement);\n}\n\n// Self-register on import so a bare `import \"@wave3d/element\"` makes <wave-3d> work. Guarded so\n// importing under Node (SSR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,WAAW,eAAe,OAAO,mBAAmB,aAAa;CAC5E,IAAI,CAAC,eAAe,IAAI,GAAG,GAAG,eAAe,OAAO,KAAK,aAAa;AACxE;AAIA,SAAS"}
|
package/package.json
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@wave3d/element",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "<wave-3d> custom element for @wave3d — a framework-agnostic drop-in animated gradient wave (the Vue/Svelte/plain-HTML story)",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"background",
|
|
7
|
+
"custom-elements",
|
|
8
|
+
"gradient",
|
|
9
|
+
"svelte",
|
|
10
|
+
"three",
|
|
11
|
+
"vue",
|
|
12
|
+
"wave",
|
|
13
|
+
"web-components",
|
|
14
|
+
"webgl"
|
|
15
|
+
],
|
|
16
|
+
"homepage": "https://github.com/Amir-Abushanab/wave3d/tree/main/packages/element#readme",
|
|
17
|
+
"bugs": "https://github.com/Amir-Abushanab/wave3d/issues",
|
|
18
|
+
"license": "MIT",
|
|
19
|
+
"author": "Amir Abushanab (https://github.com/Amir-Abushanab)",
|
|
20
|
+
"repository": {
|
|
21
|
+
"type": "git",
|
|
22
|
+
"url": "git+https://github.com/Amir-Abushanab/wave3d.git",
|
|
23
|
+
"directory": "packages/element"
|
|
24
|
+
},
|
|
25
|
+
"files": [
|
|
26
|
+
"dist"
|
|
27
|
+
],
|
|
28
|
+
"type": "module",
|
|
29
|
+
"sideEffects": [
|
|
30
|
+
"./src/index.ts",
|
|
31
|
+
"./dist/index.js"
|
|
32
|
+
],
|
|
33
|
+
"exports": {
|
|
34
|
+
".": {
|
|
35
|
+
"types": "./dist/index.d.ts",
|
|
36
|
+
"default": "./dist/index.js"
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"publishConfig": {
|
|
40
|
+
"access": "public"
|
|
41
|
+
},
|
|
42
|
+
"devDependencies": {
|
|
43
|
+
"@wave3d/core": "0.1.0"
|
|
44
|
+
},
|
|
45
|
+
"peerDependencies": {
|
|
46
|
+
"@wave3d/core": "^0.1.0"
|
|
47
|
+
},
|
|
48
|
+
"scripts": {
|
|
49
|
+
"typecheck": "tsc --noEmit",
|
|
50
|
+
"build": "tsdown"
|
|
51
|
+
}
|
|
52
|
+
}
|