@shijiu/jsview 1.9.921 → 1.9.931
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/dom/bin/jsview-dom-browser.min.js +1 -1
- package/dom/bin/jsview-dom-native.min.js +1 -1
- package/dom/bin/jsview-engine-js-browser.min.js +1 -1
- package/dom/bin/jsview-forge-define.min.js +1 -1
- package/dom/index.mjs +2 -1
- package/dom/target_core_revision.mjs +2 -2
- package/package.json +1 -1
- package/patches/node_modules/@vue/compiler-dom/dist/compiler-dom.cjs.js +3152 -0
- package/patches/node_modules/@vue/compiler-dom/package.json +43 -0
- package/patches/node_modules/@vue/runtime-dom/dist/runtime-dom.esm-bundler.js +17 -0
- package/patches/node_modules/vite/dist/node/jsview-vite-extension.js +2 -2
- package/tools/jsview-batch-upgrade.mjs +40 -5
- package/tools/jsview-post-install.mjs +1 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
/* eslint-disable */ void 0===window.Forge?(window.Forge={},console.log("Define forge browser")):console.log("Define using JsView forge engine-js");var e=window.Forge;class t{constructor(e,t){if(!e)return;if(!0===e.startsWith("url")){let t=e.indexOf("(")+1,i=e.lastIndexOf(")");if("undefined"===(e=e.substring(t,i).trim())||"null"===e||0===e.length)return}if(!0===e.startsWith("data:"))return void(this.href=e);let i=e.indexOf("://");if(!(i<0||i>10)||e.startsWith("./")||e.startsWith("/")||(e="./"+e),!0===e.startsWith("/"))e=document.location.origin+e;else if(!0===e.startsWith("./")&&void 0!==window.JsView&&void 0!==window.JsView.Dom.JsSubPath){if(void 0===window.JsView.Dom.MainPath||"undefined"===window.JsView.Dom.MainPathRef||window.JsView.Dom.MainPathRef!==document.location.href){window.JsView.Dom.JsSubPath.startsWith("/")||(window.JsView.Dom.JsSubPath="/"+window.JsView.Dom.JsSubPath),window.JsView.Dom.JsSubPath.endsWith("/")||(window.JsView.Dom.JsSubPath=window.JsView.Dom.JsSubPath+"/"),window.JsView.Dom.MainPathRef=document.location.href;let e=document.location.pathname.lastIndexOf(window.JsView.Dom.JsSubPath);window.JsView.Dom.MainPath=document.location.origin+document.location.pathname.substring(0,e)}e=window.JsView.Dom.MainPath+e.substring(1)}if(this.href=e,!t)return;let o=this.href,n=o.indexOf("#");n>0&&(this.hash=o.substring(n),o=o.substring(0,n));let r=o.indexOf("?");r>1&&(this.search=o.substring(r),o=o.substring(0,r));let s=o,a=s.indexOf("://");this.protocol=a>0?s.substring(0,a+1):"";let
|
|
1
|
+
/* eslint-disable */ void 0===window.Forge?(window.Forge={},console.log("Define forge browser")):console.log("Define using JsView forge engine-js");var e=window.Forge;class t{constructor(e,t){if(!e)return;if(!0===e.startsWith("url")){let t=e.indexOf("(")+1,i=e.lastIndexOf(")");if("undefined"===(e=e.substring(t,i).trim())||"null"===e||0===e.length)return}if(!0===e.startsWith("data:"))return void(this.href=e);let i=e.indexOf("://");if(!(i<0||i>10)||e.startsWith("./")||e.startsWith("/")||(e="./"+e),!0===e.startsWith("/"))e=document.location.origin+e;else if(!0===e.startsWith("./")&&void 0!==window.JsView&&void 0!==window.JsView.Dom.JsSubPath){if(void 0===window.JsView.Dom.MainPath||"undefined"===window.JsView.Dom.MainPathRef||window.JsView.Dom.MainPathRef!==document.location.href){window.JsView.Dom.JsSubPath.startsWith("/")||(window.JsView.Dom.JsSubPath="/"+window.JsView.Dom.JsSubPath),window.JsView.Dom.JsSubPath.endsWith("/")||(window.JsView.Dom.JsSubPath=window.JsView.Dom.JsSubPath+"/"),window.JsView.Dom.MainPathRef=document.location.href;let e=document.location.pathname.lastIndexOf(window.JsView.Dom.JsSubPath);window.JsView.Dom.MainPath=document.location.origin+document.location.pathname.substring(0,e)}e=window.JsView.Dom.MainPath+e.substring(1)}if(this.href=e,!t)return;let o=this.href,n=o.indexOf("#");n>0&&(this.hash=o.substring(n),o=o.substring(0,n));let r=o.indexOf("?");r>1&&(this.search=o.substring(r),o=o.substring(0,r));let s=o,a=s.indexOf("://");this.protocol=a>0?s.substring(0,a+1):"";let d=a>1?s.substring(a+3):"";a=d.indexOf("/"),this.host=a>0?d.substring(0,a):"",this.pathname=a>1?d.substring(a):"",this.origin=a>0?this.protocol+"//"+this.host:"",a=this.host.indexOf(":"),this.hostname=a>0?this.host.substring(0,a):this.host,this.port=a>1?this.host.substring(a+1):""}replace(e){this.href=e}href="";origin="";protocol="";host="";hostname="";port="";pathname="";search="";hash=""}class i{static SetBackgroundColor(t,i,o){const n=window.JsvCode.ForgeHandles.TextureManager.GetColorTextureCached(i);let r;o&&(r=new e.ViewRoundCornerMask(o.topLeft,o.topRight,o.bottomLeft,o.bottomRight));const s=new e.ExternalTextureSetting(n,r);t.ResetTexture(s)}static SetBackgroundImage(i,o,n,r,s,a,d){let l,g={};if("string"==typeof o){const e=new t(o);if(e instanceof t==!1)throw Error("Bad Argument.",e);g.url=e.href}else"linear-gradient"==o?.type&&(g.gradient=o);if(g.gradient)if(g.gradient.colors?.length>2){const e=g.gradient.colors,t=[e[0],e[e.length-1]],i=e.slice(1,e.length-1);l=window.JsvCode.ForgeHandles.TextureManager.CreateLinearGradientTexture(t,i)}else 2==g.gradient.colors?.length?l=window.JsvCode.ForgeHandles.TextureManager.CreateMiniGradientTexture(!0,g.gradient.colors[0],g.gradient.colors[1],g.gradient.rawValue):console.warn("Failed to create backgroundImage gradient, bad colors.",g.gradient.colors);else g.url&&(l=g.url.includes(".gif")||g.url.includes(".webp")?window.JsvCode.ForgeHandles.TextureManager.GetGifImage(g.url,!1,null,d):window.JsvCode.ForgeHandles.TextureManager.GetImage2(g.url,!1,s,a||e.ColorSpace.RGBA_8888));if(l){let t;n&&(t=new e.ViewRoundCornerMask(n.topLeft,n.topRight,n.bottomLeft,n.bottomRight));const o=new e.ExternalTextureSetting(l,t);if(i.ResetTexture(o),r){let e=l.RegisterLoadImageCallback(null,(function(){r({width:l.Width,height:l.Height})}));i.RegisterDetachCallback((()=>{l.UnregisterLoadImageCallback(e)}))}}}static SetMaskedBackgroundImage(i,o,n,r){if("string"==typeof o&&(o=new t(o)),o instanceof t==!1)throw Error("Bad Argument.",o);if("string"==typeof n&&(n=new t(n)),n instanceof t==!1)throw Error("Bad Argument(MaskURL).",n);const s=window.JsvCode.ForgeHandles.TextureManager.GetImage2(o.href,!1,null,r||e.ColorSpace.RGBA_8888);if(s){const t=window.JsvCode.ForgeHandles.TextureManager.GetImage2(n.href,!1,null,e.ColorSpace.RGBA_8888),o=new e.ExternalTextureSetting(s,new e.ViewTextureMask(t));i.ResetTexture(o)}}}export{e as Forge,i as ForgeExtension};
|
package/dom/index.mjs
CHANGED
|
@@ -90,7 +90,8 @@ async function loadJsViewDomAsync(nativeOrBrowserDebug)
|
|
|
90
90
|
if (nativeOrBrowserDebug) {
|
|
91
91
|
jsviewDom = await loadJsViewDomNative(codeDebugConfig);
|
|
92
92
|
} else {
|
|
93
|
-
|
|
93
|
+
// 补充原本由native的ForgeDom生成的JsvCode扩展给内部组件使用的接口类
|
|
94
|
+
window.JsvCode = {};
|
|
94
95
|
|
|
95
96
|
jsviewDom = await loadJsViewDomBrowserDebug(codeDebugConfig);
|
|
96
97
|
}
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
const TargetRevision = {
|
|
6
6
|
"CoreRevision": 1021037,
|
|
7
7
|
"CoreRevisionAndBranch": "1021037_release_build_js2c",
|
|
8
|
-
"JseRevision": "1.0.
|
|
8
|
+
"JseRevision": "1.0.871",
|
|
9
9
|
"JseUrl":
|
|
10
|
-
"http://cdn.release.qcast.cn/forge_js/forge_js_to_c_5/
|
|
10
|
+
"http://cdn.release.qcast.cn/forge_js/forge_js_to_c_5/JsViewES6_js2c_r871.jsv.7f37ecb6.js"
|
|
11
11
|
};
|
|
12
12
|
|
|
13
13
|
// 不要用export default,update-env脚本不能解析
|