mtxuilib 0.0.352 → 0.0.355

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.
@@ -23,10 +23,10 @@ __export(SideNav_exports, {
23
23
  });
24
24
  module.exports = __toCommonJS(SideNav_exports);
25
25
  var import_jsx_runtime = require("react/jsx-runtime");
26
- var import_react_avatar = require("@radix-ui/react-avatar");
27
- var import_react_collapsible = require("@radix-ui/react-collapsible");
28
26
  var import_react_icons = require("@radix-ui/react-icons");
29
27
  var import_lucide_react = require("lucide-react");
28
+ var import_avatar = require("../ui/avatar");
29
+ var import_collapsible = require("../ui/collapsible");
30
30
  var import_command = require("../ui/command");
31
31
  var import_hover_card = require("../ui/hover-card");
32
32
  var import_Button = require("../ui/ui-mt/Button");
@@ -52,18 +52,18 @@ const SideNavs = () => {
52
52
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_command.CommandShortcut, { children: "\u2318B" })
53
53
  ] }),
54
54
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_command.CommandItem, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
55
- import_react_collapsible.Collapsible,
55
+ import_collapsible.Collapsible,
56
56
  {
57
57
  className: "w-full space-y-2",
58
58
  children: [
59
59
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-center justify-between space-x-4 ", children: [
60
60
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h4", { className: "text-sm font-semibold", children: "\u5206\u7C7B1" }),
61
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_collapsible.CollapsibleTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_Button.MtButton, { variant: "ghost", size: "sm", className: "w-9 p-0", children: [
61
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_collapsible.CollapsibleTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_Button.MtButton, { variant: "ghost", size: "sm", className: "w-9 p-0", children: [
62
62
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.ChevronsUpDown, { className: "h-4 w-4" }),
63
63
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "sr-only", children: "Toggle" })
64
64
  ] }) })
65
65
  ] }),
66
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_react_collapsible.CollapsibleContent, { className: "space-y-2", children: [
66
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_collapsible.CollapsibleContent, { className: "space-y-2", children: [
67
67
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "rounded-md border px-4 py-3 font-mono text-sm", children: "@radix-ui/colors" }),
68
68
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "rounded-md border px-4 py-3 font-mono text-sm", children: "@stitches/react" })
69
69
  ] })
@@ -75,9 +75,9 @@ const SideNavs = () => {
75
75
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_hover_card.HoverCard, { children: [
76
76
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_hover_card.HoverCardTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Button.MtButton, { variant: "link", children: "\u4E2D\u6587nextjs" }) }),
77
77
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_hover_card.HoverCardContent, { className: "w-80", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex justify-between space-x-4", children: [
78
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_react_avatar.Avatar, { children: [
79
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_avatar.AvatarImage, { src: "https://github.com/vercel.png" }),
80
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_avatar.AvatarFallback, { children: "VC" })
78
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_avatar.Avatar, { children: [
79
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_avatar.AvatarImage, { src: "https://github.com/vercel.png" }),
80
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_avatar.AvatarFallback, { children: "VC" })
81
81
  ] }),
