@qxs-bns/components-wc 0.0.21 → 0.0.23
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/es/base/define.mjs +1 -1
- package/es/base/define.mjs.map +1 -1
- package/es/editor/blocksuite-editor.mjs +3 -3
- package/es/editor/blocksuite-editor.mjs.map +1 -1
- package/es/editor/index.mjs +1 -1
- package/es/editor/index.mjs.map +1 -1
- package/es/entry-editor.mjs +2 -0
- package/es/entry-editor.mjs.map +1 -0
- package/es/entry-subject.mjs +2 -0
- package/es/entry-subject.mjs.map +1 -0
- package/es/index.mjs +1 -1
- package/es/subject/action.mjs +5 -5
- package/es/subject/action.mjs.map +1 -1
- package/es/subject/blank-fill.mjs +8 -8
- package/es/subject/blank-fill.mjs.map +1 -1
- package/es/subject/layout.mjs +4 -4
- package/es/subject/layout.mjs.map +1 -1
- package/es/subject/list.mjs +77 -77
- package/es/subject/list.mjs.map +1 -1
- package/es/subject/page-end.mjs +7 -7
- package/es/subject/page-end.mjs.map +1 -1
- package/es/subject/scale.mjs +7 -7
- package/es/subject/scale.mjs.map +1 -1
- package/es/subject/single.mjs +11 -11
- package/es/subject/single.mjs.map +1 -1
- package/es/subject/text-fill.mjs +32 -32
- package/es/subject/text-fill.mjs.map +1 -1
- package/lib/base/define.cjs +1 -1
- package/lib/base/define.cjs.map +1 -1
- package/lib/editor/blocksuite-editor.cjs +2 -2
- package/lib/editor/blocksuite-editor.cjs.map +1 -1
- package/lib/editor/index.cjs +1 -1
- package/lib/editor/index.cjs.map +1 -1
- package/lib/entry-editor.cjs +2 -0
- package/lib/entry-editor.cjs.map +1 -0
- package/lib/entry-subject.cjs +2 -0
- package/lib/entry-subject.cjs.map +1 -0
- package/lib/index.cjs +1 -1
- package/lib/subject/action.cjs +2 -2
- package/lib/subject/action.cjs.map +1 -1
- package/lib/subject/blank-fill.cjs +9 -9
- package/lib/subject/blank-fill.cjs.map +1 -1
- package/lib/subject/layout.cjs +4 -4
- package/lib/subject/layout.cjs.map +1 -1
- package/lib/subject/list.cjs +32 -32
- package/lib/subject/list.cjs.map +1 -1
- package/lib/subject/page-end.cjs +5 -5
- package/lib/subject/page-end.cjs.map +1 -1
- package/lib/subject/scale.cjs +10 -10
- package/lib/subject/scale.cjs.map +1 -1
- package/lib/subject/single.cjs +14 -14
- package/lib/subject/single.cjs.map +1 -1
- package/lib/subject/text-fill.cjs +40 -40
- package/lib/subject/text-fill.cjs.map +1 -1
- package/package.json +16 -1
- package/es/node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/css-tag.mjs +0 -7
- package/es/node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/css-tag.mjs.map +0 -1
- package/es/node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/decorators/property.mjs +0 -7
- package/es/node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/decorators/property.mjs.map +0 -1
- package/es/node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/decorators/state.mjs +0 -7
- package/es/node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/decorators/state.mjs.map +0 -1
- package/es/node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/reactive-element.mjs +0 -7
- package/es/node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/reactive-element.mjs.map +0 -1
- package/es/node_modules/.pnpm/@tiptap_extension-placeholder@3.19.0_@tiptap_extensions@3.19.0_@tiptap_core@3.19.0_@tiptap_pm@3.20.5__@tiptap_pm@3.20.5_/node_modules/@tiptap/extension-placeholder/dist/index.mjs +0 -2
- package/es/node_modules/.pnpm/@tiptap_extension-placeholder@3.19.0_@tiptap_extensions@3.19.0_@tiptap_core@3.19.0_@tiptap_pm@3.20.5__@tiptap_pm@3.20.5_/node_modules/@tiptap/extension-placeholder/dist/index.mjs.map +0 -1
- package/es/node_modules/.pnpm/@tiptap_extension-placeholder@3.20.5_@tiptap_extensions@3.20.5_@tiptap_core@3.20.5_@tiptap_pm@3.20.5__@tiptap_pm@3.20.5_/node_modules/@tiptap/extension-placeholder/dist/index.mjs +0 -2
- package/es/node_modules/.pnpm/@tiptap_extension-placeholder@3.20.5_@tiptap_extensions@3.20.5_@tiptap_core@3.20.5_@tiptap_pm@3.20.5__@tiptap_pm@3.20.5_/node_modules/@tiptap/extension-placeholder/dist/index.mjs.map +0 -1
- package/es/node_modules/.pnpm/@tiptap_extensions@3.19.0_@tiptap_core@3.19.0_@tiptap_pm@3.20.5__@tiptap_pm@3.20.5/node_modules/@tiptap/extensions/dist/index.mjs +0 -2
- package/es/node_modules/.pnpm/@tiptap_extensions@3.19.0_@tiptap_core@3.19.0_@tiptap_pm@3.20.5__@tiptap_pm@3.20.5/node_modules/@tiptap/extensions/dist/index.mjs.map +0 -1
- package/es/node_modules/.pnpm/@tiptap_extensions@3.20.5_@tiptap_core@3.20.5_@tiptap_pm@3.20.5__@tiptap_pm@3.20.5/node_modules/@tiptap/extensions/dist/index.mjs +0 -2
- package/es/node_modules/.pnpm/@tiptap_extensions@3.20.5_@tiptap_core@3.20.5_@tiptap_pm@3.20.5__@tiptap_pm@3.20.5/node_modules/@tiptap/extensions/dist/index.mjs.map +0 -1
- package/es/node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/directive-helpers.mjs +0 -7
- package/es/node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/directive-helpers.mjs.map +0 -1
- package/es/node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/directive.mjs +0 -7
- package/es/node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/directive.mjs.map +0 -1
- package/es/node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/directives/repeat.mjs +0 -7
- package/es/node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/directives/repeat.mjs.map +0 -1
- package/es/node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/lit-html.mjs +0 -7
- package/es/node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/lit-html.mjs.map +0 -1
- package/es/node_modules/.pnpm/prosemirror-dropcursor@1.8.2/node_modules/prosemirror-dropcursor/dist/index.mjs +0 -2
- package/es/node_modules/.pnpm/prosemirror-dropcursor@1.8.2/node_modules/prosemirror-dropcursor/dist/index.mjs.map +0 -1
- package/es/node_modules/.pnpm/prosemirror-gapcursor@1.4.1/node_modules/prosemirror-gapcursor/dist/index.mjs +0 -2
- package/es/node_modules/.pnpm/prosemirror-gapcursor@1.4.1/node_modules/prosemirror-gapcursor/dist/index.mjs.map +0 -1
- package/es/node_modules/.pnpm/prosemirror-history@1.5.0/node_modules/prosemirror-history/dist/index.mjs +0 -2
- package/es/node_modules/.pnpm/prosemirror-history@1.5.0/node_modules/prosemirror-history/dist/index.mjs.map +0 -1
- package/es/node_modules/.pnpm/prosemirror-keymap@1.2.3/node_modules/prosemirror-keymap/dist/index.mjs +0 -2
- package/es/node_modules/.pnpm/prosemirror-keymap@1.2.3/node_modules/prosemirror-keymap/dist/index.mjs.map +0 -1
- package/es/node_modules/.pnpm/prosemirror-model@1.25.4/node_modules/prosemirror-model/dist/index.mjs +0 -2
- package/es/node_modules/.pnpm/prosemirror-model@1.25.4/node_modules/prosemirror-model/dist/index.mjs.map +0 -1
- package/es/node_modules/.pnpm/prosemirror-state@1.4.4/node_modules/prosemirror-state/dist/index.mjs +0 -2
- package/es/node_modules/.pnpm/prosemirror-state@1.4.4/node_modules/prosemirror-state/dist/index.mjs.map +0 -1
- package/es/node_modules/.pnpm/prosemirror-transform@1.11.0/node_modules/prosemirror-transform/dist/index.mjs +0 -2
- package/es/node_modules/.pnpm/prosemirror-transform@1.11.0/node_modules/prosemirror-transform/dist/index.mjs.map +0 -1
- package/es/node_modules/.pnpm/prosemirror-view@1.41.7/node_modules/prosemirror-view/dist/index.mjs +0 -2
- package/es/node_modules/.pnpm/prosemirror-view@1.41.7/node_modules/prosemirror-view/dist/index.mjs.map +0 -1
- package/es/node_modules/.pnpm/rope-sequence@1.3.4/node_modules/rope-sequence/dist/index.mjs +0 -2
- package/es/node_modules/.pnpm/rope-sequence@1.3.4/node_modules/rope-sequence/dist/index.mjs.map +0 -1
- package/es/node_modules/.pnpm/w3c-keyname@2.2.8/node_modules/w3c-keyname/index.mjs +0 -2
- package/es/node_modules/.pnpm/w3c-keyname@2.2.8/node_modules/w3c-keyname/index.mjs.map +0 -1
- package/es/subject/rich-text.mjs +0 -27
- package/es/subject/rich-text.mjs.map +0 -1
- package/lib/node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/css-tag.cjs +0 -7
- package/lib/node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/css-tag.cjs.map +0 -1
- package/lib/node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/decorators/property.cjs +0 -7
- package/lib/node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/decorators/property.cjs.map +0 -1
- package/lib/node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/decorators/state.cjs +0 -7
- package/lib/node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/decorators/state.cjs.map +0 -1
- package/lib/node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/reactive-element.cjs +0 -7
- package/lib/node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/reactive-element.cjs.map +0 -1
- package/lib/node_modules/.pnpm/@tiptap_extension-placeholder@3.19.0_@tiptap_extensions@3.19.0_@tiptap_core@3.19.0_@tiptap_pm@3.20.5__@tiptap_pm@3.20.5_/node_modules/@tiptap/extension-placeholder/dist/index.cjs +0 -2
- package/lib/node_modules/.pnpm/@tiptap_extension-placeholder@3.19.0_@tiptap_extensions@3.19.0_@tiptap_core@3.19.0_@tiptap_pm@3.20.5__@tiptap_pm@3.20.5_/node_modules/@tiptap/extension-placeholder/dist/index.cjs.map +0 -1
- package/lib/node_modules/.pnpm/@tiptap_extension-placeholder@3.20.5_@tiptap_extensions@3.20.5_@tiptap_core@3.20.5_@tiptap_pm@3.20.5__@tiptap_pm@3.20.5_/node_modules/@tiptap/extension-placeholder/dist/index.cjs +0 -2
- package/lib/node_modules/.pnpm/@tiptap_extension-placeholder@3.20.5_@tiptap_extensions@3.20.5_@tiptap_core@3.20.5_@tiptap_pm@3.20.5__@tiptap_pm@3.20.5_/node_modules/@tiptap/extension-placeholder/dist/index.cjs.map +0 -1
- package/lib/node_modules/.pnpm/@tiptap_extensions@3.19.0_@tiptap_core@3.19.0_@tiptap_pm@3.20.5__@tiptap_pm@3.20.5/node_modules/@tiptap/extensions/dist/index.cjs +0 -2
- package/lib/node_modules/.pnpm/@tiptap_extensions@3.19.0_@tiptap_core@3.19.0_@tiptap_pm@3.20.5__@tiptap_pm@3.20.5/node_modules/@tiptap/extensions/dist/index.cjs.map +0 -1
- package/lib/node_modules/.pnpm/@tiptap_extensions@3.20.5_@tiptap_core@3.20.5_@tiptap_pm@3.20.5__@tiptap_pm@3.20.5/node_modules/@tiptap/extensions/dist/index.cjs +0 -2
- package/lib/node_modules/.pnpm/@tiptap_extensions@3.20.5_@tiptap_core@3.20.5_@tiptap_pm@3.20.5__@tiptap_pm@3.20.5/node_modules/@tiptap/extensions/dist/index.cjs.map +0 -1
- package/lib/node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/directive-helpers.cjs +0 -7
- package/lib/node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/directive-helpers.cjs.map +0 -1
- package/lib/node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/directive.cjs +0 -7
- package/lib/node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/directive.cjs.map +0 -1
- package/lib/node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/directives/repeat.cjs +0 -8
- package/lib/node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/directives/repeat.cjs.map +0 -1
- package/lib/node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/lit-html.cjs +0 -7
- package/lib/node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/lit-html.cjs.map +0 -1
- package/lib/node_modules/.pnpm/prosemirror-dropcursor@1.8.2/node_modules/prosemirror-dropcursor/dist/index.cjs +0 -2
- package/lib/node_modules/.pnpm/prosemirror-dropcursor@1.8.2/node_modules/prosemirror-dropcursor/dist/index.cjs.map +0 -1
- package/lib/node_modules/.pnpm/prosemirror-gapcursor@1.4.1/node_modules/prosemirror-gapcursor/dist/index.cjs +0 -2
- package/lib/node_modules/.pnpm/prosemirror-gapcursor@1.4.1/node_modules/prosemirror-gapcursor/dist/index.cjs.map +0 -1
- package/lib/node_modules/.pnpm/prosemirror-history@1.5.0/node_modules/prosemirror-history/dist/index.cjs +0 -2
- package/lib/node_modules/.pnpm/prosemirror-history@1.5.0/node_modules/prosemirror-history/dist/index.cjs.map +0 -1
- package/lib/node_modules/.pnpm/prosemirror-keymap@1.2.3/node_modules/prosemirror-keymap/dist/index.cjs +0 -2
- package/lib/node_modules/.pnpm/prosemirror-keymap@1.2.3/node_modules/prosemirror-keymap/dist/index.cjs.map +0 -1
- package/lib/node_modules/.pnpm/prosemirror-model@1.25.4/node_modules/prosemirror-model/dist/index.cjs +0 -2
- package/lib/node_modules/.pnpm/prosemirror-model@1.25.4/node_modules/prosemirror-model/dist/index.cjs.map +0 -1
- package/lib/node_modules/.pnpm/prosemirror-state@1.4.4/node_modules/prosemirror-state/dist/index.cjs +0 -2
- package/lib/node_modules/.pnpm/prosemirror-state@1.4.4/node_modules/prosemirror-state/dist/index.cjs.map +0 -1
- package/lib/node_modules/.pnpm/prosemirror-transform@1.11.0/node_modules/prosemirror-transform/dist/index.cjs +0 -2
- package/lib/node_modules/.pnpm/prosemirror-transform@1.11.0/node_modules/prosemirror-transform/dist/index.cjs.map +0 -1
- package/lib/node_modules/.pnpm/prosemirror-view@1.41.7/node_modules/prosemirror-view/dist/index.cjs +0 -2
- package/lib/node_modules/.pnpm/prosemirror-view@1.41.7/node_modules/prosemirror-view/dist/index.cjs.map +0 -1
- package/lib/node_modules/.pnpm/rope-sequence@1.3.4/node_modules/rope-sequence/dist/index.cjs +0 -2
- package/lib/node_modules/.pnpm/rope-sequence@1.3.4/node_modules/rope-sequence/dist/index.cjs.map +0 -1
- package/lib/node_modules/.pnpm/w3c-keyname@2.2.8/node_modules/w3c-keyname/index.cjs +0 -2
- package/lib/node_modules/.pnpm/w3c-keyname@2.2.8/node_modules/w3c-keyname/index.cjs.map +0 -1
- package/lib/subject/rich-text.cjs +0 -27
- package/lib/subject/rich-text.cjs.map +0 -1
- package/types/base/define.d.ts +0 -1
- package/types/base/uid.d.ts +0 -1
- package/types/editor/blocksuite-editor.d.ts +0 -84
- package/types/editor/index.d.ts +0 -3
- package/types/index.d.ts +0 -4
- package/types/subject/action.d.ts +0 -23
- package/types/subject/blank-fill.d.ts +0 -49
- package/types/subject/index.d.ts +0 -20
- package/types/subject/layout.d.ts +0 -7
- package/types/subject/list.d.ts +0 -43
- package/types/subject/page-end.d.ts +0 -10
- package/types/subject/rich-text.d.ts +0 -30
- package/types/subject/scale.d.ts +0 -42
- package/types/subject/single.d.ts +0 -79
- package/types/subject/text-fill.d.ts +0 -54
- package/types/subject/type.d.ts +0 -7
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"reactive-element.mjs","sources":["../../../../../../../../../node_modules/.pnpm/@lit+reactive-element@2.1.2/node_modules/@lit/reactive-element/reactive-element.js"],"sourcesContent":["import{getCompatibleStyle as t,adoptStyles as s}from\"./css-tag.js\";export{CSSResult,css,supportsAdoptingStyleSheets,unsafeCSS}from\"./css-tag.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const{is:i,defineProperty:e,getOwnPropertyDescriptor:h,getOwnPropertyNames:r,getOwnPropertySymbols:o,getPrototypeOf:n}=Object,a=globalThis,c=a.trustedTypes,l=c?c.emptyScript:\"\",p=a.reactiveElementPolyfillSupport,d=(t,s)=>t,u={toAttribute(t,s){switch(s){case Boolean:t=t?l:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,s){let i=t;switch(s){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},f=(t,s)=>!i(t,s),b={attribute:!0,type:String,converter:u,reflect:!1,useDefault:!1,hasChanged:f};Symbol.metadata??=Symbol(\"metadata\"),a.litPropertyMetadata??=new WeakMap;class y extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,s=b){if(s.state&&(s.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((s=Object.create(s)).wrapped=!0),this.elementProperties.set(t,s),!s.noAccessor){const i=Symbol(),h=this.getPropertyDescriptor(t,i,s);void 0!==h&&e(this.prototype,t,h)}}static getPropertyDescriptor(t,s,i){const{get:e,set:r}=h(this.prototype,t)??{get(){return this[s]},set(t){this[s]=t}};return{get:e,set(s){const h=e?.call(this);r?.call(this,s),this.requestUpdate(t,h,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??b}static _$Ei(){if(this.hasOwnProperty(d(\"elementProperties\")))return;const t=n(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(d(\"finalized\")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(d(\"properties\"))){const t=this.properties,s=[...r(t),...o(t)];for(const i of s)this.createProperty(i,t[i])}const t=this[Symbol.metadata];if(null!==t){const s=litPropertyMetadata.get(t);if(void 0!==s)for(const[t,i]of s)this.elementProperties.set(t,i)}this._$Eh=new Map;for(const[t,s]of this.elementProperties){const i=this._$Eu(t,s);void 0!==i&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(s){const i=[];if(Array.isArray(s)){const e=new Set(s.flat(1/0).reverse());for(const s of e)i.unshift(t(s))}else void 0!==s&&i.push(t(s));return i}static _$Eu(t,s){const i=s.attribute;return!1===i?void 0:\"string\"==typeof i?i:\"string\"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(t=>t(this))}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,s=this.constructor.elementProperties;for(const i of s.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return s(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(t=>t.hostConnected?.())}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.())}attributeChangedCallback(t,s,i){this._$AK(t,i)}_$ET(t,s){const i=this.constructor.elementProperties.get(t),e=this.constructor._$Eu(t,i);if(void 0!==e&&!0===i.reflect){const h=(void 0!==i.converter?.toAttribute?i.converter:u).toAttribute(s,i.type);this._$Em=t,null==h?this.removeAttribute(e):this.setAttribute(e,h),this._$Em=null}}_$AK(t,s){const i=this.constructor,e=i._$Eh.get(t);if(void 0!==e&&this._$Em!==e){const t=i.getPropertyOptions(e),h=\"function\"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:u;this._$Em=e;const r=h.fromAttribute(s,t.type);this[e]=r??this._$Ej?.get(e)??r,this._$Em=null}}requestUpdate(t,s,i,e=!1,h){if(void 0!==t){const r=this.constructor;if(!1===e&&(h=this[t]),i??=r.getPropertyOptions(t),!((i.hasChanged??f)(h,s)||i.useDefault&&i.reflect&&h===this._$Ej?.get(t)&&!this.hasAttribute(r._$Eu(t,i))))return;this.C(t,s,i)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(t,s,{useDefault:i,reflect:e,wrapped:h},r){i&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,r??s??this[t]),!0!==h||void 0!==r)||(this._$AL.has(t)||(this.hasUpdated||i||(s=void 0),this._$AL.set(t,s)),!0===e&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,s]of this._$Ep)this[t]=s;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[s,i]of t){const{wrapped:t}=i,e=this[s];!0!==t||this._$AL.has(s)||void 0===e||this.C(s,void 0,i,e)}}let t=!1;const s=this._$AL;try{t=this.shouldUpdate(s),t?(this.willUpdate(s),this._$EO?.forEach(t=>t.hostUpdate?.()),this.update(s)):this._$EM()}catch(s){throw t=!1,this._$EM(),s}t&&this._$AE(s)}willUpdate(t){}_$AE(t){this._$EO?.forEach(t=>t.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach(t=>this._$ET(t,this[t])),this._$EM()}updated(t){}firstUpdated(t){}}y.elementStyles=[],y.shadowRootOptions={mode:\"open\"},y[d(\"elementProperties\")]=new Map,y[d(\"finalized\")]=new Map,p?.({ReactiveElement:y}),(a.reactiveElementVersions??=[]).push(\"2.1.2\");export{y as ReactiveElement,s as adoptStyles,u as defaultConverter,t as getCompatibleStyle,f as notEqual};\n//# sourceMappingURL=reactive-element.js.map\n"],"names":["is","i","defineProperty","e","getOwnPropertyDescriptor","h","getOwnPropertyNames","r","getOwnPropertySymbols","o","getPrototypeOf","n","Object","a","globalThis","c","trustedTypes","l","emptyScript","p","reactiveElementPolyfillSupport","d","JSCompiler_renameProperty","t","s","u","toAttribute","Boolean","Array","JSON","stringify","fromAttribute","Number","parse","f","notEqual","b","attribute","type","String","converter","reflect","useDefault","hasChanged","Symbol","metadata","litPropertyMetadata","WeakMap","y","HTMLElement","addInitializer","this","_$Ei","push","observedAttributes","finalize","_$Eh","keys","createProperty","arguments","length","undefined","state","prototype","hasOwnProperty","create","wrapped","elementProperties","set","noAccessor","getPropertyDescriptor","get","call","requestUpdate","configurable","enumerable","getPropertyOptions","Map","finalized","properties","_$Eu","elementStyles","finalizeStyles","styles","isArray","Set","flat","reverse","unshift","toLowerCase","constructor","super","_$Ep","isUpdatePending","hasUpdated","_$Em","_$Ev","_$ES","Promise","enableUpdating","_$AL","_$E_","forEach","addController","_$EO","add","renderRoot","isConnected","hostConnected","removeController","delete","size","createRenderRoot","shadowRoot","attachShadow","shadowRootOptions","connectedCallback","disconnectedCallback","hostDisconnected","attributeChangedCallback","_$AK","_$ET","removeAttribute","setAttribute","_$Ej","hasAttribute","C","_$EP","_ref","has","_$Eq","reject","scheduleUpdate","performUpdate","shouldUpdate","willUpdate","hostUpdate","update","_$EM","_$AE","hostUpdated","firstUpdated","updated","updateComplete","getUpdateComplete","mode","ReactiveElement","reactiveElementVersions"],"mappings":";;;;;GA4CA,MAAMA,GACJC,EAAEC,eACFC,EAAcC,yBACdC,EAAwBC,oBACxBC,EAAmBC,sBACnBC,EAAqBC,eACrBC,GACEC,OAKEC,EAASC,WAU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B2B,KAAKiD,KAC/B,IACE7E,EAAe4B,KAAKmF,aAAa9G,GAC7BD,GACF4B,KAAKoF,WAAW/G,GAChB2B,KAAKqD,MAAeF,QAAS/E,GAAMA,EAAEiH,gBACrCrF,KAAKsF,OAAOjH,IAEZ2B,KAAKuF,MAET,OAASlH,GAMP,MAHAD,GAAA,EAEA4B,KAAKuF,OACClH,CACR,CAEID,GACF4B,KAAKwF,KAAYnH,EAErB,CAuBU+G,UAAAA,CAAWhH,GAA2C,CAIhEoH,IAAAA,CAAYpH,GACV4B,KAAKqD,MAAeF,QAAS/E,GAAMA,EAAEqH,iBAChCzF,KAAK2C,aACR3C,KAAK2C,YAAA,EACL3C,KAAK0F,aAAatH,IAEpB4B,KAAK2F,QAAQvH,EAiBf,CAEQmH,IAAAA,GACNvF,KAAKiD,KAAsB,IAAIvB,IAC/B1B,KAAK0C,kBACP,CAkBA,kBAAAkD,GACE,OAAO5F,KAAK6F,mBACd,CAyBUA,iBAAAA,GACR,OAAO7F,KAAK8C,IACd,CAUUqC,YAAAA,CAAa/G,GACrB,OAAA,CACF,CAWUkH,MAAAA,CAAOlH,GAIf4B,KAAK+E,OAA2B/E,KAAK+E,KAAuB5B,QAAS/E,GACnE4B,KAAKsE,KAAsBlG,EAAG4B,KAAK5B,KAErC4B,KAAKuF,MACP,CAYUI,OAAAA,CAAQvH,GAAqC,CAkB7CsH,YAAAA,CAAatH,GAAqC,EA7iCrDyB,EAAAiC,cAA0C,GAiT1CjC,EAAAmE,kBAAoC,CAAC8B,KAAM,QAiwBnDjG,EACC3B,EAA0B,sBACxB,IAAIwD,IACP7B,EACC3B,EAA0B,cACxB,IAAIwD,IAGR1D,IAAkB,CAAC+H,gBAAAlG,KAuClBnC,EAAOsI,0BAA4B,IAAI9F,KAAK","x_google_ignoreList":[0]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../../../../../../../../../node_modules/.pnpm/@tiptap+extension-placeholder@3.19.0_@tiptap+extensions@3.19.0_@tiptap+core@3.19.0_@tiptap+pm@3.20.5__@tiptap+pm@3.20.5_/node_modules/@tiptap/extension-placeholder/dist/index.js"],"sourcesContent":["// src/index.ts\nimport { Placeholder } from \"@tiptap/extensions\";\nimport { Placeholder as Placeholder2 } from \"@tiptap/extensions\";\nvar index_default = Placeholder;\nexport {\n Placeholder2 as Placeholder,\n index_default as default\n};\n//# sourceMappingURL=index.js.map"],"names":["index_default","Placeholder"],"mappings":"+KAKA,IAAOA,EAAQC","x_google_ignoreList":[0]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../../../../../../../../../node_modules/.pnpm/@tiptap+extension-placeholder@3.20.5_@tiptap+extensions@3.20.5_@tiptap+core@3.20.5_@tiptap+pm@3.20.5__@tiptap+pm@3.20.5_/node_modules/@tiptap/extension-placeholder/dist/index.js"],"sourcesContent":["// src/index.ts\nimport { Placeholder } from \"@tiptap/extensions\";\nimport { Placeholder as Placeholder2 } from \"@tiptap/extensions\";\nvar index_default = Placeholder;\nexport {\n Placeholder2 as Placeholder,\n index_default as default\n};\n//# sourceMappingURL=index.js.map"],"names":["index_default","Placeholder"],"mappings":"+KAKA,IAAOA,EAAQC","x_google_ignoreList":[0]}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{Extension as e,callOrReturn as t,getExtensionField as o,isNodeEmpty as r,isNodeSelection as s}from"@tiptap/core";import{Plugin as n,PluginKey as i}from"../../../../../prosemirror-state@1.4.4/node_modules/prosemirror-state/dist/index.mjs";import{dropCursor as d}from"../../../../../prosemirror-dropcursor@1.8.2/node_modules/prosemirror-dropcursor/dist/index.mjs";import{DecorationSet as a,Decoration as c}from"../../../../../prosemirror-view@1.41.7/node_modules/prosemirror-view/dist/index.mjs";import{gapCursor as l}from"../../../../../prosemirror-gapcursor@1.4.1/node_modules/prosemirror-gapcursor/dist/index.mjs";import{history as p,redo as u,undo as h}from"../../../../../prosemirror-history@1.5.0/node_modules/prosemirror-history/dist/index.mjs";e.create({name:"characterCount",addOptions:()=>({limit:null,mode:"textSize",textCounter:e=>e.length,wordCounter:e=>e.split(" ").filter(e=>""!==e).length}),addStorage:()=>({characters:()=>0,words:()=>0}),onBeforeCreate(){this.storage.characters=e=>{const t=(null==e?void 0:e.node)||this.editor.state.doc;if("textSize"===((null==e?void 0:e.mode)||this.options.mode)){const e=t.textBetween(0,t.content.size,void 0," ");return this.options.textCounter(e)}return t.nodeSize},this.storage.words=e=>{const t=(null==e?void 0:e.node)||this.editor.state.doc,o=t.textBetween(0,t.content.size," "," ");return this.options.wordCounter(o)}},addProseMirrorPlugins(){let e=!1;return[new n({key:new i("characterCount"),appendTransaction:(t,o,r)=>{if(e)return;const s=this.options.limit;if(null==s||0===s)return void(e=!0);const n=this.storage.characters({node:r.doc});if(n>s){const t=0,o=n-s,i=r.tr.deleteRange(t,o);return e=!0,i}e=!0},filterTransaction:(e,t)=>{const o=this.options.limit;if(!e.docChanged||0===o||null==o)return!0;const r=this.storage.characters({node:t.doc}),s=this.storage.characters({node:e.doc});if(s<=o)return!0;if(r>o&&s>o&&s<=r)return!0;if(r>o&&s>o&&s>r)return!1;if(!e.getMeta("paste"))return!1;const n=e.selection.$head.pos,i=n-(s-o),d=n;e.deleteRange(i,d);return!(this.storage.characters({node:e.doc})>o)}})]}}),e.create({name:"dropCursor",addOptions:()=>({color:"currentColor",width:1,class:void 0}),addProseMirrorPlugins(){return[d(this.options)]}}),e.create({name:"focus",addOptions:()=>({className:"has-focus",mode:"all"}),addProseMirrorPlugins(){return[new n({key:new i("focus"),props:{decorations:e=>{let{doc:t,selection:o}=e;const{isEditable:r,isFocused:s}=this.editor,{anchor:n}=o,i=[];if(!r||!s)return a.create(t,[]);let d=0;"deepest"===this.options.mode&&t.descendants((e,t)=>{if(e.isText)return;if(!(n>=t&&n<=t+e.nodeSize-1))return!1;d+=1});let l=0;return t.descendants((e,t)=>{if(e.isText)return!1;if(!(n>=t&&n<=t+e.nodeSize-1))return!1;l+=1;if("deepest"===this.options.mode&&d-l>0||"shallowest"===this.options.mode&&l>1)return"deepest"===this.options.mode;i.push(c.node(t,t+e.nodeSize,{class:this.options.className}))}),a.create(t,i)}}})]}}),e.create({name:"gapCursor",addProseMirrorPlugins:()=>[l()],extendNodeSchema(e){var r;const s={name:e.name,options:e.options,storage:e.storage};return{allowGapCursor:null!=(r=t(o(e,"allowGapCursor",s)))?r:null}}});var m="placeholder";function f(e){return e.replace(/\s+/g,"-").replace(/[^a-zA-Z0-9-]/g,"").replace(/^[0-9-]+/,"").replace(/^-+/,"").toLowerCase()}var g=e.create({name:"placeholder",addOptions:()=>({emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",dataAttribute:m,placeholder:"Write something …",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}),addProseMirrorPlugins(){const e=this.options.dataAttribute?`data-${f(this.options.dataAttribute)}`:`data-${m}`;return[new n({key:new i("placeholder"),props:{decorations:t=>{let{doc:o,selection:s}=t;const n=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:i}=s,d=[];if(!n)return null;const l=this.editor.isEmpty;return o.descendants((t,o)=>{const s=i>=o&&i<=o+t.nodeSize,n=!t.isLeaf&&r(t);if((s||!this.options.showOnlyCurrent)&&n){const r=[this.options.emptyNodeClass];l&&r.push(this.options.emptyEditorClass);const n=c.node(o,o+t.nodeSize,{class:r.join(" "),[e]:"function"==typeof this.options.placeholder?this.options.placeholder({editor:this.editor,node:t,pos:o,hasAnchor:s}):this.options.placeholder});d.push(n)}return this.options.includeChildren}),a.create(o,d)}}})]}});function y(e){let{types:t,node:o}=e;return o&&Array.isArray(t)&&t.includes(o.type)||(null==o?void 0:o.type)===t}e.create({name:"selection",addOptions:()=>({className:"selection"}),addProseMirrorPlugins(){const{editor:e,options:t}=this;return[new n({key:new i("selection"),props:{decorations:o=>o.selection.empty||e.isFocused||!e.isEditable||s(o.selection)||e.view.dragging?null:a.create(o.doc,[c.inline(o.selection.from,o.selection.to,{class:t.className})])}})]}}),e.create({name:"trailingNode",addOptions:()=>({node:void 0,notAfter:[]}),addProseMirrorPlugins(){var e;const t=new i(this.name),o=this.options.node||(null==(e=this.editor.schema.topNodeType.contentMatch.defaultType)?void 0:e.name)||"paragraph",r=Object.entries(this.editor.schema.nodes).map(e=>{let[,t]=e;return t}).filter(e=>(this.options.notAfter||[]).concat(o).includes(e.name));return[new n({key:t,appendTransaction:(e,r,s)=>{const{doc:n,tr:i,schema:d}=s,a=t.getState(s),c=n.content.size,l=d.nodes[o];if(a)return i.insert(c,l.create())},state:{init:(e,t)=>!y({node:t.tr.doc.lastChild,types:r}),apply:(e,t)=>{if(!e.docChanged)return t;if(e.getMeta("__uniqueIDTransaction"))return t;return!y({node:e.doc.lastChild,types:r})}}})]}}),e.create({name:"undoRedo",addOptions:()=>({depth:100,newGroupDelay:500}),addCommands:()=>({undo:()=>e=>{let{state:t,dispatch:o}=e;return h(t,o)},redo:()=>e=>{let{state:t,dispatch:o}=e;return u(t,o)}}),addProseMirrorPlugins(){return[p(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-я":()=>this.editor.commands.undo(),"Shift-Mod-я":()=>this.editor.commands.redo()}}});export{g as Placeholder,f as preparePlaceholderAttribute};
|
|
2
|
-
//# sourceMappingURL=index.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../../../../../../../../../node_modules/.pnpm/@tiptap+extensions@3.19.0_@tiptap+core@3.19.0_@tiptap+pm@3.20.5__@tiptap+pm@3.20.5/node_modules/@tiptap/extensions/dist/index.js"],"sourcesContent":["// src/character-count/character-count.ts\nimport { Extension } from \"@tiptap/core\";\nimport { Plugin, PluginKey } from \"@tiptap/pm/state\";\nvar CharacterCount = Extension.create({\n name: \"characterCount\",\n addOptions() {\n return {\n limit: null,\n mode: \"textSize\",\n textCounter: (text) => text.length,\n wordCounter: (text) => text.split(\" \").filter((word) => word !== \"\").length\n };\n },\n addStorage() {\n return {\n characters: () => 0,\n words: () => 0\n };\n },\n onBeforeCreate() {\n this.storage.characters = (options) => {\n const node = (options == null ? void 0 : options.node) || this.editor.state.doc;\n const mode = (options == null ? void 0 : options.mode) || this.options.mode;\n if (mode === \"textSize\") {\n const text = node.textBetween(0, node.content.size, void 0, \" \");\n return this.options.textCounter(text);\n }\n return node.nodeSize;\n };\n this.storage.words = (options) => {\n const node = (options == null ? void 0 : options.node) || this.editor.state.doc;\n const text = node.textBetween(0, node.content.size, \" \", \" \");\n return this.options.wordCounter(text);\n };\n },\n addProseMirrorPlugins() {\n let initialEvaluationDone = false;\n return [\n new Plugin({\n key: new PluginKey(\"characterCount\"),\n appendTransaction: (transactions, oldState, newState) => {\n if (initialEvaluationDone) {\n return;\n }\n const limit = this.options.limit;\n if (limit === null || limit === void 0 || limit === 0) {\n initialEvaluationDone = true;\n return;\n }\n const initialContentSize = this.storage.characters({ node: newState.doc });\n if (initialContentSize > limit) {\n const over = initialContentSize - limit;\n const from = 0;\n const to = over;\n console.warn(\n `[CharacterCount] Initial content exceeded limit of ${limit} characters. Content was automatically trimmed.`\n );\n const tr = newState.tr.deleteRange(from, to);\n initialEvaluationDone = true;\n return tr;\n }\n initialEvaluationDone = true;\n },\n filterTransaction: (transaction, state) => {\n const limit = this.options.limit;\n if (!transaction.docChanged || limit === 0 || limit === null || limit === void 0) {\n return true;\n }\n const oldSize = this.storage.characters({ node: state.doc });\n const newSize = this.storage.characters({ node: transaction.doc });\n if (newSize <= limit) {\n return true;\n }\n if (oldSize > limit && newSize > limit && newSize <= oldSize) {\n return true;\n }\n if (oldSize > limit && newSize > limit && newSize > oldSize) {\n return false;\n }\n const isPaste = transaction.getMeta(\"paste\");\n if (!isPaste) {\n return false;\n }\n const pos = transaction.selection.$head.pos;\n const over = newSize - limit;\n const from = pos - over;\n const to = pos;\n transaction.deleteRange(from, to);\n const updatedSize = this.storage.characters({ node: transaction.doc });\n if (updatedSize > limit) {\n return false;\n }\n return true;\n }\n })\n ];\n }\n});\n\n// src/drop-cursor/drop-cursor.ts\nimport { Extension as Extension2 } from \"@tiptap/core\";\nimport { dropCursor } from \"@tiptap/pm/dropcursor\";\nvar Dropcursor = Extension2.create({\n name: \"dropCursor\",\n addOptions() {\n return {\n color: \"currentColor\",\n width: 1,\n class: void 0\n };\n },\n addProseMirrorPlugins() {\n return [dropCursor(this.options)];\n }\n});\n\n// src/focus/focus.ts\nimport { Extension as Extension3 } from \"@tiptap/core\";\nimport { Plugin as Plugin2, PluginKey as PluginKey2 } from \"@tiptap/pm/state\";\nimport { Decoration, DecorationSet } from \"@tiptap/pm/view\";\nvar Focus = Extension3.create({\n name: \"focus\",\n addOptions() {\n return {\n className: \"has-focus\",\n mode: \"all\"\n };\n },\n addProseMirrorPlugins() {\n return [\n new Plugin2({\n key: new PluginKey2(\"focus\"),\n props: {\n decorations: ({ doc, selection }) => {\n const { isEditable, isFocused } = this.editor;\n const { anchor } = selection;\n const decorations = [];\n if (!isEditable || !isFocused) {\n return DecorationSet.create(doc, []);\n }\n let maxLevels = 0;\n if (this.options.mode === \"deepest\") {\n doc.descendants((node, pos) => {\n if (node.isText) {\n return;\n }\n const isCurrent = anchor >= pos && anchor <= pos + node.nodeSize - 1;\n if (!isCurrent) {\n return false;\n }\n maxLevels += 1;\n });\n }\n let currentLevel = 0;\n doc.descendants((node, pos) => {\n if (node.isText) {\n return false;\n }\n const isCurrent = anchor >= pos && anchor <= pos + node.nodeSize - 1;\n if (!isCurrent) {\n return false;\n }\n currentLevel += 1;\n const outOfScope = this.options.mode === \"deepest\" && maxLevels - currentLevel > 0 || this.options.mode === \"shallowest\" && currentLevel > 1;\n if (outOfScope) {\n return this.options.mode === \"deepest\";\n }\n decorations.push(\n Decoration.node(pos, pos + node.nodeSize, {\n class: this.options.className\n })\n );\n });\n return DecorationSet.create(doc, decorations);\n }\n }\n })\n ];\n }\n});\n\n// src/gap-cursor/gap-cursor.ts\nimport { callOrReturn, Extension as Extension4, getExtensionField } from \"@tiptap/core\";\nimport { gapCursor } from \"@tiptap/pm/gapcursor\";\nvar Gapcursor = Extension4.create({\n name: \"gapCursor\",\n addProseMirrorPlugins() {\n return [gapCursor()];\n },\n extendNodeSchema(extension) {\n var _a;\n const context = {\n name: extension.name,\n options: extension.options,\n storage: extension.storage\n };\n return {\n allowGapCursor: (_a = callOrReturn(getExtensionField(extension, \"allowGapCursor\", context))) != null ? _a : null\n };\n }\n});\n\n// src/placeholder/placeholder.ts\nimport { Extension as Extension5, isNodeEmpty } from \"@tiptap/core\";\nimport { Plugin as Plugin3, PluginKey as PluginKey3 } from \"@tiptap/pm/state\";\nimport { Decoration as Decoration2, DecorationSet as DecorationSet2 } from \"@tiptap/pm/view\";\nvar DEFAULT_DATA_ATTRIBUTE = \"placeholder\";\nfunction preparePlaceholderAttribute(attr) {\n return attr.replace(/\\s+/g, \"-\").replace(/[^a-zA-Z0-9-]/g, \"\").replace(/^[0-9-]+/, \"\").replace(/^-+/, \"\").toLowerCase();\n}\nvar Placeholder = Extension5.create({\n name: \"placeholder\",\n addOptions() {\n return {\n emptyEditorClass: \"is-editor-empty\",\n emptyNodeClass: \"is-empty\",\n dataAttribute: DEFAULT_DATA_ATTRIBUTE,\n placeholder: \"Write something \\u2026\",\n showOnlyWhenEditable: true,\n showOnlyCurrent: true,\n includeChildren: false\n };\n },\n addProseMirrorPlugins() {\n const dataAttribute = this.options.dataAttribute ? `data-${preparePlaceholderAttribute(this.options.dataAttribute)}` : `data-${DEFAULT_DATA_ATTRIBUTE}`;\n return [\n new Plugin3({\n key: new PluginKey3(\"placeholder\"),\n props: {\n decorations: ({ doc, selection }) => {\n const active = this.editor.isEditable || !this.options.showOnlyWhenEditable;\n const { anchor } = selection;\n const decorations = [];\n if (!active) {\n return null;\n }\n const isEmptyDoc = this.editor.isEmpty;\n doc.descendants((node, pos) => {\n const hasAnchor = anchor >= pos && anchor <= pos + node.nodeSize;\n const isEmpty = !node.isLeaf && isNodeEmpty(node);\n if ((hasAnchor || !this.options.showOnlyCurrent) && isEmpty) {\n const classes = [this.options.emptyNodeClass];\n if (isEmptyDoc) {\n classes.push(this.options.emptyEditorClass);\n }\n const decoration = Decoration2.node(pos, pos + node.nodeSize, {\n class: classes.join(\" \"),\n [dataAttribute]: typeof this.options.placeholder === \"function\" ? this.options.placeholder({\n editor: this.editor,\n node,\n pos,\n hasAnchor\n }) : this.options.placeholder\n });\n decorations.push(decoration);\n }\n return this.options.includeChildren;\n });\n return DecorationSet2.create(doc, decorations);\n }\n }\n })\n ];\n }\n});\n\n// src/selection/selection.ts\nimport { Extension as Extension6, isNodeSelection } from \"@tiptap/core\";\nimport { Plugin as Plugin4, PluginKey as PluginKey4 } from \"@tiptap/pm/state\";\nimport { Decoration as Decoration3, DecorationSet as DecorationSet3 } from \"@tiptap/pm/view\";\nvar Selection = Extension6.create({\n name: \"selection\",\n addOptions() {\n return {\n className: \"selection\"\n };\n },\n addProseMirrorPlugins() {\n const { editor, options } = this;\n return [\n new Plugin4({\n key: new PluginKey4(\"selection\"),\n props: {\n decorations(state) {\n if (state.selection.empty || editor.isFocused || !editor.isEditable || isNodeSelection(state.selection) || editor.view.dragging) {\n return null;\n }\n return DecorationSet3.create(state.doc, [\n Decoration3.inline(state.selection.from, state.selection.to, {\n class: options.className\n })\n ]);\n }\n }\n })\n ];\n }\n});\n\n// src/trailing-node/trailing-node.ts\nimport { Extension as Extension7 } from \"@tiptap/core\";\nimport { Plugin as Plugin5, PluginKey as PluginKey5 } from \"@tiptap/pm/state\";\nfunction nodeEqualsType({ types, node }) {\n return node && Array.isArray(types) && types.includes(node.type) || (node == null ? void 0 : node.type) === types;\n}\nvar TrailingNode = Extension7.create({\n name: \"trailingNode\",\n addOptions() {\n return {\n node: void 0,\n notAfter: []\n };\n },\n addProseMirrorPlugins() {\n var _a;\n const plugin = new PluginKey5(this.name);\n const defaultNode = this.options.node || ((_a = this.editor.schema.topNodeType.contentMatch.defaultType) == null ? void 0 : _a.name) || \"paragraph\";\n const disabledNodes = Object.entries(this.editor.schema.nodes).map(([, value]) => value).filter((node) => (this.options.notAfter || []).concat(defaultNode).includes(node.name));\n return [\n new Plugin5({\n key: plugin,\n appendTransaction: (_, __, state) => {\n const { doc, tr, schema } = state;\n const shouldInsertNodeAtEnd = plugin.getState(state);\n const endPosition = doc.content.size;\n const type = schema.nodes[defaultNode];\n if (!shouldInsertNodeAtEnd) {\n return;\n }\n return tr.insert(endPosition, type.create());\n },\n state: {\n init: (_, state) => {\n const lastNode = state.tr.doc.lastChild;\n return !nodeEqualsType({ node: lastNode, types: disabledNodes });\n },\n apply: (tr, value) => {\n if (!tr.docChanged) {\n return value;\n }\n if (tr.getMeta(\"__uniqueIDTransaction\")) {\n return value;\n }\n const lastNode = tr.doc.lastChild;\n return !nodeEqualsType({ node: lastNode, types: disabledNodes });\n }\n }\n })\n ];\n }\n});\n\n// src/undo-redo/undo-redo.ts\nimport { Extension as Extension8 } from \"@tiptap/core\";\nimport { history, redo, undo } from \"@tiptap/pm/history\";\nvar UndoRedo = Extension8.create({\n name: \"undoRedo\",\n addOptions() {\n return {\n depth: 100,\n newGroupDelay: 500\n };\n },\n addCommands() {\n return {\n undo: () => ({ state, dispatch }) => {\n return undo(state, dispatch);\n },\n redo: () => ({ state, dispatch }) => {\n return redo(state, dispatch);\n }\n };\n },\n addProseMirrorPlugins() {\n return [history(this.options)];\n },\n addKeyboardShortcuts() {\n return {\n \"Mod-z\": () => this.editor.commands.undo(),\n \"Shift-Mod-z\": () => this.editor.commands.redo(),\n \"Mod-y\": () => this.editor.commands.redo(),\n // Russian keyboard layouts\n \"Mod-\\u044F\": () => this.editor.commands.undo(),\n \"Shift-Mod-\\u044F\": () => this.editor.commands.redo()\n };\n }\n});\nexport {\n CharacterCount,\n Dropcursor,\n Focus,\n Gapcursor,\n Placeholder,\n Selection,\n TrailingNode,\n UndoRedo,\n preparePlaceholderAttribute\n};\n//# sourceMappingURL=index.js.map"],"names":["Extension","create","name","addOptions","limit","mode","textCounter","text","length","wordCounter","split","filter","word","addStorage","characters","words","onBeforeCreate","this","storage","options","node","editor","state","doc","textBetween","content","size","nodeSize","addProseMirrorPlugins","initialEvaluationDone","Plugin","key","PluginKey","appendTransaction","transactions","oldState","newState","initialContentSize","from","to","tr","deleteRange","filterTransaction","transaction","docChanged","oldSize","newSize","getMeta","pos","selection","$head"],"mappings":"qvBA2D8BA,EAAUC,OAAqD,CAC3FC,KAAM,iBAENC,WAAAA,KACS,CACLC,MAAO,KACPC,KAAM,WACNC,YAAaC,GAAQA,EAAKC,OAC1BC,YAAaF,GAAQA,EAAKG,MAAM,KAAKC,OAAOC,GAAiB,KAATA,GAAaJ,SAIrEK,WAAAA,KACS,CACLC,WAAYA,IAAM,EAClBC,MAAOA,IAAM,IAIjBC,cAAAA,GACEC,KAAKC,QAAQJ,WAAaK,IACxB,MAAMC,GAAO,MAAAD,OAAA,EAAAA,EAASC,OAAQH,KAAKI,OAAOC,MAAMC,IAGhD,GAAa,eAFA,MAAAJ,OAAA,EAAAA,EAASd,OAAQY,KAAKE,QAAQd,MAElB,CACvB,MAAME,EAAOa,EAAKI,YAAY,EAAGJ,EAAKK,QAAQC,UAAM,EAAW,KAE/D,OAAOT,KAAKE,QAAQb,YAAYC,EAClC,CAEA,OAAOa,EAAKO,UAGdV,KAAKC,QAAQH,MAAQI,IACnB,MAAMC,GAAO,MAAAD,OAAA,EAAAA,EAASC,OAAQH,KAAKI,OAAOC,MAAMC,IAC1ChB,EAAOa,EAAKI,YAAY,EAAGJ,EAAKK,QAAQC,KAAM,IAAK,KAEzD,OAAOT,KAAKE,QAAQV,YAAYF,GAEpC,EAEAqB,qBAAAA,GACE,IAAIC,GAAwB,EAE5B,MAAO,CACL,IAAIC,EAAO,CACTC,IAAK,IAAIC,EAAU,kBACnBC,kBAAmBA,CAACC,EAAcC,EAAUC,KAC1C,GAAIP,EACF,OAGF,MAAMzB,EAAQa,KAAKE,QAAQf,MAE3B,GAAIA,SAAmD,IAAVA,EAE3C,YADAyB,GAAwB,GAI1B,MAAMQ,EAAqBpB,KAAKC,QAAQJ,WAAW,CAAEM,KAAMgB,EAASb,MAEpE,GAAIc,EAAqBjC,EAAO,CAC9B,MACMkC,EAAO,EACPC,EAFOF,EAAqBjC,EAO5BoC,EAAKJ,EAASI,GAAGC,YAAYH,EAAMC,GAGzC,OADAV,GAAwB,EACjBW,CACT,CAEAX,GAAwB,GAE1Ba,kBAAmBA,CAACC,EAAarB,KAC/B,MAAMlB,EAAQa,KAAKE,QAAQf,MAG3B,IAAKuC,EAAYC,YAAwB,IAAVxC,GAA3B,MAA0CA,EAC5C,OAAO,EAGT,MAAMyC,EAAU5B,KAAKC,QAAQJ,WAAW,CAAEM,KAAME,EAAMC,MAChDuB,EAAU7B,KAAKC,QAAQJ,WAAW,CAAEM,KAAMuB,EAAYpB,MAG5D,GAAIuB,GAAW1C,EACb,OAAO,EAIT,GAAIyC,EAAUzC,GAAS0C,EAAU1C,GAAS0C,GAAWD,EACnD,OAAO,EAIT,GAAIA,EAAUzC,GAAS0C,EAAU1C,GAAS0C,EAAUD,EAClD,OAAO,EAMT,IAHgBF,EAAYI,QAAQ,SAIlC,OAAO,EAIT,MAAMC,EAAML,EAAYM,UAAUC,MAAMF,IAElCV,EAAOU,GADAF,EAAU1C,GAEjBmC,EAAKS,EAIXL,EAAYF,YAAYH,EAAMC,GAQ9B,QAFoBtB,KAAKC,QAAQJ,WAAW,CAAEM,KAAMuB,EAAYpB,MAE9CnB,MAQ1B","x_google_ignoreList":[0]}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{Extension as e,callOrReturn as t,getExtensionField as o,isNodeEmpty as r,isNodeSelection as s}from"@tiptap/core";import{Plugin as n,PluginKey as i}from"../../../../../prosemirror-state@1.4.4/node_modules/prosemirror-state/dist/index.mjs";import{dropCursor as d}from"../../../../../prosemirror-dropcursor@1.8.2/node_modules/prosemirror-dropcursor/dist/index.mjs";import{DecorationSet as a,Decoration as c}from"../../../../../prosemirror-view@1.41.7/node_modules/prosemirror-view/dist/index.mjs";import{gapCursor as l}from"../../../../../prosemirror-gapcursor@1.4.1/node_modules/prosemirror-gapcursor/dist/index.mjs";import{history as p,redo as u,undo as h}from"../../../../../prosemirror-history@1.5.0/node_modules/prosemirror-history/dist/index.mjs";e.create({name:"characterCount",addOptions:()=>({limit:null,mode:"textSize",textCounter:e=>e.length,wordCounter:e=>e.split(" ").filter(e=>""!==e).length}),addStorage:()=>({characters:()=>0,words:()=>0}),onBeforeCreate(){this.storage.characters=e=>{const t=(null==e?void 0:e.node)||this.editor.state.doc;if("textSize"===((null==e?void 0:e.mode)||this.options.mode)){const e=t.textBetween(0,t.content.size,void 0," ");return this.options.textCounter(e)}return t.nodeSize},this.storage.words=e=>{const t=(null==e?void 0:e.node)||this.editor.state.doc,o=t.textBetween(0,t.content.size," "," ");return this.options.wordCounter(o)}},addProseMirrorPlugins(){let e=!1;return[new n({key:new i("characterCount"),appendTransaction:(t,o,r)=>{if(e)return;const s=this.options.limit;if(null==s||0===s)return void(e=!0);const n=this.storage.characters({node:r.doc});if(n>s){const t=0,o=n-s,i=r.tr.deleteRange(t,o);return e=!0,i}e=!0},filterTransaction:(e,t)=>{const o=this.options.limit;if(!e.docChanged||0===o||null==o)return!0;const r=this.storage.characters({node:t.doc}),s=this.storage.characters({node:e.doc});if(s<=o)return!0;if(r>o&&s>o&&s<=r)return!0;if(r>o&&s>o&&s>r)return!1;if(!e.getMeta("paste"))return!1;const n=e.selection.$head.pos,i=n-(s-o),d=n;e.deleteRange(i,d);return!(this.storage.characters({node:e.doc})>o)}})]}}),e.create({name:"dropCursor",addOptions:()=>({color:"currentColor",width:1,class:void 0}),addProseMirrorPlugins(){return[d(this.options)]}}),e.create({name:"focus",addOptions:()=>({className:"has-focus",mode:"all"}),addProseMirrorPlugins(){return[new n({key:new i("focus"),props:{decorations:e=>{let{doc:t,selection:o}=e;const{isEditable:r,isFocused:s}=this.editor,{anchor:n}=o,i=[];if(!r||!s)return a.create(t,[]);let d=0;"deepest"===this.options.mode&&t.descendants((e,t)=>{if(e.isText)return;if(!(n>=t&&n<=t+e.nodeSize-1))return!1;d+=1});let l=0;return t.descendants((e,t)=>{if(e.isText)return!1;if(!(n>=t&&n<=t+e.nodeSize-1))return!1;l+=1;if("deepest"===this.options.mode&&d-l>0||"shallowest"===this.options.mode&&l>1)return"deepest"===this.options.mode;i.push(c.node(t,t+e.nodeSize,{class:this.options.className}))}),a.create(t,i)}}})]}}),e.create({name:"gapCursor",addProseMirrorPlugins:()=>[l()],extendNodeSchema(e){var r;const s={name:e.name,options:e.options,storage:e.storage};return{allowGapCursor:null!=(r=t(o(e,"allowGapCursor",s)))?r:null}}});var m="placeholder";function f(e){return e.replace(/\s+/g,"-").replace(/[^a-zA-Z0-9-]/g,"").replace(/^[0-9-]+/,"").replace(/^-+/,"").toLowerCase()}var g=e.create({name:"placeholder",addOptions:()=>({emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",dataAttribute:m,placeholder:"Write something …",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}),addProseMirrorPlugins(){const e=this.options.dataAttribute?`data-${f(this.options.dataAttribute)}`:`data-${m}`;return[new n({key:new i("placeholder"),props:{decorations:t=>{let{doc:o,selection:s}=t;const n=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:i}=s,d=[];if(!n)return null;const l=this.editor.isEmpty;return o.descendants((t,o)=>{const s=i>=o&&i<=o+t.nodeSize,n=!t.isLeaf&&r(t);if(!t.type.isTextblock)return this.options.includeChildren;if((s||!this.options.showOnlyCurrent)&&n){const r=[this.options.emptyNodeClass];l&&r.push(this.options.emptyEditorClass);const n=c.node(o,o+t.nodeSize,{class:r.join(" "),[e]:"function"==typeof this.options.placeholder?this.options.placeholder({editor:this.editor,node:t,pos:o,hasAnchor:s}):this.options.placeholder});d.push(n)}return this.options.includeChildren}),a.create(o,d)}}})]}});e.create({name:"selection",addOptions:()=>({className:"selection"}),addProseMirrorPlugins(){const{editor:e,options:t}=this;return[new n({key:new i("selection"),props:{decorations:o=>o.selection.empty||e.isFocused||!e.isEditable||s(o.selection)||e.view.dragging?null:a.create(o.doc,[c.inline(o.selection.from,o.selection.to,{class:t.className})])}})]}});var y="skipTrailingNode";function w(e){let{types:t,node:o}=e;return o&&Array.isArray(t)&&t.includes(o.type)||(null==o?void 0:o.type)===t}e.create({name:"trailingNode",addOptions:()=>({node:void 0,notAfter:[]}),addProseMirrorPlugins(){var e;const t=new i(this.name),o=this.options.node||(null==(e=this.editor.schema.topNodeType.contentMatch.defaultType)?void 0:e.name)||"paragraph",r=Object.entries(this.editor.schema.nodes).map(e=>{let[,t]=e;return t}).filter(e=>(this.options.notAfter||[]).concat(o).includes(e.name));return[new n({key:t,appendTransaction:(e,r,s)=>{const{doc:n,tr:i,schema:d}=s,a=t.getState(s),c=n.content.size,l=d.nodes[o];if(!e.some(e=>e.getMeta(y))&&a)return i.insert(c,l.create())},state:{init:(e,t)=>!w({node:t.tr.doc.lastChild,types:r}),apply:(e,t)=>{if(!e.docChanged)return t;if(e.getMeta("__uniqueIDTransaction"))return t;return!w({node:e.doc.lastChild,types:r})}}})]}}),e.create({name:"undoRedo",addOptions:()=>({depth:100,newGroupDelay:500}),addCommands:()=>({undo:()=>e=>{let{state:t,dispatch:o}=e;return h(t,o)},redo:()=>e=>{let{state:t,dispatch:o}=e;return u(t,o)}}),addProseMirrorPlugins(){return[p(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-я":()=>this.editor.commands.undo(),"Shift-Mod-я":()=>this.editor.commands.redo()}}});export{g as Placeholder,f as preparePlaceholderAttribute,y as skipTrailingNodeMeta};
|
|
2
|
-
//# sourceMappingURL=index.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../../../../../../../../../node_modules/.pnpm/@tiptap+extensions@3.20.5_@tiptap+core@3.20.5_@tiptap+pm@3.20.5__@tiptap+pm@3.20.5/node_modules/@tiptap/extensions/dist/index.js"],"sourcesContent":["// src/character-count/character-count.ts\nimport { Extension } from \"@tiptap/core\";\nimport { Plugin, PluginKey } from \"@tiptap/pm/state\";\nvar CharacterCount = Extension.create({\n name: \"characterCount\",\n addOptions() {\n return {\n limit: null,\n mode: \"textSize\",\n textCounter: (text) => text.length,\n wordCounter: (text) => text.split(\" \").filter((word) => word !== \"\").length\n };\n },\n addStorage() {\n return {\n characters: () => 0,\n words: () => 0\n };\n },\n onBeforeCreate() {\n this.storage.characters = (options) => {\n const node = (options == null ? void 0 : options.node) || this.editor.state.doc;\n const mode = (options == null ? void 0 : options.mode) || this.options.mode;\n if (mode === \"textSize\") {\n const text = node.textBetween(0, node.content.size, void 0, \" \");\n return this.options.textCounter(text);\n }\n return node.nodeSize;\n };\n this.storage.words = (options) => {\n const node = (options == null ? void 0 : options.node) || this.editor.state.doc;\n const text = node.textBetween(0, node.content.size, \" \", \" \");\n return this.options.wordCounter(text);\n };\n },\n addProseMirrorPlugins() {\n let initialEvaluationDone = false;\n return [\n new Plugin({\n key: new PluginKey(\"characterCount\"),\n appendTransaction: (transactions, oldState, newState) => {\n if (initialEvaluationDone) {\n return;\n }\n const limit = this.options.limit;\n if (limit === null || limit === void 0 || limit === 0) {\n initialEvaluationDone = true;\n return;\n }\n const initialContentSize = this.storage.characters({ node: newState.doc });\n if (initialContentSize > limit) {\n const over = initialContentSize - limit;\n const from = 0;\n const to = over;\n console.warn(\n `[CharacterCount] Initial content exceeded limit of ${limit} characters. Content was automatically trimmed.`\n );\n const tr = newState.tr.deleteRange(from, to);\n initialEvaluationDone = true;\n return tr;\n }\n initialEvaluationDone = true;\n },\n filterTransaction: (transaction, state) => {\n const limit = this.options.limit;\n if (!transaction.docChanged || limit === 0 || limit === null || limit === void 0) {\n return true;\n }\n const oldSize = this.storage.characters({ node: state.doc });\n const newSize = this.storage.characters({ node: transaction.doc });\n if (newSize <= limit) {\n return true;\n }\n if (oldSize > limit && newSize > limit && newSize <= oldSize) {\n return true;\n }\n if (oldSize > limit && newSize > limit && newSize > oldSize) {\n return false;\n }\n const isPaste = transaction.getMeta(\"paste\");\n if (!isPaste) {\n return false;\n }\n const pos = transaction.selection.$head.pos;\n const over = newSize - limit;\n const from = pos - over;\n const to = pos;\n transaction.deleteRange(from, to);\n const updatedSize = this.storage.characters({ node: transaction.doc });\n if (updatedSize > limit) {\n return false;\n }\n return true;\n }\n })\n ];\n }\n});\n\n// src/drop-cursor/drop-cursor.ts\nimport { Extension as Extension2 } from \"@tiptap/core\";\nimport { dropCursor } from \"@tiptap/pm/dropcursor\";\nvar Dropcursor = Extension2.create({\n name: \"dropCursor\",\n addOptions() {\n return {\n color: \"currentColor\",\n width: 1,\n class: void 0\n };\n },\n addProseMirrorPlugins() {\n return [dropCursor(this.options)];\n }\n});\n\n// src/focus/focus.ts\nimport { Extension as Extension3 } from \"@tiptap/core\";\nimport { Plugin as Plugin2, PluginKey as PluginKey2 } from \"@tiptap/pm/state\";\nimport { Decoration, DecorationSet } from \"@tiptap/pm/view\";\nvar Focus = Extension3.create({\n name: \"focus\",\n addOptions() {\n return {\n className: \"has-focus\",\n mode: \"all\"\n };\n },\n addProseMirrorPlugins() {\n return [\n new Plugin2({\n key: new PluginKey2(\"focus\"),\n props: {\n decorations: ({ doc, selection }) => {\n const { isEditable, isFocused } = this.editor;\n const { anchor } = selection;\n const decorations = [];\n if (!isEditable || !isFocused) {\n return DecorationSet.create(doc, []);\n }\n let maxLevels = 0;\n if (this.options.mode === \"deepest\") {\n doc.descendants((node, pos) => {\n if (node.isText) {\n return;\n }\n const isCurrent = anchor >= pos && anchor <= pos + node.nodeSize - 1;\n if (!isCurrent) {\n return false;\n }\n maxLevels += 1;\n });\n }\n let currentLevel = 0;\n doc.descendants((node, pos) => {\n if (node.isText) {\n return false;\n }\n const isCurrent = anchor >= pos && anchor <= pos + node.nodeSize - 1;\n if (!isCurrent) {\n return false;\n }\n currentLevel += 1;\n const outOfScope = this.options.mode === \"deepest\" && maxLevels - currentLevel > 0 || this.options.mode === \"shallowest\" && currentLevel > 1;\n if (outOfScope) {\n return this.options.mode === \"deepest\";\n }\n decorations.push(\n Decoration.node(pos, pos + node.nodeSize, {\n class: this.options.className\n })\n );\n });\n return DecorationSet.create(doc, decorations);\n }\n }\n })\n ];\n }\n});\n\n// src/gap-cursor/gap-cursor.ts\nimport { callOrReturn, Extension as Extension4, getExtensionField } from \"@tiptap/core\";\nimport { gapCursor } from \"@tiptap/pm/gapcursor\";\nvar Gapcursor = Extension4.create({\n name: \"gapCursor\",\n addProseMirrorPlugins() {\n return [gapCursor()];\n },\n extendNodeSchema(extension) {\n var _a;\n const context = {\n name: extension.name,\n options: extension.options,\n storage: extension.storage\n };\n return {\n allowGapCursor: (_a = callOrReturn(getExtensionField(extension, \"allowGapCursor\", context))) != null ? _a : null\n };\n }\n});\n\n// src/placeholder/placeholder.ts\nimport { Extension as Extension5, isNodeEmpty } from \"@tiptap/core\";\nimport { Plugin as Plugin3, PluginKey as PluginKey3 } from \"@tiptap/pm/state\";\nimport { Decoration as Decoration2, DecorationSet as DecorationSet2 } from \"@tiptap/pm/view\";\nvar DEFAULT_DATA_ATTRIBUTE = \"placeholder\";\nfunction preparePlaceholderAttribute(attr) {\n return attr.replace(/\\s+/g, \"-\").replace(/[^a-zA-Z0-9-]/g, \"\").replace(/^[0-9-]+/, \"\").replace(/^-+/, \"\").toLowerCase();\n}\nvar Placeholder = Extension5.create({\n name: \"placeholder\",\n addOptions() {\n return {\n emptyEditorClass: \"is-editor-empty\",\n emptyNodeClass: \"is-empty\",\n dataAttribute: DEFAULT_DATA_ATTRIBUTE,\n placeholder: \"Write something \\u2026\",\n showOnlyWhenEditable: true,\n showOnlyCurrent: true,\n includeChildren: false\n };\n },\n addProseMirrorPlugins() {\n const dataAttribute = this.options.dataAttribute ? `data-${preparePlaceholderAttribute(this.options.dataAttribute)}` : `data-${DEFAULT_DATA_ATTRIBUTE}`;\n return [\n new Plugin3({\n key: new PluginKey3(\"placeholder\"),\n props: {\n decorations: ({ doc, selection }) => {\n const active = this.editor.isEditable || !this.options.showOnlyWhenEditable;\n const { anchor } = selection;\n const decorations = [];\n if (!active) {\n return null;\n }\n const isEmptyDoc = this.editor.isEmpty;\n doc.descendants((node, pos) => {\n const hasAnchor = anchor >= pos && anchor <= pos + node.nodeSize;\n const isEmpty = !node.isLeaf && isNodeEmpty(node);\n if (!node.type.isTextblock) {\n return this.options.includeChildren;\n }\n if ((hasAnchor || !this.options.showOnlyCurrent) && isEmpty) {\n const classes = [this.options.emptyNodeClass];\n if (isEmptyDoc) {\n classes.push(this.options.emptyEditorClass);\n }\n const decoration = Decoration2.node(pos, pos + node.nodeSize, {\n class: classes.join(\" \"),\n [dataAttribute]: typeof this.options.placeholder === \"function\" ? this.options.placeholder({\n editor: this.editor,\n node,\n pos,\n hasAnchor\n }) : this.options.placeholder\n });\n decorations.push(decoration);\n }\n return this.options.includeChildren;\n });\n return DecorationSet2.create(doc, decorations);\n }\n }\n })\n ];\n }\n});\n\n// src/selection/selection.ts\nimport { Extension as Extension6, isNodeSelection } from \"@tiptap/core\";\nimport { Plugin as Plugin4, PluginKey as PluginKey4 } from \"@tiptap/pm/state\";\nimport { Decoration as Decoration3, DecorationSet as DecorationSet3 } from \"@tiptap/pm/view\";\nvar Selection = Extension6.create({\n name: \"selection\",\n addOptions() {\n return {\n className: \"selection\"\n };\n },\n addProseMirrorPlugins() {\n const { editor, options } = this;\n return [\n new Plugin4({\n key: new PluginKey4(\"selection\"),\n props: {\n decorations(state) {\n if (state.selection.empty || editor.isFocused || !editor.isEditable || isNodeSelection(state.selection) || editor.view.dragging) {\n return null;\n }\n return DecorationSet3.create(state.doc, [\n Decoration3.inline(state.selection.from, state.selection.to, {\n class: options.className\n })\n ]);\n }\n }\n })\n ];\n }\n});\n\n// src/trailing-node/trailing-node.ts\nimport { Extension as Extension7 } from \"@tiptap/core\";\nimport { Plugin as Plugin5, PluginKey as PluginKey5 } from \"@tiptap/pm/state\";\nvar skipTrailingNodeMeta = \"skipTrailingNode\";\nfunction nodeEqualsType({ types, node }) {\n return node && Array.isArray(types) && types.includes(node.type) || (node == null ? void 0 : node.type) === types;\n}\nvar TrailingNode = Extension7.create({\n name: \"trailingNode\",\n addOptions() {\n return {\n node: void 0,\n notAfter: []\n };\n },\n addProseMirrorPlugins() {\n var _a;\n const plugin = new PluginKey5(this.name);\n const defaultNode = this.options.node || ((_a = this.editor.schema.topNodeType.contentMatch.defaultType) == null ? void 0 : _a.name) || \"paragraph\";\n const disabledNodes = Object.entries(this.editor.schema.nodes).map(([, value]) => value).filter((node) => (this.options.notAfter || []).concat(defaultNode).includes(node.name));\n return [\n new Plugin5({\n key: plugin,\n appendTransaction: (transactions, __, state) => {\n const { doc, tr, schema } = state;\n const shouldInsertNodeAtEnd = plugin.getState(state);\n const endPosition = doc.content.size;\n const type = schema.nodes[defaultNode];\n if (transactions.some((transaction) => transaction.getMeta(skipTrailingNodeMeta))) {\n return;\n }\n if (!shouldInsertNodeAtEnd) {\n return;\n }\n return tr.insert(endPosition, type.create());\n },\n state: {\n init: (_, state) => {\n const lastNode = state.tr.doc.lastChild;\n return !nodeEqualsType({ node: lastNode, types: disabledNodes });\n },\n apply: (tr, value) => {\n if (!tr.docChanged) {\n return value;\n }\n if (tr.getMeta(\"__uniqueIDTransaction\")) {\n return value;\n }\n const lastNode = tr.doc.lastChild;\n return !nodeEqualsType({ node: lastNode, types: disabledNodes });\n }\n }\n })\n ];\n }\n});\n\n// src/undo-redo/undo-redo.ts\nimport { Extension as Extension8 } from \"@tiptap/core\";\nimport { history, redo, undo } from \"@tiptap/pm/history\";\nvar UndoRedo = Extension8.create({\n name: \"undoRedo\",\n addOptions() {\n return {\n depth: 100,\n newGroupDelay: 500\n };\n },\n addCommands() {\n return {\n undo: () => ({ state, dispatch }) => {\n return undo(state, dispatch);\n },\n redo: () => ({ state, dispatch }) => {\n return redo(state, dispatch);\n }\n };\n },\n addProseMirrorPlugins() {\n return [history(this.options)];\n },\n addKeyboardShortcuts() {\n return {\n \"Mod-z\": () => this.editor.commands.undo(),\n \"Shift-Mod-z\": () => this.editor.commands.redo(),\n \"Mod-y\": () => this.editor.commands.redo(),\n // Russian keyboard layouts\n \"Mod-\\u044F\": () => this.editor.commands.undo(),\n \"Shift-Mod-\\u044F\": () => this.editor.commands.redo()\n };\n }\n});\nexport {\n CharacterCount,\n Dropcursor,\n Focus,\n Gapcursor,\n Placeholder,\n Selection,\n TrailingNode,\n UndoRedo,\n preparePlaceholderAttribute,\n skipTrailingNodeMeta\n};\n//# sourceMappingURL=index.js.map"],"names":["Extension","create","name","addOptions","limit","mode","textCounter","text","length","wordCounter","split","filter","word","addStorage","characters","words","onBeforeCreate","this","storage","options","node","editor","state","doc","textBetween","content","size","nodeSize","addProseMirrorPlugins","initialEvaluationDone","Plugin","key","PluginKey","appendTransaction","transactions","oldState","newState","initialContentSize","from","to","tr","deleteRange","filterTransaction","transaction","docChanged","oldSize","newSize","getMeta","pos","selection","$head"],"mappings":"qvBA2D8BA,EAAUC,OAAqD,CAC3FC,KAAM,iBAENC,WAAAA,KACS,CACLC,MAAO,KACPC,KAAM,WACNC,YAAaC,GAAQA,EAAKC,OAC1BC,YAAaF,GAAQA,EAAKG,MAAM,KAAKC,OAAOC,GAAiB,KAATA,GAAaJ,SAIrEK,WAAAA,KACS,CACLC,WAAYA,IAAM,EAClBC,MAAOA,IAAM,IAIjBC,cAAAA,GACEC,KAAKC,QAAQJ,WAAaK,IACxB,MAAMC,GAAO,MAAAD,OAAA,EAAAA,EAASC,OAAQH,KAAKI,OAAOC,MAAMC,IAGhD,GAAa,eAFA,MAAAJ,OAAA,EAAAA,EAASd,OAAQY,KAAKE,QAAQd,MAElB,CACvB,MAAME,EAAOa,EAAKI,YAAY,EAAGJ,EAAKK,QAAQC,U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EAIT,MAAMC,EAAML,EAAYM,UAAUC,MAAMF,IAElCV,EAAOU,GADAF,EAAU1C,GAEjBmC,EAAKS,EAIXL,EAAYF,YAAYH,EAAMC,GAQ9B,QAFoBtB,KAAKC,QAAQJ,WAAW,CAAEM,KAAMuB,EAAYpB,MAE9CnB,MAQ1B","x_google_ignoreList":[0]}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import{_$LH as e}from"./lit-html.mjs";
|
|
2
|
-
/**
|
|
3
|
-
* @license
|
|
4
|
-
* Copyright 2020 Google LLC
|
|
5
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
6
|
-
*/const{I:t}=e,o=e=>e,n=()=>document.createComment(""),i=(e,i,r)=>{const A=e._$AA.parentNode,s=void 0===i?e._$AB:i._$AA;if(void 0===r){const o=A.insertBefore(n(),s),i=A.insertBefore(n(),s);r=new t(o,i,e,e.options)}else{const t=r._$AB.nextSibling,n=r._$AM,i=n!==e;if(i){let t;r._$AQ?.(e),r._$AM=e,void 0!==r._$AP&&(t=e._$AU)!==n._$AU&&r._$AP(t)}if(t!==s||i){let e=r._$AA;for(;e!==t;){const t=o(e).nextSibling;o(A).insertBefore(e,s),e=t}}}return r},r=function(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e;return e._$AI(t,o),e},A={},s=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:A;return e._$AH=t},$=e=>e._$AH,_=e=>{e._$AR(),e._$AA.remove()};export{$ as getCommittedValue,i as insertPart,_ as removePart,r as setChildPartValue,s as setCommittedValue};
|
|
7
|
-
//# sourceMappingURL=directive-helpers.mjs.map
|
package/es/node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/directive-helpers.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"directive-helpers.mjs","sources":["../../../../../../../../node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/directive-helpers.js"],"sourcesContent":["import{_$LH as o}from\"./lit-html.js\";\n/**\n * @license\n * Copyright 2020 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const{I:t}=o,i=o=>o,n=o=>null===o||\"object\"!=typeof o&&\"function\"!=typeof o,e={HTML:1,SVG:2,MATHML:3},l=(o,t)=>void 0===t?void 0!==o?._$litType$:o?._$litType$===t,d=o=>null!=o?._$litType$?.h,c=o=>void 0!==o?._$litDirective$,f=o=>o?._$litDirective$,r=o=>void 0===o.strings,s=()=>document.createComment(\"\"),v=(o,n,e)=>{const l=o._$AA.parentNode,d=void 0===n?o._$AB:n._$AA;if(void 0===e){const i=l.insertBefore(s(),d),n=l.insertBefore(s(),d);e=new t(i,n,o,o.options)}else{const t=e._$AB.nextSibling,n=e._$AM,c=n!==o;if(c){let t;e._$AQ?.(o),e._$AM=o,void 0!==e._$AP&&(t=o._$AU)!==n._$AU&&e._$AP(t)}if(t!==d||c){let o=e._$AA;for(;o!==t;){const t=i(o).nextSibling;i(l).insertBefore(o,d),o=t}}}return e},u=(o,t,i=o)=>(o._$AI(t,i),o),m={},p=(o,t=m)=>o._$AH=t,M=o=>o._$AH,h=o=>{o._$AR(),o._$AA.remove()},j=o=>{o._$AR()};export{e as TemplateResultType,j as clearPart,M as getCommittedValue,f as getDirectiveClass,v as insertPart,d as isCompiledTemplateResult,c as isDirectiveResult,n as isPrimitive,r as isSingleExpression,l as isTemplateResult,h as removePart,u as setChildPartValue,p as setCommittedValue};\n//# sourceMappingURL=directive-helpers.js.map\n"],"names":["I","t","o","i","s","createMarker","document","createComment","v","insertPart","n","e","l","_$AA","parentNode","d","_$AB","insertBefore","options","nextSibling","_$AM","c","_$AQ","_$AP","_$AU","u","arguments","length","undefined","_$AI","m","p","_$AH","M","h","_$AR","remove"],"mappings":";;;;;GAsBA,MAAOA,EAAYC,GAAaC,EAM1BC,EAKCD,GAAeA,EAyEhBE,EAAeC,IAAMC,SAASC,cAAc,IAcrCC,EAAaC,CACxBP,EACAQ,EACAC,KAEA,MAAMC,EAAiBV,E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-Identifier: BSD-3-Clause
|
|
5
|
-
*/
|
|
6
|
-
const t={CHILD:2},r=t=>function(){for(var r=arguments.length,e=new Array(r),i=0;i<r;i++)e[i]=arguments[i];return{_$litDirective$:t,values:e}};class e{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,r,e){this._$Ct=t,this._$AM=r,this._$Ci=e}_$AS(t,r){return this.update(t,r)}update(t,r){return this.render(...r)}}export{e as Directive,t as PartType,r as directive};
|
|
7
|
-
//# sourceMappingURL=directive.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"directive.mjs","sources":["../../../../../../../../node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/directive.js"],"sourcesContent":["/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst t={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},e=t=>(...e)=>({_$litDirective$:t,values:e});class i{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}export{i as Directive,t as PartType,e as directive};\n//# sourceMappingURL=directive.js.map\n"],"names":["t","CHILD","e","_len","arguments","length","Array","_key","_$litDirective$","values","i","constructor","_$AU","this","_$AM","_$AT","_$Ct","_$Ci","_$AS","update","render"],"mappings":";;;;;AA0CO,MAAMA,EAAW,CAEtBC,MAAO,GAwCIC,EACgBF,GAC3B,WAAA,IAAA,IAAAG,EAAAC,UAAAC,OAAIH,EAAA,IAAAI,MAAAH,GAAAI,EAAA,EAAAA,EAAAJ,EAAAI,IAAAL,EAAAK,GAAAH,UAAAG,GAAA,MAA4C,CAE9CC,gBAAqBR,EACrBS,OAAAP,EAAA,EAAA,MAQkBQ,EAkBpBC,WAAAA,CAAYX,GAAsB,CAGlC,QAAAY,GACE,OAAOC,KAAKC,KAASF,IACvB,CAGAG,IAAAA,CACEf,EACAE,EACAQ,GAEAG,KAAKG,KAAShB,EACda,KAAKC,KAAWZ,EAChBW,KAAKI,KAAmBP,CAC1B,CAEAQ,IAAAA,CAAUlB,EAAYE,GACpB,OAAOW,KAAKM,OAAOnB,EAAME,EAC3B,CAIAiB,MAAAA,CAAOnB,EAAaE,GAClB,OAAOW,KAAKO,UAAUlB,EACxB","x_google_ignoreList":[0]}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import{noChange as e}from"../lit-html.mjs";import{directive as t,Directive as s,PartType as r}from"../directive.mjs";import{getCommittedValue as l,setChildPartValue as i,insertPart as o,removePart as n,setCommittedValue as a}from"../directive-helpers.mjs";
|
|
2
|
-
/**
|
|
3
|
-
* @license
|
|
4
|
-
* Copyright 2017 Google LLC
|
|
5
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
6
|
-
*/const u=(e,t,s)=>{const r=new Map;for(let l=t;l<=s;l++)r.set(e[l],l);return r},f=t(class extends s{constructor(e){if(super(e),e.type!==r.CHILD)throw Error("repeat() can only be used in text expressions")}dt(e,t,s){let r;void 0===s?s=t:void 0!==t&&(r=t);const l=[],i=[];let o=0;for(const t of e)l[o]=r?r(t,o):o,i[o]=s(t,o),o++;return{values:i,keys:l}}render(e,t,s){return this.dt(e,t,s).values}update(t,s){let[r,f,c]=s;const d=l(t),{values:m,keys:h}=this.dt(r,f,c);if(!Array.isArray(d))return this.ut=h,m;const p=this.ut??=[],v=[];let y,g,C=0,x=d.length-1,P=0,j=m.length-1;for(;C<=x&&P<=j;)if(null===d[C])C++;else if(null===d[x])x--;else if(p[C]===h[P])v[P]=i(d[C],m[P]),C++,P++;else if(p[x]===h[j])v[j]=i(d[x],m[j]),x--,j--;else if(p[C]===h[j])v[j]=i(d[C],m[j]),o(t,v[j+1],d[C]),C++,j--;else if(p[x]===h[P])v[P]=i(d[x],m[P]),o(t,d[C],d[x]),x--,P++;else if(void 0===y&&(y=u(h,P,j),g=u(p,C,x)),y.has(p[C]))if(y.has(p[x])){const e=g.get(h[P]),s=void 0!==e?d[e]:null;if(null===s){const e=o(t,d[C]);i(e,m[P]),v[P]=e}else v[P]=i(s,m[P]),o(t,d[C],s),d[e]=null;P++}else n(d[x]),x--;else n(d[C]),C++;for(;P<=j;){const e=o(t,v[j+1]);i(e,m[P]),v[P++]=e}for(;C<=x;){const e=d[C++];null!==e&&n(e)}return this.ut=h,a(t,v),e}});export{f as repeat};
|
|
7
|
-
//# sourceMappingURL=repeat.mjs.map
|
package/es/node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/directives/repeat.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"repeat.mjs","sources":["../../../../../../../../../node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/directives/repeat.js"],"sourcesContent":["import{noChange as e}from\"../lit-html.js\";import{directive as s,Directive as t,PartType as r}from\"../directive.js\";import{getCommittedValue as l,setChildPartValue as o,insertPart as i,removePart as n,setCommittedValue as f}from\"../directive-helpers.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst u=(e,s,t)=>{const r=new Map;for(let l=s;l<=t;l++)r.set(e[l],l);return r},c=s(class extends t{constructor(e){if(super(e),e.type!==r.CHILD)throw Error(\"repeat() can only be used in text expressions\")}dt(e,s,t){let r;void 0===t?t=s:void 0!==s&&(r=s);const l=[],o=[];let i=0;for(const s of e)l[i]=r?r(s,i):i,o[i]=t(s,i),i++;return{values:o,keys:l}}render(e,s,t){return this.dt(e,s,t).values}update(s,[t,r,c]){const d=l(s),{values:p,keys:a}=this.dt(t,r,c);if(!Array.isArray(d))return this.ut=a,p;const h=this.ut??=[],v=[];let m,y,x=0,j=d.length-1,k=0,w=p.length-1;for(;x<=j&&k<=w;)if(null===d[x])x++;else if(null===d[j])j--;else if(h[x]===a[k])v[k]=o(d[x],p[k]),x++,k++;else if(h[j]===a[w])v[w]=o(d[j],p[w]),j--,w--;else if(h[x]===a[w])v[w]=o(d[x],p[w]),i(s,v[w+1],d[x]),x++,w--;else if(h[j]===a[k])v[k]=o(d[j],p[k]),i(s,d[x],d[j]),j--,k++;else if(void 0===m&&(m=u(a,k,w),y=u(h,x,j)),m.has(h[x]))if(m.has(h[j])){const e=y.get(a[k]),t=void 0!==e?d[e]:null;if(null===t){const e=i(s,d[x]);o(e,p[k]),v[k]=e}else v[k]=o(t,p[k]),i(s,d[x],t),d[e]=null;k++}else n(d[j]),j--;else n(d[x]),x++;for(;k<=w;){const e=i(s,v[w+1]);o(e,p[k]),v[k++]=e}for(;x<=j;){const e=d[x++];null!==e&&n(e)}return this.ut=a,f(s,v),e}});export{c as repeat};\n//# sourceMappingURL=repeat.js.map\n"],"names":["u","generateMap","e","s","t","r","Map","l","set","c","constructor","super","type","CHILD","Error","dt","o","i","values","keys","render","this","update","_ref","d","p","a","Array","isArray","ut","h","v","m","y","x","j","length","k","w","has","get","n","f"],"mappings":";;;;;GAsBA,MAAMA,EAAcC,CAACC,EAAiBC,EAAeC,KACnD,MAAMC,EAAM,IAAIC,IAChB,IAAK,IAAIC,EAAIJ,EAAOI,GAAKH,EAAKG,IAC5BF,EAAIG,IAAIN,EAAKK,GAAIA,GAEnB,OAAOF,GAqcII,EAASN,EAlctB,cAA8BC,EAG5BM,WAAAA,CAAYR,GAEV,GADAS,MAAMT,GACFA,EAASU,OAASP,EAASQ,MAC7B,MAAUC,MAAM,gDAEpB,CAEQC,EAAAA,CACNb,EACAC,EACAC,GAEA,IAAIC,OAAA,IACAD,EACFA,EAAWD,OAAA,IACFA,IACTE,EAAQF,GAEV,MAAMI,EAAO,GACPS,EAAS,GACf,IAAIC,EAAQ,EACZ,IAAK,MAAMd,KAAQD,EACjBK,EAAKU,GAASZ,EAAQA,EAAMF,EAAMc,GAASA,EAC3CD,EAAOC,GAASb,EAAUD,EAAMc,GAChCA,IAEF,MAAO,CACLC,OAAAF,EACAG,KAAAZ,EAEJ,CAQAa,MAAA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W+B,EAAiBO,IAAId,EAAQW,IACxCjC,WAAUF,EAAyBsB,EAAStB,GAAY,KAC9D,GAAgB,OAAZE,EAAkB,CAGpB,MAAMF,EAAUe,EAAWd,EAAeqB,EAASU,IACnDlB,EAAkBd,EAASuB,EAAUY,IACrCN,EAASM,GAAWnC,CACtB,MAEE6B,EAASM,GAAWrB,EAAkBZ,EAASqB,EAAUY,IACzDpB,EAAWd,EAAeqB,EAASU,GAAW9B,GAG9CoB,EAAStB,GAAsB,KAEjCmC,GACF,MAvBEI,EAAWjB,EAASW,IACpBA,SALAM,EAAWjB,EAASU,IACpBA,IA8BN,KAAOG,GAAWC,GAAS,CAGzB,MAAMpC,EAAUe,EAAWd,EAAe4B,EAASO,EAAU,IAC7DtB,EAAkBd,EAASuB,EAAUY,IACrCN,EAASM,KAAanC,CACxB,CAEA,KAAOgC,GAAWC,GAAS,CACzB,MAAMjC,EAAUsB,EAASU,KACT,OAAZhC,GACFuC,EAAWvC,EAEf,CAMA,OAHAmB,KAAKQ,GAAYH,EAEjBgB,EAAkBvC,EAAe4B,GAC1B7B,CACT","x_google_ignoreList":[0]}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2017 Google LLC
|
|
4
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
-
*/
|
|
6
|
-
const t=globalThis,e=t=>t,i=t.trustedTypes,s=i?i.createPolicy("lit-html",{createHTML:t=>t}):void 0,n="$lit$",o=`lit$${Math.random().toFixed(9).slice(2)}$`,h="?"+o,r=`<${h}>`,l=document,$=()=>l.createComment(""),A=t=>null===t||"object"!=typeof t&&"function"!=typeof t,_=Array.isArray,a="[ \t\n\f\r]",c=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,d=/-->/g,p=/>/g,g=RegExp(`>|${a}(?:([^\\s"'>=/]+)(${a}*=${a}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),u=/'/g,v=/"/g,m=/^(?:script|style|textarea|title)$/i,f=Symbol.for("lit-noChange"),y=Symbol.for("lit-nothing"),H=new WeakMap,x=l.createTreeWalker(l,129);function N(t,e){if(!_(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==s?s.createHTML(e):e}const b=(t,e)=>{const i=t.length-1,s=[];let h,l=2===e?"<svg>":3===e?"<math>":"",$=c;for(let e=0;e<i;e++){const i=t[e];let A,_,a=-1,f=0;for(;f<i.length&&($.lastIndex=f,_=$.exec(i),null!==_);)f=$.lastIndex,$===c?"!--"===_[1]?$=d:void 0!==_[1]?$=p:void 0!==_[2]?(m.test(_[2])&&(h=RegExp("</"+_[2],"g")),$=g):void 0!==_[3]&&($=g):$===g?">"===_[0]?($=h??c,a=-1):void 0===_[1]?a=-2:(a=$.lastIndex-_[2].length,A=_[1],$=void 0===_[3]?g:'"'===_[3]?v:u):$===v||$===u?$=g:$===d||$===p?$=c:($=g,h=void 0);const y=$===g&&t[e+1].startsWith("/>")?" ":"";l+=$===c?i+r:a>=0?(s.push(A),i.slice(0,a)+n+i.slice(a)+o+y):i+o+(-2===a?e:y)}return[N(t,l+(t[i]||"<?>")+(2===e?"</svg>":3===e?"</math>":"")),s]};class T{constructor(t,e){let s,{strings:r,_$litType$:l}=t;this.parts=[];let A=0,_=0;const a=r.length-1,c=this.parts,[d,p]=b(r,l);if(this.el=T.createElement(d,e),x.currentNode=this.el.content,2===l||3===l){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(s=x.nextNode())&&c.length<a;){if(1===s.nodeType){if(s.hasAttributes())for(const t of s.getAttributeNames())if(t.endsWith(n)){const e=p[_++],i=s.getAttribute(t).split(o),n=/([.?@])?(.*)/.exec(e);c.push({type:1,index:A,name:n[2],strings:i,ctor:"."===n[1]?E:"?"===n[1]?I:"@"===n[1]?U:w}),s.removeAttribute(t)}else t.startsWith(o)&&(c.push({type:6,index:A}),s.removeAttribute(t));if(m.test(s.tagName)){const t=s.textContent.split(o),e=t.length-1;if(e>0){s.textContent=i?i.emptyScript:"";for(let i=0;i<e;i++)s.append(t[i],$()),x.nextNode(),c.push({type:2,index:++A});s.append(t[e],$())}}}else if(8===s.nodeType)if(s.data===h)c.push({type:2,index:A});else{let t=-1;for(;-1!==(t=s.data.indexOf(o,t+1));)c.push({type:7,index:A}),t+=o.length-1}A++}}static createElement(t,e){const i=l.createElement("template");return i.innerHTML=t,i}}function C(t,e){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t,s=arguments.length>3?arguments[3]:void 0;if(e===f)return e;let n=void 0!==s?i._$Co?.[s]:i._$Cl;const o=A(e)?void 0:e._$litDirective$;return n?.constructor!==o&&(n?._$AO?.(!1),void 0===o?n=void 0:(n=new o(t),n._$AT(t,i,s)),void 0!==s?(i._$Co??=[])[s]=n:i._$Cl=n),void 0!==n&&(e=C(t,n._$AS(t,e.values),n,s)),e}class M{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:i}=this._$AD,s=(t?.creationScope??l).importNode(e,!0);x.currentNode=s;let n=x.nextNode(),o=0,h=0,r=i[0];for(;void 0!==r;){if(o===r.index){let e;2===r.type?e=new S(n,n.nextSibling,this,t):1===r.type?e=new r.ctor(n,r.name,r.strings,this,t):6===r.type&&(e=new O(n,this,t)),this._$AV.push(e),r=i[++h]}o!==r?.index&&(n=x.nextNode(),o++)}return x.currentNode=l,s}p(t){let e=0;for(const i of this._$AV)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class S{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,i,s){this.type=2,this._$AH=y,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=s,this._$Cv=s?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t?.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t){t=C(this,t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:this),A(t)?t===y||null==t||""===t?(this._$AH!==y&&this._$AR(),this._$AH=y):t!==this._$AH&&t!==f&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):(t=>_(t)||"function"==typeof t?.[Symbol.iterator])(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==y&&A(this._$AH)?this._$AA.nextSibling.data=t:this.T(l.createTextNode(t)),this._$AH=t}$(t){const{values:e,_$litType$:i}=t,s="number"==typeof i?this._$AC(t):(void 0===i.el&&(i.el=T.createElement(N(i.h,i.h[0]),this.options)),i);if(this._$AH?._$AD===s)this._$AH.p(e);else{const t=new M(s,this),i=t.u(this.options);t.p(e),this.T(i),this._$AH=t}}_$AC(t){let e=H.get(t.strings);return void 0===e&&H.set(t.strings,e=new T(t)),e}k(t){_(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,s=0;for(const n of t)s===e.length?e.push(i=new S(this.O($()),this.O($()),this,this.options)):i=e[s],i._$AI(n),s++;s<e.length&&(this._$AR(i&&i._$AB.nextSibling,s),e.length=s)}_$AR(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._$AA.nextSibling,i=arguments.length>1?arguments[1]:void 0;for(this._$AP?.(!1,!0,i);t!==this._$AB;){const i=e(t).nextSibling;e(t).remove(),t=i}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class w{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,i,s,n){this.type=1,this._$AH=y,this._$AN=void 0,this.element=t,this.name=e,this._$AM=s,this.options=n,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=y}_$AI(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this,i=arguments.length>2?arguments[2]:void 0,s=arguments.length>3?arguments[3]:void 0;const n=this.strings;let o=!1;if(void 0===n)t=C(this,t,e,0),o=!A(t)||t!==this._$AH&&t!==f,o&&(this._$AH=t);else{const s=t;let h,r;for(t=n[0],h=0;h<n.length-1;h++)r=C(this,s[i+h],e,h),r===f&&(r=this._$AH[h]),o||=!A(r)||r!==this._$AH[h],r===y?t=y:t!==y&&(t+=(r??"")+n[h+1]),this._$AH[h]=r}o&&!s&&this.j(t)}j(t){t===y?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class E extends w{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===y?void 0:t}}class I extends w{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==y)}}class U extends w{constructor(t,e,i,s,n){super(t,e,i,s,n),this.type=5}_$AI(t){if((t=C(this,t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:this,0)??y)===f)return;const e=this._$AH,i=t===y&&e!==y||t.capture!==e.capture||t.once!==e.once||t.passive!==e.passive,s=t!==y&&(e===y||i);i&&this.element.removeEventListener(this.name,this,e),s&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class O{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){C(this,t)}}const R={I:S},B=t.litHtmlPolyfillSupport;B?.(T,S),(t.litHtmlVersions??=[]).push("3.3.2");export{R as _$LH,f as noChange,y as nothing};
|
|
7
|
-
//# sourceMappingURL=lit-html.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"lit-html.mjs","sources":["../../../../../../../../node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/lit-html.js"],"sourcesContent":["/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst t=globalThis,i=t=>t,s=t.trustedTypes,e=s?s.createPolicy(\"lit-html\",{createHTML:t=>t}):void 0,h=\"$lit$\",o=`lit$${Math.random().toFixed(9).slice(2)}$`,n=\"?\"+o,r=`<${n}>`,l=document,c=()=>l.createComment(\"\"),a=t=>null===t||\"object\"!=typeof t&&\"function\"!=typeof t,u=Array.isArray,d=t=>u(t)||\"function\"==typeof t?.[Symbol.iterator],f=\"[ \\t\\n\\f\\r]\",v=/<(?:(!--|\\/[^a-zA-Z])|(\\/?[a-zA-Z][^>\\s]*)|(\\/?$))/g,_=/-->/g,m=/>/g,p=RegExp(`>|${f}(?:([^\\\\s\"'>=/]+)(${f}*=${f}*(?:[^ \\t\\n\\f\\r\"'\\`<>=]|(\"|')|))|$)`,\"g\"),g=/'/g,$=/\"/g,y=/^(?:script|style|textarea|title)$/i,x=t=>(i,...s)=>({_$litType$:t,strings:i,values:s}),b=x(1),w=x(2),T=x(3),E=Symbol.for(\"lit-noChange\"),A=Symbol.for(\"lit-nothing\"),C=new WeakMap,P=l.createTreeWalker(l,129);function V(t,i){if(!u(t)||!t.hasOwnProperty(\"raw\"))throw Error(\"invalid template strings array\");return void 0!==e?e.createHTML(i):i}const N=(t,i)=>{const s=t.length-1,e=[];let n,l=2===i?\"<svg>\":3===i?\"<math>\":\"\",c=v;for(let i=0;i<s;i++){const s=t[i];let a,u,d=-1,f=0;for(;f<s.length&&(c.lastIndex=f,u=c.exec(s),null!==u);)f=c.lastIndex,c===v?\"!--\"===u[1]?c=_:void 0!==u[1]?c=m:void 0!==u[2]?(y.test(u[2])&&(n=RegExp(\"</\"+u[2],\"g\")),c=p):void 0!==u[3]&&(c=p):c===p?\">\"===u[0]?(c=n??v,d=-1):void 0===u[1]?d=-2:(d=c.lastIndex-u[2].length,a=u[1],c=void 0===u[3]?p:'\"'===u[3]?$:g):c===$||c===g?c=p:c===_||c===m?c=v:(c=p,n=void 0);const x=c===p&&t[i+1].startsWith(\"/>\")?\" \":\"\";l+=c===v?s+r:d>=0?(e.push(a),s.slice(0,d)+h+s.slice(d)+o+x):s+o+(-2===d?i:x)}return[V(t,l+(t[s]||\"<?>\")+(2===i?\"</svg>\":3===i?\"</math>\":\"\")),e]};class S{constructor({strings:t,_$litType$:i},e){let r;this.parts=[];let l=0,a=0;const u=t.length-1,d=this.parts,[f,v]=N(t,i);if(this.el=S.createElement(f,e),P.currentNode=this.el.content,2===i||3===i){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(r=P.nextNode())&&d.length<u;){if(1===r.nodeType){if(r.hasAttributes())for(const t of r.getAttributeNames())if(t.endsWith(h)){const i=v[a++],s=r.getAttribute(t).split(o),e=/([.?@])?(.*)/.exec(i);d.push({type:1,index:l,name:e[2],strings:s,ctor:\".\"===e[1]?I:\"?\"===e[1]?L:\"@\"===e[1]?z:H}),r.removeAttribute(t)}else t.startsWith(o)&&(d.push({type:6,index:l}),r.removeAttribute(t));if(y.test(r.tagName)){const t=r.textContent.split(o),i=t.length-1;if(i>0){r.textContent=s?s.emptyScript:\"\";for(let s=0;s<i;s++)r.append(t[s],c()),P.nextNode(),d.push({type:2,index:++l});r.append(t[i],c())}}}else if(8===r.nodeType)if(r.data===n)d.push({type:2,index:l});else{let t=-1;for(;-1!==(t=r.data.indexOf(o,t+1));)d.push({type:7,index:l}),t+=o.length-1}l++}}static createElement(t,i){const s=l.createElement(\"template\");return s.innerHTML=t,s}}function M(t,i,s=t,e){if(i===E)return i;let h=void 0!==e?s._$Co?.[e]:s._$Cl;const o=a(i)?void 0:i._$litDirective$;return h?.constructor!==o&&(h?._$AO?.(!1),void 0===o?h=void 0:(h=new o(t),h._$AT(t,s,e)),void 0!==e?(s._$Co??=[])[e]=h:s._$Cl=h),void 0!==h&&(i=M(t,h._$AS(t,i.values),h,e)),i}class R{constructor(t,i){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:i},parts:s}=this._$AD,e=(t?.creationScope??l).importNode(i,!0);P.currentNode=e;let h=P.nextNode(),o=0,n=0,r=s[0];for(;void 0!==r;){if(o===r.index){let i;2===r.type?i=new k(h,h.nextSibling,this,t):1===r.type?i=new r.ctor(h,r.name,r.strings,this,t):6===r.type&&(i=new Z(h,this,t)),this._$AV.push(i),r=s[++n]}o!==r?.index&&(h=P.nextNode(),o++)}return P.currentNode=l,e}p(t){let i=0;for(const s of this._$AV)void 0!==s&&(void 0!==s.strings?(s._$AI(t,s,i),i+=s.strings.length-2):s._$AI(t[i])),i++}}class k{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,i,s,e){this.type=2,this._$AH=A,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=s,this.options=e,this._$Cv=e?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return void 0!==i&&11===t?.nodeType&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=M(this,t,i),a(t)?t===A||null==t||\"\"===t?(this._$AH!==A&&this._$AR(),this._$AH=A):t!==this._$AH&&t!==E&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):d(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==A&&a(this._$AH)?this._$AA.nextSibling.data=t:this.T(l.createTextNode(t)),this._$AH=t}$(t){const{values:i,_$litType$:s}=t,e=\"number\"==typeof s?this._$AC(t):(void 0===s.el&&(s.el=S.createElement(V(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===e)this._$AH.p(i);else{const t=new R(e,this),s=t.u(this.options);t.p(i),this.T(s),this._$AH=t}}_$AC(t){let i=C.get(t.strings);return void 0===i&&C.set(t.strings,i=new S(t)),i}k(t){u(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let s,e=0;for(const h of t)e===i.length?i.push(s=new k(this.O(c()),this.O(c()),this,this.options)):s=i[e],s._$AI(h),e++;e<i.length&&(this._$AR(s&&s._$AB.nextSibling,e),i.length=e)}_$AR(t=this._$AA.nextSibling,s){for(this._$AP?.(!1,!0,s);t!==this._$AB;){const s=i(t).nextSibling;i(t).remove(),t=s}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class H{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,i,s,e,h){this.type=1,this._$AH=A,this._$AN=void 0,this.element=t,this.name=i,this._$AM=e,this.options=h,s.length>2||\"\"!==s[0]||\"\"!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=A}_$AI(t,i=this,s,e){const h=this.strings;let o=!1;if(void 0===h)t=M(this,t,i,0),o=!a(t)||t!==this._$AH&&t!==E,o&&(this._$AH=t);else{const e=t;let n,r;for(t=h[0],n=0;n<h.length-1;n++)r=M(this,e[s+n],i,n),r===E&&(r=this._$AH[n]),o||=!a(r)||r!==this._$AH[n],r===A?t=A:t!==A&&(t+=(r??\"\")+h[n+1]),this._$AH[n]=r}o&&!e&&this.j(t)}j(t){t===A?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??\"\")}}class I extends H{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===A?void 0:t}}class L extends H{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==A)}}class z extends H{constructor(t,i,s,e,h){super(t,i,s,e,h),this.type=5}_$AI(t,i=this){if((t=M(this,t,i,0)??A)===E)return;const s=this._$AH,e=t===A&&s!==A||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,h=t!==A&&(s===A||e);e&&this.element.removeEventListener(this.name,this,s),h&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){\"function\"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class Z{constructor(t,i,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=i,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){M(this,t)}}const j={M:h,P:o,A:n,C:1,L:N,R,D:d,V:M,I:k,H,N:L,U:z,B:I,F:Z},B=t.litHtmlPolyfillSupport;B?.(S,k),(t.litHtmlVersions??=[]).push(\"3.3.2\");const D=(t,i,s)=>{const e=s?.renderBefore??i;let h=e._$litPart$;if(void 0===h){const t=s?.renderBefore??null;e._$litPart$=h=new k(i.insertBefore(c(),t),t,void 0,s??{})}return h._$AI(t),h};export{j as _$LH,b as html,T as mathml,E as noChange,A as nothing,D as render,w as svg};\n//# sourceMappingURL=lit-html.js.map\n"],"names":["t","globalThis","i","s","trustedTypes","e","createPolicy","createHTML","h","o","Math","random","toFixed","slice","n","r","l","document","c","createMarker","createComment","a","u","Array","isArray","f","v","_","m","p","RegExp","g","$","y","E","Symbol","for","A","C","WeakMap","P","createTreeWalker","V","hasOwnProperty","Error","N","getTemplateHtml","length","d","lastIndex","exec","test","x","startsWith","push","S","constructor","_ref","strings","_$litType$","this","parts","el","createElement","currentNode","content","firstChild","replaceWith","childNodes","nextNode","nodeType","hasAttributes","getAttributeNames","endsWith","getAttribute","split","type","index","name","ctor","I","L","z","H","removeAttribute","tagName","textContent","emptyScript","append","data","indexOf","innerHTML","M","arguments","undefined","_$Co","_$Cl","_$litDirective$","_$AO","_$AT","_$AS","values","R","_$AV","_$AN","_$AD","_$AM","parentNode","_$AU","creationScope","importNode","k","nextSibling","Z","_$AI","_$Cv","_$AH","_$AA","_$AB","options","isConnected","startNode","endNode","_$AR","T","iterator","O","insertBefore","createTextNode","_$AC","get","set","_$AP","remove","setConnected","element","fill","String","j","setAttribute","super","toggleAttribute","capture","once","passive","removeEventListener","addEventListener","handleEvent","call","host","B","litHtmlPolyfillSupport","litHtmlVersions"],"mappings":";;;;;AAgBA,MAAMA,EAASC,WAqOTC,EAKiBF,GAAYA,EAE7BG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1D,EAAY+B,GASRuC,EAEFtJ,EAAOuJ,uBACXD,IAAkB/F,EAAUwD,IAI3B/G,EAAOwJ,kBAAoB,IAAIlG,KAAK","x_google_ignoreList":[0]}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{Plugin as e}from"../../../../prosemirror-state@1.4.4/node_modules/prosemirror-state/dist/index.mjs";import{dropPoint as t}from"../../../../prosemirror-transform@1.11.0/node_modules/prosemirror-transform/dist/index.mjs";function i(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new e({view:e=>new o(e,t)})}class o{constructor(e,t){var i;this.editorView=e,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=null!==(i=t.width)&&void 0!==i?i:1,this.color=!1===t.color?void 0:t.color||"black",this.class=t.class,this.handlers=["dragover","dragend","drop","dragleave"].map(t=>{let i=e=>{this[t](e)};return e.dom.addEventListener(t,i),{name:t,handler:i}})}destroy(){this.handlers.forEach(e=>{let{name:t,handler:i}=e;return this.editorView.dom.removeEventListener(t,i)})}update(e,t){null!=this.cursorPos&&t.doc!=e.state.doc&&(this.cursorPos>e.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(e){e!=this.cursorPos&&(this.cursorPos=e,null==e?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let e,t=this.editorView.state.doc.resolve(this.cursorPos),i=!t.parent.inlineContent,o=this.editorView.dom,s=o.getBoundingClientRect(),r=s.width/o.offsetWidth,l=s.height/o.offsetHeight;if(i){let i=t.nodeBefore,o=t.nodeAfter;if(i||o){let t=this.editorView.nodeDOM(this.cursorPos-(i?i.nodeSize:0));if(t){let s=t.getBoundingClientRect(),r=i?s.bottom:s.top;i&&o&&(r=(r+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2);let d=this.width/2*l;e={left:s.left,right:s.right,top:r-d,bottom:r+d}}}}if(!e){let t=this.editorView.coordsAtPos(this.cursorPos),i=this.width/2*r;e={left:t.left-i,right:t.left+i,top:t.top,bottom:t.bottom}}let d,n,h=this.editorView.dom.offsetParent;if(this.element||(this.element=h.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none;",this.color&&(this.element.style.backgroundColor=this.color)),this.element.classList.toggle("prosemirror-dropcursor-block",i),this.element.classList.toggle("prosemirror-dropcursor-inline",!i),!h||h==document.body&&"static"==getComputedStyle(h).position)d=-pageXOffset,n=-pageYOffset;else{let e=h.getBoundingClientRect(),t=e.width/h.offsetWidth,i=e.height/h.offsetHeight;d=e.left-h.scrollLeft*t,n=e.top-h.scrollTop*i}this.element.style.left=(e.left-d)/r+"px",this.element.style.top=(e.top-n)/l+"px",this.element.style.width=(e.right-e.left)/r+"px",this.element.style.height=(e.bottom-e.top)/l+"px"}scheduleRemoval(e){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),e)}dragover(e){if(!this.editorView.editable)return;let i=this.editorView.posAtCoords({left:e.clientX,top:e.clientY}),o=i&&i.inside>=0&&this.editorView.state.doc.nodeAt(i.inside),s=o&&o.type.spec.disableDropCursor,r="function"==typeof s?s(this.editorView,i,e):s;if(i&&!r){let e=i.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let i=t(this.editorView.state.doc,e,this.editorView.dragging.slice);null!=i&&(e=i)}this.setCursor(e),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(e){this.editorView.dom.contains(e.relatedTarget)||this.setCursor(null)}}export{i as dropCursor};
|
|
2
|
-
//# sourceMappingURL=index.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../../../../../../../../node_modules/.pnpm/prosemirror-dropcursor@1.8.2/node_modules/prosemirror-dropcursor/dist/index.js"],"sourcesContent":["import { Plugin } from 'prosemirror-state';\nimport { dropPoint } from 'prosemirror-transform';\n\n/**\nCreate a plugin that, when added to a ProseMirror instance,\ncauses a decoration to show up at the drop position when something\nis dragged over the editor.\n\nNodes may add a `disableDropCursor` property to their spec to\ncontrol the showing of a drop cursor inside them. This may be a\nboolean or a function, which will be called with a view and a\nposition, and should return a boolean.\n*/\nfunction dropCursor(options = {}) {\n return new Plugin({\n view(editorView) { return new DropCursorView(editorView, options); }\n });\n}\nclass DropCursorView {\n constructor(editorView, options) {\n var _a;\n this.editorView = editorView;\n this.cursorPos = null;\n this.element = null;\n this.timeout = -1;\n this.width = (_a = options.width) !== null && _a !== void 0 ? _a : 1;\n this.color = options.color === false ? undefined : (options.color || \"black\");\n this.class = options.class;\n this.handlers = [\"dragover\", \"dragend\", \"drop\", \"dragleave\"].map(name => {\n let handler = (e) => { this[name](e); };\n editorView.dom.addEventListener(name, handler);\n return { name, handler };\n });\n }\n destroy() {\n this.handlers.forEach(({ name, handler }) => this.editorView.dom.removeEventListener(name, handler));\n }\n update(editorView, prevState) {\n if (this.cursorPos != null && prevState.doc != editorView.state.doc) {\n if (this.cursorPos > editorView.state.doc.content.size)\n this.setCursor(null);\n else\n this.updateOverlay();\n }\n }\n setCursor(pos) {\n if (pos == this.cursorPos)\n return;\n this.cursorPos = pos;\n if (pos == null) {\n this.element.parentNode.removeChild(this.element);\n this.element = null;\n }\n else {\n this.updateOverlay();\n }\n }\n updateOverlay() {\n let $pos = this.editorView.state.doc.resolve(this.cursorPos);\n let isBlock = !$pos.parent.inlineContent, rect;\n let editorDOM = this.editorView.dom, editorRect = editorDOM.getBoundingClientRect();\n let scaleX = editorRect.width / editorDOM.offsetWidth, scaleY = editorRect.height / editorDOM.offsetHeight;\n if (isBlock) {\n let before = $pos.nodeBefore, after = $pos.nodeAfter;\n if (before || after) {\n let node = this.editorView.nodeDOM(this.cursorPos - (before ? before.nodeSize : 0));\n if (node) {\n let nodeRect = node.getBoundingClientRect();\n let top = before ? nodeRect.bottom : nodeRect.top;\n if (before && after)\n top = (top + this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top) / 2;\n let halfWidth = (this.width / 2) * scaleY;\n rect = { left: nodeRect.left, right: nodeRect.right, top: top - halfWidth, bottom: top + halfWidth };\n }\n }\n }\n if (!rect) {\n let coords = this.editorView.coordsAtPos(this.cursorPos);\n let halfWidth = (this.width / 2) * scaleX;\n rect = { left: coords.left - halfWidth, right: coords.left + halfWidth, top: coords.top, bottom: coords.bottom };\n }\n let parent = this.editorView.dom.offsetParent;\n if (!this.element) {\n this.element = parent.appendChild(document.createElement(\"div\"));\n if (this.class)\n this.element.className = this.class;\n this.element.style.cssText = \"position: absolute; z-index: 50; pointer-events: none;\";\n if (this.color) {\n this.element.style.backgroundColor = this.color;\n }\n }\n this.element.classList.toggle(\"prosemirror-dropcursor-block\", isBlock);\n this.element.classList.toggle(\"prosemirror-dropcursor-inline\", !isBlock);\n let parentLeft, parentTop;\n if (!parent || parent == document.body && getComputedStyle(parent).position == \"static\") {\n parentLeft = -pageXOffset;\n parentTop = -pageYOffset;\n }\n else {\n let rect = parent.getBoundingClientRect();\n let parentScaleX = rect.width / parent.offsetWidth, parentScaleY = rect.height / parent.offsetHeight;\n parentLeft = rect.left - parent.scrollLeft * parentScaleX;\n parentTop = rect.top - parent.scrollTop * parentScaleY;\n }\n this.element.style.left = (rect.left - parentLeft) / scaleX + \"px\";\n this.element.style.top = (rect.top - parentTop) / scaleY + \"px\";\n this.element.style.width = (rect.right - rect.left) / scaleX + \"px\";\n this.element.style.height = (rect.bottom - rect.top) / scaleY + \"px\";\n }\n scheduleRemoval(timeout) {\n clearTimeout(this.timeout);\n this.timeout = setTimeout(() => this.setCursor(null), timeout);\n }\n dragover(event) {\n if (!this.editorView.editable)\n return;\n let pos = this.editorView.posAtCoords({ left: event.clientX, top: event.clientY });\n let node = pos && pos.inside >= 0 && this.editorView.state.doc.nodeAt(pos.inside);\n let disableDropCursor = node && node.type.spec.disableDropCursor;\n let disabled = typeof disableDropCursor == \"function\"\n ? disableDropCursor(this.editorView, pos, event)\n : disableDropCursor;\n if (pos && !disabled) {\n let target = pos.pos;\n if (this.editorView.dragging && this.editorView.dragging.slice) {\n let point = dropPoint(this.editorView.state.doc, target, this.editorView.dragging.slice);\n if (point != null)\n target = point;\n }\n this.setCursor(target);\n this.scheduleRemoval(5000);\n }\n }\n dragend() {\n this.scheduleRemoval(20);\n }\n drop() {\n this.scheduleRemoval(20);\n }\n dragleave(event) {\n if (!this.editorView.dom.contains(event.relatedTarget))\n this.setCursor(null);\n }\n}\n\nexport { dropCursor };\n"],"names":["dropCursor","options","arguments","length","undefined","Plugin","view","editorView","DropCursorView","constructor","_a","this","cursorPos","element","timeout","width","color","class","handlers","map","name","handler","e","dom","addEventListener","destroy","forEach","_ref","removeEventListener","update","prevState","doc","state","content","size","setCursor","updateOverlay","pos","parentNode","removeChild","rect","$pos","resolve","isBlock","parent","inlineContent","editorDOM","editorRect","getBoundingClientRect","scaleX","offsetWidth","scaleY","height","offsetHeight","before","nodeBefore","after","nodeAfter","node","nodeDOM","nodeSize","nodeRect","top","bottom","halfWidth","left","right","coords","coordsAtPos","parentLeft","parentTop","offsetParent","appendChild","document","createElement","className","style","cssText","backgroundColor","classList","toggle","body","getComputedStyle","position","pageXOffset","pageYOffset","parentScaleX","parentScaleY","scrollLeft","scrollTop","scheduleRemoval","clearTimeout","setTimeout","dragover","event","editable","posAtCoords","clientX","clientY","inside","nodeAt","disableDropCursor","type","spec","disabled","target","dragging","slice","point","dropPoint","dragend","drop","dragleave","contains","relatedTarget"],"mappings":"kOAaA,SAASA,IAAyB,IAAdC,EAAOC,UAAAC,OAAA,QAAAC,IAAAF,UAAA,GAAAA,UAAA,GAAG,CAAA,EAC1B,OAAO,IAAIG,EAAO,CACdC,KAAKC,GAAqB,IAAIC,EAAeD,EAAYN,IAEjE,CACA,MAAMO,EACFC,WAAAA,CAAYF,EAAYN,GACpB,IAAIS,EACJC,KAAKJ,WAAaA,EAClBI,KAAKC,UAAY,KACjBD,KAAKE,QAAU,KACfF,KAAKG,SAAU,EACfH,KAAKI,MAAiC,QAAxBL,EAA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E,gBAAgB,GACzB,CACAsB,SAAAA,CAAUlB,GACDnF,KAAKJ,WAAWgB,IAAI0F,SAASnB,EAAMoB,gBACpCvG,KAAKwB,UAAU,KACvB","x_google_ignoreList":[0]}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{keydownHandler as e}from"../../../../prosemirror-keymap@1.2.3/node_modules/prosemirror-keymap/dist/index.mjs";import{Plugin as t,TextSelection as r,NodeSelection as n,Selection as o}from"../../../../prosemirror-state@1.4.4/node_modules/prosemirror-state/dist/index.mjs";import{Fragment as i,Slice as s}from"../../../../prosemirror-model@1.25.4/node_modules/prosemirror-model/dist/index.mjs";import{DecorationSet as l,Decoration as d}from"../../../../prosemirror-view@1.41.7/node_modules/prosemirror-view/dist/index.mjs";class a extends o{constructor(e){super(e,e)}map(e,t){let r=e.resolve(t.map(this.head));return a.valid(r)?new a(r):o.near(r)}content(){return s.empty}eq(e){return e instanceof a&&e.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(e,t){if("number"!=typeof t.pos)throw new RangeError("Invalid input for GapCursor.fromJSON");return new a(e.resolve(t.pos))}getBookmark(){return new c(this.anchor)}static valid(e){let t=e.parent;if(t.inlineContent||!function(e){for(let t=e.depth;t>=0;t--){let r=e.index(t),n=e.node(t);if(0!=r)for(let e=n.child(r-1);;e=e.lastChild){if(0==e.childCount&&!e.inlineContent||p(e.type))return!0;if(e.inlineContent)return!1}else if(n.type.spec.isolating)return!0}return!0}(e)||!function(e){for(let t=e.depth;t>=0;t--){let r=e.indexAfter(t),n=e.node(t);if(r!=n.childCount)for(let e=n.child(r);;e=e.firstChild){if(0==e.childCount&&!e.inlineContent||p(e.type))return!0;if(e.inlineContent)return!1}else if(n.type.spec.isolating)return!0}return!0}(e))return!1;let r=t.type.spec.allowGapCursor;if(null!=r)return r;let n=t.contentMatchAt(e.index()).defaultType;return n&&n.isTextblock}static findGapCursorFrom(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];e:for(;;){if(!r&&a.valid(e))return e;let o=e.pos,i=null;for(let r=e.depth;;r--){let n=e.node(r);if(t>0?e.indexAfter(r)<n.childCount:e.index(r)>0){i=n.child(t>0?e.indexAfter(r):e.index(r)-1);break}if(0==r)return null;o+=t;let s=e.doc.resolve(o);if(a.valid(s))return s}for(;;){let s=t>0?i.firstChild:i.lastChild;if(!s){if(i.isAtom&&!i.isText&&!n.isSelectable(i)){e=e.doc.resolve(o+i.nodeSize*t),r=!1;continue e}break}i=s,o+=t;let l=e.doc.resolve(o);if(a.valid(l))return l}return null}}}a.prototype.visible=!1,a.findFrom=a.findGapCursorFrom,o.jsonID("gapcursor",a);class c{constructor(e){this.pos=e}map(e){return new c(e.map(this.pos))}resolve(e){let t=e.resolve(this.pos);return a.valid(t)?new a(t):o.near(t)}}function p(e){return e.isAtom||e.spec.isolating||e.spec.createGapCursor}function u(){return new t({props:{decorations:w,createSelectionBetween:(e,t,r)=>t.pos==r.pos&&a.valid(r)?new a(r):null,handleClick:h,handleKeyDown:f,handleDOMEvents:{beforeinput:v}}})}const f=e({ArrowLeft:m("horiz",-1),ArrowRight:m("horiz",1),ArrowUp:m("vert",-1),ArrowDown:m("vert",1)});function m(e,t){const n="vert"==e?t>0?"down":"up":t>0?"right":"left";return function(e,o,i){let s=e.selection,l=t>0?s.$to:s.$from,d=s.empty;if(s instanceof r){if(!i.endOfTextblock(n)||0==l.depth)return!1;d=!1,l=e.doc.resolve(t>0?l.after():l.before())}let c=a.findGapCursorFrom(l,t,d);return!!c&&(o&&o(e.tr.setSelection(new a(c))),!0)}}function h(e,t,r){if(!e||!e.editable)return!1;let o=e.state.doc.resolve(t);if(!a.valid(o))return!1;let i=e.posAtCoords({left:r.clientX,top:r.clientY});return!(i&&i.inside>-1&&n.isSelectable(e.state.doc.nodeAt(i.inside)))&&(e.dispatch(e.state.tr.setSelection(new a(o))),!0)}function v(e,t){if("insertCompositionText"!=t.inputType||!(e.state.selection instanceof a))return!1;let{$from:n}=e.state.selection,o=n.parent.contentMatchAt(n.index()).findWrapping(e.state.schema.nodes.text);if(!o)return!1;let l=i.empty;for(let e=o.length-1;e>=0;e--)l=i.from(o[e].createAndFill(null,l));let d=e.state.tr.replace(n.pos,n.pos,new s(l,0,0));return d.setSelection(r.near(d.doc.resolve(n.pos+1))),e.dispatch(d),!1}function w(e){if(!(e.selection instanceof a))return null;let t=document.createElement("div");return t.className="ProseMirror-gapcursor",l.create(e.doc,[d.widget(e.selection.head,t,{key:"gapcursor"})])}export{a as GapCursor,u as gapCursor};
|
|
2
|
-
//# sourceMappingURL=index.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../../../../../../../../node_modules/.pnpm/prosemirror-gapcursor@1.4.1/node_modules/prosemirror-gapcursor/dist/index.js"],"sourcesContent":["import { keydownHandler } from 'prosemirror-keymap';\nimport { Selection, NodeSelection, TextSelection, Plugin } from 'prosemirror-state';\nimport { Slice, Fragment } from 'prosemirror-model';\nimport { DecorationSet, Decoration } from 'prosemirror-view';\n\n/**\nGap cursor selections are represented using this class. Its\n`$anchor` and `$head` properties both point at the cursor position.\n*/\nclass GapCursor extends Selection {\n /**\n Create a gap cursor.\n */\n constructor($pos) {\n super($pos, $pos);\n }\n map(doc, mapping) {\n let $pos = doc.resolve(mapping.map(this.head));\n return GapCursor.valid($pos) ? new GapCursor($pos) : Selection.near($pos);\n }\n content() { return Slice.empty; }\n eq(other) {\n return other instanceof GapCursor && other.head == this.head;\n }\n toJSON() {\n return { type: \"gapcursor\", pos: this.head };\n }\n /**\n @internal\n */\n static fromJSON(doc, json) {\n if (typeof json.pos != \"number\")\n throw new RangeError(\"Invalid input for GapCursor.fromJSON\");\n return new GapCursor(doc.resolve(json.pos));\n }\n /**\n @internal\n */\n getBookmark() { return new GapBookmark(this.anchor); }\n /**\n @internal\n */\n static valid($pos) {\n let parent = $pos.parent;\n if (parent.inlineContent || !closedBefore($pos) || !closedAfter($pos))\n return false;\n let override = parent.type.spec.allowGapCursor;\n if (override != null)\n return override;\n let deflt = parent.contentMatchAt($pos.index()).defaultType;\n return deflt && deflt.isTextblock;\n }\n /**\n @internal\n */\n static findGapCursorFrom($pos, dir, mustMove = false) {\n search: for (;;) {\n if (!mustMove && GapCursor.valid($pos))\n return $pos;\n let pos = $pos.pos, next = null;\n // Scan up from this position\n for (let d = $pos.depth;; d--) {\n let parent = $pos.node(d);\n if (dir > 0 ? $pos.indexAfter(d) < parent.childCount : $pos.index(d) > 0) {\n next = parent.child(dir > 0 ? $pos.indexAfter(d) : $pos.index(d) - 1);\n break;\n }\n else if (d == 0) {\n return null;\n }\n pos += dir;\n let $cur = $pos.doc.resolve(pos);\n if (GapCursor.valid($cur))\n return $cur;\n }\n // And then down into the next node\n for (;;) {\n let inside = dir > 0 ? next.firstChild : next.lastChild;\n if (!inside) {\n if (next.isAtom && !next.isText && !NodeSelection.isSelectable(next)) {\n $pos = $pos.doc.resolve(pos + next.nodeSize * dir);\n mustMove = false;\n continue search;\n }\n break;\n }\n next = inside;\n pos += dir;\n let $cur = $pos.doc.resolve(pos);\n if (GapCursor.valid($cur))\n return $cur;\n }\n return null;\n }\n }\n}\nGapCursor.prototype.visible = false;\nGapCursor.findFrom = GapCursor.findGapCursorFrom;\nSelection.jsonID(\"gapcursor\", GapCursor);\nclass GapBookmark {\n constructor(pos) {\n this.pos = pos;\n }\n map(mapping) {\n return new GapBookmark(mapping.map(this.pos));\n }\n resolve(doc) {\n let $pos = doc.resolve(this.pos);\n return GapCursor.valid($pos) ? new GapCursor($pos) : Selection.near($pos);\n }\n}\nfunction needsGap(type) {\n return type.isAtom || type.spec.isolating || type.spec.createGapCursor;\n}\nfunction closedBefore($pos) {\n for (let d = $pos.depth; d >= 0; d--) {\n let index = $pos.index(d), parent = $pos.node(d);\n // At the start of this parent, look at next one\n if (index == 0) {\n if (parent.type.spec.isolating)\n return true;\n continue;\n }\n // See if the node before (or its first ancestor) is closed\n for (let before = parent.child(index - 1);; before = before.lastChild) {\n if ((before.childCount == 0 && !before.inlineContent) || needsGap(before.type))\n return true;\n if (before.inlineContent)\n return false;\n }\n }\n // Hit start of document\n return true;\n}\nfunction closedAfter($pos) {\n for (let d = $pos.depth; d >= 0; d--) {\n let index = $pos.indexAfter(d), parent = $pos.node(d);\n if (index == parent.childCount) {\n if (parent.type.spec.isolating)\n return true;\n continue;\n }\n for (let after = parent.child(index);; after = after.firstChild) {\n if ((after.childCount == 0 && !after.inlineContent) || needsGap(after.type))\n return true;\n if (after.inlineContent)\n return false;\n }\n }\n return true;\n}\n\n/**\nCreate a gap cursor plugin. When enabled, this will capture clicks\nnear and arrow-key-motion past places that don't have a normally\nselectable position nearby, and create a gap cursor selection for\nthem. The cursor is drawn as an element with class\n`ProseMirror-gapcursor`. You can either include\n`style/gapcursor.css` from the package's directory or add your own\nstyles to make it visible.\n*/\nfunction gapCursor() {\n return new Plugin({\n props: {\n decorations: drawGapCursor,\n createSelectionBetween(_view, $anchor, $head) {\n return $anchor.pos == $head.pos && GapCursor.valid($head) ? new GapCursor($head) : null;\n },\n handleClick,\n handleKeyDown,\n handleDOMEvents: { beforeinput: beforeinput }\n }\n });\n}\nconst handleKeyDown = keydownHandler({\n \"ArrowLeft\": arrow(\"horiz\", -1),\n \"ArrowRight\": arrow(\"horiz\", 1),\n \"ArrowUp\": arrow(\"vert\", -1),\n \"ArrowDown\": arrow(\"vert\", 1)\n});\nfunction arrow(axis, dir) {\n const dirStr = axis == \"vert\" ? (dir > 0 ? \"down\" : \"up\") : (dir > 0 ? \"right\" : \"left\");\n return function (state, dispatch, view) {\n let sel = state.selection;\n let $start = dir > 0 ? sel.$to : sel.$from, mustMove = sel.empty;\n if (sel instanceof TextSelection) {\n if (!view.endOfTextblock(dirStr) || $start.depth == 0)\n return false;\n mustMove = false;\n $start = state.doc.resolve(dir > 0 ? $start.after() : $start.before());\n }\n let $found = GapCursor.findGapCursorFrom($start, dir, mustMove);\n if (!$found)\n return false;\n if (dispatch)\n dispatch(state.tr.setSelection(new GapCursor($found)));\n return true;\n };\n}\nfunction handleClick(view, pos, event) {\n if (!view || !view.editable)\n return false;\n let $pos = view.state.doc.resolve(pos);\n if (!GapCursor.valid($pos))\n return false;\n let clickPos = view.posAtCoords({ left: event.clientX, top: event.clientY });\n if (clickPos && clickPos.inside > -1 && NodeSelection.isSelectable(view.state.doc.nodeAt(clickPos.inside)))\n return false;\n view.dispatch(view.state.tr.setSelection(new GapCursor($pos)));\n return true;\n}\n// This is a hack that, when a composition starts while a gap cursor\n// is active, quickly creates an inline context for the composition to\n// happen in, to avoid it being aborted by the DOM selection being\n// moved into a valid position.\nfunction beforeinput(view, event) {\n if (event.inputType != \"insertCompositionText\" || !(view.state.selection instanceof GapCursor))\n return false;\n let { $from } = view.state.selection;\n let insert = $from.parent.contentMatchAt($from.index()).findWrapping(view.state.schema.nodes.text);\n if (!insert)\n return false;\n let frag = Fragment.empty;\n for (let i = insert.length - 1; i >= 0; i--)\n frag = Fragment.from(insert[i].createAndFill(null, frag));\n let tr = view.state.tr.replace($from.pos, $from.pos, new Slice(frag, 0, 0));\n tr.setSelection(TextSelection.near(tr.doc.resolve($from.pos + 1)));\n view.dispatch(tr);\n return false;\n}\nfunction drawGapCursor(state) {\n if (!(state.selection instanceof GapCursor))\n return null;\n let node = document.createElement(\"div\");\n node.className = \"ProseMirror-gapcursor\";\n return DecorationSet.create(state.doc, [Decoration.widget(state.selection.head, node, { key: \"gapcursor\" })]);\n}\n\nexport { GapCursor, gapCursor };\n"],"names":["GapCursor","Selection","constructor","$pos","super","map","doc","mapping","resolve","this","head","valid","near","content","Slice","empty","eq","other","toJSON","type","pos","fromJSON","json","RangeError","getBookmark","GapBookmark","anchor","parent","inlineContent","d","depth","index","node","before","child","lastChild","childCount","needsGap","spec","isolating","closedBefore","indexAfter","after","firstChild","closedAfter","override","allowGapCursor","deflt","contentMatchAt","defaultType","isTextblock","findGapCursorFrom","dir","mustMove","arguments","length","undefined","search","next","$cur","inside","isAtom","isText","NodeSelection","isSelectable","nodeSize","prototype","visible","findFrom","jsonID","createGapCursor","gapCursor","Plugin","props","decorations","drawGapCursor","createSelectionBetween","_view","$anchor","$head","handleClick","handleKeyDown","handleDOMEvents","beforeinput","keydownHandler","ArrowLeft","arrow","ArrowRight","ArrowUp","ArrowDown","axis","dirStr","state","dispatch","view","sel","selection","$start","$to","$from","TextSelection","endOfTextblock","$found","tr","setSelection","event","editable","clickPos","posAtCoords","left","clientX","top","clientY","nodeAt","inputType","insert","findWrapping","schema","nodes","text","frag","Fragment","i","from","createAndFill","replace","document","createElement","className","DecorationSet","create","Decoration","widget","key"],"mappings":"+gBASA,MAAMA,UAAkBC,EAIpBC,WAAAA,CAAYC,GACRC,MAAMD,EAAMA,EAChB,CACAE,GAAAA,CAAIC,EAAKC,GACL,IAAIJ,EAAOG,EAAIE,QAAQD,EAAQF,IAAII,KAAKC,OACxC,OAAOV,EAAUW,MAAMR,GAAQ,IAAIH,EAAUG,GAAQF,EAAUW,KAAKT,EACxE,CACAU,OAAAA,GAAY,OAAOC,EAAMC,KAAO,CAChCC,EAAAA,CAAGC,GACC,OAAOA,aAAiBjB,GAAaiB,EAAMP,MAAQD,KAAKC,IAC5D,CACAQ,MAAAA,GACI,MAAO,CAAEC,KAAM,YAAaC,IAAKX,KAAKC,KAC1C,CAIA,eAAOW,CAASf,EAAKgB,GACjB,GAAuB,iBAAZA,EAAKF,IACZ,MAAM,IAAIG,WAAW,wCACzB,OAAO,IAAIvB,EAAUM,EAAIE,QAAQc,EAAKF,KAC1C,CAIAI,WAAAA,GAAgB,OAAO,IAAIC,EAAYhB,KAAKiB,OAAS,CAIrD,YAAOf,CAAMR,GACT,IAAIwB,EAASxB,EAAKwB,OAClB,GAAIA,EAAOC,gBAsEnB,SAAsBzB,GAClB,IAAK,IAAI0B,EAAI1B,EAAK2B,MAAOD,GAAK,EAAGA,IAAK,CAClC,IAAIE,EAAQ5B,EAAK4B,MAAMF,GAAIF,EAASxB,EAAK6B,KAAKH,GAE9C,GAAa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,EAAS/C,YAElGkC,EAAKD,SAASC,EAAKF,MAAMW,GAAGC,aAAa,IAAIxG,EAAUG,MAChD,EACX,CAKA,SAASgF,EAAYW,EAAMW,GACvB,GAAuB,yBAAnBA,EAAMS,aAA0CpB,EAAKF,MAAMI,qBAAqBhG,GAChF,OAAO,EACX,IAAImG,MAAEA,GAAUL,EAAKF,MAAMI,UACvBmB,EAAShB,EAAMxE,OAAOqB,eAAemD,EAAMpE,SAASqF,aAAatB,EAAKF,MAAMyB,OAAOC,MAAMC,MAC7F,IAAKJ,EACD,OAAO,EACX,IAAIK,EAAOC,EAAS1G,MACpB,IAAK,IAAI2G,EAAIP,EAAO5D,OAAS,EAAGmE,GAAK,EAAGA,IACpCF,EAAOC,EAASE,KAAKR,EAAOO,GAAGE,cAAc,KAAMJ,IACvD,IAAIjB,EAAKT,EAAKF,MAAMW,GAAGsB,QAAQ1B,EAAM/E,IAAK+E,EAAM/E,IAAK,IAAIN,EAAM0G,EAAM,EAAG,IAGxE,OAFAjB,EAAGC,aAAaJ,EAAcxF,KAAK2F,EAAGjG,IAAIE,QAAQ2F,EAAM/E,IAAM,KAC9D0E,EAAKD,SAASU,IACP,CACX,CACA,SAAS5B,EAAciB,GACnB,KAAMA,EAAMI,qBAAqBhG,GAC7B,OAAO,KACX,IAAIgC,EAAO8F,SAASC,cAAc,OAElC,OADA/F,EAAKgG,UAAY,wBACVC,EAAcC,OAAOtC,EAAMtF,IAAK,CAAC6H,EAAWC,OAAOxC,EAAMI,UAAUtF,KAAMsB,EAAM,CAAEqG,IAAK,eACjG","x_google_ignoreList":[0]}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import e from"../../../../rope-sequence@1.3.4/node_modules/rope-sequence/dist/index.mjs";import{Mapping as t}from"../../../../prosemirror-transform@1.11.0/node_modules/prosemirror-transform/dist/index.mjs";import{Plugin as n,PluginKey as s}from"../../../../prosemirror-state@1.4.4/node_modules/prosemirror-state/dist/index.mjs";class i{constructor(e,t){this.items=e,this.eventCount=t}popEvent(e,t){if(0==this.eventCount)return null;let n,s,o=this.items.length;for(;;o--){if(this.items.get(o-1).selection){--o;break}}t&&(n=this.remapping(o,this.items.length),s=n.maps.length);let p,l,a=e.tr,m=[],h=[];return this.items.forEach((e,t)=>{if(!e.step)return n||(n=this.remapping(o,t+1),s=n.maps.length),s--,void h.push(e);if(n){h.push(new r(e.map));let t,i=e.step.map(n.slice(s));i&&a.maybeStep(i).doc&&(t=a.mapping.maps[a.mapping.maps.length-1],m.push(new r(t,void 0,void 0,m.length+h.length))),s--,t&&n.appendMap(t,s)}else a.maybeStep(e.step);return e.selection?(p=n?e.selection.map(n.slice(s)):e.selection,l=new i(this.items.slice(0,o).append(h.reverse().concat(m)),this.eventCount-1),!1):void 0},this.items.length,0),{remaining:l,transform:a,selection:p}}addTransform(e,t,n,s){let o=[],l=this.eventCount,a=this.items,m=!s&&a.length?a.get(a.length-1):null;for(let n=0;n<e.steps.length;n++){let i,p=e.steps[n].invert(e.docs[n]),h=new r(e.mapping.maps[n],p,t);(i=m&&m.merge(h))&&(h=i,n?o.pop():a=a.slice(0,a.length-1)),o.push(h),t&&(l++,t=void 0),s||(m=h)}let h=l-n.depth;return h>p&&(a=function(e,t){let n;return e.forEach((e,s)=>{if(e.selection&&0==t--)return n=s,!1}),e.slice(n)}(a,h),l-=h),new i(a.append(o),l)}remapping(e,n){let s=new t;return this.items.forEach((t,n)=>{let i=null!=t.mirrorOffset&&n-t.mirrorOffset>=e?s.maps.length-t.mirrorOffset:void 0;s.appendMap(t.map,i)},e,n),s}addMaps(e){return 0==this.eventCount?this:new i(this.items.append(e.map(e=>new r(e))),this.eventCount)}rebased(e,t){if(!this.eventCount)return this;let n=[],s=Math.max(0,this.items.length-t),o=e.mapping,p=e.steps.length,l=this.eventCount;this.items.forEach(e=>{e.selection&&l--},s);let a=t;this.items.forEach(t=>{let s=o.getMirror(--a);if(null==s)return;p=Math.min(p,s);let i=o.maps[s];if(t.step){let p=e.steps[s].invert(e.docs[s]),m=t.selection&&t.selection.map(o.slice(a+1,s));m&&l++,n.push(new r(i,p,m))}else n.push(new r(i))},s);let m=[];for(let e=t;e<p;e++)m.push(new r(o.maps[e]));let h=this.items.slice(0,s).append(m).append(n),u=new i(h,l);return u.emptyItemCount()>500&&(u=u.compress(this.items.length-n.length)),u}emptyItemCount(){let e=0;return this.items.forEach(t=>{t.step||e++}),e}compress(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.items.length,n=this.remapping(0,t),s=n.maps.length,o=[],p=0;return this.items.forEach((e,i)=>{if(i>=t)o.push(e),e.selection&&p++;else if(e.step){let t=e.step.map(n.slice(s)),i=t&&t.getMap();if(s--,i&&n.appendMap(i,s),t){let l=e.selection&&e.selection.map(n.slice(s));l&&p++;let a,m=new r(i.invert(),t,l),h=o.length-1;(a=o.length&&o[h].merge(m))?o[h]=a:o.push(m)}}else e.map&&s--},this.items.length,0),new i(e.from(o.reverse()),p)}}i.empty=new i(e.empty,0);class r{constructor(e,t,n,s){this.map=e,this.step=t,this.selection=n,this.mirrorOffset=s}merge(e){if(this.step&&e.step&&!e.selection){let t=e.step.merge(this.step);if(t)return new r(t.getMap().invert(),t,this.selection)}}}class o{constructor(e,t,n,s,i){this.done=e,this.undone=t,this.prevRanges=n,this.prevTime=s,this.prevComposition=i}}const p=20;function l(e){let t=[];for(let n=e.length-1;n>=0&&0==t.length;n--)e[n].forEach((e,n,s,i)=>t.push(s,i));return t}function a(e,t){if(!e)return null;let n=[];for(let s=0;s<e.length;s+=2){let i=t.map(e[s],1),r=t.map(e[s+1],-1);i<=r&&n.push(i,r)}return n}let m=!1,h=null;function u(e){let t=e.plugins;if(h!=t){m=!1,h=t;for(let e=0;e<t.length;e++)if(t[e].spec.historyPreserveItems){m=!0;break}}return m}const d=new s("history"),g=new s("closeHistory");function c(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e={depth:e.depth||100,newGroupDelay:e.newGroupDelay||500},new n({key:d,state:{init:()=>new o(i.empty,i.empty,null,0,-1),apply:(t,n,s)=>function(e,t,n,s){let r,p=n.getMeta(d);if(p)return p.historyState;n.getMeta(g)&&(e=new o(e.done,e.undone,null,0,-1));let m=n.getMeta("appendedTransaction");if(0==n.steps.length)return e;if(m&&m.getMeta(d))return m.getMeta(d).redo?new o(e.done.addTransform(n,void 0,s,u(t)),e.undone,l(n.mapping.maps),e.prevTime,e.prevComposition):new o(e.done,e.undone.addTransform(n,void 0,s,u(t)),null,e.prevTime,e.prevComposition);if(!1===n.getMeta("addToHistory")||m&&!1===m.getMeta("addToHistory"))return(r=n.getMeta("rebased"))?new o(e.done.rebased(n,r),e.undone.rebased(n,r),a(e.prevRanges,n.mapping),e.prevTime,e.prevComposition):new o(e.done.addMaps(n.mapping.maps),e.undone.addMaps(n.mapping.maps),a(e.prevRanges,n.mapping),e.prevTime,e.prevComposition);{let r=n.getMeta("composition"),p=0==e.prevTime||!m&&e.prevComposition!=r&&(e.prevTime<(n.time||0)-s.newGroupDelay||!function(e,t){if(!t)return!1;if(!e.docChanged)return!0;let n=!1;return e.mapping.maps[0].forEach((e,s)=>{for(let i=0;i<t.length;i+=2)e<=t[i+1]&&s>=t[i]&&(n=!0)}),n}(n,e.prevRanges)),h=m?a(e.prevRanges,n.mapping):l(n.mapping.maps);return new o(e.done.addTransform(n,p?t.selection.getBookmark():void 0,s,u(t)),i.empty,h,n.time,null==r?e.prevComposition:r)}}(n,s,t,e)},config:e,props:{handleDOMEvents:{beforeinput(e,t){let n=t.inputType,s="historyUndo"==n?v:"historyRedo"==n?w:null;return!(!s||!e.editable)&&(t.preventDefault(),s(e.state,e.dispatch))}}}})}function f(e,t){return(n,s)=>{let i=d.getState(n);if(!i||0==(e?i.undone:i.done).eventCount)return!1;if(s){let r=function(e,t,n){let s=u(t),i=d.get(t).spec.config,r=(n?e.undone:e.done).popEvent(t,s);if(!r)return null;let p=r.selection.resolve(r.transform.doc),l=(n?e.done:e.undone).addTransform(r.transform,t.selection.getBookmark(),i,s),a=new o(n?l:r.remaining,n?r.remaining:l,null,0,-1);return r.transform.setSelection(p).setMeta(d,{redo:n,historyState:a})}(i,n,e);r&&s(t?r.scrollIntoView():r)}return!0}}const v=f(!1,!0),w=f(!0,!0);export{c as history,w as redo,v as undo};
|
|
2
|
-
//# sourceMappingURL=index.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../../../../../../../../node_modules/.pnpm/prosemirror-history@1.5.0/node_modules/prosemirror-history/dist/index.js"],"sourcesContent":["import RopeSequence from 'rope-sequence';\nimport { Mapping } from 'prosemirror-transform';\nimport { PluginKey, Plugin } from 'prosemirror-state';\n\n// ProseMirror's history isn't simply a way to roll back to a previous\n// state, because ProseMirror supports applying changes without adding\n// them to the history (for example during collaboration).\n//\n// To this end, each 'Branch' (one for the undo history and one for\n// the redo history) keeps an array of 'Items', which can optionally\n// hold a step (an actual undoable change), and always hold a position\n// map (which is needed to move changes below them to apply to the\n// current document).\n//\n// An item that has both a step and a selection bookmark is the start\n// of an 'event' — a group of changes that will be undone or redone at\n// once. (It stores only the bookmark, since that way we don't have to\n// provide a document until the selection is actually applied, which\n// is useful when compressing.)\n// Used to schedule history compression\nconst max_empty_items = 500;\nclass Branch {\n constructor(items, eventCount) {\n this.items = items;\n this.eventCount = eventCount;\n }\n // Pop the latest event off the branch's history and apply it\n // to a document transform.\n popEvent(state, preserveItems) {\n if (this.eventCount == 0)\n return null;\n let end = this.items.length;\n for (;; end--) {\n let next = this.items.get(end - 1);\n if (next.selection) {\n --end;\n break;\n }\n }\n let remap, mapFrom;\n if (preserveItems) {\n remap = this.remapping(end, this.items.length);\n mapFrom = remap.maps.length;\n }\n let transform = state.tr;\n let selection, remaining;\n let addAfter = [], addBefore = [];\n this.items.forEach((item, i) => {\n if (!item.step) {\n if (!remap) {\n remap = this.remapping(end, i + 1);\n mapFrom = remap.maps.length;\n }\n mapFrom--;\n addBefore.push(item);\n return;\n }\n if (remap) {\n addBefore.push(new Item(item.map));\n let step = item.step.map(remap.slice(mapFrom)), map;\n if (step && transform.maybeStep(step).doc) {\n map = transform.mapping.maps[transform.mapping.maps.length - 1];\n addAfter.push(new Item(map, undefined, undefined, addAfter.length + addBefore.length));\n }\n mapFrom--;\n if (map)\n remap.appendMap(map, mapFrom);\n }\n else {\n transform.maybeStep(item.step);\n }\n if (item.selection) {\n selection = remap ? item.selection.map(remap.slice(mapFrom)) : item.selection;\n remaining = new Branch(this.items.slice(0, end).append(addBefore.reverse().concat(addAfter)), this.eventCount - 1);\n return false;\n }\n }, this.items.length, 0);\n return { remaining: remaining, transform, selection: selection };\n }\n // Create a new branch with the given transform added.\n addTransform(transform, selection, histOptions, preserveItems) {\n let newItems = [], eventCount = this.eventCount;\n let oldItems = this.items, lastItem = !preserveItems && oldItems.length ? oldItems.get(oldItems.length - 1) : null;\n for (let i = 0; i < transform.steps.length; i++) {\n let step = transform.steps[i].invert(transform.docs[i]);\n let item = new Item(transform.mapping.maps[i], step, selection), merged;\n if (merged = lastItem && lastItem.merge(item)) {\n item = merged;\n if (i)\n newItems.pop();\n else\n oldItems = oldItems.slice(0, oldItems.length - 1);\n }\n newItems.push(item);\n if (selection) {\n eventCount++;\n selection = undefined;\n }\n if (!preserveItems)\n lastItem = item;\n }\n let overflow = eventCount - histOptions.depth;\n if (overflow > DEPTH_OVERFLOW) {\n oldItems = cutOffEvents(oldItems, overflow);\n eventCount -= overflow;\n }\n return new Branch(oldItems.append(newItems), eventCount);\n }\n remapping(from, to) {\n let maps = new Mapping;\n this.items.forEach((item, i) => {\n let mirrorPos = item.mirrorOffset != null && i - item.mirrorOffset >= from\n ? maps.maps.length - item.mirrorOffset : undefined;\n maps.appendMap(item.map, mirrorPos);\n }, from, to);\n return maps;\n }\n addMaps(array) {\n if (this.eventCount == 0)\n return this;\n return new Branch(this.items.append(array.map(map => new Item(map))), this.eventCount);\n }\n // When the collab module receives remote changes, the history has\n // to know about those, so that it can adjust the steps that were\n // rebased on top of the remote changes, and include the position\n // maps for the remote changes in its array of items.\n rebased(rebasedTransform, rebasedCount) {\n if (!this.eventCount)\n return this;\n let rebasedItems = [], start = Math.max(0, this.items.length - rebasedCount);\n let mapping = rebasedTransform.mapping;\n let newUntil = rebasedTransform.steps.length;\n let eventCount = this.eventCount;\n this.items.forEach(item => { if (item.selection)\n eventCount--; }, start);\n let iRebased = rebasedCount;\n this.items.forEach(item => {\n let pos = mapping.getMirror(--iRebased);\n if (pos == null)\n return;\n newUntil = Math.min(newUntil, pos);\n let map = mapping.maps[pos];\n if (item.step) {\n let step = rebasedTransform.steps[pos].invert(rebasedTransform.docs[pos]);\n let selection = item.selection && item.selection.map(mapping.slice(iRebased + 1, pos));\n if (selection)\n eventCount++;\n rebasedItems.push(new Item(map, step, selection));\n }\n else {\n rebasedItems.push(new Item(map));\n }\n }, start);\n let newMaps = [];\n for (let i = rebasedCount; i < newUntil; i++)\n newMaps.push(new Item(mapping.maps[i]));\n let items = this.items.slice(0, start).append(newMaps).append(rebasedItems);\n let branch = new Branch(items, eventCount);\n if (branch.emptyItemCount() > max_empty_items)\n branch = branch.compress(this.items.length - rebasedItems.length);\n return branch;\n }\n emptyItemCount() {\n let count = 0;\n this.items.forEach(item => { if (!item.step)\n count++; });\n return count;\n }\n // Compressing a branch means rewriting it to push the air (map-only\n // items) out. During collaboration, these naturally accumulate\n // because each remote change adds one. The `upto` argument is used\n // to ensure that only the items below a given level are compressed,\n // because `rebased` relies on a clean, untouched set of items in\n // order to associate old items with rebased steps.\n compress(upto = this.items.length) {\n let remap = this.remapping(0, upto), mapFrom = remap.maps.length;\n let items = [], events = 0;\n this.items.forEach((item, i) => {\n if (i >= upto) {\n items.push(item);\n if (item.selection)\n events++;\n }\n else if (item.step) {\n let step = item.step.map(remap.slice(mapFrom)), map = step && step.getMap();\n mapFrom--;\n if (map)\n remap.appendMap(map, mapFrom);\n if (step) {\n let selection = item.selection && item.selection.map(remap.slice(mapFrom));\n if (selection)\n events++;\n let newItem = new Item(map.invert(), step, selection), merged, last = items.length - 1;\n if (merged = items.length && items[last].merge(newItem))\n items[last] = merged;\n else\n items.push(newItem);\n }\n }\n else if (item.map) {\n mapFrom--;\n }\n }, this.items.length, 0);\n return new Branch(RopeSequence.from(items.reverse()), events);\n }\n}\nBranch.empty = new Branch(RopeSequence.empty, 0);\nfunction cutOffEvents(items, n) {\n let cutPoint;\n items.forEach((item, i) => {\n if (item.selection && (n-- == 0)) {\n cutPoint = i;\n return false;\n }\n });\n return items.slice(cutPoint);\n}\nclass Item {\n constructor(\n // The (forward) step map for this item.\n map, \n // The inverted step\n step, \n // If this is non-null, this item is the start of a group, and\n // this selection is the starting selection for the group (the one\n // that was active before the first step was applied)\n selection, \n // If this item is the inverse of a previous mapping on the stack,\n // this points at the inverse's offset\n mirrorOffset) {\n this.map = map;\n this.step = step;\n this.selection = selection;\n this.mirrorOffset = mirrorOffset;\n }\n merge(other) {\n if (this.step && other.step && !other.selection) {\n let step = other.step.merge(this.step);\n if (step)\n return new Item(step.getMap().invert(), step, this.selection);\n }\n }\n}\n// The value of the state field that tracks undo/redo history for that\n// state. Will be stored in the plugin state when the history plugin\n// is active.\nclass HistoryState {\n constructor(done, undone, prevRanges, prevTime, prevComposition) {\n this.done = done;\n this.undone = undone;\n this.prevRanges = prevRanges;\n this.prevTime = prevTime;\n this.prevComposition = prevComposition;\n }\n}\nconst DEPTH_OVERFLOW = 20;\n// Record a transformation in undo history.\nfunction applyTransaction(history, state, tr, options) {\n let historyTr = tr.getMeta(historyKey), rebased;\n if (historyTr)\n return historyTr.historyState;\n if (tr.getMeta(closeHistoryKey))\n history = new HistoryState(history.done, history.undone, null, 0, -1);\n let appended = tr.getMeta(\"appendedTransaction\");\n if (tr.steps.length == 0) {\n return history;\n }\n else if (appended && appended.getMeta(historyKey)) {\n if (appended.getMeta(historyKey).redo)\n return new HistoryState(history.done.addTransform(tr, undefined, options, mustPreserveItems(state)), history.undone, rangesFor(tr.mapping.maps), history.prevTime, history.prevComposition);\n else\n return new HistoryState(history.done, history.undone.addTransform(tr, undefined, options, mustPreserveItems(state)), null, history.prevTime, history.prevComposition);\n }\n else if (tr.getMeta(\"addToHistory\") !== false && !(appended && appended.getMeta(\"addToHistory\") === false)) {\n // Group transforms that occur in quick succession into one event.\n let composition = tr.getMeta(\"composition\");\n let newGroup = history.prevTime == 0 ||\n (!appended && history.prevComposition != composition &&\n (history.prevTime < (tr.time || 0) - options.newGroupDelay || !isAdjacentTo(tr, history.prevRanges)));\n let prevRanges = appended ? mapRanges(history.prevRanges, tr.mapping) : rangesFor(tr.mapping.maps);\n return new HistoryState(history.done.addTransform(tr, newGroup ? state.selection.getBookmark() : undefined, options, mustPreserveItems(state)), Branch.empty, prevRanges, tr.time, composition == null ? history.prevComposition : composition);\n }\n else if (rebased = tr.getMeta(\"rebased\")) {\n // Used by the collab module to tell the history that some of its\n // content has been rebased.\n return new HistoryState(history.done.rebased(tr, rebased), history.undone.rebased(tr, rebased), mapRanges(history.prevRanges, tr.mapping), history.prevTime, history.prevComposition);\n }\n else {\n return new HistoryState(history.done.addMaps(tr.mapping.maps), history.undone.addMaps(tr.mapping.maps), mapRanges(history.prevRanges, tr.mapping), history.prevTime, history.prevComposition);\n }\n}\nfunction isAdjacentTo(transform, prevRanges) {\n if (!prevRanges)\n return false;\n if (!transform.docChanged)\n return true;\n let adjacent = false;\n transform.mapping.maps[0].forEach((start, end) => {\n for (let i = 0; i < prevRanges.length; i += 2)\n if (start <= prevRanges[i + 1] && end >= prevRanges[i])\n adjacent = true;\n });\n return adjacent;\n}\nfunction rangesFor(maps) {\n let result = [];\n for (let i = maps.length - 1; i >= 0 && result.length == 0; i--)\n maps[i].forEach((_from, _to, from, to) => result.push(from, to));\n return result;\n}\nfunction mapRanges(ranges, mapping) {\n if (!ranges)\n return null;\n let result = [];\n for (let i = 0; i < ranges.length; i += 2) {\n let from = mapping.map(ranges[i], 1), to = mapping.map(ranges[i + 1], -1);\n if (from <= to)\n result.push(from, to);\n }\n return result;\n}\n// Apply the latest event from one branch to the document and shift the event\n// onto the other branch.\nfunction histTransaction(history, state, redo) {\n let preserveItems = mustPreserveItems(state);\n let histOptions = historyKey.get(state).spec.config;\n let pop = (redo ? history.undone : history.done).popEvent(state, preserveItems);\n if (!pop)\n return null;\n let selection = pop.selection.resolve(pop.transform.doc);\n let added = (redo ? history.done : history.undone).addTransform(pop.transform, state.selection.getBookmark(), histOptions, preserveItems);\n let newHist = new HistoryState(redo ? added : pop.remaining, redo ? pop.remaining : added, null, 0, -1);\n return pop.transform.setSelection(selection).setMeta(historyKey, { redo, historyState: newHist });\n}\nlet cachedPreserveItems = false, cachedPreserveItemsPlugins = null;\n// Check whether any plugin in the given state has a\n// `historyPreserveItems` property in its spec, in which case we must\n// preserve steps exactly as they came in, so that they can be\n// rebased.\nfunction mustPreserveItems(state) {\n let plugins = state.plugins;\n if (cachedPreserveItemsPlugins != plugins) {\n cachedPreserveItems = false;\n cachedPreserveItemsPlugins = plugins;\n for (let i = 0; i < plugins.length; i++)\n if (plugins[i].spec.historyPreserveItems) {\n cachedPreserveItems = true;\n break;\n }\n }\n return cachedPreserveItems;\n}\n/**\nSet a flag on the given transaction that will prevent further steps\nfrom being appended to an existing history event (so that they\nrequire a separate undo command to undo).\n*/\nfunction closeHistory(tr) {\n return tr.setMeta(closeHistoryKey, true);\n}\nconst historyKey = new PluginKey(\"history\");\nconst closeHistoryKey = new PluginKey(\"closeHistory\");\n/**\nReturns a plugin that enables the undo history for an editor. The\nplugin will track undo and redo stacks, which can be used with the\n[`undo`](https://prosemirror.net/docs/ref/#history.undo) and [`redo`](https://prosemirror.net/docs/ref/#history.redo) commands.\n\nYou can set an `\"addToHistory\"` [metadata\nproperty](https://prosemirror.net/docs/ref/#state.Transaction.setMeta) of `false` on a transaction\nto prevent it from being rolled back by undo.\n*/\nfunction history(config = {}) {\n config = { depth: config.depth || 100,\n newGroupDelay: config.newGroupDelay || 500 };\n return new Plugin({\n key: historyKey,\n state: {\n init() {\n return new HistoryState(Branch.empty, Branch.empty, null, 0, -1);\n },\n apply(tr, hist, state) {\n return applyTransaction(hist, state, tr, config);\n }\n },\n config,\n props: {\n handleDOMEvents: {\n beforeinput(view, e) {\n let inputType = e.inputType;\n let command = inputType == \"historyUndo\" ? undo : inputType == \"historyRedo\" ? redo : null;\n if (!command || !view.editable)\n return false;\n e.preventDefault();\n return command(view.state, view.dispatch);\n }\n }\n }\n });\n}\nfunction buildCommand(redo, scroll) {\n return (state, dispatch) => {\n let hist = historyKey.getState(state);\n if (!hist || (redo ? hist.undone : hist.done).eventCount == 0)\n return false;\n if (dispatch) {\n let tr = histTransaction(hist, state, redo);\n if (tr)\n dispatch(scroll ? tr.scrollIntoView() : tr);\n }\n return true;\n };\n}\n/**\nA command function that undoes the last change, if any.\n*/\nconst undo = buildCommand(false, true);\n/**\nA command function that redoes the last undone change, if any.\n*/\nconst redo = buildCommand(true, true);\n/**\nA command function that undoes the last change. Don't scroll the\nselection into view.\n*/\nconst undoNoScroll = buildCommand(false, false);\n/**\nA command function that redoes the last undone change. Don't\nscroll the selection into view.\n*/\nconst redoNoScroll = buildCommand(true, false);\n/**\nThe amount of undoable events available in a given state.\n*/\nfunction undoDepth(state) {\n let hist = historyKey.getState(state);\n return hist ? hist.done.eventCount : 0;\n}\n/**\nThe amount of redoable events available in a given editor state.\n*/\nfunction redoDepth(state) {\n let hist = historyKey.getState(state);\n return hist ? hist.undone.eventCount : 0;\n}\n/**\nReturns true if the given transaction was generated by the history\nplugin.\n*/\nfunction isHistoryTransaction(tr) {\n return tr.getMeta(historyKey) != null;\n}\n\nexport { closeHistory, history, isHistoryTransaction, redo, redoDepth, redoNoScroll, undo, undoDepth, undoNoScroll };\n"],"names":["Branch","constructor","items","eventCount","this","popEvent","state","preserveItems","remap","mapFrom","end","length","get","selection","remapping","maps","remaining","transform","tr","addAfter","addBefore","forEach","item","i","step","push","Item","map","slice","maybeStep","doc","mapping","undefined","appendMap","append","reverse","concat","addTransform","histOptions","newItems","oldItems","lastItem","steps","merged","invert","docs","merge","pop","overflow","depth","DEPTH_OVERFLOW","n","cutPoint","cutOffEvents","from","to","Mapping","mirrorPos","mirrorOffset","addMaps","array","rebased","rebasedTransform","rebasedCount","rebasedItems","start","Math","max","newUntil","iRebased","pos","getMirror","min","newMaps","branch","emptyItemCount","compress","count","upto","arguments","events","getMap","newItem","last","RopeSequence","empty","other","HistoryState","done","undone","prevRanges","prevTime","prevComposition","rangesFor","result","_from","_to","mapRanges","ranges","cachedPreserveItems","cachedPreserveItemsPlugins","mustPreserveItems","plugins","spec","historyPreserveItems","historyKey","PluginKey","closeHistoryKey","history","config","newGroupDelay","Plugin","key","init","apply","hist","options","historyTr","getMeta","historyState","appended","redo","composition","newGroup","time","docChanged","adjacent","isAdjacentTo","getBookmark","applyTransaction","props","handleDOMEvents","beforeinput","view","e","inputType","command","undo","editable","preventDefault","dispatch","buildCommand","scroll","getState","resolve","added","newHist","setSelection","setMeta","histTransaction","scrollIntoView"],"mappings":"wUAqBA,MAAMA,EACFC,WAAAA,CAAYC,EAAOC,GACfC,KAAKF,MAAQA,EACbE,KAAKD,WAAaA,CACtB,CAGAE,QAAAA,CAASC,EAAOC,GACZ,GAAuB,GAAnBH,KAAKD,WACL,OAAO,KACX,IAQIK,EAAOC,EARPC,EAAMN,KAAKF,MAAMS,OACrB,MAAQD,IAAO,CAEX,GADWN,KAAKF,MAAMU,IAAIF,EAAM,GACvBG,UAAW,GACdH,EACF,KACJ,CACJ,CAEIH,IACAC,EAAQJ,KAAKU,UAAUJ,EAAKN,KAAKF,MAAMS,QACvCF,EAAUD,EAAMO,KAAKJ,QAEzB,IACIE,EAAWG,EADXC,EAAYX,EAAMY,GAElBC,EAAW,GAAIC,EAAY,GA+B/B,OA9BAhB,KAAKF,MAAMmB,QAAQ,CAACC,EAAMC,KACtB,IAAKD,EAAKE,KAON,OANKhB,IACDA,EAAQJ,KAAKU,UAAUJ,EAAKa,EAAI,GAChCd,EAAUD,EAAMO,KAAKJ,QAEzBF,SACAW,EAA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AAO,EACX,GAAIyI,EAAU,CACV,IAAI1H,EAlFhB,SAAyB0F,EAAStG,EAAOmH,GACrC,IAAIlH,EAAgB8F,EAAkB/F,GAClCgC,EAAcmE,EAAW7F,IAAIN,GAAOiG,KAAKM,OACzC9D,GAAO0E,EAAOb,EAAQnB,OAASmB,EAAQpB,MAAMnF,SAASC,EAAOC,GACjE,IAAKwC,EACD,OAAO,KACX,IAAIlC,EAAYkC,EAAIlC,UAAUmI,QAAQjG,EAAI9B,UAAUa,KAChDmH,GAASxB,EAAOb,EAAQpB,KAAOoB,EAAQnB,QAAQpD,aAAaU,EAAI9B,UAAWX,EAAMO,UAAUmH,cAAe1F,EAAa/B,GACvH2I,EAAU,IAAI3D,EAAakC,EAAOwB,EAAQlG,EAAI/B,UAAWyG,EAAO1E,EAAI/B,UAAYiI,EAAO,KAAM,GAAG,GACpG,OAAOlG,EAAI9B,UAAUkI,aAAatI,GAAWuI,QAAQ3C,EAAY,CAAEgB,OAAMF,aAAc2B,GAC3F,CAwEqBG,CAAgBlC,EAAM7G,EAAOmH,GAClCvG,GACA0H,EAASE,EAAS5H,EAAGoI,iBAAmBpI,EAChD,CACA,OAAO,EAEf,CAIA,MAAMuH,EAAOI,GAAa,GAAO,GAI3BpB,EAAOoB,GAAa,GAAM","x_google_ignoreList":[0]}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{keyName as t,base as e}from"../../../../w3c-keyname@2.2.8/node_modules/w3c-keyname/index.mjs";const i="undefined"!=typeof navigator&&/Mac|iP(hone|[oa]d)/.test(navigator.platform),n="undefined"!=typeof navigator&&/Win/.test(navigator.platform);function r(t){let e,n,r,l,a=t.split(/-(?!$)/),o=a[a.length-1];"Space"==o&&(o=" ");for(let t=0;t<a.length-1;t++){let o=a[t];if(/^(cmd|meta|m)$/i.test(o))l=!0;else if(/^a(lt)?$/i.test(o))e=!0;else if(/^(c|ctrl|control)$/i.test(o))n=!0;else if(/^s(hift)?$/i.test(o))r=!0;else{if(!/^mod$/i.test(o))throw new Error("Unrecognized modifier name: "+o);i?l=!0:n=!0}}return e&&(o="Alt-"+o),n&&(o="Ctrl-"+o),l&&(o="Meta-"+o),r&&(o="Shift-"+o),o}function l(t,e){let i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return e.altKey&&(t="Alt-"+t),e.ctrlKey&&(t="Ctrl-"+t),e.metaKey&&(t="Meta-"+t),i&&e.shiftKey&&(t="Shift-"+t),t}function a(i){let a=function(t){let e=Object.create(null);for(let i in t)e[r(i)]=t[i];return e}(i);return function(i,r){let o,f=t(r),s=a[l(f,r)];if(s&&s(i.state,i.dispatch,i))return!0;if(1==f.length&&" "!=f){if(r.shiftKey){let t=a[l(f,r,!1)];if(t&&t(i.state,i.dispatch,i))return!0}if((r.altKey||r.metaKey||r.ctrlKey)&&!(n&&r.ctrlKey&&r.altKey)&&(o=e[r.keyCode])&&o!=f){let t=a[l(o,r)];if(t&&t(i.state,i.dispatch,i))return!0}}return!1}}export{a as keydownHandler};
|
|
2
|
-
//# sourceMappingURL=index.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../../../../../../../../node_modules/.pnpm/prosemirror-keymap@1.2.3/node_modules/prosemirror-keymap/dist/index.js"],"sourcesContent":["import { keyName, base } from 'w3c-keyname';\nimport { Plugin } from 'prosemirror-state';\n\nconst mac = typeof navigator != \"undefined\" && /Mac|iP(hone|[oa]d)/.test(navigator.platform);\nconst windows = typeof navigator != \"undefined\" && /Win/.test(navigator.platform);\nfunction normalizeKeyName(name) {\n let parts = name.split(/-(?!$)/), result = parts[parts.length - 1];\n if (result == \"Space\")\n result = \" \";\n let alt, ctrl, shift, meta;\n for (let i = 0; i < parts.length - 1; i++) {\n let mod = parts[i];\n if (/^(cmd|meta|m)$/i.test(mod))\n meta = true;\n else if (/^a(lt)?$/i.test(mod))\n alt = true;\n else if (/^(c|ctrl|control)$/i.test(mod))\n ctrl = true;\n else if (/^s(hift)?$/i.test(mod))\n shift = true;\n else if (/^mod$/i.test(mod)) {\n if (mac)\n meta = true;\n else\n ctrl = true;\n }\n else\n throw new Error(\"Unrecognized modifier name: \" + mod);\n }\n if (alt)\n result = \"Alt-\" + result;\n if (ctrl)\n result = \"Ctrl-\" + result;\n if (meta)\n result = \"Meta-\" + result;\n if (shift)\n result = \"Shift-\" + result;\n return result;\n}\nfunction normalize(map) {\n let copy = Object.create(null);\n for (let prop in map)\n copy[normalizeKeyName(prop)] = map[prop];\n return copy;\n}\nfunction modifiers(name, event, shift = true) {\n if (event.altKey)\n name = \"Alt-\" + name;\n if (event.ctrlKey)\n name = \"Ctrl-\" + name;\n if (event.metaKey)\n name = \"Meta-\" + name;\n if (shift && event.shiftKey)\n name = \"Shift-\" + name;\n return name;\n}\n/**\nCreate a keymap plugin for the given set of bindings.\n\nBindings should map key names to [command](https://prosemirror.net/docs/ref/#commands)-style\nfunctions, which will be called with `(EditorState, dispatch,\nEditorView)` arguments, and should return true when they've handled\nthe key. Note that the view argument isn't part of the command\nprotocol, but can be used as an escape hatch if a binding needs to\ndirectly interact with the UI.\n\nKey names may be strings like `\"Shift-Ctrl-Enter\"`—a key\nidentifier prefixed with zero or more modifiers. Key identifiers\nare based on the strings that can appear in\n[`KeyEvent.key`](https:developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key).\nUse lowercase letters to refer to letter keys (or uppercase letters\nif you want shift to be held). You may use `\"Space\"` as an alias\nfor the `\" \"` name.\n\nModifiers can be given in any order. `Shift-` (or `s-`), `Alt-` (or\n`a-`), `Ctrl-` (or `c-` or `Control-`) and `Cmd-` (or `m-` or\n`Meta-`) are recognized. For characters that are created by holding\nshift, the `Shift-` prefix is implied, and should not be added\nexplicitly.\n\nYou can use `Mod-` as a shorthand for `Cmd-` on Mac and `Ctrl-` on\nother platforms.\n\nYou can add multiple keymap plugins to an editor. The order in\nwhich they appear determines their precedence (the ones early in\nthe array get to dispatch first).\n*/\nfunction keymap(bindings) {\n return new Plugin({ props: { handleKeyDown: keydownHandler(bindings) } });\n}\n/**\nGiven a set of bindings (using the same format as\n[`keymap`](https://prosemirror.net/docs/ref/#keymap.keymap)), return a [keydown\nhandler](https://prosemirror.net/docs/ref/#view.EditorProps.handleKeyDown) that handles them.\n*/\nfunction keydownHandler(bindings) {\n let map = normalize(bindings);\n return function (view, event) {\n let name = keyName(event), baseName, direct = map[modifiers(name, event)];\n if (direct && direct(view.state, view.dispatch, view))\n return true;\n // A character key\n if (name.length == 1 && name != \" \") {\n if (event.shiftKey) {\n // In case the name was already modified by shift, try looking\n // it up without its shift modifier\n let noShift = map[modifiers(name, event, false)];\n if (noShift && noShift(view.state, view.dispatch, view))\n return true;\n }\n if ((event.altKey || event.metaKey || event.ctrlKey) &&\n // Ctrl-Alt may be used for AltGr on Windows\n !(windows && event.ctrlKey && event.altKey) &&\n (baseName = base[event.keyCode]) && baseName != name) {\n // Try falling back to the keyCode when there's a modifier\n // active or the character produced isn't ASCII, and our table\n // produces a different name from the the keyCode. See #668,\n // #1060, #1529.\n let fromCode = map[modifiers(baseName, event)];\n if (fromCode && fromCode(view.state, view.dispatch, view))\n return true;\n }\n }\n return false;\n };\n}\n\nexport { keydownHandler, keymap };\n"],"names":["mac","navigator","test","platform","windows","normalizeKeyName","name","alt","ctrl","shift","meta","parts","split","result","length","i","mod","Error","modifiers","event","arguments","undefined","altKey","ctrlKey","metaKey","shiftKey","keydownHandler","bindings","map","copy","Object","create","prop","normalize","view","baseName","keyName","direct","state","dispatch","noShift","base","keyCode","fromCode"],"mappings":"qGAGA,MAAMA,EAA0B,oBAAbC,WAA4B,qBAAqBC,KAAKD,UAAUE,UAC7EC,EAA8B,oBAAbH,WAA4B,MAAMC,KAAKD,UAAUE,UACxE,SAASE,EAAiBC,GACtB,IAGIC,EAAKC,EAAMC,EAAOC,EAHlBC,EAAQL,EAAKM,MAAM,UAAWC,EAASF,EAAMA,EAAMG,OAAS,GAClD,SAAVD,IACAA,EAAS,KAEb,IAAK,IAAIE,EAAI,E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