@supernova-studio/client 0.47.62 → 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 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) {
@@ -10156,10 +10165,10 @@ function parseAsRichText(prosemirrorNode, definition, property) {
10156
10165
  return {
10157
10166
  id,
10158
10167
  type: "Block",
10159
- ...variantId && { variantId },
10160
10168
  data: {
10161
10169
  packageId: definition.id,
10162
10170
  indentLevel: 0,
10171
+ ...variantId && { variantId },
10163
10172
  items: [
10164
10173
  {
10165
10174
  id,
@@ -10356,6 +10365,7 @@ function parseAsTableCell(prosemirrorNode) {
10356
10365
  const columnWidthArray = getProsemirrorAttribute(prosemirrorNode, "colwidth", _zod.z.array(_zod.z.number()).optional());
10357
10366
  if (columnWidthArray) {
10358
10367
  columnWidth = columnWidthArray[0];
10368
+ columnWidth = Math.round(columnWidth * 100) / 100;
10359
10369
  }
10360
10370
  const tableNodes = (_nullishCoalesce(prosemirrorNode.content, () => ( []))).map(parseAsTableNode).filter(nonNullFilter);
10361
10371
  return {