@vtj/renderer 0.14.6 → 0.15.0
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 +3 -3
- 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.
|
|
5
|
+
* @version 0.15.0
|
|
6
6
|
* @license <a href="https://vtj.pro/license.html">MIT License</a>
|
|
7
|
-
*/const k="0.
|
|
7
|
+
*/const k="0.15.0";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"],et=["beforeCreate","created","beforeMount","mounted","beforeUpdate","updated","beforeUnmount","unmounted","errorCaptured","renderTracked","renderTriggered","activated","deactivated"],ve=["vIf","vElseIf","vElse","vShow","vModel","vFor","vBind","vHtml"],ye={String,Number,Boolean,Array,Object,Function,Date},F="VtjPage",L="VtjHomepage",_e="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(","),Se="component,slot".split(","),tt=["h","t","t","p","s",":","/","/","a","p","p",".","v","t","j",".","p","r","o"].join(""),st={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 we(n){return/\.json$/.test(n)}function nt(n){return n.map(e=>`<script src="${f.url.append(e,{v:k})}"><\/script>`).join("")}function rt(n=[]){return n.map(e=>`<link rel="stylesheet" href="${f.url.append(e,{v:k})}" />`).join("")}function Ee(n,e=!1){return e&&n.endsWith(".prod.js")?n.replace(".prod.js",".js"):n}function $e(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(Ee(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 be(n,e){const{name:t,parent:s,alias:r}=n;return s?e[s]?.[r||t]:e[r||t]}function je(n=[]){const e=n.filter(s=>U(s)),t=n.filter(s=>B(s));return{css:e,js:t}}function Re(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 I=1;for(u++;u<c.length&&I>0;)c[u]==="{"?I++:c[u]==="}"&&I--,u++;const Q=c.substring(y,u),A=c.substring(E,u-1);p.push({type:_?"keyframes":"at-rule",rule:w,content:Q,inner:A})}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 ot=750;function Ce(n,e,t){let s;typeof n<"u"?s=n.innerWidth||n.document.documentElement.clientWidth:(console.warn("无法获取屏幕宽度,使用默认值375"),s=375);const r=t||ot;return e*s/r}function Pe(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=`${Ce(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?Pe(n,t):t,i=s?Re(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 it(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 Ae(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 Ie(n){return f.isFunction(n)&&Object.getOwnPropertyNames(n.prototype||{}).length===0||f.isFunction(n?.install)}function Te(n){return Se.includes(n)}function Me(n){return _e.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 at(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
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Base as Je, BUILT_IN_COMPONENTS as Ke, ProjectModel as U, HistoryModel as $e } from "@vtj/core";
|
|
2
|
-
import {
|
|
2
|
+
import { url as k, isUrl as te, dedupArray as Ge, isFunction as q, isString as I, logger as O, storage as Q, cookie as X, toArray as ge, unRSA as ye, delay as se, createRequest as be, jsonp as Ee, merge as ze, pathToRegexp as Ve, pathToRegexpMatch as We, formDataToJson as Qe, Queue as Xe, cloneDeep as ve, camelCase as C, upperFirst as Ye, pick as Ze, request as ne, loadScript as _e, Storage as et, mapToObject as ue } from "@vtj/utils";
|
|
3
3
|
import * as K from "vue";
|
|
4
4
|
import { inject as je, defineComponent as Re, h as re, ref as oe, watchEffect as tt, defineAsyncComponent as we } from "vue";
|
|
5
5
|
import { useRoute as Pe } from "vue-router";
|
|
@@ -7,10 +7,10 @@ import { useRoute as Pe } 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.
|
|
10
|
+
* @version 0.15.0
|
|
11
11
|
* @license <a href="https://vtj.pro/license.html">MIT License</a>
|
|
12
12
|
*/
|
|
13
|
-
const T = "0.
|
|
13
|
+
const T = "0.15.0";
|
|
14
14
|
var w = /* @__PURE__ */ ((n) => (n.Runtime = "Runtime", n.Design = "Design", n.Raw = "Raw", n.VNode = "VNode", n))(w || {});
|
|
15
15
|
const Se = [
|
|
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.
|
|
4
|
+
"version": "0.15.0",
|
|
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.
|
|
25
|
-
"@vtj/utils": "~0.
|
|
24
|
+
"@vtj/core": "~0.15.0",
|
|
25
|
+
"@vtj/utils": "~0.15.0"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"vue": "~3.5.5",
|
|
29
29
|
"vue-router": "~4.6.0",
|
|
30
|
+
"@vtj/icons": "~0.15.0",
|
|
30
31
|
"@vtj/cli": "~0.12.18",
|
|
31
|
-
"@vtj/ui": "~0.
|
|
32
|
-
"@vtj/icons": "~0.14.6"
|
|
32
|
+
"@vtj/ui": "~0.15.0"
|
|
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.6
|
|
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.6";
|