@car-cutter/vanilla-webplayer 0.3.0 → 0.3.1
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/README.md +2 -0
- package/package.json +7 -4
- package/.eslintrc.json +0 -3
- package/.turbo/turbo-build.log +0 -16
- package/.turbo/turbo-lint.log +0 -4
- package/index.ts +0 -20
- package/src/lib.ts +0 -25
- package/tsconfig.app.json +0 -6
- package/tsconfig.json +0 -11
- package/tsconfig.node.json +0 -5
- package/vite.config.ts +0 -27
package/README.md
CHANGED
package/package.json
CHANGED
|
@@ -1,22 +1,25 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@car-cutter/vanilla-webplayer",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"license": "UNLICENSED",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.umd.cjs",
|
|
7
7
|
"module": "dist/index.js",
|
|
8
8
|
"types": "dist/index.d.ts",
|
|
9
|
+
"files": [
|
|
10
|
+
"dist",
|
|
11
|
+
"package.json",
|
|
12
|
+
"README.md"
|
|
13
|
+
],
|
|
9
14
|
"scripts": {
|
|
10
15
|
"build": "tsc -b && vite build",
|
|
11
16
|
"lint": "eslint . --ext ts --max-warnings 0",
|
|
12
17
|
"analyze": "vite-bundle-visualizer"
|
|
13
18
|
},
|
|
14
|
-
"dependencies": {
|
|
15
|
-
"@car-cutter/wc-webplayer": "0.3.0"
|
|
16
|
-
},
|
|
17
19
|
"devDependencies": {
|
|
18
20
|
"@car-cutter/eslint-config": "*",
|
|
19
21
|
"@car-cutter/typescript-config": "*",
|
|
22
|
+
"@car-cutter/wc-webplayer": "0.3.1",
|
|
20
23
|
"eslint": "^8.57.0",
|
|
21
24
|
"typescript": "^5.5.4",
|
|
22
25
|
"vite": "^5.4.1",
|
package/.eslintrc.json
DELETED
package/.turbo/turbo-build.log
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
[2K[1G[1myarn run v1.22.22[22m
|
|
3
|
-
[2K[1G[2m$ tsc -b && vite build[22m
|
|
4
|
-
[36mvite v5.4.1 [32mbuilding for production...[36m[39m
|
|
5
|
-
[2K[1Gtransforming (1) [2mindex.ts[22m[2K[1G[32m✓[39m 3 modules transformed.
|
|
6
|
-
[2K[1Grendering chunks (1)...[2K[1G[32m
|
|
7
|
-
[36m[vite:dts][32m Start generate declaration files...[39m
|
|
8
|
-
[2K[1Gcomputing gzip size (0)...[32m[36m[vite:dts][32m Start rollup declaration files...[39m
|
|
9
|
-
Analysis will use the bundled TypeScript version 5.4.2
|
|
10
|
-
*** The target project appears to use TypeScript 5.5.4 which is newer than the bundled compiler engine; consider upgrading API Extractor.
|
|
11
|
-
[32m[36m[vite:dts][32m Declaration files built in 5129ms.
|
|
12
|
-
[39m
|
|
13
|
-
[2K[1Gcomputing gzip size (1)...[2K[1G[2mdist/[22m[36mindex.js [39m[1m[2m320.33 kB[22m[1m[22m[2m │ gzip: 80.28 kB[22m
|
|
14
|
-
[2K[1Grendering chunks (1)...[2K[1G[2K[1Gcomputing gzip size (1)...[2K[1G[2mdist/[22m[36mindex.umd.cjs [39m[1m[2m220.78 kB[22m[1m[22m[2m │ gzip: 69.61 kB[22m
|
|
15
|
-
[32m✓ built in 5.80s[39m
|
|
16
|
-
[2K[1G✨ Done in 9.07s.
|
package/.turbo/turbo-lint.log
DELETED
package/index.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
export { appendWebPlayerElement } from "./src/lib";
|
|
2
|
-
|
|
3
|
-
// Expose parent package
|
|
4
|
-
export {
|
|
5
|
-
// - Components
|
|
6
|
-
WEB_PLAYER_WC_TAG,
|
|
7
|
-
WEB_PLAYER_ICON_WC_TAG,
|
|
8
|
-
type WebPlayerProps,
|
|
9
|
-
// - Events
|
|
10
|
-
DEFAULT_EVENT_PREFIX,
|
|
11
|
-
EVENT_COMPOSITION_LOADING,
|
|
12
|
-
EVENT_COMPOSITION_LOADED,
|
|
13
|
-
EVENT_COMPOSITION_LOAD_ERROR,
|
|
14
|
-
EVENT_EXTEND_MODE_ON,
|
|
15
|
-
EVENT_EXTEND_MODE_OFF,
|
|
16
|
-
EVENT_HOTSPOTS_ON,
|
|
17
|
-
EVENT_HOTSPOTS_OFF,
|
|
18
|
-
EVENT_GALLERY_OPEN,
|
|
19
|
-
EVENT_GALLERY_CLOSE,
|
|
20
|
-
} from "@car-cutter/wc-webplayer";
|
package/src/lib.ts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
WEB_PLAYER_WC_TAG,
|
|
3
|
-
ensureCustomElementsDefinition,
|
|
4
|
-
webPlayerPropsToAttributes,
|
|
5
|
-
type WebPlayerProps,
|
|
6
|
-
} from "@car-cutter/wc-webplayer";
|
|
7
|
-
|
|
8
|
-
export function appendWebPlayerElement(
|
|
9
|
-
parentElement: HTMLElement,
|
|
10
|
-
props: WebPlayerProps
|
|
11
|
-
) {
|
|
12
|
-
const attributes = webPlayerPropsToAttributes(props);
|
|
13
|
-
|
|
14
|
-
ensureCustomElementsDefinition();
|
|
15
|
-
|
|
16
|
-
// -- Append Element to Dom
|
|
17
|
-
// Create
|
|
18
|
-
const elmt = document.createElement(WEB_PLAYER_WC_TAG);
|
|
19
|
-
// Set attributes
|
|
20
|
-
Object.entries(attributes).forEach(([key, value]) =>
|
|
21
|
-
elmt.setAttribute(key, value)
|
|
22
|
-
);
|
|
23
|
-
// Append
|
|
24
|
-
parentElement.appendChild(elmt);
|
|
25
|
-
}
|
package/tsconfig.app.json
DELETED
package/tsconfig.json
DELETED
package/tsconfig.node.json
DELETED
package/vite.config.ts
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { resolve } from "path";
|
|
2
|
-
|
|
3
|
-
import { defineConfig } from "vite";
|
|
4
|
-
import dts from "vite-plugin-dts";
|
|
5
|
-
|
|
6
|
-
export default defineConfig({
|
|
7
|
-
plugins: [
|
|
8
|
-
dts({
|
|
9
|
-
tsconfigPath: resolve(__dirname, "./tsconfig.app.json"),
|
|
10
|
-
rollupTypes: true,
|
|
11
|
-
bundledPackages: ["@car-cutter/wc-webplayer"],
|
|
12
|
-
}),
|
|
13
|
-
],
|
|
14
|
-
|
|
15
|
-
define: {
|
|
16
|
-
"process.env": {
|
|
17
|
-
NODE_ENV: "production",
|
|
18
|
-
},
|
|
19
|
-
},
|
|
20
|
-
build: {
|
|
21
|
-
lib: {
|
|
22
|
-
name: "vanilla-webplayer",
|
|
23
|
-
fileName: "index",
|
|
24
|
-
entry: resolve(__dirname, "./index.ts"),
|
|
25
|
-
},
|
|
26
|
-
},
|
|
27
|
-
});
|