@kedataindo/docflow-core 0.0.80 → 0.0.82

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -1825,7 +1825,6 @@ function createEditor(options = {}) {
1825
1825
  plugin.hooks?.onDestroy?.(tiptapEditor);
1826
1826
  }
1827
1827
  tiptapEditor.destroy();
1828
- collaborationSetup?.destroy();
1829
1828
  performanceMonitor?.destroy();
1830
1829
  },
1831
1830
  use: (plugin) => {
package/dist/index.d.cts CHANGED
@@ -18,6 +18,16 @@ interface ToolbarItem {
18
18
  label?: string;
19
19
  action: string;
20
20
  args?: unknown[];
21
+ /**
22
+ * Group this item into the toolbar's compact groups instead of rendering it
23
+ * as a flat button. Currently only `'insert'` (the "+" / Sisipkan dropdown)
24
+ * is supported; built-in insert actions (link, image, table, footnote, page
25
+ * break, …) are grouped automatically, so plugins only need this flag for
26
+ * their OWN actions.
27
+ *
28
+ * Defaults to `undefined` → flat toolbar button (previous behaviour).
29
+ */
30
+ menu?: 'insert';
21
31
  }
22
32
  interface SlashCommand {
23
33
  name: string;
@@ -205,6 +215,16 @@ interface EditorOptions {
205
215
  * y-webrtc/y-websocket), so `createEditor` cannot construct one itself.
206
216
  * When set, history is disabled and the Yjs document is authoritative
207
217
  * (local `content` is not seeded).
218
+ *
219
+ * **Ownership (host-owned):** the host that built the setup owns its
220
+ * lifecycle. `editor.destroy()` tears down the TipTap view only — it does
221
+ * **not** call `setup.destroy()`. This is deliberate: hosts routinely
222
+ * remount the editor against the same room (Vue `:key` bumps, tab
223
+ * switches, external document refreshes), and destroying the shared
224
+ * `Y.Doc`/provider/awareness on every remount silently kills sync and
225
+ * remote cursors until a full page reload. Destroy the setup yourself when
226
+ * the room is no longer needed (unmount, room change, `createCollaboration`
227
+ * resolving after disposal).
208
228
  */
209
229
  collaboration?: CollaborationSetup;
210
230
  getPageMap?: () => Map<number, {
package/dist/index.d.ts CHANGED
@@ -18,6 +18,16 @@ interface ToolbarItem {
18
18
  label?: string;
19
19
  action: string;
20
20
  args?: unknown[];
21
+ /**
22
+ * Group this item into the toolbar's compact groups instead of rendering it
23
+ * as a flat button. Currently only `'insert'` (the "+" / Sisipkan dropdown)
24
+ * is supported; built-in insert actions (link, image, table, footnote, page
25
+ * break, …) are grouped automatically, so plugins only need this flag for
26
+ * their OWN actions.
27
+ *
28
+ * Defaults to `undefined` → flat toolbar button (previous behaviour).
29
+ */
30
+ menu?: 'insert';
21
31
  }
22
32
  interface SlashCommand {
23
33
  name: string;
@@ -205,6 +215,16 @@ interface EditorOptions {
205
215
  * y-webrtc/y-websocket), so `createEditor` cannot construct one itself.
206
216
  * When set, history is disabled and the Yjs document is authoritative
207
217
  * (local `content` is not seeded).
218
+ *
219
+ * **Ownership (host-owned):** the host that built the setup owns its
220
+ * lifecycle. `editor.destroy()` tears down the TipTap view only — it does
221
+ * **not** call `setup.destroy()`. This is deliberate: hosts routinely
222
+ * remount the editor against the same room (Vue `:key` bumps, tab
223
+ * switches, external document refreshes), and destroying the shared
224
+ * `Y.Doc`/provider/awareness on every remount silently kills sync and
225
+ * remote cursors until a full page reload. Destroy the setup yourself when
226
+ * the room is no longer needed (unmount, room change, `createCollaboration`
227
+ * resolving after disposal).
208
228
  */
209
229
  collaboration?: CollaborationSetup;
210
230
  getPageMap?: () => Map<number, {
package/dist/index.js CHANGED
@@ -1634,7 +1634,6 @@ function createEditor(options = {}) {
1634
1634
  plugin.hooks?.onDestroy?.(tiptapEditor);
1635
1635
  }
1636
1636
  tiptapEditor.destroy();
1637
- collaborationSetup?.destroy();
1638
1637
  performanceMonitor?.destroy();
1639
1638
  },
1640
1639
  use: (plugin) => {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@kedataindo/docflow-core",
3
3
  "license": "UNLICENSED",
4
- "version": "0.0.80",
4
+ "version": "0.0.82",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
7
7
  "module": "./dist/index.js",