@codernote/record-tree 2.2.2 → 2.2.3

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 (2) hide show
  1. package/dist/index.js +37 -34
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
- (function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode('.node-complex[data-v-5b050bf4]{display:flex;flex-direction:row;align-self:center;justify-self:center;outline:none}.holder[data-v-5b050bf4]{width:0px;overflow:hidden;border-width:1px;border-style:solid;border-color:transparent;outline:none}.node-element[data-v-5b050bf4]{display:inline-block;position:relative;margin:5px 1px}.node-element:hover .node-del[data-v-5b050bf4]{display:block}.node-image img[data-v-5b050bf4]{outline:none}.node-audio[data-v-5b050bf4]{width:300px}.node-audio audio[data-v-5b050bf4]{width:300px;outline:none}.node-video video[data-v-5b050bf4]{outline:none}.node-del[data-v-5b050bf4]{cursor:pointer;display:none;width:15px;height:15px;position:absolute;top:-3px;right:-3px;background-color:#e6f7ff;background-size:100% 100%;border-radius:50%}.node-del[data-v-5b050bf4]:before,.node-del[data-v-5b050bf4]:after{content:"";position:absolute;top:50%;left:50%;width:2px;height:10px;background-color:#595959}.node-del[data-v-5b050bf4]:before{transform:translate(-50%,-50%) rotate(45deg)}.node-del[data-v-5b050bf4]:after{transform:translate(-50%,-50%) rotate(-45deg)}.node-file-wrap[data-v-5b050bf4]{width:260px;padding:10px 16px;display:flex;background:#f2f2f2;border-radius:5px;justify-content:center;align-items:center}.node-file-left[data-v-5b050bf4]{flex:1}.node-file-left h6[data-v-5b050bf4]{font-size:14px;font-weight:700;margin:0 0 5px;padding:0;white-space:nowrap}.node-file-left p[data-v-5b050bf4]{margin:0;padding:0;font-size:12px;color:#999}.node-file-right a[data-v-5b050bf4]{color:#52a770;font-size:14px}@keyframes blinkBorder-5b050bf4{0%,to{border-color:transparent}50%{border-color:#333}}.node-complex .holder[data-v-5b050bf4]:focus{animation:blinkBorder-5b050bf4 1s infinite}.fullscreen-handle[data-v-5b050bf4]{width:15px;height:15px;position:absolute;bottom:0;right:16px;cursor:pointer;background:#fff9}.resize-handle[data-v-5b050bf4]{width:15px;height:15px;position:absolute;bottom:0;right:0;cursor:se-resize;transform:rotate(90deg);background:#fff9}.resize-handle svg[data-v-5b050bf4]{cursor:se-resize}.ProseMirror{outline:none}.node-div[data-v-40df90a8]{display:flex;align-items:center;position:relative}.node-div>div[data-v-40df90a8]{flex:1}.node-icon[data-v-40df90a8]{position:relative;width:17px;height:17px;border-radius:10px;background-color:#fff;cursor:pointer;margin-left:5px;align-self:flex-start;top:3px}.node-icon[data-v-40df90a8]:after{content:"";position:absolute;top:5px;left:5px;width:7px;height:7px;border-radius:10px;background-color:#eee}.node-icon[data-v-40df90a8]:hover{background-color:#ccc}.node-ul[data-v-7cac94d3]{background-color:#fff;margin:0;padding:0;list-style:none}.node-li[data-v-7cac94d3]{padding:0;list-style:none;margin:0;line-height:1.5;position:relative;overflow:hidden}[data-v-7cac94d3] .sublevel .node-li{margin-left:15px}[data-v-7cac94d3] .drag-over-top:before{content:"";width:100%;height:1px;top:0;background-color:#eee;position:absolute}[data-v-7cac94d3] .drag-over-center{background-color:#eee}[data-v-7cac94d3] .drag-over-bottom:after{content:"";width:100%;height:1px;background-color:#eee;position:absolute;bottom:0}.collapsed>ul[data-v-7cac94d3]{display:none}[data-v-7cac94d3] .collapsed .node-icon:before{display:none}.tree-title[data-v-7cac94d3]{padding-left:25px;font-weight:700;outline:none;font-size:1.125rem;line-height:1.5;width:100%}[data-v-7cac94d3] .node-li.has-child.collapsed .node-icon:after{background-color:#aaa}[data-v-7cac94d3] .node-li.dragging .node-icon:before{display:none}[data-v-7cac94d3] .has-child>.node-div>.node-icon:before{content:"";position:absolute;top:20px;left:50%;height:9999px;width:1px;background-color:#f2f2f2}[data-v-7cac94d3] .has-child>.node-div>.node-icon:hover:before{background-color:#52a770}.record-tree-popper-content{display:flex;flex-wrap:wrap;padding:10px;box-shadow:0 2px 12px #1d1c1c1f;border:1px solid rgba(29,28,28,.12);border-radius:5px;overflow:hidden;background:#fff;z-index:9999}.record-tree-popper-content-item{padding:8px 10px;display:flex;align-items:center;justify-content:center;cursor:pointer}.record-tree-svg{display:inline-block;border-radius:9999px;color:#fff;cursor:pointer}.record-tree-title-bar{position:relative;display:flex;margin-bottom:3px}.record-tree-title{padding-left:25px;font-weight:700;outline:none;font-size:18px;line-height:1.5;width:100%}.record-tree-popper-reference{display:flex;position:absolute;top:0;left:0;text-align:center;border-radius:9999px;color:#fff}.record-tree-empty-icon{display:inline-block;border-radius:9999px}.record-tree-title .node-text{margin-left:0!important}.popper{transform:translate3d(0,22px,0)!important}.record-audio[data-v-e8535564]{position:absolute;background:#fff;padding:20px;width:400px;left:50%;top:50%;transform:translate(-50%,-50%);border-radius:10px;z-index:999;box-shadow:0 4px 6px #0000001a,0 1px 3px #00000014}.record-audio .recwave[data-v-e8535564]{width:300px;height:40px}.record-audio .audio-item[data-v-e8535564]{margin-top:10px;display:flex;align-items:center}.record-audio .audio-item a[data-v-e8535564]{color:#52a770;margin-left:10px;font-size:12px;cursor:pointer}.record-audio .audio-text[data-v-e8535564]{background:#f5f5f5;margin-top:10px;padding:8px 12px;border-radius:5px}.record-audio .buttons[data-v-e8535564]{margin-top:10px;display:flex;align-items:center}.record-audio .buttons .btn[data-v-e8535564]{margin-right:10px;font-size:14px;width:80px;padding:6px 0;text-align:center;cursor:pointer;border-radius:20px}.record-audio .buttons .finish[data-v-e8535564]{color:#fff;background:#1677ff;border:1px solid #1677ff}.record-audio .buttons .disabled[data-v-e8535564]{background:#eee;cursor:default;border-color:#eee}.record-audio .buttons .cancel[data-v-e8535564]{border:1px solid #eee}.record-audio .buttons .oper[data-v-e8535564]{margin-right:10px}.record-audio .main[data-v-e8535564]{display:flex;align-items:center}.record-audio .duration[data-v-e8535564]{width:60px;margin-left:10px;color:#999;font-size:12px}.wrap[data-v-e8535564]{position:fixed;left:0;top:0;bottom:0;z-index:9999}.mask[data-v-e8535564]{position:absolute;left:0;top:0;right:0;bottom:0;background:#fffc}.record-audio-mobile[data-v-e8535564]{display:flex;width:100vw;position:absolute;background:#fff;padding:20px;left:50%;top:50%;transform:translate(-50%,-50%);z-index:999;align-items:center}.record-audio-mobile .recwave[data-v-e8535564]{flex:1;height:30px}.record-audio-mobile .oper[data-v-e8535564]{margin-right:10px}.record-video[data-v-be255be7]{position:absolute;background:#fff;padding:20px;left:50%;top:50%;transform:translate(-50%,-50%);border-radius:10px;z-index:999;box-shadow:0 4px 6px #0000001a,0 1px 3px #00000014}.video-item[data-v-be255be7]{width:300px}.buttons[data-v-be255be7]{margin-top:10px;display:flex;align-items:center}.buttons .btn[data-v-be255be7]{margin-right:10px;font-size:14px;width:80px;padding:6px 0;text-align:center;cursor:pointer;border-radius:20px}.buttons .finish[data-v-be255be7]{color:#fff;background:#1677ff;border:1px solid #1677ff}.buttons .disabled[data-v-be255be7]{background:#eee;cursor:default;border-color:#eee}.buttons .cancel[data-v-be255be7]{border:1px solid #eee}.buttons .oper[data-v-be255be7]{margin-right:10px}.wrap[data-v-be255be7]{position:fixed;left:0;top:0;bottom:0;z-index:9999}.mask[data-v-be255be7]{position:absolute;left:0;top:0;right:0;bottom:0;background:#fffc}.record-video[data-v-d1a4de11]{position:absolute;background:#fff;padding:20px;left:50%;top:50%;width:452px;transform:translate(-50%,-50%);border-radius:10px;z-index:999;box-shadow:0 4px 6px #0000001a,0 1px 3px #00000014}.video-item[data-v-d1a4de11]{width:200px}.img-item[data-v-d1a4de11]{width:200px;height:150px;border:1px dashed #eee;margin-left:10px}.img-item img[data-v-d1a4de11]{width:200px}.record-content[data-v-d1a4de11]{display:flex}.buttons[data-v-d1a4de11]{margin-top:10px;display:flex;align-items:center}.buttons .btn[data-v-d1a4de11]{margin-right:10px;font-size:14px;width:80px;padding:6px 0;text-align:center;cursor:pointer;border-radius:20px}.buttons .finish[data-v-d1a4de11]{color:#fff;background:#1677ff;border:1px solid #1677ff}.buttons .disabled[data-v-d1a4de11]{background:#eee;cursor:default;border-color:#eee}.buttons .cancel[data-v-d1a4de11]{border:1px solid #eee}.buttons .oper[data-v-d1a4de11]{margin-right:10px}.wrap[data-v-d1a4de11]{position:fixed;left:0;top:0;bottom:0;z-index:9999}.mask[data-v-d1a4de11]{position:absolute;left:0;top:0;right:0;bottom:0;background:#fffc}.record-tree-mobile .record-tree{height:calc(100vh - 45px);overflow-y:scroll}.record-tree-mobile .record-tree-main{padding-left:0}.record-tree-mobile .record-tree-options{padding:12px 0;display:flex;position:fixed}.record-tree-mobile .record-tree-option-item{flex:1;max-width:32px}.record-tree-mobile .node-file-wrap{width:200px}.record-tree-mobile .node-file-right{display:none}.record-tree-mobile .node-image img{width:auto;max-height:80px}.record-tree-mobile .node-audio,.record-tree-mobile .node-video{width:200px}.record-tree-mobile .node-audio audio{width:200px;outline:none}.record-tree-mobile .node-video video{width:200px;outline:none}.record-tree-container{position:relative;height:100%}.record-tree-main{padding-left:15px;overflow:scroll;flex:1}.record-tree{position:relative;padding-bottom:40px;display:flex;flex-direction:column;overflow:hidden;height:100%}.record-tree-options{position:absolute;bottom:0;left:0;width:100%;display:flex;justify-content:space-between;padding:5px 0;background:#fff;border-top:1px dotted #ddd}.record-tree-option-left{display:flex;flex:1;padding-left:10px}.record-tree-option-right{padding-right:10px;font-size:14px}.record-tree-option-item{margin:0 5px;cursor:pointer;display:flex;justify-content:center;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}img:-webkit-full-screen{width:auto!important;height:auto!important;max-width:100%!important;max-height:100%!important;object-fit:contain}img:fullscreen{width:auto!important;height:auto!important;max-width:100%!important;max-height:100%!important;-o-object-fit:contain;object-fit:contain}.record-tree .node-text{margin-left:5px;flex:1;border:none;outline:none;word-break:break-all}.record-tree .node-text a{color:#0076ff;cursor:pointer}.date-popover{display:block;padding:5px 10px;background:#333;border-radius:4px;position:fixed;z-index:9999;transform:translate(-50%,-120%);font-size:12px;color:#666;text-align:center;transition:opacity .3s;color:#fff}.date-popover:after{content:"";position:absolute;top:95%;left:50%;transform:translate(-50%);border-width:6px;border-style:solid;border-color:#333 transparent transparent transparent}.tiptap p.is-editor-empty:first-child:before{color:#adb5bd;content:attr(data-placeholder);float:left;height:0;pointer-events:none}')),document.head.appendChild(e)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})();
2
- import { detectDeviceType as Q0, truncateString as _r, formatBytes as mr, uuid as Ht, byNameFindIcon as pr, icons as br, parseMimeType as J0, getSize as er, oss as tr } from "@codernote/utils";
3
- import { reactive as wr, ref as zt, openBlock as Qe, createElementBlock as nt, withModifiers as kt, createElementVNode as Je, normalizeClass as Pt, createCommentVNode as Tt, unref as Ft, toDisplayString as o0, createVNode as Rt, nextTick as U0, watch as z0, onMounted as yr, onBeforeUnmount as gr, createBlock as Yt, resolveComponent as Bt, Fragment as R0, renderList as M0, createSlots as xr, withCtx as q0, normalizeStyle as Gt, pushScopeId as Sr, popScopeId as Tr } from "vue";
1
+ (function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode('.node-complex[data-v-5b050bf4]{display:flex;flex-direction:row;align-self:center;justify-self:center;outline:none}.holder[data-v-5b050bf4]{width:0px;overflow:hidden;border-width:1px;border-style:solid;border-color:transparent;outline:none}.node-element[data-v-5b050bf4]{display:inline-block;position:relative;margin:5px 1px}.node-element:hover .node-del[data-v-5b050bf4]{display:block}.node-image img[data-v-5b050bf4]{outline:none}.node-audio[data-v-5b050bf4]{width:300px}.node-audio audio[data-v-5b050bf4]{width:300px;outline:none}.node-video video[data-v-5b050bf4]{outline:none}.node-del[data-v-5b050bf4]{cursor:pointer;display:none;width:15px;height:15px;position:absolute;top:-3px;right:-3px;background-color:#e6f7ff;background-size:100% 100%;border-radius:50%}.node-del[data-v-5b050bf4]:before,.node-del[data-v-5b050bf4]:after{content:"";position:absolute;top:50%;left:50%;width:2px;height:10px;background-color:#595959}.node-del[data-v-5b050bf4]:before{transform:translate(-50%,-50%) rotate(45deg)}.node-del[data-v-5b050bf4]:after{transform:translate(-50%,-50%) rotate(-45deg)}.node-file-wrap[data-v-5b050bf4]{width:260px;padding:10px 16px;display:flex;background:#f2f2f2;border-radius:5px;justify-content:center;align-items:center}.node-file-left[data-v-5b050bf4]{flex:1}.node-file-left h6[data-v-5b050bf4]{font-size:14px;font-weight:700;margin:0 0 5px;padding:0;white-space:nowrap}.node-file-left p[data-v-5b050bf4]{margin:0;padding:0;font-size:12px;color:#999}.node-file-right a[data-v-5b050bf4]{color:#52a770;font-size:14px}@keyframes blinkBorder-5b050bf4{0%,to{border-color:transparent}50%{border-color:#333}}.node-complex .holder[data-v-5b050bf4]:focus{animation:blinkBorder-5b050bf4 1s infinite}.fullscreen-handle[data-v-5b050bf4]{width:15px;height:15px;position:absolute;bottom:0;right:16px;cursor:pointer;background:#fff9}.resize-handle[data-v-5b050bf4]{width:15px;height:15px;position:absolute;bottom:0;right:0;cursor:se-resize;transform:rotate(90deg);background:#fff9}.resize-handle svg[data-v-5b050bf4]{cursor:se-resize}.ProseMirror{outline:none}.node-div[data-v-40df90a8]{display:flex;align-items:center;position:relative}.node-div>div[data-v-40df90a8]{flex:1}.node-icon[data-v-40df90a8]{position:relative;width:17px;height:17px;border-radius:10px;background-color:#fff;cursor:pointer;margin-left:5px;align-self:flex-start;top:3px}.node-icon[data-v-40df90a8]:after{content:"";position:absolute;top:5px;left:5px;width:7px;height:7px;border-radius:10px;background-color:#eee}.node-icon[data-v-40df90a8]:hover{background-color:#ccc}.node-ul[data-v-7cac94d3]{background-color:#fff;margin:0;padding:0;list-style:none}.node-li[data-v-7cac94d3]{padding:0;list-style:none;margin:0;line-height:1.5;position:relative;overflow:hidden}[data-v-7cac94d3] .sublevel .node-li{margin-left:15px}[data-v-7cac94d3] .drag-over-top:before{content:"";width:100%;height:1px;top:0;background-color:#eee;position:absolute}[data-v-7cac94d3] .drag-over-center{background-color:#eee}[data-v-7cac94d3] .drag-over-bottom:after{content:"";width:100%;height:1px;background-color:#eee;position:absolute;bottom:0}.collapsed>ul[data-v-7cac94d3]{display:none}[data-v-7cac94d3] .collapsed .node-icon:before{display:none}.tree-title[data-v-7cac94d3]{padding-left:25px;font-weight:700;outline:none;font-size:1.125rem;line-height:1.5;width:100%}[data-v-7cac94d3] .node-li.has-child.collapsed .node-icon:after{background-color:#aaa}[data-v-7cac94d3] .node-li.dragging .node-icon:before{display:none}[data-v-7cac94d3] .has-child>.node-div>.node-icon:before{content:"";position:absolute;top:20px;left:50%;height:9999px;width:1px;background-color:#f2f2f2}[data-v-7cac94d3] .has-child>.node-div>.node-icon:hover:before{background-color:#52a770}.record-tree-popper-content{display:flex;flex-wrap:wrap;padding:10px;box-shadow:0 2px 12px #1d1c1c1f;border:1px solid rgba(29,28,28,.12);border-radius:5px;overflow:hidden;background:#fff;z-index:9999}.record-tree-popper-content-item{padding:8px 10px;display:flex;align-items:center;justify-content:center;cursor:pointer}.record-tree-svg{display:inline-block;border-radius:9999px;color:#fff;cursor:pointer}.record-tree-title-bar{position:relative;display:flex;margin-bottom:3px}.record-tree-title{padding-left:25px;font-weight:700;outline:none;font-size:18px;line-height:1.5;width:100%}.record-tree-popper-reference{display:flex;position:absolute;top:0;left:0;text-align:center;border-radius:9999px;color:#fff}.record-tree-empty-icon{display:inline-block;border-radius:9999px}.record-tree-title .node-text{margin-left:0!important}.popper{transform:translate3d(0,22px,0)!important}.record-audio[data-v-e8535564]{position:absolute;background:#fff;padding:20px;width:400px;left:50%;top:50%;transform:translate(-50%,-50%);border-radius:10px;z-index:999;box-shadow:0 4px 6px #0000001a,0 1px 3px #00000014}.record-audio .recwave[data-v-e8535564]{width:300px;height:40px}.record-audio .audio-item[data-v-e8535564]{margin-top:10px;display:flex;align-items:center}.record-audio .audio-item a[data-v-e8535564]{color:#52a770;margin-left:10px;font-size:12px;cursor:pointer}.record-audio .audio-text[data-v-e8535564]{background:#f5f5f5;margin-top:10px;padding:8px 12px;border-radius:5px}.record-audio .buttons[data-v-e8535564]{margin-top:10px;display:flex;align-items:center}.record-audio .buttons .btn[data-v-e8535564]{margin-right:10px;font-size:14px;width:80px;padding:6px 0;text-align:center;cursor:pointer;border-radius:20px}.record-audio .buttons .finish[data-v-e8535564]{color:#fff;background:#1677ff;border:1px solid #1677ff}.record-audio .buttons .disabled[data-v-e8535564]{background:#eee;cursor:default;border-color:#eee}.record-audio .buttons .cancel[data-v-e8535564]{border:1px solid #eee}.record-audio .buttons .oper[data-v-e8535564]{margin-right:10px}.record-audio .main[data-v-e8535564]{display:flex;align-items:center}.record-audio .duration[data-v-e8535564]{width:60px;margin-left:10px;color:#999;font-size:12px}.wrap[data-v-e8535564]{position:fixed;left:0;top:0;bottom:0;z-index:9999}.mask[data-v-e8535564]{position:absolute;left:0;top:0;right:0;bottom:0;background:#fffc}.record-audio-mobile[data-v-e8535564]{display:flex;width:100vw;position:absolute;background:#fff;padding:20px;left:50%;top:50%;transform:translate(-50%,-50%);z-index:999;align-items:center}.record-audio-mobile .recwave[data-v-e8535564]{flex:1;height:30px}.record-audio-mobile .oper[data-v-e8535564]{margin-right:10px}.record-video[data-v-be255be7]{position:absolute;background:#fff;padding:20px;left:50%;top:50%;transform:translate(-50%,-50%);border-radius:10px;z-index:999;box-shadow:0 4px 6px #0000001a,0 1px 3px #00000014}.video-item[data-v-be255be7]{width:300px}.buttons[data-v-be255be7]{margin-top:10px;display:flex;align-items:center}.buttons .btn[data-v-be255be7]{margin-right:10px;font-size:14px;width:80px;padding:6px 0;text-align:center;cursor:pointer;border-radius:20px}.buttons .finish[data-v-be255be7]{color:#fff;background:#1677ff;border:1px solid #1677ff}.buttons .disabled[data-v-be255be7]{background:#eee;cursor:default;border-color:#eee}.buttons .cancel[data-v-be255be7]{border:1px solid #eee}.buttons .oper[data-v-be255be7]{margin-right:10px}.wrap[data-v-be255be7]{position:fixed;left:0;top:0;bottom:0;z-index:9999}.mask[data-v-be255be7]{position:absolute;left:0;top:0;right:0;bottom:0;background:#fffc}.record-video[data-v-d1a4de11]{position:absolute;background:#fff;padding:20px;left:50%;top:50%;width:452px;transform:translate(-50%,-50%);border-radius:10px;z-index:999;box-shadow:0 4px 6px #0000001a,0 1px 3px #00000014}.video-item[data-v-d1a4de11]{width:200px}.img-item[data-v-d1a4de11]{width:200px;height:150px;border:1px dashed #eee;margin-left:10px}.img-item img[data-v-d1a4de11]{width:200px}.record-content[data-v-d1a4de11]{display:flex}.buttons[data-v-d1a4de11]{margin-top:10px;display:flex;align-items:center}.buttons .btn[data-v-d1a4de11]{margin-right:10px;font-size:14px;width:80px;padding:6px 0;text-align:center;cursor:pointer;border-radius:20px}.buttons .finish[data-v-d1a4de11]{color:#fff;background:#1677ff;border:1px solid #1677ff}.buttons .disabled[data-v-d1a4de11]{background:#eee;cursor:default;border-color:#eee}.buttons .cancel[data-v-d1a4de11]{border:1px solid #eee}.buttons .oper[data-v-d1a4de11]{margin-right:10px}.wrap[data-v-d1a4de11]{position:fixed;left:0;top:0;bottom:0;z-index:9999}.mask[data-v-d1a4de11]{position:absolute;left:0;top:0;right:0;bottom:0;background:#fffc}.record-tree-mobile .record-tree{height:calc(100vh - 45px);overflow-y:scroll}.record-tree-mobile .record-tree-main{padding-left:0;padding-right:0}.record-tree-mobile .record-tree-options{padding:12px 0;display:flex;position:fixed}.record-tree-mobile .record-tree-option-item{flex:1;max-width:32px}.record-tree-mobile .node-file-wrap{width:200px}.record-tree-mobile .node-file-right{display:none}.record-tree-mobile .node-image img{width:auto;max-height:80px}.record-tree-mobile .node-audio,.record-tree-mobile .node-video{width:200px}.record-tree-mobile .node-audio audio{width:200px;outline:none}.record-tree-mobile .node-video video{width:200px;outline:none}.record-tree-container{position:relative;height:100%}.record-tree-main{padding-left:15px;padding-right:15px;overflow:scroll;flex:1}.record-tree{position:relative;padding-bottom:140px;display:flex;flex-direction:column;overflow:hidden;height:100%}.record-tree.record-tree-nobar{padding-bottom:0}.record-tree-options{position:absolute;bottom:0;left:0;width:100%;display:flex;justify-content:space-between;padding:5px 0;background:#fff;border-top:1px dotted #ddd}.record-tree-option-left{display:flex;flex:1;padding-left:10px}.record-tree-option-right{padding-right:10px;font-size:14px}.record-tree-option-item{margin:0 5px;cursor:pointer;display:flex;justify-content:center;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}img:-webkit-full-screen{width:auto!important;height:auto!important;max-width:100%!important;max-height:100%!important;object-fit:contain}img:fullscreen{width:auto!important;height:auto!important;max-width:100%!important;max-height:100%!important;-o-object-fit:contain;object-fit:contain}.record-tree .node-text{margin-left:5px;flex:1;border:none;outline:none;word-break:break-all}.record-tree .node-text a{color:#0076ff;cursor:pointer}.date-popover{display:block;padding:5px 10px;background:#333;border-radius:4px;position:fixed;z-index:9999;transform:translate(-50%,-120%);font-size:12px;color:#666;text-align:center;transition:opacity .3s;color:#fff}.date-popover:after{content:"";position:absolute;top:95%;left:50%;transform:translate(-50%);border-width:6px;border-style:solid;border-color:#333 transparent transparent transparent}.tiptap p.is-editor-empty:first-child:before{color:#adb5bd;content:attr(data-placeholder);float:left;height:0;pointer-events:none}')),document.head.appendChild(e)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})();
2
+ import { detectDeviceType as Q0, truncateString as _r, formatBytes as mr, uuid as Vt, byNameFindIcon as pr, icons as br, parseMimeType as J0, getSize as er, oss as tr } from "@codernote/utils";
3
+ import { reactive as wr, ref as zt, openBlock as Qe, createElementBlock as nt, withModifiers as kt, createElementVNode as Je, normalizeClass as Ht, createCommentVNode as Tt, unref as Ft, toDisplayString as o0, createVNode as Rt, nextTick as U0, watch as z0, onMounted as yr, onBeforeUnmount as gr, createBlock as Yt, resolveComponent as Bt, Fragment as R0, renderList as M0, createSlots as xr, withCtx as q0, normalizeStyle as Gt, pushScopeId as Sr, popScopeId as Tr } from "vue";
4
4
  import Rr from "mitt";
