@mulmochat-plugin/quiz 0.3.2 → 0.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core.cjs +1 -1
- package/dist/core.js +2 -144
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +3 -9
- package/dist/plugin-BDTug9SB.cjs +1 -0
- package/dist/plugin-Dc-SF02-.js +147 -0
- package/dist/react.cjs +3 -4
- package/dist/react.js +307 -395
- package/dist/style.css +3 -1
- package/dist/vue.cjs +2 -3
- package/dist/vue.js +90 -145
- package/package.json +16 -14
package/dist/style.css
CHANGED
|
@@ -1 +1,3 @@
|
|
|
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-border-style:solid;--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-600:oklch(57.7% .245 27.325);--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-400:oklch(70.7% .165 254.624);--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-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-slate-500:oklch(55.4% .046 257.417);--color-slate-600:oklch(44.6% .043 257.281);--color-slate-700:oklch(37.2% .044 257.287);--color-slate-800:oklch(27.9% .041 260.031);--color-slate-900:oklch(20.8% .042 265.755);--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-400:oklch(70.7% .022 261.325);--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-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}.static{position:static}.m-0{margin:calc(var(--spacing)*0)}.mx-auto{margin-inline:auto}.mt-1{margin-top:calc(var(--spacing)*1)}.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-2{margin-right:calc(var(--spacing)*2)}.mr-3{margin-right:calc(var(--spacing)*3)}.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-8{margin-bottom:calc(var(--spacing)*8)}.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{display:inline}.inline-block{display:inline-block}.size-2{width:calc(var(--spacing)*2);height:calc(var(--spacing)*2)}.size-4{width:calc(var(--spacing)*4);height:calc(var(--spacing)*4)}.size-full{width:100%;height:100%}.h-32{height:calc(var(--spacing)*32)}.h-full{height:100%}.min-h-96{min-height:calc(var(--spacing)*96)}.w-48{width:calc(var(--spacing)*48)}.w-\[137px\]{width:137px}.w-full{width:100%}.max-w-3xl{max-width:var(--container-3xl)}.max-w-\[200px\]{max-width:200px}.flex-1{flex:1}.shrink-0{flex-shrink:0}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.resize-y{resize:vertical}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-start{align-items:flex-start}.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)}.gap-6{gap:calc(var(--spacing)*6)}.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-\[\#3d3d5c\]{border-color:#3d3d5c}.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-slate-600{border-color:var(--color-slate-600)}.border-slate-700{border-color:var(--color-slate-700)}.bg-\[\#1a1a2e\]{background-color:#1a1a2e}.bg-\[\#2d2d44\]{background-color:#2d2d44}.bg-blue-50{background-color:var(--color-blue-50)}.bg-blue-500\/20{background-color:#3080ff33}@supports (color:color-mix(in lab,red,red)){.bg-blue-500\/20{background-color:color-mix(in oklab,var(--color-blue-500)20%,transparent)}}.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-gray-400{background-color:var(--color-gray-400)}.bg-gray-600{background-color:var(--color-gray-600)}.bg-indigo-100{background-color:var(--color-indigo-100)}.bg-indigo-600{background-color:var(--color-indigo-600)}.bg-slate-800{background-color:var(--color-slate-800)}.bg-slate-900{background-color:var(--color-slate-900)}.bg-white{background-color:var(--color-white)}.p-3{padding:calc(var(--spacing)*3)}.p-4{padding:calc(var(--spacing)*4)}.p-5{padding:calc(var(--spacing)*5)}.p-6{padding:calc(var(--spacing)*6)}.p-8{padding:calc(var(--spacing)*8)}.p-\[10px\]{padding:10px}.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-\[\#f0f0f0\]{color:#f0f0f0}.text-blue-400{color:var(--color-blue-400)}.text-emerald-800{color:var(--color-emerald-800)}.text-gray-100{color:var(--color-gray-100)}.text-gray-400{color:var(--color-gray-400)}.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-indigo-700{color:var(--color-indigo-700)}.text-red-600{color:var(--color-red-600)}.text-white{color:var(--color-white)}.opacity-50{opacity:.5}.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-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-200{--tw-duration:.2s;transition-duration:.2s}@media(hover:hover){.hover\:border-indigo-300:hover{border-color:var(--color-indigo-300)}.hover\:border-slate-500:hover{border-color:var(--color-slate-500)}.hover\:bg-blue-700:hover{background-color:var(--color-blue-700)}.hover\:bg-indigo-200:hover{background-color:var(--color-indigo-200)}.hover\:bg-indigo-700:hover{background-color:var(--color-indigo-700)}.hover\:bg-slate-500\/20:hover{background-color:#62748e33}@supports (color:color-mix(in lab,red,red)){.hover\:bg-slate-500\/20:hover{background-color:color-mix(in oklab,var(--color-slate-500)20%,transparent)}}}.focus\:border-indigo-500:focus{border-color:var(--color-indigo-500)}.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-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\:outline-none:focus{--tw-outline-style:none;outline-style:none}}body{margin:calc(var(--spacing)*0);background-color:var(--color-gray-100);padding:calc(var(--spacing)*5);font-family:var(--font-sans)}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@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}
|
|
1
|
+
/*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */
|
|
2
|
+
@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-border-style:solid;--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-600:oklch(57.7% .245 27.325);--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-400:oklch(70.7% .165 254.624);--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-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-slate-500:oklch(55.4% .046 257.417);--color-slate-600:oklch(44.6% .043 257.281);--color-slate-700:oklch(37.2% .044 257.287);--color-slate-800:oklch(27.9% .041 260.031);--color-slate-900:oklch(20.8% .042 265.755);--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-400:oklch(70.7% .022 261.325);--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-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:calc(2.25 / 1.875);--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;-webkit-text-decoration:inherit;-webkit-text-decoration: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}.static{position:static}.end{inset-inline-end:var(--spacing)}.m-0{margin:calc(var(--spacing) * 0)}.mx-auto{margin-inline:auto}.mt-1{margin-top:calc(var(--spacing) * 1)}.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-2{margin-right:calc(var(--spacing) * 2)}.mr-3{margin-right:calc(var(--spacing) * 3)}.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-8{margin-bottom:calc(var(--spacing) * 8)}.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{display:inline}.inline-block{display:inline-block}.size-2{width:calc(var(--spacing) * 2);height:calc(var(--spacing) * 2)}.size-4{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.size-full{width:100%;height:100%}.h-32{height:calc(var(--spacing) * 32)}.h-full{height:100%}.min-h-96{min-height:calc(var(--spacing) * 96)}.w-48{width:calc(var(--spacing) * 48)}.w-\[137px\]{width:137px}.w-full{width:100%}.max-w-3xl{max-width:var(--container-3xl)}.max-w-\[200px\]{max-width:200px}.flex-1{flex:1}.shrink-0{flex-shrink:0}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.resize-y{resize:vertical}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-start{align-items:flex-start}.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)}.gap-6{gap:calc(var(--spacing) * 6)}.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-\[\#3d3d5c\]{border-color:#3d3d5c}.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-slate-600{border-color:var(--color-slate-600)}.border-slate-700{border-color:var(--color-slate-700)}.bg-\[\#1a1a2e\]{background-color:#1a1a2e}.bg-\[\#2d2d44\]{background-color:#2d2d44}.bg-blue-50{background-color:var(--color-blue-50)}.bg-blue-500\/20{background-color:#3080ff33}@supports (color:color-mix(in lab, red, red)){.bg-blue-500\/20{background-color:color-mix(in oklab, var(--color-blue-500) 20%, transparent)}}.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-gray-400{background-color:var(--color-gray-400)}.bg-gray-600{background-color:var(--color-gray-600)}.bg-indigo-100{background-color:var(--color-indigo-100)}.bg-indigo-600{background-color:var(--color-indigo-600)}.bg-slate-800{background-color:var(--color-slate-800)}.bg-slate-900{background-color:var(--color-slate-900)}.bg-white{background-color:var(--color-white)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.p-5{padding:calc(var(--spacing) * 5)}.p-6{padding:calc(var(--spacing) * 6)}.p-8{padding:calc(var(--spacing) * 8)}.p-\[10px\]{padding:10px}.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-\[\#f0f0f0\]{color:#f0f0f0}.text-blue-400{color:var(--color-blue-400)}.text-emerald-800{color:var(--color-emerald-800)}.text-gray-100{color:var(--color-gray-100)}.text-gray-400{color:var(--color-gray-400)}.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-indigo-700{color:var(--color-indigo-700)}.text-red-600{color:var(--color-red-600)}.text-white{color:var(--color-white)}.opacity-50{opacity:.5}.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-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-200{--tw-duration:.2s;transition-duration:.2s}@media (hover:hover){.hover\:border-indigo-300:hover{border-color:var(--color-indigo-300)}.hover\:border-slate-500:hover{border-color:var(--color-slate-500)}.hover\:bg-blue-700:hover{background-color:var(--color-blue-700)}.hover\:bg-indigo-200:hover{background-color:var(--color-indigo-200)}.hover\:bg-indigo-700:hover{background-color:var(--color-indigo-700)}.hover\:bg-slate-500\/20:hover{background-color:#62748e33}@supports (color:color-mix(in lab, red, red)){.hover\:bg-slate-500\/20:hover{background-color:color-mix(in oklab, var(--color-slate-500) 20%, transparent)}}}.focus\:border-indigo-500:focus{border-color:var(--color-indigo-500)}.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-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\:outline-none:focus{--tw-outline-style:none;outline-style:none}}body{margin:calc(var(--spacing) * 0);background-color:var(--color-gray-100);padding:calc(var(--spacing) * 5);font-family:var(--font-sans)}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@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}
|
|
3
|
+
/*$vite$:1*/
|
package/dist/vue.cjs
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
`)}`;o.sendTextMessage(i)}return(t,i)=>(e.openBlock(),e.createElementBlock("div",k,[s.value?(e.openBlock(),e.createElementBlock("div",E,[s.value.title?(e.openBlock(),e.createElementBlock("h2",N,e.toDisplayString(s.value.title),1)):e.createCommentVNode("",!0),e.createElementVNode("div",S,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value.questions,(n,r)=>(e.openBlock(),e.createElementBlock("div",{key:r,class:"bg-slate-800 rounded-lg p-6 border-2 border-slate-700"},[e.createElementVNode("div",w,[e.createElementVNode("span",V,e.toDisplayString(r+1)+".",1),e.createTextVNode(" "+e.toDisplayString(n.question),1)]),e.createElementVNode("div",B,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.choices,(v,c)=>(e.openBlock(),e.createElementBlock("label",{key:c,class:e.normalizeClass([b(r,c),"flex items-start p-4 rounded-lg cursor-pointer transition-all duration-200 border-2"])},[e.withDirectives(e.createElementVNode("input",{type:"radio",name:`question-${r}`,value:c,"onUpdate:modelValue":g=>l.value[r]=g,class:"mt-1 mr-3 size-4 shrink-0"},null,8,C),[[e.vModelRadio,l.value[r]]]),e.createElementVNode("span",D,[e.createElementVNode("span",q,e.toDisplayString(String.fromCharCode(65+c))+".",1),e.createTextVNode(" "+e.toDisplayString(v),1)])],2))),128))])]))),128))]),e.createElementVNode("div",T,[e.createElementVNode("button",{onClick:y,disabled:!p.value,class:e.normalizeClass([p.value?"bg-blue-600 hover:bg-blue-700":"bg-gray-600 cursor-not-allowed opacity-50","py-3 px-8 rounded-lg text-white font-semibold text-lg transition-colors border-none cursor-pointer"])}," Submit Answers ",10,$)]),e.createElementVNode("div",O,e.toDisplayString(u.value)+" / "+e.toDisplayString(s.value.questions.length)+" questions answered ",1)])):e.createCommentVNode("",!0)]))}}),A={class:"p-3 bg-blue-50 rounded-md"},L={key:0,class:"flex flex-col gap-2"},M={class:"text-sm font-semibold text-gray-800 text-center"},z={class:"text-center"},j={class:"inline-block bg-blue-600 text-white text-xs font-bold py-1 px-3 rounded-full"},Q={class:"text-xs text-gray-600 overflow-hidden line-clamp-2"},F={class:"flex justify-center gap-1"},P={key:0,class:"text-xs text-gray-500"},f=e.defineComponent({__name:"Preview",props:{result:{}},setup(d){const m=d,o=e.computed(()=>m.result.jsonData);return(_,s)=>(e.openBlock(),e.createElementBlock("div",A,[o.value?(e.openBlock(),e.createElementBlock("div",L,[e.createElementVNode("div",M,e.toDisplayString(o.value.title||"Quiz"),1),e.createElementVNode("div",z,[e.createElementVNode("span",j,e.toDisplayString(o.value.questions.length)+" "+e.toDisplayString(o.value.questions.length===1?"Question":"Questions"),1)]),e.createElementVNode("div",Q,e.toDisplayString(o.value.questions[0]?.question),1),e.createElementVNode("div",F,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Math.min(o.value.questions[0]?.choices.length||0,4),(l,u)=>(e.openBlock(),e.createElementBlock("div",{key:u,class:"size-2 bg-gray-400 rounded-full"}))),128)),(o.value.questions[0]?.choices.length||0)>4?(e.openBlock(),e.createElementBlock("div",P," +"+e.toDisplayString(o.value.questions[0].choices.length-4),1)):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0)]))}}),x={...a.pluginCore,viewComponent:h,previewComponent:f},R={plugin:x};exports.SAMPLES=a.SAMPLES;exports.TOOL_DEFINITION=a.TOOL_DEFINITION;exports.TOOL_NAME=a.TOOL_NAME;exports.executeQuiz=a.executeQuiz;exports.pluginCore=a.pluginCore;exports.Preview=f;exports.View=h;exports.default=R;exports.plugin=x;
|
|
1
|
+
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require(`./plugin-BDTug9SB.cjs`);;/* empty css */let t=require(`vue`);var n={class:`size-full overflow-y-auto p-8 bg-slate-900`},r={key:0,class:`max-w-3xl w-full mx-auto`},i={key:0,class:`text-gray-100 text-3xl font-bold mb-8 text-center`},a={class:`flex flex-col gap-6`},o={class:`text-white text-lg font-semibold mb-4`},s={class:`text-blue-400 mr-2`},c={class:`flex flex-col gap-3`},l=[`name`,`value`,`onUpdate:modelValue`],u={class:`text-white flex-1`},d={class:`font-semibold mr-2`},f={class:`mt-8 flex justify-center`},p=[`disabled`],m={class:`mt-4 text-center text-gray-400 text-sm`},h=(0,t.defineComponent)({__name:`View`,props:{selectedResult:{},sendTextMessage:{type:Function}},emits:[`updateResult`],setup(e,{emit:h}){let g=e,_=h,v=(0,t.ref)(null),y=(0,t.ref)([]);(0,t.watch)(()=>g.selectedResult,e=>{e?.toolName===`putQuestions`&&e.jsonData&&(v.value=e.jsonData,e.viewState?.userAnswers?y.value=e.viewState.userAnswers:y.value=Array(v.value.questions.length).fill(null))},{immediate:!0}),(0,t.watch)(y,e=>{g.selectedResult&&e&&_(`updateResult`,{...g.selectedResult,viewState:{userAnswers:e}})},{deep:!0});let b=(0,t.computed)(()=>y.value.filter(e=>e!==null).length),x=(0,t.computed)(()=>v.value&&b.value===v.value.questions.length);function S(e,t){return y.value[e]===t?`border-blue-500 bg-blue-500/20`:`border-slate-600 hover:border-slate-500 hover:bg-slate-500/20`}function C(){if(!v.value||!x.value)return;let e=`Here are my answers:\n${y.value.map((e,t)=>e===null?null:`Q${t+1}: ${String.fromCharCode(65+e)} - ${v.value.questions[t].choices[e]}`).filter(e=>e!==null).join(`
|
|
2
|
+
`)}`;g.sendTextMessage(e)}return(e,h)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,n,[v.value?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,r,[v.value.title?((0,t.openBlock)(),(0,t.createElementBlock)(`h2`,i,(0,t.toDisplayString)(v.value.title),1)):(0,t.createCommentVNode)(``,!0),(0,t.createElementVNode)(`div`,a,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(v.value.questions,(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:n,class:`bg-slate-800 rounded-lg p-6 border-2 border-slate-700`},[(0,t.createElementVNode)(`div`,o,[(0,t.createElementVNode)(`span`,s,(0,t.toDisplayString)(n+1)+`.`,1),(0,t.createTextVNode)(` `+(0,t.toDisplayString)(e.question),1)]),(0,t.createElementVNode)(`div`,c,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(e.choices,(e,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`label`,{key:r,class:(0,t.normalizeClass)([S(n,r),`flex items-start p-4 rounded-lg cursor-pointer transition-all duration-200 border-2`])},[(0,t.withDirectives)((0,t.createElementVNode)(`input`,{type:`radio`,name:`question-${n}`,value:r,"onUpdate:modelValue":e=>y.value[n]=e,class:`mt-1 mr-3 size-4 shrink-0`},null,8,l),[[t.vModelRadio,y.value[n]]]),(0,t.createElementVNode)(`span`,u,[(0,t.createElementVNode)(`span`,d,(0,t.toDisplayString)(String.fromCharCode(65+r))+`.`,1),(0,t.createTextVNode)(` `+(0,t.toDisplayString)(e),1)])],2))),128))])]))),128))]),(0,t.createElementVNode)(`div`,f,[(0,t.createElementVNode)(`button`,{onClick:C,disabled:!x.value,class:(0,t.normalizeClass)([x.value?`bg-blue-600 hover:bg-blue-700`:`bg-gray-600 cursor-not-allowed opacity-50`,`py-3 px-8 rounded-lg text-white font-semibold text-lg transition-colors border-none cursor-pointer`])},` Submit Answers `,10,p)]),(0,t.createElementVNode)(`div`,m,(0,t.toDisplayString)(b.value)+` / `+(0,t.toDisplayString)(v.value.questions.length)+` questions answered `,1)])):(0,t.createCommentVNode)(``,!0)]))}}),g={class:`p-3 bg-blue-50 rounded-md`},_={key:0,class:`flex flex-col gap-2`},v={class:`text-sm font-semibold text-gray-800 text-center`},y={class:`text-center`},b={class:`inline-block bg-blue-600 text-white text-xs font-bold py-1 px-3 rounded-full`},x={class:`text-xs text-gray-600 overflow-hidden line-clamp-2`},S={class:`flex justify-center gap-1`},C={key:0,class:`text-xs text-gray-500`},w=(0,t.defineComponent)({__name:`Preview`,props:{result:{}},setup(e){let n=e,r=(0,t.computed)(()=>n.result.jsonData);return(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,g,[r.value?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,_,[(0,t.createElementVNode)(`div`,v,(0,t.toDisplayString)(r.value.title||`Quiz`),1),(0,t.createElementVNode)(`div`,y,[(0,t.createElementVNode)(`span`,b,(0,t.toDisplayString)(r.value.questions.length)+` `+(0,t.toDisplayString)(r.value.questions.length===1?`Question`:`Questions`),1)]),(0,t.createElementVNode)(`div`,x,(0,t.toDisplayString)(r.value.questions[0]?.question),1),(0,t.createElementVNode)(`div`,S,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(Math.min(r.value.questions[0]?.choices.length||0,4),(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:n,class:`size-2 bg-gray-400 rounded-full`}))),128)),(r.value.questions[0]?.choices.length||0)>4?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,C,` +`+(0,t.toDisplayString)(r.value.questions[0].choices.length-4),1)):(0,t.createCommentVNode)(``,!0)])])):(0,t.createCommentVNode)(``,!0)]))}}),T={...e.n,viewComponent:h,previewComponent:w},E={plugin:T};exports.Preview=w,exports.SAMPLES=e.r,exports.TOOL_DEFINITION=e.i,exports.TOOL_NAME=e.a,exports.View=h,exports.default=E,exports.executeQuiz=e.t,exports.plugin=T,exports.pluginCore=e.n;
|
package/dist/vue.js
CHANGED
|
@@ -1,146 +1,91 @@
|
|
|
1
|
+
import { a as e, i as t, n, r, t as i } from "./plugin-Dc-SF02-.js";
|
|
1
2
|
/* empty css */
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
e("button", {
|
|
92
|
-
onClick: z,
|
|
93
|
-
disabled: !p.value,
|
|
94
|
-
class: q([p.value ? "bg-blue-600 hover:bg-blue-700" : "bg-gray-600 cursor-not-allowed opacity-50", "py-3 px-8 rounded-lg text-white font-semibold text-lg transition-colors border-none cursor-pointer"])
|
|
95
|
-
}, " Submit Answers ", 10, H)
|
|
96
|
-
]),
|
|
97
|
-
e("div", G, a(v.value) + " / " + a(o.value.questions.length) + " questions answered ", 1)
|
|
98
|
-
])) : m("", !0)
|
|
99
|
-
]));
|
|
100
|
-
}
|
|
101
|
-
}), K = { class: "p-3 bg-blue-50 rounded-md" }, W = {
|
|
102
|
-
key: 0,
|
|
103
|
-
class: "flex flex-col gap-2"
|
|
104
|
-
}, X = { class: "text-sm font-semibold text-gray-800 text-center" }, Y = { class: "text-center" }, Z = { class: "inline-block bg-blue-600 text-white text-xs font-bold py-1 px-3 rounded-full" }, I = { class: "text-xs text-gray-600 overflow-hidden line-clamp-2" }, ee = { class: "flex justify-center gap-1" }, te = {
|
|
105
|
-
key: 0,
|
|
106
|
-
class: "text-xs text-gray-500"
|
|
107
|
-
}, se = /* @__PURE__ */ S({
|
|
108
|
-
__name: "Preview",
|
|
109
|
-
props: {
|
|
110
|
-
result: {}
|
|
111
|
-
},
|
|
112
|
-
setup(_) {
|
|
113
|
-
const h = _, s = x(() => h.result.jsonData);
|
|
114
|
-
return (w, o) => (n(), l("div", K, [
|
|
115
|
-
s.value ? (n(), l("div", W, [
|
|
116
|
-
e("div", X, a(s.value.title || "Quiz"), 1),
|
|
117
|
-
e("div", Y, [
|
|
118
|
-
e("span", Z, a(s.value.questions.length) + " " + a(s.value.questions.length === 1 ? "Question" : "Questions"), 1)
|
|
119
|
-
]),
|
|
120
|
-
e("div", I, a(s.value.questions[0]?.question), 1),
|
|
121
|
-
e("div", ee, [
|
|
122
|
-
(n(!0), l(b, null, y(Math.min(s.value.questions[0]?.choices.length || 0, 4), (i, v) => (n(), l("div", {
|
|
123
|
-
key: v,
|
|
124
|
-
class: "size-2 bg-gray-400 rounded-full"
|
|
125
|
-
}))), 128)),
|
|
126
|
-
(s.value.questions[0]?.choices.length || 0) > 4 ? (n(), l("div", te, " +" + a(s.value.questions[0].choices.length - 4), 1)) : m("", !0)
|
|
127
|
-
])
|
|
128
|
-
])) : m("", !0)
|
|
129
|
-
]));
|
|
130
|
-
}
|
|
131
|
-
}), oe = {
|
|
132
|
-
...D,
|
|
133
|
-
viewComponent: J,
|
|
134
|
-
previewComponent: se
|
|
135
|
-
}, ie = { plugin: oe };
|
|
136
|
-
export {
|
|
137
|
-
se as Preview,
|
|
138
|
-
ce as SAMPLES,
|
|
139
|
-
de as TOOL_DEFINITION,
|
|
140
|
-
A as TOOL_NAME,
|
|
141
|
-
J as View,
|
|
142
|
-
ie as default,
|
|
143
|
-
ve as executeQuiz,
|
|
144
|
-
oe as plugin,
|
|
145
|
-
D as pluginCore
|
|
146
|
-
};
|
|
3
|
+
import { Fragment as a, computed as o, createCommentVNode as s, createElementBlock as c, createElementVNode as l, createTextVNode as u, defineComponent as d, normalizeClass as f, openBlock as p, ref as m, renderList as h, toDisplayString as g, vModelRadio as _, watch as v, withDirectives as y } from "vue";
|
|
4
|
+
//#region src/vue/View.vue?vue&type=script&setup=true&lang.ts
|
|
5
|
+
var b = { class: "size-full overflow-y-auto p-8 bg-slate-900" }, x = {
|
|
6
|
+
key: 0,
|
|
7
|
+
class: "max-w-3xl w-full mx-auto"
|
|
8
|
+
}, S = {
|
|
9
|
+
key: 0,
|
|
10
|
+
class: "text-gray-100 text-3xl font-bold mb-8 text-center"
|
|
11
|
+
}, C = { class: "flex flex-col gap-6" }, w = { class: "text-white text-lg font-semibold mb-4" }, T = { class: "text-blue-400 mr-2" }, E = { class: "flex flex-col gap-3" }, D = [
|
|
12
|
+
"name",
|
|
13
|
+
"value",
|
|
14
|
+
"onUpdate:modelValue"
|
|
15
|
+
], O = { class: "text-white flex-1" }, k = { class: "font-semibold mr-2" }, A = { class: "mt-8 flex justify-center" }, j = ["disabled"], M = { class: "mt-4 text-center text-gray-400 text-sm" }, N = /* @__PURE__ */ d({
|
|
16
|
+
__name: "View",
|
|
17
|
+
props: {
|
|
18
|
+
selectedResult: {},
|
|
19
|
+
sendTextMessage: { type: Function }
|
|
20
|
+
},
|
|
21
|
+
emits: ["updateResult"],
|
|
22
|
+
setup(e, { emit: t }) {
|
|
23
|
+
let n = e, r = t, i = m(null), d = m([]);
|
|
24
|
+
v(() => n.selectedResult, (e) => {
|
|
25
|
+
e?.toolName === "putQuestions" && e.jsonData && (i.value = e.jsonData, e.viewState?.userAnswers ? d.value = e.viewState.userAnswers : d.value = Array(i.value.questions.length).fill(null));
|
|
26
|
+
}, { immediate: !0 }), v(d, (e) => {
|
|
27
|
+
n.selectedResult && e && r("updateResult", {
|
|
28
|
+
...n.selectedResult,
|
|
29
|
+
viewState: { userAnswers: e }
|
|
30
|
+
});
|
|
31
|
+
}, { deep: !0 });
|
|
32
|
+
let N = o(() => d.value.filter((e) => e !== null).length), P = o(() => i.value && N.value === i.value.questions.length);
|
|
33
|
+
function F(e, t) {
|
|
34
|
+
return d.value[e] === t ? "border-blue-500 bg-blue-500/20" : "border-slate-600 hover:border-slate-500 hover:bg-slate-500/20";
|
|
35
|
+
}
|
|
36
|
+
function I() {
|
|
37
|
+
if (!i.value || !P.value) return;
|
|
38
|
+
let e = `Here are my answers:\n${d.value.map((e, t) => e === null ? null : `Q${t + 1}: ${String.fromCharCode(65 + e)} - ${i.value.questions[t].choices[e]}`).filter((e) => e !== null).join("\n")}`;
|
|
39
|
+
n.sendTextMessage(e);
|
|
40
|
+
}
|
|
41
|
+
return (e, t) => (p(), c("div", b, [i.value ? (p(), c("div", x, [
|
|
42
|
+
i.value.title ? (p(), c("h2", S, g(i.value.title), 1)) : s("", !0),
|
|
43
|
+
l("div", C, [(p(!0), c(a, null, h(i.value.questions, (e, t) => (p(), c("div", {
|
|
44
|
+
key: t,
|
|
45
|
+
class: "bg-slate-800 rounded-lg p-6 border-2 border-slate-700"
|
|
46
|
+
}, [l("div", w, [l("span", T, g(t + 1) + ".", 1), u(" " + g(e.question), 1)]), l("div", E, [(p(!0), c(a, null, h(e.choices, (e, n) => (p(), c("label", {
|
|
47
|
+
key: n,
|
|
48
|
+
class: f([F(t, n), "flex items-start p-4 rounded-lg cursor-pointer transition-all duration-200 border-2"])
|
|
49
|
+
}, [y(l("input", {
|
|
50
|
+
type: "radio",
|
|
51
|
+
name: `question-${t}`,
|
|
52
|
+
value: n,
|
|
53
|
+
"onUpdate:modelValue": (e) => d.value[t] = e,
|
|
54
|
+
class: "mt-1 mr-3 size-4 shrink-0"
|
|
55
|
+
}, null, 8, D), [[_, d.value[t]]]), l("span", O, [l("span", k, g(String.fromCharCode(65 + n)) + ".", 1), u(" " + g(e), 1)])], 2))), 128))])]))), 128))]),
|
|
56
|
+
l("div", A, [l("button", {
|
|
57
|
+
onClick: I,
|
|
58
|
+
disabled: !P.value,
|
|
59
|
+
class: f([P.value ? "bg-blue-600 hover:bg-blue-700" : "bg-gray-600 cursor-not-allowed opacity-50", "py-3 px-8 rounded-lg text-white font-semibold text-lg transition-colors border-none cursor-pointer"])
|
|
60
|
+
}, " Submit Answers ", 10, j)]),
|
|
61
|
+
l("div", M, g(N.value) + " / " + g(i.value.questions.length) + " questions answered ", 1)
|
|
62
|
+
])) : s("", !0)]));
|
|
63
|
+
}
|
|
64
|
+
}), P = { class: "p-3 bg-blue-50 rounded-md" }, F = {
|
|
65
|
+
key: 0,
|
|
66
|
+
class: "flex flex-col gap-2"
|
|
67
|
+
}, I = { class: "text-sm font-semibold text-gray-800 text-center" }, L = { class: "text-center" }, R = { class: "inline-block bg-blue-600 text-white text-xs font-bold py-1 px-3 rounded-full" }, z = { class: "text-xs text-gray-600 overflow-hidden line-clamp-2" }, B = { class: "flex justify-center gap-1" }, V = {
|
|
68
|
+
key: 0,
|
|
69
|
+
class: "text-xs text-gray-500"
|
|
70
|
+
}, H = /* @__PURE__ */ d({
|
|
71
|
+
__name: "Preview",
|
|
72
|
+
props: { result: {} },
|
|
73
|
+
setup(e) {
|
|
74
|
+
let t = e, n = o(() => t.result.jsonData);
|
|
75
|
+
return (e, t) => (p(), c("div", P, [n.value ? (p(), c("div", F, [
|
|
76
|
+
l("div", I, g(n.value.title || "Quiz"), 1),
|
|
77
|
+
l("div", L, [l("span", R, g(n.value.questions.length) + " " + g(n.value.questions.length === 1 ? "Question" : "Questions"), 1)]),
|
|
78
|
+
l("div", z, g(n.value.questions[0]?.question), 1),
|
|
79
|
+
l("div", B, [(p(!0), c(a, null, h(Math.min(n.value.questions[0]?.choices.length || 0, 4), (e, t) => (p(), c("div", {
|
|
80
|
+
key: t,
|
|
81
|
+
class: "size-2 bg-gray-400 rounded-full"
|
|
82
|
+
}))), 128)), (n.value.questions[0]?.choices.length || 0) > 4 ? (p(), c("div", V, " +" + g(n.value.questions[0].choices.length - 4), 1)) : s("", !0)])
|
|
83
|
+
])) : s("", !0)]));
|
|
84
|
+
}
|
|
85
|
+
}), U = {
|
|
86
|
+
...n,
|
|
87
|
+
viewComponent: N,
|
|
88
|
+
previewComponent: H
|
|
89
|
+
}, W = { plugin: U };
|
|
90
|
+
//#endregion
|
|
91
|
+
export { H as Preview, r as SAMPLES, t as TOOL_DEFINITION, e as TOOL_NAME, N as View, W as default, i as executeQuiz, U as plugin, n as pluginCore };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mulmochat-plugin/quiz",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.3",
|
|
4
4
|
"description": "Quiz plugin for MulmoChat",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -56,24 +56,26 @@
|
|
|
56
56
|
}
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
|
-
"@
|
|
59
|
+
"@eslint/js": "^10.0.1",
|
|
60
|
+
"@tailwindcss/vite": "^4.2.2",
|
|
60
61
|
"@types/react": "^19.0.0",
|
|
61
62
|
"@types/react-dom": "^19.0.0",
|
|
62
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
63
|
-
"@typescript-eslint/parser": "^8.
|
|
63
|
+
"@typescript-eslint/eslint-plugin": "^8.58.0",
|
|
64
|
+
"@typescript-eslint/parser": "^8.58.0",
|
|
64
65
|
"@vitejs/plugin-react": "^4.5.0",
|
|
65
|
-
"@vitejs/plugin-vue": "^6.0.
|
|
66
|
-
"eslint": "^
|
|
67
|
-
"eslint-plugin-vue": "^10.
|
|
68
|
-
"globals": "^17.
|
|
66
|
+
"@vitejs/plugin-vue": "^6.0.5",
|
|
67
|
+
"eslint": "^10.1.0",
|
|
68
|
+
"eslint-plugin-vue": "^10.8.0",
|
|
69
|
+
"globals": "^17.4.0",
|
|
70
|
+
"gui-chat-protocol": "^0.0.4",
|
|
69
71
|
"react": "^19.0.0",
|
|
70
72
|
"react-dom": "^19.0.0",
|
|
71
|
-
"tailwindcss": "^4.
|
|
73
|
+
"tailwindcss": "^4.2.2",
|
|
72
74
|
"typescript": "~5.9.3",
|
|
73
|
-
"vite": "^
|
|
74
|
-
"vue": "^3.5.
|
|
75
|
-
"vue-eslint-parser": "^10.
|
|
76
|
-
"vue-tsc": "^3.2.
|
|
75
|
+
"vite": "^8.0.3",
|
|
76
|
+
"vue": "^3.5.31",
|
|
77
|
+
"vue-eslint-parser": "^10.4.0",
|
|
78
|
+
"vue-tsc": "^3.2.6"
|
|
77
79
|
},
|
|
78
80
|
"keywords": [
|
|
79
81
|
"mulmochat",
|
|
@@ -84,6 +86,6 @@
|
|
|
84
86
|
],
|
|
85
87
|
"license": "MIT",
|
|
86
88
|
"dependencies": {
|
|
87
|
-
"gui-chat-protocol": "^0.0.
|
|
89
|
+
"gui-chat-protocol": "^0.0.4"
|
|
88
90
|
}
|
|
89
91
|
}
|