nuxt-convex-module 0.12.1 → 0.12.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.
@@ -1 +1 @@
1
- :root{--nui-c-context:125,125,125}html{background-color:#fff}html.dark{color:#fff;--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;background-color:#151515}::selection{background:#8884}.shiki .line{width:100%;display:inline-block;position:relative}.shiki.diff .line>span{filter:saturate(.75);opacity:.75}.shiki.diff .line-added,.shiki.diff .line-removed{scroll-margin:5em}.shiki.diff .line-added>span,.shiki.diff .line-removed>span{position:inherit;z-index:100;scroll-margin:20px;opacity:1!important}.shiki.diff .line-added>span{color:#218c3b!important}.shiki.diff .line-removed>span{color:#d15547!important}.shiki .line-added:after{background-color:#43885420}.shiki .line-added:after,.shiki .line-removed:after{content:"";display:block;position:absolute;inset:0}.shiki .line-removed:after{background-color:#8f4c3926}::view-transition-new(root){mix-blend-mode:normal;animation:none}::view-transition-old(root){mix-blend-mode:normal;animation:none}::view-transition-old(root){z-index:1}::view-transition-new(root){z-index:2147483646}.dark::view-transition-old(root){z-index:2147483646}.dark::view-transition-new(root){z-index:1}*,:after,:before{box-sizing:border-box;border-style:solid;border-width:0;border-color:var(--un-default-border-color,#e5e7eb)}:after,:before{--un-content:""}:host,html{-webkit-text-size-adjust:100%;tab-size:4;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;line-height:1.5}body{line-height:inherit;margin:0}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,pre,samp{font-feature-settings:normal;font-variation-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;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}button,input,optgroup,select,textarea{font-feature-settings:inherit;font-variation-settings:inherit;font-family:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:#0000;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}menu,ol,ul{margin:0;padding:0;list-style:none}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder{opacity:1;color:#9ca3af}textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}*,:after,:before,::backdrop{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 transparent;--un-ring-shadow:0 0 transparent;--un-shadow-inset: ;--un-shadow:0 0 transparent;--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:#93c5fd80;--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }.carbon-chevron-down{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' display='inline-block' vertical-align='middle' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M16 22L6 12l1.4-1.4l8.6 8.6l8.6-8.6L26 12z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;color:inherit;vertical-align:middle;background-color:currentColor;width:1.2em;height:1.2em;display:inline-block;-webkit-mask-size:100% 100%;mask-size:100% 100%}.carbon-data-share{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' display='inline-block' vertical-align='middle' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M5 25v-9.172l-3.586 3.586L0 18l6-6l6 6l-1.414 1.414L7 15.828V25h12v2H7a2 2 0 0 1-2-2m19-3h4a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2h-4a2 2 0 0 1-2-2v-4a2 2 0 0 1 2-2m4 6v-4h-4.001L24 28ZM27 6v9.172l3.586-3.586L32 13l-6 6l-6-6l1.414-1.414L25 15.172V6H13V4h12a2 2 0 0 1 2 2M2 6h6v2H2zm0-4h8v2H2z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;color:inherit;vertical-align:middle;background-color:currentColor;width:1.2em;height:1.2em;display:inline-block;-webkit-mask-size:100% 100%;mask-size:100% 100%}.carbon-information{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' display='inline-block' vertical-align='middle' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M17 22v-8h-4v2h2v6h-3v2h8v-2zM16 8a1.5 1.5 0 1 0 1.5 1.5A1.5 1.5 0 0 0 16 8'/%3E%3Cpath fill='currentColor' d='M16 30a14 14 0 1 1 14-14a14 14 0 0 1-14 14m0-26a12 12 0 1 0 12 12A12 12 0 0 0 16 4'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;color:inherit;vertical-align:middle;background-color:currentColor;width:1.2em;height:1.2em;display:inline-block;-webkit-mask-size:100% 100%;mask-size:100% 100%}.carbon-launch{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' display='inline-block' vertical-align='middle' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M26 28H6a2.003 2.003 0 0 1-2-2V6a2.003 2.003 0 0 1 2-2h10v2H6v20h20V16h2v10a2.003 2.003 0 0 1-2 2'/%3E%3Cpath fill='currentColor' d='M20 2v2h6.586L18 12.586L19.414 14L28 5.414V12h2V2z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;color:inherit;vertical-align:middle;background-color:currentColor;width:1.2em;height:1.2em;display:inline-block;-webkit-mask-size:100% 100%;mask-size:100% 100%}.carbon-plug{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' display='inline-block' vertical-align='middle' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M22 8h-1V2h-2v6h-6V2h-2v6h-1a2 2 0 0 0-2 2v6a8.01 8.01 0 0 0 7 7.93V30h2v-6.07A8.01 8.01 0 0 0 24 16v-6a2 2 0 0 0-2-2m0 8a6 6 0 0 1-12 0v-6h12Z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;color:inherit;vertical-align:middle;background-color:currentColor;width:1.2em;height:1.2em;display:inline-block;-webkit-mask-size:100% 100%;mask-size:100% 100%}.carbon-terminal{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' display='inline-block' vertical-align='middle' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M26 4.01H6a2 2 0 0 0-2 2v20a2 2 0 0 0 2 2h20a2 2 0 0 0 2-2v-20a2 2 0 0 0-2-2m0 2v4H6v-4Zm-20 20v-14h20v14Z'/%3E%3Cpath fill='currentColor' d='m10.76 16.18l2.82 2.83l-2.82 2.83l1.41 1.41l4.24-4.24l-4.24-4.24z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;color:inherit;vertical-align:middle;background-color:currentColor;width:1.2em;height:1.2em;display:inline-block;-webkit-mask-size:100% 100%;mask-size:100% 100%}.carbon-user-avatar{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' display='inline-block' vertical-align='middle' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M16 8a5 5 0 1 0 5 5a5 5 0 0 0-5-5m0 8a3 3 0 1 1 3-3a3.003 3.003 0 0 1-3 3'/%3E%3Cpath fill='currentColor' d='M16 2a14 14 0 1 0 14 14A14.016 14.016 0 0 0 16 2m-6 24.377V25a3.003 3.003 0 0 1 3-3h6a3.003 3.003 0 0 1 3 3v1.377a11.9 11.9 0 0 1-12 0m13.993-1.451A5 5 0 0 0 19 20h-6a5 5 0 0 0-4.992 4.926a12 12 0 1 1 15.985 0'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;color:inherit;vertical-align:middle;background-color:currentColor;width:1.2em;height:1.2em;display:inline-block;-webkit-mask-size:100% 100%;mask-size:100% 100%}.carbon-warning{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' display='inline-block' vertical-align='middle' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M16 2a14 14 0 1 0 14 14A14 14 0 0 0 16 2m0 26a12 12 0 1 1 12-12a12 12 0 0 1-12 12'/%3E%3Cpath fill='currentColor' d='M15 8h2v11h-2zm1 14a1.5 1.5 0 1 0 1.5 1.5A1.5 1.5 0 0 0 16 22'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;color:inherit;vertical-align:middle;background-color:currentColor;width:1.2em;height:1.2em;display:inline-block;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-carbon-circle-dash{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' display='inline-block' vertical-align='middle' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M7.7 4.7a14.7 14.7 0 0 0-3 3.1L6.3 9a13.3 13.3 0 0 1 2.6-2.7Zm-3.1 7.6l-1.9-.6A12.5 12.5 0 0 0 2 16h2a11.5 11.5 0 0 1 .6-3.7m-1.9 8.1a14.4 14.4 0 0 0 2 3.9l1.6-1.2a12.9 12.9 0 0 1-1.7-3.3Zm5.1 6.9a14.4 14.4 0 0 0 3.9 2l.6-1.9A12.9 12.9 0 0 1 9 25.7Zm3.9-24.6l.6 1.9A11.5 11.5 0 0 1 16 4V2a12.5 12.5 0 0 0-4.3.7m12.5 24.6a15.2 15.2 0 0 0 3.1-3.1L25.7 23a11.5 11.5 0 0 1-2.7 2.7Zm3.2-7.6l1.9.6A15.5 15.5 0 0 0 30 16h-2a11.5 11.5 0 0 1-.6 3.7m1.8-8.1a14.4 14.4 0 0 0-2-3.9l-1.6 1.2a12.9 12.9 0 0 1 1.7 3.3Zm-5.1-7a14.4 14.4 0 0 0-3.9-2l-.6 1.9a12.9 12.9 0 0 1 3.3 1.7Zm-3.8 24.7l-.6-1.9a11.5 11.5 0 0 1-3.7.6v2a21.4 21.4 0 0 0 4.3-.7'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;color:inherit;vertical-align:middle;background-color:currentColor;width:1.2em;height:1.2em;display:inline-block;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-carbon\:arrow-up-right,[i-carbon\:arrow-up-right=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' display='inline-block' vertical-align='middle' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M10 6v2h12.59L6 24.59L7.41 26L24 9.41V22h2V6z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;color:inherit;vertical-align:middle;background-color:currentColor;width:1.2em;height:1.2em;display:inline-block;-webkit-mask-size:100% 100%;mask-size:100% 100%}.n-badge{-webkit-user-select:none;user-select:none;white-space:nowrap;background-color:rgba(var(--nui-c-context),.1);--un-text-opacity:1;color:rgba(var(--nui-c-context),var(--un-text-opacity));border-radius:.25rem;margin-left:.125rem;margin-right:.125rem;padding:.125rem .375rem;font-size:.75rem;line-height:1rem}.n-button-icon{margin-left:-.2em;margin-right:.2em;font-size:1.1em}.n-icon-button{aspect-ratio:1;opacity:.5;border-radius:.25rem;justify-content:center;align-items:center;width:1.6em;height:1.6em;display:flex}.n-loading{justify-content:center;align-items:center;width:100%;height:100%;display:flex}.n-panel-grids-center{background-image:url("data:image/svg+xml,%0A%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' transform='scale(3)'%3E%3Crect x='0' y='0' width='100%25' height='100%25' fill='white'/%3E%3Cpath d='M 10,-2.55e-7 V 20 Z M -1.1677362e-8,10 H 20 Z' stroke-width='0.2' stroke='hsla(0, 0%25, 98%25, 1)' fill='none'/%3E%3C/svg%3E");background-size:40px 40px;flex-direction:column;justify-content:center;align-items:center;gap:.5rem;height:100%;display:flex}.n-tip-base{background-color:rgba(var(--nui-c-context),.04);--un-text-opacity:1;color:rgba(var(--nui-c-context),var(--un-text-opacity));border-radius:.25rem;align-items:center;gap:.5rem;padding:.4em 1em;display:flex}.n-button-base{touch-action:manipulation;opacity:.8;--un-shadow:var(--un-shadow-inset) 0 1px 2px 0 var(--un-shadow-color,#0000000d);box-shadow:var(--un-ring-offset-shadow), var(--un-ring-shadow), var(--un-shadow);border-width:1px;border-color:#9ca3af33;border-radius:.25rem;align-items:center;gap:.25rem;padding:.25em 1em;display:inline-flex;outline-offset:2px!important;outline:2px solid #0000!important}.n-icon{flex:none}.n-card-base{--un-bg-opacity:1;background-color:rgb(255 255 255/var(--un-bg-opacity));--un-shadow:var(--un-shadow-inset) 0 1px 2px 0 var(--un-shadow-color,#0000000d);box-shadow:var(--un-ring-offset-shadow), var(--un-ring-shadow), var(--un-shadow);border-width:1px;border-color:#9ca3af33;border-radius:.25rem}.n-border-base{border-color:#9ca3af33}.hover\:n-button-hover:hover{--un-text-opacity:1;color:rgba(var(--nui-c-context),var(--un-text-opacity));opacity:1;--un-border-opacity:1!important;border-color:rgba(var(--nui-c-context),var(--un-border-opacity))!important}.n-bg-active{background-color:#9ca3af0d}.dark .n-bg-base,.dark .n-card-base{--un-bg-opacity:1;background-color:rgb(21 21 21/var(--un-bg-opacity))}.n-bg-base,.n-code-block{--un-bg-opacity:1;background-color:rgb(255 255 255/var(--un-bg-opacity))}.dark .n-code-block{--un-bg-opacity:1;background-color:rgb(18 18 18/var(--un-bg-opacity))}.dark .n-tip-base{background-color:rgba(var(--nui-c-context),.12)}.hover\:n-bg-active:hover{background-color:#9ca3af0d}.n-icon-button:hover{opacity:1;background-color:#9ca3af0d}.active\:n-button-active:active{background-color:rgba(var(--nui-c-context),.05);--un-ring-width:3px;--un-ring-offset-shadow:var(--un-ring-inset) 0 0 0 var(--un-ring-offset-width) var(--un-ring-offset-color);--un-ring-shadow:var(--un-ring-inset) 0 0 0 calc(var(--un-ring-width) + var(--un-ring-offset-width)) var(--un-ring-color);box-shadow:var(--un-ring-offset-shadow), var(--un-ring-shadow), var(--un-shadow);--un-ring-color:rgba(var(--nui-c-context),.1)}.hover\:n-link-hover:hover{--un-text-opacity:1;color:rgba(var(--nui-c-context),var(--un-text-opacity));text-decoration-style:dotted;-webkit-text-decoration-color:rgba(var(--nui-c-context),var(--un-line-opacity))!important;--un-line-opacity:1!important;-webkit-text-decoration-color:rgba(var(--nui-c-context),var(--un-line-opacity))!important;text-decoration-color:rgba(var(--nui-c-context),var(--un-line-opacity))!important;opacity:1!important}.n-link-base{text-underline-offset:2px;text-decoration-line:underline;text-decoration-color:#0003}.dark .n-link-base{text-decoration-color:#fff6}.focus-visible\:n-focus-base:focus-visible{--un-ring-width:2px;--un-ring-offset-shadow:var(--un-ring-inset) 0 0 0 var(--un-ring-offset-width) var(--un-ring-offset-color);--un-ring-shadow:var(--un-ring-inset) 0 0 0 calc(var(--un-ring-width) + var(--un-ring-offset-width)) var(--un-ring-color);box-shadow:var(--un-ring-offset-shadow), var(--un-ring-shadow), var(--un-shadow);--un-ring-color:rgba(var(--nui-c-context),.5)}.n-transition{transition-property:all;transition-duration:.2s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.dark .n-panel-grids-center{background-image:url("data:image/svg+xml,%0A%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' transform='scale(3)'%3E%3Crect x='0' y='0' width='100%25' height='100%25' fill='hsl(0, 0%25, 8.5%25)'/%3E%3Cpath d='M 10,-2.55e-7 V 20 Z M -1.1677362e-8,10 H 20 Z' stroke-width='0.2' stroke='hsl(0, 0%25, 11.0%25)' fill='none'/%3E%3C/svg%3E");background-size:40px 40px}.pointer-events-none{pointer-events:none}.absolute{position:absolute}.relative{position:relative}.inset-0{inset:0}.grid{display:grid}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.mb2{margin-bottom:.5rem}.ml--1px{margin-left:-1px}.ml-auto{margin-left:auto}.mt1{margin-top:.25rem}.inline{display:inline}.inline-block,[inline-block=""]{display:inline-block}.h-full{height:100%}.h-screen{height:100vh}.max-h-80{max-height:20rem}.w-14{width:3.5rem}.w-36{width:9rem}.flex,[flex~=\~]{display:flex}.flex-inline{display:inline-flex}.flex-1{flex:1}.flex-auto{flex:auto}.shrink-0{flex-shrink:0}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.translate-y--1,[translate-y--1=""]{--un-translate-y:-.25rem;transform:translateX(var(--un-translate-x)) translateY(var(--un-translate-y)) translateZ(var(--un-translate-z)) rotate(var(--un-rotate)) rotateX(var(--un-rotate-x)) rotateY(var(--un-rotate-y)) rotateZ(var(--un-rotate-z)) skewX(var(--un-skew-x)) skewY(var(--un-skew-y)) scaleX(var(--un-scale-x)) scaleY(var(--un-scale-y)) scaleZ(var(--un-scale-z))}@keyframes pulse{0%,to{opacity:1}50%{opacity:.5}}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(1turn)}}.animate-pulse{animation:2s cubic-bezier(.4,0,.6,1) infinite pulse}.animate-spin{animation:1s linear infinite spin}.cursor-pointer,[cursor-pointer=""]{cursor:pointer}.select-none{-webkit-user-select:none;user-select:none}.place-self-start,[place-self-start=""]{place-self:start}.items-center,[items-center=""]{align-items:center}.flex-gap2,.gap-2{gap:.5rem}.gap-0\.5{gap:.125rem}.gap-1{gap:.25rem}.gap-3,[flex~=gap-3]{gap:.75rem}.gap-4{gap:1rem}.of-auto{overflow:auto}.of-hidden{overflow:hidden}.whitespace-nowrap{white-space:nowrap}.break-all{word-break:break-all}.border{border-width:1px}.border-l{border-left-width:1px}.border-r{border-right-width:1px}.rounded{border-radius:.25rem}.p2{padding:.5rem}.p4{padding:1rem}.px-0\.5em{padding-left:.5em;padding-right:.5em}.px2{padding-left:.5rem;padding-right:.5rem}.px4{padding-left:1rem;padding-right:1rem}.py-0\.1em{padding-top:.1em;padding-bottom:.1em}.py1\.5{padding-top:.375rem;padding-bottom:.375rem}.pb4{padding-bottom:1rem}.pb6{padding-bottom:1.5rem}.pt2{padding-top:.5rem}.text-left{text-align:left}.align-middle,[align-middle=""]{vertical-align:middle}.text-4xl{font-size:2.25rem;line-height:2.5rem}.text-base,[text-base=""]{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm,[text-sm=""]{font-size:.875rem;line-height:1.25rem}.text-xl,[text-xl=""]{font-size:1.25rem;line-height:1.75rem}.text-xs,[text-xs=""]{font-size:.75rem;line-height:1rem}.text-orange{--un-text-opacity:1;color:rgb(251 146 60/var(--un-text-opacity))}.text-red{--un-text-opacity:1;color:rgb(248 113 113/var(--un-text-opacity))}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.font-sans{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.uppercase{text-transform:uppercase}.underline{text-decoration-line:underline}.tab{tab-size:4}.op-0\.1{opacity:.001}.op100{opacity:1}.op100\!{opacity:1!important}.op35{opacity:.35}.op40{opacity:.4}.op50,[op50=""]{opacity:.5}.op60{opacity:.6}.op65{opacity:.65}.op75,[op75=""]{opacity:.75}.hover\:op100:hover{opacity:1}.transition,[transition=""]{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter,backdrop-filter;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-500,[duration-500=""]{transition-duration:.5s}[n~=blue]{--nui-c-context:96,165,250}[n~=green]{--nui-c-context:74,222,128}[n~=orange]{--nui-c-context:251,146,60}[n~=red]{--nui-c-context:248,113,113}[n~=xs]{font-size:.75rem}.n-disabled\:n-disabled[disabled],[disabled] .n-disabled\:n-disabled{opacity:.6;pointer-events:none;filter:saturate(0)}@media (width>=768px){.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}.n-code-block-lines code{counter-increment:step calc(-1 + var(--start,1));counter-reset:step}.n-code-block-lines code .line:before{content:counter(step);counter-increment:step;text-align:right;color:#a3a3a380;width:2.5rem;margin-right:.5rem;padding-right:.5rem;display:inline-block}details[data-v-ed672a4d],summary[data-v-ed672a4d]{border-style:none}summary[data-v-ed672a4d]{list-style:none}details[open] summary[data-v-ed672a4d]{border-style:none}details summary[data-v-ed672a4d]::-webkit-details-marker{display:none}details[open] .chevron[data-v-ed672a4d]{opacity:.75;transform:rotate(180deg)}
1
+ :root{--nui-c-context:125,125,125}html{background-color:#fff}html.dark{color:#fff;--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;background-color:#151515}::selection{background:#8884}.shiki .line{width:100%;display:inline-block;position:relative}.shiki.diff .line>span{filter:saturate(.75);opacity:.75}.shiki.diff .line-added,.shiki.diff .line-removed{scroll-margin:5em}.shiki.diff .line-added>span,.shiki.diff .line-removed>span{position:inherit;z-index:100;scroll-margin:20px;opacity:1!important}.shiki.diff .line-added>span{color:#218c3b!important}.shiki.diff .line-removed>span{color:#d15547!important}.shiki .line-added:after{background-color:#43885420}.shiki .line-added:after,.shiki .line-removed:after{content:"";display:block;position:absolute;inset:0}.shiki .line-removed:after{background-color:#8f4c3926}::view-transition-new(root){mix-blend-mode:normal;animation:none}::view-transition-old(root){mix-blend-mode:normal;animation:none}::view-transition-old(root){z-index:1}::view-transition-new(root){z-index:2147483646}.dark::view-transition-old(root){z-index:2147483646}.dark::view-transition-new(root){z-index:1}*,:after,:before{box-sizing:border-box;border-style:solid;border-width:0;border-color:var(--un-default-border-color,#e5e7eb)}:after,:before{--un-content:""}:host,html{-webkit-text-size-adjust:100%;tab-size:4;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;line-height:1.5}body{line-height:inherit;margin:0}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,pre,samp{font-feature-settings:normal;font-variation-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;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}button,input,optgroup,select,textarea{font-feature-settings:inherit;font-variation-settings:inherit;font-family:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:#0000;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}menu,ol,ul{margin:0;padding:0;list-style:none}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder{opacity:1;color:#9ca3af}textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}*,:after,:before,::backdrop{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 transparent;--un-ring-shadow:0 0 transparent;--un-shadow-inset: ;--un-shadow:0 0 transparent;--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:#93c5fd80;--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }.carbon-chevron-down{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' display='inline-block' vertical-align='middle' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M16 22L6 12l1.4-1.4l8.6 8.6l8.6-8.6L26 12z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;color:inherit;vertical-align:middle;background-color:currentColor;width:1.2em;height:1.2em;display:inline-block;-webkit-mask-size:100% 100%;mask-size:100% 100%}.carbon-data-share{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' display='inline-block' vertical-align='middle' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M5 25v-9.172l-3.586 3.586L0 18l6-6l6 6l-1.414 1.414L7 15.828V25h12v2H7a2 2 0 0 1-2-2m19-3h4a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2h-4a2 2 0 0 1-2-2v-4a2 2 0 0 1 2-2m4 6v-4h-4.001L24 28ZM27 6v9.172l3.586-3.586L32 13l-6 6l-6-6l1.414-1.414L25 15.172V6H13V4h12a2 2 0 0 1 2 2M2 6h6v2H2zm0-4h8v2H2z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;color:inherit;vertical-align:middle;background-color:currentColor;width:1.2em;height:1.2em;display:inline-block;-webkit-mask-size:100% 100%;mask-size:100% 100%}.carbon-information{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' display='inline-block' vertical-align='middle' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M17 22v-8h-4v2h2v6h-3v2h8v-2zM16 8a1.5 1.5 0 1 0 1.5 1.5A1.5 1.5 0 0 0 16 8'/%3E%3Cpath fill='currentColor' d='M16 30a14 14 0 1 1 14-14a14 14 0 0 1-14 14m0-26a12 12 0 1 0 12 12A12 12 0 0 0 16 4'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;color:inherit;vertical-align:middle;background-color:currentColor;width:1.2em;height:1.2em;display:inline-block;-webkit-mask-size:100% 100%;mask-size:100% 100%}.carbon-launch{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' display='inline-block' vertical-align='middle' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M26 28H6a2.003 2.003 0 0 1-2-2V6a2.003 2.003 0 0 1 2-2h10v2H6v20h20V16h2v10a2.003 2.003 0 0 1-2 2'/%3E%3Cpath fill='currentColor' d='M20 2v2h6.586L18 12.586L19.414 14L28 5.414V12h2V2z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;color:inherit;vertical-align:middle;background-color:currentColor;width:1.2em;height:1.2em;display:inline-block;-webkit-mask-size:100% 100%;mask-size:100% 100%}.carbon-plug{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' display='inline-block' vertical-align='middle' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M22 8h-1V2h-2v6h-6V2h-2v6h-1a2 2 0 0 0-2 2v6a8.01 8.01 0 0 0 7 7.93V30h2v-6.07A8.01 8.01 0 0 0 24 16v-6a2 2 0 0 0-2-2m0 8a6 6 0 0 1-12 0v-6h12Z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;color:inherit;vertical-align:middle;background-color:currentColor;width:1.2em;height:1.2em;display:inline-block;-webkit-mask-size:100% 100%;mask-size:100% 100%}.carbon-terminal{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' display='inline-block' vertical-align='middle' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M26 4.01H6a2 2 0 0 0-2 2v20a2 2 0 0 0 2 2h20a2 2 0 0 0 2-2v-20a2 2 0 0 0-2-2m0 2v4H6v-4Zm-20 20v-14h20v14Z'/%3E%3Cpath fill='currentColor' d='m10.76 16.18l2.82 2.83l-2.82 2.83l1.41 1.41l4.24-4.24l-4.24-4.24z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;color:inherit;vertical-align:middle;background-color:currentColor;width:1.2em;height:1.2em;display:inline-block;-webkit-mask-size:100% 100%;mask-size:100% 100%}.carbon-user-avatar{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' display='inline-block' vertical-align='middle' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M16 8a5 5 0 1 0 5 5a5 5 0 0 0-5-5m0 8a3 3 0 1 1 3-3a3.003 3.003 0 0 1-3 3'/%3E%3Cpath fill='currentColor' d='M16 2a14 14 0 1 0 14 14A14.016 14.016 0 0 0 16 2m-6 24.377V25a3.003 3.003 0 0 1 3-3h6a3.003 3.003 0 0 1 3 3v1.377a11.9 11.9 0 0 1-12 0m13.993-1.451A5 5 0 0 0 19 20h-6a5 5 0 0 0-4.992 4.926a12 12 0 1 1 15.985 0'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;color:inherit;vertical-align:middle;background-color:currentColor;width:1.2em;height:1.2em;display:inline-block;-webkit-mask-size:100% 100%;mask-size:100% 100%}.carbon-warning{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' display='inline-block' vertical-align='middle' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M16 2a14 14 0 1 0 14 14A14 14 0 0 0 16 2m0 26a12 12 0 1 1 12-12a12 12 0 0 1-12 12'/%3E%3Cpath fill='currentColor' d='M15 8h2v11h-2zm1 14a1.5 1.5 0 1 0 1.5 1.5A1.5 1.5 0 0 0 16 22'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;color:inherit;vertical-align:middle;background-color:currentColor;width:1.2em;height:1.2em;display:inline-block;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-carbon-circle-dash{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' display='inline-block' vertical-align='middle' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M7.7 4.7a14.7 14.7 0 0 0-3 3.1L6.3 9a13.3 13.3 0 0 1 2.6-2.7Zm-3.1 7.6l-1.9-.6A12.5 12.5 0 0 0 2 16h2a11.5 11.5 0 0 1 .6-3.7m-1.9 8.1a14.4 14.4 0 0 0 2 3.9l1.6-1.2a12.9 12.9 0 0 1-1.7-3.3Zm5.1 6.9a14.4 14.4 0 0 0 3.9 2l.6-1.9A12.9 12.9 0 0 1 9 25.7Zm3.9-24.6l.6 1.9A11.5 11.5 0 0 1 16 4V2a12.5 12.5 0 0 0-4.3.7m12.5 24.6a15.2 15.2 0 0 0 3.1-3.1L25.7 23a11.5 11.5 0 0 1-2.7 2.7Zm3.2-7.6l1.9.6A15.5 15.5 0 0 0 30 16h-2a11.5 11.5 0 0 1-.6 3.7m1.8-8.1a14.4 14.4 0 0 0-2-3.9l-1.6 1.2a12.9 12.9 0 0 1 1.7 3.3Zm-5.1-7a14.4 14.4 0 0 0-3.9-2l-.6 1.9a12.9 12.9 0 0 1 3.3 1.7Zm-3.8 24.7l-.6-1.9a11.5 11.5 0 0 1-3.7.6v2a21.4 21.4 0 0 0 4.3-.7'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;color:inherit;vertical-align:middle;background-color:currentColor;width:1.2em;height:1.2em;display:inline-block;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-carbon\:arrow-up-right,[i-carbon\:arrow-up-right=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' display='inline-block' vertical-align='middle' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M10 6v2h12.59L6 24.59L7.41 26L24 9.41V22h2V6z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;color:inherit;vertical-align:middle;background-color:currentColor;width:1.2em;height:1.2em;display:inline-block;-webkit-mask-size:100% 100%;mask-size:100% 100%}.n-badge{-webkit-user-select:none;user-select:none;white-space:nowrap;background-color:rgba(var(--nui-c-context),.1);--un-text-opacity:1;color:rgba(var(--nui-c-context),var(--un-text-opacity));border-radius:.25rem;margin-left:.125rem;margin-right:.125rem;padding:.125rem .375rem;font-size:.75rem;line-height:1rem}.n-button-icon{margin-left:-.2em;margin-right:.2em;font-size:1.1em}.n-icon-button{aspect-ratio:1;opacity:.5;border-radius:.25rem;justify-content:center;align-items:center;width:1.6em;height:1.6em;display:flex}.n-loading{justify-content:center;align-items:center;width:100%;height:100%;display:flex}.n-panel-grids-center{background-image:url("data:image/svg+xml,%0A%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' transform='scale(3)'%3E%3Crect x='0' y='0' width='100%25' height='100%25' fill='white'/%3E%3Cpath d='M 10,-2.55e-7 V 20 Z M -1.1677362e-8,10 H 20 Z' stroke-width='0.2' stroke='hsla(0, 0%25, 98%25, 1)' fill='none'/%3E%3C/svg%3E");background-size:40px 40px;flex-direction:column;justify-content:center;align-items:center;gap:.5rem;height:100%;display:flex}.n-tip-base{background-color:rgba(var(--nui-c-context),.04);--un-text-opacity:1;color:rgba(var(--nui-c-context),var(--un-text-opacity));border-radius:.25rem;align-items:center;gap:.5rem;padding:.4em 1em;display:flex}.n-button-base{touch-action:manipulation;opacity:.8;--un-shadow:var(--un-shadow-inset) 0 1px 2px 0 var(--un-shadow-color,#0000000d);box-shadow:var(--un-ring-offset-shadow), var(--un-ring-shadow), var(--un-shadow);border-width:1px;border-color:#9ca3af33;border-radius:.25rem;align-items:center;gap:.25rem;padding:.25em 1em;display:inline-flex;outline-offset:2px!important;outline:2px solid #0000!important}.n-icon{flex:none}.n-card-base{--un-bg-opacity:1;background-color:rgb(255 255 255/var(--un-bg-opacity));--un-shadow:var(--un-shadow-inset) 0 1px 2px 0 var(--un-shadow-color,#0000000d);box-shadow:var(--un-ring-offset-shadow), var(--un-ring-shadow), var(--un-shadow);border-width:1px;border-color:#9ca3af33;border-radius:.25rem}.n-border-base{border-color:#9ca3af33}.hover\:n-button-hover:hover{--un-text-opacity:1;color:rgba(var(--nui-c-context),var(--un-text-opacity));opacity:1;--un-border-opacity:1!important;border-color:rgba(var(--nui-c-context),var(--un-border-opacity))!important}.n-bg-active{background-color:#9ca3af0d}.dark .n-bg-base,.dark .n-card-base{--un-bg-opacity:1;background-color:rgb(21 21 21/var(--un-bg-opacity))}.n-bg-base,.n-code-block{--un-bg-opacity:1;background-color:rgb(255 255 255/var(--un-bg-opacity))}.dark .n-code-block{--un-bg-opacity:1;background-color:rgb(18 18 18/var(--un-bg-opacity))}.dark .n-tip-base{background-color:rgba(var(--nui-c-context),.12)}.hover\:n-bg-active:hover{background-color:#9ca3af0d}.n-icon-button:hover{opacity:1;background-color:#9ca3af0d}.active\:n-button-active:active{background-color:rgba(var(--nui-c-context),.05);--un-ring-width:3px;--un-ring-offset-shadow:var(--un-ring-inset) 0 0 0 var(--un-ring-offset-width) var(--un-ring-offset-color);--un-ring-shadow:var(--un-ring-inset) 0 0 0 calc(var(--un-ring-width) + var(--un-ring-offset-width)) var(--un-ring-color);box-shadow:var(--un-ring-offset-shadow), var(--un-ring-shadow), var(--un-shadow);--un-ring-color:rgba(var(--nui-c-context),.1)}.hover\:n-link-hover:hover{--un-text-opacity:1;color:rgba(var(--nui-c-context),var(--un-text-opacity));text-decoration-style:dotted;-webkit-text-decoration-color:rgba(var(--nui-c-context),var(--un-line-opacity))!important;--un-line-opacity:1!important;-webkit-text-decoration-color:rgba(var(--nui-c-context),var(--un-line-opacity))!important;text-decoration-color:rgba(var(--nui-c-context),var(--un-line-opacity))!important;opacity:1!important}.n-link-base{text-underline-offset:2px;text-decoration-line:underline;text-decoration-color:#0003}.dark .n-link-base{text-decoration-color:#fff6}.focus-visible\:n-focus-base:focus-visible{--un-ring-width:2px;--un-ring-offset-shadow:var(--un-ring-inset) 0 0 0 var(--un-ring-offset-width) var(--un-ring-offset-color);--un-ring-shadow:var(--un-ring-inset) 0 0 0 calc(var(--un-ring-width) + var(--un-ring-offset-width)) var(--un-ring-color);box-shadow:var(--un-ring-offset-shadow), var(--un-ring-shadow), var(--un-shadow);--un-ring-color:rgba(var(--nui-c-context),.5)}.n-transition{transition-property:all;transition-duration:.2s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.dark .n-panel-grids-center{background-image:url("data:image/svg+xml,%0A%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' transform='scale(3)'%3E%3Crect x='0' y='0' width='100%25' height='100%25' fill='hsl(0, 0%25, 8.5%25)'/%3E%3Cpath d='M 10,-2.55e-7 V 20 Z M -1.1677362e-8,10 H 20 Z' stroke-width='0.2' stroke='hsl(0, 0%25, 11.0%25)' fill='none'/%3E%3C/svg%3E");background-size:40px 40px}.pointer-events-none{pointer-events:none}.absolute{position:absolute}.relative{position:relative}.inset-0{inset:0}.grid{display:grid}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.mb2{margin-bottom:.5rem}.ml--1px{margin-left:-1px}.ml-auto{margin-left:auto}.mt1{margin-top:.25rem}.inline{display:inline}.inline-block,[inline-block=""]{display:inline-block}.h-full{height:100%}.h-screen{height:100vh}.max-h-80{max-height:20rem}.w-14{width:3.5rem}.w-36{width:9rem}.flex,[flex~=\~]{display:flex}.flex-inline{display:inline-flex}.flex-1{flex:1}.flex-auto{flex:auto}.shrink-0{flex-shrink:0}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.translate-y--1,[translate-y--1=""]{--un-translate-y:-.25rem;transform:translateX(var(--un-translate-x)) translateY(var(--un-translate-y)) translateZ(var(--un-translate-z)) rotate(var(--un-rotate)) rotateX(var(--un-rotate-x)) rotateY(var(--un-rotate-y)) rotateZ(var(--un-rotate-z)) skewX(var(--un-skew-x)) skewY(var(--un-skew-y)) scaleX(var(--un-scale-x)) scaleY(var(--un-scale-y)) scaleZ(var(--un-scale-z))}@keyframes pulse{0%,to{opacity:1}50%{opacity:.5}}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(1turn)}}.animate-pulse{animation:2s cubic-bezier(.4,0,.6,1) infinite pulse}.animate-spin{animation:1s linear infinite spin}.cursor-pointer,[cursor-pointer=""]{cursor:pointer}.select-none{-webkit-user-select:none;user-select:none}.place-self-start,[place-self-start=""]{place-self:start}.items-center,[items-center=""]{align-items:center}.flex-gap2,.gap-2{gap:.5rem}.gap-0\.5{gap:.125rem}.gap-1{gap:.25rem}.gap-3,[flex~=gap-3]{gap:.75rem}.gap-4{gap:1rem}.of-auto{overflow:auto}.of-hidden{overflow:hidden}.whitespace-nowrap{white-space:nowrap}.break-all{word-break:break-all}.border{border-width:1px}.border-l{border-left-width:1px}.border-r{border-right-width:1px}.rounded{border-radius:.25rem}.p2{padding:.5rem}.p4{padding:1rem}.px-0\.5em{padding-left:.5em;padding-right:.5em}.px2{padding-left:.5rem;padding-right:.5rem}.px4{padding-left:1rem;padding-right:1rem}.py-0\.1em{padding-top:.1em;padding-bottom:.1em}.py1\.5{padding-top:.375rem;padding-bottom:.375rem}.pb4{padding-bottom:1rem}.pb6{padding-bottom:1.5rem}.pt2{padding-top:.5rem}.text-left{text-align:left}.align-middle,[align-middle=""]{vertical-align:middle}.text-4xl{font-size:2.25rem;line-height:2.5rem}.text-base,[text-base=""]{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm,[text-sm=""]{font-size:.875rem;line-height:1.25rem}.text-xl,[text-xl=""]{font-size:1.25rem;line-height:1.75rem}.text-xs,[text-xs=""]{font-size:.75rem;line-height:1rem}.text-orange{--un-text-opacity:1;color:rgb(251 146 60/var(--un-text-opacity))}.text-red{--un-text-opacity:1;color:rgb(248 113 113/var(--un-text-opacity))}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.font-sans{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.uppercase{text-transform:uppercase}.underline{text-decoration-line:underline}.tab{tab-size:4}.op-0\.1{opacity:.001}.op100{opacity:1}.op100\!{opacity:1!important}.op35{opacity:.35}.op40{opacity:.4}.op50,[op50=""]{opacity:.5}.op60{opacity:.6}.op65{opacity:.65}.op75,[op75=""]{opacity:.75}.hover\:op100:hover{opacity:1}.transition,[transition=""]{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter,backdrop-filter;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-500,[duration-500=""]{transition-duration:.5s}[n~=blue]{--nui-c-context:96,165,250}[n~=green]{--nui-c-context:74,222,128}[n~=orange]{--nui-c-context:251,146,60}[n~=red]{--nui-c-context:248,113,113}[n~=xs]{font-size:.75rem}.n-disabled\:n-disabled[disabled],[disabled] .n-disabled\:n-disabled{opacity:.6;pointer-events:none;filter:saturate(0)}@media (width>=768px){.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}.n-code-block-lines code{counter-increment:step calc(-1 + var(--start,1));counter-reset:step}.n-code-block-lines code .line:before{content:counter(step);counter-increment:step;text-align:right;color:#a3a3a380;width:2.5rem;margin-right:.5rem;padding-right:.5rem;display:inline-block}details[data-v-d63f4585],summary[data-v-d63f4585]{border-style:none}summary[data-v-d63f4585]{list-style:none}details[open] summary[data-v-d63f4585]{border-style:none}details summary[data-v-d63f4585]::-webkit-details-marker{display:none}details[open] .chevron[data-v-d63f4585]{opacity:.75;transform:rotate(180deg)}
@@ -1 +1 @@
1
- <!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><script type="importmap">{"imports":{"#entry":"/__nuxt-convex-module/_nuxt/DGCFzitC.js"}}</script><link rel="stylesheet" href="/__nuxt-convex-module/_nuxt/entry.egvhSnkx.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/__nuxt-convex-module/_nuxt/DGCFzitC.js"><script type="module" src="/__nuxt-convex-module/_nuxt/DGCFzitC.js" crossorigin></script><link rel="prefetch" as="script" crossorigin href="/__nuxt-convex-module/_nuxt/BPtiIkWa.js"></head><body><div id="__nuxt"></div><div id="teleports"></div><script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__nuxt-convex-module",buildId:"21e8e3bc-c73b-4eb5-acad-05b1db0c6a1a",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1792856688114,false]</script></body></html>
1
+ <!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><script type="importmap">{"imports":{"#entry":"/__nuxt-convex-module/_nuxt/COXexnyN.js"}}</script><link rel="stylesheet" href="/__nuxt-convex-module/_nuxt/entry.DsZySRVW.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/__nuxt-convex-module/_nuxt/COXexnyN.js"><script type="module" src="/__nuxt-convex-module/_nuxt/COXexnyN.js" crossorigin></script><link rel="prefetch" as="script" crossorigin href="/__nuxt-convex-module/_nuxt/BPtiIkWa.js"></head><body><div id="__nuxt"></div><div id="teleports"></div><script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__nuxt-convex-module",buildId:"bfa6df52-caf6-46de-a611-bdf9d975bd3f",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1793468157767,false]</script></body></html>
package/dist/module.d.mts CHANGED
@@ -133,6 +133,7 @@ declare module '@nuxt/schema' {
133
133
  siteUrl: string;
134
134
  crossDomainCallbackRoute: string;
135
135
  loginPath: string;
136
+ authRoute: string;
136
137
  };
137
138
  }
138
139
  }
