etherpad-webcomponents 0.0.5 → 0.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (145) hide show
  1. package/dist/EpDropdown.d.ts +3 -0
  2. package/dist/EpDropdown.d.ts.map +1 -1
  3. package/dist/EpDropdown.js +30 -4
  4. package/dist/EpDropdown.js.map +1 -1
  5. package/dist/EpEditor.d.ts +108 -0
  6. package/dist/EpEditor.d.ts.map +1 -0
  7. package/dist/EpEditor.js +288 -0
  8. package/dist/EpEditor.js.map +1 -0
  9. package/dist/editor/AceEditor.d.ts +204 -0
  10. package/dist/editor/AceEditor.d.ts.map +1 -0
  11. package/dist/editor/AceEditor.js +2847 -0
  12. package/dist/editor/AceEditor.js.map +1 -0
  13. package/dist/editor/AttributeManager.d.ts +25 -0
  14. package/dist/editor/AttributeManager.d.ts.map +1 -0
  15. package/dist/editor/AttributeManager.js +236 -0
  16. package/dist/editor/AttributeManager.js.map +1 -0
  17. package/dist/editor/AttributeMap.d.ts +13 -0
  18. package/dist/editor/AttributeMap.d.ts.map +1 -0
  19. package/dist/editor/AttributeMap.js +37 -0
  20. package/dist/editor/AttributeMap.js.map +1 -0
  21. package/dist/editor/AttributePool.d.ts +22 -0
  22. package/dist/editor/AttributePool.d.ts.map +1 -0
  23. package/dist/editor/AttributePool.js +101 -0
  24. package/dist/editor/AttributePool.js.map +1 -0
  25. package/dist/editor/Builder.d.ts +15 -0
  26. package/dist/editor/Builder.d.ts.map +1 -0
  27. package/dist/editor/Builder.js +47 -0
  28. package/dist/editor/Builder.js.map +1 -0
  29. package/dist/editor/Changeset.d.ts +61 -0
  30. package/dist/editor/Changeset.d.ts.map +1 -0
  31. package/dist/editor/Changeset.js +942 -0
  32. package/dist/editor/Changeset.js.map +1 -0
  33. package/dist/editor/ChangesetUtils.d.ts +11 -0
  34. package/dist/editor/ChangesetUtils.d.ts.map +1 -0
  35. package/dist/editor/ChangesetUtils.js +30 -0
  36. package/dist/editor/ChangesetUtils.js.map +1 -0
  37. package/dist/editor/MergingOpAssembler.d.ts +13 -0
  38. package/dist/editor/MergingOpAssembler.d.ts.map +1 -0
  39. package/dist/editor/MergingOpAssembler.js +60 -0
  40. package/dist/editor/MergingOpAssembler.js.map +1 -0
  41. package/dist/editor/Op.d.ts +10 -0
  42. package/dist/editor/Op.d.ts.map +1 -0
  43. package/dist/editor/Op.js +18 -0
  44. package/dist/editor/Op.js.map +1 -0
  45. package/dist/editor/OpAssembler.d.ts +9 -0
  46. package/dist/editor/OpAssembler.d.ts.map +1 -0
  47. package/dist/editor/OpAssembler.js +16 -0
  48. package/dist/editor/OpAssembler.js.map +1 -0
  49. package/dist/editor/OpIter.d.ts +9 -0
  50. package/dist/editor/OpIter.d.ts.map +1 -0
  51. package/dist/editor/OpIter.js +22 -0
  52. package/dist/editor/OpIter.js.map +1 -0
  53. package/dist/editor/SmartOpAssembler.d.ts +21 -0
  54. package/dist/editor/SmartOpAssembler.d.ts.map +1 -0
  55. package/dist/editor/SmartOpAssembler.js +71 -0
  56. package/dist/editor/SmartOpAssembler.js.map +1 -0
  57. package/dist/editor/StringAssembler.d.ts +7 -0
  58. package/dist/editor/StringAssembler.d.ts.map +1 -0
  59. package/dist/editor/StringAssembler.js +15 -0
  60. package/dist/editor/StringAssembler.js.map +1 -0
  61. package/dist/editor/StringIterator.d.ts +13 -0
  62. package/dist/editor/StringIterator.d.ts.map +1 -0
  63. package/dist/editor/StringIterator.js +29 -0
  64. package/dist/editor/StringIterator.js.map +1 -0
  65. package/dist/editor/TextLinesMutator.d.ts +31 -0
  66. package/dist/editor/TextLinesMutator.d.ts.map +1 -0
  67. package/dist/editor/TextLinesMutator.js +198 -0
  68. package/dist/editor/TextLinesMutator.js.map +1 -0
  69. package/dist/editor/ace2_common.d.ts +9 -0
  70. package/dist/editor/ace2_common.d.ts.map +1 -0
  71. package/dist/editor/ace2_common.js +31 -0
  72. package/dist/editor/ace2_common.js.map +1 -0
  73. package/dist/editor/attributes.d.ts +20 -0
  74. package/dist/editor/attributes.d.ts.map +1 -0
  75. package/dist/editor/attributes.js +54 -0
  76. package/dist/editor/attributes.js.map +1 -0
  77. package/dist/editor/browser_flags.d.ts +7 -0
  78. package/dist/editor/browser_flags.d.ts.map +1 -0
  79. package/dist/editor/browser_flags.js +8 -0
  80. package/dist/editor/browser_flags.js.map +1 -0
  81. package/dist/editor/changesettracker.d.ts +54 -0
  82. package/dist/editor/changesettracker.d.ts.map +1 -0
  83. package/dist/editor/changesettracker.js +193 -0
  84. package/dist/editor/changesettracker.js.map +1 -0
  85. package/dist/editor/colorutils.d.ts +22 -0
  86. package/dist/editor/colorutils.d.ts.map +1 -0
  87. package/dist/editor/colorutils.js +81 -0
  88. package/dist/editor/colorutils.js.map +1 -0
  89. package/dist/editor/contentcollector.d.ts +52 -0
  90. package/dist/editor/contentcollector.d.ts.map +1 -0
  91. package/dist/editor/contentcollector.js +692 -0
  92. package/dist/editor/contentcollector.js.map +1 -0
  93. package/dist/editor/core/EventBus.d.ts +187 -0
  94. package/dist/editor/core/EventBus.d.ts.map +1 -0
  95. package/dist/editor/core/EventBus.js +169 -0
  96. package/dist/editor/core/EventBus.js.map +1 -0
  97. package/dist/editor/cssmanager.d.ts +6 -0
  98. package/dist/editor/cssmanager.d.ts.map +1 -0
  99. package/dist/editor/cssmanager.js +35 -0
  100. package/dist/editor/cssmanager.js.map +1 -0
  101. package/dist/editor/domline.d.ts +35 -0
  102. package/dist/editor/domline.d.ts.map +1 -0
  103. package/dist/editor/domline.js +267 -0
  104. package/dist/editor/domline.js.map +1 -0
  105. package/dist/editor/html_escape.d.ts +3 -0
  106. package/dist/editor/html_escape.d.ts.map +1 -0
  107. package/dist/editor/html_escape.js +8 -0
  108. package/dist/editor/html_escape.js.map +1 -0
  109. package/dist/editor/linestylefilter.d.ts +22 -0
  110. package/dist/editor/linestylefilter.d.ts.map +1 -0
  111. package/dist/editor/linestylefilter.js +298 -0
  112. package/dist/editor/linestylefilter.js.map +1 -0
  113. package/dist/editor/skiplist.d.ts +51 -0
  114. package/dist/editor/skiplist.d.ts.map +1 -0
  115. package/dist/editor/skiplist.js +327 -0
  116. package/dist/editor/skiplist.js.map +1 -0
  117. package/dist/editor/types/AText.d.ts +5 -0
  118. package/dist/editor/types/AText.d.ts.map +1 -0
  119. package/dist/editor/types/AText.js +2 -0
  120. package/dist/editor/types/AText.js.map +1 -0
  121. package/dist/editor/types/Attribute.d.ts +2 -0
  122. package/dist/editor/types/Attribute.d.ts.map +1 -0
  123. package/dist/editor/types/Attribute.js +2 -0
  124. package/dist/editor/types/Attribute.js.map +1 -0
  125. package/dist/editor/types/ChangeSet.d.ts +7 -0
  126. package/dist/editor/types/ChangeSet.d.ts.map +1 -0
  127. package/dist/editor/types/ChangeSet.js +2 -0
  128. package/dist/editor/types/ChangeSet.js.map +1 -0
  129. package/dist/editor/types/ChangeSetBuilder.d.ts +7 -0
  130. package/dist/editor/types/ChangeSetBuilder.d.ts.map +1 -0
  131. package/dist/editor/types/ChangeSetBuilder.js +2 -0
  132. package/dist/editor/types/ChangeSetBuilder.js.map +1 -0
  133. package/dist/editor/types/RepModel.d.ts +25 -0
  134. package/dist/editor/types/RepModel.d.ts.map +1 -0
  135. package/dist/editor/types/RepModel.js +2 -0
  136. package/dist/editor/types/RepModel.js.map +1 -0
  137. package/dist/editor/undomodule.d.ts +30 -0
  138. package/dist/editor/undomodule.d.ts.map +1 -0
  139. package/dist/editor/undomodule.js +266 -0
  140. package/dist/editor/undomodule.js.map +1 -0
  141. package/dist/index.d.ts +7 -0
  142. package/dist/index.d.ts.map +1 -1
  143. package/dist/index.js +4 -0
  144. package/dist/index.js.map +1 -1
  145. package/package.json +7 -2
