@vtj/renderer 0.13.11 → 0.13.12
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 +6 -6
- 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.12
|
6
6
|
* @license <a href="https://vtj.pro/license.html">MIT License</a>
|
7
|
-
*/const k="0.13.
|
7
|
+
*/const k="0.13.12";var _=(r=>(r.Runtime="Runtime",r.Design="Design",r.Raw="Raw",r.VNode="VNode",r))(_||{});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",x="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 H(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 $e(r){return/\.json$/.test(r)}function rt(r){return r.map(e=>`<script src="${f.url.append(e,{v:k})}"><\/script>`).join("")}function nt(r=[]){return r.map(e=>`<link rel="stylesheet" href="${f.url.append(e,{v:k})}" />`).join("")}function je(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(m=>!!m.enabled),n=[],o=[],i=[],a=[],l={},c={},u=[],p={};return s.forEach(({urls:m,assetsUrl:d,library:h,assetsLibrary:v,localeLibrary:y})=>{m?.forEach(g=>{N(g)&&n.push(je(g,t)),B(g)&&o.push(g)}),h&&(a.push(h),l[h]=H(m||[],e),y&&(c[h]=y)),d&&i.push(d),v&&u.push(v),h&&v&&(p[v]=h)}),{scripts:H(n,e),css:H(o,e),materials:H(i,e),libraryExports:a,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 g=c.indexOf("*/",p+2);if(g!==-1){p=g+2;continue}}if(c[p]==="@"){const g=p;for(;p<c.length&&c[p]!=="{"&&c[p]!==";";)p++;const C=c.substring(g,p).trim(),S=C.includes("@keyframes");if(c[p]===";")u.push({type:"simple-at-rule",content:c.substring(g,p+1)}),p++;else if(c[p]==="{"){const L=p+1;let M=1;for(p++;p<c.length&&M>0;)c[p]==="{"?M++:c[p]==="}"&&M--,p++;const W=c.substring(g,p),P=c.substring(L,p-1);u.push({type:S?"keyframes":"at-rule",rule:C,content:W,inner:P})}continue}const m=p;for(;p<c.length&&c[p]!=="{";)p++;if(p>=c.length)break;const d=c.substring(m,p).trim();if(!d){p++;continue}const h=p+1;let v=1;for(p++;p<c.length&&v>0;)c[p]==="{"?v++:c[p]==="}"&&v--,p++;const y=c.substring(h,p-1);u.push({type:"rule",selector:d,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,m)=>{const d=p.trim(),h=m.trim();return d?`${d}[${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[,m,d=""]=p,h=m.trim();return h?`${h}[${e}]${d}`:u}return`${u}[${e}]`},i=c=>n(c).split(",").map(p=>o(p)).filter(p=>p.trim()).join(", "),a=c=>c.map(u=>{switch(u.type){case"simple-at-rule":return u.content;case"keyframes":return u.content;case"at-rule":try{const m=t(u.inner),d=a(m);return`${u.rule} { ${d} }`}catch{return u.content}case"rule":if(!u.selector||!u.content)return"";const p=i(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=a(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,i=s?Pe(t,o):t;if(n.prototype.replaceSync){const a=new n;a.id=e,a.replaceSync(i);const l=r.document,c=l.adoptedStyleSheets,u=Array.from(c).filter(p=>p.id!==e);l.adoptedStyleSheets=[...u,a]}else{const a=r.document;let l=a.getElementById(e);l?l.innerHTML=i:(l=a.createElement("style"),l.id=e,l.innerHTML=i,a.head.appendChild(l))}}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 i=t.createElement("link");i.rel="stylesheet",i.id=n,i.href=n,s.appendChild(i)}}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((i,a)=>{for(const l of r){const c=s.createElement("script");c.src=l,c.onload=()=>{o=t[e],o?i(o.default||o):a(null)},c.onerror=u=>{a(u)},n.appendChild(c)}})}function Me(r){return f.isFunction(r)||f.isFunction(r?.install)}function Ie(r){return Ee.includes(r)}function Te(r){return we.includes(r)}function O(r=window){const e=window?.Mock;if(e)return e;const t=r?.Mock;if(t&&window)return window.Mock=t,t}function ot(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 D(r,e,t=!1,s=!1,n=!1){try{const o=['"use strict";',"var __self = arguments[0];"];o.push("return ");let i=(r.value||"").trim();n||(i=i.replace(/this(\W|$)/g,(l,c)=>`__self${c}`)),i=o.join(`
|
9
9
|
`)+i;const a=n?`
|
10
10
|
${i}
|
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.12
|
11
11
|
* @license <a href="https://vtj.pro/license.html">MIT License</a>
|
12
12
|
*/
|
13
|
-
const O = "0.13.
|
13
|
+
const O = "0.13.12";
|
14
14
|
var _ = /* @__PURE__ */ ((n) => (n.Runtime = "Runtime", n.Design = "Design", n.Raw = "Raw", n.VNode = "VNode", n))(_ || {});
|
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.12",
|
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.13.
|
25
|
-
"@vtj/utils": "~0.13.
|
24
|
+
"@vtj/core": "~0.13.12",
|
25
|
+
"@vtj/utils": "~0.13.12"
|
26
26
|
},
|
27
27
|
"devDependencies": {
|
28
28
|
"vue": "~3.5.5",
|
29
29
|
"vue-router": "~4.5.0",
|
30
|
-
"@vtj/
|
31
|
-
"@vtj/
|
32
|
-
"@vtj/
|
30
|
+
"@vtj/cli": "~0.12.10",
|
31
|
+
"@vtj/icons": "~0.13.12",
|
32
|
+
"@vtj/ui": "~0.13.12"
|
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.11
|
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.11";
|