mtxuilib 0.0.339 → 0.0.341

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 (49) hide show
  1. package/dist/esm/lib/strings.d.ts +3 -0
  2. package/dist/esm/lib/strings.js +1 -0
  3. package/dist/esm/lib/time.d.ts +2 -0
  4. package/dist/esm/lib/time.js +1 -0
  5. package/dist/esm/ui/button.d.ts +1 -1
  6. package/dist/esm/ui/novel/tailwind/advanced-editor.d.ts +5 -1
  7. package/dist/esm/ui/novel/tailwind/advanced-editor.js +1 -1
  8. package/dist/esm/ui/novel/tailwind/extensions.js +1 -1
  9. package/dist/esm/ui/novel/tailwind/ui/button.d.ts +1 -1
  10. package/dist/esm/ui/novel/tailwind/utils.d.ts +1 -0
  11. package/dist/esm/ui/novel/tailwind/utils.js +1 -0
  12. package/dist/esm/ui/ui-mt/input-field/RichEditorInput.d.ts +8 -0
  13. package/dist/esm/ui/ui-mt/input-field/RichEditorInput.js +1 -0
  14. package/dist/esm/ui/ui-mt/inputs/SearchInput.d.ts +1 -1
  15. package/dist/esm/video-player/mt-video-player.d.ts +7 -0
  16. package/dist/esm/video-player/mt-video-player.js +1 -0
  17. package/dist/esm/video-player/video-player2/modal-video-player.d.ts +13 -0
  18. package/dist/esm/video-player/video-player2/modal-video-player.js +1 -0
  19. package/dist/lib/strings.cjs +34 -0
  20. package/dist/{NovelEditor.cjs → lib/time.cjs} +9 -7
  21. package/dist/tailwind.cjs +1 -7
  22. package/dist/tsconfig.type.tsbuildinfo +1 -1
  23. package/dist/ui/novel/tailwind/advanced-editor.cjs +13 -13
  24. package/dist/ui/novel/tailwind/extensions.cjs +3 -1
  25. package/dist/ui/novel/tailwind/utils.cjs +35 -0
  26. package/dist/ui/ui-mt/input-field/RichEditorInput.cjs +38 -0
  27. package/dist/video-player/mt-video-player.cjs +70 -0
  28. package/dist/video-player/video-player2/modal-video-player.cjs +95 -0
  29. package/package.json +20 -9
  30. package/dist/esm/NovelEditor.d.ts +0 -2
  31. package/dist/esm/NovelEditor.js +0 -1
  32. /package/dist/esm/ui/ui-mt/{inputField → input-field}/InputField.d.ts +0 -0
  33. /package/dist/esm/ui/ui-mt/{inputField → input-field}/InputField.js +0 -0
  34. /package/dist/esm/ui/ui-mt/{inputField → input-field}/SingleUploadForm.d.ts +0 -0
  35. /package/dist/esm/ui/ui-mt/{inputField → input-field}/SingleUploadForm.js +0 -0
  36. /package/dist/esm/ui/ui-mt/{inputField → input-field}/TextArea.d.ts +0 -0
  37. /package/dist/esm/ui/ui-mt/{inputField → input-field}/TextArea.js +0 -0
  38. /package/dist/esm/ui/ui-mt/{inputField → input-field}/TextFileInput.d.ts +0 -0
  39. /package/dist/esm/ui/ui-mt/{inputField → input-field}/TextFileInput.js +0 -0
  40. /package/dist/esm/ui/ui-mt/{inputField → input-field}/select/InputSelect.d.ts +0 -0
  41. /package/dist/esm/ui/ui-mt/{inputField → input-field}/select/InputSelect.js +0 -0
  42. /package/dist/esm/ui/ui-mt/{inputField → input-field}/types.d.ts +0 -0
  43. /package/dist/esm/ui/ui-mt/{inputField → input-field}/types.js +0 -0
  44. /package/dist/ui/ui-mt/{inputField → input-field}/InputField.cjs +0 -0
  45. /package/dist/ui/ui-mt/{inputField → input-field}/SingleUploadForm.cjs +0 -0
  46. /package/dist/ui/ui-mt/{inputField → input-field}/TextArea.cjs +0 -0
  47. /package/dist/ui/ui-mt/{inputField → input-field}/TextFileInput.cjs +0 -0
  48. /package/dist/ui/ui-mt/{inputField → input-field}/select/InputSelect.cjs +0 -0
  49. /package/dist/ui/ui-mt/{inputField → input-field}/types.cjs +0 -0
