@fileverse-dev/ddoc 3.0.80-tab-v2-1 → 3.0.80-tab-v2-2
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.d.ts
CHANGED
|
@@ -9,3 +9,4 @@ export { ReminderBlock } from './package/extensions/reminder-block/reminder-bloc
|
|
|
9
9
|
export { type Reminder, type ReminderBlockOptions, } from './package/extensions/reminder-block/types';
|
|
10
10
|
export { Editor } from '@tiptap/react';
|
|
11
11
|
export type { CollaborationProps, CollabConnectionConfig, CollabSessionMeta, CollabServices, CollabCallbacks, CollabState, CollabError, CollabErrorCode, CollabStatus, } from './package/sync-local/types';
|
|
12
|
+
export { mergeTabAwareYjsUpdates } from './package/components/tabs/utils/tab-utils';
|
package/dist/index.es.js
CHANGED
|
@@ -28112,37 +28112,39 @@ function Hce(e, t) {
|
|
|
28112
28112
|
}
|
|
28113
28113
|
function Wce(e, t) {
|
|
28114
28114
|
const n = new Set(e.deletedIds);
|
|
28115
|
-
t.forEach((
|
|
28116
|
-
|
|
28117
|
-
n.add(u);
|
|
28118
|
-
});
|
|
28115
|
+
t.forEach((u) => {
|
|
28116
|
+
u.deletedIds.forEach((c) => n.add(c));
|
|
28119
28117
|
});
|
|
28120
|
-
const r = [
|
|
28121
|
-
|
|
28122
|
-
|
|
28123
|
-
|
|
28124
|
-
|
|
28125
|
-
|
|
28126
|
-
|
|
28127
|
-
|
|
28118
|
+
const r = /* @__PURE__ */ new Set(), o = [];
|
|
28119
|
+
e.order.forEach((u) => {
|
|
28120
|
+
!n.has(u) && !r.has(u) && (r.add(u), o.push(u));
|
|
28121
|
+
});
|
|
28122
|
+
const i = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map();
|
|
28123
|
+
e.names.forEach((u, c) => {
|
|
28124
|
+
n.has(c) || i.set(c, u);
|
|
28125
|
+
}), e.emojis.forEach((u, c) => {
|
|
28126
|
+
n.has(c) || s.set(c, u);
|
|
28127
|
+
}), t.forEach((u) => {
|
|
28128
|
+
u.order.forEach((c) => {
|
|
28129
|
+
n.has(c) || (r.has(c) || (r.add(c), o.push(c)), !i.has(c) && u.names.has(c) && i.set(c, u.names.get(c) ?? i8), s.has(c) || s.set(
|
|
28130
|
+
c,
|
|
28131
|
+
u.emojis.has(c) ? u.emojis.get(c) ?? null : null
|
|
28128
28132
|
));
|
|
28129
28133
|
});
|
|
28130
|
-
}),
|
|
28131
|
-
|
|
28134
|
+
}), o.forEach((u, c) => {
|
|
28135
|
+
i.has(u) || i.set(u, yP(c)), (!s.has(u) || s.get(u) === void 0) && s.set(u, null);
|
|
28132
28136
|
});
|
|
28133
|
-
const
|
|
28137
|
+
const l = [
|
|
28134
28138
|
e.activeTabId,
|
|
28135
|
-
...t.map(
|
|
28136
|
-
(l) => l.activeTabId
|
|
28137
|
-
)
|
|
28139
|
+
...t.map((u) => u.activeTabId)
|
|
28138
28140
|
].find(
|
|
28139
|
-
(
|
|
28140
|
-
) ??
|
|
28141
|
+
(u) => !!u && r.has(u) && !n.has(u)
|
|
28142
|
+
) ?? o[0] ?? null;
|
|
28141
28143
|
return {
|
|
28142
|
-
order:
|
|
28143
|
-
names:
|
|
28144
|
-
emojis:
|
|
28145
|
-
activeTabId:
|
|
28144
|
+
order: o,
|
|
28145
|
+
names: i,
|
|
28146
|
+
emojis: s,
|
|
28147
|
+
activeTabId: l,
|
|
28146
28148
|
deletedIds: n
|
|
28147
28149
|
};
|
|
28148
28150
|
}
|
|
@@ -28255,7 +28257,10 @@ function X5(e, t) {
|
|
|
28255
28257
|
return K5(s, a), Y5(a, t).resolvedTabState;
|
|
28256
28258
|
}), r = new ws();
|
|
28257
28259
|
K5(e, r);
|
|
28258
|
-
const { resolvedTabState: o } = Y5(
|
|
28260
|
+
const { resolvedTabState: o } = Y5(
|
|
28261
|
+
r,
|
|
28262
|
+
t
|
|
28263
|
+
), i = Wce(
|
|
28259
28264
|
o,
|
|
28260
28265
|
n
|
|
28261
28266
|
);
|
|
@@ -185487,6 +185492,7 @@ export {
|
|
|
185487
185492
|
TWe as PreviewDdocEditor,
|
|
185488
185493
|
BWe as ReminderBlock,
|
|
185489
185494
|
ox as handleContentPrint,
|
|
185495
|
+
X5 as mergeTabAwareYjsUpdates,
|
|
185490
185496
|
jWe as useExportHeadlessEditorContent,
|
|
185491
185497
|
RHe as useHeadlessEditor
|
|
185492
185498
|
};
|
|
@@ -34,7 +34,7 @@ export declare function deriveTabsFromEncodedState(yjsEncodedState: string | str
|
|
|
34
34
|
};
|
|
35
35
|
export declare function getTabsYdocNodes(doc: Y.Doc): TabsYdocNodes;
|
|
36
36
|
export declare function syncTabStateAndGetNodes(doc: Y.Doc, options?: TabSyncOptions): SyncedTabsYdocNodes;
|
|
37
|
-
export declare function mergeTabAwareYjsUpdates(
|
|
37
|
+
export declare function mergeTabAwareYjsUpdates(encodedUpdates: string[], options?: TabSyncOptions): string;
|
|
38
38
|
export declare function getActiveTabIdFromNodes(tabNodes: Pick<TabsYdocNodes, 'tabState'>): string | null;
|
|
39
39
|
export declare function getTabMetadata(tabNodes: Pick<TabsYdocNodes, 'nameById' | 'emojiById'>, tabId: string): {
|
|
40
40
|
name: string;
|