@kupola/kupola 2.0.0-beta.10 → 2.0.0-beta.3
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 +1 -1
- package/dist/css/index.css +0 -1
- package/dist/css/tokens.css +0 -9
- package/dist/kupola-core.cjs.js +1 -0
- package/dist/kupola-core.esm.js +1 -1
- package/package.json +54 -63
- package/packages/core/package.json +52 -52
- package/packages/core/src/effect.js +1 -6
- package/packages/core/src/index.js +0 -9
- package/packages/core/src/signal.js +0 -3
- package/packages/css/index.css +0 -1
- package/packages/css/tokens.css +0 -9
- package/dist/css/components.min.css +0 -1
- package/dist/css/index.min.css +0 -1
- package/dist/css/responsive.css +0 -153
- package/dist/css/responsive.min.css +0 -1
- package/dist/css/tokens.min.css +0 -1
- package/dist/kupola-core.cjs +0 -1
- package/packages/core/src/devtools.js +0 -303
- package/packages/core/src/lazy.js +0 -128
- package/packages/core/src/theme.js +0 -173
- package/packages/css/responsive.css +0 -153
- /package/dist/{kupola-core-alert.cjs → kupola-core-alert.cjs.js} +0 -0
- /package/dist/{kupola-core-avatar.cjs → kupola-core-avatar.cjs.js} +0 -0
- /package/dist/{kupola-core-badge.cjs → kupola-core-badge.cjs.js} +0 -0
- /package/dist/{kupola-core-breadcrumb.cjs → kupola-core-breadcrumb.cjs.js} +0 -0
- /package/dist/{kupola-core-calendar.cjs → kupola-core-calendar.cjs.js} +0 -0
- /package/dist/{kupola-core-carousel.cjs → kupola-core-carousel.cjs.js} +0 -0
- /package/dist/{kupola-core-checkbox.cjs → kupola-core-checkbox.cjs.js} +0 -0
- /package/dist/{kupola-core-collapse.cjs → kupola-core-collapse.cjs.js} +0 -0
- /package/dist/{kupola-core-colorpicker.cjs → kupola-core-colorpicker.cjs.js} +0 -0
- /package/dist/{kupola-core-countdown.cjs → kupola-core-countdown.cjs.js} +0 -0
- /package/dist/{kupola-core-datepicker.cjs → kupola-core-datepicker.cjs.js} +0 -0
- /package/dist/{kupola-core-dialog.cjs → kupola-core-dialog.cjs.js} +0 -0
- /package/dist/{kupola-core-directives.cjs → kupola-core-directives.cjs.js} +0 -0
- /package/dist/{kupola-core-divider.cjs → kupola-core-divider.cjs.js} +0 -0
- /package/dist/{kupola-core-drawer.cjs → kupola-core-drawer.cjs.js} +0 -0
- /package/dist/{kupola-core-dropdown.cjs → kupola-core-dropdown.cjs.js} +0 -0
- /package/dist/{kupola-core-dynamictags.cjs → kupola-core-dynamictags.cjs.js} +0 -0
- /package/dist/{kupola-core-empty.cjs → kupola-core-empty.cjs.js} +0 -0
- /package/dist/{kupola-core-fileupload.cjs → kupola-core-fileupload.cjs.js} +0 -0
- /package/dist/{kupola-core-form.cjs → kupola-core-form.cjs.js} +0 -0
- /package/dist/{kupola-core-heatmap.cjs → kupola-core-heatmap.cjs.js} +0 -0
- /package/dist/{kupola-core-i18n.cjs → kupola-core-i18n.cjs.js} +0 -0
- /package/dist/{kupola-core-icons.cjs → kupola-core-icons.cjs.js} +0 -0
- /package/dist/{kupola-core-imagepreview.cjs → kupola-core-imagepreview.cjs.js} +0 -0
- /package/dist/{kupola-core-input.cjs → kupola-core-input.cjs.js} +0 -0
- /package/dist/{kupola-core-kbd.cjs → kupola-core-kbd.cjs.js} +0 -0
- /package/dist/{kupola-core-menu.cjs → kupola-core-menu.cjs.js} +0 -0
- /package/dist/{kupola-core-message.cjs → kupola-core-message.cjs.js} +0 -0
- /package/dist/{kupola-core-modal.cjs → kupola-core-modal.cjs.js} +0 -0
- /package/dist/{kupola-core-notification.cjs → kupola-core-notification.cjs.js} +0 -0
- /package/dist/{kupola-core-numberinput.cjs → kupola-core-numberinput.cjs.js} +0 -0
- /package/dist/{kupola-core-pagination.cjs → kupola-core-pagination.cjs.js} +0 -0
- /package/dist/{kupola-core-progress.cjs → kupola-core-progress.cjs.js} +0 -0
- /package/dist/{kupola-core-radio.cjs → kupola-core-radio.cjs.js} +0 -0
- /package/dist/{kupola-core-select.cjs → kupola-core-select.cjs.js} +0 -0
- /package/dist/{kupola-core-server.cjs → kupola-core-server.cjs.js} +0 -0
- /package/dist/{kupola-core-skeleton.cjs → kupola-core-skeleton.cjs.js} +0 -0
- /package/dist/{kupola-core-slider.cjs → kupola-core-slider.cjs.js} +0 -0
- /package/dist/{kupola-core-spin.cjs → kupola-core-spin.cjs.js} +0 -0
- /package/dist/{kupola-core-statcard.cjs → kupola-core-statcard.cjs.js} +0 -0
- /package/dist/{kupola-core-switch.cjs → kupola-core-switch.cjs.js} +0 -0
- /package/dist/{kupola-core-table.cjs → kupola-core-table.cjs.js} +0 -0
- /package/dist/{kupola-core-tabs.cjs → kupola-core-tabs.cjs.js} +0 -0
- /package/dist/{kupola-core-tag.cjs → kupola-core-tag.cjs.js} +0 -0
- /package/dist/{kupola-core-textarea.cjs → kupola-core-textarea.cjs.js} +0 -0
- /package/dist/{kupola-core-timeline.cjs → kupola-core-timeline.cjs.js} +0 -0
- /package/dist/{kupola-core-timepicker.cjs → kupola-core-timepicker.cjs.js} +0 -0
- /package/dist/{kupola-core-tooltip.cjs → kupola-core-tooltip.cjs.js} +0 -0
- /package/dist/{kupola-core-tree.cjs → kupola-core-tree.cjs.js} +0 -0
- /package/dist/{kupola-core-validation.cjs → kupola-core-validation.cjs.js} +0 -0
- /package/dist/{kupola-core-virtuallist.cjs → kupola-core-virtuallist.cjs.js} +0 -0
package/README.md
CHANGED
package/dist/css/index.css
CHANGED
package/dist/css/tokens.css
CHANGED
|
@@ -8,9 +8,6 @@
|
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
:root {
|
|
11
|
-
|
|
12
|
-
/* ── Anti-FOUC: hide elements until JS removes [k-cloak] ── */
|
|
13
|
-
[k-cloak] { display: none !important; }
|
|
14
11
|
/* ── Primitives: Radius ─────────────────────────────────── */
|
|
15
12
|
--radius-2: 2px;
|
|
16
13
|
--radius-4: 4px;
|
|
@@ -78,12 +75,6 @@
|
|
|
78
75
|
--transition-fast: 0.12s ease;
|
|
79
76
|
--transition-normal: 0.2s ease;
|
|
80
77
|
--transition-slow: 0.3s ease;
|
|
81
|
-
|
|
82
|
-
/* ── Breakpoints ────────────────────────────────────────── */
|
|
83
|
-
--breakpoint-sm: 576px;
|
|
84
|
-
--breakpoint-md: 768px;
|
|
85
|
-
--breakpoint-lg: 1024px;
|
|
86
|
-
--breakpoint-xl: 1280px;
|
|
87
78
|
}
|
|
88
79
|
|
|
89
80
|
/* ═══════════════════════════════════════════════════════════
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const t=new Set;let n=!1;function o(o){t.add(o),n||(n=!0,queueMicrotask(e))}function e(){for(n=!1;t.size>0;){const n=[...t];t.clear();for(const t of n)t()}}let s=null;const c=[];function r(t){c.push(s),s=t}function i(){s=c.pop()??null}let u=0;const f=new Set;function l(t){u=t}function a(t){s&&(t.t.add(s),s.o.add(t))}function p(t){for(const n of t.t)n.i?n.u():u>0?f.add(n.u):o(n.u)}class h{constructor(t){this.l=t,this.t=new Set}get value(){return a(this),this.l}set value(t){Object.is(this.l,t)||(this.l=t,p(this))}peek(){return this.l}toString(){return String(this.l)}toJSON(){return JSON.stringify(this.l)}}function d(t){return new h(t)}function y(t){const n={p:t,o:new Set,u:null,h:!1};return n.u=()=>{n.h||g(n)},g(n),()=>function(t){if(t.h)return;t.h=!0,m(t)}(n)}function g(t){m(t),r(t);try{t.p()}finally{i()}}function m(t){for(const n of t.o)n.t.delete(t);t.o.clear()}class k{constructor(t,n){this.strings=t,this.values=n}}function b(t){return String(t).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}function x(t){if(null==t||"object"!=typeof t)return!1;const n=Object.getOwnPropertyDescriptor(t,"value");if(n&&"function"==typeof n.get)return!0;const o=Object.getPrototypeOf(t);if(o){const t=Object.getOwnPropertyDescriptor(o,"value");if(t&&"function"==typeof t.get)return!0}return!1}const S=t=>`${t}`;function w(t){const n=[];for(let o=0;o<t.strings.length;o++)if(n.push(t.strings[o]),o<t.values.length){const e=t.values[o];e instanceof k?n.push(w(e)):Array.isArray(e)&&e.length>0&&e[0]instanceof k?n.push(e.map(w).join("")):x(e)?n.push(b(e.value)):"function"!=typeof e&&n.push(b(e??""))}return n.join("")}function _(t,n){const o=t.indexOf(n);if(-1===o)return{type:"text"};const e=t.substring(0,o).lastIndexOf("<");if(-1===e)return{type:"text"};if(t.substring(e,o).includes(">"))return{type:"text"};const s=t.substring(e+1,o).match(/([\w\-@:.]+)\s*=\s*(?:"[^"]*|'[^']*|[^\s>]*?)$/);if(!s)return{type:"text"};const c=s[1];return c.startsWith("on")&&c.length>2?{type:"event",attrName:c}:{type:"attr",attrName:c}}class O{constructor(t,n){this.container=t,this.rawValue=n,this.node=null,this.m=null}mount(){const t=document.createTextNode("");if(this.k?this.container.insertBefore(t,this.k):this.container.appendChild(t),this.node=t,x(this.rawValue)){const t=this.rawValue;this.m=y(()=>{this.node.textContent=null!=t.value?String(t.value):""})}else this.rawValue instanceof k?this.node.textContent=w(this.rawValue):this.node.textContent=null!=this.rawValue?String(this.rawValue):""}destroy(){this.m?.(),this.node?.remove()}}class v{constructor(t,n,o){this.element=t,this.attrName=n,this.rawValue=o,this.m=null}mount(){if(x(this.rawValue)){const t=this.rawValue;this.m=y(()=>{const n=t.value;null==n||!1===n?this.element.removeAttribute(this.attrName):this.element.setAttribute(this.attrName,String(n))})}else null!=this.rawValue&&!1!==this.rawValue&&this.element.setAttribute(this.attrName,String(this.rawValue))}destroy(){this.m?.()}}class j{constructor(t,n,o){this.element=t,this.eventName=n.slice(2).toLowerCase(),this.handler=o,this.S=null}mount(){"function"==typeof this.handler&&(this.S=t=>this.handler(t),this.element.addEventListener(this.eventName,this.S))}destroy(){this.S&&(this.element.removeEventListener(this.eventName,this.S),this.S=null)}}class N{constructor(){this.parts=[],this.fragment=null}destroy(){for(const t of this.parts)t.destroy();this.parts.length=0}}function $(t,n){const o=new N,e=function(t){const n=[];for(let o=0;o<t.strings.length;o++)if(n.push(t.strings[o]),o<t.values.length){const e=t.values[o];e instanceof k?n.push(w(e)):Array.isArray(e)&&e.length>0&&e[0]instanceof k?n.push(e.map(w).join("")):"function"==typeof e||x(e)?n.push(S(o)):n.push(b(e??""))}return n.join("")}(t),s=function(t){const n=document.createElement("template");return n.innerHTML=t,n.content}(e);o.fragment=s,J(s,t.values,e,o);for(const t of o.parts)t.mount();return n.appendChild(s),o}function J(t,n,o,e){const s=[...t.childNodes];for(const c of s)3===c.nodeType?A(c,n,o,e,t):1===c.nodeType&&M(c,n,o,e)}function A(t,n,o,e,s){const c=t.textContent||"";for(let r=0;r<n.length;r++){const i=S(r),u=c.indexOf(i);if(-1===u)continue;if("text"!==_(o,i).type)continue;const f=c.substring(0,u),l=c.substring(u+i.length);f&&s.insertBefore(document.createTextNode(f),t);const a=new O(s,n[r]);e.parts.push(a);let p=t;return l&&(p=document.createTextNode(l),s.insertBefore(p,t)),s.removeChild(t),a.k=p!==t?p:null,void(l&&A(p,n,o,e,s))}}function M(t,n,o,e){const s=[...t.attributes];for(const c of s)for(let s=0;s<n.length;s++){const r=S(s);if(!c.value.includes(r))continue;const i=_(o,r);if("event"===i.type&&i.attrName===c.name){t.removeAttribute(c.name);const o=new j(t,c.name,n[s]);e.parts.push(o)}else if("attr"===i.type&&i.attrName===c.name){const o=c.value.replace(r,"");o?t.setAttribute(c.name,o):t.removeAttribute(c.name);const i=new v(t,c.name,n[s]);e.parts.push(i)}}J(t,n,o,e)}function C(t){const n=[];for(let o=0;o<t.strings.length;o++)if(n.push(t.strings[o]),o<t.values.length){const e=t.values[o];e instanceof k?n.push(C(e)):Array.isArray(e)&&e.length>0&&e[0]instanceof k?n.push(e.map(t=>C(t)).join("")):x(e)?n.push(b(e.value)):"function"!=typeof e&&n.push(b(e??""))}return n.join("")}function F(t){const n=t.join("");let o=!1,e="",s=-1,c=!1;for(let t=0;t<n.length;t++){const r=n[t];o?r===e&&(o=!1):'"'===r||"'"===r?(o=!0,e=r):"<"===r?(s=t,c=!1):">"===r&&s>=0&&!o&&(c=!0)}return s>=0&&!c}function D(t,n,o,e){const s=[...t.childNodes];for(const c of s)8===c.nodeType?P(c,n,t,o,e):1===c.nodeType&&q(c,n,o,e)}function P(t,n,o,e,s){const c=s.indices[s.nextIdx++]??-1,r=t.previousSibling;let i;if(r&&3===r.nodeType?i=r:(i=document.createTextNode(""),o.insertBefore(i,t)),c>=0&&c<n.length){const t=n[c];if(x(t)){const n=y(()=>{i.textContent=null!=t.value?String(t.value):""});e.parts.push({destroy(){n(),i.remove()}})}else i.textContent=null!=t?String(t):""}o.removeChild(t)}function q(t,n,o,e){const s=t.getAttribute("data-kp");if(s){const e=s.split(",");for(const s of e){const e=s.indexOf(":"),c=s.indexOf(":",e+1),r=parseInt(s.substring(0,e),10),i=s.substring(e+1,c),u=s.substring(c+1);if(r>=0&&r<n.length)if("e"===i){const e=new j(t,u,n[r]);e.mount(),o.parts.push(e)}else if("a"===i){const e=new v(t,u,n[r]);e.mount(),o.parts.push(e)}}t.removeAttribute("data-kp")}D(t,n,o,e)}const I=new Map;function K(t){const n={};for(const o in t)Object.prototype.hasOwnProperty.call(t,o)&&(n[o]=d(t[o]));const o=Object.keys(n);return new Proxy({},{get(t,o){if("symbol"==typeof o)return;const e=n[o];return e?e.value:void 0},set(t,e,s){const c=n[e];return c?c.value=s:(n[e]=d(s),o.push(e)),!0},has:(t,o)=>o in n,ownKeys:()=>o,getOwnPropertyDescriptor(t,o){if(o in n)return{enumerable:!0,configurable:!0}}})}const T=new Map;function U(t,n){let o=T.get(t);return o||(o=new Function("__s__",`with(__s__){return(${t})}`),T.set(t,o)),o(n)}function z(t){const n=t.split("."),o=n[0],e=n.slice(1),s=o.indexOf(":");return-1===s?{base:o,arg:null,modifiers:e}:{base:o.substring(0,s),arg:o.substring(s+1),modifiers:e}}function B(t,n,o,e){const s=y(()=>{const e=U(n,o);t.style.display=e?"":"none"});e.push(s)}function E(t,n,o,e){const s=y(()=>{t.textContent=String(U(n,o)??"")});e.push(s)}function W(t,n,o,e){const s=y(()=>{t.innerHTML=String(U(n,o)??"")});e.push(s)}function G(t,n,o,e,s){const c=y(()=>{const s=U(n,e);!1===s||null==s?t.removeAttribute(o):!0===s?t.setAttribute(o,""):t.setAttribute(o,String(s))});s.push(c)}function H(t,n,o,s,c,r){const i=s.includes("stop"),u=s.includes("prevent"),f=s.includes("once"),l=s.includes("self"),a=o=>{l&&o.target!==t||(i&&o.stopPropagation(),u&&o.preventDefault(),function(t,n){const o="$$"+t;let e=T.get(o);e||(e=new Function("__s__",`with(__s__){${t}}`),T.set(o,e)),e(n)}(n,c),e())};t.addEventListener(o,a,{once:f}),r.push(()=>t.removeEventListener(o,a))}function L(t,n,o,s){const c=y(()=>{const e=U(n,o);t.value=null!=e?String(e):""});s.push(c);const r=()=>{const s=n.trim().split(".");if(1===s.length)o[s[0]]=t.value;else{const e=s.slice(0,-1).join("."),c=s[s.length-1];try{const n=U(e,o);n&&"object"==typeof n&&(n[c]=t.value)}catch(e){o[n]=t.value}}e()};t.addEventListener("input",r),s.push(()=>t.removeEventListener("input",r))}function Q(t){return t.startsWith("k-")||t.startsWith(":")||t.startsWith("@")}function R(t){return t.startsWith(":")?"k-bind:"+t.substring(1):t.startsWith("@")?"k-on:"+t.substring(1):t}function V(t,n,o){const e=[...t.attributes];for(const s of e){const e=s.name,c=s.value;if(!Q(e))continue;const r=R(e),{base:i,arg:u,modifiers:f}=z(r);switch(i){case"k-show":B(t,c,n,o);break;case"k-text":E(t,c,n,o);break;case"k-html":W(t,c,n,o);break;case"k-bind":u&&G(t,c,u,n,o);break;case"k-on":u&&H(t,c,u,f,n,o);break;case"k-model":L(t,c,n,o)}}}function X(t,n,o){for(const e of t.children)e.hasAttribute("k-data")||(V(e,n,o),X(e,n,o))}function Y(t,n){const o=t.getAttribute("k-data");let e={};try{e=U(o,K({}))||{}}catch(t){}const s=K(e);V(t,s,n),X(t,s,n);for(const o of t.children)o.hasAttribute("k-data")&&Y(o,n)}const Z={"en-US":{"modal.close":"Close","dialog.ok":"OK","dialog.cancel":"Cancel","table.empty":"No data","pagination.page":"Page","pagination.of":"of","select.placeholder":"Select...","datepicker.placeholder":"Select date","timepicker.placeholder":"Select time","fileupload.drag":"Drag files here or","fileupload.browse":"Browse","empty.text":"No data","datepicker.months":"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec","datepicker.weekdays":"Mo,Tu,We,Th,Fr,Sa,Su","timepicker.placeholder":"Select time"},"zh-CN":{"modal.close":"关闭","dialog.ok":"确定","dialog.cancel":"取消","table.empty":"暂无数据","pagination.page":"页","pagination.of":"/","select.placeholder":"请选择","datepicker.placeholder":"选择日期","datepicker.months":"1月,2月,3月,4月,5月,6月,7月,8月,9月,10月,11月,12月","datepicker.weekdays":"一,二,三,四,五,六,日","timepicker.placeholder":"选择时间","fileupload.drag":"拖拽文件到此处或","fileupload.browse":"浏览","empty.text":"暂无数据"}};let tt="en-US";exports.ErrorBoundary=function(t,n={}){const{fallback:o=null,onError:e=null}=n;try{return t()}catch(t){if(e)try{e(t)}catch(t){}const n=document.createDocumentFragment();if(o)try{const e="function"==typeof o?o(t):o;if("string"==typeof e){const t=document.createElement("div");t.className="ds-error-boundary",t.textContent=e,n.appendChild(t)}else $(e,n)}catch(o){const e=document.createElement("div");e.className="ds-error-boundary",e.textContent=`Component error: ${t.message}`,n.appendChild(e)}else{const o=document.createElement("div");o.className="ds-error-boundary",o.textContent=`Component error: ${t.message}`,n.appendChild(o)}return{element:n,error:t}}},exports.Signal=h,exports.TemplateResult=k,exports.addMessages=function(t,n){Z[t]||(Z[t]={}),Object.assign(Z[t],n)},exports.batch=function(t){l(u+1);try{return t()}finally{if(l(u-1),0===u){const t=f,n=[...t];t.clear();for(const t of n)t();e()}}},exports.clearRegistry=function(){I.clear()},exports.computed=function(t){const n=new h(void 0);let o=!0,e=new Set;const s={p:null,o:e,i:!0,u:null,h:!1};function c(){for(const t of e)t.t.delete(s);e.clear(),s.o=e,r(s);try{const o=t();Object.is(n.l,o)||(n.l=o)}finally{i()}o=!1}return s.u=()=>{o||(o=!0,p(n))},{get value(){return o&&c(),a(n),n.l},peek:()=>(o&&c(),n.l),toString(){return String(this.value)},toJSON(){return JSON.stringify(this.value)}}},exports.defineComponent=function(t){const{props:n=[],setup:o}=t;function e(t={},e=null){const s={};for(const o of n)s[o]=d(t[o]);const c=o(s,e)(),r=document.createDocumentFragment(),i=$(c,r);return{get element(){return r},_:i,destroy(){i.destroy()},update(t){for(const o of n)o in t&&s[o]&&(s[o].value=t[o])}}}return e.O=!0,e.v=n,e},exports.effect=y,exports.flushJobs=e,exports.getComponent=function(t){return I.get(t)},exports.getLocale=function(){return tt},exports.hasComponent=function(t){return I.has(t)},exports.html=function(t,...n){return new k(t,n)},exports.hydrate=function(t,n){const o=new N,e=function(t){const n=[],o=[];let e=!1;for(let s=0;s<t.strings.length;s++)if(o.push(t.strings[s]),e=F(o),s<t.values.length){const c=t.values[s];if(c instanceof k)o.push(C(c));else if(Array.isArray(c)&&c.length>0&&c[0]instanceof k)o.push(c.map(t=>C(t)).join(""));else if("function"==typeof c);else if(x(c))if(e){const t=c.value;o.push(null!=t?b(t):"")}else{n.push(s);const t=c.value;o.push(null!=t?b(t):"")}else o.push(b(c??""))}return{indices:n,nextIdx:0}}(t);return D(n,t.values,o,e),o},exports.register=function(t,n){I.set(t,n)},exports.render=$,exports.resetScheduler=function(){t.clear(),n=!1},exports.setLocale=function(t){tt=t},exports.signal=d,exports.t=function(t,n={}){let o=(Z[tt]||Z["en-US"])[t]||t;for(const[t,e]of Object.entries(n))o=o.replace(`{${t}}`,e);return o},exports.walk=function(t){const n=[];if(t.hasAttribute&&t.hasAttribute("k-data"))Y(t,n);else{const o=t.querySelectorAll?t.querySelectorAll("[k-data]"):[];if(o.length>0)for(const e of o){let o=!1,s=e.parentElement;for(;s&&s!==t;){if(s.hasAttribute("k-data")){o=!0;break}s=s.parentElement}o||Y(e,n)}else{const o=K({});for(const e of t.children)V(e,o,n),X(e,o,n)}}return{destroy(){for(const t of n)t();n.length=0}}};
|
package/dist/kupola-core.esm.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const t=new Set;let n=!1;function o(o){t.add(o),n||(n=!0,queueMicrotask(e))}function e(){for(n=!1;t.size>0;){const n=[...t];t.clear();for(const t of n)t()}}function c(){t.clear(),n=!1}let r=!1,s=0;const i=new Map,f=new Map,u=new Map;let a=0,l=0,d=0,h=0,p=0;const m=new WeakMap;function g(t,n){return m.has(t)?m.get(t):(m.set(t,n),n)}function y(t={}){r=!0,s=performance.now(),i.clear(),f.clear(),u.clear(),a=0,l=0,d=0,h=0,p=0,t.console}function k(){r=!1}function w(){r=!1,s=0,i.clear(),f.clear(),u.clear(),d=0,h=0,p=0}function b(){return r}function S(){const t=s>0?performance.now()-s:0,n=[];for(const[,t]of i)n.push({label:t.label,reads:t.reads,writes:t.writes,triggers:t.triggers});const o=[];for(const[,t]of f){const n=t.runs>0?t.totalTime/t.runs:0;o.push({label:t.label,runs:t.runs,totalTime:t.totalTime.toFixed(2)+"ms",maxTime:t.maxTime.toFixed(3)+"ms",avgTime:n.toFixed(3)+"ms"})}const e=[];for(const[,t]of u){const n=t.recomputes>0?t.totalTime/t.recomputes:0;e.push({label:t.label,recomputes:t.recomputes,totalTime:t.totalTime.toFixed(2)+"ms",maxTime:t.maxTime.toFixed(3)+"ms",avgTime:n.toFixed(3)+"ms"})}return{duration:Math.round(t),totalTriggers:d,totalEffectRuns:h,totalComputedRecomputes:p,signals:n,effects:o,computeds:e}}function _(){const t=S();t.signals.length,t.effects.length,t.computeds.length}let v=null;const M=[];function O(t){M.push(v),v=t}function x(){v=M.pop()??null}let $=0;const j=new Set;function T(t){$=t}function N(t){v&&(t.t.add(v),v.o.add(t))}function A(t){for(const n of t.t)n.i?n.u():$>0?j.add(n.u):o(n.u)}class C{constructor(t){this.l=t,this.t=new Set}get value(){return N(this),b()&&function(t){if(!r)return;const n=g(t,a);i.has(n)||(i.set(n,{reads:0,writes:0,triggers:0,label:`signal#${n}`}),n>=a&&(a=n+1)),i.get(n).reads++}(this),this.l}set value(t){Object.is(this.l,t)||(this.l=t,b()&&function(t){if(!r)return;const n=g(t,a);i.has(n)||(i.set(n,{reads:0,writes:0,triggers:0,label:`signal#${n}`}),n>=a&&(a=n+1)),i.get(n).writes++}(this),A(this))}peek(){return this.l}toString(){return String(this.l)}toJSON(){return JSON.stringify(this.l)}}function J(t){return new C(t)}function E(t){const n=new C(void 0);let o=!0,e=new Set;const c={h:null,o:e,i:!0,u:null,p:!1};function r(){for(const t of e)t.t.delete(c);e.clear(),c.o=e,O(c);try{const o=t();Object.is(n.l,o)||(n.l=o)}finally{x()}o=!1}return c.u=()=>{o||(o=!0,A(n))},{get value(){return o&&r(),N(n),n.l},peek:()=>(o&&r(),n.l),toString(){return String(this.value)},toJSON(){return JSON.stringify(this.value)}}}function F(t){const n={h:t,o:new Set,u:null,p:!1};return n.u=()=>{n.p||z(n)},z(n),()=>function(t){if(t.p)return;t.p=!0,I(t)}(n)}function z(t){I(t),O(t);try{b()?function(t,n){if(!r)return n();const o=g(t,l);f.has(o)||(f.set(o,{runs:0,totalTime:0,maxTime:0,label:`effect#${o}`}),o>=l&&(l=o+1));const e=f.get(o),c=performance.now(),s=n(),i=performance.now()-c;e.runs++,e.totalTime+=i,i>e.maxTime&&(e.maxTime=i),h++}(t,t.h):t.h()}finally{x()}}function I(t){for(const n of t.o)n.t.delete(t);t.o.clear()}function K(t){T($+1);try{return t()}finally{if(T($-1),0===$){const t=j,n=[...t];t.clear();for(const t of n)t();e()}}}class q{constructor(t,n){this.strings=t,this.values=n}}function D(t,...n){return new q(t,n)}function P(t){return String(t).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}function R(t){if(null==t||"object"!=typeof t)return!1;const n=Object.getOwnPropertyDescriptor(t,"value");if(n&&"function"==typeof n.get)return!0;const o=Object.getPrototypeOf(t);if(o){const t=Object.getOwnPropertyDescriptor(o,"value");if(t&&"function"==typeof t.get)return!0}return!1}const U=t=>`${t}`;function W(t){const n=[];for(let o=0;o<t.strings.length;o++)if(n.push(t.strings[o]),o<t.values.length){const e=t.values[o];e instanceof q?n.push(W(e)):Array.isArray(e)&&e.length>0&&e[0]instanceof q?n.push(e.map(W).join("")):R(e)?n.push(P(e.value)):"function"!=typeof e&&n.push(P(e??""))}return n.join("")}function B(t,n){const o=t.indexOf(n);if(-1===o)return{type:"text"};const e=t.substring(0,o).lastIndexOf("<");if(-1===e)return{type:"text"};if(t.substring(e,o).includes(">"))return{type:"text"};const c=t.substring(e+1,o).match(/([\w\-@:.]+)\s*=\s*(?:"[^"]*|'[^']*|[^\s>]*?)$/);if(!c)return{type:"text"};const r=c[1];return r.startsWith("on")&&r.length>2?{type:"event",attrName:r}:{type:"attr",attrName:r}}class G{constructor(t,n){this.container=t,this.rawValue=n,this.node=null,this.m=null}mount(){const t=document.createTextNode("");if(this.k?this.container.insertBefore(t,this.k):this.container.appendChild(t),this.node=t,R(this.rawValue)){const t=this.rawValue;this.m=F(()=>{this.node.textContent=null!=t.value?String(t.value):""})}else this.rawValue instanceof q?this.node.textContent=W(this.rawValue):this.node.textContent=null!=this.rawValue?String(this.rawValue):""}destroy(){this.m?.(),this.node?.remove()}}class H{constructor(t,n,o){this.element=t,this.attrName=n,this.rawValue=o,this.m=null}mount(){if(R(this.rawValue)){const t=this.rawValue;this.m=F(()=>{const n=t.value;null==n||!1===n?this.element.removeAttribute(this.attrName):this.element.setAttribute(this.attrName,String(n))})}else null!=this.rawValue&&!1!==this.rawValue&&this.element.setAttribute(this.attrName,String(this.rawValue))}destroy(){this.m?.()}}class L{constructor(t,n,o){this.element=t,this.eventName=n.slice(2).toLowerCase(),this.handler=o,this.S=null}mount(){"function"==typeof this.handler&&(this.S=t=>this.handler(t),this.element.addEventListener(this.eventName,this.S))}destroy(){this.S&&(this.element.removeEventListener(this.eventName,this.S),this.S=null)}}class Q{constructor(){this.parts=[],this.fragment=null}destroy(){for(const t of this.parts)t.destroy();this.parts.length=0}}function V(t,n){const o=new Q,e=function(t){const n=[];for(let o=0;o<t.strings.length;o++)if(n.push(t.strings[o]),o<t.values.length){const e=t.values[o];e instanceof q?n.push(W(e)):Array.isArray(e)&&e.length>0&&e[0]instanceof q?n.push(e.map(W).join("")):"function"==typeof e||R(e)?n.push(U(o)):n.push(P(e??""))}return n.join("")}(t),c=function(t){const n=document.createElement("template");return n.innerHTML=t,n.content}(e);o.fragment=c,X(c,t.values,e,o);for(const t of o.parts)t.mount();return n.appendChild(c),o}function X(t,n,o,e){const c=[...t.childNodes];for(const r of c)3===r.nodeType?Y(r,n,o,e,t):1===r.nodeType&&Z(r,n,o,e)}function Y(t,n,o,e,c){const r=t.textContent||"";for(let s=0;s<n.length;s++){const i=U(s),f=r.indexOf(i);if(-1===f)continue;if("text"!==B(o,i).type)continue;const u=r.substring(0,f),a=r.substring(f+i.length);u&&c.insertBefore(document.createTextNode(u),t);const l=new G(c,n[s]);e.parts.push(l);let d=t;return a&&(d=document.createTextNode(a),c.insertBefore(d,t)),c.removeChild(t),l.k=d!==t?d:null,void(a&&Y(d,n,o,e,c))}}function Z(t,n,o,e){const c=[...t.attributes];for(const r of c)for(let c=0;c<n.length;c++){const s=U(c);if(!r.value.includes(s))continue;const i=B(o,s);if("event"===i.type&&i.attrName===r.name){t.removeAttribute(r.name);const o=new L(t,r.name,n[c]);e.parts.push(o)}else if("attr"===i.type&&i.attrName===r.name){const o=r.value.replace(s,"");o?t.setAttribute(r.name,o):t.removeAttribute(r.name);const i=new H(t,r.name,n[c]);e.parts.push(i)}}X(t,n,o,e)}function tt(t){const n=[];for(let o=0;o<t.strings.length;o++)if(n.push(t.strings[o]),o<t.values.length){const e=t.values[o];e instanceof q?n.push(tt(e)):Array.isArray(e)&&e.length>0&&e[0]instanceof q?n.push(e.map(t=>tt(t)).join("")):R(e)?n.push(P(e.value)):"function"!=typeof e&&n.push(P(e??""))}return n.join("")}function nt(t){const n=t.join("");let o=!1,e="",c=-1,r=!1;for(let t=0;t<n.length;t++){const s=n[t];o?s===e&&(o=!1):'"'===s||"'"===s?(o=!0,e=s):"<"===s?(c=t,r=!1):">"===s&&c>=0&&!o&&(r=!0)}return c>=0&&!r}function ot(t,n){const o=new Q,e=function(t){const n=[],o=[];let e=!1;for(let c=0;c<t.strings.length;c++)if(o.push(t.strings[c]),e=nt(o),c<t.values.length){const r=t.values[c];if(r instanceof q)o.push(tt(r));else if(Array.isArray(r)&&r.length>0&&r[0]instanceof q)o.push(r.map(t=>tt(t)).join(""));else if("function"==typeof r);else if(R(r))if(e){const t=r.value;o.push(null!=t?P(t):"")}else{n.push(c);const t=r.value;o.push(null!=t?P(t):"")}else o.push(P(r??""))}return{indices:n,nextIdx:0}}(t);return et(n,t.values,o,e),o}function et(t,n,o,e){const c=[...t.childNodes];for(const r of c)8===r.nodeType?ct(r,n,t,o,e):1===r.nodeType&&rt(r,n,o,e)}function ct(t,n,o,e,c){const r=c.indices[c.nextIdx++]??-1,s=t.previousSibling;let i;if(s&&3===s.nodeType?i=s:(i=document.createTextNode(""),o.insertBefore(i,t)),r>=0&&r<n.length){const t=n[r];if(R(t)){const n=F(()=>{i.textContent=null!=t.value?String(t.value):""});e.parts.push({destroy(){n(),i.remove()}})}else i.textContent=null!=t?String(t):""}o.removeChild(t)}function rt(t,n,o,e){const c=t.getAttribute("data-kp");if(c){const e=c.split(",");for(const c of e){const e=c.indexOf(":"),r=c.indexOf(":",e+1),s=parseInt(c.substring(0,e),10),i=c.substring(e+1,r),f=c.substring(r+1);if(s>=0&&s<n.length)if("e"===i){const e=new L(t,f,n[s]);e.mount(),o.parts.push(e)}else if("a"===i){const e=new H(t,f,n[s]);e.mount(),o.parts.push(e)}}t.removeAttribute("data-kp")}et(t,n,o,e)}function st(t){const{props:n=[],setup:o}=t;function e(t={},e=null){const c={};for(const o of n)c[o]=J(t[o]);const r=o(c,e)(),s=document.createDocumentFragment(),i=V(r,s);return{get element(){return s},_:i,destroy(){i.destroy()},update(t){for(const o of n)o in t&&c[o]&&(c[o].value=t[o])}}}return e.v=!0,e.M=n,e}const it=new Map;function ft(t,n){it.set(t,n)}function ut(t){return it.get(t)}function at(t){return it.has(t)}function lt(){it.clear()}function dt(t){const n={};for(const o in t)Object.prototype.hasOwnProperty.call(t,o)&&(n[o]=J(t[o]));const o=Object.keys(n);return new Proxy({},{get(t,o){if("symbol"==typeof o)return;const e=n[o];return e?e.value:void 0},set(t,e,c){const r=n[e];return r?r.value=c:(n[e]=J(c),o.push(e)),!0},has:(t,o)=>o in n,ownKeys:()=>o,getOwnPropertyDescriptor(t,o){if(o in n)return{enumerable:!0,configurable:!0}}})}const ht=new Map;function pt(t,n){let o=ht.get(t);return o||(o=new Function("__s__",`with(__s__){return(${t})}`),ht.set(t,o)),o(n)}function mt(t){const n=t.split("."),o=n[0],e=n.slice(1),c=o.indexOf(":");return-1===c?{base:o,arg:null,modifiers:e}:{base:o.substring(0,c),arg:o.substring(c+1),modifiers:e}}function gt(t,n,o,e){const c=F(()=>{const e=pt(n,o);t.style.display=e?"":"none"});e.push(c)}function yt(t,n,o,e){const c=F(()=>{t.textContent=String(pt(n,o)??"")});e.push(c)}function kt(t,n,o,e){const c=F(()=>{t.innerHTML=String(pt(n,o)??"")});e.push(c)}function wt(t,n,o,e,c){const r=F(()=>{const c=pt(n,e);!1===c||null==c?t.removeAttribute(o):!0===c?t.setAttribute(o,""):t.setAttribute(o,String(c))});c.push(r)}function bt(t,n,o,c,r,s){const i=c.includes("stop"),f=c.includes("prevent"),u=c.includes("once"),a=c.includes("self"),l=o=>{a&&o.target!==t||(i&&o.stopPropagation(),f&&o.preventDefault(),function(t,n){const o="$$"+t;let e=ht.get(o);e||(e=new Function("__s__",`with(__s__){${t}}`),ht.set(o,e)),e(n)}(n,r),e())};t.addEventListener(o,l,{once:u}),s.push(()=>t.removeEventListener(o,l))}function St(t,n,o,c){const r=F(()=>{const e=pt(n,o);t.value=null!=e?String(e):""});c.push(r);const s=()=>{const c=n.trim().split(".");if(1===c.length)o[c[0]]=t.value;else{const e=c.slice(0,-1).join("."),r=c[c.length-1];try{const n=pt(e,o);n&&"object"==typeof n&&(n[r]=t.value)}catch(e){o[n]=t.value}}e()};t.addEventListener("input",s),c.push(()=>t.removeEventListener("input",s))}function _t(t){return t.startsWith("k-")||t.startsWith(":")||t.startsWith("@")}function vt(t){return t.startsWith(":")?"k-bind:"+t.substring(1):t.startsWith("@")?"k-on:"+t.substring(1):t}function Mt(t,n,o){const e=[...t.attributes];for(const c of e){const e=c.name,r=c.value;if(!_t(e))continue;const s=vt(e),{base:i,arg:f,modifiers:u}=mt(s);switch(i){case"k-show":gt(t,r,n,o);break;case"k-text":yt(t,r,n,o);break;case"k-html":kt(t,r,n,o);break;case"k-bind":f&&wt(t,r,f,n,o);break;case"k-on":f&&bt(t,r,f,u,n,o);break;case"k-model":St(t,r,n,o)}}}function Ot(t,n,o){for(const e of t.children)e.hasAttribute("k-data")||(Mt(e,n,o),Ot(e,n,o))}function xt(t,n){const o=t.getAttribute("k-data");let e={};try{e=pt(o,dt({}))||{}}catch(t){}const c=dt(e);Mt(t,c,n),Ot(t,c,n);for(const o of t.children)o.hasAttribute("k-data")&&xt(o,n)}function $t(t){const n=[];if(t.hasAttribute&&t.hasAttribute("k-data"))xt(t,n);else{const o=t.querySelectorAll?t.querySelectorAll("[k-data]"):[];if(o.length>0)for(const e of o){let o=!1,c=e.parentElement;for(;c&&c!==t;){if(c.hasAttribute("k-data")){o=!0;break}c=c.parentElement}o||xt(e,n)}else{const o=dt({});for(const e of t.children)Mt(e,o,n),Ot(e,o,n)}}return{destroy(){for(const t of n)t();n.length=0}}}const jt={"en-US":{"modal.close":"Close","dialog.ok":"OK","dialog.cancel":"Cancel","table.empty":"No data","pagination.page":"Page","pagination.of":"of","select.placeholder":"Select...","datepicker.placeholder":"Select date","timepicker.placeholder":"Select time","fileupload.drag":"Drag files here or","fileupload.browse":"Browse","empty.text":"No data","datepicker.months":"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec","datepicker.weekdays":"Mo,Tu,We,Th,Fr,Sa,Su","timepicker.placeholder":"Select time"},"zh-CN":{"modal.close":"关闭","dialog.ok":"确定","dialog.cancel":"取消","table.empty":"暂无数据","pagination.page":"页","pagination.of":"/","select.placeholder":"请选择","datepicker.placeholder":"选择日期","datepicker.months":"1月,2月,3月,4月,5月,6月,7月,8月,9月,10月,11月,12月","datepicker.weekdays":"一,二,三,四,五,六,日","timepicker.placeholder":"选择时间","fileupload.drag":"拖拽文件到此处或","fileupload.browse":"浏览","empty.text":"暂无数据"}};let Tt="en-US";function Nt(t){Tt=t}function At(){return Tt}function Ct(t,n={}){let o=(jt[Tt]||jt["en-US"])[t]||t;for(const[t,e]of Object.entries(n))o=o.replace(`{${t}}`,e);return o}function Jt(t,n){jt[t]||(jt[t]={}),Object.assign(jt[t],n)}function Et(t,n={}){const{fallback:o=null,onError:e=null}=n;try{return t()}catch(t){if(e)try{e(t)}catch(t){}const n=document.createDocumentFragment();if(o)try{const e="function"==typeof o?o(t):o;if("string"==typeof e){const t=document.createElement("div");t.className="ds-error-boundary",t.textContent=e,n.appendChild(t)}else V(e,n)}catch(o){const e=document.createElement("div");e.className="ds-error-boundary",e.textContent=`Component error: ${t.message}`,n.appendChild(e)}else{const o=document.createElement("div");o.className="ds-error-boundary",o.textContent=`Component error: ${t.message}`,n.appendChild(o)}return{element:n,error:t}}}function Ft(t,n="default"){let o=null,e=null;async function c(){return o||(e||(e=t().then(t=>{if("function"==typeof t.default)o=t.default;else if("default"!==n&&"function"==typeof t[n])o=t[n];else{const n=Object.keys(t);for(const e of n)if("function"==typeof t[e]){o=t[e];break}}if(!o)throw new Error("[Kupola lazy] No component factory found in module");return e=null,o}),e))}async function r(...t){return(await c())(...t)}return r.O=t,r.$=()=>null!==o,r.j=c,r}async function zt(t){if("function"!=typeof t.j)throw new TypeError("[Kupola preload] Argument must be a lazy component from lazyComponent()");await t.j()}const It="kupola-theme",Kt=["light","dark"],qt=new Set;function Dt(){if("undefined"!=typeof localStorage){const t=localStorage.getItem(It);if(t&&Kt.includes(t))return t}return"undefined"!=typeof matchMedia&&matchMedia("(prefers-color-scheme: light)").matches?"light":"dark"}function Pt(t){if(!Kt.includes(t))throw new Error(`Invalid theme "${t}". Must be one of: ${Kt.join(", ")}`);document.documentElement.dataset.theme=t,"undefined"!=typeof localStorage&&localStorage.setItem(It,t);for(const n of qt)try{n(t)}catch{}}function Rt(){const t="dark"===(document.documentElement.dataset.theme||"dark")?"light":"dark";return Pt(t),t}function Ut(t){return qt.add(t),()=>qt.delete(t)}function Wt(){const t=Dt();document.documentElement.dataset.theme=t,requestAnimationFrame(()=>{const t=document.querySelectorAll("[k-cloak]");for(const n of t)n.removeAttribute("k-cloak")}),"undefined"!=typeof matchMedia&&matchMedia("(prefers-color-scheme: light)").addEventListener("change",t=>{"undefined"==typeof localStorage||localStorage.getItem(It)||Pt(t.matches?"light":"dark")})}function Bt(){return"<script>(function(){var t=localStorage.getItem('kupola-theme');if(!t){t=window.matchMedia&&window.matchMedia('(prefers-color-scheme:light)').matches?'light':'dark';}document.documentElement.dataset.theme=t;})()<\/script>"}export{Et as ErrorBoundary,C as Signal,q as TemplateResult,Jt as addMessages,K as batch,lt as clearRegistry,E as computed,st as defineComponent,k as disableProfiler,F as effect,y as enableProfiler,e as flushJobs,ut as getComponent,At as getLocale,Dt as getPreferredTheme,S as getProfileReport,Bt as getThemeInlineScript,at as hasComponent,D as html,ot as hydrate,Ft as lazyComponent,Ut as onThemeChange,zt as preloadComponent,_ as printProfileReport,ft as register,V as render,w as resetProfiler,c as resetScheduler,Nt as setLocale,Pt as setTheme,J as signal,Ct as t,Wt as themePreload,Rt as toggleTheme,$t as walk};
|
|
1
|
+
const t=new Set;let n=!1;function o(o){t.add(o),n||(n=!0,queueMicrotask(e))}function e(){for(n=!1;t.size>0;){const n=[...t];t.clear();for(const t of n)t()}}function c(){t.clear(),n=!1}let s=null;const i=[];function r(t){i.push(s),s=t}function f(){s=i.pop()??null}let u=0;const l=new Set;function a(t){u=t}function h(t){s&&(t.t.add(s),s.o.add(t))}function d(t){for(const n of t.t)n.i?n.u():u>0?l.add(n.u):o(n.u)}class p{constructor(t){this.l=t,this.t=new Set}get value(){return h(this),this.l}set value(t){Object.is(this.l,t)||(this.l=t,d(this))}peek(){return this.l}toString(){return String(this.l)}toJSON(){return JSON.stringify(this.l)}}function y(t){return new p(t)}function g(t){const n=new p(void 0);let o=!0,e=new Set;const c={h:null,o:e,i:!0,u:null,p:!1};function s(){for(const t of e)t.t.delete(c);e.clear(),c.o=e,r(c);try{const o=t();Object.is(n.l,o)||(n.l=o)}finally{f()}o=!1}return c.u=()=>{o||(o=!0,d(n))},{get value(){return o&&s(),h(n),n.l},peek:()=>(o&&s(),n.l),toString(){return String(this.value)},toJSON(){return JSON.stringify(this.value)}}}function m(t){const n={h:t,o:new Set,u:null,p:!1};return n.u=()=>{n.p||k(n)},k(n),()=>function(t){if(t.p)return;t.p=!0,b(t)}(n)}function k(t){b(t),r(t);try{t.h()}finally{f()}}function b(t){for(const n of t.o)n.t.delete(t);t.o.clear()}function S(t){a(u+1);try{return t()}finally{if(a(u-1),0===u){const t=l,n=[...t];t.clear();for(const t of n)t();e()}}}class w{constructor(t,n){this.strings=t,this.values=n}}function _(t,...n){return new w(t,n)}function O(t){return String(t).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}function v(t){if(null==t||"object"!=typeof t)return!1;const n=Object.getOwnPropertyDescriptor(t,"value");if(n&&"function"==typeof n.get)return!0;const o=Object.getPrototypeOf(t);if(o){const t=Object.getOwnPropertyDescriptor(o,"value");if(t&&"function"==typeof t.get)return!0}return!1}const x=t=>`${t}`;function j(t){const n=[];for(let o=0;o<t.strings.length;o++)if(n.push(t.strings[o]),o<t.values.length){const e=t.values[o];e instanceof w?n.push(j(e)):Array.isArray(e)&&e.length>0&&e[0]instanceof w?n.push(e.map(j).join("")):v(e)?n.push(O(e.value)):"function"!=typeof e&&n.push(O(e??""))}return n.join("")}function N(t,n){const o=t.indexOf(n);if(-1===o)return{type:"text"};const e=t.substring(0,o).lastIndexOf("<");if(-1===e)return{type:"text"};if(t.substring(e,o).includes(">"))return{type:"text"};const c=t.substring(e+1,o).match(/([\w\-@:.]+)\s*=\s*(?:"[^"]*|'[^']*|[^\s>]*?)$/);if(!c)return{type:"text"};const s=c[1];return s.startsWith("on")&&s.length>2?{type:"event",attrName:s}:{type:"attr",attrName:s}}class ${constructor(t,n){this.container=t,this.rawValue=n,this.node=null,this.m=null}mount(){const t=document.createTextNode("");if(this.k?this.container.insertBefore(t,this.k):this.container.appendChild(t),this.node=t,v(this.rawValue)){const t=this.rawValue;this.m=m(()=>{this.node.textContent=null!=t.value?String(t.value):""})}else this.rawValue instanceof w?this.node.textContent=j(this.rawValue):this.node.textContent=null!=this.rawValue?String(this.rawValue):""}destroy(){this.m?.(),this.node?.remove()}}class J{constructor(t,n,o){this.element=t,this.attrName=n,this.rawValue=o,this.m=null}mount(){if(v(this.rawValue)){const t=this.rawValue;this.m=m(()=>{const n=t.value;null==n||!1===n?this.element.removeAttribute(this.attrName):this.element.setAttribute(this.attrName,String(n))})}else null!=this.rawValue&&!1!==this.rawValue&&this.element.setAttribute(this.attrName,String(this.rawValue))}destroy(){this.m?.()}}class A{constructor(t,n,o){this.element=t,this.eventName=n.slice(2).toLowerCase(),this.handler=o,this.S=null}mount(){"function"==typeof this.handler&&(this.S=t=>this.handler(t),this.element.addEventListener(this.eventName,this.S))}destroy(){this.S&&(this.element.removeEventListener(this.eventName,this.S),this.S=null)}}class M{constructor(){this.parts=[],this.fragment=null}destroy(){for(const t of this.parts)t.destroy();this.parts.length=0}}function C(t,n){const o=new M,e=function(t){const n=[];for(let o=0;o<t.strings.length;o++)if(n.push(t.strings[o]),o<t.values.length){const e=t.values[o];e instanceof w?n.push(j(e)):Array.isArray(e)&&e.length>0&&e[0]instanceof w?n.push(e.map(j).join("")):"function"==typeof e||v(e)?n.push(x(o)):n.push(O(e??""))}return n.join("")}(t),c=function(t){const n=document.createElement("template");return n.innerHTML=t,n.content}(e);o.fragment=c,F(c,t.values,e,o);for(const t of o.parts)t.mount();return n.appendChild(c),o}function F(t,n,o,e){const c=[...t.childNodes];for(const s of c)3===s.nodeType?D(s,n,o,e,t):1===s.nodeType&&P(s,n,o,e)}function D(t,n,o,e,c){const s=t.textContent||"";for(let i=0;i<n.length;i++){const r=x(i),f=s.indexOf(r);if(-1===f)continue;if("text"!==N(o,r).type)continue;const u=s.substring(0,f),l=s.substring(f+r.length);u&&c.insertBefore(document.createTextNode(u),t);const a=new $(c,n[i]);e.parts.push(a);let h=t;return l&&(h=document.createTextNode(l),c.insertBefore(h,t)),c.removeChild(t),a.k=h!==t?h:null,void(l&&D(h,n,o,e,c))}}function P(t,n,o,e){const c=[...t.attributes];for(const s of c)for(let c=0;c<n.length;c++){const i=x(c);if(!s.value.includes(i))continue;const r=N(o,i);if("event"===r.type&&r.attrName===s.name){t.removeAttribute(s.name);const o=new A(t,s.name,n[c]);e.parts.push(o)}else if("attr"===r.type&&r.attrName===s.name){const o=s.value.replace(i,"");o?t.setAttribute(s.name,o):t.removeAttribute(s.name);const r=new J(t,s.name,n[c]);e.parts.push(r)}}F(t,n,o,e)}function q(t){const n=[];for(let o=0;o<t.strings.length;o++)if(n.push(t.strings[o]),o<t.values.length){const e=t.values[o];e instanceof w?n.push(q(e)):Array.isArray(e)&&e.length>0&&e[0]instanceof w?n.push(e.map(t=>q(t)).join("")):v(e)?n.push(O(e.value)):"function"!=typeof e&&n.push(O(e??""))}return n.join("")}function I(t){const n=t.join("");let o=!1,e="",c=-1,s=!1;for(let t=0;t<n.length;t++){const i=n[t];o?i===e&&(o=!1):'"'===i||"'"===i?(o=!0,e=i):"<"===i?(c=t,s=!1):">"===i&&c>=0&&!o&&(s=!0)}return c>=0&&!s}function K(t,n){const o=new M,e=function(t){const n=[],o=[];let e=!1;for(let c=0;c<t.strings.length;c++)if(o.push(t.strings[c]),e=I(o),c<t.values.length){const s=t.values[c];if(s instanceof w)o.push(q(s));else if(Array.isArray(s)&&s.length>0&&s[0]instanceof w)o.push(s.map(t=>q(t)).join(""));else if("function"==typeof s);else if(v(s))if(e){const t=s.value;o.push(null!=t?O(t):"")}else{n.push(c);const t=s.value;o.push(null!=t?O(t):"")}else o.push(O(s??""))}return{indices:n,nextIdx:0}}(t);return T(n,t.values,o,e),o}function T(t,n,o,e){const c=[...t.childNodes];for(const s of c)8===s.nodeType?U(s,n,t,o,e):1===s.nodeType&&z(s,n,o,e)}function U(t,n,o,e,c){const s=c.indices[c.nextIdx++]??-1,i=t.previousSibling;let r;if(i&&3===i.nodeType?r=i:(r=document.createTextNode(""),o.insertBefore(r,t)),s>=0&&s<n.length){const t=n[s];if(v(t)){const n=m(()=>{r.textContent=null!=t.value?String(t.value):""});e.parts.push({destroy(){n(),r.remove()}})}else r.textContent=null!=t?String(t):""}o.removeChild(t)}function z(t,n,o,e){const c=t.getAttribute("data-kp");if(c){const e=c.split(",");for(const c of e){const e=c.indexOf(":"),s=c.indexOf(":",e+1),i=parseInt(c.substring(0,e),10),r=c.substring(e+1,s),f=c.substring(s+1);if(i>=0&&i<n.length)if("e"===r){const e=new A(t,f,n[i]);e.mount(),o.parts.push(e)}else if("a"===r){const e=new J(t,f,n[i]);e.mount(),o.parts.push(e)}}t.removeAttribute("data-kp")}T(t,n,o,e)}function B(t){const{props:n=[],setup:o}=t;function e(t={},e=null){const c={};for(const o of n)c[o]=y(t[o]);const s=o(c,e)(),i=document.createDocumentFragment(),r=C(s,i);return{get element(){return i},_:r,destroy(){r.destroy()},update(t){for(const o of n)o in t&&c[o]&&(c[o].value=t[o])}}}return e.O=!0,e.v=n,e}const E=new Map;function W(t,n){E.set(t,n)}function G(t){return E.get(t)}function H(t){return E.has(t)}function L(){E.clear()}function Q(t){const n={};for(const o in t)Object.prototype.hasOwnProperty.call(t,o)&&(n[o]=y(t[o]));const o=Object.keys(n);return new Proxy({},{get(t,o){if("symbol"==typeof o)return;const e=n[o];return e?e.value:void 0},set(t,e,c){const s=n[e];return s?s.value=c:(n[e]=y(c),o.push(e)),!0},has:(t,o)=>o in n,ownKeys:()=>o,getOwnPropertyDescriptor(t,o){if(o in n)return{enumerable:!0,configurable:!0}}})}const R=new Map;function V(t,n){let o=R.get(t);return o||(o=new Function("__s__",`with(__s__){return(${t})}`),R.set(t,o)),o(n)}function X(t){const n=t.split("."),o=n[0],e=n.slice(1),c=o.indexOf(":");return-1===c?{base:o,arg:null,modifiers:e}:{base:o.substring(0,c),arg:o.substring(c+1),modifiers:e}}function Y(t,n,o,e){const c=m(()=>{const e=V(n,o);t.style.display=e?"":"none"});e.push(c)}function Z(t,n,o,e){const c=m(()=>{t.textContent=String(V(n,o)??"")});e.push(c)}function tt(t,n,o,e){const c=m(()=>{t.innerHTML=String(V(n,o)??"")});e.push(c)}function nt(t,n,o,e,c){const s=m(()=>{const c=V(n,e);!1===c||null==c?t.removeAttribute(o):!0===c?t.setAttribute(o,""):t.setAttribute(o,String(c))});c.push(s)}function ot(t,n,o,c,s,i){const r=c.includes("stop"),f=c.includes("prevent"),u=c.includes("once"),l=c.includes("self"),a=o=>{l&&o.target!==t||(r&&o.stopPropagation(),f&&o.preventDefault(),function(t,n){const o="$$"+t;let e=R.get(o);e||(e=new Function("__s__",`with(__s__){${t}}`),R.set(o,e)),e(n)}(n,s),e())};t.addEventListener(o,a,{once:u}),i.push(()=>t.removeEventListener(o,a))}function et(t,n,o,c){const s=m(()=>{const e=V(n,o);t.value=null!=e?String(e):""});c.push(s);const i=()=>{const c=n.trim().split(".");if(1===c.length)o[c[0]]=t.value;else{const e=c.slice(0,-1).join("."),s=c[c.length-1];try{const n=V(e,o);n&&"object"==typeof n&&(n[s]=t.value)}catch(e){o[n]=t.value}}e()};t.addEventListener("input",i),c.push(()=>t.removeEventListener("input",i))}function ct(t){return t.startsWith("k-")||t.startsWith(":")||t.startsWith("@")}function st(t){return t.startsWith(":")?"k-bind:"+t.substring(1):t.startsWith("@")?"k-on:"+t.substring(1):t}function it(t,n,o){const e=[...t.attributes];for(const c of e){const e=c.name,s=c.value;if(!ct(e))continue;const i=st(e),{base:r,arg:f,modifiers:u}=X(i);switch(r){case"k-show":Y(t,s,n,o);break;case"k-text":Z(t,s,n,o);break;case"k-html":tt(t,s,n,o);break;case"k-bind":f&&nt(t,s,f,n,o);break;case"k-on":f&&ot(t,s,f,u,n,o);break;case"k-model":et(t,s,n,o)}}}function rt(t,n,o){for(const e of t.children)e.hasAttribute("k-data")||(it(e,n,o),rt(e,n,o))}function ft(t,n){const o=t.getAttribute("k-data");let e={};try{e=V(o,Q({}))||{}}catch(t){}const c=Q(e);it(t,c,n),rt(t,c,n);for(const o of t.children)o.hasAttribute("k-data")&&ft(o,n)}function ut(t){const n=[];if(t.hasAttribute&&t.hasAttribute("k-data"))ft(t,n);else{const o=t.querySelectorAll?t.querySelectorAll("[k-data]"):[];if(o.length>0)for(const e of o){let o=!1,c=e.parentElement;for(;c&&c!==t;){if(c.hasAttribute("k-data")){o=!0;break}c=c.parentElement}o||ft(e,n)}else{const o=Q({});for(const e of t.children)it(e,o,n),rt(e,o,n)}}return{destroy(){for(const t of n)t();n.length=0}}}const lt={"en-US":{"modal.close":"Close","dialog.ok":"OK","dialog.cancel":"Cancel","table.empty":"No data","pagination.page":"Page","pagination.of":"of","select.placeholder":"Select...","datepicker.placeholder":"Select date","timepicker.placeholder":"Select time","fileupload.drag":"Drag files here or","fileupload.browse":"Browse","empty.text":"No data","datepicker.months":"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec","datepicker.weekdays":"Mo,Tu,We,Th,Fr,Sa,Su","timepicker.placeholder":"Select time"},"zh-CN":{"modal.close":"关闭","dialog.ok":"确定","dialog.cancel":"取消","table.empty":"暂无数据","pagination.page":"页","pagination.of":"/","select.placeholder":"请选择","datepicker.placeholder":"选择日期","datepicker.months":"1月,2月,3月,4月,5月,6月,7月,8月,9月,10月,11月,12月","datepicker.weekdays":"一,二,三,四,五,六,日","timepicker.placeholder":"选择时间","fileupload.drag":"拖拽文件到此处或","fileupload.browse":"浏览","empty.text":"暂无数据"}};let at="en-US";function ht(t){at=t}function dt(){return at}function pt(t,n={}){let o=(lt[at]||lt["en-US"])[t]||t;for(const[t,e]of Object.entries(n))o=o.replace(`{${t}}`,e);return o}function yt(t,n){lt[t]||(lt[t]={}),Object.assign(lt[t],n)}function gt(t,n={}){const{fallback:o=null,onError:e=null}=n;try{return t()}catch(t){if(e)try{e(t)}catch(t){}const n=document.createDocumentFragment();if(o)try{const e="function"==typeof o?o(t):o;if("string"==typeof e){const t=document.createElement("div");t.className="ds-error-boundary",t.textContent=e,n.appendChild(t)}else C(e,n)}catch(o){const e=document.createElement("div");e.className="ds-error-boundary",e.textContent=`Component error: ${t.message}`,n.appendChild(e)}else{const o=document.createElement("div");o.className="ds-error-boundary",o.textContent=`Component error: ${t.message}`,n.appendChild(o)}return{element:n,error:t}}}export{gt as ErrorBoundary,p as Signal,w as TemplateResult,yt as addMessages,S as batch,L as clearRegistry,g as computed,B as defineComponent,m as effect,e as flushJobs,G as getComponent,dt as getLocale,H as hasComponent,_ as html,K as hydrate,W as register,C as render,c as resetScheduler,ht as setLocale,y as signal,pt as t,ut as walk};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kupola/kupola",
|
|
3
|
-
"version": "2.0.0-beta.
|
|
3
|
+
"version": "2.0.0-beta.3",
|
|
4
4
|
"description": "A modern, modular UI component library for any web project. Zero framework dependencies, tree-shakeable imports. 这是一个现代、模块化的 UI 组件库,适用于任何 Web 项目。零框架依赖,支持按需引入(tree-shakeable)。",
|
|
5
5
|
"main": "dist/kupola-core.esm.js",
|
|
6
6
|
"module": "dist/kupola-core.esm.js",
|
|
@@ -15,213 +15,212 @@
|
|
|
15
15
|
"exports": {
|
|
16
16
|
".": {
|
|
17
17
|
"import": "./dist/kupola-core.esm.js",
|
|
18
|
-
"require": "./dist/kupola-core.cjs",
|
|
18
|
+
"require": "./dist/kupola-core.cjs.js",
|
|
19
19
|
"types": "./packages/core/src/components/types.d.ts"
|
|
20
20
|
},
|
|
21
21
|
"./core": {
|
|
22
22
|
"import": "./dist/kupola-core.esm.js",
|
|
23
|
-
"require": "./dist/kupola-core.cjs",
|
|
23
|
+
"require": "./dist/kupola-core.cjs.js",
|
|
24
24
|
"types": "./packages/core/src/components/types.d.ts"
|
|
25
25
|
},
|
|
26
26
|
"./i18n": {
|
|
27
27
|
"import": "./dist/kupola-core-i18n.esm.js",
|
|
28
|
-
"require": "./dist/kupola-core-i18n.cjs"
|
|
28
|
+
"require": "./dist/kupola-core-i18n.cjs.js"
|
|
29
29
|
},
|
|
30
30
|
"./css": "./dist/css/index.css",
|
|
31
31
|
"./css/tokens": "./dist/css/tokens.css",
|
|
32
32
|
"./css/components": "./dist/css/components.css",
|
|
33
|
-
"./css/responsive": "./dist/css/responsive.css",
|
|
34
33
|
"./components/modal": {
|
|
35
34
|
"import": "./dist/kupola-core-modal.esm.js",
|
|
36
|
-
"require": "./dist/kupola-core-modal.cjs"
|
|
35
|
+
"require": "./dist/kupola-core-modal.cjs.js"
|
|
37
36
|
},
|
|
38
37
|
"./components/dropdown": {
|
|
39
38
|
"import": "./dist/kupola-core-dropdown.esm.js",
|
|
40
|
-
"require": "./dist/kupola-core-dropdown.cjs"
|
|
39
|
+
"require": "./dist/kupola-core-dropdown.cjs.js"
|
|
41
40
|
},
|
|
42
41
|
"./components/drawer": {
|
|
43
42
|
"import": "./dist/kupola-core-drawer.esm.js",
|
|
44
|
-
"require": "./dist/kupola-core-drawer.cjs"
|
|
43
|
+
"require": "./dist/kupola-core-drawer.cjs.js"
|
|
45
44
|
},
|
|
46
45
|
"./components/collapse": {
|
|
47
46
|
"import": "./dist/kupola-core-collapse.esm.js",
|
|
48
|
-
"require": "./dist/kupola-core-collapse.cjs"
|
|
47
|
+
"require": "./dist/kupola-core-collapse.cjs.js"
|
|
49
48
|
},
|
|
50
49
|
"./components/tabs": {
|
|
51
50
|
"import": "./dist/kupola-core-tabs.esm.js",
|
|
52
|
-
"require": "./dist/kupola-core-tabs.cjs"
|
|
51
|
+
"require": "./dist/kupola-core-tabs.cjs.js"
|
|
53
52
|
},
|
|
54
53
|
"./components/select": {
|
|
55
54
|
"import": "./dist/kupola-core-select.esm.js",
|
|
56
|
-
"require": "./dist/kupola-core-select.cjs"
|
|
55
|
+
"require": "./dist/kupola-core-select.cjs.js"
|
|
57
56
|
},
|
|
58
57
|
"./components/pagination": {
|
|
59
58
|
"import": "./dist/kupola-core-pagination.esm.js",
|
|
60
|
-
"require": "./dist/kupola-core-pagination.cjs"
|
|
59
|
+
"require": "./dist/kupola-core-pagination.cjs.js"
|
|
61
60
|
},
|
|
62
61
|
"./components/datepicker": {
|
|
63
62
|
"import": "./dist/kupola-core-datepicker.esm.js",
|
|
64
|
-
"require": "./dist/kupola-core-datepicker.cjs"
|
|
63
|
+
"require": "./dist/kupola-core-datepicker.cjs.js"
|
|
65
64
|
},
|
|
66
65
|
"./components/dialog": {
|
|
67
66
|
"import": "./dist/kupola-core-dialog.esm.js",
|
|
68
|
-
"require": "./dist/kupola-core-dialog.cjs"
|
|
67
|
+
"require": "./dist/kupola-core-dialog.cjs.js"
|
|
69
68
|
},
|
|
70
69
|
"./components/notification": {
|
|
71
70
|
"import": "./dist/kupola-core-notification.esm.js",
|
|
72
|
-
"require": "./dist/kupola-core-notification.cjs"
|
|
71
|
+
"require": "./dist/kupola-core-notification.cjs.js"
|
|
73
72
|
},
|
|
74
73
|
"./components/tooltip": {
|
|
75
74
|
"import": "./dist/kupola-core-tooltip.esm.js",
|
|
76
|
-
"require": "./dist/kupola-core-tooltip.cjs"
|
|
75
|
+
"require": "./dist/kupola-core-tooltip.cjs.js"
|
|
77
76
|
},
|
|
78
77
|
"./components/alert": {
|
|
79
78
|
"import": "./dist/kupola-core-alert.esm.js",
|
|
80
|
-
"require": "./dist/kupola-core-alert.cjs"
|
|
79
|
+
"require": "./dist/kupola-core-alert.cjs.js"
|
|
81
80
|
},
|
|
82
81
|
"./components/switch": {
|
|
83
82
|
"import": "./dist/kupola-core-switch.esm.js",
|
|
84
|
-
"require": "./dist/kupola-core-switch.cjs"
|
|
83
|
+
"require": "./dist/kupola-core-switch.cjs.js"
|
|
85
84
|
},
|
|
86
85
|
"./components/progress": {
|
|
87
86
|
"import": "./dist/kupola-core-progress.esm.js",
|
|
88
|
-
"require": "./dist/kupola-core-progress.cjs"
|
|
87
|
+
"require": "./dist/kupola-core-progress.cjs.js"
|
|
89
88
|
},
|
|
90
89
|
"./components/tag": {
|
|
91
90
|
"import": "./dist/kupola-core-tag.esm.js",
|
|
92
|
-
"require": "./dist/kupola-core-tag.cjs"
|
|
91
|
+
"require": "./dist/kupola-core-tag.cjs.js"
|
|
93
92
|
},
|
|
94
93
|
"./components/badge": {
|
|
95
94
|
"import": "./dist/kupola-core-badge.esm.js",
|
|
96
|
-
"require": "./dist/kupola-core-badge.cjs"
|
|
95
|
+
"require": "./dist/kupola-core-badge.cjs.js"
|
|
97
96
|
},
|
|
98
97
|
"./components/divider": {
|
|
99
98
|
"import": "./dist/kupola-core-divider.esm.js",
|
|
100
|
-
"require": "./dist/kupola-core-divider.cjs"
|
|
99
|
+
"require": "./dist/kupola-core-divider.cjs.js"
|
|
101
100
|
},
|
|
102
101
|
"./components/skeleton": {
|
|
103
102
|
"import": "./dist/kupola-core-skeleton.esm.js",
|
|
104
|
-
"require": "./dist/kupola-core-skeleton.cjs"
|
|
103
|
+
"require": "./dist/kupola-core-skeleton.cjs.js"
|
|
105
104
|
},
|
|
106
105
|
"./components/spin": {
|
|
107
106
|
"import": "./dist/kupola-core-spin.esm.js",
|
|
108
|
-
"require": "./dist/kupola-core-spin.cjs"
|
|
107
|
+
"require": "./dist/kupola-core-spin.cjs.js"
|
|
109
108
|
},
|
|
110
109
|
"./components/empty": {
|
|
111
110
|
"import": "./dist/kupola-core-empty.esm.js",
|
|
112
|
-
"require": "./dist/kupola-core-empty.cjs"
|
|
111
|
+
"require": "./dist/kupola-core-empty.cjs.js"
|
|
113
112
|
},
|
|
114
113
|
"./components/timeline": {
|
|
115
114
|
"import": "./dist/kupola-core-timeline.esm.js",
|
|
116
|
-
"require": "./dist/kupola-core-timeline.cjs"
|
|
115
|
+
"require": "./dist/kupola-core-timeline.cjs.js"
|
|
117
116
|
},
|
|
118
117
|
"./components/kbd": {
|
|
119
118
|
"import": "./dist/kupola-core-kbd.esm.js",
|
|
120
|
-
"require": "./dist/kupola-core-kbd.cjs"
|
|
119
|
+
"require": "./dist/kupola-core-kbd.cjs.js"
|
|
121
120
|
},
|
|
122
121
|
"./components/countdown": {
|
|
123
122
|
"import": "./dist/kupola-core-countdown.esm.js",
|
|
124
|
-
"require": "./dist/kupola-core-countdown.cjs"
|
|
123
|
+
"require": "./dist/kupola-core-countdown.cjs.js"
|
|
125
124
|
},
|
|
126
125
|
"./components/breadcrumb": {
|
|
127
126
|
"import": "./dist/kupola-core-breadcrumb.esm.js",
|
|
128
|
-
"require": "./dist/kupola-core-breadcrumb.cjs"
|
|
127
|
+
"require": "./dist/kupola-core-breadcrumb.cjs.js"
|
|
129
128
|
},
|
|
130
129
|
"./components/checkbox": {
|
|
131
130
|
"import": "./dist/kupola-core-checkbox.esm.js",
|
|
132
|
-
"require": "./dist/kupola-core-checkbox.cjs"
|
|
131
|
+
"require": "./dist/kupola-core-checkbox.cjs.js"
|
|
133
132
|
},
|
|
134
133
|
"./components/radio": {
|
|
135
134
|
"import": "./dist/kupola-core-radio.esm.js",
|
|
136
|
-
"require": "./dist/kupola-core-radio.cjs"
|
|
135
|
+
"require": "./dist/kupola-core-radio.cjs.js"
|
|
137
136
|
},
|
|
138
137
|
"./components/input": {
|
|
139
138
|
"import": "./dist/kupola-core-input.esm.js",
|
|
140
|
-
"require": "./dist/kupola-core-input.cjs"
|
|
139
|
+
"require": "./dist/kupola-core-input.cjs.js"
|
|
141
140
|
},
|
|
142
141
|
"./components/avatar": {
|
|
143
142
|
"import": "./dist/kupola-core-avatar.esm.js",
|
|
144
|
-
"require": "./dist/kupola-core-avatar.cjs"
|
|
143
|
+
"require": "./dist/kupola-core-avatar.cjs.js"
|
|
145
144
|
},
|
|
146
145
|
"./components/slider": {
|
|
147
146
|
"import": "./dist/kupola-core-slider.esm.js",
|
|
148
|
-
"require": "./dist/kupola-core-slider.cjs"
|
|
147
|
+
"require": "./dist/kupola-core-slider.cjs.js"
|
|
149
148
|
},
|
|
150
149
|
"./components/numberinput": {
|
|
151
150
|
"import": "./dist/kupola-core-numberinput.esm.js",
|
|
152
|
-
"require": "./dist/kupola-core-numberinput.cjs"
|
|
151
|
+
"require": "./dist/kupola-core-numberinput.cjs.js"
|
|
153
152
|
},
|
|
154
153
|
"./components/textarea": {
|
|
155
154
|
"import": "./dist/kupola-core-textarea.esm.js",
|
|
156
|
-
"require": "./dist/kupola-core-textarea.cjs"
|
|
155
|
+
"require": "./dist/kupola-core-textarea.cjs.js"
|
|
157
156
|
},
|
|
158
157
|
"./components/statcard": {
|
|
159
158
|
"import": "./dist/kupola-core-statcard.esm.js",
|
|
160
|
-
"require": "./dist/kupola-core-statcard.cjs"
|
|
159
|
+
"require": "./dist/kupola-core-statcard.cjs.js"
|
|
161
160
|
},
|
|
162
161
|
"./components/timepicker": {
|
|
163
162
|
"import": "./dist/kupola-core-timepicker.esm.js",
|
|
164
|
-
"require": "./dist/kupola-core-timepicker.cjs"
|
|
163
|
+
"require": "./dist/kupola-core-timepicker.cjs.js"
|
|
165
164
|
},
|
|
166
165
|
"./components/carousel": {
|
|
167
166
|
"import": "./dist/kupola-core-carousel.esm.js",
|
|
168
|
-
"require": "./dist/kupola-core-carousel.cjs"
|
|
167
|
+
"require": "./dist/kupola-core-carousel.cjs.js"
|
|
169
168
|
},
|
|
170
169
|
"./components/tree": {
|
|
171
170
|
"import": "./dist/kupola-core-tree.esm.js",
|
|
172
|
-
"require": "./dist/kupola-core-tree.cjs"
|
|
171
|
+
"require": "./dist/kupola-core-tree.cjs.js"
|
|
173
172
|
},
|
|
174
173
|
"./components/menu": {
|
|
175
174
|
"import": "./dist/kupola-core-menu.esm.js",
|
|
176
|
-
"require": "./dist/kupola-core-menu.cjs"
|
|
175
|
+
"require": "./dist/kupola-core-menu.cjs.js"
|
|
177
176
|
},
|
|
178
177
|
"./components/fileupload": {
|
|
179
178
|
"import": "./dist/kupola-core-fileupload.esm.js",
|
|
180
|
-
"require": "./dist/kupola-core-fileupload.cjs"
|
|
179
|
+
"require": "./dist/kupola-core-fileupload.cjs.js"
|
|
181
180
|
},
|
|
182
181
|
"./components/dynamictags": {
|
|
183
182
|
"import": "./dist/kupola-core-dynamictags.esm.js",
|
|
184
|
-
"require": "./dist/kupola-core-dynamictags.cjs"
|
|
183
|
+
"require": "./dist/kupola-core-dynamictags.cjs.js"
|
|
185
184
|
},
|
|
186
185
|
"./components/imagepreview": {
|
|
187
186
|
"import": "./dist/kupola-core-imagepreview.esm.js",
|
|
188
|
-
"require": "./dist/kupola-core-imagepreview.cjs"
|
|
187
|
+
"require": "./dist/kupola-core-imagepreview.cjs.js"
|
|
189
188
|
},
|
|
190
189
|
"./components/colorpicker": {
|
|
191
190
|
"import": "./dist/kupola-core-colorpicker.esm.js",
|
|
192
|
-
"require": "./dist/kupola-core-colorpicker.cjs"
|
|
191
|
+
"require": "./dist/kupola-core-colorpicker.cjs.js"
|
|
193
192
|
},
|
|
194
193
|
"./components/virtuallist": {
|
|
195
194
|
"import": "./dist/kupola-core-virtuallist.esm.js",
|
|
196
|
-
"require": "./dist/kupola-core-virtuallist.cjs"
|
|
195
|
+
"require": "./dist/kupola-core-virtuallist.cjs.js"
|
|
197
196
|
},
|
|
198
197
|
"./components/icons": {
|
|
199
198
|
"import": "./dist/kupola-core-icons.esm.js",
|
|
200
|
-
"require": "./dist/kupola-core-icons.cjs"
|
|
199
|
+
"require": "./dist/kupola-core-icons.cjs.js"
|
|
201
200
|
},
|
|
202
201
|
"./components/message": {
|
|
203
202
|
"import": "./dist/kupola-core-message.esm.js",
|
|
204
|
-
"require": "./dist/kupola-core-message.cjs"
|
|
203
|
+
"require": "./dist/kupola-core-message.cjs.js"
|
|
205
204
|
},
|
|
206
205
|
"./components/heatmap": {
|
|
207
206
|
"import": "./dist/kupola-core-heatmap.esm.js",
|
|
208
|
-
"require": "./dist/kupola-core-heatmap.cjs"
|
|
207
|
+
"require": "./dist/kupola-core-heatmap.cjs.js"
|
|
209
208
|
},
|
|
210
209
|
"./components/calendar": {
|
|
211
210
|
"import": "./dist/kupola-core-calendar.esm.js",
|
|
212
|
-
"require": "./dist/kupola-core-calendar.cjs"
|
|
211
|
+
"require": "./dist/kupola-core-calendar.cjs.js"
|
|
213
212
|
},
|
|
214
213
|
"./components/validation": {
|
|
215
214
|
"import": "./dist/kupola-core-validation.esm.js",
|
|
216
|
-
"require": "./dist/kupola-core-validation.cjs"
|
|
215
|
+
"require": "./dist/kupola-core-validation.cjs.js"
|
|
217
216
|
},
|
|
218
217
|
"./components/form": {
|
|
219
218
|
"import": "./dist/kupola-core-form.esm.js",
|
|
220
|
-
"require": "./dist/kupola-core-form.cjs"
|
|
219
|
+
"require": "./dist/kupola-core-form.cjs.js"
|
|
221
220
|
},
|
|
222
221
|
"./components/table": {
|
|
223
222
|
"import": "./dist/kupola-core-table.esm.js",
|
|
224
|
-
"require": "./dist/kupola-core-table.cjs"
|
|
223
|
+
"require": "./dist/kupola-core-table.cjs.js"
|
|
225
224
|
},
|
|
226
225
|
"./version.json": "./version.json"
|
|
227
226
|
},
|
|
@@ -229,7 +228,7 @@
|
|
|
229
228
|
"dev": "vite",
|
|
230
229
|
"build": "rollup -c && npm run build:css",
|
|
231
230
|
"build:rollup": "rollup -c",
|
|
232
|
-
"build:css": "node
|
|
231
|
+
"build:css": "node -e \"require('fs').cpSync('packages/css', 'dist/css', {recursive:true}); console.log('CSS copied to dist/css/')\"",
|
|
233
232
|
"build:core": "rollup -c --configPlugin @rollup/plugin-commonjs 2>nul || npx rollup -c",
|
|
234
233
|
"lint": "eslint .",
|
|
235
234
|
"lint:fix": "eslint . --fix",
|
|
@@ -242,9 +241,7 @@
|
|
|
242
241
|
"prepublishOnly": "npm run build",
|
|
243
242
|
"docs:dev": "vitepress dev docs-site",
|
|
244
243
|
"docs:build": "vitepress build docs-site",
|
|
245
|
-
"docs:preview": "vitepress preview docs-site"
|
|
246
|
-
"storybook": "storybook dev -p 6006",
|
|
247
|
-
"storybook:build": "storybook build"
|
|
244
|
+
"docs:preview": "vitepress preview docs-site"
|
|
248
245
|
},
|
|
249
246
|
"keywords": [
|
|
250
247
|
"ui",
|
|
@@ -290,11 +287,6 @@
|
|
|
290
287
|
"@rollup/plugin-node-resolve": "^15.2.3",
|
|
291
288
|
"@rollup/plugin-terser": "^1.0.0",
|
|
292
289
|
"@size-limit/preset-app": "^12.1.0",
|
|
293
|
-
"@storybook/addon-essentials": "^8.6.14",
|
|
294
|
-
"@storybook/builder-vite": "^8.6.14",
|
|
295
|
-
"@storybook/html": "^8.6.14",
|
|
296
|
-
"@storybook/html-vite": "^8.6.14",
|
|
297
|
-
"clean-css": "^5.3.3",
|
|
298
290
|
"eslint": "^8.57.0",
|
|
299
291
|
"jest": "^29.7.0",
|
|
300
292
|
"jest-environment-jsdom": "^30.4.1",
|
|
@@ -303,7 +295,6 @@
|
|
|
303
295
|
"rollup": "^4.13.0",
|
|
304
296
|
"rollup-plugin-copy": "^3.5.0",
|
|
305
297
|
"size-limit": "^12.1.0",
|
|
306
|
-
"storybook": "^8.6.14",
|
|
307
298
|
"vite": "^8.1.4",
|
|
308
299
|
"vitepress": "^1.6.4"
|
|
309
300
|
}
|