sunyard-szyy-ui 0.2.8 → 0.3.2

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.
@@ -1,4 +1,4 @@
1
1
  (function(e,u){typeof exports=="object"&&typeof module!="undefined"?u(exports,require("element-plus"),require("vue"),require("@sunyard-szyy-ui/hooks"),require("@sunyard-szyy-ui/utils")):typeof define=="function"&&define.amd?define(["exports","element-plus","vue","@sunyard-szyy-ui/hooks","@sunyard-szyy-ui/utils"],u):(e=typeof globalThis!="undefined"?globalThis:e||self,u(e.SunyardSzyyUI={},e.ElementPlus,e.Vue,e.hooks,e.utils))})(this,function(e,u,n,i,d){"use strict";/*!
2
- * sunyard-szyy-ui v0.2.8
2
+ * sunyard-szyy-ui v0.3.2
3
3
  * (c) 2026 Sunyard SZYY Base Team
4
4
  */const y=n.defineComponent({name:"SySearchBar",props:{modelValue:{type:String,default:""},placeholder:{type:String,default:"请输入关键字"},buttonText:{type:String,default:"搜索"}},emits:["update:modelValue","search"],setup(r,{emit:s}){const l=i.useNamespace("search-bar"),a=n.ref(r.modelValue);n.watch(()=>r.modelValue,t=>{t!==a.value&&(a.value=t)});function o(){s("search",a.value)}return()=>n.h("div",{class:l.b()},[n.h(u.ElInput,{class:l.e("input"),modelValue:a.value,placeholder:r.placeholder,clearable:!0,"onUpdate:modelValue":t=>{a.value=t,s("update:modelValue",t)},onKeydown:t=>{t.key==="Enter"&&o()}}),n.h(u.ElButton,{class:l.e("button"),type:"primary",onClick:o},()=>r.buttonText)])}}),c=d.withInstall(y);e.SySearchBar=c,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})});
@@ -3,7 +3,7 @@ import { defineComponent as d, ref as m, watch as i, h as o } from "vue";
3
3
  import { useNamespace as p } from "@sunyard-szyy-ui/hooks";
4
4
  import { withInstall as s } from "@sunyard-szyy-ui/utils";
5
5
  /*!
6
- * sunyard-szyy-ui v0.2.8
6
+ * sunyard-szyy-ui v0.3.2
7
7
  * (c) 2026 Sunyard SZYY Base Team
8
8
  */
