mtxuilib 0.0.511 → 0.0.512

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.
Files changed (66) hide show
  1. package/dist/esm/__registry__/index.js +1 -1
  2. package/dist/esm/form/MtFormPopupHolder.d.ts +1 -3
  3. package/dist/esm/form/SchemaFormView.d.ts +1 -1
  4. package/dist/esm/lib/blocks.d.ts +1 -1
  5. package/dist/esm/lib/trpc/TrpcAppProvider.d.ts +1 -1
  6. package/dist/esm/registry/blocks.d.ts +1 -1
  7. package/dist/esm/registry/default/example/card-demo.d.ts +1 -1
  8. package/dist/esm/registry/default/example/slider-demo.d.ts +1 -1
  9. package/dist/esm/registry/default/ui/carousel.d.ts +2 -2
  10. package/dist/esm/registry/default/ui/pagination.d.ts +1 -1
  11. package/dist/esm/registry/default/ui/use-toast.d.ts +1 -1
  12. package/dist/esm/registry/examples.d.ts +1 -1
  13. package/dist/esm/registry/new-york/example/card-demo.d.ts +1 -1
  14. package/dist/esm/registry/new-york/example/slider-demo.d.ts +1 -1
  15. package/dist/esm/registry/new-york/ui/carousel.d.ts +2 -2
  16. package/dist/esm/registry/new-york/ui/pagination.d.ts +1 -1
  17. package/dist/esm/registry/new-york/ui/use-toast.d.ts +1 -1
  18. package/dist/esm/registry/registry.d.ts +1 -1
  19. package/dist/esm/registry/ui.d.ts +1 -1
  20. package/dist/esm/webpack/webpack-clibin/webpack/webpack.config.dev.d.cts +1 -1
  21. package/dist/esm/webpack/webpack-clibin/webpack/webpack.plugins.d.cts +1 -1
  22. package/dist/esm/webpack/webpack-clibin/webpack.config.d.cts +1 -1
  23. package/dist/tsconfig.type.tsbuildinfo +1 -1
  24. package/package.json +1 -2
  25. package/dist/esm/components/ListItem.d.ts +0 -6
  26. package/dist/esm/components/ListItem.js +0 -1
  27. package/dist/esm/components/MtUnaryCallErrorView.d.ts +0 -7
  28. package/dist/esm/components/MtUnaryCallErrorView.js +0 -1
  29. package/dist/esm/components/PageCmds.d.ts +0 -2
  30. package/dist/esm/components/PageCmds.js +0 -1
  31. package/dist/esm/components/PageSearchCmd.d.ts +0 -2
  32. package/dist/esm/components/PageSearchCmd.js +0 -1
  33. package/dist/esm/components/PostCard.d.ts +0 -5
  34. package/dist/esm/components/PostCard.js +0 -1
  35. package/dist/esm/components/auth/AuthPage.d.ts +0 -2
  36. package/dist/esm/components/auth/AuthPage.js +0 -1
  37. package/dist/esm/components/auth/LoginScreen2.d.ts +0 -2
  38. package/dist/esm/components/auth/LoginScreen2.js +0 -1
  39. package/dist/esm/components/auth/UserAuthForm.d.ts +0 -6
  40. package/dist/esm/components/auth/UserAuthForm.js +0 -1
  41. package/dist/esm/components/blog/BlogPostActions.d.ts +0 -4
  42. package/dist/esm/components/blog/BlogPostActions.js +0 -1
  43. package/dist/esm/components/blog/BlogPostCreateForm.d.ts +0 -2
  44. package/dist/esm/components/blog/BlogPostCreateForm.js +0 -1
  45. package/dist/esm/components/blog/BlogPostImportDlgUrl.d.ts +0 -6
  46. package/dist/esm/components/blog/BlogPostImportDlgUrl.js +0 -1
  47. package/dist/esm/components/blog/BlogPostList.d.ts +0 -2
  48. package/dist/esm/components/blog/BlogPostList.js +0 -1
  49. package/dist/esm/components/blog/PostCard.d.ts +0 -5
  50. package/dist/esm/components/blog/PostCard.js +0 -1
  51. package/dist/esm/components/blog/PostEditForm.d.ts +0 -2
  52. package/dist/esm/components/blog/PostEditForm.js +0 -1
  53. package/dist/esm/components/blog/post-content.d.ts +0 -5
  54. package/dist/esm/components/blog/post-content.js +0 -1
  55. package/dist/esm/components/blog/post.atoms.d.ts +0 -11
  56. package/dist/esm/components/blog/post.atoms.js +0 -1
  57. package/dist/esm/curd/CommonListViewV2.d.ts +0 -12
  58. package/dist/esm/curd/CommonListViewV2.js +0 -1
  59. package/dist/esm/curd/CreateFormV2.d.ts +0 -17
  60. package/dist/esm/curd/CreateFormV2.js +0 -1
  61. package/dist/esm/curd/CurdViewView.d.ts +0 -65
  62. package/dist/esm/curd/CurdViewView.js +0 -1
  63. package/dist/esm/curd/curd-detail.d.ts +0 -3
  64. package/dist/esm/curd/curd-detail.js +0 -1
  65. package/dist/esm/curd/toolbar-buttons.d.ts +0 -3
  66. package/dist/esm/curd/toolbar-buttons.js +0 -1
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mtxuilib",
3
3
  "private": false,
4
- "version": "0.0.511",
4
+ "version": "0.0.512",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -157,7 +157,6 @@
157
157
  "date-fns": "^3.6.0",
158
158
  "embla-carousel-autoplay": "8.0.0-rc15",
159
159
  "embla-carousel-react": "8.0.0-rc15",
160
- "gomtm": "*",
161
160
  "html-react-parser": "^5.1.8",
162
161
  "input-otp": "^1.0.1",
163
162
  "jotai": "^2.8.0",