package/dist/module.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "compatibility": {
6
6
  "nuxt": ">=4.6.0"
7
7
  },
8
- "version": "0.12.1",
8
+ "version": "0.12.3",
9
9
  "builder": {
10
10
  "@nuxt/module-builder": "1.0.3",
11
11
  "unbuild": "unknown"
package/dist/module.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { useLogger, updateTemplates, defineNuxtModule, createResolver, addPlugin, hasNuxtModule, addNitroPlugin, addTypeTemplate, addImports, addServerImports, addComponent, addServerHandler, extendRouteRules, addRouteMiddleware } from '@nuxt/kit';
1
+ import { useLogger, defineNuxtModule, createResolver, addPlugin, hasNuxtModule, addNitroPlugin, addTypeTemplate, addImports, addServerImports, addComponent, addServerHandler, extendRouteRules, addRouteMiddleware } from '@nuxt/kit';
2
2
  import { dirname, join, isAbsolute, basename } from 'node:path';
3
3
  import { detectAgent } from 'std-env';
4
4
  import { existsSync, readFileSync, statSync, writeFileSync } from 'node:fs';
@@ -100,6 +100,18 @@ function integrationWarnings(flags, isInstalled) {
100
100
  }
101
101
  return warnings;
102
102
  }
103
+ function clientDependencies(flags, isInstalled) {
104
+ const entries = [
105
+ "convex/browser",
106
+ "convex/server",
107
+ "convex/values",
108
+ ...flags.betterAuth ? ["@convex-dev/better-auth/client/plugins", "better-auth/vue"] : [],
109
+ ...flags.clerk ? ["@clerk/vue"] : [],
110
+ ...flags.auth0 ? ["@auth0/auth0-vue"] : [],
111
+ ...flags.polar ? ["@polar-sh/checkout/embed"] : []
112
+ ];
113
+ return entries.filter((entry) => isInstalled(entry.split("/").slice(0, entry.startsWith("@") ? 2 : 1).join("/")));
114
+ }
103
115
  function formatStartupSummary(url, functionsDir, integrations) {
104
116
  const names = {
105
117
  betterAuth: "better-auth",
@@ -194,15 +206,10 @@ function getConvexAliases(rootDir) {
194
206
  };
195
207
  }
196
208
 
197
- const CODEGEN_GUARDED_TEMPLATES = ["types/nuxt-convex-module-api-fallback.d.ts"];
198
209
  function watchConvexCodegen(nuxt) {
199
210
  if (!nuxt.options.dev) return;
200
211
  const generatedDir = join(nuxt.options.rootDir, resolveFunctionsDir(nuxt.options.rootDir), "_generated");
201
212
  if (!nuxt.options.watch.includes(generatedDir)) nuxt.options.watch.push(generatedDir);
202
- nuxt.hook("builder:watch", async (_event, path) => {
203
- if (!path.replace(/\\/g, "/").includes("_generated/api")) return;
204
- await updateTemplates({ filter: (template) => CODEGEN_GUARDED_TEMPLATES.includes(template.filename) });
205
- });
206
213
  }
207
214
 
208
215
  const PLAIN_NUXT_DEV = /^(?:npx )?(?:nuxt|nuxi) dev(?: [^&|;"']*)?$/;
@@ -395,6 +402,7 @@ const module$1 = defineNuxtModule({
395
402
  for (const message of diagnostics.errors) logger.error(message);
396
403
  for (const message of diagnostics.warnings) logger.warn(message);
397
404
  nuxt.options.runtimeConfig.public.convex.loginPath = diagnostics.loginPath;
405
+ nuxt.options.runtimeConfig.public.convex.authRoute = diagnostics.authRoute;
398
406
  registerAuthClientAlias(resolver, nuxt, options);
399
407
  registerConvexAliases(nuxt);
400
408
  registerConvexTypeFallback(nuxt);
@@ -469,6 +477,13 @@ function registerIntegrations(resolver, nuxt, options, autoImports, authRoute) {
469
477
  }
470
478
  const flags = { betterAuth, clerk, auth0, polar, security };
471
479
  for (const message of integrationWarnings(flags, (pkg) => isPackageInstalled(pkg, rootDir))) logger.warn(message);
480
+ if (nuxt.options.dev) {
481
+ nuxt.options.vite.optimizeDeps ??= {};
482
+ nuxt.options.vite.optimizeDeps.include = [
483
+ ...nuxt.options.vite.optimizeDeps.include ?? [],
484
+ ...clientDependencies(flags, (pkg) => isPackageInstalled(pkg, rootDir))
485
+ ];
486
+ }
472
487
  return flags;
473
488
  }
474
489
  function readSecurityOption(nuxt) {
@@ -551,7 +566,8 @@ function registerConvexTypeFallback(nuxt) {
551
566
  logger.success("Convex codegen detected \u2014 `#convex/api` is typed from it.");
552
567
  }
553
568
  return convexTypeFallbackContents(generated, functionsDir);
554
- }
569
+ },
570
+ dependsOn: (change) => change.path.replace(/\\/g, "/").includes("_generated/api")
555
571
  }, { nuxt: true, nitro: true });
556
572
  }
