@rtif-sdk/web 1.0.0

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 (215) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +67 -0
  3. package/dist/block-drag-handler.d.ts +189 -0
  4. package/dist/block-drag-handler.d.ts.map +1 -0
  5. package/dist/block-drag-handler.js +745 -0
  6. package/dist/block-drag-handler.js.map +1 -0
  7. package/dist/block-renderer.d.ts +402 -0
  8. package/dist/block-renderer.d.ts.map +1 -0
  9. package/dist/block-renderer.js +424 -0
  10. package/dist/block-renderer.js.map +1 -0
  11. package/dist/clipboard.d.ts +178 -0
  12. package/dist/clipboard.d.ts.map +1 -0
  13. package/dist/clipboard.js +432 -0
  14. package/dist/clipboard.js.map +1 -0
  15. package/dist/command-bus.d.ts +113 -0
  16. package/dist/command-bus.d.ts.map +1 -0
  17. package/dist/command-bus.js +70 -0
  18. package/dist/command-bus.js.map +1 -0
  19. package/dist/composition.d.ts +220 -0
  20. package/dist/composition.d.ts.map +1 -0
  21. package/dist/composition.js +271 -0
  22. package/dist/composition.js.map +1 -0
  23. package/dist/content-extraction.d.ts +69 -0
  24. package/dist/content-extraction.d.ts.map +1 -0
  25. package/dist/content-extraction.js +228 -0
  26. package/dist/content-extraction.js.map +1 -0
  27. package/dist/content-handler-file.d.ts +40 -0
  28. package/dist/content-handler-file.d.ts.map +1 -0
  29. package/dist/content-handler-file.js +91 -0
  30. package/dist/content-handler-file.js.map +1 -0
  31. package/dist/content-handler-image.d.ts +82 -0
  32. package/dist/content-handler-image.d.ts.map +1 -0
  33. package/dist/content-handler-image.js +120 -0
  34. package/dist/content-handler-image.js.map +1 -0
  35. package/dist/content-handler-url.d.ts +129 -0
  36. package/dist/content-handler-url.d.ts.map +1 -0
  37. package/dist/content-handler-url.js +244 -0
  38. package/dist/content-handler-url.js.map +1 -0
  39. package/dist/content-handlers.d.ts +67 -0
  40. package/dist/content-handlers.d.ts.map +1 -0
  41. package/dist/content-handlers.js +263 -0
  42. package/dist/content-handlers.js.map +1 -0
  43. package/dist/content-pipeline.d.ts +383 -0
  44. package/dist/content-pipeline.d.ts.map +1 -0
  45. package/dist/content-pipeline.js +232 -0
  46. package/dist/content-pipeline.js.map +1 -0
  47. package/dist/cursor-nav.d.ts +149 -0
  48. package/dist/cursor-nav.d.ts.map +1 -0
  49. package/dist/cursor-nav.js +230 -0
  50. package/dist/cursor-nav.js.map +1 -0
  51. package/dist/cursor-rect.d.ts +65 -0
  52. package/dist/cursor-rect.d.ts.map +1 -0
  53. package/dist/cursor-rect.js +98 -0
  54. package/dist/cursor-rect.js.map +1 -0
  55. package/dist/drop-indicator.d.ts +108 -0
  56. package/dist/drop-indicator.d.ts.map +1 -0
  57. package/dist/drop-indicator.js +236 -0
  58. package/dist/drop-indicator.js.map +1 -0
  59. package/dist/editor.d.ts +41 -0
  60. package/dist/editor.d.ts.map +1 -0
  61. package/dist/editor.js +710 -0
  62. package/dist/editor.js.map +1 -0
  63. package/dist/floating-toolbar.d.ts +93 -0
  64. package/dist/floating-toolbar.d.ts.map +1 -0
  65. package/dist/floating-toolbar.js +159 -0
  66. package/dist/floating-toolbar.js.map +1 -0
  67. package/dist/index.d.ts +62 -0
  68. package/dist/index.d.ts.map +1 -0
  69. package/dist/index.js +119 -0
  70. package/dist/index.js.map +1 -0
  71. package/dist/input-bridge.d.ts +273 -0
  72. package/dist/input-bridge.d.ts.map +1 -0
  73. package/dist/input-bridge.js +884 -0
  74. package/dist/input-bridge.js.map +1 -0
  75. package/dist/link-popover.d.ts +38 -0
  76. package/dist/link-popover.d.ts.map +1 -0
  77. package/dist/link-popover.js +278 -0
  78. package/dist/link-popover.js.map +1 -0
  79. package/dist/mark-renderer.d.ts +275 -0
  80. package/dist/mark-renderer.d.ts.map +1 -0
  81. package/dist/mark-renderer.js +210 -0
  82. package/dist/mark-renderer.js.map +1 -0
  83. package/dist/perf.d.ts +145 -0
  84. package/dist/perf.d.ts.map +1 -0
  85. package/dist/perf.js +260 -0
  86. package/dist/perf.js.map +1 -0
  87. package/dist/plugin-kit.d.ts +265 -0
  88. package/dist/plugin-kit.d.ts.map +1 -0
  89. package/dist/plugin-kit.js +234 -0
  90. package/dist/plugin-kit.js.map +1 -0
  91. package/dist/plugins/alignment-plugin.d.ts +68 -0
  92. package/dist/plugins/alignment-plugin.d.ts.map +1 -0
  93. package/dist/plugins/alignment-plugin.js +98 -0
  94. package/dist/plugins/alignment-plugin.js.map +1 -0
  95. package/dist/plugins/block-utils.d.ts +113 -0
  96. package/dist/plugins/block-utils.d.ts.map +1 -0
  97. package/dist/plugins/block-utils.js +191 -0
  98. package/dist/plugins/block-utils.js.map +1 -0
  99. package/dist/plugins/blockquote-plugin.d.ts +39 -0
  100. package/dist/plugins/blockquote-plugin.d.ts.map +1 -0
  101. package/dist/plugins/blockquote-plugin.js +88 -0
  102. package/dist/plugins/blockquote-plugin.js.map +1 -0
  103. package/dist/plugins/bold-plugin.d.ts +37 -0
  104. package/dist/plugins/bold-plugin.d.ts.map +1 -0
  105. package/dist/plugins/bold-plugin.js +48 -0
  106. package/dist/plugins/bold-plugin.js.map +1 -0
  107. package/dist/plugins/callout-plugin.d.ts +100 -0
  108. package/dist/plugins/callout-plugin.d.ts.map +1 -0
  109. package/dist/plugins/callout-plugin.js +200 -0
  110. package/dist/plugins/callout-plugin.js.map +1 -0
  111. package/dist/plugins/code-block-plugin.d.ts +62 -0
  112. package/dist/plugins/code-block-plugin.d.ts.map +1 -0
  113. package/dist/plugins/code-block-plugin.js +176 -0
  114. package/dist/plugins/code-block-plugin.js.map +1 -0
  115. package/dist/plugins/code-plugin.d.ts +37 -0
  116. package/dist/plugins/code-plugin.d.ts.map +1 -0
  117. package/dist/plugins/code-plugin.js +48 -0
  118. package/dist/plugins/code-plugin.js.map +1 -0
  119. package/dist/plugins/embed-plugin.d.ts +90 -0
  120. package/dist/plugins/embed-plugin.d.ts.map +1 -0
  121. package/dist/plugins/embed-plugin.js +147 -0
  122. package/dist/plugins/embed-plugin.js.map +1 -0
  123. package/dist/plugins/font-family-plugin.d.ts +58 -0
  124. package/dist/plugins/font-family-plugin.d.ts.map +1 -0
  125. package/dist/plugins/font-family-plugin.js +57 -0
  126. package/dist/plugins/font-family-plugin.js.map +1 -0
  127. package/dist/plugins/font-size-plugin.d.ts +57 -0
  128. package/dist/plugins/font-size-plugin.d.ts.map +1 -0
  129. package/dist/plugins/font-size-plugin.js +56 -0
  130. package/dist/plugins/font-size-plugin.js.map +1 -0
  131. package/dist/plugins/heading-plugin.d.ts +52 -0
  132. package/dist/plugins/heading-plugin.d.ts.map +1 -0
  133. package/dist/plugins/heading-plugin.js +114 -0
  134. package/dist/plugins/heading-plugin.js.map +1 -0
  135. package/dist/plugins/hr-plugin.d.ts +33 -0
  136. package/dist/plugins/hr-plugin.d.ts.map +1 -0
  137. package/dist/plugins/hr-plugin.js +75 -0
  138. package/dist/plugins/hr-plugin.js.map +1 -0
  139. package/dist/plugins/image-plugin.d.ts +115 -0
  140. package/dist/plugins/image-plugin.d.ts.map +1 -0
  141. package/dist/plugins/image-plugin.js +199 -0
  142. package/dist/plugins/image-plugin.js.map +1 -0
  143. package/dist/plugins/indent-plugin.d.ts +62 -0
  144. package/dist/plugins/indent-plugin.d.ts.map +1 -0
  145. package/dist/plugins/indent-plugin.js +128 -0
  146. package/dist/plugins/indent-plugin.js.map +1 -0
  147. package/dist/plugins/index.d.ts +45 -0
  148. package/dist/plugins/index.d.ts.map +1 -0
  149. package/dist/plugins/index.js +42 -0
  150. package/dist/plugins/index.js.map +1 -0
  151. package/dist/plugins/italic-plugin.d.ts +37 -0
  152. package/dist/plugins/italic-plugin.d.ts.map +1 -0
  153. package/dist/plugins/italic-plugin.js +48 -0
  154. package/dist/plugins/italic-plugin.js.map +1 -0
  155. package/dist/plugins/link-plugin.d.ts +129 -0
  156. package/dist/plugins/link-plugin.d.ts.map +1 -0
  157. package/dist/plugins/link-plugin.js +212 -0
  158. package/dist/plugins/link-plugin.js.map +1 -0
  159. package/dist/plugins/list-plugin.d.ts +53 -0
  160. package/dist/plugins/list-plugin.d.ts.map +1 -0
  161. package/dist/plugins/list-plugin.js +309 -0
  162. package/dist/plugins/list-plugin.js.map +1 -0
  163. package/dist/plugins/mark-utils.d.ts +173 -0
  164. package/dist/plugins/mark-utils.d.ts.map +1 -0
  165. package/dist/plugins/mark-utils.js +425 -0
  166. package/dist/plugins/mark-utils.js.map +1 -0
  167. package/dist/plugins/mention-plugin.d.ts +191 -0
  168. package/dist/plugins/mention-plugin.d.ts.map +1 -0
  169. package/dist/plugins/mention-plugin.js +295 -0
  170. package/dist/plugins/mention-plugin.js.map +1 -0
  171. package/dist/plugins/strikethrough-plugin.d.ts +37 -0
  172. package/dist/plugins/strikethrough-plugin.d.ts.map +1 -0
  173. package/dist/plugins/strikethrough-plugin.js +48 -0
  174. package/dist/plugins/strikethrough-plugin.js.map +1 -0
  175. package/dist/plugins/text-color-plugin.d.ts +57 -0
  176. package/dist/plugins/text-color-plugin.d.ts.map +1 -0
  177. package/dist/plugins/text-color-plugin.js +56 -0
  178. package/dist/plugins/text-color-plugin.js.map +1 -0
  179. package/dist/plugins/underline-plugin.d.ts +37 -0
  180. package/dist/plugins/underline-plugin.d.ts.map +1 -0
  181. package/dist/plugins/underline-plugin.js +48 -0
  182. package/dist/plugins/underline-plugin.js.map +1 -0
  183. package/dist/presets.d.ts +95 -0
  184. package/dist/presets.d.ts.map +1 -0
  185. package/dist/presets.js +159 -0
  186. package/dist/presets.js.map +1 -0
  187. package/dist/renderer.d.ts +125 -0
  188. package/dist/renderer.d.ts.map +1 -0
  189. package/dist/renderer.js +415 -0
  190. package/dist/renderer.js.map +1 -0
  191. package/dist/scroll-to-cursor.d.ts +25 -0
  192. package/dist/scroll-to-cursor.d.ts.map +1 -0
  193. package/dist/scroll-to-cursor.js +59 -0
  194. package/dist/scroll-to-cursor.js.map +1 -0
  195. package/dist/selection-sync.d.ts +159 -0
  196. package/dist/selection-sync.d.ts.map +1 -0
  197. package/dist/selection-sync.js +527 -0
  198. package/dist/selection-sync.js.map +1 -0
  199. package/dist/shortcut-handler.d.ts +98 -0
  200. package/dist/shortcut-handler.d.ts.map +1 -0
  201. package/dist/shortcut-handler.js +155 -0
  202. package/dist/shortcut-handler.js.map +1 -0
  203. package/dist/toolbar.d.ts +103 -0
  204. package/dist/toolbar.d.ts.map +1 -0
  205. package/dist/toolbar.js +134 -0
  206. package/dist/toolbar.js.map +1 -0
  207. package/dist/trigger-manager.d.ts +205 -0
  208. package/dist/trigger-manager.d.ts.map +1 -0
  209. package/dist/trigger-manager.js +466 -0
  210. package/dist/trigger-manager.js.map +1 -0
  211. package/dist/types.d.ts +216 -0
  212. package/dist/types.d.ts.map +1 -0
  213. package/dist/types.js +2 -0
  214. package/dist/types.js.map +1 -0
  215. package/package.json +30 -0
