p-elements-core 1.2.26 → 1.2.28
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/.gitlab-ci.yml +1 -0
- package/demo/sample.js +1 -1
- package/dist/p-elements-core-modern.js +1 -1
- package/dist/p-elements-core.js +1 -1
- package/docs/.eleventy.js +4 -1
- package/docs/package-lock.json +27 -4
- package/docs/package.json +2 -1
- package/docs/src/_data/demos/hello-world/hello-world.tsx +1 -1
- package/docs/src/_data/demos/timer/demo-timer.tsx +120 -0
- package/docs/src/_data/demos/timer/icons.tsx +62 -0
- package/docs/src/_data/demos/timer/index.html +5 -3
- package/docs/src/_data/demos/timer/project.json +3 -3
- package/docs/src/_includes/layouts/base.njk +22 -17
- package/docs/src/_includes/layouts/playground.njk +11 -6
- package/docs/src/_includes/partials/{page-header.njk → app-header.njk} +3 -2
- package/docs/src/_includes/partials/head.njk +4 -2
- package/docs/src/_includes/partials/nav.njk +15 -7
- package/docs/src/_includes/partials/top-nav.njk +52 -14
- package/docs/src/assets/favicon.png +0 -0
- package/docs/src/documentation/custom-element.md +221 -0
- package/docs/src/documentation/decorators/bind.md +71 -0
- package/docs/src/documentation/decorators/custom-element-config.md +63 -0
- package/docs/src/documentation/decorators/property.md +83 -0
- package/docs/src/documentation/decorators/query.md +66 -0
- package/docs/src/documentation/decorators/render-property-on-set.md +60 -0
- package/docs/src/documentation/decorators.md +9 -0
- package/docs/src/documentation/getting-started.md +49 -6
- package/docs/src/documentation/index.md +19 -17
- package/docs/src/documentation/reactive-properties.md +54 -0
- package/docs/src/index.d.ts +5 -3
- package/docs/src/playground/index.njk +10 -0
- package/docs/src/playground/timer.njk +10 -0
- package/docs/src/scripts/components/app-mobile-menu/app-mobile-menu.css +48 -0
- package/docs/src/scripts/components/app-mobile-menu/app-mobile-menu.tsx +112 -0
- package/docs/src/scripts/components/app-mode-switch/app-mode-switch.css +78 -0
- package/docs/src/scripts/components/app-mode-switch/app-mode-switch.tsx +166 -0
- package/docs/src/scripts/components/app-playground/app-playground.tsx +77 -54
- package/docs/src/scripts/components/app-split-panel/app-split-panel.css +33 -0
- package/docs/src/scripts/components/app-split-panel/app-split-panel.tsx +73 -0
- package/docs/src/scripts/components/app-split-panel/resize-bar.tsx +155 -0
- package/docs/src/scripts/index.ts +3 -0
- package/docs/src/styles/main.css +565 -85
- package/p-elements-core.d.ts +11 -2
- package/package.json +5 -4
- package/src/p-elements-core.ts +1 -0
- package/docs/src/_data/demos/timer/timer.tsx +0 -22
- package/docs/src/playground/index.md +0 -47
package/p-elements-core.d.ts
CHANGED
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
/// <reference types="underscore" />
|
|
2
2
|
/// <reference types="@types/animejs" />
|
|
3
3
|
|
|
4
|
+
export declare namespace jsx {
|
|
5
|
+
namespace JSX {
|
|
6
|
+
interface IntrinsicElements {
|
|
7
|
+
[tagName: string]: VNodeProperties;
|
|
8
|
+
}
|
|
9
|
+
type Element = VNode;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
4
13
|
declare interface IElementConfig {
|
|
5
14
|
tagName: string;
|
|
6
15
|
options?: {
|
|
@@ -76,7 +85,7 @@ declare interface VNodeProperties {
|
|
|
76
85
|
readonly key?: Object;
|
|
77
86
|
readonly classes?: { [index: string]: boolean | null | undefined };
|
|
78
87
|
readonly styles?: { [index: string]: string | null | undefined };
|
|
79
|
-
|
|
88
|
+
|
|
80
89
|
readonly on?: {
|
|
81
90
|
[eventName: string]:
|
|
82
91
|
| EventHandler
|
|
@@ -320,4 +329,4 @@ declare const Maquette: {
|
|
|
320
329
|
h: (selector: string) => VNode;
|
|
321
330
|
};
|
|
322
331
|
|
|
323
|
-
declare const _: _.UnderscoreStatic;
|
|
332
|
+
declare const _: _.UnderscoreStatic;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "p-elements-core",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.28",
|
|
4
4
|
"description": "P Elements Core V1",
|
|
5
5
|
"main": "dist/p-elements-core.js",
|
|
6
6
|
"types": "p-elements-core.d.ts",
|
|
@@ -10,11 +10,12 @@
|
|
|
10
10
|
},
|
|
11
11
|
"scripts": {
|
|
12
12
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
13
|
+
"dev-docs": "rimraf ./docs/public && cd docs && npm run dev",
|
|
13
14
|
"clean": "rimraf ./dist",
|
|
14
15
|
"build-old": "webpack --config older-browsers-webpack.config.js --mode=production",
|
|
15
16
|
"build": "npm run clean && webpack --mode=production && npm run build-old",
|
|
16
17
|
"ws": "npx local-web-server -p 5001",
|
|
17
|
-
"develop": "concurrently \"npm run ws\" \"webpack --watch --mode=development\" "
|
|
18
|
+
"develop": "concurrently \"npm run ws\" \"webpack --watch --mode=development\" \" npm run dev-docs\""
|
|
18
19
|
},
|
|
19
20
|
"author": "P.A. Huisman",
|
|
20
21
|
"license": "ISC",
|
|
@@ -34,7 +35,7 @@
|
|
|
34
35
|
"ts-loader": "^9.2.6",
|
|
35
36
|
"typescript": "^5.4.3",
|
|
36
37
|
"underscore": "=1.13.1",
|
|
37
|
-
"webpack": "
|
|
38
|
-
"webpack-cli": "
|
|
38
|
+
"webpack": "=5.65.0",
|
|
39
|
+
"webpack-cli": "=4.9.1"
|
|
39
40
|
}
|
|
40
41
|
}
|
package/src/p-elements-core.ts
CHANGED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/* playground-hide */
|
|
2
|
-
import "p-elements-core";
|
|
3
|
-
|
|
4
|
-
// can not configure tsxFactory in the playground, so we need to assign Maquette.h to React.createElement
|
|
5
|
-
const React = {
|
|
6
|
-
createElement: Maquette.h
|
|
7
|
-
};
|
|
8
|
-
/* playground-hide-end */
|
|
9
|
-
|
|
10
|
-
@CustomElementConfig({
|
|
11
|
-
tagName: "p-hello",
|
|
12
|
-
})
|
|
13
|
-
export class MyButton extends CustomElement {
|
|
14
|
-
static style = `.foo{color: red;}`;
|
|
15
|
-
|
|
16
|
-
@Property({type: "string", attribute: "name", reflect: true})
|
|
17
|
-
name: string = "World";
|
|
18
|
-
|
|
19
|
-
render = () => {
|
|
20
|
-
return <div class="foo">Hello {this.name}</div>;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: "Hello world"
|
|
3
|
-
layout: "playground.njk"
|
|
4
|
-
description: "Playground for p-elements"
|
|
5
|
-
permalink: "playground/index.html"
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
<playground-ide editable-file-system line-numbers resizable cdn-base-url="https://cdn.jsdelivr.net/npm">
|
|
9
|
-
|
|
10
|
-
<script type="sample/html" filename="index.html">
|
|
11
|
-
<!DOCTYPE html>
|
|
12
|
-
<html lang="en">
|
|
13
|
-
<head>
|
|
14
|
-
<title>Hello World</title>
|
|
15
|
-
</head>
|
|
16
|
-
<body>
|
|
17
|
-
<p-hello name="World"></p-hello>
|
|
18
|
-
<script type="module" src="./index.js"></script>
|
|
19
|
-
</body>
|
|
20
|
-
</html>
|
|
21
|
-
</script>
|
|
22
|
-
|
|
23
|
-
<script type="sample/ts" filename="index.tsx">
|
|
24
|
-
/* playground-hide */
|
|
25
|
-
import "p-elements-core";
|
|
26
|
-
|
|
27
|
-
// can not configure tsxFactory in the playground, so we need to assign Maquette.h to React.createElement
|
|
28
|
-
const React = {
|
|
29
|
-
createElement: Maquette.h
|
|
30
|
-
};
|
|
31
|
-
/* playground-hide-end */
|
|
32
|
-
|
|
33
|
-
@CustomElementConfig({
|
|
34
|
-
tagName: "p-hello",
|
|
35
|
-
})
|
|
36
|
-
export class MyButton extends CustomElement {
|
|
37
|
-
static style = `.foo{color: red;}`;
|
|
38
|
-
|
|
39
|
-
@Property({type: "string", attribute: "name", reflect: true})
|
|
40
|
-
name: string = "World";
|
|
41
|
-
|
|
42
|
-
render = () => {
|
|
43
|
-
return <div class="foo">Hello {this.name}</div>;
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
</script>
|
|
47
|
-
</playground-ide>
|