@mulmochat-plugin/form 0.1.1 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core/index.d.ts +8 -0
- package/dist/core/plugin.d.ts +12 -0
- package/dist/core/types.d.ts +311 -0
- package/dist/core.cjs +2 -0
- package/dist/core.js +432 -0
- package/dist/index.cjs +1 -2
- package/dist/index.d.ts +16 -8
- package/dist/index.js +7 -992
- package/dist/style.css +1 -1
- package/dist/{plugin → vue}/Preview.vue.d.ts +1 -1
- package/dist/{plugin → vue}/View.vue.d.ts +1 -1
- package/dist/vue/index.d.ts +22 -0
- package/dist/vue/types.d.ts +32 -0
- package/dist/vue.cjs +1 -0
- package/dist/vue.js +582 -0
- package/package.json +11 -1
- package/dist/common/index.d.ts +0 -7
- package/dist/common/types.d.ts +0 -130
- package/dist/plugin/index.d.ts +0 -18
- package/dist/plugin/samples.d.ts +0 -5
- package/dist/plugin/types.d.ts +0 -207
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-font-weight:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-duration:initial}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-red-50:oklch(97.1% .013 17.38);--color-red-500:oklch(63.7% .237 25.331);--color-red-600:oklch(57.7% .245 27.325);--color-red-700:oklch(50.5% .213 27.518);--color-red-800:oklch(44.4% .177 26.899);--color-amber-600:oklch(66.6% .179 58.318);--color-green-100:oklch(96.2% .044 156.743);--color-green-600:oklch(62.7% .194 149.214);--color-green-700:oklch(52.7% .154 150.069);--color-emerald-50:oklch(97.9% .021 166.113);--color-emerald-100:oklch(95% .052 163.051);--color-emerald-200:oklch(90.5% .093 164.15);--color-emerald-800:oklch(43.2% .095 166.913);--color-blue-50:oklch(97% .014 254.604);--color-blue-500:oklch(62.3% .214 259.815);--color-blue-600:oklch(54.6% .245 262.881);--color-blue-700:oklch(48.8% .243 264.376);--color-indigo-50:oklch(96.2% .018 272.314);--color-indigo-100:oklch(93% .034 272.788);--color-indigo-200:oklch(87% .065 274.039);--color-indigo-300:oklch(78.5% .115 274.713);--color-indigo-500:oklch(58.5% .233 277.117);--color-indigo-600:oklch(51.1% .262 276.966);--color-indigo-700:oklch(45.7% .24 277.023);--color-gray-50:oklch(98.5% .002 247.839);--color-gray-100:oklch(96.7% .003 264.542);--color-gray-200:oklch(92.8% .006 264.531);--color-gray-300:oklch(87.2% .01 258.338);--color-gray-500:oklch(55.1% .027 264.364);--color-gray-600:oklch(44.6% .03 256.802);--color-gray-800:oklch(27.8% .033 256.848);--color-gray-900:oklch(21% .034 264.665);--color-white:#fff;--spacing:.25rem;--container-3xl:48rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-lg:1.125rem;--text-lg--line-height:calc(1.75/1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75/1.25);--text-3xl:1.875rem;--text-3xl--line-height: 1.2 ;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--radius-md:.375rem;--radius-lg:.5rem;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.visible{visibility:visible}.m-0{margin:calc(var(--spacing)*0)}.mx-auto{margin-inline:auto}.mt-2{margin-top:calc(var(--spacing)*2)}.mt-3{margin-top:calc(var(--spacing)*3)}.mt-4{margin-top:calc(var(--spacing)*4)}.mt-8{margin-top:calc(var(--spacing)*8)}.mr-3{margin-right:calc(var(--spacing)*3)}.mb-1{margin-bottom:calc(var(--spacing)*1)}.mb-2{margin-bottom:calc(var(--spacing)*2)}.mb-3{margin-bottom:calc(var(--spacing)*3)}.mb-4{margin-bottom:calc(var(--spacing)*4)}.mb-5{margin-bottom:calc(var(--spacing)*5)}.mb-6{margin-bottom:calc(var(--spacing)*6)}.mb-8{margin-bottom:calc(var(--spacing)*8)}.ml-1{margin-left:calc(var(--spacing)*1)}.line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.contents{display:contents}.flex{display:flex}.inline-flex{display:inline-flex}.h-2{height:calc(var(--spacing)*2)}.h-3{height:calc(var(--spacing)*3)}.h-4{height:calc(var(--spacing)*4)}.h-5{height:calc(var(--spacing)*5)}.h-12{height:calc(var(--spacing)*12)}.h-full{height:100%}.w-3{width:calc(var(--spacing)*3)}.w-4{width:calc(var(--spacing)*4)}.w-5{width:calc(var(--spacing)*5)}.w-12{width:calc(var(--spacing)*12)}.w-32{width:calc(var(--spacing)*32)}.w-full{width:100%}.max-w-3xl{max-width:var(--container-3xl)}.max-w-\[200px\]{max-width:200px}.flex-shrink-0{flex-shrink:0}.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.resize-y{resize:vertical}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.justify-center{justify-content:center}.gap-1{gap:calc(var(--spacing)*1)}.gap-2{gap:calc(var(--spacing)*2)}.gap-3{gap:calc(var(--spacing)*3)}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*1)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*1)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*2)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*6)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*6)*calc(1 - var(--tw-space-y-reverse)))}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.border{border-style:var(--tw-border-style);border-width:1px}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-none{--tw-border-style:none;border-style:none}.border-blue-500{border-color:var(--color-blue-500)}.border-emerald-200{border-color:var(--color-emerald-200)}.border-gray-200{border-color:var(--color-gray-200)}.border-gray-300{border-color:var(--color-gray-300)}.border-indigo-200{border-color:var(--color-indigo-200)}.border-red-500{border-color:var(--color-red-500)}.bg-blue-50{background-color:var(--color-blue-50)}.bg-blue-600{background-color:var(--color-blue-600)}.bg-emerald-50{background-color:var(--color-emerald-50)}.bg-emerald-100{background-color:var(--color-emerald-100)}.bg-gray-50{background-color:var(--color-gray-50)}.bg-gray-100{background-color:var(--color-gray-100)}.bg-gray-200{background-color:var(--color-gray-200)}.bg-green-100{background-color:var(--color-green-100)}.bg-green-600{background-color:var(--color-green-600)}.bg-indigo-100{background-color:var(--color-indigo-100)}.bg-indigo-600{background-color:var(--color-indigo-600)}.bg-red-50{background-color:var(--color-red-50)}.bg-white{background-color:var(--color-white)}.bg-gradient-to-br{--tw-gradient-position:to bottom right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.from-blue-50{--tw-gradient-from:var(--color-blue-50);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-indigo-50{--tw-gradient-to:var(--color-indigo-50);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.p-3{padding:calc(var(--spacing)*3)}.p-4{padding:calc(var(--spacing)*4)}.p-5{padding:calc(var(--spacing)*5)}.p-8{padding:calc(var(--spacing)*8)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-4{padding-inline:calc(var(--spacing)*4)}.px-6{padding-inline:calc(var(--spacing)*6)}.px-8{padding-inline:calc(var(--spacing)*8)}.py-1{padding-block:calc(var(--spacing)*1)}.py-2{padding-block:calc(var(--spacing)*2)}.py-2\.5{padding-block:calc(var(--spacing)*2.5)}.py-3{padding-block:calc(var(--spacing)*3)}.text-center{text-align:center}.font-mono{font-family:var(--font-mono)}.text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.whitespace-pre-wrap{white-space:pre-wrap}.text-amber-600{color:var(--color-amber-600)}.text-blue-600{color:var(--color-blue-600)}.text-emerald-800{color:var(--color-emerald-800)}.text-gray-500{color:var(--color-gray-500)}.text-gray-600{color:var(--color-gray-600)}.text-gray-800{color:var(--color-gray-800)}.text-gray-900{color:var(--color-gray-900)}.text-green-700{color:var(--color-green-700)}.text-indigo-700{color:var(--color-indigo-700)}.text-red-500{color:var(--color-red-500)}.text-red-600{color:var(--color-red-600)}.text-red-700{color:var(--color-red-700)}.text-red-800{color:var(--color-red-800)}.text-white{color:var(--color-white)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a),0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-300{--tw-duration:.3s;transition-duration:.3s}@media(hover:hover){.hover\:border-indigo-300:hover{border-color:var(--color-indigo-300)}.hover\:bg-blue-700:hover{background-color:var(--color-blue-700)}.hover\:bg-gray-50:hover{background-color:var(--color-gray-50)}.hover\:bg-indigo-200:hover{background-color:var(--color-indigo-200)}.hover\:bg-indigo-700:hover{background-color:var(--color-indigo-700)}.hover\:underline:hover{text-decoration-line:underline}}.focus\:border-indigo-500:focus{border-color:var(--color-indigo-500)}.focus\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\:ring-\[3px\]:focus{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(3px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\:ring-blue-500:focus{--tw-ring-color:var(--color-blue-500)}.focus\:ring-indigo-500\/10:focus{--tw-ring-color:#625fff1a}@supports (color:color-mix(in lab,red,red)){.focus\:ring-indigo-500\/10:focus{--tw-ring-color:color-mix(in oklab,var(--color-indigo-500)10%,transparent)}}.focus\:ring-red-500:focus{--tw-ring-color:var(--color-red-500)}.focus\:outline-none:focus{--tw-outline-style:none;outline-style:none}}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"<length-percentage>";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"<length-percentage>";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"<length-percentage>";inherits:false;initial-value:100%}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-duration{syntax:"*";inherits:false}.form-field[data-v-b79fe71c]{transition:all .2s ease}.form-field.has-error[data-v-b79fe71c]{animation:shake-b79fe71c .3s ease}@keyframes shake-b79fe71c{0%,to{transform:translate(0)}25%{transform:translate(-5px)}75%{transform:translate(5px)}}
|
|
1
|
+
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-font-weight:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-duration:initial}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-red-50:oklch(97.1% .013 17.38);--color-red-500:oklch(63.7% .237 25.331);--color-red-600:oklch(57.7% .245 27.325);--color-red-700:oklch(50.5% .213 27.518);--color-red-800:oklch(44.4% .177 26.899);--color-amber-600:oklch(66.6% .179 58.318);--color-green-100:oklch(96.2% .044 156.743);--color-green-600:oklch(62.7% .194 149.214);--color-green-700:oklch(52.7% .154 150.069);--color-emerald-50:oklch(97.9% .021 166.113);--color-emerald-100:oklch(95% .052 163.051);--color-emerald-200:oklch(90.5% .093 164.15);--color-emerald-800:oklch(43.2% .095 166.913);--color-blue-50:oklch(97% .014 254.604);--color-blue-500:oklch(62.3% .214 259.815);--color-blue-600:oklch(54.6% .245 262.881);--color-blue-700:oklch(48.8% .243 264.376);--color-indigo-50:oklch(96.2% .018 272.314);--color-indigo-100:oklch(93% .034 272.788);--color-indigo-200:oklch(87% .065 274.039);--color-indigo-300:oklch(78.5% .115 274.713);--color-indigo-500:oklch(58.5% .233 277.117);--color-indigo-600:oklch(51.1% .262 276.966);--color-indigo-700:oklch(45.7% .24 277.023);--color-gray-50:oklch(98.5% .002 247.839);--color-gray-100:oklch(96.7% .003 264.542);--color-gray-200:oklch(92.8% .006 264.531);--color-gray-300:oklch(87.2% .01 258.338);--color-gray-500:oklch(55.1% .027 264.364);--color-gray-600:oklch(44.6% .03 256.802);--color-gray-800:oklch(27.8% .033 256.848);--color-gray-900:oklch(21% .034 264.665);--color-white:#fff;--spacing:.25rem;--container-3xl:48rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-lg:1.125rem;--text-lg--line-height:calc(1.75/1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75/1.25);--text-3xl:1.875rem;--text-3xl--line-height: 1.2 ;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--radius-md:.375rem;--radius-lg:.5rem;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.visible{visibility:visible}.m-0{margin:calc(var(--spacing)*0)}.mx-auto{margin-inline:auto}.mt-2{margin-top:calc(var(--spacing)*2)}.mt-3{margin-top:calc(var(--spacing)*3)}.mt-4{margin-top:calc(var(--spacing)*4)}.mt-8{margin-top:calc(var(--spacing)*8)}.mr-3{margin-right:calc(var(--spacing)*3)}.mb-1{margin-bottom:calc(var(--spacing)*1)}.mb-2{margin-bottom:calc(var(--spacing)*2)}.mb-3{margin-bottom:calc(var(--spacing)*3)}.mb-4{margin-bottom:calc(var(--spacing)*4)}.mb-5{margin-bottom:calc(var(--spacing)*5)}.mb-6{margin-bottom:calc(var(--spacing)*6)}.mb-8{margin-bottom:calc(var(--spacing)*8)}.ml-1{margin-left:calc(var(--spacing)*1)}.line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.contents{display:contents}.flex{display:flex}.inline-flex{display:inline-flex}.h-2{height:calc(var(--spacing)*2)}.h-3{height:calc(var(--spacing)*3)}.h-4{height:calc(var(--spacing)*4)}.h-5{height:calc(var(--spacing)*5)}.h-12{height:calc(var(--spacing)*12)}.h-full{height:100%}.w-3{width:calc(var(--spacing)*3)}.w-4{width:calc(var(--spacing)*4)}.w-5{width:calc(var(--spacing)*5)}.w-12{width:calc(var(--spacing)*12)}.w-32{width:calc(var(--spacing)*32)}.w-full{width:100%}.max-w-3xl{max-width:var(--container-3xl)}.max-w-\[200px\]{max-width:200px}.flex-shrink-0{flex-shrink:0}.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.resize-y{resize:vertical}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.justify-center{justify-content:center}.gap-1{gap:calc(var(--spacing)*1)}.gap-2{gap:calc(var(--spacing)*2)}.gap-3{gap:calc(var(--spacing)*3)}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*1)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*1)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*2)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*6)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*6)*calc(1 - var(--tw-space-y-reverse)))}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.border{border-style:var(--tw-border-style);border-width:1px}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-none{--tw-border-style:none;border-style:none}.border-blue-500{border-color:var(--color-blue-500)}.border-emerald-200{border-color:var(--color-emerald-200)}.border-gray-200{border-color:var(--color-gray-200)}.border-gray-300{border-color:var(--color-gray-300)}.border-indigo-200{border-color:var(--color-indigo-200)}.border-red-500{border-color:var(--color-red-500)}.bg-blue-50{background-color:var(--color-blue-50)}.bg-blue-600{background-color:var(--color-blue-600)}.bg-emerald-50{background-color:var(--color-emerald-50)}.bg-emerald-100{background-color:var(--color-emerald-100)}.bg-gray-50{background-color:var(--color-gray-50)}.bg-gray-100{background-color:var(--color-gray-100)}.bg-gray-200{background-color:var(--color-gray-200)}.bg-green-100{background-color:var(--color-green-100)}.bg-green-600{background-color:var(--color-green-600)}.bg-indigo-100{background-color:var(--color-indigo-100)}.bg-indigo-600{background-color:var(--color-indigo-600)}.bg-red-50{background-color:var(--color-red-50)}.bg-white{background-color:var(--color-white)}.bg-gradient-to-br{--tw-gradient-position:to bottom right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.from-blue-50{--tw-gradient-from:var(--color-blue-50);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-indigo-50{--tw-gradient-to:var(--color-indigo-50);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.p-3{padding:calc(var(--spacing)*3)}.p-4{padding:calc(var(--spacing)*4)}.p-5{padding:calc(var(--spacing)*5)}.p-8{padding:calc(var(--spacing)*8)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-4{padding-inline:calc(var(--spacing)*4)}.px-6{padding-inline:calc(var(--spacing)*6)}.px-8{padding-inline:calc(var(--spacing)*8)}.py-1{padding-block:calc(var(--spacing)*1)}.py-2{padding-block:calc(var(--spacing)*2)}.py-2\.5{padding-block:calc(var(--spacing)*2.5)}.py-3{padding-block:calc(var(--spacing)*3)}.text-center{text-align:center}.font-mono{font-family:var(--font-mono)}.text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.whitespace-pre-wrap{white-space:pre-wrap}.text-amber-600{color:var(--color-amber-600)}.text-blue-600{color:var(--color-blue-600)}.text-emerald-800{color:var(--color-emerald-800)}.text-gray-500{color:var(--color-gray-500)}.text-gray-600{color:var(--color-gray-600)}.text-gray-800{color:var(--color-gray-800)}.text-gray-900{color:var(--color-gray-900)}.text-green-700{color:var(--color-green-700)}.text-indigo-700{color:var(--color-indigo-700)}.text-red-500{color:var(--color-red-500)}.text-red-600{color:var(--color-red-600)}.text-red-700{color:var(--color-red-700)}.text-red-800{color:var(--color-red-800)}.text-white{color:var(--color-white)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a),0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-300{--tw-duration:.3s;transition-duration:.3s}@media(hover:hover){.hover\:border-indigo-300:hover{border-color:var(--color-indigo-300)}.hover\:bg-blue-700:hover{background-color:var(--color-blue-700)}.hover\:bg-gray-50:hover{background-color:var(--color-gray-50)}.hover\:bg-indigo-200:hover{background-color:var(--color-indigo-200)}.hover\:bg-indigo-700:hover{background-color:var(--color-indigo-700)}.hover\:underline:hover{text-decoration-line:underline}}.focus\:border-indigo-500:focus{border-color:var(--color-indigo-500)}.focus\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\:ring-\[3px\]:focus{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(3px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\:ring-blue-500:focus{--tw-ring-color:var(--color-blue-500)}.focus\:ring-indigo-500\/10:focus{--tw-ring-color:#625fff1a}@supports (color:color-mix(in lab,red,red)){.focus\:ring-indigo-500\/10:focus{--tw-ring-color:color-mix(in oklab,var(--color-indigo-500)10%,transparent)}}.focus\:ring-red-500:focus{--tw-ring-color:var(--color-red-500)}.focus\:outline-none:focus{--tw-outline-style:none;outline-style:none}}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"<length-percentage>";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"<length-percentage>";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"<length-percentage>";inherits:false;initial-value:100%}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-duration{syntax:"*";inherits:false}.form-field[data-v-de00dace]{transition:all .2s ease}.form-field.has-error[data-v-de00dace]{animation:shake-de00dace .3s ease}@keyframes shake-de00dace{0%,to{transform:translate(0)}25%{transform:translate(-5px)}75%{transform:translate(5px)}}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MulmoChat Form Plugin - Vue Implementation
|
|
3
|
+
*
|
|
4
|
+
* Full Vue plugin with UI components.
|
|
5
|
+
* Import from "@mulmochat-plugin/form/vue"
|
|
6
|
+
*/
|
|
7
|
+
import "../style.css";
|
|
8
|
+
import type { ToolPlugin, FormData, FormArgs } from "./types";
|
|
9
|
+
import View from "./View.vue";
|
|
10
|
+
import Preview from "./Preview.vue";
|
|
11
|
+
/**
|
|
12
|
+
* Form plugin instance with Vue components
|
|
13
|
+
*/
|
|
14
|
+
export declare const plugin: ToolPlugin<never, FormData, FormArgs>;
|
|
15
|
+
export type { ToolPlugin, ToolPluginConfig } from "./types";
|
|
16
|
+
export type { BackendType, ToolContextApp, ToolContext, ToolResult, ToolResultComplete, JsonSchemaProperty, ToolDefinition, StartApiResponse, ToolSample, InputHandler, FileUploadConfig, ConfigValue, ConfigFieldSchema, PluginConfigSchema, ViewComponentProps, PreviewComponentProps, ToolPluginCore, FieldType, BaseField, TextField, TextareaField, RadioField, DropdownField, CheckboxField, DateField, TimeField, NumberField, FormField, FormData, FormArgs, } from "./types";
|
|
17
|
+
export { TOOL_NAME, TOOL_DEFINITION, SAMPLES, executeForm, pluginCore, } from "../core/plugin";
|
|
18
|
+
export { View, Preview };
|
|
19
|
+
declare const _default: {
|
|
20
|
+
plugin: ToolPlugin<never, FormData, FormArgs>;
|
|
21
|
+
};
|
|
22
|
+
export default _default;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MulmoChat Plugin Vue Types
|
|
3
|
+
*
|
|
4
|
+
* Vue-specific types that extend the core plugin interface.
|
|
5
|
+
*/
|
|
6
|
+
import type { Component } from "vue";
|
|
7
|
+
import type { ToolPluginCore } from "../core/types";
|
|
8
|
+
type VueComponent = Component<any>;
|
|
9
|
+
/**
|
|
10
|
+
* Legacy Vue component-based config
|
|
11
|
+
* @deprecated Use PluginConfigSchema instead
|
|
12
|
+
*/
|
|
13
|
+
export interface ToolPluginConfig {
|
|
14
|
+
key: string;
|
|
15
|
+
defaultValue: unknown;
|
|
16
|
+
component: VueComponent;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Vue plugin interface - extends core with Vue components
|
|
20
|
+
*/
|
|
21
|
+
export interface ToolPlugin<T = unknown, J = unknown, A extends object = object> extends ToolPluginCore<T, J, A> {
|
|
22
|
+
/** Vue component for full view */
|
|
23
|
+
viewComponent?: VueComponent;
|
|
24
|
+
/** Vue component for preview/thumbnail */
|
|
25
|
+
previewComponent?: VueComponent;
|
|
26
|
+
/**
|
|
27
|
+
* Legacy Vue component-based config (for backward compatibility)
|
|
28
|
+
* @deprecated Use configSchema instead
|
|
29
|
+
*/
|
|
30
|
+
config?: ToolPluginConfig;
|
|
31
|
+
}
|
|
32
|
+
export type { BackendType, ToolContextApp, ToolContext, ToolResult, ToolResultComplete, JsonSchemaProperty, ToolDefinition, StartApiResponse, ToolSample, InputHandler, FileInputHandler, ClipboardImageInputHandler, UrlInputHandler, TextInputHandler, FileUploadConfig, ConfigValue, ConfigFieldSchema, PluginConfigSchema, ViewComponentProps, PreviewComponentProps, ToolPluginCore, FieldType, BaseField, TextField, TextareaField, RadioField, DropdownField, CheckboxField, DateField, TimeField, NumberField, FormField, FormData, FormArgs, } from "../core/types";
|
package/dist/vue.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const _=require("./core.cjs"),t=require("vue"),O={class:"w-full h-full overflow-y-auto p-8"},R={key:0,class:"max-w-3xl w-full mx-auto"},q={key:0,class:"text-gray-900 text-3xl font-bold mb-4 text-center"},P={key:1,class:"text-gray-600 text-center mb-8 text-lg"},j={key:2,class:"bg-red-50 border-2 border-red-500 rounded-lg p-4 mb-6",role:"alert"},A={class:"text-red-700 space-y-1"},I=["href","onClick"],H=["id"],J=["for"],W={key:0,class:"text-red-500 ml-1","aria-label":"required"},G={key:0,class:"text-gray-600 text-sm mb-2"},K=["id","onUpdate:modelValue","placeholder","aria-invalid","aria-describedby","onBlur","onInput"],Q=["id","onUpdate:modelValue","placeholder","rows","aria-invalid","aria-describedby","onBlur","onInput"],X=["id","onUpdate:modelValue","min","max","step","aria-invalid","aria-describedby","onBlur","onInput"],Y=["id","onUpdate:modelValue","min","max","aria-invalid","aria-describedby","onBlur","onChange"],Z=["id","onUpdate:modelValue","aria-invalid","aria-describedby","onBlur","onChange"],ee=["aria-invalid","aria-describedby"],te=["name","value","onUpdate:modelValue","onChange","onBlur"],re={class:"text-gray-800"},oe=["id","onUpdate:modelValue","aria-invalid","aria-describedby","onBlur","onChange"],ae=["value"],ne=["aria-invalid","aria-describedby"],se=["value","onUpdate:modelValue","onChange","onBlur"],le={class:"text-gray-800"},ie=["id"],ue={key:0},ce={class:"mt-8 flex justify-center"},de=["disabled"],me={class:"mt-4 text-center text-gray-600 text-sm"},pe=t.defineComponent({__name:"View",props:{selectedResult:{},sendTextMessage:{type:Function}},emits:["updateResult"],setup(x,{emit:g}){const m=x,k=g,i=t.ref(null),s=t.ref({}),n=t.ref(new Set),d=t.ref(new Map),c=t.ref(!1),B=t.ref(!1),b=t.ref(!1);t.watch(()=>m.selectedResult,(r,a)=>{if(r?.toolName==="presentForm"&&r.jsonData&&(!a||!a.jsonData||a.uuid!==r.uuid||a.jsonData!==r.jsonData)){if(b.value=!0,i.value=r.jsonData,s.value={},i.value.fields.forEach(o=>{s.value[o.id]=p(o)}),r.viewState){const o=r.viewState;o.userResponses&&Object.assign(s.value,o.userResponses),o.touched&&(n.value=new Set(o.touched),o.touched.forEach(u=>{E(u)})),o.submitted!==void 0&&(c.value=o.submitted)}b.value=!1}},{immediate:!0}),t.watch([s,n,c],()=>{if(b.value||!m.selectedResult)return;const r={...m.selectedResult,viewState:{userResponses:{...s.value},touched:Array.from(n.value),submitted:c.value}};k("updateResult",r)},{deep:!0});function p(r){const a=r;if(a.defaultValue!==void 0)switch(r.type){case"radio":case"dropdown":{const e=r.choices.indexOf(a.defaultValue);return e!==-1?e:null}case"checkbox":return Array.isArray(a.defaultValue)?a.defaultValue.map(e=>r.choices.indexOf(e)).filter(e=>e!==-1):[];default:return a.defaultValue}switch(r.type){case"text":case"textarea":return"";case"number":return r.min!==void 0?r.min:0;case"date":case"time":return"";case"radio":case"dropdown":return null;case"checkbox":return[];default:return null}}function V(r){return r==null?!0:typeof r=="string"?r.trim()==="":Array.isArray(r)?r.length===0:!1}function D(r){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(r)}function f(r){try{return new URL(r),!0}catch{return!1}}function L(r){return/^[\d\s\-+()]+$/.test(r)&&r.replace(/\D/g,"").length>=10}function M(r,a){if(r.required&&V(a))return`${r.label} is required`;if(V(a))return null;switch(r.type){case"text":{const e=r;if(e.validation==="email"&&!D(a))return"Please enter a valid email address";if(e.validation==="url"&&!f(a))return"Please enter a valid URL";if(e.validation==="phone"&&!L(a))return"Please enter a valid phone number";if(typeof e.validation=="string"&&e.validation!=="email"&&e.validation!=="url"&&e.validation!=="phone")try{if(!new RegExp(e.validation).test(a))return`${r.label} format is invalid`}catch{console.warn(`Invalid regex pattern: ${e.validation}`)}break}case"textarea":{const e=r;if(e.minLength&&a.length<e.minLength)return`Must be at least ${e.minLength} characters (currently ${a.length})`;if(e.maxLength&&a.length>e.maxLength)return`Must be no more than ${e.maxLength} characters (currently ${a.length})`;break}case"number":{const e=r;if(e.min!==void 0&&a<e.min)return`Must be at least ${e.min}`;if(e.max!==void 0&&a>e.max)return`Must be no more than ${e.max}`;break}case"date":{const e=r;if(e.minDate&&a<e.minDate)return`Date must be on or after ${e.minDate}`;if(e.maxDate&&a>e.maxDate)return`Date must be on or before ${e.maxDate}`;break}case"checkbox":{const e=r,o=a?.length||0;if(e.minSelections&&o<e.minSelections)return`Please select at least ${e.minSelections} option${e.minSelections>1?"s":""}`;if(e.maxSelections&&o>e.maxSelections)return`Please select no more than ${e.maxSelections} option${e.maxSelections>1?"s":""}`;break}}return null}function E(r){const a=i.value?.fields.find(u=>u.id===r);if(!a)return!0;const e=s.value[r],o=M(a,e);return o?(d.value.set(r,{fieldId:r,message:o,type:"custom"}),!1):(d.value.delete(r),!0)}function v(r){n.value.add(r),E(r)}function h(r){n.value.has(r)&&E(r)}function l(r){return d.value.has(r)}function w(r){const a=document.getElementById(`input-${r}`);a&&(a.focus(),a.scrollIntoView({behavior:"smooth",block:"center"}))}function F(r){return(r.type==="text"||r.type==="textarea")&&r.maxLength!==void 0}function $(r){if(r.type!=="text"&&r.type!=="textarea")return!1;const a=r.maxLength;return a?(s.value[r.id]||"").length/a>.9:!1}const z=t.computed(()=>i.value?.fields.filter(r=>r.required).length||0),T=t.computed(()=>i.value?i.value.fields.filter(r=>r.required&&!V(s.value[r.id])).length:0);function U(){if(c.value)return;if(i.value?.fields.forEach(e=>{n.value.add(e.id),E(e.id)}),d.value.size>0){B.value=!0;const e=Array.from(d.value.keys())[0];w(e);return}const r={};i.value?.fields.forEach(e=>{const o=s.value[e.id];e.type==="radio"||e.type==="dropdown"?o!=null?r[e.id]=e.choices[o]:r[e.id]=null:e.type==="checkbox"?r[e.id]=(o||[]).map(u=>e.choices[u]):r[e.id]=o});const a=JSON.stringify({formSubmission:{formTitle:i.value?.title||"Form",responses:r}},null,2);c.value=!0,m.sendTextMessage(a)}return(r,a)=>(t.openBlock(),t.createElementBlock("div",O,[i.value?(t.openBlock(),t.createElementBlock("div",R,[i.value.title?(t.openBlock(),t.createElementBlock("h2",q,t.toDisplayString(i.value.title),1)):t.createCommentVNode("",!0),i.value.description?(t.openBlock(),t.createElementBlock("p",P,t.toDisplayString(i.value.description),1)):t.createCommentVNode("",!0),B.value&&d.value.size>0?(t.openBlock(),t.createElementBlock("div",j,[a[0]||(a[0]=t.createElementVNode("h3",{class:"text-red-800 font-semibold mb-2 flex items-center gap-2"},[t.createElementVNode("svg",{class:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20","aria-hidden":"true"},[t.createElementVNode("path",{"fill-rule":"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z","clip-rule":"evenodd"})]),t.createTextVNode(" Please fix the following errors: ")],-1)),t.createElementVNode("ul",A,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(d.value,([e,o])=>(t.openBlock(),t.createElementBlock("li",{key:e},[t.createElementVNode("a",{href:`#${e}`,onClick:t.withModifiers(u=>w(e),["prevent"]),class:"hover:underline cursor-pointer"},t.toDisplayString(o.message),9,I)]))),128))])])):t.createCommentVNode("",!0),t.createElementVNode("form",{onSubmit:t.withModifiers(U,["prevent"]),class:"space-y-6"},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(i.value.fields,e=>(t.openBlock(),t.createElementBlock("div",{key:e.id,id:e.id,class:t.normalizeClass(["form-field",{"has-error":l(e.id)&&n.value.has(e.id)}])},[t.createElementVNode("label",{for:`input-${e.id}`,class:t.normalizeClass(["block text-gray-800 font-semibold mb-2",{"text-red-600":l(e.id)&&n.value.has(e.id)}])},[t.createTextVNode(t.toDisplayString(e.label)+" ",1),e.required?(t.openBlock(),t.createElementBlock("span",W,"*")):t.createCommentVNode("",!0)],10,J),e.description?(t.openBlock(),t.createElementBlock("p",G,t.toDisplayString(e.description),1)):t.createCommentVNode("",!0),e.type==="text"?t.withDirectives((t.openBlock(),t.createElementBlock("input",{key:1,id:`input-${e.id}`,"onUpdate:modelValue":o=>s.value[e.id]=o,type:"text",placeholder:e.placeholder,"aria-invalid":l(e.id)&&n.value.has(e.id),"aria-describedby":l(e.id)&&n.value.has(e.id)?`${e.id}-error`:void 0,onBlur:o=>v(e.id),onInput:o=>h(e.id),class:t.normalizeClass(["w-full px-4 py-2 border-2 border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 transition-colors",{"border-red-500 focus:ring-red-500":l(e.id)&&n.value.has(e.id),"border-gray-300":!l(e.id)||!n.value.has(e.id)}])},null,42,K)),[[t.vModelText,s.value[e.id]]]):e.type==="textarea"?t.withDirectives((t.openBlock(),t.createElementBlock("textarea",{key:2,id:`input-${e.id}`,"onUpdate:modelValue":o=>s.value[e.id]=o,placeholder:e.placeholder,rows:e.rows||4,"aria-invalid":l(e.id)&&n.value.has(e.id),"aria-describedby":l(e.id)&&n.value.has(e.id)?`${e.id}-error`:void 0,onBlur:o=>v(e.id),onInput:o=>h(e.id),class:t.normalizeClass(["w-full px-4 py-2 border-2 border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 transition-colors resize-y",{"border-red-500 focus:ring-red-500":l(e.id)&&n.value.has(e.id),"border-gray-300":!l(e.id)||!n.value.has(e.id)}])},null,42,Q)),[[t.vModelText,s.value[e.id]]]):e.type==="number"?t.withDirectives((t.openBlock(),t.createElementBlock("input",{key:3,id:`input-${e.id}`,"onUpdate:modelValue":o=>s.value[e.id]=o,type:"number",min:e.min,max:e.max,step:e.step,"aria-invalid":l(e.id)&&n.value.has(e.id),"aria-describedby":l(e.id)&&n.value.has(e.id)?`${e.id}-error`:void 0,onBlur:o=>v(e.id),onInput:o=>h(e.id),class:t.normalizeClass(["w-full px-4 py-2 border-2 border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 transition-colors",{"border-red-500 focus:ring-red-500":l(e.id)&&n.value.has(e.id),"border-gray-300":!l(e.id)||!n.value.has(e.id)}])},null,42,X)),[[t.vModelText,s.value[e.id],void 0,{number:!0}]]):e.type==="date"?t.withDirectives((t.openBlock(),t.createElementBlock("input",{key:4,id:`input-${e.id}`,"onUpdate:modelValue":o=>s.value[e.id]=o,type:"date",min:e.minDate,max:e.maxDate,"aria-invalid":l(e.id)&&n.value.has(e.id),"aria-describedby":l(e.id)&&n.value.has(e.id)?`${e.id}-error`:void 0,onBlur:o=>v(e.id),onChange:o=>h(e.id),class:t.normalizeClass(["w-full px-4 py-2 border-2 border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 transition-colors",{"border-red-500 focus:ring-red-500":l(e.id)&&n.value.has(e.id),"border-gray-300":!l(e.id)||!n.value.has(e.id)}])},null,42,Y)),[[t.vModelText,s.value[e.id]]]):e.type==="time"?t.withDirectives((t.openBlock(),t.createElementBlock("input",{key:5,id:`input-${e.id}`,"onUpdate:modelValue":o=>s.value[e.id]=o,type:"time","aria-invalid":l(e.id)&&n.value.has(e.id),"aria-describedby":l(e.id)&&n.value.has(e.id)?`${e.id}-error`:void 0,onBlur:o=>v(e.id),onChange:o=>h(e.id),class:t.normalizeClass(["w-full px-4 py-2 border-2 border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 transition-colors",{"border-red-500 focus:ring-red-500":l(e.id)&&n.value.has(e.id),"border-gray-300":!l(e.id)||!n.value.has(e.id)}])},null,42,Z)),[[t.vModelText,s.value[e.id]]]):e.type==="radio"?(t.openBlock(),t.createElementBlock("div",{key:6,class:"space-y-2",role:"radiogroup","aria-invalid":l(e.id)&&n.value.has(e.id),"aria-describedby":l(e.id)&&n.value.has(e.id)?`${e.id}-error`:void 0},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.choices,(o,u)=>(t.openBlock(),t.createElementBlock("label",{key:u,class:t.normalizeClass(["flex items-center p-3 border-2 border-gray-300 rounded-lg cursor-pointer transition-all hover:bg-gray-50",{"border-blue-500 bg-blue-50":s.value[e.id]===u,"border-gray-300":s.value[e.id]!==u}])},[t.withDirectives(t.createElementVNode("input",{type:"radio",name:e.id,value:u,"onUpdate:modelValue":y=>s.value[e.id]=y,onChange:y=>h(e.id),onBlur:y=>v(e.id),class:"mr-3 h-4 w-4 flex-shrink-0"},null,40,te),[[t.vModelRadio,s.value[e.id]]]),t.createElementVNode("span",re,t.toDisplayString(o),1)],2))),128))],8,ee)):e.type==="dropdown"?t.withDirectives((t.openBlock(),t.createElementBlock("select",{key:7,id:`input-${e.id}`,"onUpdate:modelValue":o=>s.value[e.id]=o,"aria-invalid":l(e.id)&&n.value.has(e.id),"aria-describedby":l(e.id)&&n.value.has(e.id)?`${e.id}-error`:void 0,onBlur:o=>v(e.id),onChange:o=>h(e.id),class:t.normalizeClass(["w-full px-4 py-2 border-2 border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 transition-colors bg-white",{"border-red-500 focus:ring-red-500":l(e.id)&&n.value.has(e.id),"border-gray-300":!l(e.id)||!n.value.has(e.id)}])},[a[1]||(a[1]=t.createElementVNode("option",{value:null,disabled:""},"Select an option...",-1)),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.choices,(o,u)=>(t.openBlock(),t.createElementBlock("option",{key:u,value:u},t.toDisplayString(o),9,ae))),128))],42,oe)),[[t.vModelSelect,s.value[e.id]]]):e.type==="checkbox"?(t.openBlock(),t.createElementBlock("div",{key:8,class:"space-y-2",role:"group","aria-invalid":l(e.id)&&n.value.has(e.id),"aria-describedby":l(e.id)&&n.value.has(e.id)?`${e.id}-error`:void 0},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.choices,(o,u)=>(t.openBlock(),t.createElementBlock("label",{key:u,class:t.normalizeClass(["flex items-center p-3 border-2 border-gray-300 rounded-lg cursor-pointer transition-all hover:bg-gray-50",{"border-blue-500 bg-blue-50":(s.value[e.id]||[]).includes(u),"border-gray-300":!(s.value[e.id]||[]).includes(u)}])},[t.withDirectives(t.createElementVNode("input",{type:"checkbox",value:u,"onUpdate:modelValue":y=>s.value[e.id]=y,onChange:y=>h(e.id),onBlur:y=>v(e.id),class:"mr-3 h-4 w-4 flex-shrink-0"},null,40,se),[[t.vModelCheckbox,s.value[e.id]]]),t.createElementVNode("span",le,t.toDisplayString(o),1)],2))),128))],8,ne)):t.createCommentVNode("",!0),l(e.id)&&n.value.has(e.id)?(t.openBlock(),t.createElementBlock("div",{key:9,id:`${e.id}-error`,class:"flex items-center gap-2 mt-2 text-red-600 text-sm",role:"alert"},[a[2]||(a[2]=t.createElementVNode("svg",{class:"w-4 h-4 flex-shrink-0",fill:"currentColor",viewBox:"0 0 20 20","aria-hidden":"true"},[t.createElementVNode("path",{"fill-rule":"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z","clip-rule":"evenodd"})],-1)),t.createTextVNode(" "+t.toDisplayString(d.value.get(e.id)?.message),1)],8,ie)):t.createCommentVNode("",!0),F(e)?(t.openBlock(),t.createElementBlock("div",{key:10,class:t.normalizeClass(["text-sm mt-2",{"text-amber-600 font-semibold":$(e),"text-gray-500":!$(e)}])},[t.createTextVNode(t.toDisplayString((s.value[e.id]||"").length)+" ",1),e.maxLength?(t.openBlock(),t.createElementBlock("span",ue," / "+t.toDisplayString(e.maxLength),1)):t.createCommentVNode("",!0),a[3]||(a[3]=t.createTextVNode(" characters ",-1))],2)):t.createCommentVNode("",!0)],10,H))),128)),t.createElementVNode("div",ce,[t.createElementVNode("button",{type:"submit",disabled:c.value,class:t.normalizeClass([c.value?"bg-green-600 cursor-default":"bg-blue-600 hover:bg-blue-700","px-8 py-3 rounded-lg text-white font-semibold text-lg transition-colors"])},t.toDisplayString(c.value?"Submitted":"Submit Form"),11,de)]),t.createElementVNode("div",me,t.toDisplayString(T.value)+" / "+t.toDisplayString(z.value)+" required fields completed ",1)],32)])):t.createCommentVNode("",!0)]))}}),ve=(x,g)=>{const m=x.__vccOpts||x;for(const[k,i]of g)m[k]=i;return m},N=ve(pe,[["__scopeId","data-v-de00dace"]]),he={class:"w-full h-full flex flex-col items-center justify-center p-4 bg-gradient-to-br from-blue-50 to-indigo-50 rounded-lg border-2 border-gray-200"},ge={class:"text-center"},be={class:"text-gray-900 font-bold text-lg mb-1 line-clamp-2"},ye={class:"text-gray-600 text-sm mb-2"},xe={key:0,class:"flex items-center justify-center gap-2"},ke={class:"w-32 h-2 bg-gray-200 rounded-full overflow-hidden"},_e={class:"text-xs text-gray-500"},Be={key:1,class:"inline-flex items-center gap-1 px-3 py-1 bg-green-100 text-green-700 rounded-full text-xs font-semibold"},C=t.defineComponent({__name:"Preview",props:{result:{}},setup(x){const g=x,m=t.computed(()=>g.result?.toolName==="presentForm"?g.result.jsonData:null),k=t.computed(()=>g.result?.viewState||null),i=t.computed(()=>m.value?.fields.length||0),s=t.computed(()=>k.value?.submitted||!1),n=t.computed(()=>{if(!m.value||s.value)return 100;const d=m.value.fields.filter(b=>b.required);if(d.length===0)return 0;const c=k.value?.userResponses||{},B=d.filter(b=>{const p=c[b.id];return p==null?!1:typeof p=="string"?p.trim()!=="":Array.isArray(p)?p.length>0:!0}).length;return Math.round(B/d.length*100)});return(d,c)=>(t.openBlock(),t.createElementBlock("div",he,[t.createElementVNode("div",ge,[c[1]||(c[1]=t.createElementVNode("svg",{class:"w-12 h-12 mx-auto mb-3 text-blue-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[t.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})],-1)),t.createElementVNode("h3",be,t.toDisplayString(m.value?.title||"Form"),1),t.createElementVNode("p",ye,t.toDisplayString(i.value)+" field"+t.toDisplayString(i.value!==1?"s":""),1),s.value?(t.openBlock(),t.createElementBlock("div",Be,[...c[0]||(c[0]=[t.createElementVNode("svg",{class:"w-3 h-3",fill:"currentColor",viewBox:"0 0 20 20"},[t.createElementVNode("path",{"fill-rule":"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z","clip-rule":"evenodd"})],-1),t.createTextVNode(" Submitted ",-1)])])):(t.openBlock(),t.createElementBlock("div",xe,[t.createElementVNode("div",ke,[t.createElementVNode("div",{class:"h-full bg-blue-600 transition-all duration-300",style:t.normalizeStyle({width:`${n.value}%`})},null,4)]),t.createElementVNode("span",_e,t.toDisplayString(n.value)+"%",1)]))])]))}}),S={..._.pluginCore,viewComponent:N,previewComponent:C},Ee={plugin:S};exports.SAMPLES=_.SAMPLES;exports.TOOL_DEFINITION=_.TOOL_DEFINITION;exports.TOOL_NAME=_.TOOL_NAME;exports.executeForm=_.executeForm;exports.pluginCore=_.pluginCore;exports.Preview=C;exports.View=N;exports.default=Ee;exports.plugin=S;
|