@pixel-loader/solid 0.0.1 → 0.0.2
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/index.d.ts +3 -3
- package/dist/index.js +34 -10
- package/package.json +11 -11
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as solid_js from 'solid-js';
|
|
2
2
|
|
|
3
|
-
declare const PixelLoader: (props: PixelLoaderProps) => JSX.Element;
|
|
3
|
+
declare const PixelLoader: (props: PixelLoaderProps) => solid_js.JSX.Element;
|
|
4
4
|
|
|
5
5
|
interface PixelLoaderProps {
|
|
6
6
|
preset?: "wave-lr" | "wave-rl" | "wave-tb" | "wave-bt" | "diagonal" | "center-out" | "spiral" | "corners";
|
|
@@ -21,7 +21,7 @@ interface PixelLoaderElement extends HTMLElement {
|
|
|
21
21
|
declare module "solid-js" {
|
|
22
22
|
namespace JSX {
|
|
23
23
|
interface IntrinsicElements {
|
|
24
|
-
"pixel-loader": PixelLoaderProps
|
|
24
|
+
"pixel-loader": PixelLoaderProps & JSX.HTMLAttributes<HTMLElement>;
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
}
|
package/dist/index.js
CHANGED
|
@@ -1,16 +1,40 @@
|
|
|
1
1
|
// src/component.tsx
|
|
2
|
+
import "@pixel-loader/core";
|
|
3
|
+
import { createEffect } from "solid-js";
|
|
2
4
|
import { jsx } from "solid-js/jsx-runtime";
|
|
3
5
|
var PixelLoader = (props) => {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
6
|
+
let ref;
|
|
7
|
+
createEffect(() => {
|
|
8
|
+
if (!ref) {
|
|
9
|
+
return;
|
|
10
|
+
}
|
|
11
|
+
if (props.preset !== void 0) {
|
|
12
|
+
ref.preset = props.preset;
|
|
13
|
+
}
|
|
14
|
+
if (props.size !== void 0) {
|
|
15
|
+
ref.size = props.size;
|
|
16
|
+
}
|
|
17
|
+
if (props.color !== void 0) {
|
|
18
|
+
ref.color = props.color;
|
|
19
|
+
}
|
|
20
|
+
if (props.borderRadius !== void 0) {
|
|
21
|
+
ref.borderRadius = props.borderRadius;
|
|
22
|
+
}
|
|
23
|
+
if (props.isAnimating !== void 0) {
|
|
24
|
+
ref.isAnimating = props.isAnimating;
|
|
25
|
+
}
|
|
26
|
+
if (props.delayPattern !== void 0) {
|
|
27
|
+
ref.delayPattern = props.delayPattern;
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
return /* @__PURE__ */ jsx(
|
|
31
|
+
"pixel-loader",
|
|
32
|
+
{
|
|
33
|
+
ref: (el) => {
|
|
34
|
+
ref = el;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
);
|
|
14
38
|
};
|
|
15
39
|
export {
|
|
16
40
|
PixelLoader
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pixel-loader/solid",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Solid wrapper for PixelLoader web component",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -15,6 +15,14 @@
|
|
|
15
15
|
"files": [
|
|
16
16
|
"dist"
|
|
17
17
|
],
|
|
18
|
+
"scripts": {
|
|
19
|
+
"build": "tsup",
|
|
20
|
+
"dev": "tsup --watch",
|
|
21
|
+
"typecheck": "tsc --noEmit",
|
|
22
|
+
"lint": "biome check ./src",
|
|
23
|
+
"format": "biome format --write ./src",
|
|
24
|
+
"clean": "rm -rf dist"
|
|
25
|
+
},
|
|
18
26
|
"keywords": [
|
|
19
27
|
"solid-js",
|
|
20
28
|
"web-components",
|
|
@@ -27,7 +35,7 @@
|
|
|
27
35
|
"solid-js": "^1.8.0"
|
|
28
36
|
},
|
|
29
37
|
"dependencies": {
|
|
30
|
-
"@pixel-loader/core": "
|
|
38
|
+
"@pixel-loader/core": "workspace:*"
|
|
31
39
|
},
|
|
32
40
|
"devDependencies": {
|
|
33
41
|
"solid-js": "^1.9.11",
|
|
@@ -35,13 +43,5 @@
|
|
|
35
43
|
},
|
|
36
44
|
"publishConfig": {
|
|
37
45
|
"access": "public"
|
|
38
|
-
},
|
|
39
|
-
"scripts": {
|
|
40
|
-
"build": "tsup",
|
|
41
|
-
"dev": "tsup --watch",
|
|
42
|
-
"typecheck": "tsc --noEmit",
|
|
43
|
-
"lint": "biome check ./src",
|
|
44
|
-
"format": "biome format --write ./src",
|
|
45
|
-
"clean": "rm -rf dist"
|
|
46
46
|
}
|
|
47
|
-
}
|
|
47
|
+
}
|