@@ -8,6 +8,7 @@ export declare class EpDropdown extends LitElement {
8
8
  private _content;
9
9
  private _focusIndex;
10
10
  private _hoverCloseTimer;
11
+ private _mouseInContent;
11
12
  private _onDocClick;
12
13
  private _onDocKeydown;
13
14
  private _onViewportChange;
@@ -21,6 +22,8 @@ export declare class EpDropdown extends LitElement {
21
22
  private _onTriggerClick;
22
23
  private _onMouseEnter;
23
24
  private _onMouseLeave;
25
+ private _onContentMouseEnter;
26
+ private _onContentMouseLeave;
24
27
  private _onOpened;
25
28
  private _onClosed;
26
29
  private _removeGlobalListeners;
@@ -1 +1 @@
1
- {"version":3,"file":"EpDropdown.d.ts","sourceRoot":"","sources":["../src/EpDropdown.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAa,MAAM,KAAK,CAAC;AAI5C,KAAK,WAAW,GAAG,OAAO,GAAG,OAAO,CAAC;AAErC,qBACa,UAAW,SAAQ,UAAU;IACxC,MAAM,CAAC,MAAM,0BAmCX;IAE2B,OAAO,EAAE,WAAW,CAAW;IAC/B,KAAK,EAAE,MAAM,GAAG,OAAO,CAAU;IAClB,IAAI,UAAS;IAE9B,OAAO,CAAC,QAAQ,CAAe;IAEjD,OAAO,CAAC,WAAW,CAAM;IAClC,OAAO,CAAC,gBAAgB,CAA8C;IAEtE,OAAO,CAAC,WAAW,CAGjB;IAEF,OAAO,CAAC,aAAa,CAGnB;IAEF,OAAO,CAAC,iBAAiB,CAAiC;IAE1D,iBAAiB;IAWjB,oBAAoB;IAMpB,OAAO,CAAC,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC;IAOrC,MAAM;IACN,KAAK;IAEL,MAAM;IAgBN,OAAO,CAAC,kBAAkB;IAE1B,OAAO,CAAC,eAAe;IAKvB,OAAO,CAAC,aAAa;IASrB,OAAO,CAAC,aAAa;IAKrB,OAAO,CAAC,SAAS;IAajB,OAAO,CAAC,SAAS;IAOjB,OAAO,CAAC,sBAAsB;IAO9B,OAAO,CAAC,gBAAgB;IA2BxB,OAAO,CAAC,SAAS;IAIjB,OAAO,CAAC,cAAc;IAoCtB,OAAO,CAAC,UAAU;IAgBlB,OAAO,CAAC,cAAc;IAUtB,OAAO,CAAC,eAAe;IAIvB,OAAO,CAAC,WAAW;CAOpB;AAED,OAAO,C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AAU,qBAAqB;QAC7B,aAAa,EAAE,UAAU,CAAC;KAC3B;CACF"}
@@ -14,11 +14,17 @@ let EpDropdown = class EpDropdown extends LitElement {
14
14
  this.open = false;
15
15
  this._focusIndex = -1;
16
16
  this._hoverCloseTimer = null;
17
+ this._mouseInContent = false;
17
18
  this._onDocClick = (e) => {
18
19
  if (!this.open)
19
20
  return;
20
- if (!e.composedPath().includes(this))
21
- this.close();
21
+ const path = e.composedPath();
22
+ // Keep open if click is inside host OR inside the fixed-position content panel
23
+ if (path.includes(this))
24
+ return;
25
+ if (this._content && path.includes(this._content))
26
+ return;
27
+ this.close();
22
28
  };
23
29
  this._onDocKeydown = (e) => {
24
30
  if (!this.open)
@@ -64,7 +70,9 @@ let EpDropdown = class EpDropdown extends LitElement {
64
70
  <slot name="trigger"></slot>
65
71
  </div>
66
72
  <div class="content-wrapper" role="listbox" part="content"
67
- @mousedown="${this._preventFocusSteal}">
73
+ @mousedown="${this._preventFocusSteal}"
74
+ @mouseenter="${this._onContentMouseEnter}"
75
+ @mouseleave="${this._onContentMouseLeave}">
68
76
  <slot name="content"></slot>
69
77
  </div>
70
78
  `;
@@ -86,7 +94,24 @@ let EpDropdown = class EpDropdown extends LitElement {
86
94
  _onMouseLeave() {
87
95
  if (this.trigger !== 'hover')
88
96
  return;
89
- this._hoverCloseTimer = setTimeout(() => this.close(), 200);
97
+ this._hoverCloseTimer = setTimeout(() => {
98
+ if (!this._mouseInContent)
99
+ this.close();
100
+ }, 200);
101
+ }
102
+ _onContentMouseEnter() {
103
+ this._mouseInContent = true;
104
+ // Cancel any pending hover-close timer
105
+ if (this._hoverCloseTimer != null) {
106
+ clearTimeout(this._hoverCloseTimer);
107
+ this._hoverCloseTimer = null;
108
+ }
109
+ }
110
+ _onContentMouseLeave() {
111
+ this._mouseInContent = false;
112
+ if (this.trigger === 'hover') {
113
+ this._hoverCloseTimer = setTimeout(() => this.close(), 200);
114
+ }
90
115
  }
91
116
  _onOpened() {
92
117
  this._focusIndex = -1;
@@ -103,6 +128,7 @@ let EpDropdown = class EpDropdown extends LitElement {
103
128
  _onClosed() {
104
129
  this._content?.classList.remove('visible');
105
130
  this._focusIndex = -1;
131
+ this._mouseInContent = false;
106
132
  this._clearItemFocus();
107
133
  this._removeGlobalListeners();
108
134
  }
@@ -1 +1 @@
1
- {"version":3,"file":"EpDropdown.js","sourceRoot":"","sources":["../src/EpDropdown.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAMnE,IAAM,UAAU,GAAhB,MAAM,UAAW,SAAQ,UAAU;IAAnC;;QAsCwB,YAAO,GAAgB,OAAO,CAAC;QAC/B,UAAK,GAAqB,MAAM,CAAC;QAClB,SAAI,GAAG,KAAK,CAAC;QAIxC,gBAAW,GAAG,CAAC,CAAC,CAAC;QAC1B,qBAAgB,GAAyC,IAAI,CAAC;QAE9D,gBAAW,GAAG,CAAC,CAAQ,EAAE,EAAE;YACjC,IAAI,CAAC,IAAI,CAAC,IAAI;gBAAE,OAAO;YACvB,IAAI,CAAC,CAAC,CAAC,YAAY,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC;gBAAE,IAAI,CAAC,KAAK,EAAE,CAAC;QACrD,CAAC,CAAC;QAEM,kBAAa,GAAG,CAAC,CAAgB,EAAE,EAAE;YAC3C,IAAI,CAAC,IAAI,CAAC,IAAI;gBAAE,OAAO;YACvB,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC;QACzB,CAAC,CAAC;QAEM,sBAAiB,GAAG,GAAG,EAAE,CAAC,IAAI,CAAC,gBAAgB,EAAE,CAAC;IAqM5D,CAAC;IAnMC,iBAAiB;QACf,KAAK,CAAC,iBAAiB,EAAE,CAAC;QAC1B,IAAI,CAAC,gBAAgB,CAAC,OAAO,EAA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AAE,CAAC;IACf,CAAC;;AAtRM,iBAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmClB,AAnCY,CAmCX;AAE2B;IAA5B,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;2CAAgC;AAC/B;IAA5B,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;yCAAkC;AAClB;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;wCAAc;AAEtB;IAAlC,KAAK,CAAC,kBAAkB,CAAC;4CAAgC;AAEzC;IAAhB,KAAK,EAAE;+CAA0B;AA5CvB,UAAU;IADtB,aAAa,CAAC,aAAa,CAAC;GAChB,UAAU,CAwRtB"}
@@ -0,0 +1,108 @@
1
+ import { LitElement } from 'lit';
2
+ import { AceEditor } from './editor/AceEditor.js';
3
+ import type AttributePool from './editor/AttributePool.js';
4
+ /**
5
+ * `<ep-editor>` — A standalone rich-text editor web component based on
6
+ * Etherpad's Ace editor engine.
7
+ *
8
+ * Supports bold, italic, underline, strikethrough, ordered/unordered lists,
9
+ * indentation, undo/redo, and changeset-based collaboration.
10
+ *
11
+ * @fires content-changed - When the document text changes. Detail: `{ text: string }`
12
+ * @fires selection-changed - When the selection changes. Detail: `{ selStart, selEnd }`
13
+ * @fires ready - When the editor has finished initializing.
14
+ */
15
+ export declare class EpEditor extends LitElement {
16
+ static styles: import("lit").CSSResult;
17
+ /** Initial text content for the editor. */
18
+ content: string;
19
+ /** Whether the editor is read-only. */
20
+ readonly: boolean;
21
+ /** Whether text wrapping is enabled. */
22
+ wrap: boolean;
23
+ /** The current author ID for attributing changes. */
24
+ authorId: string;
25
+ private _ready;
26
+ private _editor;
27
+ private _initialContentSet;
28
+ get editor(): AceEditor | null;
29
+ protected firstUpdated(): void;
30
+ protected updated(changedProperties: Map<string, unknown>): void;
31
+ disconnectedCallback(): void;
32
+ /** Returns the current document text. */
33
+ getText(): string;
34
+ /** Sets the document text, replacing all current content. */
35
+ setText(text: string): void;
36
+ /** Returns the attributed text with the attribute pool. */
37
+ getAttributedText(): {
38
+ text: string;
39
+ attribs: string;
40
+ pool: AttributePool;
41
+ } | null;
42
+ /** Sets the attributed text (for advanced/collaborative use). */
43
+ setAttributedText(atext: {
44
+ text: string;
45
+ attribs: string;
46
+ }, apoolJsonObj?: unknown): void;
47
+ /** Toggles a formatting attribute on the current selection (e.g. 'bold', 'italic'). */
48
+ toggleFormat(name: string): void;
49
+ /** Sets a formatting attribute on the current selection. */
50
+ setFormattingAttribute(name: string, value: string): void;
51
+ /** Returns whether the given attribute is active on the current selection. */
52
+ getFormattingAttribute(name: string): boolean;
53
+ /** Inserts an unordered (bullet) list at the current line. */
54
+ insertUnorderedList(): void;
55
+ /** Inserts an ordered (numbered) list at the current line. */
56
+ insertOrderedList(): void;
57
+ /** Indents or outdents the current selection. */
58
+ indentOutdent(isOut: boolean): void;
59
+ /** Performs undo. */
60
+ undo(): void;
61
+ /** Performs redo. */
62
+ redo(): void;
63
+ /** Focuses the editor. */
64
+ focusEditor(): void;
65
+ /**
66
+ * Applies an external changeset (for collaboration).
67
+ * @param cs - The encoded changeset string.
68
+ * @param optAuthor - Optional author ID.
69
+ * @param apoolJsonObj - Optional attribute pool JSON.
70
+ */
71
+ applyChangeset(cs: string, optAuthor?: string, apoolJsonObj?: unknown): void;
72
+ /**
73
+ * Prepares the user's pending changes as a changeset (for collaboration).
74
+ * Returns `{ changeset, apool }` or null if no changes.
75
+ */
76
+ prepareUserChangeset(): {
77
+ changeset: string | null;
78
+ apool: unknown;
79
+ } | null;
80
+ /** Sets an author's display color. */
81
+ setAuthorInfo(author: string, info: {
82
+ bgcolor?: string;
83
+ }): void;
84
+ /** Sets the base text for collaboration tracking. */
85
+ setBaseText(txt: string): void;
86
+ /** Sets the base attributed text from the server. */
87
+ setBaseAttributedText(atxt: {
88
+ text: string;
89
+ attribs: string;
90
+ }, apoolJsonObj?: unknown): void;
91
+ /** Applies remote changes to the base text. */
92
+ applyChangesToBase(c: string, optAuthor?: string, apoolJsonObj?: unknown): void;
93
+ /** Commits prepared changeset to the base after server confirmation. */
94
+ applyPreparedChangesetToBase(): void;
95
+ /** Registers a callback for when the user makes changes. */
96
+ setUserChangeNotificationCallback(f: () => void): void;
97
+ /** Sets an editor property (wraps, showsauthorcolors, etc.). */
98
+ setProperty(key: string, value: unknown): void;
99
+ /** Returns the international composition state. */
100
+ getInInternationalComposition(): unknown;
101
+ protected render(): import("lit-html").TemplateResult<1>;
102
+ }
103
+ declare global {
104
+ interface HTMLElementTagNameMap {
105
+ 'ep-editor': EpEditor;
106
+ }
107
+ }
108
+ //# sourceMappingURL=EpEditor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EpEditor.d.ts","sourceRoot":"","sources":["../src/EpEditor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAa,MAAM,KAAK,CAAC;AAE5C,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,KAAK,aAAa,MAAM,2BAA2B,CAAC;AAE3D;;;;;;;;;;GAUG;AACH,qBACa,QAAS,SAAQ,UAAU;IACtC,MAAM,CAAC,MAAM,0BAqDX;IAEF,2CAA2C;IACf,OAAO,SAAM;IAEzC,uCAAuC;IACK,QAAQ,UAAS;IAE7D,wCAAwC;IACX,IAAI,UAAQ;IAEzC,qDAAqD;IACD,QAAQ,SAAM;IAEzD,OAAO,CAAC,MAAM,CAAS;IAEhC,OAAO,CAAC,OAAO,CAA0B;IACzC,OAAO,CAAC,kBAAkB,CAAS;IAEnC,IAAI,MAAM,IAAI,SAAS,GAAG,IAAI,CAE7B;IAID,SAAS,CAAC,YAAY;IAyCtB,SAAS,CAAC,OAAO,CAAC,iBAAiB,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC;IAgBzD,oBAAoB;IAUpB,yCAAyC;IACzC,OAAO,IAAI,MA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;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,EAAE,YAAY,CAAC,EAAE,OAAO,GAAG,IAAI;IAI5F,+CAA+C;IAC/C,kBAAkB,CAAC,CAAC,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,OAAO,GAAG,IAAI;IAI/E,wEAAwE;IACxE,4BAA4B,IAAI,IAAI;IAIpC,4DAA4D;IAC5D,iCAAiC,CAAC,CAAC,EAAE,MAAM,IAAI,GAAG,IAAI;IAItD,gEAAgE;IAChE,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,IAAI;IAI9C,mDAAmD;IACnD,6BAA6B,IAAI,OAAO;IAMxC,SAAS,CAAC,MAAM;CAYjB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,WAAW,EAAE,QAAQ,CAAC;KACvB;CACF"}
@@ -0,0 +1,288 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ 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;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ import { LitElement, html, css } from 'lit';
8
+ import { customElement, property, state } from 'lit/decorators.js';
9
+ import { AceEditor } from './editor/AceEditor.js';
10
+ /**
11
+ * `<ep-editor>` — A standalone rich-text editor web component based on
12
+ * Etherpad's Ace editor engine.
13
+ *
14
+ * Supports bold, italic, underline, strikethrough, ordered/unordered lists,
15
+ * indentation, undo/redo, and changeset-based collaboration.
16
+ *
17
+ * @fires content-changed - When the document text changes. Detail: `{ text: string }`
18
+ * @fires selection-changed - When the selection changes. Detail: `{ selStart, selEnd }`
19
+ * @fires ready - When the editor has finished initializing.
20
+ */
21
+ let EpEditor = class EpEditor extends LitElement {
22
+ constructor() {
23
+ super(...arguments);
24
+ /** Initial text content for the editor. */
25
+ this.content = '';
26
+ /** Whether the editor is read-only. */
27
+ this.readonly = false;
28
+ /** Whether text wrapping is enabled. */
29
+ this.wrap = true;
30
+ /** The current author ID for attributing changes. */
31
+ this.authorId = '';
32
+ this._ready = false;
33
+ this._editor = null;
34
+ this._initialContentSet = false;
35
+ }
36
+ get editor() {
37
+ return this._editor;
38
+ }
39
+ // ── Lifecycle ──────────────────────────────────────────────
40
+ firstUpdated() {
41
+ const container = this.shadowRoot.querySelector('.ep-editor-container');
42
+ if (!container)
43
+ return;
44
+ this._editor = new AceEditor(container);
45
+ this._editor.init().then(() => {
46
+ this._ready = true;
47
+ if (this.content && !this._initialContentSet) {
48
+ this._editor.setText(this.content);
49
+ this._initialContentSet = true;
50
+ }
51
+ this._editor.setEditable(!this.readonly);
52
+ this._editor.setWraps(this.wrap);
53
+ if (this.authorId) {
54
+ this._editor.setAuthor(this.authorId);
55
+ }
56
+ // Wire up events from the engine
57
+ this._editor.onContentChanged = (text) => {
58
+ this.dispatchEvent(new CustomEvent('content-changed', {
59
+ detail: { text },
60
+ bubbles: true,
61
+ composed: true,
62
+ }));
63
+ };
64
+ this._editor.onSelectionChanged = (selStart, selEnd) => {
65
+ this.dispatchEvent(new CustomEvent('selection-changed', {
66
+ detail: { selStart, selEnd },
67
+ bubbles: true,
68
+ composed: true,
69
+ }));
70
+ };
71
+ this.dispatchEvent(new CustomEvent('ready', { bubbles: true, composed: true }));
72
+ });
73
+ }
74
+ updated(changedProperties) {
75
+ if (!this._editor || !this._ready)
76
+ return;
77
+ if (changedProperties.has('readonly')) {
78
+ this._editor.setEditable(!this.readonly);
79
+ }
80
+ if (changedProperties.has('wrap')) {
81
+ this._editor.setWraps(this.wrap);
82
+ }
83
+ if (changedProperties.has('authorId') && this.authorId) {
84
+ this._editor.setAuthor(this.authorId);
85
+ }
86
+ }
87
+ disconnectedCallback() {
88
+ super.disconnectedCallback();
89
+ if (this._editor) {
90
+ this._editor.dispose();
91
+ this._editor = null;
92
+ }
93
+ }
94
+ // ── Public API ─────────────────────────────────────────────
95
+ /** Returns the current document text. */
96
+ getText() {
97
+ return this._editor?.getText() ?? '';
98
+ }
99
+ /** Sets the document text, replacing all current content. */
100
+ setText(text) {
101
+ if (this._editor && this._ready) {
102
+ this._editor.setText(text);
103
+ }
104
+ else {
105
+ this.content = text;
106
+ }
107
+ }
108
+ /** Returns the attributed text with the attribute pool. */
109
+ getAttributedText() {
110
+ return this._editor?.getAttributedText() ?? null;
111
+ }
112
+ /** Sets the attributed text (for advanced/collaborative use). */
113
+ setAttributedText(atext, apoolJsonObj) {
114
+ this._editor?.setAttributedText(atext, apoolJsonObj);
115
+ }
116
+ /** Toggles a formatting attribute on the current selection (e.g. 'bold', 'italic'). */
117
+ toggleFormat(name) {
118
+ this._editor?.toggleAttribute(name);
119
+ }
120
+ /** Sets a formatting attribute on the current selection. */
121
+ setFormattingAttribute(name, value) {
122
+ this._editor?.setAttribute(name, value);
123
+ }
124
+ /** Returns whether the given attribute is active on the current selection. */
125
+ getFormattingAttribute(name) {
126
+ return this._editor?.getAttribute(name) ?? false;
127
+ }
128
+ /** Inserts an unordered (bullet) list at the current line. */
129
+ insertUnorderedList() {
130
+ this._editor?.insertUnorderedList();
131
+ }
132
+ /** Inserts an ordered (numbered) list at the current line. */
133
+ insertOrderedList() {
134
+ this._editor?.insertOrderedList();
135
+ }
136
+ /** Indents or outdents the current selection. */
137
+ indentOutdent(isOut) {
138
+ this._editor?.indentOutdent(isOut);
139
+ }
140
+ /** Performs undo. */
141
+ undo() {
142
+ this._editor?.undo();
143
+ }
144
+ /** Performs redo. */
145
+ redo() {
146
+ this._editor?.redo();
147
+ }
148
+ /** Focuses the editor. */
149
+ focusEditor() {
150
+ this._editor?.focus();
151
+ }
152
+ /**
153
+ * Applies an external changeset (for collaboration).
154
+ * @param cs - The encoded changeset string.
155
+ * @param optAuthor - Optional author ID.
156
+ * @param apoolJsonObj - Optional attribute pool JSON.
157
+ */
158
+ applyChangeset(cs, optAuthor, apoolJsonObj) {
159
+ this._editor?.applyChangeset(cs, optAuthor, apoolJsonObj);
160
+ }
161
+ /**
162
+ * Prepares the user's pending changes as a changeset (for collaboration).
163
+ * Returns `{ changeset, apool }` or null if no changes.
164
+ */
165
+ prepareUserChangeset() {
166
+ return this._editor?.prepareUserChangeset() ?? null;
167
+ }
168
+ /** Sets an author's display color. */
169
+ setAuthorInfo(author, info) {
170
+ this._editor?.setAuthorInfo(author, info);
171
+ }
172
+ // ── Collaboration API ─────────────────────────────────────
173
+ /** Sets the base text for collaboration tracking. */
174
+ setBaseText(txt) {
175
+ this._editor?.setBaseText(txt);
176
+ }
177
+ /** Sets the base attributed text from the server. */
178
+ setBaseAttributedText(atxt, apoolJsonObj) {
179
+ this._editor?.setBaseAttributedText(atxt, apoolJsonObj);
180
+ }
181
+ /** Applies remote changes to the base text. */
182
+ applyChangesToBase(c, optAuthor, apoolJsonObj) {
183
+ this._editor?.applyChangesToBase(c, optAuthor, apoolJsonObj);
184
+ }
185
+ /** Commits prepared changeset to the base after server confirmation. */
186
+ applyPreparedChangesetToBase() {
187
+ this._editor?.applyPreparedChangesetToBase();
188
+ }
189
+ /** Registers a callback for when the user makes changes. */
190
+ setUserChangeNotificationCallback(f) {
191
+ this._editor?.setUserChangeNotificationCallback(f);
192
+ }
193
+ /** Sets an editor property (wraps, showsauthorcolors, etc.). */
194
+ setProperty(key, value) {
195
+ this._editor?.setProperty(key, value);
196
+ }
197
+ /** Returns the international composition state. */
198
+ getInInternationalComposition() {
199
+ return this._editor?.getInInternationalComposition() ?? null;
200
+ }
201
+ // ── Render ─────────────────────────────────────────────────
202
+ render() {
203
+ return html `
204
+ <div
205
+ class="ep-editor-container"
206
+ contenteditable="${this.readonly ? 'false' : 'true'}"
207
+ role="textbox"
208
+ aria-multiline="true"
209
+ aria-readonly="${this.readonly}"
210
+ spellcheck="true"
211
+ ></div>
212
+ `;
213
+ }
214
+ };
215
+ EpEditor.styles = css `
216
+ :host {
217
+ display: block;
218
+ position: relative;
219
+ min-height: 100px;
220
+ }
221
+
222
+ .ep-editor-container {
223
+ width: 100%;
224
+ height: 100%;
225
+ min-height: inherit;
226
+ overflow: auto;
227
+ font-family: var(--ep-editor-font, monospace);
228
+ font-size: var(--ep-editor-font-size, 14px);
229
+ line-height: var(--ep-editor-line-height, 1.6);
230
+ color: var(--ep-editor-color, #333);
231
+ background: var(--ep-editor-bg, #fff);
232
+ padding: var(--ep-editor-padding, 8px 12px);
233
+ box-sizing: border-box;
234
+ outline: none;
235
+ white-space: pre-wrap;
236
+ word-wrap: break-word;
237
+ }
238
+
239
+ .ep-editor-container:focus {
240
+ outline: none;
241
+ }
242
+
243
+ .ep-editor-container .list-bullet1 { list-style-type: disc; }
244
+ .ep-editor-container .list-bullet2 { list-style-type: circle; }
245
+ .ep-editor-container .list-bullet3 { list-style-type: square; }
246
+ .ep-editor-container .list-bullet4 { list-style-type: disc; }
247
+ .ep-editor-container .list-number1 { list-style-type: decimal; }
248
+ .ep-editor-container .list-number2 { list-style-type: lower-alpha; }
249
+ .ep-editor-container .list-number3 { list-style-type: lower-roman; }
250
+ .ep-editor-container .list-number4 { list-style-type: decimal; }
251
+
252
+ .ep-editor-container ul, .ep-editor-container ol {
253
+ padding-left: 1.5em;
254
+ margin: 0;
255
+ }
256
+
257
+ .ep-editor-container .tag\\:b, .ep-editor-container b { font-weight: bold; }
258
+ .ep-editor-container .tag\\:i, .ep-editor-container i { font-style: italic; }
259
+ .ep-editor-container .tag\\:u, .ep-editor-container u { text-decoration: underline; }
260
+ .ep-editor-container .tag\\:s, .ep-editor-container s { text-decoration: line-through; }
261
+
262
+ .ep-editor-container a { color: var(--ep-editor-link-color, #0366d6); text-decoration: underline; }
263
+
264
+ :host([readonly]) .ep-editor-container {
265
+ opacity: 0.85;
266
+ cursor: default;
267
+ }
268
+ `;
269
+ __decorate([
270
+ property({ type: String })
271
+ ], EpEditor.prototype, "content", void 0);
272
+ __decorate([
273
+ property({ type: Boolean, reflect: true })
274
+ ], EpEditor.prototype, "readonly", void 0);
275
+ __decorate([
276
+ property({ type: Boolean })
277
+ ], EpEditor.prototype, "wrap", void 0);
278
+ __decorate([
279
+ property({ type: String, attribute: 'author-id' })
280
+ ], EpEditor.prototype, "authorId", void 0);
281
+ __decorate([
282
+ state()
283
+ ], EpEditor.prototype, "_ready", void 0);
284
+ EpEditor = __decorate([
285
+ customElement('ep-editor')
286
+ ], EpEditor);
287
+ export { EpEditor };
288
+ //# sourceMappingURL=EpEditor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EpEditor.js","sourceRoot":"","sources":["../src/EpEditor.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAGlD;;;;;;;;;;GAUG;AAEI,IAAM,QAAQ,GAAd,MAAM,QAAS,SAAQ,UAAU;IAAjC;;QAwDL,2CAA2C;QACf,YAAO,GAAG,EAAE,CAAC;QAEzC,uCAAuC;QACK,aAAQ,GAAG,KAAK,CAAC;QAE7D,wCAAwC;QACX,SAAI,GAAG,IAAI,CAAC;QAEzC,qDAAqD;QACD,aAAQ,GAAG,EAAE,CAAC;QAEjD,WAAM,GAAG,KAAK,CAAC;QAExB,YAAO,GAAqB,IAAI,CAAC;QACjC,uBAAkB,GAAG,KAAK,CAAC;IA0NrC,CAAC;IAxNC,IAAI,MAAM;QACR,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;IAED,8DAA8D;IAEpD,YAAY;QACpB,MAAM,SAAS,GAAG,IAAI,CAAC,UA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