@exulu/frontend 1.10.0 → 1.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.next/BUILD_ID +1 -1
- package/dist/.next/app-build-manifest.json +163 -160
- package/dist/.next/app-path-routes-manifest.json +1 -1
- package/dist/.next/build-manifest.json +2 -2
- package/dist/.next/prerender-manifest.json +1 -1
- package/dist/.next/server/app/(application)/agents/edit/[id]/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(application)/agents/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(application)/chat/[agent]/[session]/page.js +1 -1
- package/dist/.next/server/app/(application)/chat/[agent]/[session]/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(application)/chat/[agent]/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(application)/chat/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(application)/configuration/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(application)/dashboard/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(application)/data/[[...query]]/page.js +2 -2
- package/dist/.next/server/app/(application)/data/[[...query]]/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(application)/evals/[id]/page.js +1 -1
- package/dist/.next/server/app/(application)/evals/[id]/page.js.nft.json +1 -1
- package/dist/.next/server/app/(application)/evals/[id]/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(application)/evals/cases/page.js +1 -1
- package/dist/.next/server/app/(application)/evals/cases/page.js.nft.json +1 -1
- package/dist/.next/server/app/(application)/evals/cases/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(application)/evals/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(application)/explorer/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(application)/keys/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(application)/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(application)/projects/[project]/page.js +1 -1
- package/dist/.next/server/app/(application)/projects/[project]/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(application)/projects/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(application)/prompts/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(application)/roles/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(application)/token/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(application)/users/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(application)/variables/create/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(application)/variables/edit/[variable_id]/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(application)/variables/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(application)/variables/usage/[variable_id]/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(application)/workflows/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(authentication)/login/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/_not-found.html +1 -1
- package/dist/.next/server/app/_not-found.rsc +1 -1
- package/dist/.next/server/app-paths-manifest.json +5 -5
- package/dist/.next/server/chunks/2270.js +145 -132
- package/dist/.next/server/chunks/{5084.js → 2587.js} +1 -1
- package/dist/.next/server/chunks/3503.js +1 -1
- package/dist/.next/server/chunks/5485.js +1 -1
- package/dist/.next/server/chunks/5974.js +1 -1
- package/dist/.next/server/chunks/7944.js +1 -1
- package/dist/.next/server/chunks/8286.js +1 -1
- package/dist/.next/server/middleware-manifest.json +5 -5
- package/dist/.next/server/pages/404.html +1 -1
- package/dist/.next/server/pages/500.html +1 -1
- package/dist/.next/server/server-reference-manifest.json +1 -1
- package/dist/.next/static/chunks/1707-06e693c4a709c147.js +2 -0
- package/dist/.next/static/chunks/1707-06e693c4a709c147.js.map +1 -0
- package/dist/.next/static/chunks/{1957-cf44b1d31a9c7d5c.js → 1957-34f17de1e14e45de.js} +1 -1
- package/dist/.next/static/chunks/{1957-cf44b1d31a9c7d5c.js.map → 1957-34f17de1e14e45de.js.map} +1 -1
- package/dist/.next/static/chunks/{2293-48a95904b834eccc.js → 2293-592e22dde70d632b.js} +1 -1
- package/dist/.next/static/chunks/{2293-48a95904b834eccc.js.map → 2293-592e22dde70d632b.js.map} +1 -1
- package/dist/.next/static/chunks/2534-3dd7a9fabfbdb9d8.js +2 -0
- package/dist/.next/static/chunks/2534-3dd7a9fabfbdb9d8.js.map +1 -0
- package/dist/.next/static/chunks/2823-324b1cd8f15ff9c5.js +2 -0
- package/dist/.next/static/chunks/2823-324b1cd8f15ff9c5.js.map +1 -0
- package/dist/.next/static/chunks/3246-1812de142455a0ac.js +2 -0
- package/dist/.next/static/chunks/3246-1812de142455a0ac.js.map +1 -0
- package/dist/.next/static/chunks/{3750-e3d1b2cccd265190.js → 3750-d0ae5d73288be8de.js} +2 -2
- package/dist/.next/static/chunks/3750-d0ae5d73288be8de.js.map +1 -0
- package/dist/.next/static/chunks/{3832-d7782d6a2771ae6c.js → 3832-0b8edbcc671f4cc0.js} +2 -2
- package/dist/.next/static/chunks/3832-0b8edbcc671f4cc0.js.map +1 -0
- package/dist/.next/static/chunks/{4386-45b79e656a244d8a.js → 4386-21ac377a719ebdfa.js} +1 -1
- package/dist/.next/static/chunks/{4386-45b79e656a244d8a.js.map → 4386-21ac377a719ebdfa.js.map} +1 -1
- package/dist/.next/static/chunks/4612-da512770f949561a.js +2 -0
- package/dist/.next/static/chunks/4612-da512770f949561a.js.map +1 -0
- package/dist/.next/static/chunks/{5825-efd4db1da512bd7f.js → 4760-d5ceb992b68e35ca.js} +2 -2
- package/dist/.next/static/chunks/4760-d5ceb992b68e35ca.js.map +1 -0
- package/dist/.next/static/chunks/{6367-59655a85d75e19be.js → 6367-aa5020cbea5354e2.js} +1 -1
- package/dist/.next/static/chunks/{6367-59655a85d75e19be.js.map → 6367-aa5020cbea5354e2.js.map} +1 -1
- package/dist/.next/static/chunks/6373-3eee0b6c8b8fd459.js +2 -0
- package/dist/.next/static/chunks/6373-3eee0b6c8b8fd459.js.map +1 -0
- package/dist/.next/static/chunks/{8030-9c926ea4dfd3a54e.js → 8030-5d38a3f1a4ad44cb.js} +1 -1
- package/dist/.next/static/chunks/{8030-9c926ea4dfd3a54e.js.map → 8030-5d38a3f1a4ad44cb.js.map} +1 -1
- package/dist/.next/static/chunks/9105-143f12397a76a332.js +2 -0
- package/dist/.next/static/chunks/9105-143f12397a76a332.js.map +1 -0
- package/dist/.next/static/chunks/9877-378934ae38c6760c.js +2 -0
- package/dist/.next/static/chunks/9877-378934ae38c6760c.js.map +1 -0
- package/dist/.next/static/chunks/{9953-95900a236271a222.js → 9953-02d5b52553a5c573.js} +2 -2
- package/dist/.next/static/chunks/{9953-95900a236271a222.js.map → 9953-02d5b52553a5c573.js.map} +1 -1
- package/dist/.next/static/chunks/app/(application)/agents/edit/[id]/{page-e4a4693953329671.js → page-37918149a8e909b0.js} +2 -2
- package/dist/.next/static/chunks/app/(application)/agents/edit/[id]/{page-e4a4693953329671.js.map → page-37918149a8e909b0.js.map} +1 -1
- package/dist/.next/static/chunks/app/(application)/agents/{page-b77c21a993c55901.js → page-9cff3b35b042d46a.js} +1 -1
- package/dist/.next/static/chunks/app/(application)/agents/{page-b77c21a993c55901.js.map → page-9cff3b35b042d46a.js.map} +1 -1
- package/dist/.next/static/chunks/app/(application)/chat/[agent]/[session]/page-53a99d8df53380c7.js +2 -0
- package/dist/.next/static/chunks/app/(application)/chat/[agent]/[session]/page-53a99d8df53380c7.js.map +1 -0
- package/dist/.next/static/chunks/app/(application)/chat/{layout-093baa26f89338bc.js → layout-ba702af6bb56baa2.js} +1 -1
- package/dist/.next/static/chunks/app/(application)/chat/{layout-093baa26f89338bc.js.map → layout-ba702af6bb56baa2.js.map} +1 -1
- package/dist/.next/static/chunks/app/(application)/chat/{page-8a1fcfb68cf9c8c0.js → page-8b00a98d285829b1.js} +1 -1
- package/dist/.next/static/chunks/app/(application)/chat/{page-8a1fcfb68cf9c8c0.js.map → page-8b00a98d285829b1.js.map} +1 -1
- package/dist/.next/static/chunks/app/(application)/configuration/{page-f315ede6d66922e6.js → page-1e978e117d5086a1.js} +1 -1
- package/dist/.next/static/chunks/app/(application)/configuration/{page-f315ede6d66922e6.js.map → page-1e978e117d5086a1.js.map} +1 -1
- package/dist/.next/static/chunks/app/(application)/dashboard/{page-4a1956febf5235b6.js → page-c54b4bc8d0ac4ac8.js} +1 -1
- package/dist/.next/static/chunks/app/(application)/dashboard/{page-4a1956febf5235b6.js.map → page-c54b4bc8d0ac4ac8.js.map} +1 -1
- package/dist/.next/static/chunks/app/(application)/data/[[...query]]/{layout-0c7c1b0e1713bf60.js → layout-dfdb5c1cdc7ddefc.js} +2 -2
- package/dist/.next/static/chunks/app/(application)/data/[[...query]]/{layout-0c7c1b0e1713bf60.js.map → layout-dfdb5c1cdc7ddefc.js.map} +1 -1
- package/dist/.next/static/chunks/app/(application)/data/[[...query]]/page-faaee5fe82b45966.js +2 -0
- package/dist/.next/static/chunks/app/(application)/data/[[...query]]/page-faaee5fe82b45966.js.map +1 -0
- package/dist/.next/static/chunks/app/(application)/evals/[id]/{page-a7728cf9b0524489.js → page-c956d9892676aa4f.js} +2 -2
- package/dist/.next/static/chunks/app/(application)/evals/[id]/page-c956d9892676aa4f.js.map +1 -0
- package/dist/.next/static/chunks/app/(application)/evals/cases/page-6b4dde82376e9aac.js +2 -0
- package/dist/.next/static/chunks/app/(application)/evals/cases/page-6b4dde82376e9aac.js.map +1 -0
- package/dist/.next/static/chunks/app/(application)/evals/{page-8b38d8d29f275704.js → page-944bfc4f0a001e4c.js} +1 -1
- package/dist/.next/static/chunks/app/(application)/evals/page-944bfc4f0a001e4c.js.map +1 -0
- package/dist/.next/static/chunks/app/(application)/explorer/page-07d67145bb176711.js +2 -0
- package/dist/.next/static/chunks/app/(application)/explorer/page-07d67145bb176711.js.map +1 -0
- package/dist/.next/static/chunks/app/(application)/keys/{page-afe59c91cc347208.js → page-6c0cd9ef20cd1461.js} +2 -2
- package/dist/.next/static/chunks/app/(application)/keys/{page-afe59c91cc347208.js.map → page-6c0cd9ef20cd1461.js.map} +1 -1
- package/dist/.next/static/chunks/app/(application)/projects/[project]/{page-f04fd5291a1ef7b1.js → page-5e2be54e76b8509c.js} +2 -2
- package/dist/.next/static/chunks/app/(application)/projects/[project]/{page-f04fd5291a1ef7b1.js.map → page-5e2be54e76b8509c.js.map} +1 -1
- package/dist/.next/static/chunks/app/(application)/projects/{layout-a8e1830ef3faafb9.js → layout-f2e0f42a08c96bb8.js} +1 -1
- package/dist/.next/static/chunks/app/(application)/projects/{layout-a8e1830ef3faafb9.js.map → layout-f2e0f42a08c96bb8.js.map} +1 -1
- package/dist/.next/static/chunks/app/(application)/prompts/{page-2c500e9898447506.js → page-2c03bbe32800acc3.js} +2 -2
- package/dist/.next/static/chunks/app/(application)/prompts/{page-2c500e9898447506.js.map → page-2c03bbe32800acc3.js.map} +1 -1
- package/dist/.next/static/chunks/app/(application)/roles/{page-873911198c17d9a7.js → page-b977b5c658004717.js} +1 -1
- package/dist/.next/static/chunks/app/(application)/roles/{page-873911198c17d9a7.js.map → page-b977b5c658004717.js.map} +1 -1
- package/dist/.next/static/chunks/app/(application)/token/{page-3acc39cb8a718331.js → page-08596ece49a811b9.js} +2 -2
- package/dist/.next/static/chunks/app/(application)/token/page-08596ece49a811b9.js.map +1 -0
- package/dist/.next/static/chunks/app/(application)/users/{page-0d7f0d7e80cd1436.js → page-49212081be40aeca.js} +2 -2
- package/dist/.next/static/chunks/app/(application)/users/{page-0d7f0d7e80cd1436.js.map → page-49212081be40aeca.js.map} +1 -1
- package/dist/.next/static/chunks/app/(application)/variables/create/{page-8ebf4e3d4d17443b.js → page-9ce762918374f616.js} +1 -1
- package/dist/.next/static/chunks/app/(application)/variables/create/{page-8ebf4e3d4d17443b.js.map → page-9ce762918374f616.js.map} +1 -1
- package/dist/.next/static/chunks/app/(application)/variables/edit/[variable_id]/{page-006145e82e054e72.js → page-0e2b7038546d9f7a.js} +1 -1
- package/dist/.next/static/chunks/app/(application)/variables/edit/[variable_id]/{page-006145e82e054e72.js.map → page-0e2b7038546d9f7a.js.map} +1 -1
- package/dist/.next/static/chunks/app/(application)/variables/{page-51a8aeece444d388.js → page-141d5d3f735454fe.js} +1 -1
- package/dist/.next/static/chunks/app/(application)/variables/{page-51a8aeece444d388.js.map → page-141d5d3f735454fe.js.map} +1 -1
- package/dist/.next/static/chunks/app/(application)/variables/usage/[variable_id]/{page-8f5cfc9565fd919a.js → page-fb1bb3ea6f7cae47.js} +1 -1
- package/dist/.next/static/chunks/app/(application)/variables/usage/[variable_id]/{page-8f5cfc9565fd919a.js.map → page-fb1bb3ea6f7cae47.js.map} +1 -1
- package/dist/.next/static/chunks/app/(application)/workflows/{page-e38f9456120dab69.js → page-2b839fdbc55c297b.js} +2 -2
- package/dist/.next/static/chunks/app/(application)/workflows/page-2b839fdbc55c297b.js.map +1 -0
- package/dist/.next/static/css/0f539b50cca35462.css +4 -0
- package/dist/.next/static/css/0f539b50cca35462.css.map +1 -0
- package/dist/.next/static/css/e3f2a16ab7676b05.css.map +1 -1
- package/package.json +1 -1
- package/dist/.next/static/chunks/1685-939396dad2f8f1e0.js +0 -2
- package/dist/.next/static/chunks/1685-939396dad2f8f1e0.js.map +0 -1
- package/dist/.next/static/chunks/3171-6996819b8863d41f.js +0 -2
- package/dist/.next/static/chunks/3171-6996819b8863d41f.js.map +0 -1
- package/dist/.next/static/chunks/3750-e3d1b2cccd265190.js.map +0 -1
- package/dist/.next/static/chunks/3832-d7782d6a2771ae6c.js.map +0 -1
- package/dist/.next/static/chunks/4419-b9be79d8cd46a97d.js +0 -2
- package/dist/.next/static/chunks/4419-b9be79d8cd46a97d.js.map +0 -1
- package/dist/.next/static/chunks/5110-098aa924c3108fa4.js +0 -2
- package/dist/.next/static/chunks/5110-098aa924c3108fa4.js.map +0 -1
- package/dist/.next/static/chunks/5825-efd4db1da512bd7f.js.map +0 -1
- package/dist/.next/static/chunks/6280-50b751f993f2fe4f.js +0 -2
- package/dist/.next/static/chunks/6280-50b751f993f2fe4f.js.map +0 -1
- package/dist/.next/static/chunks/6373-aef582adc575d3ca.js +0 -2
- package/dist/.next/static/chunks/6373-aef582adc575d3ca.js.map +0 -1
- package/dist/.next/static/chunks/9105-d8ff41060f7ffc85.js +0 -2
- package/dist/.next/static/chunks/9105-d8ff41060f7ffc85.js.map +0 -1
- package/dist/.next/static/chunks/app/(application)/chat/[agent]/[session]/page-d59534ca19eee51f.js +0 -2
- package/dist/.next/static/chunks/app/(application)/chat/[agent]/[session]/page-d59534ca19eee51f.js.map +0 -1
- package/dist/.next/static/chunks/app/(application)/data/[[...query]]/page-7db6bfbf02606136.js +0 -2
- package/dist/.next/static/chunks/app/(application)/data/[[...query]]/page-7db6bfbf02606136.js.map +0 -1
- package/dist/.next/static/chunks/app/(application)/evals/[id]/page-a7728cf9b0524489.js.map +0 -1
- package/dist/.next/static/chunks/app/(application)/evals/cases/page-827f50c6d1f150d0.js +0 -2
- package/dist/.next/static/chunks/app/(application)/evals/cases/page-827f50c6d1f150d0.js.map +0 -1
- package/dist/.next/static/chunks/app/(application)/evals/page-8b38d8d29f275704.js.map +0 -1
- package/dist/.next/static/chunks/app/(application)/explorer/page-e6b1c034c07776e2.js +0 -2
- package/dist/.next/static/chunks/app/(application)/explorer/page-e6b1c034c07776e2.js.map +0 -1
- package/dist/.next/static/chunks/app/(application)/token/page-3acc39cb8a718331.js.map +0 -1
- package/dist/.next/static/chunks/app/(application)/workflows/page-e38f9456120dab69.js.map +0 -1
- package/dist/.next/static/css/9c08ae5d990a6b14.css +0 -4
- package/dist/.next/static/css/9c08ae5d990a6b14.css.map +0 -1
- /package/dist/.next/static/{3j63p6b3zZZB_v1Hn8Mxp → exslB-IPXi_veOKFA4L1Z}/_buildManifest.js +0 -0
- /package/dist/.next/static/{3j63p6b3zZZB_v1Hn8Mxp → exslB-IPXi_veOKFA4L1Z}/_ssgManifest.js +0 -0
|
@@ -1 +1 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,CAAN7H,EAAM,MAAO,OACvE,oCAA6CD,EAAQ,GAAQ8H,MAAA,CAAL9H,EAAK,MAAO,OACrE,GAAGe,EAAM0C,KAAA,EAGV3C,SAAAsG,GAAUtG,CAAA,EAGjB,GAIA,SAASoF,EAAS7G,CAAA,EAChB,OAAOA,EAAO,OAAS,QACzB,CAEA,IAAM0I,EAAOvI,yGCzNPwI,EAAc7F,EAAAA,UAAA,CAAqC,CAACpB,EAAOmE,IAE7D3K,CAAAA,EAAAA,EAAAA,GAAAA,EAAC0L,EAAAA,EAASA,CAAC9L,KAAA,CAAV,CACE,GAAG4G,CAAA,CACJkD,IAAKiB,EACL+C,YAAa,QAKXlH,EAFI9C,EADiBA,MAAA,CACViK,OAAA,CAAQ,qCAEb,OAANnH,CAAAA,EAAAA,EAAMkH,WAAA,GAANlH,KAAAA,IAAAA,GAAAA,EAAAA,IAAAA,CAAAA,EAAoBqB,GAEhB,CAACA,EAAMwE,gBAAA,EAAoBxE,EAAM+F,MAAA,CAAS,GAAG/F,EAAMgG,cAAA,GACzD,IAKNJ,CAAAA,EAAMrD,WAAA,CAxBO,QA4Bb,IAAMoD,EAAOC","sources":["webpack://_N_E/?80fd","webpack://_N_E/./app/(application)/prompts/components/prompt-filters.tsx","webpack://_N_E/./app/(application)/prompts/page.tsx","webpack://_N_E/./components/ui/collapsible.tsx","webpack://_N_E/../../../src/icons/chevron-left.ts","webpack://_N_E/../../../src/icons/copy.ts","webpack://_N_E/../../../src/icons/plus.ts","webpack://_N_E/./node_modules/@radix-ui/react-collapsible/node_modules/@radix-ui/primitive/dist/index.mjs","webpack://_N_E/../src/presence.tsx","webpack://_N_E/../src/use-state-machine.tsx","webpack://_N_E/../src/collapsible.tsx","webpack://_N_E/../src/label.tsx"],"sourcesContent":["import(/* webpackMode: \"eager\" */ \"/home/runner/work/exulu-frontend/exulu-frontend/app/(application)/prompts/page.tsx\");\n","import { Button } from \"@/components/ui/button\";\nimport {\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n DropdownMenuTrigger,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n} from \"@/components/ui/dropdown-menu\";\n\ninterface PromptFiltersProps {\n sortBy: string;\n onSortChange: (sort: string) => void;\n}\n\nexport function PromptFilters({\n sortBy,\n onSortChange,\n}: PromptFiltersProps) {\n\n const sortOptions = [\n { value: \"updatedAt\", label: \"Recently Updated\" },\n { value: \"createdAt\", label: \"Recently Created\" },\n { value: \"favorite_count\", label: \"Most Favorited\" },\n { value: \"usage_count\", label: \"Most Used\" },\n { value: \"name\", label: \"Alphabetical\" },\n ];\n\n return (\n <DropdownMenu>\n <DropdownMenuTrigger asChild>\n <Button variant=\"secondary\">\n Sort:{\" \"}\n {sortOptions.find((opt) => opt.value === sortBy)?.label ||\n \"Recently Updated\"}\n </Button>\n </DropdownMenuTrigger>\n <DropdownMenuContent align=\"end\" className=\"w-56\">\n <DropdownMenuLabel>Sort By</DropdownMenuLabel>\n <DropdownMenuSeparator />\n <DropdownMenuRadioGroup value={sortBy} onValueChange={onSortChange}>\n {sortOptions.map((option) => (\n <DropdownMenuRadioItem key={option.value} value={option.value}>\n {option.label}\n </DropdownMenuRadioItem>\n ))}\n </DropdownMenuRadioGroup>\n </DropdownMenuContent>\n </DropdownMenu>\n );\n}\n","\"use client\";\n\nimport { useContext, useState, useEffect } from \"react\";\nimport { UserContext } from \"@/app/(application)/authenticated\";\nimport { Button } from \"@/components/ui/button\";\nimport { Input } from \"@/components/ui/input\";\nimport { Plus, Search, ChevronLeft, ChevronRight } from \"lucide-react\";\nimport { usePrompts } from \"@/hooks/use-prompts\";\nimport { PromptCard } from \"./components/prompt-card\";\nimport { PromptEditorModal } from \"./components/prompt-editor-modal\";\nimport { PromptFilters } from \"./components/prompt-filters\";\n\nexport const dynamic = \"force-dynamic\";\n\nexport default function PromptsPage() {\n const { user } = useContext(UserContext);\n const [searchQuery, setSearchQuery] = useState(\"\");\n const [isCreateModalOpen, setIsCreateModalOpen] = useState(false);\n const [sortBy, setSortBy] = useState<string>(\"updatedAt\");\n const [page, setPage] = useState(1);\n const [limit] = useState(12); // Fixed limit per page\n\n // Reset page to 1 when filters change\n useEffect(() => {\n setPage(1);\n }, [searchQuery, sortBy]);\n\n // Build filters based on search (server-side)\n const filters: any[] = [];\n if (searchQuery) {\n filters.push({ name: { contains: searchQuery } });\n }\n\n // Fetch prompts with server-side filtering and sorting\n const { data, loading, error, refetch } = usePrompts({\n page,\n limit,\n filters,\n sort: { field: sortBy, direction: \"DESC\" },\n });\n\n const prompts = data?.prompt_libraryPagination?.items || [];\n const pageInfo = data?.prompt_libraryPagination?.pageInfo;\n\n return (\n <div className=\"h-full flex-1 flex-col space-y-8 p-8\">\n <div className=\"flex items-center justify-between space-y-2\">\n <div>\n <h2 className=\"text-2xl font-bold tracking-tight\">Prompt Library</h2>\n <p className=\"text-muted-foreground\">\n Create, organize, and share AI prompts with your team.\n </p>\n </div>\n <Button onClick={() => setIsCreateModalOpen(true)}>\n <Plus className=\"mr-2 h-4 w-4\" />\n Create Prompt\n </Button>\n </div>\n\n {/* Search and Filters */}\n <div className=\"flex flex-col gap-4\">\n <div className=\"flex items-center gap-4\">\n <div className=\"relative flex-1 max-w-md\">\n <Search className=\"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground\" />\n <Input\n placeholder=\"Search prompts by name...\"\n value={searchQuery}\n onChange={(e) => setSearchQuery(e.target.value)}\n className=\"pl-10\"\n />\n </div>\n <PromptFilters\n sortBy={sortBy}\n onSortChange={setSortBy}\n />\n </div>\n </div>\n\n {/* Prompts Grid */}\n {loading ? (\n <div className=\"flex items-center justify-center py-12\">\n <div className=\"text-muted-foreground\">Loading prompts...</div>\n </div>\n ) : error ? (\n <div className=\"flex items-center justify-center py-12\">\n <div className=\"text-destructive\">Error loading prompts</div>\n </div>\n ) : prompts.length === 0 ? (\n <div className=\"flex flex-col items-center justify-center py-12 border-2 border-dashed rounded-lg\">\n <div className=\"text-center space-y-2\">\n <h3 className=\"text-lg font-medium\">No prompts found</h3>\n <p className=\"text-sm text-muted-foreground\">\n {searchQuery\n ? \"Try adjusting your search\"\n : \"Get started by creating your first prompt\"}\n </p>\n {!searchQuery && (\n <Button\n onClick={() => setIsCreateModalOpen(true)}\n variant=\"outline\"\n className=\"mt-4\"\n >\n <Plus className=\"mr-2 h-4 w-4\" />\n Create Prompt\n </Button>\n )}\n </div>\n </div>\n ) : (\n <>\n <div className=\"grid gap-4 md:grid-cols-2 lg:grid-cols-3\">\n {prompts.map((prompt) => (\n <PromptCard\n key={prompt.id}\n prompt={prompt}\n user={user}\n onUpdate={refetch}\n />\n ))}\n </div>\n\n {/* Pagination Controls */}\n {pageInfo && pageInfo.pageCount > 1 && (\n <div className=\"flex items-center justify-between border-t pt-4\">\n <div className=\"text-sm text-muted-foreground\">\n Page {pageInfo.currentPage} of {pageInfo.pageCount} ({pageInfo.itemCount} total items)\n </div>\n <div className=\"flex items-center gap-2\">\n <Button\n variant=\"outline\"\n size=\"sm\"\n onClick={() => setPage(p => Math.max(1, p - 1))}\n disabled={!pageInfo.hasPreviousPage}\n >\n <ChevronLeft className=\"h-4 w-4 mr-1\" />\n Previous\n </Button>\n <Button\n variant=\"outline\"\n size=\"sm\"\n onClick={() => setPage(p => p + 1)}\n disabled={!pageInfo.hasNextPage}\n >\n Next\n <ChevronRight className=\"h-4 w-4 ml-1\" />\n </Button>\n </div>\n </div>\n )}\n </>\n )}\n\n {/* Create Modal */}\n <PromptEditorModal\n open={isCreateModalOpen}\n onOpenChange={setIsCreateModalOpen}\n onSuccess={refetch}\n user={user}\n />\n </div>\n );\n}\n","\"use client\";\n\nimport * as CollapsiblePrimitive from \"@radix-ui/react-collapsible\";\n\nconst Collapsible = CollapsiblePrimitive.Root;\n\nconst CollapsibleTrigger = CollapsiblePrimitive.CollapsibleTrigger;\n\nconst CollapsibleContent = CollapsiblePrimitive.CollapsibleContent;\n\nexport { Collapsible, CollapsibleTrigger, CollapsibleContent };\n","import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name ChevronLeft\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/chevron-left\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst ChevronLeft = createLucideIcon('ChevronLeft', [\n ['path', { d: 'm15 18-6-6 6-6', key: '1wnfg3' }],\n]);\n\nexport default ChevronLeft;\n","import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Copy\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/copy\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Copy = createLucideIcon('Copy', [\n ['rect', { width: '14', height: '14', x: '8', y: '8', rx: '2', ry: '2', key: '17jyea' }],\n ['path', { d: 'M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2', key: 'zix9uf' }],\n]);\n\nexport default Copy;\n","import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Plus\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/plus\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Plus = createLucideIcon('Plus', [\n ['path', { d: 'M5 12h14', key: '1ays0h' }],\n ['path', { d: 'M12 5v14', key: 's699le' }],\n]);\n\nexport default Plus;\n","// src/primitive.tsx\nvar canUseDOM = !!(typeof window !== \"undefined\" && window.document && window.document.createElement);\nfunction composeEventHandlers(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {\n return function handleEvent(event) {\n originalEventHandler?.(event);\n if (checkForDefaultPrevented === false || !event.defaultPrevented) {\n return ourEventHandler?.(event);\n }\n };\n}\nfunction getOwnerWindow(element) {\n if (!canUseDOM) {\n throw new Error(\"Cannot access window outside of the DOM\");\n }\n return element?.ownerDocument?.defaultView ?? window;\n}\nfunction getOwnerDocument(element) {\n if (!canUseDOM) {\n throw new Error(\"Cannot access document outside of the DOM\");\n }\n return element?.ownerDocument ?? document;\n}\nfunction getActiveElement(node, activeDescendant = false) {\n const { activeElement } = getOwnerDocument(node);\n if (!activeElement?.nodeName) {\n return null;\n }\n if (isFrame(activeElement) && activeElement.contentDocument) {\n return getActiveElement(activeElement.contentDocument.body, activeDescendant);\n }\n if (activeDescendant) {\n const id = activeElement.getAttribute(\"aria-activedescendant\");\n if (id) {\n const element = getOwnerDocument(activeElement).getElementById(id);\n if (element) {\n return element;\n }\n }\n }\n return activeElement;\n}\nfunction isFrame(element) {\n return element.tagName === \"IFRAME\";\n}\nexport {\n canUseDOM,\n composeEventHandlers,\n getActiveElement,\n getOwnerDocument,\n getOwnerWindow,\n isFrame\n};\n//# sourceMappingURL=index.mjs.map\n","import * as React from 'react';\nimport { useComposedRefs } from '@radix-ui/react-compose-refs';\nimport { useLayoutEffect } from '@radix-ui/react-use-layout-effect';\nimport { useStateMachine } from './use-state-machine';\n\ninterface PresenceProps {\n children: React.ReactElement | ((props: { present: boolean }) => React.ReactElement);\n present: boolean;\n}\n\nconst Presence: React.FC<PresenceProps> = (props) => {\n const { present, children } = props;\n const presence = usePresence(present);\n\n const child = (\n typeof children === 'function'\n ? children({ present: presence.isPresent })\n : React.Children.only(children)\n ) as React.ReactElement<{ ref?: React.Ref<HTMLElement> }>;\n\n const ref = useComposedRefs(presence.ref, getElementRef(child));\n const forceMount = typeof children === 'function';\n return forceMount || presence.isPresent ? React.cloneElement(child, { ref }) : null;\n};\n\nPresence.displayName = 'Presence';\n\n/* -------------------------------------------------------------------------------------------------\n * usePresence\n * -----------------------------------------------------------------------------------------------*/\n\nfunction usePresence(present: boolean) {\n const [node, setNode] = React.useState<HTMLElement>();\n const stylesRef = React.useRef<CSSStyleDeclaration | null>(null);\n const prevPresentRef = React.useRef(present);\n const prevAnimationNameRef = React.useRef<string>('none');\n const initialState = present ? 'mounted' : 'unmounted';\n const [state, send] = useStateMachine(initialState, {\n mounted: {\n UNMOUNT: 'unmounted',\n ANIMATION_OUT: 'unmountSuspended',\n },\n unmountSuspended: {\n MOUNT: 'mounted',\n ANIMATION_END: 'unmounted',\n },\n unmounted: {\n MOUNT: 'mounted',\n },\n });\n\n React.useEffect(() => {\n const currentAnimationName = getAnimationName(stylesRef.current);\n prevAnimationNameRef.current = state === 'mounted' ? currentAnimationName : 'none';\n }, [state]);\n\n useLayoutEffect(() => {\n const styles = stylesRef.current;\n const wasPresent = prevPresentRef.current;\n const hasPresentChanged = wasPresent !== present;\n\n if (hasPresentChanged) {\n const prevAnimationName = prevAnimationNameRef.current;\n const currentAnimationName = getAnimationName(styles);\n\n if (present) {\n send('MOUNT');\n } else if (currentAnimationName === 'none' || styles?.display === 'none') {\n // If there is no exit animation or the element is hidden, animations won't run\n // so we unmount instantly\n send('UNMOUNT');\n } else {\n /**\n * When `present` changes to `false`, we check changes to animation-name to\n * determine whether an animation has started. We chose this approach (reading\n * computed styles) because there is no `animationrun` event and `animationstart`\n * fires after `animation-delay` has expired which would be too late.\n */\n const isAnimating = prevAnimationName !== currentAnimationName;\n\n if (wasPresent && isAnimating) {\n send('ANIMATION_OUT');\n } else {\n send('UNMOUNT');\n }\n }\n\n prevPresentRef.current = present;\n }\n }, [present, send]);\n\n useLayoutEffect(() => {\n if (node) {\n let timeoutId: number;\n const ownerWindow = node.ownerDocument.defaultView ?? window;\n /**\n * Triggering an ANIMATION_OUT during an ANIMATION_IN will fire an `animationcancel`\n * event for ANIMATION_IN after we have entered `unmountSuspended` state. So, we\n * make sure we only trigger ANIMATION_END for the currently active animation.\n */\n const handleAnimationEnd = (event: AnimationEvent) => {\n const currentAnimationName = getAnimationName(stylesRef.current);\n // The event.animationName is unescaped for CSS syntax,\n // so we need to escape it to compare with the animationName computed from the style.\n const isCurrentAnimation = currentAnimationName.includes(CSS.escape(event.animationName));\n if (event.target === node && isCurrentAnimation) {\n // With React 18 concurrency this update is applied a frame after the\n // animation ends, creating a flash of visible content. By setting the\n // animation fill mode to \"forwards\", we force the node to keep the\n // styles of the last keyframe, removing the flash.\n //\n // Previously we flushed the update via ReactDom.flushSync, but with\n // exit animations this resulted in the node being removed from the\n // DOM before the synthetic animationEnd event was dispatched, meaning\n // user-provided event handlers would not be called.\n // https://github.com/radix-ui/primitives/pull/1849\n send('ANIMATION_END');\n if (!prevPresentRef.current) {\n const currentFillMode = node.style.animationFillMode;\n node.style.animationFillMode = 'forwards';\n // Reset the style after the node had time to unmount (for cases\n // where the component chooses not to unmount). Doing this any\n // sooner than `setTimeout` (e.g. with `requestAnimationFrame`)\n // still causes a flash.\n timeoutId = ownerWindow.setTimeout(() => {\n if (node.style.animationFillMode === 'forwards') {\n node.style.animationFillMode = currentFillMode;\n }\n });\n }\n }\n };\n const handleAnimationStart = (event: AnimationEvent) => {\n if (event.target === node) {\n // if animation occurred, store its name as the previous animation.\n prevAnimationNameRef.current = getAnimationName(stylesRef.current);\n }\n };\n node.addEventListener('animationstart', handleAnimationStart);\n node.addEventListener('animationcancel', handleAnimationEnd);\n node.addEventListener('animationend', handleAnimationEnd);\n return () => {\n ownerWindow.clearTimeout(timeoutId);\n node.removeEventListener('animationstart', handleAnimationStart);\n node.removeEventListener('animationcancel', handleAnimationEnd);\n node.removeEventListener('animationend', handleAnimationEnd);\n };\n } else {\n // Transition to the unmounted state if the node is removed prematurely.\n // We avoid doing so during cleanup as the node may change but still exist.\n send('ANIMATION_END');\n }\n }, [node, send]);\n\n return {\n isPresent: ['mounted', 'unmountSuspended'].includes(state),\n ref: React.useCallback((node: HTMLElement) => {\n stylesRef.current = node ? getComputedStyle(node) : null;\n setNode(node);\n }, []),\n };\n}\n\n/* -----------------------------------------------------------------------------------------------*/\n\nfunction getAnimationName(styles: CSSStyleDeclaration | null) {\n return styles?.animationName || 'none';\n}\n\n// Before React 19 accessing `element.props.ref` will throw a warning and suggest using `element.ref`\n// After React 19 accessing `element.ref` does the opposite.\n// https://github.com/facebook/react/pull/28348\n//\n// Access the ref using the method that doesn't yield a warning.\nfunction getElementRef(element: React.ReactElement<{ ref?: React.Ref<unknown> }>) {\n // React <=18 in DEV\n let getter = Object.getOwnPropertyDescriptor(element.props, 'ref')?.get;\n let mayWarn = getter && 'isReactWarning' in getter && getter.isReactWarning;\n if (mayWarn) {\n return (element as any).ref;\n }\n\n // React 19 in DEV\n getter = Object.getOwnPropertyDescriptor(element, 'ref')?.get;\n mayWarn = getter && 'isReactWarning' in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.props.ref;\n }\n\n // Not DEV\n return element.props.ref || (element as any).ref;\n}\n\nconst Root = Presence;\n\nexport {\n Presence,\n //\n Root,\n};\nexport type { PresenceProps };\n","import * as React from 'react';\n\ntype Machine<S> = { [k: string]: { [k: string]: S } };\ntype MachineState<T> = keyof T;\ntype MachineEvent<T> = keyof UnionToIntersection<T[keyof T]>;\n\n// 🤯 https://fettblog.eu/typescript-union-to-intersection/\ntype UnionToIntersection<T> = (T extends any ? (x: T) => any : never) extends (x: infer R) => any\n ? R\n : never;\n\nexport function useStateMachine<M>(\n initialState: MachineState<M>,\n machine: M & Machine<MachineState<M>>\n) {\n return React.useReducer((state: MachineState<M>, event: MachineEvent<M>): MachineState<M> => {\n const nextState = (machine[state] as any)[event];\n return nextState ?? state;\n }, initialState);\n}\n","import * as React from 'react';\nimport { composeEventHandlers } from '@radix-ui/primitive';\nimport { createContextScope } from '@radix-ui/react-context';\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport { useLayoutEffect } from '@radix-ui/react-use-layout-effect';\nimport { useComposedRefs } from '@radix-ui/react-compose-refs';\nimport { Primitive } from '@radix-ui/react-primitive';\nimport { Presence } from '@radix-ui/react-presence';\nimport { useId } from '@radix-ui/react-id';\n\nimport type { Scope } from '@radix-ui/react-context';\n\n/* -------------------------------------------------------------------------------------------------\n * Collapsible\n * -----------------------------------------------------------------------------------------------*/\n\nconst COLLAPSIBLE_NAME = 'Collapsible';\n\ntype ScopedProps<P> = P & { __scopeCollapsible?: Scope };\nconst [createCollapsibleContext, createCollapsibleScope] = createContextScope(COLLAPSIBLE_NAME);\n\ntype CollapsibleContextValue = {\n contentId: string;\n disabled?: boolean;\n open: boolean;\n onOpenToggle(): void;\n};\n\nconst [CollapsibleProvider, useCollapsibleContext] =\n createCollapsibleContext<CollapsibleContextValue>(COLLAPSIBLE_NAME);\n\ntype CollapsibleElement = React.ComponentRef<typeof Primitive.div>;\ntype PrimitiveDivProps = React.ComponentPropsWithoutRef<typeof Primitive.div>;\ninterface CollapsibleProps extends PrimitiveDivProps {\n defaultOpen?: boolean;\n open?: boolean;\n disabled?: boolean;\n onOpenChange?(open: boolean): void;\n}\n\nconst Collapsible = React.forwardRef<CollapsibleElement, CollapsibleProps>(\n (props: ScopedProps<CollapsibleProps>, forwardedRef) => {\n const {\n __scopeCollapsible,\n open: openProp,\n defaultOpen,\n disabled,\n onOpenChange,\n ...collapsibleProps\n } = props;\n\n const [open, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen ?? false,\n onChange: onOpenChange,\n caller: COLLAPSIBLE_NAME,\n });\n\n return (\n <CollapsibleProvider\n scope={__scopeCollapsible}\n disabled={disabled}\n contentId={useId()}\n open={open}\n onOpenToggle={React.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen])}\n >\n <Primitive.div\n data-state={getState(open)}\n data-disabled={disabled ? '' : undefined}\n {...collapsibleProps}\n ref={forwardedRef}\n />\n </CollapsibleProvider>\n );\n }\n);\n\nCollapsible.displayName = COLLAPSIBLE_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * CollapsibleTrigger\n * -----------------------------------------------------------------------------------------------*/\n\nconst TRIGGER_NAME = 'CollapsibleTrigger';\n\ntype CollapsibleTriggerElement = React.ComponentRef<typeof Primitive.button>;\ntype PrimitiveButtonProps = React.ComponentPropsWithoutRef<typeof Primitive.button>;\ninterface CollapsibleTriggerProps extends PrimitiveButtonProps {}\n\nconst CollapsibleTrigger = React.forwardRef<CollapsibleTriggerElement, CollapsibleTriggerProps>(\n (props: ScopedProps<CollapsibleTriggerProps>, forwardedRef) => {\n const { __scopeCollapsible, ...triggerProps } = props;\n const context = useCollapsibleContext(TRIGGER_NAME, __scopeCollapsible);\n return (\n <Primitive.button\n type=\"button\"\n aria-controls={context.contentId}\n aria-expanded={context.open || false}\n data-state={getState(context.open)}\n data-disabled={context.disabled ? '' : undefined}\n disabled={context.disabled}\n {...triggerProps}\n ref={forwardedRef}\n onClick={composeEventHandlers(props.onClick, context.onOpenToggle)}\n />\n );\n }\n);\n\nCollapsibleTrigger.displayName = TRIGGER_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * CollapsibleContent\n * -----------------------------------------------------------------------------------------------*/\n\nconst CONTENT_NAME = 'CollapsibleContent';\n\ntype CollapsibleContentElement = CollapsibleContentImplElement;\ninterface CollapsibleContentProps extends Omit<CollapsibleContentImplProps, 'present'> {\n /**\n * Used to force mounting when more control is needed. Useful when\n * controlling animation with React animation libraries.\n */\n forceMount?: true;\n}\n\nconst CollapsibleContent = React.forwardRef<CollapsibleContentElement, CollapsibleContentProps>(\n (props: ScopedProps<CollapsibleContentProps>, forwardedRef) => {\n const { forceMount, ...contentProps } = props;\n const context = useCollapsibleContext(CONTENT_NAME, props.__scopeCollapsible);\n return (\n <Presence present={forceMount || context.open}>\n {({ present }) => (\n <CollapsibleContentImpl {...contentProps} ref={forwardedRef} present={present} />\n )}\n </Presence>\n );\n }\n);\n\nCollapsibleContent.displayName = CONTENT_NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\ntype CollapsibleContentImplElement = React.ComponentRef<typeof Primitive.div>;\ninterface CollapsibleContentImplProps extends PrimitiveDivProps {\n present: boolean;\n}\n\nconst CollapsibleContentImpl = React.forwardRef<\n CollapsibleContentImplElement,\n CollapsibleContentImplProps\n>((props: ScopedProps<CollapsibleContentImplProps>, forwardedRef) => {\n const { __scopeCollapsible, present, children, ...contentProps } = props;\n const context = useCollapsibleContext(CONTENT_NAME, __scopeCollapsible);\n const [isPresent, setIsPresent] = React.useState(present);\n const ref = React.useRef<CollapsibleContentImplElement>(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n const heightRef = React.useRef<number | undefined>(0);\n const height = heightRef.current;\n const widthRef = React.useRef<number | undefined>(0);\n const width = widthRef.current;\n // when opening we want it to immediately open to retrieve dimensions\n // when closing we delay `present` to retrieve dimensions before closing\n const isOpen = context.open || isPresent;\n const isMountAnimationPreventedRef = React.useRef(isOpen);\n const originalStylesRef = React.useRef<Record<string, string>>(undefined);\n\n React.useEffect(() => {\n const rAF = requestAnimationFrame(() => (isMountAnimationPreventedRef.current = false));\n return () => cancelAnimationFrame(rAF);\n }, []);\n\n useLayoutEffect(() => {\n const node = ref.current;\n if (node) {\n originalStylesRef.current = originalStylesRef.current || {\n transitionDuration: node.style.transitionDuration,\n animationName: node.style.animationName,\n };\n // block any animations/transitions so the element renders at its full dimensions\n node.style.transitionDuration = '0s';\n node.style.animationName = 'none';\n\n // get width and height from full dimensions\n const rect = node.getBoundingClientRect();\n heightRef.current = rect.height;\n widthRef.current = rect.width;\n\n // kick off any animations/transitions that were originally set up if it isn't the initial mount\n if (!isMountAnimationPreventedRef.current) {\n node.style.transitionDuration = originalStylesRef.current.transitionDuration!;\n node.style.animationName = originalStylesRef.current.animationName!;\n }\n\n setIsPresent(present);\n }\n /**\n * depends on `context.open` because it will change to `false`\n * when a close is triggered but `present` will be `false` on\n * animation end (so when close finishes). This allows us to\n * retrieve the dimensions *before* closing.\n */\n }, [context.open, present]);\n\n return (\n <Primitive.div\n data-state={getState(context.open)}\n data-disabled={context.disabled ? '' : undefined}\n id={context.contentId}\n hidden={!isOpen}\n {...contentProps}\n ref={composedRefs}\n style={{\n [`--radix-collapsible-content-height` as any]: height ? `${height}px` : undefined,\n [`--radix-collapsible-content-width` as any]: width ? `${width}px` : undefined,\n ...props.style,\n }}\n >\n {isOpen && children}\n </Primitive.div>\n );\n});\n\n/* -----------------------------------------------------------------------------------------------*/\n\nfunction getState(open?: boolean) {\n return open ? 'open' : 'closed';\n}\n\nconst Root = Collapsible;\nconst Trigger = CollapsibleTrigger;\nconst Content = CollapsibleContent;\n\nexport {\n createCollapsibleScope,\n //\n Collapsible,\n CollapsibleTrigger,\n CollapsibleContent,\n //\n Root,\n Trigger,\n Content,\n};\nexport type { CollapsibleProps, CollapsibleTriggerProps, CollapsibleContentProps };\n","import * as React from 'react';\nimport { Primitive } from '@radix-ui/react-primitive';\n\n/* -------------------------------------------------------------------------------------------------\n * Label\n * -----------------------------------------------------------------------------------------------*/\n\nconst NAME = 'Label';\n\ntype LabelElement = React.ComponentRef<typeof Primitive.label>;\ntype PrimitiveLabelProps = React.ComponentPropsWithoutRef<typeof Primitive.label>;\ninterface LabelProps extends PrimitiveLabelProps {}\n\nconst Label = React.forwardRef<LabelElement, LabelProps>((props, forwardedRef) => {\n return (\n <Primitive.label\n {...props}\n ref={forwardedRef}\n onMouseDown={(event) => {\n // only prevent text selection if clicking inside the label itself\n const target = event.target as HTMLElement;\n if (target.closest('button, input, select, textarea')) return;\n\n props.onMouseDown?.(event);\n // prevent text selection when double clicking label\n if (!event.defaultPrevented && event.detail > 1) event.preventDefault();\n }}\n />\n );\n});\n\nLabel.displayName = NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\nconst Root = Label;\n\nexport {\n Label,\n //\n Root,\n};\nexport type { LabelProps };\n"],"names":["Promise","resolve","then","__webpack_require__","bind","PromptFilters","param","sortOptions","sortBy","onSortChange","value","label","jsx_runtime","jsxs","DropdownMenu","jsx","DropdownMenuTrigger","asChild","Button","variant","find","opt","DropdownMenuContent","align","className","DropdownMenuLabel","DropdownMenuSeparator","DropdownMenuRadioGroup","onValueChange","map","DropdownMenuRadioItem","option","dynamic","PromptsPage","data","user","useContext","UserContext","searchQuery","setSearchQuery","useState","isCreateModalOpen","setIsCreateModalOpen","setSortBy","page","setPage","limit","useEffect","filters","push","name","contains","loading","error","refetch","usePrompts","sort","field","direction","prompts","prompt_libraryPagination","items","pageInfo","div","h2","p","onClick","Plus","Search","Input","placeholder","onChange","e","target","length","h3","Fragment","PromptCard","prompt","onUpdate","id","pageCount","currentPage","itemCount","size","Math","max","disabled","hasPreviousPage","ChevronLeft","hasNextPage","ChevronRight","PromptEditorModal","open","onOpenChange","onSuccess","Collapsible","CollapsiblePrimitive","CollapsibleTrigger","CollapsibleContent","createLucideIcon","d","key","Copy","width","height","x","y","rx","ry","window","document","createElement","Presence","Object","getter","mayWarn","present","children","props","presence","usePresence","initialState","machine","node","setNode","React2","stylesRef","prevPresentRef","prevAnimationNameRef","state","send","mounted","UNMOUNT","ANIMATION_OUT","unmountSuspended","MOUNT","ANIMATION_END","unmounted","React","event","nextState","currentAnimationName","getAnimationName","current","useLayoutEffect","styles","wasPresent","prevAnimationName","display","timeoutId","ownerWindow","ownerDocument","defaultView","handleAnimationEnd","isCurrentAnimation","includes","CSS","escape","animationName","currentFillMode","style","animationFillMode","setTimeout","handleAnimationStart","addEventListener","clearTimeout","removeEventListener","isPresent","ref","getComputedStyle","child","only","useComposedRefs","getOwnPropertyDescriptor","element","get","isReactWarning","forceMount","displayName","COLLAPSIBLE_NAME","createCollapsibleContext","createCollapsibleScope","createContextScope","CollapsibleProvider","useCollapsibleContext","forwardedRef","__scopeCollapsible","openProp","defaultOpen","collapsibleProps","setOpen","useControllableState","prop","defaultProp","caller","scope","contentId","useId","onOpenToggle","prevOpen","Primitive","getState","TRIGGER_NAME","triggerProps","context","button","type","composeEventHandlers","originalEventHandler","ourEventHandler","checkForDefaultPrevented","defaultPrevented","CONTENT_NAME","contentProps","CollapsibleContentImpl","setIsPresent","composedRefs","heightRef","widthRef","isOpen","isMountAnimationPreventedRef","originalStylesRef","rAF","requestAnimationFrame","cancelAnimationFrame","transitionDuration","rect","getBoundingClientRect","hidden","concat","Root","Label","onMouseDown","closest","detail","preventDefault"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"file":"static/chunks/app/(application)/prompts/page-2c03bbe32800acc3.js","mappings":"qFAAAA,QAAAC,OAAA,GAAAC,IAAA,CAAAC,EAAAC,IAAA,CAAAD,EAAA,wQCgBO,SAASE,EAAcC,CAGT,MAeVC,KAlBmB,CAC5BC,OAAAA,CAAM,CACNC,aAAAA,CAAY,CACO,CAHSH,EAKtBC,EAAc,CAClB,CAAEG,MAAO,YAAaC,MAAO,kBAAmB,EAChD,CAAED,MAAO,YAAaC,MAAO,kBAAmB,EAChD,CAAED,MAAO,iBAAkBC,MAAO,gBAAiB,EACnD,CAAED,MAAO,cAAeC,MAAO,WAAY,EAC3C,CAAED,MAAO,OAAQC,MAAO,cAAe,EACxC,CAED,MACE,GAAAC,EAAAC,IAAA,EAACC,EAAAA,EAAYA,CAAAA,WACX,GAAAF,EAAAG,GAAA,EAACC,EAAAA,EAAmBA,CAAAA,CAACC,QAAO,YAC1B,GAAAL,EAAAC,IAAA,EAACK,EAAAA,CAAMA,CAAAA,CAACC,QAAQ,sBAAY,QACpB,IACLZ,CAAAA,OAAAA,CAAAA,EAAAA,EAAYa,IAAI,CAAC,GAASC,EAAIX,KAAK,GAAKF,EAAAA,GAAxCD,KAAAA,IAAAA,EAAAA,KAAAA,EAAAA,EAAiDI,KAAK,GACrD,wBAGN,GAAAC,EAAAC,IAAA,EAACS,EAAAA,EAAmBA,CAAAA,CAACC,MAAM,MAAMC,UAAU,iBACzC,GAAAZ,EAAAG,GAAA,EAACU,EAAAA,EAAiBA,CAAAA,UAAC,YACnB,GAAAb,EAAAG,GAAA,EAACW,EAAAA,EAAqBA,CAAAA,CAAAA,GACtB,GAAAd,EAAAG,GAAA,EAACY,EAAAA,EAAsBA,CAAAA,CAACjB,MAAOF,EAAQoB,cAAenB,WACnDF,EAAYsB,GAAG,CAAC,GACf,GAAAjB,EAAAG,GA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,CAAA,CACJ7C,IAAKgD,EACLxD,MAAO,CACJ,qCAA8CxD,EAAS,GAAS6H,MAAA,CAAN7H,EAAM,MAAO,OACvE,oCAA6CD,EAAQ,GAAQ8H,MAAA,CAAL9H,EAAK,MAAO,OACrE,GAAGe,EAAM0C,KAAA,EAGV3C,SAAAsG,GAAUtG,CAAA,EAGjB,GAIA,SAASoF,EAAS7G,CAAA,EAChB,OAAOA,EAAO,OAAS,QACzB,CAEA,IAAM0I,EAAOvI,yGCzNPwI,EAAc7F,EAAAA,UAAA,CAAqC,CAACpB,EAAOmE,IAE7D3K,CAAAA,EAAAA,EAAAA,GAAAA,EAAC0L,EAAAA,EAASA,CAAC9L,KAAA,CAAV,CACE,GAAG4G,CAAA,CACJkD,IAAKiB,EACL+C,YAAa,QAKXlH,EAFI9C,EADiBA,MAAA,CACViK,OAAA,CAAQ,qCAEb,OAANnH,CAAAA,EAAAA,EAAMkH,WAAA,GAANlH,KAAAA,IAAAA,GAAAA,EAAAA,IAAAA,CAAAA,EAAoBqB,GAEhB,CAACA,EAAMwE,gBAAA,EAAoBxE,EAAM+F,MAAA,CAAS,GAAG/F,EAAMgG,cAAA,GACzD,IAKNJ,CAAAA,EAAMrD,WAAA,CAxBO,QA4Bb,IAAMoD,EAAOC","sources":["webpack://_N_E/?80fd","webpack://_N_E/./app/(application)/prompts/components/prompt-filters.tsx","webpack://_N_E/./app/(application)/prompts/page.tsx","webpack://_N_E/./components/ui/collapsible.tsx","webpack://_N_E/../../../src/icons/chevron-left.ts","webpack://_N_E/../../../src/icons/copy.ts","webpack://_N_E/../../../src/icons/plus.ts","webpack://_N_E/./node_modules/@radix-ui/react-collapsible/node_modules/@radix-ui/primitive/dist/index.mjs","webpack://_N_E/../src/presence.tsx","webpack://_N_E/../src/use-state-machine.tsx","webpack://_N_E/../src/collapsible.tsx","webpack://_N_E/../src/label.tsx"],"sourcesContent":["import(/* webpackMode: \"eager\" */ \"/home/runner/work/exulu-frontend/exulu-frontend/app/(application)/prompts/page.tsx\");\n","import { Button } from \"@/components/ui/button\";\nimport {\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n DropdownMenuTrigger,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n} from \"@/components/ui/dropdown-menu\";\n\ninterface PromptFiltersProps {\n sortBy: string;\n onSortChange: (sort: string) => void;\n}\n\nexport function PromptFilters({\n sortBy,\n onSortChange,\n}: PromptFiltersProps) {\n\n const sortOptions = [\n { value: \"updatedAt\", label: \"Recently Updated\" },\n { value: \"createdAt\", label: \"Recently Created\" },\n { value: \"favorite_count\", label: \"Most Favorited\" },\n { value: \"usage_count\", label: \"Most Used\" },\n { value: \"name\", label: \"Alphabetical\" },\n ];\n\n return (\n <DropdownMenu>\n <DropdownMenuTrigger asChild>\n <Button variant=\"secondary\">\n Sort:{\" \"}\n {sortOptions.find((opt) => opt.value === sortBy)?.label ||\n \"Recently Updated\"}\n </Button>\n </DropdownMenuTrigger>\n <DropdownMenuContent align=\"end\" className=\"w-56\">\n <DropdownMenuLabel>Sort By</DropdownMenuLabel>\n <DropdownMenuSeparator />\n <DropdownMenuRadioGroup value={sortBy} onValueChange={onSortChange}>\n {sortOptions.map((option) => (\n <DropdownMenuRadioItem key={option.value} value={option.value}>\n {option.label}\n </DropdownMenuRadioItem>\n ))}\n </DropdownMenuRadioGroup>\n </DropdownMenuContent>\n </DropdownMenu>\n );\n}\n","\"use client\";\n\nimport { useContext, useState, useEffect } from \"react\";\nimport { UserContext } from \"@/app/(application)/authenticated\";\nimport { Button } from \"@/components/ui/button\";\nimport { Input } from \"@/components/ui/input\";\nimport { Plus, Search, ChevronLeft, ChevronRight } from \"lucide-react\";\nimport { usePrompts } from \"@/hooks/use-prompts\";\nimport { PromptCard } from \"./components/prompt-card\";\nimport { PromptEditorModal } from \"./components/prompt-editor-modal\";\nimport { PromptFilters } from \"./components/prompt-filters\";\n\nexport const dynamic = \"force-dynamic\";\n\nexport default function PromptsPage() {\n const { user } = useContext(UserContext);\n const [searchQuery, setSearchQuery] = useState(\"\");\n const [isCreateModalOpen, setIsCreateModalOpen] = useState(false);\n const [sortBy, setSortBy] = useState<string>(\"updatedAt\");\n const [page, setPage] = useState(1);\n const [limit] = useState(12); // Fixed limit per page\n\n // Reset page to 1 when filters change\n useEffect(() => {\n setPage(1);\n }, [searchQuery, sortBy]);\n\n // Build filters based on search (server-side)\n const filters: any[] = [];\n if (searchQuery) {\n filters.push({ name: { contains: searchQuery } });\n }\n\n // Fetch prompts with server-side filtering and sorting\n const { data, loading, error, refetch } = usePrompts({\n page,\n limit,\n filters,\n sort: { field: sortBy, direction: \"DESC\" },\n });\n\n const prompts = data?.prompt_libraryPagination?.items || [];\n const pageInfo = data?.prompt_libraryPagination?.pageInfo;\n\n return (\n <div className=\"h-full flex-1 flex-col space-y-8 p-8\">\n <div className=\"flex items-center justify-between space-y-2\">\n <div>\n <h2 className=\"text-2xl font-bold tracking-tight\">Prompt Library</h2>\n <p className=\"text-muted-foreground\">\n Create, organize, and share AI prompts with your team.\n </p>\n </div>\n <Button onClick={() => setIsCreateModalOpen(true)}>\n <Plus className=\"mr-2 h-4 w-4\" />\n Create Prompt\n </Button>\n </div>\n\n {/* Search and Filters */}\n <div className=\"flex flex-col gap-4\">\n <div className=\"flex items-center gap-4\">\n <div className=\"relative flex-1 max-w-md\">\n <Search className=\"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground\" />\n <Input\n placeholder=\"Search prompts by name...\"\n value={searchQuery}\n onChange={(e) => setSearchQuery(e.target.value)}\n className=\"pl-10\"\n />\n </div>\n <PromptFilters\n sortBy={sortBy}\n onSortChange={setSortBy}\n />\n </div>\n </div>\n\n {/* Prompts Grid */}\n {loading ? (\n <div className=\"flex items-center justify-center py-12\">\n <div className=\"text-muted-foreground\">Loading prompts...</div>\n </div>\n ) : error ? (\n <div className=\"flex items-center justify-center py-12\">\n <div className=\"text-destructive\">Error loading prompts</div>\n </div>\n ) : prompts.length === 0 ? (\n <div className=\"flex flex-col items-center justify-center py-12 border-2 border-dashed rounded-lg\">\n <div className=\"text-center space-y-2\">\n <h3 className=\"text-lg font-medium\">No prompts found</h3>\n <p className=\"text-sm text-muted-foreground\">\n {searchQuery\n ? \"Try adjusting your search\"\n : \"Get started by creating your first prompt\"}\n </p>\n {!searchQuery && (\n <Button\n onClick={() => setIsCreateModalOpen(true)}\n variant=\"outline\"\n className=\"mt-4\"\n >\n <Plus className=\"mr-2 h-4 w-4\" />\n Create Prompt\n </Button>\n )}\n </div>\n </div>\n ) : (\n <>\n <div className=\"grid gap-4 md:grid-cols-2 lg:grid-cols-3\">\n {prompts.map((prompt) => (\n <PromptCard\n key={prompt.id}\n prompt={prompt}\n user={user}\n onUpdate={refetch}\n />\n ))}\n </div>\n\n {/* Pagination Controls */}\n {pageInfo && pageInfo.pageCount > 1 && (\n <div className=\"flex items-center justify-between border-t pt-4\">\n <div className=\"text-sm text-muted-foreground\">\n Page {pageInfo.currentPage} of {pageInfo.pageCount} ({pageInfo.itemCount} total items)\n </div>\n <div className=\"flex items-center gap-2\">\n <Button\n variant=\"outline\"\n size=\"sm\"\n onClick={() => setPage(p => Math.max(1, p - 1))}\n disabled={!pageInfo.hasPreviousPage}\n >\n <ChevronLeft className=\"h-4 w-4 mr-1\" />\n Previous\n </Button>\n <Button\n variant=\"outline\"\n size=\"sm\"\n onClick={() => setPage(p => p + 1)}\n disabled={!pageInfo.hasNextPage}\n >\n Next\n <ChevronRight className=\"h-4 w-4 ml-1\" />\n </Button>\n </div>\n </div>\n )}\n </>\n )}\n\n {/* Create Modal */}\n <PromptEditorModal\n open={isCreateModalOpen}\n onOpenChange={setIsCreateModalOpen}\n onSuccess={refetch}\n user={user}\n />\n </div>\n );\n}\n","\"use client\";\n\nimport * as CollapsiblePrimitive from \"@radix-ui/react-collapsible\";\n\nconst Collapsible = CollapsiblePrimitive.Root;\n\nconst CollapsibleTrigger = CollapsiblePrimitive.CollapsibleTrigger;\n\nconst CollapsibleContent = CollapsiblePrimitive.CollapsibleContent;\n\nexport { Collapsible, CollapsibleTrigger, CollapsibleContent };\n","import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name ChevronLeft\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/chevron-left\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst ChevronLeft = createLucideIcon('ChevronLeft', [\n ['path', { d: 'm15 18-6-6 6-6', key: '1wnfg3' }],\n]);\n\nexport default ChevronLeft;\n","import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Copy\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/copy\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Copy = createLucideIcon('Copy', [\n ['rect', { width: '14', height: '14', x: '8', y: '8', rx: '2', ry: '2', key: '17jyea' }],\n ['path', { d: 'M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2', key: 'zix9uf' }],\n]);\n\nexport default Copy;\n","import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Plus\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/plus\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Plus = createLucideIcon('Plus', [\n ['path', { d: 'M5 12h14', key: '1ays0h' }],\n ['path', { d: 'M12 5v14', key: 's699le' }],\n]);\n\nexport default Plus;\n","// src/primitive.tsx\nvar canUseDOM = !!(typeof window !== \"undefined\" && window.document && window.document.createElement);\nfunction composeEventHandlers(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {\n return function handleEvent(event) {\n originalEventHandler?.(event);\n if (checkForDefaultPrevented === false || !event.defaultPrevented) {\n return ourEventHandler?.(event);\n }\n };\n}\nfunction getOwnerWindow(element) {\n if (!canUseDOM) {\n throw new Error(\"Cannot access window outside of the DOM\");\n }\n return element?.ownerDocument?.defaultView ?? window;\n}\nfunction getOwnerDocument(element) {\n if (!canUseDOM) {\n throw new Error(\"Cannot access document outside of the DOM\");\n }\n return element?.ownerDocument ?? document;\n}\nfunction getActiveElement(node, activeDescendant = false) {\n const { activeElement } = getOwnerDocument(node);\n if (!activeElement?.nodeName) {\n return null;\n }\n if (isFrame(activeElement) && activeElement.contentDocument) {\n return getActiveElement(activeElement.contentDocument.body, activeDescendant);\n }\n if (activeDescendant) {\n const id = activeElement.getAttribute(\"aria-activedescendant\");\n if (id) {\n const element = getOwnerDocument(activeElement).getElementById(id);\n if (element) {\n return element;\n }\n }\n }\n return activeElement;\n}\nfunction isFrame(element) {\n return element.tagName === \"IFRAME\";\n}\nexport {\n canUseDOM,\n composeEventHandlers,\n getActiveElement,\n getOwnerDocument,\n getOwnerWindow,\n isFrame\n};\n//# sourceMappingURL=index.mjs.map\n","import * as React from 'react';\nimport { useComposedRefs } from '@radix-ui/react-compose-refs';\nimport { useLayoutEffect } from '@radix-ui/react-use-layout-effect';\nimport { useStateMachine } from './use-state-machine';\n\ninterface PresenceProps {\n children: React.ReactElement | ((props: { present: boolean }) => React.ReactElement);\n present: boolean;\n}\n\nconst Presence: React.FC<PresenceProps> = (props) => {\n const { present, children } = props;\n const presence = usePresence(present);\n\n const child = (\n typeof children === 'function'\n ? children({ present: presence.isPresent })\n : React.Children.only(children)\n ) as React.ReactElement<{ ref?: React.Ref<HTMLElement> }>;\n\n const ref = useComposedRefs(presence.ref, getElementRef(child));\n const forceMount = typeof children === 'function';\n return forceMount || presence.isPresent ? React.cloneElement(child, { ref }) : null;\n};\n\nPresence.displayName = 'Presence';\n\n/* -------------------------------------------------------------------------------------------------\n * usePresence\n * -----------------------------------------------------------------------------------------------*/\n\nfunction usePresence(present: boolean) {\n const [node, setNode] = React.useState<HTMLElement>();\n const stylesRef = React.useRef<CSSStyleDeclaration | null>(null);\n const prevPresentRef = React.useRef(present);\n const prevAnimationNameRef = React.useRef<string>('none');\n const initialState = present ? 'mounted' : 'unmounted';\n const [state, send] = useStateMachine(initialState, {\n mounted: {\n UNMOUNT: 'unmounted',\n ANIMATION_OUT: 'unmountSuspended',\n },\n unmountSuspended: {\n MOUNT: 'mounted',\n ANIMATION_END: 'unmounted',\n },\n unmounted: {\n MOUNT: 'mounted',\n },\n });\n\n React.useEffect(() => {\n const currentAnimationName = getAnimationName(stylesRef.current);\n prevAnimationNameRef.current = state === 'mounted' ? currentAnimationName : 'none';\n }, [state]);\n\n useLayoutEffect(() => {\n const styles = stylesRef.current;\n const wasPresent = prevPresentRef.current;\n const hasPresentChanged = wasPresent !== present;\n\n if (hasPresentChanged) {\n const prevAnimationName = prevAnimationNameRef.current;\n const currentAnimationName = getAnimationName(styles);\n\n if (present) {\n send('MOUNT');\n } else if (currentAnimationName === 'none' || styles?.display === 'none') {\n // If there is no exit animation or the element is hidden, animations won't run\n // so we unmount instantly\n send('UNMOUNT');\n } else {\n /**\n * When `present` changes to `false`, we check changes to animation-name to\n * determine whether an animation has started. We chose this approach (reading\n * computed styles) because there is no `animationrun` event and `animationstart`\n * fires after `animation-delay` has expired which would be too late.\n */\n const isAnimating = prevAnimationName !== currentAnimationName;\n\n if (wasPresent && isAnimating) {\n send('ANIMATION_OUT');\n } else {\n send('UNMOUNT');\n }\n }\n\n prevPresentRef.current = present;\n }\n }, [present, send]);\n\n useLayoutEffect(() => {\n if (node) {\n let timeoutId: number;\n const ownerWindow = node.ownerDocument.defaultView ?? window;\n /**\n * Triggering an ANIMATION_OUT during an ANIMATION_IN will fire an `animationcancel`\n * event for ANIMATION_IN after we have entered `unmountSuspended` state. So, we\n * make sure we only trigger ANIMATION_END for the currently active animation.\n */\n const handleAnimationEnd = (event: AnimationEvent) => {\n const currentAnimationName = getAnimationName(stylesRef.current);\n // The event.animationName is unescaped for CSS syntax,\n // so we need to escape it to compare with the animationName computed from the style.\n const isCurrentAnimation = currentAnimationName.includes(CSS.escape(event.animationName));\n if (event.target === node && isCurrentAnimation) {\n // With React 18 concurrency this update is applied a frame after the\n // animation ends, creating a flash of visible content. By setting the\n // animation fill mode to \"forwards\", we force the node to keep the\n // styles of the last keyframe, removing the flash.\n //\n // Previously we flushed the update via ReactDom.flushSync, but with\n // exit animations this resulted in the node being removed from the\n // DOM before the synthetic animationEnd event was dispatched, meaning\n // user-provided event handlers would not be called.\n // https://github.com/radix-ui/primitives/pull/1849\n send('ANIMATION_END');\n if (!prevPresentRef.current) {\n const currentFillMode = node.style.animationFillMode;\n node.style.animationFillMode = 'forwards';\n // Reset the style after the node had time to unmount (for cases\n // where the component chooses not to unmount). Doing this any\n // sooner than `setTimeout` (e.g. with `requestAnimationFrame`)\n // still causes a flash.\n timeoutId = ownerWindow.setTimeout(() => {\n if (node.style.animationFillMode === 'forwards') {\n node.style.animationFillMode = currentFillMode;\n }\n });\n }\n }\n };\n const handleAnimationStart = (event: AnimationEvent) => {\n if (event.target === node) {\n // if animation occurred, store its name as the previous animation.\n prevAnimationNameRef.current = getAnimationName(stylesRef.current);\n }\n };\n node.addEventListener('animationstart', handleAnimationStart);\n node.addEventListener('animationcancel', handleAnimationEnd);\n node.addEventListener('animationend', handleAnimationEnd);\n return () => {\n ownerWindow.clearTimeout(timeoutId);\n node.removeEventListener('animationstart', handleAnimationStart);\n node.removeEventListener('animationcancel', handleAnimationEnd);\n node.removeEventListener('animationend', handleAnimationEnd);\n };\n } else {\n // Transition to the unmounted state if the node is removed prematurely.\n // We avoid doing so during cleanup as the node may change but still exist.\n send('ANIMATION_END');\n }\n }, [node, send]);\n\n return {\n isPresent: ['mounted', 'unmountSuspended'].includes(state),\n ref: React.useCallback((node: HTMLElement) => {\n stylesRef.current = node ? getComputedStyle(node) : null;\n setNode(node);\n }, []),\n };\n}\n\n/* -----------------------------------------------------------------------------------------------*/\n\nfunction getAnimationName(styles: CSSStyleDeclaration | null) {\n return styles?.animationName || 'none';\n}\n\n// Before React 19 accessing `element.props.ref` will throw a warning and suggest using `element.ref`\n// After React 19 accessing `element.ref` does the opposite.\n// https://github.com/facebook/react/pull/28348\n//\n// Access the ref using the method that doesn't yield a warning.\nfunction getElementRef(element: React.ReactElement<{ ref?: React.Ref<unknown> }>) {\n // React <=18 in DEV\n let getter = Object.getOwnPropertyDescriptor(element.props, 'ref')?.get;\n let mayWarn = getter && 'isReactWarning' in getter && getter.isReactWarning;\n if (mayWarn) {\n return (element as any).ref;\n }\n\n // React 19 in DEV\n getter = Object.getOwnPropertyDescriptor(element, 'ref')?.get;\n mayWarn = getter && 'isReactWarning' in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.props.ref;\n }\n\n // Not DEV\n return element.props.ref || (element as any).ref;\n}\n\nconst Root = Presence;\n\nexport {\n Presence,\n //\n Root,\n};\nexport type { PresenceProps };\n","import * as React from 'react';\n\ntype Machine<S> = { [k: string]: { [k: string]: S } };\ntype MachineState<T> = keyof T;\ntype MachineEvent<T> = keyof UnionToIntersection<T[keyof T]>;\n\n// 🤯 https://fettblog.eu/typescript-union-to-intersection/\ntype UnionToIntersection<T> = (T extends any ? (x: T) => any : never) extends (x: infer R) => any\n ? R\n : never;\n\nexport function useStateMachine<M>(\n initialState: MachineState<M>,\n machine: M & Machine<MachineState<M>>\n) {\n return React.useReducer((state: MachineState<M>, event: MachineEvent<M>): MachineState<M> => {\n const nextState = (machine[state] as any)[event];\n return nextState ?? state;\n }, initialState);\n}\n","import * as React from 'react';\nimport { composeEventHandlers } from '@radix-ui/primitive';\nimport { createContextScope } from '@radix-ui/react-context';\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport { useLayoutEffect } from '@radix-ui/react-use-layout-effect';\nimport { useComposedRefs } from '@radix-ui/react-compose-refs';\nimport { Primitive } from '@radix-ui/react-primitive';\nimport { Presence } from '@radix-ui/react-presence';\nimport { useId } from '@radix-ui/react-id';\n\nimport type { Scope } from '@radix-ui/react-context';\n\n/* -------------------------------------------------------------------------------------------------\n * Collapsible\n * -----------------------------------------------------------------------------------------------*/\n\nconst COLLAPSIBLE_NAME = 'Collapsible';\n\ntype ScopedProps<P> = P & { __scopeCollapsible?: Scope };\nconst [createCollapsibleContext, createCollapsibleScope] = createContextScope(COLLAPSIBLE_NAME);\n\ntype CollapsibleContextValue = {\n contentId: string;\n disabled?: boolean;\n open: boolean;\n onOpenToggle(): void;\n};\n\nconst [CollapsibleProvider, useCollapsibleContext] =\n createCollapsibleContext<CollapsibleContextValue>(COLLAPSIBLE_NAME);\n\ntype CollapsibleElement = React.ComponentRef<typeof Primitive.div>;\ntype PrimitiveDivProps = React.ComponentPropsWithoutRef<typeof Primitive.div>;\ninterface CollapsibleProps extends PrimitiveDivProps {\n defaultOpen?: boolean;\n open?: boolean;\n disabled?: boolean;\n onOpenChange?(open: boolean): void;\n}\n\nconst Collapsible = React.forwardRef<CollapsibleElement, CollapsibleProps>(\n (props: ScopedProps<CollapsibleProps>, forwardedRef) => {\n const {\n __scopeCollapsible,\n open: openProp,\n defaultOpen,\n disabled,\n onOpenChange,\n ...collapsibleProps\n } = props;\n\n const [open, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen ?? false,\n onChange: onOpenChange,\n caller: COLLAPSIBLE_NAME,\n });\n\n return (\n <CollapsibleProvider\n scope={__scopeCollapsible}\n disabled={disabled}\n contentId={useId()}\n open={open}\n onOpenToggle={React.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen])}\n >\n <Primitive.div\n data-state={getState(open)}\n data-disabled={disabled ? '' : undefined}\n {...collapsibleProps}\n ref={forwardedRef}\n />\n </CollapsibleProvider>\n );\n }\n);\n\nCollapsible.displayName = COLLAPSIBLE_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * CollapsibleTrigger\n * -----------------------------------------------------------------------------------------------*/\n\nconst TRIGGER_NAME = 'CollapsibleTrigger';\n\ntype CollapsibleTriggerElement = React.ComponentRef<typeof Primitive.button>;\ntype PrimitiveButtonProps = React.ComponentPropsWithoutRef<typeof Primitive.button>;\ninterface CollapsibleTriggerProps extends PrimitiveButtonProps {}\n\nconst CollapsibleTrigger = React.forwardRef<CollapsibleTriggerElement, CollapsibleTriggerProps>(\n (props: ScopedProps<CollapsibleTriggerProps>, forwardedRef) => {\n const { __scopeCollapsible, ...triggerProps } = props;\n const context = useCollapsibleContext(TRIGGER_NAME, __scopeCollapsible);\n return (\n <Primitive.button\n type=\"button\"\n aria-controls={context.contentId}\n aria-expanded={context.open || false}\n data-state={getState(context.open)}\n data-disabled={context.disabled ? '' : undefined}\n disabled={context.disabled}\n {...triggerProps}\n ref={forwardedRef}\n onClick={composeEventHandlers(props.onClick, context.onOpenToggle)}\n />\n );\n }\n);\n\nCollapsibleTrigger.displayName = TRIGGER_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * CollapsibleContent\n * -----------------------------------------------------------------------------------------------*/\n\nconst CONTENT_NAME = 'CollapsibleContent';\n\ntype CollapsibleContentElement = CollapsibleContentImplElement;\ninterface CollapsibleContentProps extends Omit<CollapsibleContentImplProps, 'present'> {\n /**\n * Used to force mounting when more control is needed. Useful when\n * controlling animation with React animation libraries.\n */\n forceMount?: true;\n}\n\nconst CollapsibleContent = React.forwardRef<CollapsibleContentElement, CollapsibleContentProps>(\n (props: ScopedProps<CollapsibleContentProps>, forwardedRef) => {\n const { forceMount, ...contentProps } = props;\n const context = useCollapsibleContext(CONTENT_NAME, props.__scopeCollapsible);\n return (\n <Presence present={forceMount || context.open}>\n {({ present }) => (\n <CollapsibleContentImpl {...contentProps} ref={forwardedRef} present={present} />\n )}\n </Presence>\n );\n }\n);\n\nCollapsibleContent.displayName = CONTENT_NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\ntype CollapsibleContentImplElement = React.ComponentRef<typeof Primitive.div>;\ninterface CollapsibleContentImplProps extends PrimitiveDivProps {\n present: boolean;\n}\n\nconst CollapsibleContentImpl = React.forwardRef<\n CollapsibleContentImplElement,\n CollapsibleContentImplProps\n>((props: ScopedProps<CollapsibleContentImplProps>, forwardedRef) => {\n const { __scopeCollapsible, present, children, ...contentProps } = props;\n const context = useCollapsibleContext(CONTENT_NAME, __scopeCollapsible);\n const [isPresent, setIsPresent] = React.useState(present);\n const ref = React.useRef<CollapsibleContentImplElement>(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n const heightRef = React.useRef<number | undefined>(0);\n const height = heightRef.current;\n const widthRef = React.useRef<number | undefined>(0);\n const width = widthRef.current;\n // when opening we want it to immediately open to retrieve dimensions\n // when closing we delay `present` to retrieve dimensions before closing\n const isOpen = context.open || isPresent;\n const isMountAnimationPreventedRef = React.useRef(isOpen);\n const originalStylesRef = React.useRef<Record<string, string>>(undefined);\n\n React.useEffect(() => {\n const rAF = requestAnimationFrame(() => (isMountAnimationPreventedRef.current = false));\n return () => cancelAnimationFrame(rAF);\n }, []);\n\n useLayoutEffect(() => {\n const node = ref.current;\n if (node) {\n originalStylesRef.current = originalStylesRef.current || {\n transitionDuration: node.style.transitionDuration,\n animationName: node.style.animationName,\n };\n // block any animations/transitions so the element renders at its full dimensions\n node.style.transitionDuration = '0s';\n node.style.animationName = 'none';\n\n // get width and height from full dimensions\n const rect = node.getBoundingClientRect();\n heightRef.current = rect.height;\n widthRef.current = rect.width;\n\n // kick off any animations/transitions that were originally set up if it isn't the initial mount\n if (!isMountAnimationPreventedRef.current) {\n node.style.transitionDuration = originalStylesRef.current.transitionDuration!;\n node.style.animationName = originalStylesRef.current.animationName!;\n }\n\n setIsPresent(present);\n }\n /**\n * depends on `context.open` because it will change to `false`\n * when a close is triggered but `present` will be `false` on\n * animation end (so when close finishes). This allows us to\n * retrieve the dimensions *before* closing.\n */\n }, [context.open, present]);\n\n return (\n <Primitive.div\n data-state={getState(context.open)}\n data-disabled={context.disabled ? '' : undefined}\n id={context.contentId}\n hidden={!isOpen}\n {...contentProps}\n ref={composedRefs}\n style={{\n [`--radix-collapsible-content-height` as any]: height ? `${height}px` : undefined,\n [`--radix-collapsible-content-width` as any]: width ? `${width}px` : undefined,\n ...props.style,\n }}\n >\n {isOpen && children}\n </Primitive.div>\n );\n});\n\n/* -----------------------------------------------------------------------------------------------*/\n\nfunction getState(open?: boolean) {\n return open ? 'open' : 'closed';\n}\n\nconst Root = Collapsible;\nconst Trigger = CollapsibleTrigger;\nconst Content = CollapsibleContent;\n\nexport {\n createCollapsibleScope,\n //\n Collapsible,\n CollapsibleTrigger,\n CollapsibleContent,\n //\n Root,\n Trigger,\n Content,\n};\nexport type { CollapsibleProps, CollapsibleTriggerProps, CollapsibleContentProps };\n","import * as React from 'react';\nimport { Primitive } from '@radix-ui/react-primitive';\n\n/* -------------------------------------------------------------------------------------------------\n * Label\n * -----------------------------------------------------------------------------------------------*/\n\nconst NAME = 'Label';\n\ntype LabelElement = React.ComponentRef<typeof Primitive.label>;\ntype PrimitiveLabelProps = React.ComponentPropsWithoutRef<typeof Primitive.label>;\ninterface LabelProps extends PrimitiveLabelProps {}\n\nconst Label = React.forwardRef<LabelElement, LabelProps>((props, forwardedRef) => {\n return (\n <Primitive.label\n {...props}\n ref={forwardedRef}\n onMouseDown={(event) => {\n // only prevent text selection if clicking inside the label itself\n const target = event.target as HTMLElement;\n if (target.closest('button, input, select, textarea')) return;\n\n props.onMouseDown?.(event);\n // prevent text selection when double clicking label\n if (!event.defaultPrevented && event.detail > 1) event.preventDefault();\n }}\n />\n );\n});\n\nLabel.displayName = NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\nconst Root = Label;\n\nexport {\n Label,\n //\n Root,\n};\nexport type { LabelProps };\n"],"names":["Promise","resolve","then","__webpack_require__","bind","PromptFilters","param","sortOptions","sortBy","onSortChange","value","label","jsx_runtime","jsxs","DropdownMenu","jsx","DropdownMenuTrigger","asChild","Button","variant","find","opt","DropdownMenuContent","align","className","DropdownMenuLabel","DropdownMenuSeparator","DropdownMenuRadioGroup","onValueChange","map","DropdownMenuRadioItem","option","dynamic","PromptsPage","data","user","useContext","UserContext","searchQuery","setSearchQuery","useState","isCreateModalOpen","setIsCreateModalOpen","setSortBy","page","setPage","limit","useEffect","filters","push","name","contains","loading","error","refetch","usePrompts","sort","field","direction","prompts","prompt_libraryPagination","items","pageInfo","div","h2","p","onClick","Plus","Search","Input","placeholder","onChange","e","target","length","h3","Fragment","PromptCard","prompt","onUpdate","id","pageCount","currentPage","itemCount","size","Math","max","disabled","hasPreviousPage","ChevronLeft","hasNextPage","ChevronRight","PromptEditorModal","open","onOpenChange","onSuccess","Collapsible","CollapsiblePrimitive","CollapsibleTrigger","CollapsibleContent","createLucideIcon","d","key","Copy","width","height","x","y","rx","ry","window","document","createElement","Presence","Object","getter","mayWarn","present","children","props","presence","usePresence","initialState","machine","node","setNode","React2","stylesRef","prevPresentRef","prevAnimationNameRef","state","send","mounted","UNMOUNT","ANIMATION_OUT","unmountSuspended","MOUNT","ANIMATION_END","unmounted","React","event","nextState","currentAnimationName","getAnimationName","current","useLayoutEffect","styles","wasPresent","prevAnimationName","display","timeoutId","ownerWindow","ownerDocument","defaultView","handleAnimationEnd","isCurrentAnimation","includes","CSS","escape","animationName","currentFillMode","style","animationFillMode","setTimeout","handleAnimationStart","addEventListener","clearTimeout","removeEventListener","isPresent","ref","getComputedStyle","child","only","useComposedRefs","getOwnPropertyDescriptor","element","get","isReactWarning","forceMount","displayName","COLLAPSIBLE_NAME","createCollapsibleContext","createCollapsibleScope","createContextScope","CollapsibleProvider","useCollapsibleContext","forwardedRef","__scopeCollapsible","openProp","defaultOpen","collapsibleProps","setOpen","useControllableState","prop","defaultProp","caller","scope","contentId","useId","onOpenToggle","prevOpen","Primitive","getState","TRIGGER_NAME","triggerProps","context","button","type","composeEventHandlers","originalEventHandler","ourEventHandler","checkForDefaultPrevented","defaultPrevented","CONTENT_NAME","contentProps","CollapsibleContentImpl","setIsPresent","composedRefs","heightRef","widthRef","isOpen","isMountAnimationPreventedRef","originalStylesRef","rAF","requestAnimationFrame","cancelAnimationFrame","transitionDuration","rect","getBoundingClientRect","hidden","concat","Root","Label","onMouseDown","closest","detail","preventDefault"],"sourceRoot":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4360],{38434:function(e,s,a){Promise.resolve().then(a.bind(a,96126))},96126:function(e,s,a){"use strict";a.r(s),a.d(s,{default:function(){return U}});var t=a(57437),r=a(2265),l=a(32660),n=a(99397),i=a(15863),d=a(88906),o=a(15868),c=a(18930),u=a(62869),f=a(27648),m=a(95186),x=a(27107),p=a(66070),h=a(73578),v=a(26110),g=a(35974),j=a(77992),b=a(7211),N=a(12199),w=a(27689),y=a(82222),k=a(42042),R=a(32790),C=a(95805),S=a(98145),A=a(64972),T=a(26815),Z=a(42325),D=a(40519),E=a(94508);let _=r.forwardRef((e,s)=>{let{className:a,...r}=e;return(0,t.jsx)(Z.fC,{className:(0,E.cn)("grid gap-2",a),...r,ref:s})});_.displayName=Z.fC.displayName;let O=r.forwardRef((e,s)=>{let{className:a,...r}=e;return(0,t.jsx)(Z.ck,{ref:s,className:(0,E.cn)("aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",a),...r,children:(0,t.jsx)(Z.z$,{className:"flex items-center justify-center",children:(0,t.jsx)(D.Z,{className:"size-2.5 fill-current text-current"})})})});O.displayName=Z.ck.displayName;let I=[{value:"",label:"No Access",description:"Cannot access this resource"},{value:"read",label:"Read Only",description:"Can view but not modify"},{value:"write",label:"Read/Write",description:"Full access to create, read, update, and delete"}],z=[{key:"agents",label:"Agents",icon:y.Z,description:"AI agents and their configurations"},{key:"workflows",label:"Workflows",icon:k.Z,description:"Workflow templates and executions"},{key:"variables",label:"Variables",icon:R.Z,description:"Environment variables and secrets"},{key:"users",label:"Users",icon:C.Z,description:"User management and roles"},{key:"api",label:"API",icon:S.Z,description:"API access and management"},{key:"evals",label:"Evals",icon:A.Z,description:"Evaluation sets, test cases, and eval runs"}];function P(e){let{initialData:s,onSubmit:a,loading:l,onCancel:n}=e,[o,c]=(0,r.useState)((null==s?void 0:s.name)||""),[f,x]=(0,r.useState)({agents:(null==s?void 0:s.agents)||"",api:(null==s?void 0:s.api)||"",workflows:(null==s?void 0:s.workflows)||"",variables:(null==s?void 0:s.variables)||"",users:(null==s?void 0:s.users)||"",evals:(null==s?void 0:s.evals)||""});(0,r.useEffect)(()=>{s&&(c(s.name),x({agents:s.agents||"",api:s.api||"",workflows:s.workflows||"",variables:s.variables||"",users:s.users||"",evals:s.evals||""}))},[s]);let h=(e,s)=>{x(a=>({...a,[e]:s}))},v=async e=>{if(e.preventDefault(),!o.trim())return;let s={name:o.trim(),agents:f.agents||null,api:f.api||null,workflows:f.workflows||null,variables:f.variables||null,users:f.users||null,evals:f.evals||null};await a(s)};return(0,t.jsxs)("form",{onSubmit:v,className:"space-y-6",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(T._,{htmlFor:"roleName",children:"Role Name"}),(0,t.jsx)(m.I,{id:"roleName",placeholder:"e.g. Admin, Developer, Viewer",disabled:l||(null==s?void 0:s.name)==="admin"||(null==s?void 0:s.name)==="default",value:o,onChange:e=>c(e.target.value),required:!0}),(null==s?void 0:s.name)==="admin"||(null==s?void 0:s.name)==="default"?(0,t.jsx)("p",{className:"text-sm text-destructive",children:"Admin and default roles names cannot be changed, these are reserved for system defaults."}):null]}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"text-lg font-medium",children:"Permissions"}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:"Configure access levels for different areas of the system"})]}),z.map(e=>{let s=e.icon;return(0,t.jsxs)(p.Zb,{children:[(0,t.jsxs)(p.Ol,{className:"pb-3",children:[(0,t.jsxs)(p.ll,{className:"flex items-center gap-2 text-base",children:[(0,t.jsx)(s,{className:"h-4 w-4"}),e.label]}),(0,t.jsx)(p.SZ,{className:"text-sm",children:e.description})]}),(0,t.jsx)(p.aY,{children:(0,t.jsx)(_,{value:f[e.key],onValueChange:s=>h(e.key,s),disabled:l,children:I.map(s=>(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(O,{value:s.value,id:"".concat(e.key,"-").concat(s.value)}),(0,t.jsx)(T._,{htmlFor:"".concat(e.key,"-").concat(s.value),className:"flex-1 cursor-pointer",children:(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)("span",{className:"font-medium",children:s.label}),(0,t.jsx)("span",{className:"text-sm text-muted-foreground",children:s.description})]})})]},s.value))})})]},e.key)})]}),(0,t.jsxs)("div",{className:"flex items-center justify-end gap-3 pt-4 border-t",children:[(0,t.jsx)(u.z,{type:"button",variant:"outline",onClick:n,disabled:l,children:"Cancel"}),(0,t.jsx)(u.z,{type:"submit",disabled:l||!o.trim(),children:l?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(i.Z,{className:"mr-2 h-4 w-4 animate-spin"}),s?"Updating...":"Creating..."]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(d.Z,{className:"mr-2 h-4 w-4"}),s?"Update Role":"Create Role"]})})]})]})}function U(){var e;let[s,a]=(0,r.useState)(""),[y,k]=(0,r.useState)(!1),[R,C]=(0,r.useState)(!1),[S,A]=(0,r.useState)(!1),[T,Z]=(0,r.useState)(null),{loading:D,error:E,data:_,refetch:O}=(0,b.aM)(w.l1,{variables:{page:1,limit:100},fetchPolicy:"cache-first",nextFetchPolicy:"network-only"}),[I,{loading:z}]=(0,N.D)(w.kH,{refetchQueries:[w.l1,"GetUserRoles"]}),[U,{loading:V}]=(0,N.D)(w.ZX,{refetchQueries:[w.l1,"GetUserRoles"]}),[F,{loading:M}]=(0,N.D)(w.JM,{refetchQueries:[w.l1,"GetUserRoles"]}),W=((null==_?void 0:null===(e=_.rolesPagination)||void 0===e?void 0:e.items)||[]).filter(e=>e.name.toLowerCase().includes(s.toLowerCase())),L=e=>{let s=[];if(e.agents){let a=e.agents.toLowerCase();a.includes("write")||a.includes("create")||a.includes("update")||a.includes("delete")?s.push({name:"Agents",level:"Read/Write"}):(a.includes("read")||a.includes("view"))&&s.push({name:"Agents",level:"Read"})}if(e.workflows){let a=e.workflows.toLowerCase();a.includes("write")||a.includes("create")||a.includes("update")||a.includes("delete")?s.push({name:"Workflows",level:"Read/Write"}):(a.includes("read")||a.includes("view"))&&s.push({name:"Workflows",level:"Read"})}if(e.variables){let a=e.variables.toLowerCase();a.includes("write")||a.includes("create")||a.includes("update")||a.includes("delete")?s.push({name:"Variables",level:"Read/Write"}):(a.includes("read")||a.includes("view"))&&s.push({name:"Variables",level:"Read"})}if(e.users){let a=e.users.toLowerCase();a.includes("write")||a.includes("create")||a.includes("update")||a.includes("delete")?s.push({name:"Users",level:"Read/Write"}):(a.includes("read")||a.includes("view"))&&s.push({name:"Users",level:"Read"})}if(e.api){let a=e.api.toLowerCase();a.includes("write")||a.includes("create")||a.includes("update")||a.includes("delete")?s.push({name:"API",level:"Read/Write"}):(a.includes("read")||a.includes("view"))&&s.push({name:"API",level:"Read"})}return s},q=async e=>{try{await I({variables:{name:e.name,agents:e.agents,api:e.api,workflows:e.workflows,variables:e.variables,users:e.users}}),k(!1),(0,j.Am)({title:"Success",description:"Role created successfully"})}catch(e){(0,j.Am)({title:"Error",description:"Failed to create role",variant:"destructive"})}},B=async e=>{if(T)try{await U({variables:{id:T.id,name:e.name,agents:e.agents,api:e.api,workflows:e.workflows,variables:e.variables,users:e.users}}),C(!1),Z(null),(0,j.Am)({title:"Success",description:"Role updated successfully"})}catch(e){(0,j.Am)({title:"Error",description:"Failed to update role",variant:"destructive"})}},Y=async()=>{if(T)try{await F({variables:{id:T.id}}),A(!1),Z(null),(0,j.Am)({title:"Success",description:"Role deleted successfully"})}catch(e){(0,j.Am)({title:"Error",description:"Failed to delete role",variant:"destructive"})}};return(0,t.jsxs)("div",{className:"container mx-auto py-6 space-y-8 max-w-7xl",children:[(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)(f.default,{href:"/users",children:(0,t.jsxs)(u.z,{variant:"ghost",size:"sm",className:"mb-2 w-fit",children:[(0,t.jsx)(l.Z,{className:"mr-2 h-4 w-4"}),"Back to Users"]})}),(0,t.jsx)("h1",{className:"text-3xl font-bold tracking-tight",children:"Role Management"}),(0,t.jsx)("p",{className:"text-muted-foreground",children:"Create and manage roles with specific permissions for agents, workflows, variables, the api and users."})]}),(0,t.jsxs)(p.Zb,{children:[(0,t.jsxs)(p.Ol,{children:[(0,t.jsx)(p.ll,{children:"Roles"}),(0,t.jsx)(p.SZ,{children:"Manage system roles and their permissions"})]}),(0,t.jsx)(p.aY,{children:(0,t.jsxs)("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",children:[(0,t.jsx)(m.I,{placeholder:"Search roles...",value:s,onChange:e=>a(e.target.value),className:"flex-1 max-w-md"}),(0,t.jsxs)(v.Vq,{open:y,onOpenChange:k,children:[(0,t.jsx)(v.hg,{asChild:!0,children:(0,t.jsxs)(u.z,{children:[(0,t.jsx)(n.Z,{className:"mr-2 h-4 w-4"}),"Create Role"]})}),(0,t.jsxs)(v.cZ,{className:"max-w-2xl max-h-[90vh] overflow-y-auto",children:[(0,t.jsxs)(v.fK,{children:[(0,t.jsx)(v.$N,{children:"Create New Role"}),(0,t.jsx)(v.Be,{children:"Define the role name and permissions for different system areas."})]}),(0,t.jsx)(P,{onSubmit:q,loading:z,onCancel:()=>k(!1)})]})]})]})})]}),(0,t.jsx)(p.Zb,{children:(0,t.jsx)(p.aY,{className:"p-0",children:D?(0,t.jsxs)("div",{className:"text-center py-8",children:[(0,t.jsx)(i.Z,{className:"h-8 w-8 animate-spin mx-auto mb-2"}),(0,t.jsx)("p",{className:"text-muted-foreground",children:"Loading roles..."})]}):0===W.length?(0,t.jsx)("div",{className:"text-center py-8 text-muted-foreground",children:s?"No roles found matching your search.":"No roles created yet. Create your first role above."}):(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)(h.iA,{children:[(0,t.jsx)(h.xD,{children:(0,t.jsxs)(h.SC,{children:[(0,t.jsx)(h.ss,{children:"Role Name"}),(0,t.jsx)(h.ss,{children:"Permissions"}),(0,t.jsx)(h.ss,{children:"Created"}),(0,t.jsx)(h.ss,{children:"Updated"}),(0,t.jsx)(h.ss,{className:"text-right",children:"Actions"})]})}),(0,t.jsx)(h.RM,{children:W.map(e=>(0,t.jsxs)(h.SC,{children:[(0,t.jsx)(h.pj,{children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(d.Z,{className:"h-4 w-4 text-muted-foreground"}),(0,t.jsx)("span",{className:"font-medium",children:e.name})]})}),(0,t.jsx)(h.pj,{children:(0,t.jsxs)("div",{className:"flex flex-wrap gap-1",children:[L(e).map((e,s)=>(0,t.jsxs)(g.C,{variant:"secondary",className:"text-xs",children:[e.name,": ",e.level]},s)),0===L(e).length&&(0,t.jsx)(g.C,{variant:"outline",className:"text-xs",children:"No permissions"})]})}),(0,t.jsx)(h.pj,{children:(0,x.WU)(new Date(e.createdAt||""),"PP hh:mm")}),(0,t.jsx)(h.pj,{children:(0,x.WU)(new Date(e.updatedAt||""),"PP hh:mm")}),(0,t.jsx)(h.pj,{className:"text-right",children:(0,t.jsxs)("div",{className:"flex items-center justify-end gap-2",children:[(0,t.jsxs)(v.Vq,{open:R&&(null==T?void 0:T.id)===e.id,onOpenChange:e=>{C(e),e||Z(null)},children:[(0,t.jsx)(v.hg,{asChild:!0,children:(0,t.jsx)(u.z,{variant:"ghost",size:"icon",onClick:()=>Z(e),className:"h-8 w-8",children:(0,t.jsx)(o.Z,{className:"h-4 w-4"})})}),(0,t.jsxs)(v.cZ,{className:"max-w-2xl max-h-[90vh] overflow-y-auto",children:[(0,t.jsxs)(v.fK,{children:[(0,t.jsx)(v.$N,{children:"Edit Role"}),(0,t.jsx)(v.Be,{children:"Update the role name and permissions."})]}),(0,t.jsx)(P,{initialData:T,onSubmit:B,loading:V,onCancel:()=>{C(!1),Z(null)}})]})]}),(0,t.jsxs)(v.Vq,{open:S&&(null==T?void 0:T.id)===e.id,onOpenChange:e=>{A(e),e||Z(null)},children:[(0,t.jsx)(v.hg,{asChild:!0,children:(0,t.jsx)(u.z,{variant:"ghost",size:"icon",onClick:()=>Z(e),disabled:"admin"===e.name||"default"===e.name,className:"h-8 w-8 text-red-500 hover:text-red-600 hover:bg-red-50 dark:hover:bg-red-950",children:(0,t.jsx)(c.Z,{className:"h-4 w-4"})})}),(0,t.jsxs)(v.cZ,{children:[(0,t.jsxs)(v.fK,{children:[(0,t.jsx)(v.$N,{children:"Delete Role"}),(0,t.jsxs)(v.Be,{children:['Are you sure you want to delete the role "',null==T?void 0:T.name,'"? This action cannot be undone.']})]}),(0,t.jsxs)(v.cN,{children:[(0,t.jsx)(u.z,{variant:"outline",onClick:()=>{A(!1),Z(null)},children:"Cancel"}),(0,t.jsx)(u.z,{variant:"destructive",onClick:Y,disabled:M||"admin"===e.name||"default"===e.name,children:M?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(i.Z,{className:"mr-2 h-4 w-4 animate-spin"}),"Deleting..."]}):"Delete Role"})]})]})]})]})})]},e.id))})]})})})})]})}},35974:function(e,s,a){"use strict";a.d(s,{C:function(){return i}});var t=a(57437),r=a(90535);a(2265);var l=a(94508);let n=(0,r.j)("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function i(e){let{className:s,variant:a,...r}=e;return(0,t.jsx)("div",{className:(0,l.cn)(n({variant:a}),s),...r})}},66070:function(e,s,a){"use strict";a.d(s,{Ol:function(){return i},SZ:function(){return o},Zb:function(){return n},aY:function(){return c},eW:function(){return u},ll:function(){return d}});var t=a(57437),r=a(2265),l=a(94508);let n=r.forwardRef((e,s)=>{let{className:a,...r}=e;return(0,t.jsx)("div",{ref:s,className:(0,l.cn)("rounded-lg border bg-card text-card-foreground shadow-sm",a),...r})});n.displayName="Card";let i=r.forwardRef((e,s)=>{let{className:a,...r}=e;return(0,t.jsx)("div",{ref:s,className:(0,l.cn)("flex flex-col space-y-1.5 p-6",a),...r})});i.displayName="CardHeader";let d=r.forwardRef((e,s)=>{let{className:a,...r}=e;return(0,t.jsx)("h3",{ref:s,className:(0,l.cn)("text-2xl font-semibold leading-none tracking-tight",a),...r})});d.displayName="CardTitle";let o=r.forwardRef((e,s)=>{let{className:a,...r}=e;return(0,t.jsx)("p",{ref:s,className:(0,l.cn)("text-sm text-muted-foreground",a),...r})});o.displayName="CardDescription";let c=r.forwardRef((e,s)=>{let{className:a,...r}=e;return(0,t.jsx)("div",{ref:s,className:(0,l.cn)("p-6 pt-0",a),...r})});c.displayName="CardContent";let u=r.forwardRef((e,s)=>{let{className:a,...r}=e;return(0,t.jsx)("div",{ref:s,className:(0,l.cn)("flex items-center p-6 pt-0",a),...r})});u.displayName="CardFooter"},26110:function(e,s,a){"use strict";a.d(s,{$N:function(){return p},Be:function(){return h},Vq:function(){return d},cN:function(){return x},cZ:function(){return f},fK:function(){return m},hg:function(){return o}});var t=a(57437),r=a(34567),l=a(32489),n=a(2265),i=a(94508);let d=r.fC,o=r.xz,c=r.h_;r.x8;let u=n.forwardRef((e,s)=>{let{className:a,...l}=e;return(0,t.jsx)(r.aV,{ref:s,className:(0,i.cn)("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",a),...l})});u.displayName=r.aV.displayName;let f=n.forwardRef((e,s)=>{let{className:a,children:n,...d}=e;return(0,t.jsxs)(c,{children:[(0,t.jsx)(u,{}),(0,t.jsxs)(r.VY,{ref:s,className:(0,i.cn)("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",a),...d,children:[n,(0,t.jsxs)(r.x8,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[(0,t.jsx)(l.Z,{className:"size-4"}),(0,t.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})});f.displayName=r.VY.displayName;let m=e=>{let{className:s,...a}=e;return(0,t.jsx)("div",{className:(0,i.cn)("flex flex-col space-y-1.5 text-center sm:text-left",s),...a})};m.displayName="DialogHeader";let x=e=>{let{className:s,...a}=e;return(0,t.jsx)("div",{className:(0,i.cn)("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",s),...a})};x.displayName="DialogFooter";let p=n.forwardRef((e,s)=>{let{className:a,...l}=e;return(0,t.jsx)(r.Dx,{ref:s,className:(0,i.cn)("text-lg font-semibold leading-none tracking-tight",a),...l})});p.displayName=r.Dx.displayName;let h=n.forwardRef((e,s)=>{let{className:a,...l}=e;return(0,t.jsx)(r.dk,{ref:s,className:(0,i.cn)("text-sm text-muted-foreground",a),...l})});h.displayName=r.dk.displayName},95186:function(e,s,a){"use strict";a.d(s,{I:function(){return n}});var t=a(57437),r=a(2265),l=a(94508);let n=r.forwardRef((e,s)=>{let{className:a,type:r,...n}=e;return(0,t.jsx)("input",{type:r,className:(0,l.cn)("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",a),ref:s,...n})});n.displayName="Input"},26815:function(e,s,a){"use strict";a.d(s,{_:function(){return o}});var t=a(57437),r=a(6394),l=a(90535),n=a(2265),i=a(94508);let d=(0,l.j)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),o=n.forwardRef((e,s)=>{let{className:a,...l}=e;return(0,t.jsx)(r.f,{ref:s,className:(0,i.cn)(d(),a),...l})});o.displayName=r.f.displayName},73578:function(e,s,a){"use strict";a.d(s,{RM:function(){return d},Rn:function(){return f},SC:function(){return o},iA:function(){return n},pj:function(){return u},ss:function(){return c},xD:function(){return i}});var t=a(57437),r=a(2265),l=a(94508);let n=r.forwardRef((e,s)=>{let{className:a,...r}=e;return(0,t.jsx)("div",{className:"relative w-full overflow-auto",children:(0,t.jsx)("table",{ref:s,className:(0,l.cn)("w-full caption-bottom text-sm",a),...r})})});n.displayName="Table";let i=r.forwardRef((e,s)=>{let{className:a,...r}=e;return(0,t.jsx)("thead",{ref:s,className:(0,l.cn)("[&_tr]:border-b",a),...r})});i.displayName="TableHeader";let d=r.forwardRef((e,s)=>{let{className:a,...r}=e;return(0,t.jsx)("tbody",{ref:s,className:(0,l.cn)("[&_tr:last-child]:border-0",a),...r})});d.displayName="TableBody",r.forwardRef((e,s)=>{let{className:a,...r}=e;return(0,t.jsx)("tfoot",{ref:s,className:(0,l.cn)("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",a),...r})}).displayName="TableFooter";let o=r.forwardRef((e,s)=>{let{className:a,...r}=e;return(0,t.jsx)("tr",{ref:s,className:(0,l.cn)("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",a),...r})});o.displayName="TableRow";let c=r.forwardRef((e,s)=>{let{className:a,...r}=e;return(0,t.jsx)("th",{ref:s,className:(0,l.cn)("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&:has([role=checkbox])]:w-[40px]",a),...r})});c.displayName="TableHead";let u=r.forwardRef((e,s)=>{let{className:a,...r}=e;return(0,t.jsx)("td",{ref:s,className:(0,l.cn)("p-4 align-middle [&:has([role=checkbox])]:pr-0 [&:has([role=checkbox])]:w-[40px]",a),...r})});u.displayName="TableCell";let f=r.forwardRef((e,s)=>{let{className:a,...r}=e;return(0,t.jsx)("caption",{ref:s,className:(0,l.cn)("mt-4 text-sm text-muted-foreground",a),...r})});f.displayName="TableCaption"},77992:function(e,s,a){"use strict";a.d(s,{Am:function(){return u},pm:function(){return f}});var t=a(2265);let r=0,l=new Map,n=e=>{if(l.has(e))return;let s=setTimeout(()=>{l.delete(e),c({type:"REMOVE_TOAST",toastId:e})},1e6);l.set(e,s)},i=(e,s)=>{switch(s.type){case"ADD_TOAST":return{...e,toasts:[s.toast,...e.toasts].slice(0,1)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(e=>e.id===s.toast.id?{...e,...s.toast}:e)};case"DISMISS_TOAST":{let{toastId:a}=s;return a?n(a):e.toasts.forEach(e=>{n(e.id)}),{...e,toasts:e.toasts.map(e=>e.id===a||void 0===a?{...e,open:!1}:e)}}case"REMOVE_TOAST":if(void 0===s.toastId)return{...e,toasts:[]};return{...e,toasts:e.toasts.filter(e=>e.id!==s.toastId)}}},d=[],o={toasts:[]};function c(e){o=i(o,e),d.forEach(e=>{e(o)})}function u(e){let{...s}=e,a=(r=(r+1)%Number.MAX_SAFE_INTEGER).toString(),t=()=>c({type:"DISMISS_TOAST",toastId:a});return c({type:"ADD_TOAST",toast:{...s,id:a,open:!0,onOpenChange:e=>{e||t()}}}),{id:a,dismiss:t,update:e=>c({type:"UPDATE_TOAST",toast:{...e,id:a}})}}function f(){let[e,s]=t.useState(o);return t.useEffect(()=>(d.push(s),()=>{let e=d.indexOf(s);e>-1&&d.splice(e,1)}),[e]),{...e,toast:u,dismiss:e=>c({type:"DISMISS_TOAST",toastId:e})}}}},function(e){e.O(0,[9851,7629,7093,6148,847,1942,7648,7823,8068,4567,3825,7107,5436,6373,2971,2117,1744],function(){return e(e.s=38434)}),_N_E=e.O()}]);
|
|
2
|
-
//# sourceMappingURL=page-
|
|
2
|
+
//# sourceMappingURL=page-b977b5c658004717.js.map
|