@@ -0,0 +1,216 @@
1
+ import type { IEditorEngine } from '@rtif-sdk/engine';
2
+ /**
3
+ * Configuration for creating a web editor instance.
4
+ *
5
+ * @example
6
+ * ```ts
7
+ * const config: WebEditorConfig = {
8
+ * root: document.getElementById('editor')!,
9
+ * engine: createEngine({ initialDoc: myDoc }),
10
+ * placeholder: 'Type something...',
11
+ * accessibleLabel: 'Document editor',
12
+ * };
13
+ * ```
14
+ */
15
+ export interface WebEditorConfig {
16
+ /** Target DOM element. Will become the contenteditable root. */
17
+ readonly root: HTMLElement;
18
+ /**
19
+ * The RTIF engine instance. The caller creates and owns this.
20
+ * The web editor reads state and dispatches operations through it.
21
+ */
22
+ readonly engine: IEditorEngine;
23
+ /** Placeholder text displayed when the document is empty. */
24
+ readonly placeholder?: string;
25
+ /**
26
+ * When true, all mutations are blocked. Selection and copy remain available.
27
+ * Default: false.
28
+ */
29
+ readonly readOnly?: boolean;
30
+ /**
31
+ * Accessible label applied to the contenteditable element via `aria-label`.
32
+ * Required for screen reader support per platform-requirements section 9.1.
33
+ */
34
+ readonly accessibleLabel: string;
35
+ /**
36
+ * Whether to enable the browser's built-in spellcheck.
37
+ * Default: true.
38
+ */
39
+ readonly spellcheck?: boolean;
40
+ /**
41
+ * Whether to focus the editor automatically on creation.
42
+ * Default: false.
43
+ */
44
+ readonly autoFocus?: boolean;
45
+ /**
46
+ * Custom web plugins to install.
47
+ *
48
+ * Each {@link WebPlugin} bundles an engine plugin with optional web-layer
49
+ * renderers. Plugins are installed after built-in renderers but before the
50
+ * initial render, so their renderers take effect immediately.
51
+ *
52
+ * @example
53
+ * ```ts
54
+ * import { defineBooleanMark, createWebEditor } from '@rtif-sdk/web';
55
+ *
56
+ * const highlight = defineBooleanMark({
57
+ * markType: 'highlight',
58
+ * renderer: { apply(el) { el.style.backgroundColor = 'yellow'; } },
59
+ * });
60
+ *
61
+ * createWebEditor({ ..., webPlugins: [highlight] });
62
+ * ```
63
+ */
64
+ readonly webPlugins?: ReadonlyArray<import('./plugin-kit.js').WebPlugin>;
65
+ }
66
+ /**
67
+ * The web editor instance returned by `createWebEditor`.
68
+ *
69
+ * Provides imperative control over the editor's focus state and lifecycle.
70
+ * All document mutations go through `engine.dispatch()`.
71
+ *
72
+ * @example
73
+ * ```ts
74
+ * const editor = createWebEditor(config);
75
+ * editor.focus();
76
+ * // ... user edits ...
77
+ * editor.destroy();
78
+ * ```
79
+ */
80
+ export interface WebEditor {
81
+ /** The underlying RTIF engine instance. */
82
+ readonly engine: IEditorEngine;
83
+ /** The command bus for executing commands and querying state from toolbars. */
84
+ readonly commandBus: import('./command-bus.js').CommandBus;
85
+ /** The content pipeline for registering custom content handlers. */
86
+ readonly content: import('./content-pipeline.js').ContentPipeline;
87
+ /** The mark renderer registry for customizing mark visual rendering. */
88
+ readonly markRenderers: import('./mark-renderer.js').MarkRendererRegistry;
89
+ /** The block renderer registry for customizing block type visual rendering. */
90
+ readonly blockRenderers: import('./block-renderer.js').BlockRendererRegistry;
91
+ /** The trigger manager for trigger-based interactions (@mentions, #hashtags, etc.). */
92
+ readonly triggers: import('./trigger-manager.js').TriggerManager;
93
+ /** The cursor rect API for positioning floating UI. */
94
+ readonly cursorRect: import('./cursor-rect.js').CursorRectAPI;
95
+ /**
96
+ * Focus the editor's contenteditable element.
97
+ * If the editor was destroyed, this is a no-op.
98
+ */
99
+ focus(): void;
100
+ /**
101
+ * Blur the editor's contenteditable element.
102
+ * If the editor was destroyed, this is a no-op.
103
+ */
104
+ blur(): void;
105
+ /**
106
+ * Returns true if the editor's contenteditable element currently has focus.
107
+ *
108
+ * @returns Whether the editor is focused
109
+ */
110
+ isFocused(): boolean;
111
+ /**
112
+ * Tear down the editor. Removes all event listeners and DOM modifications.
113
+ * After calling destroy(), the editor instance is inert.
114
+ */
115
+ destroy(): void;
116
+ }
117
+ /**
118
+ * Cached offset information for a single block in the document.
119
+ *
120
+ * Used by the selection synchronization layer to convert between
121
+ * absolute RTIF offsets and DOM positions without recalculating
122
+ * block offsets on every selection change.
123
+ *
124
+ * @example
125
+ * ```ts
126
+ * // For a doc with blocks ["hello", "world"]:
127
+ * // entries = [
128
+ * // { blockId: 'b1', startOffset: 0, length: 5 },
129
+ * // { blockId: 'b2', startOffset: 6, length: 5 },
130
+ * // ]
131
+ * ```
132
+ */
133
+ export interface BlockOffsetEntry {
134
+ /** The block's unique ID. */
135
+ readonly blockId: string;
136
+ /** Absolute document offset where this block's text begins. */
137
+ readonly startOffset: number;
138
+ /** The text length of this block (sum of all span text lengths). */
139
+ readonly length: number;
140
+ }
141
+ /**
142
+ * A position within the DOM, represented as a node and character offset.
143
+ *
144
+ * This is the DOM-level equivalent of an RTIF `Position`. The selection
145
+ * synchronization layer converts between `DomPoint` and RTIF absolute offsets.
146
+ *
147
+ * @example
148
+ * ```ts
149
+ * // Cursor at character 3 inside a text node:
150
+ * const point: DomPoint = { node: textNode, offset: 3 };
151
+ * ```
152
+ */
153
+ export interface DomPoint {
154
+ /** The DOM node containing the position. Typically a Text node. */
155
+ readonly node: Node;
156
+ /** The character offset within the node. */
157
+ readonly offset: number;
158
+ }
159
+ /**
160
+ * Tracks the state of an active IME composition session.
161
+ *
162
+ * During composition (e.g., CJK input, accent dead-keys), RTIF operations
163
+ * are deferred until the composition commits. This state tracks everything
164
+ * needed to emit the correct `insert_text` operation on `compositionend`.
165
+ *
166
+ * @example
167
+ * ```ts
168
+ * // Idle state (no composition active):
169
+ * const idle: CompositionState = {
170
+ * composing: false,
171
+ * composingBlockId: null,
172
+ * startOffset: null,
173
+ * selectionRange: null,
174
+ * };
175
+ *
176
+ * // Active composition with a prior selection:
177
+ * const active: CompositionState = {
178
+ * composing: true,
179
+ * composingBlockId: 'b1',
180
+ * startOffset: 5,
181
+ * selectionRange: { start: 5, end: 10 },
182
+ * };
183
+ * ```
184
+ */
185
+ export interface CompositionState {
186
+ /** Whether a composition session is currently active. */
187
+ readonly composing: boolean;
188
+ /** The block ID where composition started, or null when idle. */
189
+ readonly composingBlockId: string | null;
190
+ /** The absolute document offset where composition started, or null when idle. */
191
+ readonly startOffset: number | null;
192
+ /**
193
+ * The selection range (as absolute offsets) that was active when composition
194
+ * started. If non-null, this range is deleted on composition commit, not
195
+ * on composition start, to avoid breaking IME behavior.
196
+ */
197
+ readonly selectionRange: {
198
+ readonly start: number;
199
+ readonly end: number;
200
+ } | null;
201
+ }
202
+ /**
203
+ * A disposable resource handle. Call `dispose()` to unregister.
204
+ *
205
+ * @example
206
+ * ```ts
207
+ * const registration = pipeline.register(myHandler);
208
+ * // later:
209
+ * registration.dispose();
210
+ * ```
211
+ */
212
+ export interface Disposable {
213
+ /** Unregister the resource. */
214
+ dispose(): void;
215
+ }
216
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEtD;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,eAAe;IAC9B,gEAAgE;IAChE,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAC;IAE3B;;;OAGG;IACH,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAC;IAE/B,6DAA6D;IAC7D,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAE9B;;;OAGG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAE5B;;;OAGG;IACH,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IAEjC;;;OAGG;IACH,QAAQ,CAAC,UAAU,CAAC,EAAE,OAAO,CAAC;IAE9B;;;OAGG;IACH,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC;IAE7B;;;;;;;;;;;;;;;;;;OAkBG;IACH,QAAQ,CAAC,UAAU,CAAC,EAAE,aAAa,CAAC,OAAO,iBAAiB,EAAE,SAAS,CAAC,CAAC;CAC1E;AAED;;;;;;;;;;;;;GAaG;AACH,MAAM,WAAW,SAAS;IACxB,2CAA2C;IAC3C,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAC;IAE/B,+EAA+E;IAC/E,QAAQ,CAAC,UAAU,EAAE,OAAO,kBAAkB,EAAE,UAAU,CAAC;IAE3D,oEAAoE;IACpE,QAAQ,CAAC,OAAO,EAAE,OAAO,uBAAuB,EAAE,eAAe,CAAC;IAElE,wEAAwE;IACxE,QAAQ,CAAC,aAAa,EAAE,OAAO,oBAAoB,EAAE,oBAAoB,CAAC;IAE1E,+EAA+E;IAC/E,QAAQ,CAAC,cAAc,EAAE,OAAO,qBAAqB,EAAE,qBAAqB,CAAC;IAE7E,uFAAuF;IACvF,QAAQ,CAAC,QAAQ,EAAE,OAAO,sBAAsB,EAAE,cAAc,CAAC;IAEjE,uDAAuD;IACvD,QAAQ,CAAC,UAAU,EAAE,OAAO,kBAAkB,EAAE,aAAa,CAAC;IAE9D;;;OAGG;IACH,KAAK,IAAI,IAAI,CAAC;IAEd;;;OAGG;IACH,IAAI,IAAI,IAAI,CAAC;IAEb;;;;OAIG;IACH,SAAS,IAAI,OAAO,CAAC;IAErB;;;OAGG;IACH,OAAO,IAAI,IAAI,CAAC;CACjB;AAED;;;;;;;;;;;;;;;GAeG;AACH,MAAM,WAAW,gBAAgB;IAC/B,6BAA6B;IAC7B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IAEzB,+DAA+D;IAC/D,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAE7B,oEAAoE;IACpE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAED;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,QAAQ;IACvB,mEAAmE;IACnE,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC;IAEpB,4CAA4C;IAC5C,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAM,WAAW,gBAAgB;IAC/B,yDAAyD;IACzD,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;IAE5B,iEAAiE;IACjE,QAAQ,CAAC,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAEzC,iFAAiF;IACjF,QAAQ,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAEpC;;;;OAIG;IACH,QAAQ,CAAC,cAAc,EAAE;QACvB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;QACvB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;KACtB,GAAG,IAAI,CAAC;CACV;AAED;;;;;;;;;GASG;AACH,MAAM,WAAW,UAAU;IACzB,+BAA+B;IAC/B,OAAO,IAAI,IAAI,CAAC;CACjB"}
package/dist/types.js ADDED
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":""}
package/package.json ADDED
@@ -0,0 +1,30 @@
1
+ {
2
+ "name": "@rtif-sdk/web",
3
+ "version": "1.0.0",
4
+ "description": "RTIF web platform implementation (contenteditable)",
5
+ "author": "coryrobinson42@gmail.com",
6
+ "type": "module",
7
+ "main": "dist/index.js",
8
+ "types": "dist/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "types": "./dist/index.d.ts",
12
+ "import": "./dist/index.js"
13
+ }
14
+ },
15
+ "files": ["dist"],
16
+ "sideEffects": false,
17
+ "engines": { "node": ">=20.0.0" },
18
+ "keywords": ["rich-text", "editor", "contenteditable", "web-editor", "rtif", "wysiwyg"],
19
+ "scripts": {
20
+ "build": "tsc --build tsconfig.build.json",
21
+ "test": "vitest run",
22
+ "test:browser": "vitest run --config vitest.browser.config.ts",
23
+ "prepublishOnly": "npm run build"
24
+ },
25
+ "dependencies": {
26
+ "@rtif-sdk/core": "^1.0.0",
27
+ "@rtif-sdk/engine": "^1.0.0"
28
+ },
29
+ "license": "MIT"
30
+ }