deepsky 1.118.8 → 1.118.9

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/index.d.ts CHANGED
@@ -68,6 +68,7 @@ export interface _StatusHotkeys {
68
68
  export interface _StatusPresets {
69
69
  }
70
70
  export interface _PresetItem {
71
+ id: string;
71
72
  cubename: string;
72
73
  type: string;
73
74
  count: number;
package/dist/index.js CHANGED
@@ -936,18 +936,18 @@ const e=document.querySelectorAll("*").length,t=Math.floor(e/5e3);let n=`当前d
936
936
  /***/6234:
937
937
  /***/(e,t,n)=>{"use strict";
938
938
  /* harmony export */n.d(t,{
939
- /* harmony export */n:()=>/* binding */l
939
+ /* harmony export */n:()=>/* binding */c
940
940
  /* harmony export */});
941
- /* harmony import */var o=n(2149),r=n(8018),i=n(7633),a=n(6424),s=n(28);
942
- /* harmony import */class l extends r/* .UIBase */.e{
941
+ /* harmony import */var o=n(2149),r=n(8018),i=n(7633),a=n(6424),s=n(4835),l=n(28);
942
+ /* harmony import */class c extends r/* .UIBase */.e{
943
943
  // desc : 笔记内预设
944
- _special=(0/* .UIDefault */,i/* .reactive */.Kh)(s.U.presets);
944
+ _special=(0/* .UIDefault */,i/* .reactive */.Kh)(l.U.presets);
945
945
  // desc : 全局预设
946
- _global=(0/* .UIDefault */,i/* .reactive */.Kh)(s.U.presets);get meta(){return l.meta}get items(){return[...this._special.items,...this._global.items]}get items_special(){return[...this._special.items]}get items_global(){return[...this._global.items]}constructor(e){super(e);const t=this.update_data(this.uidata.presets);this._special.items.push(...t.items)}
946
+ _global=(0/* .UIDefault */,i/* .reactive */.Kh)(l.U.presets);get meta(){return c.meta}get items(){return[...this._special.items,...this._global.items]}get items_special(){return[...this._special.items]}get items_global(){return[...this._global.items]}constructor(e){super(e);const t=this.update_data(this.uidata.presets);this._special.items.push(...t.items)}
947
947
  // desc : 加载外部预设
948
948
  load(e,t=!1){t&&(this._global.items.length=0);const n=this.update_data(e);this._global.items.push(...n.items)}export(){return structuredClone((0,i/* .toRaw */.ux)(this._special))}update_data(e){const t={items:[]};
949
- // --> v3 字段转换
950
- return this.uidata.versions.presets<3?t:e}
949
+ // --> v4 添加id
950
+ if(this.uidata.versions.presets<4)for(let n of e.items)t.items.push({id:s.NoteTools.get_id(),cubename:n.cubename,type:n.type,data:n.data,versions:n.versions,count:n.count||1});return t}
951
951
  // desc : 添加预设项
952
952
  add_item(e){for(let t of this._special.items)if(t.cubename===e.cubename&&t.type===e.type)return this.tips.tip_error("已存在同名同姓预设"),!1;return this._special.items.push(e),!0}
953
953
  // desc : 显示添加预设得弹窗
@@ -955,11 +955,11 @@ show_preset(){this.root.scopes.scope_count_normal>0?this.dialog.status.show_pres
955
955
  // desc : 弹窗增加预设
956
956
  add_scope(e,t){if(0===this.root.scopes.scope_count_normal)return;const n=this.root.scopes.get_scope_cubes_data();
957
957
  // 对齐
958
- let o=n.map(e=>e.attrs.indent||0),r=Math.min(...o);for(let e of n)e.attrs.indent&&e.attrs.indent>0&&(e.attrs.indent-=r);const i={cubename:e,type:t,data:n,versions:this.root.versions,count:1};this.add_item(i)&&(this.dialog.status.show_presets=!1,this.root.scopes.clear_scope(),a/* .StatusEditor */.Q.saved=!1)}
958
+ let o=n.map(e=>e.attrs.indent||0),r=Math.min(...o);for(let e of n)e.attrs.indent&&e.attrs.indent>0&&(e.attrs.indent-=r);const i={id:s.NoteTools.get_id(),cubename:e,type:t,data:n,versions:this.root.versions,count:1};this.add_item(i)&&(this.dialog.status.show_presets=!1,this.root.scopes.clear_scope(),a/* .StatusEditor */.Q.saved=!1)}
959
959
  // desc : 弹窗增加全局预设
960
960
  async add_scope_global(e,t){if(0===this.root.scopes.scope_count_normal)return;const n=this.root.scopes.get_scope_cubes_data();
961
961
  // 对齐
962
- let o=n.map(e=>e.attrs.indent||0),r=Math.min(...o);for(let e of n)e.attrs.indent&&e.attrs.indent>0&&(e.attrs.indent-=r);const i={cubename:e,type:t,data:n,versions:this.root.versions,count:1};await this.event.emit_add_global_preset(i),this.dialog.status.show_presets=!1,this.root.scopes.clear_scope()}static get meta(){return{type:o/* ._UIPart */.d2.presets,version:3}}}
962
+ let o=n.map(e=>e.attrs.indent||0),r=Math.min(...o);for(let e of n)e.attrs.indent&&e.attrs.indent>0&&(e.attrs.indent-=r);const i={id:s.NoteTools.get_id(),cubename:e,type:t,data:n,versions:this.root.versions,count:1};await this.event.emit_add_global_preset(i),this.dialog.status.show_presets=!1,this.root.scopes.clear_scope()}static get meta(){return{type:o/* ._UIPart */.d2.presets,version:3}}}
963
963
  /***/},
964
964
  /***/6393:
965
965
  /***/(e,t,n)=>{"use strict";
@@ -5727,7 +5727,7 @@ async render(e){if(this._editor_dom=e,this.root instanceof o.CubeDoc){const t=(0
5727
5727
  // desc : 导出PDF专用页面
5728
5728
  render_pdf(e){
5729
5729
  // 提前展开所有的折叠块
5730
- const t=this.root.cubes.get_types_cube(o._NoteCubeTypes.box_folder);for(let e of this.root.children)e.attrs.fold=!1;for(let e of t.values())e.attrs.fold=!1;(0,a/* createApp */.Ef)(HD,{editor:this}).mount(e),Promise.resolve().then(()=>{this.event.emit_render_end()})}get_editor_version(){return bK.get_editor_version()}static get_editor_version(){return{version:"1.118.8",time_publish:1772453012658}}static get meta(){return{type:r/* _UIPart */.d2.editor,version:1}}}},
5730
+ const t=this.root.cubes.get_types_cube(o._NoteCubeTypes.box_folder);for(let e of this.root.children)e.attrs.fold=!1;for(let e of t.values())e.attrs.fold=!1;(0,a/* createApp */.Ef)(HD,{editor:this}).mount(e),Promise.resolve().then(()=>{this.event.emit_render_end()})}get_editor_version(){return bK.get_editor_version()}static get_editor_version(){return{version:"1.118.9",time_publish:1772504439346}}static get meta(){return{type:r/* _UIPart */.d2.editor,version:1}}}},
5731
5731
  /***/6941:
5732
5732
  /***/function(e){e.exports=function(){"use strict";return function(e,t,n){var o=t.prototype,r=function(e){return e&&(e.indexOf?e:e.s)},i=function(e,t,n,o,i){var a=e.name?e:e.$locale(),s=r(a[t]),l=r(a[n]),c=s||l.map(function(e){return e.slice(0,o)});if(!i)return c;var d=a.weekStart;return c.map(function(e,t){return c[(t+(d||0))%7]})},a=function(){return n.Ls[n.locale()]},s=function(e,t){return e.formats[t]||function(e){return e.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(e,t,n){return t||n.slice(1)})}(e.formats[t.toUpperCase()])},l=function(){var e=this;return{months:function(t){return t?t.format("MMMM"):i(e,"months")},monthsShort:function(t){return t?t.format("MMM"):i(e,"monthsShort","months",3)},firstDayOfWeek:function(){return e.$locale().weekStart||0},weekdays:function(t){return t?t.format("dddd"):i(e,"weekdays")},weekdaysMin:function(t){return t?t.format("dd"):i(e,"weekdaysMin","weekdays",2)},weekdaysShort:function(t){return t?t.format("ddd"):i(e,"weekdaysShort","weekdays",3)},longDateFormat:function(t){return s(e.$locale(),t)},meridiem:this.$locale().meridiem,ordinal:this.$locale().ordinal}};o.localeData=function(){return l.bind(this)()},n.localeData=function(){var e=a();return{firstDayOfWeek:function(){return e.weekStart||0},weekdays:function(){return n.weekdays()},weekdaysShort:function(){return n.weekdaysShort()},weekdaysMin:function(){return n.weekdaysMin()},months:function(){return n.months()},monthsShort:function(){return n.monthsShort()},longDateFormat:function(t){return s(e,t)},meridiem:e.meridiem,ordinal:e.ordinal}},n.months=function(){return i(a(),"months")},n.monthsShort=function(){return i(a(),"monthsShort","months",3)},n.weekdays=function(e){return i(a(),"weekdays",null,null,e)},n.weekdaysShort=function(e){return i(a(),"weekdaysShort","weekdays",3,e)},n.weekdaysMin=function(e){return i(a(),"weekdaysMin","weekdays",2,e)}}}();
5733
5733
  /***/},
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "deepsky",
3
- "version": "1.118.8",
3
+ "version": "1.118.9",
4
4
  "description": "",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",