@kkcompany/player 2.25.0-canary.23 → 2.25.0-canary.25
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/CHANGELOG.md +4 -0
- package/dist/StallReload-BFlQRphx.mjs +717 -0
- package/dist/Video-CMbK-cxg.mjs +120 -0
- package/dist/adaptation-BcTsh-wx.mjs +74 -0
- package/dist/api-2BOrEA5d.mjs +1057 -0
- package/dist/debugUtil-IF7p5TSI.mjs +23 -0
- package/dist/events-B3vI3Srm.mjs +16 -0
- package/dist/fixDashManifest-CJ63KKaA.mjs +56 -0
- package/dist/index.d.mts +3 -0
- package/dist/index.mjs +3 -10148
- package/dist/loadPlayer-CQdGA3Te.mjs +1560 -0
- package/dist/loadScript-Ct19kU9g.mjs +13 -0
- package/dist/mediaBindings-CoY60lQw.mjs +542 -0
- package/dist/modules.d.mts +51 -0
- package/dist/modules.mjs +631 -2201
- package/dist/playerCore/index.d.mts +3 -0
- package/dist/playerCore/index.mjs +4 -0
- package/dist/plugins/index.d.mts +2 -0
- package/dist/plugins/index.mjs +3 -0
- package/dist/reactEntry.d.mts +20 -0
- package/dist/reactEntry.mjs +6339 -0
- package/dist/util-B2YBSBjR.mjs +29 -0
- package/package.json +24 -19
- package/dist/core.mjs +0 -3075
- package/dist/index.d.ts +0 -18
- package/dist/index.js +0 -20938
- package/dist/modules.d.ts +0 -89
- package/dist/plugins.d.ts +0 -5
- package/dist/plugins.mjs +0 -1105
- package/dist/react.d.ts +0 -178
- package/dist/react.mjs +0 -13061
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
//#region src/util/index.js
|
|
2
|
+
function convertToSeconds(timeString) {
|
|
3
|
+
const [hours, minutes, seconds] = timeString.split(":").map(parseFloat);
|
|
4
|
+
return hours * 3600 + minutes * 60 + seconds;
|
|
5
|
+
}
|
|
6
|
+
function getVersion() {
|
|
7
|
+
try {
|
|
8
|
+
return process.env.npm_package_version;
|
|
9
|
+
} catch (e) {
|
|
10
|
+
return;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
function getPopoverPosition(rect, target, boundary) {
|
|
14
|
+
const rectX = rect.x || rect.left;
|
|
15
|
+
const boundaryX = boundary.x || boundary.left;
|
|
16
|
+
const maxLeft = boundary.width - rect.width;
|
|
17
|
+
const alignLeft = rectX + ((target.left + target.right) / 2 - boundaryX - (rectX + rect.width / 2 - boundaryX)) - boundaryX;
|
|
18
|
+
return {
|
|
19
|
+
left: Math.max(0, Math.min(alignLeft, maxLeft)),
|
|
20
|
+
top: target.top - rect.height
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
const nearest = (items, diff) => {
|
|
24
|
+
if (!items.length) return;
|
|
25
|
+
return items.reduce((a, b) => Math.abs(diff(a)) > Math.abs(diff(b)) ? b : a, items[0]);
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
//#endregion
|
|
29
|
+
export { nearest as i, getPopoverPosition as n, getVersion as r, convertToSeconds as t };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kkcompany/player",
|
|
3
|
-
"version": "2.25.0-canary.
|
|
3
|
+
"version": "2.25.0-canary.25",
|
|
4
4
|
"module": "dist/index.mjs",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -21,18 +21,18 @@
|
|
|
21
21
|
"module": "./dist/modules.mjs"
|
|
22
22
|
},
|
|
23
23
|
"./core": {
|
|
24
|
-
"import": "./dist/
|
|
25
|
-
"module": "./dist/
|
|
24
|
+
"import": "./dist/playerCore/index.mjs",
|
|
25
|
+
"module": "./dist/playerCore/index.mjs"
|
|
26
26
|
},
|
|
27
27
|
"./plugins": {
|
|
28
28
|
"types": "./dist/plugins.d.ts",
|
|
29
|
-
"import": "./dist/plugins.mjs",
|
|
30
|
-
"module": "./dist/plugins.mjs"
|
|
29
|
+
"import": "./dist/plugins/index.mjs",
|
|
30
|
+
"module": "./dist/plugins/index.mjs"
|
|
31
31
|
},
|
|
32
32
|
"./react": {
|
|
33
|
-
"types": "./dist/
|
|
34
|
-
"import": "./dist/
|
|
35
|
-
"module": "./dist/
|
|
33
|
+
"types": "./dist/reactEntry.d.ts",
|
|
34
|
+
"import": "./dist/reactEntry.mjs",
|
|
35
|
+
"module": "./dist/reactEntry.mjs"
|
|
36
36
|
}
|
|
37
37
|
},
|
|
38
38
|
"repository": {
|
|
@@ -40,13 +40,12 @@
|
|
|
40
40
|
"url": "https://gitlab.kkinternal.com/playback/web-playcraft"
|
|
41
41
|
},
|
|
42
42
|
"scripts": {
|
|
43
|
+
"dev": "next",
|
|
43
44
|
"develop": "next",
|
|
44
45
|
"start": "next start",
|
|
45
|
-
"test": "
|
|
46
|
-
"
|
|
47
|
-
"build": "
|
|
48
|
-
"build-sample": "rollup -c && next build && next export",
|
|
49
|
-
"build:clean": "rm -rf dist/ sdk.esm.js sdk.js react.js plugins.js modules.js core.js npm/*d.ts npm/*.js",
|
|
46
|
+
"test": "vitest --coverage",
|
|
47
|
+
"build": "tsdown",
|
|
48
|
+
"build-sample": "next build",
|
|
50
49
|
"release": "standard-version -a",
|
|
51
50
|
"now-build": "mv next-build .next || echo 'Not a next build, skip moving'",
|
|
52
51
|
"install:husky": "husky install",
|
|
@@ -64,11 +63,14 @@
|
|
|
64
63
|
"@babel/preset-typescript": "^7.22.5",
|
|
65
64
|
"@babel/register": "^7.16.0",
|
|
66
65
|
"@babel/runtime": "^7.16.3",
|
|
66
|
+
"@biomejs/biome": "^2.3.11",
|
|
67
67
|
"@commitlint/cli": "^14.1.0",
|
|
68
68
|
"@commitlint/config-conventional": "^14.1.0",
|
|
69
69
|
"@emotion/babel-plugin": "^11.9.5",
|
|
70
70
|
"@emotion/eslint-plugin": "^11.7.0",
|
|
71
|
-
"@
|
|
71
|
+
"@emotion/styled": "^11.14.1",
|
|
72
|
+
"@mui/material": "^5.17.0",
|
|
73
|
+
"@mui/styles": "^5.17.0",
|
|
72
74
|
"@rollup/plugin-babel": "^5.2.2",
|
|
73
75
|
"@rollup/plugin-commonjs": "^21.0.1",
|
|
74
76
|
"@rollup/plugin-json": "^4.1.0",
|
|
@@ -79,10 +81,12 @@
|
|
|
79
81
|
"@types/node": "^20.4.9",
|
|
80
82
|
"@types/react": "17.0.2",
|
|
81
83
|
"@types/react-dom": "17.0.2",
|
|
84
|
+
"@vitest/coverage-v8": "4.0.16",
|
|
82
85
|
"amplitude-js": "^5.8.0",
|
|
83
86
|
"babel-jest": "^27.3.1",
|
|
84
87
|
"babel-loader": "^8.2.3",
|
|
85
88
|
"babel-plugin-inline-import": "^3.0.0",
|
|
89
|
+
"binary-base64-loader": "^1.0.0",
|
|
86
90
|
"concat-md": "^0.5.1",
|
|
87
91
|
"core-js": "^3.26.0",
|
|
88
92
|
"core-js-pure": "^3.26.0",
|
|
@@ -103,20 +107,22 @@
|
|
|
103
107
|
"jest-junit": "^14.0.1",
|
|
104
108
|
"lint-staged": ">=10",
|
|
105
109
|
"msw": "^0.35.0",
|
|
106
|
-
"next": "
|
|
110
|
+
"next": "~16.0.2",
|
|
107
111
|
"node-fetch": "^2.6.6",
|
|
108
112
|
"prettier": "^2.4.1",
|
|
109
113
|
"prop-types": "^15.7.2",
|
|
110
|
-
"react": "
|
|
114
|
+
"react": "^19.1.4",
|
|
111
115
|
"react-cool-form": "^0.4.1",
|
|
112
|
-
"react-dom": "
|
|
116
|
+
"react-dom": "^19.1.4",
|
|
113
117
|
"rollup": "^2.60.0",
|
|
114
118
|
"rollup-plugin-includepaths": "^0.2.4",
|
|
115
119
|
"standard-version": "^9.3.2",
|
|
120
|
+
"tsdown": "^0.20.0-beta.2",
|
|
116
121
|
"typedoc": "^0.25.1",
|
|
117
122
|
"typedoc-plugin-markdown": "^3.16.0",
|
|
118
123
|
"typedoc-plugin-missing-exports": "^2.1.0",
|
|
119
124
|
"typescript": "^5.1.6",
|
|
125
|
+
"vitest": "^4.0.16",
|
|
120
126
|
"xmldom": "^0.6.0"
|
|
121
127
|
},
|
|
122
128
|
"dependencies": {
|
|
@@ -346,8 +352,7 @@
|
|
|
346
352
|
},
|
|
347
353
|
"lint-staged": {
|
|
348
354
|
"*.{js,jsx}": [
|
|
349
|
-
"
|
|
350
|
-
"prettier --write"
|
|
355
|
+
"biome check --write"
|
|
351
356
|
]
|
|
352
357
|
},
|
|
353
358
|
"commitlint": {
|