p-elements-core 2.0.15 → 2.1.0-rc3
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 +18 -16
- package/.vscode/launch.json +52 -0
- package/build.mjs +48 -0
- package/dist/p-elements-core.js +4 -71
- package/dist/sample/sample.js +29 -0
- package/index.html +25 -155
- package/package.json +36 -56
- package/readme.md +206 -0
- package/src/custom-element-controller.ts +31 -0
- package/src/custom-element.ts +304 -129
- package/src/custom-style-element.ts +22 -18
- package/src/decorators/bind.ts +12 -6
- package/src/decorators/custom-element-config.ts +9 -9
- package/src/decorators/property.ts +150 -0
- package/src/decorators/query.ts +12 -0
- package/src/decorators/render-property-on-set.ts +3 -0
- package/src/helpers/css.ts +71 -0
- package/src/{cache.ts → maquette/cache.ts} +5 -5
- package/src/{dom.ts → maquette/dom.ts} +25 -10
- package/src/{h.ts → maquette/h.ts} +24 -17
- package/src/maquette/index.ts +12 -0
- package/src/{interfaces.ts → maquette/interfaces.ts} +106 -24
- package/src/maquette/jsx.ts +61 -0
- package/src/{mapping.ts → maquette/mapping.ts} +7 -6
- package/src/{projection.ts → maquette/projection.ts} +251 -123
- package/src/{projector.ts → maquette/projector.ts} +67 -35
- package/src/p-elements-core.ts +91 -0
- package/src/sample/mixin/highlight.tsx +32 -0
- package/src/sample/sample.tsx +367 -0
- package/tsconfig.json +62 -13
- package/types/custom-element-controller.d.ts +17 -0
- package/types/custom-element.d.ts +27 -0
- package/types/custom-style-element.d.ts +4 -0
- package/types/decorators/bind.d.ts +5 -0
- package/types/decorators/custom-element-config.d.ts +7 -0
- package/types/decorators/property.d.ts +17 -0
- package/types/decorators/query.d.ts +1 -0
- package/types/decorators/render-property-on-set.d.ts +1 -0
- package/types/helpers/css.d.ts +3 -0
- package/types/maquette/cache.d.ts +9 -0
- package/types/maquette/dom.d.ts +59 -0
- package/types/maquette/h.d.ts +34 -0
- package/types/maquette/index.d.ts +11 -0
- package/types/maquette/interfaces.d.ts +474 -0
- package/types/maquette/jsx.d.ts +5 -0
- package/types/maquette/mapping.d.ts +13 -0
- package/types/maquette/projection.d.ts +8 -0
- package/types/maquette/projector.d.ts +26 -0
- package/types/p-elements-core.d.ts +55 -0
- package/dist/p-elements-core-modern.js +0 -72
- package/dist/sample.js +0 -20
- package/karma.conf.js +0 -32
- package/p-elements-core.d.ts +0 -141
- package/screen.css +0 -16
- package/src/bar.css +0 -3
- package/src/commonjs.js +0 -182
- package/src/custom-inline-style-element.ts +0 -42
- package/src/decorators/property-render-on-set.ts +0 -49
- package/src/decorators/reflect-to-attribute.ts +0 -51
- package/src/index.tsx +0 -84
- package/src/sample.css +0 -19
- package/src/sample.spec.ts +0 -112
- package/src/sample.tsx +0 -187
- package/src/tsconfig.json +0 -16
- package/theme.css +0 -12
- package/tslint.json +0 -33
- package/webpack.config.js +0 -100
- package/webpack.config.karma.js +0 -35
package/.gitlab-ci.yml
CHANGED
|
@@ -1,16 +1,18 @@
|
|
|
1
|
-
image
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
1
|
+
# The Docker image that will be used to build your app
|
|
2
|
+
image: node:lts
|
|
3
|
+
create-pages:
|
|
4
|
+
pages:
|
|
5
|
+
# The folder that contains the files to be exposed at the Page URL
|
|
6
|
+
publish: docs/public
|
|
7
|
+
rules:
|
|
8
|
+
# This ensures that only pushes to the default branch will trigger
|
|
9
|
+
# a pages deploy
|
|
10
|
+
- if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH
|
|
11
|
+
- if: $CI_COMMIT_REF_NAME == "pages"
|
|
12
|
+
# Functions that should be executed before the build script is run
|
|
13
|
+
before_script:
|
|
14
|
+
- cd docs
|
|
15
|
+
- npm ci
|
|
16
|
+
- npm run build
|
|
17
|
+
script:
|
|
18
|
+
- npm ci
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "0.2.0",
|
|
3
|
+
"configurations": [
|
|
4
|
+
{
|
|
5
|
+
"type": "bun",
|
|
6
|
+
"request": "launch",
|
|
7
|
+
"name": "Debug Bun",
|
|
8
|
+
|
|
9
|
+
// The path to a JavaScript or TypeScript file to run.
|
|
10
|
+
"program": "${file}",
|
|
11
|
+
|
|
12
|
+
// The arguments to pass to the program, if any.
|
|
13
|
+
"args": [],
|
|
14
|
+
|
|
15
|
+
// The working directory of the program.
|
|
16
|
+
"cwd": "${workspaceFolder}",
|
|
17
|
+
|
|
18
|
+
// The environment variables to pass to the program.
|
|
19
|
+
"env": {},
|
|
20
|
+
|
|
21
|
+
// If the environment variables should not be inherited from the parent process.
|
|
22
|
+
"strictEnv": false,
|
|
23
|
+
|
|
24
|
+
// If the program should be run in watch mode.
|
|
25
|
+
// This is equivalent to passing `--watch` to the `bun` executable.
|
|
26
|
+
// You can also set this to "hot" to enable hot reloading using `--hot`.
|
|
27
|
+
"watchMode": false,
|
|
28
|
+
|
|
29
|
+
// If the debugger should stop on the first line of the program.
|
|
30
|
+
"stopOnEntry": false,
|
|
31
|
+
|
|
32
|
+
// If the debugger should be disabled. (for example, breakpoints will not be hit)
|
|
33
|
+
"noDebug": false,
|
|
34
|
+
|
|
35
|
+
// The path to the `bun` executable, defaults to your `PATH` environment variable.
|
|
36
|
+
"runtime": "bun",
|
|
37
|
+
|
|
38
|
+
// The arguments to pass to the `bun` executable, if any.
|
|
39
|
+
// Unlike `args`, these are passed to the executable itself, not the program.
|
|
40
|
+
"runtimeArgs": [],
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"type": "bun",
|
|
44
|
+
"request": "attach",
|
|
45
|
+
"name": "Attach to Bun",
|
|
46
|
+
|
|
47
|
+
// The URL of the WebSocket inspector to attach to.
|
|
48
|
+
// This value can be retrieved by using `bun --inspect`.
|
|
49
|
+
"url": "ws://localhost:6499/",
|
|
50
|
+
}
|
|
51
|
+
]
|
|
52
|
+
}
|
package/build.mjs
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
|
|
2
|
+
import esbuild from "esbuild";
|
|
3
|
+
import {createServer} from "http"
|
|
4
|
+
import express from "express";
|
|
5
|
+
import fs from "fs";
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
const pkg = JSON.parse(fs.readFileSync("./package.json", "utf8"));
|
|
9
|
+
|
|
10
|
+
const isWatch = process.argv.indexOf("--watch") > -1;
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
const buildOptions = {
|
|
14
|
+
entryPoints: ["src/p-elements-core.ts", "src/sample/sample.tsx"],
|
|
15
|
+
bundle: true,
|
|
16
|
+
target: "es6",
|
|
17
|
+
outdir: "./dist/",
|
|
18
|
+
format: "esm",
|
|
19
|
+
sourcemap: isWatch,
|
|
20
|
+
minify: !isWatch,
|
|
21
|
+
plugins: [],
|
|
22
|
+
banner: {
|
|
23
|
+
js: `// P-ELEMENTS ${pkg.version} - ${new Date()}\n`,
|
|
24
|
+
},
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
if (!isWatch) {
|
|
28
|
+
esbuild.build({
|
|
29
|
+
...buildOptions,
|
|
30
|
+
}).catch(() => process.exit(1));
|
|
31
|
+
|
|
32
|
+
} else {
|
|
33
|
+
const app = express({});
|
|
34
|
+
const server = createServer(app);
|
|
35
|
+
app.use((req, res, next) => {
|
|
36
|
+
res.header("Access-Control-Allow-Origin", "*");
|
|
37
|
+
res.header("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept");
|
|
38
|
+
next();
|
|
39
|
+
});
|
|
40
|
+
const serverOptions = {host: "localhost", port: 5001};
|
|
41
|
+
app.use(express.static("./") );
|
|
42
|
+
server.listen(serverOptions);
|
|
43
|
+
|
|
44
|
+
(async () => {
|
|
45
|
+
const ctx = await esbuild.context(buildOptions);
|
|
46
|
+
await ctx.watch();
|
|
47
|
+
})();
|
|
48
|
+
}
|