dp-widgets-framework 1.1.8 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.css +1 -1
- package/dist/index.esm.css +1 -1
- package/dist/index.esm.js +53 -16
- package/dist/index.js +52 -15
- package/package.json +1 -1
package/dist/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.react-grid-layout{position:relative;transition:height .2s ease}.react-grid-item{transition:all .2s ease;transition-property:left,top,width,height}.react-grid-item img{pointer-events:none;-webkit-user-select:none;user-select:none}.react-grid-item.cssTransforms{transition-property:transform,width,height}.react-grid-item.resizing{transition:none;will-change:width,height;z-index:1}.react-grid-item.react-draggable-dragging{transition:none;will-change:transform;z-index:3}.react-grid-item.dropping{visibility:hidden}.react-grid-item.react-grid-placeholder{background:red;opacity:.2;transition-duration:.1s;-webkit-user-select:none;-o-user-select:none;user-select:none;z-index:2}.react-grid-item.react-grid-placeholder.placeholder-resizing{transition:none}.react-grid-item>.react-resizable-handle{height:20px;position:absolute;width:20px}.react-grid-item>.react-resizable-handle:after{border-bottom:2px solid rgba(0,0,0,.4);border-right:2px solid rgba(0,0,0,.4);bottom:3px;content:"";height:5px;position:absolute;right:3px;width:5px}.react-resizable-hide>.react-resizable-handle{display:none}.react-grid-item>.react-resizable-handle.react-resizable-handle-sw{bottom:0;cursor:sw-resize;left:0;transform:rotate(90deg)}.react-grid-item>.react-resizable-handle.react-resizable-handle-se{bottom:0;cursor:se-resize;right:0}.react-grid-item>.react-resizable-handle.react-resizable-handle-nw{cursor:nw-resize;left:0;top:0;transform:rotate(180deg)}.react-grid-item>.react-resizable-handle.react-resizable-handle-ne{cursor:ne-resize;right:0;top:0;transform:rotate(270deg)}.react-grid-item>.react-resizable-handle.react-resizable-handle-e,.react-grid-item>.react-resizable-handle.react-resizable-handle-w{cursor:ew-resize;margin-top:-10px;top:50%}.react-grid-item>.react-resizable-handle.react-resizable-handle-w{left:0;transform:rotate(135deg)}.react-grid-item>.react-resizable-handle.react-resizable-handle-e{right:0;transform:rotate(315deg)}.react-grid-item>.react-resizable-handle.react-resizable-handle-n,.react-grid-item>.react-resizable-handle.react-resizable-handle-s{cursor:ns-resize;left:50%;margin-left:-10px}.react-grid-item>.react-resizable-handle.react-resizable-handle-n{top:0;transform:rotate(225deg)}.react-grid-item>.react-resizable-handle.react-resizable-handle-s{bottom:0;transform:rotate(45deg)}.react-resizable{position:relative}.react-resizable-handle{background-image:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHN0eWxlPSJiYWNrZ3JvdW5kLWNvbG9yOiNmZmZmZmYwMCIgd2lkdGg9IjYiIGhlaWdodD0iNiI+PHBhdGggZD0iTTYgNkgwVjQuMmg0LjJWMEg2djZaIiBvcGFjaXR5PSIuMzAyIi8+PC9zdmc+");background-origin:content-box;background-position:100% 100%;background-repeat:no-repeat;box-sizing:border-box;height:20px;padding:0 3px 3px 0;position:absolute;width:20px}.react-resizable-handle-sw{bottom:0;cursor:sw-resize;left:0;transform:rotate(90deg)}.react-resizable-handle-se{bottom:0;cursor:se-resize;right:0}.react-resizable-handle-nw{cursor:nw-resize;left:0;top:0;transform:rotate(180deg)}.react-resizable-handle-ne{cursor:ne-resize;right:0;top:0;transform:rotate(270deg)}.react-resizable-handle-e,.react-resizable-handle-w{cursor:ew-resize;margin-top:-10px;top:50%}.react-resizable-handle-w{left:0;transform:rotate(135deg)}.react-resizable-handle-e{right:0;transform:rotate(315deg)}.react-resizable-handle-n,.react-resizable-handle-s{cursor:ns-resize;left:50%;margin-left:-10px}.react-resizable-handle-n{top:0;transform:rotate(225deg)}.react-resizable-handle-s{bottom:0;transform:rotate(45deg)}:root{--copilot-kit-primary-color:#1c1c1c;--copilot-kit-contrast-color:#fff;--copilot-kit-background-color:#fff;--copilot-kit-input-background-color:#fbfbfb;--copilot-kit-secondary-color:#fff;--copilot-kit-secondary-contrast-color:#1c1c1c;--copilot-kit-separator-color:#c8c8c8;--copilot-kit-muted-color:#c8c8c8;--copilot-kit-error-background:#fef2f2;--copilot-kit-error-border:#fecaca;--copilot-kit-error-text:#dc2626;--copilot-kit-shadow-sm:0 1px 2px 0 rgba(0,0,0,.05);--copilot-kit-shadow-md:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -1px rgba(0,0,0,.06);--copilot-kit-shadow-lg:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -2px rgba(0,0,0,.05);--copilot-kit-dev-console-bg:#f8f8fa;--copilot-kit-dev-console-text:#000}.dark,[data-theme=dark],body.dark,body[style*="color-scheme: dark"] :root,html.dark,html[style*="color-scheme: dark"]{--copilot-kit-primary-color:#fff;--copilot-kit-contrast-color:#1c1c1c;--copilot-kit-background-color:#111;--copilot-kit-input-background-color:#2c2c2c;--copilot-kit-secondary-color:#1c1c1c;--copilot-kit-secondary-contrast-color:#fff;--copilot-kit-separator-color:#2d2d2d;--copilot-kit-muted-color:#2d2d2d;--copilot-kit-error-background:#7f1d1d;--copilot-kit-error-border:#dc2626;--copilot-kit-error-text:#fca5a5;--copilot-kit-shadow-sm:0 1px 2px 0 rgba(0,0,0,.3);--copilot-kit-shadow-md:0 4px 6px -1px rgba(0,0,0,.4),0 2px 4px -1px rgba(0,0,0,.3);--copilot-kit-shadow-lg:0 10px 15px -3px rgba(0,0,0,.4),0 4px 6px -2px rgba(0,0,0,.3)}.copilotKitPopup{-webkit-text-size-adjust:100%;font-feature-settings:normal;bottom:1rem;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;font-variation-settings:normal;line-height:1.5;position:fixed;right:1rem;-moz-tab-size:4;-o-tab-size:4;tab-size:4;touch-action:manipulation;z-index:30}.copilotKitPopup svg{display:inline-block;vertical-align:middle}.copilotKitSidebar{-webkit-text-size-adjust:100%;font-feature-settings:normal;bottom:1rem;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;font-variation-settings:normal;line-height:1.5;position:fixed;right:1rem;-moz-tab-size:4;-o-tab-size:4;tab-size:4;touch-action:manipulation;z-index:30}.copilotKitSidebar svg{display:inline-block;vertical-align:middle}.copilotKitSidebarContentWrapper{margin-right:0;overflow:visible;transition:margin-right .3s ease}@media (min-width:640px){.copilotKitSidebarContentWrapper.sidebarExpanded{margin-right:28rem}}.copilotKitButton{align-items:center;background-color:var(--copilot-kit-primary-color);border:1px solid var(--copilot-kit-primary-color);border-radius:50%;box-shadow:var(--copilot-kit-shadow-sm);color:var(--copilot-kit-contrast-color);cursor:pointer;display:flex;height:3.5rem;justify-content:center;outline:none;position:relative;transform:scale(1);transition:all .2s ease;width:3.5rem}.copilotKitButton:hover{box-shadow:var(--copilot-kit-shadow-md);transform:scale(1.05)}.copilotKitButton:active{box-shadow:var(--copilot-kit-shadow-sm);transform:scale(.95)}.copilotKitButtonIcon{align-items:center;display:flex;justify-content:center;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);transition:opacity .1s,transform .3s}.copilotKitButtonIcon svg{height:1.5rem;width:1.5rem}.copilotKitButton.open .copilotKitButtonIconOpen{opacity:0;transform:translate(-50%,-50%) scale(0) rotate(90deg)}.copilotKitButton.open .copilotKitButtonIconClose,.copilotKitButton:not(.open) .copilotKitButtonIconOpen{opacity:1;transform:translate(-50%,-50%) scale(1) rotate(0deg)}.copilotKitButton:not(.open) .copilotKitButtonIconClose{opacity:0;transform:translate(-50%,-50%) scale(0) rotate(-90deg)}.copilotKitHeader{align-items:center;background-color:var(--copilot-kit-contrast-color);border-bottom:1px solid var(--copilot-kit-separator-color);border-top-left-radius:0;border-top-right-radius:0;color:var(--copilot-kit-primary-color);display:flex;font-weight:500;height:56px;justify-content:space-between;padding-left:1.5rem;position:relative;z-index:2}.copilotKitSidebar .copilotKitHeader{border-radius:0}.copilotKitHeaderControls{display:flex}.copilotKitHeaderCloseButton{background:none;border:none}@media (min-width:640px){.copilotKitHeader{border-top-left-radius:8px;border-top-right-radius:8px;padding-left:1.5rem;padding-right:24px}}.copilotKitHeader>button{align-items:center;background-color:transparent;border:0;border-radius:50%;color:var(--copilot-kit-muted-color);cursor:pointer;display:flex;height:35px;justify-content:center;outline:none;padding:8px;position:absolute;right:16px;top:50%;transform:translateY(-50%);transition:background-color .2s ease;width:35px}.copilotKitHeader>button:hover{color:color-mix(in srgb,var(--copilot-kit-muted-color) 80%,#000)}.copilotKitHeader>button:focus{outline:none}.copilotKitInput{background-color:var(--copilot-kit-input-background-color);border:1px solid var(--copilot-kit-separator-color);border-radius:20px;cursor:text;margin:0 auto;min-height:75px;padding:12px 14px;position:relative;width:95%}.copilotKitInputContainer{background:var(--copilot-kit-background-color);border-bottom-left-radius:.75rem;border-bottom-right-radius:.75rem;padding:0 0 15px;width:100%}.copilotKitSidebar .copilotKitInputContainer{border-bottom-left-radius:0;border-bottom-right-radius:0}.copilotKitInputControlButton{-webkit-appearance:button;appearance:button;background-color:transparent;background-image:none;border:0;color:rgba(0,0,0,.25);cursor:pointer;display:inline-block;font-family:inherit;font-size:100%;font-weight:inherit;height:24px;line-height:inherit;margin:0;padding:0;text-align:center;text-indent:0;text-shadow:none;text-transform:none;transform:scale(1);transition-duration:.2s;transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);width:24px}.copilotKitInputControlButton:not([disabled]){color:var(--copilot-kit-primary-color)}.copilotKitInputControlButton:not([disabled]):hover{color:color-mix(in srgb,var(--copilot-kit-primary-color) 80%,#000);transform:scale(1.05)}.copilotKitInputControlButton[disabled]{color:var(--copilot-kit-muted-color);cursor:default}.copilotKitInputControls{display:flex;gap:3px}.copilotKitInput>textarea{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;background-color:transparent;border:0;color:var(--copilot-kit-secondary-contrast-color);cursor:text;flex:1;font-family:inherit;font-size:.875rem;font-weight:inherit;line-height:1.5rem;margin:0;outline:2px solid transparent;outline-offset:2px;overflow-wrap:break-word;padding:0;resize:none;white-space:pre-wrap;width:100%}.copilotKitInput>textarea::placeholder{color:grey;opacity:1}.copilotKitInputControlButton.copilotKitPushToTalkRecording{animation:copilotKitPulseAnimation 2s cubic-bezier(.4,0,.6,1) infinite;background-color:#ec0000;border-radius:50%;color:#fff}.copilotKitInput textarea::-webkit-scrollbar{width:9px}.copilotKitInput textarea::-webkit-scrollbar-track{background:transparent}.copilotKitInput textarea::-webkit-scrollbar-thumb{background-clip:content-box;background-color:#c8c8c8;border:2px solid transparent;border-radius:10px;cursor:pointer}.copilotKitInput textarea::-webkit-scrollbar-thumb:hover{background-color:color-mix(in srgb,#c8c8c8 80%,#000)}.poweredByContainer{padding:0}.poweredBy{background:var(--copilot-kit-background-color)!important;color:#d6d6d6!important;display:block!important;font-size:12px!important;margin:0!important;padding:3px 0!important;position:static!important;text-align:center!important;visibility:visible!important}.dark,[data-theme=dark],body.dark,body[style*="color-scheme: dark"] .poweredBy,html.dark,html[style*="color-scheme: dark"]{color:#454545!important}.copilotKitMessages{background-color:var(--copilot-kit-background-color);display:flex;flex:1;flex-direction:column;justify-content:space-between;overflow-y:scroll;z-index:1}.copilotKitMessagesContainer{display:flex;flex-direction:column;padding:1rem 24px}.copilotKitMessagesFooter{display:flex;flex-direction:column;justify-content:flex-start;margin:8px auto 0;padding:.5rem .75rem;width:97%}.copilotKitMessages::-webkit-scrollbar{width:6px}.copilotKitMessages::-webkit-scrollbar-thumb{background-color:var(--copilot-kit-separator-color);border:2px solid var(--copilot-kit-background-color);border-radius:10rem}.copilotKitMessages::-webkit-scrollbar-track-piece:start{background:transparent}.copilotKitMessages::-webkit-scrollbar-track-piece:end{background:transparent}.copilotKitMessage{border-radius:15px;font-size:1rem;line-height:1.5;margin-bottom:.5rem;max-width:80%;overflow-wrap:break-word;padding:8px 12px}.copilotKitMessage.copilotKitUserMessage{background:var(--copilot-kit-primary-color);color:var(--copilot-kit-contrast-color);font-size:1rem;line-height:1.75;margin-left:auto;white-space:pre-wrap}.copilotKitMessage.copilotKitAssistantMessage{background:transparent;color:var(--copilot-kit-secondary-contrast-color);margin-right:auto;max-width:100%;padding-left:0;position:relative}.copilotKitMessage.copilotKitAssistantMessage .copilotKitMessageControls{display:flex;gap:1rem;left:0;opacity:0;padding:5px 0 0;position:absolute;transition:opacity .2s ease}.copilotKitMessageControls.currentMessage{opacity:1!important}.copilotKitMessage.copilotKitAssistantMessage:hover .copilotKitMessageControls{opacity:1}@media (max-width:768px){.copilotKitMessage.copilotKitAssistantMessage .copilotKitMessageControls{opacity:1}}.copilotKitMessageControlButton{align-items:center;background:transparent;border:none;border-radius:.5rem;color:var(--copilot-kit-primary-color);cursor:pointer;display:flex;height:20px;justify-content:center;margin:0;padding:0;transition:all .2s ease;width:20px;z-index:10}.copilotKitMessageControlButton:active,.copilotKitMessageControlButton:hover{color:color-mix(in srgb,var(--copilot-kit-primary-color) 80%,#000);transform:scale(1.05)}.copilotKitMessageControlButton svg{display:block;height:1rem;pointer-events:none;width:1rem}.copilotKitMessage.copilotKitAssistantMessage+.copilotKitMessage.copilotKitUserMessage{margin-top:1.5rem}.copilotKitCustomAssistantMessage{margin-bottom:1.5rem;margin-top:1.5rem}.copilotKitMessage .inProgressLabel{margin-left:10px;opacity:.7}.copilotKitSpinner{animation:copilotKitSpinAnimation 1s linear infinite;border:2px solid var(--copilot-kit-contrast-color);border-radius:50%;border-top-color:var(--copilot-kit-primary-color);display:inline-block;height:16px;margin-left:8px;width:16px}@keyframes copilotKitActivityDotAnimation{0%,80%,to{opacity:.5;transform:scale(.5)}40%{opacity:1;transform:scale(1)}}.copilotKitActivityDot{animation:copilotKitActivityDotAnimation 1.4s ease-in-out infinite both;background-color:var(--copilot-kit-primary-color);border-radius:50%;display:inline-block;height:6px;width:6px}.copilotKitImageRendering{display:flex;flex-direction:column;gap:8px}.copilotKitImageRenderingImage{border-radius:8px;box-shadow:var(--copilot-kit-shadow-sm);height:auto;max-width:100%}.copilotKitImageRenderingContent{color:var(--copilot-kit-secondary-contrast-color);font-size:.875rem;line-height:1.5;margin-top:8px;padding:0 16px}.copilotKitImageRenderingError{background-color:var(--copilot-kit-input-background-color);border:1px solid var(--copilot-kit-separator-color);border-radius:8px;display:flex;flex-direction:column;gap:8px;padding:12px}.copilotKitImageRenderingErrorMessage{align-items:center;background-color:var(--copilot-kit-error-background);border:1px solid var(--copilot-kit-error-border);border-radius:6px;color:var(--copilot-kit-error-text);display:flex;font-size:.875rem;font-weight:500;gap:8px;padding:8px 12px}.copilotKitImageRenderingErrorMessage:before{content:"\26a0\fe0f";font-size:1rem}.copilotKitWindow{background-color:var(--copilot-kit-background-color);border-color:#e5e7eb;border-radius:.75rem;box-shadow:0 5px 40px rgba(0,0,0,.16);display:flex;flex-direction:column;inset:0;opacity:0;pointer-events:none;position:fixed;transform:scale(.95) translateY(20px);transform-origin:bottom;transition:opacity .1s ease-out,transform .2s ease-out}.copilotKitSidebar .copilotKitWindow{border-radius:0;opacity:1;transform:translateX(100%)}.copilotKitWindow.open{opacity:1;pointer-events:auto;transform:scale(1) translateY(0)}.copilotKitSidebar .copilotKitWindow.open{transform:translateX(0)}@media (min-width:640px){.copilotKitWindow{border-width:0;bottom:5rem;height:600px;left:auto;margin-bottom:1rem;max-height:calc(100% - 6rem);min-height:200px;right:1rem;top:auto;transform-origin:bottom right;width:24rem}.copilotKitSidebar .copilotKitWindow{bottom:0;left:auto;margin-bottom:0;max-height:none;min-height:100%;right:0;top:auto;width:28rem}}.copilotKitActivityDot1{animation:copilotKitActivityDotsAnimation 1.05s infinite}.copilotKitActivityDot2{animation-delay:.1s}.copilotKitActivityDot3{animation-delay:.2s}@keyframes copilotKitActivityDotsAnimation{0%,57.14%{animation-timing-function:cubic-bezier(.33,.66,.66,1);transform:translate(0)}28.57%{animation-timing-function:cubic-bezier(.33,0,.66,.33);transform:translateY(-6px)}to{transform:translate(0)}}@keyframes copilotKitSpinAnimation{to{transform:rotate(1turn)}}@keyframes copilotKitPulseAnimation{50%{opacity:.5}}h1.copilotKitMarkdownElement,h2.copilotKitMarkdownElement,h3.copilotKitMarkdownElement,h4.copilotKitMarkdownElement,h5.copilotKitMarkdownElement,h6.copilotKitMarkdownElement{font-weight:700;line-height:1.2}h1.copilotKitMarkdownElement:not(:last-child),h2.copilotKitMarkdownElement:not(:last-child),h3.copilotKitMarkdownElement:not(:last-child),h4.copilotKitMarkdownElement:not(:last-child),h5.copilotKitMarkdownElement:not(:last-child),h6.copilotKitMarkdownElement:not(:last-child){margin-bottom:1rem}h1.copilotKitMarkdownElement{font-size:1.5em}h2.copilotKitMarkdownElement{font-size:1.25em;font-weight:600}h3.copilotKitMarkdownElement{font-size:1.1em}h4.copilotKitMarkdownElement{font-size:1em}h5.copilotKitMarkdownElement{font-size:.9em}h6.copilotKitMarkdownElement{font-size:.8em}a.copilotKitMarkdownElement{color:blue;text-decoration:underline}p.copilotKitMarkdownElement{font-size:1rem;line-height:1.75;margin:0;padding:0}blockquote.copilotKitMarkdownElement:not(:last-child),ol.copilotKitMarkdownElement:not(:last-child),p.copilotKitMarkdownElement:not(:last-child),pre.copilotKitMarkdownElement:not(:last-child),ul.copilotKitMarkdownElement:not(:last-child){margin-bottom:1.25em}blockquote.copilotKitMarkdownElement{border-left:2px solid;border-color:#8e8ea0;line-height:1.2;padding-left:10px}blockquote.copilotKitMarkdownElement p{padding:.7em 0}ul.copilotKitMarkdownElement{list-style-type:disc;overflow:visible;padding-left:20px}li.copilotKitMarkdownElement{list-style-position:outside;list-style-type:inherit;margin-left:0;overflow:visible;padding-left:0;position:relative}.copilotKitCodeBlock{background-color:#09090b;border-radius:.375rem;position:relative;width:100%}.copilotKitCodeBlockToolbar{align-items:center;background-color:#27272a;border-top-left-radius:.375rem;border-top-right-radius:.375rem;color:#e4e4e4;display:flex;font-family:sans-serif;justify-content:space-between;padding-bottom:.09rem;padding-left:1rem;padding-top:.09rem;width:100%}.copilotKitCodeBlockToolbarLanguage{font-size:.75rem;line-height:1rem;text-transform:lowercase}.copilotKitCodeBlockToolbarButtons{align-items:center;display:flex;margin-left:.25rem;margin-right:.25rem}.copilotKitCodeBlockToolbarButton{align-items:center;border-radius:.375rem;display:inline-flex;font-size:.875rem;font-weight:500;height:2.5rem;justify-content:center;line-height:1.25rem;margin:2px;padding:3px}.copilotKitCodeBlockToolbarButton:hover{background-color:#37373a}.copilotKitInlineCode{background-color:var(--copilot-kit-input-background-color);border:1px solid var(--copilot-kit-separator-color);border-radius:.375rem;font-size:15px;padding:.05rem .4rem}.copilotKitMessages footer .suggestions{display:flex;flex-wrap:wrap;gap:6px}.copilotKitMessages footer h6{font-size:.7rem;font-weight:500;margin-bottom:8px}.copilotKitMessages footer .suggestions .suggestion{border:1px solid var(--copilot-kit-muted-color);border-radius:15px;box-shadow:0 5px 5px 0 rgba(0,0,0,.01),0 2px 3px 0 rgba(0,0,0,.02);color:var(--copilot-kit-secondary-contrast-color);font-size:.7rem;padding:6px 10px}.copilotKitMessages footer .suggestions .suggestion.loading{border:none;color:var(--copilot-kit-secondary-contrast-color);font-size:.7rem;padding:0}.copilotKitMessages footer .suggestions button{transition:transform .3s ease}.copilotKitMessages footer .suggestions button:not(:disabled):hover{transform:scale(1.03)}.copilotKitMessages footer .suggestions button:disabled{cursor:wait}.copilotKitMessages footer .suggestions button svg{margin-right:6px}.copilotKitChat{-webkit-text-size-adjust:100%;font-feature-settings:normal;background:var(--copilot-kit-background-color);display:flex;flex-direction:column;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;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;touch-action:manipulation;z-index:30}.copilotKitChat svg{display:inline-block;vertical-align:middle}.copilotKitChat .copilotKitMessages{flex-grow:1}.copilotKitDevConsole{align-items:center;display:flex;gap:5px;margin:0 15px}.copilotKitDevConsole.copilotKitDevConsoleWarnOutdated{background-color:var(--copilot-kit-dev-console-bg)}.copilotKitDevConsole .copilotKitVersionInfo{align-items:center;background:#ebb305;bottom:-25px;display:flex;font-size:.8rem;gap:10px;justify-content:center;left:0;padding:3px 5px;position:absolute;width:100%}.copilotKitDevConsole .copilotKitVersionInfo button{background-color:var(--copilot-kit-dev-console-bg);border:1px solid #979797;border-radius:4px;display:inline-block;font-family:monospace;font-size:11px;font-weight:400;overflow:hidden;padding:1px 12px 1px 5px;text-align:left;text-overflow:ellipsis;white-space:nowrap;width:260px}.copilotKitDevConsole .copilotKitVersionInfo aside{color:#7f7a7a;display:inline;font-weight:400;margin-left:5px}.copilotKitDevConsole .copilotKitVersionInfo svg{margin-left:3px;margin-top:-3px}.copilotKitDevConsole .copilotKitDebugMenuTriggerButton{align-items:center;background-color:transparent;border:1px solid var(--copilot-kit-muted-color);border-radius:20px;display:flex;font-size:11px;font-weight:700;height:30px;justify-content:center;outline:none;padding:0 10px}.copilotKitDebugMenuTriggerButton.compact{color:var(--copilot-kit-dev-console-bg);font-size:8px;justify-content:center;outline:none;width:35px}.copilotKitDevConsole .copilotKitDebugMenuTriggerButton:hover{background-color:color-mix(in srgb,var(--copilot-kit-dev-console-bg) 85%,#000);color:var(--copilot-kit-dev-console-text)}.dark,[data-theme=dark],body.dark,body[style*="color-scheme: dark"] .copilotKitDevConsole .copilotKitDebugMenuTriggerButton,html.dark,html[style*="color-scheme: dark"]{color:#fff}.dark,[data-theme=dark],body.dark,body[style*="color-scheme: dark"] .copilotKitDevConsole .copilotKitDebugMenuTriggerButton:hover,html.dark,html[style*="color-scheme: dark"]{background-color:color-mix(in srgb,var(--copilot-kit-dev-console-bg) 20%,#000)}.copilotKitDevConsole .copilotKitDebugMenuTriggerButton>svg{margin-left:10px}.copilotKitDebugMenu{--copilot-kit-dev-console-border:color-mix(in srgb,var(--copilot-kit-dev-console-bg) 80%,#000);background-color:var(--copilot-kit-dev-console-bg);border:1px solid var(--copilot-kit-dev-console-border);border-radius:6px;font-size:13px;margin-top:2px;outline:none;padding:.25rem}.copilotKitDebugMenuItem{background:none;border:none;color:var(--copilot-kit-dev-console-text);cursor:pointer;display:block;padding:3px 10px;text-align:left;width:100%}.copilotKitDebugMenuItem:hover{background-color:color-mix(in srgb,var(--copilot-kit-dev-console-bg) 95%,#000);border-radius:4px}.copilotKitDebugMenu[data-closed]{opacity:0;transform:scale(.95)}.copilotKitDebugMenu hr{background-color:var(--copilot-kit-dev-console-border);border:none;height:1px;margin:.25rem}.copilotKitHelpItemButton,.copilotKitHelpModal{background-color:var(--copilot-kit-dev-console-bg);color:var(--copilot-kit-dev-console-text)}.copilotKitHelpItemButton{border:1px solid var(--copilot-kit-muted-color);border-radius:15px;box-shadow:0 5px 5px 0 rgba(0,0,0,.01),0 2px 3px 0 rgba(0,0,0,.02);display:block;font-size:.8rem;padding:4px 6px;text-align:center;width:100%}.copilotKitHelpItemButton:hover{background-color:color-mix(in srgb,var(--copilot-kit-dev-console-bg) 95%,#000)}.copilotkit-response{text-align:right}.copilotkit-response-content{background-color:#f9fafb;border-radius:.25rem;color:#4b5563;font-size:.875rem;margin-bottom:.5rem;padding:.5rem;text-align:left}.copilotkit-response-actions{align-items:flex-end;display:inline-flex;flex-direction:column}.copilotkit-response-label{align-items:center;color:#6b7280;display:flex;font-size:.75rem;margin-bottom:.25rem}.copilotkit-toggle-button{align-items:center;background:none;border:none;cursor:pointer;display:flex;justify-content:center;margin-right:.25rem;padding:0}.copilotkit-icon{color:#6b7280;height:.75rem;width:.75rem}.copilotkit-response-buttons{display:flex;gap:.5rem}.copilotkit-response-button{background-color:#f3f4f6;border:none;border-radius:.25rem;color:#4b5563;cursor:pointer;font-size:.75rem;padding:.25rem .5rem;transition:background-color .2s}.copilotkit-response-button:hover{background-color:#e5e7eb}.copilotkit-response-button:focus{outline:none}.copilotkit-response-completed-feedback{align-items:center;background-color:#f9fafb;border-radius:.375rem;display:inline-flex;padding:.5rem}.copilotkit-response-completed-feedback span{color:#4b5563;font-size:.75rem;font-weight:500}.copilotkit-state{font-size:.875rem;margin-bottom:1rem}.copilotkit-state-header{align-items:center;cursor:pointer;display:flex;gap:.25rem;margin-bottom:.25rem;user-select:none}.copilotkit-state-label{color:#4b5563;font-size:.875rem}.copilotkit-state-label-loading{align-items:center;animation:pulse 1.5s infinite;display:inline-flex}.copilotkit-state-content{border-left:1px solid #e5e7eb;margin-left:.375rem;max-height:250px;overflow:auto;padding-left:1rem;padding-top:.375rem}.copilotkit-state-item{margin-bottom:.25rem;padding:.25rem 0;transition:all .3s ease}.copilotkit-state-item-newest{animation:appear .5s ease-out}.copilotkit-state-item-header{font-size:.75rem;opacity:.7}.copilotkit-state-item-thought{opacity:.8}.copilotkit-state-item-description,.copilotkit-state-item-result,.copilotkit-state-item-thought{font-size:.75rem;margin-top:.125rem}.copilotkit-state-item-description{opacity:.8}.copilotkit-state-empty{font-size:.75rem;opacity:.7;padding:.25rem 0}.copilotkit-skeleton{animation:pulse 1.5s infinite;padding:.125rem 0}.copilotkit-skeleton-header{display:flex;justify-content:space-between}.copilotkit-skeleton-title{background-color:#e5e7eb;border-radius:.25rem;height:.625rem;width:4rem}.copilotkit-skeleton-subtitle{background-color:#e5e7eb;border-radius:.25rem;height:.5rem;width:2rem}.copilotkit-skeleton-content{background-color:#e5e7eb;border-radius:.25rem;height:1.5rem;margin-top:.125rem}.copilotkit-loader,.copilotkit-spinner{animation:spin 1.5s linear infinite}@keyframes appear{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}@keyframes pulse{0%,to{opacity:.4}50%{opacity:1}}@keyframes spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}@media (prefers-color-scheme:dark){.copilotkit-response-content{background-color:#1f2937;color:#9ca3af}.copilotkit-icon,.copilotkit-response-label{color:#9ca3af}.copilotkit-response-button{background-color:#1f2937;color:#d1d5db}.copilotkit-response-button:hover{background-color:#374151}.copilotkit-response-completed-feedback{background-color:#1f2937}.copilotkit-response-completed-feedback span{color:#e5e7eb}.copilotkit-state-label{color:#d1d5db}.copilotkit-state-content{border-left-color:#374151}.copilotkit-skeleton-content,.copilotkit-skeleton-subtitle,.copilotkit-skeleton-title{background-color:#374151}}
|
|
1
|
+
.react-grid-layout{position:relative;transition:height .2s ease}.react-grid-item{transition:all .2s ease;transition-property:left,top,width,height}.react-grid-item img{pointer-events:none;-webkit-user-select:none;user-select:none}.react-grid-item.cssTransforms{transition-property:transform,width,height}.react-grid-item.resizing{transition:none;will-change:width,height;z-index:1}.react-grid-item.react-draggable-dragging{transition:none;will-change:transform;z-index:3}.react-grid-item.dropping{visibility:hidden}.react-grid-item.react-grid-placeholder{background:red;opacity:.2;transition-duration:.1s;-webkit-user-select:none;-o-user-select:none;user-select:none;z-index:2}.react-grid-item.react-grid-placeholder.placeholder-resizing{transition:none}.react-grid-item>.react-resizable-handle{height:20px;position:absolute;width:20px}.react-grid-item>.react-resizable-handle:after{border-bottom:2px solid rgba(0,0,0,.4);border-right:2px solid rgba(0,0,0,.4);bottom:3px;content:"";height:5px;position:absolute;right:3px;width:5px}.react-resizable-hide>.react-resizable-handle{display:none}.react-grid-item>.react-resizable-handle.react-resizable-handle-sw{bottom:0;cursor:sw-resize;left:0;transform:rotate(90deg)}.react-grid-item>.react-resizable-handle.react-resizable-handle-se{bottom:0;cursor:se-resize;right:0}.react-grid-item>.react-resizable-handle.react-resizable-handle-nw{cursor:nw-resize;left:0;top:0;transform:rotate(180deg)}.react-grid-item>.react-resizable-handle.react-resizable-handle-ne{cursor:ne-resize;right:0;top:0;transform:rotate(270deg)}.react-grid-item>.react-resizable-handle.react-resizable-handle-e,.react-grid-item>.react-resizable-handle.react-resizable-handle-w{cursor:ew-resize;margin-top:-10px;top:50%}.react-grid-item>.react-resizable-handle.react-resizable-handle-w{left:0;transform:rotate(135deg)}.react-grid-item>.react-resizable-handle.react-resizable-handle-e{right:0;transform:rotate(315deg)}.react-grid-item>.react-resizable-handle.react-resizable-handle-n,.react-grid-item>.react-resizable-handle.react-resizable-handle-s{cursor:ns-resize;left:50%;margin-left:-10px}.react-grid-item>.react-resizable-handle.react-resizable-handle-n{top:0;transform:rotate(225deg)}.react-grid-item>.react-resizable-handle.react-resizable-handle-s{bottom:0;transform:rotate(45deg)}.react-resizable{position:relative}.react-resizable-handle{background-image:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHN0eWxlPSJiYWNrZ3JvdW5kLWNvbG9yOiNmZmZmZmYwMCIgd2lkdGg9IjYiIGhlaWdodD0iNiI+PHBhdGggZD0iTTYgNkgwVjQuMmg0LjJWMEg2djZaIiBvcGFjaXR5PSIuMzAyIi8+PC9zdmc+");background-origin:content-box;background-position:100% 100%;background-repeat:no-repeat;box-sizing:border-box;height:20px;padding:0 3px 3px 0;position:absolute;width:20px}.react-resizable-handle-sw{bottom:0;cursor:sw-resize;left:0;transform:rotate(90deg)}.react-resizable-handle-se{bottom:0;cursor:se-resize;right:0}.react-resizable-handle-nw{cursor:nw-resize;left:0;top:0;transform:rotate(180deg)}.react-resizable-handle-ne{cursor:ne-resize;right:0;top:0;transform:rotate(270deg)}.react-resizable-handle-e,.react-resizable-handle-w{cursor:ew-resize;margin-top:-10px;top:50%}.react-resizable-handle-w{left:0;transform:rotate(135deg)}.react-resizable-handle-e{right:0;transform:rotate(315deg)}.react-resizable-handle-n,.react-resizable-handle-s{cursor:ns-resize;left:50%;margin-left:-10px}.react-resizable-handle-n{top:0;transform:rotate(225deg)}.react-resizable-handle-s{bottom:0;transform:rotate(45deg)}
|
package/dist/index.esm.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.react-grid-layout{position:relative;transition:height .2s ease}.react-grid-item{transition:all .2s ease;transition-property:left,top,width,height}.react-grid-item img{pointer-events:none;-webkit-user-select:none;user-select:none}.react-grid-item.cssTransforms{transition-property:transform,width,height}.react-grid-item.resizing{transition:none;will-change:width,height;z-index:1}.react-grid-item.react-draggable-dragging{transition:none;will-change:transform;z-index:3}.react-grid-item.dropping{visibility:hidden}.react-grid-item.react-grid-placeholder{background:red;opacity:.2;transition-duration:.1s;-webkit-user-select:none;-o-user-select:none;user-select:none;z-index:2}.react-grid-item.react-grid-placeholder.placeholder-resizing{transition:none}.react-grid-item>.react-resizable-handle{height:20px;position:absolute;width:20px}.react-grid-item>.react-resizable-handle:after{border-bottom:2px solid rgba(0,0,0,.4);border-right:2px solid rgba(0,0,0,.4);bottom:3px;content:"";height:5px;position:absolute;right:3px;width:5px}.react-resizable-hide>.react-resizable-handle{display:none}.react-grid-item>.react-resizable-handle.react-resizable-handle-sw{bottom:0;cursor:sw-resize;left:0;transform:rotate(90deg)}.react-grid-item>.react-resizable-handle.react-resizable-handle-se{bottom:0;cursor:se-resize;right:0}.react-grid-item>.react-resizable-handle.react-resizable-handle-nw{cursor:nw-resize;left:0;top:0;transform:rotate(180deg)}.react-grid-item>.react-resizable-handle.react-resizable-handle-ne{cursor:ne-resize;right:0;top:0;transform:rotate(270deg)}.react-grid-item>.react-resizable-handle.react-resizable-handle-e,.react-grid-item>.react-resizable-handle.react-resizable-handle-w{cursor:ew-resize;margin-top:-10px;top:50%}.react-grid-item>.react-resizable-handle.react-resizable-handle-w{left:0;transform:rotate(135deg)}.react-grid-item>.react-resizable-handle.react-resizable-handle-e{right:0;transform:rotate(315deg)}.react-grid-item>.react-resizable-handle.react-resizable-handle-n,.react-grid-item>.react-resizable-handle.react-resizable-handle-s{cursor:ns-resize;left:50%;margin-left:-10px}.react-grid-item>.react-resizable-handle.react-resizable-handle-n{top:0;transform:rotate(225deg)}.react-grid-item>.react-resizable-handle.react-resizable-handle-s{bottom:0;transform:rotate(45deg)}.react-resizable{position:relative}.react-resizable-handle{background-image:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHN0eWxlPSJiYWNrZ3JvdW5kLWNvbG9yOiNmZmZmZmYwMCIgd2lkdGg9IjYiIGhlaWdodD0iNiI+PHBhdGggZD0iTTYgNkgwVjQuMmg0LjJWMEg2djZaIiBvcGFjaXR5PSIuMzAyIi8+PC9zdmc+");background-origin:content-box;background-position:100% 100%;background-repeat:no-repeat;box-sizing:border-box;height:20px;padding:0 3px 3px 0;position:absolute;width:20px}.react-resizable-handle-sw{bottom:0;cursor:sw-resize;left:0;transform:rotate(90deg)}.react-resizable-handle-se{bottom:0;cursor:se-resize;right:0}.react-resizable-handle-nw{cursor:nw-resize;left:0;top:0;transform:rotate(180deg)}.react-resizable-handle-ne{cursor:ne-resize;right:0;top:0;transform:rotate(270deg)}.react-resizable-handle-e,.react-resizable-handle-w{cursor:ew-resize;margin-top:-10px;top:50%}.react-resizable-handle-w{left:0;transform:rotate(135deg)}.react-resizable-handle-e{right:0;transform:rotate(315deg)}.react-resizable-handle-n,.react-resizable-handle-s{cursor:ns-resize;left:50%;margin-left:-10px}.react-resizable-handle-n{top:0;transform:rotate(225deg)}.react-resizable-handle-s{bottom:0;transform:rotate(45deg)}:root{--copilot-kit-primary-color:#1c1c1c;--copilot-kit-contrast-color:#fff;--copilot-kit-background-color:#fff;--copilot-kit-input-background-color:#fbfbfb;--copilot-kit-secondary-color:#fff;--copilot-kit-secondary-contrast-color:#1c1c1c;--copilot-kit-separator-color:#c8c8c8;--copilot-kit-muted-color:#c8c8c8;--copilot-kit-error-background:#fef2f2;--copilot-kit-error-border:#fecaca;--copilot-kit-error-text:#dc2626;--copilot-kit-shadow-sm:0 1px 2px 0 rgba(0,0,0,.05);--copilot-kit-shadow-md:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -1px rgba(0,0,0,.06);--copilot-kit-shadow-lg:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -2px rgba(0,0,0,.05);--copilot-kit-dev-console-bg:#f8f8fa;--copilot-kit-dev-console-text:#000}.dark,[data-theme=dark],body.dark,body[style*="color-scheme: dark"] :root,html.dark,html[style*="color-scheme: dark"]{--copilot-kit-primary-color:#fff;--copilot-kit-contrast-color:#1c1c1c;--copilot-kit-background-color:#111;--copilot-kit-input-background-color:#2c2c2c;--copilot-kit-secondary-color:#1c1c1c;--copilot-kit-secondary-contrast-color:#fff;--copilot-kit-separator-color:#2d2d2d;--copilot-kit-muted-color:#2d2d2d;--copilot-kit-error-background:#7f1d1d;--copilot-kit-error-border:#dc2626;--copilot-kit-error-text:#fca5a5;--copilot-kit-shadow-sm:0 1px 2px 0 rgba(0,0,0,.3);--copilot-kit-shadow-md:0 4px 6px -1px rgba(0,0,0,.4),0 2px 4px -1px rgba(0,0,0,.3);--copilot-kit-shadow-lg:0 10px 15px -3px rgba(0,0,0,.4),0 4px 6px -2px rgba(0,0,0,.3)}.copilotKitPopup{-webkit-text-size-adjust:100%;font-feature-settings:normal;bottom:1rem;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;font-variation-settings:normal;line-height:1.5;position:fixed;right:1rem;-moz-tab-size:4;-o-tab-size:4;tab-size:4;touch-action:manipulation;z-index:30}.copilotKitPopup svg{display:inline-block;vertical-align:middle}.copilotKitSidebar{-webkit-text-size-adjust:100%;font-feature-settings:normal;bottom:1rem;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;font-variation-settings:normal;line-height:1.5;position:fixed;right:1rem;-moz-tab-size:4;-o-tab-size:4;tab-size:4;touch-action:manipulation;z-index:30}.copilotKitSidebar svg{display:inline-block;vertical-align:middle}.copilotKitSidebarContentWrapper{margin-right:0;overflow:visible;transition:margin-right .3s ease}@media (min-width:640px){.copilotKitSidebarContentWrapper.sidebarExpanded{margin-right:28rem}}.copilotKitButton{align-items:center;background-color:var(--copilot-kit-primary-color);border:1px solid var(--copilot-kit-primary-color);border-radius:50%;box-shadow:var(--copilot-kit-shadow-sm);color:var(--copilot-kit-contrast-color);cursor:pointer;display:flex;height:3.5rem;justify-content:center;outline:none;position:relative;transform:scale(1);transition:all .2s ease;width:3.5rem}.copilotKitButton:hover{box-shadow:var(--copilot-kit-shadow-md);transform:scale(1.05)}.copilotKitButton:active{box-shadow:var(--copilot-kit-shadow-sm);transform:scale(.95)}.copilotKitButtonIcon{align-items:center;display:flex;justify-content:center;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);transition:opacity .1s,transform .3s}.copilotKitButtonIcon svg{height:1.5rem;width:1.5rem}.copilotKitButton.open .copilotKitButtonIconOpen{opacity:0;transform:translate(-50%,-50%) scale(0) rotate(90deg)}.copilotKitButton.open .copilotKitButtonIconClose,.copilotKitButton:not(.open) .copilotKitButtonIconOpen{opacity:1;transform:translate(-50%,-50%) scale(1) rotate(0deg)}.copilotKitButton:not(.open) .copilotKitButtonIconClose{opacity:0;transform:translate(-50%,-50%) scale(0) rotate(-90deg)}.copilotKitHeader{align-items:center;background-color:var(--copilot-kit-contrast-color);border-bottom:1px solid var(--copilot-kit-separator-color);border-top-left-radius:0;border-top-right-radius:0;color:var(--copilot-kit-primary-color);display:flex;font-weight:500;height:56px;justify-content:space-between;padding-left:1.5rem;position:relative;z-index:2}.copilotKitSidebar .copilotKitHeader{border-radius:0}.copilotKitHeaderControls{display:flex}.copilotKitHeaderCloseButton{background:none;border:none}@media (min-width:640px){.copilotKitHeader{border-top-left-radius:8px;border-top-right-radius:8px;padding-left:1.5rem;padding-right:24px}}.copilotKitHeader>button{align-items:center;background-color:transparent;border:0;border-radius:50%;color:var(--copilot-kit-muted-color);cursor:pointer;display:flex;height:35px;justify-content:center;outline:none;padding:8px;position:absolute;right:16px;top:50%;transform:translateY(-50%);transition:background-color .2s ease;width:35px}.copilotKitHeader>button:hover{color:color-mix(in srgb,var(--copilot-kit-muted-color) 80%,#000)}.copilotKitHeader>button:focus{outline:none}.copilotKitInput{background-color:var(--copilot-kit-input-background-color);border:1px solid var(--copilot-kit-separator-color);border-radius:20px;cursor:text;margin:0 auto;min-height:75px;padding:12px 14px;position:relative;width:95%}.copilotKitInputContainer{background:var(--copilot-kit-background-color);border-bottom-left-radius:.75rem;border-bottom-right-radius:.75rem;padding:0 0 15px;width:100%}.copilotKitSidebar .copilotKitInputContainer{border-bottom-left-radius:0;border-bottom-right-radius:0}.copilotKitInputControlButton{-webkit-appearance:button;appearance:button;background-color:transparent;background-image:none;border:0;color:rgba(0,0,0,.25);cursor:pointer;display:inline-block;font-family:inherit;font-size:100%;font-weight:inherit;height:24px;line-height:inherit;margin:0;padding:0;text-align:center;text-indent:0;text-shadow:none;text-transform:none;transform:scale(1);transition-duration:.2s;transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);width:24px}.copilotKitInputControlButton:not([disabled]){color:var(--copilot-kit-primary-color)}.copilotKitInputControlButton:not([disabled]):hover{color:color-mix(in srgb,var(--copilot-kit-primary-color) 80%,#000);transform:scale(1.05)}.copilotKitInputControlButton[disabled]{color:var(--copilot-kit-muted-color);cursor:default}.copilotKitInputControls{display:flex;gap:3px}.copilotKitInput>textarea{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;background-color:transparent;border:0;color:var(--copilot-kit-secondary-contrast-color);cursor:text;flex:1;font-family:inherit;font-size:.875rem;font-weight:inherit;line-height:1.5rem;margin:0;outline:2px solid transparent;outline-offset:2px;overflow-wrap:break-word;padding:0;resize:none;white-space:pre-wrap;width:100%}.copilotKitInput>textarea::placeholder{color:grey;opacity:1}.copilotKitInputControlButton.copilotKitPushToTalkRecording{animation:copilotKitPulseAnimation 2s cubic-bezier(.4,0,.6,1) infinite;background-color:#ec0000;border-radius:50%;color:#fff}.copilotKitInput textarea::-webkit-scrollbar{width:9px}.copilotKitInput textarea::-webkit-scrollbar-track{background:transparent}.copilotKitInput textarea::-webkit-scrollbar-thumb{background-clip:content-box;background-color:#c8c8c8;border:2px solid transparent;border-radius:10px;cursor:pointer}.copilotKitInput textarea::-webkit-scrollbar-thumb:hover{background-color:color-mix(in srgb,#c8c8c8 80%,#000)}.poweredByContainer{padding:0}.poweredBy{background:var(--copilot-kit-background-color)!important;color:#d6d6d6!important;display:block!important;font-size:12px!important;margin:0!important;padding:3px 0!important;position:static!important;text-align:center!important;visibility:visible!important}.dark,[data-theme=dark],body.dark,body[style*="color-scheme: dark"] .poweredBy,html.dark,html[style*="color-scheme: dark"]{color:#454545!important}.copilotKitMessages{background-color:var(--copilot-kit-background-color);display:flex;flex:1;flex-direction:column;justify-content:space-between;overflow-y:scroll;z-index:1}.copilotKitMessagesContainer{display:flex;flex-direction:column;padding:1rem 24px}.copilotKitMessagesFooter{display:flex;flex-direction:column;justify-content:flex-start;margin:8px auto 0;padding:.5rem .75rem;width:97%}.copilotKitMessages::-webkit-scrollbar{width:6px}.copilotKitMessages::-webkit-scrollbar-thumb{background-color:var(--copilot-kit-separator-color);border:2px solid var(--copilot-kit-background-color);border-radius:10rem}.copilotKitMessages::-webkit-scrollbar-track-piece:start{background:transparent}.copilotKitMessages::-webkit-scrollbar-track-piece:end{background:transparent}.copilotKitMessage{border-radius:15px;font-size:1rem;line-height:1.5;margin-bottom:.5rem;max-width:80%;overflow-wrap:break-word;padding:8px 12px}.copilotKitMessage.copilotKitUserMessage{background:var(--copilot-kit-primary-color);color:var(--copilot-kit-contrast-color);font-size:1rem;line-height:1.75;margin-left:auto;white-space:pre-wrap}.copilotKitMessage.copilotKitAssistantMessage{background:transparent;color:var(--copilot-kit-secondary-contrast-color);margin-right:auto;max-width:100%;padding-left:0;position:relative}.copilotKitMessage.copilotKitAssistantMessage .copilotKitMessageControls{display:flex;gap:1rem;left:0;opacity:0;padding:5px 0 0;position:absolute;transition:opacity .2s ease}.copilotKitMessageControls.currentMessage{opacity:1!important}.copilotKitMessage.copilotKitAssistantMessage:hover .copilotKitMessageControls{opacity:1}@media (max-width:768px){.copilotKitMessage.copilotKitAssistantMessage .copilotKitMessageControls{opacity:1}}.copilotKitMessageControlButton{align-items:center;background:transparent;border:none;border-radius:.5rem;color:var(--copilot-kit-primary-color);cursor:pointer;display:flex;height:20px;justify-content:center;margin:0;padding:0;transition:all .2s ease;width:20px;z-index:10}.copilotKitMessageControlButton:active,.copilotKitMessageControlButton:hover{color:color-mix(in srgb,var(--copilot-kit-primary-color) 80%,#000);transform:scale(1.05)}.copilotKitMessageControlButton svg{display:block;height:1rem;pointer-events:none;width:1rem}.copilotKitMessage.copilotKitAssistantMessage+.copilotKitMessage.copilotKitUserMessage{margin-top:1.5rem}.copilotKitCustomAssistantMessage{margin-bottom:1.5rem;margin-top:1.5rem}.copilotKitMessage .inProgressLabel{margin-left:10px;opacity:.7}.copilotKitSpinner{animation:copilotKitSpinAnimation 1s linear infinite;border:2px solid var(--copilot-kit-contrast-color);border-radius:50%;border-top-color:var(--copilot-kit-primary-color);display:inline-block;height:16px;margin-left:8px;width:16px}@keyframes copilotKitActivityDotAnimation{0%,80%,to{opacity:.5;transform:scale(.5)}40%{opacity:1;transform:scale(1)}}.copilotKitActivityDot{animation:copilotKitActivityDotAnimation 1.4s ease-in-out infinite both;background-color:var(--copilot-kit-primary-color);border-radius:50%;display:inline-block;height:6px;width:6px}.copilotKitImageRendering{display:flex;flex-direction:column;gap:8px}.copilotKitImageRenderingImage{border-radius:8px;box-shadow:var(--copilot-kit-shadow-sm);height:auto;max-width:100%}.copilotKitImageRenderingContent{color:var(--copilot-kit-secondary-contrast-color);font-size:.875rem;line-height:1.5;margin-top:8px;padding:0 16px}.copilotKitImageRenderingError{background-color:var(--copilot-kit-input-background-color);border:1px solid var(--copilot-kit-separator-color);border-radius:8px;display:flex;flex-direction:column;gap:8px;padding:12px}.copilotKitImageRenderingErrorMessage{align-items:center;background-color:var(--copilot-kit-error-background);border:1px solid var(--copilot-kit-error-border);border-radius:6px;color:var(--copilot-kit-error-text);display:flex;font-size:.875rem;font-weight:500;gap:8px;padding:8px 12px}.copilotKitImageRenderingErrorMessage:before{content:"\26a0\fe0f";font-size:1rem}.copilotKitWindow{background-color:var(--copilot-kit-background-color);border-color:#e5e7eb;border-radius:.75rem;box-shadow:0 5px 40px rgba(0,0,0,.16);display:flex;flex-direction:column;inset:0;opacity:0;pointer-events:none;position:fixed;transform:scale(.95) translateY(20px);transform-origin:bottom;transition:opacity .1s ease-out,transform .2s ease-out}.copilotKitSidebar .copilotKitWindow{border-radius:0;opacity:1;transform:translateX(100%)}.copilotKitWindow.open{opacity:1;pointer-events:auto;transform:scale(1) translateY(0)}.copilotKitSidebar .copilotKitWindow.open{transform:translateX(0)}@media (min-width:640px){.copilotKitWindow{border-width:0;bottom:5rem;height:600px;left:auto;margin-bottom:1rem;max-height:calc(100% - 6rem);min-height:200px;right:1rem;top:auto;transform-origin:bottom right;width:24rem}.copilotKitSidebar .copilotKitWindow{bottom:0;left:auto;margin-bottom:0;max-height:none;min-height:100%;right:0;top:auto;width:28rem}}.copilotKitActivityDot1{animation:copilotKitActivityDotsAnimation 1.05s infinite}.copilotKitActivityDot2{animation-delay:.1s}.copilotKitActivityDot3{animation-delay:.2s}@keyframes copilotKitActivityDotsAnimation{0%,57.14%{animation-timing-function:cubic-bezier(.33,.66,.66,1);transform:translate(0)}28.57%{animation-timing-function:cubic-bezier(.33,0,.66,.33);transform:translateY(-6px)}to{transform:translate(0)}}@keyframes copilotKitSpinAnimation{to{transform:rotate(1turn)}}@keyframes copilotKitPulseAnimation{50%{opacity:.5}}h1.copilotKitMarkdownElement,h2.copilotKitMarkdownElement,h3.copilotKitMarkdownElement,h4.copilotKitMarkdownElement,h5.copilotKitMarkdownElement,h6.copilotKitMarkdownElement{font-weight:700;line-height:1.2}h1.copilotKitMarkdownElement:not(:last-child),h2.copilotKitMarkdownElement:not(:last-child),h3.copilotKitMarkdownElement:not(:last-child),h4.copilotKitMarkdownElement:not(:last-child),h5.copilotKitMarkdownElement:not(:last-child),h6.copilotKitMarkdownElement:not(:last-child){margin-bottom:1rem}h1.copilotKitMarkdownElement{font-size:1.5em}h2.copilotKitMarkdownElement{font-size:1.25em;font-weight:600}h3.copilotKitMarkdownElement{font-size:1.1em}h4.copilotKitMarkdownElement{font-size:1em}h5.copilotKitMarkdownElement{font-size:.9em}h6.copilotKitMarkdownElement{font-size:.8em}a.copilotKitMarkdownElement{color:blue;text-decoration:underline}p.copilotKitMarkdownElement{font-size:1rem;line-height:1.75;margin:0;padding:0}blockquote.copilotKitMarkdownElement:not(:last-child),ol.copilotKitMarkdownElement:not(:last-child),p.copilotKitMarkdownElement:not(:last-child),pre.copilotKitMarkdownElement:not(:last-child),ul.copilotKitMarkdownElement:not(:last-child){margin-bottom:1.25em}blockquote.copilotKitMarkdownElement{border-left:2px solid;border-color:#8e8ea0;line-height:1.2;padding-left:10px}blockquote.copilotKitMarkdownElement p{padding:.7em 0}ul.copilotKitMarkdownElement{list-style-type:disc;overflow:visible;padding-left:20px}li.copilotKitMarkdownElement{list-style-position:outside;list-style-type:inherit;margin-left:0;overflow:visible;padding-left:0;position:relative}.copilotKitCodeBlock{background-color:#09090b;border-radius:.375rem;position:relative;width:100%}.copilotKitCodeBlockToolbar{align-items:center;background-color:#27272a;border-top-left-radius:.375rem;border-top-right-radius:.375rem;color:#e4e4e4;display:flex;font-family:sans-serif;justify-content:space-between;padding-bottom:.09rem;padding-left:1rem;padding-top:.09rem;width:100%}.copilotKitCodeBlockToolbarLanguage{font-size:.75rem;line-height:1rem;text-transform:lowercase}.copilotKitCodeBlockToolbarButtons{align-items:center;display:flex;margin-left:.25rem;margin-right:.25rem}.copilotKitCodeBlockToolbarButton{align-items:center;border-radius:.375rem;display:inline-flex;font-size:.875rem;font-weight:500;height:2.5rem;justify-content:center;line-height:1.25rem;margin:2px;padding:3px}.copilotKitCodeBlockToolbarButton:hover{background-color:#37373a}.copilotKitInlineCode{background-color:var(--copilot-kit-input-background-color);border:1px solid var(--copilot-kit-separator-color);border-radius:.375rem;font-size:15px;padding:.05rem .4rem}.copilotKitMessages footer .suggestions{display:flex;flex-wrap:wrap;gap:6px}.copilotKitMessages footer h6{font-size:.7rem;font-weight:500;margin-bottom:8px}.copilotKitMessages footer .suggestions .suggestion{border:1px solid var(--copilot-kit-muted-color);border-radius:15px;box-shadow:0 5px 5px 0 rgba(0,0,0,.01),0 2px 3px 0 rgba(0,0,0,.02);color:var(--copilot-kit-secondary-contrast-color);font-size:.7rem;padding:6px 10px}.copilotKitMessages footer .suggestions .suggestion.loading{border:none;color:var(--copilot-kit-secondary-contrast-color);font-size:.7rem;padding:0}.copilotKitMessages footer .suggestions button{transition:transform .3s ease}.copilotKitMessages footer .suggestions button:not(:disabled):hover{transform:scale(1.03)}.copilotKitMessages footer .suggestions button:disabled{cursor:wait}.copilotKitMessages footer .suggestions button svg{margin-right:6px}.copilotKitChat{-webkit-text-size-adjust:100%;font-feature-settings:normal;background:var(--copilot-kit-background-color);display:flex;flex-direction:column;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;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;touch-action:manipulation;z-index:30}.copilotKitChat svg{display:inline-block;vertical-align:middle}.copilotKitChat .copilotKitMessages{flex-grow:1}.copilotKitDevConsole{align-items:center;display:flex;gap:5px;margin:0 15px}.copilotKitDevConsole.copilotKitDevConsoleWarnOutdated{background-color:var(--copilot-kit-dev-console-bg)}.copilotKitDevConsole .copilotKitVersionInfo{align-items:center;background:#ebb305;bottom:-25px;display:flex;font-size:.8rem;gap:10px;justify-content:center;left:0;padding:3px 5px;position:absolute;width:100%}.copilotKitDevConsole .copilotKitVersionInfo button{background-color:var(--copilot-kit-dev-console-bg);border:1px solid #979797;border-radius:4px;display:inline-block;font-family:monospace;font-size:11px;font-weight:400;overflow:hidden;padding:1px 12px 1px 5px;text-align:left;text-overflow:ellipsis;white-space:nowrap;width:260px}.copilotKitDevConsole .copilotKitVersionInfo aside{color:#7f7a7a;display:inline;font-weight:400;margin-left:5px}.copilotKitDevConsole .copilotKitVersionInfo svg{margin-left:3px;margin-top:-3px}.copilotKitDevConsole .copilotKitDebugMenuTriggerButton{align-items:center;background-color:transparent;border:1px solid var(--copilot-kit-muted-color);border-radius:20px;display:flex;font-size:11px;font-weight:700;height:30px;justify-content:center;outline:none;padding:0 10px}.copilotKitDebugMenuTriggerButton.compact{color:var(--copilot-kit-dev-console-bg);font-size:8px;justify-content:center;outline:none;width:35px}.copilotKitDevConsole .copilotKitDebugMenuTriggerButton:hover{background-color:color-mix(in srgb,var(--copilot-kit-dev-console-bg) 85%,#000);color:var(--copilot-kit-dev-console-text)}.dark,[data-theme=dark],body.dark,body[style*="color-scheme: dark"] .copilotKitDevConsole .copilotKitDebugMenuTriggerButton,html.dark,html[style*="color-scheme: dark"]{color:#fff}.dark,[data-theme=dark],body.dark,body[style*="color-scheme: dark"] .copilotKitDevConsole .copilotKitDebugMenuTriggerButton:hover,html.dark,html[style*="color-scheme: dark"]{background-color:color-mix(in srgb,var(--copilot-kit-dev-console-bg) 20%,#000)}.copilotKitDevConsole .copilotKitDebugMenuTriggerButton>svg{margin-left:10px}.copilotKitDebugMenu{--copilot-kit-dev-console-border:color-mix(in srgb,var(--copilot-kit-dev-console-bg) 80%,#000);background-color:var(--copilot-kit-dev-console-bg);border:1px solid var(--copilot-kit-dev-console-border);border-radius:6px;font-size:13px;margin-top:2px;outline:none;padding:.25rem}.copilotKitDebugMenuItem{background:none;border:none;color:var(--copilot-kit-dev-console-text);cursor:pointer;display:block;padding:3px 10px;text-align:left;width:100%}.copilotKitDebugMenuItem:hover{background-color:color-mix(in srgb,var(--copilot-kit-dev-console-bg) 95%,#000);border-radius:4px}.copilotKitDebugMenu[data-closed]{opacity:0;transform:scale(.95)}.copilotKitDebugMenu hr{background-color:var(--copilot-kit-dev-console-border);border:none;height:1px;margin:.25rem}.copilotKitHelpItemButton,.copilotKitHelpModal{background-color:var(--copilot-kit-dev-console-bg);color:var(--copilot-kit-dev-console-text)}.copilotKitHelpItemButton{border:1px solid var(--copilot-kit-muted-color);border-radius:15px;box-shadow:0 5px 5px 0 rgba(0,0,0,.01),0 2px 3px 0 rgba(0,0,0,.02);display:block;font-size:.8rem;padding:4px 6px;text-align:center;width:100%}.copilotKitHelpItemButton:hover{background-color:color-mix(in srgb,var(--copilot-kit-dev-console-bg) 95%,#000)}.copilotkit-response{text-align:right}.copilotkit-response-content{background-color:#f9fafb;border-radius:.25rem;color:#4b5563;font-size:.875rem;margin-bottom:.5rem;padding:.5rem;text-align:left}.copilotkit-response-actions{align-items:flex-end;display:inline-flex;flex-direction:column}.copilotkit-response-label{align-items:center;color:#6b7280;display:flex;font-size:.75rem;margin-bottom:.25rem}.copilotkit-toggle-button{align-items:center;background:none;border:none;cursor:pointer;display:flex;justify-content:center;margin-right:.25rem;padding:0}.copilotkit-icon{color:#6b7280;height:.75rem;width:.75rem}.copilotkit-response-buttons{display:flex;gap:.5rem}.copilotkit-response-button{background-color:#f3f4f6;border:none;border-radius:.25rem;color:#4b5563;cursor:pointer;font-size:.75rem;padding:.25rem .5rem;transition:background-color .2s}.copilotkit-response-button:hover{background-color:#e5e7eb}.copilotkit-response-button:focus{outline:none}.copilotkit-response-completed-feedback{align-items:center;background-color:#f9fafb;border-radius:.375rem;display:inline-flex;padding:.5rem}.copilotkit-response-completed-feedback span{color:#4b5563;font-size:.75rem;font-weight:500}.copilotkit-state{font-size:.875rem;margin-bottom:1rem}.copilotkit-state-header{align-items:center;cursor:pointer;display:flex;gap:.25rem;margin-bottom:.25rem;user-select:none}.copilotkit-state-label{color:#4b5563;font-size:.875rem}.copilotkit-state-label-loading{align-items:center;animation:pulse 1.5s infinite;display:inline-flex}.copilotkit-state-content{border-left:1px solid #e5e7eb;margin-left:.375rem;max-height:250px;overflow:auto;padding-left:1rem;padding-top:.375rem}.copilotkit-state-item{margin-bottom:.25rem;padding:.25rem 0;transition:all .3s ease}.copilotkit-state-item-newest{animation:appear .5s ease-out}.copilotkit-state-item-header{font-size:.75rem;opacity:.7}.copilotkit-state-item-thought{opacity:.8}.copilotkit-state-item-description,.copilotkit-state-item-result,.copilotkit-state-item-thought{font-size:.75rem;margin-top:.125rem}.copilotkit-state-item-description{opacity:.8}.copilotkit-state-empty{font-size:.75rem;opacity:.7;padding:.25rem 0}.copilotkit-skeleton{animation:pulse 1.5s infinite;padding:.125rem 0}.copilotkit-skeleton-header{display:flex;justify-content:space-between}.copilotkit-skeleton-title{background-color:#e5e7eb;border-radius:.25rem;height:.625rem;width:4rem}.copilotkit-skeleton-subtitle{background-color:#e5e7eb;border-radius:.25rem;height:.5rem;width:2rem}.copilotkit-skeleton-content{background-color:#e5e7eb;border-radius:.25rem;height:1.5rem;margin-top:.125rem}.copilotkit-loader,.copilotkit-spinner{animation:spin 1.5s linear infinite}@keyframes appear{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}@keyframes pulse{0%,to{opacity:.4}50%{opacity:1}}@keyframes spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}@media (prefers-color-scheme:dark){.copilotkit-response-content{background-color:#1f2937;color:#9ca3af}.copilotkit-icon,.copilotkit-response-label{color:#9ca3af}.copilotkit-response-button{background-color:#1f2937;color:#d1d5db}.copilotkit-response-button:hover{background-color:#374151}.copilotkit-response-completed-feedback{background-color:#1f2937}.copilotkit-response-completed-feedback span{color:#e5e7eb}.copilotkit-state-label{color:#d1d5db}.copilotkit-state-content{border-left-color:#374151}.copilotkit-skeleton-content,.copilotkit-skeleton-subtitle,.copilotkit-skeleton-title{background-color:#374151}}
|
|
1
|
+
.react-grid-layout{position:relative;transition:height .2s ease}.react-grid-item{transition:all .2s ease;transition-property:left,top,width,height}.react-grid-item img{pointer-events:none;-webkit-user-select:none;user-select:none}.react-grid-item.cssTransforms{transition-property:transform,width,height}.react-grid-item.resizing{transition:none;will-change:width,height;z-index:1}.react-grid-item.react-draggable-dragging{transition:none;will-change:transform;z-index:3}.react-grid-item.dropping{visibility:hidden}.react-grid-item.react-grid-placeholder{background:red;opacity:.2;transition-duration:.1s;-webkit-user-select:none;-o-user-select:none;user-select:none;z-index:2}.react-grid-item.react-grid-placeholder.placeholder-resizing{transition:none}.react-grid-item>.react-resizable-handle{height:20px;position:absolute;width:20px}.react-grid-item>.react-resizable-handle:after{border-bottom:2px solid rgba(0,0,0,.4);border-right:2px solid rgba(0,0,0,.4);bottom:3px;content:"";height:5px;position:absolute;right:3px;width:5px}.react-resizable-hide>.react-resizable-handle{display:none}.react-grid-item>.react-resizable-handle.react-resizable-handle-sw{bottom:0;cursor:sw-resize;left:0;transform:rotate(90deg)}.react-grid-item>.react-resizable-handle.react-resizable-handle-se{bottom:0;cursor:se-resize;right:0}.react-grid-item>.react-resizable-handle.react-resizable-handle-nw{cursor:nw-resize;left:0;top:0;transform:rotate(180deg)}.react-grid-item>.react-resizable-handle.react-resizable-handle-ne{cursor:ne-resize;right:0;top:0;transform:rotate(270deg)}.react-grid-item>.react-resizable-handle.react-resizable-handle-e,.react-grid-item>.react-resizable-handle.react-resizable-handle-w{cursor:ew-resize;margin-top:-10px;top:50%}.react-grid-item>.react-resizable-handle.react-resizable-handle-w{left:0;transform:rotate(135deg)}.react-grid-item>.react-resizable-handle.react-resizable-handle-e{right:0;transform:rotate(315deg)}.react-grid-item>.react-resizable-handle.react-resizable-handle-n,.react-grid-item>.react-resizable-handle.react-resizable-handle-s{cursor:ns-resize;left:50%;margin-left:-10px}.react-grid-item>.react-resizable-handle.react-resizable-handle-n{top:0;transform:rotate(225deg)}.react-grid-item>.react-resizable-handle.react-resizable-handle-s{bottom:0;transform:rotate(45deg)}.react-resizable{position:relative}.react-resizable-handle{background-image:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHN0eWxlPSJiYWNrZ3JvdW5kLWNvbG9yOiNmZmZmZmYwMCIgd2lkdGg9IjYiIGhlaWdodD0iNiI+PHBhdGggZD0iTTYgNkgwVjQuMmg0LjJWMEg2djZaIiBvcGFjaXR5PSIuMzAyIi8+PC9zdmc+");background-origin:content-box;background-position:100% 100%;background-repeat:no-repeat;box-sizing:border-box;height:20px;padding:0 3px 3px 0;position:absolute;width:20px}.react-resizable-handle-sw{bottom:0;cursor:sw-resize;left:0;transform:rotate(90deg)}.react-resizable-handle-se{bottom:0;cursor:se-resize;right:0}.react-resizable-handle-nw{cursor:nw-resize;left:0;top:0;transform:rotate(180deg)}.react-resizable-handle-ne{cursor:ne-resize;right:0;top:0;transform:rotate(270deg)}.react-resizable-handle-e,.react-resizable-handle-w{cursor:ew-resize;margin-top:-10px;top:50%}.react-resizable-handle-w{left:0;transform:rotate(135deg)}.react-resizable-handle-e{right:0;transform:rotate(315deg)}.react-resizable-handle-n,.react-resizable-handle-s{cursor:ns-resize;left:50%;margin-left:-10px}.react-resizable-handle-n{top:0;transform:rotate(225deg)}.react-resizable-handle-s{bottom:0;transform:rotate(45deg)}
|
package/dist/index.esm.js
CHANGED
|
@@ -7,7 +7,7 @@ import * as LabelPrimitive from '@radix-ui/react-label';
|
|
|
7
7
|
import { cva } from 'class-variance-authority';
|
|
8
8
|
import * as SwitchPrimitives from '@radix-ui/react-switch';
|
|
9
9
|
import * as SelectPrimitive from '@radix-ui/react-select';
|
|
10
|
-
import { ChevronDown, ChevronUp, Check, AlertCircle, MoveUp, MoveDown, Trash2, Plus, Bot, Type, Layout, LayoutGrid, BarChart as BarChart$1, Filter, Search, ArrowUp, ArrowDown, RefreshCw, X, LineChart as LineChart$1, PieChart as PieChart$1, Table, FileText, Loader2, GripHorizontal, Edit, MessageCircleX, Edit2 } from 'lucide-react';
|
|
10
|
+
import { ChevronDown, ChevronUp, Check, AlertCircle, MoveUp, MoveDown, Trash2, Plus, Bot, Type, Layout, LayoutGrid, BarChart as BarChart$1, Filter, Search, ArrowUp, ArrowDown, ChevronRight, RefreshCw, X, LineChart as LineChart$1, PieChart as PieChart$1, Table, FileText, Loader2, GripHorizontal, Edit, MessageCircleX, Edit2 } from 'lucide-react';
|
|
11
11
|
import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
|
|
12
12
|
import { Slot } from '@radix-ui/react-slot';
|
|
13
13
|
import { debounce as debounce$1 } from 'lodash';
|
|
@@ -15379,15 +15379,49 @@ function LineChart({ title, data, options, className, units }) {
|
|
|
15379
15379
|
}
|
|
15380
15380
|
|
|
15381
15381
|
function DataGrid({ title, data, className }) {
|
|
15382
|
-
|
|
15383
|
-
|
|
15382
|
+
var _a;
|
|
15383
|
+
const { columns, rows, grouped = false, grouping } = data;
|
|
15384
|
+
const [expandedGroups, setExpandedGroups] = useState(new Set(((_a = grouping === null || grouping === void 0 ? void 0 : grouping.sections) === null || _a === void 0 ? void 0 : _a.filter(s => s.expanded).map(s => s.group_value)) || []));
|
|
15385
|
+
const toggleGroup = (groupValue) => {
|
|
15386
|
+
const newExpanded = new Set(expandedGroups);
|
|
15387
|
+
if (newExpanded.has(groupValue)) {
|
|
15388
|
+
newExpanded.delete(groupValue);
|
|
15389
|
+
}
|
|
15390
|
+
else {
|
|
15391
|
+
newExpanded.add(groupValue);
|
|
15392
|
+
}
|
|
15393
|
+
setExpandedGroups(newExpanded);
|
|
15394
|
+
};
|
|
15395
|
+
// Backward compatibility: if no data or not grouped, show original table
|
|
15396
|
+
if (!columns || columns.length === 0 || (!grouped && (!rows || rows.length === 0))) {
|
|
15384
15397
|
return (jsxRuntimeExports.jsx("div", { className: "flex items-center justify-center h-full", children: jsxRuntimeExports.jsx("p", { className: "text-sm text-gray-500", children: "No data available" }) }));
|
|
15385
15398
|
}
|
|
15399
|
+
// For grouped data, check if there are sections
|
|
15400
|
+
if (grouped && (!(grouping === null || grouping === void 0 ? void 0 : grouping.sections) || grouping.sections.length === 0)) {
|
|
15401
|
+
return (jsxRuntimeExports.jsx("div", { className: "flex items-center justify-center h-full", children: jsxRuntimeExports.jsx("p", { className: "text-sm text-gray-500", children: "No grouped data available" }) }));
|
|
15402
|
+
}
|
|
15403
|
+
const renderGroupedTable = () => {
|
|
15404
|
+
if (!(grouping === null || grouping === void 0 ? void 0 : grouping.sections))
|
|
15405
|
+
return null;
|
|
15406
|
+
return (jsxRuntimeExports.jsxs("table", { className: "w-full border-collapse", children: [jsxRuntimeExports.jsx("thead", { children: jsxRuntimeExports.jsxs("tr", { className: "border-b border-gray-200 dark:border-gray-700", children: [jsxRuntimeExports.jsx("th", { className: "px-4 py-3 text-left text-sm font-medium text-gray-900 dark:text-gray-100 bg-gray-50 dark:bg-gray-800 w-8" }), columns.map((column, index) => (jsxRuntimeExports.jsx("th", { className: "px-4 py-3 text-left text-sm font-medium text-gray-900 dark:text-gray-100 bg-gray-50 dark:bg-gray-800", children: column }, index)))] }) }), jsxRuntimeExports.jsx("tbody", { children: grouping.sections.map((section, sectionIndex) => {
|
|
15407
|
+
const isExpanded = expandedGroups.has(section.group_value);
|
|
15408
|
+
return (jsxRuntimeExports.jsxs(React__default.Fragment, { children: [jsxRuntimeExports.jsxs("tr", { className: "bg-blue-50 dark:bg-blue-900/30 border-b border-gray-200 dark:border-gray-700", children: [jsxRuntimeExports.jsx("td", { className: "px-4 py-3", children: section.collapsible && (jsxRuntimeExports.jsx("button", { onClick: () => toggleGroup(section.group_value), className: "flex items-center justify-center w-6 h-6 hover:bg-blue-100 dark:hover:bg-blue-800 rounded transition-colors", "aria-label": isExpanded ? "Collapse group" : "Expand group", children: isExpanded ? (jsxRuntimeExports.jsx(ChevronDown, { className: "w-4 h-4 text-blue-600 dark:text-blue-400" })) : (jsxRuntimeExports.jsx(ChevronRight, { className: "w-4 h-4 text-blue-600 dark:text-blue-400" })) })) }), jsxRuntimeExports.jsx("td", { colSpan: columns.length, className: "px-4 py-3 text-sm font-semibold text-blue-900 dark:text-blue-100", children: jsxRuntimeExports.jsx("div", { className: "flex items-center justify-between", children: jsxRuntimeExports.jsxs("span", { children: [section.title, ": ", section.group_value, " (", section.row_count, " row", section.row_count !== 1 ? "s" : "", ")"] }) }) })] }), (!section.collapsible || isExpanded) && section.rows.map((row, rowIndex) => (jsxRuntimeExports.jsxs("tr", { className: `border-b border-gray-200 dark:border-gray-700 ${rowIndex % 2 === 0
|
|
15409
|
+
? "bg-white dark:bg-gray-900"
|
|
15410
|
+
: "bg-gray-50 dark:bg-gray-800"} hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors`, children: [jsxRuntimeExports.jsx("td", { className: "px-4 py-3" }), row.map((cell, cellIndex) => (jsxRuntimeExports.jsx("td", { className: "px-4 py-3 text-sm text-gray-900 dark:text-gray-100", children: cell !== null && cell !== undefined ? String(cell) : "—" }, cellIndex)))] }, `${sectionIndex}-${rowIndex}`)))] }, `section-${sectionIndex}`));
|
|
15411
|
+
}) })] }));
|
|
15412
|
+
};
|
|
15413
|
+
const renderRegularTable = () => (jsxRuntimeExports.jsxs("table", { className: "w-full border-collapse", children: [jsxRuntimeExports.jsx("thead", { children: jsxRuntimeExports.jsx("tr", { className: "border-b border-gray-200 dark:border-gray-700", children: columns.map((column, index) => (jsxRuntimeExports.jsx("th", { className: "px-4 py-3 text-left text-sm font-medium text-gray-900 dark:text-gray-100 bg-gray-50 dark:bg-gray-800", children: column }, index))) }) }), jsxRuntimeExports.jsx("tbody", { children: rows.map((row, rowIndex) => (jsxRuntimeExports.jsx("tr", { className: `border-b border-gray-200 dark:border-gray-700 ${rowIndex % 2 === 0
|
|
15414
|
+
? "bg-white dark:bg-gray-900"
|
|
15415
|
+
: "bg-gray-50 dark:bg-gray-800"} hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors`, children: row.map((cell, cellIndex) => (jsxRuntimeExports.jsx("td", { className: "px-4 py-3 text-sm text-gray-900 dark:text-gray-100", children: cell !== null && cell !== undefined ? String(cell) : "—" }, cellIndex))) }, rowIndex))) })] }));
|
|
15416
|
+
const getTotalRowCount = () => {
|
|
15417
|
+
if (grouped && (grouping === null || grouping === void 0 ? void 0 : grouping.sections)) {
|
|
15418
|
+
return grouping.sections.reduce((total, section) => total + section.row_count, 0);
|
|
15419
|
+
}
|
|
15420
|
+
return rows.length;
|
|
15421
|
+
};
|
|
15386
15422
|
return (jsxRuntimeExports.jsxs("div", { className: `h-full flex flex-col ${className || ""}`, children: [title && (jsxRuntimeExports.jsx("div", { className: "pb-4", children: jsxRuntimeExports.jsx("h3", { className: "text-lg font-bold", style: {
|
|
15387
15423
|
color: "#0F172A"
|
|
15388
|
-
}, children: title }) })), jsxRuntimeExports.jsx("div", { className: "flex-1 overflow-auto", children: jsxRuntimeExports.jsx("div", { className: "min-w-full", children:
|
|
15389
|
-
? "bg-white dark:bg-gray-900"
|
|
15390
|
-
: "bg-gray-50 dark:bg-gray-800"} hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors`, children: row.map((cell, cellIndex) => (jsxRuntimeExports.jsx("td", { className: "px-4 py-3 text-sm text-gray-900 dark:text-gray-100", children: cell !== null && cell !== undefined ? String(cell) : "—" }, cellIndex))) }, rowIndex))) })] }) }) }), jsxRuntimeExports.jsxs("div", { className: "pt-2 text-xs text-gray-500 dark:text-gray-400", children: ["Showing ", rows.length, " row", rows.length !== 1 ? "s" : "", " \u00D7 ", columns.length, " column", columns.length !== 1 ? "s" : ""] })] }));
|
|
15424
|
+
}, children: title }) })), jsxRuntimeExports.jsx("div", { className: "flex-1 overflow-auto", children: jsxRuntimeExports.jsx("div", { className: "min-w-full", children: grouped && grouping ? renderGroupedTable() : renderRegularTable() }) }), jsxRuntimeExports.jsx("div", { className: "pt-2 text-xs text-gray-500 dark:text-gray-400", children: grouped && grouping ? (jsxRuntimeExports.jsxs("span", { children: ["Showing ", getTotalRowCount(), " row", getTotalRowCount() !== 1 ? "s" : "", " in ", grouping.total_groups, " group", grouping.total_groups !== 1 ? "s" : "", " \u00D7 ", columns.length, " column", columns.length !== 1 ? "s" : ""] })) : (jsxRuntimeExports.jsxs("span", { children: ["Showing ", rows.length, " row", rows.length !== 1 ? "s" : "", " \u00D7 ", columns.length, " column", columns.length !== 1 ? "s" : ""] })) })] }));
|
|
15391
15425
|
}
|
|
15392
15426
|
|
|
15393
15427
|
function ok$1() {}
|
|
@@ -36114,6 +36148,7 @@ const createInitialChartState = (agentType, widgetIds, datasetId) => {
|
|
|
36114
36148
|
title: "",
|
|
36115
36149
|
type: "data_grid",
|
|
36116
36150
|
grid_type: "",
|
|
36151
|
+
grouped: false,
|
|
36117
36152
|
data: { headers: [], rows: [], row_count: 0, column_count: 0 },
|
|
36118
36153
|
metadata: { total_rows: 0, total_columns: 0, numeric_columns: [] }
|
|
36119
36154
|
} }, baseState);
|
|
@@ -36166,7 +36201,7 @@ const parseAndUpdateChartState = (apiResponse, setChartState) => {
|
|
|
36166
36201
|
if (parsedState.state) {
|
|
36167
36202
|
const chartData = parsedState.state;
|
|
36168
36203
|
// Update chart state while preserving existing data including agent_message
|
|
36169
|
-
setChartState(prevState => {
|
|
36204
|
+
setChartState((prevState) => {
|
|
36170
36205
|
const newChartState = Object.assign({}, prevState);
|
|
36171
36206
|
// Check for different chart types and map them accordingly
|
|
36172
36207
|
if (chartData.bar_chart_data) {
|
|
@@ -36175,8 +36210,8 @@ const parseAndUpdateChartState = (apiResponse, setChartState) => {
|
|
|
36175
36210
|
if (chartData.series_bar_chart_data) {
|
|
36176
36211
|
newChartState.series_bar_chart_data = chartData.series_bar_chart_data;
|
|
36177
36212
|
}
|
|
36178
|
-
if (chartData.
|
|
36179
|
-
newChartState.
|
|
36213
|
+
if (chartData.series_bar_chart_data && chartData.series_bar_chart_data.type === "series_line") {
|
|
36214
|
+
newChartState.series_bar_chart_data = chartData.series_bar_chart_data;
|
|
36180
36215
|
}
|
|
36181
36216
|
if (chartData.pie_chart_data) {
|
|
36182
36217
|
newChartState.pie_chart_data = chartData.pie_chart_data;
|
|
@@ -36497,7 +36532,7 @@ function LineChartComponent({ lineChartState, styles, appendMessage, query, isFi
|
|
|
36497
36532
|
return (jsxRuntimeExports.jsx(LineChart, { title: chartTitle, data: transformedData, units: units }));
|
|
36498
36533
|
}
|
|
36499
36534
|
function DataGridComponent({ dataGridState, styles, appendMessage, query, isFirstLoad, widgetBackendUrl, widgetId, startLoadingTimeout, clearLoadingTimeout }) {
|
|
36500
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
36535
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
|
|
36501
36536
|
const hasCalledRef = useRef(false);
|
|
36502
36537
|
const columns = ((_b = (_a = dataGridState === null || dataGridState === void 0 ? void 0 : dataGridState.matrix_grid_data) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.headers) || ((_e = (_d = (_c = dataGridState === null || dataGridState === void 0 ? void 0 : dataGridState.state) === null || _c === void 0 ? void 0 : _c.matrix_grid_data) === null || _d === void 0 ? void 0 : _d.data) === null || _e === void 0 ? void 0 : _e.headers) || [];
|
|
36503
36538
|
const rows = ((_g = (_f = dataGridState === null || dataGridState === void 0 ? void 0 : dataGridState.matrix_grid_data) === null || _f === void 0 ? void 0 : _f.data) === null || _g === void 0 ? void 0 : _g.rows) || ((_k = (_j = (_h = dataGridState === null || dataGridState === void 0 ? void 0 : dataGridState.state) === null || _h === void 0 ? void 0 : _h.matrix_grid_data) === null || _j === void 0 ? void 0 : _j.data) === null || _k === void 0 ? void 0 : _k.rows) || [];
|
|
@@ -36535,7 +36570,9 @@ function DataGridComponent({ dataGridState, styles, appendMessage, query, isFirs
|
|
|
36535
36570
|
}
|
|
36536
36571
|
const transformedData = {
|
|
36537
36572
|
columns: columns,
|
|
36538
|
-
rows: rows
|
|
36573
|
+
rows: rows,
|
|
36574
|
+
grouped: ((_p = dataGridState === null || dataGridState === void 0 ? void 0 : dataGridState.matrix_grid_data) === null || _p === void 0 ? void 0 : _p.grouped) || ((_r = (_q = dataGridState === null || dataGridState === void 0 ? void 0 : dataGridState.state) === null || _q === void 0 ? void 0 : _q.matrix_grid_data) === null || _r === void 0 ? void 0 : _r.grouped) || false,
|
|
36575
|
+
grouping: ((_s = dataGridState === null || dataGridState === void 0 ? void 0 : dataGridState.matrix_grid_data) === null || _s === void 0 ? void 0 : _s.grouping) || ((_u = (_t = dataGridState === null || dataGridState === void 0 ? void 0 : dataGridState.state) === null || _t === void 0 ? void 0 : _t.matrix_grid_data) === null || _u === void 0 ? void 0 : _u.grouping)
|
|
36539
36576
|
};
|
|
36540
36577
|
return (jsxRuntimeExports.jsx(DataGrid, { title: gridTitle, data: transformedData, className: "" }));
|
|
36541
36578
|
}
|
|
@@ -36562,7 +36599,7 @@ function SummaryComponent({ summaryState, styles, appendMessage, query, isFirstL
|
|
|
36562
36599
|
useEffect(() => {
|
|
36563
36600
|
if (isEmpty && query && isFirstLoad && !(summaryState === null || summaryState === void 0 ? void 0 : summaryState.agent_message) && !hasCalledRef.current) {
|
|
36564
36601
|
hasCalledRef.current = true;
|
|
36565
|
-
setChartState(prevState => (Object.assign(Object.assign({}, prevState), { widget_ids: widget_ids })));
|
|
36602
|
+
setChartState((prevState) => (Object.assign(Object.assign({}, prevState), { widget_ids: widget_ids })));
|
|
36566
36603
|
setTimeout(() => {
|
|
36567
36604
|
handleRefresh();
|
|
36568
36605
|
}, 500);
|
|
@@ -37551,7 +37588,7 @@ function WidgetDashboard({ pageId, isEditing, selectedWidget = null, onWidgetSel
|
|
|
37551
37588
|
position_y: position.y,
|
|
37552
37589
|
width: widgetTypeConfig.defaultSize.w,
|
|
37553
37590
|
height: widgetTypeConfig.defaultSize.h,
|
|
37554
|
-
config: Object.assign(Object.assign({}, config), { isFirstLoad: true })
|
|
37591
|
+
config: config ? Object.assign(Object.assign({}, config), { isFirstLoad: true }) : { isFirstLoad: true },
|
|
37555
37592
|
is_draggable: true,
|
|
37556
37593
|
is_resizable: true,
|
|
37557
37594
|
minH: widgetType === "text" ? widgetTypeConfig.defaultSize.h : undefined,
|
|
@@ -37623,9 +37660,9 @@ function WidgetDashboard({ pageId, isEditing, selectedWidget = null, onWidgetSel
|
|
|
37623
37660
|
setSelectedWidget(null);
|
|
37624
37661
|
}
|
|
37625
37662
|
};
|
|
37626
|
-
return (jsxRuntimeExports.jsxs("div", { className: "w-full max-w-full p-4 bg-accent/5", children: [jsxRuntimeExports.jsx(AddWidgetDialog, { isOpen: openWidgetPallete, onClose: onCloseWidgetPallete, addWidgetFn: (widgetType, config) => {
|
|
37663
|
+
return (jsxRuntimeExports.jsxs("div", { className: "w-full max-w-full p-4 bg-accent/5", children: [jsxRuntimeExports.jsx(AddWidgetDialog, { isOpen: openWidgetPallete, onClose: onCloseWidgetPallete || (() => { }), addWidgetFn: (widgetType, config) => {
|
|
37627
37664
|
addWidget(widgetType, config);
|
|
37628
|
-
onCloseWidgetPallete
|
|
37665
|
+
onCloseWidgetPallete && onCloseWidgetPallete();
|
|
37629
37666
|
}, defaultAgentName: defaultAgentName }), jsxRuntimeExports.jsx(EditWidgetDialog, { editingWidget: editingWidget, setWidgets: setWidgets, initialText: editInitialQuery, isOpen: showEditModal, onClose: () => setShowEditModal(false), onSubmit: handleEditSubmit }), jsxRuntimeExports.jsx("div", { className: "min-h-full", onDragOver: (e) => e.preventDefault(), onDrop: handleDrop, onClick: () => setSelectedWidget(null), children: isLoading ? (jsxRuntimeExports.jsx("div", { className: "flex items-center justify-center h-full", children: jsxRuntimeExports.jsx(Loader2, { className: "h-8 w-8 animate-spin" }) })) : (jsxRuntimeExports.jsx(RGL, { className: "layout m-0 p-0 gap-2", layouts: { lg: getLayoutFromWidgets() }, breakpoints: { lg: 1200, md: 996, sm: 768, xs: 480 }, cols: { lg: 12, md: 8, sm: 6, xs: 2 }, rowHeight: 60, isDraggable: isEditing, isResizable: isEditing, draggableHandle: ".drag-icon", onLayoutChange: handleLayoutChange, compactType: "vertical", containerPadding: [0, 0], margin: [16, 16], children: widgets.map((w) => {
|
|
37630
37667
|
var _a, _b;
|
|
37631
37668
|
return (jsxRuntimeExports.jsxs("div", { className: `${w.type === "text" ? `${((_b = (_a = w === null || w === void 0 ? void 0 : w.config) === null || _a === void 0 ? void 0 : _a.content) === null || _b === void 0 ? void 0 : _b.divider) === "yes" && "border-b border-gray-300"} ${isEditing ? 'shadow-lg rounded-xl border border-primary-300' : 'flex items-center'}` : `shadow-lg rounded-xl border border-primary-300 p-4 ${isEditing ? 'pb-20' : 'pb-14'}`} overflow-hidden`, children: [isEditing &&
|
|
@@ -40520,7 +40557,7 @@ function SavedPages({ onEditPage, widgetBackendUrl }) {
|
|
|
40520
40557
|
if (isLoading) {
|
|
40521
40558
|
return (jsxRuntimeExports.jsx("div", { className: "flex items-center justify-center h-screen", children: jsxRuntimeExports.jsx("div", { className: "animate-spin rounded-full h-8 w-8 border-b-2 border-gray-900" }) }));
|
|
40522
40559
|
}
|
|
40523
|
-
return (jsxRuntimeExports.jsxs("div", { className: "container mx-auto p-6 space-y-6", children: [jsxRuntimeExports.jsxs("div", { className: "flex justify-between items-center", children: [jsxRuntimeExports.jsx("h1", { className: "text-2xl font-bold", children: "Saved Pages" }), jsxRuntimeExports.jsxs(Button, { onClick: handleCreatePage, children: [jsxRuntimeExports.jsx(Plus, { className: "h-4 w-4 mr-2" }), "Create New Page"] })] }), error && (jsxRuntimeExports.jsx(Alert, { variant: "destructive", children: jsxRuntimeExports.jsx(AlertDescription, { children: error }) })), jsxRuntimeExports.jsxs("div", { className: "flex items-center space-x-2", children: [jsxRuntimeExports.jsx(Search, { className: "h-4 w-4 text-muted-foreground" }), jsxRuntimeExports.jsx(Input, { placeholder: "Search pages...", value: searchTerm, onChange: (e) => setSearchTerm(e.target.value), className: "max-w-sm" })] }), jsxRuntimeExports.jsx("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6", children: filteredPages.map((page) => (jsxRuntimeExports.jsxs(Card, { className: "hover:shadow-lg transition-shadow", children: [jsxRuntimeExports.jsxs(CardHeader, { children: [jsxRuntimeExports.jsx(CardTitle, { children: page.title }), jsxRuntimeExports.jsxs(CardDescription, { children: ["Created: ", format(new Date(page.created_at), "PPP")] })] }), jsxRuntimeExports.jsx(CardContent, { children: jsxRuntimeExports.jsxs("div", { className: "flex justify-between items-center", children: [jsxRuntimeExports.jsxs("div", { className: "flex items-center space-x-2 text-sm text-muted-foreground", children: [jsxRuntimeExports.jsx(LayoutGrid, { className: "h-4 w-4" }), jsxRuntimeExports.jsxs("span", { children: ["Page #", page.id] })] }), jsxRuntimeExports.jsxs("div", { className: "flex space-x-2", children: [jsxRuntimeExports.jsx(Button, { variant: "outline", size: "sm", onClick: () => onEditPage(page.id), children: jsxRuntimeExports.jsx(Edit2, { className: "h-4 w-4" }) }), jsxRuntimeExports.jsx(Button, { variant: "outline", size: "sm", onClick: () => handleDeletePage(page.id), children: jsxRuntimeExports.jsx(Trash2, { className: "h-4 w-4" }) })] })] }) })] }, page.id))) }), filteredPages.length === 0 && (jsxRuntimeExports.jsx("div", { className: "text-center text-muted-foreground py-12", children: "No pages found. Create a new one to get started." })), jsxRuntimeExports.jsx(Dialog, { open: isCreateModalOpen, onOpenChange: setIsCreateModalOpen, children: jsxRuntimeExports.jsxs(DialogContent, { className: "sm:max-w-[425px]", children: [jsxRuntimeExports.jsxs(DialogHeader, { children: [jsxRuntimeExports.jsx(DialogTitle, { children: "Create New Page" }), jsxRuntimeExports.jsx(DialogDescription, { children: "Create a new page with widgets. You can customize it after creation." })] }), jsxRuntimeExports.jsxs("div", { className: "grid gap-4 py-4", children: [jsxRuntimeExports.jsxs("div", { className: "grid grid-cols-4 items-center gap-4", children: [jsxRuntimeExports.jsx(Label, { htmlFor: "title", className: "text-right", children: "Title" }), jsxRuntimeExports.jsx(Input, { id: "title", value: newPageTitle, onChange: (e) => setNewPageTitle(e.target.value), placeholder: "Enter page title...", className: "col-span-3" })] }), jsxRuntimeExports.jsxs("div", { className: "flex items-center space-x-2", children: [jsxRuntimeExports.jsx(Checkbox, { id: "public", checked: newPageIsPublic, onCheckedChange: setNewPageIsPublic }), jsxRuntimeExports.jsx(Label, { htmlFor: "public", className: "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70", children: "Make this page public" })] })] }), jsxRuntimeExports.jsxs(DialogFooter, { children: [jsxRuntimeExports.jsx(Button, { type: "button", variant: "outline", onClick: () => {
|
|
40560
|
+
return (jsxRuntimeExports.jsxs("div", { className: "container mx-auto p-6 space-y-6", children: [jsxRuntimeExports.jsxs("div", { className: "flex justify-between items-center", children: [jsxRuntimeExports.jsx("h1", { className: "text-2xl font-bold", children: "Saved Pages" }), jsxRuntimeExports.jsxs(Button, { onClick: handleCreatePage, children: [jsxRuntimeExports.jsx(Plus, { className: "h-4 w-4 mr-2" }), "Create New Page"] })] }), error && (jsxRuntimeExports.jsx(Alert, { variant: "destructive", children: jsxRuntimeExports.jsx(AlertDescription, { children: error }) })), jsxRuntimeExports.jsxs("div", { className: "flex items-center space-x-2", children: [jsxRuntimeExports.jsx(Search, { className: "h-4 w-4 text-muted-foreground" }), jsxRuntimeExports.jsx(Input, { placeholder: "Search pages...", value: searchTerm, onChange: (e) => setSearchTerm(e.target.value), className: "max-w-sm" })] }), jsxRuntimeExports.jsx("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6", children: filteredPages.map((page) => (jsxRuntimeExports.jsxs(Card, { className: "hover:shadow-lg transition-shadow", children: [jsxRuntimeExports.jsxs(CardHeader, { children: [jsxRuntimeExports.jsx(CardTitle, { children: page.title }), jsxRuntimeExports.jsxs(CardDescription, { children: ["Created: ", format(new Date(page.created_at), "PPP")] })] }), jsxRuntimeExports.jsx(CardContent, { children: jsxRuntimeExports.jsxs("div", { className: "flex justify-between items-center", children: [jsxRuntimeExports.jsxs("div", { className: "flex items-center space-x-2 text-sm text-muted-foreground", children: [jsxRuntimeExports.jsx(LayoutGrid, { className: "h-4 w-4" }), jsxRuntimeExports.jsxs("span", { children: ["Page #", page.id] })] }), jsxRuntimeExports.jsxs("div", { className: "flex space-x-2", children: [jsxRuntimeExports.jsx(Button, { variant: "outline", size: "sm", onClick: () => onEditPage(page.id), children: jsxRuntimeExports.jsx(Edit2, { className: "h-4 w-4" }) }), jsxRuntimeExports.jsx(Button, { variant: "outline", size: "sm", onClick: () => handleDeletePage(page.id), children: jsxRuntimeExports.jsx(Trash2, { className: "h-4 w-4" }) })] })] }) })] }, page.id))) }), filteredPages.length === 0 && (jsxRuntimeExports.jsx("div", { className: "text-center text-muted-foreground py-12", children: "No pages found. Create a new one to get started." })), jsxRuntimeExports.jsx(Dialog, { open: isCreateModalOpen, onOpenChange: setIsCreateModalOpen, children: jsxRuntimeExports.jsxs(DialogContent, { className: "sm:max-w-[425px]", children: [jsxRuntimeExports.jsxs(DialogHeader, { children: [jsxRuntimeExports.jsx(DialogTitle, { children: "Create New Page" }), jsxRuntimeExports.jsx(DialogDescription, { children: "Create a new page with widgets. You can customize it after creation." })] }), jsxRuntimeExports.jsxs("div", { className: "grid gap-4 py-4", children: [jsxRuntimeExports.jsxs("div", { className: "grid grid-cols-4 items-center gap-4", children: [jsxRuntimeExports.jsx(Label, { htmlFor: "title", className: "text-right", children: "Title" }), jsxRuntimeExports.jsx(Input, { id: "title", value: newPageTitle, onChange: (e) => setNewPageTitle(e.target.value), placeholder: "Enter page title...", className: "col-span-3" })] }), jsxRuntimeExports.jsxs("div", { className: "flex items-center space-x-2", children: [jsxRuntimeExports.jsx(Checkbox, { id: "public", checked: newPageIsPublic, onCheckedChange: (checked) => setNewPageIsPublic(checked === true) }), jsxRuntimeExports.jsx(Label, { htmlFor: "public", className: "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70", children: "Make this page public" })] })] }), jsxRuntimeExports.jsxs(DialogFooter, { children: [jsxRuntimeExports.jsx(Button, { type: "button", variant: "outline", onClick: () => {
|
|
40524
40561
|
setIsCreateModalOpen(false);
|
|
40525
40562
|
setNewPageTitle("");
|
|
40526
40563
|
setNewPageIsPublic(false);
|
package/dist/index.js
CHANGED
|
@@ -15406,15 +15406,49 @@ function LineChart({ title, data, options, className, units }) {
|
|
|
15406
15406
|
}
|
|
15407
15407
|
|
|
15408
15408
|
function DataGrid({ title, data, className }) {
|
|
15409
|
-
|
|
15410
|
-
|
|
15409
|
+
var _a;
|
|
15410
|
+
const { columns, rows, grouped = false, grouping } = data;
|
|
15411
|
+
const [expandedGroups, setExpandedGroups] = React.useState(new Set(((_a = grouping === null || grouping === void 0 ? void 0 : grouping.sections) === null || _a === void 0 ? void 0 : _a.filter(s => s.expanded).map(s => s.group_value)) || []));
|
|
15412
|
+
const toggleGroup = (groupValue) => {
|
|
15413
|
+
const newExpanded = new Set(expandedGroups);
|
|
15414
|
+
if (newExpanded.has(groupValue)) {
|
|
15415
|
+
newExpanded.delete(groupValue);
|
|
15416
|
+
}
|
|
15417
|
+
else {
|
|
15418
|
+
newExpanded.add(groupValue);
|
|
15419
|
+
}
|
|
15420
|
+
setExpandedGroups(newExpanded);
|
|
15421
|
+
};
|
|
15422
|
+
// Backward compatibility: if no data or not grouped, show original table
|
|
15423
|
+
if (!columns || columns.length === 0 || (!grouped && (!rows || rows.length === 0))) {
|
|
15411
15424
|
return (jsxRuntimeExports.jsx("div", { className: "flex items-center justify-center h-full", children: jsxRuntimeExports.jsx("p", { className: "text-sm text-gray-500", children: "No data available" }) }));
|
|
15412
15425
|
}
|
|
15426
|
+
// For grouped data, check if there are sections
|
|
15427
|
+
if (grouped && (!(grouping === null || grouping === void 0 ? void 0 : grouping.sections) || grouping.sections.length === 0)) {
|
|
15428
|
+
return (jsxRuntimeExports.jsx("div", { className: "flex items-center justify-center h-full", children: jsxRuntimeExports.jsx("p", { className: "text-sm text-gray-500", children: "No grouped data available" }) }));
|
|
15429
|
+
}
|
|
15430
|
+
const renderGroupedTable = () => {
|
|
15431
|
+
if (!(grouping === null || grouping === void 0 ? void 0 : grouping.sections))
|
|
15432
|
+
return null;
|
|
15433
|
+
return (jsxRuntimeExports.jsxs("table", { className: "w-full border-collapse", children: [jsxRuntimeExports.jsx("thead", { children: jsxRuntimeExports.jsxs("tr", { className: "border-b border-gray-200 dark:border-gray-700", children: [jsxRuntimeExports.jsx("th", { className: "px-4 py-3 text-left text-sm font-medium text-gray-900 dark:text-gray-100 bg-gray-50 dark:bg-gray-800 w-8" }), columns.map((column, index) => (jsxRuntimeExports.jsx("th", { className: "px-4 py-3 text-left text-sm font-medium text-gray-900 dark:text-gray-100 bg-gray-50 dark:bg-gray-800", children: column }, index)))] }) }), jsxRuntimeExports.jsx("tbody", { children: grouping.sections.map((section, sectionIndex) => {
|
|
15434
|
+
const isExpanded = expandedGroups.has(section.group_value);
|
|
15435
|
+
return (jsxRuntimeExports.jsxs(React.Fragment, { children: [jsxRuntimeExports.jsxs("tr", { className: "bg-blue-50 dark:bg-blue-900/30 border-b border-gray-200 dark:border-gray-700", children: [jsxRuntimeExports.jsx("td", { className: "px-4 py-3", children: section.collapsible && (jsxRuntimeExports.jsx("button", { onClick: () => toggleGroup(section.group_value), className: "flex items-center justify-center w-6 h-6 hover:bg-blue-100 dark:hover:bg-blue-800 rounded transition-colors", "aria-label": isExpanded ? "Collapse group" : "Expand group", children: isExpanded ? (jsxRuntimeExports.jsx(lucideReact.ChevronDown, { className: "w-4 h-4 text-blue-600 dark:text-blue-400" })) : (jsxRuntimeExports.jsx(lucideReact.ChevronRight, { className: "w-4 h-4 text-blue-600 dark:text-blue-400" })) })) }), jsxRuntimeExports.jsx("td", { colSpan: columns.length, className: "px-4 py-3 text-sm font-semibold text-blue-900 dark:text-blue-100", children: jsxRuntimeExports.jsx("div", { className: "flex items-center justify-between", children: jsxRuntimeExports.jsxs("span", { children: [section.title, ": ", section.group_value, " (", section.row_count, " row", section.row_count !== 1 ? "s" : "", ")"] }) }) })] }), (!section.collapsible || isExpanded) && section.rows.map((row, rowIndex) => (jsxRuntimeExports.jsxs("tr", { className: `border-b border-gray-200 dark:border-gray-700 ${rowIndex % 2 === 0
|
|
15436
|
+
? "bg-white dark:bg-gray-900"
|
|
15437
|
+
: "bg-gray-50 dark:bg-gray-800"} hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors`, children: [jsxRuntimeExports.jsx("td", { className: "px-4 py-3" }), row.map((cell, cellIndex) => (jsxRuntimeExports.jsx("td", { className: "px-4 py-3 text-sm text-gray-900 dark:text-gray-100", children: cell !== null && cell !== undefined ? String(cell) : "—" }, cellIndex)))] }, `${sectionIndex}-${rowIndex}`)))] }, `section-${sectionIndex}`));
|
|
15438
|
+
}) })] }));
|
|
15439
|
+
};
|
|
15440
|
+
const renderRegularTable = () => (jsxRuntimeExports.jsxs("table", { className: "w-full border-collapse", children: [jsxRuntimeExports.jsx("thead", { children: jsxRuntimeExports.jsx("tr", { className: "border-b border-gray-200 dark:border-gray-700", children: columns.map((column, index) => (jsxRuntimeExports.jsx("th", { className: "px-4 py-3 text-left text-sm font-medium text-gray-900 dark:text-gray-100 bg-gray-50 dark:bg-gray-800", children: column }, index))) }) }), jsxRuntimeExports.jsx("tbody", { children: rows.map((row, rowIndex) => (jsxRuntimeExports.jsx("tr", { className: `border-b border-gray-200 dark:border-gray-700 ${rowIndex % 2 === 0
|
|
15441
|
+
? "bg-white dark:bg-gray-900"
|
|
15442
|
+
: "bg-gray-50 dark:bg-gray-800"} hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors`, children: row.map((cell, cellIndex) => (jsxRuntimeExports.jsx("td", { className: "px-4 py-3 text-sm text-gray-900 dark:text-gray-100", children: cell !== null && cell !== undefined ? String(cell) : "—" }, cellIndex))) }, rowIndex))) })] }));
|
|
15443
|
+
const getTotalRowCount = () => {
|
|
15444
|
+
if (grouped && (grouping === null || grouping === void 0 ? void 0 : grouping.sections)) {
|
|
15445
|
+
return grouping.sections.reduce((total, section) => total + section.row_count, 0);
|
|
15446
|
+
}
|
|
15447
|
+
return rows.length;
|
|
15448
|
+
};
|
|
15413
15449
|
return (jsxRuntimeExports.jsxs("div", { className: `h-full flex flex-col ${className || ""}`, children: [title && (jsxRuntimeExports.jsx("div", { className: "pb-4", children: jsxRuntimeExports.jsx("h3", { className: "text-lg font-bold", style: {
|
|
15414
15450
|
color: "#0F172A"
|
|
15415
|
-
}, children: title }) })), jsxRuntimeExports.jsx("div", { className: "flex-1 overflow-auto", children: jsxRuntimeExports.jsx("div", { className: "min-w-full", children:
|
|
15416
|
-
? "bg-white dark:bg-gray-900"
|
|
15417
|
-
: "bg-gray-50 dark:bg-gray-800"} hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors`, children: row.map((cell, cellIndex) => (jsxRuntimeExports.jsx("td", { className: "px-4 py-3 text-sm text-gray-900 dark:text-gray-100", children: cell !== null && cell !== undefined ? String(cell) : "—" }, cellIndex))) }, rowIndex))) })] }) }) }), jsxRuntimeExports.jsxs("div", { className: "pt-2 text-xs text-gray-500 dark:text-gray-400", children: ["Showing ", rows.length, " row", rows.length !== 1 ? "s" : "", " \u00D7 ", columns.length, " column", columns.length !== 1 ? "s" : ""] })] }));
|
|
15451
|
+
}, children: title }) })), jsxRuntimeExports.jsx("div", { className: "flex-1 overflow-auto", children: jsxRuntimeExports.jsx("div", { className: "min-w-full", children: grouped && grouping ? renderGroupedTable() : renderRegularTable() }) }), jsxRuntimeExports.jsx("div", { className: "pt-2 text-xs text-gray-500 dark:text-gray-400", children: grouped && grouping ? (jsxRuntimeExports.jsxs("span", { children: ["Showing ", getTotalRowCount(), " row", getTotalRowCount() !== 1 ? "s" : "", " in ", grouping.total_groups, " group", grouping.total_groups !== 1 ? "s" : "", " \u00D7 ", columns.length, " column", columns.length !== 1 ? "s" : ""] })) : (jsxRuntimeExports.jsxs("span", { children: ["Showing ", rows.length, " row", rows.length !== 1 ? "s" : "", " \u00D7 ", columns.length, " column", columns.length !== 1 ? "s" : ""] })) })] }));
|
|
15418
15452
|
}
|
|
15419
15453
|
|
|
15420
15454
|
function ok$1() {}
|
|
@@ -36141,6 +36175,7 @@ const createInitialChartState = (agentType, widgetIds, datasetId) => {
|
|
|
36141
36175
|
title: "",
|
|
36142
36176
|
type: "data_grid",
|
|
36143
36177
|
grid_type: "",
|
|
36178
|
+
grouped: false,
|
|
36144
36179
|
data: { headers: [], rows: [], row_count: 0, column_count: 0 },
|
|
36145
36180
|
metadata: { total_rows: 0, total_columns: 0, numeric_columns: [] }
|
|
36146
36181
|
} }, baseState);
|
|
@@ -36193,7 +36228,7 @@ const parseAndUpdateChartState = (apiResponse, setChartState) => {
|
|
|
36193
36228
|
if (parsedState.state) {
|
|
36194
36229
|
const chartData = parsedState.state;
|
|
36195
36230
|
// Update chart state while preserving existing data including agent_message
|
|
36196
|
-
setChartState(prevState => {
|
|
36231
|
+
setChartState((prevState) => {
|
|
36197
36232
|
const newChartState = Object.assign({}, prevState);
|
|
36198
36233
|
// Check for different chart types and map them accordingly
|
|
36199
36234
|
if (chartData.bar_chart_data) {
|
|
@@ -36202,8 +36237,8 @@ const parseAndUpdateChartState = (apiResponse, setChartState) => {
|
|
|
36202
36237
|
if (chartData.series_bar_chart_data) {
|
|
36203
36238
|
newChartState.series_bar_chart_data = chartData.series_bar_chart_data;
|
|
36204
36239
|
}
|
|
36205
|
-
if (chartData.
|
|
36206
|
-
newChartState.
|
|
36240
|
+
if (chartData.series_bar_chart_data && chartData.series_bar_chart_data.type === "series_line") {
|
|
36241
|
+
newChartState.series_bar_chart_data = chartData.series_bar_chart_data;
|
|
36207
36242
|
}
|
|
36208
36243
|
if (chartData.pie_chart_data) {
|
|
36209
36244
|
newChartState.pie_chart_data = chartData.pie_chart_data;
|
|
@@ -36524,7 +36559,7 @@ function LineChartComponent({ lineChartState, styles, appendMessage, query, isFi
|
|
|
36524
36559
|
return (jsxRuntimeExports.jsx(LineChart, { title: chartTitle, data: transformedData, units: units }));
|
|
36525
36560
|
}
|
|
36526
36561
|
function DataGridComponent({ dataGridState, styles, appendMessage, query, isFirstLoad, widgetBackendUrl, widgetId, startLoadingTimeout, clearLoadingTimeout }) {
|
|
36527
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
36562
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
|
|
36528
36563
|
const hasCalledRef = React.useRef(false);
|
|
36529
36564
|
const columns = ((_b = (_a = dataGridState === null || dataGridState === void 0 ? void 0 : dataGridState.matrix_grid_data) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.headers) || ((_e = (_d = (_c = dataGridState === null || dataGridState === void 0 ? void 0 : dataGridState.state) === null || _c === void 0 ? void 0 : _c.matrix_grid_data) === null || _d === void 0 ? void 0 : _d.data) === null || _e === void 0 ? void 0 : _e.headers) || [];
|
|
36530
36565
|
const rows = ((_g = (_f = dataGridState === null || dataGridState === void 0 ? void 0 : dataGridState.matrix_grid_data) === null || _f === void 0 ? void 0 : _f.data) === null || _g === void 0 ? void 0 : _g.rows) || ((_k = (_j = (_h = dataGridState === null || dataGridState === void 0 ? void 0 : dataGridState.state) === null || _h === void 0 ? void 0 : _h.matrix_grid_data) === null || _j === void 0 ? void 0 : _j.data) === null || _k === void 0 ? void 0 : _k.rows) || [];
|
|
@@ -36562,7 +36597,9 @@ function DataGridComponent({ dataGridState, styles, appendMessage, query, isFirs
|
|
|
36562
36597
|
}
|
|
36563
36598
|
const transformedData = {
|
|
36564
36599
|
columns: columns,
|
|
36565
|
-
rows: rows
|
|
36600
|
+
rows: rows,
|
|
36601
|
+
grouped: ((_p = dataGridState === null || dataGridState === void 0 ? void 0 : dataGridState.matrix_grid_data) === null || _p === void 0 ? void 0 : _p.grouped) || ((_r = (_q = dataGridState === null || dataGridState === void 0 ? void 0 : dataGridState.state) === null || _q === void 0 ? void 0 : _q.matrix_grid_data) === null || _r === void 0 ? void 0 : _r.grouped) || false,
|
|
36602
|
+
grouping: ((_s = dataGridState === null || dataGridState === void 0 ? void 0 : dataGridState.matrix_grid_data) === null || _s === void 0 ? void 0 : _s.grouping) || ((_u = (_t = dataGridState === null || dataGridState === void 0 ? void 0 : dataGridState.state) === null || _t === void 0 ? void 0 : _t.matrix_grid_data) === null || _u === void 0 ? void 0 : _u.grouping)
|
|
36566
36603
|
};
|
|
36567
36604
|
return (jsxRuntimeExports.jsx(DataGrid, { title: gridTitle, data: transformedData, className: "" }));
|
|
36568
36605
|
}
|
|
@@ -36589,7 +36626,7 @@ function SummaryComponent({ summaryState, styles, appendMessage, query, isFirstL
|
|
|
36589
36626
|
React.useEffect(() => {
|
|
36590
36627
|
if (isEmpty && query && isFirstLoad && !(summaryState === null || summaryState === void 0 ? void 0 : summaryState.agent_message) && !hasCalledRef.current) {
|
|
36591
36628
|
hasCalledRef.current = true;
|
|
36592
|
-
setChartState(prevState => (Object.assign(Object.assign({}, prevState), { widget_ids: widget_ids })));
|
|
36629
|
+
setChartState((prevState) => (Object.assign(Object.assign({}, prevState), { widget_ids: widget_ids })));
|
|
36593
36630
|
setTimeout(() => {
|
|
36594
36631
|
handleRefresh();
|
|
36595
36632
|
}, 500);
|
|
@@ -37578,7 +37615,7 @@ function WidgetDashboard({ pageId, isEditing, selectedWidget = null, onWidgetSel
|
|
|
37578
37615
|
position_y: position.y,
|
|
37579
37616
|
width: widgetTypeConfig.defaultSize.w,
|
|
37580
37617
|
height: widgetTypeConfig.defaultSize.h,
|
|
37581
|
-
config: Object.assign(Object.assign({}, config), { isFirstLoad: true })
|
|
37618
|
+
config: config ? Object.assign(Object.assign({}, config), { isFirstLoad: true }) : { isFirstLoad: true },
|
|
37582
37619
|
is_draggable: true,
|
|
37583
37620
|
is_resizable: true,
|
|
37584
37621
|
minH: widgetType === "text" ? widgetTypeConfig.defaultSize.h : undefined,
|
|
@@ -37650,9 +37687,9 @@ function WidgetDashboard({ pageId, isEditing, selectedWidget = null, onWidgetSel
|
|
|
37650
37687
|
setSelectedWidget(null);
|
|
37651
37688
|
}
|
|
37652
37689
|
};
|
|
37653
|
-
return (jsxRuntimeExports.jsxs("div", { className: "w-full max-w-full p-4 bg-accent/5", children: [jsxRuntimeExports.jsx(AddWidgetDialog, { isOpen: openWidgetPallete, onClose: onCloseWidgetPallete, addWidgetFn: (widgetType, config) => {
|
|
37690
|
+
return (jsxRuntimeExports.jsxs("div", { className: "w-full max-w-full p-4 bg-accent/5", children: [jsxRuntimeExports.jsx(AddWidgetDialog, { isOpen: openWidgetPallete, onClose: onCloseWidgetPallete || (() => { }), addWidgetFn: (widgetType, config) => {
|
|
37654
37691
|
addWidget(widgetType, config);
|
|
37655
|
-
onCloseWidgetPallete
|
|
37692
|
+
onCloseWidgetPallete && onCloseWidgetPallete();
|
|
37656
37693
|
}, defaultAgentName: defaultAgentName }), jsxRuntimeExports.jsx(EditWidgetDialog, { editingWidget: editingWidget, setWidgets: setWidgets, initialText: editInitialQuery, isOpen: showEditModal, onClose: () => setShowEditModal(false), onSubmit: handleEditSubmit }), jsxRuntimeExports.jsx("div", { className: "min-h-full", onDragOver: (e) => e.preventDefault(), onDrop: handleDrop, onClick: () => setSelectedWidget(null), children: isLoading ? (jsxRuntimeExports.jsx("div", { className: "flex items-center justify-center h-full", children: jsxRuntimeExports.jsx(lucideReact.Loader2, { className: "h-8 w-8 animate-spin" }) })) : (jsxRuntimeExports.jsx(RGL, { className: "layout m-0 p-0 gap-2", layouts: { lg: getLayoutFromWidgets() }, breakpoints: { lg: 1200, md: 996, sm: 768, xs: 480 }, cols: { lg: 12, md: 8, sm: 6, xs: 2 }, rowHeight: 60, isDraggable: isEditing, isResizable: isEditing, draggableHandle: ".drag-icon", onLayoutChange: handleLayoutChange, compactType: "vertical", containerPadding: [0, 0], margin: [16, 16], children: widgets.map((w) => {
|
|
37657
37694
|
var _a, _b;
|
|
37658
37695
|
return (jsxRuntimeExports.jsxs("div", { className: `${w.type === "text" ? `${((_b = (_a = w === null || w === void 0 ? void 0 : w.config) === null || _a === void 0 ? void 0 : _a.content) === null || _b === void 0 ? void 0 : _b.divider) === "yes" && "border-b border-gray-300"} ${isEditing ? 'shadow-lg rounded-xl border border-primary-300' : 'flex items-center'}` : `shadow-lg rounded-xl border border-primary-300 p-4 ${isEditing ? 'pb-20' : 'pb-14'}`} overflow-hidden`, children: [isEditing &&
|
|
@@ -40547,7 +40584,7 @@ function SavedPages({ onEditPage, widgetBackendUrl }) {
|
|
|
40547
40584
|
if (isLoading) {
|
|
40548
40585
|
return (jsxRuntimeExports.jsx("div", { className: "flex items-center justify-center h-screen", children: jsxRuntimeExports.jsx("div", { className: "animate-spin rounded-full h-8 w-8 border-b-2 border-gray-900" }) }));
|
|
40549
40586
|
}
|
|
40550
|
-
return (jsxRuntimeExports.jsxs("div", { className: "container mx-auto p-6 space-y-6", children: [jsxRuntimeExports.jsxs("div", { className: "flex justify-between items-center", children: [jsxRuntimeExports.jsx("h1", { className: "text-2xl font-bold", children: "Saved Pages" }), jsxRuntimeExports.jsxs(Button, { onClick: handleCreatePage, children: [jsxRuntimeExports.jsx(lucideReact.Plus, { className: "h-4 w-4 mr-2" }), "Create New Page"] })] }), error && (jsxRuntimeExports.jsx(Alert, { variant: "destructive", children: jsxRuntimeExports.jsx(AlertDescription, { children: error }) })), jsxRuntimeExports.jsxs("div", { className: "flex items-center space-x-2", children: [jsxRuntimeExports.jsx(lucideReact.Search, { className: "h-4 w-4 text-muted-foreground" }), jsxRuntimeExports.jsx(Input, { placeholder: "Search pages...", value: searchTerm, onChange: (e) => setSearchTerm(e.target.value), className: "max-w-sm" })] }), jsxRuntimeExports.jsx("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6", children: filteredPages.map((page) => (jsxRuntimeExports.jsxs(Card, { className: "hover:shadow-lg transition-shadow", children: [jsxRuntimeExports.jsxs(CardHeader, { children: [jsxRuntimeExports.jsx(CardTitle, { children: page.title }), jsxRuntimeExports.jsxs(CardDescription, { children: ["Created: ", format(new Date(page.created_at), "PPP")] })] }), jsxRuntimeExports.jsx(CardContent, { children: jsxRuntimeExports.jsxs("div", { className: "flex justify-between items-center", children: [jsxRuntimeExports.jsxs("div", { className: "flex items-center space-x-2 text-sm text-muted-foreground", children: [jsxRuntimeExports.jsx(lucideReact.LayoutGrid, { className: "h-4 w-4" }), jsxRuntimeExports.jsxs("span", { children: ["Page #", page.id] })] }), jsxRuntimeExports.jsxs("div", { className: "flex space-x-2", children: [jsxRuntimeExports.jsx(Button, { variant: "outline", size: "sm", onClick: () => onEditPage(page.id), children: jsxRuntimeExports.jsx(lucideReact.Edit2, { className: "h-4 w-4" }) }), jsxRuntimeExports.jsx(Button, { variant: "outline", size: "sm", onClick: () => handleDeletePage(page.id), children: jsxRuntimeExports.jsx(lucideReact.Trash2, { className: "h-4 w-4" }) })] })] }) })] }, page.id))) }), filteredPages.length === 0 && (jsxRuntimeExports.jsx("div", { className: "text-center text-muted-foreground py-12", children: "No pages found. Create a new one to get started." })), jsxRuntimeExports.jsx(Dialog, { open: isCreateModalOpen, onOpenChange: setIsCreateModalOpen, children: jsxRuntimeExports.jsxs(DialogContent, { className: "sm:max-w-[425px]", children: [jsxRuntimeExports.jsxs(DialogHeader, { children: [jsxRuntimeExports.jsx(DialogTitle, { children: "Create New Page" }), jsxRuntimeExports.jsx(DialogDescription, { children: "Create a new page with widgets. You can customize it after creation." })] }), jsxRuntimeExports.jsxs("div", { className: "grid gap-4 py-4", children: [jsxRuntimeExports.jsxs("div", { className: "grid grid-cols-4 items-center gap-4", children: [jsxRuntimeExports.jsx(Label, { htmlFor: "title", className: "text-right", children: "Title" }), jsxRuntimeExports.jsx(Input, { id: "title", value: newPageTitle, onChange: (e) => setNewPageTitle(e.target.value), placeholder: "Enter page title...", className: "col-span-3" })] }), jsxRuntimeExports.jsxs("div", { className: "flex items-center space-x-2", children: [jsxRuntimeExports.jsx(Checkbox, { id: "public", checked: newPageIsPublic, onCheckedChange: setNewPageIsPublic }), jsxRuntimeExports.jsx(Label, { htmlFor: "public", className: "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70", children: "Make this page public" })] })] }), jsxRuntimeExports.jsxs(DialogFooter, { children: [jsxRuntimeExports.jsx(Button, { type: "button", variant: "outline", onClick: () => {
|
|
40587
|
+
return (jsxRuntimeExports.jsxs("div", { className: "container mx-auto p-6 space-y-6", children: [jsxRuntimeExports.jsxs("div", { className: "flex justify-between items-center", children: [jsxRuntimeExports.jsx("h1", { className: "text-2xl font-bold", children: "Saved Pages" }), jsxRuntimeExports.jsxs(Button, { onClick: handleCreatePage, children: [jsxRuntimeExports.jsx(lucideReact.Plus, { className: "h-4 w-4 mr-2" }), "Create New Page"] })] }), error && (jsxRuntimeExports.jsx(Alert, { variant: "destructive", children: jsxRuntimeExports.jsx(AlertDescription, { children: error }) })), jsxRuntimeExports.jsxs("div", { className: "flex items-center space-x-2", children: [jsxRuntimeExports.jsx(lucideReact.Search, { className: "h-4 w-4 text-muted-foreground" }), jsxRuntimeExports.jsx(Input, { placeholder: "Search pages...", value: searchTerm, onChange: (e) => setSearchTerm(e.target.value), className: "max-w-sm" })] }), jsxRuntimeExports.jsx("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6", children: filteredPages.map((page) => (jsxRuntimeExports.jsxs(Card, { className: "hover:shadow-lg transition-shadow", children: [jsxRuntimeExports.jsxs(CardHeader, { children: [jsxRuntimeExports.jsx(CardTitle, { children: page.title }), jsxRuntimeExports.jsxs(CardDescription, { children: ["Created: ", format(new Date(page.created_at), "PPP")] })] }), jsxRuntimeExports.jsx(CardContent, { children: jsxRuntimeExports.jsxs("div", { className: "flex justify-between items-center", children: [jsxRuntimeExports.jsxs("div", { className: "flex items-center space-x-2 text-sm text-muted-foreground", children: [jsxRuntimeExports.jsx(lucideReact.LayoutGrid, { className: "h-4 w-4" }), jsxRuntimeExports.jsxs("span", { children: ["Page #", page.id] })] }), jsxRuntimeExports.jsxs("div", { className: "flex space-x-2", children: [jsxRuntimeExports.jsx(Button, { variant: "outline", size: "sm", onClick: () => onEditPage(page.id), children: jsxRuntimeExports.jsx(lucideReact.Edit2, { className: "h-4 w-4" }) }), jsxRuntimeExports.jsx(Button, { variant: "outline", size: "sm", onClick: () => handleDeletePage(page.id), children: jsxRuntimeExports.jsx(lucideReact.Trash2, { className: "h-4 w-4" }) })] })] }) })] }, page.id))) }), filteredPages.length === 0 && (jsxRuntimeExports.jsx("div", { className: "text-center text-muted-foreground py-12", children: "No pages found. Create a new one to get started." })), jsxRuntimeExports.jsx(Dialog, { open: isCreateModalOpen, onOpenChange: setIsCreateModalOpen, children: jsxRuntimeExports.jsxs(DialogContent, { className: "sm:max-w-[425px]", children: [jsxRuntimeExports.jsxs(DialogHeader, { children: [jsxRuntimeExports.jsx(DialogTitle, { children: "Create New Page" }), jsxRuntimeExports.jsx(DialogDescription, { children: "Create a new page with widgets. You can customize it after creation." })] }), jsxRuntimeExports.jsxs("div", { className: "grid gap-4 py-4", children: [jsxRuntimeExports.jsxs("div", { className: "grid grid-cols-4 items-center gap-4", children: [jsxRuntimeExports.jsx(Label, { htmlFor: "title", className: "text-right", children: "Title" }), jsxRuntimeExports.jsx(Input, { id: "title", value: newPageTitle, onChange: (e) => setNewPageTitle(e.target.value), placeholder: "Enter page title...", className: "col-span-3" })] }), jsxRuntimeExports.jsxs("div", { className: "flex items-center space-x-2", children: [jsxRuntimeExports.jsx(Checkbox, { id: "public", checked: newPageIsPublic, onCheckedChange: (checked) => setNewPageIsPublic(checked === true) }), jsxRuntimeExports.jsx(Label, { htmlFor: "public", className: "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70", children: "Make this page public" })] })] }), jsxRuntimeExports.jsxs(DialogFooter, { children: [jsxRuntimeExports.jsx(Button, { type: "button", variant: "outline", onClick: () => {
|
|
40551
40588
|
setIsCreateModalOpen(false);
|
|
40552
40589
|
setNewPageTitle("");
|
|
40553
40590
|
setNewPageIsPublic(false);
|