@vtj/renderer 0.14.1 → 0.14.3
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/dist/index.cjs +2 -2
- package/dist/index.mjs +2 -2
- package/package.json +5 -5
- package/types/version.d.ts +2 -2
package/dist/index.cjs
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
* Copyright (c) 2026, VTJ.PRO All rights reserved.
|
|
3
3
|
* @name @vtj/renderer
|
|
4
4
|
* @author CHC chenhuachun1549@dingtalk.com
|
|
5
|
-
* @version 0.14.
|
|
5
|
+
* @version 0.14.3
|
|
6
6
|
* @license <a href="https://vtj.pro/license.html">MIT License</a>
|
|
7
|
-
*/const k="0.14.
|
|
7
|
+
*/const k="0.14.3";var S=(n=>(n.Runtime="Runtime",n.Design="Design",n.Raw="Raw",n.VNode="VNode",n))(S||{});const te=["$el","$emit","$nextTick","$parent","$root","$attrs","$slots","$watch","$props","$options","$forceUpdate"],st=["beforeCreate","created","beforeMount","mounted","beforeUpdate","updated","beforeUnmount","unmounted","errorCaptured","renderTracked","renderTriggered","activated","deactivated"],_e=["vIf","vElseIf","vElse","vShow","vModel","vFor","vBind","vHtml"],Se={String,Number,Boolean,Array,Object,Function,Date},F="VtjPage",L="VtjHomepage",we="html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot,svg".split(","),Ee="component,slot".split(","),nt=["h","t","t","p","s",":","/","/","a","p","p",".","v","t","j",".","p","r","o"].join(""),rt={auth:["h","t","t","p","s",":","/","/","a","p","p",".","v","t","j",".","p","r","o","/","a","u","t","h",".","h","t","m","l"].join(""),storageKey:["R","R","O","_","I","D","E","_","A","C","C","E","S","S","_","S","T","O","R","A","G","E","_","_"].join(""),privateKey:"MIIBOgIBAAJBAKoIzmn1FYQ1YOhOBw9EhABxZ+PySAIaydI+zdhoKflrdgJ4A5E4/5gbQmRpk09hPWG8nvX7h+l/QLU8kXxAIBECAwEAAQJAAlgpxQY6sByLsXqzJcthC8LSGsLf2JEJkHwlnpwFqlEV8UCkoINpuZ2Wzl+aftURu5rIfAzRCQBvHmeOTW9/zQIhAO5ufWDmnSLyfAAsNo5JRNpVuLFCFodR8Xm+ulDlosR/AiEAtpAltyP9wmCABKG/v/hrtTr3mcvFNGCjoGa9bUAok28CIHbrVs9w1ijrBlvTsXYwJw46uP539uKRRT4ymZzlm9QjAiB+1KH/G9f9pEEL9rtaSOG7JF5D0JcOjlze4MGVFs+ZrQIhALKOUFBNr2zEsyJIjw2PlvEucdlG77UniszjXTROHSPd"};function H(n,e){return n.map(t=>f.isUrl(t)||t.startsWith("/")?t:`${e}${t}`)}function U(n){return/\.css$/.test(n)}function B(n){return/\.js$/.test(n)}function $e(n){return/\.json$/.test(n)}function ot(n){return n.map(e=>`<script src="${f.url.append(e,{v:k})}"><\/script>`).join("")}function it(n=[]){return n.map(e=>`<link rel="stylesheet" href="${f.url.append(e,{v:k})}" />`).join("")}function be(n,e=!1){return e&&n.endsWith(".prod.js")?n.replace(".prod.js",".js"):n}function je(n,e,t=!1){const s=n.filter(d=>!!d.enabled),r=[],o=[],a=[],i=[],l={},c={},p=[],u={};return s.forEach(({urls:d,assetsUrl:m,library:h,assetsLibrary:g,localeLibrary:v})=>{d?.forEach(y=>{B(y)&&r.push(be(y,t)),U(y)&&o.push(y)}),h&&(i.push(h),l[h]=H(d||[],e),v&&(c[h]=v)),m&&a.push(m),g&&p.push(g),h&&g&&(u[g]=h)}),{scripts:H(r,e),css:H(o,e),materials:H(a,e),libraryExports:i,materialExports:f.dedupArray(p),materialMapLibrary:u,libraryMap:l,libraryLocaleMap:c}}function Re(n,e){const{name:t,parent:s,alias:r}=n;return s?e[s]?.[r||t]:e[r||t]}function Ce(n=[]){const e=n.filter(s=>U(s)),t=n.filter(s=>B(s));return{css:e,js:t}}function Pe(n,e){const t=c=>{const p=[];let u=0;for(;u<c.length;){if(/\s/.test(c[u])){u++;continue}if(c.substring(u,u+2)==="/*"){const y=c.indexOf("*/",u+2);if(y!==-1){u=y+2;continue}}if(c[u]==="@"){const y=u;for(;u<c.length&&c[u]!=="{"&&c[u]!==";";)u++;const w=c.substring(y,u).trim(),_=w.includes("@keyframes");if(c[u]===";")p.push({type:"simple-at-rule",content:c.substring(y,u+1)}),u++;else if(c[u]==="{"){const E=u+1;let A=1;for(u++;u<c.length&&A>0;)c[u]==="{"?A++:c[u]==="}"&&A--,u++;const Q=c.substring(y,u),I=c.substring(E,u-1);p.push({type:_?"keyframes":"at-rule",rule:w,content:Q,inner:I})}continue}const d=u;for(;u<c.length&&c[u]!=="{";)u++;if(u>=c.length)break;const m=c.substring(d,u).trim();if(!m){u++;continue}const h=u+1;let g=1;for(u++;u<c.length&&g>0;)c[u]==="{"?g++:c[u]==="}"&&g--,u++;const v=c.substring(h,u-1);p.push({type:"rule",selector:m,content:v.trim()})}return p},s=c=>{const p=c.trim();return/^(from|to|\d+(\.\d+)?%)$/.test(p)},r=c=>c.replace(/::v-deep\(/g,":deep(").replace(/::v-deep\s+/g,":deep(").replace(/\/deep\//g," ").replace(/>>>/g," ").replace(/(.*?):deep\(([^)]+)\)/g,(p,u,d)=>{const m=u.trim(),h=d.trim();return m?`${m}[${e}] ${h}`:h}),o=c=>{const p=c.trim();if(!p||p.includes(`[${e}]`)||/^(:root|:host|html|body)(\s|$|:|\.|\#|\[)/.test(p)||s(p))return p;const u=p.match(/^(.+?)((?:::?[\w-]+(?:\([^)]*\))?)*)\s*$/);if(u){const[,d,m=""]=u,h=d.trim();return h?`${h}[${e}]${m}`:p}return`${p}[${e}]`},a=c=>r(c).split(",").map(u=>o(u)).filter(u=>u.trim()).join(", "),i=c=>c.map(p=>{switch(p.type){case"simple-at-rule":return p.content;case"keyframes":return p.content;case"at-rule":try{const d=t(p.inner),m=i(d);return`${p.rule} { ${m} }`}catch{return p.content}case"rule":if(!p.selector||!p.content)return"";const u=a(p.selector);return u.trim()?`${u} { ${p.content} }`:"";default:return""}}).filter(p=>p.trim()).join(" "),l=c=>c.replace(/\s*{\s*/g," { ").replace(/\s*}\s*/g," } ").replace(/\s*;\s*/g,"; ").replace(/\s*,\s*/g,", ").replace(/\s+/g," ").replace(/^\s+|\s+$/g,"").replace(/\s*}\s*}/g," } }").trim();try{const c=n.replace(/\/\*(?!\s*!)[\s\S]*?\*\//g,"").replace(/^\s+|\s+$/gm,"").replace(/\n\s*\n/g,`
|
|
8
8
|
`),p=t(c),u=i(p);return l(u)}catch(c){return console.error("CSS scoping failed:",c),console.error("Input CSS:",n),n.replace(/\/\*[\s\S]*?\*\//g,"").replace(/(@keyframes\s+[^{]+\s*{[^{}]*(?:{[^}]*}[^{}]*)*})/g,p=>p).replace(/([^{}@]+)(?=\s*{)/g,p=>{const u=p.trim();return!u||u.startsWith("@")||u.includes(`[${e}]`)||s(u)?p:`${u}[${e}]`})}}const at=750;function Ae(n,e,t){let s;typeof n<"u"?s=n.innerWidth||n.document.documentElement.clientWidth:(console.warn("无法获取屏幕宽度,使用默认值375"),s=375);const r=t||at;return e*s/r}function Ie(n,e){let t=!1,s=!1,r=!1,o="";for(let a=0;a<e.length;a++){const i=e[a];if(i==="'"&&!s&&!r?t=!t:i==='"'&&!t&&!r?s=!s:e.substr(a,4).toLowerCase()==="url("&&!t&&!s?r=!0:i===")"&&r&&(r=!1),!t&&!s&&!r){const l=e.substr(a).match(/^(-?\d+(?:\.\d+)?)\s*rpx/);if(l){const c=l[1],p=parseFloat(c),d=`${Ae(n,p).toFixed(6).replace(/\.?0+$/,"")}px`;o+=d,a+=l[0].length-1;continue}}o+=i}return o}function re(n){return f.isString(n)?n:JSON.stringify(n)}function z(n,e,t,s=!1){const r=n.CSSStyleSheet,o=s?`data-v-${e}`:e,a=n.__uniConfig?Ie(n,t):t,i=s?Pe(a,o):a;if(r.prototype.replaceSync){const l=new r;l.id=e,l.replaceSync(i);const c=n.document,p=c.adoptedStyleSheets,u=Array.from(p).filter(d=>d.id!==e);c.adoptedStyleSheets=[...u,l]}else{const l=n.document;let c=l.getElementById(e);c?c.innerHTML=i:(c=l.createElement("style"),c.id=e,c.innerHTML=i,l.head.appendChild(c))}}function ct(n){const e=n.adoptedStyleSheets||[];let t="";if(e.forEach(s=>{try{for(const r of s.cssRules)t+=r.cssText+`
|
|
9
9
|
`}catch(r){console.error("Failed to read cssRules from adopted stylesheet:",r)}}),t){const s=n.createElement("style");s.textContent=t,n.head.appendChild(s)}}async function Te(n,e){const t=await window.fetch(e).then(s=>s.text()).catch(()=>"");t&&z(window,n,t)}function oe(n,e=window){const t=e.document,s=e.document.head;for(const r of n)if(!t.getElementById(r)){const a=t.createElement("link");a.rel="stylesheet",a.id=r,a.href=r,s.appendChild(a)}}async function ie(n,e,t=window){const s=t.document,r=t.document.head;let o=t[e];return o?o.default||o:new Promise((a,i)=>{for(const l of n){const c=s.createElement("script");c.src=l,c.onload=()=>{o=t[e],o?a(o.default||o):i(null)},c.onerror=p=>{i(p)},r.appendChild(c)}})}function Me(n){return f.isFunction(n)&&Object.getOwnPropertyNames(n.prototype||{}).length===0||f.isFunction(n?.install)}function Oe(n){return Ee.includes(n)}function ke(n){return we.includes(n)}function D(n=window){const e=window?.Mock;if(e)return e;const t=n?.Mock;if(t&&window)return window.Mock=t,t}function lt(n,e,t){Object.assign(e.meta,t.meta);const s=n?._container;t?.type==="page"&&s.classList.add("is-page"),t?.pure&&s.classList.add("is-pure")}function x(n,e,t=!1,s=!1,r=!1){try{const o=['"use strict";',"var __self = arguments[0];"];o.push("return ");let a=(n.value||"").trim();r||(a=a.replace(/this(\W|$)/g,(l,c)=>`__self${c}`)),a=o.join(`
|
|
10
10
|
`)+a;const i=r?`
|
package/dist/index.mjs
CHANGED
|
@@ -7,10 +7,10 @@ import { useRoute as Ae } from "vue-router";
|
|
|
7
7
|
* Copyright (c) 2026, VTJ.PRO All rights reserved.
|
|
8
8
|
* @name @vtj/renderer
|
|
9
9
|
* @author CHC chenhuachun1549@dingtalk.com
|
|
10
|
-
* @version 0.14.
|
|
10
|
+
* @version 0.14.3
|
|
11
11
|
* @license <a href="https://vtj.pro/license.html">MIT License</a>
|
|
12
12
|
*/
|
|
13
|
-
const T = "0.14.
|
|
13
|
+
const T = "0.14.3";
|
|
14
14
|
var w = /* @__PURE__ */ ((n) => (n.Runtime = "Runtime", n.Design = "Design", n.Raw = "Raw", n.VNode = "VNode", n))(w || {});
|
|
15
15
|
const be = [
|
|
16
16
|
"$el",
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vtj/renderer",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.14.
|
|
4
|
+
"version": "0.14.3",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"低代码引擎",
|
|
@@ -21,15 +21,15 @@
|
|
|
21
21
|
"author": "chenhuachun",
|
|
22
22
|
"license": "MIT",
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@vtj/
|
|
25
|
-
"@vtj/
|
|
24
|
+
"@vtj/core": "~0.14.3",
|
|
25
|
+
"@vtj/utils": "~0.14.3"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"vue": "~3.5.5",
|
|
29
29
|
"vue-router": "~4.6.0",
|
|
30
30
|
"@vtj/cli": "~0.12.18",
|
|
31
|
-
"@vtj/ui": "~0.14.
|
|
32
|
-
"@vtj/icons": "~0.14.
|
|
31
|
+
"@vtj/ui": "~0.14.3",
|
|
32
|
+
"@vtj/icons": "~0.14.3"
|
|
33
33
|
},
|
|
34
34
|
"exports": {
|
|
35
35
|
".": {
|
package/types/version.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Copyright (c) 2026, VTJ.PRO All rights reserved.
|
|
3
3
|
* @name @vtj/renderer
|
|
4
4
|
* @author CHC chenhuachun1549@dingtalk.com
|
|
5
|
-
* @version 0.14.
|
|
5
|
+
* @version 0.14.2
|
|
6
6
|
* @license <a href="https://vtj.pro/license.html">MIT License</a>
|
|
7
7
|
*/
|
|
8
|
-
export declare const version = "0.14.
|
|
8
|
+
export declare const version = "0.14.2";
|