@@ -0,0 +1,3 @@
1
+ export declare const escape: (name: string) => string;
2
+ export declare const capitalize: (string: string) => string;
3
+ export declare const uncapitalize: (string: string) => string;
@@ -0,0 +1 @@
1
+ const t=e=>'"'+e.replace(/"/g,'""')+'"',c=e=>e.charAt(0).toUpperCase()+e.slice(1),a=e=>e.charAt(0).toLowerCase()+e.slice(1);export{c as capitalize,t as escape,a as uncapitalize};
@@ -0,0 +1,2 @@
1
+ export declare const calculateDelay: (attempts: number) => number;
2
+ export declare const getCurrentTimeZone: () => string;
@@ -0,0 +1 @@
1
+ const e=t=>Math.min(1e3*Math.pow(2,Math.max(1,t))+Math.random()*100,Math.pow(2,31)-1),a=()=>Intl.DateTimeFormat().resolvedOptions().timeZone;export{e as calculateDelay,a as getCurrentTimeZone};
@@ -2,7 +2,7 @@ import { type VariantProps } from "class-variance-authority";
2
2
  import * as React from "react";
3
3
  declare const buttonVariants: (props?: ({
4
4
  variant?: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
5
- size?: "default" | "sm" | "lg" | "icon" | null | undefined;
5
+ size?: "icon" | "default" | "sm" | "lg" | null | undefined;
6
6
  } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
7
7
  export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
8
8
  asChild?: boolean;
@@ -1,2 +1,6 @@
1
1
  /// <reference types="react" />
2
- export declare const TailwindAdvancedEditor: () => import("react").JSX.Element | null;
2
+ import { type JSONContent } from "../novel/src/components";
3
+ export declare const TailwindAdvancedEditor: (props: {
4
+ onValueChange?: ((content: any) => void) | undefined;
5
+ content?: JSONContent | null | undefined;
6
+ }) => import("react").JSX.Element | null;
@@ -1 +1 @@
1
- "use client";var b=(l,p,a)=>new Promise((c,m)=>{var u=t=>{try{d(a.next(t))}catch(s){m(s)}},f=t=>{try{d(a.throw(t))}catch(s){m(s)}},d=t=>t.done?c(t.value):Promise.resolve(t.value).then(u,f);d((a=a.apply(l,p)).next())});import{jsx as e,jsxs as r}from"react/jsx-runtime";import{useEffect as y,useState as i}from"react";import{useDebouncedCallback as I}from"use-debounce";import{defaultExtensions as k}from"./extensions";import{ColorSelector as C}from"./selectors/color-selector";import{LinkSelector as h}from"./selectors/link-selector";import{NodeSelector as x}from"./selectors/node-selector";import{Separator as g}from"./ui/separator";import{defaultEditorContent as J}from"../content";import{EditorBubble as L,EditorCommand as A,EditorCommandEmpty as D,EditorCommandItem as z,EditorCommandList as B,EditorContent as M,EditorRoot as P}from"../novel/src/components";import{ImageResizer as R,handleCommandNavigation as U}from"../novel/src/extensions";import{handleImageDrop as G,handleImagePaste as T}from"../novel/src/plugins";import _ from"./generative/generative-menu-switch";import{uploadFn as w}from"./image-upload";import{TextButtons as E}from"./selectors/text-buttons";import{slashCommand as j,suggestionItems as F}from"./slash-command";const q=[...k,j],me=()=>{const[l,p]=i(null),[a,c]=i("Saved"),[m,u]=i(!1),[f,d]=i(!1),[t,s]=i(!1),[v,N]=i(!1),S=I(o=>b(void 0,null,function*(){const n=o.getJSON();window.localStorage.setItem("novel-content",JSON.stringify(n)),c("Saved")}),500);return y(()=>{const o=window.localStorage.getItem("novel-content");p(o?JSON.parse(o):J)},[]),l?r("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:a}),e(P,{children:r(M,{initialContent:l,extensions:q,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)=>U(n)},handlePaste:(o,n)=>T(o,n,w),handleDrop:(o,n,H,O)=>G(o,n,O,w),attributes:{class:"prose prose-lg dark:prose-invert prose-headings:font-title font-default focus:outline-none max-w-full"}},onUpdate:({editor:o})=>{S(o),c("Unsaved")},slotAfter:e(R,{}),children:[r(L,{tippyOptions:{placement:v?"bottom-start":"top"},className:"border-muted bg-background flex w-fit max-w-[90vw] overflow-hidden rounded border shadow-xl",children:[e(x,{open:m,onOpenChange:u}),e(h,{open:t,onOpenChange:s}),e(E,{}),e(C,{open:f,onOpenChange:d})]}),r(A,{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(D,{className:"text-muted-foreground px-2",children:"No results"}),e(B,{children:F.map(o=>r(z,{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}),r("div",{children:[e("p",{className:"font-medium",children:o.title}),e("p",{className:"text-muted-foreground text-xs",children:o.description})]})]},o.title))})]}),r(_,{open:v,onOpenChange:N,children:[e(g,{orientation:"vertical"}),e(x,{open:m,onOpenChange:u}),e(g,{orientation:"vertical"}),e(h,{open:t,onOpenChange:s}),e(g,{orientation:"vertical"}),e(E,{}),e(g,{orientation:"vertical"}),e(C,{open:f,onOpenChange:d})]})]})})]}):null};export{me as TailwindAdvancedEditor};
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 +1 @@
1
- import{cx as t}from"class-variance-authority";import{AIHighlight as e,HorizontalRule as r,Placeholder as o,StarterKit as s,TaskItem as i,TaskList as l,TiptapImage as d,TiptapLink as n,UpdatedImage as a}from"../novel/src/extensions";import{UploadImagesPlugin as u}from"../novel/src/plugins";import c from"tiptap-extension-auto-joiner";import m from"tiptap-extension-global-drag-handle";const g=e,p=o,b=n.configure({HTMLAttributes:{class:t("text-muted-foreground underline underline-offset-[3px] hover:text-primary transition-colors cursor-pointer")}}),f=d.extend({addProseMirrorPlugins(){return[u({imageClass:t("opacity-40 rounded-lg border border-stone-200")})]}}).configure({allowBase64:!0,HTMLAttributes:{class:t("rounded-lg border border-muted")}}),L=a.configure({HTMLAttributes:{class:t("rounded-lg border border-muted")}}),T=l.configure({HTMLAttributes:{class:t("not-prose pl-2 ")}}),H=i.configure({HTMLAttributes:{class:t("flex gap-2 items-start my-4")},nested:!0}),A=r.configure({HTMLAttributes:{class:t("mt-4 mb-6 border-t border-muted-foreground")}}),h=s.configure({bulletList:{HTMLAttributes:{class:t("list-disc list-outside leading-3 -mt-2")}},orderedList:{HTMLAttributes:{class:t("list-decimal list-outside leading-3 -mt-2")}},listItem:{HTMLAttributes:{class:t("leading-normal -mb-2")}},blockquote:{HTMLAttributes:{class:t("border-l-4 border-primary")}},codeBlock:{HTMLAttributes:{class:t("rounded-md bg-muted text-muted-foreground border p-5 font-mono font-medium")}},code:{HTMLAttributes:{class:t("rounded-md bg-muted px-1.5 py-1 font-mono font-medium"),spellcheck:"false"}},horizontalRule:!1,dropcursor:{color:"#DBEAFE",width:4},gapcursor:!1}),P=[h,p,b,f,L,T,H,A,g,m.configure({dragHandleWidth:20,scrollTreshold:100}),c.configure({elementsToJoin:["bulletList","orderedList"]})];export{P as defaultExtensions};
1
+ import{cx as t}from"class-variance-authority";import{AIHighlight as e,HorizontalRule as r,Placeholder as o,StarterKit as s,TaskItem as i,TaskList as l,TiptapImage as d,TiptapLink as a,UpdatedImage as n}from"../novel/src/extensions";import{UploadImagesPlugin as u}from"../novel/src/plugins";import m from"tiptap-extension-auto-joiner";import c from"tiptap-extension-global-drag-handle";import{slashCommand as g}from"./slash-command";const p=e,b=o,f=a.configure({HTMLAttributes:{class:t("text-muted-foreground underline underline-offset-[3px] hover:text-primary transition-colors cursor-pointer")}}),L=d.extend({addProseMirrorPlugins(){return[u({imageClass:t("opacity-40 rounded-lg border border-stone-200")})]}}).configure({allowBase64:!0,HTMLAttributes:{class:t("rounded-lg border border-muted")}}),T=n.configure({HTMLAttributes:{class:t("rounded-lg border border-muted")}}),H=l.configure({HTMLAttributes:{class:t("not-prose pl-2 ")}}),A=i.configure({HTMLAttributes:{class:t("flex gap-2 items-start my-4")},nested:!0}),h=r.configure({HTMLAttributes:{class:t("mt-4 mb-6 border-t border-muted-foreground")}}),M=s.configure({bulletList:{HTMLAttributes:{class:t("list-disc list-outside leading-3 -mt-2")}},orderedList:{HTMLAttributes:{class:t("list-decimal list-outside leading-3 -mt-2")}},listItem:{HTMLAttributes:{class:t("leading-normal -mb-2")}},blockquote:{HTMLAttributes:{class:t("border-l-4 border-primary")}},codeBlock:{HTMLAttributes:{class:t("rounded-md bg-muted text-muted-foreground border p-5 font-mono font-medium")}},code:{HTMLAttributes:{class:t("rounded-md bg-muted px-1.5 py-1 font-mono font-medium"),spellcheck:"false"}},horizontalRule:!1,dropcursor:{color:"#DBEAFE",width:4},gapcursor:!1}),B=[M,b,f,L,T,H,A,h,p,c.configure({dragHandleWidth:20,scrollTreshold:100}),m.configure({elementsToJoin:["bulletList","orderedList"]}),g];export{B as defaultExtensions};
@@ -2,7 +2,7 @@ import { type VariantProps } from "class-variance-authority";
2
2
  import * as React from "react";
3
3
  declare const buttonVariants: (props?: ({
4
4
  variant?: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
5
- size?: "default" | "sm" | "lg" | "icon" | null | undefined;
5
+ size?: "icon" | "default" | "sm" | "lg" | null | undefined;
6
6
  } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
7
7
  export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
8
8
  asChild?: boolean;
@@ -0,0 +1 @@
1
+ export declare function convertEditorJsonToHTML(editorJsonValue: any): string;
@@ -0,0 +1 @@
1
+ import{generateHTML as n}from"@tiptap/html";import{defaultExtensions as r}from"./extensions";function i(o){return console.log("convertEditorJsonToHTML",o),n(o,[...r])}export{i as convertEditorJsonToHTML};
@@ -0,0 +1,8 @@
1
+ import React from "react";
2
+ interface RichTextInputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'name'> {
3
+ onOpenFile?: (data: any) => void;
4
+ asChild?: boolean;
5
+ name: string;
6
+ }
7
+ export declare const RichTextInput: (props: RichTextInputProps) => React.JSX.Element;
8
+ export {};
@@ -0,0 +1 @@
1
+ import{jsx as t}from"react/jsx-runtime";import{useFormContext as r}from"react-hook-form";import{TailwindAdvancedEditor as i}from"../../novel/tailwind/advanced-editor";import{convertEditorJsonToHTML as p}from"../../novel/tailwind/utils";const l=a=>{const o=r();return t("div",{children:t(i,{onValueChange:n=>{const e=p(n);o.setValue("content",e)}})})};export{l as RichTextInput};
@@ -1,4 +1,4 @@
1
1
  import * as React from "react";
2
- import type { InputProps } from "../inputField/types";
2
+ import type { InputProps } from "../input-field/types";
3
3
  declare const SearchInput: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
4
4
  export { SearchInput };
@@ -0,0 +1,7 @@
1
+ import React from "react";
2
+ import "video.js/dist/video-js.css";
3
+ export declare const MtVideoPlayer: (props: {
4
+ videoSrc: string;
5
+ sourceType?: string;
6
+ autoplay?: boolean;
7
+ }) => React.JSX.Element;
@@ -0,0 +1 @@
1
+ "use client";import{Fragment as f,jsx as l}from"react/jsx-runtime";import r,{useState as u}from"react";import a from"video.js";import"video.js/dist/video-js.css";import{cn as p}from"../lib/utils";const x=s=>{const{videoSrc:i,sourceType:c}=s,e=r.useRef(null),[t,n]=u(null);return r.useEffect(()=>{if(t&&e!=null&&e.current){const o=a(e.current,{autoplay:!0,fill:!0});o.ready(()=>{}),n(o)}return()=>{t&&t.dispose()}},[t]),l(f,{children:l("div",{className:p("mx-auto flex h-96 min-h-96 w-[300px] items-center justify-center ","md:w-[700px]","lg:w-[1000px]"),children:l("div",{className:"block h-full w-full flex-1",children:l("video",{ref:e,className:"video-js h-full w-full",controls:!0,preload:"auto",children:l("source",{src:i,type:c||"application/x-mpegURL"})})})})})};export{x as MtVideoPlayer};
@@ -0,0 +1,13 @@
1
+ /// <reference types="react" />
2
+ import type { StaticImageData } from 'next/image';
3
+ interface ModalVideoProps {
4
+ thumb: StaticImageData;
5
+ thumbWidth: number;
6
+ thumbHeight: number;
7
+ thumbAlt: string;
8
+ video: string;
9
+ videoWidth: number;
10
+ videoHeight: number;
11
+ }
12
+ export default function ModalVideo({ thumb, thumbWidth, thumbHeight, thumbAlt, video, videoWidth, videoHeight, }: ModalVideoProps): import("react").JSX.Element;
13
+ export {};
@@ -0,0 +1 @@
1
+ "use client";import{jsx as e,jsxs as t}from"react/jsx-runtime";import{Dialog as l,Transition as o}from"@headlessui/react";import f from"next/image";import{Fragment as g,useRef as v,useState as b}from"react";function x({thumb:s,thumbWidth:r,thumbHeight:d,thumbAlt:c,video:u,videoWidth:m,videoHeight:p}){const[h,a]=b(!1),i=v(null);return t("div",{className:"flex justify-center",children:[t("button",{className:"group relative flex items-center justify-center rounded-3xl focus:outline-none focus-visible:ring focus-visible:ring-indigo-300",onClick:()=>{a(!0)},"aria-label":"Watch the video",children:[e(f,{className:"rounded-3xl shadow-2xl transition-shadow duration-300 ease-in-out",src:s,width:r,height:d,priority:!0,alt:c}),t("svg",{className:"pointer-events-none absolute transition-transform duration-300 ease-in-out group-hover:scale-110",xmlns:"http://www.w3.org/2000/svg",width:"72",height:"72",children:[e("circle",{className:"fill-white",cx:"36",cy:"36",r:"36",fillOpacity:".8"}),e("path",{className:"fill-indigo-500 drop-shadow-2xl",d:"M44 36a.999.999 0 0 0-.427-.82l-10-7A1 1 0 0 0 32 29V43a.999.999 0 0 0 1.573.82l10-7A.995.995 0 0 0 44 36V36c0 .001 0 .001 0 0Z"})]})]}),e(o,{show:h,as:g,afterEnter:()=>{var n;return(n=i.current)==null?void 0:n.play()},children:t(l,{initialFocus:i,onClose:()=>a(!1),children:[e(o.Child,{className:"fixed inset-0 z-[99999] bg-black bg-opacity-50 transition-opacity",enter:"transition ease-out duration-200",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"transition ease-out duration-100",leaveFrom:"opacity-100",leaveTo:"opacity-0","aria-hidden":"true"}),e(o.Child,{className:"fixed inset-0 z-[99999] flex px-4 py-6 md:px-6",enter:"transition ease-out duration-300",enterFrom:"opacity-0 scale-75",enterTo:"opacity-100 scale-100",leave:"transition ease-out duration-200",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-75",children:e("div",{className:"mx-auto flex h-full max-w-5xl items-center",children:e(l.Panel,{className:"aspect-video max-h-full w-full overflow-hidden rounded-3xl bg-black shadow-2xl",children:t("video",{ref:i,width:m,height:p,loop:!0,controls:!0,children:[e("source",{src:u,type:"video/mp4"}),"Your browser does not support the video tag."]})})})})]})})]})}export{x as default};
@@ -0,0 +1,34 @@
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 strings_exports = {};
20
+ __export(strings_exports, {
21
+ capitalize: () => capitalize,
22
+ escape: () => escape,
23
+ uncapitalize: () => uncapitalize
24
+ });
25
+ module.exports = __toCommonJS(strings_exports);
26
+ const escape = (name) => '"' + name.replace(/"/g, '""') + '"';
27
+ const capitalize = (string) => string.charAt(0).toUpperCase() + string.slice(1);
28
+ const uncapitalize = (string) => string.charAt(0).toLowerCase() + string.slice(1);
29
+ // Annotate the CommonJS export names for ESM import in node:
30
+ 0 && (module.exports = {
31
+ capitalize,
32
+ escape,
33
+ uncapitalize
34
+ });
@@ -16,14 +16,16 @@ var __copyProps = (to, from, except, desc) => {
16
16
  return to;
17
17
  };
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
- var NovelEditor_exports = {};
20
- __export(NovelEditor_exports, {
21
- NovelEditor: () => NovelEditor
19
+ var time_exports = {};
20
+ __export(time_exports, {
21
+ calculateDelay: () => calculateDelay,
22
+ getCurrentTimeZone: () => getCurrentTimeZone
22
23
  });
23
- module.exports = __toCommonJS(NovelEditor_exports);
24
- var import_advanced_editor = require("./ui/novel/tailwind/advanced-editor");
25
- const NovelEditor = import_advanced_editor.TailwindAdvancedEditor;
24
+ module.exports = __toCommonJS(time_exports);
25
+ const calculateDelay = (attempts) => Math.min(1e3 * Math.pow(2, Math.max(1, attempts)) + Math.random() * 100, Math.pow(2, 31) - 1);
26
+ const getCurrentTimeZone = () => Intl.DateTimeFormat().resolvedOptions().timeZone;
26
27
  // Annotate the CommonJS export names for ESM import in node:
27
28
  0 && (module.exports = {
28
- NovelEditor
29
+ calculateDelay,
30
+ getCurrentTimeZone
29
31
  });
package/dist/tailwind.cjs CHANGED
@@ -1,19 +1,13 @@
1
1
  const path = require("path");
2
-
3
- // console.log("tailwindcss[mtxuilib]");
2
+ console.log("tailwindcss[mtxuilib]");
4
3
  /** @type {import('tailwindcss').Config} */
5
4
  module.exports = {
6
- // `content` is replaced instead of extended, so this line has to be added in
7
- // the `content` of each app' tailwind.config.js
8
5
  content: [
9
6
  path.join(
10
7
  path.dirname(require.resolve("mtxuilib")),
11
8
  "**/*.{js,ts,jsx,tsx}",
12
9
  ),
13
10
  ],
14
- // theme: {
15
- // extend: {},
16
- // },
17
11
  darkMode: ["class"],
18
12
  theme: {
19
13
  container: {