@car-cutter/wc-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 CHANGED
@@ -1,15 +1,17 @@
1
- # React WebPlayer
1
+ # WebPlayer WebComponent
2
+
3
+ Use CarCutter WebPlayer as a WebComponent
2
4
 
3
5
  ## Usage
4
6
 
5
7
  1. Install package: `npm install @car-cutter/wc-webplayer`
6
8
  2. Define custom elements:
7
9
 
8
- ```
9
- import { defineCustomElements } from "@car-cutter/wc-webplayer";
10
+ ```js
11
+ import { defineCustomElements } from "@car-cutter/wc-webplayer";
10
12
 
11
- defineCustomElements();
12
- ```
13
+ defineCustomElements();
14
+ ```
13
15
 
14
16
  3. Use: `<cc-webplayer composition-url="..." />`
15
17
 
package/package.json CHANGED
@@ -1,20 +1,21 @@
1
1
  {
2
2
  "name": "@car-cutter/wc-webplayer",
3
- "version": "0.3.0",
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
- "react": "^18.3.1",
16
- "react-dom": "^18.3.1"
17
- },
18
19
  "devDependencies": {
19
20
  "@car-cutter/core": "0.3.0",
20
21
  "@car-cutter/core-ui": "0.3.0",
@@ -22,6 +23,8 @@
22
23
  "@car-cutter/eslint-config": "*",
23
24
  "@car-cutter/typescript-config": "*",
24
25
  "eslint": "^8.57.0",
26
+ "react": "^18.3.1",
27
+ "react-dom": "^18.3.1",
25
28
  "typescript": "^5.5.4",
26
29
  "vite": "^5.4.1",
27
30
  "vite-bundle-visualizer": "^1.2.1",
package/.eslintrc.json DELETED
@@ -1,3 +0,0 @@
1
- {
2
- "extends": "@car-cutter/eslint-config/base.json"
3
- }
@@ -1,16 +0,0 @@
1
-
2
- yarn run v1.22.22
3
- $ tsc -b && vite build
4
- vite v5.4.1 building for production...
5
- transforming (1) index.tstransforming (11) ../../node_modules/react/index.jstransforming (21) ../../node_modules/react-dom/index.js✓ 28 modules transformed.
6
- rendering chunks (1)...
7
- [vite:dts] Start generate declaration files...
8
- computing gzip size (0)...[vite:dts] Start rollup declaration files...
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
- [vite:dts] Declaration files built in 2823ms.
12
- 
13
- computing gzip size (1)...dist/index.js 320.33 kB │ gzip: 80.28 kB
14
- rendering chunks (1)...computing gzip size (1)...dist/index.umd.cjs 220.78 kB │ gzip: 69.58 kB
15
- ✓ built in 3.51s
16
- ✨ Done in 5.09s.
@@ -1,4 +0,0 @@
1
-
2
- yarn run v1.22.22
3
- $ eslint . --ext ts --max-warnings 0
4
- ✨ Done in 2.70s.
package/index.ts DELETED
@@ -1,35 +0,0 @@
1
- // -- Expose ancestors package
2
-
3
- export {
4
- // - WebComponents
5
- WEB_PLAYER_WC_TAG,
6
- WEB_PLAYER_ICON_WC_TAG,
7
- // - Events
8
- DEFAULT_EVENT_PREFIX,
9
- EVENT_COMPOSITION_LOADING,
10
- EVENT_COMPOSITION_LOADED,
11
- EVENT_COMPOSITION_LOAD_ERROR,
12
- EVENT_EXTEND_MODE_ON,
13
- EVENT_EXTEND_MODE_OFF,
14
- EVENT_HOTSPOTS_ON,
15
- EVENT_HOTSPOTS_OFF,
16
- EVENT_GALLERY_OPEN,
17
- EVENT_GALLERY_CLOSE,
18
- } from "@car-cutter/core";
19
-
20
- export {
21
- type WebPlayerProps,
22
- type WebPlayerIconProps,
23
- } from "@car-cutter/core-ui";
24
-
25
- export {
26
- // - Utils
27
- checkCustomElementsDefinition,
28
- defineCustomElements,
29
- ensureCustomElementsDefinition,
30
- // - Components
31
- webPlayerPropsToAttributes,
32
- type WebPlayerAttributes,
33
- webPlayerIconPropsToAttributes,
34
- type WebPlayerIconAttributes,
35
- } from "@car-cutter/core-wc";
package/tsconfig.app.json DELETED
@@ -1,6 +0,0 @@
1
- {
2
- "extends": "@car-cutter/typescript-config/base.json",
3
-
4
- "include": ["index.ts", "src"],
5
- "exclude": ["dist", "node_modules"]
6
- }
package/tsconfig.json DELETED
@@ -1,11 +0,0 @@
1
- {
2
- "files": [],
3
- "references": [
4
- {
5
- "path": "./tsconfig.app.json"
6
- },
7
- {
8
- "path": "./tsconfig.node.json"
9
- }
10
- ]
11
- }
@@ -1,5 +0,0 @@
1
- {
2
- "extends": "@car-cutter/typescript-config/vite.json",
3
-
4
- "include": ["vite.config.ts"]
5
- }
package/vite.config.ts DELETED
@@ -1,35 +0,0 @@
1
- import { resolve } from "path";
2
-
3
- import react from "@vitejs/plugin-react";
4
- import { defineConfig } from "vite";
5
- import dts from "vite-plugin-dts";
6
-
7
- export default defineConfig({
8
- plugins: [
9
- react(),
10
- dts({
11
- tsconfigPath: resolve(__dirname, "./tsconfig.app.json"),
12
- rollupTypes: true,
13
- bundledPackages: [
14
- "@car-cutter/core",
15
- "@car-cutter/core-ui",
16
- "@car-cutter/core-wc",
17
- ],
18
- }),
19
- ],
20
-
21
- define: {
22
- "process.env": {
23
- NODE_ENV: "production",
24
- },
25
- },
26
- build: {
27
- lib: {
28
- name: "wc-webplayer",
29
- fileName: "index",
30
- entry: resolve(__dirname, "./index.ts"),
31
- },
32
-
33
- chunkSizeWarningLimit: 350,
34
- },
35
- });