9
9
  const h = d({
@@ -0,0 +1,4 @@
1
+ import{ref as c,watch as r}from"vue";import{debounce as s}from"../../utils/dist/index.mjs";/*!
2
+ * sunyard-szyy-ui v0.3.2
3
+ * (c) 2026 Sunyard SZYY UI Team
4
+ */function d(o){const n=`sy-${o}`;return{namespace:n,b:()=>n,e:e=>`${n}__${e}`,m:e=>`${n}--${e}`,is:(e,t=!0)=>t?`is-${e}`:""}}function i(o,n=300){const e=c(o.value),t=s(u=>{e.value=u},n);return r(o,u=>{t(u)}),e}export{i as useDebounce,d as useNamespace};
package/es/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import{SySearchBar as t}from"@sunyard-szyy-ui/components";import{SySearchBar as f}from"@sunyard-szyy-ui/components";import{version as e}from"./version.mjs";export*from"@sunyard-szyy-ui/hooks";export*from"@sunyard-szyy-ui/utils";import{makeInstaller as S}from"./make-installer.mjs";/*!
2
- * sunyard-szyy-ui v0.2.8
1
+ import{SySearchBar as r}from"@sunyard-szyy-ui/components";import{SySearchBar as _}from"@sunyard-szyy-ui/components";import{version as e}from"./version.mjs";import{useDebounce as m,useNamespace as p}from"./hooks/dist/index.mjs";import{SunyardSzyyUIResolver as y,debounce as S,deepClone as w,formatDate as Y,throttle as h,withInstall as U}from"./utils/dist/index.mjs";import{makeInstaller as g}from"./make-installer.mjs";/*!
2
+ * sunyard-szyy-ui v0.3.2
3
3
  * (c) 2026 Sunyard SZYY UI Team
4
- */const r=[t],a=n=>{if(typeof window!="undefined"&&(console.log(`%c[Sunyard SZYY UI]%c v${e} %cinstalled`,"color: #409eff; font-weight: bold","color: #67c23a","color: #909399"),window.__SUNYARD_SZYY_UI_VERSION__=e,window.__SUNYARD_SZYY_UI__={version:e,components:r.map(o=>o.name||"Unknown")}),r.forEach(o=>n.use(o)),typeof window!="undefined"){const o=window.__VUE_DEVTOOLS_GLOBAL_HOOK__;o&&o.emit("app:init",n,e,{label:"Sunyard SZYY UI",packageName:"sunyard-szyy-ui",homepage:"https://github.com/your-org/sunyard-szyy-ui"})}},c={version:e,install:a};export{f as SySearchBar,c as default,a as install,S as makeInstaller,e as version};
4
+ */const t=[r],a=n=>{if(typeof window!="undefined"&&(console.log(`%c[Sunyard SZYY UI]%c v${e} %cinstalled`,"color: #409eff; font-weight: bold","color: #67c23a","color: #909399"),window.__SUNYARD_SZYY_UI_VERSION__=e,window.__SUNYARD_SZYY_UI__={version:e,components:t.map(o=>o.name||"Unknown")}),t.forEach(o=>n.use(o)),typeof window!="undefined"){const o=window.__VUE_DEVTOOLS_GLOBAL_HOOK__;o&&o.emit("app:init",n,e,{label:"Sunyard SZYY UI",packageName:"sunyard-szyy-ui",homepage:"https://github.com/your-org/sunyard-szyy-ui"})}},c={version:e,install:a};export{y as SunyardSzyyUIResolver,_ as SySearchBar,S as debounce,w as deepClone,c as default,Y as formatDate,a as install,g as makeInstaller,h as throttle,m as useDebounce,p as useNamespace,e as version,U as withInstall};
@@ -1,4 +1,4 @@
1
1
  /*!
2
- * sunyard-szyy-ui v0.2.8
2
+ * sunyard-szyy-ui v0.3.2
3
3
  * (c) 2026 Sunyard SZYY UI Team
4
4
  */const n=Symbol("SUNYARD_SZYY_UI_INSTALLED"),o=(r=[],e="0.0.0")=>({version:e,install:t=>{t[n]||(t[n]=!0,r.forEach(l=>t.use(l)))}});export{o as makeInstaller};
@@ -0,0 +1,7 @@
1
+ /*!
2
+ * sunyard-szyy-ui v0.3.2
3
+ * (c) 2026 Sunyard SZYY UI Team
4
+ */function h(e,n="Sy"){return e.slice(n.length).replace(/([A-Z])/g,"-$1").toLowerCase().slice(1)}function S(e={}){const{prefix:n="Sy",importStyle:t=!0,libraryName:r="sunyard-szyy-ui",styleLibraryName:c="sunyard-szyy-ui/theme-chalk",componentsLibraryName:m="@sunyard-szyy-ui/components",devMode:l=!1,importMetaUrl:o,fileURLToPath:i,dirResolver:p}=e;if(l&&!p&&(!o||!i))throw new Error(`[SunyardSzyyUIResolver] devMode 启用时必须提供 importMetaUrl 和 fileURLToPath 参数
5
+ 示例:
6
+ import { fileURLToPath } from 'node:url';
7
+ SunyardSzyyUIResolver({ devMode: true, importMetaUrl: import.meta.url, fileURLToPath })`);let y=p;return l&&o&&i&&!p&&(y=s=>{const a=t==="scss"?"index.ts":"css.ts";return{componentPath:i(new URL(`../packages/components/src/${s}/index.ts`,o)),stylePath:i(new URL(`../packages/components/src/${s}/style/${a}`,o))}}),{type:"component",resolve:s=>{if(s.startsWith(n)){const a=h(s,n);if(y){const f=y(a);if(f.componentPath)return{name:s,from:f.componentPath,sideEffects:t&&f.stylePath?f.stylePath:void 0}}const u={name:s,from:r};return t&&(t==="css"?u.sideEffects=`${r}/es/components/${a}/style/css`:t==="scss"?u.sideEffects=`${r}/es/components/${a}/style/index`:t===!0&&(u.sideEffects=`${r}/es/components/${a}/style/css`)),u}}}}function g(e){const n=e;return n.install=t=>{const r=e.name;r&&t.component(r,e)},n}function D(e,n=300){let t=null;return function(...r){t&&clearTimeout(t),t=setTimeout(()=>{e.apply(this,r),t=null},n)}}function M(e,n=300){let t=0;return function(...r){const c=Date.now();c-t>=n&&(e.apply(this,r),t=c)}}function U(e,n="YYYY-MM-DD HH:mm:ss"){const t=typeof e=="number"?new Date(e):e,r=t.getFullYear(),c=String(t.getMonth()+1).padStart(2,"0"),m=String(t.getDate()).padStart(2,"0"),l=String(t.getHours()).padStart(2,"0"),o=String(t.getMinutes()).padStart(2,"0"),i=String(t.getSeconds()).padStart(2,"0");return n.replace("YYYY",String(r)).replace("MM",c).replace("DD",m).replace("HH",l).replace("mm",o).replace("ss",i)}function d(e){if(e===null||typeof e!="object")return e;if(e instanceof Date)return new Date(e.getTime());if(e instanceof Array)return e.map(n=>d(n));if(typeof e=="object"){const n={};for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=d(e[t]));return n}return e}export{S as SunyardSzyyUIResolver,D as debounce,d as deepClone,U as formatDate,M as throttle,g as withInstall};
package/es/version.d.ts CHANGED
@@ -1,7 +1,2 @@
1
- /**
2
- * 自动生成的版本文件
3
- * 请勿手动修改
4
- * 通过 pnpm version:set 命令更新版本号
5
- */
6
- export declare const version = "0.2.8";
1
+ export declare const version = "0.3.2";
7
2
  //# sourceMappingURL=version.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,eAAO,MAAM,OAAO,UAAU,CAAC"}
1
+ {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,UAAU,CAAC"}
package/es/version.mjs CHANGED
@@ -1,4 +1,4 @@
1
1
  /*!
2
- * sunyard-szyy-ui v0.2.8
2
+ * sunyard-szyy-ui v0.3.2
3
3
  * (c) 2026 Sunyard SZYY UI Team
4
- */const o="0.2.8";export{o as version};
4
+ */const o="0.3.2";export{o as version};
@@ -0,0 +1,4 @@
1
+ "use strict";/*!
2
+ * sunyard-szyy-ui v0.3.2
3
+ * (c) 2026 Sunyard SZYY UI Team
4
+ */Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),o=require("../../utils/dist/index.js");function r(n){const u=`sy-${n}`;return{namespace:u,b:()=>u,e:e=>`${u}__${e}`,m:e=>`${u}--${e}`,is:(e,c=!0)=>c?`is-${e}`:""}}function a(n,u=300){const e=t.ref(n.value),c=o.debounce(s=>{e.value=s},u);return t.watch(n,s=>{c(s)}),e}exports.useDebounce=a;exports.useNamespace=r;
package/lib/index.js CHANGED
@@ -1,4 +1,4 @@
1
1
  "use strict";/*!
2
- * sunyard-szyy-ui v0.2.8
2
+ * sunyard-szyy-ui v0.3.2
3
3
  * (c) 2026 Sunyard SZYY UI Team
4
- */Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const s=require("@sunyard-szyy-ui/components"),r=require("./version.js"),n=require("@sunyard-szyy-ui/hooks"),t=require("@sunyard-szyy-ui/utils"),c=require("./make-installer.js"),i=[s.SySearchBar],a=e=>{if(typeof window!="undefined"&&(console.log(`%c[Sunyard SZYY UI]%c v${r.version} %cinstalled`,"color: #409eff; font-weight: bold","color: #67c23a","color: #909399"),window.__SUNYARD_SZYY_UI_VERSION__=r.version,window.__SUNYARD_SZYY_UI__={version:r.version,components:i.map(o=>o.name||"Unknown")}),i.forEach(o=>e.use(o)),typeof window!="undefined"){const o=window.__VUE_DEVTOOLS_GLOBAL_HOOK__;o&&o.emit("app:init",e,r.version,{label:"Sunyard SZYY UI",packageName:"sunyard-szyy-ui",homepage:"https://github.com/your-org/sunyard-szyy-ui"})}},l={version:r.version,install:a};Object.defineProperty(exports,"SySearchBar",{enumerable:!0,get:()=>s.SySearchBar});exports.version=r.version;exports.makeInstaller=c.makeInstaller;exports.default=l;exports.install=a;Object.keys(n).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>n[e]})});Object.keys(t).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>t[e]})});
4
+ */Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const s=require("@sunyard-szyy-ui/components"),o=require("./version.js"),a=require("./hooks/dist/index.js"),n=require("./utils/dist/index.js"),l=require("./make-installer.js"),t=[s.SySearchBar],i=r=>{if(typeof window!="undefined"&&(console.log(`%c[Sunyard SZYY UI]%c v${o.version} %cinstalled`,"color: #409eff; font-weight: bold","color: #67c23a","color: #909399"),window.__SUNYARD_SZYY_UI_VERSION__=o.version,window.__SUNYARD_SZYY_UI__={version:o.version,components:t.map(e=>e.name||"Unknown")}),t.forEach(e=>r.use(e)),typeof window!="undefined"){const e=window.__VUE_DEVTOOLS_GLOBAL_HOOK__;e&&e.emit("app:init",r,o.version,{label:"Sunyard SZYY UI",packageName:"sunyard-szyy-ui",homepage:"https://github.com/your-org/sunyard-szyy-ui"})}},c={version:o.version,install:i};Object.defineProperty(exports,"SySearchBar",{enumerable:!0,get:()=>s.SySearchBar});exports.version=o.version;exports.useDebounce=a.useDebounce;exports.useNamespace=a.useNamespace;exports.SunyardSzyyUIResolver=n.SunyardSzyyUIResolver;exports.debounce=n.debounce;exports.deepClone=n.deepClone;exports.formatDate=n.formatDate;exports.throttle=n.throttle;exports.withInstall=n.withInstall;exports.makeInstaller=l.makeInstaller;exports.default=c;exports.install=i;
@@ -1,4 +1,4 @@
1
1
  "use strict";/*!
2
- * sunyard-szyy-ui v0.2.8
2
+ * sunyard-szyy-ui v0.3.2
3
3
  * (c) 2026 Sunyard SZYY UI Team
4
4
  */Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=Symbol("SUNYARD_SZYY_UI_INSTALLED"),s=(l=[],r="0.0.0")=>({version:r,install:t=>{t[e]||(t[e]=!0,l.forEach(n=>t.use(n)))}});exports.makeInstaller=s;