5
5
  import Jt from "vue-inline-svg";
6
6
  import { useEditor as Mr, EditorContent as Cr } from "@tiptap/vue-3";
@@ -204,7 +204,7 @@ const Or = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
204
204
  }, [
205
205
  Je("div", {
206
206
  contenteditable: !1,
207
- class: Pt(`node-complex node-${a.data.type}`)
207
+ class: Ht(`node-complex node-${a.data.type}`)
208
208
  }, [
209
209
  a.readOnly ? Tt("", !0) : (Qe(), nt("span", Xr)),
210
210
  Je("div", Kr, [
@@ -600,7 +600,7 @@ const nr = (a) => a.tagName.toLowerCase() === "mark", B0 = () => {
600
600
  this.$emit("collapse", s, !1);
601
601
  const x = {
602
602
  text: "",
603
- uuid: Ht()
603
+ uuid: Vt()
604
604
  };
605
605
  s.children ? s.children.unshift(x) : s.children = [x], this.update(), this.$nextTick(() => {
606
606
  this.$emit("toFocus", x);
@@ -809,7 +809,7 @@ const ha = {
809
809
  if (!this.allowEmpty && this.nodes.length === 1) {
810
810
  const x = {
811
811
  text: "",
812
- uuid: Ht()
812
+ uuid: Vt()
813
813
  };
814
814
  s.push(x), setTimeout(() => {
815
815
  this.toFocus(x);
@@ -831,7 +831,7 @@ const ha = {
831
831
  this.$emit("dbEnter");
832
832
  },
833
833
  keyEnter(a) {
834
- const s = this.nodes.findIndex((Y) => Y.uuid === a.uuid), x = [...this.nodes], g = { text: "", uuid: Ht() };
834
+ const s = this.nodes.findIndex((Y) => Y.uuid === a.uuid), x = [...this.nodes], g = { text: "", uuid: Vt() };
835
835
  x.splice(s + 1, 0, g), this.update(x), this.$nextTick(() => {
836
836
  const Y = Nt(g);
837
837
  Y == null || Y.focus();
@@ -940,7 +940,7 @@ const ha = {
940
940
  precheck() {
941
941
  let a = !1;
942
942
  this.nodes.forEach((s) => {
943
- if (s.uuid || (s.uuid = Ht(), a = !0), da(s) && !s.type) {
943
+ if (s.uuid || (s.uuid = Vt(), a = !0), da(s) && !s.type) {
944
944
  const x = fa(s.text);
945
945
  x && (s.type = x.type, s.content = x.content), a = !0;
946
946
  }
@@ -969,14 +969,14 @@ const ha = {
969
969
  }
970
970
  }, va = {
971
971
  key: 0,
972
- class: /* @__PURE__ */ Pt({
972
+ class: /* @__PURE__ */ Ht({
973
973
  "node-ul": !0,
974
974
  readOnly: !0,
975
975
  sublevel: !0
976
976
  })
977
977
  }, _a = ["id"], ma = {
978
978
  key: 1,
979
- class: /* @__PURE__ */ Pt({
979
+ class: /* @__PURE__ */ Ht({
980
980
  "node-ul": !0,
981
981
  sublevel: !0
982
982
  })
@@ -987,7 +987,7 @@ function ba(a, s, x, g, Y, m) {
987
987
  (Qe(!0), nt(R0, null, M0(m.filterNodes(x.nodes), (J) => (Qe(), nt("li", {
988
988
  key: J.uuid,
989
989
  id: `${J.uuid}`,
990
- class: Pt({
990
+ class: Ht({
991
991
  "node-li": !0,
992
992
  collapsed: a.status[J.uuid] ? a.status[J.uuid].collapsed : !1,
993
993
  "has-child": !!(J.children || []).length
@@ -1011,7 +1011,7 @@ function ba(a, s, x, g, Y, m) {
1011
1011
  ref_for: !0,
1012
1012
  ref: "elements",
1013
1013
  draggable: "true",
1014
- class: Pt({
1014
+ class: Ht({
1015
1015
  "node-li": !0,
1016
1016
  collapsed: a.status[J.uuid] ? a.status[J.uuid].collapsed : !1,
1017
1017
  "has-child": !!(J.children || []).length
@@ -2077,7 +2077,7 @@ var ur = { exports: {} };
2077
2077
  })(ur);
2078
2078
  var Oa = ur.exports;
2079
2079
  const Fa = /* @__PURE__ */ E0(Oa);
2080
- let Vt, t0 = "", f0 = "", dr = null;
2080
+ let Pt, t0 = "", f0 = "", dr = null;
2081
2081
  function Na() {
2082
2082
  var a = "wss://iat-api.xfyun.cn/v2/iat", s = "iat-api.xfyun.cn", x = "4f2bbe08d7ee54da888cfd009514e89f", g = "NTc3MWNlNDNiZWFmMGM2Yzk0ZjRlZjdi", Y = (/* @__PURE__ */ new Date()).toGMTString(), m = "hmac-sha256", V = "host date request-line", B = `host: ${s}
2083
2083
  date: ${Y}
@@ -2097,11 +2097,11 @@ function Ha(a) {
2097
2097
  g = g + Y[m].cw[0].w;
2098
2098
  x.pgs ? (x.pgs === "apd" && (t0 = f0), f0 = t0 + g) : t0 = t0 + g, dr(f0 || t0 || "");
2099
2099
  }
2100
- s.code === 0 && s.data.status === 2 && Vt.close(), s.code !== 0 && (Vt.close(), console.error(s));
2100
+ s.code === 0 && s.data.status === 2 && Pt.close(), s.code !== 0 && (Pt.close(), console.error(s));
2101
2101
  }
2102
2102
  function Va(a) {
2103
2103
  const s = Na();
2104
- Vt = new WebSocket(s), Vt.onopen = () => {
2104
+ Pt = new WebSocket(s), Pt.onopen = () => {
2105
2105
  var x = {
2106
2106
  common: {
2107
2107
  app_id: "c54ef25c"
@@ -2119,15 +2119,15 @@ function Va(a) {
2119
2119
  encoding: "lame"
2120
2120
  }
2121
2121
  };
2122
- Vt.send(JSON.stringify(x)), a();
2123
- }, Vt.onmessage = (x) => {
2122
+ Pt.send(JSON.stringify(x)), a();
2123
+ }, Pt.onmessage = (x) => {
2124
2124
  Ha(x.data);
2125
- }, Vt.onerror = (x) => {
2125
+ }, Pt.onerror = (x) => {
2126
2126
  console.error(x);
2127
2127
  };
2128
2128
  }
2129
2129
  function Pa(a, s) {
2130
- Vt = null, t0 = "", f0 = "", dr = s, Va(() => {
2130
+ Pt = null, t0 = "", f0 = "", dr = s, Va(() => {
2131
2131
  const x = new FileReader();
2132
2132
  x.readAsArrayBuffer(a), x.onload = (g) => {
2133
2133
  const Y = Ya(g.target.result);
@@ -2136,7 +2136,7 @@ function Pa(a, s) {
2136
2136
  const V = Y.substring(m, m + 1280);
2137
2137
  m += 1280;
2138
2138
  const B = m >= Y.length;
2139
- Vt.send(
2139
+ Pt.send(
2140
2140
  JSON.stringify({
2141
2141
  data: {
2142
2142
  status: B ? 2 : 1,
@@ -2148,7 +2148,7 @@ function Pa(a, s) {
2148
2148
  );
2149
2149
  }
2150
2150
  }, x.onerror = () => {
2151
- Vt.close();
2151
+ Pt.close();
2152
2152
  };
2153
2153
  });
2154
2154
  }
@@ -11200,7 +11200,7 @@ function ei(a, s, x, g, Y, m) {
11200
11200
  ])),
11201
11201
  Je("a", {
11202
11202
  onClick: s[5] || (s[5] = (...B) => m.handleFinish && m.handleFinish(...B)),
11203
- class: Pt({
11203
+ class: Ht({
11204
11204
  btn: !0,
11205
11205
  finish: !0,
11206
11206
  disabled: !a.blob
@@ -11209,7 +11209,7 @@ function ei(a, s, x, g, Y, m) {
11209
11209
  a.text ? (Qe(), nt("a", {
11210
11210
  key: 2,
11211
11211
  onClick: s[6] || (s[6] = (...B) => m.handleFinishText && m.handleFinishText(...B)),
11212
- class: Pt({
11212
+ class: Ht({
11213
11213
  btn: !0,
11214
11214
  finish: !0
11215
11215
  })
@@ -13883,7 +13883,7 @@ function oi(a, s, x, g, Y, m) {
13883
13883
  ])),
13884
13884
  Je("a", {
13885
13885
  onClick: s[2] || (s[2] = (...B) => m.handleFinish && m.handleFinish(...B)),
13886
- class: Pt(["btn", {
13886
+ class: Ht(["btn", {
13887
13887
  finish: !0,
13888
13888
  disabled: !a.blob
13889
13889
  }])
@@ -13998,7 +13998,7 @@ function pi(a, s, x, g, Y, m) {
13998
13998
  ])),
13999
13999
  Je("a", {
14000
14000
  onClick: s[1] || (s[1] = (...B) => m.handleFinish && m.handleFinish(...B)),
14001
- class: Pt(["btn", {
14001
+ class: Ht(["btn", {
14002
14002
  finish: !0,
14003
14003
  disabled: !a.url
14004
14004
  }])
@@ -14063,13 +14063,13 @@ const bi = /* @__PURE__ */ Xt(ui, [["render", pi], ["__scopeId", "data-v-d1a4de1
14063
14063
  expose: ["focusTitle", "focusContent"],
14064
14064
  data() {
14065
14065
  return {
14066
- curNodes: [{ text: "", uuid: Ht() }],
14066
+ curNodes: [{ text: "", uuid: Vt() }],
14067
14067
  noteId: null,
14068
14068
  recordAudioVisible: !1,
14069
14069
  recordVideoVisible: !1,
14070
14070
  recordPhotoVisible: !1,
14071
14071
  icon: Wt,
14072
- hash: Ht(),
14072
+ hash: Vt(),
14073
14073
  store: Lt,
14074
14074
  isMobile: Lt.isMobile,
14075
14075
  // 仅新建场景使用, 用于判断是否做了改动
@@ -14083,7 +14083,7 @@ const bi = /* @__PURE__ */ Xt(ui, [["render", pi], ["__scopeId", "data-v-d1a4de1
14083
14083
  try {
14084
14084
  this.noteId = a.id, this.curNodes = JSON.parse(a.content), this.curNodes.filter((g) => !g.pending).length || this.curNodes.push({
14085
14085
  text: "",
14086
- uuid: Ht()
14086
+ uuid: Vt()
14087
14087
  }), this.restorePendingNodes(a.id), this.checkModified();
14088
14088
  } catch {
14089
14089
  }
@@ -14213,7 +14213,7 @@ const bi = /* @__PURE__ */ Xt(ui, [["render", pi], ["__scopeId", "data-v-d1a4de1
14213
14213
  },
14214
14214
  handleFinishAudio(a) {
14215
14215
  typeof a == "string" ? this.store.currentId === "" ? this.handleChangeTitle(a) : this.$refs.treeEditor.appendNode({
14216
- uuid: Ht(),
14216
+ uuid: Vt(),
14217
14217
  text: a
14218
14218
  }) : this.handleFileUpload(a);
14219
14219
  },
@@ -14228,7 +14228,7 @@ const bi = /* @__PURE__ */ Xt(ui, [["render", pi], ["__scopeId", "data-v-d1a4de1
14228
14228
  case "audio":
14229
14229
  case "video":
14230
14230
  return {
14231
- uuid: Ht(),
14231
+ uuid: Vt(),
14232
14232
  type: B.mainType,
14233
14233
  content: J,
14234
14234
  pending: !0,
@@ -14237,7 +14237,7 @@ const bi = /* @__PURE__ */ Xt(ui, [["render", pi], ["__scopeId", "data-v-d1a4de1
14237
14237
  };
14238
14238
  default:
14239
14239
  return {
14240
- uuid: Ht(),
14240
+ uuid: Vt(),
14241
14241
  type: "file",
14242
14242
  name: V.name,
14243
14243
  content: J,
@@ -14296,13 +14296,16 @@ const bi = /* @__PURE__ */ Xt(ui, [["render", pi], ["__scopeId", "data-v-d1a4de1
14296
14296
  function Ci(a, s, x, g, Y, m) {
14297
14297
  const V = Bt("RecordTitle"), B = Bt("TreeEditor"), J = Bt("inline-svg"), se = Bt("RecordAudio"), _e = Bt("RecordVideo"), ge = Bt("RecordPhoto");
14298
14298
  return Qe(), nt("div", {
14299
- class: Pt({
14299
+ class: Ht({
14300
14300
  "record-tree-container": !0,
14301
14301
  "record-tree-mobile": Y.isMobile
14302
14302
  })
14303
14303
  }, [
14304
14304
  Je("div", {
14305
- class: "record-tree",
14305
+ class: Ht({
14306
+ "record-tree": !0,
14307
+ "record-tree-nobar": !x.bar
14308
+ }),
14306
14309
  onMouseenter: s[1] || (s[1] = (...pe) => m.hideHoverNote && m.hideHoverNote(...pe))
14307
14310
  }, [
14308
14311
  x.showTitle ? (Qe(), Yt(V, {
@@ -14334,7 +14337,7 @@ function Ci(a, s, x, g, Y, m) {
14334
14337
  }, null, 8, ["nodes", "readOnly", "enableDbEnter", "hash", "isMobile", "onChange", "onFileUpload"])
14335
14338
  ])
14336
14339
  ])
14337
- ], 32),
14340
+ ], 34),
14338
14341
  x.bar ? (Qe(), nt("div", Si, [
14339
14342
  Je("div", Ti, [
14340
14343
  Je("div", {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codernote/record-tree",
3
- "version": "2.2.2",
3
+ "version": "2.2.3",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "dependencies": {
@@ -18,7 +18,7 @@
18
18
  "recordrtc": "^5.6.2",
19
19
  "vue-inline-svg": "^3.1.2",
20
20
  "vue3-popper": "^1.5.0",
21
- "@codernote/utils": "1.6.1"
21
+ "@codernote/utils": "1.6.2"
22
22
  },
23
23
  "devDependencies": {
24
24
  "@vitejs/plugin-vue": "^5.0.4",