@@ -1,6 +0,0 @@
1
- /// <reference types="react" />
2
- import { ListItem } from "gomtm/gomtmpb/mtm/sppb/mtm_pb";
3
- import { PlainMessage } from "gomtm";
4
- export declare const ListItemView: (props: {
5
- item: PlainMessage<ListItem>;
6
- }) => import("react").JSX.Element | null;
@@ -1 +0,0 @@
1
- "use client";import{jsx as i,jsxs as c}from"react/jsx-runtime";import{MtLink as m}from"../common/mtlink";import{useCurdView as n}from"../curd/CurdViewView";import{cn as a}from"../lib/utils";import{MtButton as r}from"../ui/ui-mt/Button";import{PostCard as l}from"./blog/PostCard";const k=o=>{var e,s;const{item:t}=o;if((e=t==null?void 0:t.item)!=null&&e.value)switch(((s=t.item)==null?void 0:s.case)||""){case"commonListItem":return i(d,{item:t.item.value});case"postCard":return i(l,{item:t.item.value});default:return i("span",{className:"bg-red-600 p-2",children:"unknow list item type"})}return null},d=o=>{const{item:t}=o,e=n();return i(r,{variant:"ghost",onClick:()=>{e.openShow(t.id)},className:a("flex min-h-16 justify-start border p-4 text-left",t.id==e.activateId&&" font-bold"),"aria-label":t.id,children:c(m,{href:e.showLink(t.id),children:[t.title||t.id,t.description&&i("div",{children:t.description})]})})};export{k as ListItemView};
@@ -1,7 +0,0 @@
1
- /// <reference types="react" />
2
- import { PlainMessage } from "gomtm";
3
- import { MtmError } from "gomtm/gomtmpb/mtm/sppb/mtm_pb";
4
- export declare const MtUnaryCallErrorView: (props: {
5
- unaryError: PlainMessage<MtmError>;
6
- retry?: () => void;
7
- }) => import("react").JSX.Element;
@@ -1 +0,0 @@
1
- "use client";import{jsx as r,jsxs as s}from"react/jsx-runtime";const l=t=>{const{unaryError:e,retry:o}=t;return s("div",{className:"bg-red-400 p-4",children:["code: ",e.errCode,r("div",{children:r("pre",{className:"prose dark:prose-invert break-words",children:e.errMessage})}),o&&r("button",{onClick:()=>{o()},children:"retry"})]})};export{l as MtUnaryCallErrorView};
@@ -1,2 +0,0 @@
1
- /// <reference types="react" />
2
- export declare function PageCommands(): import("react").JSX.Element;
@@ -1 +0,0 @@
1
- "use client";import{jsx as o,jsxs as a}from"react/jsx-runtime";import{debounce as t}from"lodash";import{useState as d}from"react";import{useHotkeys as r}from"react-hotkeys-hook";import{CommandDialog as s,CommandEmpty as l,CommandInput as p,CommandList as C,CommandSeparator as u}from"../ui/command";function y(){const[m,e]=d(!1);return r("alt+d",()=>{console.log("PageCommands"),e(n=>!n)},[]),a(s,{open:m,onOpenChange:e,children:[o(p,{placeholder:"Type a command or search...",onValueChange:t(n=>{},500)}),a(C,{children:[o(l,{children:"No results found."}),o(u,{})]})]})}export{y as PageCommands};
@@ -1,2 +0,0 @@
1
- /// <reference types="react" />
2
- export declare const PageSearchCmd: () => import("react").JSX.Element;
@@ -1 +0,0 @@
1
- "use client";var i=Object.defineProperty,u=Object.defineProperties;var c=Object.getOwnPropertyDescriptors;var s=Object.getOwnPropertySymbols;var p=Object.prototype.hasOwnProperty,f=Object.prototype.propertyIsEnumerable;var d=(r,o,e)=>o in r?i(r,o,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[o]=e,n=(r,o)=>{for(var e in o||(o={}))p.call(o,e)&&d(r,e,o[e]);if(s)for(var e of s(o))f.call(o,e)&&d(r,e,o[e]);return r},m=(r,o)=>u(r,c(o));import{jsx as a,jsxs as t}from"react/jsx-runtime";import{useState as b}from"react";import{useForm as h}from"react-hook-form";import{useHotkeys as C}from"react-hotkeys-hook";import{Icons as g}from"../icons/icons";import{CommandDialog as x,CommandEmpty as y,CommandInput as k,CommandList as S,CommandSeparator as v}from"../ui/command";import{Input as N}from"../ui/input";import{MtButton as _}from"../ui/ui-mt/Button";import{MtForm as w}from"../ui/ui-mt/MtForm";const q=()=>{const[r,o]=b(!1);C("alt+s",()=>{console.log("PageCommands"),o(l=>!l)},[]);const e=h();return t(w,m(n({},e),{children:[a("form",{onSubmit:e.handleSubmit(()=>{}),children:a("div",{className:"relative flex w-full flex-wrap items-stretch",children:t("div",{className:"flex",children:[a(N,m(n({placeholder:"search"},e.register("q")),{"aria-label":"Search","aria-describedby":"button-addon1",type:"search",className:" focus:border-primary dark:focus:border-primary relative m-0 -mr-0.5 block h-auto min-w-0 flex-auto rounded-l border border-solid border-neutral-300 bg-transparent bg-clip-padding px-3 py-1 text-base font-normal leading-[1.6] text-neutral-700 outline-none transition duration-200 ease-in-out focus:z-[3] focus:text-neutral-700 focus:shadow-[inset_0_0_0_1px_rgb(59,113,202)] focus:outline-none dark:border-neutral-600 dark:text-neutral-200 dark:placeholder:text-neutral-200"})),a(_,{className:" rounded-l-0",children:a(g.search,{})})]})})}),t(x,{open:r,onOpenChange:o,children:[a(k,{placeholder:"Type a command or search...",onValueChange:l=>{o(!1)}}),t(S,{children:[a(y,{children:"No results found."}),a(v,{})]})]})]}))};export{q as PageSearchCmd};
@@ -1,5 +0,0 @@
1
- /// <reference types="react" />
2
- import { PostCardItem } from "gomtm/gomtmpb/mtm/sppb/mtm_pb";
3
- export declare const PostCard: (props: {
4
- item: PostCardItem;
5
- }) => import("react").JSX.Element;
@@ -1 +0,0 @@
1
- "use client";import{jsx as e,jsxs as a}from"react/jsx-runtime";import{MtLink as r}from"../common/mtlink";import{Card as i,CardContent as s,CardDescription as l,CardFooter as d,CardHeader as p,CardTitle as c}from"../ui/card";const x=o=>{const{item:t}=o;return a(i,{className:"w-[350px]",children:[a(p,{children:[e(c,{children:e(r,{href:`/post/${t.id}`,className:"pb-4 text-3xl font-bold hover:text-gray-700",children:t==null?void 0:t.title})}),e(l,{children:"Deploy your new project in one-click."})]}),e(s,{children:a("article",{className:"my-4 flex flex-col",children:[e(r,{href:`/post/${t.id}`,className:"hover:opacity-75",children:t.topImage&&e("img",{src:t.topImage,alt:t.title})}),a("div",{className:"flex flex-col justify-start bg-white p-6",children:[e(r,{href:`/post/${t.id}`,className:"pb-4 text-sm font-bold uppercase text-blue-700",children:t.category||"news"}),a("p",{className:"pb-3 text-sm",children:["By ",e(r,{href:"#",children:t.author}),","]}),e("div",{children:t.excerpt})]})]})}),e(d,{className:"flex justify-end",children:e(r,{variant:"ghost",href:`/post/${t.id}`,children:"Show"})})]})};export{x as PostCard};
@@ -1,2 +0,0 @@
1
- /// <reference types="react" />
2
- export declare function AuthPage(): import("react").JSX.Element;
@@ -1 +0,0 @@
1
- "use client";import{Fragment as a,jsx as e,jsxs as t}from"react/jsx-runtime";import{ChevronLeft as s}from"lucide-react";import{MtLink as o}from"../../common/mtlink";import{Icons as i}from"../../icons/icons";import{MtButton as n}from"../../ui/ui-mt/Button";import{LoginScreen2 as c}from"./LoginScreen2";import{UserAuthForm as r}from"./UserAuthForm";function d(){return t("div",{className:"size-screen container flex flex-col items-center justify-center",children:[e("div",{className:"absolute left-4 top-4 focus:z-10 focus:outline-none md:left-8 md:top-8",children:e(o,{href:"/",children:e(n,{children:t(a,{children:[e(s,{className:"mr-2 size-4"}),"Back"]})})})}),t("div",{className:"mx-auto flex w-full flex-col justify-center space-y-6 sm:w-[350px]",children:[t("div",{className:"flex flex-col space-y-2 text-center",children:[e(i.logo,{color:"white",className:"mx-auto size-12"}),e("h1",{className:"text-2xl font-bold ",children:"Welcome back"}),e("p",{className:"text-sm ",children:"Sign in with Github to login"})]}),e(r,{}),e(c,{}),e("p",{className:"px-8 text-center text-sm ",children:e(o,{href:"/register",className:"hover:text-brand underline",children:"Don't have an account? Sign Up"})})]})]})}export{d as AuthPage};
@@ -1,2 +0,0 @@
1
- /// <reference types="react" />
2
- export declare function LoginScreen2(): import("react").JSX.Element;
@@ -1 +0,0 @@
1
- "use client";var v=Object.defineProperty;var d=Object.getOwnPropertySymbols;var w=Object.prototype.hasOwnProperty,N=Object.prototype.propertyIsEnumerable;var f=(o,t,e)=>t in o?v(o,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):o[t]=e,u=(o,t)=>{for(var e in t||(t={}))w.call(t,e)&&f(o,e,t[e]);if(d)for(var e of d(t))N.call(t,e)&&f(o,e,t[e]);return o};var g=(o,t,e)=>new Promise((p,i)=>{var m=r=>{try{a(e.next(r))}catch(l){i(l)}},c=r=>{try{a(e.throw(r))}catch(l){i(l)}},a=r=>r.done?p(r.value):Promise.resolve(r.value).then(m,c);a((e=e.apply(o,t)).next())});import{jsx as s,jsxs as n}from"react/jsx-runtime";import{AuthLoginInput as S}from"gomtm/validations/auth";import{useRouter as b,useSearchParams as M}from"next/navigation";import{MtLink as x}from"../../common/mtlink";import{ZForm as L,useZodForm as F}from"../../form/ZodForm";import{Input as h}from"../../ui/input";import{MtButton as y}from"../../ui/ui-mt/Button";function O(){const o=F({schema:S,defaultValues:{}}),t=M(),e=b();return n("div",{className:"mx-auto max-w-md",children:[s("div",{className:"prose",children:"Sign in"}),n("div",{className:"prose text-sm",children:["New to company?"," ",s(x,{href:"#replace-with-a-link",children:"Sign up!"})]}),s(y,{variant:"ghost",className:"bg-opacity/0.8 w-full bg-neutral-50",children:"Continue with Google"}),n(L,{form:o,className:"space-y-2",handleSubmit:i=>g(this,null,function*(){const m=yield fetch("/api.v1/login",{method:"POST",body:JSON.stringify(i)}),{success:c}=yield m.json();if(c){const a=t.get("next");e.push(a!=null?a:"/"),e.refresh()}else alert("Login failed")}),children:[s(h,u({},o.register("username"))),s(h,u({type:"password"},o.register("password"))),s("div",{className:"flex items-center justify-between"}),s(y,{type:"submit",className:"w-full",children:"Sign in"})]}),s("footer",{className:"py-3",children:n("div",{className:"prose text-center",children:["\xA9 Mtm ltd. ",new Date().getFullYear()]})})]})}export{O as LoginScreen2};
@@ -1,6 +0,0 @@
1
- /// <reference types="react/experimental" />
2
- import * as React from "react";
3
- interface UserAuthFormProps extends React.HTMLAttributes<HTMLDivElement> {
4
- }
5
- export declare function UserAuthForm({ className, ...props }: UserAuthFormProps): React.JSX.Element;
6
- export {};
@@ -1 +0,0 @@
1
- "use client";var p=Object.defineProperty,v=Object.defineProperties;var f=Object.getOwnPropertyDescriptors;var r=Object.getOwnPropertySymbols;var n=Object.prototype.hasOwnProperty,m=Object.prototype.propertyIsEnumerable;var o=(t,e,s)=>e in t?p(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s,l=(t,e)=>{for(var s in e||(e={}))n.call(e,s)&&o(t,s,e[s]);if(r)for(var s of r(e))m.call(e,s)&&o(t,s,e[s]);return t},u=(t,e)=>v(t,f(e));var d=(t,e)=>{var s={};for(var i in t)n.call(t,i)&&e.indexOf(i)<0&&(s[i]=t[i]);if(t!=null&&r)for(var i of r(t))e.indexOf(i)<0&&m.call(t,i)&&(s[i]=t[i]);return s};import{jsx as a,jsxs as c}from"react/jsx-runtime";import{cn as b}from"../../lib/utils";import{MtButton as g}from"../../ui/ui-mt/Button";function M(s){var i=s,{className:t}=i,e=d(i,["className"]);return c("div",u(l({className:b("grid gap-6",t)},e),{children:[c("div",{className:"relative",children:[a("div",{className:"absolute inset-0 flex items-center",children:a("div",{className:"w-full border-t "})}),a("div",{className:"relative flex justify-center text-xs uppercase",children:a("span",{className:"bg-appbg px-2 ",children:"Continue with"})})]}),c(g,{type:"button",children:[a("svg",{className:"mr-2 size-4","aria-hidden":"true",focusable:"false","data-prefix":"fab","data-icon":"github",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 496 512",children:a("path",{fill:"currentColor",d:"M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3 .3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5 .3-6.2 2.3zm44.2-1.7c-2.9 .7-4.9 2.6-4.6 4.9 .3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3 .7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3 .3 2.9 2.3 3.9 1.6 1 3.6 .7 4.3-.7 .7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3 .7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3 .7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"})}),"Github"]})]}))}export{M as UserAuthForm};
@@ -1,4 +0,0 @@
1
- /// <reference types="react" />
2
- export declare const BlogPostItemActions: (props: {
3
- postId: string;
4
- }) => import("react").JSX.Element;
@@ -1 +0,0 @@
1
- "use client";import{jsx as o,jsxs as n}from"react/jsx-runtime";import{Icons as p}from"../../icons/icons";import{DropdownMenu as s,DropdownMenuContent as d,DropdownMenuItem as u,DropdownMenuSeparator as a,DropdownMenuShortcut as i,DropdownMenuTrigger as m}from"../../ui/dropdown-menu";import{MtButton as M}from"../../ui/ui-mt/Button";import{DropdownMenuItemLink as t}from"../../ui/ui-mt/DropdownMenuItemLink";const g=r=>{const{postId:e}=r;return n(s,{children:[o(m,{asChild:!0,children:n(M,{variant:"ghost",className:"data-[state=open]:bg-muted flex size-8 p-0",children:[o(p.chevronRight,{className:"size-4"}),o("span",{className:"sr-only",children:"Open menu"})]})}),n(d,{align:"end",className:"w-[160px]",children:[o(t,{href:`/post/${e}/edit`,children:"Edit"}),o(t,{href:`/post/${e}/create`,children:"create"}),o(a,{}),n(u,{children:["Delete",o(i,{children:"\u2318\u232B"})]})]})]})};export{g as BlogPostItemActions};
@@ -1,2 +0,0 @@
1
- /// <reference types="react" />
2
- export declare const BlogPostCreateForm: () => import("react").JSX.Element;
@@ -1 +0,0 @@
1
- "use client";var s=Object.defineProperty;var l=Object.getOwnPropertySymbols;var p=Object.prototype.hasOwnProperty,f=Object.prototype.propertyIsEnumerable;var i=(t,o,e)=>o in t?s(t,o,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[o]=e,m=(t,o)=>{for(var e in o||(o={}))p.call(o,e)&&i(t,e,o[e]);if(l)for(var e of l(o))f.call(o,e)&&i(t,e,o[e]);return t};import{Fragment as n,jsx as r}from"react/jsx-runtime";import{useFormContext as u}from"react-hook-form";import{InputField as F}from"../../ui/ui-mt/input-field/InputField";const a=()=>{const t=u();return r(n,{children:t&&r(n,{children:r(F,m({label:"title"},t.register("title")))})})};export{a as BlogPostCreateForm};
@@ -1,6 +0,0 @@
1
- /// <reference types="react" />
2
- export declare function BlogPostImportUrlFormDlg(): import("react").JSX.Element;
3
- export declare function BlogPostImportUrlForm(props: {
4
- onCancel?: () => void;
5
- onSubmit?: (values: any) => void;
6
- }): import("react").JSX.Element;
@@ -1 +0,0 @@
1
- "use client";var C=Object.defineProperty,d=Object.defineProperties;var S=Object.getOwnPropertyDescriptors;var p=Object.getOwnPropertySymbols;var D=Object.prototype.hasOwnProperty,I=Object.prototype.propertyIsEnumerable;var c=(t,o,r)=>o in t?C(t,o,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[o]=r,u=(t,o)=>{for(var r in o||(o={}))D.call(o,r)&&c(t,r,o[r]);if(p)for(var r of p(o))I.call(o,r)&&c(t,r,o[r]);return t},f=(t,o)=>d(t,S(o));var F=(t,o,r)=>new Promise((e,l)=>{var b=m=>{try{i(r.next(m))}catch(a){l(a)}},g=m=>{try{i(r.throw(m))}catch(a){l(a)}},i=m=>m.done?e(m.value):Promise.resolve(m.value).then(b,g);i((r=r.apply(t,o)).next())});import{Fragment as q,jsx as n,jsxs as s}from"react/jsx-runtime";import{useState as h}from"react";import{useForm as v}from"react-hook-form";import{EditFormToolbar as B}from"../../form/EditFormToolbar";import{Dialog as x,DialogContent as y}from"../../ui/dialog";import{Form as U,FormControl as M,FormDescription as P,FormField as k,FormItem as L,FormLabel as O,FormMessage as T}from"../../ui/form";import{Input as w}from"../../ui/input";import{MtButton as E}from"../../ui/ui-mt/Button";function V(){const[t,o]=h(!1);return s(q,{children:[n(E,{variant:"outline",onClick:()=>{o(!0)},children:"Import from url"}),n(x,{open:t,onOpenChange:o,children:n(y,{children:n(N,{onCancel:()=>{o(!1)},onSubmit:e=>F(this,null,function*(){o(!1)})})})})]})}function N(t){const{onCancel:o,onSubmit:r}=t,e=v();return n(U,f(u({},e),{children:s("form",{onSubmit:e.handleSubmit(l=>{r&&r(l)}),className:"flex w-full flex-col p-1",children:[n(k,{control:e.control,name:"url",render:({field:l})=>s(L,{children:[n(O,{children:"Url"}),n(M,{children:n(w,u({placeholder:"url"},l))}),n(P,{children:"\u8F93\u5165url\uFF0C \u5BFC\u5165\u7A0B\u5E8F\u5C06\u4ECE\u8FD9\u4E2A\u9875\u9762\u5C1D\u8BD5\u5BFC\u5165\u6587\u7AE0"}),n(T,{})]})}),n(B,{submitText:"ok",onCancel:o})]})}))}export{N as BlogPostImportUrlForm,V as BlogPostImportUrlFormDlg};
@@ -1,2 +0,0 @@
1
- /// <reference types="react" />
2
- export declare const BlogPostListView: () => import("react").JSX.Element;
@@ -1 +0,0 @@
1
- "use client";import{Fragment as o,jsx as t}from"react/jsx-runtime";import{useSuspenseInfiniteQuery as i}from"gomtm/connectquery";import{blogPostList as n}from"gomtm/gomtmpb/mtm/sppb/mtm-MtmService_connectquery";const u=()=>{const r=i(n,{pagination:{page:1}},{pageParamKey:"pagination",getNextPageParam:(a,p,e)=>({page:((e==null?void 0:e.page)||0)+1})});return t(o,{children:t("pre",{children:JSON.stringify(r,null,2)})})};export{u as BlogPostListView};
@@ -1,5 +0,0 @@
1
- /// <reference types="react" />
2
- import { PostCardItem } from "gomtm/gomtmpb/mtm/sppb/mtm_pb";
3
- export declare const PostCard: (props: {
4
- item: PostCardItem;
5
- }) => import("react").JSX.Element;
@@ -1 +0,0 @@
1
- "use client";import{jsx as e,jsxs as o}from"react/jsx-runtime";import{MtLink as r}from"../../common/mtlink";import{Card as s,CardContent as i,CardDescription as l,CardFooter as d,CardHeader as p,CardTitle as c}from"../../ui/card";import{BlogPostItemActions as m}from"./BlogPostActions";const g=a=>{const{item:t}=a;return o(s,{className:"w-[350px]",children:[o(p,{children:[e(c,{children:e(r,{href:`/post/${t.id}`,className:"pb-4 text-3xl font-bold hover:text-gray-700",children:t==null?void 0:t.title})}),e(l,{children:"Deploy your new project in one-click."})]}),e(i,{children:o("article",{className:"my-4 flex flex-col",children:[e(r,{href:`/post/${t.id}`,className:"hover:opacity-75",children:t.topImage&&e("img",{src:t.topImage,alt:t.title})}),o("div",{className:"flex flex-col justify-start bg-white p-6",children:[e(r,{href:`/post/${t.id}`,className:"pb-4 text-sm font-bold uppercase text-blue-700",children:t.category||"news"}),o("p",{className:"pb-3 text-sm",children:["By ",e(r,{href:"#",children:t.author}),","]}),e("div",{children:t.excerpt})]})]})}),o(d,{className:"flex justify-end",children:[e(r,{variant:"ghost",href:`/post/${t.id}`,children:"Show"}),e(m,{postId:t.id})]})]})};export{g as PostCard};
@@ -1,2 +0,0 @@
1
- /// <reference types="react" />
2
- export declare function PostEditForm(): import("react").JSX.Element;
@@ -1 +0,0 @@
1
- "use client";var b=Object.defineProperty;var c=Object.getOwnPropertySymbols;var f=Object.prototype.hasOwnProperty,v=Object.prototype.propertyIsEnumerable;var d=(o,t,r)=>t in o?b(o,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[t]=r,s=(o,t)=>{for(var r in t||(t={}))f.call(t,r)&&d(o,r,t[r]);if(c)for(var r of c(t))v.call(t,r)&&d(o,r,t[r]);return o};import{jsx as e,jsxs as a}from"react/jsx-runtime";import{useFormContext as T}from"react-hook-form";import{FormControl as m,FormDescription as x,FormField as l,FormItem as n,FormLabel as i,FormMessage as p}from"../../ui/form";import{Input as u}from"../../ui/input";import{Separator as h}from"../../ui/separator";import{Switch as N}from"../../ui/switch";import{Tabs as C,TabsContent as g,TabsList as y,TabsTrigger as F}from"../../ui/tabs";import{RichTextInput as I}from"../../ui/ui-mt/input-field/RichEditorInput";function j(){const o=T();return e("div",{className:"",children:a(C,{defaultValue:"edit",children:[a("div",{className:"flex items-center px-4 py-2",children:[e("h1",{className:"text-xl font-bold",children:"edit post"}),a(y,{className:"ml-auto",children:[e(F,{value:"edit",className:"text-zinc-600 dark:text-zinc-200",children:"\u7F16\u8F91"}),e(F,{value:"op",className:"text-zinc-600 dark:text-zinc-200",children:"\u64CD\u4F5C"})]})]}),e(h,{}),a(g,{value:"edit",className:"m-0",children:[e("input",s({type:"hidden"},o.register("id",{valueAsNumber:!0}))),e(l,{control:o.control,name:"title",render:({field:t})=>a(n,{children:[e(i,{children:"\u6807\u9898"}),e(m,{children:e(u,s({placeholder:"title"},t))}),e(p,{})]})}),e("div",{className:"container mx-auto flex items-center justify-center py-2",children:e(I,s({contentType:"html"},o.register("content")))})]}),e(g,{value:"op",className:"m-0",children:a("div",{className:"space-y-4",children:[e(l,{control:o.control,name:"slugs",render:({field:t})=>a(n,{children:[e(i,{children:"slugs"}),e(m,{children:e(u,s({placeholder:"slugs"},t))}),e(p,{})]})}),e(l,{control:o.control,name:"isManual",render:({field:t})=>a(n,{className:"flex flex-row items-center justify-between rounded-lg border p-3 shadow-sm",children:[a("div",{className:"space-y-0.5",children:[e(i,{children:"isManual"}),e(x,{children:"\u624B\u5DE5\u7F16\u8F91\u6807\u8BB0"})]}),e(m,{children:e(N,{checked:t.value,onCheckedChange:t.onChange})})]})})]})})]})})}export{j as PostEditForm};
@@ -1,5 +0,0 @@
1
- /// <reference types="react" />
2
- import { BlogPost } from "gomtm/gomtmpb/mtm/sppb/mtm_pb";
3
- export declare const BlogPostContent: (props: {
4
- post: BlogPost;
5
- }) => import("react").JSX.Element;
@@ -1 +0,0 @@
1
- "use client";import{jsx as o,jsxs as i}from"react/jsx-runtime";import{ImageNoExist as s}from"gomtm/consts";import{MtImage as r}from"../../common/MtImage";const c=e=>{const{post:t}=e;return i("article",{className:"prose dark:prose-invert p-2",children:[o("h1",{className:"mt-6",children:t.title}),o("section",{children:o(r,{src:t.topImage||s,alt:t.title,width:100,height:100})}),o("div",{dangerouslySetInnerHTML:{__html:t.content}})]})};export{c as BlogPostContent};
@@ -1,11 +0,0 @@
1
- import { PlainMessage } from "gomtm";
2
- import { BlogPost, BlogPostGetReq } from "gomtm/gomtmpb/mtm/sppb/mtm_pb";
3
- export declare const postDetailAtom: import("jotai").PrimitiveAtom<PlainMessage<BlogPost> | null> & {
4
- init: PlainMessage<BlogPost> | null;
5
- };
6
- export declare const postIdAtom: import("jotai").PrimitiveAtom<string | null> & {
7
- init: string | null;
8
- };
9
- export declare const blogPostGetReqAtom: import("jotai").PrimitiveAtom<Partial<PlainMessage<BlogPostGetReq>> | undefined> & {
10
- init: Partial<PlainMessage<BlogPostGetReq>> | undefined;
11
- };
@@ -1 +0,0 @@
1
- import{atom as o}from"jotai";const r=o(null),a=o(null),m=o(void 0);export{m as blogPostGetReqAtom,r as postDetailAtom,a as postIdAtom};
@@ -1,12 +0,0 @@
1
- import { InfiniteData, UseSuspenseInfiniteQueryResult } from "@tanstack/react-query";
2
- import type { ConnectError, Message, PlainMessage } from "gomtm";
3
- import { MethodUnaryDescriptor } from "gomtm/connectquery";
4
- import { MtmError } from "gomtm/gomtmpb/mtm/sppb/mtm_pb";
5
- import { PropsWithChildren } from "react";
6
- export declare function CommonListViewProvider<I extends Message<I>, O extends Message<O>>(props: {
7
- methodList: MethodUnaryDescriptor<I, any>;
8
- } & PropsWithChildren): import("react").JSX.Element;
9
- export declare function CommonListView<I extends Message<I>, O extends Message<O>>(): import("react").JSX.Element | null;
10
- export declare function useCommonListView<T extends Message<T>>(): {
11
- listQuery: UseSuspenseInfiniteQueryResult<InfiniteData<T & PlainMessage<MtmError>, unknown>, ConnectError> | null;
12
- };
@@ -1 +0,0 @@
1
- "use client";import{Fragment as k,jsx as e,jsxs as p}from"react/jsx-runtime";import{useSuspenseInfiniteQuery as f}from"gomtm/connectquery";import{ListViewLayout as m}from"gomtm/gomtmpb/mtm/sppb/mtm_pb";import{atom as y,useAtom as g}from"jotai";import{useHydrateAtoms as c}from"jotai/utils";import{ListItemView as P}from"../components/ListItem";import{MtUnaryCallErrorView as L}from"../components/MtUnaryCallErrorView";import{cn as h}from"../lib/utils";import{Pagination as I,PaginationContent as v,PaginationEllipsis as w,PaginationItem as r,PaginationLink as u,PaginationNext as x,PaginationPrevious as M}from"../ui/pagination";const l=y(null);function H(t){const{children:i,methodList:n}=t,o=f(n,{page:1},{pageParamKey:"pagination",getNextPageParam:(a,d,s)=>({page:((s==null?void 0:s.page)||0)+1})});return c([[l,o]]),e(k,{children:i})}function K(){const[t,i]=g(l);return t!=null&&t.data?p("div",{className:"relative w-full",children:[e("div",{className:h("w-full"),children:t.data.pages.map((n,o)=>{var a;return n.error_code?e(L,{unaryError:n},o):e(C,{layout:n.listLayout,children:(a=n==null?void 0:n.items)==null?void 0:a.map((d,s)=>e(P,{item:d},`${o}-${s}`))},o)})}),e(I,{children:p(v,{children:[e(r,{children:e(M,{href:"#"})}),e(r,{children:e(u,{href:"#",children:"1"})}),e(r,{children:e(u,{href:"#",isActive:!0,children:"2"})}),e(r,{children:e(u,{href:"#",children:"3"})}),e(r,{children:e(w,{})}),e(r,{children:e(x,{href:"#"})})]})}),e("div",{className:"absolute right-1 top-1"})]}):null}const C=t=>{const{children:i}=t;switch(t.layout){case m.simple:return e("div",{className:"flex flex-col space-y-1 rounded-md p-2 shadow-sm",children:i});case m.grid:return e("div",{className:"grid grid-cols-2 grid-rows-3 gap-4 px-4 lg:grid-cols-3",children:i});case m.card:return e("div",{className:"grid grid-cols-2 grid-rows-3 gap-4 px-4 lg:grid-cols-3",children:i});default:return i}};function _(){const[t,i]=g(l);return{listQuery:t}}export{K as CommonListView,H as CommonListViewProvider,_ as useCommonListView};
@@ -1,17 +0,0 @@
1
- import type { Message } from "gomtm";
2
- import { PartialMessage } from "gomtm";
3
- import { MethodUnaryDescriptor } from "gomtm/connectquery";
4
- import { PropsWithChildren } from "react";
5
- import { DefaultValues } from "react-hook-form";
6
- export declare function useCreateForm<I extends Message<I>, O extends Message<O>>(props: {
7
- defaultValues: DefaultValues<PartialMessage<I>>;
8
- mutationSig: MethodUnaryDescriptor<I, any>;
9
- }): {
10
- form: import("react-hook-form").UseFormReturn<PartialMessage<I>, any, undefined>;
11
- handleSubmit: (values: any) => void;
12
- handleFormSubmit: () => (e?: import("react").BaseSyntheticEvent<object, any, any> | undefined) => Promise<void>;
13
- handleCancel: () => void;
14
- };
15
- export declare function CreateFormV2<I extends Message<I>, O extends Message<O>>(props: {
16
- createForm: ReturnType<typeof useCreateForm>;
17
- } & PropsWithChildren): import("react").JSX.Element;
@@ -1 +0,0 @@
1
- "use client";var F=Object.defineProperty,b=Object.defineProperties;var M=Object.getOwnPropertyDescriptors;var s=Object.getOwnPropertySymbols;var l=Object.prototype.hasOwnProperty,d=Object.prototype.propertyIsEnumerable;var u=(e,t,o)=>t in e?F(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,c=(e,t)=>{for(var o in t||(t={}))l.call(t,o)&&u(e,o,t[o]);if(s)for(var o of s(t))d.call(t,o)&&u(e,o,t[o]);return e},f=(e,t)=>b(e,M(t));var p=(e,t)=>{var o={};for(var r in e)l.call(e,r)&&t.indexOf(r)<0&&(o[r]=e[r]);if(e!=null&&s)for(var r of s(e))t.indexOf(r)<0&&d.call(e,r)&&(o[r]=e[r]);return o};import{Fragment as k,jsx as n,jsxs as O}from"react/jsx-runtime";import{useMutation as C}from"gomtm/connectquery";import{useCallback as g}from"react";import{FormProvider as D,useForm as S}from"react-hook-form";import{EditFormToolbar as y}from"../form/EditFormToolbar";import{useMtRouter as I}from"../hooks/use-router";import{Dialog as P,DialogContent as V,DialogFooter as x}from"../ui/dialog";function H(e){const{defaultValues:t,mutationSig:o}=e,r=S({defaultValues:t}),m=C(o),a=g(h=>{m.mutateAsync(h)},[m]),i=g(()=>r.handleSubmit(a),[r,a]);return{form:r,handleSubmit:a,handleFormSubmit:i,handleCancel:()=>{}}}function J(e){const a=e,{children:t,createForm:o}=a,r=p(a,["children","createForm"]),m=I();return n(k,{children:n(P,{open:!0,onOpenChange:()=>{m.back()},children:n(V,{children:n(D,f(c({},o.form),{children:O("form",{onSubmit:o.handleFormSubmit,children:[t,n(x,{children:n(y,{onSubmit:i=>{o.handleSubmit(i)},onCancel:()=>m.back()})})]})}))})})})}export{J as CreateFormV2,H as useCreateForm};
@@ -1,65 +0,0 @@
1
- import { PlainMessage } from "gomtm";
2
- import { CurdView } from "gomtm/gomtmpb/mtm/sppb/mtm_pb";
3
- import { PropsWithChildren } from "react";
4
- export declare const activateIdAtom: import("jotai").PrimitiveAtom<string> & {
5
- init: string;
6
- };
7
- export declare const curdViewAtom: import("jotai").PrimitiveAtom<PlainMessage<CurdView> | null | undefined> & {
8
- init: PlainMessage<CurdView> | null | undefined;
9
- };
10
- export declare const curdViewIdAtom: import("jotai").PrimitiveAtom<string> & {
11
- init: string;
12
- };
13
- export declare const curdStore: {
14
- get: <Value>(atom: import("jotai").Atom<Value>) => Value;
15
- set: <Value_1, Args extends unknown[], Result>(atom: import("jotai").WritableAtom<Value_1, Args, Result>, ...args: Args) => Result;
16
- sub: (atom: import("jotai").Atom<unknown>, listener: () => void) => () => void;
17
- } & Partial<{
18
- dev_subscribe_store: (l: (action: {
19
- type: "write";
20
- flushed: Set<import("jotai").Atom<unknown>>;
21
- } | {
22
- type: "async-write";
23
- flushed: Set<import("jotai").Atom<unknown>>;
24
- } | {
25
- type: "sub";
26
- flushed: Set<import("jotai").Atom<unknown>>;
27
- } | {
28
- type: "unsub";
29
- } | {
30
- type: "restore";
31
- flushed: Set<import("jotai").Atom<unknown>>;
32
- }) => void, rev: 2) => () => void;
33
- dev_get_mounted_atoms: () => IterableIterator<import("jotai").Atom<unknown>>;
34
- dev_get_atom_state: (a: import("jotai").Atom<unknown>) => ({
35
- d: Map<import("jotai").Atom<unknown>, any & ({
36
- e: unknown;
37
- } | {
38
- v: unknown;
39
- })>;
40
- } & ({
41
- e: unknown;
42
- } | {
43
- v: unknown;
44
- })) | undefined;
45
- dev_get_mounted: (a: import("jotai").Atom<unknown>) => {
46
- l: Set<() => void>;
47
- t: Set<import("jotai").Atom<unknown>>;
48
- u?: (() => void) | undefined;
49
- } | undefined;
50
- dev_restore_atoms: (values: Iterable<readonly [import("jotai").Atom<unknown>, unknown]>) => void;
51
- }>;
52
- export declare const CurdViewView: (props: {
53
- idOrName: string;
54
- } & PropsWithChildren) => import("react").JSX.Element;
55
- export declare function useCurdView(): {
56
- curdView: CurdView;
57
- openShow: (id: string) => void;
58
- invalidateList: () => Promise<void>;
59
- invalidateGet: () => Promise<void>;
60
- activateId: string;
61
- setActivateId: (args_0: string | ((prev: string) => string)) => void;
62
- editLink: (id: string) => string;
63
- createLink: string;
64
- showLink: (id: string) => string;
65
- };
@@ -1 +0,0 @@
1
- "use client";var d=(n,s,o)=>new Promise((c,f)=>{var u=t=>{try{i(o.next(t))}catch(r){f(r)}},a=t=>{try{i(o.throw(t))}catch(r){f(r)}},i=t=>t.done?c(t.value):Promise.resolve(t.value).then(u,a);i((o=o.apply(n,s)).next())});import{Fragment as R,jsx as b}from"react/jsx-runtime";import{useQueryClient as x}from"@tanstack/react-query";import{useSuspenseQuery as A}from"gomtm/connectquery";import{curdViewGet as L}from"gomtm/gomtmpb/mtm/sppb/mtm-MtmService_connectquery";import{createInfiniteQueryKey as N,createQueryKey as q}from"gomtm/mtmquery";import{atom as l,createStore as K,useAtom as C}from"jotai";import{usePathname as M}from"next/navigation";import{compile as S,match as v}from"path-to-regexp";import{useCallback as m,useMemo as h}from"react";import{useMtRouter as G}from"../hooks/use-router";const O=l("0"),$=l(null),I=l(""),y=K(),V=n=>{const{idOrName:s,children:o}=n;return h(()=>{y.set(I,s)},[s]),b(R,{children:o})};function tt(){const n=M(),[s,o]=C(O,{store:y}),[c,f]=C(I,{store:y}),u=G(),a=x(),i=A(L,{id:c}),t=h(()=>{var e,p;return(p=(e=i.data)==null?void 0:e.item)==null?void 0:p.value},[i.data]),r=m(e=>t!=null&&t.routeShow?S(t==null?void 0:t.routeShow,{encode:encodeURIComponent})({id:e}):"",[t==null?void 0:t.routeShow]),P=m(e=>{r&&u.push(r(e))},[u,r]),g=m(()=>d(this,null,function*(){t&&(yield a.invalidateQueries({queryKey:N(t.svcName,t.methodList)}))}),[t,a]),k=m(()=>d(this,null,function*(){t&&(yield a.invalidateQueries({queryKey:q(t.svcName,t.methodGet)}))}),[t,a]),E=m(e=>t!=null&&t.routeEdit?S(t==null?void 0:t.routeEdit,{encode:encodeURIComponent})({id:e}):"",[t==null?void 0:t.routeEdit]),Q=h(()=>t!=null&&t.routeCreate&&(t==null?void 0:t.routeCreate)||"",[t==null?void 0:t.routeCreate]);return h(()=>{if(t!=null&&t.routeShow){const e=v(t.routeShow)(n);e&&o(e.params.id)}else if(t!=null&&t.routeEdit){const e=v(t.routeShow)(n);e&&o(e.params.id)}},[t==null?void 0:t.routeEdit,t==null?void 0:t.routeShow,n,o]),{curdView:t,openShow:P,invalidateList:g,invalidateGet:k,activateId:s,setActivateId:o,editLink:E,createLink:Q,showLink:r}}export{V as CurdViewView,O as activateIdAtom,y as curdStore,$ as curdViewAtom,I as curdViewIdAtom,tt as useCurdView};
@@ -1,3 +0,0 @@
1
- import { PropsWithChildren } from "react";
2
- export declare function CurdViewShow<T>(props: PropsWithChildren): import("react").JSX.Element | null;
3
- export declare const DetailViewActions: () => import("react").JSX.Element;
@@ -1 +0,0 @@
1
- "use client";import{Fragment as V,jsx as e,jsxs as a}from"react/jsx-runtime";import{useAtom as u}from"jotai";import{useSearchParams as p}from"next/navigation";import{createContext as c,useMemo as l,useState as D}from"react";import{Icons as m}from"../icons/icons";import{DropdownMenu as w,DropdownMenuContent as C,DropdownMenuGroup as f,DropdownMenuLabel as h,DropdownMenuSeparator as s,DropdownMenuTrigger as M}from"../ui/dropdown-menu";import{MtButton as P}from"../ui/ui-mt/Button";import{activateIdAtom as v,useCurdView as S}from"./CurdViewView";const b=c(void 0);function x(t){const[r,o]=D(!1);return e(b.Provider,{value:{isOpenEdit:r,setIsOpenEdit:o},children:t.children})}function L(t){const{children:r}=t,[o,n]=u(v),i=p();return l(()=>{const d=i.get("id");d&&n(d)},[i,n]),o?e(V,{children:e(x,{})}):null}const N=()=>{const t=S();return a(w,{children:[e(M,{asChild:!0,children:e(P,{variant:"ghost",className:"m-0 flex h-10 w-10 items-center justify-center border p-0 shadow-sm backdrop-blur",children:e(m.ellipsis,{})})}),a(C,{className:"w-56",children:[e(h,{children:"Edit"}),e(s,{}),e(f,{}),e(s,{})]})]})};export{L as CurdViewShow,N as DetailViewActions};
@@ -1,3 +0,0 @@
1
- /// <reference types="react" />
2
- export declare const CurdEditButton: () => import("react").JSX.Element;
3
- export declare const CurdCreateButton: () => import("react").JSX.Element;
@@ -1 +0,0 @@
1
- "use client";import{Fragment as i,jsx as r}from"react/jsx-runtime";import{MtLink as e}from"../common/mtlink";import{useCurdView as n}from"./CurdViewView";const d=()=>{const t=n();return r(i,{children:r(e,{variant:"ghost",href:t.editLink(t.activateId),children:"edit"})})},c=()=>{const t=n();return r(i,{children:r(e,{variant:"ghost",href:t.createLink,children:"new"})})};export{c as CurdCreateButton,d as CurdEditButton};