@@ -0,0 +1,7 @@
1
+ "use strict";/*!
2
+ * sunyard-szyy-ui v0.3.2
3
+ * (c) 2026 Sunyard SZYY UI Team
4
+ */Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function h(e,n="Sy"){return e.slice(n.length).replace(/([A-Z])/g,"-$1").toLowerCase().slice(1)}function S(e={}){const{prefix:n="Sy",importStyle:t=!0,libraryName:r="sunyard-szyy-ui",styleLibraryName:c="sunyard-szyy-ui/theme-chalk",componentsLibraryName:d="@sunyard-szyy-ui/components",devMode:l=!1,importMetaUrl:o,fileURLToPath:a,dirResolver:y}=e;if(l&&!y&&(!o||!a))throw new Error(`[SunyardSzyyUIResolver] devMode 启用时必须提供 importMetaUrl 和 fileURLToPath 参数
5
+ 示例:
6
+ import { fileURLToPath } from 'node:url';
7
+ SunyardSzyyUIResolver({ devMode: true, importMetaUrl: import.meta.url, fileURLToPath })`);let p=y;return l&&o&&a&&!y&&(p=s=>{const i=t==="scss"?"index.ts":"css.ts";return{componentPath:a(new URL(`../packages/components/src/${s}/index.ts`,o)),stylePath:a(new URL(`../packages/components/src/${s}/style/${i}`,o))}}),{type:"component",resolve:s=>{if(s.startsWith(n)){const i=h(s,n);if(p){const f=p(i);if(f.componentPath)return{name:s,from:f.componentPath,sideEffects:t&&f.stylePath?f.stylePath:void 0}}const u={name:s,from:r};return t&&(t==="css"?u.sideEffects=`${r}/es/components/${i}/style/css`:t==="scss"?u.sideEffects=`${r}/es/components/${i}/style/index`:t===!0&&(u.sideEffects=`${r}/es/components/${i}/style/css`)),u}}}}function g(e){const n=e;return n.install=t=>{const r=e.name;r&&t.component(r,e)},n}function D(e,n=300){let t=null;return function(...r){t&&clearTimeout(t),t=setTimeout(()=>{e.apply(this,r),t=null},n)}}function M(e,n=300){let t=0;return function(...r){const c=Date.now();c-t>=n&&(e.apply(this,r),t=c)}}function U(e,n="YYYY-MM-DD HH:mm:ss"){const t=typeof e=="number"?new Date(e):e,r=t.getFullYear(),c=String(t.getMonth()+1).padStart(2,"0"),d=String(t.getDate()).padStart(2,"0"),l=String(t.getHours()).padStart(2,"0"),o=String(t.getMinutes()).padStart(2,"0"),a=String(t.getSeconds()).padStart(2,"0");return n.replace("YYYY",String(r)).replace("MM",c).replace("DD",d).replace("HH",l).replace("mm",o).replace("ss",a)}function m(e){if(e===null||typeof e!="object")return e;if(e instanceof Date)return new Date(e.getTime());if(e instanceof Array)return e.map(n=>m(n));if(typeof e=="object"){const n={};for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=m(e[t]));return n}return e}exports.SunyardSzyyUIResolver=S;exports.debounce=D;exports.deepClone=m;exports.formatDate=U;exports.throttle=M;exports.withInstall=g;
package/lib/version.d.ts CHANGED
@@ -1,7 +1,2 @@
1
- /**
2
- * 自动生成的版本文件
3
- * 请勿手动修改
4
- * 通过 pnpm version:set 命令更新版本号
5
- */
6
- export declare const version = "0.2.8";
1
+ export declare const version = "0.3.2";
7
2
  //# sourceMappingURL=version.d.ts.map
package/lib/version.js CHANGED
@@ -1,4 +1,4 @@
1
1
  "use strict";/*!
2
- * sunyard-szyy-ui v0.2.8
2
+ * sunyard-szyy-ui v0.3.2
3
3
  * (c) 2026 Sunyard SZYY UI Team
4
- */Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="0.2.8";exports.version=e;
4
+ */Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="0.3.2";exports.version=e;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sunyard-szyy-ui",
3
- "version": "0.2.8",
3
+ "version": "0.3.2",
4
4
  "type": "module",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.mjs",
@@ -83,9 +83,9 @@
83
83
  "vue": "^3.0.0"
84
84
  },
85
85
  "dependencies": {
86
- "@sunyard-szyy-ui/components": "0.2.8",
87
- "@sunyard-szyy-ui/hooks": "0.2.8",
88
- "@sunyard-szyy-ui/utils": "0.2.8"
86
+ "@sunyard-szyy-ui/components": "0.3.2",
87
+ "@sunyard-szyy-ui/hooks": "0.3.2",
88
+ "@sunyard-szyy-ui/utils": "0.3.2"
89
89
  },
90
90
  "publishConfig": {
91
91
  "access": "public"