@vtj/renderer 0.16.25 → 0.16.26
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.16.
|
|
5
|
+
* @version 0.16.26
|
|
6
6
|
* @license <a href="https://vtj.pro/license.html">MIT License</a>
|
|
7
|
-
*/const D="0.16.
|
|
7
|
+
*/const D="0.16.26";var S=(n=>(n.Runtime="Runtime",n.Design="Design",n.Raw="Raw",n.VNode="VNode",n))(S||{});const ie=["$el","$emit","$nextTick","$parent","$root","$attrs","$slots","$watch","$props","$options","$forceUpdate"],it=["beforeCreate","created","beforeMount","mounted","beforeUpdate","updated","beforeUnmount","unmounted","errorCaptured","renderTracked","renderTriggered","activated","deactivated"],$e=["vIf","vElseIf","vElse","vShow","vModel","vFor","vBind","vHtml"],be={String,Number,Boolean,Array,Object,Function,Date},x="VtjPage",U="VtjHomepage",le="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(","),je="component,slot".split(","),at=["h","t","t","p","s",":","/","/","a","p","p",".","v","t","j",".","p","r","o"].join(""),ct={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 N(n,e){return n.map(t=>f.isUrl(t)||t.startsWith("/")?t:`${e}${t}`)}function B(n){return/\.css$/.test(n)}function J(n){return/\.js$/.test(n)}function Ce(n){return/\.json$/.test(n)}function lt(n){return n.map(e=>`<script src="${f.url.append(e,{v:D})}"><\/script>`).join("")}function ut(n=[]){return n.map(e=>`<link rel="stylesheet" href="${f.url.append(e,{v:D})}" />`).join("")}function Re(n,e=!1){return e&&n.endsWith(".prod.js")?n.replace(".prod.js",".js"):n}function Pe(n,e,t=!1){const s=n.filter(d=>!!d.enabled),r=[],o=[],i=[],a=[],u={},c={},l=[],p={};return s.forEach(({urls:d,assetsUrl:h,library:g,assetsLibrary:m,localeLibrary:_})=>{d?.forEach(y=>{J(y)&&r.push(Re(y,t)),B(y)&&o.push(y)}),g&&(a.push(g),u[g]=N(d||[],e),_&&(c[g]=_)),h&&i.push(h),m&&l.push(m),g&&m&&(p[m]=g)}),{scripts:N(r,e),css:N(o,e),materials:N(i,e),libraryExports:a,materialExports:f.dedupArray(l),materialMapLibrary:p,libraryMap:u,libraryLocaleMap:c}}function Ae(n,e){const{name:t,parent:s,alias:r}=n;return s?e[s]?.[r||t]:e[r||t]}function Ie(n=[]){const e=n.filter(s=>B(s)),t=n.filter(s=>J(s));return{css:e,js:t}}function Te(n,e){const t=c=>{const l=[];let p=0;for(;p<c.length;){if(/\s/.test(c[p])){p++;continue}if(c.substring(p,p+2)==="/*"){const y=c.indexOf("*/",p+2);if(y!==-1){p=y+2;continue}}if(c[p]==="@"){const y=p;for(;p<c.length&&c[p]!=="{"&&c[p]!==";";)p++;const w=c.substring(y,p).trim(),C=w.includes("@keyframes");if(c[p]===";")l.push({type:"simple-at-rule",content:c.substring(y,p+1)}),p++;else if(c[p]==="{"){const v=p+1;let A=1;for(p++;p<c.length&&A>0;)c[p]==="{"?A++:c[p]==="}"&&A--,p++;const Z=c.substring(y,p),ee=c.substring(v,p-1);l.push({type:C?"keyframes":"at-rule",rule:w,content:Z,inner:ee})}continue}const d=p;for(;p<c.length&&c[p]!=="{";)p++;if(p>=c.length)break;const h=c.substring(d,p).trim();if(!h){p++;continue}const g=p+1;let m=1;for(p++;p<c.length&&m>0;)c[p]==="{"?m++:c[p]==="}"&&m--,p++;const _=c.substring(g,p-1);l.push({type:"rule",selector:h,content:_.trim()})}return l},s=c=>{const l=c.trim();return/^(from|to|\d+(\.\d+)?%)$/.test(l)},r=c=>c.replace(/::v-deep\(/g,":deep(").replace(/::v-deep\s+/g,":deep(").replace(/\/deep\//g," ").replace(/>>>/g," ").replace(/(.*?):deep\(([^)]+)\)/g,(l,p,d)=>{const h=p.trim(),g=d.trim();return h?`${h}[${e}] ${g}`:g}),o=c=>{const l=c.trim();if(!l||l.includes(`[${e}]`)||/^(:root|:host|html|body)(\s|$|:|\.|\#|\[)/.test(l)||s(l))return l;const p=l.match(/^(.+?)((?:::?[\w-]+(?:\([^)]*\))?)*)\s*$/);if(p){const[,d,h=""]=p,g=d.trim();return g?`${g}[${e}]${h}`:l}return`${l}[${e}]`},i=c=>r(c).split(",").map(p=>o(p)).filter(p=>p.trim()).join(", "),a=c=>c.map(l=>{switch(l.type){case"simple-at-rule":return l.content;case"keyframes":return l.content;case"at-rule":try{const d=t(l.inner),h=a(d);return`${l.rule} { ${h} }`}catch{return l.content}case"rule":if(!l.selector||!l.content)return"";const p=i(l.selector);return p.trim()?`${p} { ${l.content} }`:"";default:return""}}).filter(l=>l.trim()).join(" "),u=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
|
`),l=t(c),p=a(l);return u(p)}catch(c){return console.error("CSS scoping failed:",c),console.error("Input CSS:",n),n.replace(/\/\*[\s\S]*?\*\//g,"").replace(/(@keyframes\s+[^{]+\s*{[^{}]*(?:{[^}]*}[^{}]*)*})/g,l=>l).replace(/([^{}@]+)(?=\s*{)/g,l=>{const p=l.trim();return!p||p.startsWith("@")||p.includes(`[${e}]`)||s(p)?l:`${p}[${e}]`})}}const pt=750;function Me(n,e,t){let s;typeof n<"u"?s=n.innerWidth||n.document.documentElement.clientWidth:(console.warn("无法获取屏幕宽度,使用默认值375"),s=375);const r=t||pt;return e*s/r}function Oe(n,e){let t=!1,s=!1,r=!1,o="";for(let i=0;i<e.length;i++){const a=e[i];if(a==="'"&&!s&&!r?t=!t:a==='"'&&!t&&!r?s=!s:e.substr(i,4).toLowerCase()==="url("&&!t&&!s?r=!0:a===")"&&r&&(r=!1),!t&&!s&&!r){const u=e.substr(i).match(/^(-?\d+(?:\.\d+)?)\s*rpx/);if(u){const c=u[1],l=parseFloat(c),d=`${Me(n,l).toFixed(6).replace(/\.?0+$/,"")}px`;o+=d,i+=u[0].length-1;continue}}o+=a}return o}function ue(n){return f.isString(n)?n:JSON.stringify(n)}function Q(n,e,t,s=!1){const r=n.CSSStyleSheet,o=s?`data-v-${e}`:e,i=n.__uniConfig?Oe(n,t):t,a=s?Te(i,o):i,u=!!n.__uniConfig;if(r.prototype.replaceSync&&!u){const c=new r;c.id=e,c.replaceSync(a);const l=n.document,p=l.adoptedStyleSheets,d=Array.from(p).filter(h=>h.id!==e);l.adoptedStyleSheets=[...d,c]}else{const c=n.document;let l=c.getElementById(e);l?l.innerHTML=a:(l=c.createElement("style"),l.id=e,l.innerHTML=a,c.head.appendChild(l))}}function ft(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 Fe(n,e){const t=await window.fetch(e).then(s=>s.text()).catch(()=>"");t&&Q(window,n,t)}function pe(n,e=window){const t=e.document,s=e.document.head;for(const r of n)if(!t.getElementById(r)){const i=t.createElement("link");i.rel="stylesheet",i.id=r,i.href=r,s.appendChild(i)}}async function fe(n,e,t=window){const s=t.document,r=t.document.head;let o=t[e];return o?o.default||o:new Promise((i,a)=>{for(const u of n){const c=s.createElement("script");c.src=u,c.onload=()=>{o=t[e],o?i(o.default||o):a(null)},c.onerror=l=>{a(l)},r.appendChild(c)}})}function De(n){return f.isFunction(n)&&Object.getOwnPropertyNames(n.prototype||{}).length===0||f.isFunction(n?.install)}function xe(n){return je.includes(n)}function ke(n){return le.includes(n)}function k(n=window){const e=window?.Mock;if(e)return e;const t=n?.Mock;if(t&&window)return window.Mock=t,t}function dt(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 H(n,e,t=!1,s=!1,r=!1){try{const o=['"use strict";',"var __self = arguments[0];"];o.push("return ");let i=(n.value||"").trim();r||(i=i.replace(/this(\W|$)/g,(u,c)=>`__self${c}`)),i=o.join(`
|
|
10
10
|
`)+i;const a=r?`
|
package/dist/index.mjs
CHANGED
|
@@ -7,10 +7,10 @@ import { useRoute as Oe } 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.16.
|
|
10
|
+
* @version 0.16.26
|
|
11
11
|
* @license <a href="https://vtj.pro/license.html">MIT License</a>
|
|
12
12
|
*/
|
|
13
|
-
const k = "0.16.
|
|
13
|
+
const k = "0.16.26";
|
|
14
14
|
var y = /* @__PURE__ */ ((n) => (n.Runtime = "Runtime", n.Design = "Design", n.Raw = "Raw", n.VNode = "VNode", n))(y || {});
|
|
15
15
|
const Re = [
|
|
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.16.
|
|
4
|
+
"version": "0.16.26",
|
|
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/core": "~0.16.
|
|
25
|
-
"@vtj/utils": "~0.16.
|
|
24
|
+
"@vtj/core": "~0.16.26",
|
|
25
|
+
"@vtj/utils": "~0.16.26"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"vue": "~3.5.5",
|
|
29
29
|
"vue-router": "~4.6.0",
|
|
30
|
-
"@vtj/icons": "~0.16.25",
|
|
31
30
|
"@vtj/cli": "~0.12.19",
|
|
32
|
-
"@vtj/
|
|
31
|
+
"@vtj/icons": "~0.16.26",
|
|
32
|
+
"@vtj/ui": "~0.16.26"
|
|
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.16.
|
|
5
|
+
* @version 0.16.25
|
|
6
6
|
* @license <a href="https://vtj.pro/license.html">MIT License</a>
|
|
7
7
|
*/
|
|
8
|
-
export declare const version = "0.16.
|
|
8
|
+
export declare const version = "0.16.25";
|