@supernova-studio/client 1.0.0-alpha.4 → 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.d.mts CHANGED
@@ -92477,7 +92477,7 @@ type DocPageCreate = {
92477
92477
  title: string;
92478
92478
  configuration?: DTODocumentationItemConfigurationV2;
92479
92479
  parentPersistentId: string;
92480
- afterPersistentId?: string;
92480
+ afterPersistentId?: string | null;
92481
92481
  };
92482
92482
  type DocPageUpdate = {
92483
92483
  persistentId: string;
package/dist/index.d.ts CHANGED
@@ -92477,7 +92477,7 @@ type DocPageCreate = {
92477
92477
  title: string;
92478
92478
  configuration?: DTODocumentationItemConfigurationV2;
92479
92479
  parentPersistentId: string;
92480
- afterPersistentId?: string;
92480
+ afterPersistentId?: string | null;
92481
92481
  };
92482
92482
  type DocPageUpdate = {
92483
92483
  persistentId: string;
package/dist/index.js 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;