@vtj/coder 0.16.16 → 0.16.17

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/README.md CHANGED
@@ -12,7 +12,7 @@
12
12
  VTJ 是一款以AI驱动的Vue3前端低代码开发工具。内置低代码引擎、渲染器和代码生成器,支持Vue源码与低代码DSL双向转换,面向前端开发者,开箱即用。 无缝嵌入本地开发工程,不改变前端开发流程和编码习惯。
13
13
 
14
14
  - **官方文档**:[https://vtj.pro](https://vtj.pro)
15
- - **在线应用开发平台**:[https://lcdp.vtj.pro](https://lcdp.vtj.pro)
15
+ - **在线应用开发平台**:[https://app.vtj.pro](https://app.vtj.pro)
16
16
 
17
17
  ## 特性
18
18
 
@@ -32,7 +32,7 @@ VTJ 是一款以AI驱动的Vue3前端低代码开发工具。内置低代码引
32
32
 
33
33
  ### 在线体验
34
34
 
35
- - [https://lcdp.vtj.pro](https://lcdp.vtj.pro)
35
+ - [https://app.vtj.pro](https://app.vtj.pro)
36
36
 
37
37
  访问Vtj专属低代码开发平台,创建应用可以体验设计器和出码功能
38
38
 
package/dist/index.cjs CHANGED
@@ -2,13 +2,13 @@
2
2
  * Copyright (c) 2026, VTJ.PRO All rights reserved.
3
3
  * @name @vtj/coder
4
4
  * @author CHC chenhuachun1549@dingtalk.com
5
- * @version 0.16.16
5
+ * @version 0.16.17
6
6
  * @license <a href="https://vtj.pro/license.html">MIT License</a>
7
- */const re="0.16.16";/**!
7
+ */const re="0.16.17";/**!
8
8
  * Copyright (c) 2026, VTJ.PRO All rights reserved.
9
9
  * @name @vtj/core
10
10
  * @author CHC chenhuachun1549@dingtalk.com
11
- * @version 0.16.16
11
+ * @version 0.16.17
12
12
  * @license <a href="https://vtj.pro/license.html">MIT License</a>
13
13
  */const ie=["slot","template","component","img","div","p","h1","h2","h3","span","a"];f.mitt();const T={arrowParens:"always",bracketSpacing:!0,bracketSameLine:!0,endOfLine:"lf",htmlWhitespaceSensitivity:"css",insertPragma:!1,jsxBracketSameLine:!0,jsxSingleQuote:!0,printWidth:80,proseWrap:"preserve",quoteProps:"as-needed",requirePragma:!1,semi:!0,singleQuote:!0,tabWidth:2,trailingComma:"none",useTabs:!1,vueIndentScriptAndStyle:!0};async function B(t,e){return e?t:await D.format(t,{parser:"vue",...T,plugins:[ne,q,U,M]})}async function V(t,e){if(e)return t;try{return(await D.format(t,{parser:"babel-ts",...T,plugins:[q,U]})).replace(/;\n$/gi,"")}catch(s){return console.warn(s),t}}async function F(t,e){return e?t:D.format(t,{parser:"scss",...T,plugins:[M]})}function k(t){return t&&t.type==="JSExpression"}function I(t){return typeof t=="object"&&t&&t.type==="JSFunction"}function j(t){return k(t)||I(t)}function H(t){return t.replace(new RegExp("this.","g"),"")}function L(t){return t.replace(/this\.context\??\./g,"")}function d(t,e=!0,s=!0,n=[],i=!0){let r=t;return j(t)?(r=t.value.trim().replace(/;$/,""),i&&(r=r.replace(/\"/g,"'"))):r=e?JSON.stringify(r):t,r=w(r,n),s?H(L(r)):L(r)}function w(t="",e=[]){let s=t;for(const n of e)s=s.replace(new RegExp(`this.${n}.value`,"g"),`this.${n}`);return s}function Q(t){let e=t.trim().replace(/;$/,"");if(e=/^\((\(|async|function)/.test(e)?e.substring(1,e.length-1):e,e.startsWith("{"))return e;if(e.startsWith("async function"))e=e.replace(/^async function/,"async");else if(e.startsWith("function"))e=e.replace(/^function/,"");else{const i=/^(async\s)?\([\w]*\)\s+\=\>\s([\w\W]+)/,r=e.match(i);r&&r[2]&&(r[2].startsWith("{")||(e=e.replace(r[2],`{ return ${r[2]} }`))),e=e.replace("=>","")}return e}function oe(t={}){return Object.entries(t).map(([e,s])=>`"${e}": ${d(s)}`)}function z(t={},e=!1){const s=Object.keys(t);return e?s.map(n=>"."+n):s}function ae(t){let e="";for(var s in t)if(t.hasOwnProperty(s)){var n=t[s];e+=s+": "+n+";"}return e}function ce(t=[],e=[]){return t.filter(s=>!e.includes(s))}function R(t){return f.base64(JSON.stringify(t))}class le{constructor(e,s){this.dsl=e,this.dependencies=s,this.libraryRegex=this.collectLibrary(),this.walk(e),this.walkNodes(e),this.members=this.getLibraryMember()}imports={};context={};style={};members=[];urlSchemas={};blockPlugins={};libraryRegex=[];collectLibrary(){return this.dependencies.filter(e=>!!e.library).map(e=>new RegExp(`(this.\\$libs.${e.library}.([\\w]+))`,"g"))}collectImport(e){const s=e.split(".");if(s.length===4){const n=s.pop(),i=s.join(".")+".",r=s.pop();if(n&&r){const o=this.dependencies.find(a=>a.library===r)?.package;o&&(this.imports[o]||(this.imports[o]=new Set)).add(n)}return{name:n,path:i,library:r}}return null}replaceLibraryPath(e){const{libraryRegex:s}=this;let n=e.value;for(const i of s){const r=e.value?.match(i)||[];for(const o of r){const a=this.collectImport(o);if(a){const m=a.path.replace(/\$/g,"\\$");n=n.replace(new RegExp(m,"g"),"")}}}return n}walk(e){const s=n=>{if(!n||typeof n!="object")return;if(Array.isArray(n)){for(let r of n)s(r);return}const i=Object.values(n);for(const r of i)j(r)?r.value=this.replaceLibraryPath(r):s(r)};s(e)}getLibraryMember(e=[]){let s=[...e];const n={...this.imports};delete n["uni-h5"],delete n["@dcloudio/uni-h5"],delete n["uni-ui"],delete n["@dcloudio/uni-ui"];for(const i of Object.values(n))s=s.concat(Array.from(i));return f.dedupArray(s)}collectContext(e,s){const n=new Set(s?.id?this.context[s.id]:[]),i=(e.directives||[]).find(a=>a.name==="vFor");let r=new Set(Array.from(n));if(i){const{item:a="item",index:m="index"}=i.iterator||{};r=new Set([a,m,...Array.from(r)])}const o=e.slot;if(o){const a=typeof o=="string"?[]:o.params||[],m=a.length?a:[`scope_${s?.id}`];r=new Set([...m,...Array.from(r)])}this.context[e.id]=r}collectStyle(e){e.id&&e.props?.style&&Object.keys(e.props.style).length&&!j(e.props.style)&&(this.style[`.${e.name}_${e.id}`]=e.props.style)}collectUrlSchema(e){typeof e.from=="object"&&e.from.type==="UrlSchema"&&(this.urlSchemas[e.name]=e.from)}collectBlockPlugin(e){typeof e.from=="object"&&e.from.type==="Plugin"&&(this.blockPlugins[e.name]=e.from)}walkNodes(e){const s=(n,i)=>{this.collectContext(n,i),this.collectStyle(n),this.collectUrlSchema(n),this.collectBlockPlugin(n),Array.isArray(n.children)&&n.children.forEach(r=>s(r,n))};Array.isArray(e.nodes)&&e.nodes.forEach(n=>s(n))}}function ue(t={}){return Object.entries(t).map(([e,s])=>{const n=d(s,!1,!0,[],!1);return`${e}:${n}`})}function pe(t=[]){return t.map(e=>`${e.name}: {
14
14
  from: '${e.from||e.name}',
package/dist/index.mjs CHANGED
@@ -8,15 +8,15 @@ import * as H from "prettier/plugins/estree";
8
8
  * Copyright (c) 2026, VTJ.PRO All rights reserved.
9
9
  * @name @vtj/coder
10
10
  * @author CHC chenhuachun1549@dingtalk.com
11
- * @version 0.16.16
11
+ * @version 0.16.17
12
12
  * @license <a href="https://vtj.pro/license.html">MIT License</a>
13
13
  */
14
- const Ue = "0.16.16";
14
+ const Ue = "0.16.17";
15
15
  /**!
16
16
  * Copyright (c) 2026, VTJ.PRO All rights reserved.
17
17
  * @name @vtj/core
18
18
  * @author CHC chenhuachun1549@dingtalk.com
19
- * @version 0.16.16
19
+ * @version 0.16.17
20
20
  * @license <a href="https://vtj.pro/license.html">MIT License</a>
21
21
  */
22
22
  const oe = [
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vtj/coder",
3
3
  "private": false,
4
- "version": "0.16.16",
4
+ "version": "0.16.17",
5
5
  "type": "module",
6
6
  "keywords": [
7
7
  "低代码引擎",
@@ -23,7 +23,7 @@
23
23
  "dependencies": {
24
24
  "prettier": "~3.7.0",
25
25
  "@vtj/base": "~0.12.4",
26
- "@vtj/core": "~0.16.16"
26
+ "@vtj/core": "~0.16.17"
27
27
  },
28
28
  "devDependencies": {
29
29
  "@vtj/cli": "~0.12.18"
@@ -2,7 +2,7 @@
2
2
  * Copyright (c) 2026, VTJ.PRO All rights reserved.
3
3
  * @name @vtj/coder
4
4
  * @author CHC chenhuachun1549@dingtalk.com
5
- * @version 0.16.15
5
+ * @version 0.16.16
6
6
  * @license <a href="https://vtj.pro/license.html">MIT License</a>
7
7
  */
8
- export declare const version = "0.16.15";
8
+ export declare const version = "0.16.16";