82
82
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "space-y-1", children: [
83
83
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h4", { className: "text-sm font-semibold", children: "@nextjs" }),
@@ -1 +1 @@
1
- "use client";import{jsx as a,jsxs as e}from"react/jsx-runtime";import{Avatar as n,AvatarFallback as r,AvatarImage as l}from"@radix-ui/react-avatar";import{Collapsible as d,CollapsibleContent as i,CollapsibleTrigger as c}from"@radix-ui/react-collapsible";import{EnvelopeClosedIcon as p,FaceIcon as C,GearIcon as v,PersonIcon as h}from"@radix-ui/react-icons";import{CalendarIcon as N,ChevronsUpDown as u}from"lucide-react";import{Command as f,CommandEmpty as g,CommandGroup as o,CommandInput as x,CommandItem as m,CommandList as b,CommandSeparator as y,CommandShortcut as s}from"../ui/command";import{HoverCard as I,HoverCardContent as w,HoverCardTrigger as S}from"../ui/hover-card";import{MtButton as t}from"../ui/ui-mt/Button";const F=()=>a("div",{className:"",children:e(f,{className:"",children:[a(x,{placeholder:"Type a command or search...",className:"bg-red-100 p-1"}),e(b,{className:"flex h-full max-h-full flex-col rounded-lg",children:[a(g,{children:"No results found."}),a(o,{heading:"\u6A21\u5757",children:e(m,{children:[a(C,{className:"mr-2 h-4 w-4"}),a("span",{children:"Search Emoji"})]})}),a(y,{}),a("div",{children:e(o,{heading:"Settings",className:" justify-end ",children:[e(m,{children:[a(h,{className:"mr-2 h-4 w-4"}),a("span",{children:"Profile"}),a(s,{children:"\u2318P"})]}),e(m,{children:[a(p,{className:"mr-2 h-4 w-4"}),a("span",{children:"Mail"}),a(s,{children:"\u2318B"})]}),a(m,{children:e(d,{className:"w-full space-y-2",children:[e("div",{className:"flex items-center justify-between space-x-4 ",children:[a("h4",{className:"text-sm font-semibold",children:"\u5206\u7C7B1"}),a(c,{asChild:!0,children:e(t,{variant:"ghost",size:"sm",className:"w-9 p-0",children:[a(u,{className:"h-4 w-4"}),a("span",{className:"sr-only",children:"Toggle"})]})})]}),e(i,{className:"space-y-2",children:[a("div",{className:"rounded-md border px-4 py-3 font-mono text-sm",children:"@radix-ui/colors"}),a("div",{className:"rounded-md border px-4 py-3 font-mono text-sm",children:"@stitches/react"})]})]})}),e(m,{children:[a(v,{className:"mr-2 h-4 w-4"}),e(I,{children:[a(S,{asChild:!0,children:a(t,{variant:"link",children:"\u4E2D\u6587nextjs"})}),a(w,{className:"w-80",children:e("div",{className:"flex justify-between space-x-4",children:[e(n,{children:[a(l,{src:"https://github.com/vercel.png"}),a(r,{children:"VC"})]}),e("div",{className:"space-y-1",children:[a("h4",{className:"text-sm font-semibold",children:"@nextjs"}),a("p",{className:"text-sm",children:"The React Framework \u2013 created and maintained by @vercel."}),e("div",{className:"flex items-center pt-2",children:[a(N,{className:"mr-2 h-4 w-4 opacity-70"})," ",a("span",{className:"text-muted-foreground text-xs",children:"Joined December 2021"})]})]})]})})]}),a(s,{children:"\u2318S"})]})]})})]})]})});export{F as SideNavs};
1
+ "use client";import{jsx as a,jsxs as e}from"react/jsx-runtime";import{EnvelopeClosedIcon as n,FaceIcon as r,GearIcon as l,PersonIcon as d}from"@radix-ui/react-icons";import{CalendarIcon as i,ChevronsUpDown as c}from"lucide-react";import{Avatar as p,AvatarFallback as C,AvatarImage as v}from"../ui/avatar";import{Collapsible as h,CollapsibleContent as N,CollapsibleTrigger as u}from"../ui/collapsible";import{Command as f,CommandEmpty as g,CommandGroup as o,CommandInput as x,CommandItem as m,CommandList as b,CommandSeparator as y,CommandShortcut as s}from"../ui/command";import{HoverCard as I,HoverCardContent as w,HoverCardTrigger as S}from"../ui/hover-card";import{MtButton as t}from"../ui/ui-mt/Button";const F=()=>a("div",{className:"",children:e(f,{className:"",children:[a(x,{placeholder:"Type a command or search...",className:"bg-red-100 p-1"}),e(b,{className:"flex h-full max-h-full flex-col rounded-lg",children:[a(g,{children:"No results found."}),a(o,{heading:"\u6A21\u5757",children:e(m,{children:[a(r,{className:"mr-2 h-4 w-4"}),a("span",{children:"Search Emoji"})]})}),a(y,{}),a("div",{children:e(o,{heading:"Settings",className:" justify-end ",children:[e(m,{children:[a(d,{className:"mr-2 h-4 w-4"}),a("span",{children:"Profile"}),a(s,{children:"\u2318P"})]}),e(m,{children:[a(n,{className:"mr-2 h-4 w-4"}),a("span",{children:"Mail"}),a(s,{children:"\u2318B"})]}),a(m,{children:e(h,{className:"w-full space-y-2",children:[e("div",{className:"flex items-center justify-between space-x-4 ",children:[a("h4",{className:"text-sm font-semibold",children:"\u5206\u7C7B1"}),a(u,{asChild:!0,children:e(t,{variant:"ghost",size:"sm",className:"w-9 p-0",children:[a(c,{className:"h-4 w-4"}),a("span",{className:"sr-only",children:"Toggle"})]})})]}),e(N,{className:"space-y-2",children:[a("div",{className:"rounded-md border px-4 py-3 font-mono text-sm",children:"@radix-ui/colors"}),a("div",{className:"rounded-md border px-4 py-3 font-mono text-sm",children:"@stitches/react"})]})]})}),e(m,{children:[a(l,{className:"mr-2 h-4 w-4"}),e(I,{children:[a(S,{asChild:!0,children:a(t,{variant:"link",children:"\u4E2D\u6587nextjs"})}),a(w,{className:"w-80",children:e("div",{className:"flex justify-between space-x-4",children:[e(p,{children:[a(v,{src:"https://github.com/vercel.png"}),a(C,{children:"VC"})]}),e("div",{className:"space-y-1",children:[a("h4",{className:"text-sm font-semibold",children:"@nextjs"}),a("p",{className:"text-sm",children:"The React Framework \u2013 created and maintained by @vercel."}),e("div",{className:"flex items-center pt-2",children:[a(i,{className:"mr-2 h-4 w-4 opacity-70"})," ",a("span",{className:"text-muted-foreground text-xs",children:"Joined December 2021"})]})]})]})})]}),a(s,{children:"\u2318S"})]})]})})]})]})});export{F as SideNavs};
@@ -0,0 +1 @@
1
+ export { DotsHorizontalIcon } from "@radix-ui/react-icons";
@@ -0,0 +1 @@
1
+ import{DotsHorizontalIcon as t}from"@radix-ui/react-icons";export{t as DotsHorizontalIcon};
@@ -0,0 +1,2 @@
1
+ import * as React from "react";
2
+ export declare function MtComboboxDropdownMenu(props: {} & React.PropsWithChildren): React.JSX.Element;
@@ -0,0 +1 @@
1
+ "use client";import{jsx as e,jsxs as o}from"react/jsx-runtime";import{DotsHorizontalIcon as c}from"@radix-ui/react-icons";import*as a from"react";import{Command as w,CommandEmpty as M,CommandGroup as D,CommandInput as C,CommandItem as f,CommandList as g}from"../../../ui/command";import{DropdownMenu as b,DropdownMenuContent as x,DropdownMenuGroup as S,DropdownMenuItem as t,DropdownMenuLabel as h,DropdownMenuSeparator as m,DropdownMenuShortcut as y,DropdownMenuSub as N,DropdownMenuSubContent as I,DropdownMenuSubTrigger as L,DropdownMenuTrigger as v}from"../../../ui/dropdown-menu";import{MtButton as G}from"../../../ui/ui-mt/Button";const T=["feature","bug","enhancement","documentation","design","question","maintenance"];function F(p){const{children:u}=p,[d,s]=a.useState("feature"),[l,r]=a.useState(!1);return o("div",{className:"flex w-full flex-col items-start justify-between rounded-md border px-4 py-3 sm:flex-row sm:items-center",children:[o("p",{className:"text-sm font-medium leading-none",children:[e("span",{className:"bg-primary text-primary-foreground mr-2 rounded-lg px-2 py-1 text-xs",children:d}),e("span",{className:"text-muted-foreground",children:"Create a new project"})]}),o(b,{open:l,onOpenChange:r,children:[e(v,{asChild:!0,children:e(G,{variant:"ghost",size:"sm",children:e(c,{})})}),o(x,{align:"end",className:"w-[200px]",children:[e(h,{children:"Actions"}),o(S,{children:[e(t,{children:"Assign to..."}),e(t,{children:"Set due date..."}),e(m,{}),o(N,{children:[e(L,{children:"Apply label"}),e(I,{className:"p-0",children:o(w,{children:[e(C,{placeholder:"Filter label...",autoFocus:!0,className:"h-9"}),o(g,{children:[e(M,{children:"No label found."}),e(D,{children:T.map(n=>e(f,{value:n,onSelect:i=>{s(i),r(!1)},children:n},n))})]})]})})]}),e(m,{}),o(t,{className:"text-red-600",children:["Delete",e(y,{children:"\u2318\u232B"})]})]})]})]}),u]})}export{F as MtComboboxDropdownMenu};
@@ -0,0 +1,2 @@
1
+ import { HTMLReactParserOptions } from 'html-react-parser';
2
+ export declare const newToolbarParseOptions: () => HTMLReactParserOptions;
@@ -0,0 +1 @@
1
+ "use client";var p=Object.defineProperty,d=Object.defineProperties;var u=Object.getOwnPropertyDescriptors;var a=Object.getOwnPropertySymbols;var f=Object.prototype.hasOwnProperty,b=Object.prototype.propertyIsEnumerable;var o=(r,t,e)=>t in r?p(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,n=(r,t)=>{for(var e in t||(t={}))f.call(t,e)&&o(r,e,t[e]);if(a)for(var e of a(t))b.call(t,e)&&o(r,e,t[e]);return r},l=(r,t)=>d(r,u(t));import{jsx as s,jsxs as m}from"react/jsx-runtime";import{Element as v}from"html-react-parser";import{useForm as h}from"react-hook-form";import{Icons as c}from"../../icons/icons";import{Input as w}from"../../ui/input";import{MtButton as g}from"../../ui/ui-mt/Button";const C=()=>({transform(t,e,N){var i;if(e instanceof v){switch((i=e.attribs)==null?void 0:i.class){case"list_view_action_new_button":return s("div",{className:"bg-red-200 p-2",children:"TODO:list_view_action_new_button"});case"mtm_dash_list_view":return s("div",{className:"bg-red-300 p-2",children:s(_,{children:t})})}switch(e.tagName){}return null}return t}}),_=r=>{const{children:t}=r,e=h({});return m("div",{className:"flex w-full gap-1",children:[s("div",{className:"grow",children:s("div",{className:"bg-background/95 supports-[backdrop-filter]:bg-background/60 p-1 backdrop-blur",children:s("form",{onSubmit:e.handleSubmit(()=>{}),className:"",children:m("div",{className:"relative",children:[s(c.search,{className:"text-muted-foreground absolute left-2 top-2.5 size-4"}),s(w,l(n({},e.register("q")),{className:" pl-8",placeholder:"Search"}))]})})})}),t,s("div",{className:"mx-auto flex items-center justify-center",children:s(g,{onClick:()=>{},children:s(c.add,{})})})]})};export{C as newToolbarParseOptions};
@@ -1 +1 @@
1
- "use client";var w=(f,m,r)=>new Promise((p,l)=>{var g=t=>{try{d(r.next(t))}catch(s){l(s)}},c=t=>{try{d(r.throw(t))}catch(s){l(s)}},d=t=>t.done?p(t.value):Promise.resolve(t.value).then(g,c);d((r=r.apply(f,m)).next())});import{jsx as e,jsxs as a}from"react/jsx-runtime";import{useEffect as A,useState as i}from"react";import{useDebouncedCallback as D}from"use-debounce";import{defaultExtensions as z}from"./extensions";import{ColorSelector as E}from"./selectors/color-selector";import{LinkSelector as N}from"./selectors/link-selector";import{NodeSelector as S}from"./selectors/node-selector";import{Separator as u}from"./ui/separator";import{defaultEditorContent as B}from"../content";import{EditorBubble as M,EditorCommand as P,EditorCommandEmpty as R,EditorCommandItem as U,EditorCommandList as G,EditorContent as T,EditorRoot as V}from"../novel/src/components";import{ImageResizer as _,handleCommandNavigation as j}from"../novel/src/extensions";import{handleImageDrop as F,handleImagePaste as K}from"../novel/src/plugins";import q from"./generative/generative-menu-switch";import{uploadFn as O}from"./image-upload";import{TextButtons as y}from"./selectors/text-buttons";import{suggestionItems as H}from"./slash-command";const I="novel-content",pe=f=>{const{onValueChange:m,content:r}=f,[p,l]=i(r||null),[g,c]=i("Saved"),[d,t]=i(!1),[s,v]=i(!1),[C,b]=i(!1),[h,k]=i(!1),J=D(o=>w(void 0,null,function*(){const n=o.getJSON(),x=JSON.stringify(n);window.localStorage.setItem(I,x),c("Saved"),m&&m(n)}),500);return A(()=>{const o=window.localStorage.getItem(I);l(o?JSON.parse(o):B)},[]),p?a("div",{className:"relative w-full max-w-screen-lg",children:[e("div",{className:"bg-accent text-muted-foreground absolute right-5 top-5 z-10 mb-5 rounded-lg px-2 py-1 text-sm",children:g}),e(V,{children:a(T,{initialContent:p,extensions:z,className:"border-muted bg-background relative min-h-[500px] w-full max-w-screen-lg sm:mb-[calc(20vh)] sm:rounded-lg sm:border sm:shadow-lg",editorProps:{handleDOMEvents:{keydown:(o,n)=>j(n)},handlePaste:(o,n)=>K(o,n,O),handleDrop:(o,n,x,L)=>F(o,n,L,O),attributes:{class:"prose prose-lg dark:prose-invert prose-headings:font-title font-default focus:outline-none max-w-full"}},onUpdate:({editor:o})=>{J(o),c("Unsaved")},slotAfter:e(_,{}),children:[a(M,{tippyOptions:{placement:h?"bottom-start":"top"},className:"border-muted bg-background flex w-fit max-w-[90vw] overflow-hidden rounded border shadow-xl",children:[e(S,{open:d,onOpenChange:t}),e(N,{open:C,onOpenChange:b}),e(y,{}),e(E,{open:s,onOpenChange:v})]}),a(P,{className:"border-muted bg-background z-50 h-auto max-h-[330px] overflow-y-auto rounded-md border px-1 py-2 shadow-md transition-all",children:[e(R,{className:"text-muted-foreground px-2",children:"No results"}),e(G,{children:H.map(o=>a(U,{value:o.title,onCommand:n=>{o.command&&o.command(n)},className:"hover:bg-accent aria-selected:bg-accent flex w-full items-center space-x-2 rounded-md px-2 py-1 text-left text-sm ",children:[e("div",{className:"border-muted bg-background flex h-10 w-10 items-center justify-center rounded-md border",children:o.icon}),a("div",{children:[e("p",{className:"font-medium",children:o.title}),e("p",{className:"text-muted-foreground text-xs",children:o.description})]})]},o.title))})]}),a(q,{open:h,onOpenChange:k,children:[e(u,{orientation:"vertical"}),e(S,{open:d,onOpenChange:t}),e(u,{orientation:"vertical"}),e(N,{open:C,onOpenChange:b}),e(u,{orientation:"vertical"}),e(y,{}),e(u,{orientation:"vertical"}),e(E,{open:s,onOpenChange:v})]})]})})]}):null};export{pe as TailwindAdvancedEditor};
1
+ "use client";var w=(f,m,r)=>new Promise((p,l)=>{var g=t=>{try{d(r.next(t))}catch(i){l(i)}},c=t=>{try{d(r.throw(t))}catch(i){l(i)}},d=t=>t.done?p(t.value):Promise.resolve(t.value).then(g,c);d((r=r.apply(f,m)).next())});import{jsx as e,jsxs as a}from"react/jsx-runtime";import{useEffect as A,useState as s}from"react";import{useDebouncedCallback as D}from"use-debounce";import{defaultExtensions as z}from"./extensions";import{ColorSelector as E}from"./selectors/color-selector";import{LinkSelector as N}from"./selectors/link-selector";import{NodeSelector as S}from"./selectors/node-selector";import{Separator as u}from"./ui/separator";import{defaultEditorContent as B}from"../content";import{EditorBubble as M,EditorCommand as P,EditorCommandEmpty as R,EditorCommandItem as U,EditorCommandList as G,EditorContent as T,EditorRoot as V}from"../novel/src/components";import{ImageResizer as _,handleCommandNavigation as j}from"../novel/src/extensions";import{handleImageDrop as F,handleImagePaste as K}from"../novel/src/plugins";import q from"./generative/generative-menu-switch";import{uploadFn as O}from"./image-upload";import{TextButtons as y}from"./selectors/text-buttons";import{suggestionItems as H}from"./slash-command";const I="novel-content",pe=f=>{const{onValueChange:m,content:r}=f,[p,l]=s(r||null),[g,c]=s("Saved"),[d,t]=s(!1),[i,v]=s(!1),[C,b]=s(!1),[h,k]=s(!1),J=D(o=>w(void 0,null,function*(){const n=o.getJSON(),x=JSON.stringify(n);window.localStorage.setItem(I,x),c("Saved"),m&&m(n)}),500);return A(()=>{const o=window.localStorage.getItem(I);l(o?JSON.parse(o):B)},[]),p?a("div",{className:"relative w-full max-w-screen-lg",children:[e("div",{className:"bg-accent text-muted-foreground absolute right-5 top-5 z-10 mb-5 rounded-lg px-2 py-1 text-sm",children:g}),e(V,{children:a(T,{initialContent:p,extensions:z,className:"border-muted bg-background relative min-h-[500px] w-full max-w-screen-lg sm:rounded-lg sm:border sm:shadow-lg",editorProps:{handleDOMEvents:{keydown:(o,n)=>j(n)},handlePaste:(o,n)=>K(o,n,O),handleDrop:(o,n,x,L)=>F(o,n,L,O),attributes:{class:"prose prose-lg dark:prose-invert prose-headings:font-title font-default focus:outline-none max-w-full"}},onUpdate:({editor:o})=>{J(o),c("Unsaved")},slotAfter:e(_,{}),children:[a(M,{tippyOptions:{placement:h?"bottom-start":"top"},className:"border-muted bg-background flex w-fit max-w-[90vw] overflow-hidden rounded border shadow-xl",children:[e(S,{open:d,onOpenChange:t}),e(N,{open:C,onOpenChange:b}),e(y,{}),e(E,{open:i,onOpenChange:v})]}),a(P,{className:"border-muted bg-background z-50 h-auto max-h-[330px] overflow-y-auto rounded-md border px-1 py-2 shadow-md transition-all",children:[e(R,{className:"text-muted-foreground px-2",children:"No results"}),e(G,{children:H.map(o=>a(U,{value:o.title,onCommand:n=>{o.command&&o.command(n)},className:"hover:bg-accent aria-selected:bg-accent flex w-full items-center space-x-2 rounded-md px-2 py-1 text-left text-sm ",children:[e("div",{className:"border-muted bg-background flex h-10 w-10 items-center justify-center rounded-md border",children:o.icon}),a("div",{children:[e("p",{className:"font-medium",children:o.title}),e("p",{className:"text-muted-foreground text-xs",children:o.description})]})]},o.title))})]}),a(q,{open:h,onOpenChange:k,children:[e(u,{orientation:"vertical"}),e(S,{open:d,onOpenChange:t}),e(u,{orientation:"vertical"}),e(N,{open:C,onOpenChange:b}),e(u,{orientation:"vertical"}),e(y,{}),e(u,{orientation:"vertical"}),e(E,{open:i,onOpenChange:v})]})]})})]}):null};export{pe as TailwindAdvancedEditor};
@@ -1,2 +1,2 @@
1
1
  export declare function convertEditorJsonToHTML(editorJsonValue: any): string;
2
- export declare function convertEditorHTMLToJson(editorJsonValue: any): Record<string, any>;
2
+ export declare function convertEditorHTMLToJson(html: string): Record<string, any>;
@@ -1 +1 @@
1
- import{generateHTML as r,generateJSON as t}from"@tiptap/html";import{defaultExtensions as n}from"./extensions";function a(o){return r(o,[...n])}function f(o){return t(o,[...n])}export{f as convertEditorHTMLToJson,a as convertEditorJsonToHTML};
1
+ import{generateHTML as r,generateJSON as t}from"@tiptap/html";import{defaultExtensions as n}from"./extensions";function s(o){return r(o,[...n])}function T(o){return console.log("convertEditorHTMLToJson",o),t(o,[...n])}export{T as convertEditorHTMLToJson,s as convertEditorJsonToHTML};
@@ -0,0 +1,2 @@
1
+ import { PropsWithChildren } from "react";
2
+ export declare const FullScreen: (props: {} & PropsWithChildren) => import("react").JSX.Element;
@@ -0,0 +1 @@
1
+ import{jsx as n,jsxs as f}from"react/jsx-runtime";import{useRef as s}from"react";import{useScroll as t}from"react-use";const a=r=>{const{children:i}=r,l=s(null),{x:e,y:o}=t(l);return n("div",{ref:l,className:" fixed left-0 top-0 z-50 max-h-full min-h-full w-full overflow-auto bg-slate-300",children:f("div",{className:"relative",children:["x:",e,",y:",o,i,"x:",e,",y:",o]})})};export{a as FullScreen};
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var DotsHorizontalIcon_exports = {};
20
+ __export(DotsHorizontalIcon_exports, {
21
+ DotsHorizontalIcon: () => import_react_icons.DotsHorizontalIcon
22
+ });
23
+ module.exports = __toCommonJS(DotsHorizontalIcon_exports);
24
+ var import_react_icons = require("@radix-ui/react-icons");
25
+ // Annotate the CommonJS export names for ESM import in node:
26
+ 0 && (module.exports = {
27
+ DotsHorizontalIcon
28
+ });
@@ -0,0 +1,109 @@
1
+ "use strict";
2
+ "use client";
3
+ var __create = Object.create;
4
+ var __defProp = Object.defineProperty;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __getProtoOf = Object.getPrototypeOf;
8
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
9
+ var __export = (target, all) => {
10
+ for (var name in all)
11
+ __defProp(target, name, { get: all[name], enumerable: true });
12
+ };
13
+ var __copyProps = (to, from, except, desc) => {
14
+ if (from && typeof from === "object" || typeof from === "function") {
15
+ for (let key of __getOwnPropNames(from))
16
+ if (!__hasOwnProp.call(to, key) && key !== except)
17
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
18
+ }
19
+ return to;
20
+ };
21
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
22
+ // If the importer is in node compatibility mode or this is not an ESM
23
+ // file that has been converted to a CommonJS file using a Babel-
24
+ // compatible transform (i.e. "__esModule" has not been set), then set
25
+ // "default" to the CommonJS "module.exports" for node compatibility.
26
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
27
+ mod
28
+ ));
29
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
30
+ var ItemActionButton_exports = {};
31
+ __export(ItemActionButton_exports, {
32
+ MtComboboxDropdownMenu: () => MtComboboxDropdownMenu
33
+ });
34
+ module.exports = __toCommonJS(ItemActionButton_exports);
35
+ var import_jsx_runtime = require("react/jsx-runtime");
36
+ var import_react_icons = require("@radix-ui/react-icons");
37
+ var React = __toESM(require("react"), 1);
38
+ var import_command = require("../../../ui/command");
39
+ var import_dropdown_menu = require("../../../ui/dropdown-menu");
40
+ var import_Button = require("../../../ui/ui-mt/Button");
41
+ const labels = [
42
+ "feature",
43
+ "bug",
44
+ "enhancement",
45
+ "documentation",
46
+ "design",
47
+ "question",
48
+ "maintenance"
49
+ ];
50
+ function MtComboboxDropdownMenu(props) {
51
+ const { children } = props;
52
+ const [label, setLabel] = React.useState("feature");
53
+ const [open, setOpen] = React.useState(false);
54
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex w-full flex-col items-start justify-between rounded-md border px-4 py-3 sm:flex-row sm:items-center", children: [
55
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("p", { className: "text-sm font-medium leading-none", children: [
56
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "bg-primary text-primary-foreground mr-2 rounded-lg px-2 py-1 text-xs", children: label }),
57
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "text-muted-foreground", children: "Create a new project" })
58
+ ] }),
59
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_dropdown_menu.DropdownMenu, { open, onOpenChange: setOpen, children: [
60
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dropdown_menu.DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Button.MtButton, { variant: "ghost", size: "sm", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_icons.DotsHorizontalIcon, {}) }) }),
61
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_dropdown_menu.DropdownMenuContent, { align: "end", className: "w-[200px]", children: [
62
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dropdown_menu.DropdownMenuLabel, { children: "Actions" }),
63
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_dropdown_menu.DropdownMenuGroup, { children: [
64
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dropdown_menu.DropdownMenuItem, { children: "Assign to..." }),
65
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dropdown_menu.DropdownMenuItem, { children: "Set due date..." }),
66
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dropdown_menu.DropdownMenuSeparator, {}),
67
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_dropdown_menu.DropdownMenuSub, { children: [
68
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dropdown_menu.DropdownMenuSubTrigger, { children: "Apply label" }),
69
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dropdown_menu.DropdownMenuSubContent, { className: "p-0", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_command.Command, { children: [
70
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
71
+ import_command.CommandInput,
72
+ {
73
+ placeholder: "Filter label...",
74
+ autoFocus: true,
75
+ className: "h-9"
76
+ }
77
+ ),
78
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_command.CommandList, { children: [
79
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_command.CommandEmpty, { children: "No label found." }),
80
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_command.CommandGroup, { children: labels.map((label2) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
81
+ import_command.CommandItem,
82
+ {
83
+ value: label2,
84
+ onSelect: (value) => {
85
+ setLabel(value);
86
+ setOpen(false);
87
+ },
88
+ children: label2
89
+ },
90
+ label2
91
+ )) })
92
+ ] })
93
+ ] }) })
94
+ ] }),
95
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dropdown_menu.DropdownMenuSeparator, {}),
96
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_dropdown_menu.DropdownMenuItem, { className: "text-red-600", children: [
97
+ "Delete",
98
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dropdown_menu.DropdownMenuShortcut, { children: "\u2318\u232B" })
99
+ ] })
100
+ ] })
101
+ ] })
102
+ ] }),
103
+ children
104
+ ] });
105
+ }
106
+ // Annotate the CommonJS export names for ESM import in node:
107
+ 0 && (module.exports = {
108
+ MtComboboxDropdownMenu
109
+ });
@@ -0,0 +1,113 @@
1
+ "use strict";
2
+ "use client";
3
+ var __defProp = Object.defineProperty;
4
+ var __defProps = Object.defineProperties;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
7
+ var __getOwnPropNames = Object.getOwnPropertyNames;
8
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
9
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
10
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
11
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
12
+ var __spreadValues = (a, b) => {
13
+ for (var prop in b || (b = {}))
14
+ if (__hasOwnProp.call(b, prop))
15
+ __defNormalProp(a, prop, b[prop]);
16
+ if (__getOwnPropSymbols)
17
+ for (var prop of __getOwnPropSymbols(b)) {
18
+ if (__propIsEnum.call(b, prop))
19
+ __defNormalProp(a, prop, b[prop]);
20
+ }
21
+ return a;
22
+ };
23
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
24
+ var __export = (target, all) => {
25
+ for (var name in all)
26
+ __defProp(target, name, { get: all[name], enumerable: true });
27
+ };
28
+ var __copyProps = (to, from, except, desc) => {
29
+ if (from && typeof from === "object" || typeof from === "function") {
30
+ for (let key of __getOwnPropNames(from))
31
+ if (!__hasOwnProp.call(to, key) && key !== except)
32
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
33
+ }
34
+ return to;
35
+ };
36
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
37
+ var htmlParse_exports = {};
38
+ __export(htmlParse_exports, {
39
+ newToolbarParseOptions: () => newToolbarParseOptions
40
+ });
41
+ module.exports = __toCommonJS(htmlParse_exports);
42
+ var import_jsx_runtime = require("react/jsx-runtime");
43
+ var import_html_react_parser = require("html-react-parser");
44
+ var import_react_hook_form = require("react-hook-form");
45
+ var import_icons = require("../../icons/icons");
46
+ var import_input = require("../../ui/input");
47
+ var import_Button = require("../../ui/ui-mt/Button");
48
+ const newToolbarParseOptions = () => {
49
+ const parseOption = {
50
+ // replace(domNode) {
51
+ // if (domNode instanceof Element) {
52
+ // // switch (domNode.attribs.class) {
53
+ // // case "listtoolbar":
54
+ // // return <ListViewToolbar></ListViewToolbar>
55
+ // // // case "mtm_dash_list_view":
56
+ // // // return <div>TODO:mtm_dash_list_view</div>
57
+ // // // case "list_view_action_new_button":
58
+ // // // return <div className='bg-red-200 p-2'>TODO:list_view_action_new_button</div>
59
+ // // case "mtm_toolbar_button":
60
+ // // const action = domNode.attribs.action
61
+ // // if (domNode.children[0] instanceof Text) {
62
+ // // const textContent = domNode.children[0];
63
+ // // return <>
64
+ // // <ToolbarActionButton action={action} text={textContent.data} />
65
+ // // </>;
66
+ // // } else {
67
+ // // return <>abcc---</>
68
+ // // }
69
+ // // default:
70
+ // // return <div className="bg-red-600 p-2">unknow element type</div>
71
+ // // }
72
+ // }
73
+ // },
74
+ transform(reactNode, domNode, index) {
75
+ var _a;
76
+ if (domNode instanceof import_html_react_parser.Element) {
77
+ switch ((_a = domNode.attribs) == null ? void 0 : _a.class) {
78
+ case "list_view_action_new_button":
79
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "bg-red-200 p-2", children: "TODO:list_view_action_new_button" });
80
+ case "mtm_dash_list_view":
81
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "bg-red-300 p-2", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ListViewToolbar, { children: reactNode }) });
82
+ }
83
+ switch (domNode.tagName) {
84
+ }
85
+ return null;
86
+ }
87
+ return reactNode;
88
+ }
89
+ };
90
+ return parseOption;
91
+ };
92
+ const ListViewToolbar = (props) => {
93
+ const { children } = props;
94
+ const form = (0, import_react_hook_form.useForm)(
95
+ {
96
+ // defaultValues: defaultValues
97
+ }
98
+ );
99
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex w-full gap-1", children: [
100
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "grow", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "bg-background/95 supports-[backdrop-filter]:bg-background/60 p-1 backdrop-blur", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("form", { onSubmit: form.handleSubmit(() => {
101
+ }), className: "", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "relative", children: [
102
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.Icons.search, { className: "text-muted-foreground absolute left-2 top-2.5 size-4" }),
103
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_input.Input, __spreadProps(__spreadValues({}, form.register("q")), { className: " pl-8", placeholder: "Search" }))
104
+ ] }) }) }) }),
105
+ children,
106
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "mx-auto flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Button.MtButton, { onClick: () => {
107
+ }, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.Icons.add, {}) }) })
108
+ ] });
109
+ };
110
+ // Annotate the CommonJS export names for ESM import in node:
111
+ 0 && (module.exports = {
112
+ newToolbarParseOptions
113
+ });