557
573
  function registerVueComposables(resolver, autoImports) {
@@ -30,6 +30,11 @@ Currently set to ${url}.`
30
30
  }
31
31
  return url;
32
32
  };
33
+ const HOP_BY_HOP = ["connection", "keep-alive", "proxy-connection", "transfer-encoding", "te", "trailer", "upgrade"];
34
+ function hopByHopHeaders(headers) {
35
+ const named = (headers.get("connection") ?? "").split(",").map((name) => name.trim().toLowerCase()).filter(Boolean);
36
+ return [.../* @__PURE__ */ new Set([...HOP_BY_HOP, ...named])];
37
+ }
33
38
  const handler = async (request, siteUrl) => {
34
39
  const requestUrl = new URL(request.url);
35
40
  const nextUrl = `${siteUrl}${requestUrl.pathname}${requestUrl.search}`;
@@ -39,8 +44,6 @@ const handler = async (request, siteUrl) => {
39
44
  headers.delete("connection");
40
45
  headers.set("accept-encoding", "application/json");
41
46
  headers.set("host", new URL(siteUrl).host);
42
- headers.set("x-forwarded-host", requestUrl.host);
43
- headers.set("x-forwarded-proto", requestUrl.protocol.replace(/:$/, ""));
44
47
  headers.set("x-better-auth-forwarded-host", requestUrl.host);
45
48
  headers.set("x-better-auth-forwarded-proto", requestUrl.protocol.replace(/:$/, ""));
46
49
  const init = {
@@ -58,6 +61,7 @@ const handler = async (request, siteUrl) => {
58
61
  const responseHeaders = new Headers(response.headers);
59
62
  responseHeaders.delete("content-encoding");
60
63
  responseHeaders.delete("content-length");
64
+ for (const name of hopByHopHeaders(response.headers)) responseHeaders.delete(name);
61
65
  return new Response(response.body, {
62
66
  status: response.status,
63
67
  statusText: response.statusText,
@@ -78,10 +82,12 @@ const getArgsAndOptions = (args, token) => {
78
82
  return [args[0], { token }];
79
83
  };
80
84
  export function convexAuth(event, opts) {
85
+ const config = getConvexRuntimeConfig(event);
81
86
  const siteUrl = parseConvexSiteUrl(
82
- opts?.convexSiteUrl ?? getConvexRuntimeConfig().siteUrl ?? process.env.NUXT_PUBLIC_CONVEX_SITE_URL
87
+ opts?.convexSiteUrl || config.siteUrl || process.env.NUXT_PUBLIC_CONVEX_SITE_URL
83
88
  );
84
- const cacheKey = `__nuxtConvexToken:${siteUrl}|${opts?.basePath ?? ""}`;
89
+ const basePath = opts?.basePath ?? config.authRoute;
90
+ const cacheKey = `__nuxtConvexToken:${siteUrl}|${basePath ?? ""}`;
85
91
  const tokenCache = event.context;
86
92
  const cachedGetToken = ({ forceRefresh } = {}) => {
87
93
  const cached = tokenCache[cacheKey];
@@ -90,7 +96,7 @@ export function convexAuth(event, opts) {
90
96
  mutableHeaders.delete("content-length");
91
97
  mutableHeaders.delete("transfer-encoding");
92
98
  mutableHeaders.set("accept-encoding", "identity");
93
- const promise = getToken(siteUrl, mutableHeaders, { ...opts, forceRefresh });
99
+ const promise = getToken(siteUrl, mutableHeaders, { ...opts, basePath, forceRefresh });
94
100
  tokenCache[cacheKey] = promise;
95
101
  return promise;
96
102
  };
@@ -1,9 +1,10 @@
1
1
  import { computed } from "vue";
2
2
  import { defineNuxtPlugin, useRuntimeConfig, useState, useRequestEvent, useResponseHeader } from "#app";
3
3
  import { ConvexVueClient, ConvexClientKey } from "../../vue/client.js";
4
- import { CONVEX_INITIAL_TOKEN_KEY } from "../../nuxt/config.js";
4
+ import { CONVEX_INITIAL_TOKEN_KEY, closeAfterRender } from "../../nuxt/config.js";
5
5
  import { convexAuth } from "../nuxt/server.js";
6
6
  import { ConvexAuthStateKey } from "../../vue/auth/index.js";
7
+ import { BetterAuthTokenStoreKey, createBetterAuthTokenStore, seedInitialToken } from "./token-store.js";
7
8
  export async function prefetchAuthToken(event, initialToken, cacheControl) {
8
9
  try {
9
10
  const token = await convexAuth(event).getToken();
@@ -19,10 +20,13 @@ export default defineNuxtPlugin({
19
20
  name: "nuxt-convex-module:better-auth:server",
20
21
  async setup(nuxtApp) {
21
22
  const initialToken = useState(CONVEX_INITIAL_TOKEN_KEY, () => null);
23
+ const tokenStore = createBetterAuthTokenStore();
24
+ nuxtApp.vueApp.provide(BetterAuthTokenStoreKey, tokenStore);
22
25
  const url = useRuntimeConfig().public.convex.url;
23
26
  const ssrClient = url ? new ConvexVueClient(url) : void 0;
24
27
  if (ssrClient) {
25
28
  nuxtApp.vueApp.provide(ConvexClientKey, ssrClient);
29
+ closeAfterRender(nuxtApp, ssrClient);
26
30
  }
27
31
  const ssrAuthState = {
28
32
  isLoading: computed(() => true),
@@ -33,6 +37,7 @@ export default defineNuxtPlugin({
33
37
  const event = useRequestEvent();
34
38
  if (event && !import.meta.prerender) {
35
39
  await prefetchAuthToken(event, initialToken, useResponseHeader("Cache-Control"));
40
+ seedInitialToken(tokenStore, initialToken.value);
36
41
  }
37
42
  }
38
43
  });
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,18 @@
1
+ import { ref } from "vue";
2
+ export function createBetterAuthTokenStore() {
3
+ return {
4
+ cachedToken: ref(null),
5
+ cachedTokenVersion: null,
6
+ pendingToken: null,
7
+ pendingTokenVersion: null,
8
+ initialTokenUsed: false
9
+ };
10
+ }
11
+ export const BetterAuthTokenStoreKey = Symbol("BetterAuthTokenStore");
12
+ export const PENDING_AUTH_VERSION = "__pending__";
13
+ export function seedInitialToken(store, initialToken) {
14
+ if (store.initialTokenUsed || !initialToken) return;
15
+ store.cachedToken.value = initialToken;
16
+ store.cachedTokenVersion = PENDING_AUTH_VERSION;
17
+ store.initialTokenUsed = true;
18
+ }
@@ -1,18 +1,30 @@
1
- import { computed, ref } from "vue";
1
+ import { computed, effectScope, hasInjectionContext, inject, shallowRef } from "vue";
2
2
  import { authClient } from "#convex/auth-client";
3
- const cachedToken = ref(null);
4
- let cachedTokenVersion = null;
5
- let pendingToken = null;
6
- let pendingTokenVersion = null;
7
- let initialTokenUsed = false;
8
- const PENDING_AUTH_VERSION = "__pending__";
9
- const useClientSession = () => authClient.useSession();
10
- export function useBetterAuth(initialToken) {
11
- if (!initialTokenUsed && initialToken) {
12
- cachedToken.value = initialToken;
13
- cachedTokenVersion = PENDING_AUTH_VERSION;
14
- initialTokenUsed = true;
3
+ import { BetterAuthTokenStoreKey, createBetterAuthTokenStore, PENDING_AUTH_VERSION, seedInitialToken } from "./token-store.js";
4
+ const browserStore = createBetterAuthTokenStore();
5
+ function useTokenStore() {
6
+ if (!import.meta.server) return browserStore;
7
+ return (hasInjectionContext() ? inject(BetterAuthTokenStoreKey, null) : null) ?? createBetterAuthTokenStore();
8
+ }
9
+ const serverSession = () => shallowRef({
10
+ data: null,
11
+ error: null,
12
+ isPending: true,
13
+ isRefetching: false,
14
+ refetch: async () => {
15
15
  }
16
+ });
17
+ let browserSession;
18
+ let browserSessionScope;
19
+ const useClientSession = () => {
20
+ if (import.meta.server) return serverSession();
21
+ browserSessionScope ??= effectScope(true);
22
+ return browserSession ??= browserSessionScope.run(() => authClient.useSession());
23
+ };
24
+ export function useBetterAuth(initialToken) {
25
+ const store = useTokenStore();
26
+ seedInitialToken(store, initialToken);
27
+ const { cachedToken } = store;
16
28
  const session = useClientSession();
17
29
  const client = authClient;
18
30
  const authVersion = computed(() => {
@@ -26,32 +38,32 @@ export function useBetterAuth(initialToken) {
26
38
  const version = currentAuthVersion();
27
39
  if (version === null) {
28
40
  cachedToken.value = null;
29
- cachedTokenVersion = null;
30
- pendingToken = null;
31
- pendingTokenVersion = null;
41
+ store.cachedTokenVersion = null;
42
+ store.pendingToken = null;
43
+ store.pendingTokenVersion = null;
32
44
  return null;
33
45
  }
34
- if (cachedToken.value && !forceRefreshToken && cachedTokenVersion === version) {
46
+ if (cachedToken.value && !forceRefreshToken && store.cachedTokenVersion === version) {
35
47
  return cachedToken.value;
36
48
  }
37
- if (!forceRefreshToken && pendingToken && pendingTokenVersion === version) {
38
- return pendingToken;
49
+ if (!forceRefreshToken && store.pendingToken && store.pendingTokenVersion === version) {
50
+ return store.pendingToken;
39
51
  }
40
- pendingTokenVersion = version;
41
- pendingToken = client.convex.token({ fetchOptions: { throw: false } }).then(({ data }) => {
52
+ store.pendingTokenVersion = version;
53
+ const pending = store.pendingToken = client.convex.token({ fetchOptions: { throw: false } }).then(({ data }) => {
42
54
  const token = data?.token || null;
43
55
  cachedToken.value = token;
44
- cachedTokenVersion = version;
56
+ store.cachedTokenVersion = version;
45
57
  return token;
46
58
  }).catch(() => {
47
59
  cachedToken.value = null;
48
- cachedTokenVersion = version;
60
+ store.cachedTokenVersion = version;
49
61
  return null;
50
62
  }).finally(() => {
51
- pendingToken = null;
52
- pendingTokenVersion = null;
63
+ store.pendingToken = null;
64
+ store.pendingTokenVersion = null;
53
65
  });
54
- return pendingToken;
66
+ return pending;
55
67
  };
56
68
  return {
57
69
  isLoading: computed(() => session.value.isPending && !cachedToken.value),
@@ -75,9 +87,9 @@ export function useBetterAuth(initialToken) {
75
87
  };
76
88
  }
77
89
  export function __resetUseBetterAuthForTests() {
78
- cachedToken.value = null;
79
- cachedTokenVersion = null;
80
- pendingToken = null;
81
- pendingTokenVersion = null;
82
- initialTokenUsed = false;
90
+ Object.assign(browserStore, createBetterAuthTokenStore(), { cachedToken: browserStore.cachedToken });
91
+ browserStore.cachedToken.value = null;
92
+ browserSessionScope?.stop();
93
+ browserSessionScope = void 0;
94
+ browserSession = void 0;
83
95
  }
@@ -0,0 +1,52 @@
1
+ type Badge = {
2
+ badge?: string;
3
+ badgeVariant?: 'danger' | 'warning';
4
+ };
5
+ interface MessageInput {
6
+ id: string;
7
+ message: string;
8
+ description?: string;
9
+ level: 'warn' | 'error' | 'success';
10
+ notify?: boolean;
11
+ actions?: {
12
+ id: string;
13
+ label: string;
14
+ kind: 'activate';
15
+ activate: {
16
+ dockId: string;
17
+ };
18
+ }[];
19
+ }
20
+ /**
21
+ * The part of Vite DevTools' `DockClientScriptContext` this script uses, typed
22
+ * here so the published runtime does not depend on `@vitejs/devtools-kit`.
23
+ */
24
+ export interface DockScriptContext<Entry extends {
25
+ id: string;
26
+ } = {
27
+ id: string;
28
+ }> {
29
+ current: {
30
+ entryMeta: Entry;
31
+ };
32
+ docks: {
33
+ register(entry: Entry & Badge, force?: boolean): {
34
+ update(patch: Badge): void;
35
+ };
36
+ };
37
+ messages: {
38
+ add(input: MessageInput): Promise<unknown>;
39
+ remove(id: string): Promise<void>;
40
+ };
41
+ }
42
+ /**
43
+ * Show the client's health on the Convex dock: a danger "offline" badge while
44
+ * the WebSocket is down, a warning count of failing queries, nothing when
45
+ * healthy — plus one message for the outage and one per failing query.
46
+ *
47
+ * Returns at once: DevTools awaits this before it opens the dock.
48
+ */
49
+ export default function setupConvexDock<Entry extends {
50
+ id: string;
51
+ }>(ctx: DockScriptContext<Entry>): void;
52
+ export {};
@@ -0,0 +1,63 @@
1
+ function isOffline(connection) {
2
+ return connection.status === "active" && !!connection.state?.hasEverConnected && !connection.state.isWebSocketConnected;
3
+ }
4
+ function onBridge(callback) {
5
+ let bridge = window.__NUXT_CONVEX_DEVTOOLS__;
6
+ Object.defineProperty(window, "__NUXT_CONVEX_DEVTOOLS__", {
7
+ configurable: true,
8
+ get: () => bridge,
9
+ set: (value) => {
10
+ bridge = value;
11
+ if (value) callback(value);
12
+ }
13
+ });
14
+ if (bridge) callback(bridge);
15
+ }
16
+ export default function setupConvexDock(ctx) {
17
+ const dockId = ctx.current.entryMeta.id;
18
+ const connectionMessage = `${dockId}:connection`;
19
+ const queryMessage = (udfPath) => `${dockId}:query:${udfPath}`;
20
+ const actions = [{ id: "open", label: "Open panel", kind: "activate", activate: { dockId } }];
21
+ let offline = false;
22
+ let failing = /* @__PURE__ */ new Map();
23
+ let dock;
24
+ let shown;
25
+ const render = () => {
26
+ const badge = offline ? "offline" : failing.size ? String(failing.size) : void 0;
27
+ if (badge === shown) return;
28
+ shown = badge;
29
+ const patch = { badge, badgeVariant: offline ? "danger" : badge ? "warning" : void 0 };
30
+ if (dock) dock.update(patch);
31
+ else dock = ctx.docks.register({ ...ctx.current.entryMeta, ...patch }, true);
32
+ };
33
+ const onConnection = (connection) => {
34
+ if (isOffline(connection) === offline) return;
35
+ offline = !offline;
36
+ void ctx.messages.add(offline ? { id: connectionMessage, level: "error", message: "Convex offline", description: "The WebSocket to the Convex deployment closed. The client keeps reconnecting.", notify: true, actions } : { id: connectionMessage, level: "success", message: "Convex online", description: "The WebSocket to the Convex deployment is open again.", notify: true, actions });
37
+ render();
38
+ };
39
+ const onQueries = (queries) => {
40
+ const next = /* @__PURE__ */ new Map();
41
+ for (const query of queries) {
42
+ if (query.errorMessage !== void 0) next.set(query.udfPath, query.errorMessage);
43
+ }
44
+ for (const [udfPath, error] of next) {
45
+ if (failing.get(udfPath) !== error) {
46
+ void ctx.messages.add({ id: queryMessage(udfPath), level: "warn", message: `Query ${udfPath} failed`, description: error, actions });
47
+ }
48
+ }
49
+ for (const udfPath of failing.keys()) {
50
+ if (!next.has(udfPath)) void ctx.messages.remove(queryMessage(udfPath));
51
+ }
52
+ failing = next;
53
+ render();
54
+ };
55
+ let unsubscribe = [];
56
+ onBridge((bridge) => {
57
+ for (const off of unsubscribe) off();
58
+ unsubscribe = [bridge.on("connection", onConnection), bridge.on("queries", onQueries)];
59
+ const snapshot = bridge.getSnapshot();
60
+ onConnection(snapshot.connection);
61
+ onQueries(snapshot.queries);
62
+ });
63
+ }
@@ -8,11 +8,17 @@ export declare const CONVEX_INITIAL_TOKEN_KEY = "convex:initialToken";
8
8
  /**
9
9
  * The module's runtime config, tolerating a missing Nuxt context (a plain
10
10
  * server import outside a request) by returning an empty object.
11
+ *
12
+ * Given a server route's event, it reads that request's config: an
13
+ * environment variable set after the server started (by a Nitro plugin, say)
14
+ * reaches it, where the config read without one was fixed at startup.
11
15
  */
12
- export declare function getConvexRuntimeConfig(): {
16
+ export declare function getConvexRuntimeConfig(event?: unknown): {
13
17
  url: string | undefined;
14
18
  siteUrl: string | undefined;
19
+ authRoute: string | undefined;
15
20
  } | {
16
21
  url?: undefined;
17
22
  siteUrl?: undefined;
23
+ authRoute?: undefined;
18
24
  };
@@ -1,11 +1,17 @@
1
1
  import { useRuntimeConfig } from "#imports";
2
2
  export const CONVEX_INITIAL_TOKEN_KEY = "convex:initialToken";
3
- export function getConvexRuntimeConfig() {
3
+ export function closeAfterRender(nuxtApp, client) {
4
+ const close = () => void client.close();
5
+ nuxtApp.hook("app:rendered", close);
6
+ nuxtApp.hook("app:error", close);
7
+ }
8
+ export function getConvexRuntimeConfig(event) {
4
9
  try {
5
- const config = useRuntimeConfig();
10
+ const config = useRuntimeConfig(event);
6
11
  return {
7
12
  url: config.public?.convex?.url,
8
- siteUrl: config.public?.convex?.siteUrl
13
+ siteUrl: config.public?.convex?.siteUrl,
14
+ authRoute: config.public?.convex?.authRoute
9
15
  };
10
16
  } catch {
11
17
  return {};
@@ -24,6 +24,18 @@ function instantiateDefaultLogger({ verbose }) {
24
24
  error: (...args) => console.error(...args)
25
25
  };
26
26
  }
27
+ function notConnected() {
28
+ return {
29
+ hasInflightRequests: false,
30
+ isWebSocketConnected: false,
31
+ timeOfOldestInflightRequest: null,
32
+ hasEverConnected: false,
33
+ connectionCount: 0,
34
+ connectionRetries: 0,
35
+ inflightMutations: 0,
36
+ inflightActions: 0
37
+ };
38
+ }
27
39
  export class ConvexVueClient {
28
40
  address;
29
41
  cachedSync;
@@ -317,6 +329,7 @@ export class ConvexVueClient {
317
329
  * @experimental May change in a minor release — see STABILITY.md.
318
330
  */
319
331
  connectionState() {
332
+ if (import.meta.server && !this.cachedSync) return notConnected();
320
333
  return this.sync.connectionState();
321
334
  }
322
335
  /**
@@ -12,7 +12,8 @@
12
12
  * those instead of this one — see `registerIntegrations` in `src/module.ts`.
13
13
  *
14
14
  * The WebSocket opens lazily on the first subscription; on the server the
15
- * preloaded-query helpers short-circuit, so no socket is opened during SSR.
15
+ * preloaded-query helpers short-circuit, so no socket is opened during SSR,
16
+ * and a server render's client is closed when its request is done.
16
17
  */
17
18
  declare const _default: import("nuxt/app").Plugin<Record<string, unknown>> & import("nuxt/app").ObjectPlugin<Record<string, unknown>>;
18
19
  export default _default;
@@ -1,5 +1,6 @@
1
1
  import { defineNuxtPlugin, useRuntimeConfig } from "#app";
2
2
  import { ConvexVueClient, ConvexClientKey } from "./client.js";
3
+ import { closeAfterRender } from "../nuxt/config.js";
3
4
  export default defineNuxtPlugin({
4
5
  name: "nuxt-convex-module:client",
5
6
  setup(nuxtApp) {
@@ -12,5 +13,6 @@ export default defineNuxtPlugin({
12
13
  }
13
14
  const client = new ConvexVueClient(url);
14
15
  nuxtApp.vueApp.provide(ConvexClientKey, client);
16
+ if (import.meta.server) closeAfterRender(nuxtApp, client);
15
17
  }
16
18
  });