@shwfed/config 2.7.1 → 2.7.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.
Files changed (109) hide show
  1. package/dist/mcp.mjs +1205 -1018
  2. package/dist/module.json +1 -1
  3. package/dist/preview/assets/badge-CV7CwAKY.js +1 -0
  4. package/dist/preview/assets/config-5JFmp62X.js +1 -0
  5. package/dist/preview/assets/config-BkS5uufU.js +1 -0
  6. package/dist/preview/assets/config-Bo4cd_u5.js +1 -0
  7. package/dist/preview/assets/config-BoVPp04e.js +1 -0
  8. package/dist/preview/assets/config-CMcqX_mc.js +1 -0
  9. package/dist/preview/assets/config-Ck5_8YaL.js +1 -0
  10. package/dist/preview/assets/config-DE97oObU.js +1 -0
  11. package/dist/preview/assets/config-L72ON8PT.js +1 -0
  12. package/dist/preview/assets/config-dk7L4924.js +1 -0
  13. package/dist/preview/assets/definition.vue_vue_type_script_setup_true_lang-Cr7UNELp.js +1 -0
  14. package/dist/preview/assets/index-C2PrdVxC.css +1 -0
  15. package/dist/preview/assets/{index-BGFrUxgg.js → index-CTZy_nrf.js} +189 -189
  16. package/dist/preview/assets/index-CY99yvOi.js +1 -0
  17. package/dist/preview/assets/{index-Bw16PZhL.js → index-DumuGVME.js} +1 -1
  18. package/dist/preview/assets/{item-aVe51Gy6.js → item-BhBaPg4Z.js} +1 -1
  19. package/dist/preview/assets/{runtime-CYGmRjmI.js → runtime-BbGu9CHo.js} +1 -1
  20. package/dist/preview/assets/{runtime-DYj-R8SZ.js → runtime-C6Pc6N3T.js} +1 -1
  21. package/dist/preview/assets/runtime-CILO8PDD.js +1 -0
  22. package/dist/preview/assets/runtime-CrNhb4dv.js +1 -0
  23. package/dist/preview/assets/runtime-DZuxXJrv.js +1 -0
  24. package/dist/preview/assets/{runtime-CXQuhSAX.js → runtime-DrxczhTW.js} +1 -1
  25. package/dist/preview/assets/{runtime-3rNI0KDH.js → runtime-KTenCV-J.js} +1 -1
  26. package/dist/preview/assets/runtime-iR16bMIx.js +1 -0
  27. package/dist/preview/assets/{runtime-CfVt6IWe.js → runtime-luMscNiE.js} +1 -1
  28. package/dist/preview/index.html +2 -2
  29. package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.markdown/config.d.vue.ts +2 -0
  30. package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.markdown/config.vue +27 -0
  31. package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.markdown/config.vue.d.ts +2 -0
  32. package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.markdown/runtime.d.vue.ts +2 -0
  33. package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.markdown/runtime.vue +18 -0
  34. package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.markdown/runtime.vue.d.ts +2 -0
  35. package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.markdown/schema.d.ts +2 -1
  36. package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.markdown/schema.js +10 -1
  37. package/dist/runtime/components/config/blocks/2026-05-17/com.shwfed.block.chart.xy/schema.d.ts +1 -1
  38. package/dist/runtime/components/config/blocks/2026-05-17/com.shwfed.block.chart.xy/schema.js +1 -1
  39. package/dist/runtime/components/config/blocks/2026-06-02/com.shwfed.block.card/badge.d.vue.ts +7 -0
  40. package/dist/runtime/components/config/blocks/2026-06-02/com.shwfed.block.card/badge.vue +91 -0
  41. package/dist/runtime/components/config/blocks/2026-06-02/com.shwfed.block.card/badge.vue.d.ts +7 -0
  42. package/dist/runtime/components/config/blocks/2026-06-02/com.shwfed.block.card/config.d.vue.ts +96 -0
  43. package/dist/runtime/components/config/blocks/2026-06-02/com.shwfed.block.card/config.vue +522 -0
  44. package/dist/runtime/components/config/blocks/2026-06-02/com.shwfed.block.card/config.vue.d.ts +96 -0
  45. package/dist/runtime/components/config/blocks/2026-06-02/com.shwfed.block.card/runtime.d.vue.ts +96 -0
  46. package/dist/runtime/components/config/blocks/2026-06-02/com.shwfed.block.card/runtime.vue +72 -0
  47. package/dist/runtime/components/config/blocks/2026-06-02/com.shwfed.block.card/runtime.vue.d.ts +96 -0
  48. package/dist/runtime/components/config/blocks/2026-06-02/com.shwfed.block.card/schema.d.ts +121 -0
  49. package/dist/runtime/components/config/blocks/2026-06-02/com.shwfed.block.card/schema.js +100 -0
  50. package/dist/runtime/components/config/blocks/2026-06-02/com.shwfed.block.icon/config.d.vue.ts +34 -0
  51. package/dist/runtime/components/config/blocks/2026-06-02/com.shwfed.block.icon/config.vue +153 -0
  52. package/dist/runtime/components/config/blocks/2026-06-02/com.shwfed.block.icon/config.vue.d.ts +34 -0
  53. package/dist/runtime/components/config/blocks/2026-06-02/com.shwfed.block.icon/runtime.d.vue.ts +34 -0
  54. package/dist/runtime/components/config/blocks/2026-06-02/com.shwfed.block.icon/runtime.vue +41 -0
  55. package/dist/runtime/components/config/blocks/2026-06-02/com.shwfed.block.icon/runtime.vue.d.ts +34 -0
  56. package/dist/runtime/components/config/blocks/2026-06-02/com.shwfed.block.icon/schema.d.ts +33 -0
  57. package/dist/runtime/components/config/blocks/2026-06-02/com.shwfed.block.icon/schema.js +45 -0
  58. package/dist/runtime/components/config/config.vue +135 -22
  59. package/dist/runtime/components/config/index.d.vue.ts +4 -0
  60. package/dist/runtime/components/config/index.vue +26 -2
  61. package/dist/runtime/components/config/index.vue.d.ts +4 -0
  62. package/dist/runtime/components/config/schema.d.ts +20 -0
  63. package/dist/runtime/components/config/schema.js +15 -1
  64. package/dist/runtime/components/form/config.vue +10 -18
  65. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.date/config.d.vue.ts +16 -16
  66. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.date/config.vue.d.ts +16 -16
  67. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/config.d.vue.ts +18 -18
  68. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/config.vue.d.ts +18 -18
  69. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetime/config.d.vue.ts +16 -16
  70. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetime/config.vue.d.ts +16 -16
  71. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/config.d.vue.ts +18 -18
  72. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/config.vue.d.ts +18 -18
  73. package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.month/config.d.vue.ts +16 -16
  74. package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.month/config.vue.d.ts +16 -16
  75. package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.monthrange/config.d.vue.ts +18 -18
  76. package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.monthrange/config.vue.d.ts +18 -18
  77. package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-remote/config.d.vue.ts +2 -2
  78. package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-remote/config.vue.d.ts +2 -2
  79. package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-static/config.d.vue.ts +2 -2
  80. package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-static/config.vue.d.ts +2 -2
  81. package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-remote/config.d.vue.ts +2 -2
  82. package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-remote/config.vue.d.ts +2 -2
  83. package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-static/config.d.vue.ts +2 -2
  84. package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-static/config.vue.d.ts +2 -2
  85. package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi.remote/config.d.vue.ts +2 -2
  86. package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi.remote/config.vue.d.ts +2 -2
  87. package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-single.remote/config.d.vue.ts +2 -2
  88. package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-single.remote/config.vue.d.ts +2 -2
  89. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-multi/config.d.vue.ts +2 -2
  90. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-multi/config.vue.d.ts +2 -2
  91. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-single/config.d.vue.ts +2 -2
  92. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-single/config.vue.d.ts +2 -2
  93. package/package.json +1 -1
  94. package/dist/preview/assets/config-B5FFtD0s.js +0 -1
  95. package/dist/preview/assets/config-BpWP2vu_.js +0 -1
  96. package/dist/preview/assets/config-C2OqUTNd.js +0 -1
  97. package/dist/preview/assets/config-D7cjMBeK.js +0 -1
  98. package/dist/preview/assets/config-DhORWTZC.js +0 -1
  99. package/dist/preview/assets/config-DuuYvFG_.js +0 -1
  100. package/dist/preview/assets/config-dpwN2-UY.js +0 -1
  101. package/dist/preview/assets/config-eP0EblYK.js +0 -1
  102. package/dist/preview/assets/config-hs_pZ5MM.js +0 -1
  103. package/dist/preview/assets/definition.vue_vue_type_script_setup_true_lang-B8-Uydoy.js +0 -1
  104. package/dist/preview/assets/index-BoGW90Pq.css +0 -1
  105. package/dist/preview/assets/index-CG261V86.js +0 -1
  106. package/dist/preview/assets/runtime-BOn8EwHL.js +0 -1
  107. package/dist/preview/assets/runtime-Bwr-rb58.js +0 -1
  108. package/dist/preview/assets/runtime-Ca79Fs6I.js +0 -1
  109. package/dist/preview/assets/runtime-Dd1GqYeP.js +0 -1
