@vtj/renderer 0.13.28 → 0.13.30
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) 2025, VTJ.PRO All rights reserved.
|
3
3
|
* @name @vtj/renderer
|
4
4
|
* @author CHC chenhuachun1549@dingtalk.com
|
5
|
-
* @version 0.13.
|
5
|
+
* @version 0.13.30
|
6
6
|
* @license <a href="https://vtj.pro/license.html">MIT License</a>
|
7
|
-
*/const O="0.13.
|
7
|
+
*/const O="0.13.30";var S=(r=>(r.Runtime="Runtime",r.Design="Design",r.Raw="Raw",r.VNode="VNode",r))(S||{});const te=["$el","$emit","$nextTick","$parent","$root","$attrs","$slots","$watch","$props","$options","$forceUpdate"],et=["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(","),tt=["h","t","t","p","s",":","/","/","l","c","d","p",".","v","t","j",".","p","r","o"].join(""),st={auth:["h","t","t","p","s",":","/","/","l","c","d","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 x(r,e){return r.map(t=>f.isUrl(t)||t.startsWith("/")?t:`${e}${t}`)}function B(r){return/\.css$/.test(r)}function N(r){return/\.js$/.test(r)}function je(r){return/\.json$/.test(r)}function rt(r){return r.map(e=>`<script src="${f.url.append(e,{v:O})}"><\/script>`).join("")}function nt(r=[]){return r.map(e=>`<link rel="stylesheet" href="${f.url.append(e,{v:O})}" />`).join("")}function $e(r,e=!1){return e&&r.endsWith(".prod.js")?r.replace(".prod.js",".js"):r}function be(r,e,t=!1){const s=r.filter(d=>!!d.enabled),n=[],o=[],a=[],i=[],l={},c={},u=[],p={};return s.forEach(({urls:d,assetsUrl:m,library:h,assetsLibrary:g,localeLibrary:y})=>{d?.forEach(v=>{N(v)&&n.push($e(v,t)),B(v)&&o.push(v)}),h&&(i.push(h),l[h]=x(d||[],e),y&&(c[h]=y)),m&&a.push(m),g&&u.push(g),h&&g&&(p[g]=h)}),{scripts:x(n,e),css:x(o,e),materials:x(a,e),libraryExports:i,materialExports:f.dedupArray(u),materialMapLibrary:p,libraryMap:l,libraryLocaleMap:c}}function Re(r,e){const{name:t,parent:s,alias:n}=r;return s?e[s]?.[n||t]:e[n||t]}function Ce(r=[]){const e=r.filter(s=>B(s)),t=r.filter(s=>N(s));return{css:e,js:t}}function Pe(r,e){const t=c=>{const u=[];let p=0;for(;p<c.length;){if(/\s/.test(c[p])){p++;continue}if(c.substring(p,p+2)==="/*"){const v=c.indexOf("*/",p+2);if(v!==-1){p=v+2;continue}}if(c[p]==="@"){const v=p;for(;p<c.length&&c[p]!=="{"&&c[p]!==";";)p++;const w=c.substring(v,p).trim(),_=w.includes("@keyframes");if(c[p]===";")u.push({type:"simple-at-rule",content:c.substring(v,p+1)}),p++;else if(c[p]==="{"){const E=p+1;let A=1;for(p++;p<c.length&&A>0;)c[p]==="{"?A++:c[p]==="}"&&A--,p++;const W=c.substring(v,p),I=c.substring(E,p-1);u.push({type:_?"keyframes":"at-rule",rule:w,content:W,inner:I})}continue}const d=p;for(;p<c.length&&c[p]!=="{";)p++;if(p>=c.length)break;const m=c.substring(d,p).trim();if(!m){p++;continue}const h=p+1;let g=1;for(p++;p<c.length&&g>0;)c[p]==="{"?g++:c[p]==="}"&&g--,p++;const y=c.substring(h,p-1);u.push({type:"rule",selector:m,content:y.trim()})}return u},s=c=>{const u=c.trim();return/^(from|to|\d+(\.\d+)?%)$/.test(u)},n=c=>c.replace(/::v-deep\(/g,":deep(").replace(/::v-deep\s+/g,":deep(").replace(/\/deep\//g," ").replace(/>>>/g," ").replace(/(.*?):deep\(([^)]+)\)/g,(u,p,d)=>{const m=p.trim(),h=d.trim();return m?`${m}[${e}] ${h}`:h}),o=c=>{const u=c.trim();if(!u||u.includes(`[${e}]`)||/^(:root|:host|html|body)(\s|$|:|\.|\#|\[)/.test(u)||s(u))return u;const p=u.match(/^(.+?)((?:::?[\w-]+(?:\([^)]*\))?)*)\s*$/);if(p){const[,d,m=""]=p,h=d.trim();return h?`${h}[${e}]${m}`:u}return`${u}[${e}]`},a=c=>n(c).split(",").map(p=>o(p)).filter(p=>p.trim()).join(", "),i=c=>c.map(u=>{switch(u.type){case"simple-at-rule":return u.content;case"keyframes":return u.content;case"at-rule":try{const d=t(u.inner),m=i(d);return`${u.rule} { ${m} }`}catch{return u.content}case"rule":if(!u.selector||!u.content)return"";const p=a(u.selector);return p.trim()?`${p} { ${u.content} }`:"";default:return""}}).filter(u=>u.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=r.replace(/\/\*(?!\s*!)[\s\S]*?\*\//g,"").replace(/^\s+|\s+$/gm,"").replace(/\n\s*\n/g,`
|
8
8
|
`),u=t(c),p=i(u);return l(p)}catch(c){return console.error("CSS scoping failed:",c),console.error("Input CSS:",r),r.replace(/\/\*[\s\S]*?\*\//g,"").replace(/(@keyframes\s+[^{]+\s*{[^{}]*(?:{[^}]*}[^{}]*)*})/g,u=>u).replace(/([^{}@]+)(?=\s*{)/g,u=>{const p=u.trim();return!p||p.startsWith("@")||p.includes(`[${e}]`)||s(p)?u:`${p}[${e}]`})}}function ne(r){return f.isString(r)?r:JSON.stringify(r)}function z(r,e,t,s=!1){const n=r.CSSStyleSheet,o=s?`data-v-${e}`:e,a=s?Pe(t,o):t;if(n.prototype.replaceSync){const i=new n;i.id=e,i.replaceSync(a);const l=r.document,c=l.adoptedStyleSheets,u=Array.from(c).filter(p=>p.id!==e);l.adoptedStyleSheets=[...u,i]}else{const i=r.document;let l=i.getElementById(e);l?l.innerHTML=a:(l=i.createElement("style"),l.id=e,l.innerHTML=a,i.head.appendChild(l))}}function ot(r){const e=r.adoptedStyleSheets||[];let t="";if(e.forEach(s=>{try{for(const n of s.cssRules)t+=n.cssText+`
|
9
9
|
`}catch(n){console.error("Failed to read cssRules from adopted stylesheet:",n)}}),t){const s=r.createElement("style");s.textContent=t,r.head.appendChild(s)}}async function Ae(r,e){const t=await window.fetch(e).then(s=>s.text()).catch(()=>"");t&&z(window,r,t)}function oe(r,e=window){const t=e.document,s=e.document.head;for(const n of r)if(!t.getElementById(n)){const a=t.createElement("link");a.rel="stylesheet",a.id=n,a.href=n,s.appendChild(a)}}async function ie(r,e,t=window){const s=t.document,n=t.document.head;let o=t[e];return o?o.default||o:new Promise((a,i)=>{for(const l of r){const c=s.createElement("script");c.src=l,c.onload=()=>{o=t[e],o?a(o.default||o):i(null)},c.onerror=u=>{i(u)},n.appendChild(c)}})}function Ie(r){return f.isFunction(r)&&Object.getOwnPropertyNames(r.prototype||{}).length===0||f.isFunction(r?.install)}function Me(r){return Ee.includes(r)}function Te(r){return we.includes(r)}function D(r=window){const e=window?.Mock;if(e)return e;const t=r?.Mock;if(t&&window)return window.Mock=t,t}function it(r,e,t){Object.assign(e.meta,t.meta);const s=r?._container;t?.type==="page"&&s.classList.add("is-page"),t?.pure&&s.classList.add("is-pure")}function H(r,e,t=!1,s=!1,n=!1){try{const o=['"use strict";',"var __self = arguments[0];"];o.push("return ");let a=(r.value||"").trim();n||(a=a.replace(/this(\W|$)/g,(l,c)=>`__self${c}`)),a=o.join(`
|
10
10
|
`)+a;const i=n?`
|
package/dist/index.mjs
CHANGED
@@ -7,10 +7,10 @@ import { useRoute as Ae } from "vue-router";
|
|
7
7
|
* Copyright (c) 2025, VTJ.PRO All rights reserved.
|
8
8
|
* @name @vtj/renderer
|
9
9
|
* @author CHC chenhuachun1549@dingtalk.com
|
10
|
-
* @version 0.13.
|
10
|
+
* @version 0.13.30
|
11
11
|
* @license <a href="https://vtj.pro/license.html">MIT License</a>
|
12
12
|
*/
|
13
|
-
const D = "0.13.
|
13
|
+
const D = "0.13.30";
|
14
14
|
var w = /* @__PURE__ */ ((n) => (n.Runtime = "Runtime", n.Design = "Design", n.Raw = "Raw", n.VNode = "VNode", n))(w || {});
|
15
15
|
const je = [
|
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.13.
|
4
|
+
"version": "0.13.30",
|
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/utils": "~0.13.30",
|
25
|
+
"@vtj/core": "~0.13.30"
|
26
26
|
},
|
27
27
|
"devDependencies": {
|
28
28
|
"vue": "~3.5.5",
|
29
29
|
"vue-router": "~4.5.0",
|
30
|
-
"@vtj/ui": "~0.13.28",
|
31
30
|
"@vtj/cli": "~0.12.13",
|
32
|
-
"@vtj/icons": "~0.13.
|
31
|
+
"@vtj/icons": "~0.13.30",
|
32
|
+
"@vtj/ui": "~0.13.30"
|
33
33
|
},
|
34
34
|
"exports": {
|
35
35
|
".": {
|
package/types/version.d.ts
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
* Copyright (c) 2025, VTJ.PRO All rights reserved.
|
3
3
|
* @name @vtj/renderer
|
4
4
|
* @author CHC chenhuachun1549@dingtalk.com
|
5
|
-
* @version 0.13.
|
5
|
+
* @version 0.13.29
|
6
6
|
* @license <a href="https://vtj.pro/license.html">MIT License</a>
|
7
7
|
*/
|
8
|
-
export declare const version = "0.13.
|
8
|
+
export declare const version = "0.13.29";
|