mtxuilib 0.0.397 → 0.0.398

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.
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ import { MtUnaryCallError } from "gomtm/connectquery/utils";
3
+ export declare const MtUnaryCallErrorView: (props: {
4
+ unaryError: MtUnaryCallError;
5
+ }) => import("react").JSX.Element;
@@ -0,0 +1 @@
1
+ "use client";import{jsx as e,jsxs as a}from"react/jsx-runtime";const l=o=>{const{unaryError:r}=o;return a("div",{className:"bg-red-400 p-4",children:["code: ",r.error_code,e("div",{children:e("pre",{className:"prose dark:prose-invert break-words",children:r.error_message})})]})};export{l as MtUnaryCallErrorView};
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare const ExamplePage: () => import("react").JSX.Element;
@@ -0,0 +1 @@
1
+ "use client";import{Fragment as C,jsx as r,jsxs as o}from"react/jsx-runtime";import d from"next/dynamic";import{Card as t,CardContent as a,CardTitle as m}from"../../ui/card";import{ExampleOg as p}from"./ExampleOg";import{DemoUserDetail as e}from"./examples";const l=d(()=>import("./ExampleLazyComponent").then(n=>n.ExampleLazyComponent),{}),x=()=>o(C,{children:[r(e,{userId:"5",randomError:!0}),r(e,{userId:"6",randomError:!0}),r("h3",{children:"with AutoSuspense"}),o(t,{children:[r(m,{children:"lazy example"}),r(a,{children:r(e,{userId:"7",randomError:!0})})]}),o(t,{children:[r(m,{children:"lazy example"}),r(a,{children:r(l,{})})]}),r(p,{})]});export{x as ExamplePage};
@@ -0,0 +1,4 @@
1
+ import { ReactNode } from 'react';
2
+ export declare function DemoReactQueryError({ children }: {
3
+ children?: ReactNode;
4
+ }): import("react").JSX.Element;
@@ -0,0 +1 @@
1
+ "use client";import{jsx as e}from"react/jsx-runtime";import{useSuspenseQuery as t}from"@tanstack/react-query";import{fetchPosts as o}from"./lib";function d({children:i}){const r=t({queryKey:["test1999"],queryFn:()=>o()});return e("div",{children:e("pre",{children:JSON.stringify(r.data)})})}export{d as DemoReactQueryError};
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ export declare const ExampleError2: () => import("react").JSX.Element;
3
+ export declare const ExampleError1: () => never;
4
+ export declare const WiehErrorExample: import("react").ForwardRefExoticComponent<object & import("react").RefAttributes<any>>;
@@ -0,0 +1 @@
1
+ "use client";import{Fragment as E,jsx as r}from"react/jsx-runtime";import{ErrorBoundary as e,withErrorBoundary as n}from"react-error-boundary";const l=()=>r(E,{children:r(e,{fallback:r("div",{children:"error123"}),children:r(o,{})})}),o=()=>{throw new Error("\u{1F4A5}\u{1F4A5}\u{1F4A5}")},p=n(o,{fallback:r("div",{children:"Something went wrong"}),onError(t,a){}});export{o as ExampleError1,l as ExampleError2,p as WiehErrorExample};