mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-24 23:51:20 -08:00
refactor(core): CORE-12 type template resources and verify bundled notices
This commit is contained in:
1 parent
b8039ad1f1
commit
9eb7c945ca
101 files changed
+7363
-664
No files matched your search
@@ -0,0 +1,655 @@
|
||||
/*! Hint.css - v2.7.0 - 2021-10-01
|
||||
* https://kushagra.dev/lab/hint/
|
||||
* Copyright (c) 2021 Kushagra Gour */
|
||||
|
||||
/*-------------------------------------*\
|
||||
HINT.css - A CSS tooltip library
|
||||
\*-------------------------------------*/
|
||||
/**
|
||||
* HINT.css is a tooltip library made in pure CSS.
|
||||
*
|
||||
* Source: https://github.com/chinchang/hint.css
|
||||
* Demo: http://kushagragour.in/lab/hint/
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* source: hint-core.scss
|
||||
*
|
||||
* Defines the basic styling for the tooltip.
|
||||
* Each tooltip is made of 2 parts:
|
||||
* 1) body (:after)
|
||||
* 2) arrow (:before)
|
||||
*
|
||||
* Classes added:
|
||||
* 1) hint
|
||||
*/
|
||||
[class*="hint--"] {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
/**
|
||||
* tooltip arrow
|
||||
*/
|
||||
/**
|
||||
* tooltip body
|
||||
*/ }
|
||||
[class*="hint--"]:before, [class*="hint--"]:after {
|
||||
position: absolute;
|
||||
-webkit-transform: translate3d(0, 0, 0);
|
||||
-moz-transform: translate3d(0, 0, 0);
|
||||
transform: translate3d(0, 0, 0);
|
||||
visibility: hidden;
|
||||
opacity: 0;
|
||||
z-index: 1000000;
|
||||
pointer-events: none;
|
||||
-webkit-transition: 0.3s ease;
|
||||
-moz-transition: 0.3s ease;
|
||||
transition: 0.3s ease;
|
||||
-webkit-transition-delay: 0ms;
|
||||
-moz-transition-delay: 0ms;
|
||||
transition-delay: 0ms; }
|
||||
[class*="hint--"]:hover:before, [class*="hint--"]:hover:after {
|
||||
visibility: visible;
|
||||
opacity: 1; }
|
||||
[class*="hint--"]:hover:before, [class*="hint--"]:hover:after {
|
||||
-webkit-transition-delay: 100ms;
|
||||
-moz-transition-delay: 100ms;
|
||||
transition-delay: 100ms; }
|
||||
[class*="hint--"]:before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
background: transparent;
|
||||
border: 6px solid transparent;
|
||||
z-index: 1000001; }
|
||||
[class*="hint--"]:after {
|
||||
background: #383838;
|
||||
color: white;
|
||||
padding: 8px 10px;
|
||||
font-size: 12px;
|
||||
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||
line-height: 12px;
|
||||
white-space: nowrap; }
|
||||
[class*="hint--"][aria-label]:after {
|
||||
content: attr(aria-label); }
|
||||
[class*="hint--"][data-hint]:after {
|
||||
content: attr(data-hint); }
|
||||
|
||||
[aria-label='']:before, [aria-label='']:after,
|
||||
[data-hint='']:before,
|
||||
[data-hint='']:after {
|
||||
display: none !important; }
|
||||
|
||||
/**
|
||||
* source: hint-position.scss
|
||||
*
|
||||
* Defines the positoning logic for the tooltips.
|
||||
*
|
||||
* Classes added:
|
||||
* 1) hint--top
|
||||
* 2) hint--bottom
|
||||
* 3) hint--left
|
||||
* 4) hint--right
|
||||
*/
|
||||
/**
|
||||
* set default color for tooltip arrows
|
||||
*/
|
||||
.hint--top-left:before {
|
||||
border-top-color: #383838; }
|
||||
|
||||
.hint--top-right:before {
|
||||
border-top-color: #383838; }
|
||||
|
||||
.hint--top:before {
|
||||
border-top-color: #383838; }
|
||||
|
||||
.hint--bottom-left:before {
|
||||
border-bottom-color: #383838; }
|
||||
|
||||
.hint--bottom-right:before {
|
||||
border-bottom-color: #383838; }
|
||||
|
||||
.hint--bottom:before {
|
||||
border-bottom-color: #383838; }
|
||||
|
||||
.hint--left:before {
|
||||
border-left-color: #383838; }
|
||||
|
||||
.hint--right:before {
|
||||
border-right-color: #383838; }
|
||||
|
||||
/**
|
||||
* top tooltip
|
||||
*/
|
||||
.hint--top:before {
|
||||
margin-bottom: -11px; }
|
||||
|
||||
.hint--top:before, .hint--top:after {
|
||||
bottom: 100%;
|
||||
left: 50%; }
|
||||
|
||||
.hint--top:before {
|
||||
left: calc(50% - 6px); }
|
||||
|
||||
.hint--top:after {
|
||||
-webkit-transform: translateX(-50%);
|
||||
-moz-transform: translateX(-50%);
|
||||
transform: translateX(-50%); }
|
||||
|
||||
.hint--top:hover:before {
|
||||
-webkit-transform: translateY(-8px);
|
||||
-moz-transform: translateY(-8px);
|
||||
transform: translateY(-8px); }
|
||||
|
||||
.hint--top:hover:after {
|
||||
-webkit-transform: translateX(-50%) translateY(-8px);
|
||||
-moz-transform: translateX(-50%) translateY(-8px);
|
||||
transform: translateX(-50%) translateY(-8px); }
|
||||
|
||||
/**
|
||||
* bottom tooltip
|
||||
*/
|
||||
.hint--bottom:before {
|
||||
margin-top: -11px; }
|
||||
|
||||
.hint--bottom:before, .hint--bottom:after {
|
||||
top: 100%;
|
||||
left: 50%; }
|
||||
|
||||
.hint--bottom:before {
|
||||
left: calc(50% - 6px); }
|
||||
|
||||
.hint--bottom:after {
|
||||
-webkit-transform: translateX(-50%);
|
||||
-moz-transform: translateX(-50%);
|
||||
transform: translateX(-50%); }
|
||||
|
||||
.hint--bottom:hover:before {
|
||||
-webkit-transform: translateY(8px);
|
||||
-moz-transform: translateY(8px);
|
||||
transform: translateY(8px); }
|
||||
|
||||
.hint--bottom:hover:after {
|
||||
-webkit-transform: translateX(-50%) translateY(8px);
|
||||
-moz-transform: translateX(-50%) translateY(8px);
|
||||
transform: translateX(-50%) translateY(8px); }
|
||||
|
||||
/**
|
||||
* right tooltip
|
||||
*/
|
||||
.hint--right:before {
|
||||
margin-left: -11px;
|
||||
margin-bottom: -6px; }
|
||||
|
||||
.hint--right:after {
|
||||
margin-bottom: -14px; }
|
||||
|
||||
.hint--right:before, .hint--right:after {
|
||||
left: 100%;
|
||||
bottom: 50%; }
|
||||
|
||||
.hint--right:hover:before {
|
||||
-webkit-transform: translateX(8px);
|
||||
-moz-transform: translateX(8px);
|
||||
transform: translateX(8px); }
|
||||
|
||||
.hint--right:hover:after {
|
||||
-webkit-transform: translateX(8px);
|
||||
-moz-transform: translateX(8px);
|
||||
transform: translateX(8px); }
|
||||
|
||||
/**
|
||||
* left tooltip
|
||||
*/
|
||||
.hint--left:before {
|
||||
margin-right: -11px;
|
||||
margin-bottom: -6px; }
|
||||
|
||||
.hint--left:after {
|
||||
margin-bottom: -14px; }
|
||||
|
||||
.hint--left:before, .hint--left:after {
|
||||
right: 100%;
|
||||
bottom: 50%; }
|
||||
|
||||
.hint--left:hover:before {
|
||||
-webkit-transform: translateX(-8px);
|
||||
-moz-transform: translateX(-8px);
|
||||
transform: translateX(-8px); }
|
||||
|
||||
.hint--left:hover:after {
|
||||
-webkit-transform: translateX(-8px);
|
||||
-moz-transform: translateX(-8px);
|
||||
transform: translateX(-8px); }
|
||||
|
||||
/**
|
||||
* top-left tooltip
|
||||
*/
|
||||
.hint--top-left:before {
|
||||
margin-bottom: -11px; }
|
||||
|
||||
.hint--top-left:before, .hint--top-left:after {
|
||||
bottom: 100%;
|
||||
left: 50%; }
|
||||
|
||||
.hint--top-left:before {
|
||||
left: calc(50% - 6px); }
|
||||
|
||||
.hint--top-left:after {
|
||||
-webkit-transform: translateX(-100%);
|
||||
-moz-transform: translateX(-100%);
|
||||
transform: translateX(-100%); }
|
||||
|
||||
.hint--top-left:after {
|
||||
margin-left: 12px; }
|
||||
|
||||
.hint--top-left:hover:before {
|
||||
-webkit-transform: translateY(-8px);
|
||||
-moz-transform: translateY(-8px);
|
||||
transform: translateY(-8px); }
|
||||
|
||||
.hint--top-left:hover:after {
|
||||
-webkit-transform: translateX(-100%) translateY(-8px);
|
||||
-moz-transform: translateX(-100%) translateY(-8px);
|
||||
transform: translateX(-100%) translateY(-8px); }
|
||||
|
||||
/**
|
||||
* top-right tooltip
|
||||
*/
|
||||
.hint--top-right:before {
|
||||
margin-bottom: -11px; }
|
||||
|
||||
.hint--top-right:before, .hint--top-right:after {
|
||||
bottom: 100%;
|
||||
left: 50%; }
|
||||
|
||||
.hint--top-right:before {
|
||||
left: calc(50% - 6px); }
|
||||
|
||||
.hint--top-right:after {
|
||||
-webkit-transform: translateX(0);
|
||||
-moz-transform: translateX(0);
|
||||
transform: translateX(0); }
|
||||
|
||||
.hint--top-right:after {
|
||||
margin-left: -12px; }
|
||||
|
||||
.hint--top-right:hover:before {
|
||||
-webkit-transform: translateY(-8px);
|
||||
-moz-transform: translateY(-8px);
|
||||
transform: translateY(-8px); }
|
||||
|
||||
.hint--top-right:hover:after {
|
||||
-webkit-transform: translateY(-8px);
|
||||
-moz-transform: translateY(-8px);
|
||||
transform: translateY(-8px); }
|
||||
|
||||
/**
|
||||
* bottom-left tooltip
|
||||
*/
|
||||
.hint--bottom-left:before {
|
||||
margin-top: -11px; }
|
||||
|
||||
.hint--bottom-left:before, .hint--bottom-left:after {
|
||||
top: 100%;
|
||||
left: 50%; }
|
||||
|
||||
.hint--bottom-left:before {
|
||||
left: calc(50% - 6px); }
|
||||
|
||||
.hint--bottom-left:after {
|
||||
-webkit-transform: translateX(-100%);
|
||||
-moz-transform: translateX(-100%);
|
||||
transform: translateX(-100%); }
|
||||
|
||||
.hint--bottom-left:after {
|
||||
margin-left: 12px; }
|
||||
|
||||
.hint--bottom-left:hover:before {
|
||||
-webkit-transform: translateY(8px);
|
||||
-moz-transform: translateY(8px);
|
||||
transform: translateY(8px); }
|
||||
|
||||
.hint--bottom-left:hover:after {
|
||||
-webkit-transform: translateX(-100%) translateY(8px);
|
||||
-moz-transform: translateX(-100%) translateY(8px);
|
||||
transform: translateX(-100%) translateY(8px); }
|
||||
|
||||
/**
|
||||
* bottom-right tooltip
|
||||
*/
|
||||
.hint--bottom-right:before {
|
||||
margin-top: -11px; }
|
||||
|
||||
.hint--bottom-right:before, .hint--bottom-right:after {
|
||||
top: 100%;
|
||||
left: 50%; }
|
||||
|
||||
.hint--bottom-right:before {
|
||||
left: calc(50% - 6px); }
|
||||
|
||||
.hint--bottom-right:after {
|
||||
-webkit-transform: translateX(0);
|
||||
-moz-transform: translateX(0);
|
||||
transform: translateX(0); }
|
||||
|
||||
.hint--bottom-right:after {
|
||||
margin-left: -12px; }
|
||||
|
||||
.hint--bottom-right:hover:before {
|
||||
-webkit-transform: translateY(8px);
|
||||
-moz-transform: translateY(8px);
|
||||
transform: translateY(8px); }
|
||||
|
||||
.hint--bottom-right:hover:after {
|
||||
-webkit-transform: translateY(8px);
|
||||
-moz-transform: translateY(8px);
|
||||
transform: translateY(8px); }
|
||||
|
||||
/**
|
||||
* source: hint-sizes.scss
|
||||
*
|
||||
* Defines width restricted tooltips that can span
|
||||
* across multiple lines.
|
||||
*
|
||||
* Classes added:
|
||||
* 1) hint--small
|
||||
* 2) hint--medium
|
||||
* 3) hint--large
|
||||
*
|
||||
*/
|
||||
.hint--small:after,
|
||||
.hint--medium:after,
|
||||
.hint--large:after {
|
||||
white-space: normal;
|
||||
line-height: 1.4em;
|
||||
word-wrap: break-word; }
|
||||
|
||||
.hint--small:after {
|
||||
width: 80px; }
|
||||
|
||||
.hint--medium:after {
|
||||
width: 150px; }
|
||||
|
||||
.hint--large:after {
|
||||
width: 300px; }
|
||||
|
||||
/**
|
||||
* source: hint-theme.scss
|
||||
*
|
||||
* Defines basic theme for tooltips.
|
||||
*
|
||||
*/
|
||||
[class*="hint--"] {
|
||||
/**
|
||||
* tooltip body
|
||||
*/ }
|
||||
[class*="hint--"]:after {
|
||||
text-shadow: 0 -1px 0px black;
|
||||
box-shadow: 4px 4px 8px rgba(0, 0, 0, 0.3); }
|
||||
|
||||
/**
|
||||
* source: hint-color-types.scss
|
||||
*
|
||||
* Contains tooltips of various types based on color differences.
|
||||
*
|
||||
* Classes added:
|
||||
* 1) hint--error
|
||||
* 2) hint--warning
|
||||
* 3) hint--info
|
||||
* 4) hint--success
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* Error
|
||||
*/
|
||||
.hint--error:after {
|
||||
background-color: #b34e4d;
|
||||
text-shadow: 0 -1px 0px #592726; }
|
||||
|
||||
.hint--error.hint--top-left:before {
|
||||
border-top-color: #b34e4d; }
|
||||
|
||||
.hint--error.hint--top-right:before {
|
||||
border-top-color: #b34e4d; }
|
||||
|
||||
.hint--error.hint--top:before {
|
||||
border-top-color: #b34e4d; }
|
||||
|
||||
.hint--error.hint--bottom-left:before {
|
||||
border-bottom-color: #b34e4d; }
|
||||
|
||||
.hint--error.hint--bottom-right:before {
|
||||
border-bottom-color: #b34e4d; }
|
||||
|
||||
.hint--error.hint--bottom:before {
|
||||
border-bottom-color: #b34e4d; }
|
||||
|
||||
.hint--error.hint--left:before {
|
||||
border-left-color: #b34e4d; }
|
||||
|
||||
.hint--error.hint--right:before {
|
||||
border-right-color: #b34e4d; }
|
||||
|
||||
/**
|
||||
* Warning
|
||||
*/
|
||||
.hint--warning:after {
|
||||
background-color: #c09854;
|
||||
text-shadow: 0 -1px 0px #6c5328; }
|
||||
|
||||
.hint--warning.hint--top-left:before {
|
||||
border-top-color: #c09854; }
|
||||
|
||||
.hint--warning.hint--top-right:before {
|
||||
border-top-color: #c09854; }
|
||||
|
||||
.hint--warning.hint--top:before {
|
||||
border-top-color: #c09854; }
|
||||
|
||||
.hint--warning.hint--bottom-left:before {
|
||||
border-bottom-color: #c09854; }
|
||||
|
||||
.hint--warning.hint--bottom-right:before {
|
||||
border-bottom-color: #c09854; }
|
||||
|
||||
.hint--warning.hint--bottom:before {
|
||||
border-bottom-color: #c09854; }
|
||||
|
||||
.hint--warning.hint--left:before {
|
||||
border-left-color: #c09854; }
|
||||
|
||||
.hint--warning.hint--right:before {
|
||||
border-right-color: #c09854; }
|
||||
|
||||
/**
|
||||
* Info
|
||||
*/
|
||||
.hint--info:after {
|
||||
background-color: #3986ac;
|
||||
text-shadow: 0 -1px 0px #1a3c4d; }
|
||||
|
||||
.hint--info.hint--top-left:before {
|
||||
border-top-color: #3986ac; }
|
||||
|
||||
.hint--info.hint--top-right:before {
|
||||
border-top-color: #3986ac; }
|
||||
|
||||
.hint--info.hint--top:before {
|
||||
border-top-color: #3986ac; }
|
||||
|
||||
.hint--info.hint--bottom-left:before {
|
||||
border-bottom-color: #3986ac; }
|
||||
|
||||
.hint--info.hint--bottom-right:before {
|
||||
border-bottom-color: #3986ac; }
|
||||
|
||||
.hint--info.hint--bottom:before {
|
||||
border-bottom-color: #3986ac; }
|
||||
|
||||
.hint--info.hint--left:before {
|
||||
border-left-color: #3986ac; }
|
||||
|
||||
.hint--info.hint--right:before {
|
||||
border-right-color: #3986ac; }
|
||||
|
||||
/**
|
||||
* Success
|
||||
*/
|
||||
.hint--success:after {
|
||||
background-color: #458746;
|
||||
text-shadow: 0 -1px 0px #1a321a; }
|
||||
|
||||
.hint--success.hint--top-left:before {
|
||||
border-top-color: #458746; }
|
||||
|
||||
.hint--success.hint--top-right:before {
|
||||
border-top-color: #458746; }
|
||||
|
||||
.hint--success.hint--top:before {
|
||||
border-top-color: #458746; }
|
||||
|
||||
.hint--success.hint--bottom-left:before {
|
||||
border-bottom-color: #458746; }
|
||||
|
||||
.hint--success.hint--bottom-right:before {
|
||||
border-bottom-color: #458746; }
|
||||
|
||||
.hint--success.hint--bottom:before {
|
||||
border-bottom-color: #458746; }
|
||||
|
||||
.hint--success.hint--left:before {
|
||||
border-left-color: #458746; }
|
||||
|
||||
.hint--success.hint--right:before {
|
||||
border-right-color: #458746; }
|
||||
|
||||
/**
|
||||
* source: hint-always.scss
|
||||
*
|
||||
* Defines a persisted tooltip which shows always.
|
||||
*
|
||||
* Classes added:
|
||||
* 1) hint--always
|
||||
*
|
||||
*/
|
||||
.hint--always:after, .hint--always:before {
|
||||
opacity: 1;
|
||||
visibility: visible; }
|
||||
|
||||
.hint--always.hint--top:before {
|
||||
-webkit-transform: translateY(-8px);
|
||||
-moz-transform: translateY(-8px);
|
||||
transform: translateY(-8px); }
|
||||
|
||||
.hint--always.hint--top:after {
|
||||
-webkit-transform: translateX(-50%) translateY(-8px);
|
||||
-moz-transform: translateX(-50%) translateY(-8px);
|
||||
transform: translateX(-50%) translateY(-8px); }
|
||||
|
||||
.hint--always.hint--top-left:before {
|
||||
-webkit-transform: translateY(-8px);
|
||||
-moz-transform: translateY(-8px);
|
||||
transform: translateY(-8px); }
|
||||
|
||||
.hint--always.hint--top-left:after {
|
||||
-webkit-transform: translateX(-100%) translateY(-8px);
|
||||
-moz-transform: translateX(-100%) translateY(-8px);
|
||||
transform: translateX(-100%) translateY(-8px); }
|
||||
|
||||
.hint--always.hint--top-right:before {
|
||||
-webkit-transform: translateY(-8px);
|
||||
-moz-transform: translateY(-8px);
|
||||
transform: translateY(-8px); }
|
||||
|
||||
.hint--always.hint--top-right:after {
|
||||
-webkit-transform: translateY(-8px);
|
||||
-moz-transform: translateY(-8px);
|
||||
transform: translateY(-8px); }
|
||||
|
||||
.hint--always.hint--bottom:before {
|
||||
-webkit-transform: translateY(8px);
|
||||
-moz-transform: translateY(8px);
|
||||
transform: translateY(8px); }
|
||||
|
||||
.hint--always.hint--bottom:after {
|
||||
-webkit-transform: translateX(-50%) translateY(8px);
|
||||
-moz-transform: translateX(-50%) translateY(8px);
|
||||
transform: translateX(-50%) translateY(8px); }
|
||||
|
||||
.hint--always.hint--bottom-left:before {
|
||||
-webkit-transform: translateY(8px);
|
||||
-moz-transform: translateY(8px);
|
||||
transform: translateY(8px); }
|
||||
|
||||
.hint--always.hint--bottom-left:after {
|
||||
-webkit-transform: translateX(-100%) translateY(8px);
|
||||
-moz-transform: translateX(-100%) translateY(8px);
|
||||
transform: translateX(-100%) translateY(8px); }
|
||||
|
||||
.hint--always.hint--bottom-right:before {
|
||||
-webkit-transform: translateY(8px);
|
||||
-moz-transform: translateY(8px);
|
||||
transform: translateY(8px); }
|
||||
|
||||
.hint--always.hint--bottom-right:after {
|
||||
-webkit-transform: translateY(8px);
|
||||
-moz-transform: translateY(8px);
|
||||
transform: translateY(8px); }
|
||||
|
||||
.hint--always.hint--left:before {
|
||||
-webkit-transform: translateX(-8px);
|
||||
-moz-transform: translateX(-8px);
|
||||
transform: translateX(-8px); }
|
||||
|
||||
.hint--always.hint--left:after {
|
||||
-webkit-transform: translateX(-8px);
|
||||
-moz-transform: translateX(-8px);
|
||||
transform: translateX(-8px); }
|
||||
|
||||
.hint--always.hint--right:before {
|
||||
-webkit-transform: translateX(8px);
|
||||
-moz-transform: translateX(8px);
|
||||
transform: translateX(8px); }
|
||||
|
||||
.hint--always.hint--right:after {
|
||||
-webkit-transform: translateX(8px);
|
||||
-moz-transform: translateX(8px);
|
||||
transform: translateX(8px); }
|
||||
|
||||
/**
|
||||
* source: hint-rounded.scss
|
||||
*
|
||||
* Defines rounded corner tooltips.
|
||||
*
|
||||
* Classes added:
|
||||
* 1) hint--rounded
|
||||
*
|
||||
*/
|
||||
.hint--rounded:after {
|
||||
border-radius: 4px; }
|
||||
|
||||
/**
|
||||
* source: hint-effects.scss
|
||||
*
|
||||
* Defines various transition effects for the tooltips.
|
||||
*
|
||||
* Classes added:
|
||||
* 1) hint--no-animate
|
||||
* 2) hint--bounce
|
||||
*
|
||||
*/
|
||||
.hint--no-animate:before, .hint--no-animate:after {
|
||||
-webkit-transition-duration: 0ms;
|
||||
-moz-transition-duration: 0ms;
|
||||
transition-duration: 0ms; }
|
||||
|
||||
.hint--bounce:before, .hint--bounce:after {
|
||||
-webkit-transition: opacity 0.3s ease, visibility 0.3s ease, -webkit-transform 0.3s cubic-bezier(0.71, 1.7, 0.77, 1.24);
|
||||
-moz-transition: opacity 0.3s ease, visibility 0.3s ease, -moz-transform 0.3s cubic-bezier(0.71, 1.7, 0.77, 1.24);
|
||||
transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s cubic-bezier(0.71, 1.7, 0.77, 1.24); }
|
||||
|
||||
.hint--no-shadow:before, .hint--no-shadow:after {
|
||||
text-shadow: initial;
|
||||
box-shadow: initial; }
|
||||
|
||||
.hint--no-arrow:before {
|
||||
display: none; }
|
||||
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2021 Kushagra Gour
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
@@ -0,0 +1,160 @@
|
||||
/* eslint-disable promise/prefer-await-to-then */
|
||||
|
||||
const methodMap = [
|
||||
[
|
||||
'requestFullscreen',
|
||||
'exitFullscreen',
|
||||
'fullscreenElement',
|
||||
'fullscreenEnabled',
|
||||
'fullscreenchange',
|
||||
'fullscreenerror',
|
||||
],
|
||||
// New WebKit
|
||||
[
|
||||
'webkitRequestFullscreen',
|
||||
'webkitExitFullscreen',
|
||||
'webkitFullscreenElement',
|
||||
'webkitFullscreenEnabled',
|
||||
'webkitfullscreenchange',
|
||||
'webkitfullscreenerror',
|
||||
|
||||
],
|
||||
// Old WebKit
|
||||
[
|
||||
'webkitRequestFullScreen',
|
||||
'webkitCancelFullScreen',
|
||||
'webkitCurrentFullScreenElement',
|
||||
'webkitCancelFullScreen',
|
||||
'webkitfullscreenchange',
|
||||
'webkitfullscreenerror',
|
||||
|
||||
],
|
||||
[
|
||||
'mozRequestFullScreen',
|
||||
'mozCancelFullScreen',
|
||||
'mozFullScreenElement',
|
||||
'mozFullScreenEnabled',
|
||||
'mozfullscreenchange',
|
||||
'mozfullscreenerror',
|
||||
],
|
||||
[
|
||||
'msRequestFullscreen',
|
||||
'msExitFullscreen',
|
||||
'msFullscreenElement',
|
||||
'msFullscreenEnabled',
|
||||
'MSFullscreenChange',
|
||||
'MSFullscreenError',
|
||||
],
|
||||
];
|
||||
|
||||
const nativeAPI = (() => {
|
||||
if (typeof document === 'undefined') {
|
||||
return false;
|
||||
}
|
||||
|
||||
const unprefixedMethods = methodMap[0];
|
||||
const returnValue = {};
|
||||
|
||||
for (const methodList of methodMap) {
|
||||
const exitFullscreenMethod = methodList?.[1];
|
||||
if (exitFullscreenMethod in document) {
|
||||
for (const [index, method] of methodList.entries()) {
|
||||
returnValue[unprefixedMethods[index]] = method;
|
||||
}
|
||||
|
||||
return returnValue;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
})();
|
||||
|
||||
const eventNameMap = {
|
||||
change: nativeAPI.fullscreenchange,
|
||||
error: nativeAPI.fullscreenerror,
|
||||
};
|
||||
|
||||
// eslint-disable-next-line import/no-mutable-exports
|
||||
let screenfull = {
|
||||
// eslint-disable-next-line default-param-last
|
||||
request(element = document.documentElement, options) {
|
||||
return new Promise((resolve, reject) => {
|
||||
const onFullScreenEntered = () => {
|
||||
screenfull.off('change', onFullScreenEntered);
|
||||
resolve();
|
||||
};
|
||||
|
||||
screenfull.on('change', onFullScreenEntered);
|
||||
|
||||
const returnPromise = element[nativeAPI.requestFullscreen](options);
|
||||
|
||||
if (returnPromise instanceof Promise) {
|
||||
returnPromise.then(onFullScreenEntered).catch(reject);
|
||||
}
|
||||
});
|
||||
},
|
||||
exit() {
|
||||
return new Promise((resolve, reject) => {
|
||||
if (!screenfull.isFullscreen) {
|
||||
resolve();
|
||||
return;
|
||||
}
|
||||
|
||||
const onFullScreenExit = () => {
|
||||
screenfull.off('change', onFullScreenExit);
|
||||
resolve();
|
||||
};
|
||||
|
||||
screenfull.on('change', onFullScreenExit);
|
||||
|
||||
const returnPromise = document[nativeAPI.exitFullscreen]();
|
||||
|
||||
if (returnPromise instanceof Promise) {
|
||||
returnPromise.then(onFullScreenExit).catch(reject);
|
||||
}
|
||||
});
|
||||
},
|
||||
toggle(element, options) {
|
||||
return screenfull.isFullscreen ? screenfull.exit() : screenfull.request(element, options);
|
||||
},
|
||||
onchange(callback) {
|
||||
screenfull.on('change', callback);
|
||||
},
|
||||
onerror(callback) {
|
||||
screenfull.on('error', callback);
|
||||
},
|
||||
on(event, callback) {
|
||||
const eventName = eventNameMap[event];
|
||||
if (eventName) {
|
||||
document.addEventListener(eventName, callback, false);
|
||||
}
|
||||
},
|
||||
off(event, callback) {
|
||||
const eventName = eventNameMap[event];
|
||||
if (eventName) {
|
||||
document.removeEventListener(eventName, callback, false);
|
||||
}
|
||||
},
|
||||
raw: nativeAPI,
|
||||
};
|
||||
|
||||
Object.defineProperties(screenfull, {
|
||||
isFullscreen: {
|
||||
get: () => Boolean(document[nativeAPI.fullscreenElement]),
|
||||
},
|
||||
element: {
|
||||
enumerable: true,
|
||||
get: () => document[nativeAPI.fullscreenElement] ?? undefined,
|
||||
},
|
||||
isEnabled: {
|
||||
enumerable: true,
|
||||
// Coerce to boolean in case of old WebKit.
|
||||
get: () => Boolean(document[nativeAPI.fullscreenEnabled]),
|
||||
},
|
||||
});
|
||||
|
||||
if (!nativeAPI) {
|
||||
screenfull = {isEnabled: false};
|
||||
}
|
||||
|
||||
export default screenfull;
|
||||
@@ -0,0 +1,9 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
@@ -0,0 +1,22 @@
|
||||
[
|
||||
{
|
||||
"file": "refactor/baselines/core-vendor/screenfull-6.0.2.txt",
|
||||
"url": "https://raw.githubusercontent.com/sindresorhus/screenfull/v6.0.2/index.js",
|
||||
"sha256": "4246711b342018b0f257f8fa6047f240a21af6218c7e79cab5c662e810bb3e01"
|
||||
},
|
||||
{
|
||||
"file": "refactor/baselines/core-vendor/screenfull-license.txt",
|
||||
"url": "https://raw.githubusercontent.com/sindresorhus/screenfull/v6.0.2/license",
|
||||
"sha256": "5c932d88256b4ab958f64a856fa48e8bd1f55bc1d96b8149c65689e0c61789d3"
|
||||
},
|
||||
{
|
||||
"file": "refactor/baselines/core-vendor/hint-2.7.0.txt",
|
||||
"url": "https://raw.githubusercontent.com/chinchang/hint.css/v2.7.0/hint.css",
|
||||
"sha256": "a804fa4b607167e579b39d192f1a29d2b27226097094e0351f2d46ac8ebaa864"
|
||||
},
|
||||
{
|
||||
"file": "refactor/baselines/core-vendor/hint-license.txt",
|
||||
"url": "https://raw.githubusercontent.com/chinchang/hint.css/v2.7.0/LICENSE",
|
||||
"sha256": "55cee0a0645d18366eaa0cd21208c224568e14c38b7894e0f9ff537702ff8ea0"
|
||||
}
|
||||
]
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,35 @@
|
||||
# CORE-12 模板及公开资源入口
|
||||
|
||||
状态:完成;源码、严格类型、构建、安装包与本地三浏览器验收通过。
|
||||
|
||||
## 实际模块与兼容边界
|
||||
|
||||
模板拆为入口、html、节点绑定和泛型宿主/节点类型;保持 DOM 字符串、绑定顺序、query 绑定、节点身份、SSR 复用、proxy 调用上下文及销毁策略。SSR 缺节点不擅自补齐;canvas 不断言成原生 video。容器类型断言仅覆盖已有 non-null/div 校验边界,选择器泛型不声称验证任意用户 HTML。
|
||||
|
||||
图标拆分默认 SVG 与注册器,保持每次读取的新 i 包装、自定义节点移动、描述符和默认覆盖。12 个语言源码迁移 TS,共享发布别名边界;构建仍输出 11 对独立语言文件。style 入口与注入实现迁移 TS,主入口维持全局赋值/调用顺序,utils 继续导出原帮助函数。
|
||||
|
||||
BASE-I18N-01:旧 get('constructor') 在缺少翻译时返回函数;候选只查自身属性,返回原 key 字符串。自有 constructor/toString/__proto__ 翻译、空字符串 fallback、大小写和 update 深合并保持。此为明确缺陷修正,发布基线不改。
|
||||
|
||||
BASE-TYPE-09:旧 icons 声明为 HTMLDivElement,实际为 i 元素;template 实例声明 html,但实际是构造器静态字段,video 又可能为 canvas。源码保留真实类型,公开声明旧合法赋值暂不收紧,交 CORE-21 统一提供精确兼容视图。
|
||||
|
||||
## 复制资源与许可
|
||||
|
||||
screenfull 固定以 v6.0.2 为比较基准;AST 输出去注释后仅四项适配:取消可选下标、let 改 const、element 保留 null、移除不支持时替换整个对象的分支。本地首次引入 fab5afed2(2022-07-18)未记录精确上游 tag;6.0.0/6.0.1 的规范化实现相同且也有差异,因此不把比较基准伪装成已证实的历史复制版本。现有实现未替换。
|
||||
|
||||
Hint.css 头部明确 v2.7.0;剥离 ArtPlayer 外层作用域、经 Less 规范化并统一引号后,全部样式仅相差首条 font-style:normal 和默认颜色 #383838 改 #000000。所有规则保持。
|
||||
|
||||
固定上游原文、许可证、URL/SHA 见 baselines/core-vendor。core-vendor.mjs 对全部规范化内容进行差异限定,并确认通知含完整 MIT 许可。THIRD_PARTY_NOTICES 包含 screenfull、Hint.css 及已打包 option-validator 2.0.6 的许可,构建脚本将全文加入每个核心输出头部。已核对实际 tarball 中的通知文件和三个独立 JS 头部完整许可,并验证当前源码/产物/语言文件与安装消费者的 SHA 一致;VENDOR-01/02 关闭。历史 screenfull 引入 tag 的不确定性保持明示,固定比较版本与全部适配可重复验证。
|
||||
|
||||
## 最终验证
|
||||
|
||||
- 源码专项:4 项语言/SSR、7 项复制内容/全屏适配测试通过;核心及源码类型用例编译通过。
|
||||
- 三浏览器专项包括新旧 SSR 复用、proxy、图标、语言缺陷对照、fullscreenWeb 和实际点击进入/退出原生全屏。三个本地引擎均报告 native fullscreen 可用,六个新旧组合全部实际执行原生路径。
|
||||
- yarn ci:check:169 项通过(140 单元、4 工程、25 基线);76 个生产 TS 文件严格检查。
|
||||
- 实际核心/chapter tarball:27 项运行时通过、五组类型零诊断;全部 11 对语言子路径、UMD 和 ESM 浏览器别名及目录完整性通过。
|
||||
- 最终安装 UMD:258 项三浏览器通过;最终安装 legacy:同套 258 项通过。没有跳过、重试、flaky 或未处理 JS 异常。
|
||||
- [证据](../baselines/template-resources-validation.json) 记录完整源文件/测试/产物指纹、语言与许可文件、引擎版本、每项结果和原生全屏能力。
|
||||
- 初次新增原生全屏用例误用了 /media/pattern.mp4,六项在 ready 前失败;保留报告,改为实际 /test/pattern.mp4 路由后通过,没有修改播放器或扩大超时。许可头部格式修正后重新构建、打包并复跑最终两套矩阵;一次 Windows copyfile UNKNOWN 失败保留,原命令重跑成功。
|
||||
|
||||
没有升级依赖、版本或锁文件;公开 d.ts 保持旧消费接受范围。尚未验证远端 CI、实体设备和所有插件发布。重复 loading 阶段样式注入不在此轮重新设计;native fullscreen 的五种方法映射有受控单元验证,三个本地引擎另有真实点击证据;不能扩大为实体移动设备或 WebKit video-only fullscreen 验收。回退需一起回退源码、语言构建、通知、生成产物、测试和相关文档。
|
||||
|
||||
BASE-I18N-01 已关闭;BASE-TYPE-09 保持开放并交 CORE-21。迁移与维护地图见 packages/artplayer/ARCHITECTURE.md。当前核心 71 个 TS 源文件,chapter 5 个;主入口仍是待 CORE-20 整合的兼容 JS 门面。本任务独立本地提交,无推送或发布。
|
||||
+3
-2
@@ -4,7 +4,7 @@
|
||||
|
||||
基线:`40fcda6a37d0049d42e49c1e64e70d4fd9ba5f7f`。总任务 214 项,范围 22 个包及工作区/示例。
|
||||
|
||||
状态:todo 167 / doing 0 / blocked 0 / done 47 / deferred 0。风险 L/M/H 表示兼容风险,不表示工期。
|
||||
状态:todo 166 / doing 0 / blocked 0 / done 48 / deferred 0。风险 L/M/H 表示兼容风险,不表示工期。
|
||||
|
||||
前置依赖是启动条件;验收是完成条件。任务可以继续拆分,但不能复用或悄悄删除旧 ID。
|
||||
|
||||
@@ -115,7 +115,7 @@
|
||||
| CORE-09 | artplayer<br>整理 URL 与切源操作 | CORE-04, CORE-06, CORE-08 | url/switch/customType 的操作身份及取消方案 | 并发切源、错误、同 URL、销毁和 Promise 结算有契约;处理 baselines/lifecycle-coverage.md 的 BASE-LIFE-01/02/06 并增加候选正向回归 | H | done |
|
||||
| CORE-10 | artplayer<br>迁移播放与时间/状态属性 | CORE-09 | play/pause/toggle/seek/volume/rate/duration 等模块 | 旧返回值、拒绝、mutex、位置恢复、属性描述符与事件通过;接续 CORE-07 / BASE-TYPE-04 的 toggle void 与实际 Promise 分支冲突,不吞拒绝 | H | done |
|
||||
| CORE-11 | artplayer<br>整理媒体事件、ready 与重连 | CORE-10 | 媒体转发、重连、UI 响应职责分离 | readiness 次数/顺序、过期重连、原错误参数有回归 | H | done |
|
||||
| CORE-12 | artplayer<br>迁移模板及公开资源入口 | CORE-06, CORE-04, BASE-04 | template/icons/i18n/style、SSR 与 proxy 挂载 | DOM/CSS/global/样式注入、i18n 子路径及 SSR import 保持;不把 SSR import/useSSR 保持扩大为服务端构造播放器;复跑 BASE-05 的 SSR import/模板、浏览器 useSSR 节点复用和非浏览器构造错误;接续 VENDOR-01/02,核对 screenfull/hint 复制版本、修改与分发通知,保留 DOM/CSS/fullscreen 行为 | H | todo |
|
||||
| CORE-12 | artplayer<br>迁移模板及公开资源入口 | CORE-06, CORE-04, BASE-04 | template/icons/i18n/style、SSR 与 proxy 挂载 | DOM/CSS/global/样式注入、i18n 子路径及 SSR import 保持;不把 SSR import/useSSR 保持扩大为服务端构造播放器;复跑 BASE-05 的 SSR import/模板、浏览器 useSSR 节点复用和非浏览器构造错误;接续 VENDOR-01/02,核对 screenfull/hint 复制版本、修改与分发通知,保留 DOM/CSS/fullscreen 行为 | H | done |
|
||||
| CORE-13 | artplayer<br>迁移组件注册与控件 | CORE-12, CORE-08 | Component/control/layer/contextmenu 的资源与 TS 边界 | add/update/remove、name、selector、mounted/beforeUnmount 通过;处理 BASE-DOM-02 窄容器控件裁切,保留 controls.update 的旧 undefined 返回值 | H | todo |
|
||||
| CORE-14 | artplayer<br>拆分设置树、渲染和布局 | CORE-13 | setting model/selection/render/layout 的分批实现 | 不强行统一控件返回值,嵌套选择、默认高亮、更新清理通过;结合 BASE-DOM-02 验证窄容器设置定位;接续 BASE-TYPE-07 的 find null、add/update item、remove undefined 声明冲突 | H | todo |
|
||||
| CORE-15 | artplayer<br>迁移字幕获取、解析和渲染 | CORE-11, CORE-13 | subtitle 请求/track/DOM/URL 生命周期与类型 | 过期结果、偏移、cue 数组、原生全屏及错误路径通过;接续 BASE-TYPE-07 的真实 cue 数组与旧隐式 scalar 回调声明兼容 | H | todo |
|
||||
@@ -446,6 +446,7 @@
|
||||
- CORE-09: [记录](changes/2026-09-11-CORE-09-source-operations.md) [记录](baselines/source-operations-validation.json)
|
||||
- CORE-10: [记录](changes/2026-09-11-CORE-10-playback-properties.md) [记录](baselines/playback-properties-validation.json)
|
||||
- CORE-11: [记录](changes/2026-09-11-CORE-11-media-events.md) [记录](baselines/media-events-validation.json)
|
||||
- CORE-12: [记录](changes/2026-09-11-CORE-12-template-resources.md) [记录](baselines/template-resources-validation.json)
|
||||
- PKG-CHAPTER-01: [记录](changes/2026-09-10-PKG-CHAPTER-01-contract.md) [记录](baselines/chapter-contract.md)
|
||||
- PKG-CHAPTER-02: [记录](changes/2026-09-10-PKG-CHAPTER-02-tests.md) [记录](baselines/chapter-validation.json)
|
||||
- PKG-CHAPTER-03: [记录](changes/2026-09-10-PKG-CHAPTER-03-typescript-modules.md) [记录](baselines/chapter-migration-validation.json)
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
# 进度与证据
|
||||
|
||||
## 当前实施:CORE-12 模板及公开资源入口完成
|
||||
|
||||
模板、图标、语言和样式入口迁移 TS,保留 SSR/DOM/proxy 身份及语言分发。169 项 Node/工程/基线通过,最终安装 UMD 与 legacy 各 258 项三浏览器通过;打包 27 项运行时及五组类型零诊断。复制资源固定上游内容、全部适配和实际分发许可已核对,关闭 VENDOR-01/02 与 BASE-I18N-01;公开模板/图标类型差异 BASE-TYPE-09 交 CORE-21。见 [交付](changes/2026-09-11-CORE-12-template-resources.md)。当前 214 项,48 完成、166 待办;核心 71 个 TS 文件、chapter 5 个。下一项 CORE-13 组件注册与控件。
|
||||
|
||||
## 当前实施:CORE-11 媒体事件、ready 与重连完成
|
||||
|
||||
事件入口迁移 TS,拆出转发、ready、播放 UI、重连、订阅和宿主类型;资源代次与切源操作分离,失败切源仍可重试,换源/恢复/销毁取消过期工作。158 项 Node/基线、安装 UMD 与 legacy 各 222 项三浏览器、打包 27 项运行时及五组类型检查通过。见 [交付](changes/2026-09-11-CORE-11-media-events.md)。关闭新增 BASE-LIFE-07/08,保留原 Event、重试次数和正常 ready 顺序;第三方 SDK 事件仍由适配器负责。当前 214 项,47 完成、167 待办;核心 49 个 TS 文件、chapter 5 个。下一项 CORE-12 模板及公开资源入口。
|
||||
|
||||
@@ -23,8 +23,8 @@
|
||||
| BASE-SOURCE-02 | open / 源码/产物事实 | registry gitHead 与发布包版本对应不可靠 | ENG-07, REL-01 |
|
||||
| BASE-SITE-01 | open / 源码/产物事实 | 文档站实际为静态站点但 manifest 未设 private | SITE-01, REL-01 |
|
||||
| BASE-MEDIA-01 | open / 待取证 | 示例媒体和字体的完整来源/授权链待核实 | BASE-08, SITE-01, EX-03 |
|
||||
| VENDOR-01 | open / 待取证 | screenfull 来源、版本与许可闭环 | CORE-12 |
|
||||
| VENDOR-02 | open / 待取证 | hint.css 来源、版本与许可闭环 | CORE-12 |
|
||||
| VENDOR-01 | resolved / 源码/产物事实 | screenfull 来源、版本与许可闭环 | CORE-12 |
|
||||
| VENDOR-02 | resolved / 源码/产物事实 | hint.css 来源、版本与许可闭环 | CORE-12 |
|
||||
| VENDOR-03 | open / 待取证 | webvtt-parser 来源、版本与许可闭环 | PKG-MULTI-SUB-01 |
|
||||
| VENDOR-04 | open / 待取证 | jassub-code-and-workers 来源、版本与许可闭环 | PKG-JASSUB-01 |
|
||||
| VENDOR-05 | open / 待取证 | jassub-font-assets 来源、版本与许可闭环 | PKG-JASSUB-01, SITE-01 |
|
||||
@@ -54,3 +54,5 @@
|
||||
| BASE-TYPE-08 | open / 已复现 | Write-only player commands have fictitious public getter declarations | CORE-21 |
|
||||
| BASE-LIFE-07 | resolved / 已复现 | Queued reconnect survives source replacement and reloads the new resource | CORE-11 |
|
||||
| BASE-LIFE-08 | resolved / 已复现 | Ready continues after a control callback destroys the instance | CORE-11 |
|
||||
| BASE-I18N-01 | resolved / 已复现 | Missing prototype-named translations return inherited functions | CORE-12 |
|
||||
| BASE-TYPE-09 | open / 源码/产物事实 | Template and icon declarations claim incompatible DOM and static shapes | CORE-21 |
|
||||
+62
-6
@@ -387,8 +387,8 @@
|
||||
{
|
||||
"id": "VENDOR-01",
|
||||
"title": "screenfull 来源、版本与许可闭环",
|
||||
"confirmation": "unverified",
|
||||
"status": "open",
|
||||
"confirmation": "source-observed",
|
||||
"status": "resolved",
|
||||
"owners": [
|
||||
"CORE-12"
|
||||
],
|
||||
@@ -397,13 +397,21 @@
|
||||
"packages/artplayer/src/libs/screenfull.js"
|
||||
],
|
||||
"compatibleResolution": "Keep separate from owned TS migration. Verify source/version/diff and license notices before replacement; preserve API/CSS/worker URLs and run owning package tests.",
|
||||
"closureCriteria": "固定上游版本/内容差异、完整组件许可与分发 notices,兼容测试通过;仅当前上游许可证名称不足以关闭。"
|
||||
"closureCriteria": "固定上游版本/内容差异、完整组件许可与分发 notices,兼容测试通过;仅当前上游许可证名称不足以关闭。",
|
||||
"resolutionEvidence": [
|
||||
"refactor/changes/2026-09-11-CORE-12-template-resources.md",
|
||||
"refactor/baselines/template-resources-validation.json",
|
||||
"refactor/scripts/core-vendor.mjs",
|
||||
"test/core-vendor.test.js",
|
||||
"packages/artplayer/THIRD_PARTY_NOTICES"
|
||||
],
|
||||
"resolutionRationale": "Pinned upstream source and license contents, exhaustive normalized adaptation checks, actual package notices and standalone bundle headers verified. Local runtime retained; native fullscreen gestures and prefixed adapter tests pass. Historical screenfull acquisition tag is explicitly unknown; v6.0.2 is the fixed comparison reference."
|
||||
},
|
||||
{
|
||||
"id": "VENDOR-02",
|
||||
"title": "hint.css 来源、版本与许可闭环",
|
||||
"confirmation": "unverified",
|
||||
"status": "open",
|
||||
"confirmation": "source-observed",
|
||||
"status": "resolved",
|
||||
"owners": [
|
||||
"CORE-12"
|
||||
],
|
||||
@@ -412,7 +420,15 @@
|
||||
"packages/artplayer/src/style/hint.less"
|
||||
],
|
||||
"compatibleResolution": "Keep separate from owned TS migration. Verify source/version/diff and license notices before replacement; preserve API/CSS/worker URLs and run owning package tests.",
|
||||
"closureCriteria": "固定上游版本/内容差异、完整组件许可与分发 notices,兼容测试通过;仅当前上游许可证名称不足以关闭。"
|
||||
"closureCriteria": "固定上游版本/内容差异、完整组件许可与分发 notices,兼容测试通过;仅当前上游许可证名称不足以关闭。",
|
||||
"resolutionEvidence": [
|
||||
"refactor/changes/2026-09-11-CORE-12-template-resources.md",
|
||||
"refactor/baselines/template-resources-validation.json",
|
||||
"refactor/scripts/core-vendor.mjs",
|
||||
"test/core-vendor.test.js",
|
||||
"packages/artplayer/THIRD_PARTY_NOTICES"
|
||||
],
|
||||
"resolutionRationale": "Pinned upstream source and license contents, exhaustive normalized adaptation checks, actual package notices and standalone bundle headers verified. Local runtime retained; native fullscreen gestures and prefixed adapter tests pass. Historical screenfull acquisition tag is explicitly unknown; v6.0.2 is the fixed comparison reference."
|
||||
},
|
||||
{
|
||||
"id": "VENDOR-03",
|
||||
@@ -937,6 +953,46 @@
|
||||
"test/browser/media-events.spec.js"
|
||||
],
|
||||
"resolutionRationale": "Published/candidate real-browser comparisons reproduce stale retry or ghost ready and validate candidate cancellation. Owned source lifetimes preserve retries after switch rejection, while instance closure stops UI work; original Event/count and ordinary readiness order remain tested."
|
||||
},
|
||||
{
|
||||
"id": "BASE-I18N-01",
|
||||
"title": "Missing prototype-named translations return inherited functions",
|
||||
"confirmation": "reproduced",
|
||||
"status": "resolved",
|
||||
"owners": [
|
||||
"CORE-12"
|
||||
],
|
||||
"evidence": [
|
||||
"test/template-resources.test.js",
|
||||
"test/browser/template-resources.spec.js",
|
||||
"refactor/changes/2026-09-11-CORE-12-template-resources.md"
|
||||
],
|
||||
"compatibleResolution": "Read own dictionary keys while preserving explicit custom names and empty-string fallback.",
|
||||
"closureCriteria": "Published/candidate browser comparison, source tests and installed distribution entries pass.",
|
||||
"resolutionEvidence": [
|
||||
"refactor/changes/2026-09-11-CORE-12-template-resources.md",
|
||||
"refactor/baselines/template-resources-validation.json",
|
||||
"test/template-resources.test.js",
|
||||
"test/browser/template-resources.spec.js"
|
||||
],
|
||||
"resolutionRationale": "Published/candidate real browser comparison verifies own-key fallback while preserving explicit prototype-named translations and empty values. Installed UMD/legacy and all language entries pass."
|
||||
},
|
||||
{
|
||||
"id": "BASE-TYPE-09",
|
||||
"title": "Template and icon declarations claim incompatible DOM and static shapes",
|
||||
"confirmation": "source-observed",
|
||||
"status": "open",
|
||||
"owners": [
|
||||
"CORE-21"
|
||||
],
|
||||
"evidence": [
|
||||
"packages/artplayer/types/template.d.ts",
|
||||
"packages/artplayer/types/icons.d.ts",
|
||||
"test/browser/template-resources.spec.js",
|
||||
"refactor/changes/2026-09-11-CORE-12-template-resources.md"
|
||||
],
|
||||
"compatibleResolution": "Keep old legal declarations accepted, expose accurate template and icon views without inventing runtime properties.",
|
||||
"closureCriteria": "Old consumers and accurate template/media/icon view consumers pass all supported type modes and runtime shape checks."
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
import assert from 'node:assert/strict'
|
||||
import crypto from 'node:crypto'
|
||||
import fs from 'node:fs'
|
||||
import less from 'less'
|
||||
import ts from 'typescript'
|
||||
|
||||
const base = new URL('../baselines/core-vendor/', import.meta.url)
|
||||
const root = new URL('../../', import.meta.url)
|
||||
const read = name => fs.readFileSync(new URL(name, root), 'utf8')
|
||||
const sha = text => crypto.createHash('sha256').update(text).digest('hex')
|
||||
const print = source => ts.createPrinter({ removeComments: true }).printFile(ts.createSourceFile('vendor.js', source, ts.ScriptTarget.Latest, true, ts.ScriptKind.JS))
|
||||
|
||||
export async function checkCoreVendors() {
|
||||
const sources = JSON.parse(fs.readFileSync(new URL('sources.json', base), 'utf8'))
|
||||
for (const source of sources)
|
||||
assert.equal(sha(read(source.file)), source.sha256, `Upstream reference changed: ${source.file}`)
|
||||
|
||||
const reference = fs.readFileSync(new URL('screenfull-6.0.2.txt', base), 'utf8')
|
||||
const adapted = reference
|
||||
.replace('methodList?.[1]', 'methodList[1]')
|
||||
.replace('let screenfull =', 'const screenfull =')
|
||||
.replace('document[nativeAPI.fullscreenElement] ?? undefined', 'document[nativeAPI.fullscreenElement]')
|
||||
.replace(/if \(!nativeAPI\) \{\s*screenfull = \{isEnabled: false\};\s*\}/, '')
|
||||
assert.equal(print(read('packages/artplayer/src/libs/screenfull.js')), print(adapted), 'Unreviewed screenfull changes')
|
||||
|
||||
const hint = read('packages/artplayer/src/style/hint.less')
|
||||
assert(hint.startsWith('.art-video-player {'))
|
||||
const body = hint.slice(hint.indexOf('{') + 1, hint.lastIndexOf('}'))
|
||||
const upstream = fs.readFileSync(new URL('hint-2.7.0.txt', base), 'utf8')
|
||||
const render = async source => (await less.render(source, { compress: true })).css.replace(/\/\*[\s\S]*?\*\//g, '').replaceAll('"', '\'').trim()
|
||||
const expected = (await render(upstream)).replaceAll('#383838', '#000000').replace('display:inline-block}', 'display:inline-block;font-style:normal}')
|
||||
assert.equal(await render(body), expected, 'Unreviewed Hint.css changes')
|
||||
|
||||
const notices = read('packages/artplayer/THIRD_PARTY_NOTICES').replaceAll('\r\n', '\n')
|
||||
for (const name of ['screenfull-license.txt', 'hint-license.txt'])
|
||||
assert(notices.includes(fs.readFileSync(new URL(name, base), 'utf8').replaceAll('\r\n', '\n').trim()), `Incomplete bundled license: ${name}`)
|
||||
return { sources, local: Object.fromEntries(['packages/artplayer/src/libs/screenfull.js', 'packages/artplayer/src/style/hint.less', 'packages/artplayer/THIRD_PARTY_NOTICES'].map(name => [name, sha(read(name).replaceAll('\r\n', '\n'))])) }
|
||||
}
|
||||
+5
-2
@@ -970,11 +970,14 @@
|
||||
"CORE-04",
|
||||
"BASE-04"
|
||||
],
|
||||
"status": "todo",
|
||||
"status": "done",
|
||||
"risk": "H",
|
||||
"deliverable": "template/icons/i18n/style、SSR 与 proxy 挂载",
|
||||
"acceptance": "DOM/CSS/global/样式注入、i18n 子路径及 SSR import 保持;不把 SSR import/useSSR 保持扩大为服务端构造播放器;复跑 BASE-05 的 SSR import/模板、浏览器 useSSR 节点复用和非浏览器构造错误;接续 VENDOR-01/02,核对 screenfull/hint 复制版本、修改与分发通知,保留 DOM/CSS/fullscreen 行为",
|
||||
"evidence": []
|
||||
"evidence": [
|
||||
"changes/2026-09-11-CORE-12-template-resources.md",
|
||||
"baselines/template-resources-validation.json"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "CORE-13",
|
||||
|
||||
@@ -243,12 +243,13 @@
|
||||
"owners": [
|
||||
"CORE-12"
|
||||
],
|
||||
"sourceStatus": "Local filename/implementation identifies screenfull; exact upstream revision not established.",
|
||||
"licenseStatus": "Current upstream license is MIT; local copied file lacks a license header. Exact version and notice coverage remain unverified.",
|
||||
"sourceStatus": "Fixed v6.0.2 comparison reference with four verified local adaptations; original acquisition tag is not recorded. Runtime file unchanged.",
|
||||
"licenseStatus": "Pinned upstream MIT notice included verbatim in actual core tarball and all three standalone bundle headers; verified in CORE-12. Local copied implementation unchanged.",
|
||||
"upstreamSources": [
|
||||
"https://github.com/sindresorhus/screenfull/blob/main/license"
|
||||
"https://raw.githubusercontent.com/sindresorhus/screenfull/v6.0.2/index.js",
|
||||
"https://raw.githubusercontent.com/sindresorhus/screenfull/v6.0.2/license"
|
||||
],
|
||||
"upstreamReviewedAt": "2026-09-10",
|
||||
"upstreamReviewedAt": "2026-09-11",
|
||||
"updatePolicy": "Keep separate from owned TS migration. Verify source/version/diff and license notices before replacement; preserve API/CSS/worker URLs and run owning package tests.",
|
||||
"fingerprints": [
|
||||
{
|
||||
@@ -256,6 +257,13 @@
|
||||
"algorithm": "sha256-lf",
|
||||
"sha256": "2332b50c0c6364d5c99080be0f5739255e4b9e465d2cca40f761adce9a1908f8"
|
||||
}
|
||||
],
|
||||
"reviewEvidence": [
|
||||
"refactor/changes/2026-09-11-CORE-12-template-resources.md",
|
||||
"refactor/baselines/core-vendor/sources.json",
|
||||
"refactor/scripts/core-vendor.mjs",
|
||||
"test/core-vendor.test.js",
|
||||
"refactor/baselines/template-resources-validation.json"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -267,12 +275,13 @@
|
||||
"owners": [
|
||||
"CORE-12"
|
||||
],
|
||||
"sourceStatus": "Local header names Hint.css 2.7.0, 2021-10-01; code is scoped/adapted in Less.",
|
||||
"licenseStatus": "Local copyright header and current upstream MIT license observed; exact upstream diff and shipped notices pending.",
|
||||
"sourceStatus": "Header identifies v2.7.0; full normalized CSS comparison verifies ArtPlayer scoping, font-style and default color adaptations. Runtime file unchanged.",
|
||||
"licenseStatus": "Pinned upstream MIT notice included verbatim in actual core tarball and all three standalone bundle headers; verified in CORE-12. Local copied implementation unchanged.",
|
||||
"upstreamSources": [
|
||||
"https://github.com/chinchang/hint.css/blob/master/LICENSE"
|
||||
"https://raw.githubusercontent.com/chinchang/hint.css/v2.7.0/hint.css",
|
||||
"https://raw.githubusercontent.com/chinchang/hint.css/v2.7.0/LICENSE"
|
||||
],
|
||||
"upstreamReviewedAt": "2026-09-10",
|
||||
"upstreamReviewedAt": "2026-09-11",
|
||||
"updatePolicy": "Keep separate from owned TS migration. Verify source/version/diff and license notices before replacement; preserve API/CSS/worker URLs and run owning package tests.",
|
||||
"fingerprints": [
|
||||
{
|
||||
@@ -280,6 +289,13 @@
|
||||
"algorithm": "sha256-lf",
|
||||
"sha256": "e2dc4940e6b212d8da75a404fd5ff1ad894008457677bc37554c6b64b735bc31"
|
||||
}
|
||||
],
|
||||
"reviewEvidence": [
|
||||
"refactor/changes/2026-09-11-CORE-12-template-resources.md",
|
||||
"refactor/baselines/core-vendor/sources.json",
|
||||
"refactor/scripts/core-vendor.mjs",
|
||||
"test/core-vendor.test.js",
|
||||
"refactor/baselines/template-resources-validation.json"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user