mtxuilib 0.0.340 → 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.
- package/dist/esm/lib/strings.d.ts +3 -0
- package/dist/esm/lib/strings.js +1 -0
- package/dist/esm/lib/time.d.ts +2 -0
- package/dist/esm/lib/time.js +1 -0
- package/dist/esm/ui/novel/tailwind/utils.d.ts +1 -1
- package/dist/esm/video-player/mt-video-player.d.ts +7 -0
- package/dist/esm/video-player/mt-video-player.js +1 -0
- package/dist/esm/video-player/video-player2/modal-video-player.d.ts +13 -0
- package/dist/esm/video-player/video-player2/modal-video-player.js +1 -0
- package/dist/lib/strings.cjs +34 -0
- package/dist/lib/time.cjs +31 -0
- package/dist/tsconfig.type.tsbuildinfo +1 -1
- package/dist/video-player/mt-video-player.cjs +70 -0
- package/dist/video-player/video-player2/modal-video-player.cjs +95 -0
- package/package.json +3 -1
|
@@ -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 @@
|
|
|
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};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function convertEditorJsonToHTML(editorJsonValue: any):
|
|
1
|
+
export declare function convertEditorJsonToHTML(editorJsonValue: any): string;
|
|
@@ -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
|
+
});
|
|
@@ -0,0 +1,31 @@
|
|
|
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 time_exports = {};
|
|
20
|
+
__export(time_exports, {
|
|
21
|
+
calculateDelay: () => calculateDelay,
|
|
22
|
+
getCurrentTimeZone: () => getCurrentTimeZone
|
|
23
|
+
});
|
|
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;
|
|
27
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
28
|
+
0 && (module.exports = {
|
|
29
|
+
calculateDelay,
|
|
30
|
+
getCurrentTimeZone
|
|
31
|
+
});
|