From 2225a6d90180650ec82e6092c395b34f7e7f2359 Mon Sep 17 00:00:00 2001 From: Dominique Rochefort Date: Tue, 21 Apr 2020 10:54:55 -0400 Subject: [PATCH] delete dist files --- .gitignore | 3 +- dist/components/custom-mark.d.ts | 7 --- dist/components/custom-mark.js | 32 ----------- dist/components/custom-mark.js.map | 1 - dist/components/custom-mark/custom-mark.d.ts | 6 -- dist/components/custom-mark/custom-mark.js | 35 ------------ .../components/custom-mark/custom-mark.js.map | 1 - dist/components/editor.d.ts | 9 --- dist/components/editor.js | 55 ------------------ dist/components/editor.js.map | 1 - dist/components/editor/CustomMarkView.d.ts | 15 ----- dist/components/editor/CustomMarkView.js | 40 ------------- dist/components/editor/CustomMarkView.js.map | 1 - dist/components/editor/editor.d.ts | 10 ---- dist/components/editor/editor.js | 57 ------------------- dist/components/editor/editor.js.map | 1 - dist/components/editor/marks.d.ts | 4 -- dist/components/editor/marks.js | 14 ----- dist/components/editor/marks.js.map | 1 - dist/components/menu/menuView.d.ts | 8 --- dist/components/menu/menuView.js | 26 --------- dist/components/menu/menuView.js.map | 1 - 22 files changed, 2 insertions(+), 326 deletions(-) delete mode 100644 dist/components/custom-mark.d.ts delete mode 100644 dist/components/custom-mark.js delete mode 100644 dist/components/custom-mark.js.map delete mode 100644 dist/components/custom-mark/custom-mark.d.ts delete mode 100644 dist/components/custom-mark/custom-mark.js delete mode 100644 dist/components/custom-mark/custom-mark.js.map delete mode 100644 dist/components/editor.d.ts delete mode 100644 dist/components/editor.js delete mode 100644 dist/components/editor.js.map delete mode 100644 dist/components/editor/CustomMarkView.d.ts delete mode 100644 dist/components/editor/CustomMarkView.js delete mode 100644 dist/components/editor/CustomMarkView.js.map delete mode 100644 dist/components/editor/editor.d.ts delete mode 100644 dist/components/editor/editor.js delete mode 100644 dist/components/editor/editor.js.map delete mode 100644 dist/components/editor/marks.d.ts delete mode 100644 dist/components/editor/marks.js delete mode 100644 dist/components/editor/marks.js.map delete mode 100644 dist/components/menu/menuView.d.ts delete mode 100644 dist/components/menu/menuView.js delete mode 100644 dist/components/menu/menuView.js.map diff --git a/.gitignore b/.gitignore index b512c09..76add87 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ -node_modules \ No newline at end of file +node_modules +dist \ No newline at end of file diff --git a/dist/components/custom-mark.d.ts b/dist/components/custom-mark.d.ts deleted file mode 100644 index 638b138..0000000 --- a/dist/components/custom-mark.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { LitElement } from 'lit-element'; -import { TemplateResult } from 'lit-html'; -export default class CustomMark extends LitElement { - reflectedAttribute: string; - constructor(); - protected render(): TemplateResult; -} diff --git a/dist/components/custom-mark.js b/dist/components/custom-mark.js deleted file mode 100644 index 31bbe8f..0000000 --- a/dist/components/custom-mark.js +++ /dev/null @@ -1,32 +0,0 @@ -var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -var __metadata = (this && this.__metadata) || function (k, v) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); -}; -import { LitElement, customElement, property } from 'lit-element'; -import { html } from 'lit-html'; -let CustomMark = class CustomMark extends LitElement { - constructor() { - super(); - this.reflectedAttribute = 'custompropertyvalue'; - } - render() { - return html ` - - `; - } -}; -__decorate([ - property({ type: String, attribute: 'custom', reflect: true }), - __metadata("design:type", String) -], CustomMark.prototype, "reflectedAttribute", void 0); -CustomMark = __decorate([ - customElement('my-custom-mark'), - __metadata("design:paramtypes", []) -], CustomMark); -export default CustomMark; -//# sourceMappingURL=custom-mark.js.map \ No newline at end of file diff --git a/dist/components/custom-mark.js.map b/dist/components/custom-mark.js.map deleted file mode 100644 index 1602e3d..0000000 --- a/dist/components/custom-mark.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"custom-mark.js","sourceRoot":"","sources":["../../src/client/components/custom-mark.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAClE,OAAO,EAAE,IAAI,EAAkB,MAAM,UAAU,CAAC;AAEhD,IAAqB,UAAU,GAA/B,MAAqB,UAAW,SAAQ,UAAU;IAI9C;QACI,KAAK,EAAE,CAAC;QAHL,uBAAkB,GAAW,qBAAqB,CAAC;IAI1D,CAAC;IAES,MAAM;QACZ,OAAO,IAAI,CAAA;;SAEV,CAAC;IACN,CAAC;CACJ,CAAA;AAXG;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;;sDACL;AAFzC,UAAU;IAD9B,aAAa,CAAC,gBAAgB,CAAC;;GACX,UAAU,CAa9B;eAboB,UAAU"} \ No newline at end of file diff --git a/dist/components/custom-mark/custom-mark.d.ts b/dist/components/custom-mark/custom-mark.d.ts deleted file mode 100644 index ba87f69..0000000 --- a/dist/components/custom-mark/custom-mark.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { LitElement } from 'lit-element'; -import { TemplateResult } from 'lit-html'; -export default class CustomMark extends LitElement { - reflectedAttribute: string; - protected render(): TemplateResult; -} diff --git a/dist/components/custom-mark/custom-mark.js b/dist/components/custom-mark/custom-mark.js deleted file mode 100644 index 349524c..0000000 --- a/dist/components/custom-mark/custom-mark.js +++ /dev/null @@ -1,35 +0,0 @@ -var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -var __metadata = (this && this.__metadata) || function (k, v) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); -}; -import { LitElement, customElement, property } from 'lit-element'; -import { html } from 'lit-html'; -// const tag: string = '' -let CustomMark = class CustomMark extends LitElement { - constructor() { - super(...arguments); - // Issue only appears when reflect=true - this.reflectedAttribute = 'default'; // default value to show how when prosemirror changes value, infitite loop is created. - } - render() { - return html ` `; - } -}; -__decorate([ - property({ - type: String, - attribute: 'reflected-attribute', - reflect: true, - }), - __metadata("design:type", String) -], CustomMark.prototype, "reflectedAttribute", void 0); -CustomMark = __decorate([ - customElement('my-custom-mark') -], CustomMark); -export default CustomMark; -//# sourceMappingURL=custom-mark.js.map \ No newline at end of file diff --git a/dist/components/custom-mark/custom-mark.js.map b/dist/components/custom-mark/custom-mark.js.map deleted file mode 100644 index 688aed8..0000000 --- a/dist/components/custom-mark/custom-mark.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"custom-mark.js","sourceRoot":"","sources":["../../../src/client/components/custom-mark/custom-mark.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAClE,OAAO,EAAE,IAAI,EAAkB,MAAM,UAAU,CAAC;AAEhD,yCAAyC;AAEzC,IAAqB,UAAU,GAA/B,MAAqB,UAAW,SAAQ,UAAU;IAAlD;;QACI,uCAAuC;QAMhC,uBAAkB,GAAW,SAAS,CAAC,CAAC,sFAAsF;IAKzI,CAAC;IAHa,MAAM;QACZ,OAAO,IAAI,CAAA,kBAAkB,CAAC;IAClC,CAAC;CACJ,CAAA;AALG;IALC,QAAQ,CAAC;QACN,IAAI,EAAE,MAAM;QACZ,SAAS,EAAE,qBAAqB;QAChC,OAAO,EAAE,IAAI;KAChB,CAAC;;sDAC4C;AAP7B,UAAU;IAD9B,aAAa,CAAC,gBAAgB,CAAC;GACX,UAAU,CAY9B;eAZoB,UAAU"} \ No newline at end of file diff --git a/dist/components/editor.d.ts b/dist/components/editor.d.ts deleted file mode 100644 index ec2eb28..0000000 --- a/dist/components/editor.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { LitElement } from 'lit-element'; -import { TemplateResult } from 'lit-html'; -export default class CustomMark extends LitElement { - private editorView; - constructor(); - protected firstUpdated(): void; - private initEditor; - protected render(): TemplateResult; -} diff --git a/dist/components/editor.js b/dist/components/editor.js deleted file mode 100644 index 96ab2f2..0000000 --- a/dist/components/editor.js +++ /dev/null @@ -1,55 +0,0 @@ -var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -var __metadata = (this && this.__metadata) || function (k, v) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); -}; -import { LitElement, customElement } from 'lit-element'; -import { html } from 'lit-html'; -// prosemirror modules -import { EditorState } from "prosemirror-state"; -import { EditorView } from "prosemirror-view"; -import { Schema, DOMParser } from "prosemirror-model"; -import { schema } from "prosemirror-schema-basic"; -import { addListNodes } from "prosemirror-schema-list"; -import { exampleSetup } from "prosemirror-example-setup"; -// Mix the nodes from prosemirror-schema-list into the basic schema to -// create a schema with list support. -const mySchema = new Schema({ - nodes: addListNodes(schema.spec.nodes, "paragraph block*", "block"), - marks: schema.spec.marks -}); -let CustomMark = class CustomMark extends LitElement { - constructor() { - super(); - } - firstUpdated() { - this.initEditor(); - } - initEditor() { - const container = document.createElement('div'); - container.innerHTML = this.innerHTML; - this.innerHTML = ''; - this.editorView = new EditorView(this, { - state: EditorState.create({ - doc: DOMParser.fromSchema(mySchema).parse(container), - plugins: exampleSetup({ schema: mySchema }) - }) - }); - } - render() { - return html ` -
- - `; - } -}; -CustomMark = __decorate([ - customElement('prosemirror-editor'), - __metadata("design:paramtypes", []) -], CustomMark); -export default CustomMark; -//# sourceMappingURL=editor.js.map \ No newline at end of file diff --git a/dist/components/editor.js.map b/dist/components/editor.js.map deleted file mode 100644 index 39276d7..0000000 --- a/dist/components/editor.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"editor.js","sourceRoot":"","sources":["../../src/client/components/editor.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,aAAa,EAAY,MAAM,aAAa,CAAC;AAClE,OAAO,EAAE,IAAI,EAAkB,MAAM,UAAU,CAAC;AAEhD,sBAAsB;AACtB,OAAO,EAAC,WAAW,EAAC,MAAM,mBAAmB,CAAA;AAC7C,OAAO,EAAC,UAAU,EAAC,MAAM,kBAAkB,CAAA;AAC3C,OAAO,EAAC,MAAM,EAAE,SAAS,EAAC,MAAM,mBAAmB,CAAA;AACnD,OAAO,EAAC,MAAM,EAAC,MAAM,0BAA0B,CAAA;AAC/C,OAAO,EAAC,YAAY,EAAC,MAAM,yBAAyB,CAAA;AACpD,OAAO,EAAC,YAAY,EAAC,MAAM,2BAA2B,CAAA;AAEtD,sEAAsE;AACtE,qCAAqC;AACrC,MAAM,QAAQ,GAAG,IAAI,MAAM,CAAC;IAC1B,KAAK,EAAE,YAAY,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,kBAAkB,EAAE,OAAO,CAAC;IACnE,KAAK,EAAE,MAAM,CAAC,IAAI,CAAC,KAAK;CACzB,CAAC,CAAA;AAIF,IAAqB,UAAU,GAA/B,MAAqB,UAAW,SAAQ,UAAU;IAG9C;QACI,KAAK,EAAE,CAAC;IACZ,CAAC;IAES,YAAY;QAClB,IAAI,CAAC,UAAU,EAAE,CAAC;IACtB,CAAC;IAEO,UAAU;QACd,MAAM,SAAS,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;QAChD,SAAS,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC;QACrC,IAAI,CAAC,SAAS,GAAG,EAAE,CAAC;QAEpB,IAAI,CAAC,UAAU,GAAG,IAAI,UAAU,CAAC,IAAI,EAAE;YACnC,KAAK,EAAE,WAAW,CAAC,MAAM,CAAC;gBACtB,GAAG,EAAE,SAAS,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC;gBACpD,OAAO,EAAE,YAAY,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC;aAC9C,CAAC;SACL,CAAC,CAAA;IACN,CAAC;IAES,MAAM;QACZ,OAAO,IAAI,CAAA;;;SAGV,CAAC;IACN,CAAC;CACJ,CAAA;AA9BoB,UAAU;IAD9B,aAAa,CAAC,oBAAoB,CAAC;;GACf,UAAU,CA8B9B;eA9BoB,UAAU"} \ No newline at end of file diff --git a/dist/components/editor/CustomMarkView.d.ts b/dist/components/editor/CustomMarkView.d.ts deleted file mode 100644 index ef6f55e..0000000 --- a/dist/components/editor/CustomMarkView.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { Decoration, EditorView, NodeView } from 'prosemirror-view'; -import { Node as ProseNode } from 'prosemirror-model'; -import { Plugin } from 'prosemirror-state'; -export declare class CustomMarkView implements NodeView { - dom: HTMLElement; - node: ProseNode; - view: EditorView; - getPos: () => number; - decorations: Decoration[]; - constructor(node: ProseNode, view: EditorView, getPos: () => number, decorations: Decoration[]); - protected observeMutations(): void; - updateProseNodeAttributes(mutations: MutationRecord[]): void; - stopEvent(): boolean; - static getPlugin(): Plugin; -} diff --git a/dist/components/editor/CustomMarkView.js b/dist/components/editor/CustomMarkView.js deleted file mode 100644 index 85a926b..0000000 --- a/dist/components/editor/CustomMarkView.js +++ /dev/null @@ -1,40 +0,0 @@ -import { Plugin } from 'prosemirror-state'; -export class CustomMarkView { - constructor(node, view, getPos, decorations) { - this.node = node; - this.view = view; - this.getPos = getPos; - this.decorations = decorations; - const el = document.createElement('my-custom-mark'); - el.setAttribute('reflected-attribute', node.attrs['reflected-attribute']); - el.innerHTML = node.attrs.inner; - this.dom = el; - this.observeMutations(); - } - observeMutations() { - const observer = new MutationObserver((mutations) => { - this.updateProseNodeAttributes(mutations); - }); - observer.observe(this.dom, { attributes: true, attributeOldValue: true, childList: true }); - } - updateProseNodeAttributes(mutations) { - mutations.forEach((mutation) => { - this.node.attrs[mutation.attributeName] = this.dom.getAttribute(mutation.attributeName); - }); - } - stopEvent() { - return true; - } - static getPlugin() { - return new Plugin({ - props: { - nodeViews: { - myCustomMark(node, view, getPos, decorations) { - return new CustomMarkView(node, view, getPos, decorations); - }, - }, - }, - }); - } -} -//# sourceMappingURL=CustomMarkView.js.map \ No newline at end of file diff --git a/dist/components/editor/CustomMarkView.js.map b/dist/components/editor/CustomMarkView.js.map deleted file mode 100644 index 8706773..0000000 --- a/dist/components/editor/CustomMarkView.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"CustomMarkView.js","sourceRoot":"","sources":["../../../src/client/components/editor/CustomMarkView.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAE3C,MAAM,OAAO,cAAc;IAOvB,YAAY,IAAe,EAAE,IAAgB,EAAE,MAAoB,EAAE,WAAyB;QAC1F,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAE/B,MAAM,EAAE,GAAG,QAAQ,CAAC,aAAa,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/components/editor/editor.d.ts b/dist/components/editor/editor.d.ts deleted file mode 100644 index ac70f05..0000000 --- a/dist/components/editor/editor.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { LitElement } from 'lit-element'; -import { TemplateResult } from 'lit-html'; -import { EditorView } from 'prosemirror-view'; -export default class CustomMark extends LitElement { - editorView: EditorView; - constructor(); - protected firstUpdated(): void; - private initEditor; - protected render(): TemplateResult; -} diff --git a/dist/components/editor/editor.js b/dist/components/editor/editor.js deleted file mode 100644 index 5870111..0000000 --- a/dist/components/editor/editor.js +++ /dev/null @@ -1,57 +0,0 @@ -var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -var __metadata = (this && this.__metadata) || function (k, v) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); -}; -import { LitElement, customElement } from 'lit-element'; -import { html } from 'lit-html'; -// prosemirror modules -import { EditorState } from 'prosemirror-state'; -import { EditorView } from 'prosemirror-view'; -import { Schema, DOMParser } from 'prosemirror-model'; -import { schema } from 'prosemirror-schema-basic'; -import { addListNodes } from 'prosemirror-schema-list'; -import { exampleSetup } from 'prosemirror-example-setup'; -import { marks } from './marks'; -import { CustomMarkView } from './CustomMarkView'; -// Mix the nodes from prosemirror-schema-list into the basic schema to -// create a schema with list support. -const mySchema = new Schema({ - nodes: addListNodes(schema.spec.nodes, 'paragraph block*', 'block'), - marks, -}); -let CustomMark = class CustomMark extends LitElement { - constructor() { - super(); - } - firstUpdated() { - this.initEditor(); - } - initEditor() { - const container = document.createElement('div'); - container.innerHTML = this.innerHTML; - this.innerHTML = ''; - this.editorView = new EditorView(this, { - state: EditorState.create({ - doc: DOMParser.fromSchema(mySchema).parse(container), - plugins: exampleSetup({ schema: mySchema }).concat(CustomMarkView.getPlugin()), - }), - }); - } - render() { - return html ` -
- - `; - } -}; -CustomMark = __decorate([ - customElement('prosemirror-editor'), - __metadata("design:paramtypes", []) -], CustomMark); -export default CustomMark; -//# sourceMappingURL=editor.js.map \ No newline at end of file diff --git a/dist/components/editor/editor.js.map b/dist/components/editor/editor.js.map deleted file mode 100644 index b907b9f..0000000 --- a/dist/components/editor/editor.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"editor.js","sourceRoot":"","sources":["../../../src/client/components/editor/editor.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACxD,OAAO,EAAE,IAAI,EAAkB,MAAM,UAAU,CAAC;AAEhD,sBAAsB;AACtB,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAEzD,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,sEAAsE;AACtE,qCAAqC;AAErC,MAAM,QAAQ,GAAG,IAAI,MAAM,CAAC;IACxB,KAAK,EAAE,YAAY,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,kBAAkB,EAAE,OAAO,CAAC;IACnE,KAAK;CACR,CAAC,CAAC;AAGH,IAAqB,UAAU,GAA/B,MAAqB,UAAW,SAAQ,UAAU;IAG9C;QACI,KAAK,EAAE,CAAC;IACZ,CAAC;IAES,YAAY;QAClB,IAAI,CAAC,UAAU,EAAE,CAAC;IACtB,CAAC;IAEO,UAAU;QACd,MAAM,SAAS,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;QAChD,SAAS,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC;QACrC,IAAI,CAAC,SAAS,GAAG,EAAE,CAAC;QAEpB,IAAI,CAAC,UAAU,GAAG,IAAI,UAAU,CAAC,IAAI,EAAE;YACnC,KAAK,EAAE,WAAW,CAAC,MAAM,CAAC;gBACtB,GAAG,EAAE,SAAS,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC;gBACpD,OAAO,EAAE,YAAY,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,CAAC,MAAM,CAAC,cAAc,CAAC,SAAS,EAAE,CAAC;aACjF,CAAC;SACL,CAAC,CAAC;IACP,CAAC;IAES,MAAM;QACZ,OAAO,IAAI,CAAA;;;SAGV,CAAC;IACN,CAAC;CACJ,CAAA;AA9BoB,UAAU;IAD9B,aAAa,CAAC,oBAAoB,CAAC;;GACf,UAAU,CA8B9B;eA9BoB,UAAU"} \ No newline at end of file diff --git a/dist/components/editor/marks.d.ts b/dist/components/editor/marks.d.ts deleted file mode 100644 index d1bf291..0000000 --- a/dist/components/editor/marks.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { MarkSpec } from 'prosemirror-model'; -export declare const marks: { - [key: string]: MarkSpec; -}; diff --git a/dist/components/editor/marks.js b/dist/components/editor/marks.js deleted file mode 100644 index e2169da..0000000 --- a/dist/components/editor/marks.js +++ /dev/null @@ -1,14 +0,0 @@ -const myCustomMark = { - attrs: { - 'reflected-attribute': { default: 'default' }, - }, - parseDOM: [ - { - tag: 'my-custom-mark[reflected-attribute]', - }, - ], -}; -export const marks = { - myCustomMark, -}; -//# sourceMappingURL=marks.js.map \ No newline at end of file diff --git a/dist/components/editor/marks.js.map b/dist/components/editor/marks.js.map deleted file mode 100644 index 9d79d83..0000000 --- a/dist/components/editor/marks.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"marks.js","sourceRoot":"","sources":["../../../src/client/components/editor/marks.ts"],"names":[],"mappings":"AAEA,MAAM,YAAY,GAAa;IAC3B,KAAK,EAAE;QACH,qBAAqB,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE;KAChD;IACD,QAAQ,EAAE;QACN;YACI,GAAG,EAAE,qCAAqC;SAC7C;KACJ;CACJ,CAAC;AAEF,MAAM,CAAC,MAAM,KAAK,GAAgC;IAC9C,YAAY;CACf,CAAC"} \ No newline at end of file diff --git a/dist/components/menu/menuView.d.ts b/dist/components/menu/menuView.d.ts deleted file mode 100644 index 6928be6..0000000 --- a/dist/components/menu/menuView.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -declare class MenuView { - items: any; - editorView: any; - dom: any; - constructor(items: any, editorView: any); - update(): void; - destroy(): void; -} diff --git a/dist/components/menu/menuView.js b/dist/components/menu/menuView.js deleted file mode 100644 index ee701cf..0000000 --- a/dist/components/menu/menuView.js +++ /dev/null @@ -1,26 +0,0 @@ -class MenuView { - constructor(items, editorView) { - this.items = items; - this.editorView = editorView; - this.dom = document.createElement("div"); - this.dom.className = "menubar"; - items.forEach(({ dom }) => this.dom.appendChild(dom)); - this.update(); - this.dom.addEventListener("mousedown", e => { - e.preventDefault(); - editorView.focus(); - items.forEach(({ command, dom }) => { - if (dom.contains(e.target)) - command(editorView.state, editorView.dispatch, editorView); - }); - }); - } - update() { - this.items.forEach(({ command, dom }) => { - let active = command(this.editorView.state, null, this.editorView); - dom.style.display = active ? "" : "none"; - }); - } - destroy() { this.dom.remove(); } -} -//# sourceMappingURL=menuView.js.map \ No newline at end of file diff --git a/dist/components/menu/menuView.js.map b/dist/components/menu/menuView.js.map deleted file mode 100644 index a2f6470..0000000 --- a/dist/components/menu/men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