@supernova-studio/client 0.47.63 → 0.47.64
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.js +12 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +12 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/yjs/version-room/frontend.ts +15 -2
package/dist/index.js
CHANGED
|
@@ -6112,7 +6112,7 @@ var FrontendVersionRoomYDoc = class {
|
|
|
6112
6112
|
const publishedPage = publishedPagesById.get(snapshot.page.id);
|
|
6113
6113
|
publishedState = this.itemStateFromPage(publishedPage, snapshot.pageContentHash);
|
|
6114
6114
|
}
|
|
6115
|
-
const draftState = this.createDraftState(currentState, publishedState);
|
|
6115
|
+
const draftState = this.createDraftState(page.persistentId, currentState, publishedState);
|
|
6116
6116
|
if (draftState)
|
|
6117
6117
|
result.set(page.id, draftState);
|
|
6118
6118
|
});
|
|
@@ -6145,7 +6145,7 @@ var FrontendVersionRoomYDoc = class {
|
|
|
6145
6145
|
const publishedGroup = publishedGroupsById.get(snapshot.group.id);
|
|
6146
6146
|
publishedState = this.itemStateFromGroup(publishedGroup);
|
|
6147
6147
|
}
|
|
6148
|
-
const draftState = this.createDraftState(currentState, publishedState);
|
|
6148
|
+
const draftState = this.createDraftState(group.persistentId, currentState, publishedState);
|
|
6149
6149
|
if (draftState)
|
|
6150
6150
|
result.set(group.id, draftState);
|
|
6151
6151
|
});
|
|
@@ -6161,7 +6161,7 @@ var FrontendVersionRoomYDoc = class {
|
|
|
6161
6161
|
//
|
|
6162
6162
|
// Drafts - Shared
|
|
6163
6163
|
//
|
|
6164
|
-
createDraftState(currentState, publishedState) {
|
|
6164
|
+
createDraftState(itemPersistentId, currentState, publishedState) {
|
|
6165
6165
|
if (!publishedState) {
|
|
6166
6166
|
return { changeType: "Created" };
|
|
6167
6167
|
}
|
|
@@ -6170,13 +6170,22 @@ var FrontendVersionRoomYDoc = class {
|
|
|
6170
6170
|
changes: {}
|
|
6171
6171
|
};
|
|
6172
6172
|
if (currentState.title !== publishedState.title) {
|
|
6173
|
+
if (this.debug) {
|
|
6174
|
+
console.log(`Item ${itemPersistentId} (${currentState.title}): updated title`);
|
|
6175
|
+
}
|
|
6173
6176
|
updatedDraftState.changes.previousTitle = publishedState.title;
|
|
6174
6177
|
}
|
|
6175
6178
|
if (!_deepequal2.default.call(void 0, currentState.configuration, publishedState.configuration)) {
|
|
6179
|
+
if (this.debug) {
|
|
6180
|
+
console.log(`Item ${itemPersistentId} (${currentState.title}): updated configuration`);
|
|
6181
|
+
}
|
|
6176
6182
|
const configurationDto = documentationItemConfigurationToDTOV2(publishedState.configuration);
|
|
6177
6183
|
updatedDraftState.changes.previousConfiguration = configurationDto;
|
|
6178
6184
|
}
|
|
6179
6185
|
if (currentState.contentHash !== publishedState.contentHash) {
|
|
6186
|
+
if (this.debug) {
|
|
6187
|
+
console.log(`Item ${itemPersistentId} (${currentState.title}): updated content hash`);
|
|
6188
|
+
}
|
|
6180
6189
|
updatedDraftState.changes.previousContentHash = publishedState.contentHash;
|
|
6181
6190
|
}
|
|
6182
6191
|
if (Object.keys(updatedDraftState).length) {
|