@flexkit/studio 0.0.33 → 0.0.35
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/asset-3XMRPTA5.js +2 -0
- package/dist/{asset-ZVPFS73O.js.map → asset-3XMRPTA5.js.map} +1 -1
- package/dist/astro.js +2 -2
- package/dist/{chunk-JAARDXQZ.js → chunk-3VOTTOJT.js} +2 -2
- package/dist/{chunk-JAARDXQZ.js.map → chunk-3VOTTOJT.js.map} +1 -1
- package/dist/chunk-5I7Q5ODB.js +2 -0
- package/dist/chunk-5I7Q5ODB.js.map +1 -0
- package/dist/chunk-6NRQMG26.js +2 -0
- package/dist/chunk-6NRQMG26.js.map +1 -0
- package/dist/{chunk-VHNQDP7Q.js → chunk-6V73336R.js} +10 -3
- package/dist/{chunk-OEWYLKO7.js → chunk-7BOX7HHO.js} +2 -2
- package/dist/{chunk-OEWYLKO7.js.map → chunk-7BOX7HHO.js.map} +1 -1
- package/dist/chunk-7JFLGBWE.js +2 -0
- package/dist/{chunk-F2ILIHAU.js.map → chunk-7JFLGBWE.js.map} +1 -1
- package/dist/{chunk-XFY7MZJN.js → chunk-AICNS7KW.js} +2 -2
- package/dist/{chunk-XFY7MZJN.js.map → chunk-AICNS7KW.js.map} +1 -1
- package/dist/chunk-CCXRYZ5I.js +2 -0
- package/dist/chunk-CCXRYZ5I.js.map +1 -0
- package/dist/chunk-FLT6RWXH.js +2 -0
- package/dist/{chunk-GFDWGYUR.js.map → chunk-FLT6RWXH.js.map} +1 -1
- package/dist/{chunk-FVFRTCEB.js → chunk-GBM7VKFS.js} +2 -2
- package/dist/{chunk-FVFRTCEB.js.map → chunk-GBM7VKFS.js.map} +1 -1
- package/dist/chunk-HDOIOXMP.js +2 -0
- package/dist/chunk-HDOIOXMP.js.map +1 -0
- package/dist/chunk-HMMBYXYA.js +2 -0
- package/dist/{chunk-JCHD4EGB.js.map → chunk-HMMBYXYA.js.map} +1 -1
- package/dist/chunk-IRY4KWB5.js +2 -0
- package/dist/chunk-IRY4KWB5.js.map +1 -0
- package/dist/{chunk-MLYKIVZC.js → chunk-JH4MVD36.js} +2 -2
- package/dist/{chunk-MLYKIVZC.js.map → chunk-JH4MVD36.js.map} +1 -1
- package/dist/{chunk-AEBTHXEP.js → chunk-JKHUO27E.js} +2 -2
- package/dist/{chunk-AEBTHXEP.js.map → chunk-JKHUO27E.js.map} +1 -1
- package/dist/{chunk-2OBWJ6UY.js → chunk-LIV5RBWJ.js} +2 -2
- package/dist/chunk-LIV5RBWJ.js.map +1 -0
- package/dist/{chunk-CCI3FGPF.js → chunk-PENRGDNC.js} +2 -2
- package/dist/{chunk-CCI3FGPF.js.map → chunk-PENRGDNC.js.map} +1 -1
- package/dist/{chunk-E7G46743.js → chunk-POQX5GIA.js} +2 -2
- package/dist/{chunk-VUAFNQK7.js → chunk-QOX3QNMM.js} +2 -2
- package/dist/{chunk-VUAFNQK7.js.map → chunk-QOX3QNMM.js.map} +1 -1
- package/dist/{chunk-KGYH74NA.js → chunk-QVBNGGOE.js} +2 -2
- package/dist/{chunk-KGYH74NA.js.map → chunk-QVBNGGOE.js.map} +1 -1
- package/dist/{chunk-D62TAYLI.js → chunk-S6MOM5G3.js} +2 -2
- package/dist/chunk-S6MOM5G3.js.map +1 -0
- package/dist/{chunk-MGXHZDFZ.js → chunk-UGRS4FEI.js} +2 -2
- package/dist/{chunk-MGXHZDFZ.js.map → chunk-UGRS4FEI.js.map} +1 -1
- package/dist/{chunk-YW2EEXMV.js → chunk-USNXQOMJ.js} +2 -2
- package/dist/{chunk-YW2EEXMV.js.map → chunk-USNXQOMJ.js.map} +1 -1
- package/dist/{chunk-N2T6MKPV.js → chunk-UWMJBBTY.js} +2 -2
- package/dist/{chunk-N2T6MKPV.js.map → chunk-UWMJBBTY.js.map} +1 -1
- package/dist/chunk-W3Z33ETA.js +2 -0
- package/dist/chunk-W3Z33ETA.js.map +1 -0
- package/dist/{chunk-ORY5DLME.js → chunk-WJ4ORIXF.js} +2 -2
- package/dist/{chunk-ORY5DLME.js.map → chunk-WJ4ORIXF.js.map} +1 -1
- package/dist/{chunk-7GBAYC7G.js → chunk-YSLN4XT6.js} +2 -2
- package/dist/{chunk-7GBAYC7G.js.map → chunk-YSLN4XT6.js.map} +1 -1
- package/dist/datetime-C55QQQJK.js +2 -0
- package/dist/{datetime-DDEWTNLB.js.map → datetime-C55QQQJK.js.map} +1 -1
- package/dist/editor-NZLXIOE7.js +2 -0
- package/dist/{editor-HAYTKNMY.js.map → editor-NZLXIOE7.js.map} +1 -1
- package/dist/index.css +35 -32
- package/dist/index.d.ts +10 -8
- package/dist/index.js +118 -122
- package/dist/index.js.map +1 -1
- package/dist/logo-MU7MGYDH.js +3 -0
- package/dist/logo-MU7MGYDH.js.map +1 -0
- package/dist/nextjs.js +2 -2
- package/dist/{project-selector-X6YVZYKL.js → project-selector-GQ24PVO6.js} +2 -2
- package/dist/{project-selector-X6YVZYKL.js.map → project-selector-GQ24PVO6.js.map} +1 -1
- package/dist/search-XKG5A7XM.js +2 -0
- package/dist/{search-FTC7ELZX.js.map → search-XKG5A7XM.js.map} +1 -1
- package/dist/select-SO3DICYX.js +2 -0
- package/dist/{select-H3JHOCWR.js.map → select-SO3DICYX.js.map} +1 -1
- package/dist/switch-SU3OIXL6.js +2 -0
- package/dist/{switch-TACKLQJH.js.map → switch-SU3OIXL6.js.map} +1 -1
- package/dist/tanstack-start.js +2 -2
- package/dist/text-FZSI6W5I.js +2 -0
- package/dist/{text-M3DRK7LU.js.map → text-FZSI6W5I.js.map} +1 -1
- package/dist/text-QXGOD2KW.js +2 -0
- package/dist/{text-SQXG7XJT.js.map → text-QXGOD2KW.js.map} +1 -1
- package/dist/textarea-INLURFNU.js +2 -0
- package/dist/{textarea-YF4K2VBM.js.map → textarea-INLURFNU.js.map} +1 -1
- package/dist/tools.js +1 -1
- package/dist/{types.d-C12xWeN_.d.ts → types.d-CPIuPrvL.d.ts} +36 -30
- package/dist/ui.d.ts +17 -9
- package/dist/ui.js +5 -5
- package/dist/ui.js.map +1 -1
- package/dist/user-nav-LSEOOH4E.js +2 -0
- package/dist/{user-nav-Z7GBLYQA.js.map → user-nav-LSEOOH4E.js.map} +1 -1
- package/package.json +4 -1
- package/dist/asset-ZVPFS73O.js +0 -2
- package/dist/chunk-2FFSI7IK.js +0 -2
- package/dist/chunk-2FFSI7IK.js.map +0 -1
- package/dist/chunk-2OBWJ6UY.js.map +0 -1
- package/dist/chunk-D62TAYLI.js.map +0 -1
- package/dist/chunk-EYGOJ2ZN.js +0 -2
- package/dist/chunk-EYGOJ2ZN.js.map +0 -1
- package/dist/chunk-F2ILIHAU.js +0 -2
- package/dist/chunk-FPH4YETF.js +0 -2
- package/dist/chunk-FPH4YETF.js.map +0 -1
- package/dist/chunk-GFDWGYUR.js +0 -2
- package/dist/chunk-JCHD4EGB.js +0 -2
- package/dist/chunk-KHPTVIYT.js +0 -2
- package/dist/chunk-KHPTVIYT.js.map +0 -1
- package/dist/chunk-PXB5QSHN.js +0 -2
- package/dist/chunk-PXB5QSHN.js.map +0 -1
- package/dist/chunk-XU2JGXYC.js +0 -2
- package/dist/chunk-XU2JGXYC.js.map +0 -1
- package/dist/datetime-DDEWTNLB.js +0 -2
- package/dist/editor-HAYTKNMY.js +0 -2
- package/dist/logo-B6ZKLGM7.js +0 -3
- package/dist/logo-B6ZKLGM7.js.map +0 -1
- package/dist/search-FTC7ELZX.js +0 -2
- package/dist/select-H3JHOCWR.js +0 -2
- package/dist/switch-TACKLQJH.js +0 -2
- package/dist/text-M3DRK7LU.js +0 -2
- package/dist/text-SQXG7XJT.js +0 -2
- package/dist/textarea-YF4K2VBM.js +0 -2
- package/dist/user-nav-Z7GBLYQA.js +0 -2
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import'./index.css';import {jsx,jsxs}from'react/jsx-runtime';function f({title:t,theme:l}){return jsx("a",{className:"fk:flex fk:items-center fk:rounded-md fk:outline-none fk:transition-[color,box-shadow] fk:focus-visible:ring-[3px] fk:focus-visible:ring-ring/50 fk:corner-squircle",href:"/",title:t,children:l==="light"?jsxs("svg",{className:"fk:h-8 fk:w-8",fill:"none",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg",children:[jsx("path",{d:"M7 8H41V40H7V8Z",fill:"white"}),jsx("path",{d:"M24 0C42 0 48 6 48 24C48 42 42 48 24 48C6 48 0 42 0 24C0 6 6 0 24 0ZM17.7494 9.52381H8.7619L19.2833 23.8313L8.7619 38.7078H17.7494L21.0499 33.6639V14.2549L17.7494 9.52381ZM38.9577 9.52381H29.9542L26.2857 14.8229V33.0406L29.9542 38.7078H38.9577L28.3908 23.8313L38.9577 9.52381Z",fill:"#020817"})]}):jsxs("svg",{className:"fk:h-8 fk:w-8",fill:"none",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg",children:[jsx("path",{d:"M7 8H41V40H7V8Z",fill:"#020817"}),jsx("path",{d:"M24 0C42 0 48 6 48 24C48 42 42 48 24 48C6 48 0 42 0 24C0 6 6 0 24 0ZM17.7494 9.52381H8.7619L19.2833 23.8313L8.7619 38.7078H17.7494L21.0499 33.6639V14.2549L17.7494 9.52381ZM38.9577 9.52381H29.9542L26.2857 14.8229V33.0406L29.9542 38.7078H38.9577L28.3908 23.8313L38.9577 9.52381Z",fill:"white"})]})})}
|
|
2
|
+
export{f as Logo};//# sourceMappingURL=logo-MU7MGYDH.js.map
|
|
3
|
+
//# sourceMappingURL=logo-MU7MGYDH.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/ui/components/logo.tsx"],"names":["Logo","title","theme","jsx","jsxs"],"mappings":"6DAEO,SAASA,CAAAA,CAAK,CAAE,KAAA,CAAAC,CAAAA,CAAO,MAAAC,CAAM,CAAA,CAA8D,CAChG,OACEC,IAAC,GAAA,CAAA,CACC,SAAA,CAAU,qKAAA,CACV,IAAA,CAAK,IACL,KAAA,CAAOF,CAAAA,CAEN,QAAA,CAAAC,CAAAA,GAAU,QACTE,IAAAA,CAAC,KAAA,CAAA,CAAI,SAAA,CAAU,eAAA,CAAgB,KAAK,MAAA,CAAO,OAAA,CAAQ,YAAY,KAAA,CAAM,4BAAA,CACnE,UAAAD,GAAAA,CAAC,MAAA,CAAA,CAAK,CAAA,CAAE,iBAAA,CAAkB,KAAK,OAAA,CAAQ,CAAA,CACvCA,GAAAA,CAAC,MAAA,CAAA,CACC,EAAE,sRAAA,CACF,IAAA,CAAK,SAAA,CACP,CAAA,CAAA,CACF,EAEAC,IAAAA,CAAC,KAAA,CAAA,CAAI,SAAA,CAAU,eAAA,CAAgB,KAAK,MAAA,CAAO,OAAA,CAAQ,WAAA,CAAY,KAAA,CAAM,6BACnE,QAAA,CAAA,CAAAD,GAAAA,CAAC,MAAA,CAAA,CAAK,CAAA,CAAE,kBAAkB,IAAA,CAAK,SAAA,CAAU,CAAA,CACzCA,GAAAA,CAAC,QACC,CAAA,CAAE,sRAAA,CACF,KAAK,OAAA,CACP,CAAA,CAAA,CACF,EAEJ,CAEJ","file":"logo-MU7MGYDH.js","sourcesContent":["import type { JSX } from 'react';\n\nexport function Logo({ title, theme }: { title: string; theme: string | undefined }): JSX.Element {\n return (\n <a\n className=\"fk:flex fk:items-center fk:rounded-md fk:outline-none fk:transition-[color,box-shadow] fk:focus-visible:ring-[3px] fk:focus-visible:ring-ring/50 fk:corner-squircle\"\n href=\"/\"\n title={title}\n >\n {theme === 'light' ? (\n <svg className=\"fk:h-8 fk:w-8\" fill=\"none\" viewBox=\"0 0 48 48\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M7 8H41V40H7V8Z\" fill=\"white\" />\n <path\n d=\"M24 0C42 0 48 6 48 24C48 42 42 48 24 48C6 48 0 42 0 24C0 6 6 0 24 0ZM17.7494 9.52381H8.7619L19.2833 23.8313L8.7619 38.7078H17.7494L21.0499 33.6639V14.2549L17.7494 9.52381ZM38.9577 9.52381H29.9542L26.2857 14.8229V33.0406L29.9542 38.7078H38.9577L28.3908 23.8313L38.9577 9.52381Z\"\n fill=\"#020817\"\n />\n </svg>\n ) : (\n <svg className=\"fk:h-8 fk:w-8\" fill=\"none\" viewBox=\"0 0 48 48\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M7 8H41V40H7V8Z\" fill=\"#020817\" />\n <path\n d=\"M24 0C42 0 48 6 48 24C48 42 42 48 24 48C6 48 0 42 0 24C0 6 6 0 24 0ZM17.7494 9.52381H8.7619L19.2833 23.8313L8.7619 38.7078H17.7494L21.0499 33.6639V14.2549L17.7494 9.52381ZM38.9577 9.52381H29.9542L26.2857 14.8229V33.0406L29.9542 38.7078H38.9577L28.3908 23.8313L38.9577 9.52381Z\"\n fill=\"white\"\n />\n </svg>\n )}\n </a>\n );\n}\n"]}
|
package/dist/nextjs.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
handleFlexkitRequest
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-POQX5GIA.js";
|
|
4
4
|
import {
|
|
5
5
|
assertUniqueSkillNames
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-6V73336R.js";
|
|
7
7
|
|
|
8
8
|
// src/auth/nextjs-api.ts
|
|
9
9
|
function resultToNextResponse(result, NextResponse) {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import'./index.css';import {a,d,c,e,g}from'./chunk-
|
|
2
|
-
//# sourceMappingURL=project-selector-
|
|
1
|
+
import'./index.css';import {a,d,c,e,g}from'./chunk-HDOIOXMP.js';import {b}from'./chunk-WIUPQHZ5.js';import'./chunk-O2QMYUPS.js';import {useState}from'react';import {useNavigate}from'react-router-dom';import {jsxs,jsx}from'react/jsx-runtime';function V({projectId:S,projects:t}){let[r,f]=useState(t.find(e=>e.projectId===S)??t[0]),s=useNavigate();return jsxs(a,{defaultValue:r.projectId,onValueChange:e=>{let c=t.find(u=>u.projectId===e)??t[0],{basePath:d}=c;f(c),s(b(d,c.projectId));},children:[jsx(d,{className:"fk:w-48! fk:h-9 fk:py-1",id:"project",children:jsx(c,{"aria-label":r.title,children:r.title})}),jsx(e,{children:t.map(e=>jsx(g,{value:e.projectId,children:e.title},e.projectId))})]})}export{V as ProjectSelector};//# sourceMappingURL=project-selector-GQ24PVO6.js.map
|
|
2
|
+
//# sourceMappingURL=project-selector-GQ24PVO6.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/ui/components/project-selector.tsx"],"names":["ProjectSelector","projectId","projects","selectedProject","setSelectedProject","useState","project","navigate","useNavigate","jsxs","Select","id","currentProject","basePath","joinBasePath","jsx","SelectTrigger","SelectValue","SelectContent","SelectItem"],"mappings":"iPAYO,SAASA,CAAAA,CAAgB,CAAE,SAAA,CAAAC,CAAAA,CAAW,QAAA,CAAAC,CAAS,CAAA,CAAuB,CAC3E,GAAM,CAACC,CAAAA,CAAiBC,CAAkB,CAAA,CAAIC,QAAAA,CAC5CH,CAAAA,CAAS,KAAMI,CAAAA,EAAYA,CAAAA,CAAQ,SAAA,GAAcL,CAAS,CAAA,EAAKC,CAAAA,CAAS,CAAC,CAC3E,CAAA,CACMK,CAAAA,CAAWC,WAAAA,EAAY,CAE7B,OACEC,IAAAA,CAACC,CAAAA,CAAA,CACC,YAAA,CAAcP,CAAAA,CAAgB,SAAA,CAC9B,aAAA,CAAgBQ,CAAAA,EAAO,CACrB,IAAMC,CAAAA,CAAiBV,CAAAA,CAAS,IAAA,CAAMI,CAAAA,EAAYA,CAAAA,CAAQ,SAAA,GAAcK,CAAE,GAAKT,CAAAA,CAAS,CAAC,CAAA,CACnF,CAAE,QAAA,CAAAW,CAAS,CAAA,CAAID,CAAAA,CAErBR,CAAAA,CAAmBQ,CAAc,CAAA,CACjCL,CAAAA,CAASO,CAAAA,CAAaD,CAAAA,CAAUD,CAAAA,CAAe,SAAS,CAAC,EAC3D,CAAA,CAEA,QAAA,CAAA,CAAAG,GAAAA,CAACC,CAAAA,CAAA,CAAc,SAAA,CAAU,yBAAA,CAA0B,EAAA,CAAG,SAAA,CACpD,QAAA,CAAAD,GAAAA,CAACE,CAAAA,CAAA,CAAY,YAAA,CAAYd,CAAAA,CAAgB,KAAA,CAAQ,QAAA,CAAAA,CAAAA,CAAgB,KAAA,CAAM,CAAA,CACzE,CAAA,CACAY,GAAAA,CAACG,CAAAA,CAAA,CACE,QAAA,CAAAhB,CAAAA,CAAS,GAAA,CAAKI,CAAAA,EACbS,GAAAA,CAACI,CAAAA,CAAA,CAAmC,KAAA,CAAOb,CAAAA,CAAQ,SAAA,CAChD,QAAA,CAAAA,CAAAA,CAAQ,KAAA,CAAA,CADMA,CAAAA,CAAQ,SAEzB,CACD,CAAA,CACH,CAAA,CAAA,CACF,CAEJ","file":"project-selector-
|
|
1
|
+
{"version":3,"sources":["../src/ui/components/project-selector.tsx"],"names":["ProjectSelector","projectId","projects","selectedProject","setSelectedProject","useState","project","navigate","useNavigate","jsxs","Select","id","currentProject","basePath","joinBasePath","jsx","SelectTrigger","SelectValue","SelectContent","SelectItem"],"mappings":"iPAYO,SAASA,CAAAA,CAAgB,CAAE,SAAA,CAAAC,CAAAA,CAAW,QAAA,CAAAC,CAAS,CAAA,CAAuB,CAC3E,GAAM,CAACC,CAAAA,CAAiBC,CAAkB,CAAA,CAAIC,QAAAA,CAC5CH,CAAAA,CAAS,KAAMI,CAAAA,EAAYA,CAAAA,CAAQ,SAAA,GAAcL,CAAS,CAAA,EAAKC,CAAAA,CAAS,CAAC,CAC3E,CAAA,CACMK,CAAAA,CAAWC,WAAAA,EAAY,CAE7B,OACEC,IAAAA,CAACC,CAAAA,CAAA,CACC,YAAA,CAAcP,CAAAA,CAAgB,SAAA,CAC9B,aAAA,CAAgBQ,CAAAA,EAAO,CACrB,IAAMC,CAAAA,CAAiBV,CAAAA,CAAS,IAAA,CAAMI,CAAAA,EAAYA,CAAAA,CAAQ,SAAA,GAAcK,CAAE,GAAKT,CAAAA,CAAS,CAAC,CAAA,CACnF,CAAE,QAAA,CAAAW,CAAS,CAAA,CAAID,CAAAA,CAErBR,CAAAA,CAAmBQ,CAAc,CAAA,CACjCL,CAAAA,CAASO,CAAAA,CAAaD,CAAAA,CAAUD,CAAAA,CAAe,SAAS,CAAC,EAC3D,CAAA,CAEA,QAAA,CAAA,CAAAG,GAAAA,CAACC,CAAAA,CAAA,CAAc,SAAA,CAAU,yBAAA,CAA0B,EAAA,CAAG,SAAA,CACpD,QAAA,CAAAD,GAAAA,CAACE,CAAAA,CAAA,CAAY,YAAA,CAAYd,CAAAA,CAAgB,KAAA,CAAQ,QAAA,CAAAA,CAAAA,CAAgB,KAAA,CAAM,CAAA,CACzE,CAAA,CACAY,GAAAA,CAACG,CAAAA,CAAA,CACE,QAAA,CAAAhB,CAAAA,CAAS,GAAA,CAAKI,CAAAA,EACbS,GAAAA,CAACI,CAAAA,CAAA,CAAmC,KAAA,CAAOb,CAAAA,CAAQ,SAAA,CAChD,QAAA,CAAAA,CAAAA,CAAQ,KAAA,CAAA,CADMA,CAAAA,CAAQ,SAEzB,CACD,CAAA,CACH,CAAA,CAAA,CACF,CAEJ","file":"project-selector-GQ24PVO6.js","sourcesContent":["import type { JSX } from 'react';\nimport { useState } from 'react';\nimport { useNavigate } from 'react-router-dom';\nimport { joinBasePath } from '../../core/base-path';\nimport { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '../primitives/select';\nimport type { ProjectOptions } from '../../core/config/types';\n\ntype Props = {\n projectId: string;\n projects: ProjectOptions[];\n};\n\nexport function ProjectSelector({ projectId, projects }: Props): JSX.Element {\n const [selectedProject, setSelectedProject] = useState(\n projects.find((project) => project.projectId === projectId) ?? projects[0]\n );\n const navigate = useNavigate();\n\n return (\n <Select\n defaultValue={selectedProject.projectId}\n onValueChange={(id) => {\n const currentProject = projects.find((project) => project.projectId === id) ?? projects[0];\n const { basePath } = currentProject;\n\n setSelectedProject(currentProject);\n navigate(joinBasePath(basePath, currentProject.projectId));\n }}\n >\n <SelectTrigger className=\"fk:w-48! fk:h-9 fk:py-1\" id=\"project\">\n <SelectValue aria-label={selectedProject.title}>{selectedProject.title}</SelectValue>\n </SelectTrigger>\n <SelectContent>\n {projects.map((project) => (\n <SelectItem key={project.projectId} value={project.projectId}>\n {project.title}\n </SelectItem>\n ))}\n </SelectContent>\n </Select>\n );\n}\n"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import'./index.css';import {f}from'./chunk-JH4MVD36.js';import {b}from'./chunk-AICNS7KW.js';import {n,w,r,q,s,u,b as b$2}from'./chunk-W3Z33ETA.js';import {a,d,c,e,g}from'./chunk-HDOIOXMP.js';import'./chunk-LIV5RBWJ.js';import'./chunk-WDRCARCP.js';import {b as b$1}from'./chunk-6NRQMG26.js';import'./chunk-WIUPQHZ5.js';import {a as a$1}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,searchPlaceholder:n$1="Search...",noResultsMsg:a$2="Nothing found",className:_,onSearchChange:y,projectId:V,schema:v}){let[D,l]=useState(false),[s$1,S]=useState(""),[G,M]=useState(i),f$1=useMemo(()=>re(v),[v]),m=ne(f$1,G),C=useMemo(()=>te(f$1,m),[f$1,m]),X$1=useMemo(()=>ae(C,s$1),[C,s$1]),c$1=useRef(null),{results:k,isLoading:d$1}=f(V,X$1),j=D&&(k.length>0||!d$1),z=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$1.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(e.pathname+e.search));}return jsxs(b,{children:[jsxs(a,{onValueChange:J,value:m,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$1.map(e=>jsx(g,{value:e.plural,children:oe(e)},e.plural))]})]}),jsxs(n,{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$1("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$1("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$1,onMouseDown:()=>{(c$1.current?.value.length??0)>0&&l(true);},onValueChange:F,ref:c$1,value:s$1}),s$1&&jsx(b$1,{"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$1("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(r,{children:a$2}),jsx(q,{children:jsxs(s,{children:[k.length>0&&jsx(u,{"aria-hidden":"true",className:"fk:hidden!",value:"-"}),k.map(e=>jsxs(u,{className:"fk:flex",value:e._id,onSelect:H=>{t({entityName:e._entityName,entityNamePlural:e._entityNamePlural,entityId:H});},children:[jsx("span",{className:"fk:basis-full",children:e[Object.keys(e)[3]]}),jsx(b$2,{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-XKG5A7XM.js.map
|
|
2
|
+
//# sourceMappingURL=search-XKG5A7XM.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"],"mappings":"qjBAwCA,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,CAAO,MAAA,GAAWI,CAAkB,CAAA,CACzDA,CAAAA,CAGFV,CACT,CAEA,SAASY,EAAAA,CAAmBC,CAAAA,CAAuBC,CAAAA,CAA+B,CAChF,OAAO,CACL,cAAA,CAAgB,CACd,QAAA,CAAUD,EAAY,GAAA,CAAKE,CAAAA,GAAgB,CACzC,U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AAC,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-FTC7ELZX.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\"\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\"\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',\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',\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\"\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',\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":"qjBAwCA,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,C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lD,CAAAA,CAAS,CAAE,WAAYiD,CAAAA,CAAK,WAAA,CAAa,gBAAA,CAAkBA,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-XKG5A7XM.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 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"select-
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"select-SO3DICYX.js"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"switch-
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"switch-SU3OIXL6.js"}
|
package/dist/tanstack-start.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
handleFlexkitRequest
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-POQX5GIA.js";
|
|
4
4
|
import {
|
|
5
5
|
assertUniqueSkillNames
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-6V73336R.js";
|
|
7
7
|
|
|
8
8
|
// src/auth/tanstack-start-api.ts
|
|
9
9
|
function getCookieValue(cookieHeader, name) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"text-
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"text-FZSI6W5I.js"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"text-
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"text-QXGOD2KW.js"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"textarea-
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"textarea-INLURFNU.js"}
|
package/dist/tools.js
CHANGED
|
@@ -54,7 +54,7 @@ type OrderedAssetValue = ImageValue & {
|
|
|
54
54
|
type FormEntityItem = {
|
|
55
55
|
[attributeName: string]: FormFieldValue;
|
|
56
56
|
};
|
|
57
|
-
type EntityQuerySelection = 'list' | 'full';
|
|
57
|
+
type EntityQuerySelection = 'list' | 'full' | 'display';
|
|
58
58
|
type UseEntityQueryParams = {
|
|
59
59
|
entityNamePlural: string;
|
|
60
60
|
schema: Schema;
|
|
@@ -64,8 +64,11 @@ type UseEntityQueryParams = {
|
|
|
64
64
|
/**
|
|
65
65
|
* `list` only selects each related entity's display attribute (desk/list grids).
|
|
66
66
|
* `full` keeps nested relationship fields (forms, relationship pickers). Default: `full`.
|
|
67
|
+
* `display` selects only the entity's display attribute (menus and selectors).
|
|
67
68
|
*/
|
|
68
69
|
selection?: EntityQuerySelection;
|
|
70
|
+
/** Omit the collection count when only rows are needed; count returns 0. Default: true. */
|
|
71
|
+
includeCount?: boolean;
|
|
69
72
|
};
|
|
70
73
|
type FormFieldValue = {
|
|
71
74
|
_id?: string;
|
|
@@ -387,37 +390,40 @@ interface AppRoute {
|
|
|
387
390
|
children?: AppRoute[];
|
|
388
391
|
}
|
|
389
392
|
|
|
390
|
-
interface
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
393
|
+
interface StudioExtension {
|
|
394
|
+
/** Stable machine-readable identity, independent of the optional display label. */
|
|
395
|
+
id: string;
|
|
396
|
+
name?: string;
|
|
397
|
+
contributes: StudioContributions;
|
|
398
|
+
extensions?: StudioExtension[];
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
interface StudioContributions {
|
|
402
|
+
apps?: AppOptions[];
|
|
403
|
+
formFields?: {
|
|
404
|
+
[key: string]: {
|
|
405
|
+
component: (Props: FormFieldProps) => JSX.Element;
|
|
406
|
+
description?: string;
|
|
407
|
+
};
|
|
408
|
+
};
|
|
409
|
+
previewFields?: {
|
|
410
|
+
[key: string]: {
|
|
411
|
+
component: ({ value }: { value: string | boolean | number | null | Date | Image }) => JSX.Element | null;
|
|
412
|
+
description?: string;
|
|
413
|
+
};
|
|
414
|
+
};
|
|
415
|
+
commands?: CommandOptions[];
|
|
416
|
+
navbar?: {
|
|
417
|
+
logo?: {
|
|
418
|
+
component: (Props: LogoProps) => JSX.Element;
|
|
400
419
|
};
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
component: ({ value }: { value: string | boolean | number | null | Date | Image }) => JSX.Element | null;
|
|
404
|
-
description?: string;
|
|
405
|
-
};
|
|
420
|
+
projectSelector?: {
|
|
421
|
+
component: (Props: ProjectSelectorProps) => JSX.Element;
|
|
406
422
|
};
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
logo?: {
|
|
410
|
-
component: (Props: LogoProps) => JSX.Element;
|
|
411
|
-
};
|
|
412
|
-
projectSelector?: {
|
|
413
|
-
component: (Props: ProjectSelectorProps) => JSX.Element;
|
|
414
|
-
};
|
|
415
|
-
search?: {
|
|
416
|
-
component: (Props: SearchProps) => JSX.Element;
|
|
417
|
-
};
|
|
423
|
+
search?: {
|
|
424
|
+
component: (Props: SearchProps) => JSX.Element;
|
|
418
425
|
};
|
|
419
426
|
};
|
|
420
|
-
plugins?: PluginOptions[];
|
|
421
427
|
}
|
|
422
428
|
|
|
423
429
|
interface ProjectOptions {
|
|
@@ -429,7 +435,7 @@ interface ProjectOptions {
|
|
|
429
435
|
title: string;
|
|
430
436
|
name: string;
|
|
431
437
|
}[];
|
|
432
|
-
|
|
438
|
+
extensions?: StudioExtension[];
|
|
433
439
|
scopes?: Scopes;
|
|
434
440
|
/**
|
|
435
441
|
* Permission spaces for this project. Spaces scope access to entities,
|
|
@@ -449,4 +455,4 @@ type SingleProject = Omit<ProjectOptions, 'basePath'> & {
|
|
|
449
455
|
|
|
450
456
|
type Config = SingleProject | ProjectOptions[];
|
|
451
457
|
|
|
452
|
-
export type { AppContextType as A, Config as C, DataType as D, Entity as E, FieldGroup as F, ImageValue as I, LogoProps as L, MappedEntityItem as M, OrderedAssetValue as O,
|
|
458
|
+
export type { AppContextType as A, Config as C, DataType as D, Entity as E, FieldGroup as F, ImageValue as I, LogoProps as L, MappedEntityItem as M, OrderedAssetValue as O, ProjectOptions as P, StudioContributions as S, UseEntityQueryParams as U, ActionSetRelationship as a, ActionSetScope as b, AppOptions as c, StudioExtension as d, SearchRequestProps as e, SearchResultItem as f, Attribute as g, AuthService as h, FormEntityItem as i, Schema as j, User as k, EntityQuerySelection as l, AttributeValue as m, MultipleRelationshipConnection as n, SingleRelationshipConnection as o, ConditionalFieldContext as p, ConditionalFlag as q, DefaultValue as r, DefaultValueByDataType as s, EntityData as t, FormFieldParams as u, FormFieldProps as v, FormFieldValue as w, ScopeType as x, SingleProject as y };
|
package/dist/ui.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import * as React$1 from 'react';
|
|
3
3
|
import { JSX, ReactNode, Dispatch, SetStateAction, HTMLAttributes, ComponentProps, RefObject, FormEvent, PropsWithChildren, ElementType } from 'react';
|
|
4
|
-
import { Avatar as Avatar$1, Dialog as Dialog$1, DropdownMenu as DropdownMenu$1, Slot, Label as Label$1, Checkbox as Checkbox$1, Separator as Separator$1, ScrollArea as ScrollArea$1, Select as Select$1, Tooltip as Tooltip$1, Switch as Switch$1, Tabs as Tabs$1, Toggle as Toggle$1, ToggleGroup as ToggleGroup$1, HoverCard as HoverCard$1
|
|
4
|
+
import { Avatar as Avatar$1, Dialog as Dialog$1, DropdownMenu as DropdownMenu$1, Slot, Label as Label$1, Checkbox as Checkbox$1, Collapsible as Collapsible$1, Separator as Separator$1, ScrollArea as ScrollArea$1, Select as Select$1, Tooltip as Tooltip$1, Switch as Switch$1, Tabs as Tabs$1, Toggle as Toggle$1, ToggleGroup as ToggleGroup$1, HoverCard as HoverCard$1 } from 'radix-ui';
|
|
5
5
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
6
6
|
import { VariantProps } from 'class-variance-authority';
|
|
7
7
|
import * as react_hook_form from 'react-hook-form';
|
|
@@ -9,7 +9,7 @@ import { FieldValues, FieldPath, ControllerProps } from 'react-hook-form';
|
|
|
9
9
|
import { Command as Command$1 } from 'cmdk';
|
|
10
10
|
import * as ResizablePrimitive from 'react-resizable-panels';
|
|
11
11
|
export { PanelImperativeHandle } from 'react-resizable-panels';
|
|
12
|
-
import {
|
|
12
|
+
import { y as SingleProject } from './types.d-CPIuPrvL.js';
|
|
13
13
|
import { ToasterProps } from 'sonner';
|
|
14
14
|
export { toast } from 'sonner';
|
|
15
15
|
import { FileUIPart, SourceDocumentUIPart, UIMessage, ChatStatus, ToolUIPart, DynamicToolUIPart } from 'ai';
|
|
@@ -24,6 +24,7 @@ declare function Avatar({ className, size, ...props }: React$1.ComponentProps<ty
|
|
|
24
24
|
}): react_jsx_runtime.JSX.Element;
|
|
25
25
|
declare function AvatarImage({ className, ...props }: React$1.ComponentProps<typeof Avatar$1.Image>): react_jsx_runtime.JSX.Element;
|
|
26
26
|
declare function AvatarFallback({ className, ...props }: React$1.ComponentProps<typeof Avatar$1.Fallback>): react_jsx_runtime.JSX.Element;
|
|
27
|
+
declare function AvatarGroup({ className, ...props }: React$1.ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
|
|
27
28
|
|
|
28
29
|
declare const badgeVariants: (props?: ({
|
|
29
30
|
variant?: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
|
|
@@ -105,6 +106,10 @@ declare function FormMessage({ className, ...props }: React$1.ComponentProps<'p'
|
|
|
105
106
|
|
|
106
107
|
declare function Checkbox({ className, ...props }: React$1.ComponentProps<typeof Checkbox$1.Root>): react_jsx_runtime.JSX.Element;
|
|
107
108
|
|
|
109
|
+
declare function Collapsible({ ...props }: React.ComponentProps<typeof Collapsible$1.Root>): react_jsx_runtime.JSX.Element;
|
|
110
|
+
declare function CollapsibleTrigger({ ...props }: React.ComponentProps<typeof Collapsible$1.CollapsibleTrigger>): react_jsx_runtime.JSX.Element;
|
|
111
|
+
declare function CollapsibleContent({ ...props }: React.ComponentProps<typeof Collapsible$1.CollapsibleContent>): react_jsx_runtime.JSX.Element;
|
|
112
|
+
|
|
108
113
|
declare function Input({ className, type, ...props }: React$1.ComponentProps<'input'>): react_jsx_runtime.JSX.Element;
|
|
109
114
|
|
|
110
115
|
declare function Command({ className, ...props }: React$1.ComponentProps<typeof Command$1>): react_jsx_runtime.JSX.Element;
|
|
@@ -535,7 +540,7 @@ declare const usePromptInputReferencedSources: () => ReferencedSourcesContext;
|
|
|
535
540
|
type PromptInputActionAddAttachmentsProps = ComponentProps<typeof DropdownMenuItem> & {
|
|
536
541
|
label?: string;
|
|
537
542
|
};
|
|
538
|
-
declare const PromptInputActionAddAttachments: ({ label, ...props }: PromptInputActionAddAttachmentsProps) => react_jsx_runtime.JSX.Element;
|
|
543
|
+
declare const PromptInputActionAddAttachments: ({ label, onSelect, ...props }: PromptInputActionAddAttachmentsProps) => react_jsx_runtime.JSX.Element;
|
|
539
544
|
type PromptInputActionAddScreenshotProps = ComponentProps<typeof DropdownMenuItem> & {
|
|
540
545
|
label?: string;
|
|
541
546
|
};
|
|
@@ -582,7 +587,7 @@ declare const PromptInputActionMenu: (props: PromptInputActionMenuProps) => reac
|
|
|
582
587
|
type PromptInputActionMenuTriggerProps = PromptInputButtonProps;
|
|
583
588
|
declare const PromptInputActionMenuTrigger: ({ className, children, ...props }: PromptInputActionMenuTriggerProps) => react_jsx_runtime.JSX.Element;
|
|
584
589
|
type PromptInputActionMenuContentProps = ComponentProps<typeof DropdownMenuContent>;
|
|
585
|
-
declare const PromptInputActionMenuContent: ({ className, ...props }: PromptInputActionMenuContentProps) => react_jsx_runtime.JSX.Element;
|
|
590
|
+
declare const PromptInputActionMenuContent: ({ className, onCloseAutoFocus, ...props }: PromptInputActionMenuContentProps) => react_jsx_runtime.JSX.Element;
|
|
586
591
|
type PromptInputActionMenuItemProps = ComponentProps<typeof DropdownMenuItem>;
|
|
587
592
|
declare const PromptInputActionMenuItem: ({ className, ...props }: PromptInputActionMenuItemProps) => react_jsx_runtime.JSX.Element;
|
|
588
593
|
type PromptInputSubmitProps = ComponentProps<typeof InputGroupButton> & {
|
|
@@ -631,10 +636,6 @@ declare const PromptInputCommandItem: ({ className, ...props }: PromptInputComma
|
|
|
631
636
|
type PromptInputCommandSeparatorProps = ComponentProps<typeof CommandSeparator>;
|
|
632
637
|
declare const PromptInputCommandSeparator: ({ className, ...props }: PromptInputCommandSeparatorProps) => react_jsx_runtime.JSX.Element;
|
|
633
638
|
|
|
634
|
-
declare function Collapsible({ ...props }: React.ComponentProps<typeof Collapsible$1.Root>): react_jsx_runtime.JSX.Element;
|
|
635
|
-
declare function CollapsibleTrigger({ ...props }: React.ComponentProps<typeof Collapsible$1.CollapsibleTrigger>): react_jsx_runtime.JSX.Element;
|
|
636
|
-
declare function CollapsibleContent({ ...props }: React.ComponentProps<typeof Collapsible$1.CollapsibleContent>): react_jsx_runtime.JSX.Element;
|
|
637
|
-
|
|
638
639
|
interface ReasoningContextValue {
|
|
639
640
|
isStreaming: boolean;
|
|
640
641
|
isOpen: boolean;
|
|
@@ -727,4 +728,11 @@ type ToolOutputProps = ComponentProps<'div'> & {
|
|
|
727
728
|
};
|
|
728
729
|
declare const ToolOutput: ({ className, output, errorText, ...props }: ToolOutputProps) => react_jsx_runtime.JSX.Element | null;
|
|
729
730
|
|
|
730
|
-
|
|
731
|
+
declare const alertVariants: (props?: ({
|
|
732
|
+
variant?: "default" | "destructive" | null | undefined;
|
|
733
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
734
|
+
declare function Alert({ className, variant, ...props }: React$1.ComponentProps<'div'> & VariantProps<typeof alertVariants>): react_jsx_runtime.JSX.Element;
|
|
735
|
+
declare function AlertTitle({ className, ...props }: React$1.ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
|
|
736
|
+
declare function AlertDescription({ className, ...props }: React$1.ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
|
|
737
|
+
|
|
738
|
+
export { Alert, AlertDescription, AlertTitle, Attachment, type AttachmentData, AttachmentEmpty, type AttachmentEmptyProps, AttachmentHoverCard, AttachmentHoverCardContent, type AttachmentHoverCardContentProps, type AttachmentHoverCardProps, AttachmentHoverCardTrigger, type AttachmentHoverCardTriggerProps, AttachmentInfo, type AttachmentInfoProps, type AttachmentMediaCategory, AttachmentPreview, type AttachmentPreviewProps, type AttachmentProps, AttachmentRemove, type AttachmentRemoveProps, type AttachmentVariant, Attachments, type AttachmentsContext, type AttachmentsProps, Avatar, AvatarFallback, AvatarGroup, AvatarImage, Badge, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, Checkbox, CodeBlock, CodeBlockActions, CodeBlockContainer, CodeBlockContent, CodeBlockCopyButton, type CodeBlockCopyButtonProps, CodeBlockFilename, CodeBlockHeader, CodeBlockLanguageSelector, CodeBlockLanguageSelectorContent, type CodeBlockLanguageSelectorContentProps, CodeBlockLanguageSelectorItem, type CodeBlockLanguageSelectorItemProps, type CodeBlockLanguageSelectorProps, CodeBlockLanguageSelectorTrigger, type CodeBlockLanguageSelectorTriggerProps, CodeBlockLanguageSelectorValue, type CodeBlockLanguageSelectorValueProps, CodeBlockTitle, Collapsible, CollapsibleContent, CollapsibleTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, Conversation, ConversationContent, type ConversationContentProps, ConversationDownload, type ConversationDownloadProps, ConversationEmptyState, type ConversationEmptyStateProps, type ConversationProps, ConversationScrollButton, type ConversationScrollButtonProps, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DrawerModal, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, ExternalLink, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, HoverCard, HoverCardContent, HoverCardTrigger, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, InsufficientPermissionsTooltipContent, Label, LocalReferencedSourcesContext, Message, MessageAction, type MessageActionProps, MessageActions, type MessageActionsProps, MessageBranch, MessageBranchContent, type MessageBranchContentProps, MessageBranchNext, type MessageBranchNextProps, MessageBranchPage, type MessageBranchPageProps, MessageBranchPrevious, type MessageBranchPreviousProps, type MessageBranchProps, MessageBranchSelector, type MessageBranchSelectorProps, MessageContent, type MessageContentProps, type MessageProps, MessageResponse, type MessageResponseProps, MessageToolbar, type MessageToolbarProps, ModelSelector, ModelSelectorContent, type ModelSelectorContentProps, ModelSelectorDialog, type ModelSelectorDialogProps, ModelSelectorEmpty, type ModelSelectorEmptyProps, ModelSelectorGroup, type ModelSelectorGroupProps, ModelSelectorInput, type ModelSelectorInputProps, ModelSelectorItem, type ModelSelectorItemProps, ModelSelectorList, type ModelSelectorListProps, ModelSelectorLogo, ModelSelectorLogoGroup, type ModelSelectorLogoGroupProps, type ModelSelectorLogoProps, ModelSelectorName, type ModelSelectorNameProps, type ModelSelectorProps, ModelSelectorSeparator, type ModelSelectorSeparatorProps, ModelSelectorShortcut, type ModelSelectorShortcutProps, ModelSelectorTrigger, type ModelSelectorTriggerProps, PermissionTooltip, PromptInput, PromptInputActionAddAttachments, type PromptInputActionAddAttachmentsProps, PromptInputActionAddScreenshot, type PromptInputActionAddScreenshotProps, PromptInputActionMenu, PromptInputActionMenuContent, type PromptInputActionMenuContentProps, PromptInputActionMenuItem, type PromptInputActionMenuItemProps, type PromptInputActionMenuProps, PromptInputActionMenuTrigger, type PromptInputActionMenuTriggerProps, PromptInputBody, type PromptInputBodyProps, PromptInputButton, type PromptInputButtonProps, type PromptInputButtonTooltip, PromptInputCommand, PromptInputCommandEmpty, type PromptInputCommandEmptyProps, PromptInputCommandGroup, type PromptInputCommandGroupProps, PromptInputCommandInput, type PromptInputCommandInputProps, PromptInputCommandItem, type PromptInputCommandItemProps, PromptInputCommandList, type PromptInputCommandListProps, type PromptInputCommandProps, PromptInputCommandSeparator, type PromptInputCommandSeparatorProps, type PromptInputControllerProps, PromptInputFooter, type PromptInputFooterProps, PromptInputHeader, type PromptInputHeaderProps, PromptInputHoverCard, PromptInputHoverCardContent, type PromptInputHoverCardContentProps, type PromptInputHoverCardProps, PromptInputHoverCardTrigger, type PromptInputHoverCardTriggerProps, type PromptInputMessage, type PromptInputProps, PromptInputProvider, type PromptInputProviderProps, PromptInputSelect, PromptInputSelectContent, type PromptInputSelectContentProps, PromptInputSelectItem, type PromptInputSelectItemProps, type PromptInputSelectProps, PromptInputSelectTrigger, type PromptInputSelectTriggerProps, PromptInputSelectValue, type PromptInputSelectValueProps, PromptInputSubmit, type PromptInputSubmitProps, PromptInputTab, PromptInputTabBody, type PromptInputTabBodyProps, PromptInputTabItem, type PromptInputTabItemProps, PromptInputTabLabel, type PromptInputTabLabelProps, type PromptInputTabProps, PromptInputTabsList, type PromptInputTabsListProps, PromptInputTextarea, type PromptInputTextareaProps, PromptInputTools, type PromptInputToolsProps, Reasoning, ReasoningContent, type ReasoningContentProps, type ReasoningProps, ReasoningTrigger, type ReasoningTriggerProps, type ReferencedSourcesContext, ResizableHandle, ResizablePanel, ResizablePanelGroup, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Shimmer, Sidebar$1 as Sidebar, SidebarContent, SidebarGroup, SidebarGroupContent, SidebarGroupLabel, SidebarInset, SidebarMenu, SidebarMenuButton, SidebarMenuItem, Sidebar as SidebarPanel, SidebarProvider, SidebarRail, SidebarTrigger, Skeleton, Source, type SourceProps, Sources, SourcesContent, type SourcesContentProps, type SourcesProps, SourcesTrigger, type SourcesTriggerProps, SpeechInput, type SpeechInputProps, Spinner, Suggestion, type SuggestionProps, Suggestions, type SuggestionsProps, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, type TextInputContext, Textarea, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Tool, ToolContent, type ToolContentProps, ToolHeader, type ToolHeaderProps, ToolInput, type ToolInputProps, ToolOutput, type ToolOutputProps, type ToolPart, type ToolProps, Tooltip, TooltipContent, TooltipPortal, TooltipProvider, TooltipTrigger, badgeVariants, buttonGroupVariants, buttonVariants, getAttachmentLabel, getMediaCategory, getStatusBadge, highlightCode, messagesToMarkdown, toggleVariants, useAttachmentContext, useAttachmentsContext, useFormField, usePromptInputAttachments, usePromptInputController, usePromptInputReferencedSources, useProviderAttachments, useReasoning, useSidebar };
|