@flexkit/studio 0.2.13 → 0.2.14
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/activity-nav-button-7SVTTHBQ.js +2 -0
- package/dist/{activity-nav-button-RDL5GIWG.js.map → activity-nav-button-7SVTTHBQ.js.map} +1 -1
- package/dist/astro.js +1 -1
- package/dist/{chat-page-B2IOPTUP.js → chat-page-L427VVVR.js} +3 -3
- package/dist/{chat-page-B2IOPTUP.js.map → chat-page-L427VVVR.js.map} +1 -1
- package/dist/chunk-2HYQVMP3.js +3 -0
- package/dist/chunk-2HYQVMP3.js.map +1 -0
- package/dist/chunk-5CVDMZUI.js +3 -0
- package/dist/chunk-5CVDMZUI.js.map +1 -0
- package/dist/chunk-6YJ3DLIU.js +2 -0
- package/dist/{chunk-CJGP4Y5Y.js.map → chunk-6YJ3DLIU.js.map} +1 -1
- package/dist/{chunk-C5Y6OZFR.js → chunk-7ELMTFZ4.js} +2 -2
- package/dist/{chunk-C5Y6OZFR.js.map → chunk-7ELMTFZ4.js.map} +1 -1
- package/dist/chunk-ALCK2BJY.js +2 -0
- package/dist/chunk-ALCK2BJY.js.map +1 -0
- package/dist/{chunk-ZLWYVTGO.js → chunk-D5WYD5M4.js} +2 -2
- package/dist/{chunk-ZLWYVTGO.js.map → chunk-D5WYD5M4.js.map} +1 -1
- package/dist/{chunk-DJPVRAFE.js → chunk-GFAOY74A.js} +9 -1
- package/dist/{chunk-TOY7ZRK2.js → chunk-MGXG5PWU.js} +3 -3
- package/dist/{chunk-TOY7ZRK2.js.map → chunk-MGXG5PWU.js.map} +1 -1
- package/dist/{chunk-KNESQOI5.js → chunk-MJVWFANP.js} +3 -3
- package/dist/{chunk-KNESQOI5.js.map → chunk-MJVWFANP.js.map} +1 -1
- package/dist/chunk-NLRSLQUT.js +3 -0
- package/dist/chunk-NLRSLQUT.js.map +1 -0
- package/dist/{chunk-VPTDAFFZ.js → chunk-P5ZRTZ5Z.js} +2 -2
- package/dist/{chunk-VPTDAFFZ.js.map → chunk-P5ZRTZ5Z.js.map} +1 -1
- package/dist/{chunk-N53TGGN5.js → chunk-R64ELY3B.js} +3 -3
- package/dist/{chunk-N53TGGN5.js.map → chunk-R64ELY3B.js.map} +1 -1
- package/dist/{chunk-APVKB4FT.js → chunk-U5D3EDCY.js} +2 -2
- package/dist/{chunk-APVKB4FT.js.map → chunk-U5D3EDCY.js.map} +1 -1
- package/dist/chunk-W7Z4MY43.js +2 -0
- package/dist/{chunk-ETQ3Q472.js.map → chunk-W7Z4MY43.js.map} +1 -1
- package/dist/chunk-XWBACTNR.js +3 -0
- package/dist/{chunk-CWJWOJRO.js.map → chunk-XWBACTNR.js.map} +1 -1
- package/dist/chunk-ZZRA4567.js +2 -0
- package/dist/{chunk-V64P56OA.js.map → chunk-ZZRA4567.js.map} +1 -1
- package/dist/electron.js +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +6 -6
- package/dist/index.js.map +1 -1
- package/dist/list-WJLU3K2X.js +2 -0
- package/dist/{list-4NZLZRX3.js.map → list-WJLU3K2X.js.map} +1 -1
- package/dist/nextjs.js +1 -1
- package/dist/{pages-7MFZAVLV.js → pages-3EK5GS2T.js} +4 -4
- package/dist/{pages-7MFZAVLV.js.map → pages-3EK5GS2T.js.map} +1 -1
- package/dist/plugin-pages-PQO22EOE.js +2 -0
- package/dist/{plugin-pages-RNB46YPQ.js.map → plugin-pages-PQO22EOE.js.map} +1 -1
- package/dist/root-4EALW3G6.js +2 -0
- package/dist/{root-5RDJ2HAV.js.map → root-4EALW3G6.js.map} +1 -1
- package/dist/{root-NCLIQPJA.js → root-BA7BLCFR.js} +3 -3
- package/dist/{root-NCLIQPJA.js.map → root-BA7BLCFR.js.map} +1 -1
- package/dist/root-YNGCF5QM.js +31 -0
- package/dist/{root-4XPMKRHZ.js.map → root-YNGCF5QM.js.map} +1 -1
- package/dist/{root-OHZDY47O.js → root-ZF62TR5Z.js} +2 -2
- package/dist/{root-OHZDY47O.js.map → root-ZF62TR5Z.js.map} +1 -1
- package/dist/search-QHMCAT7O.js +2 -0
- package/dist/{search-OWF3LEWH.js.map → search-QHMCAT7O.js.map} +1 -1
- package/dist/skills-pages-HIBSAVOP.js +2 -0
- package/dist/{skills-pages-VCXZFQFD.js.map → skills-pages-HIBSAVOP.js.map} +1 -1
- package/dist/tanstack-start.js +1 -1
- package/dist/user-nav-36ACWXOW.js +2 -0
- package/dist/{user-nav-DCAHVWN7.js.map → user-nav-36ACWXOW.js.map} +1 -1
- package/package.json +5 -5
- package/dist/activity-nav-button-RDL5GIWG.js +0 -2
- package/dist/chunk-2HSIWUH3.js +0 -3
- package/dist/chunk-2HSIWUH3.js.map +0 -1
- package/dist/chunk-CJGP4Y5Y.js +0 -2
- package/dist/chunk-CWJWOJRO.js +0 -3
- package/dist/chunk-ETQ3Q472.js +0 -2
- package/dist/chunk-KXAGLQ2B.js +0 -2
- package/dist/chunk-KXAGLQ2B.js.map +0 -1
- package/dist/chunk-TYDYAOQ7.js +0 -3
- package/dist/chunk-TYDYAOQ7.js.map +0 -1
- package/dist/chunk-V64P56OA.js +0 -2
- package/dist/chunk-XDLTO6VU.js +0 -3
- package/dist/chunk-XDLTO6VU.js.map +0 -1
- package/dist/list-4NZLZRX3.js +0 -2
- package/dist/plugin-pages-RNB46YPQ.js +0 -2
- package/dist/root-4XPMKRHZ.js +0 -31
- package/dist/root-5RDJ2HAV.js +0 -2
- package/dist/search-OWF3LEWH.js +0 -2
- package/dist/skills-pages-VCXZFQFD.js +0 -2
- package/dist/user-nav-DCAHVWN7.js +0 -2
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import'./index.css';import {f}from'./chunk-XWBACTNR.js';import'./chunk-2HYQVMP3.js';import'./chunk-5CVDMZUI.js';import {x,y as y$1,ga,ha,ia,ja,z}from'./chunk-YCCFUGWJ.js';import {v,w,x as x$1}from'./chunk-32ZU4MLE.js';import'./chunk-HDOIOXMP.js';import'./chunk-SZEGGBOC.js';import'./chunk-U45E5X3H.js';import {b,c,e}from'./chunk-USNXQOMJ.js';import {b as b$1}from'./chunk-6NRQMG26.js';import'./chunk-O2QMYUPS.js';import {useMemo,useState,useRef,useEffect,Children,useCallback,Fragment as Fragment$1}from'react';import {createGraphiQLFetcher}from'@graphiql/toolkit';import {GraphiQLProvider,useEditorContext,useExecutionContext,useSchemaContext,useStorageContext,usePluginContext,useCopyQuery,useMergeQuery,usePrettifyEditors,useTheme,ToolbarButton,PrettifyIcon,MergeIcon,CopyIcon,Tooltip,UnStyledButton,PlusIcon,ReloadIcon,KeyboardShortcutIcon,SettingsIcon,Tabs,Tab,QueryEditor,ExecuteButton,VariableEditor,Spinner,ResponseEditor,Dialog,ButtonGroup,Button,isMacOs}from'@graphiql/react';import {HISTORY_PLUGIN,HistoryContextProvider}from'@graphiql/plugin-history';import {ChevronsRight,ChevronsLeft}from'lucide-react';import {jsx,Fragment,jsxs}from'react/jsx-runtime';import'@graphiql/react/style.css';import'@graphiql/plugin-history/style.css';function y({dangerouslyAssumeSchemaIsValid:t,confirmCloseTab:i,defaultQuery:n,defaultTabs:l,externalFragments:f,fetcher:s,getDefaultFieldNames:d,headers:E,inputValueDeprecation:k,introspectionQueryName:M,maxHistoryLength:h,onEditOperationName:A,onSchemaChange:O,onTabChange:B,onTogglePluginVisibility:T,operationName:L,plugins:p,query:C,response:v,schema:R,schemaDescription:I,shouldPersistHeaders:Q,storage:z,validationRules:w,variables:F,visiblePlugin:D,defaultHeaders:U,...m}){if(typeof s!="function")throw new TypeError("The `GraphiQL` component requires a `fetcher` function to be passed as prop.");let V=useMemo(()=>{let S=p??[];return S.some($=>$.title===HISTORY_PLUGIN.title)?S:[HISTORY_PLUGIN,...S]},[p]);return jsx(GraphiQLProvider,{getDefaultFieldNames:d,dangerouslyAssumeSchemaIsValid:t,defaultQuery:n,defaultHeaders:U,defaultTabs:l,externalFragments:f,fetcher:s,headers:E,inputValueDeprecation:k,introspectionQueryName:M,onEditOperationName:A,onSchemaChange:O,onTabChange:B,onTogglePluginVisibility:T,plugins:V,visiblePlugin:D,operationName:L,query:C,response:v,schema:R,schemaDescription:I,shouldPersistHeaders:Q,storage:z,validationRules:w,variables:F,children:jsx(HistoryContextProvider,{maxHistoryLength:h,children:jsx(lt,{confirmCloseTab:i,showPersistHeadersSettings:Q!==false,disableTabs:m.disableTabs??false,forcedTheme:m.forcedTheme,...m})})})}y.Toolbar=ge;y.Footer=ye;var at=["light","dark","system"],H="graphiql-session-tab-",pe="flexkit-explorer:layout",me=3;function it(t){if(typeof t=="number")return t;if(typeof t!="object"||t===null||!("asPercentage"in t))return;let i=t.asPercentage;if(typeof i=="number")return i}function ot(t){return !t||typeof t!="object"||Array.isArray(t)?false:Object.values(t).every(i=>typeof i=="number")}function nt(t){if(typeof window>"u")return;let i=window.localStorage.getItem(t);if(i)try{let n=JSON.parse(i);if(ot(n))return n}catch{return}}function rt(t,i){if(!(typeof window>"u"))try{window.localStorage.setItem(t,JSON.stringify(i));}catch{}}function lt(t){let i=useEditorContext({nonNull:true}),n=useExecutionContext({nonNull:true}),l=useSchemaContext({nonNull:true}),f=useStorageContext(),s=usePluginContext(),[d,E]=useState(false),k=useRef(null),M=useMemo(()=>nt(pe),[]),h=useMemo(()=>t.forcedTheme&&at.includes(t.forcedTheme)?t.forcedTheme:void 0,[t.forcedTheme]),A=useCopyQuery({onCopyQuery:t.onCopyQuery}),O=useMergeQuery(),B=usePrettifyEditors(),{setTheme:T}=useTheme(t.defaultTheme);useEffect(()=>{h==="system"?T(null):(h==="light"||h==="dark")&&T(h);},[h,T]),useEffect(()=>{s?.setVisiblePlugin(s.plugins[0]);},[s]);let[L,p]=useState(null),[C,v$1]=useState(null),R=Children.toArray(t.children),I=R.find(a=>be(a,y.Toolbar))??jsxs(Fragment,{children:[jsx(ToolbarButton,{onClick:B,label:"Prettify query (Shift-Ctrl-P)",children:jsx(PrettifyIcon,{className:"fk:w-6 fk:h-6 fk:block","aria-hidden":"true"})}),jsx(ToolbarButton,{onClick:O,label:"Merge fragments into query (Shift-Ctrl-M)",children:jsx(MergeIcon,{className:"fk:w-6 fk:h-6 fk:block","aria-hidden":"true"})}),jsx(ToolbarButton,{onClick:A,label:"Copy query (Shift-Ctrl-C)",children:jsx(CopyIcon,{className:"fk:w-6 fk:h-6 fk:block","aria-hidden":"true"})}),t.toolbar?.additionalContent,t.toolbar?.additionalComponent&&jsx(t.toolbar.additionalComponent,{})]}),Q=R.find(a=>be(a,y.Footer)),z$1=useCallback(()=>{try{f?.clear(),v$1("success");}catch{v$1("error");}},[f]),w$1=useCallback(a=>{i.setShouldPersistHeaders(a.currentTarget.dataset.value==="true");},[i]),F=()=>{i.addTab();},D=()=>{l.introspect();},U=a=>{i.moveTab(a);},m=useCallback(a=>{p(a.currentTarget.dataset.value);},[]),V=useCallback(a=>{let r=s,u=Number(a.currentTarget.dataset.index);if(!r)return;let x=r.plugins.find((mt,xe)=>u===xe)??null;if(x===r.visiblePlugin){r.setVisiblePlugin(null);return}r.setVisiblePlugin(x);},[s]),S=useCallback(a=>{a||p(null);},[]),$=useCallback(a=>{a||(p(null),v$1(null));},[]),ke=jsx(Tooltip,{label:"Add tab",children:jsx(UnStyledButton,{type:"button",className:"graphiql-tab-add",onClick:F,"aria-label":"Add tab",children:jsx(PlusIcon,{"aria-hidden":"true"})})}),Te=t.className?` ${t.className}`:"",_=t.confirmCloseTab,Ce=useCallback(async a=>{let r=a.currentTarget.previousSibling,u=Number(r.id.replace(H,""));(!_||await _(u))&&(i.activeTabIndex===u&&n.stop(),i.closeTab(u));},[_,i,n]),ve=useCallback(a=>{let r=Number(a.currentTarget.id.replace(H,""));n.stop(),i.changeTab(r);},[i,n]),Se=useCallback(a=>{rt(pe,a);},[]);return jsx(Tooltip.Provider,{children:jsxs("div",{className:`graphiql-container${Te}`,children:[jsxs(x,{className:"fk:h-full fk:max-h-full",defaultLayout:M,id:"explorer",onLayoutChanged:Se,orientation:"horizontal",children:[jsxs(y$1,{collapsible:true,collapsedSize:`${me}%`,defaultSize:"22%",id:"explorer-sidebar",minSize:"10%",onResize:a=>{let r=k.current;if(r){E(r.isCollapsed());return}let u=it(a);u!==void 0&&E(u<=me);},panelRef:k,children:[jsx("div",{className:"fk:flex fk:w-full fk:h-full fk:pb-6",children:jsxs(ga,{className:"fk:w-full",defaultValue:s?.plugins[0].title,children:[jsxs("div",{className:`fk:flex fk:items-center fk:py-1 ${d?"":"fk:px-3"}`,children:[jsx(ha,{className:d?"fk:hidden":"",children:s?.plugins.map((a,r)=>{let x=`${a===s.visiblePlugin?"Hide":"Show"} ${a.title}`;return jsx(ia,{"aria-label":x,className:"fk:text-muted-foreground","data-index":r,onClick:V,value:a.title,children:jsx(a.icon,{"aria-hidden":"true"})},a.title)})}),jsxs(b,{children:[jsx(c,{asChild:true,children:jsx(b$1,{className:d?"fk:ml-1.5":"fk:ml-auto",onClick:()=>{let a=k.current;d?a?.expand():a?.collapse();},size:"icon",variant:"ghost",children:d?jsxs(Fragment,{children:[jsx(ChevronsRight,{className:"fk:w-4 fk:h-4"}),jsx("span",{className:"fk:sr-only",children:"Expand"})]}):jsxs(Fragment,{children:[jsx(ChevronsLeft,{className:"fk:w-4 fk:h-4"}),jsx("span",{className:"fk:sr-only",children:"Collapse"})]})})}),jsx(e,{children:d?"Expand":"Collapse"})]})]}),d?null:jsx(v,{}),s?.plugins.map(a=>jsx(ja,{className:`fk:flex fk:w-full fk:max-h-full fk:mt-0 ${d?"fk:hidden":""}`,value:a.title,children:jsxs(w,{className:"fk:flex fk:w-full fk:max-h-full fk:overflow-auto fk:pl-3 fk:pr-6 fk:pt-3 fk:pb-6 fk:mb-3 fk:[&>div>div]:block!",children:[jsx(a.content,{}),jsx(x$1,{orientation:"horizontal"})]})},a.title))]})}),jsx(Tooltip,{label:"Re-fetch GraphQL schema",children:jsx(UnStyledButton,{type:"button",disabled:l.isFetching,onClick:D,"aria-label":"Re-fetch GraphQL schema",children:jsx(ReloadIcon,{className:l.isFetching?"graphiql-spin":"","aria-hidden":"true"})})}),jsx(Tooltip,{label:"Open short keys dialog",children:jsx(UnStyledButton,{type:"button","data-value":"short-keys",onClick:m,"aria-label":"Open short keys dialog",children:jsx(KeyboardShortcutIcon,{"aria-hidden":"true"})})}),jsx(Tooltip,{label:"Open settings dialog",children:jsx(UnStyledButton,{type:"button","data-value":"settings",onClick:m,"aria-label":"Open settings dialog",children:jsx(SettingsIcon,{"aria-hidden":"true"})})})]}),jsx(z,{className:"fk:hover:bg-blue-500 fk:transition-colors",withHandle:true}),jsx(y$1,{className:"fk:bg-muted",defaultSize:"40%",id:"explorer-editor",children:jsxs("div",{className:"fk:flex fk:flex-col fk:h-full",children:[jsxs("div",{className:"fk:flex fk:items-center fk:py-1 fk:px-4 fk:gap-6 fk:bg-muted",children:[!t.disableTabs&&jsx(Tabs,{"aria-label":"Select active operation",className:"fk:p-1! fk:bg-muted fk:rounded-md",onReorder:U,values:i.tabs,children:i.tabs.length>0&&jsx(Fragment,{children:i.tabs.map((a,r)=>jsxs(Tab,{isActive:r===i.activeTabIndex,value:a,children:[jsx(Tab.Button,{"aria-controls":"graphiql-session",id:`${H}${r.toString()}`,onClick:ve,children:a.title}),jsx(Tab.Close,{onClick:Ce})]},a.id))})}),ke]}),jsx("div",{role:"tabpanel",id:"graphiql-session",className:"graphiql-session","aria-labelledby":`${H}${i.activeTabIndex}`,children:jsx("div",{className:`graphiql-editors${i.tabs.length===1?" full-height":""}`,children:jsxs(x,{orientation:"vertical",children:[jsxs(y$1,{className:"fk:flex fk:w-full fk:gap-x-4 fk:px-4 fk:py-2",defaultSize:"80%",children:[jsx(QueryEditor,{editorTheme:t.editorTheme,keyMap:t.keyMap,onCopyQuery:t.onCopyQuery,onEdit:t.onEditQuery,readOnly:t.readOnly}),jsxs("div",{className:"graphiql-toolbar",role:"toolbar","aria-label":"Editor Commands",children:[jsx(ExecuteButton,{}),I]})]}),jsx(z,{className:"fk:hover:bg-blue-500 fk:transition-colors",withHandle:true}),jsxs(y$1,{className:"fk:bg-muted fk:px-4 fk:pt-2",defaultSize:"20%",children:[jsx("div",{className:"fk:text-sm fk:font-medium fk:text-muted-foreground",children:"Variables"}),jsx(VariableEditor,{editorTheme:t.editorTheme,isHidden:false,keyMap:t.keyMap,onEdit:t.onEditVariables,readOnly:t.readOnly})]})]})})})]})}),jsx(z,{className:"fk:hover:bg-blue-500 fk:transition-colors",withHandle:true}),jsx(y$1,{className:"fk:px-5 fk:pt-10 fk:relative",defaultSize:"38%",id:"explorer-response",children:jsxs("div",{className:"graphiql-response fk:h-full",children:[n.isFetching?jsx(Spinner,{}):null,jsx(ResponseEditor,{editorTheme:t.editorTheme,responseTooltip:t.responseTooltip,keyMap:t.keyMap}),Q]})})]}),jsxs(Dialog,{open:L==="short-keys",onOpenChange:S,children:[jsxs("div",{className:"graphiql-dialog-header",children:[jsx(Dialog.Title,{className:"graphiql-dialog-title",children:"Short Keys"}),jsx(Dialog.Close,{})]}),jsx("div",{className:"graphiql-dialog-section",children:jsx(dt,{keyMap:t.keyMap||"sublime"})})]}),jsxs(Dialog,{open:L==="settings",onOpenChange:$,children:[jsxs("div",{className:"graphiql-dialog-header",children:[jsx(Dialog.Title,{className:"graphiql-dialog-title",children:"Settings"}),jsx(Dialog.Close,{})]}),t.showPersistHeadersSettings?jsxs("div",{className:"graphiql-dialog-section",children:[jsxs("div",{children:[jsx("div",{className:"graphiql-dialog-section-title",children:"Persist headers"}),jsxs("div",{className:"graphiql-dialog-section-caption",children:["Save headers upon reloading."," ",jsx("span",{className:"graphiql-warning-text",children:"Only enable if you trust this device."})]})]}),jsxs(ButtonGroup,{children:[jsx(Button,{type:"button",id:"enable-persist-headers",className:i.shouldPersistHeaders?"active":"","data-value":"true",onClick:w$1,children:"On"}),jsx(Button,{type:"button",id:"disable-persist-headers",className:i.shouldPersistHeaders?"":"active",onClick:w$1,children:"Off"})]})]}):null,f?jsxs("div",{className:"graphiql-dialog-section",children:[jsxs("div",{children:[jsx("div",{className:"graphiql-dialog-section-title",children:"Clear storage"}),jsx("div",{className:"graphiql-dialog-section-caption",children:"Remove all locally stored data and start fresh."})]}),jsx(Button,{type:"button",state:C||void 0,disabled:C==="success",onClick:z$1,children:{success:"Cleared data",error:"Failed"}[C]||"Clear data"})]}):null]})]})})}var Y=isMacOs?"\u2318":"Ctrl",st=Object.entries({"Search in editor":[Y,"F"],"Search in documentation":[Y,"K"],"Execute query":[Y,"Enter"],"Prettify editors":["Ctrl","Shift","P"],"Merge fragments definitions into operation definition":["Ctrl","Shift","M"],"Copy query":["Ctrl","Shift","C"],"Re-fetch schema using introspection":["Ctrl","Shift","R"]});function dt({keyMap:t}){return jsxs("div",{children:[jsxs("table",{className:"graphiql-table",children:[jsx("thead",{children:jsxs("tr",{children:[jsx("th",{children:"Short Key"}),jsx("th",{children:"Function"})]})}),jsx("tbody",{children:st.map(([i,n])=>jsxs("tr",{children:[jsx("td",{children:n.map((l,f,s)=>jsxs(Fragment$1,{children:[jsx("code",{className:"graphiql-key",children:l}),f!==s.length-1&&" + "]},l))}),jsx("td",{children:i})]},i))})]}),jsxs("p",{children:["The editors use"," ",jsx("a",{href:"https://codemirror.net/5/doc/manual.html#keymaps",target:"_blank",rel:"noopener noreferrer",children:"CodeMirror Key Maps"})," ","that add more short keys. This instance of Graph",jsx("em",{children:"i"}),"QL uses ",jsx("code",{children:t}),"."]})]})}function ge(t){return jsx(Fragment,{children:t.children})}ge.displayName="GraphiQLToolbar";function ye(t){return jsx("div",{className:"graphiql-footer",children:t.children})}ye.displayName="GraphiQLFooter";function be(t,i){let n=typeof t=="object"&&t!==null?t:null;if(!n)return false;let l=n.type;return typeof l=="object"&&l!==null&&"displayName"in l&&typeof l.displayName=="string"&&l.displayName===i.displayName?true:n.type===i}var ft=`# Welcome to Flexkit Explorer
|
|
2
|
+
#
|
|
3
|
+
# Explorer is where you write, validate and run GraphQL queries
|
|
4
|
+
# against your Flexkit project.
|
|
5
|
+
#
|
|
6
|
+
# Type queries into this side of the screen, and you will see intelligent
|
|
7
|
+
# typeaheads aware of the current GraphQL schema and live syntax and
|
|
8
|
+
# validation errors highlighted within the text.
|
|
9
|
+
#
|
|
10
|
+
# GraphQL queries typically start with a "{" character. Lines that start
|
|
11
|
+
# with a # are ignored.
|
|
12
|
+
#
|
|
13
|
+
# An example GraphQL query might look like:
|
|
14
|
+
#
|
|
15
|
+
# {
|
|
16
|
+
# field(arg: "value") {
|
|
17
|
+
# subField
|
|
18
|
+
# }
|
|
19
|
+
# }
|
|
20
|
+
#
|
|
21
|
+
# Keyboard shortcuts:
|
|
22
|
+
#
|
|
23
|
+
# Prettify query: Shift-Ctrl-P (or press the prettify button)
|
|
24
|
+
#
|
|
25
|
+
# Merge fragments: Shift-Ctrl-M (or press the merge button)
|
|
26
|
+
#
|
|
27
|
+
# Run Query: Ctrl-Enter (or press the play button)
|
|
28
|
+
#
|
|
29
|
+
# Auto Complete: Ctrl-Space (or just start typing)
|
|
30
|
+
#`;function Qt(){let{currentProjectId:t}=f(),i=`/api/flexkit/${t}/graphql`,n=useMemo(()=>createGraphiQLFetcher({url:i}),[i]);return jsx(y,{fetcher:n,forcedTheme:"light",defaultQuery:ft})}export{Qt as Root};//# sourceMappingURL=root-YNGCF5QM.js.map
|
|
31
|
+
//# sourceMappingURL=root-YNGCF5QM.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/apps/explorer/components/graphiql.tsx","../src/apps/explorer/root.tsx"],"names":["GraphiQL","dangerouslyAssumeSchemaIsValid","confirmCloseTab","defaultQuery","defaultTabs","externalFragments","fetcher","getDefaultFieldNames","headers","inputValueDeprecation","introspectionQueryName","maxHistoryLength","onEditOperationName","onSchemaChange","onTabChange","onTogglePluginVisibility","operationName","plugins","query","response","schema","schemaDescription","shouldPersistHeaders","storage","validationRules","variables","visiblePlugin","defaultHeaders","props","mergedPlugins","useMemo","userPlugins","plugin","HISTORY_PLUGIN","jsx","GraphiQLProvider","HistoryContextProvider","GraphiQLInterface","GraphiQLToolbar","GraphiQLFooter","THEMES","TAB_CLASS_PREFIX","EXPLORER_LAYOUT_STORAGE_KEY","EXPLORER_SIDEBAR_COLLAPSED_SIZE_PCT","panelResizeArgAsPercentage","panelSize","pct","isResizableLayout","value","item","getStoredResizableLayout","storageKey","parsed","storeResizableLayout","layout","editorContext","useEditorContext","executionContext","useExecutionContext","schemaContext","useSchemaContext","storageContext","useStorageContext","pluginContext","usePluginContext","isSidebarCollapsed","setIsSidebarCollapsed","useState","sidebarPanel","useRef","explorerDefaultLayout","forcedTheme","copy","useCopyQuery","merge","useMergeQuery","prettify","usePrettifyEditors","setTheme","useTheme","useEffect","showDialog","setShowDialog","clearStorageStatus","setClearStorageStatus","children","Children","toolbar","child","isChildComponentType","jsxs","Fragment","ToolbarButton","PrettifyIcon","MergeIcon","CopyIcon","footer","handleClearData","useCallback","handlePersistHeaders","event","handleAddTab","handleRefetchSchema","handleReorder","newOrder","handleShowDialog","handlePluginClick","context","pluginIndex","_","index","handleOpenShortKeysDialog","isOpen","handleOpenSettingsDialog","addTab","GraphiQLTooltip","UnStyledButton","PlusIcon","className","confirmClose","handleTabClose","tabButton","handleTabClick","handleExplorerLayoutChanged","ResizablePanelGroup","ResizablePanel","panel","percentage","Tabs","TabsList","label","TabsTrigger","Tooltip","TooltipTrigger","Button","ChevronsRight","ChevronsLeft","TooltipContent","Separator","TabsContent","ScrollArea","ScrollBar","ReloadIcon","KeyboardShortcutIcon","SettingsIcon","ResizableHandle","GraphiQlTabs","tab","GraphiQlTab","QueryEditor","ExecuteButton","VariableEditor","Spinner","ResponseEditor","Dialog","ShortKeys","ButtonGroup","GraphiQLButton","modifier","isMacOs","SHORT_KEYS","keyMap","title","keys","key","array","component","element","childType","DEFAULT_QUERY","Root","currentProjectId","useConfig","url","createGraphiQLFetcher"],"mappings":"gsCA2GO,SAASA,CAAAA,CAAS,CACvB,8BAAA,CAAAC,CAAAA,CACA,eAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CAAAA,CACA,WAAA,CAAAC,CAA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,CAAAA,EAAU,CACjCC,EAAM,CAAA,aAAA,EAAgBF,CAAgB,CAAA,QAAA,CAAA,CACtCrK,CAAAA,CAAUwB,QAAQ,IAAMgJ,qBAAAA,CAAsB,CAAE,GAAA,CAAAD,CAAI,CAAC,CAAA,CAAG,CAACA,CAAG,CAAC,CAAA,CAEnE,OAAO3I,GAAAA,CAAClC,CAAAA,CAAA,CAAS,OAAA,CAASM,CAAAA,CAAS,YAAY,OAAA,CAAQ,YAAA,CAAcmK,GAAe,CACtF","file":"root-4XPMKRHZ.js","sourcesContent":["import { Children, Fragment, useCallback, useState, useEffect, useMemo, useRef } from 'react';\nimport type {\n ComponentProps,\n ComponentType,\n MouseEventHandler,\n PropsWithChildren,\n ReactNode,\n ReactElement,\n} from 'react';\nimport {\n Button as GraphiQLButton,\n ButtonGroup,\n CopyIcon,\n Dialog,\n ExecuteButton,\n GraphiQLProvider,\n KeyboardShortcutIcon,\n MergeIcon,\n PlusIcon,\n PrettifyIcon,\n QueryEditor,\n ReloadIcon,\n ResponseEditor,\n SettingsIcon,\n Spinner,\n Tabs as GraphiQlTabs,\n Tab as GraphiQlTab,\n ToolbarButton,\n Tooltip as GraphiQLTooltip,\n UnStyledButton,\n useCopyQuery,\n useEditorContext,\n useExecutionContext,\n useMergeQuery,\n usePluginContext,\n usePrettifyEditors,\n useSchemaContext,\n useStorageContext,\n useTheme,\n VariableEditor,\n isMacOs,\n} from '@graphiql/react';\nimport type {\n Theme,\n UseHeaderEditorArgs,\n UseQueryEditorArgs,\n UseResponseEditorArgs,\n UseVariableEditorArgs,\n WriteableEditorProps,\n} from '@graphiql/react';\nimport { HISTORY_PLUGIN, HistoryContextProvider } from '@graphiql/plugin-history';\nimport { ChevronsLeft, ChevronsRight } from 'lucide-react';\nimport {\n Button,\n ResizableHandle,\n ResizablePanel,\n ResizablePanelGroup,\n ScrollArea,\n ScrollBar,\n Separator,\n Tabs,\n TabsContent,\n TabsList,\n TabsTrigger,\n Tooltip,\n TooltipContent,\n TooltipTrigger,\n} from '../../../ui';\nimport type { PanelImperativeHandle } from '../../../ui';\nimport type { TabState } from './types';\n\nexport type GraphiQLToolbarConfig = {\n /**\n * This content will be rendered after the built-in buttons of the toolbar.\n * Note that this will not apply if you provide a completely custom toolbar\n * (by passing `GraphiQL.Toolbar` as child to the `GraphiQL` component).\n */\n additionalContent?: React.ReactNode;\n\n /**\n * same as above, except a component with access to context\n */\n additionalComponent?: React.JSXElementConstructor<unknown>;\n};\n\n/**\n * API docs for this live here:\n *\n * https://graphiql-test.netlify.app/typedoc/modules/graphiql.html#graphiqlprops\n */\nexport type GraphiQLProps = Omit<ComponentProps<typeof GraphiQLProvider>, 'children'> &\n GraphiQLInterfaceProps & {\n /**\n * The maximum number of executed operations to store in history.\n *\n * GraphiQL v0.31 extracted the history functionality into `@graphiql/plugin-history`,\n * so this is no longer a prop on `@graphiql/react`'s `GraphiQLProvider`.\n */\n maxHistoryLength?: number;\n };\n\n/**\n * The top-level React component for GraphiQL, intended to encompass the entire\n * browser viewport.\n *\n * @see https://github.com/graphql/graphiql#usage\n */\nexport function GraphiQL({\n dangerouslyAssumeSchemaIsValid,\n confirmCloseTab,\n defaultQuery,\n defaultTabs,\n externalFragments,\n fetcher,\n getDefaultFieldNames,\n headers,\n inputValueDeprecation,\n introspectionQueryName,\n maxHistoryLength,\n onEditOperationName,\n onSchemaChange,\n onTabChange,\n onTogglePluginVisibility,\n operationName,\n plugins,\n query,\n response,\n schema,\n schemaDescription,\n shouldPersistHeaders,\n storage,\n validationRules,\n variables,\n visiblePlugin,\n defaultHeaders,\n ...props\n}: GraphiQLProps): ReactElement {\n // Ensure props are correct\n if (typeof fetcher !== 'function') {\n throw new TypeError('The `GraphiQL` component requires a `fetcher` function to be passed as prop.');\n }\n\n const mergedPlugins = useMemo(() => {\n const userPlugins = plugins ?? [];\n\n if (userPlugins.some((plugin) => plugin.title === HISTORY_PLUGIN.title)) {\n return userPlugins;\n }\n\n return [HISTORY_PLUGIN, ...userPlugins];\n }, [plugins]);\n\n return (\n <GraphiQLProvider\n getDefaultFieldNames={getDefaultFieldNames}\n dangerouslyAssumeSchemaIsValid={dangerouslyAssumeSchemaIsValid}\n defaultQuery={defaultQuery}\n defaultHeaders={defaultHeaders}\n defaultTabs={defaultTabs}\n externalFragments={externalFragments}\n fetcher={fetcher}\n headers={headers}\n inputValueDeprecation={inputValueDeprecation}\n introspectionQueryName={introspectionQueryName}\n onEditOperationName={onEditOperationName}\n onSchemaChange={onSchemaChange}\n onTabChange={onTabChange}\n onTogglePluginVisibility={onTogglePluginVisibility}\n plugins={mergedPlugins}\n visiblePlugin={visiblePlugin}\n operationName={operationName}\n query={query}\n response={response}\n schema={schema}\n schemaDescription={schemaDescription}\n shouldPersistHeaders={shouldPersistHeaders}\n storage={storage}\n validationRules={validationRules}\n variables={variables}\n >\n <HistoryContextProvider maxHistoryLength={maxHistoryLength}>\n <GraphiQLInterface\n confirmCloseTab={confirmCloseTab}\n showPersistHeadersSettings={shouldPersistHeaders !== false}\n disableTabs={props.disableTabs ?? false}\n forcedTheme={props.forcedTheme}\n {...props}\n />\n </HistoryContextProvider>\n </GraphiQLProvider>\n );\n}\n\n// Export main windows/panes to be used separately if desired.\nGraphiQL.Toolbar = GraphiQLToolbar;\nGraphiQL.Footer = GraphiQLFooter;\n\ntype AddSuffix<Obj extends { [key: string]: unknown }, Suffix extends string> = {\n [Key in keyof Obj as `${string & Key}${Suffix}`]: Obj[Key];\n};\n\nexport type GraphiQLInterfaceProps = WriteableEditorProps &\n AddSuffix<Pick<UseQueryEditorArgs, 'onEdit'>, 'Query'> &\n Pick<UseQueryEditorArgs, 'onCopyQuery'> &\n AddSuffix<Pick<UseVariableEditorArgs, 'onEdit'>, 'Variables'> &\n AddSuffix<Pick<UseHeaderEditorArgs, 'onEdit'>, 'Headers'> &\n Pick<UseResponseEditorArgs, 'responseTooltip'> & {\n children?: ReactNode;\n /**\n * Set the default state for the editor tools.\n * - `false` hides the editor tools\n * - `true` shows the editor tools\n * - `'variables'` specifically shows the variables editor\n * - `'headers'` specifically shows the headers editor\n * By default the editor tools are initially shown when at least one of the\n * editors has contents.\n */\n defaultEditorToolsVisibility?: boolean | 'variables' | 'headers';\n /**\n * Toggle if the headers editor should be shown inside the editor tools.\n */\n isHeadersEditorEnabled?: boolean;\n /**\n * An object that allows configuration of the toolbar next to the query\n * editor.\n */\n toolbar?: GraphiQLToolbarConfig;\n /**\n * Indicates if settings for persisting headers should appear in the\n * settings modal.\n */\n showPersistHeadersSettings?: boolean;\n defaultTheme?: Theme;\n disableTabs?: boolean;\n /**\n * `forcedTheme` allows enforcement of a specific theme for GraphiQL.\n * This is useful when you want to make sure that GraphiQL is always\n * rendered with a specific theme.\n */\n forcedTheme?: (typeof THEMES)[number];\n /**\n * Additional class names which will be appended to the container element.\n */\n className?: string;\n /**\n * When the user clicks a close tab button, this function is invoked with\n * the index of the tab that is about to be closed. It can return a promise\n * that should resolve to `true` (meaning the tab may be closed) or `false`\n * (meaning the tab may not be closed).\n */\n confirmCloseTab?: (index: number) => Promise<boolean> | boolean;\n };\n\nconst THEMES = ['light', 'dark', 'system'] as const;\n\nconst TAB_CLASS_PREFIX = 'graphiql-session-tab-';\nconst EXPLORER_LAYOUT_STORAGE_KEY = 'flexkit-explorer:layout';\n\n/** Matches `collapsedSize` on the explorer sidebar panel (see `PanelSize.asPercentage` in react-resizable-panels v4). */\nconst EXPLORER_SIDEBAR_COLLAPSED_SIZE_PCT = 3;\n\nfunction panelResizeArgAsPercentage(panelSize: unknown): number | undefined {\n if (typeof panelSize === 'number') {\n return panelSize;\n }\n\n if (typeof panelSize !== 'object' || panelSize === null) {\n return undefined;\n }\n\n if (!('asPercentage' in panelSize)) {\n return undefined;\n }\n\n const pct = (panelSize as { asPercentage: unknown }).asPercentage;\n\n if (typeof pct !== 'number') {\n return undefined;\n }\n\n return pct;\n}\n\ntype ResizableLayout = {\n [panelId: string]: number;\n};\n\nfunction isResizableLayout(value: unknown): value is ResizableLayout {\n if (!value || typeof value !== 'object' || Array.isArray(value)) {\n return false;\n }\n\n return Object.values(value).every((item) => typeof item === 'number');\n}\n\nfunction getStoredResizableLayout(storageKey: string): ResizableLayout | undefined {\n if (typeof window === 'undefined') {\n return undefined;\n }\n\n const value = window.localStorage.getItem(storageKey);\n\n if (!value) {\n return undefined;\n }\n\n try {\n const parsed: unknown = JSON.parse(value);\n\n if (isResizableLayout(parsed)) {\n return parsed;\n }\n } catch {\n return undefined;\n }\n\n return undefined;\n}\n\nfunction storeResizableLayout(storageKey: string, layout: ResizableLayout): void {\n if (typeof window === 'undefined') {\n return;\n }\n\n try {\n window.localStorage.setItem(storageKey, JSON.stringify(layout));\n } catch {\n // Ignore storage failures so resizing still works in restricted browsing modes.\n }\n}\n\nexport function GraphiQLInterface(props: GraphiQLInterfaceProps): ReactElement {\n const editorContext = useEditorContext({ nonNull: true });\n const executionContext = useExecutionContext({ nonNull: true });\n const schemaContext = useSchemaContext({ nonNull: true });\n const storageContext = useStorageContext();\n const pluginContext = usePluginContext();\n const [isSidebarCollapsed, setIsSidebarCollapsed] = useState(false);\n const sidebarPanel = useRef<PanelImperativeHandle | null>(null);\n const explorerDefaultLayout = useMemo(() => getStoredResizableLayout(EXPLORER_LAYOUT_STORAGE_KEY), []);\n const forcedTheme = useMemo(\n () => (props.forcedTheme && THEMES.includes(props.forcedTheme) ? props.forcedTheme : undefined),\n [props.forcedTheme]\n );\n\n const copy = useCopyQuery({ onCopyQuery: props.onCopyQuery });\n const merge = useMergeQuery();\n const prettify = usePrettifyEditors();\n\n const { setTheme } = useTheme(props.defaultTheme);\n\n useEffect(() => {\n if (forcedTheme === 'system') {\n setTheme(null);\n } else if (forcedTheme === 'light' || forcedTheme === 'dark') {\n setTheme(forcedTheme);\n }\n }, [forcedTheme, setTheme]);\n\n useEffect(() => {\n pluginContext?.setVisiblePlugin(pluginContext.plugins[0]);\n }, [pluginContext]);\n\n const [showDialog, setShowDialog] = useState<'settings' | 'short-keys' | null>(null);\n const [clearStorageStatus, setClearStorageStatus] = useState<'success' | 'error' | null>(null);\n\n const children = Children.toArray(props.children);\n\n const toolbar = children.find((child) => isChildComponentType(child, GraphiQL.Toolbar)) ?? (\n <>\n <ToolbarButton onClick={prettify} label=\"Prettify query (Shift-Ctrl-P)\">\n <PrettifyIcon className=\"fk:w-6 fk:h-6 fk:block\" aria-hidden=\"true\" />\n </ToolbarButton>\n <ToolbarButton onClick={merge} label=\"Merge fragments into query (Shift-Ctrl-M)\">\n <MergeIcon className=\"fk:w-6 fk:h-6 fk:block\" aria-hidden=\"true\" />\n </ToolbarButton>\n <ToolbarButton onClick={copy} label=\"Copy query (Shift-Ctrl-C)\">\n <CopyIcon className=\"fk:w-6 fk:h-6 fk:block\" aria-hidden=\"true\" />\n </ToolbarButton>\n {props.toolbar?.additionalContent}\n {props.toolbar?.additionalComponent && <props.toolbar.additionalComponent />}\n </>\n );\n\n const footer = children.find((child) => isChildComponentType(child, GraphiQL.Footer));\n\n const handleClearData = useCallback(() => {\n try {\n storageContext?.clear();\n setClearStorageStatus('success');\n } catch {\n setClearStorageStatus('error');\n }\n }, [storageContext]);\n\n const handlePersistHeaders: MouseEventHandler<HTMLButtonElement> = useCallback(\n (event) => {\n editorContext.setShouldPersistHeaders(event.currentTarget.dataset.value === 'true');\n },\n [editorContext]\n );\n\n const handleAddTab = (): void => {\n editorContext.addTab();\n };\n const handleRefetchSchema = (): void => {\n schemaContext.introspect();\n };\n const handleReorder = (newOrder: TabState[]): void => {\n editorContext.moveTab(newOrder);\n };\n\n const handleShowDialog: MouseEventHandler<HTMLButtonElement> = useCallback((event) => {\n setShowDialog(event.currentTarget.dataset.value as 'short-keys' | 'settings');\n }, []);\n\n const handlePluginClick: MouseEventHandler<HTMLButtonElement> = useCallback(\n (event) => {\n const context = pluginContext;\n const pluginIndex = Number(event.currentTarget.dataset.index);\n\n if (!context) return;\n\n const plugin = context.plugins.find((_, index) => pluginIndex === index) ?? null;\n const isVisible = plugin === context.visiblePlugin;\n\n if (isVisible) {\n context.setVisiblePlugin(null);\n\n return;\n }\n\n context.setVisiblePlugin(plugin);\n },\n [pluginContext]\n );\n\n const handleOpenShortKeysDialog = useCallback((isOpen: boolean) => {\n if (!isOpen) {\n setShowDialog(null);\n }\n }, []);\n\n const handleOpenSettingsDialog = useCallback((isOpen: boolean) => {\n if (!isOpen) {\n setShowDialog(null);\n setClearStorageStatus(null);\n }\n }, []);\n\n const addTab = (\n <GraphiQLTooltip label=\"Add tab\">\n <UnStyledButton type=\"button\" className=\"graphiql-tab-add\" onClick={handleAddTab} aria-label=\"Add tab\">\n <PlusIcon aria-hidden=\"true\" />\n </UnStyledButton>\n </GraphiQLTooltip>\n );\n\n const className = props.className ? ` ${props.className}` : '';\n const confirmClose = props.confirmCloseTab;\n\n const handleTabClose: MouseEventHandler<HTMLButtonElement> = useCallback(\n async (event) => {\n const tabButton = event.currentTarget.previousSibling as HTMLButtonElement;\n const index = Number(tabButton.id.replace(TAB_CLASS_PREFIX, ''));\n\n /** TODO:\n * Move everything after into `editorContext.closeTab` once zustand will be used instead of\n * React context, since now we can't use execution context inside editor context, since editor\n * context is used in execution context.\n */\n const shouldCloseTab = confirmClose ? await confirmClose(index) : true;\n\n if (!shouldCloseTab) {\n return;\n }\n\n if (editorContext.activeTabIndex === index) {\n executionContext.stop();\n }\n editorContext.closeTab(index);\n },\n [confirmClose, editorContext, executionContext]\n );\n\n const handleTabClick: MouseEventHandler<HTMLButtonElement> = useCallback(\n (event) => {\n const index = Number(event.currentTarget.id.replace(TAB_CLASS_PREFIX, ''));\n /** TODO:\n * Move everything after into `editorContext.changeTab` once zustand will be used instead of\n * React context, since now we can't use execution context inside editor context, since editor\n * context is used in execution context.\n */\n executionContext.stop();\n editorContext.changeTab(index);\n },\n [editorContext, executionContext]\n );\n\n const handleExplorerLayoutChanged = useCallback((layout: ResizableLayout) => {\n storeResizableLayout(EXPLORER_LAYOUT_STORAGE_KEY, layout);\n }, []);\n\n return (\n <GraphiQLTooltip.Provider>\n <div className={`graphiql-container${className}`}>\n <ResizablePanelGroup\n className=\"fk:h-full fk:max-h-full\"\n defaultLayout={explorerDefaultLayout}\n id=\"explorer\"\n onLayoutChanged={handleExplorerLayoutChanged}\n orientation=\"horizontal\"\n >\n <ResizablePanel\n collapsible\n collapsedSize={`${EXPLORER_SIDEBAR_COLLAPSED_SIZE_PCT}%`}\n defaultSize=\"22%\"\n id=\"explorer-sidebar\"\n minSize=\"10%\"\n onResize={(panelSize) => {\n const panel = sidebarPanel.current;\n\n if (panel) {\n setIsSidebarCollapsed(panel.isCollapsed());\n\n return;\n }\n\n const percentage = panelResizeArgAsPercentage(panelSize);\n\n if (percentage !== undefined) {\n setIsSidebarCollapsed(percentage <= EXPLORER_SIDEBAR_COLLAPSED_SIZE_PCT);\n }\n }}\n panelRef={sidebarPanel}\n >\n <div className=\"fk:flex fk:w-full fk:h-full fk:pb-6\">\n <Tabs className=\"fk:w-full\" defaultValue={pluginContext?.plugins[0].title}>\n <div className={`fk:flex fk:items-center fk:py-1 ${isSidebarCollapsed ? '' : 'fk:px-3'}`}>\n <TabsList className={isSidebarCollapsed ? 'fk:hidden' : ''}>\n {pluginContext?.plugins.map((plugin, index) => {\n const isVisible = plugin === pluginContext.visiblePlugin;\n const label = `${isVisible ? 'Hide' : 'Show'} ${plugin.title}`;\n return (\n <TabsTrigger\n aria-label={label}\n className=\"fk:text-muted-foreground\"\n data-index={index}\n key={plugin.title}\n onClick={handlePluginClick}\n value={plugin.title}\n >\n <plugin.icon aria-hidden=\"true\" />\n </TabsTrigger>\n );\n })}\n </TabsList>\n <Tooltip>\n <TooltipTrigger asChild>\n <Button\n className={isSidebarCollapsed ? 'fk:ml-1.5' : 'fk:ml-auto'}\n onClick={() => {\n const panel = sidebarPanel.current;\n\n isSidebarCollapsed ? panel?.expand() : panel?.collapse();\n }}\n size=\"icon\"\n variant=\"ghost\"\n >\n {isSidebarCollapsed ? (\n <>\n <ChevronsRight className=\"fk:w-4 fk:h-4\" />\n <span className=\"fk:sr-only\">Expand</span>\n </>\n ) : (\n <>\n <ChevronsLeft className=\"fk:w-4 fk:h-4\" />\n <span className=\"fk:sr-only\">Collapse</span>\n </>\n )}\n </Button>\n </TooltipTrigger>\n <TooltipContent>{isSidebarCollapsed ? 'Expand' : 'Collapse'}</TooltipContent>\n </Tooltip>\n </div>\n {isSidebarCollapsed ? null : <Separator />}\n {pluginContext?.plugins.map((plugin) => (\n <TabsContent\n className={`fk:flex fk:w-full fk:max-h-full fk:mt-0 ${isSidebarCollapsed ? 'fk:hidden' : ''}`}\n key={plugin.title}\n value={plugin.title}\n >\n <ScrollArea className=\"fk:flex fk:w-full fk:max-h-full fk:overflow-auto fk:pl-3 fk:pr-6 fk:pt-3 fk:pb-6 fk:mb-3 fk:[&>div>div]:block!\">\n <plugin.content />\n <ScrollBar orientation=\"horizontal\" />\n </ScrollArea>\n </TabsContent>\n ))}\n </Tabs>\n </div>\n <GraphiQLTooltip label=\"Re-fetch GraphQL schema\">\n <UnStyledButton\n type=\"button\"\n disabled={schemaContext.isFetching}\n onClick={handleRefetchSchema}\n aria-label=\"Re-fetch GraphQL schema\"\n >\n <ReloadIcon className={schemaContext.isFetching ? 'graphiql-spin' : ''} aria-hidden=\"true\" />\n </UnStyledButton>\n </GraphiQLTooltip>\n <GraphiQLTooltip label=\"Open short keys dialog\">\n <UnStyledButton\n type=\"button\"\n data-value=\"short-keys\"\n onClick={handleShowDialog}\n aria-label=\"Open short keys dialog\"\n >\n <KeyboardShortcutIcon aria-hidden=\"true\" />\n </UnStyledButton>\n </GraphiQLTooltip>\n <GraphiQLTooltip label=\"Open settings dialog\">\n <UnStyledButton\n type=\"button\"\n data-value=\"settings\"\n onClick={handleShowDialog}\n aria-label=\"Open settings dialog\"\n >\n <SettingsIcon aria-hidden=\"true\" />\n </UnStyledButton>\n </GraphiQLTooltip>\n </ResizablePanel>\n\n <ResizableHandle className=\"fk:hover:bg-blue-500 fk:transition-colors\" withHandle />\n {/* Center column */}\n <ResizablePanel className=\"fk:bg-muted\" defaultSize=\"40%\" id=\"explorer-editor\">\n <div className=\"fk:flex fk:flex-col fk:h-full\">\n <div className=\"fk:flex fk:items-center fk:py-1 fk:px-4 fk:gap-6 fk:bg-muted\">\n {!props.disableTabs && (\n <GraphiQlTabs\n aria-label=\"Select active operation\"\n className=\"fk:p-1! fk:bg-muted fk:rounded-md\"\n onReorder={handleReorder}\n values={editorContext.tabs}\n >\n {editorContext.tabs.length > 0 && (\n <>\n {editorContext.tabs.map((tab, index) => (\n <GraphiQlTab isActive={index === editorContext.activeTabIndex} key={tab.id} value={tab}>\n <GraphiQlTab.Button\n aria-controls=\"graphiql-session\"\n id={`${TAB_CLASS_PREFIX}${index.toString()}`}\n onClick={handleTabClick}\n >\n {tab.title}\n </GraphiQlTab.Button>\n <GraphiQlTab.Close onClick={handleTabClose} />\n </GraphiQlTab>\n ))}\n </>\n )}\n </GraphiQlTabs>\n )}\n {addTab}\n </div>\n\n {/* Query editor */}\n <div\n role=\"tabpanel\"\n id=\"graphiql-session\" // used by aria-controls=\"graphiql-session\"\n className=\"graphiql-session\"\n aria-labelledby={`${TAB_CLASS_PREFIX}${editorContext.activeTabIndex}`}\n >\n <div className={`graphiql-editors${editorContext.tabs.length === 1 ? ' full-height' : ''}`}>\n <ResizablePanelGroup orientation=\"vertical\">\n <ResizablePanel className=\"fk:flex fk:w-full fk:gap-x-4 fk:px-4 fk:py-2\" defaultSize=\"80%\">\n <QueryEditor\n editorTheme={props.editorTheme}\n keyMap={props.keyMap}\n onCopyQuery={props.onCopyQuery}\n onEdit={props.onEditQuery}\n readOnly={props.readOnly}\n />\n <div className=\"graphiql-toolbar\" role=\"toolbar\" aria-label=\"Editor Commands\">\n <ExecuteButton />\n {toolbar}\n </div>\n </ResizablePanel>\n <ResizableHandle className=\"fk:hover:bg-blue-500 fk:transition-colors\" withHandle />\n <ResizablePanel className=\"fk:bg-muted fk:px-4 fk:pt-2\" defaultSize=\"20%\">\n <div className=\"fk:text-sm fk:font-medium fk:text-muted-foreground\">Variables</div>\n <VariableEditor\n editorTheme={props.editorTheme}\n isHidden={false}\n keyMap={props.keyMap}\n onEdit={props.onEditVariables}\n readOnly={props.readOnly}\n />\n </ResizablePanel>\n </ResizablePanelGroup>\n </div>\n </div>\n </div>\n </ResizablePanel>\n <ResizableHandle className=\"fk:hover:bg-blue-500 fk:transition-colors\" withHandle />\n <ResizablePanel className=\"fk:px-5 fk:pt-10 fk:relative\" defaultSize=\"38%\" id=\"explorer-response\">\n <div className=\"graphiql-response fk:h-full\">\n {executionContext.isFetching ? <Spinner /> : null}\n <ResponseEditor\n editorTheme={props.editorTheme}\n responseTooltip={props.responseTooltip}\n keyMap={props.keyMap}\n />\n {footer}\n </div>\n </ResizablePanel>\n </ResizablePanelGroup>\n <Dialog open={showDialog === 'short-keys'} onOpenChange={handleOpenShortKeysDialog}>\n <div className=\"graphiql-dialog-header\">\n <Dialog.Title className=\"graphiql-dialog-title\">Short Keys</Dialog.Title>\n <Dialog.Close />\n </div>\n <div className=\"graphiql-dialog-section\">\n <ShortKeys keyMap={props.keyMap || 'sublime'} />\n </div>\n </Dialog>\n <Dialog open={showDialog === 'settings'} onOpenChange={handleOpenSettingsDialog}>\n <div className=\"graphiql-dialog-header\">\n <Dialog.Title className=\"graphiql-dialog-title\">Settings</Dialog.Title>\n <Dialog.Close />\n </div>\n {props.showPersistHeadersSettings ? (\n <div className=\"graphiql-dialog-section\">\n <div>\n <div className=\"graphiql-dialog-section-title\">Persist headers</div>\n <div className=\"graphiql-dialog-section-caption\">\n Save headers upon reloading.{' '}\n <span className=\"graphiql-warning-text\">Only enable if you trust this device.</span>\n </div>\n </div>\n <ButtonGroup>\n <GraphiQLButton\n type=\"button\"\n id=\"enable-persist-headers\"\n className={editorContext.shouldPersistHeaders ? 'active' : ''}\n data-value=\"true\"\n onClick={handlePersistHeaders}\n >\n On\n </GraphiQLButton>\n <GraphiQLButton\n type=\"button\"\n id=\"disable-persist-headers\"\n className={editorContext.shouldPersistHeaders ? '' : 'active'}\n onClick={handlePersistHeaders}\n >\n Off\n </GraphiQLButton>\n </ButtonGroup>\n </div>\n ) : null}\n\n {storageContext ? (\n <div className=\"graphiql-dialog-section\">\n <div>\n <div className=\"graphiql-dialog-section-title\">Clear storage</div>\n <div className=\"graphiql-dialog-section-caption\">Remove all locally stored data and start fresh.</div>\n </div>\n <GraphiQLButton\n type=\"button\"\n state={clearStorageStatus || undefined}\n disabled={clearStorageStatus === 'success'}\n onClick={handleClearData}\n >\n {{\n success: 'Cleared data',\n error: 'Failed',\n }[clearStorageStatus!] || 'Clear data'}\n </GraphiQLButton>\n </div>\n ) : null}\n </Dialog>\n </div>\n </GraphiQLTooltip.Provider>\n );\n}\n\nconst modifier = isMacOs ? '⌘' : 'Ctrl';\n\nconst SHORT_KEYS = Object.entries({\n 'Search in editor': [modifier, 'F'],\n 'Search in documentation': [modifier, 'K'],\n 'Execute query': [modifier, 'Enter'],\n 'Prettify editors': ['Ctrl', 'Shift', 'P'],\n 'Merge fragments definitions into operation definition': ['Ctrl', 'Shift', 'M'],\n 'Copy query': ['Ctrl', 'Shift', 'C'],\n 'Re-fetch schema using introspection': ['Ctrl', 'Shift', 'R'],\n});\n\nfunction ShortKeys({ keyMap }: { keyMap: string }): ReactElement {\n return (\n <div>\n <table className=\"graphiql-table\">\n <thead>\n <tr>\n <th>Short Key</th>\n <th>Function</th>\n </tr>\n </thead>\n <tbody>\n {SHORT_KEYS.map(([title, keys]) => (\n <tr key={title}>\n <td>\n {keys.map((key, index, array) => (\n <Fragment key={key}>\n <code className=\"graphiql-key\">{key}</code>\n {index !== array.length - 1 && ' + '}\n </Fragment>\n ))}\n </td>\n <td>{title}</td>\n </tr>\n ))}\n </tbody>\n </table>\n <p>\n The editors use{' '}\n <a href=\"https://codemirror.net/5/doc/manual.html#keymaps\" target=\"_blank\" rel=\"noopener noreferrer\">\n CodeMirror Key Maps\n </a>{' '}\n that add more short keys. This instance of Graph<em>i</em>QL uses <code>{keyMap}</code>.\n </p>\n </div>\n );\n}\n\n// Configure the UI by providing this Component as a child of GraphiQL.\nfunction GraphiQLToolbar<TProps>(props: PropsWithChildren<TProps>): ReactElement {\n return <>{props.children}</>;\n}\n\nGraphiQLToolbar.displayName = 'GraphiQLToolbar';\n\n// Configure the UI by providing this Component as a child of GraphiQL.\nfunction GraphiQLFooter<TProps>(props: PropsWithChildren<TProps>): ReactElement {\n return <div className=\"graphiql-footer\">{props.children}</div>;\n}\n\nGraphiQLFooter.displayName = 'GraphiQLFooter';\n\n// Determines if the React child is of the same type of the provided React component\nfunction isChildComponentType<T extends ComponentType>(\n child: ReactNode,\n component: T\n): child is ReactElement<unknown, T> {\n const element = typeof child === 'object' && child !== null ? (child as ReactElement) : null;\n\n if (!element) {\n return false;\n }\n\n const childType = element.type as unknown;\n\n if (\n typeof childType === 'object' &&\n childType !== null &&\n 'displayName' in childType &&\n typeof (childType as { displayName?: unknown }).displayName === 'string' &&\n (childType as { displayName: string }).displayName === component.displayName\n ) {\n return true;\n }\n\n return element.type === component;\n}\n","'use client';\n\nimport { JSX, useMemo } from 'react';\nimport { createGraphiQLFetcher } from '@graphiql/toolkit';\nimport { useConfig } from '../../core/config/config-context';\nimport { GraphiQL } from './components/graphiql';\nimport '@graphiql/react/style.css';\nimport '@graphiql/plugin-history/style.css';\n\nconst DEFAULT_QUERY = `# Welcome to Flexkit Explorer\n#\n# Explorer is where you write, validate and run GraphQL queries\n# against your Flexkit project.\n#\n# Type queries into this side of the screen, and you will see intelligent\n# typeaheads aware of the current GraphQL schema and live syntax and\n# validation errors highlighted within the text.\n#\n# GraphQL queries typically start with a \"{\" character. Lines that start\n# with a # are ignored.\n#\n# An example GraphQL query might look like:\n#\n# {\n# field(arg: \"value\") {\n# subField\n# }\n# }\n#\n# Keyboard shortcuts:\n#\n# Prettify query: Shift-Ctrl-P (or press the prettify button)\n#\n# Merge fragments: Shift-Ctrl-M (or press the merge button)\n#\n# Run Query: Ctrl-Enter (or press the play button)\n#\n# Auto Complete: Ctrl-Space (or just start typing)\n#`;\n\nexport function Root(): JSX.Element {\n const { currentProjectId } = useConfig();\n const url = `/api/flexkit/${currentProjectId}/graphql`;\n const fetcher = useMemo(() => createGraphiQLFetcher({ url }), [url]);\n\n return <GraphiQL fetcher={fetcher} forcedTheme=\"light\" defaultQuery={DEFAULT_QUERY} />;\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/apps/explorer/components/graphiql.tsx","../src/apps/explorer/root.tsx"],"names":["GraphiQL","dangerouslyAssumeSchemaIsValid","confirmCloseTab","defaultQuery","defaultTabs","externalFragments","fetcher","getDefaultFieldNames","headers","inputValueDeprecation","introspectionQueryName","maxHistoryLength","onEditOperationName","onSchemaChange","onTabChange","onTogglePluginVisibility","operationName","plugins","query","response","schema","schemaDescription","shouldPersistHeaders","storage","validationRules","variables","visiblePlugin","defaultHeaders","props","mergedPlugins","useMemo","userPlugins","plugin","HISTORY_PLUGIN","jsx","GraphiQLProvider","HistoryContextProvider","GraphiQLInterface","GraphiQLToolbar","GraphiQLFooter","THEMES","TAB_CLASS_PREFIX","EXPLORER_LAYOUT_STORAGE_KEY","EXPLORER_SIDEBAR_COLLAPSED_SIZE_PCT","panelResizeArgAsPercentage","panelSize","pct","isResizableLayout","value","item","getStoredResizableLayout","storageKey","parsed","storeResizableLayout","layout","editorContext","useEditorContext","executionContext","useExecutionContext","schemaContext","useSchemaContext","storageContext","useStorageContext","pluginContext","usePluginContext","isSidebarCollapsed","setIsSidebarCollapsed","useState","sidebarPanel","useRef","explorerDefaultLayout","forcedTheme","copy","useCopyQuery","merge","useMergeQuery","prettify","usePrettifyEditors","setTheme","useTheme","useEffect","showDialog","setShowDialog","clearStorageStatus","setClearStorageStatus","children","Children","toolbar","child","isChildComponentType","jsxs","Fragment","ToolbarButton","PrettifyIcon","MergeIcon","CopyIcon","footer","handleClearData","useCallback","handlePersistHeaders","event","handleAddTab","handleRefetchSchema","handleReorder","newOrder","handleShowDialog","handlePluginClick","context","pluginIndex","_","index","handleOpenShortKeysDialog","isOpen","handleOpenSettingsDialog","addTab","GraphiQLTooltip","UnStyledButton","PlusIcon","className","confirmClose","handleTabClose","tabButton","handleTabClick","handleExplorerLayoutChanged","ResizablePanelGroup","ResizablePanel","panel","percentage","Tabs","TabsList","label","TabsTrigger","Tooltip","TooltipTrigger","Button","ChevronsRight","ChevronsLeft","TooltipContent","Separator","TabsContent","ScrollArea","ScrollBar","ReloadIcon","KeyboardShortcutIcon","SettingsIcon","ResizableHandle","GraphiQlTabs","tab","GraphiQlTab","QueryEditor","ExecuteButton","VariableEditor","Spinner","ResponseEditor","Dialog","ShortKeys","ButtonGroup","GraphiQLButton","modifier","isMacOs","SHORT_KEYS","keyMap","title","keys","key","array","component","element","childType","DEFAULT_QUERY","Root","currentProjectId","useConfig","url","createGraphiQLFetcher"],"mappings":"4tCA2GO,SAASA,CAAAA,CAAS,CACvB,8BAAA,CAAAC,CAAAA,CACA,eAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CAAAA,CACA,WAAA,CAAAC,CAAAA,CACA,iBAAA,CAAAC,CAAAA,CACA,OAAA,CAAAC,CAAAA,CACA,oBAAA,CAAAC,CAAAA,CACA,QAAAC,CAAAA,CACA,qBAAA,CAAAC,CAAAA,CACA,sBAAA,CAAAC,CAAAA,CACA,gBAAA,CAAAC,CAAAA,CACA,mBAAA,CAAAC,CAAAA,CACA,cAAA,CAAAC,CAAAA,CACA,WAAA,CAAAC,CAAAA,CACA,wBAAA,CAAAC,CAAAA,CACA,aAAA,CAAAC,CAAAA,CACA,OAAA,CAAAC,CAAAA,CACA,KAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,MAAA,CAAAC,CAAAA,CACA,iBAAA,CAAAC,CAAAA,CACA,oBAAA,CAAAC,CAAAA,CACA,OAAA,CAAAC,CAAAA,CACA,eAAA,CAAAC,CAAAA,CACA,SAAA,CAAAC,CAAAA,CACA,aAAA,CAAAC,CAAAA,CACA,cAAA,CAAAC,CAAAA,CACA,GAAG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GAAI,CAAC+E,CAAAA,CACH,OAAO,MAAA,CAGT,IAAMC,CAAAA,CAAYD,CAAAA,CAAQ,IAAA,CAE1B,OACE,OAAOC,CAAAA,EAAc,QAAA,EACrBA,CAAAA,GAAc,IAAA,EACd,aAAA,GAAiBA,CAAAA,EACjB,OAAQA,CAAAA,CAAwC,WAAA,EAAgB,QAAA,EAC/DA,CAAAA,CAAsC,WAAA,GAAgBF,CAAAA,CAAU,WAAA,CAE1D,IAAA,CAGFC,CAAAA,CAAQ,IAAA,GAASD,CAC1B,CCh2BA,IAAMG,EAAAA,CAAgB,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAAA,CAAA,CA+Bf,SAASC,EAAAA,EAAoB,CAClC,GAAM,CAAE,iBAAAC,CAAiB,CAAA,CAAIC,CAAAA,EAAU,CACjCC,EAAM,CAAA,aAAA,EAAgBF,CAAgB,CAAA,QAAA,CAAA,CACtCrK,CAAAA,CAAUwB,QAAQ,IAAMgJ,qBAAAA,CAAsB,CAAE,GAAA,CAAAD,CAAI,CAAC,CAAA,CAAG,CAACA,CAAG,CAAC,CAAA,CAEnE,OAAO3I,GAAAA,CAAClC,CAAAA,CAAA,CAAS,OAAA,CAASM,CAAAA,CAAS,YAAY,OAAA,CAAQ,YAAA,CAAcmK,GAAe,CACtF","file":"root-YNGCF5QM.js","sourcesContent":["import { Children, Fragment, useCallback, useState, useEffect, useMemo, useRef } from 'react';\nimport type {\n ComponentProps,\n ComponentType,\n MouseEventHandler,\n PropsWithChildren,\n ReactNode,\n ReactElement,\n} from 'react';\nimport {\n Button as GraphiQLButton,\n ButtonGroup,\n CopyIcon,\n Dialog,\n ExecuteButton,\n GraphiQLProvider,\n KeyboardShortcutIcon,\n MergeIcon,\n PlusIcon,\n PrettifyIcon,\n QueryEditor,\n ReloadIcon,\n ResponseEditor,\n SettingsIcon,\n Spinner,\n Tabs as GraphiQlTabs,\n Tab as GraphiQlTab,\n ToolbarButton,\n Tooltip as GraphiQLTooltip,\n UnStyledButton,\n useCopyQuery,\n useEditorContext,\n useExecutionContext,\n useMergeQuery,\n usePluginContext,\n usePrettifyEditors,\n useSchemaContext,\n useStorageContext,\n useTheme,\n VariableEditor,\n isMacOs,\n} from '@graphiql/react';\nimport type {\n Theme,\n UseHeaderEditorArgs,\n UseQueryEditorArgs,\n UseResponseEditorArgs,\n UseVariableEditorArgs,\n WriteableEditorProps,\n} from '@graphiql/react';\nimport { HISTORY_PLUGIN, HistoryContextProvider } from '@graphiql/plugin-history';\nimport { ChevronsLeft, ChevronsRight } from 'lucide-react';\nimport {\n Button,\n ResizableHandle,\n ResizablePanel,\n ResizablePanelGroup,\n ScrollArea,\n ScrollBar,\n Separator,\n Tabs,\n TabsContent,\n TabsList,\n TabsTrigger,\n Tooltip,\n TooltipContent,\n TooltipTrigger,\n} from '../../../ui';\nimport type { PanelImperativeHandle } from '../../../ui';\nimport type { TabState } from './types';\n\nexport type GraphiQLToolbarConfig = {\n /**\n * This content will be rendered after the built-in buttons of the toolbar.\n * Note that this will not apply if you provide a completely custom toolbar\n * (by passing `GraphiQL.Toolbar` as child to the `GraphiQL` component).\n */\n additionalContent?: React.ReactNode;\n\n /**\n * same as above, except a component with access to context\n */\n additionalComponent?: React.JSXElementConstructor<unknown>;\n};\n\n/**\n * API docs for this live here:\n *\n * https://graphiql-test.netlify.app/typedoc/modules/graphiql.html#graphiqlprops\n */\nexport type GraphiQLProps = Omit<ComponentProps<typeof GraphiQLProvider>, 'children'> &\n GraphiQLInterfaceProps & {\n /**\n * The maximum number of executed operations to store in history.\n *\n * GraphiQL v0.31 extracted the history functionality into `@graphiql/plugin-history`,\n * so this is no longer a prop on `@graphiql/react`'s `GraphiQLProvider`.\n */\n maxHistoryLength?: number;\n };\n\n/**\n * The top-level React component for GraphiQL, intended to encompass the entire\n * browser viewport.\n *\n * @see https://github.com/graphql/graphiql#usage\n */\nexport function GraphiQL({\n dangerouslyAssumeSchemaIsValid,\n confirmCloseTab,\n defaultQuery,\n defaultTabs,\n externalFragments,\n fetcher,\n getDefaultFieldNames,\n headers,\n inputValueDeprecation,\n introspectionQueryName,\n maxHistoryLength,\n onEditOperationName,\n onSchemaChange,\n onTabChange,\n onTogglePluginVisibility,\n operationName,\n plugins,\n query,\n response,\n schema,\n schemaDescription,\n shouldPersistHeaders,\n storage,\n validationRules,\n variables,\n visiblePlugin,\n defaultHeaders,\n ...props\n}: GraphiQLProps): ReactElement {\n // Ensure props are correct\n if (typeof fetcher !== 'function') {\n throw new TypeError('The `GraphiQL` component requires a `fetcher` function to be passed as prop.');\n }\n\n const mergedPlugins = useMemo(() => {\n const userPlugins = plugins ?? [];\n\n if (userPlugins.some((plugin) => plugin.title === HISTORY_PLUGIN.title)) {\n return userPlugins;\n }\n\n return [HISTORY_PLUGIN, ...userPlugins];\n }, [plugins]);\n\n return (\n <GraphiQLProvider\n getDefaultFieldNames={getDefaultFieldNames}\n dangerouslyAssumeSchemaIsValid={dangerouslyAssumeSchemaIsValid}\n defaultQuery={defaultQuery}\n defaultHeaders={defaultHeaders}\n defaultTabs={defaultTabs}\n externalFragments={externalFragments}\n fetcher={fetcher}\n headers={headers}\n inputValueDeprecation={inputValueDeprecation}\n introspectionQueryName={introspectionQueryName}\n onEditOperationName={onEditOperationName}\n onSchemaChange={onSchemaChange}\n onTabChange={onTabChange}\n onTogglePluginVisibility={onTogglePluginVisibility}\n plugins={mergedPlugins}\n visiblePlugin={visiblePlugin}\n operationName={operationName}\n query={query}\n response={response}\n schema={schema}\n schemaDescription={schemaDescription}\n shouldPersistHeaders={shouldPersistHeaders}\n storage={storage}\n validationRules={validationRules}\n variables={variables}\n >\n <HistoryContextProvider maxHistoryLength={maxHistoryLength}>\n <GraphiQLInterface\n confirmCloseTab={confirmCloseTab}\n showPersistHeadersSettings={shouldPersistHeaders !== false}\n disableTabs={props.disableTabs ?? false}\n forcedTheme={props.forcedTheme}\n {...props}\n />\n </HistoryContextProvider>\n </GraphiQLProvider>\n );\n}\n\n// Export main windows/panes to be used separately if desired.\nGraphiQL.Toolbar = GraphiQLToolbar;\nGraphiQL.Footer = GraphiQLFooter;\n\ntype AddSuffix<Obj extends { [key: string]: unknown }, Suffix extends string> = {\n [Key in keyof Obj as `${string & Key}${Suffix}`]: Obj[Key];\n};\n\nexport type GraphiQLInterfaceProps = WriteableEditorProps &\n AddSuffix<Pick<UseQueryEditorArgs, 'onEdit'>, 'Query'> &\n Pick<UseQueryEditorArgs, 'onCopyQuery'> &\n AddSuffix<Pick<UseVariableEditorArgs, 'onEdit'>, 'Variables'> &\n AddSuffix<Pick<UseHeaderEditorArgs, 'onEdit'>, 'Headers'> &\n Pick<UseResponseEditorArgs, 'responseTooltip'> & {\n children?: ReactNode;\n /**\n * Set the default state for the editor tools.\n * - `false` hides the editor tools\n * - `true` shows the editor tools\n * - `'variables'` specifically shows the variables editor\n * - `'headers'` specifically shows the headers editor\n * By default the editor tools are initially shown when at least one of the\n * editors has contents.\n */\n defaultEditorToolsVisibility?: boolean | 'variables' | 'headers';\n /**\n * Toggle if the headers editor should be shown inside the editor tools.\n */\n isHeadersEditorEnabled?: boolean;\n /**\n * An object that allows configuration of the toolbar next to the query\n * editor.\n */\n toolbar?: GraphiQLToolbarConfig;\n /**\n * Indicates if settings for persisting headers should appear in the\n * settings modal.\n */\n showPersistHeadersSettings?: boolean;\n defaultTheme?: Theme;\n disableTabs?: boolean;\n /**\n * `forcedTheme` allows enforcement of a specific theme for GraphiQL.\n * This is useful when you want to make sure that GraphiQL is always\n * rendered with a specific theme.\n */\n forcedTheme?: (typeof THEMES)[number];\n /**\n * Additional class names which will be appended to the container element.\n */\n className?: string;\n /**\n * When the user clicks a close tab button, this function is invoked with\n * the index of the tab that is about to be closed. It can return a promise\n * that should resolve to `true` (meaning the tab may be closed) or `false`\n * (meaning the tab may not be closed).\n */\n confirmCloseTab?: (index: number) => Promise<boolean> | boolean;\n };\n\nconst THEMES = ['light', 'dark', 'system'] as const;\n\nconst TAB_CLASS_PREFIX = 'graphiql-session-tab-';\nconst EXPLORER_LAYOUT_STORAGE_KEY = 'flexkit-explorer:layout';\n\n/** Matches `collapsedSize` on the explorer sidebar panel (see `PanelSize.asPercentage` in react-resizable-panels v4). */\nconst EXPLORER_SIDEBAR_COLLAPSED_SIZE_PCT = 3;\n\nfunction panelResizeArgAsPercentage(panelSize: unknown): number | undefined {\n if (typeof panelSize === 'number') {\n return panelSize;\n }\n\n if (typeof panelSize !== 'object' || panelSize === null) {\n return undefined;\n }\n\n if (!('asPercentage' in panelSize)) {\n return undefined;\n }\n\n const pct = (panelSize as { asPercentage: unknown }).asPercentage;\n\n if (typeof pct !== 'number') {\n return undefined;\n }\n\n return pct;\n}\n\ntype ResizableLayout = {\n [panelId: string]: number;\n};\n\nfunction isResizableLayout(value: unknown): value is ResizableLayout {\n if (!value || typeof value !== 'object' || Array.isArray(value)) {\n return false;\n }\n\n return Object.values(value).every((item) => typeof item === 'number');\n}\n\nfunction getStoredResizableLayout(storageKey: string): ResizableLayout | undefined {\n if (typeof window === 'undefined') {\n return undefined;\n }\n\n const value = window.localStorage.getItem(storageKey);\n\n if (!value) {\n return undefined;\n }\n\n try {\n const parsed: unknown = JSON.parse(value);\n\n if (isResizableLayout(parsed)) {\n return parsed;\n }\n } catch {\n return undefined;\n }\n\n return undefined;\n}\n\nfunction storeResizableLayout(storageKey: string, layout: ResizableLayout): void {\n if (typeof window === 'undefined') {\n return;\n }\n\n try {\n window.localStorage.setItem(storageKey, JSON.stringify(layout));\n } catch {\n // Ignore storage failures so resizing still works in restricted browsing modes.\n }\n}\n\nexport function GraphiQLInterface(props: GraphiQLInterfaceProps): ReactElement {\n const editorContext = useEditorContext({ nonNull: true });\n const executionContext = useExecutionContext({ nonNull: true });\n const schemaContext = useSchemaContext({ nonNull: true });\n const storageContext = useStorageContext();\n const pluginContext = usePluginContext();\n const [isSidebarCollapsed, setIsSidebarCollapsed] = useState(false);\n const sidebarPanel = useRef<PanelImperativeHandle | null>(null);\n const explorerDefaultLayout = useMemo(() => getStoredResizableLayout(EXPLORER_LAYOUT_STORAGE_KEY), []);\n const forcedTheme = useMemo(\n () => (props.forcedTheme && THEMES.includes(props.forcedTheme) ? props.forcedTheme : undefined),\n [props.forcedTheme]\n );\n\n const copy = useCopyQuery({ onCopyQuery: props.onCopyQuery });\n const merge = useMergeQuery();\n const prettify = usePrettifyEditors();\n\n const { setTheme } = useTheme(props.defaultTheme);\n\n useEffect(() => {\n if (forcedTheme === 'system') {\n setTheme(null);\n } else if (forcedTheme === 'light' || forcedTheme === 'dark') {\n setTheme(forcedTheme);\n }\n }, [forcedTheme, setTheme]);\n\n useEffect(() => {\n pluginContext?.setVisiblePlugin(pluginContext.plugins[0]);\n }, [pluginContext]);\n\n const [showDialog, setShowDialog] = useState<'settings' | 'short-keys' | null>(null);\n const [clearStorageStatus, setClearStorageStatus] = useState<'success' | 'error' | null>(null);\n\n const children = Children.toArray(props.children);\n\n const toolbar = children.find((child) => isChildComponentType(child, GraphiQL.Toolbar)) ?? (\n <>\n <ToolbarButton onClick={prettify} label=\"Prettify query (Shift-Ctrl-P)\">\n <PrettifyIcon className=\"fk:w-6 fk:h-6 fk:block\" aria-hidden=\"true\" />\n </ToolbarButton>\n <ToolbarButton onClick={merge} label=\"Merge fragments into query (Shift-Ctrl-M)\">\n <MergeIcon className=\"fk:w-6 fk:h-6 fk:block\" aria-hidden=\"true\" />\n </ToolbarButton>\n <ToolbarButton onClick={copy} label=\"Copy query (Shift-Ctrl-C)\">\n <CopyIcon className=\"fk:w-6 fk:h-6 fk:block\" aria-hidden=\"true\" />\n </ToolbarButton>\n {props.toolbar?.additionalContent}\n {props.toolbar?.additionalComponent && <props.toolbar.additionalComponent />}\n </>\n );\n\n const footer = children.find((child) => isChildComponentType(child, GraphiQL.Footer));\n\n const handleClearData = useCallback(() => {\n try {\n storageContext?.clear();\n setClearStorageStatus('success');\n } catch {\n setClearStorageStatus('error');\n }\n }, [storageContext]);\n\n const handlePersistHeaders: MouseEventHandler<HTMLButtonElement> = useCallback(\n (event) => {\n editorContext.setShouldPersistHeaders(event.currentTarget.dataset.value === 'true');\n },\n [editorContext]\n );\n\n const handleAddTab = (): void => {\n editorContext.addTab();\n };\n const handleRefetchSchema = (): void => {\n schemaContext.introspect();\n };\n const handleReorder = (newOrder: TabState[]): void => {\n editorContext.moveTab(newOrder);\n };\n\n const handleShowDialog: MouseEventHandler<HTMLButtonElement> = useCallback((event) => {\n setShowDialog(event.currentTarget.dataset.value as 'short-keys' | 'settings');\n }, []);\n\n const handlePluginClick: MouseEventHandler<HTMLButtonElement> = useCallback(\n (event) => {\n const context = pluginContext;\n const pluginIndex = Number(event.currentTarget.dataset.index);\n\n if (!context) return;\n\n const plugin = context.plugins.find((_, index) => pluginIndex === index) ?? null;\n const isVisible = plugin === context.visiblePlugin;\n\n if (isVisible) {\n context.setVisiblePlugin(null);\n\n return;\n }\n\n context.setVisiblePlugin(plugin);\n },\n [pluginContext]\n );\n\n const handleOpenShortKeysDialog = useCallback((isOpen: boolean) => {\n if (!isOpen) {\n setShowDialog(null);\n }\n }, []);\n\n const handleOpenSettingsDialog = useCallback((isOpen: boolean) => {\n if (!isOpen) {\n setShowDialog(null);\n setClearStorageStatus(null);\n }\n }, []);\n\n const addTab = (\n <GraphiQLTooltip label=\"Add tab\">\n <UnStyledButton type=\"button\" className=\"graphiql-tab-add\" onClick={handleAddTab} aria-label=\"Add tab\">\n <PlusIcon aria-hidden=\"true\" />\n </UnStyledButton>\n </GraphiQLTooltip>\n );\n\n const className = props.className ? ` ${props.className}` : '';\n const confirmClose = props.confirmCloseTab;\n\n const handleTabClose: MouseEventHandler<HTMLButtonElement> = useCallback(\n async (event) => {\n const tabButton = event.currentTarget.previousSibling as HTMLButtonElement;\n const index = Number(tabButton.id.replace(TAB_CLASS_PREFIX, ''));\n\n /** TODO:\n * Move everything after into `editorContext.closeTab` once zustand will be used instead of\n * React context, since now we can't use execution context inside editor context, since editor\n * context is used in execution context.\n */\n const shouldCloseTab = confirmClose ? await confirmClose(index) : true;\n\n if (!shouldCloseTab) {\n return;\n }\n\n if (editorContext.activeTabIndex === index) {\n executionContext.stop();\n }\n editorContext.closeTab(index);\n },\n [confirmClose, editorContext, executionContext]\n );\n\n const handleTabClick: MouseEventHandler<HTMLButtonElement> = useCallback(\n (event) => {\n const index = Number(event.currentTarget.id.replace(TAB_CLASS_PREFIX, ''));\n /** TODO:\n * Move everything after into `editorContext.changeTab` once zustand will be used instead of\n * React context, since now we can't use execution context inside editor context, since editor\n * context is used in execution context.\n */\n executionContext.stop();\n editorContext.changeTab(index);\n },\n [editorContext, executionContext]\n );\n\n const handleExplorerLayoutChanged = useCallback((layout: ResizableLayout) => {\n storeResizableLayout(EXPLORER_LAYOUT_STORAGE_KEY, layout);\n }, []);\n\n return (\n <GraphiQLTooltip.Provider>\n <div className={`graphiql-container${className}`}>\n <ResizablePanelGroup\n className=\"fk:h-full fk:max-h-full\"\n defaultLayout={explorerDefaultLayout}\n id=\"explorer\"\n onLayoutChanged={handleExplorerLayoutChanged}\n orientation=\"horizontal\"\n >\n <ResizablePanel\n collapsible\n collapsedSize={`${EXPLORER_SIDEBAR_COLLAPSED_SIZE_PCT}%`}\n defaultSize=\"22%\"\n id=\"explorer-sidebar\"\n minSize=\"10%\"\n onResize={(panelSize) => {\n const panel = sidebarPanel.current;\n\n if (panel) {\n setIsSidebarCollapsed(panel.isCollapsed());\n\n return;\n }\n\n const percentage = panelResizeArgAsPercentage(panelSize);\n\n if (percentage !== undefined) {\n setIsSidebarCollapsed(percentage <= EXPLORER_SIDEBAR_COLLAPSED_SIZE_PCT);\n }\n }}\n panelRef={sidebarPanel}\n >\n <div className=\"fk:flex fk:w-full fk:h-full fk:pb-6\">\n <Tabs className=\"fk:w-full\" defaultValue={pluginContext?.plugins[0].title}>\n <div className={`fk:flex fk:items-center fk:py-1 ${isSidebarCollapsed ? '' : 'fk:px-3'}`}>\n <TabsList className={isSidebarCollapsed ? 'fk:hidden' : ''}>\n {pluginContext?.plugins.map((plugin, index) => {\n const isVisible = plugin === pluginContext.visiblePlugin;\n const label = `${isVisible ? 'Hide' : 'Show'} ${plugin.title}`;\n return (\n <TabsTrigger\n aria-label={label}\n className=\"fk:text-muted-foreground\"\n data-index={index}\n key={plugin.title}\n onClick={handlePluginClick}\n value={plugin.title}\n >\n <plugin.icon aria-hidden=\"true\" />\n </TabsTrigger>\n );\n })}\n </TabsList>\n <Tooltip>\n <TooltipTrigger asChild>\n <Button\n className={isSidebarCollapsed ? 'fk:ml-1.5' : 'fk:ml-auto'}\n onClick={() => {\n const panel = sidebarPanel.current;\n\n isSidebarCollapsed ? panel?.expand() : panel?.collapse();\n }}\n size=\"icon\"\n variant=\"ghost\"\n >\n {isSidebarCollapsed ? (\n <>\n <ChevronsRight className=\"fk:w-4 fk:h-4\" />\n <span className=\"fk:sr-only\">Expand</span>\n </>\n ) : (\n <>\n <ChevronsLeft className=\"fk:w-4 fk:h-4\" />\n <span className=\"fk:sr-only\">Collapse</span>\n </>\n )}\n </Button>\n </TooltipTrigger>\n <TooltipContent>{isSidebarCollapsed ? 'Expand' : 'Collapse'}</TooltipContent>\n </Tooltip>\n </div>\n {isSidebarCollapsed ? null : <Separator />}\n {pluginContext?.plugins.map((plugin) => (\n <TabsContent\n className={`fk:flex fk:w-full fk:max-h-full fk:mt-0 ${isSidebarCollapsed ? 'fk:hidden' : ''}`}\n key={plugin.title}\n value={plugin.title}\n >\n <ScrollArea className=\"fk:flex fk:w-full fk:max-h-full fk:overflow-auto fk:pl-3 fk:pr-6 fk:pt-3 fk:pb-6 fk:mb-3 fk:[&>div>div]:block!\">\n <plugin.content />\n <ScrollBar orientation=\"horizontal\" />\n </ScrollArea>\n </TabsContent>\n ))}\n </Tabs>\n </div>\n <GraphiQLTooltip label=\"Re-fetch GraphQL schema\">\n <UnStyledButton\n type=\"button\"\n disabled={schemaContext.isFetching}\n onClick={handleRefetchSchema}\n aria-label=\"Re-fetch GraphQL schema\"\n >\n <ReloadIcon className={schemaContext.isFetching ? 'graphiql-spin' : ''} aria-hidden=\"true\" />\n </UnStyledButton>\n </GraphiQLTooltip>\n <GraphiQLTooltip label=\"Open short keys dialog\">\n <UnStyledButton\n type=\"button\"\n data-value=\"short-keys\"\n onClick={handleShowDialog}\n aria-label=\"Open short keys dialog\"\n >\n <KeyboardShortcutIcon aria-hidden=\"true\" />\n </UnStyledButton>\n </GraphiQLTooltip>\n <GraphiQLTooltip label=\"Open settings dialog\">\n <UnStyledButton\n type=\"button\"\n data-value=\"settings\"\n onClick={handleShowDialog}\n aria-label=\"Open settings dialog\"\n >\n <SettingsIcon aria-hidden=\"true\" />\n </UnStyledButton>\n </GraphiQLTooltip>\n </ResizablePanel>\n\n <ResizableHandle className=\"fk:hover:bg-blue-500 fk:transition-colors\" withHandle />\n {/* Center column */}\n <ResizablePanel className=\"fk:bg-muted\" defaultSize=\"40%\" id=\"explorer-editor\">\n <div className=\"fk:flex fk:flex-col fk:h-full\">\n <div className=\"fk:flex fk:items-center fk:py-1 fk:px-4 fk:gap-6 fk:bg-muted\">\n {!props.disableTabs && (\n <GraphiQlTabs\n aria-label=\"Select active operation\"\n className=\"fk:p-1! fk:bg-muted fk:rounded-md\"\n onReorder={handleReorder}\n values={editorContext.tabs}\n >\n {editorContext.tabs.length > 0 && (\n <>\n {editorContext.tabs.map((tab, index) => (\n <GraphiQlTab isActive={index === editorContext.activeTabIndex} key={tab.id} value={tab}>\n <GraphiQlTab.Button\n aria-controls=\"graphiql-session\"\n id={`${TAB_CLASS_PREFIX}${index.toString()}`}\n onClick={handleTabClick}\n >\n {tab.title}\n </GraphiQlTab.Button>\n <GraphiQlTab.Close onClick={handleTabClose} />\n </GraphiQlTab>\n ))}\n </>\n )}\n </GraphiQlTabs>\n )}\n {addTab}\n </div>\n\n {/* Query editor */}\n <div\n role=\"tabpanel\"\n id=\"graphiql-session\" // used by aria-controls=\"graphiql-session\"\n className=\"graphiql-session\"\n aria-labelledby={`${TAB_CLASS_PREFIX}${editorContext.activeTabIndex}`}\n >\n <div className={`graphiql-editors${editorContext.tabs.length === 1 ? ' full-height' : ''}`}>\n <ResizablePanelGroup orientation=\"vertical\">\n <ResizablePanel className=\"fk:flex fk:w-full fk:gap-x-4 fk:px-4 fk:py-2\" defaultSize=\"80%\">\n <QueryEditor\n editorTheme={props.editorTheme}\n keyMap={props.keyMap}\n onCopyQuery={props.onCopyQuery}\n onEdit={props.onEditQuery}\n readOnly={props.readOnly}\n />\n <div className=\"graphiql-toolbar\" role=\"toolbar\" aria-label=\"Editor Commands\">\n <ExecuteButton />\n {toolbar}\n </div>\n </ResizablePanel>\n <ResizableHandle className=\"fk:hover:bg-blue-500 fk:transition-colors\" withHandle />\n <ResizablePanel className=\"fk:bg-muted fk:px-4 fk:pt-2\" defaultSize=\"20%\">\n <div className=\"fk:text-sm fk:font-medium fk:text-muted-foreground\">Variables</div>\n <VariableEditor\n editorTheme={props.editorTheme}\n isHidden={false}\n keyMap={props.keyMap}\n onEdit={props.onEditVariables}\n readOnly={props.readOnly}\n />\n </ResizablePanel>\n </ResizablePanelGroup>\n </div>\n </div>\n </div>\n </ResizablePanel>\n <ResizableHandle className=\"fk:hover:bg-blue-500 fk:transition-colors\" withHandle />\n <ResizablePanel className=\"fk:px-5 fk:pt-10 fk:relative\" defaultSize=\"38%\" id=\"explorer-response\">\n <div className=\"graphiql-response fk:h-full\">\n {executionContext.isFetching ? <Spinner /> : null}\n <ResponseEditor\n editorTheme={props.editorTheme}\n responseTooltip={props.responseTooltip}\n keyMap={props.keyMap}\n />\n {footer}\n </div>\n </ResizablePanel>\n </ResizablePanelGroup>\n <Dialog open={showDialog === 'short-keys'} onOpenChange={handleOpenShortKeysDialog}>\n <div className=\"graphiql-dialog-header\">\n <Dialog.Title className=\"graphiql-dialog-title\">Short Keys</Dialog.Title>\n <Dialog.Close />\n </div>\n <div className=\"graphiql-dialog-section\">\n <ShortKeys keyMap={props.keyMap || 'sublime'} />\n </div>\n </Dialog>\n <Dialog open={showDialog === 'settings'} onOpenChange={handleOpenSettingsDialog}>\n <div className=\"graphiql-dialog-header\">\n <Dialog.Title className=\"graphiql-dialog-title\">Settings</Dialog.Title>\n <Dialog.Close />\n </div>\n {props.showPersistHeadersSettings ? (\n <div className=\"graphiql-dialog-section\">\n <div>\n <div className=\"graphiql-dialog-section-title\">Persist headers</div>\n <div className=\"graphiql-dialog-section-caption\">\n Save headers upon reloading.{' '}\n <span className=\"graphiql-warning-text\">Only enable if you trust this device.</span>\n </div>\n </div>\n <ButtonGroup>\n <GraphiQLButton\n type=\"button\"\n id=\"enable-persist-headers\"\n className={editorContext.shouldPersistHeaders ? 'active' : ''}\n data-value=\"true\"\n onClick={handlePersistHeaders}\n >\n On\n </GraphiQLButton>\n <GraphiQLButton\n type=\"button\"\n id=\"disable-persist-headers\"\n className={editorContext.shouldPersistHeaders ? '' : 'active'}\n onClick={handlePersistHeaders}\n >\n Off\n </GraphiQLButton>\n </ButtonGroup>\n </div>\n ) : null}\n\n {storageContext ? (\n <div className=\"graphiql-dialog-section\">\n <div>\n <div className=\"graphiql-dialog-section-title\">Clear storage</div>\n <div className=\"graphiql-dialog-section-caption\">Remove all locally stored data and start fresh.</div>\n </div>\n <GraphiQLButton\n type=\"button\"\n state={clearStorageStatus || undefined}\n disabled={clearStorageStatus === 'success'}\n onClick={handleClearData}\n >\n {{\n success: 'Cleared data',\n error: 'Failed',\n }[clearStorageStatus!] || 'Clear data'}\n </GraphiQLButton>\n </div>\n ) : null}\n </Dialog>\n </div>\n </GraphiQLTooltip.Provider>\n );\n}\n\nconst modifier = isMacOs ? '⌘' : 'Ctrl';\n\nconst SHORT_KEYS = Object.entries({\n 'Search in editor': [modifier, 'F'],\n 'Search in documentation': [modifier, 'K'],\n 'Execute query': [modifier, 'Enter'],\n 'Prettify editors': ['Ctrl', 'Shift', 'P'],\n 'Merge fragments definitions into operation definition': ['Ctrl', 'Shift', 'M'],\n 'Copy query': ['Ctrl', 'Shift', 'C'],\n 'Re-fetch schema using introspection': ['Ctrl', 'Shift', 'R'],\n});\n\nfunction ShortKeys({ keyMap }: { keyMap: string }): ReactElement {\n return (\n <div>\n <table className=\"graphiql-table\">\n <thead>\n <tr>\n <th>Short Key</th>\n <th>Function</th>\n </tr>\n </thead>\n <tbody>\n {SHORT_KEYS.map(([title, keys]) => (\n <tr key={title}>\n <td>\n {keys.map((key, index, array) => (\n <Fragment key={key}>\n <code className=\"graphiql-key\">{key}</code>\n {index !== array.length - 1 && ' + '}\n </Fragment>\n ))}\n </td>\n <td>{title}</td>\n </tr>\n ))}\n </tbody>\n </table>\n <p>\n The editors use{' '}\n <a href=\"https://codemirror.net/5/doc/manual.html#keymaps\" target=\"_blank\" rel=\"noopener noreferrer\">\n CodeMirror Key Maps\n </a>{' '}\n that add more short keys. This instance of Graph<em>i</em>QL uses <code>{keyMap}</code>.\n </p>\n </div>\n );\n}\n\n// Configure the UI by providing this Component as a child of GraphiQL.\nfunction GraphiQLToolbar<TProps>(props: PropsWithChildren<TProps>): ReactElement {\n return <>{props.children}</>;\n}\n\nGraphiQLToolbar.displayName = 'GraphiQLToolbar';\n\n// Configure the UI by providing this Component as a child of GraphiQL.\nfunction GraphiQLFooter<TProps>(props: PropsWithChildren<TProps>): ReactElement {\n return <div className=\"graphiql-footer\">{props.children}</div>;\n}\n\nGraphiQLFooter.displayName = 'GraphiQLFooter';\n\n// Determines if the React child is of the same type of the provided React component\nfunction isChildComponentType<T extends ComponentType>(\n child: ReactNode,\n component: T\n): child is ReactElement<unknown, T> {\n const element = typeof child === 'object' && child !== null ? (child as ReactElement) : null;\n\n if (!element) {\n return false;\n }\n\n const childType = element.type as unknown;\n\n if (\n typeof childType === 'object' &&\n childType !== null &&\n 'displayName' in childType &&\n typeof (childType as { displayName?: unknown }).displayName === 'string' &&\n (childType as { displayName: string }).displayName === component.displayName\n ) {\n return true;\n }\n\n return element.type === component;\n}\n","'use client';\n\nimport { JSX, useMemo } from 'react';\nimport { createGraphiQLFetcher } from '@graphiql/toolkit';\nimport { useConfig } from '../../core/config/config-context';\nimport { GraphiQL } from './components/graphiql';\nimport '@graphiql/react/style.css';\nimport '@graphiql/plugin-history/style.css';\n\nconst DEFAULT_QUERY = `# Welcome to Flexkit Explorer\n#\n# Explorer is where you write, validate and run GraphQL queries\n# against your Flexkit project.\n#\n# Type queries into this side of the screen, and you will see intelligent\n# typeaheads aware of the current GraphQL schema and live syntax and\n# validation errors highlighted within the text.\n#\n# GraphQL queries typically start with a \"{\" character. Lines that start\n# with a # are ignored.\n#\n# An example GraphQL query might look like:\n#\n# {\n# field(arg: \"value\") {\n# subField\n# }\n# }\n#\n# Keyboard shortcuts:\n#\n# Prettify query: Shift-Ctrl-P (or press the prettify button)\n#\n# Merge fragments: Shift-Ctrl-M (or press the merge button)\n#\n# Run Query: Ctrl-Enter (or press the play button)\n#\n# Auto Complete: Ctrl-Space (or just start typing)\n#`;\n\nexport function Root(): JSX.Element {\n const { currentProjectId } = useConfig();\n const url = `/api/flexkit/${currentProjectId}/graphql`;\n const fetcher = useMemo(() => createGraphiQLFetcher({ url }), [url]);\n\n return <GraphiQL fetcher={fetcher} forcedTheme=\"light\" defaultQuery={DEFAULT_QUERY} />;\n}\n"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import'./index.css';import {a}from'./chunk-
|
|
2
|
-
//# sourceMappingURL=root-
|
|
1
|
+
import'./index.css';import {a}from'./chunk-U5D3EDCY.js';import {b,c}from'./chunk-P5ZRTZ5Z.js';import'./chunk-R64ELY3B.js';import'./chunk-ALCK2BJY.js';import {g,f as f$1}from'./chunk-NLRSLQUT.js';import {f}from'./chunk-XWBACTNR.js';import'./chunk-2HYQVMP3.js';import'./chunk-5CVDMZUI.js';import {L,P,M,R,T as T$1,s as s$1,Q,U as U$1,V,W,O}from'./chunk-YCCFUGWJ.js';import {b as b$1}from'./chunk-32ZU4MLE.js';import'./chunk-HDOIOXMP.js';import'./chunk-SZEGGBOC.js';import'./chunk-U45E5X3H.js';import'./chunk-USNXQOMJ.js';import'./chunk-6NRQMG26.js';import'./chunk-O2QMYUPS.js';import {Outlet,useLocation,NavLink}from'react-router-dom';import {useState}from'react';import {SearchIcon,XIcon,SquarePenIcon,BellIcon,BotIcon,HistoryIcon,InboxIcon,PlugIcon}from'lucide-react';import Q$1 from'swr';import {jsxs,jsx}from'react/jsx-runtime';var K=300,s=NavLink;function T(){let{currentProjectId:a}=f(),{data:e}=Q$1(a?g(a).approvalsCount:null,f$1,{refreshInterval:3e4}),o=e?.pendingCount??0;return o===0?null:jsx(b$1,{className:"fk:ml-auto fk:h-5 fk:min-w-5 fk:justify-center fk:rounded-full fk:bg-amber-500/20 fk:px-1.5 fk:text-[0.6875rem] fk:text-amber-600 fk:border-none fk:corner-squircle",children:o>99?"99+":o.toString()})}function U(){let{currentProjectId:a$1}=f(),e=a(a$1),o=e?.needsActionCount??0,f$1=o>0?o:e?.unreadCount??0;return f$1===0?null:jsx(b$1,{className:`fk:ml-auto fk:h-5 fk:min-w-5 fk:justify-center fk:rounded-full fk:px-1.5 fk:text-[0.6875rem] fk:border-none fk:corner-squircle ${o>0?"fk:bg-amber-500/20 fk:text-amber-600":"fk:bg-muted fk:text-muted-foreground"}`,children:f$1>99?"99+":f$1.toString()})}function B(){let e=useLocation().pathname.replace(/\/$/,""),o=e.endsWith("/ai/agent"),f=e.endsWith("/ai/runs"),w=e.endsWith("/ai/approvals"),P=e.endsWith("/ai/activity")||e.includes("/ai/activity/"),R$1=e.includes("/ai/plugins")||e.includes("/ai/skills"),W$1=e.includes("/ai/automations"),[d,k]=useState(""),E=b(d.trim(),K);return jsxs(M,{collapsible:"icon",variant:"inset",children:[jsx(R,{className:"fk:shrink-0 fk:pb-1.5 fk:group-data-[collapsible=icon]:hidden",children:jsxs(T$1,{className:"fk:relative",children:[jsx(SearchIcon,{className:"fk:absolute fk:left-2 fk:top-1/2 fk:size-3.5 fk:-translate-y-1/2 fk:text-muted-foreground"}),jsx(s$1,{className:"fk:h-8 fk:bg-background fk:pl-7 fk:pr-7 fk:text-sm",placeholder:"Search chats...",value:d,onChange:L=>k(L.target.value)}),d?jsx("button",{"aria-label":"Clear search",className:"fk:absolute fk:right-2 fk:top-1/2 fk:-translate-y-1/2 fk:cursor-pointer fk:text-muted-foreground fk:hover:text-foreground",type:"button",onClick:()=>k(""),children:jsx(XIcon,{className:"fk:size-3.5"})}):null]})}),jsxs(Q,{children:[jsx(R,{children:jsxs(U$1,{children:[jsx(V,{children:jsx(W,{asChild:true,isActive:o,tooltip:"New chat",children:jsxs(s,{to:"agent",children:[jsx(SquarePenIcon,{className:"fk:h-4 fk:w-4",strokeWidth:2}),jsx("span",{children:"New chat"})]})})}),jsx(V,{children:jsx(W,{asChild:true,isActive:P,tooltip:"Activity",children:jsxs(s,{to:"activity",children:[jsx(BellIcon,{className:"fk:h-4 fk:w-4",strokeWidth:2}),jsx("span",{children:"Activity"}),jsx(U,{})]})})}),jsx(V,{children:jsx(W,{asChild:true,isActive:W$1,tooltip:"Automations",children:jsxs(s,{to:"automations",children:[jsx(BotIcon,{className:"fk:h-4 fk:w-4",strokeWidth:2}),jsx("span",{children:"Automations"})]})})}),jsx(V,{children:jsx(W,{asChild:true,isActive:f,tooltip:"Run History",children:jsxs(s,{to:"runs",children:[jsx(HistoryIcon,{className:"fk:h-4 fk:w-4",strokeWidth:2}),jsx("span",{children:"Run History"})]})})}),jsx(V,{children:jsx(W,{asChild:true,isActive:w,tooltip:"Approvals",children:jsxs(s,{to:"approvals",children:[jsx(InboxIcon,{className:"fk:h-4 fk:w-4",strokeWidth:2}),jsx("span",{children:"Approvals"}),jsx(T,{})]})})}),jsx(V,{children:jsx(W,{asChild:true,isActive:R$1,tooltip:"Plugins",children:jsxs(s,{to:"plugins",children:[jsx(PlugIcon,{className:"fk:size-4"}),jsx("span",{children:"Plugins"})]})})})]})}),jsx(R,{className:"fk:mt-4 fk:group-data-[collapsible=icon]:hidden",children:jsx(T$1,{children:jsx(c,{query:E})})})]}),jsx(O,{})]})}var F="flexkit:sidebar:state";function pt(){let{currentProjectId:a}=f(),e=document.cookie.split("; ").find(o=>o.startsWith(`${F}=`))?.split("=")[1]!=="false";return a?jsxs(L,{className:"fk:h-full",defaultOpen:e,children:[jsx(B,{}),jsx(P,{className:"fk:min-w-0",children:jsx("div",{className:"fk:flex fk:h-full fk:min-h-0 fk:min-w-0 fk:flex-col fk:overflow-hidden fk:pl-4 fk:pt-3",children:jsx("div",{className:"fk:flex fk:min-h-0 fk:min-w-0 fk:flex-1 fk:flex-col",children:jsx(Outlet,{})})})})]}):jsx("main",{className:"fk:flex fk:h-full fk:flex-1 fk:items-center fk:justify-center fk:p-8 fk:text-sm fk:text-muted-foreground",children:"Select a project to manage automations and skills."})}export{pt as Root};//# sourceMappingURL=root-ZF62TR5Z.js.map
|
|
2
|
+
//# sourceMappingURL=root-ZF62TR5Z.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/apps/ai/sidebar.tsx","../src/apps/ai/root.tsx"],"names":["SEARCH_DEBOUNCE_MS","NavLinkCompat","NavLink","PendingApprovalsBadge","currentProjectId","useConfig","data","useSWR","paths","fetcher","pendingCount","jsx","Badge","ActivityBadge","useActivitySummary","needsAction","count","AutomationsSidebar","pathname","useLocation","isNewChat","isRunHistory","isApprovals","isActivity","isPlugins","isAutomations","query","setQuery","useState","debouncedQuery","useDebouncedValue","jsxs","Sidebar","SidebarGroup","SidebarGroupContent","SearchIcon","Input","event","XIcon","SidebarContent","SidebarMenu","SidebarMenuItem","SidebarMenuButton","SquarePenIcon","BellIcon","BotIcon","HistoryIcon","InboxIcon","PlugIcon","AgentChatsSection","SidebarRail","SIDEBAR_COOKIE_NAME","Root","defaultOpen","row","SidebarProvider","SidebarInset","Outlet"],"mappings":"8zBAuBA,IAAMA,CAAAA,CAAqB,GAAA,CAErBC,EAAg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CAAA,CAAI,UAAU,qDAAA,CACb,QAAA,CAAAA,GAAAA,CAAC8C,MAAAA,CAAA,EAAO,CAAA,CACV,CAAA,CACF,CAAA,CACF,CAAA,CAAA,CACF,EAhBE9C,GAAAA,CAAC,MAAA,CAAA,CAAK,SAAA,CAAU,0GAAA,CAA2G,8DAE3H,CAgBN","file":"root-OHZDY47O.js","sourcesContent":["import type { JSX } from 'react';\nimport { useState } from 'react';\nimport { BellIcon, BotIcon, PlugIcon, HistoryIcon, InboxIcon, SearchIcon, SquarePenIcon, XIcon } from 'lucide-react';\nimport { NavLink, useLocation } from 'react-router-dom';\nimport useSWR from 'swr';\nimport { useConfig } from '../../core/config/config-context';\nimport {\n Badge,\n Input,\n SidebarContent,\n SidebarGroup,\n SidebarGroupContent,\n SidebarMenu,\n SidebarMenuButton,\n SidebarMenuItem,\n SidebarPanel,\n SidebarRail,\n} from '../../ui';\nimport { fetcher, paths } from './api';\nimport { useActivitySummary } from './activity-nav-button';\nimport { AgentChatsSection, useDebouncedValue } from './agent/chat-list';\nimport type { AutomationApprovals } from './types';\n\nconst SEARCH_DEBOUNCE_MS = 300;\n\nconst NavLinkCompat = NavLink as unknown as React.ComponentType<{\n children?: React.ReactNode;\n to: string;\n}>;\n\nfunction PendingApprovalsBadge(): JSX.Element | null {\n const { currentProjectId } = useConfig();\n const { data } = useSWR<AutomationApprovals>(\n currentProjectId ? paths(currentProjectId).approvalsCount : null,\n fetcher,\n { refreshInterval: 30_000 }\n );\n const pendingCount = data?.pendingCount ?? 0;\n\n if (pendingCount === 0) {\n return null;\n }\n\n return (\n <Badge className=\"fk:ml-auto fk:h-5 fk:min-w-5 fk:justify-center fk:rounded-full fk:bg-amber-500/20 fk:px-1.5 fk:text-[0.6875rem] fk:text-amber-600 fk:border-none fk:corner-squircle\">\n {pendingCount > 99 ? '99+' : pendingCount.toString()}\n </Badge>\n );\n}\n\n/** Open items that wait on the viewer; falls back to the unread count when nothing waits. */\nfunction ActivityBadge(): JSX.Element | null {\n const { currentProjectId } = useConfig();\n const data = useActivitySummary(currentProjectId);\n const needsAction = data?.needsActionCount ?? 0;\n const count = needsAction > 0 ? needsAction : (data?.unreadCount ?? 0);\n\n if (count === 0) {\n return null;\n }\n\n return (\n <Badge\n className={`fk:ml-auto fk:h-5 fk:min-w-5 fk:justify-center fk:rounded-full fk:px-1.5 fk:text-[0.6875rem] fk:border-none fk:corner-squircle ${\n needsAction > 0 ? 'fk:bg-amber-500/20 fk:text-amber-600' : 'fk:bg-muted fk:text-muted-foreground'\n }`}\n >\n {count > 99 ? '99+' : count.toString()}\n </Badge>\n );\n}\n\nexport function AutomationsSidebar(): JSX.Element {\n const location = useLocation();\n const pathname = location.pathname.replace(/\\/$/, '');\n const isNewChat = pathname.endsWith('/ai/agent');\n const isRunHistory = pathname.endsWith('/ai/runs');\n const isApprovals = pathname.endsWith('/ai/approvals');\n const isActivity = pathname.endsWith('/ai/activity') || pathname.includes('/ai/activity/');\n const isPlugins = pathname.includes('/ai/plugins') || pathname.includes('/ai/skills');\n const isAutomations = pathname.includes('/ai/automations');\n const [query, setQuery] = useState('');\n const debouncedQuery = useDebouncedValue(query.trim(), SEARCH_DEBOUNCE_MS);\n\n return (\n <SidebarPanel collapsible=\"icon\" variant=\"inset\">\n <SidebarGroup className=\"fk:shrink-0 fk:pb-1.5 fk:group-data-[collapsible=icon]:hidden\">\n <SidebarGroupContent className=\"fk:relative\">\n <SearchIcon className=\"fk:absolute fk:left-2 fk:top-1/2 fk:size-3.5 fk:-translate-y-1/2 fk:text-muted-foreground\" />\n <Input\n className=\"fk:h-8 fk:bg-background fk:pl-7 fk:pr-7 fk:text-sm\"\n placeholder=\"Search chats...\"\n value={query}\n onChange={(event) => setQuery(event.target.value)}\n />\n {query ? (\n <button\n aria-label=\"Clear search\"\n className=\"fk:absolute fk:right-2 fk:top-1/2 fk:-translate-y-1/2 fk:cursor-pointer fk:text-muted-foreground fk:hover:text-foreground\"\n type=\"button\"\n onClick={() => setQuery('')}\n >\n <XIcon className=\"fk:size-3.5\" />\n </button>\n ) : null}\n </SidebarGroupContent>\n </SidebarGroup>\n <SidebarContent>\n <SidebarGroup>\n <SidebarMenu>\n <SidebarMenuItem>\n <SidebarMenuButton asChild isActive={isNewChat} tooltip=\"New chat\">\n <NavLinkCompat to=\"agent\">\n <SquarePenIcon className=\"fk:h-4 fk:w-4\" strokeWidth={2} />\n <span>New chat</span>\n </NavLinkCompat>\n </SidebarMenuButton>\n </SidebarMenuItem>\n <SidebarMenuItem>\n <SidebarMenuButton asChild isActive={isActivity} tooltip=\"Activity\">\n <NavLinkCompat to=\"activity\">\n <BellIcon className=\"fk:h-4 fk:w-4\" strokeWidth={2} />\n <span>Activity</span>\n <ActivityBadge />\n </NavLinkCompat>\n </SidebarMenuButton>\n </SidebarMenuItem>\n <SidebarMenuItem>\n <SidebarMenuButton asChild isActive={isAutomations} tooltip=\"Automations\">\n <NavLinkCompat to=\"automations\">\n <BotIcon className=\"fk:h-4 fk:w-4\" strokeWidth={2} />\n <span>Automations</span>\n </NavLinkCompat>\n </SidebarMenuButton>\n </SidebarMenuItem>\n <SidebarMenuItem>\n <SidebarMenuButton asChild isActive={isRunHistory} tooltip=\"Run History\">\n <NavLinkCompat to=\"runs\">\n <HistoryIcon className=\"fk:h-4 fk:w-4\" strokeWidth={2} />\n <span>Run History</span>\n </NavLinkCompat>\n </SidebarMenuButton>\n </SidebarMenuItem>\n <SidebarMenuItem>\n <SidebarMenuButton asChild isActive={isApprovals} tooltip=\"Approvals\">\n <NavLinkCompat to=\"approvals\">\n <InboxIcon className=\"fk:h-4 fk:w-4\" strokeWidth={2} />\n <span>Approvals</span>\n <PendingApprovalsBadge />\n </NavLinkCompat>\n </SidebarMenuButton>\n </SidebarMenuItem>\n <SidebarMenuItem>\n <SidebarMenuButton asChild isActive={isPlugins} tooltip=\"Plugins\">\n <NavLinkCompat to=\"plugins\">\n <PlugIcon className=\"fk:size-4\" />\n <span>Plugins</span>\n </NavLinkCompat>\n </SidebarMenuButton>\n </SidebarMenuItem>\n </SidebarMenu>\n </SidebarGroup>\n <SidebarGroup className=\"fk:mt-4 fk:group-data-[collapsible=icon]:hidden\">\n <SidebarGroupContent>\n <AgentChatsSection query={debouncedQuery} />\n </SidebarGroupContent>\n </SidebarGroup>\n </SidebarContent>\n <SidebarRail />\n </SidebarPanel>\n );\n}\n","import type { JSX } from 'react';\nimport { Outlet } from 'react-router-dom';\nimport { useConfig } from '../../core/config/config-context';\nimport { SidebarInset, SidebarProvider } from '../../ui';\nimport { AutomationsSidebar } from './sidebar';\n\nconst SIDEBAR_COOKIE_NAME = 'flexkit:sidebar:state';\n\nexport function Root(): JSX.Element {\n const { currentProjectId } = useConfig();\n const defaultOpen =\n document.cookie\n .split('; ')\n .find((row) => row.startsWith(`${SIDEBAR_COOKIE_NAME}=`))\n ?.split('=')[1] !== 'false';\n\n if (!currentProjectId) {\n return (\n <main className=\"fk:flex fk:h-full fk:flex-1 fk:items-center fk:justify-center fk:p-8 fk:text-sm fk:text-muted-foreground\">\n Select a project to manage automations and skills.\n </main>\n );\n }\n\n return (\n <SidebarProvider className=\"fk:h-full\" defaultOpen={defaultOpen}>\n <AutomationsSidebar />\n <SidebarInset className=\"fk:min-w-0\">\n <div className=\"fk:flex fk:h-full fk:min-h-0 fk:min-w-0 fk:flex-col fk:overflow-hidden fk:pl-4 fk:pt-3\">\n <div className=\"fk:flex fk:min-h-0 fk:min-w-0 fk:flex-1 fk:flex-col\">\n <Outlet />\n </div>\n </div>\n </SidebarInset>\n </SidebarProvider>\n );\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/apps/ai/sidebar.tsx","../src/apps/ai/root.tsx"],"names":["SEARCH_DEBOUNCE_MS","NavLinkCompat","NavLink","PendingApprovalsBadge","currentProjectId","useConfig","data","useSWR","paths","fetcher","pendingCount","jsx","Badge","ActivityBadge","useActivitySummary","needsAction","count","AutomationsSidebar","pathname","useLocation","isNewChat","isRunHistory","isApprovals","isActivity","isPlugins","isAutomations","query","setQuery","useState","debouncedQuery","useDebouncedValue","jsxs","Sidebar","SidebarGroup","SidebarGroupContent","SearchIcon","Input","event","XIcon","SidebarContent","SidebarMenu","SidebarMenuItem","SidebarMenuButton","SquarePenIcon","BellIcon","BotIcon","HistoryIcon","InboxIcon","PlugIcon","AgentChatsSection","SidebarRail","SIDEBAR_COOKIE_NAME","Root","defaultOpen","row","SidebarProvider","SidebarInset","Outlet"],"mappings":"8zBAuBA,IAAMA,CAAAA,CAAqB,GAAA,CAErBC,EAAgBC,OAAAA,CAKtB,SAASC,CAAAA,EAA4C,CACnD,GAAM,CAAE,gBAAA,CAAAC,CAAiB,CAAA,CAAIC,GAAU,CACjC,CAAE,IAAA,CAAAC,CAAK,CAAA,CAAIC,GAAAA,CACfH,CAAAA,CAAmBI,CAAAA,CAAMJ,CAAgB,CAAA,CAAE,cAAA,CAAiB,IAAA,CAC5DK,GAAAA,CACA,CAAE,eAAA,CAAiB,GAAO,CAC5B,CAAA,CACMC,EAAeJ,CAAAA,EAAM,YAAA,EAAgB,CAAA,CAE3C,OAAII,CAAAA,GAAiB,CAAA,CACZ,IAAA,CAIPC,GAAAA,CAACC,IAAA,CAAM,SAAA,CAAU,qKAAA,CACd,QAAA,CAAAF,EAAe,EAAA,CAAK,KAAA,CAAQA,CAAAA,CAAa,QAAA,GAC5C,CAEJ,CAGA,SAASG,CAAAA,EAAoC,CAC3C,GAAM,CAAE,gBAAA,CAAAT,GAAiB,CAAA,CAAIC,CAAAA,EAAU,CACjCC,CAAAA,CAAOQ,EAAmBV,GAAgB,CAAA,CAC1CW,CAAAA,CAAcT,CAAAA,EAAM,kBAAoB,CAAA,CACxCU,GAAAA,CAAQD,CAAAA,CAAc,CAAA,CAAIA,CAAAA,CAAeT,CAAAA,EAAM,WAAA,EAAe,CAAA,CAEpE,OAAIU,GAAAA,GAAU,CAAA,CACL,IAAA,CAIPL,GAAAA,CAACC,IAAA,CACC,SAAA,CAAW,CAAA,+HAAA,EACTG,CAAAA,CAAc,E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AAK/C,CAAAA,CASH2B,IAAAA,CAACwB,EAAA,CAAgB,SAAA,CAAU,WAAA,CAAY,WAAA,CAAaF,CAAAA,CAClD,QAAA,CAAA,CAAA1C,GAAAA,CAACM,CAAAA,CAAA,EAAmB,CAAA,CACpBN,GAAAA,CAAC6C,CAAAA,CAAA,CAAa,UAAU,YAAA,CACtB,QAAA,CAAA7C,GAAAA,CAAC,KAAA,CAAA,CAAI,UAAU,wFAAA,CACb,QAAA,CAAAA,GAAAA,CAAC,KAAA,CAAA,CAAI,UAAU,qDAAA,CACb,QAAA,CAAAA,GAAAA,CAAC8C,MAAAA,CAAA,EAAO,CAAA,CACV,CAAA,CACF,CAAA,CACF,CAAA,CAAA,CACF,EAhBE9C,GAAAA,CAAC,MAAA,CAAA,CAAK,SAAA,CAAU,0GAAA,CAA2G,8DAE3H,CAgBN","file":"root-ZF62TR5Z.js","sourcesContent":["import type { JSX } from 'react';\nimport { useState } from 'react';\nimport { BellIcon, BotIcon, PlugIcon, HistoryIcon, InboxIcon, SearchIcon, SquarePenIcon, XIcon } from 'lucide-react';\nimport { NavLink, useLocation } from 'react-router-dom';\nimport useSWR from 'swr';\nimport { useConfig } from '../../core/config/config-context';\nimport {\n Badge,\n Input,\n SidebarContent,\n SidebarGroup,\n SidebarGroupContent,\n SidebarMenu,\n SidebarMenuButton,\n SidebarMenuItem,\n SidebarPanel,\n SidebarRail,\n} from '../../ui';\nimport { fetcher, paths } from './api';\nimport { useActivitySummary } from './activity-nav-button';\nimport { AgentChatsSection, useDebouncedValue } from './agent/chat-list';\nimport type { AutomationApprovals } from './types';\n\nconst SEARCH_DEBOUNCE_MS = 300;\n\nconst NavLinkCompat = NavLink as unknown as React.ComponentType<{\n children?: React.ReactNode;\n to: string;\n}>;\n\nfunction PendingApprovalsBadge(): JSX.Element | null {\n const { currentProjectId } = useConfig();\n const { data } = useSWR<AutomationApprovals>(\n currentProjectId ? paths(currentProjectId).approvalsCount : null,\n fetcher,\n { refreshInterval: 30_000 }\n );\n const pendingCount = data?.pendingCount ?? 0;\n\n if (pendingCount === 0) {\n return null;\n }\n\n return (\n <Badge className=\"fk:ml-auto fk:h-5 fk:min-w-5 fk:justify-center fk:rounded-full fk:bg-amber-500/20 fk:px-1.5 fk:text-[0.6875rem] fk:text-amber-600 fk:border-none fk:corner-squircle\">\n {pendingCount > 99 ? '99+' : pendingCount.toString()}\n </Badge>\n );\n}\n\n/** Open items that wait on the viewer; falls back to the unread count when nothing waits. */\nfunction ActivityBadge(): JSX.Element | null {\n const { currentProjectId } = useConfig();\n const data = useActivitySummary(currentProjectId);\n const needsAction = data?.needsActionCount ?? 0;\n const count = needsAction > 0 ? needsAction : (data?.unreadCount ?? 0);\n\n if (count === 0) {\n return null;\n }\n\n return (\n <Badge\n className={`fk:ml-auto fk:h-5 fk:min-w-5 fk:justify-center fk:rounded-full fk:px-1.5 fk:text-[0.6875rem] fk:border-none fk:corner-squircle ${\n needsAction > 0 ? 'fk:bg-amber-500/20 fk:text-amber-600' : 'fk:bg-muted fk:text-muted-foreground'\n }`}\n >\n {count > 99 ? '99+' : count.toString()}\n </Badge>\n );\n}\n\nexport function AutomationsSidebar(): JSX.Element {\n const location = useLocation();\n const pathname = location.pathname.replace(/\\/$/, '');\n const isNewChat = pathname.endsWith('/ai/agent');\n const isRunHistory = pathname.endsWith('/ai/runs');\n const isApprovals = pathname.endsWith('/ai/approvals');\n const isActivity = pathname.endsWith('/ai/activity') || pathname.includes('/ai/activity/');\n const isPlugins = pathname.includes('/ai/plugins') || pathname.includes('/ai/skills');\n const isAutomations = pathname.includes('/ai/automations');\n const [query, setQuery] = useState('');\n const debouncedQuery = useDebouncedValue(query.trim(), SEARCH_DEBOUNCE_MS);\n\n return (\n <SidebarPanel collapsible=\"icon\" variant=\"inset\">\n <SidebarGroup className=\"fk:shrink-0 fk:pb-1.5 fk:group-data-[collapsible=icon]:hidden\">\n <SidebarGroupContent className=\"fk:relative\">\n <SearchIcon className=\"fk:absolute fk:left-2 fk:top-1/2 fk:size-3.5 fk:-translate-y-1/2 fk:text-muted-foreground\" />\n <Input\n className=\"fk:h-8 fk:bg-background fk:pl-7 fk:pr-7 fk:text-sm\"\n placeholder=\"Search chats...\"\n value={query}\n onChange={(event) => setQuery(event.target.value)}\n />\n {query ? (\n <button\n aria-label=\"Clear search\"\n className=\"fk:absolute fk:right-2 fk:top-1/2 fk:-translate-y-1/2 fk:cursor-pointer fk:text-muted-foreground fk:hover:text-foreground\"\n type=\"button\"\n onClick={() => setQuery('')}\n >\n <XIcon className=\"fk:size-3.5\" />\n </button>\n ) : null}\n </SidebarGroupContent>\n </SidebarGroup>\n <SidebarContent>\n <SidebarGroup>\n <SidebarMenu>\n <SidebarMenuItem>\n <SidebarMenuButton asChild isActive={isNewChat} tooltip=\"New chat\">\n <NavLinkCompat to=\"agent\">\n <SquarePenIcon className=\"fk:h-4 fk:w-4\" strokeWidth={2} />\n <span>New chat</span>\n </NavLinkCompat>\n </SidebarMenuButton>\n </SidebarMenuItem>\n <SidebarMenuItem>\n <SidebarMenuButton asChild isActive={isActivity} tooltip=\"Activity\">\n <NavLinkCompat to=\"activity\">\n <BellIcon className=\"fk:h-4 fk:w-4\" strokeWidth={2} />\n <span>Activity</span>\n <ActivityBadge />\n </NavLinkCompat>\n </SidebarMenuButton>\n </SidebarMenuItem>\n <SidebarMenuItem>\n <SidebarMenuButton asChild isActive={isAutomations} tooltip=\"Automations\">\n <NavLinkCompat to=\"automations\">\n <BotIcon className=\"fk:h-4 fk:w-4\" strokeWidth={2} />\n <span>Automations</span>\n </NavLinkCompat>\n </SidebarMenuButton>\n </SidebarMenuItem>\n <SidebarMenuItem>\n <SidebarMenuButton asChild isActive={isRunHistory} tooltip=\"Run History\">\n <NavLinkCompat to=\"runs\">\n <HistoryIcon className=\"fk:h-4 fk:w-4\" strokeWidth={2} />\n <span>Run History</span>\n </NavLinkCompat>\n </SidebarMenuButton>\n </SidebarMenuItem>\n <SidebarMenuItem>\n <SidebarMenuButton asChild isActive={isApprovals} tooltip=\"Approvals\">\n <NavLinkCompat to=\"approvals\">\n <InboxIcon className=\"fk:h-4 fk:w-4\" strokeWidth={2} />\n <span>Approvals</span>\n <PendingApprovalsBadge />\n </NavLinkCompat>\n </SidebarMenuButton>\n </SidebarMenuItem>\n <SidebarMenuItem>\n <SidebarMenuButton asChild isActive={isPlugins} tooltip=\"Plugins\">\n <NavLinkCompat to=\"plugins\">\n <PlugIcon className=\"fk:size-4\" />\n <span>Plugins</span>\n </NavLinkCompat>\n </SidebarMenuButton>\n </SidebarMenuItem>\n </SidebarMenu>\n </SidebarGroup>\n <SidebarGroup className=\"fk:mt-4 fk:group-data-[collapsible=icon]:hidden\">\n <SidebarGroupContent>\n <AgentChatsSection query={debouncedQuery} />\n </SidebarGroupContent>\n </SidebarGroup>\n </SidebarContent>\n <SidebarRail />\n </SidebarPanel>\n );\n}\n","import type { JSX } from 'react';\nimport { Outlet } from 'react-router-dom';\nimport { useConfig } from '../../core/config/config-context';\nimport { SidebarInset, SidebarProvider } from '../../ui';\nimport { AutomationsSidebar } from './sidebar';\n\nconst SIDEBAR_COOKIE_NAME = 'flexkit:sidebar:state';\n\nexport function Root(): JSX.Element {\n const { currentProjectId } = useConfig();\n const defaultOpen =\n document.cookie\n .split('; ')\n .find((row) => row.startsWith(`${SIDEBAR_COOKIE_NAME}=`))\n ?.split('=')[1] !== 'false';\n\n if (!currentProjectId) {\n return (\n <main className=\"fk:flex fk:h-full fk:flex-1 fk:items-center fk:justify-center fk:p-8 fk:text-sm fk:text-muted-foreground\">\n Select a project to manage automations and skills.\n </main>\n );\n }\n\n return (\n <SidebarProvider className=\"fk:h-full\" defaultOpen={defaultOpen}>\n <AutomationsSidebar />\n <SidebarInset className=\"fk:min-w-0\">\n <div className=\"fk:flex fk:h-full fk:min-h-0 fk:min-w-0 fk:flex-col fk:overflow-hidden fk:pl-4 fk:pt-3\">\n <div className=\"fk:flex fk:min-h-0 fk:min-w-0 fk:flex-1 fk:flex-col\">\n <Outlet />\n </div>\n </div>\n </SidebarInset>\n </SidebarProvider>\n );\n}\n"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import'./index.css';import {a}from'./chunk-W7Z4MY43.js';import'./chunk-P6BZ4QP7.js';import'./chunk-XWBACTNR.js';import'./chunk-2HYQVMP3.js';import'./chunk-5CVDMZUI.js';import {z,m,w,q,p,r,t,b as b$1}from'./chunk-32ZU4MLE.js';import {a as a$1,d,c,e,g}from'./chunk-HDOIOXMP.js';import'./chunk-U45E5X3H.js';import {b}from'./chunk-6NRQMG26.js';import {a as a$2}from'./chunk-O2QMYUPS.js';import {useState,useMemo,useRef}from'react';import {LoaderCircle,Search,X}from'lucide-react';import {Command}from'cmdk';import {useNavigate}from'react-router-dom';import {jsxs,jsx}from'react/jsx-runtime';var i="all";function ee(t){let n=t.replace(/([A-Z])/g," $1");return n.charAt(0).toUpperCase()+n.slice(1).trim()}function re(t){return t.filter(n=>n.attributes.some(a=>a.searchable))}function te(t,n){return n===i?t.map(a=>a.plural):t.filter(a=>a.plural===n).map(a=>a.plural)}function ne(t,n){return n===i?i:t.some(a=>a.plural===n)?n:i}function ae(t,n){return {searchRequests:{searches:t.map(a=>({collection:a}))},commonParams:{q:n}}}function oe(t){return t.menu?.label??ee(t.plural)}function be({onSelect:t$1,searchPlaceholder:n="Search...",noResultsMsg:a$3="Nothing found",className:_,onSearchChange:y,projectId:V,schema:v}){let[D,l]=useState(false),[s,S]=useState(""),[G,M]=useState(i),f=useMemo(()=>re(v),[v]),m$1=ne(f,G),C=useMemo(()=>te(f,m$1),[f,m$1]),X$1=useMemo(()=>ae(C,s),[C,s]),c$1=useRef(null),{results:k,isLoading:d$1}=a(V,X$1),j=D&&(k.length>0||!d$1),z$1=useNavigate();function F(e){S(e),e.length>0&&l(true),e.length===0&&l(false),y&&y(e);}function J(e){M(e),s.length>0&&l(true);}function U(){S(""),l(false),c$1.current&&(c$1.current.value="");let e=new URL(window.location.href);e.searchParams.has("id")&&(e.searchParams.delete("id"),z$1(e.pathname+e.search));}return jsxs(z,{children:[jsxs(a$1,{onValueChange:J,value:m$1,children:[jsx(d,{"aria-label":"Filter search by entity",className:"fk:w-36 fk:h-9 fk:py-1 fk:rounded-r-none fk:border-border fk:shadow-none fk:corner-squircle",children:jsx(c,{})}),jsxs(e,{children:[jsx(g,{value:i,children:"All"}),f.map(e=>jsx(g,{value:e.plural,children:oe(e)},e.plural))]})]}),jsxs(m,{className:"fk:relative fk:overflow-visible fk:h-auto fk:justify-center fk:rounded-none fk:bg-transparent fk:corner-squircle",onBlur:()=>{setTimeout(()=>{l(false);},300);},onKeyDown:e=>{e.key==="Escape"&&(e.preventDefault(),l(false));},shouldFilter:false,children:[jsxs("div",{className:a$2("fk:flex fk:items-center fk:border-y fk:border-r fk:border-border fk:rounded-r-md fk:bg-background fk:pl-3 fk:pr-2 fk:h-9 fk:md:w-25 fk:lg:w-75 fk:corner-squircle","fk:outline-none fk:transition-[color,box-shadow] fk:has-[input:focus-visible]:border-ring fk:has-[input:focus-visible]:ring-[3px] fk:has-[input:focus-visible]:ring-ring/50"),children:[d$1?jsx(LoaderCircle,{className:"fk:mr-2 fk:h-4 fk:w-4 fk:shrink-0 fk:opacity-50 fk:animate-spin"}):jsx(Search,{className:"fk:mr-2 fk:h-4 fk:w-4 fk:shrink-0 fk:opacity-50"}),jsx(Command.Input,{className:a$2("fk:flex fk:h-9 fk:w-full fk:rounded-none fk:bg-transparent fk:py-1 fk:text-sm fk:outline-hidden fk:placeholder:text-muted-foreground fk:disabled:cursor-not-allowed fk:disabled:opacity-50 fk:corner-squircle",_),placeholder:n,onMouseDown:()=>{(c$1.current?.value.length??0)>0&&l(true);},onValueChange:F,ref:c$1,value:s}),s&&jsx(b,{"aria-label":"Clear search",className:"fk:flex fk:items-center fk:justify-center fk:ml-2 fk:h-6 fk:w-6 fk:text-muted-foreground fk:hover:text-foreground fk:hover:bg-foreground/10 fk:cursor-pointer fk:rounded-full fk:bg-transparent fk:corner-squircle",onClick:U,type:"button",children:jsx(X,{className:"fk:h-4 fk:w-4"})})]}),jsx("div",{className:"fk:relative fk:max-w-150",children:jsx("div",{className:a$2("fk:mt-1 fk:animate-in fk:fade-in-0 fk:zoom-in-95 fk:absolute fk:top-0 fk:z-50 fk:w-full fk:rounded-md fk:bg-popover fk:outline-hidden fk:drop-shadow-md fk:border fk:border-border fk:corner-squircle",j?"fk:block":"fk:hidden"),children:jsxs(w,{className:"fk:max-h-55 fk:overflow-auto",children:[!d$1&&jsx(q,{children:a$3}),jsx(p,{children:jsxs(r,{children:[k.length>0&&jsx(t,{"aria-hidden":"true",className:"fk:hidden!",value:"-"}),k.map(e=>jsxs(t,{className:"fk:flex",value:e._id,onSelect:H=>{t$1({entityName:e._entityName,entityNamePlural:e._entityNamePlural,entityId:H});},children:[jsx("span",{className:"fk:basis-full",children:e[Object.keys(e)[3]]}),jsx(b$1,{className:"fk:py-px fk:text-[0.6875rem] fk:leading-3 fk:bg-teal-400",children:e._entityName})]},e._id))]})})]})})})]})]})}export{be as Search};//# sourceMappingURL=search-QHMCAT7O.js.map
|
|
2
|
+
//# sourceMappingURL=search-QHMCAT7O.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/ui/components/search.tsx"],"names":["ALL_COLLECTIONS","capitalize","str","withSpaces","getSearchableEntities","schema","entity","attr","getCollections","entities","selectedCollection","resolveCollection","buildSearchRequest","collections","q","collection","entityLabel","Search","onSelect","searchPlaceholder","noResultsMsg","className","onSearchChange","projectId","isOpen","setIsOpen","useState","inputValue","setInputValue","setSelectedCollection","searchableEntities","useMemo","resolvedCollection","searchQuery","inputRef","useRef","results","isLoading","useSearch","showDropdown","navigate","useNavigate","handleOnSearchChange","handleEntityChange","value","handleClear","url","jsxs","ButtonGroup","Select","jsx","SelectTrigger","SelectValue","SelectContent","SelectItem","Command","cn","LoaderCircle","SearchIcon","CommandPrimitive","Button","XIcon","ScrollArea","CommandEmpty","CommandList","CommandGroup","CommandItem","item","entityId","Badge"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AAK,GAUZ,CACD,CAAA,CAAA,CACH,EACF,CAAA,CAAA,CACF,CAAA,CACF,CAAA,CACF,CAAA,CAAA,CACF,GACF,CAEJ","file":"search-OWF3LEWH.js","sourcesContent":["'use client';\n\nimport { useRef, useState, useMemo } from 'react';\nimport type { JSX } from 'react';\nimport { LoaderCircle, Search as SearchIcon, X as XIcon } from 'lucide-react';\nimport { Command as CommandPrimitive } from 'cmdk';\nimport { useNavigate } from 'react-router-dom';\nimport { useSearch } from '../../core/use-search';\nimport { cn } from '../lib/utils';\nimport { Badge } from '../primitives/badge';\nimport { Button } from '../primitives/button';\nimport { ButtonGroup } from '../primitives/button-group';\nimport { Command, CommandEmpty, CommandGroup, CommandItem, CommandList } from '../primitives/command';\nimport { ScrollArea } from '../primitives/scroll-area';\nimport { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '../primitives/select';\nimport type { Entity, SearchRequestProps } from '../../core/types';\n\nexport type ComboBoxItemType = {\n value: string;\n label: string;\n};\n\nexport interface SearchProps {\n onSelect: ({\n entityName,\n entityNamePlural,\n entityId,\n }: {\n entityName: string;\n entityNamePlural: string;\n entityId: string;\n }) => void;\n searchPlaceholder?: string;\n noResultsMsg?: string;\n className?: string;\n onSearchChange?: (e: string) => void;\n projectId: string;\n schema: Entity[];\n}\n\nconst ALL_COLLECTIONS = 'all';\n\nfunction capitalize(str: string): string {\n const withSpaces = str.replace(/([A-Z])/g, ' $1');\n\n return withSpaces.charAt(0).toUpperCase() + withSpaces.slice(1).trim();\n}\n\nfunction getSearchableEntities(schema: Entity[]): Entity[] {\n return schema.filter((entity) => entity.attributes.some((attr) => attr.searchable));\n}\n\nfunction getCollections(entities: Entity[], selectedCollection: string): string[] {\n if (selectedCollection === ALL_COLLECTIONS) {\n return entities.map((entity) => entity.plural);\n }\n\n return entities.filter((entity) => entity.plural === selectedCollection).map((entity) => entity.plural);\n}\n\nfunction resolveCollection(entities: Entity[], selectedCollection: string): string {\n if (selectedCollection === ALL_COLLECTIONS) {\n return ALL_COLLECTIONS;\n }\n\n if (entities.some((entity) => entity.plural === selectedCollection)) {\n return selectedCollection;\n }\n\n return ALL_COLLECTIONS;\n}\n\nfunction buildSearchRequest(collections: string[], q: string): SearchRequestProps {\n return {\n searchRequests: {\n searches: collections.map((collection) => ({\n collection,\n })),\n },\n commonParams: {\n q,\n },\n };\n}\n\nfunction entityLabel(entity: Entity): string {\n return entity.menu?.label ?? capitalize(entity.plural);\n}\n\nexport function Search({\n onSelect,\n searchPlaceholder = 'Search...',\n noResultsMsg = 'Nothing found',\n className,\n onSearchChange,\n projectId,\n schema,\n}: SearchProps): JSX.Element {\n const [isOpen, setIsOpen] = useState(false);\n const [inputValue, setInputValue] = useState('');\n const [selectedCollection, setSelectedCollection] = useState(ALL_COLLECTIONS);\n const searchableEntities = useMemo(() => getSearchableEntities(schema), [schema]);\n const resolvedCollection = resolveCollection(searchableEntities, selectedCollection);\n const collections = useMemo(\n () => getCollections(searchableEntities, resolvedCollection),\n [searchableEntities, resolvedCollection]\n );\n const searchQuery = useMemo(() => buildSearchRequest(collections, inputValue), [collections, inputValue]);\n const inputRef = useRef<HTMLInputElement>(null);\n const { results, isLoading } = useSearch(projectId, searchQuery);\n const showDropdown = isOpen && (results.length > 0 || !isLoading);\n const navigate = useNavigate();\n\n function handleOnSearchChange(q: string): void {\n setInputValue(q);\n // TODO: Add debounce\n if (q.length > 0) {\n setIsOpen(true);\n }\n\n if (q.length === 0) {\n setIsOpen(false);\n }\n\n if (onSearchChange) {\n onSearchChange(q);\n }\n }\n\n function handleEntityChange(value: string): void {\n setSelectedCollection(value);\n\n if (inputValue.length > 0) {\n setIsOpen(true);\n }\n }\n\n function handleClear(): void {\n setInputValue('');\n setIsOpen(false);\n\n if (inputRef.current) {\n inputRef.current.value = '';\n }\n\n // Remove id from URL if present\n const url = new URL(window.location.href);\n\n if (url.searchParams.has('id')) {\n url.searchParams.delete('id');\n navigate(url.pathname + url.search);\n }\n }\n\n // TODO: handle error\n\n return (\n <ButtonGroup>\n <Select onValueChange={handleEntityChange} value={resolvedCollection}>\n <SelectTrigger\n aria-label=\"Filter search by entity\"\n className=\"fk:w-36 fk:h-9 fk:py-1 fk:rounded-r-none fk:border-border fk:shadow-none fk:corner-squircle\"\n >\n <SelectValue />\n </SelectTrigger>\n <SelectContent>\n <SelectItem value={ALL_COLLECTIONS}>All</SelectItem>\n {searchableEntities.map((entity) => (\n <SelectItem key={entity.plural} value={entity.plural}>\n {entityLabel(entity)}\n </SelectItem>\n ))}\n </SelectContent>\n </Select>\n <Command\n className=\"fk:relative fk:overflow-visible fk:h-auto fk:justify-center fk:rounded-none fk:bg-transparent fk:corner-squircle\"\n onBlur={() => {\n // close after a delay to allow any click event from the results list to be handled\n setTimeout(() => {\n setIsOpen(false);\n }, 300);\n }}\n onKeyDown={(e) => {\n if (e.key === 'Escape') {\n e.preventDefault();\n setIsOpen(false);\n }\n }}\n shouldFilter={false}\n >\n <div\n className={cn(\n 'fk:flex fk:items-center fk:border-y fk:border-r fk:border-border fk:rounded-r-md fk:bg-background fk:pl-3 fk:pr-2 fk:h-9 fk:md:w-25 fk:lg:w-75 fk:corner-squircle',\n 'fk:outline-none fk:transition-[color,box-shadow] fk:has-[input:focus-visible]:border-ring fk:has-[input:focus-visible]:ring-[3px] fk:has-[input:focus-visible]:ring-ring/50'\n )}\n >\n {isLoading ? (\n <LoaderCircle className=\"fk:mr-2 fk:h-4 fk:w-4 fk:shrink-0 fk:opacity-50 fk:animate-spin\" />\n ) : (\n <SearchIcon className=\"fk:mr-2 fk:h-4 fk:w-4 fk:shrink-0 fk:opacity-50\" />\n )}\n <CommandPrimitive.Input\n className={cn(\n 'fk:flex fk:h-9 fk:w-full fk:rounded-none fk:bg-transparent fk:py-1 fk:text-sm fk:outline-hidden fk:placeholder:text-muted-foreground fk:disabled:cursor-not-allowed fk:disabled:opacity-50 fk:corner-squircle',\n className\n )}\n placeholder={searchPlaceholder}\n onMouseDown={() => {\n if ((inputRef.current?.value.length ?? 0) > 0) setIsOpen(true);\n }}\n onValueChange={handleOnSearchChange}\n ref={inputRef}\n value={inputValue}\n />\n {inputValue && (\n <Button\n aria-label=\"Clear search\"\n className=\"fk:flex fk:items-center fk:justify-center fk:ml-2 fk:h-6 fk:w-6 fk:text-muted-foreground fk:hover:text-foreground fk:hover:bg-foreground/10 fk:cursor-pointer fk:rounded-full fk:bg-transparent fk:corner-squircle\"\n onClick={handleClear}\n type=\"button\"\n >\n <XIcon className=\"fk:h-4 fk:w-4\" />\n </Button>\n )}\n </div>\n <div className=\"fk:relative fk:max-w-150\">\n <div\n className={cn(\n 'fk:mt-1 fk:animate-in fk:fade-in-0 fk:zoom-in-95 fk:absolute fk:top-0 fk:z-50 fk:w-full fk:rounded-md fk:bg-popover fk:outline-hidden fk:drop-shadow-md fk:border fk:border-border fk:corner-squircle',\n showDropdown ? 'fk:block' : 'fk:hidden'\n )}\n >\n <ScrollArea className=\"fk:max-h-55 fk:overflow-auto\">\n {!isLoading && <CommandEmpty>{noResultsMsg}</CommandEmpty>}\n <CommandList>\n <CommandGroup>\n {results.length > 0 && <CommandItem aria-hidden=\"true\" className=\"fk:hidden!\" value=\"-\" />}\n {results.map((item) => (\n <CommandItem\n className=\"fk:flex\"\n key={item._id}\n value={item._id}\n onSelect={(entityId) => {\n onSelect({ entityName: item._entityName, entityNamePlural: item._entityNamePlural, entityId });\n }}\n >\n <span className=\"fk:basis-full\">{item[Object.keys(item)[3]]}</span>\n <Badge className=\"fk:py-px fk:text-[0.6875rem] fk:leading-3 fk:bg-teal-400\">\n {item._entityName}\n </Badge>\n </CommandItem>\n ))}\n </CommandGroup>\n </CommandList>\n </ScrollArea>\n </div>\n </div>\n </Command>\n </ButtonGroup>\n );\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/ui/components/search.tsx"],"names":["ALL_COLLECTIONS","capitalize","str","withSpaces","getSearchableEntities","schema","entity","attr","getCollections","entities","selectedCollection","resolveCollection","buildSearchRequest","collections","q","collection","entityLabel","Search","onSelect","searchPlaceholder","noResultsMsg","className","onSearchChange","projectId","isOpen","setIsOpen","useState","inputValue","setInputValue","setSelectedCollection","searchableEntities","useMemo","resolvedCollection","searchQuery","inputRef","useRef","results","isLoading","useSearch","showDropdown","navigate","useNavigate","handleOnSearchChange","handleEntityChange","value","handleClear","url","jsxs","ButtonGroup","Select","jsx","SelectTrigger","SelectValue","SelectContent","SelectItem","Command","cn","LoaderCircle","SearchIcon","CommandPrimitive","Button","XIcon","ScrollArea","CommandEmpty","CommandList","CommandGroup","CommandItem","item","entityId","Badge"],"mappings":"2kBAwCA,IAAMA,CAAAA,CAAkB,KAAA,CAExB,SAASC,EAAAA,CAAWC,EAAqB,CACvC,IAAMC,CAAAA,CAAaD,CAAAA,CAAI,OAAA,CAAQ,UAAA,CAAY,KAAK,CAAA,CAEhD,OAAOC,CAAAA,CAAW,MAAA,CAAO,CAAC,CAAA,CAAE,aAAY,CAAIA,CAAAA,CAAW,KAAA,CAAM,CAAC,EAAE,IAAA,EAClE,CAEA,SAASC,GAAsBC,CAAAA,CAA4B,CACzD,OAAOA,CAAAA,CAAO,OAAQC,CAAAA,EAAWA,CAAAA,CAAO,UAAA,CAAW,IAAA,CAAMC,GAASA,CAAAA,CAAK,UAAU,CAAC,CACpF,CAEA,SAASC,EAAAA,CAAeC,CAAAA,CAAoBC,CAAAA,CAAsC,CAChF,OAAIA,CAAAA,GAAuBV,CAAAA,CAClBS,EAAS,GAAA,CAAKH,CAAAA,EAAWA,CAAAA,CAAO,MAAM,EAGxCG,CAAAA,CAAS,MAAA,CAAQH,CAAAA,EAAWA,CAAAA,CAAO,SAAWI,CAAkB,CAAA,CAAE,GAAA,CAAKJ,CAAAA,EAAWA,CAAAA,CAAO,MAAM,CACxG,CAEA,SAASK,EAAAA,CAAkBF,CAAAA,CAAoBC,CAAAA,CAAoC,CACjF,OAAIA,CAAAA,GAAuBV,CAAAA,CAClBA,CAAAA,CAGLS,CAAAA,CAAS,KAAMH,CAAAA,EAAWA,CAAAA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BA,CAAAA,CAAK,kBAAmB,QAAA,CAAAC,CAAS,CAAC,EAC/F,CAAA,CAEA,QAAA,CAAA,CAAAlB,GAAAA,CAAC,MAAA,CAAA,CAAK,UAAU,eAAA,CAAiB,QAAA,CAAAiB,CAAAA,CAAK,MAAA,CAAO,KAAKA,CAAI,CAAA,CAAE,CAAC,CAAC,EAAE,CAAA,CAC5DjB,GAAAA,CAACmB,GAAAA,CAAA,CAAM,UAAU,0DAAA,CACd,QAAA,CAAAF,CAAAA,CAAK,WAAA,CACR,IATKA,CAAAA,CAAK,GAUZ,CACD,CAAA,CAAA,CACH,EACF,CAAA,CAAA,CACF,CAAA,CACF,CAAA,CACF,CAAA,CAAA,CACF,GACF,CAEJ","file":"search-QHMCAT7O.js","sourcesContent":["'use client';\n\nimport { useRef, useState, useMemo } from 'react';\nimport type { JSX } from 'react';\nimport { LoaderCircle, Search as SearchIcon, X as XIcon } from 'lucide-react';\nimport { Command as CommandPrimitive } from 'cmdk';\nimport { useNavigate } from 'react-router-dom';\nimport { useSearch } from '../../core/use-search';\nimport { cn } from '../lib/utils';\nimport { Badge } from '../primitives/badge';\nimport { Button } from '../primitives/button';\nimport { ButtonGroup } from '../primitives/button-group';\nimport { Command, CommandEmpty, CommandGroup, CommandItem, CommandList } from '../primitives/command';\nimport { ScrollArea } from '../primitives/scroll-area';\nimport { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '../primitives/select';\nimport type { Entity, SearchRequestProps } from '../../core/types';\n\nexport type ComboBoxItemType = {\n value: string;\n label: string;\n};\n\nexport interface SearchProps {\n onSelect: ({\n entityName,\n entityNamePlural,\n entityId,\n }: {\n entityName: string;\n entityNamePlural: string;\n entityId: string;\n }) => void;\n searchPlaceholder?: string;\n noResultsMsg?: string;\n className?: string;\n onSearchChange?: (e: string) => void;\n projectId: string;\n schema: Entity[];\n}\n\nconst ALL_COLLECTIONS = 'all';\n\nfunction capitalize(str: string): string {\n const withSpaces = str.replace(/([A-Z])/g, ' $1');\n\n return withSpaces.charAt(0).toUpperCase() + withSpaces.slice(1).trim();\n}\n\nfunction getSearchableEntities(schema: Entity[]): Entity[] {\n return schema.filter((entity) => entity.attributes.some((attr) => attr.searchable));\n}\n\nfunction getCollections(entities: Entity[], selectedCollection: string): string[] {\n if (selectedCollection === ALL_COLLECTIONS) {\n return entities.map((entity) => entity.plural);\n }\n\n return entities.filter((entity) => entity.plural === selectedCollection).map((entity) => entity.plural);\n}\n\nfunction resolveCollection(entities: Entity[], selectedCollection: string): string {\n if (selectedCollection === ALL_COLLECTIONS) {\n return ALL_COLLECTIONS;\n }\n\n if (entities.some((entity) => entity.plural === selectedCollection)) {\n return selectedCollection;\n }\n\n return ALL_COLLECTIONS;\n}\n\nfunction buildSearchRequest(collections: string[], q: string): SearchRequestProps {\n return {\n searchRequests: {\n searches: collections.map((collection) => ({\n collection,\n })),\n },\n commonParams: {\n q,\n },\n };\n}\n\nfunction entityLabel(entity: Entity): string {\n return entity.menu?.label ?? capitalize(entity.plural);\n}\n\nexport function Search({\n onSelect,\n searchPlaceholder = 'Search...',\n noResultsMsg = 'Nothing found',\n className,\n onSearchChange,\n projectId,\n schema,\n}: SearchProps): JSX.Element {\n const [isOpen, setIsOpen] = useState(false);\n const [inputValue, setInputValue] = useState('');\n const [selectedCollection, setSelectedCollection] = useState(ALL_COLLECTIONS);\n const searchableEntities = useMemo(() => getSearchableEntities(schema), [schema]);\n const resolvedCollection = resolveCollection(searchableEntities, selectedCollection);\n const collections = useMemo(\n () => getCollections(searchableEntities, resolvedCollection),\n [searchableEntities, resolvedCollection]\n );\n const searchQuery = useMemo(() => buildSearchRequest(collections, inputValue), [collections, inputValue]);\n const inputRef = useRef<HTMLInputElement>(null);\n const { results, isLoading } = useSearch(projectId, searchQuery);\n const showDropdown = isOpen && (results.length > 0 || !isLoading);\n const navigate = useNavigate();\n\n function handleOnSearchChange(q: string): void {\n setInputValue(q);\n // TODO: Add debounce\n if (q.length > 0) {\n setIsOpen(true);\n }\n\n if (q.length === 0) {\n setIsOpen(false);\n }\n\n if (onSearchChange) {\n onSearchChange(q);\n }\n }\n\n function handleEntityChange(value: string): void {\n setSelectedCollection(value);\n\n if (inputValue.length > 0) {\n setIsOpen(true);\n }\n }\n\n function handleClear(): void {\n setInputValue('');\n setIsOpen(false);\n\n if (inputRef.current) {\n inputRef.current.value = '';\n }\n\n // Remove id from URL if present\n const url = new URL(window.location.href);\n\n if (url.searchParams.has('id')) {\n url.searchParams.delete('id');\n navigate(url.pathname + url.search);\n }\n }\n\n // TODO: handle error\n\n return (\n <ButtonGroup>\n <Select onValueChange={handleEntityChange} value={resolvedCollection}>\n <SelectTrigger\n aria-label=\"Filter search by entity\"\n className=\"fk:w-36 fk:h-9 fk:py-1 fk:rounded-r-none fk:border-border fk:shadow-none fk:corner-squircle\"\n >\n <SelectValue />\n </SelectTrigger>\n <SelectContent>\n <SelectItem value={ALL_COLLECTIONS}>All</SelectItem>\n {searchableEntities.map((entity) => (\n <SelectItem key={entity.plural} value={entity.plural}>\n {entityLabel(entity)}\n </SelectItem>\n ))}\n </SelectContent>\n </Select>\n <Command\n className=\"fk:relative fk:overflow-visible fk:h-auto fk:justify-center fk:rounded-none fk:bg-transparent fk:corner-squircle\"\n onBlur={() => {\n // close after a delay to allow any click event from the results list to be handled\n setTimeout(() => {\n setIsOpen(false);\n }, 300);\n }}\n onKeyDown={(e) => {\n if (e.key === 'Escape') {\n e.preventDefault();\n setIsOpen(false);\n }\n }}\n shouldFilter={false}\n >\n <div\n className={cn(\n 'fk:flex fk:items-center fk:border-y fk:border-r fk:border-border fk:rounded-r-md fk:bg-background fk:pl-3 fk:pr-2 fk:h-9 fk:md:w-25 fk:lg:w-75 fk:corner-squircle',\n 'fk:outline-none fk:transition-[color,box-shadow] fk:has-[input:focus-visible]:border-ring fk:has-[input:focus-visible]:ring-[3px] fk:has-[input:focus-visible]:ring-ring/50'\n )}\n >\n {isLoading ? (\n <LoaderCircle className=\"fk:mr-2 fk:h-4 fk:w-4 fk:shrink-0 fk:opacity-50 fk:animate-spin\" />\n ) : (\n <SearchIcon className=\"fk:mr-2 fk:h-4 fk:w-4 fk:shrink-0 fk:opacity-50\" />\n )}\n <CommandPrimitive.Input\n className={cn(\n 'fk:flex fk:h-9 fk:w-full fk:rounded-none fk:bg-transparent fk:py-1 fk:text-sm fk:outline-hidden fk:placeholder:text-muted-foreground fk:disabled:cursor-not-allowed fk:disabled:opacity-50 fk:corner-squircle',\n className\n )}\n placeholder={searchPlaceholder}\n onMouseDown={() => {\n if ((inputRef.current?.value.length ?? 0) > 0) setIsOpen(true);\n }}\n onValueChange={handleOnSearchChange}\n ref={inputRef}\n value={inputValue}\n />\n {inputValue && (\n <Button\n aria-label=\"Clear search\"\n className=\"fk:flex fk:items-center fk:justify-center fk:ml-2 fk:h-6 fk:w-6 fk:text-muted-foreground fk:hover:text-foreground fk:hover:bg-foreground/10 fk:cursor-pointer fk:rounded-full fk:bg-transparent fk:corner-squircle\"\n onClick={handleClear}\n type=\"button\"\n >\n <XIcon className=\"fk:h-4 fk:w-4\" />\n </Button>\n )}\n </div>\n <div className=\"fk:relative fk:max-w-150\">\n <div\n className={cn(\n 'fk:mt-1 fk:animate-in fk:fade-in-0 fk:zoom-in-95 fk:absolute fk:top-0 fk:z-50 fk:w-full fk:rounded-md fk:bg-popover fk:outline-hidden fk:drop-shadow-md fk:border fk:border-border fk:corner-squircle',\n showDropdown ? 'fk:block' : 'fk:hidden'\n )}\n >\n <ScrollArea className=\"fk:max-h-55 fk:overflow-auto\">\n {!isLoading && <CommandEmpty>{noResultsMsg}</CommandEmpty>}\n <CommandList>\n <CommandGroup>\n {results.length > 0 && <CommandItem aria-hidden=\"true\" className=\"fk:hidden!\" value=\"-\" />}\n {results.map((item) => (\n <CommandItem\n className=\"fk:flex\"\n key={item._id}\n value={item._id}\n onSelect={(entityId) => {\n onSelect({ entityName: item._entityName, entityNamePlural: item._entityNamePlural, entityId });\n }}\n >\n <span className=\"fk:basis-full\">{item[Object.keys(item)[3]]}</span>\n <Badge className=\"fk:py-px fk:text-[0.6875rem] fk:leading-3 fk:bg-teal-400\">\n {item._entityName}\n </Badge>\n </CommandItem>\n ))}\n </CommandGroup>\n </CommandList>\n </ScrollArea>\n </div>\n </div>\n </Command>\n </ButtonGroup>\n );\n}\n"]}
|