@@ -0,0 +1 @@
1
+ import{b1 as e}from"./index-CTZy_nrf.js";import{b2 as f,b3 as r,b4 as s}from"./index-CTZy_nrf.js";export{f as TableConfig,r as createTableConfig,e as default,s as getColumnTechnicalKey};
@@ -1 +1 @@
1
- import{d as H,v as et,x as it,a as nt,y as st,z as at,b as D,r as P,e as j,o as rt,A as ot,B as z,C as lt,w as ct,D as W,E as ht}from"./index-BGFrUxgg.js";const dt=String.raw,pt=(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0})(),ut=typeof CSS<"u"&&CSS.supports&&CSS.supports("line-height","mod(1,1)"),k=typeof matchMedia<"u"?matchMedia("(prefers-reduced-motion: reduce)"):null,C="--_number-flow-d-opacity",L="--_number-flow-d-width",S="--_number-flow-dx",V="--_number-flow-d",mt=(()=>{try{return CSS.registerProperty({name:C,syntax:"<number>",inherits:!1,initialValue:"0"}),CSS.registerProperty({name:S,syntax:"<length>",inherits:!0,initialValue:"0px"}),CSS.registerProperty({name:L,syntax:"<number>",inherits:!1,initialValue:"0"}),CSS.registerProperty({name:V,syntax:"<number>",inherits:!0,initialValue:"0"}),!0}catch{return!1}})(),U="round(nearest, calc(var(--number-flow-mask-height, 0.25em) / 2), 1px)",v=`calc(${U} * 2)`,M="var(--number-flow-mask-width, 0.5em)",y=`calc(${M} / var(--scale-x))`,$="#000 0, transparent 71%",ft=dt`:host{display:inline-block;direction:ltr;white-space:nowrap;isolation:isolate;line-height:1}.number,.number__inner{display:inline-block;transform-origin:left top}:host([data-will-change]) :is(.number,.number__inner,.section,.digit,.digit__num,.symbol){will-change:transform}.number{--scale-x:calc(1 + var(${L}) / var(--width));transform:translateX(var(${S})) scaleX(var(--scale-x));margin:0 calc(-1 * ${M});position:relative;-webkit-mask-image:linear-gradient(to right,transparent 0,#000 ${y},#000 calc(100% - ${y}),transparent ),linear-gradient(to bottom,transparent 0,#000 ${v},#000 calc(100% - ${v}),transparent 100% ),radial-gradient(at bottom right,${$}),radial-gradient(at bottom left,${$}),radial-gradient(at top left,${$}),radial-gradient(at top right,${$});-webkit-mask-size:100% calc(100% - ${v} * 2),calc(100% - ${y} * 2) 100%,${y} ${v},${y} ${v},${y} ${v},${y} ${v};-webkit-mask-position:center,center,top left,top right,bottom right,bottom left;-webkit-mask-repeat:no-repeat}.number__inner{padding:${U} ${M};transform:scaleX(calc(1 / var(--scale-x))) translateX(calc(-1 * var(${S})))}:host > :not(.number){z-index:5}.section,.symbol{display:inline-block;position:relative;isolation:isolate}.section::after{content:'\200b';display:inline-block}.section--justify-left{transform-origin:center left}.section--justify-right{transform-origin:center right}.section > [inert],.symbol > [inert]{margin:0 !important;position:absolute !important;z-index:-1}.digit{display:inline-block;position:relative;--c:var(--current) + var(${V})}.digit__num,.number .section::after{padding:${U} 0}.digit__num{display:inline-block;--offset-raw:mod(var(--length) + var(--n) - mod(var(--c),var(--length)),var(--length));--offset:calc( var(--offset-raw) - var(--length) * round(down,var(--offset-raw) / (var(--length) / 2),1) );--y:clamp(-100%,var(--offset) * 100%,100%);transform:translateY(var(--y))}.digit__num[inert]{position:absolute;top:0;left:50%;transform:translateX(-50%) translateY(var(--y))}.digit:not(.is-spinning) .digit__num[inert]{display:none}.symbol__value{display:inline-block;mix-blend-mode:plus-lighter;white-space:pre}.section--justify-left .symbol > [inert]{left:0}.section--justify-right .symbol > [inert]{right:0}.animate-presence{opacity:calc(1 + var(${C}))}`,gt=HTMLElement,vt=(s,t)=>s==null?t:t==null?s:Math.max(s,t),T=new WeakMap,jt={onUpdate(s,t,e){if(T.set(e,void 0),!e.computedTrend)return;const i=t.integer.concat(t.fraction).filter(o=>o.type==="integer"||o.type==="fraction"),n=s.integer.concat(s.fraction).filter(o=>o.type==="integer"||o.type==="fraction"),r=i.find(o=>!n.find(c=>c.pos===o.pos&&c.value===o.value)),a=n.find(o=>!i.find(c=>o.pos===c.pos&&o.value===c.value));T.set(e,vt(r?.pos,a?.pos))},getDelta(s,t,e){const i=s-t,n=T.get(e.flow);if(!i&&n!=null&&n>=e.pos)return e.length*e.flow.computedTrend}},g=(s,t,e)=>{const i=document.createElement(s),[n,r]=Array.isArray(t)?[void 0,t]:[t,e];return n&&Object.assign(i,n),r?.forEach(a=>i.appendChild(a)),i},yt=(s,t)=>{var e;return t==="left"?s.offsetLeft:(((e=s.offsetParent instanceof HTMLElement?s.offsetParent:null)==null?void 0:e.offsetWidth)??0)-s.offsetWidth-s.offsetLeft},wt=s=>s.offsetWidth>0&&s.offsetHeight>0,_t=(s,t)=>{!customElements.get(s)&&customElements.define(s,t)};function bt(s,t,{reverse:e=!1}={}){const i=s.length;for(let n=e?i-1:0;e?n>=0:n<i;e?n--:n++)t(s[n],n)}function $t(s,t,e,i){const n=t.formatToParts(s);e&&n.unshift({type:"prefix",value:e}),i&&n.push({type:"suffix",value:i});const r=[],a=[],o=[],c=[],l={},d=p=>`${p}:${l[p]=(l[p]??-1)+1}`;let m="",_=!1,b=!1;for(const p of n){m+=p.value;const h=p.type==="minusSign"||p.type==="plusSign"?"sign":p.type;h==="integer"?(_=!0,a.push(...p.value.split("").map(A=>({type:h,value:parseInt(A)})))):h==="group"?a.push({type:h,value:p.value}):h==="decimal"?(b=!0,o.push({type:h,value:p.value,key:d(h)})):h==="fraction"?o.push(...p.value.split("").map(A=>({type:h,value:parseInt(A),key:d(h),pos:-1-l[h]}))):(_||b?c:r).push({type:h,value:p.value,key:d(h)})}const F=[];for(let p=a.length-1;p>=0;p--){const h=a[p];F.unshift(h.type==="integer"?{...h,key:d(h.type),pos:l[h.type]}:{...h,key:d(h.type)})}return{pre:r,integer:F,fraction:o,post:c,valueAsString:m,value:typeof s=="string"?parseFloat(s):s}}const Y=ut&&pt&&mt;let u=class extends gt{constructor(){super(),this.created=!1,this.batched=!1;const{animated:t,...e}=this.constructor.defaultProps;this._animated=this.computedAnimated=t,Object.assign(this,e)}get animated(){return this._animated}set animated(t){var e;this.animated!==t&&(this._animated=t,(e=this.shadowRoot)==null||e.getAnimations().forEach(i=>i.finish()))}set data(t){var e,i;if(t==null)return;const{pre:n,integer:r,fraction:a,post:o,value:c}=t;if(this.created){const l=this._data;this._data=t,this.computedTrend=typeof this.trend=="function"?this.trend(l.value,c):this.trend,this.computedAnimated=Y&&this._animated&&(!this.respectMotionPreference||!((e=k)!=null&&e.matches))&&wt(this)&&this.ownerDocument.visibilityState==="visible",(i=this.plugins)==null||i.forEach(d=>{var m;return(m=d.onUpdate)==null?void 0:m.call(d,t,l,this)}),this.batched||this.willUpdate(),this._pre.update(n),this._num.update({integer:r,fraction:a}),this._post.update(o),this.batched||this.didUpdate()}else{this._data=t,this.attachShadow({mode:"open"});try{this._internals??(this._internals=this.attachInternals()),this._internals.role="img"}catch{}const l=document.createElement("style");this.nonce&&(l.nonce=this.nonce),l.textContent=ft,this.shadowRoot.appendChild(l),this._pre=new O(this,n,{justify:"right",part:"left"}),this.shadowRoot.appendChild(this._pre.el),this._num=new xt(this,r,a),this.shadowRoot.appendChild(this._num.el),this._post=new O(this,o,{justify:"left",part:"right"}),this.shadowRoot.appendChild(this._post.el),this.created=!0}try{this._internals.ariaLabel=t.valueAsString}catch{}}willUpdate(){this._pre.willUpdate(),this._num.willUpdate(),this._post.willUpdate()}didUpdate(){if(!this.computedAnimated)return;this._abortAnimationsFinish?this._abortAnimationsFinish.abort():this.dispatchEvent(new Event("animationsstart")),this._pre.didUpdate(),this._num.didUpdate(),this._post.didUpdate();const t=new AbortController;Promise.all(this.shadowRoot.getAnimations().map(e=>e.finished)).then(()=>{t.signal.aborted||(this.dispatchEvent(new Event("animationsfinish")),this._abortAnimationsFinish=void 0)}),this._abortAnimationsFinish=t}};u.defaultProps={transformTiming:{duration:900,easing:"linear(0,.005,.019,.039,.066,.096,.129,.165,.202,.24,.278,.316,.354,.39,.426,.461,.494,.526,.557,.586,.614,.64,.665,.689,.711,.731,.751,.769,.786,.802,.817,.831,.844,.856,.867,.877,.887,.896,.904,.912,.919,.925,.931,.937,.942,.947,.951,.955,.959,.962,.965,.968,.971,.973,.976,.978,.98,.981,.983,.984,.986,.987,.988,.989,.99,.991,.992,.992,.993,.994,.994,.995,.995,.996,.996,.9963,.9967,.9969,.9972,.9975,.9977,.9979,.9981,.9982,.9984,.9985,.9987,.9988,.9989,1)"},spinTiming:void 0,opacityTiming:{duration:450,easing:"ease-out"},animated:!0,trend:(s,t)=>Math.sign(t-s),respectMotionPreference:!0,plugins:void 0,digits:void 0};class xt{constructor(t,e,i,{className:n,...r}={}){this.flow=t,this._integer=new I(t,e,{justify:"right",part:"integer"}),this._fraction=new I(t,i,{justify:"left",part:"fraction"}),this._inner=g("span",{className:"number__inner"},[this._integer.el,this._fraction.el]),this.el=g("span",{...r,part:"number",className:`number ${n??""}`},[this._inner])}willUpdate(){this._prevWidth=this.el.offsetWidth,this._prevLeft=this.el.getBoundingClientRect().left,this._integer.willUpdate(),this._fraction.willUpdate()}update({integer:t,fraction:e}){this._integer.update(t),this._fraction.update(e)}didUpdate(){const t=this.el.getBoundingClientRect();this._integer.didUpdate(),this._fraction.didUpdate();const e=this._prevLeft-t.left,i=this.el.offsetWidth,n=this._prevWidth-i;this.el.style.setProperty("--width",String(i)),this.el.animate({[S]:[`${e}px`,"0px"],[L]:[n,0]},{...this.flow.transformTiming,composite:"accumulate"})}}let G=class{constructor(t,e,{justify:i,className:n,...r},a){this.flow=t,this.children=new Map,this.onCharRemove=c=>()=>{this.children.delete(c)},this.justify=i;const o=e.map(c=>this.addChar(c).el);this.el=g("span",{...r,className:`section section--justify-${i} ${n??""}`},a?a(o):o)}addChar(t,{startDigitsAtZero:e=!1,...i}={}){const n=t.type==="integer"||t.type==="fraction"?new q(this,t.type,e?0:t.value,t.pos,{...i,onRemove:this.onCharRemove(t.key)}):new kt(this,t.type,t.value,{...i,onRemove:this.onCharRemove(t.key)});return this.children.set(t.key,n),n}unpop(t){t.el.removeAttribute("inert"),t.el.style.top="",t.el.style[this.justify]=""}pop(t){t.forEach(e=>{e.el.style.top=`${e.el.offsetTop}px`,e.el.style[this.justify]=`${yt(e.el,this.justify)}px`}),t.forEach(e=>{e.el.setAttribute("inert",""),e.present=!1})}addNewAndUpdateExisting(t){const e=new Map,i=new Map,n=this.justify==="left",r=n?"prepend":"append";if(bt(t,a=>{let o;this.children.has(a.key)?(o=this.children.get(a.key),i.set(a,o),this.unpop(o),o.present=!0):(o=this.addChar(a,{startDigitsAtZero:!0,animateIn:!0}),e.set(a,o)),this.el[r](o.el)},{reverse:n}),this.flow.computedAnimated){const a=this.el.getBoundingClientRect();e.forEach(o=>{o.willUpdate(a)})}e.forEach((a,o)=>{a.update(o.value)}),i.forEach((a,o)=>{a.update(o.value)})}willUpdate(){const t=this.el.getBoundingClientRect();this._prevOffset=t[this.justify],this.children.forEach(e=>e.willUpdate(t))}didUpdate(){const t=this.el.getBoundingClientRect();this.children.forEach(n=>n.didUpdate(t));const e=t[this.justify],i=this._prevOffset-e;i&&this.children.size&&this.el.animate({transform:[`translateX(${i}px)`,"none"]},{...this.flow.transformTiming,composite:"accumulate"})}};class I extends G{update(t){const e=new Map;this.children.forEach((i,n)=>{t.find(r=>r.key===n)||e.set(n,i),this.unpop(i)}),this.addNewAndUpdateExisting(t),e.forEach(i=>{i instanceof q&&i.update(0)}),this.pop(e)}}class O extends G{update(t){const e=new Map;this.children.forEach((i,n)=>{t.find(r=>r.key===n)||e.set(n,i)}),this.pop(e),this.addNewAndUpdateExisting(t)}}class R{constructor(t,e,{onRemove:i,animateIn:n=!1}={}){this.flow=t,this.el=e,this._present=!0,this._remove=()=>{var r;this.el.remove(),(r=this._onRemove)==null||r.call(this)},this.el.classList.add("animate-presence"),this.flow.computedAnimated&&n&&this.el.animate({[C]:[-.9999,0]},{...this.flow.opacityTiming,composite:"accumulate"}),this._onRemove=i}get present(){return this._present}set present(t){if(this._present!==t){if(this._present=t,t?this.el.removeAttribute("inert"):this.el.setAttribute("inert",""),!this.flow.computedAnimated){t||this._remove();return}this.el.style.setProperty("--_number-flow-d-opacity",t?"0":"-.999"),this.el.animate({[C]:t?[-.9999,0]:[.999,0]},{...this.flow.opacityTiming,composite:"accumulate"}),t?this.flow.removeEventListener("animationsfinish",this._remove):this.flow.addEventListener("animationsfinish",this._remove,{once:!0})}}}class Z extends R{constructor(t,e,i,n){super(t.flow,i,n),this.section=t,this.value=e,this.el=i}}class q extends Z{constructor(t,e,i,n,r){var a,o;const c=(((o=(a=t.flow.digits)==null?void 0:a[n])==null?void 0:o.max)??9)+1,l=Array.from({length:c}).map((m,_)=>{const b=g("span",{className:"digit__num"},[document.createTextNode(String(_))]);return _!==i&&b.setAttribute("inert",""),b.style.setProperty("--n",String(_)),b}),d=g("span",{part:`digit ${e}-digit`,className:"digit"},l);d.style.setProperty("--current",String(i)),d.style.setProperty("--length",String(c)),super(t,i,d,r),this.pos=n,this._onAnimationsFinish=()=>{this.el.classList.remove("is-spinning")},this._numbers=l,this.length=c}willUpdate(t){const e=this.el.getBoundingClientRect();this._prevValue=this.value;const i=e[this.section.justify]-t[this.section.justify],n=e.width/2;this._prevCenter=this.section.justify==="left"?i+n:i-n}update(t){this.el.style.setProperty("--current",String(t)),this._numbers.forEach((e,i)=>i===t?e.removeAttribute("inert"):e.setAttribute("inert","")),this.value=t}didUpdate(t){const e=this.el.getBoundingClientRect(),i=e[this.section.justify]-t[this.section.justify],n=e.width/2,r=this.section.justify==="left"?i+n:i-n,a=this._prevCenter-r;a&&this.el.animate({transform:[`translateX(${a}px)`,"none"]},{...this.flow.transformTiming,composite:"accumulate"});const o=this.getDelta();o&&(this.el.classList.add("is-spinning"),this.el.animate({[V]:[-o,0]},{...this.flow.spinTiming??this.flow.transformTiming,composite:"accumulate"}),this.flow.addEventListener("animationsfinish",this._onAnimationsFinish,{once:!0}))}getDelta(){var t;if(this.flow.plugins)for(const n of this.flow.plugins){const r=(t=n.getDelta)==null?void 0:t.call(n,this.value,this._prevValue,this);if(r!=null)return r}const e=this.value-this._prevValue,i=this.flow.computedTrend||Math.sign(e);return i<0&&this.value>this._prevValue?this.value-this.length-this._prevValue:i>0&&this.value<this._prevValue?this.length-this._prevValue+this.value:e}}class kt extends Z{constructor(t,e,i,n){const r=g("span",{className:"symbol__value",textContent:i});super(t,i,g("span",{part:`symbol ${e}`,className:"symbol"},[r]),n),this.type=e,this._children=new Map,this._onChildRemove=a=>()=>{this._children.delete(a)},this._children.set(i,new R(this.flow,r,{onRemove:this._onChildRemove(i)}))}willUpdate(t){if(this.type==="decimal")return;const e=this.el.getBoundingClientRect();this._prevOffset=e[this.section.justify]-t[this.section.justify]}update(t){if(this.value!==t){const e=this._children.get(this.value);e&&(e.present=!1);const i=this._children.get(t);if(i)i.present=!0;else{const n=g("span",{className:"symbol__value",textContent:t});this.el.appendChild(n),this._children.set(t,new R(this.flow,n,{animateIn:!0,onRemove:this._onChildRemove(t)}))}}this.value=t}didUpdate(t){if(this.type==="decimal")return;const e=this.el.getBoundingClientRect()[this.section.justify]-t[this.section.justify],i=this._prevOffset-e;i&&this.el.animate({transform:[`translateX(${i}px)`,"none"]},{...this.flow.transformTiming,composite:"accumulate"})}}const X=String.raw;(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0})();typeof CSS<"u"&&CSS.supports&&CSS.supports("line-height","mod(1,1)");typeof matchMedia<"u"&&matchMedia("(prefers-reduced-motion: reduce)");const J="--_number-flow-d-opacity",K="--_number-flow-d-width",N="--_number-flow-dx",Q="--_number-flow-d";(()=>{try{return CSS.registerProperty({name:J,syntax:"<number>",inherits:!1,initialValue:"0"}),CSS.registerProperty({name:N,syntax:"<length>",inherits:!0,initialValue:"0px"}),CSS.registerProperty({name:K,syntax:"<number>",inherits:!1,initialValue:"0"}),CSS.registerProperty({name:Q,syntax:"<number>",inherits:!0,initialValue:"0"}),!0}catch{return!1}})();const E="round(nearest, calc(var(--number-flow-mask-height, 0.25em) / 2), 1px)",f=`calc(${E} * 2)`,B="var(--number-flow-mask-width, 0.5em)",w=`calc(${B} / var(--scale-x))`,x="#000 0, transparent 71%",Ct=X`:host{display:inline-block;direction:ltr;white-space:nowrap;isolation:isolate;line-height:1}.number,.number__inner{display:inline-block;transform-origin:left top}:host([data-will-change]) :is(.number,.number__inner,.section,.digit,.digit__num,.symbol){will-change:transform}.number{--scale-x:calc(1 + var(${K}) / var(--width));transform:translateX(var(${N})) scaleX(var(--scale-x));margin:0 calc(-1 * ${B});position:relative;-webkit-mask-image:linear-gradient(to right,transparent 0,#000 ${w},#000 calc(100% - ${w}),transparent ),linear-gradient(to bottom,transparent 0,#000 ${f},#000 calc(100% - ${f}),transparent 100% ),radial-gradient(at bottom right,${x}),radial-gradient(at bottom left,${x}),radial-gradient(at top left,${x}),radial-gradient(at top right,${x});-webkit-mask-size:100% calc(100% - ${f} * 2),calc(100% - ${w} * 2) 100%,${w} ${f},${w} ${f},${w} ${f},${w} ${f};-webkit-mask-position:center,center,top left,top right,bottom right,bottom left;-webkit-mask-repeat:no-repeat}.number__inner{padding:${E} ${B};transform:scaleX(calc(1 / var(--scale-x))) translateX(calc(-1 * var(${N})))}:host > :not(.number){z-index:5}.section,.symbol{display:inline-block;position:relative;isolation:isolate}.section::after{content:'\200b';display:inline-block}.section--justify-left{transform-origin:center left}.section--justify-right{transform-origin:center right}.section > [inert],.symbol > [inert]{margin:0 !important;position:absolute !important;z-index:-1}.digit{display:inline-block;position:relative;--c:var(--current) + var(${Q})}.digit__num,.number .section::after{padding:${E} 0}.digit__num{display:inline-block;--offset-raw:mod(var(--length) + var(--n) - mod(var(--c),var(--length)),var(--length));--offset:calc( var(--offset-raw) - var(--length) * round(down,var(--offset-raw) / (var(--length) / 2),1) );--y:clamp(-100%,var(--offset) * 100%,100%);transform:translateY(var(--y))}.digit__num[inert]{position:absolute;top:0;left:50%;transform:translateX(-50%) translateY(var(--y))}.digit:not(.is-spinning) .digit__num[inert]{display:none}.symbol__value{display:inline-block;mix-blend-mode:plus-lighter;white-space:pre}.section--justify-left .symbol > [inert]{left:0}.section--justify-right .symbol > [inert]{right:0}.animate-presence{opacity:calc(1 + var(${J}))}`,St=X`:host{display:inline-block;direction:ltr;white-space:nowrap;line-height:1}span{display:inline-block}:host([data-will-change]) span{will-change:transform}.number,.digit{padding:${E} 0}.symbol{white-space:pre}`,Et=(s="")=>X`:where(number-flow${s}){line-height:1}number-flow${s} > span{font-kerning:none;display:inline-block;padding:${f} 0}`,At=s=>[St,Et(s),Ct],tt=Symbol(),Rt=H({__name:"NumberFlowGroup",setup(s){const t=new Set;let e=!1;return lt(tt,(i,n)=>{t.add(i),ct(n,async()=>{e||(e=!0,t.forEach(async r=>{var a;!r.value||!r.value.created||(r.value.willUpdate(),await W(),(a=r.value)==null||a.didUpdate())}),await W(),e=!1)}),ht(()=>{t.delete(i)})}),(i,n)=>et(i.$slots,"default")}}),Tt=["batched","trend","plugins","animated","transformTiming","spinTiming","opacityTiming","respectMotionPreference","nonce","data-will-change","digits","innerHTML","data"],Nt=H({inheritAttrs:!1,__name:"index",props:{transformTiming:{default:()=>u.defaultProps.transformTiming},spinTiming:{default:()=>u.defaultProps.spinTiming},opacityTiming:{default:()=>u.defaultProps.opacityTiming},animated:{type:Boolean,default:()=>u.defaultProps.animated},respectMotionPreference:{type:Boolean,default:()=>u.defaultProps.respectMotionPreference},trend:{type:[Number,Function],default:()=>u.defaultProps.trend},plugins:{default:()=>u.defaultProps.plugins},digits:{default:()=>u.defaultProps.digits},locales:{},format:{},value:{},prefix:{},suffix:{},nonce:{},willChange:{type:Boolean,default:!1}},emits:["animationsstart","animationsfinish"],setup(s,{expose:t,emit:e}){const i=P();t({el:i});const n=e,r=j(()=>new Intl.NumberFormat(s.locales,s.format)),a=j(()=>$t(s.value,r.value,s.prefix,s.suffix)),o=void 0,c=it(tt,void 0);return c?.(i,a),(l,d)=>(nt(),st("number-flow-vue",at({ref_key:"el",ref:i},l.$attrs,{batched:!!D(c),trend:l.trend,plugins:l.plugins,animated:l.animated,transformTiming:l.transformTiming,spinTiming:l.spinTiming,opacityTiming:l.opacityTiming,respectMotionPreference:l.respectMotionPreference,nonce:l.nonce,"data-will-change":l.willChange?"":void 0,digits:l.digits,innerHTML:D(o),"data-allow-mismatch":"",onAnimationsstart:d[0]||(d[0]=m=>n("animationsstart")),onAnimationsfinish:d[1]||(d[1]=m=>n("animationsfinish")),data:a.value}),null,16,Tt))}}),Bt=At("-vue");_t("number-flow-vue",u);function Lt({respectMotionPreference:s=!0}={}){const t=P(!1),e=P(!1);return rt(()=>{var i;t.value=Y,e.value=((i=k)==null?void 0:i.matches)??!1}),ot(i=>{var n;if(!z(s))return;const r=({matches:a})=>{e.value=a};(n=k)==null||n.addEventListener("change",r),i(()=>{var a;(a=k)==null||a.removeEventListener("change",r)})}),j(()=>t.value&&(!z(s)||!e.value))}export{u as NumberFlowElement,Rt as NumberFlowGroup,jt as continuous,Nt as default,Bt as styles,Lt as useCanAnimate};
1
+ import{d as H,v as et,x as it,a as nt,y as st,z as at,b as D,r as P,e as j,o as rt,A as ot,B as z,C as lt,w as ct,D as W,E as ht}from"./index-CTZy_nrf.js";const dt=String.raw,pt=(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0})(),ut=typeof CSS<"u"&&CSS.supports&&CSS.supports("line-height","mod(1,1)"),k=typeof matchMedia<"u"?matchMedia("(prefers-reduced-motion: reduce)"):null,C="--_number-flow-d-opacity",L="--_number-flow-d-width",S="--_number-flow-dx",V="--_number-flow-d",mt=(()=>{try{return CSS.registerProperty({name:C,syntax:"<number>",inherits:!1,initialValue:"0"}),CSS.registerProperty({name:S,syntax:"<length>",inherits:!0,initialValue:"0px"}),CSS.registerProperty({name:L,syntax:"<number>",inherits:!1,initialValue:"0"}),CSS.registerProperty({name:V,syntax:"<number>",inherits:!0,initialValue:"0"}),!0}catch{return!1}})(),U="round(nearest, calc(var(--number-flow-mask-height, 0.25em) / 2), 1px)",v=`calc(${U} * 2)`,M="var(--number-flow-mask-width, 0.5em)",y=`calc(${M} / var(--scale-x))`,$="#000 0, transparent 71%",ft=dt`:host{display:inline-block;direction:ltr;white-space:nowrap;isolation:isolate;line-height:1}.number,.number__inner{display:inline-block;transform-origin:left top}:host([data-will-change]) :is(.number,.number__inner,.section,.digit,.digit__num,.symbol){will-change:transform}.number{--scale-x:calc(1 + var(${L}) / var(--width));transform:translateX(var(${S})) scaleX(var(--scale-x));margin:0 calc(-1 * ${M});position:relative;-webkit-mask-image:linear-gradient(to right,transparent 0,#000 ${y},#000 calc(100% - ${y}),transparent ),linear-gradient(to bottom,transparent 0,#000 ${v},#000 calc(100% - ${v}),transparent 100% ),radial-gradient(at bottom right,${$}),radial-gradient(at bottom left,${$}),radial-gradient(at top left,${$}),radial-gradient(at top right,${$});-webkit-mask-size:100% calc(100% - ${v} * 2),calc(100% - ${y} * 2) 100%,${y} ${v},${y} ${v},${y} ${v},${y} ${v};-webkit-mask-position:center,center,top left,top right,bottom right,bottom left;-webkit-mask-repeat:no-repeat}.number__inner{padding:${U} ${M};transform:scaleX(calc(1 / var(--scale-x))) translateX(calc(-1 * var(${S})))}:host > :not(.number){z-index:5}.section,.symbol{display:inline-block;position:relative;isolation:isolate}.section::after{content:'\200b';display:inline-block}.section--justify-left{transform-origin:center left}.section--justify-right{transform-origin:center right}.section > [inert],.symbol > [inert]{margin:0 !important;position:absolute !important;z-index:-1}.digit{display:inline-block;position:relative;--c:var(--current) + var(${V})}.digit__num,.number .section::after{padding:${U} 0}.digit__num{display:inline-block;--offset-raw:mod(var(--length) + var(--n) - mod(var(--c),var(--length)),var(--length));--offset:calc( var(--offset-raw) - var(--length) * round(down,var(--offset-raw) / (var(--length) / 2),1) );--y:clamp(-100%,var(--offset) * 100%,100%);transform:translateY(var(--y))}.digit__num[inert]{position:absolute;top:0;left:50%;transform:translateX(-50%) translateY(var(--y))}.digit:not(.is-spinning) .digit__num[inert]{display:none}.symbol__value{display:inline-block;mix-blend-mode:plus-lighter;white-space:pre}.section--justify-left .symbol > [inert]{left:0}.section--justify-right .symbol > [inert]{right:0}.animate-presence{opacity:calc(1 + var(${C}))}`,gt=HTMLElement,vt=(s,t)=>s==null?t:t==null?s:Math.max(s,t),T=new WeakMap,jt={onUpdate(s,t,e){if(T.set(e,void 0),!e.computedTrend)return;const i=t.integer.concat(t.fraction).filter(o=>o.type==="integer"||o.type==="fraction"),n=s.integer.concat(s.fraction).filter(o=>o.type==="integer"||o.type==="fraction"),r=i.find(o=>!n.find(c=>c.pos===o.pos&&c.value===o.value)),a=n.find(o=>!i.find(c=>o.pos===c.pos&&o.value===c.value));T.set(e,vt(r?.pos,a?.pos))},getDelta(s,t,e){const i=s-t,n=T.get(e.flow);if(!i&&n!=null&&n>=e.pos)return e.length*e.flow.computedTrend}},g=(s,t,e)=>{const i=document.createElement(s),[n,r]=Array.isArray(t)?[void 0,t]:[t,e];return n&&Object.assign(i,n),r?.forEach(a=>i.appendChild(a)),i},yt=(s,t)=>{var e;return t==="left"?s.offsetLeft:(((e=s.offsetParent instanceof HTMLElement?s.offsetParent:null)==null?void 0:e.offsetWidth)??0)-s.offsetWidth-s.offsetLeft},wt=s=>s.offsetWidth>0&&s.offsetHeight>0,_t=(s,t)=>{!customElements.get(s)&&customElements.define(s,t)};function bt(s,t,{reverse:e=!1}={}){const i=s.length;for(let n=e?i-1:0;e?n>=0:n<i;e?n--:n++)t(s[n],n)}function $t(s,t,e,i){const n=t.formatToParts(s);e&&n.unshift({type:"prefix",value:e}),i&&n.push({type:"suffix",value:i});const r=[],a=[],o=[],c=[],l={},d=p=>`${p}:${l[p]=(l[p]??-1)+1}`;let m="",_=!1,b=!1;for(const p of n){m+=p.value;const h=p.type==="minusSign"||p.type==="plusSign"?"sign":p.type;h==="integer"?(_=!0,a.push(...p.value.split("").map(A=>({type:h,value:parseInt(A)})))):h==="group"?a.push({type:h,value:p.value}):h==="decimal"?(b=!0,o.push({type:h,value:p.value,key:d(h)})):h==="fraction"?o.push(...p.value.split("").map(A=>({type:h,value:parseInt(A),key:d(h),pos:-1-l[h]}))):(_||b?c:r).push({type:h,value:p.value,key:d(h)})}const F=[];for(let p=a.length-1;p>=0;p--){const h=a[p];F.unshift(h.type==="integer"?{...h,key:d(h.type),pos:l[h.type]}:{...h,key:d(h.type)})}return{pre:r,integer:F,fraction:o,post:c,valueAsString:m,value:typeof s=="string"?parseFloat(s):s}}const Y=ut&&pt&&mt;let u=class extends gt{constructor(){super(),this.created=!1,this.batched=!1;const{animated:t,...e}=this.constructor.defaultProps;this._animated=this.computedAnimated=t,Object.assign(this,e)}get animated(){return this._animated}set animated(t){var e;this.animated!==t&&(this._animated=t,(e=this.shadowRoot)==null||e.getAnimations().forEach(i=>i.finish()))}set data(t){var e,i;if(t==null)return;const{pre:n,integer:r,fraction:a,post:o,value:c}=t;if(this.created){const l=this._data;this._data=t,this.computedTrend=typeof this.trend=="function"?this.trend(l.value,c):this.trend,this.computedAnimated=Y&&this._animated&&(!this.respectMotionPreference||!((e=k)!=null&&e.matches))&&wt(this)&&this.ownerDocument.visibilityState==="visible",(i=this.plugins)==null||i.forEach(d=>{var m;return(m=d.onUpdate)==null?void 0:m.call(d,t,l,this)}),this.batched||this.willUpdate(),this._pre.update(n),this._num.update({integer:r,fraction:a}),this._post.update(o),this.batched||this.didUpdate()}else{this._data=t,this.attachShadow({mode:"open"});try{this._internals??(this._internals=this.attachInternals()),this._internals.role="img"}catch{}const l=document.createElement("style");this.nonce&&(l.nonce=this.nonce),l.textContent=ft,this.shadowRoot.appendChild(l),this._pre=new O(this,n,{justify:"right",part:"left"}),this.shadowRoot.appendChild(this._pre.el),this._num=new xt(this,r,a),this.shadowRoot.appendChild(this._num.el),this._post=new O(this,o,{justify:"left",part:"right"}),this.shadowRoot.appendChild(this._post.el),this.created=!0}try{this._internals.ariaLabel=t.valueAsString}catch{}}willUpdate(){this._pre.willUpdate(),this._num.willUpdate(),this._post.willUpdate()}didUpdate(){if(!this.computedAnimated)return;this._abortAnimationsFinish?this._abortAnimationsFinish.abort():this.dispatchEvent(new Event("animationsstart")),this._pre.didUpdate(),this._num.didUpdate(),this._post.didUpdate();const t=new AbortController;Promise.all(this.shadowRoot.getAnimations().map(e=>e.finished)).then(()=>{t.signal.aborted||(this.dispatchEvent(new Event("animationsfinish")),this._abortAnimationsFinish=void 0)}),this._abortAnimationsFinish=t}};u.defaultProps={transformTiming:{duration:900,easing:"linear(0,.005,.019,.039,.066,.096,.129,.165,.202,.24,.278,.316,.354,.39,.426,.461,.494,.526,.557,.586,.614,.64,.665,.689,.711,.731,.751,.769,.786,.802,.817,.831,.844,.856,.867,.877,.887,.896,.904,.912,.919,.925,.931,.937,.942,.947,.951,.955,.959,.962,.965,.968,.971,.973,.976,.978,.98,.981,.983,.984,.986,.987,.988,.989,.99,.991,.992,.992,.993,.994,.994,.995,.995,.996,.996,.9963,.9967,.9969,.9972,.9975,.9977,.9979,.9981,.9982,.9984,.9985,.9987,.9988,.9989,1)"},spinTiming:void 0,opacityTiming:{duration:450,easing:"ease-out"},animated:!0,trend:(s,t)=>Math.sign(t-s),respectMotionPreference:!0,plugins:void 0,digits:void 0};class xt{constructor(t,e,i,{className:n,...r}={}){this.flow=t,this._integer=new I(t,e,{justify:"right",part:"integer"}),this._fraction=new I(t,i,{justify:"left",part:"fraction"}),this._inner=g("span",{className:"number__inner"},[this._integer.el,this._fraction.el]),this.el=g("span",{...r,part:"number",className:`number ${n??""}`},[this._inner])}willUpdate(){this._prevWidth=this.el.offsetWidth,this._prevLeft=this.el.getBoundingClientRect().left,this._integer.willUpdate(),this._fraction.willUpdate()}update({integer:t,fraction:e}){this._integer.update(t),this._fraction.update(e)}didUpdate(){const t=this.el.getBoundingClientRect();this._integer.didUpdate(),this._fraction.didUpdate();const e=this._prevLeft-t.left,i=this.el.offsetWidth,n=this._prevWidth-i;this.el.style.setProperty("--width",String(i)),this.el.animate({[S]:[`${e}px`,"0px"],[L]:[n,0]},{...this.flow.transformTiming,composite:"accumulate"})}}let G=class{constructor(t,e,{justify:i,className:n,...r},a){this.flow=t,this.children=new Map,this.onCharRemove=c=>()=>{this.children.delete(c)},this.justify=i;const o=e.map(c=>this.addChar(c).el);this.el=g("span",{...r,className:`section section--justify-${i} ${n??""}`},a?a(o):o)}addChar(t,{startDigitsAtZero:e=!1,...i}={}){const n=t.type==="integer"||t.type==="fraction"?new q(this,t.type,e?0:t.value,t.pos,{...i,onRemove:this.onCharRemove(t.key)}):new kt(this,t.type,t.value,{...i,onRemove:this.onCharRemove(t.key)});return this.children.set(t.key,n),n}unpop(t){t.el.removeAttribute("inert"),t.el.style.top="",t.el.style[this.justify]=""}pop(t){t.forEach(e=>{e.el.style.top=`${e.el.offsetTop}px`,e.el.style[this.justify]=`${yt(e.el,this.justify)}px`}),t.forEach(e=>{e.el.setAttribute("inert",""),e.present=!1})}addNewAndUpdateExisting(t){const e=new Map,i=new Map,n=this.justify==="left",r=n?"prepend":"append";if(bt(t,a=>{let o;this.children.has(a.key)?(o=this.children.get(a.key),i.set(a,o),this.unpop(o),o.present=!0):(o=this.addChar(a,{startDigitsAtZero:!0,animateIn:!0}),e.set(a,o)),this.el[r](o.el)},{reverse:n}),this.flow.computedAnimated){const a=this.el.getBoundingClientRect();e.forEach(o=>{o.willUpdate(a)})}e.forEach((a,o)=>{a.update(o.value)}),i.forEach((a,o)=>{a.update(o.value)})}willUpdate(){const t=this.el.getBoundingClientRect();this._prevOffset=t[this.justify],this.children.forEach(e=>e.willUpdate(t))}didUpdate(){const t=this.el.getBoundingClientRect();this.children.forEach(n=>n.didUpdate(t));const e=t[this.justify],i=this._prevOffset-e;i&&this.children.size&&this.el.animate({transform:[`translateX(${i}px)`,"none"]},{...this.flow.transformTiming,composite:"accumulate"})}};class I extends G{update(t){const e=new Map;this.children.forEach((i,n)=>{t.find(r=>r.key===n)||e.set(n,i),this.unpop(i)}),this.addNewAndUpdateExisting(t),e.forEach(i=>{i instanceof q&&i.update(0)}),this.pop(e)}}class O extends G{update(t){const e=new Map;this.children.forEach((i,n)=>{t.find(r=>r.key===n)||e.set(n,i)}),this.pop(e),this.addNewAndUpdateExisting(t)}}class R{constructor(t,e,{onRemove:i,animateIn:n=!1}={}){this.flow=t,this.el=e,this._present=!0,this._remove=()=>{var r;this.el.remove(),(r=this._onRemove)==null||r.call(this)},this.el.classList.add("animate-presence"),this.flow.computedAnimated&&n&&this.el.animate({[C]:[-.9999,0]},{...this.flow.opacityTiming,composite:"accumulate"}),this._onRemove=i}get present(){return this._present}set present(t){if(this._present!==t){if(this._present=t,t?this.el.removeAttribute("inert"):this.el.setAttribute("inert",""),!this.flow.computedAnimated){t||this._remove();return}this.el.style.setProperty("--_number-flow-d-opacity",t?"0":"-.999"),this.el.animate({[C]:t?[-.9999,0]:[.999,0]},{...this.flow.opacityTiming,composite:"accumulate"}),t?this.flow.removeEventListener("animationsfinish",this._remove):this.flow.addEventListener("animationsfinish",this._remove,{once:!0})}}}class Z extends R{constructor(t,e,i,n){super(t.flow,i,n),this.section=t,this.value=e,this.el=i}}class q extends Z{constructor(t,e,i,n,r){var a,o;const c=(((o=(a=t.flow.digits)==null?void 0:a[n])==null?void 0:o.max)??9)+1,l=Array.from({length:c}).map((m,_)=>{const b=g("span",{className:"digit__num"},[document.createTextNode(String(_))]);return _!==i&&b.setAttribute("inert",""),b.style.setProperty("--n",String(_)),b}),d=g("span",{part:`digit ${e}-digit`,className:"digit"},l);d.style.setProperty("--current",String(i)),d.style.setProperty("--length",String(c)),super(t,i,d,r),this.pos=n,this._onAnimationsFinish=()=>{this.el.classList.remove("is-spinning")},this._numbers=l,this.length=c}willUpdate(t){const e=this.el.getBoundingClientRect();this._prevValue=this.value;const i=e[this.section.justify]-t[this.section.justify],n=e.width/2;this._prevCenter=this.section.justify==="left"?i+n:i-n}update(t){this.el.style.setProperty("--current",String(t)),this._numbers.forEach((e,i)=>i===t?e.removeAttribute("inert"):e.setAttribute("inert","")),this.value=t}didUpdate(t){const e=this.el.getBoundingClientRect(),i=e[this.section.justify]-t[this.section.justify],n=e.width/2,r=this.section.justify==="left"?i+n:i-n,a=this._prevCenter-r;a&&this.el.animate({transform:[`translateX(${a}px)`,"none"]},{...this.flow.transformTiming,composite:"accumulate"});const o=this.getDelta();o&&(this.el.classList.add("is-spinning"),this.el.animate({[V]:[-o,0]},{...this.flow.spinTiming??this.flow.transformTiming,composite:"accumulate"}),this.flow.addEventListener("animationsfinish",this._onAnimationsFinish,{once:!0}))}getDelta(){var t;if(this.flow.plugins)for(const n of this.flow.plugins){const r=(t=n.getDelta)==null?void 0:t.call(n,this.value,this._prevValue,this);if(r!=null)return r}const e=this.value-this._prevValue,i=this.flow.computedTrend||Math.sign(e);return i<0&&this.value>this._prevValue?this.value-this.length-this._prevValue:i>0&&this.value<this._prevValue?this.length-this._prevValue+this.value:e}}class kt extends Z{constructor(t,e,i,n){const r=g("span",{className:"symbol__value",textContent:i});super(t,i,g("span",{part:`symbol ${e}`,className:"symbol"},[r]),n),this.type=e,this._children=new Map,this._onChildRemove=a=>()=>{this._children.delete(a)},this._children.set(i,new R(this.flow,r,{onRemove:this._onChildRemove(i)}))}willUpdate(t){if(this.type==="decimal")return;const e=this.el.getBoundingClientRect();this._prevOffset=e[this.section.justify]-t[this.section.justify]}update(t){if(this.value!==t){const e=this._children.get(this.value);e&&(e.present=!1);const i=this._children.get(t);if(i)i.present=!0;else{const n=g("span",{className:"symbol__value",textContent:t});this.el.appendChild(n),this._children.set(t,new R(this.flow,n,{animateIn:!0,onRemove:this._onChildRemove(t)}))}}this.value=t}didUpdate(t){if(this.type==="decimal")return;const e=this.el.getBoundingClientRect()[this.section.justify]-t[this.section.justify],i=this._prevOffset-e;i&&this.el.animate({transform:[`translateX(${i}px)`,"none"]},{...this.flow.transformTiming,composite:"accumulate"})}}const X=String.raw;(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0})();typeof CSS<"u"&&CSS.supports&&CSS.supports("line-height","mod(1,1)");typeof matchMedia<"u"&&matchMedia("(prefers-reduced-motion: reduce)");const J="--_number-flow-d-opacity",K="--_number-flow-d-width",N="--_number-flow-dx",Q="--_number-flow-d";(()=>{try{return CSS.registerProperty({name:J,syntax:"<number>",inherits:!1,initialValue:"0"}),CSS.registerProperty({name:N,syntax:"<length>",inherits:!0,initialValue:"0px"}),CSS.registerProperty({name:K,syntax:"<number>",inherits:!1,initialValue:"0"}),CSS.registerProperty({name:Q,syntax:"<number>",inherits:!0,initialValue:"0"}),!0}catch{return!1}})();const E="round(nearest, calc(var(--number-flow-mask-height, 0.25em) / 2), 1px)",f=`calc(${E} * 2)`,B="var(--number-flow-mask-width, 0.5em)",w=`calc(${B} / var(--scale-x))`,x="#000 0, transparent 71%",Ct=X`:host{display:inline-block;direction:ltr;white-space:nowrap;isolation:isolate;line-height:1}.number,.number__inner{display:inline-block;transform-origin:left top}:host([data-will-change]) :is(.number,.number__inner,.section,.digit,.digit__num,.symbol){will-change:transform}.number{--scale-x:calc(1 + var(${K}) / var(--width));transform:translateX(var(${N})) scaleX(var(--scale-x));margin:0 calc(-1 * ${B});position:relative;-webkit-mask-image:linear-gradient(to right,transparent 0,#000 ${w},#000 calc(100% - ${w}),transparent ),linear-gradient(to bottom,transparent 0,#000 ${f},#000 calc(100% - ${f}),transparent 100% ),radial-gradient(at bottom right,${x}),radial-gradient(at bottom left,${x}),radial-gradient(at top left,${x}),radial-gradient(at top right,${x});-webkit-mask-size:100% calc(100% - ${f} * 2),calc(100% - ${w} * 2) 100%,${w} ${f},${w} ${f},${w} ${f},${w} ${f};-webkit-mask-position:center,center,top left,top right,bottom right,bottom left;-webkit-mask-repeat:no-repeat}.number__inner{padding:${E} ${B};transform:scaleX(calc(1 / var(--scale-x))) translateX(calc(-1 * var(${N})))}:host > :not(.number){z-index:5}.section,.symbol{display:inline-block;position:relative;isolation:isolate}.section::after{content:'\200b';display:inline-block}.section--justify-left{transform-origin:center left}.section--justify-right{transform-origin:center right}.section > [inert],.symbol > [inert]{margin:0 !important;position:absolute !important;z-index:-1}.digit{display:inline-block;position:relative;--c:var(--current) + var(${Q})}.digit__num,.number .section::after{padding:${E} 0}.digit__num{display:inline-block;--offset-raw:mod(var(--length) + var(--n) - mod(var(--c),var(--length)),var(--length));--offset:calc( var(--offset-raw) - var(--length) * round(down,var(--offset-raw) / (var(--length) / 2),1) );--y:clamp(-100%,var(--offset) * 100%,100%);transform:translateY(var(--y))}.digit__num[inert]{position:absolute;top:0;left:50%;transform:translateX(-50%) translateY(var(--y))}.digit:not(.is-spinning) .digit__num[inert]{display:none}.symbol__value{display:inline-block;mix-blend-mode:plus-lighter;white-space:pre}.section--justify-left .symbol > [inert]{left:0}.section--justify-right .symbol > [inert]{right:0}.animate-presence{opacity:calc(1 + var(${J}))}`,St=X`:host{display:inline-block;direction:ltr;white-space:nowrap;line-height:1}span{display:inline-block}:host([data-will-change]) span{will-change:transform}.number,.digit{padding:${E} 0}.symbol{white-space:pre}`,Et=(s="")=>X`:where(number-flow${s}){line-height:1}number-flow${s} > span{font-kerning:none;display:inline-block;padding:${f} 0}`,At=s=>[St,Et(s),Ct],tt=Symbol(),Rt=H({__name:"NumberFlowGroup",setup(s){const t=new Set;let e=!1;return lt(tt,(i,n)=>{t.add(i),ct(n,async()=>{e||(e=!0,t.forEach(async r=>{var a;!r.value||!r.value.created||(r.value.willUpdate(),await W(),(a=r.value)==null||a.didUpdate())}),await W(),e=!1)}),ht(()=>{t.delete(i)})}),(i,n)=>et(i.$slots,"default")}}),Tt=["batched","trend","plugins","animated","transformTiming","spinTiming","opacityTiming","respectMotionPreference","nonce","data-will-change","digits","innerHTML","data"],Nt=H({inheritAttrs:!1,__name:"index",props:{transformTiming:{default:()=>u.defaultProps.transformTiming},spinTiming:{default:()=>u.defaultProps.spinTiming},opacityTiming:{default:()=>u.defaultProps.opacityTiming},animated:{type:Boolean,default:()=>u.defaultProps.animated},respectMotionPreference:{type:Boolean,default:()=>u.defaultProps.respectMotionPreference},trend:{type:[Number,Function],default:()=>u.defaultProps.trend},plugins:{default:()=>u.defaultProps.plugins},digits:{default:()=>u.defaultProps.digits},locales:{},format:{},value:{},prefix:{},suffix:{},nonce:{},willChange:{type:Boolean,default:!1}},emits:["animationsstart","animationsfinish"],setup(s,{expose:t,emit:e}){const i=P();t({el:i});const n=e,r=j(()=>new Intl.NumberFormat(s.locales,s.format)),a=j(()=>$t(s.value,r.value,s.prefix,s.suffix)),o=void 0,c=it(tt,void 0);return c?.(i,a),(l,d)=>(nt(),st("number-flow-vue",at({ref_key:"el",ref:i},l.$attrs,{batched:!!D(c),trend:l.trend,plugins:l.plugins,animated:l.animated,transformTiming:l.transformTiming,spinTiming:l.spinTiming,opacityTiming:l.opacityTiming,respectMotionPreference:l.respectMotionPreference,nonce:l.nonce,"data-will-change":l.willChange?"":void 0,digits:l.digits,innerHTML:D(o),"data-allow-mismatch":"",onAnimationsstart:d[0]||(d[0]=m=>n("animationsstart")),onAnimationsfinish:d[1]||(d[1]=m=>n("animationsfinish")),data:a.value}),null,16,Tt))}}),Bt=At("-vue");_t("number-flow-vue",u);function Lt({respectMotionPreference:s=!0}={}){const t=P(!1),e=P(!1);return rt(()=>{var i;t.value=Y,e.value=((i=k)==null?void 0:i.matches)??!1}),ot(i=>{var n;if(!z(s))return;const r=({matches:a})=>{e.value=a};(n=k)==null||n.addEventListener("change",r),i(()=>{var a;(a=k)==null||a.removeEventListener("change",r)})}),j(()=>t.value&&(!z(s)||!e.value))}export{u as NumberFlowElement,Rt as NumberFlowGroup,jt as continuous,Nt as default,Bt as styles,Lt as useCanAnimate};
@@ -1 +1 @@
1
- import{d as M,u as O,o as E,w as y,a as T,c as V,n as z,b as A,r as x,e as i,g as L,f as s,s as g,h as P,i as U,p as W,l as D,j as G,k as H,m as b,q as J,t as j}from"./index-BGFrUxgg.js";import K from"./index-Bw16PZhL.js";const X=M({name:"ShwfedBlockAnimatedNumberItem",__name:"item",props:{item:{}},setup(h){const n=h,S=J(),a=x(void 0),m=x(0);function u(){return H(S)}function w(e){if(typeof e=="number"&&Number.isFinite(e))return e;if(typeof e=="string"&&e.trim()!==""){const t=Number(e);return Number.isFinite(t)?t:0}return 0}const d=i(()=>a.value===void 0?b():g(a.value));function v(e){if(!e)return"";try{const t=j(s(e,{...u(),json:d.value}));return t==null?"":String(t)}catch{return""}}const _=i(()=>v(n.item.prefix)),C=i(()=>v(n.item.suffix));function F(e){if(e)try{const t=j(s(e,{...u(),json:d.value}));return t==null?void 0:typeof t=="string"||typeof t=="object"?t:String(t)}catch{return}}const I=i(()=>F(n.item.style));async function o(){const e=n.item.dataSource,t=u(),k=L(function*(){let r=b();if(e.request){const B=yield*s(e.request,t);r=g(yield*B.json())}const q=yield*s(e.value,{...t,json:r});return{json:P(r),value:q}});try{const r=await U(W(k,D));a.value=r.json,m.value=w(r.value)}catch(r){console.warn("[shwfed-animated-number] fetch failed",r)}}const l=i(()=>(n.item.pollingInterval??0)>0),N=i(()=>Math.max(1,n.item.pollingInterval??1)*1e3),c=G(),{pause:p,resume:f}=O(()=>{o()},N,{immediate:!1});return E(()=>{o(),l.value&&c.value&&f()}),y(c,e=>{l.value&&(e?(o(),f()):p())}),y(()=>[n.item.dataSource.request??"",n.item.dataSource.value,n.item.pollingInterval??0].join("|"),()=>{o(),l.value&&c.value?f():p()}),(e,t)=>(T(),V(A(K),{value:m.value,prefix:_.value,suffix:C.value,style:z(I.value)},null,8,["value","prefix","suffix","style"]))}});export{X as default};
1
+ import{d as M,u as O,o as E,w as y,a as T,c as V,n as z,b as A,r as x,e as i,g as L,f as s,s as g,h as P,i as U,p as W,l as D,j as G,k as H,m as b,q as J,t as j}from"./index-CTZy_nrf.js";import K from"./index-DumuGVME.js";const X=M({name:"ShwfedBlockAnimatedNumberItem",__name:"item",props:{item:{}},setup(h){const n=h,S=J(),a=x(void 0),m=x(0);function u(){return H(S)}function w(e){if(typeof e=="number"&&Number.isFinite(e))return e;if(typeof e=="string"&&e.trim()!==""){const t=Number(e);return Number.isFinite(t)?t:0}return 0}const d=i(()=>a.value===void 0?b():g(a.value));function v(e){if(!e)return"";try{const t=j(s(e,{...u(),json:d.value}));return t==null?"":String(t)}catch{return""}}const _=i(()=>v(n.item.prefix)),C=i(()=>v(n.item.suffix));function F(e){if(e)try{const t=j(s(e,{...u(),json:d.value}));return t==null?void 0:typeof t=="string"||typeof t=="object"?t:String(t)}catch{return}}const I=i(()=>F(n.item.style));async function o(){const e=n.item.dataSource,t=u(),k=L(function*(){let r=b();if(e.request){const B=yield*s(e.request,t);r=g(yield*B.json())}const q=yield*s(e.value,{...t,json:r});return{json:P(r),value:q}});try{const r=await U(W(k,D));a.value=r.json,m.value=w(r.value)}catch(r){console.warn("[shwfed-animated-number] fetch failed",r)}}const l=i(()=>(n.item.pollingInterval??0)>0),N=i(()=>Math.max(1,n.item.pollingInterval??1)*1e3),c=G(),{pause:p,resume:f}=O(()=>{o()},N,{immediate:!1});return E(()=>{o(),l.value&&c.value&&f()}),y(c,e=>{l.value&&(e?(o(),f()):p())}),y(()=>[n.item.dataSource.request??"",n.item.dataSource.value,n.item.pollingInterval??0].join("|"),()=>{o(),l.value&&c.value?f():p()}),(e,t)=>(T(),V(A(K),{value:m.value,prefix:_.value,suffix:C.value,style:z(I.value)},null,8,["value","prefix","suffix","style"]))}});export{X as default};
@@ -1 +1 @@
1
- import{_ as c}from"./definition.vue_vue_type_script_setup_true_lang-B8-Uydoy.js";import{d as s,aH as o,aS as i,c as r,b as f,aG as u,a as m}from"./index-BGFrUxgg.js";const g=s({name:"ShwfedEventDispatchActionRuntime",__name:"runtime",props:{buttonId:{},config:{}},setup(e){const n=e,t=u(),a=o(()=>i(t,n.config.triggers));return(p,d)=>(m(),r(c,{"action-id":e.buttonId,effect:f(a)},null,8,["action-id","effect"]))}});export{g as default};
1
+ import{_ as c}from"./definition.vue_vue_type_script_setup_true_lang-Cr7UNELp.js";import{d as s,aJ as o,aU as i,c as r,b as f,aI as u,a as m}from"./index-CTZy_nrf.js";const g=s({name:"ShwfedEventDispatchActionRuntime",__name:"runtime",props:{buttonId:{},config:{}},setup(e){const n=e,t=u(),a=o(()=>i(t,n.config.triggers));return(p,d)=>(m(),r(c,{"action-id":e.buttonId,effect:f(a)},null,8,["action-id","effect"]))}});export{g as default};
@@ -1 +1 @@
1
- import{d as i,aH as f,aJ as r,aL as d,c as m,b as u,f as p,k as l,q as _,a as g}from"./index-BGFrUxgg.js";import{_ as b}from"./definition.vue_vue_type_script_setup_true_lang-B8-Uydoy.js";const w=i({name:"ShwfedNavigationActionRuntime",__name:"runtime",props:{buttonId:{},config:{}},setup(e){const t=e,o=_(),c=(n,a)=>p(n,{...l(o),...a}),s=f(()=>r(c(t.config.url),n=>d(()=>{window.open(n,t.config.mode)})));return(n,a)=>(g(),m(b,{"action-id":e.buttonId,effect:u(s)},null,8,["action-id","effect"]))}});export{w as default};
1
+ import{d as i,aJ as f,aL as r,aN as d,c as m,b as u,f as p,k as l,q as _,a as g}from"./index-CTZy_nrf.js";import{_ as b}from"./definition.vue_vue_type_script_setup_true_lang-Cr7UNELp.js";const w=i({name:"ShwfedNavigationActionRuntime",__name:"runtime",props:{buttonId:{},config:{}},setup(e){const t=e,o=_(),c=(n,a)=>p(n,{...l(o),...a}),s=f(()=>r(c(t.config.url),n=>d(()=>{window.open(n,t.config.mode)})));return(n,a)=>(g(),m(b,{"action-id":e.buttonId,effect:u(s)},null,8,["action-id","effect"]))}});export{w as default};
@@ -0,0 +1 @@
1
+ import{d as u,F as i,c as l,b as p,e as m,a as d,I as f,L as _,aE as k,f as w,k as x,q as g}from"./index-CTZy_nrf.js";const B=u({name:"ShwfedMarkdownItemRuntime",__name:"runtime",props:{config:{}},setup(s){const o=s,{locale:t}=i(),a=g(),c=(e,n)=>w(e,{...x(a),...n}),r=m(()=>{const e=_(o.config.content,t.value)??"";return k(e,c)});return(e,n)=>(d(),l(p(f),{"data-slot":"buttons-markdown",source:r.value,class:"prose prose-sm prose-zinc px-1"},null,8,["source"]))}});export{B as default};
@@ -0,0 +1 @@
1
+ import{d as l,aX as g,aJ as A,aL as y,aU as _,c as b,b as h,f as S,k,aI as j,aY as C,a as B,q as I}from"./index-CTZy_nrf.js";import{_ as O}from"./definition.vue_vue_type_script_setup_true_lang-Cr7UNELp.js";const F=l({name:"ShwfedStateWriteActionRuntime",__name:"runtime",props:{buttonId:{},config:{}},setup(r){const s=r,i=I(),f=(e,t)=>S(e,{...k(i),...t}),n=g(),c=n.kind==="form"&&n.parent?n.parent:n,u=j(),m=C((e,t,a)=>{if(Array.isArray(e[t])&&Array.isArray(a))return e[t]=a,!0});function o(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function p(e,t){return o(e)&&o(t)?m({...t},e):t}const d=A(()=>y(f(s.config.expression),e=>{for(const t of Object.keys(e)){const a=p(c.getAt(t),e[t]);c.setAt(t,a)}return _(u,s.config.onSuccess)}));return(e,t)=>(B(),b(O,{"action-id":r.buttonId,effect:h(d)},null,8,["action-id","effect"]))}});export{F as default};
@@ -0,0 +1 @@
1
+ import{d as l,F as u,g,aD as d,L as m,aE as p,aF as x,aG as E,c as k,b as _,f as h,k as w,aH as C,q as I,aI as F,a as b}from"./index-CTZy_nrf.js";import{_ as q}from"./definition.vue_vue_type_script_setup_true_lang-Cr7UNELp.js";const H=l({name:"ShwfedHttpRequestConfirmActionRuntime",__name:"runtime",props:{buttonId:{},config:{}},setup(s){const n=s,{locale:i}=u(),a=I(),t=(e,o)=>h(e,{...w(a),...o}),r=F(),c=C(),f=g(function*(){if(c&&!(yield*d(()=>c())))return;const e=m(n.config.markdown,i.value)??"",o=p(e,t);(yield*x({content:o,icon:n.config.icon,color:n.config.color}))||(yield*E(n.config.expression,t,{messageExpression:n.config.messageExpression,resultExpression:n.config.resultExpression,channel:r,triggers:{success:n.config.onSuccess,warning:n.config.onWarning,error:n.config.onError,info:n.config.onInfo}}))});return(e,o)=>(b(),k(q,{"action-id":s.buttonId,effect:_(f)},null,8,["action-id","effect"]))}});export{H as default};
@@ -1 +1 @@
1
- import{d as S,aH as _,g as E,aL as r,aS as m,aT as L,aU as b,c as j,b as k,f as v,k as x,aG as B,q as C,a as R}from"./index-BGFrUxgg.js";import{_ as T}from"./definition.vue_vue_type_script_setup_true_lang-B8-Uydoy.js";const O=S({name:"ShwfedHttpDownloadActionRuntime",__name:"runtime",props:{buttonId:{},config:{}},setup(d){const c=d,g=C(),t=(e,n)=>v(e,{...x(g),...n}),l=B(),p=new Set(["success","error","warning","info"]);function f(e){const n=URL.createObjectURL(e),o=document.createElement("a");o.href=n,o.download=e.name,document.body.appendChild(o),o.click(),o.remove(),URL.revokeObjectURL(n)}const y=_(()=>E(function*(){const{template:e,messageExpression:n,resultExpression:o}=c.config,u=yield*t(e.request);if(!e.download){const s=yield*u.file();return yield*r(()=>f(s)),yield*m(l,c.config.onSuccess)}const a={json:yield*u.json()},i=o===void 0?"success":yield*L(t(o,a),s=>p.has(s)?s:"success");if(n!==void 0){const s=yield*t(n,a);yield*r(()=>b[i](s))}if(i==="success"||i==="info"){const h=yield*(yield*t(e.download,a)).file();yield*r(()=>f(h))}const w={success:c.config.onSuccess,warning:c.config.onWarning,error:c.config.onError,info:c.config.onInfo};return yield*m(l,w[i])}));return(e,n)=>(R(),j(T,{"action-id":d.buttonId,effect:k(y)},null,8,["action-id","effect"]))}});export{O as default};
1
+ import{d as _,aJ as E,g as S,aN as r,aU as m,aV as b,aW as j,c as k,b as v,f as x,k as B,aI as L,q as C,a as R}from"./index-CTZy_nrf.js";import{_ as U}from"./definition.vue_vue_type_script_setup_true_lang-Cr7UNELp.js";const O=_({name:"ShwfedHttpDownloadActionRuntime",__name:"runtime",props:{buttonId:{},config:{}},setup(d){const c=d,g=C(),t=(e,n)=>x(e,{...B(g),...n}),l=L(),p=new Set(["success","error","warning","info"]);function f(e){const n=URL.createObjectURL(e),o=document.createElement("a");o.href=n,o.download=e.name,document.body.appendChild(o),o.click(),o.remove(),URL.revokeObjectURL(n)}const y=E(()=>S(function*(){const{template:e,messageExpression:n,resultExpression:o}=c.config,u=yield*t(e.request);if(!e.download){const s=yield*u.file();return yield*r(()=>f(s)),yield*m(l,c.config.onSuccess)}const a={json:yield*u.json()},i=o===void 0?"success":yield*b(t(o,a),s=>p.has(s)?s:"success");if(n!==void 0){const s=yield*t(n,a);yield*r(()=>j[i](s))}if(i==="success"||i==="info"){const h=yield*(yield*t(e.download,a)).file();yield*r(()=>f(h))}const w={success:c.config.onSuccess,warning:c.config.onWarning,error:c.config.onError,info:c.config.onInfo};return yield*m(l,w[i])}));return(e,n)=>(R(),k(U,{"action-id":d.buttonId,effect:v(y)},null,8,["action-id","effect"]))}});export{O as default};
@@ -1 +1 @@
1
- import{_ as n}from"./definition.vue_vue_type_script_setup_true_lang-B8-Uydoy.js";import{d as o,c as a,b as c,a as f,aK as i}from"./index-BGFrUxgg.js";const _=o({name:"ShwfedPrototypeActionRuntime",__name:"runtime",props:{buttonId:{},config:{}},setup(t){const e=i;return(r,s)=>(f(),a(n,{"action-id":t.buttonId,effect:c(e)},null,8,["action-id","effect"]))}});export{_ as default};
1
+ import{_ as n}from"./definition.vue_vue_type_script_setup_true_lang-Cr7UNELp.js";import{d as o,c as a,b as c,a as f,aM as i}from"./index-CTZy_nrf.js";const _=o({name:"ShwfedPrototypeActionRuntime",__name:"runtime",props:{buttonId:{},config:{}},setup(t){const e=i;return(r,s)=>(f(),a(n,{"action-id":t.buttonId,effect:c(e)},null,8,["action-id","effect"]))}});export{_ as default};
@@ -0,0 +1 @@
1
+ import{d as s,F as x,aO as T,g as p,L as c,aP as M,t as N,c as b,G as d,b as u,r as L,x as S,aI as k,aN as I,a as w,R as F,n as H,H as r,aQ as R,aR as A,aw as V,q as $,aS as f,C as m,aT as j}from"./index-CTZy_nrf.js";import{_ as z}from"./definition.vue_vue_type_script_setup_true_lang-Cr7UNELp.js";const Y=s({name:"ShwfedModalLayoutActionRuntime",__name:"runtime",props:{buttonId:{},config:{},buttonTitle:{}},setup(n){const a=n,{locale:l}=x(),v=e=>{},g=$(),i=S(f,void 0),h=k(),o=L(null),C=T(a.buttonId,{close:()=>I(()=>{o.value?.()})},h),E=s({name:"ModalBoundaryBridge",setup(e,{slots:t}){return A(g),m(j,C),i&&m(f,i),()=>t.default?.()}}),_=(e,t)=>V()?.(e,t),y=p(function*(){const e=c(a.config.modalTitle,l.value)??c(a.buttonTitle,l.value)??"",{modal:t,close:B}=yield*M({title:e,width:a.config.modalWidth});o.value=()=>N(B()),yield*t,o.value=null});return(e,t)=>(w(),b(z,{"action-id":n.buttonId,effect:u(y)},{default:d(()=>[F("div",{style:H(n.config.modalMinHeight?`min-height: ${n.config.modalMinHeight}`:void 0)},[r(u(E),null,{default:d(()=>[r(R,{"slot-value":n.config.slot,configure:v,"find-entry":_},null,8,["slot-value"])]),_:1})],4)]),_:1},8,["action-id","effect"]))}});export{Y as default};
@@ -1 +1 @@
1
- import{d as u,aH as p,aA as g,aI as a,aJ as m,aE as d,c as l,b as x,f as E,k as _,aF as h,q as C,aG as I,a as b}from"./index-BGFrUxgg.js";import{_ as k}from"./definition.vue_vue_type_script_setup_true_lang-B8-Uydoy.js";const B=u({name:"ShwfedHttpRequestActionRuntime",__name:"runtime",props:{buttonId:{},config:{}},setup(t){const e=t,c=C(),i=(n,s)=>E(n,{..._(c),...s}),r=I(),o=h(),f=p(()=>{const n=o?g(()=>o()):a(!0);return m(n,s=>s?d(e.config.expression,i,{messageExpression:e.config.messageExpression,resultExpression:e.config.resultExpression,channel:r,triggers:{success:e.config.onSuccess,warning:e.config.onWarning,error:e.config.onError,info:e.config.onInfo}}):a(void 0))});return(n,s)=>(b(),l(k,{"action-id":t.buttonId,effect:x(f)},null,8,["action-id","effect"]))}});export{B as default};
1
+ import{d as u,aJ as p,aD as g,aK as a,aL as m,aG as d,c as l,b as x,f as E,k as _,aH as h,q as C,aI as I,a as b}from"./index-CTZy_nrf.js";import{_ as k}from"./definition.vue_vue_type_script_setup_true_lang-Cr7UNELp.js";const B=u({name:"ShwfedHttpRequestActionRuntime",__name:"runtime",props:{buttonId:{},config:{}},setup(t){const e=t,c=C(),i=(n,s)=>E(n,{..._(c),...s}),r=I(),o=h(),f=p(()=>{const n=o?g(()=>o()):a(!0);return m(n,s=>s?d(e.config.expression,i,{messageExpression:e.config.messageExpression,resultExpression:e.config.resultExpression,channel:r,triggers:{success:e.config.onSuccess,warning:e.config.onWarning,error:e.config.onError,info:e.config.onInfo}}):a(void 0))});return(n,s)=>(b(),l(k,{"action-id":t.buttonId,effect:x(f)},null,8,["action-id","effect"]))}});export{B as default};
@@ -10,8 +10,8 @@
10
10
  `--primary`, the primary button variant renders as transparent. */
11
11
  body { --primary: #009689; }
12
12
  </style>
13
- <script type="module" crossorigin src="./assets/index-BGFrUxgg.js"></script>
14
- <link rel="stylesheet" crossorigin href="./assets/index-BoGW90Pq.css">
13
+ <script type="module" crossorigin src="./assets/index-CTZy_nrf.js"></script>
14
+ <link rel="stylesheet" crossorigin href="./assets/index-C2PrdVxC.css">
15
15
  </head>
16
16
  <body>
17
17
  <div id="app"></div>
@@ -5,6 +5,7 @@ type __VLS_ModelProps = {
5
5
  declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
6
6
  "update:modelValue": (value: {
7
7
  readonly type: "com.shwfed.block.markdown";
8
+ readonly style?: string | undefined;
8
9
  readonly id: string;
9
10
  readonly content: readonly [{
10
11
  readonly locale: "zh";
@@ -19,6 +20,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
19
20
  }, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
20
21
  "onUpdate:modelValue"?: ((value: {
21
22
  readonly type: "com.shwfed.block.markdown";
23
+ readonly style?: string | undefined;
22
24
  readonly id: string;
23
25
  readonly content: readonly [{
24
26
  readonly locale: "zh";
@@ -1,4 +1,5 @@
1
1
  <script setup>
2
+ import { ExpressionEditor } from "../../../../ui/expression-editor";
2
3
  import { Field, FieldLabel } from "../../../../ui/field";
3
4
  import { InputGroup, InputGroupInput } from "../../../../ui/input-group";
4
5
  import { Locale as LocaleField } from "../../../../ui/locale";
@@ -11,6 +12,9 @@ const blockSchema = schema(() => {
11
12
  });
12
13
  const fieldTitle = (f) => getStructFieldTitle(blockSchema, f) ?? f;
13
14
  const fieldDescription = (f) => getStructFieldDescription(blockSchema, f);
15
+ function setStyle(v) {
16
+ value.value = { ...value.value, style: v.trim().length > 0 ? v : void 0 };
17
+ }
14
18
  </script>
15
19
 
16
20
  <template>
@@ -41,6 +45,29 @@ const fieldDescription = (f) => getStructFieldDescription(blockSchema, f);
41
45
  </InputGroup>
42
46
  </Field>
43
47
 
48
+ <Field orientation="vertical">
49
+ <FieldLabel class="text-xs text-zinc-500">
50
+ <template
51
+ v-if="fieldDescription('style')"
52
+ #tooltip
53
+ >
54
+ <Markdown
55
+ :source="fieldDescription('style')"
56
+ block
57
+ class="prose prose-sm prose-zinc"
58
+ />
59
+ </template>
60
+ {{ fieldTitle("style") }}
61
+ </FieldLabel>
62
+ <ExpressionEditor
63
+ :model-value="value.style ?? ''"
64
+ placeholder="返回 CSS 字符串或样式对象的表达式,如 'padding: 2rem'"
65
+ multiline
66
+ class="min-h-16"
67
+ @update:model-value="(v) => setStyle(v)"
68
+ />
69
+ </Field>
70
+
44
71
  <Field orientation="vertical">
45
72
  <FieldLabel class="text-xs text-zinc-500">
46
73
  <template
@@ -5,6 +5,7 @@ type __VLS_ModelProps = {
5
5
  declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
6
6
  "update:modelValue": (value: {
7
7
  readonly type: "com.shwfed.block.markdown";
8
+ readonly style?: string | undefined;
8
9
  readonly id: string;
9
10
  readonly content: readonly [{
10
11
  readonly locale: "zh";
@@ -19,6 +20,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
19
20
  }, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
20
21
  "onUpdate:modelValue"?: ((value: {
21
22
  readonly type: "com.shwfed.block.markdown";
23
+ readonly style?: string | undefined;
22
24
  readonly id: string;
23
25
  readonly content: readonly [{
24
26
  readonly locale: "zh";
@@ -5,6 +5,7 @@ type __VLS_ModelProps = {
5
5
  declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
6
6
  "update:block": (value: {
7
7
  readonly type: "com.shwfed.block.markdown";
8
+ readonly style?: string | undefined;
8
9
  readonly id: string;
9
10
  readonly content: readonly [{
10
11
  readonly locale: "zh";
@@ -19,6 +20,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
19
20
  }, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
20
21
  "onUpdate:block"?: ((value: {
21
22
  readonly type: "com.shwfed.block.markdown";
23
+ readonly style?: string | undefined;
22
24
  readonly id: string;
23
25
  readonly content: readonly [{
24
26
  readonly locale: "zh";
@@ -1,12 +1,29 @@
1
1
  <script setup>
2
2
  import { computed } from "vue";
3
3
  import { useI18n } from "vue-i18n";
4
+ import { Effect } from "effect";
5
+ import { cel } from "../../../../../utils/cel";
6
+ import { celBindings, injectCELContext } from "../../../../../utils/cel-context";
4
7
  import { getLocalizedText } from "../../../../../share/locale";
5
8
  import { Markdown } from "../../../../ui/markdown";
6
9
  defineOptions({ name: "ShwfedBlockMarkdownRuntime" });
7
10
  const block = defineModel("block", { type: null, ...{ required: true } });
8
11
  const { locale } = useI18n();
9
12
  const source = computed(() => getLocalizedText(block.value.content, locale.value) ?? "");
13
+ const inheritedContext = injectCELContext();
14
+ function evalStyle(expression) {
15
+ if (!expression) return void 0;
16
+ try {
17
+ const r = Effect.runSync(cel(expression, celBindings(inheritedContext)));
18
+ if (r === null || r === void 0) return void 0;
19
+ if (typeof r === "string") return r;
20
+ if (typeof r === "object") return r;
21
+ return String(r);
22
+ } catch {
23
+ return void 0;
24
+ }
25
+ }
26
+ const styleValue = computed(() => evalStyle(block.value.style));
10
27
  </script>
11
28
 
12
29
  <template>
@@ -15,5 +32,6 @@ const source = computed(() => getLocalizedText(block.value.content, locale.value
15
32
  :source="source"
16
33
  block
17
34
  class="prose prose-sm prose-zinc max-w-none"
35
+ :style="styleValue"
18
36
  />
19
37
  </template>
@@ -5,6 +5,7 @@ type __VLS_ModelProps = {
5
5
  declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
6
6
  "update:block": (value: {
7
7
  readonly type: "com.shwfed.block.markdown";
8
+ readonly style?: string | undefined;
8
9
  readonly id: string;
9
10
  readonly content: readonly [{
10
11
  readonly locale: "zh";
@@ -19,6 +20,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
19
20
  }, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
20
21
  "onUpdate:block"?: ((value: {
21
22
  readonly type: "com.shwfed.block.markdown";
23
+ readonly style?: string | undefined;
22
24
  readonly id: string;
23
25
  readonly content: readonly [{
24
26
  readonly locale: "zh";
@@ -17,11 +17,12 @@ export declare const metadata: {
17
17
  readonly max: number;
18
18
  };
19
19
  };
20
- export declare function schema(_configure: (env: Environment) => void, _blockRef?: AnySchema): Schema.Struct<{
20
+ export declare function schema(configure: (env: Environment) => void, _blockRef?: AnySchema): Schema.Struct<{
21
21
  id: Schema.refine<string, typeof Schema.String>;
22
22
  type: Schema.tag<"com.shwfed.block.markdown">;
23
23
  compatibilityDate: Schema.tag<"2026-05-06">;
24
24
  displayName: Schema.optional<Schema.SchemaClass<string, string, never>>;
25
+ style: Schema.optional<Schema.Schema<string, string, never>>;
25
26
  content: Schema.TupleType<readonly [Schema.Struct<{
26
27
  locale: Schema.Literal<["zh"]>;
27
28
  message: Schema.SchemaClass<string, string, never>;
@@ -1,5 +1,6 @@
1
1
  import { Schema } from "effect";
2
2
  import { Locale } from "../../../../../share/locale.js";
3
+ import { Expression } from "../../../../../share/expression.js";
3
4
  export const type = "com.shwfed.block.markdown";
4
5
  export const compatibilityDate = "2026-05-06";
5
6
  export const metadata = {
@@ -8,7 +9,11 @@ export const metadata = {
8
9
  w: { initial: 8, min: 2, max: Infinity },
9
10
  h: { initial: 2, min: 2, max: Infinity }
10
11
  };
11
- export function schema(_configure, _blockRef) {
12
+ export function schema(configure, _blockRef) {
13
+ const CelStyle = Expression({
14
+ configure,
15
+ resultType: (t) => t === "string" || t === "dyn" || t.startsWith("map") || t.startsWith("optional")
16
+ });
12
17
  return Schema.Struct({
13
18
  id: Schema.UUID.annotations({ description: "\u5757\u552F\u4E00\u6807\u8BC6" }),
14
19
  type: Schema.tag(type),
@@ -17,6 +22,10 @@ export function schema(_configure, _blockRef) {
17
22
  title: "\u5185\u90E8\u540D\u79F0",
18
23
  description: "\u4EC5\u5728\u7F16\u8F91\u5668\u5185\u53EF\u89C1\u7684\u5757\u540D\uFF0C\u7528\u4E8E\u5728\u4FA7\u8FB9\u680F\u548C\u5E03\u5C40\u7F16\u8F91\u5668\u4E2D\u8BC6\u522B\u5757\uFF1B\u8FD0\u884C\u65F6\u4E0D\u5C55\u793A"
19
24
  })),
25
+ style: Schema.optional(CelStyle).annotations({
26
+ title: "\u6837\u5F0F",
27
+ description: "\u8FD4\u56DE\u5E94\u7528\u5728 Markdown \u5757\u6839\u5143\u7D20\u4E0A\u7684\u6837\u5F0F\u7684 CEL \u8868\u8FBE\u5F0F\uFF0C\u53EF\u8FD4\u56DE CSS \u5B57\u7B26\u4E32\uFF08\u5982 `'padding: 2rem'`\uFF09\u6216\u6837\u5F0F\u5BF9\u8C61\uFF08\u5982 `{'padding': '2rem'}`\uFF09\uFF1B\u7559\u7A7A\u5219\u4E0D\u8BBE\u989D\u5916\u6837\u5F0F"
28
+ }),
20
29
  content: Locale.annotations({
21
30
  title: "\u5185\u5BB9",
22
31
  description: "\u6E32\u67D3\u4E3A Markdown \u7684\u591A\u8BED\u8A00\u6587\u672C"
@@ -6,7 +6,7 @@ type Configure = (env: Environment) => void;
6
6
  export declare const type: "com.shwfed.block.chart.xy";
7
7
  export declare const compatibilityDate: "2026-05-17";
8
8
  export declare const metadata: {
9
- readonly name: "图表";
9
+ readonly name: "笛卡尔坐标图表";
10
10
  readonly icon: "fluent:chart-multiple-20-regular";
11
11
  readonly w: {
12
12
  readonly initial: 20;
@@ -6,7 +6,7 @@ export { getStructFieldDescription, getStructFieldTitle } from "../../../../tabl
6
6
  export const type = "com.shwfed.block.chart.xy";
7
7
  export const compatibilityDate = "2026-05-17";
8
8
  export const metadata = {
9
- name: "\u56FE\u8868",
9
+ name: "\u7B1B\u5361\u5C14\u5750\u6807\u56FE\u8868",
10
10
  icon: "fluent:chart-multiple-20-regular",
11
11
  w: { initial: 20, min: 8, max: Infinity },
12
12
  h: { initial: 9, min: 5, max: Infinity }
@@ -0,0 +1,7 @@
1
+ import type { BadgeValue } from './schema.js';
2
+ type __VLS_Props = {
3
+ badge: BadgeValue;
4
+ };
5
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
6
+ declare const _default: typeof __VLS_export;
7
+ export default _default;
@@ -0,0 +1,91 @@
1
+ <script setup>
2
+ import { computed, onMounted, ref, watch } from "vue";
3
+ import { Effect, Option } from "effect";
4
+ import { Fetch } from "fx-fetch";
5
+ import { useIntervalFn, useWindowFocus } from "@vueuse/core";
6
+ import { useI18n } from "vue-i18n";
7
+ import { getLocalizedText } from "../../../../../share/locale";
8
+ import { cel } from "../../../../../utils/cel";
9
+ import { celBindings, injectCELContext } from "../../../../../utils/cel-context";
10
+ import { interpolateMarkdown } from "../../../../table/utils/runtime";
11
+ import { Badge } from "../../../../ui/badge";
12
+ import { Markdown } from "../../../../ui/markdown";
13
+ defineOptions({ name: "ShwfedBlockCardBadge", inheritAttrs: false });
14
+ const props = defineProps({
15
+ badge: { type: null, required: true }
16
+ });
17
+ const { locale } = useI18n();
18
+ const inheritedContext = injectCELContext();
19
+ const json = ref(void 0);
20
+ function baseContext() {
21
+ return celBindings(inheritedContext);
22
+ }
23
+ const jsonOption = computed(
24
+ () => json.value === void 0 ? Option.none() : Option.some(json.value)
25
+ );
26
+ const template = computed(() => getLocalizedText(props.badge.content, locale.value) || "");
27
+ const rendered = computed(() => {
28
+ if (!template.value) return "";
29
+ return interpolateMarkdown(template.value, cel, { ...baseContext(), json: jsonOption.value });
30
+ });
31
+ async function refresh() {
32
+ const req = props.badge.request;
33
+ if (!req) return;
34
+ const ctx = baseContext();
35
+ const program = Effect.gen(function* () {
36
+ const builder = yield* cel(req, ctx);
37
+ return yield* builder.json();
38
+ });
39
+ try {
40
+ json.value = await Effect.runPromise(Effect.provide(program, Fetch.layer));
41
+ } catch (e) {
42
+ console.warn("[shwfed-card-badge] fetch failed", e);
43
+ }
44
+ }
45
+ const pollingEnabled = computed(() => !!props.badge.request && (props.badge.interval ?? 0) > 0);
46
+ const intervalMs = computed(() => Math.max(1, props.badge.interval ?? 1) * 1e3);
47
+ const focused = useWindowFocus();
48
+ const { pause, resume } = useIntervalFn(() => void refresh(), intervalMs, { immediate: false });
49
+ onMounted(() => {
50
+ void refresh();
51
+ if (pollingEnabled.value && focused.value) resume();
52
+ });
53
+ watch(focused, (isFocused) => {
54
+ if (!pollingEnabled.value) return;
55
+ if (isFocused) {
56
+ void refresh();
57
+ resume();
58
+ } else {
59
+ pause();
60
+ }
61
+ });
62
+ watch(
63
+ () => [props.badge.request ?? "", props.badge.interval ?? 0].join("|"),
64
+ () => {
65
+ void refresh();
66
+ if (pollingEnabled.value && focused.value) resume();
67
+ else pause();
68
+ }
69
+ );
70
+ </script>
71
+
72
+ <template>
73
+ <template v-if="template">
74
+ <Badge
75
+ v-if="badge.dot"
76
+ :variant="badge.variant ?? 'default'"
77
+ class="size-2.5 min-w-0 rounded-full p-0"
78
+ v-bind="$attrs"
79
+ />
80
+ <Badge
81
+ v-else
82
+ :variant="badge.variant ?? 'default'"
83
+ v-bind="$attrs"
84
+ >
85
+ <Markdown
86
+ :source="rendered"
87
+ class="max-w-none text-inherit [&_*]:text-inherit [&_p]:m-0"
88
+ />
89
+ </Badge>
90
+ </template>
91
+ </template>
@@ -0,0 +1,7 @@
1
+ import type { BadgeValue } from './schema.js';
2
+ type __VLS_Props = {
3
+ badge: BadgeValue;
4
+ };
5
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
6
+ declare const _default: typeof __VLS_export;
7
+ export default _default;
@@ -0,0 +1,96 @@
1
+ import type { Environment } from '../../../../../vendor/cel-js/lib/index.js';
2
+ import { type Value } from './schema.js';
3
+ type __VLS_Props = {
4
+ configure?: (env: Environment) => void;
5
+ };
6
+ type __VLS_ModelProps = {
7
+ modelValue: Value;
8
+ };
9
+ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
10
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
11
+ "update:modelValue": (value: {
12
+ readonly type: "com.shwfed.block.card";
13
+ readonly style?: string | undefined;
14
+ readonly id: string;
15
+ readonly slot: {
16
+ readonly blocks: readonly any[];
17
+ readonly layouts: readonly {
18
+ readonly name: string;
19
+ readonly layout: {
20
+ readonly style?: string | undefined;
21
+ readonly columns: number;
22
+ readonly gap?: number | undefined;
23
+ readonly rows?: number | undefined;
24
+ readonly placements: {
25
+ readonly [x: string]: {
26
+ readonly area: readonly [readonly [number, number], readonly [number, number]];
27
+ readonly v?: "stretch" | "center" | "end" | "start" | undefined;
28
+ readonly h?: "stretch" | "center" | "end" | "start" | undefined;
29
+ };
30
+ };
31
+ };
32
+ readonly media?: string | undefined;
33
+ }[];
34
+ };
35
+ readonly displayName?: string | undefined;
36
+ readonly url?: string | undefined;
37
+ readonly compatibilityDate: "2026-06-02";
38
+ readonly badge?: {
39
+ readonly content?: readonly [{
40
+ readonly locale: "zh";
41
+ readonly message: string;
42
+ }, ...{
43
+ readonly locale: "en" | "ja" | "ko";
44
+ readonly message: string;
45
+ }[]] | undefined;
46
+ readonly dot?: boolean | undefined;
47
+ readonly variant?: "default" | "destructive" | "outline" | "secondary" | undefined;
48
+ readonly request?: string | undefined;
49
+ readonly interval?: number | undefined;
50
+ } | undefined;
51
+ }) => any;
52
+ }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
53
+ "onUpdate:modelValue"?: ((value: {
54
+ readonly type: "com.shwfed.block.card";
55
+ readonly style?: string | undefined;
56
+ readonly id: string;
57
+ readonly slot: {
58
+ readonly blocks: readonly any[];
59
+ readonly layouts: readonly {
60
+ readonly name: string;
61
+ readonly layout: {
62
+ readonly style?: string | undefined;
63
+ readonly columns: number;
64
+ readonly gap?: number | undefined;
65
+ readonly rows?: number | undefined;
66
+ readonly placements: {
67
+ readonly [x: string]: {
68
+ readonly area: readonly [readonly [number, number], readonly [number, number]];
69
+ readonly v?: "stretch" | "center" | "end" | "start" | undefined;
70
+ readonly h?: "stretch" | "center" | "end" | "start" | undefined;
71
+ };
72
+ };
73
+ };
74
+ readonly media?: string | undefined;
75
+ }[];
76
+ };
77
+ readonly displayName?: string | undefined;
78
+ readonly url?: string | undefined;
79
+ readonly compatibilityDate: "2026-06-02";
80
+ readonly badge?: {
81
+ readonly content?: readonly [{
82
+ readonly locale: "zh";
83
+ readonly message: string;
84
+ }, ...{
85
+ readonly locale: "en" | "ja" | "ko";
86
+ readonly message: string;
87
+ }[]] | undefined;
88
+ readonly dot?: boolean | undefined;
89
+ readonly variant?: "default" | "destructive" | "outline" | "secondary" | undefined;
90
+ readonly request?: string | undefined;
91
+ readonly interval?: number | undefined;
92
+ } | undefined;
93
+ }) => any) | undefined;
94
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
95
+ declare const _default: typeof __VLS_export;
96
+ export default _default;