@haklex/rich-renderer-video 0.4.0 → 0.5.0
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VideoEditRenderer.d.ts","sourceRoot":"","sources":["../src/VideoEditRenderer.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"VideoEditRenderer.d.ts","sourceRoot":"","sources":["../src/VideoEditRenderer.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAmBxE,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,kBAAkB,2CAQ1D"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export type EditorHistoryShortcut = 'redo' | 'undo';
|
|
2
|
+
export interface EditorHistoryShortcutEvent {
|
|
3
|
+
altKey?: boolean;
|
|
4
|
+
ctrlKey: boolean;
|
|
5
|
+
key: string;
|
|
6
|
+
metaKey: boolean;
|
|
7
|
+
shiftKey: boolean;
|
|
8
|
+
}
|
|
9
|
+
export interface EditorHistoryShortcutOptions {
|
|
10
|
+
isDirty?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export declare function getEditorHistoryShortcut(event: EditorHistoryShortcutEvent, options?: EditorHistoryShortcutOptions): EditorHistoryShortcut | null;
|
|
13
|
+
//# sourceMappingURL=history-shortcuts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"history-shortcuts.d.ts","sourceRoot":"","sources":["../src/history-shortcuts.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,qBAAqB,GAAG,MAAM,GAAG,MAAM,CAAC;AAEpD,MAAM,WAAW,0BAA0B;IACzC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,4BAA4B;IAC3C,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,wBAAgB,wBAAwB,CACtC,KAAK,EAAE,0BAA0B,EACjC,OAAO,GAAE,4BAAiC,GACzC,qBAAqB,GAAG,IAAI,CAgB9B"}
|
package/dist/index.mjs
CHANGED
|
@@ -2,10 +2,21 @@ import { a as editOverlay, c as editPreview, d as root, f as semanticClassNames,
|
|
|
2
2
|
import { useRendererMode } from "@haklex/rich-editor";
|
|
3
3
|
import { ActionBar, ActionButton, Popover, PopoverPanel, PopoverTrigger } from "@haklex/rich-editor-ui";
|
|
4
4
|
import { useLexicalComposerContext } from "@lexical/react/LexicalComposerContext";
|
|
5
|
-
import { $getNearestNodeFromDOMNode } from "lexical";
|
|
5
|
+
import { $getNearestNodeFromDOMNode, REDO_COMMAND, UNDO_COMMAND } from "lexical";
|
|
6
6
|
import { ExternalLink, ImageIcon, Trash2, Video } from "lucide-react";
|
|
7
7
|
import { useCallback, useEffect, useRef, useState } from "react";
|
|
8
8
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
+
//#region src/history-shortcuts.ts
|
|
10
|
+
function getEditorHistoryShortcut(event, options = {}) {
|
|
11
|
+
if (options.isDirty) return null;
|
|
12
|
+
if (event.altKey) return null;
|
|
13
|
+
if (!event.metaKey && !event.ctrlKey) return null;
|
|
14
|
+
const key = event.key.toLowerCase();
|
|
15
|
+
if (key === "z") return event.shiftKey ? "redo" : "undo";
|
|
16
|
+
if (key === "y" && event.ctrlKey && !event.metaKey && !event.shiftKey) return "redo";
|
|
17
|
+
return null;
|
|
18
|
+
}
|
|
19
|
+
//#endregion
|
|
9
20
|
//#region src/VideoEditRenderer.tsx
|
|
10
21
|
var UNSAFE_VIDEO_URL_RE = /^(?:javascript\s*:|vbscript\s*:|data\s*:(?!video\/))/i;
|
|
11
22
|
function VideoEditRenderer(props) {
|
|
@@ -74,6 +85,19 @@ function VideoEditRendererInner({ src, poster, width, height }) {
|
|
|
74
85
|
src,
|
|
75
86
|
poster
|
|
76
87
|
]);
|
|
88
|
+
const handlePanelKeyDown = useCallback((e) => {
|
|
89
|
+
const shortcut = getEditorHistoryShortcut(e, { isDirty: editSrc !== src || editPoster !== (poster || "") });
|
|
90
|
+
if (!shortcut) return;
|
|
91
|
+
e.preventDefault();
|
|
92
|
+
e.stopPropagation();
|
|
93
|
+
editor.dispatchCommand(shortcut === "undo" ? UNDO_COMMAND : REDO_COMMAND, void 0);
|
|
94
|
+
}, [
|
|
95
|
+
editPoster,
|
|
96
|
+
editSrc,
|
|
97
|
+
editor,
|
|
98
|
+
poster,
|
|
99
|
+
src
|
|
100
|
+
]);
|
|
77
101
|
if (!editable) return /* @__PURE__ */ jsx(VideoRenderer, {
|
|
78
102
|
height,
|
|
79
103
|
poster,
|
|
@@ -122,6 +146,7 @@ function VideoEditRendererInner({ src, poster, width, height }) {
|
|
|
122
146
|
className: `${editPanel} ${semanticClassNames.editPanel}`,
|
|
123
147
|
side: "bottom",
|
|
124
148
|
sideOffset: 8,
|
|
149
|
+
onKeyDown: handlePanelKeyDown,
|
|
125
150
|
children: [
|
|
126
151
|
/* @__PURE__ */ jsxs("div", {
|
|
127
152
|
className: `${editField} ${semanticClassNames.editField}`,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
@keyframes _1x2h1ol3{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(1.3)}}@keyframes _1x2h1olc{0%{transform:rotate(0)}to{transform:rotate(360deg)}}._1x2h1ol0{margin:1.25rem 0}._1x2h1ol1{background:#000;border-radius:.75rem;width:100%;position:relative;overflow:hidden}._1x2h1ol2{object-fit:contain;cursor:pointer;background:#000;width:100%;height:100%;display:block}._1x2h1ol4{color:#fff;pointer-events:none;background:#000000b3;border-radius:999px;justify-content:center;align-items:center;width:5rem;height:5rem;margin:auto;animation:.5s forwards _1x2h1ol3;display:inline-flex;position:absolute;top:0;bottom:0;left:0;right:0}._1x2h1ol5{border:1px solid color-mix(in srgb, var(--rc-border) 20%, transparent);background:color-mix(in srgb, var(--rc-bg-secondary) 90%, transparent);-webkit-backdrop-filter:blur(24px)saturate(180%);backdrop-filter:blur(24px)saturate(180%);height:2.5rem;color:var(--rc-text);opacity:0;border-radius:999px;align-items:center;gap:.75rem;max-width:80vw;margin:0 auto;padding:0 1rem;transition:opacity .2s,transform .2s;display:flex;position:absolute;bottom:.5rem;left:2rem;right:2rem;transform:translateY(4px)}._1x2h1ol1:hover ._1x2h1ol5,._1x2h1ol1:focus-within ._1x2h1ol5{opacity:1;transform:translateY(0)}._1x2h1ol6{-webkit-appearance:none;appearance:none;color:inherit;cursor:pointer;background:0 0;border:none;flex-shrink:0;justify-content:center;align-items:center;padding:.125rem;line-height:1;transition:transform .15s;display:inline-flex}._1x2h1ol6:hover{transform:scale(1.1)}._1x2h1ol6:active{transform:scale(.93)}._1x2h1ol6:focus-visible{outline-offset:2px;border-radius:4px;outline:2px solid}._1x2h1ol6:disabled{opacity:.5;pointer-events:none}._1x2h1ol7{flex:1;height:100%}._1x2h1ol8{touch-action:none;-webkit-user-select:none;user-select:none;align-items:center;width:100%;height:100%;display:flex;position:relative}._1x2h1ol9{background:var(--rc-bg);border-radius:999px;flex:1;height:.25rem;position:relative}._1x2h1ola{background:color-mix(in srgb, var(--rc-text-secondary) 40%, transparent);border-radius:999px;height:100%;position:absolute}._1x2h1olb{background:var(--rc-text-secondary);border:none;border-radius:1px;width:3px;height:.75rem;display:block}._1x2h1old{animation:.8s linear infinite _1x2h1olc}._1x2h1ole{cursor:pointer;display:block}._1x2h1olf{cursor:pointer;background:#000 50%/cover;border-radius:.75rem;width:100%;position:relative;overflow:hidden}._1x2h1olg{object-fit:contain;pointer-events:none;width:100%;height:100%;display:block}._1x2h1olh{color:#fff;background:#00000059;justify-content:center;align-items:center;transition:background .2s;display:flex;position:absolute;top:0;bottom:0;left:0;right:0}._1x2h1ole:hover ._1x2h1olh{background:#00000080}._1x2h1oli{border:2px dashed var(--rc-border);border-radius:var(--rc-radius-md);color:var(--rc-text-secondary);font-size:var(--rc-font-size-md);cursor:pointer;justify-content:center;align-items:center;gap:8px;padding:2rem;transition:border-color .2s,color .2s;display:flex}._1x2h1oli:hover{border-color:var(--rc-accent);color:var(--rc-text)}._1x2h1olj{width:340px;font-family:var(--rc-font-family-sans);flex-direction:column;gap:8px;padding:12px;display:flex}._1x2h1olk{background-color:var(--rc-bg-secondary);border-radius:6px;align-items:center;gap:8px;min-width:0;padding:6px 10px;display:flex}._1x2h1oll{color:var(--rc-text-secondary);flex-shrink:0}._1x2h1olm{-webkit-appearance:none;appearance:none;color:inherit;font-size:var(--rc-font-size-sm);background-color:#0000;border:none;outline:none;flex:1;min-width:0;padding:0}._1x2h1olm::placeholder{color:var(--rc-text-secondary)}@media (max-width:768px){._1x2h1ol5{opacity:1;gap:.5rem;padding:0 .75rem;left:.75rem;right:.75rem;transform:none}}
|
|
1
|
+
:root{--rc-text:#000;--rc-text-secondary:#262626;--rc-text-tertiary:#737373;--rc-text-quaternary:#a3a3a3;--rc-bg:#fff;--rc-bg-secondary:#fafafa;--rc-bg-tertiary:#f5f5f5;--rc-fill:#e8e8e8;--rc-fill-secondary:#eee;--rc-fill-tertiary:#f5f5f5;--rc-fill-quaternary:#fafafa;--rc-border:#f5f5f5;--rc-accent:#2563eb;--rc-accent-light:#2563eb20;--rc-link:#2563eb;--rc-code-text:#404040;--rc-code-bg:#f5f5f5;--rc-hr-border:#e5e5e5;--rc-quote-border:#2563eb;--rc-quote-bg:#f5f5f5;--rc-alert-info:#006bb7;--rc-alert-warning:#c50;--rc-alert-tip:#1c0;--rc-alert-caution:#c01;--rc-alert-important:#50c;--rc-max-width:700px;--rc-shadow-top-bar:0 8px 30px #0000001f, 0 2px 8px #0000000f;--rc-shadow-modal:0 10px 15px -3px #0000001a, 0 4px 6px -4px #0000001a;--rc-shadow-menu:0 1px 4px #0000000a, 0 4px 16px #00000014;--rc-space-xs:4px;--rc-space-sm:8px;--rc-space-md:16px;--rc-space-lg:24px;--rc-space-xl:32px;--rc-font-family-sans:"PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, "noto sans sc", "hiragino sans gb", -apple-system, system-ui, sans-serif, Apple Color Emoji, Segoe UI Emoji, Not Color Emoji;--rc-font-family-serif:"Noto Serif CJK SC", "Source Han Serif SC", "Source Han Serif", "source-han-serif-sc", "Songti SC", STSong, "华文宋体", serif;--rc-font-family-kai:"楷体", KaiTi, STKaiti, "Kaiti SC", "LXGW WenKai", "霞鹜文楷", "Noto Serif CJK SC", serif;--rc-font-mono:"SF Mono", SFMono-Regular, ui-monospace, "DejaVu Sans Mono", Menlo, Consolas, monospace;--rc-font-size-2xs:.625em;--rc-font-size-xs:.75em;--rc-font-size-sm:.8125em;--rc-font-size-md:.875em;--rc-font-size-lg:1.25em;--rc-font-size-base:16px;--rc-font-size-small:14px;--rc-line-height:1.7;--rc-line-height-tight:1.4;--rc-font-family:"PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, "noto sans sc", "hiragino sans gb", -apple-system, system-ui, sans-serif, Apple Color Emoji, Segoe UI Emoji, Not Color Emoji;--rc-radius-sm:4px;--rc-radius-md:8px;--rc-radius-lg:12px}:root.dark,[data-theme=dark]{--rc-text:#fafafa;--rc-text-secondary:#a3a3a3;--rc-text-tertiary:#737373;--rc-text-quaternary:#525252;--rc-bg:#0a0a0a;--rc-bg-secondary:#171717;--rc-bg-tertiary:#262626;--rc-fill:#2a2a2a;--rc-fill-secondary:#222;--rc-fill-tertiary:#1a1a1a;--rc-fill-quaternary:#141414;--rc-border:#262626;--rc-accent:#60a5fa;--rc-accent-light:#60a5fa20;--rc-link:#60a5fa;--rc-code-text:#d4d4d4;--rc-code-bg:#262626;--rc-hr-border:#262626;--rc-quote-border:#60a5fa;--rc-quote-bg:#262626;--rc-alert-info:#7db9e5;--rc-alert-warning:#da864a;--rc-alert-tip:#54da48;--rc-alert-caution:#e16973;--rc-alert-important:#9966e0;--rc-max-width:700px;--rc-shadow-top-bar:0 8px 30px #00000073, 0 2px 8px #0000004d;--rc-shadow-modal:0 10px 15px -3px #0006, 0 4px 6px -4px #00000059;--rc-shadow-menu:0 1px 4px #00000040, 0 4px 16px #0006;--rc-space-xs:4px;--rc-space-sm:8px;--rc-space-md:16px;--rc-space-lg:24px;--rc-space-xl:32px;--rc-font-family-sans:"PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, "noto sans sc", "hiragino sans gb", -apple-system, system-ui, sans-serif, Apple Color Emoji, Segoe UI Emoji, Not Color Emoji;--rc-font-family-serif:"Noto Serif CJK SC", "Source Han Serif SC", "Source Han Serif", "source-han-serif-sc", "Songti SC", STSong, "华文宋体", serif;--rc-font-family-kai:"楷体", KaiTi, STKaiti, "Kaiti SC", "LXGW WenKai", "霞鹜文楷", "Noto Serif CJK SC", serif;--rc-font-mono:"SF Mono", SFMono-Regular, ui-monospace, "DejaVu Sans Mono", Menlo, Consolas, monospace;--rc-font-size-2xs:.625em;--rc-font-size-xs:.75em;--rc-font-size-sm:.8125em;--rc-font-size-md:.875em;--rc-font-size-lg:1.25em;--rc-font-size-base:16px;--rc-font-size-small:14px;--rc-line-height:1.7;--rc-line-height-tight:1.4;--rc-font-family:"PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, "noto sans sc", "hiragino sans gb", -apple-system, system-ui, sans-serif, Apple Color Emoji, Segoe UI Emoji, Not Color Emoji;--rc-radius-sm:4px;--rc-radius-md:8px;--rc-radius-lg:12px}._1ju0cb20{--rc-text:#000;--rc-text-secondary:#262626;--rc-text-tertiary:#737373;--rc-text-quaternary:#a3a3a3;--rc-bg:#fff;--rc-bg-secondary:#fafafa;--rc-bg-tertiary:#f5f5f5;--rc-fill:#e8e8e8;--rc-fill-secondary:#eee;--rc-fill-tertiary:#f5f5f5;--rc-fill-quaternary:#fafafa;--rc-border:#f5f5f5;--rc-accent:#2563eb;--rc-accent-light:#2563eb20;--rc-link:#2563eb;--rc-code-text:#404040;--rc-code-bg:#f5f5f5;--rc-hr-border:#e5e5e5;--rc-quote-border:#2563eb;--rc-quote-bg:#f5f5f5;--rc-alert-info:#006bb7;--rc-alert-warning:#c50;--rc-alert-tip:#1c0;--rc-alert-caution:#c01;--rc-alert-important:#50c;--rc-max-width:700px;--rc-shadow-top-bar:0 8px 30px #0000001f, 0 2px 8px #0000000f;--rc-shadow-modal:0 10px 15px -3px #0000001a, 0 4px 6px -4px #0000001a;--rc-shadow-menu:0 1px 4px #0000000a, 0 4px 16px #00000014;--rc-space-xs:4px;--rc-space-sm:8px;--rc-space-md:16px;--rc-space-lg:24px;--rc-space-xl:32px;--rc-font-family-sans:"PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, "noto sans sc", "hiragino sans gb", -apple-system, system-ui, sans-serif, Apple Color Emoji, Segoe UI Emoji, Not Color Emoji;--rc-font-family-serif:"Noto Serif CJK SC", "Source Han Serif SC", "Source Han Serif", "source-han-serif-sc", "Songti SC", STSong, "华文宋体", serif;--rc-font-family-kai:"楷体", KaiTi, STKaiti, "Kaiti SC", "LXGW WenKai", "霞鹜文楷", "Noto Serif CJK SC", serif;--rc-font-mono:"SF Mono", SFMono-Regular, ui-monospace, "DejaVu Sans Mono", Menlo, Consolas, monospace;--rc-font-size-2xs:.625em;--rc-font-size-xs:.75em;--rc-font-size-sm:.8125em;--rc-font-size-md:.875em;--rc-font-size-lg:1.25em;--rc-font-size-base:16px;--rc-font-size-small:14px;--rc-line-height:1.7;--rc-line-height-tight:1.4;--rc-font-family:"PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, "noto sans sc", "hiragino sans gb", -apple-system, system-ui, sans-serif, Apple Color Emoji, Segoe UI Emoji, Not Color Emoji;--rc-radius-sm:4px;--rc-radius-md:8px;--rc-radius-lg:12px}._1ju0cb21{--rc-text:#000;--rc-text-secondary:#262626;--rc-text-tertiary:#737373;--rc-text-quaternary:#a3a3a3;--rc-bg:#fff;--rc-bg-secondary:#fafafa;--rc-bg-tertiary:#f5f5f5;--rc-fill:#e8e8e8;--rc-fill-secondary:#eee;--rc-fill-tertiary:#f5f5f5;--rc-fill-quaternary:#fafafa;--rc-border:#f5f5f5;--rc-accent:#2563eb;--rc-accent-light:#2563eb20;--rc-link:#2563eb;--rc-code-text:#404040;--rc-code-bg:#f5f5f5;--rc-hr-border:#e5e5e5;--rc-quote-border:#2563eb;--rc-quote-bg:#f5f5f5;--rc-alert-info:#006bb7;--rc-alert-warning:#c50;--rc-alert-tip:#1c0;--rc-alert-caution:#c01;--rc-alert-important:#50c;--rc-max-width:700px;--rc-shadow-top-bar:0 8px 30px #0000001f, 0 2px 8px #0000000f;--rc-shadow-modal:0 10px 15px -3px #0000001a, 0 4px 6px -4px #0000001a;--rc-shadow-menu:0 1px 4px #0000000a, 0 4px 16px #00000014;--rc-space-xs:4px;--rc-space-sm:8px;--rc-space-md:16px;--rc-space-lg:24px;--rc-space-xl:32px;--rc-font-family-sans:"PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, "noto sans sc", "hiragino sans gb", -apple-system, system-ui, sans-serif, Apple Color Emoji, Segoe UI Emoji, Not Color Emoji;--rc-font-family-serif:"Noto Serif CJK SC", "Source Han Serif SC", "Source Han Serif", "source-han-serif-sc", "Songti SC", STSong, "华文宋体", serif;--rc-font-family-kai:"楷体", KaiTi, STKaiti, "Kaiti SC", "LXGW WenKai", "霞鹜文楷", "Noto Serif CJK SC", serif;--rc-font-mono:"SF Mono", SFMono-Regular, ui-monospace, "DejaVu Sans Mono", Menlo, Consolas, monospace;--rc-font-size-2xs:.625em;--rc-font-size-xs:.75em;--rc-font-size-sm:.8125em;--rc-font-size-md:.875em;--rc-font-size-lg:1.25em;--rc-font-size-base:16px;--rc-font-size-small:14px;--rc-line-height:1.8;--rc-line-height-tight:1.4;--rc-font-family:"Noto Serif CJK SC", "Source Han Serif SC", "Source Han Serif", "source-han-serif-sc", "Songti SC", STSong, "华文宋体", serif;--rc-radius-sm:4px;--rc-radius-md:8px;--rc-radius-lg:12px}._1ju0cb22{--rc-text:#000;--rc-text-secondary:#262626;--rc-text-tertiary:#737373;--rc-text-quaternary:#a3a3a3;--rc-bg:#fff;--rc-bg-secondary:#fafafa;--rc-bg-tertiary:#f5f5f5;--rc-fill:#e8e8e8;--rc-fill-secondary:#eee;--rc-fill-tertiary:#f5f5f5;--rc-fill-quaternary:#fafafa;--rc-border:#f5f5f5;--rc-accent:#2563eb;--rc-accent-light:#2563eb20;--rc-link:#2563eb;--rc-code-text:#404040;--rc-code-bg:#f5f5f5;--rc-hr-border:#e5e5e5;--rc-quote-border:#a3a3a3;--rc-quote-bg:#fafafa;--rc-alert-info:#006bb7;--rc-alert-warning:#c50;--rc-alert-tip:#1c0;--rc-alert-caution:#c01;--rc-alert-important:#50c;--rc-max-width:none;--rc-shadow-top-bar:0 8px 30px #0000001f, 0 2px 8px #0000000f;--rc-shadow-modal:0 10px 15px -3px #0000001a, 0 4px 6px -4px #0000001a;--rc-shadow-menu:0 1px 4px #0000000a, 0 4px 16px #00000014;--rc-space-xs:2px;--rc-space-sm:4px;--rc-space-md:10px;--rc-space-lg:16px;--rc-space-xl:20px;--rc-font-family-sans:"PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, "noto sans sc", "hiragino sans gb", -apple-system, system-ui, sans-serif, Apple Color Emoji, Segoe UI Emoji, Not Color Emoji;--rc-font-family-serif:"Noto Serif CJK SC", "Source Han Serif SC", "Source Han Serif", "source-han-serif-sc", "Songti SC", STSong, "华文宋体", serif;--rc-font-family-kai:"楷体", KaiTi, STKaiti, "Kaiti SC", "LXGW WenKai", "霞鹜文楷", "Noto Serif CJK SC", serif;--rc-font-mono:"SF Mono", SFMono-Regular, ui-monospace, "DejaVu Sans Mono", Menlo, Consolas, monospace;--rc-font-size-2xs:.625em;--rc-font-size-xs:.75em;--rc-font-size-sm:.8125em;--rc-font-size-md:.875em;--rc-font-size-lg:1.25em;--rc-font-size-base:14px;--rc-font-size-small:12px;--rc-line-height:1.5;--rc-line-height-tight:1.3;--rc-font-family:"PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, "noto sans sc", "hiragino sans gb", -apple-system, system-ui, sans-serif, Apple Color Emoji, Segoe UI Emoji, Not Color Emoji;--rc-radius-sm:3px;--rc-radius-md:6px;--rc-radius-lg:12px}.dark ._1ju0cb20,[data-theme=dark] ._1ju0cb20,.dark._1ju0cb20,[data-theme=dark]._1ju0cb20,.dark ._1ju0cb21,[data-theme=dark] ._1ju0cb21,.dark._1ju0cb21,[data-theme=dark]._1ju0cb21,.dark ._1ju0cb22,[data-theme=dark] ._1ju0cb22,.dark._1ju0cb22,[data-theme=dark]._1ju0cb22{--rc-text:#fafafa;--rc-text-secondary:#a3a3a3;--rc-text-tertiary:#737373;--rc-text-quaternary:#525252;--rc-bg:#0a0a0a;--rc-bg-secondary:#171717;--rc-bg-tertiary:#262626;--rc-fill:#2a2a2a;--rc-fill-secondary:#222;--rc-fill-tertiary:#1a1a1a;--rc-fill-quaternary:#141414;--rc-border:#262626;--rc-accent:#60a5fa;--rc-accent-light:#60a5fa20;--rc-link:#60a5fa;--rc-code-text:#d4d4d4;--rc-code-bg:#262626;--rc-hr-border:#262626;--rc-quote-border:#60a5fa;--rc-quote-bg:#262626;--rc-alert-info:#7db9e5;--rc-alert-warning:#da864a;--rc-alert-tip:#54da48;--rc-alert-caution:#e16973;--rc-alert-important:#9966e0;--rc-shadow-top-bar:0 8px 30px #00000073, 0 2px 8px #0000004d;--rc-shadow-modal:0 10px 15px -3px #0006, 0 4px 6px -4px #00000059;--rc-shadow-menu:0 1px 4px #00000040, 0 4px 16px #0006}@keyframes _1x2h1ol3{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(1.3)}}@keyframes _1x2h1olc{0%{transform:rotate(0)}to{transform:rotate(360deg)}}._1x2h1ol0{margin:1.25rem 0}._1x2h1ol1{background:#000;border-radius:.75rem;width:100%;position:relative;overflow:hidden}._1x2h1ol2{object-fit:contain;cursor:pointer;background:#000;width:100%;height:100%;display:block}._1x2h1ol4{color:#fff;pointer-events:none;background:#000000b3;border-radius:999px;justify-content:center;align-items:center;width:5rem;height:5rem;margin:auto;animation:.5s forwards _1x2h1ol3;display:inline-flex;position:absolute;top:0;bottom:0;left:0;right:0}._1x2h1ol5{border:1px solid color-mix(in srgb, var(--rc-border) 20%, transparent);background:color-mix(in srgb, var(--rc-bg-secondary) 90%, transparent);-webkit-backdrop-filter:blur(24px)saturate(180%);backdrop-filter:blur(24px)saturate(180%);height:2.5rem;color:var(--rc-text);opacity:0;border-radius:999px;align-items:center;gap:.75rem;max-width:80vw;margin:0 auto;padding:0 1rem;transition:opacity .2s,transform .2s;display:flex;position:absolute;bottom:.5rem;left:2rem;right:2rem;transform:translateY(4px)}._1x2h1ol1:hover ._1x2h1ol5,._1x2h1ol1:focus-within ._1x2h1ol5{opacity:1;transform:translateY(0)}._1x2h1ol6{-webkit-appearance:none;appearance:none;color:inherit;cursor:pointer;background:0 0;border:none;flex-shrink:0;justify-content:center;align-items:center;padding:.125rem;line-height:1;transition:transform .15s;display:inline-flex}._1x2h1ol6:hover{transform:scale(1.1)}._1x2h1ol6:active{transform:scale(.93)}._1x2h1ol6:focus-visible{outline-offset:2px;border-radius:4px;outline:2px solid}._1x2h1ol6:disabled{opacity:.5;pointer-events:none}._1x2h1ol7{flex:1;height:100%}._1x2h1ol8{touch-action:none;-webkit-user-select:none;user-select:none;align-items:center;width:100%;height:100%;display:flex;position:relative}._1x2h1ol9{background:var(--rc-bg);border-radius:999px;flex:1;height:.25rem;position:relative}._1x2h1ola{background:color-mix(in srgb, var(--rc-text-secondary) 40%, transparent);border-radius:999px;height:100%;position:absolute}._1x2h1olb{background:var(--rc-text-secondary);border:none;border-radius:1px;width:3px;height:.75rem;display:block}._1x2h1old{animation:.8s linear infinite _1x2h1olc}._1x2h1ole{cursor:pointer;display:block}._1x2h1olf{cursor:pointer;background:#000 50%/cover;border-radius:.75rem;width:100%;position:relative;overflow:hidden}._1x2h1olg{object-fit:contain;pointer-events:none;width:100%;height:100%;display:block}._1x2h1olh{color:#fff;background:#00000059;justify-content:center;align-items:center;transition:background .2s;display:flex;position:absolute;top:0;bottom:0;left:0;right:0}._1x2h1ole:hover ._1x2h1olh{background:#00000080}._1x2h1oli{border:2px dashed var(--rc-border);border-radius:var(--rc-radius-md);color:var(--rc-text-secondary);font-size:var(--rc-font-size-md);cursor:pointer;justify-content:center;align-items:center;gap:8px;padding:2rem;transition:border-color .2s,color .2s;display:flex}._1x2h1oli:hover{border-color:var(--rc-accent);color:var(--rc-text)}._1x2h1olj{width:340px;font-family:var(--rc-font-family-sans);flex-direction:column;gap:8px;padding:12px;display:flex}._1x2h1olk{background-color:var(--rc-bg-secondary);border-radius:6px;align-items:center;gap:8px;min-width:0;padding:6px 10px;display:flex}._1x2h1oll{color:var(--rc-text-secondary);flex-shrink:0}._1x2h1olm{-webkit-appearance:none;appearance:none;color:inherit;font-size:var(--rc-font-size-sm);background-color:#0000;border:none;outline:none;flex:1;min-width:0;padding:0}._1x2h1olm::placeholder{color:var(--rc-text-secondary)}@media (max-width:768px){._1x2h1ol5{opacity:1;gap:.5rem;padding:0 .75rem;left:.75rem;right:.75rem;transform:none}}
|
|
2
2
|
/*$vite$:1*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@haklex/rich-renderer-video",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "Video player renderer",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -41,14 +41,14 @@
|
|
|
41
41
|
"vite-plugin-dts": "^4.5.4"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
44
|
-
"@haklex/rich-editor": ">=0.3.0",
|
|
45
|
-
"@haklex/rich-editor-ui": ">=0.3.0",
|
|
46
|
-
"@haklex/rich-style-token": ">=0.3.0",
|
|
47
44
|
"@lexical/react": "^0.44.0",
|
|
48
45
|
"lexical": "^0.44.0",
|
|
49
46
|
"lucide-react": "^1.0.0",
|
|
50
47
|
"react": ">=19",
|
|
51
|
-
"react-dom": ">=19"
|
|
48
|
+
"react-dom": ">=19",
|
|
49
|
+
"@haklex/rich-editor": "0.5.0",
|
|
50
|
+
"@haklex/rich-style-token": "0.5.0",
|
|
51
|
+
"@haklex/rich-editor-ui": "0.5.0"
|
|
52
52
|
},
|
|
53
53
|
"publishConfig": {
|
|
54
54
|
"access": "public"
|