@supernova-studio/client 1.0.0-alpha.5 → 1.0.0-alpha.6

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.mjs CHANGED
@@ -13002,7 +13002,7 @@ var DocsStructureRepository = class {
13002
13002
  // Actions
13003
13003
  //
13004
13004
  createPage(input) {
13005
- void this.createPage(input);
13005
+ void this.createPagePromise(input);
13006
13006
  }
13007
13007
  createPagePromise(input) {
13008
13008
  this.localState.setPage({
@@ -13139,8 +13139,10 @@ var DocsStructureRepository = class {
13139
13139
  if (!neighbours.length)
13140
13140
  return 0;
13141
13141
  neighbours.sort((lhs, rhs) => lhs.sortOrder - rhs.sortOrder);
13142
- if (!afterPersistentId)
13142
+ if (afterPersistentId === null)
13143
13143
  return neighbours[0].sortOrder - sortOrderStep;
13144
+ if (!afterPersistentId)
13145
+ return neighbours[neighbours.length - 1].sortOrder + sortOrderStep;
13144
13146
  const index = neighbours.findIndex((e) => e.persistentId === afterPersistentId);
13145
13147
  if (index < 0 || index === neighbours.length - 1) {
13146
13148
  return neighbours[neighbours.length - 1].sortOrder + sortOrderStep;