@supernova-studio/client 0.58.18 → 1.0.0-alpha.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.
Files changed (196) hide show
  1. package/dist/index.d.mts +1349 -1323
  2. package/dist/index.d.ts +1349 -1323
  3. package/dist/index.js +462 -329
  4. package/dist/index.js.map +1 -1
  5. package/dist/index.mjs +764 -631
  6. package/dist/index.mjs.map +1 -1
  7. package/package.json +4 -3
  8. package/src/api/client.ts +0 -31
  9. package/src/api/conversion/documentation/documentation-group-v1-to-dto.ts +0 -114
  10. package/src/api/conversion/documentation/documentation-group-v2-to-dto.ts +0 -92
  11. package/src/api/conversion/documentation/documentation-item-configuration-v1-to-dto.ts +0 -52
  12. package/src/api/conversion/documentation/documentation-item-configuration-v2-to-dto.ts +0 -34
  13. package/src/api/conversion/documentation/documentation-page-to-dto-utils.ts +0 -131
  14. package/src/api/conversion/documentation/documentation-page-v1-to-dto.ts +0 -69
  15. package/src/api/conversion/documentation/documentation-page-v2-to-dto.ts +0 -72
  16. package/src/api/conversion/documentation/index.ts +0 -7
  17. package/src/api/conversion/export/index.ts +0 -1
  18. package/src/api/conversion/export/pipeline.ts +0 -25
  19. package/src/api/conversion/index.ts +0 -3
  20. package/src/api/conversion/integrations/git.ts +0 -37
  21. package/src/api/conversion/integrations/index.ts +0 -2
  22. package/src/api/conversion/integrations/integration.ts +0 -37
  23. package/src/api/dto/aux/color.ts +0 -7
  24. package/src/api/dto/aux/index.ts +0 -3
  25. package/src/api/dto/aux/meta.ts +0 -8
  26. package/src/api/dto/aux/pagination.ts +0 -8
  27. package/src/api/dto/bff/app-bootstrap-data.ts +0 -20
  28. package/src/api/dto/bff/index.ts +0 -1
  29. package/src/api/dto/collections/index.ts +0 -1
  30. package/src/api/dto/collections/token-collection.ts +0 -24
  31. package/src/api/dto/design-systems/brand.ts +0 -44
  32. package/src/api/dto/design-systems/component.ts +0 -40
  33. package/src/api/dto/design-systems/contact.ts +0 -11
  34. package/src/api/dto/design-systems/data-source.ts +0 -141
  35. package/src/api/dto/design-systems/design-system.ts +0 -68
  36. package/src/api/dto/design-systems/elements-diff.ts +0 -14
  37. package/src/api/dto/design-systems/figma-variables.ts +0 -108
  38. package/src/api/dto/design-systems/import-job.ts +0 -61
  39. package/src/api/dto/design-systems/index.ts +0 -13
  40. package/src/api/dto/design-systems/members.ts +0 -50
  41. package/src/api/dto/design-systems/role.ts +0 -11
  42. package/src/api/dto/design-systems/stats.ts +0 -19
  43. package/src/api/dto/design-systems/version.ts +0 -56
  44. package/src/api/dto/design-systems/view.ts +0 -45
  45. package/src/api/dto/design-tokens/design-token.ts +0 -78
  46. package/src/api/dto/design-tokens/index.ts +0 -1
  47. package/src/api/dto/documentation/anchor.ts +0 -15
  48. package/src/api/dto/documentation/approvals.ts +0 -15
  49. package/src/api/dto/documentation/block-definition.ts +0 -28
  50. package/src/api/dto/documentation/block.ts +0 -6
  51. package/src/api/dto/documentation/documentation-page-snapshot.ts +0 -18
  52. package/src/api/dto/documentation/index.ts +0 -8
  53. package/src/api/dto/documentation/link-preview.ts +0 -23
  54. package/src/api/dto/documentation/publish.ts +0 -23
  55. package/src/api/dto/documentation/room.ts +0 -12
  56. package/src/api/dto/elements/components/figma-component-group.ts +0 -19
  57. package/src/api/dto/elements/components/figma-component.ts +0 -56
  58. package/src/api/dto/elements/components/index.ts +0 -2
  59. package/src/api/dto/elements/documentation/draft-state.ts +0 -37
  60. package/src/api/dto/elements/documentation/group-action.ts +0 -108
  61. package/src/api/dto/elements/documentation/group-v1.ts +0 -35
  62. package/src/api/dto/elements/documentation/group-v2.ts +0 -117
  63. package/src/api/dto/elements/documentation/hierarchy.ts +0 -22
  64. package/src/api/dto/elements/documentation/index.ts +0 -13
  65. package/src/api/dto/elements/documentation/item-configuration-v1.ts +0 -24
  66. package/src/api/dto/elements/documentation/item-configuration-v2.ts +0 -14
  67. package/src/api/dto/elements/documentation/metadata.ts +0 -8
  68. package/src/api/dto/elements/documentation/page-actions-v2.ts +0 -121
  69. package/src/api/dto/elements/documentation/page-content.ts +0 -15
  70. package/src/api/dto/elements/documentation/page-v1.ts +0 -21
  71. package/src/api/dto/elements/documentation/page-v2.ts +0 -120
  72. package/src/api/dto/elements/documentation/structure.ts +0 -37
  73. package/src/api/dto/elements/elements-action-v2.ts +0 -104
  74. package/src/api/dto/elements/figma-nodes/figma-node.ts +0 -106
  75. package/src/api/dto/elements/figma-nodes/index.ts +0 -2
  76. package/src/api/dto/elements/figma-nodes/node-actions-v2.ts +0 -24
  77. package/src/api/dto/elements/frame-node-structures/frame-node-structure.ts +0 -17
  78. package/src/api/dto/elements/frame-node-structures/index.ts +0 -1
  79. package/src/api/dto/elements/get-elements-v2.ts +0 -21
  80. package/src/api/dto/elements/index.ts +0 -7
  81. package/src/api/dto/elements/properties/index.ts +0 -2
  82. package/src/api/dto/elements/properties/property-definitions.ts +0 -75
  83. package/src/api/dto/elements/properties/property-values.ts +0 -38
  84. package/src/api/dto/export/exporter-property.ts +0 -95
  85. package/src/api/dto/export/exporter.ts +0 -87
  86. package/src/api/dto/export/filter.ts +0 -6
  87. package/src/api/dto/export/index.ts +0 -5
  88. package/src/api/dto/export/job.ts +0 -87
  89. package/src/api/dto/export/pipeline.ts +0 -43
  90. package/src/api/dto/figma-components/assets/download.ts +0 -30
  91. package/src/api/dto/figma-components/assets/index.ts +0 -1
  92. package/src/api/dto/figma-components/index.ts +0 -1
  93. package/src/api/dto/index.ts +0 -13
  94. package/src/api/dto/liveblocks/auth-response.ts +0 -7
  95. package/src/api/dto/liveblocks/index.ts +0 -1
  96. package/src/api/dto/themes/index.ts +0 -2
  97. package/src/api/dto/themes/override.ts +0 -27
  98. package/src/api/dto/themes/theme.ts +0 -45
  99. package/src/api/dto/users/authenticated-user.ts +0 -43
  100. package/src/api/dto/users/index.ts +0 -3
  101. package/src/api/dto/users/update.ts +0 -8
  102. package/src/api/dto/users/user.ts +0 -31
  103. package/src/api/dto/workspaces/git.ts +0 -32
  104. package/src/api/dto/workspaces/index.ts +0 -6
  105. package/src/api/dto/workspaces/integrations.ts +0 -34
  106. package/src/api/dto/workspaces/invitations.ts +0 -30
  107. package/src/api/dto/workspaces/membership.ts +0 -41
  108. package/src/api/dto/workspaces/npm-registry.ts +0 -35
  109. package/src/api/dto/workspaces/workspace.ts +0 -34
  110. package/src/api/endpoints/codegen/codegen.ts +0 -13
  111. package/src/api/endpoints/codegen/exporters.ts +0 -13
  112. package/src/api/endpoints/codegen/index.ts +0 -3
  113. package/src/api/endpoints/codegen/pipelines.ts +0 -37
  114. package/src/api/endpoints/design-system/bff.ts +0 -13
  115. package/src/api/endpoints/design-system/contact.ts +0 -12
  116. package/src/api/endpoints/design-system/design-systems.ts +0 -55
  117. package/src/api/endpoints/design-system/index.ts +0 -6
  118. package/src/api/endpoints/design-system/members.ts +0 -24
  119. package/src/api/endpoints/design-system/sources.ts +0 -35
  120. package/src/api/endpoints/design-system/versions/brands.ts +0 -45
  121. package/src/api/endpoints/design-system/versions/documentation.ts +0 -27
  122. package/src/api/endpoints/design-system/versions/ds-components.ts +0 -28
  123. package/src/api/endpoints/design-system/versions/elements-action.ts +0 -55
  124. package/src/api/endpoints/design-system/versions/elements.ts +0 -13
  125. package/src/api/endpoints/design-system/versions/figma-component-groups.ts +0 -13
  126. package/src/api/endpoints/design-system/versions/figma-components.ts +0 -13
  127. package/src/api/endpoints/design-system/versions/figma-frame-structures.ts +0 -13
  128. package/src/api/endpoints/design-system/versions/import-jobs.ts +0 -13
  129. package/src/api/endpoints/design-system/versions/index.ts +0 -18
  130. package/src/api/endpoints/design-system/versions/overrides.ts +0 -17
  131. package/src/api/endpoints/design-system/versions/property-definitions.ts +0 -43
  132. package/src/api/endpoints/design-system/versions/property-values.ts +0 -25
  133. package/src/api/endpoints/design-system/versions/stats.ts +0 -12
  134. package/src/api/endpoints/design-system/versions/themes.ts +0 -35
  135. package/src/api/endpoints/design-system/versions/token-collections.ts +0 -13
  136. package/src/api/endpoints/design-system/versions/token-groups.ts +0 -28
  137. package/src/api/endpoints/design-system/versions/tokens.ts +0 -27
  138. package/src/api/endpoints/design-system/versions/versions.ts +0 -79
  139. package/src/api/endpoints/index.ts +0 -5
  140. package/src/api/endpoints/liveblocks.ts +0 -14
  141. package/src/api/endpoints/users.ts +0 -26
  142. package/src/api/endpoints/workspaces/index.ts +0 -3
  143. package/src/api/endpoints/workspaces/workspace-invites.ts +0 -34
  144. package/src/api/endpoints/workspaces/workspace-members.ts +0 -31
  145. package/src/api/endpoints/workspaces/workspaces.ts +0 -47
  146. package/src/api/index.ts +0 -6
  147. package/src/api/payloads/design-systems/index.ts +0 -2
  148. package/src/api/payloads/design-systems/update-design-system.ts +0 -29
  149. package/src/api/payloads/design-systems/version.ts +0 -29
  150. package/src/api/payloads/documentation/block-definitions.ts +0 -12
  151. package/src/api/payloads/documentation/design-data-doc-diff.ts +0 -7
  152. package/src/api/payloads/documentation/index.ts +0 -2
  153. package/src/api/payloads/export/index.ts +0 -1
  154. package/src/api/payloads/export/pipeline.ts +0 -50
  155. package/src/api/payloads/index.ts +0 -6
  156. package/src/api/payloads/liveblocks/auth.ts +0 -7
  157. package/src/api/payloads/liveblocks/index.ts +0 -1
  158. package/src/api/payloads/users/index.ts +0 -2
  159. package/src/api/payloads/users/notifications/index.ts +0 -1
  160. package/src/api/payloads/users/notifications/notification-settings.ts +0 -17
  161. package/src/api/payloads/users/profile/index.ts +0 -1
  162. package/src/api/payloads/users/profile/update.ts +0 -4
  163. package/src/api/payloads/workspaces/index.ts +0 -3
  164. package/src/api/payloads/workspaces/transfer-ownership.ts +0 -7
  165. package/src/api/payloads/workspaces/workspace-configuration.ts +0 -50
  166. package/src/api/payloads/workspaces/workspace-integrations.ts +0 -26
  167. package/src/api/transport/index.ts +0 -2
  168. package/src/api/transport/request-executor-error.ts +0 -66
  169. package/src/api/transport/request-executor.ts +0 -87
  170. package/src/index.ts +0 -3
  171. package/src/utils/figma.ts +0 -53
  172. package/src/utils/hash.ts +0 -62
  173. package/src/utils/index.ts +0 -3
  174. package/src/utils/query.ts +0 -18
  175. package/src/yjs/design-system-content/documentation-hierarchy.ts +0 -35
  176. package/src/yjs/design-system-content/index.ts +0 -2
  177. package/src/yjs/design-system-content/item-configuration.ts +0 -93
  178. package/src/yjs/docs-editor/blocks-to-prosemirror.ts +0 -764
  179. package/src/yjs/docs-editor/index.ts +0 -7
  180. package/src/yjs/docs-editor/list-tree-builder.ts +0 -127
  181. package/src/yjs/docs-editor/mock.ts +0 -2104
  182. package/src/yjs/docs-editor/model/block.ts +0 -8
  183. package/src/yjs/docs-editor/model/index.ts +0 -2
  184. package/src/yjs/docs-editor/model/page.ts +0 -8
  185. package/src/yjs/docs-editor/prosemirror/index.ts +0 -3
  186. package/src/yjs/docs-editor/prosemirror/inner-editor-schema.ts +0 -145
  187. package/src/yjs/docs-editor/prosemirror/main-editor-schema.ts +0 -577
  188. package/src/yjs/docs-editor/prosemirror/types.ts +0 -19
  189. package/src/yjs/docs-editor/prosemirror-to-blocks.ts +0 -975
  190. package/src/yjs/docs-editor/utils.ts +0 -115
  191. package/src/yjs/index.ts +0 -3
  192. package/src/yjs/version-room/backend.ts +0 -78
  193. package/src/yjs/version-room/base.ts +0 -211
  194. package/src/yjs/version-room/frontend.ts +0 -461
  195. package/src/yjs/version-room/index.ts +0 -4
  196. package/src/yjs/version-room/utils.ts +0 -109
package/dist/index.js CHANGED
@@ -859,6 +859,23 @@ var ContentLoaderPayload = _zod.z.object({
859
859
  location: _zod.z.string()
860
860
  })
861
861
  );
862
+ var shortPersistentIdLength = 8;
863
+ var alphanumeric = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
864
+ function generateShortPersistentId() {
865
+ return generateAlphanumericId(shortPersistentIdLength);
866
+ }
867
+ function generateAlphanumericId(length) {
868
+ let randomString = "";
869
+ for (let i = 0; i < length; i++) {
870
+ const randomIndex = Math.floor(Math.random() * alphanumeric.length);
871
+ randomString += alphanumeric.charAt(randomIndex);
872
+ }
873
+ return randomString;
874
+ }
875
+ function slugify(str, options) {
876
+ const slug = _slugify2.default.call(void 0, _nullishCoalesce(str, () => ( "")), options);
877
+ return _optionalChain([slug, 'optionalAccess', _2 => _2.length]) > 0 ? slug : "item";
878
+ }
862
879
  var RESERVED_SLUGS = [
863
880
  "workspaces",
864
881
  "workspace",
@@ -3759,7 +3776,7 @@ var HANDLE_MIN_LENGTH = 2;
3759
3776
  var HANDLE_MAX_LENGTH = 64;
3760
3777
  var CreateWorkspaceInput = _zod.z.object({
3761
3778
  name: _zod.z.string().min(WORKSPACE_NAME_MIN_LENGTH).max(WORKSPACE_NAME_MAX_LENGTH).trim(),
3762
- handle: _zod.z.string().regex(slugRegex).min(HANDLE_MIN_LENGTH).max(HANDLE_MAX_LENGTH).refine((value) => _optionalChain([value, 'optionalAccess', _2 => _2.length]) > 0).optional()
3779
+ handle: _zod.z.string().regex(slugRegex).min(HANDLE_MIN_LENGTH).max(HANDLE_MAX_LENGTH).refine((value) => _optionalChain([value, 'optionalAccess', _3 => _3.length]) > 0).optional()
3763
3780
  });
3764
3781
  var WorkspaceInvitation = _zod.z.object({
3765
3782
  id: _zod.z.string(),
@@ -4283,8 +4300,7 @@ var RestoredDocumentationGroup = _zod.z.object({
4283
4300
  parent: ElementGroup
4284
4301
  });
4285
4302
  var RoomTypeEnum = /* @__PURE__ */ ((RoomTypeEnum2) => {
4286
- RoomTypeEnum2["DocumentationPageOld"] = "documentation-page";
4287
- RoomTypeEnum2["DocumentationPage"] = "doc-page";
4303
+ RoomTypeEnum2["DocumentationPage"] = "documentation-page";
4288
4304
  RoomTypeEnum2["DesignSystemVersion"] = "design-system-version";
4289
4305
  RoomTypeEnum2["Workspace"] = "workspace";
4290
4306
  return RoomTypeEnum2;
@@ -4397,7 +4413,7 @@ var IntegrationToken = _zod.z.object({
4397
4413
  token_bitbucket_username: _zod.z.string().optional(),
4398
4414
  // Bitbucket only
4399
4415
  custom_url: _zod.z.string().optional().transform((value) => {
4400
- if (!_optionalChain([value, 'optionalAccess', _3 => _3.trim, 'call', _4 => _4()]))
4416
+ if (!_optionalChain([value, 'optionalAccess', _4 => _4.trim, 'call', _5 => _5()]))
4401
4417
  return void 0;
4402
4418
  return formatCustomUrl(value);
4403
4419
  })
@@ -4804,7 +4820,7 @@ function calculateElementParentChain(elementParentPersistentId, groupPersistentI
4804
4820
  const parent = groupPersistentIdToGroupMap.get(parentId);
4805
4821
  if (parent)
4806
4822
  result.push(parent);
4807
- parentId = _optionalChain([parent, 'optionalAccess', _5 => _5.parentPersistentId]);
4823
+ parentId = _optionalChain([parent, 'optionalAccess', _6 => _6.parentPersistentId]);
4808
4824
  }
4809
4825
  return result;
4810
4826
  }
@@ -4813,7 +4829,7 @@ function applyPrivacyConfigurationToNestedItems(pages, groups, getDefaultItemCon
4813
4829
  ...group,
4814
4830
  data: {
4815
4831
  ...group.data,
4816
- configuration: _nullishCoalesce(_optionalChain([group, 'access', _6 => _6.data, 'optionalAccess', _7 => _7.configuration]), () => ( getDefaultItemConfiguration()))
4832
+ configuration: _nullishCoalesce(_optionalChain([group, 'access', _7 => _7.data, 'optionalAccess', _8 => _8.configuration]), () => ( getDefaultItemConfiguration()))
4817
4833
  }
4818
4834
  }));
4819
4835
  const groupPersistentIdToGroupMap = mapByUnique(fixedGroups, (group) => group.persistentId);
@@ -4825,8 +4841,8 @@ function applyPrivacyConfigurationToNestedItems(pages, groups, getDefaultItemCon
4825
4841
  const parent = groupPersistentIdToGroupMap.get(nextParentId);
4826
4842
  if (!parent)
4827
4843
  break;
4828
- isHidden = isHidden || _optionalChain([parent, 'access', _8 => _8.data, 'optionalAccess', _9 => _9.configuration, 'optionalAccess', _10 => _10.isHidden]) || false;
4829
- isPrivate = isPrivate || _optionalChain([parent, 'access', _11 => _11.data, 'optionalAccess', _12 => _12.configuration, 'optionalAccess', _13 => _13.isPrivate]) || false;
4844
+ isHidden = isHidden || _optionalChain([parent, 'access', _9 => _9.data, 'optionalAccess', _10 => _10.configuration, 'optionalAccess', _11 => _11.isHidden]) || false;
4845
+ isPrivate = isPrivate || _optionalChain([parent, 'access', _12 => _12.data, 'optionalAccess', _13 => _13.configuration, 'optionalAccess', _14 => _14.isPrivate]) || false;
4830
4846
  nextParentId = parent.parentPersistentId;
4831
4847
  }
4832
4848
  groupToFix.data.configuration.isHidden = isHidden;
@@ -4834,7 +4850,7 @@ function applyPrivacyConfigurationToNestedItems(pages, groups, getDefaultItemCon
4834
4850
  }
4835
4851
  const fixedPages = [];
4836
4852
  for (const page of pages) {
4837
- const configuration = _nullishCoalesce(_optionalChain([page, 'access', _14 => _14.data, 'optionalAccess', _15 => _15.configuration]), () => ( getDefaultItemConfiguration()));
4853
+ const configuration = _nullishCoalesce(_optionalChain([page, 'access', _15 => _15.data, 'optionalAccess', _16 => _16.configuration]), () => ( getDefaultItemConfiguration()));
4838
4854
  const parent = groupPersistentIdToGroupMap.get(page.parentPersistentId);
4839
4855
  fixedPages.push({
4840
4856
  ...page,
@@ -4842,8 +4858,8 @@ function applyPrivacyConfigurationToNestedItems(pages, groups, getDefaultItemCon
4842
4858
  ...page.data,
4843
4859
  configuration: {
4844
4860
  ...configuration,
4845
- isHidden: configuration.isHidden || _optionalChain([parent, 'optionalAccess', _16 => _16.data, 'optionalAccess', _17 => _17.configuration, 'optionalAccess', _18 => _18.isHidden]) || false,
4846
- isPrivate: configuration.isPrivate || _optionalChain([parent, 'optionalAccess', _19 => _19.data, 'optionalAccess', _20 => _20.configuration, 'optionalAccess', _21 => _21.isPrivate]) || false
4861
+ isHidden: configuration.isHidden || _optionalChain([parent, 'optionalAccess', _17 => _17.data, 'optionalAccess', _18 => _18.configuration, 'optionalAccess', _19 => _19.isHidden]) || false,
4862
+ isPrivate: configuration.isPrivate || _optionalChain([parent, 'optionalAccess', _20 => _20.data, 'optionalAccess', _21 => _21.configuration, 'optionalAccess', _22 => _22.isPrivate]) || false
4847
4863
  }
4848
4864
  }
4849
4865
  });
@@ -4861,7 +4877,7 @@ function elementGroupsToDocumentationGroupDTOV1(groups, pages) {
4861
4877
  return groups.map((group) => {
4862
4878
  return {
4863
4879
  ...elementGroupToDocumentationGroupStructureDTOV1(group, childrenIdsMap),
4864
- configuration: documentationItemConfigurationToDTOV1(_optionalChain([group, 'access', _22 => _22.data, 'optionalAccess', _23 => _23.configuration]))
4880
+ configuration: documentationItemConfigurationToDTOV1(_optionalChain([group, 'access', _23 => _23.data, 'optionalAccess', _24 => _24.configuration]))
4865
4881
  };
4866
4882
  });
4867
4883
  }
@@ -4869,7 +4885,7 @@ function elementGroupsToDocumentationGroupFixedConfigurationDTOV1(groups, pages)
4869
4885
  const childrenIdsMap = calculateChildrenIdsMapV1(pages, groups);
4870
4886
  const { groups: fixedGroups } = applyPrivacyConfigurationToNestedItems(pages, groups, getDtoDefaultItemConfigurationV1);
4871
4887
  return fixedGroups.map((group) => {
4872
- const configuration = documentationItemConfigurationToDTOV1(_optionalChain([group, 'access', _24 => _24.data, 'optionalAccess', _25 => _25.configuration]));
4888
+ const configuration = documentationItemConfigurationToDTOV1(_optionalChain([group, 'access', _25 => _25.data, 'optionalAccess', _26 => _26.configuration]));
4873
4889
  return {
4874
4890
  ...elementGroupToDocumentationGroupStructureDTOV1(group, childrenIdsMap),
4875
4891
  // backward compatibility with custom doc exporters, anyway these groups will not be shown, so we can adjust title
@@ -4894,7 +4910,7 @@ function elementGroupToDocumentationGroupStructureDTOV1(group, childrenIdsMap) {
4894
4910
  title: group.meta.name,
4895
4911
  childrenIds,
4896
4912
  isRoot: !group.parentPersistentId,
4897
- groupBehavior: _nullishCoalesce(_optionalChain([group, 'access', _26 => _26.data, 'optionalAccess', _27 => _27.behavior]), () => ( "Group")),
4913
+ groupBehavior: _nullishCoalesce(_optionalChain([group, 'access', _27 => _27.data, 'optionalAccess', _28 => _28.behavior]), () => ( "Group")),
4898
4914
  shortPersistentId: group.shortPersistentId,
4899
4915
  type: "Group"
4900
4916
  };
@@ -4952,10 +4968,10 @@ function elementGroupsToDocumentationGroupFixedConfigurationDTOV2(groups, pages)
4952
4968
  function elementGroupToDocumentationGroupStructureDTOV2(group, childrenIdsMap) {
4953
4969
  const childrenIds = _nullishCoalesce(childrenIdsMap.get(group.persistentId), () => ( []));
4954
4970
  if (!group.shortPersistentId) {
4955
- throw new Error(`Short persistent id is required for docs groups, group id: ${group.id}`);
4971
+ throw new Error(`Short persistent id is required for docs groups, group id: ${group.persistentId}`);
4956
4972
  }
4957
4973
  return {
4958
- id: group.id,
4974
+ id: "to_be_removed",
4959
4975
  designSystemVersionId: group.designSystemVersionId,
4960
4976
  persistentId: group.persistentId,
4961
4977
  slug: group.slug,
@@ -4963,10 +4979,10 @@ function elementGroupToDocumentationGroupStructureDTOV2(group, childrenIdsMap) {
4963
4979
  createdAt: group.createdAt,
4964
4980
  updatedAt: group.updatedAt,
4965
4981
  title: group.meta.name,
4966
- configuration: documentationItemConfigurationToDTOV2(_optionalChain([group, 'optionalAccess', _28 => _28.data, 'optionalAccess', _29 => _29.configuration])),
4982
+ configuration: documentationItemConfigurationToDTOV2(_optionalChain([group, 'optionalAccess', _29 => _29.data, 'optionalAccess', _30 => _30.configuration])),
4967
4983
  childrenIds,
4968
4984
  isRoot: !group.parentPersistentId,
4969
- groupBehavior: _nullishCoalesce(_optionalChain([group, 'access', _30 => _30.data, 'optionalAccess', _31 => _31.behavior]), () => ( "Group")),
4985
+ groupBehavior: _nullishCoalesce(_optionalChain([group, 'access', _31 => _31.data, 'optionalAccess', _32 => _32.behavior]), () => ( "Group")),
4970
4986
  shortPersistentId: group.shortPersistentId,
4971
4987
  type: "Group"
4972
4988
  };
@@ -5037,11 +5053,11 @@ function documentationPagesFixedConfigurationToDTOV2(pages, groups, routingVersi
5037
5053
  function _documentationPageToDTOV2(page, pagePathMap) {
5038
5054
  let path = pagePathMap.get(page.persistentId);
5039
5055
  if (!path)
5040
- throw new Error(`Path for page ${page.id} was not calculated`);
5056
+ throw new Error(`Path for page ${page.persistentId} was not calculated`);
5041
5057
  if (path.startsWith("/"))
5042
5058
  path = path.substring(1);
5043
5059
  return {
5044
- id: page.id,
5060
+ id: "to_be_removed",
5045
5061
  designSystemVersionId: page.designSystemVersionId,
5046
5062
  persistentId: page.persistentId,
5047
5063
  shortPersistentId: page.shortPersistentId,
@@ -5120,7 +5136,7 @@ function integrationToDto(integration) {
5120
5136
  workspaceId: integration.workspaceId,
5121
5137
  type: integration.type,
5122
5138
  createdAt: integration.createdAt,
5123
- integrationCredentials: _optionalChain([integration, 'access', _32 => _32.integrationCredentials, 'optionalAccess', _33 => _33.map, 'call', _34 => _34(integrationCredentialToDto)]),
5139
+ integrationCredentials: _optionalChain([integration, 'access', _33 => _33.integrationCredentials, 'optionalAccess', _34 => _34.map, 'call', _35 => _35(integrationCredentialToDto)]),
5124
5140
  integrationDesignSystems: _nullishCoalesce(integration.integrationDesignSystems, () => ( void 0))
5125
5141
  };
5126
5142
  }
@@ -6167,7 +6183,7 @@ var DTOGetDocumentationPageAnchorsResponse = _zod.z.object({
6167
6183
  var DTODocumentationPageApprovalState = DocumentationPageApproval;
6168
6184
  var DTODocumentationGroupApprovalState = _zod.z.object({
6169
6185
  persistentId: _zod.z.string(),
6170
- groupId: _zod.z.string(),
6186
+ groupPersistentId: _zod.z.string(),
6171
6187
  designSystemVersionId: _zod.z.string(),
6172
6188
  approvalState: DocumentationPageApprovalState
6173
6189
  });
@@ -6468,15 +6484,6 @@ var DTOPublishDocumentationResponse = _zod.z.object({
6468
6484
  job: DTOExportJob
6469
6485
  });
6470
6486
 
6471
- // src/api/dto/documentation/room.ts
6472
-
6473
- var DTODocumentationPageRoom = _zod.z.object({
6474
- id: _zod.z.string()
6475
- });
6476
- var DTODocumentationPageRoomResponse = _zod.z.object({
6477
- room: DTODocumentationPageRoom
6478
- });
6479
-
6480
6487
  // src/api/dto/elements/components/figma-component-group.ts
6481
6488
 
6482
6489
  var DTOFigmaComponentGroup = _zod2.default.object({
@@ -7325,8 +7332,8 @@ var DocumentationEndpoint = class {
7325
7332
  constructor(requestExecutor) {
7326
7333
  this.requestExecutor = requestExecutor;
7327
7334
  }
7328
- async getStructure(designSystemId, versionId) {
7329
- return await this.requestExecutor.json(
7335
+ getStructure(designSystemId, versionId) {
7336
+ return this.requestExecutor.json(
7330
7337
  `/design-systems/${designSystemId}/versions/${versionId}/documentation/structure`,
7331
7338
  DTODocumentationStructure
7332
7339
  );
@@ -7334,13 +7341,10 @@ var DocumentationEndpoint = class {
7334
7341
  async getDocStructure(dsId, vId) {
7335
7342
  return await this.requestExecutor.json(
7336
7343
  `/design-systems/${dsId}/versions/${vId}/documentation/structure`,
7337
- DTODocumentationStructure
7338
- );
7339
- }
7340
- async getPageRoom(dsId, vId, pageId) {
7341
- return await this.requestExecutor.json(
7342
- `/design-systems/${dsId}/versions/${vId}/documentation/pages/${pageId}/room`,
7343
- DTODocumentationPageRoomResponse
7344
+ DTODocumentationStructure,
7345
+ {
7346
+ method: "GET"
7347
+ }
7344
7348
  );
7345
7349
  }
7346
7350
  };
@@ -8032,26 +8036,13 @@ var RequestExecutor = class {
8032
8036
  }
8033
8037
  fullUrl(path, query) {
8034
8038
  let url = `https://${this.testServerConfig.host}/api/v2${path}`;
8035
- const queryString = _optionalChain([query, 'optionalAccess', _35 => _35.toString, 'call', _36 => _36()]);
8039
+ const queryString = _optionalChain([query, 'optionalAccess', _36 => _36.toString, 'call', _37 => _37()]);
8036
8040
  if (queryString)
8037
8041
  url += `?${queryString}`;
8038
8042
  return url;
8039
8043
  }
8040
8044
  };
8041
8045
 
8042
- // src/api/endpoints/liveblocks.ts
8043
- var LiveblocksEndpoint = class {
8044
- constructor(requestExecutor) {
8045
- this.requestExecutor = requestExecutor;
8046
- }
8047
- auth(body) {
8048
- return this.requestExecutor.json("/liveblocks/auth", DTOLiveblocksAuthResponse, {
8049
- method: "POST",
8050
- body
8051
- });
8052
- }
8053
- };
8054
-
8055
8046
  // src/api/client.ts
8056
8047
  var SupernovaApiClient = class {
8057
8048
  constructor(config) {
@@ -8059,7 +8050,6 @@ var SupernovaApiClient = class {
8059
8050
  __publicField(this, "workspaces");
8060
8051
  __publicField(this, "designSystems");
8061
8052
  __publicField(this, "codegen");
8062
- __publicField(this, "liveblocks");
8063
8053
  const requestExecutor = new RequestExecutor({
8064
8054
  host: config.host,
8065
8055
  accessToken: config.accessToken
@@ -8068,10 +8058,12 @@ var SupernovaApiClient = class {
8068
8058
  this.workspaces = new WorkspacesEndpoint(requestExecutor);
8069
8059
  this.designSystems = new DesignSystemsEndpoint(requestExecutor);
8070
8060
  this.codegen = new CodegenEndpoint(requestExecutor);
8071
- this.liveblocks = new LiveblocksEndpoint(requestExecutor);
8072
8061
  }
8073
8062
  };
8074
8063
 
8064
+ // src/sync/docs-structure-repo.ts
8065
+ var _pqueue = require('p-queue'); var _pqueue2 = _interopRequireDefault(_pqueue);
8066
+
8075
8067
  // src/yjs/design-system-content/documentation-hierarchy.ts
8076
8068
 
8077
8069
 
@@ -8081,6 +8073,17 @@ var VersionRoomBaseYDoc = class {
8081
8073
  __publicField(this, "yDoc");
8082
8074
  this.yDoc = yDoc;
8083
8075
  }
8076
+ getState() {
8077
+ return {
8078
+ approvals: this.getApprovals(),
8079
+ groups: this.getGroups(),
8080
+ groupSnapshots: this.getGroupSnapshots(),
8081
+ pageContentHashes: this.getDocumentationPageContentHashes(),
8082
+ pages: this.getPages(),
8083
+ pageSnapshots: this.getPageSnapshots(),
8084
+ settings: this.getDocumentationInternalSettings()
8085
+ };
8086
+ }
8084
8087
  //
8085
8088
  // Pages
8086
8089
  //
@@ -8232,6 +8235,236 @@ var VersionRoomBaseYDoc = class {
8232
8235
  }
8233
8236
  };
8234
8237
 
8238
+ // src/yjs/version-room/compute-dto.ts
8239
+ function computeDocsHierarchy(input, options = {}) {
8240
+ const includeDeletedContent = _nullishCoalesce(options.includeDeletedContent, () => ( false));
8241
+ const debug = _nullishCoalesce(options.debug, () => ( false));
8242
+ const { pages, groups, pageSnapshots, groupSnapshots, settings, pageContentHashes, approvals } = input;
8243
+ if (includeDeletedContent) {
8244
+ pages.push(...getDeletedPages(pages, pageSnapshots));
8245
+ groups.push(...getDeletedGroups(groups, groupSnapshots));
8246
+ }
8247
+ const pageDTOs = documentationPagesToDTOV2(pages, groups, settings.routingVersion);
8248
+ const groupDTOs = elementGroupsToDocumentationGroupDTOV2(groups, pages);
8249
+ if (!settings.isDraftFeatureAdopted) {
8250
+ return {
8251
+ pages: pageDTOs,
8252
+ groups: groupDTOs
8253
+ };
8254
+ }
8255
+ const pageDraftStates = buildPageDraftCreatedAndUpdatedStates(pages, pageSnapshots, pageContentHashes, debug);
8256
+ const pageDraftDeletedStates = buildPageDraftDeletedStates(pages, pageSnapshots);
8257
+ const pagePublishedMetadata = buildPagePublishedMetadata(pages, pageSnapshots);
8258
+ const pageApprovalStates = mapByUnique(approvals, (a) => a.pagePersistentId);
8259
+ pageDTOs.forEach((p) => {
8260
+ const draftState = _nullishCoalesce(pageDraftDeletedStates.get(p.persistentId), () => ( pageDraftStates.get(p.persistentId)));
8261
+ draftState && (p.draftState = draftState);
8262
+ const publishMetadata = pagePublishedMetadata.get(p.persistentId);
8263
+ publishMetadata && (p.publishMetadata = publishMetadata);
8264
+ const approvalState = pageApprovalStates.get(p.persistentId);
8265
+ approvalState && (p.approvalState = approvalState);
8266
+ });
8267
+ const groupDraftStates = buildGroupDraftCreatedAndUpdatedStates(groups, groupSnapshots, debug);
8268
+ const groupDraftDeletedStates = buildGroupDraftDeletedStates(groups, groupSnapshots);
8269
+ const groupPublishedMetadata = buildGroupPublishedMetadata(groups, groupSnapshots);
8270
+ const groupApprovalStates = buildGroupApprovalStates(groups, groupSnapshots);
8271
+ groupDTOs.forEach((g) => {
8272
+ const draftState = _nullishCoalesce(groupDraftDeletedStates.get(g.persistentId), () => ( groupDraftStates.get(g.persistentId)));
8273
+ draftState && (g.draftState = draftState);
8274
+ const publishMetadata = groupPublishedMetadata.get(g.persistentId);
8275
+ publishMetadata && (g.publishMetadata = publishMetadata);
8276
+ const approvalState = groupApprovalStates.get(g.persistentId);
8277
+ approvalState && (g.approvalState = approvalState);
8278
+ });
8279
+ return {
8280
+ pages: pageDTOs,
8281
+ groups: groupDTOs
8282
+ };
8283
+ }
8284
+ function getDeletedPages(pages, pageSnapshots) {
8285
+ const existingPagePersistentIds = new Set(pages.map((p) => p.persistentId));
8286
+ const latestSnapshots = pickLatestPageSnapshots(pageSnapshots);
8287
+ return latestSnapshots.filter((s) => !existingPagePersistentIds.has(s.page.persistentId)).map((s) => s.page);
8288
+ }
8289
+ function getDeletedGroups(groups, groupSnapshots) {
8290
+ const existingGroupPersistentIds = new Set(groups.map((p) => p.persistentId));
8291
+ const latestSnapshots = pickLatestGroupSnapshots(groupSnapshots);
8292
+ return latestSnapshots.filter((s) => !existingGroupPersistentIds.has(s.group.persistentId)).map((s) => s.group);
8293
+ }
8294
+ function buildPageDraftCreatedAndUpdatedStates(pages, pageSnapshots, pageHashes, debug) {
8295
+ const publishedSnapshots = pickLatestPageSnapshots(pageSnapshots.filter((s) => s.reason === "Publish"));
8296
+ const publishedSnapshotsByPagePersistentId = mapByUnique(publishedSnapshots, (s) => s.page.persistentId);
8297
+ const result = /* @__PURE__ */ new Map();
8298
+ pages.forEach((page) => {
8299
+ const snapshot = publishedSnapshotsByPagePersistentId.get(page.persistentId);
8300
+ let publishedState;
8301
+ if (snapshot) {
8302
+ publishedState = itemStateFromPage(snapshot.page, snapshot.pageContentHash);
8303
+ }
8304
+ const currentPageContentHash = _nullishCoalesce(_nullishCoalesce(pageHashes[page.persistentId], () => ( _optionalChain([snapshot, 'optionalAccess', _38 => _38.pageContentHash]))), () => ( ""));
8305
+ const currentState = itemStateFromPage(page, currentPageContentHash);
8306
+ const draftState = createDraftState(page.persistentId, currentState, publishedState, debug);
8307
+ if (draftState)
8308
+ result.set(page.persistentId, draftState);
8309
+ });
8310
+ return result;
8311
+ }
8312
+ function itemStateFromPage(page, pageContentHash) {
8313
+ return {
8314
+ title: page.meta.name,
8315
+ configuration: _nullishCoalesce(page.data.configuration, () => ( defaultDocumentationItemConfigurationV2)),
8316
+ contentHash: pageContentHash
8317
+ };
8318
+ }
8319
+ function buildPagePublishedMetadata(pages, pageSnapshots) {
8320
+ const publishedPageSnapshotsByPersistentId = mapByUnique(
8321
+ pickLatestPageSnapshots(pageSnapshots.filter((s) => s.reason === "Publish")),
8322
+ (s) => s.page.persistentId
8323
+ );
8324
+ const result = /* @__PURE__ */ new Map();
8325
+ pages.forEach((p) => {
8326
+ const publishedSnapshot = publishedPageSnapshotsByPersistentId.get(p.persistentId);
8327
+ if (!publishedSnapshot)
8328
+ return;
8329
+ result.set(p.persistentId, {
8330
+ lastPublishedAt: publishedSnapshot.createdAt,
8331
+ lastPublishedByUserId: publishedSnapshot.createdByUserId
8332
+ });
8333
+ });
8334
+ return result;
8335
+ }
8336
+ function createDraftState(itemPersistentId, currentState, publishedState, debug) {
8337
+ if (!publishedState) {
8338
+ return { changeType: "Created" };
8339
+ }
8340
+ const updatedDraftState = {
8341
+ changeType: "Updated",
8342
+ changes: {}
8343
+ };
8344
+ if (currentState.title !== publishedState.title) {
8345
+ if (debug) {
8346
+ console.log(`Item ${itemPersistentId} (${currentState.title}): updated title`);
8347
+ }
8348
+ updatedDraftState.changes.previousTitle = publishedState.title;
8349
+ }
8350
+ const currentConfigHash = generateHash(currentState.configuration, debug);
8351
+ const publishedConfigHash = generateHash(publishedState.configuration, debug);
8352
+ if (currentConfigHash !== publishedConfigHash) {
8353
+ if (debug) {
8354
+ console.log(`Item ${itemPersistentId} (${currentState.title}): updated configuration`);
8355
+ }
8356
+ const configurationDto = documentationItemConfigurationToDTOV2(publishedState.configuration);
8357
+ updatedDraftState.changes.previousConfiguration = configurationDto;
8358
+ }
8359
+ if (currentState.contentHash !== publishedState.contentHash) {
8360
+ if (debug) {
8361
+ console.log(`Item ${itemPersistentId} (${currentState.title}): updated content hash`);
8362
+ }
8363
+ updatedDraftState.changes.previousContentHash = publishedState.contentHash;
8364
+ }
8365
+ if (Object.keys(updatedDraftState.changes).length) {
8366
+ return updatedDraftState;
8367
+ }
8368
+ return void 0;
8369
+ }
8370
+ function buildGroupApprovalStates(groups, groupSnapshots) {
8371
+ const result = /* @__PURE__ */ new Map();
8372
+ const allGroups = [...groups, ...groupSnapshots];
8373
+ for (const g of allGroups) {
8374
+ const approvalState = {
8375
+ approvalState: "Approved",
8376
+ designSystemVersionId: g.designSystemVersionId,
8377
+ persistentId: g.persistentId,
8378
+ groupPersistentId: g.persistentId
8379
+ };
8380
+ result.set(g.persistentId, approvalState);
8381
+ }
8382
+ return result;
8383
+ }
8384
+ function buildPageDraftDeletedStates(pages, pageSnapshots) {
8385
+ const deletedSnapshotsByPagePersistentId = mapByUnique(
8386
+ pickLatestPageSnapshots(pageSnapshots.filter((s) => s.reason === "Deletion")),
8387
+ (s) => s.page.persistentId
8388
+ );
8389
+ const result = /* @__PURE__ */ new Map();
8390
+ pages.forEach((page) => {
8391
+ const deletedSnapshot = deletedSnapshotsByPagePersistentId.get(page.persistentId);
8392
+ if (!deletedSnapshot)
8393
+ return;
8394
+ result.set(page.persistentId, {
8395
+ changeType: "Deleted",
8396
+ deletedAt: deletedSnapshot.createdAt,
8397
+ deletedByUserId: deletedSnapshot.createdByUserId
8398
+ });
8399
+ });
8400
+ return result;
8401
+ }
8402
+ function buildGroupDraftDeletedStates(groups, groupSnapshots) {
8403
+ const deletedSnapshotsByGroupPersistentId = mapByUnique(
8404
+ pickLatestGroupSnapshots(groupSnapshots.filter((s) => s.reason === "Deletion")),
8405
+ (s) => s.group.persistentId
8406
+ );
8407
+ const result = /* @__PURE__ */ new Map();
8408
+ groups.forEach((group) => {
8409
+ if (!group.parentPersistentId)
8410
+ return;
8411
+ const deletedSnapshot = deletedSnapshotsByGroupPersistentId.get(group.persistentId);
8412
+ if (!deletedSnapshot)
8413
+ return;
8414
+ result.set(group.persistentId, {
8415
+ changeType: "Deleted",
8416
+ deletedAt: deletedSnapshot.createdAt,
8417
+ deletedByUserId: deletedSnapshot.createdByUserId
8418
+ });
8419
+ });
8420
+ return result;
8421
+ }
8422
+ function buildGroupDraftCreatedAndUpdatedStates(groups, groupSnapshots, debug) {
8423
+ const publishedSnapshots = pickLatestGroupSnapshots(groupSnapshots.filter((s) => s.reason === "Publish"));
8424
+ const publishedSnapshotsByGroupPersistent = mapByUnique(publishedSnapshots, (s) => s.group.persistentId);
8425
+ const result = /* @__PURE__ */ new Map();
8426
+ groups.forEach((group) => {
8427
+ if (!group.parentPersistentId)
8428
+ return;
8429
+ const currentState = itemStateFromGroup(group);
8430
+ const snapshot = publishedSnapshotsByGroupPersistent.get(group.persistentId);
8431
+ let publishedState;
8432
+ if (snapshot) {
8433
+ publishedState = itemStateFromGroup(snapshot.group);
8434
+ }
8435
+ const draftState = createDraftState(group.persistentId, currentState, publishedState, debug);
8436
+ if (draftState)
8437
+ result.set(group.persistentId, draftState);
8438
+ });
8439
+ return result;
8440
+ }
8441
+ function itemStateFromGroup(group) {
8442
+ return {
8443
+ title: group.meta.name,
8444
+ configuration: _nullishCoalesce(_optionalChain([group, 'access', _39 => _39.data, 'optionalAccess', _40 => _40.configuration]), () => ( defaultDocumentationItemConfigurationV2)),
8445
+ contentHash: "-"
8446
+ };
8447
+ }
8448
+ function buildGroupPublishedMetadata(groups, groupSnapshots) {
8449
+ const publishedGroupSnapshotsByPersistentId = mapByUnique(
8450
+ pickLatestGroupSnapshots(groupSnapshots.filter((s) => s.reason === "Publish")),
8451
+ (s) => s.group.persistentId
8452
+ );
8453
+ const result = /* @__PURE__ */ new Map();
8454
+ groups.forEach((g) => {
8455
+ if (!g.parentPersistentId)
8456
+ return;
8457
+ const publishedSnapshot = publishedGroupSnapshotsByPersistentId.get(g.persistentId);
8458
+ if (!publishedSnapshot)
8459
+ return;
8460
+ result.set(g.persistentId, {
8461
+ lastPublishedAt: publishedSnapshot.createdAt,
8462
+ lastPublishedByUserId: publishedSnapshot.createdByUserId
8463
+ });
8464
+ });
8465
+ return result;
8466
+ }
8467
+
8235
8468
  // src/yjs/version-room/utils.ts
8236
8469
  function generatePageContentHash(content, definitions, debug = false) {
8237
8470
  let sanitizedContent = structuredClone(content);
@@ -8311,247 +8544,8 @@ var FrontendVersionRoomYDoc = class {
8311
8544
  // Hierarchy
8312
8545
  //
8313
8546
  getDocumentationHierarchy(options = {}) {
8314
- const includeDeletedContent = _nullishCoalesce(options.includeDeletedContent, () => ( false));
8315
8547
  const doc = new VersionRoomBaseYDoc(this.yDoc);
8316
- const pages = doc.getPages();
8317
- const groups = doc.getGroups();
8318
- const pageSnapshots = doc.getPageSnapshots();
8319
- const groupSnapshots = doc.getGroupSnapshots();
8320
- if (includeDeletedContent) {
8321
- pages.push(...this.getDeletedPages(pages, pageSnapshots));
8322
- groups.push(...this.getDeletedGroups(groups, groupSnapshots));
8323
- }
8324
- const settings = doc.getDocumentationInternalSettings();
8325
- const pageDTOs = documentationPagesToDTOV2(pages, groups, settings.routingVersion);
8326
- const groupDTOs = elementGroupsToDocumentationGroupDTOV2(groups, pages);
8327
- if (!settings.isDraftFeatureAdopted) {
8328
- return {
8329
- pages: pageDTOs,
8330
- groups: groupDTOs
8331
- };
8332
- }
8333
- const pageDraftStates = this.buildPageDraftCreatedAndUpdatedStates(pages, pageSnapshots);
8334
- const pageDraftDeletedStates = this.buildPageDraftDeletedStates(pages, pageSnapshots);
8335
- const pagePublishedMetadata = this.buildPagePublishedMetadata(pages, pageSnapshots);
8336
- const pageApprovalStates = this.buildPageApprovalStates(pages);
8337
- pageDTOs.forEach((p) => {
8338
- const draftState = _nullishCoalesce(pageDraftDeletedStates.get(p.id), () => ( pageDraftStates.get(p.id)));
8339
- draftState && (p.draftState = draftState);
8340
- const publishMetadata = pagePublishedMetadata.get(p.id);
8341
- publishMetadata && (p.publishMetadata = publishMetadata);
8342
- const approvalState = pageApprovalStates.get(p.id);
8343
- approvalState && (p.approvalState = approvalState);
8344
- });
8345
- const groupDraftStates = this.buildGroupDraftCreatedAndUpdatedStates(groups, groupSnapshots);
8346
- const groupDraftDeletedStates = this.buildGroupDraftDeletedStates(groups, groupSnapshots);
8347
- const groupPublishedMetadata = this.buildGroupPublishedMetadata(groups, groupSnapshots);
8348
- const groupApprovalStates = this.buildGroupApprovalStates(groups, groupSnapshots);
8349
- groupDTOs.forEach((g) => {
8350
- const draftState = _nullishCoalesce(groupDraftDeletedStates.get(g.id), () => ( groupDraftStates.get(g.id)));
8351
- draftState && (g.draftState = draftState);
8352
- const publishMetadata = groupPublishedMetadata.get(g.id);
8353
- publishMetadata && (g.publishMetadata = publishMetadata);
8354
- const approvalState = groupApprovalStates.get(g.id);
8355
- approvalState && (g.approvalState = approvalState);
8356
- });
8357
- return {
8358
- pages: pageDTOs,
8359
- groups: groupDTOs
8360
- };
8361
- }
8362
- //
8363
- // Drafts - Pages
8364
- //
8365
- buildPageDraftDeletedStates(pages, pageSnapshots) {
8366
- const deletedSnapshotsByPageId = mapByUnique(
8367
- pickLatestPageSnapshots(pageSnapshots.filter((s) => s.reason === "Deletion")),
8368
- (s) => s.page.id
8369
- );
8370
- const result = /* @__PURE__ */ new Map();
8371
- pages.forEach((page) => {
8372
- const deletedSnapshot = deletedSnapshotsByPageId.get(page.id);
8373
- if (!deletedSnapshot)
8374
- return;
8375
- result.set(page.id, {
8376
- changeType: "Deleted",
8377
- deletedAt: deletedSnapshot.createdAt,
8378
- deletedByUserId: deletedSnapshot.createdByUserId
8379
- });
8380
- });
8381
- return result;
8382
- }
8383
- buildPageDraftCreatedAndUpdatedStates(pages, pageSnapshots) {
8384
- const doc = new VersionRoomBaseYDoc(this.yDoc);
8385
- const pageHashes = doc.getDocumentationPageContentHashes();
8386
- const publishedSnapshots = pickLatestPageSnapshots(pageSnapshots.filter((s) => s.reason === "Publish"));
8387
- const publishedSnapshotsByPageId = mapByUnique(publishedSnapshots, (s) => s.page.id);
8388
- const result = /* @__PURE__ */ new Map();
8389
- pages.forEach((page) => {
8390
- const snapshot = publishedSnapshotsByPageId.get(page.id);
8391
- let publishedState;
8392
- if (snapshot) {
8393
- publishedState = this.itemStateFromPage(snapshot.page, snapshot.pageContentHash);
8394
- }
8395
- const currentPageContentHash = _nullishCoalesce(_nullishCoalesce(pageHashes[page.persistentId], () => ( _optionalChain([snapshot, 'optionalAccess', _37 => _37.pageContentHash]))), () => ( ""));
8396
- const currentState = this.itemStateFromPage(page, currentPageContentHash);
8397
- const draftState = this.createDraftState(page.persistentId, currentState, publishedState);
8398
- if (draftState)
8399
- result.set(page.id, draftState);
8400
- });
8401
- return result;
8402
- }
8403
- itemStateFromPage(page, pageContentHash) {
8404
- return {
8405
- title: page.meta.name,
8406
- configuration: _nullishCoalesce(page.data.configuration, () => ( defaultDocumentationItemConfigurationV2)),
8407
- contentHash: pageContentHash
8408
- };
8409
- }
8410
- getDeletedPages(pages, pageSnapshots) {
8411
- const existingPageIds = new Set(pages.map((p) => p.id));
8412
- const latestSnapshots = pickLatestPageSnapshots(pageSnapshots);
8413
- return latestSnapshots.filter((s) => !existingPageIds.has(s.page.id)).map((s) => s.page);
8414
- }
8415
- buildPagePublishedMetadata(pages, pageSnapshots) {
8416
- const publishedPageSnapshotsById = mapByUnique(
8417
- pickLatestPageSnapshots(pageSnapshots.filter((s) => s.reason === "Publish")),
8418
- (s) => s.page.id
8419
- );
8420
- const result = /* @__PURE__ */ new Map();
8421
- pages.forEach((p) => {
8422
- const publishedSnapshot = publishedPageSnapshotsById.get(p.id);
8423
- if (!publishedSnapshot)
8424
- return;
8425
- result.set(p.id, {
8426
- lastPublishedAt: publishedSnapshot.createdAt,
8427
- lastPublishedByUserId: publishedSnapshot.createdByUserId
8428
- });
8429
- });
8430
- return result;
8431
- }
8432
- //
8433
- // Drafts - Groups
8434
- //
8435
- buildGroupDraftDeletedStates(groups, groupSnapshots) {
8436
- const deletedSnapshotsByGroupId = mapByUnique(
8437
- pickLatestGroupSnapshots(groupSnapshots.filter((s) => s.reason === "Deletion")),
8438
- (s) => s.group.id
8439
- );
8440
- const result = /* @__PURE__ */ new Map();
8441
- groups.forEach((group) => {
8442
- if (!group.parentPersistentId)
8443
- return;
8444
- const deletedSnapshot = deletedSnapshotsByGroupId.get(group.id);
8445
- if (!deletedSnapshot)
8446
- return;
8447
- result.set(group.id, {
8448
- changeType: "Deleted",
8449
- deletedAt: deletedSnapshot.createdAt,
8450
- deletedByUserId: deletedSnapshot.createdByUserId
8451
- });
8452
- });
8453
- return result;
8454
- }
8455
- buildGroupDraftCreatedAndUpdatedStates(groups, groupSnapshots) {
8456
- const publishedSnapshots = pickLatestGroupSnapshots(groupSnapshots.filter((s) => s.reason === "Publish"));
8457
- const publishedSnapshotsByGroupId = mapByUnique(publishedSnapshots, (s) => s.group.id);
8458
- const result = /* @__PURE__ */ new Map();
8459
- groups.forEach((group) => {
8460
- if (!group.parentPersistentId)
8461
- return;
8462
- const currentState = this.itemStateFromGroup(group);
8463
- const snapshot = publishedSnapshotsByGroupId.get(group.id);
8464
- let publishedState;
8465
- if (snapshot) {
8466
- publishedState = this.itemStateFromGroup(snapshot.group);
8467
- }
8468
- const draftState = this.createDraftState(group.persistentId, currentState, publishedState);
8469
- if (draftState)
8470
- result.set(group.id, draftState);
8471
- });
8472
- return result;
8473
- }
8474
- itemStateFromGroup(group) {
8475
- return {
8476
- title: group.meta.name,
8477
- configuration: _nullishCoalesce(_optionalChain([group, 'access', _38 => _38.data, 'optionalAccess', _39 => _39.configuration]), () => ( defaultDocumentationItemConfigurationV2)),
8478
- contentHash: "-"
8479
- };
8480
- }
8481
- getDeletedGroups(groups, groupSnapshots) {
8482
- const existingGroupIds = new Set(groups.map((p) => p.id));
8483
- const latestSnapshots = pickLatestGroupSnapshots(groupSnapshots);
8484
- return latestSnapshots.filter((s) => !existingGroupIds.has(s.group.id)).map((s) => s.group);
8485
- }
8486
- buildGroupPublishedMetadata(groups, groupSnapshots) {
8487
- const publishedGroupSnapshotsById = mapByUnique(
8488
- pickLatestGroupSnapshots(groupSnapshots.filter((s) => s.reason === "Publish")),
8489
- (s) => s.group.id
8490
- );
8491
- const result = /* @__PURE__ */ new Map();
8492
- groups.forEach((g) => {
8493
- if (!g.parentPersistentId)
8494
- return;
8495
- const publishedSnapshot = publishedGroupSnapshotsById.get(g.id);
8496
- if (!publishedSnapshot)
8497
- return;
8498
- result.set(g.id, {
8499
- lastPublishedAt: publishedSnapshot.createdAt,
8500
- lastPublishedByUserId: publishedSnapshot.createdByUserId
8501
- });
8502
- });
8503
- return result;
8504
- }
8505
- //
8506
- // Drafts - Shared
8507
- //
8508
- createDraftState(itemPersistentId, currentState, publishedState) {
8509
- if (!publishedState) {
8510
- return { changeType: "Created" };
8511
- }
8512
- const updatedDraftState = {
8513
- changeType: "Updated",
8514
- changes: {}
8515
- };
8516
- if (currentState.title !== publishedState.title) {
8517
- if (this.debug) {
8518
- console.log(`Item ${itemPersistentId} (${currentState.title}): updated title`);
8519
- }
8520
- updatedDraftState.changes.previousTitle = publishedState.title;
8521
- }
8522
- const currentConfigHash = generateHash(currentState.configuration, this.debug);
8523
- const publishedConfigHash = generateHash(publishedState.configuration, this.debug);
8524
- if (currentConfigHash !== publishedConfigHash) {
8525
- if (this.debug) {
8526
- console.log(`Item ${itemPersistentId} (${currentState.title}): updated configuration`);
8527
- }
8528
- const configurationDto = documentationItemConfigurationToDTOV2(publishedState.configuration);
8529
- updatedDraftState.changes.previousConfiguration = configurationDto;
8530
- }
8531
- if (currentState.contentHash !== publishedState.contentHash) {
8532
- if (this.debug) {
8533
- console.log(`Item ${itemPersistentId} (${currentState.title}): updated content hash`);
8534
- }
8535
- updatedDraftState.changes.previousContentHash = publishedState.contentHash;
8536
- }
8537
- if (Object.keys(updatedDraftState.changes).length) {
8538
- return updatedDraftState;
8539
- }
8540
- return void 0;
8541
- }
8542
- buildGroupApprovalStates(groups, groupSnapshots) {
8543
- const result = /* @__PURE__ */ new Map();
8544
- const allGroups = [...groups, ...groupSnapshots];
8545
- for (const g of allGroups) {
8546
- const approvalState = {
8547
- approvalState: "Approved",
8548
- designSystemVersionId: g.designSystemVersionId,
8549
- persistentId: g.persistentId,
8550
- groupId: g.id
8551
- };
8552
- result.set(g.id, approvalState);
8553
- }
8554
- return result;
8548
+ return computeDocsHierarchy(doc.getState(), options);
8555
8549
  }
8556
8550
  //
8557
8551
  // Update page content hash
@@ -8587,19 +8581,6 @@ var FrontendVersionRoomYDoc = class {
8587
8581
  const settings = doc.getDocumentationInternalSettings();
8588
8582
  return settings.approvalRequiredForPublishing;
8589
8583
  }
8590
- buildPageApprovalStates(pages) {
8591
- const doc = new VersionRoomBaseYDoc(this.yDoc);
8592
- const pageIds = pages.map((p) => p.id);
8593
- const result = /* @__PURE__ */ new Map();
8594
- const approvals = doc.getApprovals();
8595
- for (const pId of pageIds) {
8596
- const approval = approvals.find((approval2) => approval2.pageId === pId);
8597
- if (approval) {
8598
- result.set(pId, approval);
8599
- }
8600
- }
8601
- return result;
8602
- }
8603
8584
  };
8604
8585
 
8605
8586
  // src/yjs/design-system-content/documentation-hierarchy.ts
@@ -8626,7 +8607,7 @@ var DTODocumentationPageRoomHeaderDataUpdate = _zod.z.object({
8626
8607
  function itemConfigurationToYjs(yDoc, item) {
8627
8608
  yDoc.transact((trx) => {
8628
8609
  const { title, configuration } = item;
8629
- const header = _optionalChain([configuration, 'optionalAccess', _40 => _40.header]);
8610
+ const header = _optionalChain([configuration, 'optionalAccess', _41 => _41.header]);
8630
8611
  if (title !== void 0) {
8631
8612
  const headerYMap = trx.doc.getMap("itemTitle");
8632
8613
  headerYMap.set("title", title);
@@ -8644,9 +8625,9 @@ function itemConfigurationToYjs(yDoc, item) {
8644
8625
  header.minHeight !== void 0 && headerYMap.set("minHeight", header.minHeight);
8645
8626
  }
8646
8627
  const configYMap = trx.doc.getMap("itemConfiguration");
8647
- _optionalChain([configuration, 'optionalAccess', _41 => _41.showSidebar]) !== void 0 && configYMap.set("showSidebar", configuration.showSidebar);
8648
- _optionalChain([configuration, 'optionalAccess', _42 => _42.isHidden]) !== void 0 && configYMap.set("isHidden", configuration.isHidden);
8649
- _optionalChain([configuration, 'optionalAccess', _43 => _43.isPrivate]) !== void 0 && configYMap.set("isPrivate", configuration.isPrivate);
8628
+ _optionalChain([configuration, 'optionalAccess', _42 => _42.showSidebar]) !== void 0 && configYMap.set("showSidebar", configuration.showSidebar);
8629
+ _optionalChain([configuration, 'optionalAccess', _43 => _43.isHidden]) !== void 0 && configYMap.set("isHidden", configuration.isHidden);
8630
+ _optionalChain([configuration, 'optionalAccess', _44 => _44.isPrivate]) !== void 0 && configYMap.set("isPrivate", configuration.isPrivate);
8650
8631
  });
8651
8632
  }
8652
8633
  function yjsToItemConfiguration(yDoc) {
@@ -9503,7 +9484,7 @@ var ListTreeBuilder = class {
9503
9484
  }
9504
9485
  addWithProperty(block, multiRichTextProperty) {
9505
9486
  const parsedOptions = PageBlockDefinitionMutiRichTextOptions.optional().parse(multiRichTextProperty.options);
9506
- return this.add(block, multiRichTextProperty.id, _optionalChain([parsedOptions, 'optionalAccess', _44 => _44.multiRichTextStyle]) || "OL");
9487
+ return this.add(block, multiRichTextProperty.id, _optionalChain([parsedOptions, 'optionalAccess', _45 => _45.multiRichTextStyle]) || "OL");
9507
9488
  }
9508
9489
  add(block, multiRichTextPropertyId, multiRichTextPropertyStyle) {
9509
9490
  const list = this.createList(block, multiRichTextPropertyId, multiRichTextPropertyStyle);
@@ -9518,7 +9499,7 @@ var ListTreeBuilder = class {
9518
9499
  }
9519
9500
  const listParent = this.getParentOfDepth(block.data.indentLevel);
9520
9501
  const lastChild = listParent.children[listParent.children.length - 1];
9521
- if (_optionalChain([lastChild, 'optionalAccess', _45 => _45.type]) === "List") {
9502
+ if (_optionalChain([lastChild, 'optionalAccess', _46 => _46.type]) === "List") {
9522
9503
  lastChild.children.push(...list.leadingChildren);
9523
9504
  return;
9524
9505
  } else {
@@ -9749,7 +9730,7 @@ function serializeAsRichTextBlock(input) {
9749
9730
  const textPropertyValue = BlockParsingUtils.richTextPropertyValue(blockItem, richTextProperty.id);
9750
9731
  const enrichedInput = { ...input, richTextPropertyValue: textPropertyValue };
9751
9732
  const parsedOptions = PageBlockDefinitionRichTextOptions.optional().parse(richTextProperty.options);
9752
- const style = _nullishCoalesce(_optionalChain([parsedOptions, 'optionalAccess', _46 => _46.richTextStyle]), () => ( "Default"));
9733
+ const style = _nullishCoalesce(_optionalChain([parsedOptions, 'optionalAccess', _47 => _47.richTextStyle]), () => ( "Default"));
9753
9734
  switch (style) {
9754
9735
  case "Callout":
9755
9736
  return serializeAsCallout(enrichedInput);
@@ -9973,7 +9954,7 @@ function serializeBlockNodeAttributes(block) {
9973
9954
  };
9974
9955
  }
9975
9956
  function richTextHeadingLevel(property) {
9976
- const style = _optionalChain([property, 'access', _47 => _47.options, 'optionalAccess', _48 => _48.richTextStyle]);
9957
+ const style = _optionalChain([property, 'access', _48 => _48.options, 'optionalAccess', _49 => _49.richTextStyle]);
9977
9958
  if (!style)
9978
9959
  return void 0;
9979
9960
  switch (style) {
@@ -10094,7 +10075,7 @@ function serializeAsCustomBlock(block, definition) {
10094
10075
  linksTo: i.linksTo
10095
10076
  };
10096
10077
  });
10097
- const columns = _optionalChain([block, 'access', _49 => _49.data, 'access', _50 => _50.appearance, 'optionalAccess', _51 => _51.numberOfColumns]);
10078
+ const columns = _optionalChain([block, 'access', _50 => _50.data, 'access', _51 => _51.appearance, 'optionalAccess', _52 => _52.numberOfColumns]);
10098
10079
  return {
10099
10080
  type: serializeCustomBlockNodeType(block, definition),
10100
10081
  attrs: {
@@ -12253,7 +12234,7 @@ function parseAsListNode(prosemirrorNode) {
12253
12234
  function parseAsListNodeItem(prosemirrorNode) {
12254
12235
  if (prosemirrorNode.type !== "listItem")
12255
12236
  return null;
12256
- const firstChild = _optionalChain([prosemirrorNode, 'access', _52 => _52.content, 'optionalAccess', _53 => _53[0]]);
12237
+ const firstChild = _optionalChain([prosemirrorNode, 'access', _53 => _53.content, 'optionalAccess', _54 => _54[0]]);
12257
12238
  if (!firstChild || firstChild.type !== "paragraph")
12258
12239
  return null;
12259
12240
  return parseRichText(_nullishCoalesce(firstChild.content, () => ( [])));
@@ -12408,10 +12389,10 @@ function parseAsMultiRichText(prosemirrorNode, definition, property, definitions
12408
12389
  const variantId = getProsemirrorBlockVariantId(prosemirrorNode);
12409
12390
  const result = [];
12410
12391
  const listItems = [];
12411
- _optionalChain([prosemirrorNode, 'access', _54 => _54.content, 'optionalAccess', _55 => _55.forEach, 'call', _56 => _56((c) => {
12392
+ _optionalChain([prosemirrorNode, 'access', _55 => _55.content, 'optionalAccess', _56 => _56.forEach, 'call', _57 => _57((c) => {
12412
12393
  if (c.type !== "listItem")
12413
12394
  return;
12414
- _optionalChain([c, 'access', _57 => _57.content, 'optionalAccess', _58 => _58.forEach, 'call', _59 => _59((cc) => {
12395
+ _optionalChain([c, 'access', _58 => _58.content, 'optionalAccess', _59 => _59.forEach, 'call', _60 => _60((cc) => {
12415
12396
  listItems.push(cc);
12416
12397
  })]);
12417
12398
  })]);
@@ -12527,17 +12508,17 @@ function parseAsTable(prosemirrorNode, definition, property) {
12527
12508
  return null;
12528
12509
  const variantId = getProsemirrorBlockVariantId(prosemirrorNode);
12529
12510
  const hasBorder = getProsemirrorAttribute(prosemirrorNode, "hasBorder", _zod.z.boolean().optional()) !== false;
12530
- const tableChild = _optionalChain([prosemirrorNode, 'access', _60 => _60.content, 'optionalAccess', _61 => _61.find, 'call', _62 => _62((c) => c.type === "table")]);
12511
+ const tableChild = _optionalChain([prosemirrorNode, 'access', _61 => _61.content, 'optionalAccess', _62 => _62.find, 'call', _63 => _63((c) => c.type === "table")]);
12531
12512
  if (!tableChild) {
12532
12513
  return emptyTable(id, variantId, 0);
12533
12514
  }
12534
- const rows = _nullishCoalesce(_optionalChain([tableChild, 'access', _63 => _63.content, 'optionalAccess', _64 => _64.filter, 'call', _65 => _65((c) => c.type === "tableRow" && !!_optionalChain([c, 'access', _66 => _66.content, 'optionalAccess', _67 => _67.length]))]), () => ( []));
12515
+ const rows = _nullishCoalesce(_optionalChain([tableChild, 'access', _64 => _64.content, 'optionalAccess', _65 => _65.filter, 'call', _66 => _66((c) => c.type === "tableRow" && !!_optionalChain([c, 'access', _67 => _67.content, 'optionalAccess', _68 => _68.length]))]), () => ( []));
12535
12516
  if (!rows.length) {
12536
12517
  return emptyTable(id, variantId, 0);
12537
12518
  }
12538
- const rowHeaderCells = _nullishCoalesce(_optionalChain([rows, 'access', _68 => _68[0], 'access', _69 => _69.content, 'optionalAccess', _70 => _70.filter, 'call', _71 => _71((c) => c.type === "tableHeader"), 'access', _72 => _72.length]), () => ( 0));
12539
- const columnHeaderCells = rows.filter((r) => _optionalChain([r, 'access', _73 => _73.content, 'optionalAccess', _74 => _74[0], 'optionalAccess', _75 => _75.type]) === "tableHeader").length;
12540
- const hasHeaderRow = _optionalChain([rows, 'access', _76 => _76[0], 'access', _77 => _77.content, 'optionalAccess', _78 => _78.length]) === rowHeaderCells;
12519
+ const rowHeaderCells = _nullishCoalesce(_optionalChain([rows, 'access', _69 => _69[0], 'access', _70 => _70.content, 'optionalAccess', _71 => _71.filter, 'call', _72 => _72((c) => c.type === "tableHeader"), 'access', _73 => _73.length]), () => ( 0));
12520
+ const columnHeaderCells = rows.filter((r) => _optionalChain([r, 'access', _74 => _74.content, 'optionalAccess', _75 => _75[0], 'optionalAccess', _76 => _76.type]) === "tableHeader").length;
12521
+ const hasHeaderRow = _optionalChain([rows, 'access', _77 => _77[0], 'access', _78 => _78.content, 'optionalAccess', _79 => _79.length]) === rowHeaderCells;
12541
12522
  const hasHeaderColumn = rows.length === columnHeaderCells;
12542
12523
  const tableValue = {
12543
12524
  showBorder: hasBorder,
@@ -12619,7 +12600,7 @@ function parseAsTableNode(prosemirrorNode) {
12619
12600
  const parsedItems = PageBlockItemV2.array().safeParse(JSON.parse(items));
12620
12601
  if (!parsedItems.success)
12621
12602
  return null;
12622
- const rawImagePropertyValue = _optionalChain([parsedItems, 'access', _79 => _79.data, 'access', _80 => _80[0], 'optionalAccess', _81 => _81.props, 'access', _82 => _82.image]);
12603
+ const rawImagePropertyValue = _optionalChain([parsedItems, 'access', _80 => _80.data, 'access', _81 => _81[0], 'optionalAccess', _82 => _82.props, 'access', _83 => _83.image]);
12623
12604
  if (!rawImagePropertyValue)
12624
12605
  return null;
12625
12606
  const imagePropertyValueParseResult = PageBlockItemImageValue.safeParse(rawImagePropertyValue);
@@ -12860,7 +12841,7 @@ function getProsemirrorBlockVariantId(prosemirrorNode) {
12860
12841
  return getProsemirrorAttribute(prosemirrorNode, "variantId", nullishToOptional(_zod.z.string()));
12861
12842
  }
12862
12843
  function getProsemirrorAttribute(prosemirrorNode, attributeName, validationSchema) {
12863
- const parsedAttr = validationSchema.safeParse(_optionalChain([prosemirrorNode, 'access', _83 => _83.attrs, 'optionalAccess', _84 => _84[attributeName]]));
12844
+ const parsedAttr = validationSchema.safeParse(_optionalChain([prosemirrorNode, 'access', _84 => _84.attrs, 'optionalAccess', _85 => _85[attributeName]]));
12864
12845
  if (parsedAttr.success) {
12865
12846
  return parsedAttr.data;
12866
12847
  } else {
@@ -12915,6 +12896,158 @@ var BackendVersionRoomYDoc = class {
12915
12896
  }
12916
12897
  };
12917
12898
 
12899
+ // src/sync/local-state.ts
12900
+ var LocalStorage = class {
12901
+ constructor() {
12902
+ __publicField(this, "pages", /* @__PURE__ */ new Map());
12903
+ __publicField(this, "groups", /* @__PURE__ */ new Map());
12904
+ }
12905
+ addPage(page) {
12906
+ if (this.pages.has(page.persistentId)) {
12907
+ throw new Error(`Page with id ${page.persistentId} already exists`);
12908
+ }
12909
+ this.pages.set(page.persistentId, page);
12910
+ }
12911
+ getPage(persistentId) {
12912
+ const page = this.pages.get(persistentId);
12913
+ if (!page) {
12914
+ throw new Error(`Page with id ${persistentId} doesn't exist`);
12915
+ }
12916
+ return page;
12917
+ }
12918
+ getAllPages() {
12919
+ return Array.from(this.pages.values());
12920
+ }
12921
+ removePage(persistentId) {
12922
+ this.pages.delete(persistentId);
12923
+ }
12924
+ };
12925
+
12926
+ // src/sync/docs-structure-repo.ts
12927
+ var DocsStructureRepo = class {
12928
+ };
12929
+ var DocsStructureRepository = class {
12930
+ constructor(yDoc, transactionExecutor) {
12931
+ __publicField(this, "localState", new LocalStorage());
12932
+ __publicField(this, "yDoc");
12933
+ __publicField(this, "yObserver");
12934
+ __publicField(this, "yState");
12935
+ __publicField(this, "trxQueue");
12936
+ __publicField(this, "hierarchyObservers", /* @__PURE__ */ new Set());
12937
+ this.yDoc = yDoc;
12938
+ this.yState = new VersionRoomBaseYDoc(this.yDoc).getState();
12939
+ this.yObserver = yDoc.on("update", () => this.onYUpdate());
12940
+ this.trxQueue = new TransactionQueue(transactionExecutor);
12941
+ }
12942
+ //
12943
+ // Lifecycle
12944
+ //
12945
+ addHierarchyObserver(observer) {
12946
+ this.hierarchyObservers.add(observer);
12947
+ }
12948
+ removeHierarchyObserver(observer) {
12949
+ this.hierarchyObservers.delete(observer);
12950
+ }
12951
+ dispose() {
12952
+ this.yDoc.off("update", this.yObserver);
12953
+ this.hierarchyObservers.clear();
12954
+ this.trxQueue.clear();
12955
+ }
12956
+ //
12957
+ // Actions
12958
+ //
12959
+ createPage(input) {
12960
+ void this.createPage(input);
12961
+ }
12962
+ createPagePromise(input) {
12963
+ this.localState.addPage({
12964
+ createdAt: /* @__PURE__ */ new Date(),
12965
+ parentPersistentId: input.parentPersistentId,
12966
+ persistentId: input.persistentId,
12967
+ shortPersistentId: generateShortPersistentId(),
12968
+ slug: slugify(input.title),
12969
+ meta: { name: input.title },
12970
+ updatedAt: /* @__PURE__ */ new Date(),
12971
+ data: { configuration: input.configuration },
12972
+ sortOrder: this.calculateSortOrder(input.parentPersistentId, input.afterPersistentId),
12973
+ designSystemVersionId: ""
12974
+ });
12975
+ const promise = this.trxQueue.enqueue({
12976
+ type: "DocumentationPageCreate",
12977
+ input: {
12978
+ persistentId: input.persistentId,
12979
+ parentPersistentId: input.parentPersistentId,
12980
+ title: input.title,
12981
+ afterPersistentId: input.afterPersistentId,
12982
+ configuration: input.configuration
12983
+ }
12984
+ });
12985
+ this.recalculateHierarchy();
12986
+ return promise;
12987
+ }
12988
+ //
12989
+ // Reactions
12990
+ //
12991
+ recalculateHierarchy() {
12992
+ const hierarchy = computeDocsHierarchy({
12993
+ approvals: this.yState.approvals,
12994
+ groups: this.yState.groups,
12995
+ groupSnapshots: this.yState.groupSnapshots,
12996
+ pageContentHashes: this.yState.pageContentHashes,
12997
+ pages: [...this.yState.pages, ...this.localState.getAllPages()],
12998
+ pageSnapshots: this.yState.pageSnapshots,
12999
+ settings: this.yState.settings
13000
+ });
13001
+ this.hierarchyObservers.forEach((o) => o(hierarchy));
13002
+ }
13003
+ onYUpdate() {
13004
+ this.yState = new VersionRoomBaseYDoc(this.yDoc).getState();
13005
+ this.recalculateHierarchy();
13006
+ }
13007
+ //
13008
+ // Utils
13009
+ //
13010
+ calculateSortOrder(parentPersistentId, afterPersistentId) {
13011
+ const sortOrderStep = Math.pow(2, 16);
13012
+ const neighbours = [
13013
+ ...this.yState.pages.filter((p) => p.parentPersistentId === parentPersistentId),
13014
+ ...this.yState.groups.filter((g) => g.parentPersistentId === parentPersistentId)
13015
+ ];
13016
+ if (!neighbours.length)
13017
+ return 0;
13018
+ neighbours.sort((lhs, rhs) => lhs.sortOrder - rhs.sortOrder);
13019
+ if (!afterPersistentId)
13020
+ return neighbours[0].sortOrder - sortOrderStep;
13021
+ const index = neighbours.findIndex((e) => e.persistentId === afterPersistentId);
13022
+ if (index < 0 || index === neighbours.length - 1) {
13023
+ return neighbours[neighbours.length - 1].sortOrder + sortOrderStep;
13024
+ }
13025
+ const left = neighbours[index].sortOrder;
13026
+ const right = _nullishCoalesce(_optionalChain([neighbours, 'access', _86 => _86[index + 1], 'optionalAccess', _87 => _87.sortOrder]), () => ( left + sortOrderStep * 2));
13027
+ return (right + left) / 2;
13028
+ }
13029
+ };
13030
+ var TransactionQueue = class {
13031
+ constructor(executor) {
13032
+ __publicField(this, "executor");
13033
+ __publicField(this, "queue", new (0, _pqueue2.default)({
13034
+ concurrency: 1
13035
+ }));
13036
+ this.executor = executor;
13037
+ }
13038
+ enqueue(trx) {
13039
+ return this.queue.add(() => this.executor(trx));
13040
+ }
13041
+ onEmpty() {
13042
+ return this.queue.onEmpty();
13043
+ }
13044
+ clear() {
13045
+ this.queue.clear();
13046
+ }
13047
+ };
13048
+
13049
+
13050
+
12918
13051
 
12919
13052
 
12920
13053
 
@@ -13306,5 +13439,5 @@ var BackendVersionRoomYDoc = class {
13306
13439
 
13307
13440
 
13308
13441
 
13309
- exports.BackendVersionRoomYDoc = BackendVersionRoomYDoc; exports.BlockDefinitionUtils = BlockDefinitionUtils; exports.BlockParsingUtils = BlockParsingUtils; exports.BrandsEndpoint = BrandsEndpoint; exports.CodegenEndpoint = CodegenEndpoint; exports.Collection = Collection2; exports.DTOAppBootstrapDataQuery = DTOAppBootstrapDataQuery; exports.DTOAppBootstrapDataResponse = DTOAppBootstrapDataResponse; exports.DTOAssetRenderConfiguration = DTOAssetRenderConfiguration; exports.DTOAuthenticatedUser = DTOAuthenticatedUser; exports.DTOAuthenticatedUserProfile = DTOAuthenticatedUserProfile; exports.DTOAuthenticatedUserResponse = DTOAuthenticatedUserResponse; exports.DTOBffFigmaImportRequestBody = DTOBffFigmaImportRequestBody; exports.DTOBffImportRequestBody = DTOBffImportRequestBody; exports.DTOBffUploadImportRequestBody = DTOBffUploadImportRequestBody; exports.DTOBrand = DTOBrand; exports.DTOBrandCreatePayload = DTOBrandCreatePayload; exports.DTOBrandCreateResponse = DTOBrandCreateResponse; exports.DTOBrandGetResponse = DTOBrandGetResponse; exports.DTOBrandUpdatePayload = DTOBrandUpdatePayload; exports.DTOBrandsListResponse = DTOBrandsListResponse; exports.DTOColorTokenInlineData = DTOColorTokenInlineData; exports.DTOCreateDocumentationGroupInput = DTOCreateDocumentationGroupInput; exports.DTOCreateDocumentationPageInputV2 = DTOCreateDocumentationPageInputV2; exports.DTOCreateDocumentationTabInput = DTOCreateDocumentationTabInput; exports.DTOCreateVersionInput = DTOCreateVersionInput; exports.DTODataSource = DTODataSource; exports.DTODataSourceFigma = DTODataSourceFigma; exports.DTODataSourceFigmaCloud = DTODataSourceFigmaCloud; exports.DTODataSourceFigmaCreatePayload = DTODataSourceFigmaCreatePayload; exports.DTODataSourceFigmaImportPayload = DTODataSourceFigmaImportPayload; exports.DTODataSourceFigmaScope = DTODataSourceFigmaScope; exports.DTODataSourceFigmaVariablesPlugin = DTODataSourceFigmaVariablesPlugin; exports.DTODataSourceResponse = DTODataSourceResponse; exports.DTODataSourceTokenStudio = DTODataSourceTokenStudio; exports.DTODataSourcesListResponse = DTODataSourcesListResponse; exports.DTODeleteDocumentationGroupInput = DTODeleteDocumentationGroupInput; exports.DTODeleteDocumentationPageInputV2 = DTODeleteDocumentationPageInputV2; exports.DTODeleteDocumentationTabGroupInput = DTODeleteDocumentationTabGroupInput; exports.DTODesignElementsDataDiffResponse = DTODesignElementsDataDiffResponse; exports.DTODesignSystem = DTODesignSystem; exports.DTODesignSystemComponent = DTODesignSystemComponent; exports.DTODesignSystemComponentCreateInput = DTODesignSystemComponentCreateInput; exports.DTODesignSystemComponentListResponse = DTODesignSystemComponentListResponse; exports.DTODesignSystemComponentResponse = DTODesignSystemComponentResponse; exports.DTODesignSystemContactsResponse = DTODesignSystemContactsResponse; exports.DTODesignSystemCreateInput = DTODesignSystemCreateInput; exports.DTODesignSystemInvitation = DTODesignSystemInvitation; exports.DTODesignSystemMember = DTODesignSystemMember; exports.DTODesignSystemMemberListResponse = DTODesignSystemMemberListResponse; exports.DTODesignSystemMembersUpdatePayload = DTODesignSystemMembersUpdatePayload; exports.DTODesignSystemMembersUpdateResponse = DTODesignSystemMembersUpdateResponse; exports.DTODesignSystemResponse = DTODesignSystemResponse; exports.DTODesignSystemRole = DTODesignSystemRole; exports.DTODesignSystemUpdateAccessModeInput = DTODesignSystemUpdateAccessModeInput; exports.DTODesignSystemUpdateInput = DTODesignSystemUpdateInput; exports.DTODesignSystemVersion = DTODesignSystemVersion; exports.DTODesignSystemVersionCreationResponse = DTODesignSystemVersionCreationResponse; exports.DTODesignSystemVersionGetResponse = DTODesignSystemVersionGetResponse; exports.DTODesignSystemVersionJobStatusResponse = DTODesignSystemVersionJobStatusResponse; exports.DTODesignSystemVersionJobsResponse = DTODesignSystemVersionJobsResponse; exports.DTODesignSystemVersionStats = DTODesignSystemVersionStats; exports.DTODesignSystemVersionStatsQuery = DTODesignSystemVersionStatsQuery; exports.DTODesignSystemVersionsListResponse = DTODesignSystemVersionsListResponse; exports.DTODesignSystemsListResponse = DTODesignSystemsListResponse; exports.DTODesignToken = DTODesignToken; exports.DTODesignTokenCreatePayload = DTODesignTokenCreatePayload; exports.DTODesignTokenGroup = DTODesignTokenGroup; exports.DTODesignTokenGroupCreatePayload = DTODesignTokenGroupCreatePayload; exports.DTODesignTokenGroupListResponse = DTODesignTokenGroupListResponse; exports.DTODesignTokenGroupResponse = DTODesignTokenGroupResponse; exports.DTODesignTokenListResponse = DTODesignTokenListResponse; exports.DTODesignTokenResponse = DTODesignTokenResponse; exports.DTODiffCountBase = DTODiffCountBase; exports.DTODocumentationDraftChangeType = DTODocumentationDraftChangeType; exports.DTODocumentationDraftState = DTODocumentationDraftState; exports.DTODocumentationDraftStateCreated = DTODocumentationDraftStateCreated; exports.DTODocumentationDraftStateDeleted = DTODocumentationDraftStateDeleted; exports.DTODocumentationDraftStateUpdated = DTODocumentationDraftStateUpdated; exports.DTODocumentationGroupApprovalState = DTODocumentationGroupApprovalState; exports.DTODocumentationGroupCreateActionInputV2 = DTODocumentationGroupCreateActionInputV2; exports.DTODocumentationGroupCreateActionOutputV2 = DTODocumentationGroupCreateActionOutputV2; exports.DTODocumentationGroupDeleteActionInputV2 = DTODocumentationGroupDeleteActionInputV2; exports.DTODocumentationGroupDeleteActionOutputV2 = DTODocumentationGroupDeleteActionOutputV2; exports.DTODocumentationGroupDuplicateActionInputV2 = DTODocumentationGroupDuplicateActionInputV2; exports.DTODocumentationGroupDuplicateActionOutputV2 = DTODocumentationGroupDuplicateActionOutputV2; exports.DTODocumentationGroupMoveActionInputV2 = DTODocumentationGroupMoveActionInputV2; exports.DTODocumentationGroupMoveActionOutputV2 = DTODocumentationGroupMoveActionOutputV2; exports.DTODocumentationGroupRestoreActionInput = DTODocumentationGroupRestoreActionInput; exports.DTODocumentationGroupRestoreActionOutput = DTODocumentationGroupRestoreActionOutput; exports.DTODocumentationGroupStructureV1 = DTODocumentationGroupStructureV1; exports.DTODocumentationGroupUpdateActionInputV2 = DTODocumentationGroupUpdateActionInputV2; exports.DTODocumentationGroupUpdateActionOutputV2 = DTODocumentationGroupUpdateActionOutputV2; exports.DTODocumentationGroupV1 = DTODocumentationGroupV1; exports.DTODocumentationGroupV2 = DTODocumentationGroupV2; exports.DTODocumentationHierarchyV2 = DTODocumentationHierarchyV2; exports.DTODocumentationItemConfigurationV1 = DTODocumentationItemConfigurationV1; exports.DTODocumentationItemConfigurationV2 = DTODocumentationItemConfigurationV2; exports.DTODocumentationItemHeaderV2 = DTODocumentationItemHeaderV2; exports.DTODocumentationLinkPreviewRequest = DTODocumentationLinkPreviewRequest; exports.DTODocumentationLinkPreviewResponse = DTODocumentationLinkPreviewResponse; exports.DTODocumentationPageAnchor = DTODocumentationPageAnchor; exports.DTODocumentationPageApprovalState = DTODocumentationPageApprovalState; exports.DTODocumentationPageApprovalStateChangeActionInput = DTODocumentationPageApprovalStateChangeActionInput; exports.DTODocumentationPageApprovalStateChangeActionOutput = DTODocumentationPageApprovalStateChangeActionOutput; exports.DTODocumentationPageApprovalStateChangeInput = DTODocumentationPageApprovalStateChangeInput; exports.DTODocumentationPageContent = DTODocumentationPageContent; exports.DTODocumentationPageContentGetResponse = DTODocumentationPageContentGetResponse; exports.DTODocumentationPageCreateActionInputV2 = DTODocumentationPageCreateActionInputV2; exports.DTODocumentationPageCreateActionOutputV2 = DTODocumentationPageCreateActionOutputV2; exports.DTODocumentationPageDeleteActionInputV2 = DTODocumentationPageDeleteActionInputV2; exports.DTODocumentationPageDeleteActionOutputV2 = DTODocumentationPageDeleteActionOutputV2; exports.DTODocumentationPageDuplicateActionInputV2 = DTODocumentationPageDuplicateActionInputV2; exports.DTODocumentationPageDuplicateActionOutputV2 = DTODocumentationPageDuplicateActionOutputV2; exports.DTODocumentationPageMoveActionInputV2 = DTODocumentationPageMoveActionInputV2; exports.DTODocumentationPageMoveActionOutputV2 = DTODocumentationPageMoveActionOutputV2; exports.DTODocumentationPageRestoreActionInput = DTODocumentationPageRestoreActionInput; exports.DTODocumentationPageRestoreActionOutput = DTODocumentationPageRestoreActionOutput; exports.DTODocumentationPageRoom = DTODocumentationPageRoom; exports.DTODocumentationPageRoomHeaderData = DTODocumentationPageRoomHeaderData; exports.DTODocumentationPageRoomHeaderDataUpdate = DTODocumentationPageRoomHeaderDataUpdate; exports.DTODocumentationPageRoomResponse = DTODocumentationPageRoomResponse; exports.DTODocumentationPageSnapshot = DTODocumentationPageSnapshot; exports.DTODocumentationPageUpdateActionInputV2 = DTODocumentationPageUpdateActionInputV2; exports.DTODocumentationPageUpdateActionOutputV2 = DTODocumentationPageUpdateActionOutputV2; exports.DTODocumentationPageV2 = DTODocumentationPageV2; exports.DTODocumentationPublishMetadata = DTODocumentationPublishMetadata; exports.DTODocumentationPublishTypeQueryParams = DTODocumentationPublishTypeQueryParams; exports.DTODocumentationStructure = DTODocumentationStructure; exports.DTODocumentationStructureGroupItem = DTODocumentationStructureGroupItem; exports.DTODocumentationStructureItem = DTODocumentationStructureItem; exports.DTODocumentationStructurePageItem = DTODocumentationStructurePageItem; exports.DTODocumentationTabCreateActionInputV2 = DTODocumentationTabCreateActionInputV2; exports.DTODocumentationTabCreateActionOutputV2 = DTODocumentationTabCreateActionOutputV2; exports.DTODocumentationTabGroupDeleteActionInputV2 = DTODocumentationTabGroupDeleteActionInputV2; exports.DTODocumentationTabGroupDeleteActionOutputV2 = DTODocumentationTabGroupDeleteActionOutputV2; exports.DTODownloadAssetsRequest = DTODownloadAssetsRequest; exports.DTODownloadAssetsResponse = DTODownloadAssetsResponse; exports.DTODuplicateDocumentationGroupInput = DTODuplicateDocumentationGroupInput; exports.DTODuplicateDocumentationPageInputV2 = DTODuplicateDocumentationPageInputV2; exports.DTOElementActionInput = DTOElementActionInput; exports.DTOElementActionOutput = DTOElementActionOutput; exports.DTOElementPropertyDefinition = DTOElementPropertyDefinition; exports.DTOElementPropertyDefinitionCreatePayload = DTOElementPropertyDefinitionCreatePayload; exports.DTOElementPropertyDefinitionListResponse = DTOElementPropertyDefinitionListResponse; exports.DTOElementPropertyDefinitionOption = DTOElementPropertyDefinitionOption; exports.DTOElementPropertyDefinitionResponse = DTOElementPropertyDefinitionResponse; exports.DTOElementPropertyDefinitionUpdatePayload = DTOElementPropertyDefinitionUpdatePayload; exports.DTOElementPropertyValue = DTOElementPropertyValue; exports.DTOElementPropertyValueListResponse = DTOElementPropertyValueListResponse; exports.DTOElementPropertyValueResponse = DTOElementPropertyValueResponse; exports.DTOElementPropertyValueUpsertPaylod = DTOElementPropertyValueUpsertPaylod; exports.DTOElementView = DTOElementView; exports.DTOElementViewBasePropertyColumn = DTOElementViewBasePropertyColumn; exports.DTOElementViewColumn = DTOElementViewColumn; exports.DTOElementViewColumnSharedAttributes = DTOElementViewColumnSharedAttributes; exports.DTOElementViewPropertyDefinitionColumn = DTOElementViewPropertyDefinitionColumn; exports.DTOElementViewThemeColumn = DTOElementViewThemeColumn; exports.DTOElementViewsListResponse = DTOElementViewsListResponse; exports.DTOElementsGetOutput = DTOElementsGetOutput; exports.DTOElementsGetQuerySchema = DTOElementsGetQuerySchema; exports.DTOElementsGetTypeFilter = DTOElementsGetTypeFilter; exports.DTOExportJob = DTOExportJob; exports.DTOExportJobCreatedBy = DTOExportJobCreatedBy; exports.DTOExportJobDesignSystemPreview = DTOExportJobDesignSystemPreview; exports.DTOExportJobDesignSystemVersionPreview = DTOExportJobDesignSystemVersionPreview; exports.DTOExportJobDestinations = DTOExportJobDestinations; exports.DTOExportJobResponse = DTOExportJobResponse; exports.DTOExportJobResult = DTOExportJobResult; exports.DTOExportJobsListFilter = DTOExportJobsListFilter; exports.DTOExporter = DTOExporter; exports.DTOExporterCreateInput = DTOExporterCreateInput; exports.DTOExporterCreateOutput = DTOExporterCreateOutput; exports.DTOExporterGitProviderEnum = DTOExporterGitProviderEnum; exports.DTOExporterListQuery = DTOExporterListQuery; exports.DTOExporterListResponse = DTOExporterListResponse; exports.DTOExporterMembership = DTOExporterMembership; exports.DTOExporterMembershipRole = DTOExporterMembershipRole; exports.DTOExporterPropertyDefinition = DTOExporterPropertyDefinition; exports.DTOExporterPropertyDefinitionArray = DTOExporterPropertyDefinitionArray; exports.DTOExporterPropertyDefinitionBoolean = DTOExporterPropertyDefinitionBoolean; exports.DTOExporterPropertyDefinitionEnum = DTOExporterPropertyDefinitionEnum; exports.DTOExporterPropertyDefinitionNumber = DTOExporterPropertyDefinitionNumber; exports.DTOExporterPropertyDefinitionObject = DTOExporterPropertyDefinitionObject; exports.DTOExporterPropertyDefinitionString = DTOExporterPropertyDefinitionString; exports.DTOExporterPropertyDefinitionValue = DTOExporterPropertyDefinitionValue; exports.DTOExporterPropertyDefinitionValueMap = DTOExporterPropertyDefinitionValueMap; exports.DTOExporterPropertyDefinitionsResponse = DTOExporterPropertyDefinitionsResponse; exports.DTOExporterPropertyType = DTOExporterPropertyType; exports.DTOExporterSource = DTOExporterSource; exports.DTOExporterType = DTOExporterType; exports.DTOExporterUpdateInput = DTOExporterUpdateInput; exports.DTOFigmaComponent = DTOFigmaComponent; exports.DTOFigmaComponentGroup = DTOFigmaComponentGroup; exports.DTOFigmaComponentGroupListResponse = DTOFigmaComponentGroupListResponse; exports.DTOFigmaComponentListResponse = DTOFigmaComponentListResponse; exports.DTOFigmaNode = DTOFigmaNode; exports.DTOFigmaNodeData = DTOFigmaNodeData; exports.DTOFigmaNodeOrigin = DTOFigmaNodeOrigin; exports.DTOFigmaNodeRenderActionInput = DTOFigmaNodeRenderActionInput; exports.DTOFigmaNodeRenderActionOutput = DTOFigmaNodeRenderActionOutput; exports.DTOFigmaNodeRenderFormat = DTOFigmaNodeRenderFormat; exports.DTOFigmaNodeRenderInput = DTOFigmaNodeRenderInput; exports.DTOFrameNodeStructure = DTOFrameNodeStructure; exports.DTOFrameNodeStructureListResponse = DTOFrameNodeStructureListResponse; exports.DTOGetBlockDefinitionsOutput = DTOGetBlockDefinitionsOutput; exports.DTOGetDocumentationPageAnchorsResponse = DTOGetDocumentationPageAnchorsResponse; exports.DTOGitBranch = DTOGitBranch; exports.DTOGitOrganization = DTOGitOrganization; exports.DTOGitProject = DTOGitProject; exports.DTOGitRepository = DTOGitRepository; exports.DTOImportJob = DTOImportJob; exports.DTOImportJobResponse = DTOImportJobResponse; exports.DTOIntegration = DTOIntegration; exports.DTOIntegrationCredentials = DTOIntegrationCredentials; exports.DTOIntegrationOAuthGetResponse = DTOIntegrationOAuthGetResponse; exports.DTOIntegrationPostResponse = DTOIntegrationPostResponse; exports.DTOIntegrationsGetListResponse = DTOIntegrationsGetListResponse; exports.DTOLiveblocksAuthRequest = DTOLiveblocksAuthRequest; exports.DTOLiveblocksAuthResponse = DTOLiveblocksAuthResponse; exports.DTOMoveDocumentationGroupInput = DTOMoveDocumentationGroupInput; exports.DTOMoveDocumentationPageInputV2 = DTOMoveDocumentationPageInputV2; exports.DTONpmRegistryConfig = DTONpmRegistryConfig; exports.DTONpmRegistryConfigConstants = DTONpmRegistryConfigConstants; exports.DTOObjectMeta = DTOObjectMeta; exports.DTOPageBlockColorV2 = DTOPageBlockColorV2; exports.DTOPageBlockDefinition = DTOPageBlockDefinition; exports.DTOPageBlockDefinitionBehavior = DTOPageBlockDefinitionBehavior; exports.DTOPageBlockDefinitionItem = DTOPageBlockDefinitionItem; exports.DTOPageBlockDefinitionLayout = DTOPageBlockDefinitionLayout; exports.DTOPageBlockDefinitionProperty = DTOPageBlockDefinitionProperty; exports.DTOPageBlockDefinitionVariant = DTOPageBlockDefinitionVariant; exports.DTOPageBlockItemV2 = DTOPageBlockItemV2; exports.DTOPagination = DTOPagination; exports.DTOPipeline = DTOPipeline; exports.DTOPipelineCreateBody = DTOPipelineCreateBody; exports.DTOPipelineListQuery = DTOPipelineListQuery; exports.DTOPipelineListResponse = DTOPipelineListResponse; exports.DTOPipelineResponse = DTOPipelineResponse; exports.DTOPipelineTriggerBody = DTOPipelineTriggerBody; exports.DTOPipelineUpdateBody = DTOPipelineUpdateBody; exports.DTOPublishDocumentationChanges = DTOPublishDocumentationChanges; exports.DTOPublishDocumentationRequest = DTOPublishDocumentationRequest; exports.DTOPublishDocumentationResponse = DTOPublishDocumentationResponse; exports.DTORenderedAssetFile = DTORenderedAssetFile; exports.DTORestoreDocumentationGroupInput = DTORestoreDocumentationGroupInput; exports.DTORestoreDocumentationPageInput = DTORestoreDocumentationPageInput; exports.DTOTheme = DTOTheme; exports.DTOThemeCreatePayload = DTOThemeCreatePayload; exports.DTOThemeListResponse = DTOThemeListResponse; exports.DTOThemeOverride = DTOThemeOverride; exports.DTOThemeOverrideCreatePayload = DTOThemeOverrideCreatePayload; exports.DTOThemeResponse = DTOThemeResponse; exports.DTOTokenCollection = DTOTokenCollection; exports.DTOTokenCollectionsListReponse = DTOTokenCollectionsListReponse; exports.DTOTransferOwnershipPayload = DTOTransferOwnershipPayload; exports.DTOUpdateDocumentationGroupInput = DTOUpdateDocumentationGroupInput; exports.DTOUpdateDocumentationPageInputV2 = DTOUpdateDocumentationPageInputV2; exports.DTOUpdateUserNotificationSettingsPayload = DTOUpdateUserNotificationSettingsPayload; exports.DTOUpdateVersionInput = DTOUpdateVersionInput; exports.DTOUser = DTOUser; exports.DTOUserGetResponse = DTOUserGetResponse; exports.DTOUserNotificationSettingsResponse = DTOUserNotificationSettingsResponse; exports.DTOUserOnboarding = DTOUserOnboarding; exports.DTOUserOnboardingDepartment = DTOUserOnboardingDepartment; exports.DTOUserOnboardingJobLevel = DTOUserOnboardingJobLevel; exports.DTOUserProfile = DTOUserProfile; exports.DTOUserProfileUpdate = DTOUserProfileUpdate; exports.DTOUserProfileUpdatePayload = DTOUserProfileUpdatePayload; exports.DTOUserProfileUpdateResponse = DTOUserProfileUpdateResponse; exports.DTOUserSource = DTOUserSource; exports.DTOUserWorkspaceMembership = DTOUserWorkspaceMembership; exports.DTOUserWorkspaceMembershipsResponse = DTOUserWorkspaceMembershipsResponse; exports.DTOWorkspace = DTOWorkspace; exports.DTOWorkspaceCreateInput = DTOWorkspaceCreateInput; exports.DTOWorkspaceIntegrationGetGitObjectsInput = DTOWorkspaceIntegrationGetGitObjectsInput; exports.DTOWorkspaceIntegrationOauthInput = DTOWorkspaceIntegrationOauthInput; exports.DTOWorkspaceIntegrationPATInput = DTOWorkspaceIntegrationPATInput; exports.DTOWorkspaceInvitationInput = DTOWorkspaceInvitationInput; exports.DTOWorkspaceInvitationUpdateResponse = DTOWorkspaceInvitationUpdateResponse; exports.DTOWorkspaceInvitationsListInput = DTOWorkspaceInvitationsListInput; exports.DTOWorkspaceInvitationsResponse = DTOWorkspaceInvitationsResponse; exports.DTOWorkspaceInviteUpdate = DTOWorkspaceInviteUpdate; exports.DTOWorkspaceMember = DTOWorkspaceMember; exports.DTOWorkspaceMembersListResponse = DTOWorkspaceMembersListResponse; exports.DTOWorkspaceProfile = DTOWorkspaceProfile; exports.DTOWorkspaceResponse = DTOWorkspaceResponse; exports.DTOWorkspaceRole = DTOWorkspaceRole; exports.DesignSystemBffEndpoint = DesignSystemBffEndpoint; exports.DesignSystemComponentEndpoint = DesignSystemComponentEndpoint; exports.DesignSystemContactsEndpoint = DesignSystemContactsEndpoint; exports.DesignSystemMembersEndpoint = DesignSystemMembersEndpoint; exports.DesignSystemSourcesEndpoint = DesignSystemSourcesEndpoint; exports.DesignSystemVersionsEndpoint = DesignSystemVersionsEndpoint; exports.DesignSystemsEndpoint = DesignSystemsEndpoint; exports.DimensionsVariableScopeType = DimensionsVariableScopeType; exports.DocumentationEndpoint = DocumentationEndpoint; exports.DocumentationHierarchySettings = DocumentationHierarchySettings; exports.DocumentationPageEditorModel = DocumentationPageEditorModel; exports.DocumentationPageV1DTO = DocumentationPageV1DTO; exports.ElementPropertyDefinitionsEndpoint = ElementPropertyDefinitionsEndpoint; exports.ElementPropertyValuesEndpoint = ElementPropertyValuesEndpoint; exports.ElementsActionEndpoint = ElementsActionEndpoint; exports.ElementsEndpoint = ElementsEndpoint; exports.ExportersEndpoint = ExportersEndpoint; exports.FigmaComponentGroupsEndpoint = FigmaComponentGroupsEndpoint; exports.FigmaComponentsEndpoint = FigmaComponentsEndpoint; exports.FigmaFrameStructuresEndpoint = FigmaFrameStructuresEndpoint; exports.FigmaUtils = FigmaUtils; exports.FormattedCollections = FormattedCollections; exports.FrontendVersionRoomYDoc = FrontendVersionRoomYDoc; exports.ImportJobsEndpoint = ImportJobsEndpoint; exports.ListTreeBuilder = ListTreeBuilder; exports.NpmRegistryInput = NpmRegistryInput; exports.ObjectMeta = ObjectMeta2; exports.OverridesEndpoint = OverridesEndpoint; exports.PageBlockEditorModel = PageBlockEditorModel; exports.PageSectionEditorModel = PageSectionEditorModel; exports.PipelinesEndpoint = PipelinesEndpoint; exports.RGB = RGB; exports.RGBA = RGBA; exports.RequestExecutor = RequestExecutor; exports.RequestExecutorError = RequestExecutorError; exports.ResolvedVariableType = ResolvedVariableType; exports.StringVariableScopeType = StringVariableScopeType; exports.SupernovaApiClient = SupernovaApiClient; exports.ThemesEndpoint = ThemesEndpoint; exports.TokenCollectionsEndpoint = TokenCollectionsEndpoint; exports.TokenGroupsEndpoint = TokenGroupsEndpoint; exports.TokensEndpoint = TokensEndpoint; exports.UsersEndpoint = UsersEndpoint; exports.Variable = Variable; exports.VariableAlias = VariableAlias; exports.VariableMode = VariableMode; exports.VariableValue = VariableValue; exports.VariablesMapping = VariablesMapping; exports.VersionRoomBaseYDoc = VersionRoomBaseYDoc; exports.VersionSQSPayload = VersionSQSPayload; exports.VersionStatsEndpoint = VersionStatsEndpoint; exports.WorkspaceConfigurationPayload = WorkspaceConfigurationPayload; exports.WorkspaceInvitationsEndpoint = WorkspaceInvitationsEndpoint; exports.WorkspaceMembersEndpoint = WorkspaceMembersEndpoint; exports.WorkspacesEndpoint = WorkspacesEndpoint; exports.applyPrivacyConfigurationToNestedItems = applyPrivacyConfigurationToNestedItems; exports.blockToProsemirrorNode = blockToProsemirrorNode; exports.buildDocPagePublishPaths = buildDocPagePublishPaths; exports.calculateElementParentChain = calculateElementParentChain; exports.documentationItemConfigurationToDTOV1 = documentationItemConfigurationToDTOV1; exports.documentationItemConfigurationToDTOV2 = documentationItemConfigurationToDTOV2; exports.documentationPageToDTOV2 = documentationPageToDTOV2; exports.documentationPagesFixedConfigurationToDTOV1 = documentationPagesFixedConfigurationToDTOV1; exports.documentationPagesFixedConfigurationToDTOV2 = documentationPagesFixedConfigurationToDTOV2; exports.documentationPagesToDTOV1 = documentationPagesToDTOV1; exports.documentationPagesToDTOV2 = documentationPagesToDTOV2; exports.elementGroupsToDocumentationGroupDTOV1 = elementGroupsToDocumentationGroupDTOV1; exports.elementGroupsToDocumentationGroupDTOV2 = elementGroupsToDocumentationGroupDTOV2; exports.elementGroupsToDocumentationGroupFixedConfigurationDTOV1 = elementGroupsToDocumentationGroupFixedConfigurationDTOV1; exports.elementGroupsToDocumentationGroupFixedConfigurationDTOV2 = elementGroupsToDocumentationGroupFixedConfigurationDTOV2; exports.elementGroupsToDocumentationGroupStructureDTOV1 = elementGroupsToDocumentationGroupStructureDTOV1; exports.generateHash = generateHash; exports.generatePageContentHash = generatePageContentHash; exports.getDtoDefaultItemConfigurationV1 = getDtoDefaultItemConfigurationV1; exports.getDtoDefaultItemConfigurationV2 = getDtoDefaultItemConfigurationV2; exports.getMockPageBlockDefinitions = getMockPageBlockDefinitions; exports.gitBranchToDto = gitBranchToDto; exports.gitOrganizationToDto = gitOrganizationToDto; exports.gitProjectToDto = gitProjectToDto; exports.gitRepositoryToDto = gitRepositoryToDto; exports.innerEditorProsemirrorSchema = innerEditorProsemirrorSchema; exports.integrationCredentialToDto = integrationCredentialToDto; exports.integrationToDto = integrationToDto; exports.itemConfigurationToYjs = itemConfigurationToYjs; exports.mainEditorProsemirrorSchema = mainEditorProsemirrorSchema; exports.pageToProsemirrorDoc = pageToProsemirrorDoc; exports.pageToYDoc = pageToYDoc; exports.pageToYXmlFragment = pageToYXmlFragment; exports.pipelineToDto = pipelineToDto; exports.prosemirrorDocToPage = prosemirrorDocToPage; exports.prosemirrorDocToRichTextPropertyValue = prosemirrorDocToRichTextPropertyValue; exports.prosemirrorNodeToSection = prosemirrorNodeToSection; exports.prosemirrorNodesToBlocks = prosemirrorNodesToBlocks; exports.richTextPropertyValueToProsemirror = richTextPropertyValueToProsemirror; exports.serializeAsCustomBlock = serializeAsCustomBlock; exports.serializeQuery = serializeQuery; exports.shallowProsemirrorNodeToBlock = shallowProsemirrorNodeToBlock; exports.validateDesignSystemVersion = validateDesignSystemVersion; exports.validateSsoPayload = validateSsoPayload; exports.yDocToPage = yDocToPage; exports.yXmlFragmentToPage = yXmlFragmentToPage; exports.yjsToDocumentationHierarchy = yjsToDocumentationHierarchy; exports.yjsToItemConfiguration = yjsToItemConfiguration;
13442
+ exports.BackendVersionRoomYDoc = BackendVersionRoomYDoc; exports.BlockDefinitionUtils = BlockDefinitionUtils; exports.BlockParsingUtils = BlockParsingUtils; exports.BrandsEndpoint = BrandsEndpoint; exports.CodegenEndpoint = CodegenEndpoint; exports.Collection = Collection2; exports.DTOAppBootstrapDataQuery = DTOAppBootstrapDataQuery; exports.DTOAppBootstrapDataResponse = DTOAppBootstrapDataResponse; exports.DTOAssetRenderConfiguration = DTOAssetRenderConfiguration; exports.DTOAuthenticatedUser = DTOAuthenticatedUser; exports.DTOAuthenticatedUserProfile = DTOAuthenticatedUserProfile; exports.DTOAuthenticatedUserResponse = DTOAuthenticatedUserResponse; exports.DTOBffFigmaImportRequestBody = DTOBffFigmaImportRequestBody; exports.DTOBffImportRequestBody = DTOBffImportRequestBody; exports.DTOBffUploadImportRequestBody = DTOBffUploadImportRequestBody; exports.DTOBrand = DTOBrand; exports.DTOBrandCreatePayload = DTOBrandCreatePayload; exports.DTOBrandCreateResponse = DTOBrandCreateResponse; exports.DTOBrandGetResponse = DTOBrandGetResponse; exports.DTOBrandUpdatePayload = DTOBrandUpdatePayload; exports.DTOBrandsListResponse = DTOBrandsListResponse; exports.DTOColorTokenInlineData = DTOColorTokenInlineData; exports.DTOCreateDocumentationGroupInput = DTOCreateDocumentationGroupInput; exports.DTOCreateDocumentationPageInputV2 = DTOCreateDocumentationPageInputV2; exports.DTOCreateDocumentationTabInput = DTOCreateDocumentationTabInput; exports.DTOCreateVersionInput = DTOCreateVersionInput; exports.DTODataSource = DTODataSource; exports.DTODataSourceFigma = DTODataSourceFigma; exports.DTODataSourceFigmaCloud = DTODataSourceFigmaCloud; exports.DTODataSourceFigmaCreatePayload = DTODataSourceFigmaCreatePayload; exports.DTODataSourceFigmaImportPayload = DTODataSourceFigmaImportPayload; exports.DTODataSourceFigmaScope = DTODataSourceFigmaScope; exports.DTODataSourceFigmaVariablesPlugin = DTODataSourceFigmaVariablesPlugin; exports.DTODataSourceResponse = DTODataSourceResponse; exports.DTODataSourceTokenStudio = DTODataSourceTokenStudio; exports.DTODataSourcesListResponse = DTODataSourcesListResponse; exports.DTODeleteDocumentationGroupInput = DTODeleteDocumentationGroupInput; exports.DTODeleteDocumentationPageInputV2 = DTODeleteDocumentationPageInputV2; exports.DTODeleteDocumentationTabGroupInput = DTODeleteDocumentationTabGroupInput; exports.DTODesignElementsDataDiffResponse = DTODesignElementsDataDiffResponse; exports.DTODesignSystem = DTODesignSystem; exports.DTODesignSystemComponent = DTODesignSystemComponent; exports.DTODesignSystemComponentCreateInput = DTODesignSystemComponentCreateInput; exports.DTODesignSystemComponentListResponse = DTODesignSystemComponentListResponse; exports.DTODesignSystemComponentResponse = DTODesignSystemComponentResponse; exports.DTODesignSystemContactsResponse = DTODesignSystemContactsResponse; exports.DTODesignSystemCreateInput = DTODesignSystemCreateInput; exports.DTODesignSystemInvitation = DTODesignSystemInvitation; exports.DTODesignSystemMember = DTODesignSystemMember; exports.DTODesignSystemMemberListResponse = DTODesignSystemMemberListResponse; exports.DTODesignSystemMembersUpdatePayload = DTODesignSystemMembersUpdatePayload; exports.DTODesignSystemMembersUpdateResponse = DTODesignSystemMembersUpdateResponse; exports.DTODesignSystemResponse = DTODesignSystemResponse; exports.DTODesignSystemRole = DTODesignSystemRole; exports.DTODesignSystemUpdateAccessModeInput = DTODesignSystemUpdateAccessModeInput; exports.DTODesignSystemUpdateInput = DTODesignSystemUpdateInput; exports.DTODesignSystemVersion = DTODesignSystemVersion; exports.DTODesignSystemVersionCreationResponse = DTODesignSystemVersionCreationResponse; exports.DTODesignSystemVersionGetResponse = DTODesignSystemVersionGetResponse; exports.DTODesignSystemVersionJobStatusResponse = DTODesignSystemVersionJobStatusResponse; exports.DTODesignSystemVersionJobsResponse = DTODesignSystemVersionJobsResponse; exports.DTODesignSystemVersionStats = DTODesignSystemVersionStats; exports.DTODesignSystemVersionStatsQuery = DTODesignSystemVersionStatsQuery; exports.DTODesignSystemVersionsListResponse = DTODesignSystemVersionsListResponse; exports.DTODesignSystemsListResponse = DTODesignSystemsListResponse; exports.DTODesignToken = DTODesignToken; exports.DTODesignTokenCreatePayload = DTODesignTokenCreatePayload; exports.DTODesignTokenGroup = DTODesignTokenGroup; exports.DTODesignTokenGroupCreatePayload = DTODesignTokenGroupCreatePayload; exports.DTODesignTokenGroupListResponse = DTODesignTokenGroupListResponse; exports.DTODesignTokenGroupResponse = DTODesignTokenGroupResponse; exports.DTODesignTokenListResponse = DTODesignTokenListResponse; exports.DTODesignTokenResponse = DTODesignTokenResponse; exports.DTODiffCountBase = DTODiffCountBase; exports.DTODocumentationDraftChangeType = DTODocumentationDraftChangeType; exports.DTODocumentationDraftState = DTODocumentationDraftState; exports.DTODocumentationDraftStateCreated = DTODocumentationDraftStateCreated; exports.DTODocumentationDraftStateDeleted = DTODocumentationDraftStateDeleted; exports.DTODocumentationDraftStateUpdated = DTODocumentationDraftStateUpdated; exports.DTODocumentationGroupApprovalState = DTODocumentationGroupApprovalState; exports.DTODocumentationGroupCreateActionInputV2 = DTODocumentationGroupCreateActionInputV2; exports.DTODocumentationGroupCreateActionOutputV2 = DTODocumentationGroupCreateActionOutputV2; exports.DTODocumentationGroupDeleteActionInputV2 = DTODocumentationGroupDeleteActionInputV2; exports.DTODocumentationGroupDeleteActionOutputV2 = DTODocumentationGroupDeleteActionOutputV2; exports.DTODocumentationGroupDuplicateActionInputV2 = DTODocumentationGroupDuplicateActionInputV2; exports.DTODocumentationGroupDuplicateActionOutputV2 = DTODocumentationGroupDuplicateActionOutputV2; exports.DTODocumentationGroupMoveActionInputV2 = DTODocumentationGroupMoveActionInputV2; exports.DTODocumentationGroupMoveActionOutputV2 = DTODocumentationGroupMoveActionOutputV2; exports.DTODocumentationGroupRestoreActionInput = DTODocumentationGroupRestoreActionInput; exports.DTODocumentationGroupRestoreActionOutput = DTODocumentationGroupRestoreActionOutput; exports.DTODocumentationGroupStructureV1 = DTODocumentationGroupStructureV1; exports.DTODocumentationGroupUpdateActionInputV2 = DTODocumentationGroupUpdateActionInputV2; exports.DTODocumentationGroupUpdateActionOutputV2 = DTODocumentationGroupUpdateActionOutputV2; exports.DTODocumentationGroupV1 = DTODocumentationGroupV1; exports.DTODocumentationGroupV2 = DTODocumentationGroupV2; exports.DTODocumentationHierarchyV2 = DTODocumentationHierarchyV2; exports.DTODocumentationItemConfigurationV1 = DTODocumentationItemConfigurationV1; exports.DTODocumentationItemConfigurationV2 = DTODocumentationItemConfigurationV2; exports.DTODocumentationItemHeaderV2 = DTODocumentationItemHeaderV2; exports.DTODocumentationLinkPreviewRequest = DTODocumentationLinkPreviewRequest; exports.DTODocumentationLinkPreviewResponse = DTODocumentationLinkPreviewResponse; exports.DTODocumentationPageAnchor = DTODocumentationPageAnchor; exports.DTODocumentationPageApprovalState = DTODocumentationPageApprovalState; exports.DTODocumentationPageApprovalStateChangeActionInput = DTODocumentationPageApprovalStateChangeActionInput; exports.DTODocumentationPageApprovalStateChangeActionOutput = DTODocumentationPageApprovalStateChangeActionOutput; exports.DTODocumentationPageApprovalStateChangeInput = DTODocumentationPageApprovalStateChangeInput; exports.DTODocumentationPageContent = DTODocumentationPageContent; exports.DTODocumentationPageContentGetResponse = DTODocumentationPageContentGetResponse; exports.DTODocumentationPageCreateActionInputV2 = DTODocumentationPageCreateActionInputV2; exports.DTODocumentationPageCreateActionOutputV2 = DTODocumentationPageCreateActionOutputV2; exports.DTODocumentationPageDeleteActionInputV2 = DTODocumentationPageDeleteActionInputV2; exports.DTODocumentationPageDeleteActionOutputV2 = DTODocumentationPageDeleteActionOutputV2; exports.DTODocumentationPageDuplicateActionInputV2 = DTODocumentationPageDuplicateActionInputV2; exports.DTODocumentationPageDuplicateActionOutputV2 = DTODocumentationPageDuplicateActionOutputV2; exports.DTODocumentationPageMoveActionInputV2 = DTODocumentationPageMoveActionInputV2; exports.DTODocumentationPageMoveActionOutputV2 = DTODocumentationPageMoveActionOutputV2; exports.DTODocumentationPageRestoreActionInput = DTODocumentationPageRestoreActionInput; exports.DTODocumentationPageRestoreActionOutput = DTODocumentationPageRestoreActionOutput; exports.DTODocumentationPageRoomHeaderData = DTODocumentationPageRoomHeaderData; exports.DTODocumentationPageRoomHeaderDataUpdate = DTODocumentationPageRoomHeaderDataUpdate; exports.DTODocumentationPageSnapshot = DTODocumentationPageSnapshot; exports.DTODocumentationPageUpdateActionInputV2 = DTODocumentationPageUpdateActionInputV2; exports.DTODocumentationPageUpdateActionOutputV2 = DTODocumentationPageUpdateActionOutputV2; exports.DTODocumentationPageV2 = DTODocumentationPageV2; exports.DTODocumentationPublishMetadata = DTODocumentationPublishMetadata; exports.DTODocumentationPublishTypeQueryParams = DTODocumentationPublishTypeQueryParams; exports.DTODocumentationStructure = DTODocumentationStructure; exports.DTODocumentationStructureGroupItem = DTODocumentationStructureGroupItem; exports.DTODocumentationStructureItem = DTODocumentationStructureItem; exports.DTODocumentationStructurePageItem = DTODocumentationStructurePageItem; exports.DTODocumentationTabCreateActionInputV2 = DTODocumentationTabCreateActionInputV2; exports.DTODocumentationTabCreateActionOutputV2 = DTODocumentationTabCreateActionOutputV2; exports.DTODocumentationTabGroupDeleteActionInputV2 = DTODocumentationTabGroupDeleteActionInputV2; exports.DTODocumentationTabGroupDeleteActionOutputV2 = DTODocumentationTabGroupDeleteActionOutputV2; exports.DTODownloadAssetsRequest = DTODownloadAssetsRequest; exports.DTODownloadAssetsResponse = DTODownloadAssetsResponse; exports.DTODuplicateDocumentationGroupInput = DTODuplicateDocumentationGroupInput; exports.DTODuplicateDocumentationPageInputV2 = DTODuplicateDocumentationPageInputV2; exports.DTOElementActionInput = DTOElementActionInput; exports.DTOElementActionOutput = DTOElementActionOutput; exports.DTOElementPropertyDefinition = DTOElementPropertyDefinition; exports.DTOElementPropertyDefinitionCreatePayload = DTOElementPropertyDefinitionCreatePayload; exports.DTOElementPropertyDefinitionListResponse = DTOElementPropertyDefinitionListResponse; exports.DTOElementPropertyDefinitionOption = DTOElementPropertyDefinitionOption; exports.DTOElementPropertyDefinitionResponse = DTOElementPropertyDefinitionResponse; exports.DTOElementPropertyDefinitionUpdatePayload = DTOElementPropertyDefinitionUpdatePayload; exports.DTOElementPropertyValue = DTOElementPropertyValue; exports.DTOElementPropertyValueListResponse = DTOElementPropertyValueListResponse; exports.DTOElementPropertyValueResponse = DTOElementPropertyValueResponse; exports.DTOElementPropertyValueUpsertPaylod = DTOElementPropertyValueUpsertPaylod; exports.DTOElementView = DTOElementView; exports.DTOElementViewBasePropertyColumn = DTOElementViewBasePropertyColumn; exports.DTOElementViewColumn = DTOElementViewColumn; exports.DTOElementViewColumnSharedAttributes = DTOElementViewColumnSharedAttributes; exports.DTOElementViewPropertyDefinitionColumn = DTOElementViewPropertyDefinitionColumn; exports.DTOElementViewThemeColumn = DTOElementViewThemeColumn; exports.DTOElementViewsListResponse = DTOElementViewsListResponse; exports.DTOElementsGetOutput = DTOElementsGetOutput; exports.DTOElementsGetQuerySchema = DTOElementsGetQuerySchema; exports.DTOElementsGetTypeFilter = DTOElementsGetTypeFilter; exports.DTOExportJob = DTOExportJob; exports.DTOExportJobCreatedBy = DTOExportJobCreatedBy; exports.DTOExportJobDesignSystemPreview = DTOExportJobDesignSystemPreview; exports.DTOExportJobDesignSystemVersionPreview = DTOExportJobDesignSystemVersionPreview; exports.DTOExportJobDestinations = DTOExportJobDestinations; exports.DTOExportJobResponse = DTOExportJobResponse; exports.DTOExportJobResult = DTOExportJobResult; exports.DTOExportJobsListFilter = DTOExportJobsListFilter; exports.DTOExporter = DTOExporter; exports.DTOExporterCreateInput = DTOExporterCreateInput; exports.DTOExporterCreateOutput = DTOExporterCreateOutput; exports.DTOExporterGitProviderEnum = DTOExporterGitProviderEnum; exports.DTOExporterListQuery = DTOExporterListQuery; exports.DTOExporterListResponse = DTOExporterListResponse; exports.DTOExporterMembership = DTOExporterMembership; exports.DTOExporterMembershipRole = DTOExporterMembershipRole; exports.DTOExporterPropertyDefinition = DTOExporterPropertyDefinition; exports.DTOExporterPropertyDefinitionArray = DTOExporterPropertyDefinitionArray; exports.DTOExporterPropertyDefinitionBoolean = DTOExporterPropertyDefinitionBoolean; exports.DTOExporterPropertyDefinitionEnum = DTOExporterPropertyDefinitionEnum; exports.DTOExporterPropertyDefinitionNumber = DTOExporterPropertyDefinitionNumber; exports.DTOExporterPropertyDefinitionObject = DTOExporterPropertyDefinitionObject; exports.DTOExporterPropertyDefinitionString = DTOExporterPropertyDefinitionString; exports.DTOExporterPropertyDefinitionValue = DTOExporterPropertyDefinitionValue; exports.DTOExporterPropertyDefinitionValueMap = DTOExporterPropertyDefinitionValueMap; exports.DTOExporterPropertyDefinitionsResponse = DTOExporterPropertyDefinitionsResponse; exports.DTOExporterPropertyType = DTOExporterPropertyType; exports.DTOExporterSource = DTOExporterSource; exports.DTOExporterType = DTOExporterType; exports.DTOExporterUpdateInput = DTOExporterUpdateInput; exports.DTOFigmaComponent = DTOFigmaComponent; exports.DTOFigmaComponentGroup = DTOFigmaComponentGroup; exports.DTOFigmaComponentGroupListResponse = DTOFigmaComponentGroupListResponse; exports.DTOFigmaComponentListResponse = DTOFigmaComponentListResponse; exports.DTOFigmaNode = DTOFigmaNode; exports.DTOFigmaNodeData = DTOFigmaNodeData; exports.DTOFigmaNodeOrigin = DTOFigmaNodeOrigin; exports.DTOFigmaNodeRenderActionInput = DTOFigmaNodeRenderActionInput; exports.DTOFigmaNodeRenderActionOutput = DTOFigmaNodeRenderActionOutput; exports.DTOFigmaNodeRenderFormat = DTOFigmaNodeRenderFormat; exports.DTOFigmaNodeRenderInput = DTOFigmaNodeRenderInput; exports.DTOFrameNodeStructure = DTOFrameNodeStructure; exports.DTOFrameNodeStructureListResponse = DTOFrameNodeStructureListResponse; exports.DTOGetBlockDefinitionsOutput = DTOGetBlockDefinitionsOutput; exports.DTOGetDocumentationPageAnchorsResponse = DTOGetDocumentationPageAnchorsResponse; exports.DTOGitBranch = DTOGitBranch; exports.DTOGitOrganization = DTOGitOrganization; exports.DTOGitProject = DTOGitProject; exports.DTOGitRepository = DTOGitRepository; exports.DTOImportJob = DTOImportJob; exports.DTOImportJobResponse = DTOImportJobResponse; exports.DTOIntegration = DTOIntegration; exports.DTOIntegrationCredentials = DTOIntegrationCredentials; exports.DTOIntegrationOAuthGetResponse = DTOIntegrationOAuthGetResponse; exports.DTOIntegrationPostResponse = DTOIntegrationPostResponse; exports.DTOIntegrationsGetListResponse = DTOIntegrationsGetListResponse; exports.DTOLiveblocksAuthRequest = DTOLiveblocksAuthRequest; exports.DTOLiveblocksAuthResponse = DTOLiveblocksAuthResponse; exports.DTOMoveDocumentationGroupInput = DTOMoveDocumentationGroupInput; exports.DTOMoveDocumentationPageInputV2 = DTOMoveDocumentationPageInputV2; exports.DTONpmRegistryConfig = DTONpmRegistryConfig; exports.DTONpmRegistryConfigConstants = DTONpmRegistryConfigConstants; exports.DTOObjectMeta = DTOObjectMeta; exports.DTOPageBlockColorV2 = DTOPageBlockColorV2; exports.DTOPageBlockDefinition = DTOPageBlockDefinition; exports.DTOPageBlockDefinitionBehavior = DTOPageBlockDefinitionBehavior; exports.DTOPageBlockDefinitionItem = DTOPageBlockDefinitionItem; exports.DTOPageBlockDefinitionLayout = DTOPageBlockDefinitionLayout; exports.DTOPageBlockDefinitionProperty = DTOPageBlockDefinitionProperty; exports.DTOPageBlockDefinitionVariant = DTOPageBlockDefinitionVariant; exports.DTOPageBlockItemV2 = DTOPageBlockItemV2; exports.DTOPagination = DTOPagination; exports.DTOPipeline = DTOPipeline; exports.DTOPipelineCreateBody = DTOPipelineCreateBody; exports.DTOPipelineListQuery = DTOPipelineListQuery; exports.DTOPipelineListResponse = DTOPipelineListResponse; exports.DTOPipelineResponse = DTOPipelineResponse; exports.DTOPipelineTriggerBody = DTOPipelineTriggerBody; exports.DTOPipelineUpdateBody = DTOPipelineUpdateBody; exports.DTOPublishDocumentationChanges = DTOPublishDocumentationChanges; exports.DTOPublishDocumentationRequest = DTOPublishDocumentationRequest; exports.DTOPublishDocumentationResponse = DTOPublishDocumentationResponse; exports.DTORenderedAssetFile = DTORenderedAssetFile; exports.DTORestoreDocumentationGroupInput = DTORestoreDocumentationGroupInput; exports.DTORestoreDocumentationPageInput = DTORestoreDocumentationPageInput; exports.DTOTheme = DTOTheme; exports.DTOThemeCreatePayload = DTOThemeCreatePayload; exports.DTOThemeListResponse = DTOThemeListResponse; exports.DTOThemeOverride = DTOThemeOverride; exports.DTOThemeOverrideCreatePayload = DTOThemeOverrideCreatePayload; exports.DTOThemeResponse = DTOThemeResponse; exports.DTOTokenCollection = DTOTokenCollection; exports.DTOTokenCollectionsListReponse = DTOTokenCollectionsListReponse; exports.DTOTransferOwnershipPayload = DTOTransferOwnershipPayload; exports.DTOUpdateDocumentationGroupInput = DTOUpdateDocumentationGroupInput; exports.DTOUpdateDocumentationPageInputV2 = DTOUpdateDocumentationPageInputV2; exports.DTOUpdateUserNotificationSettingsPayload = DTOUpdateUserNotificationSettingsPayload; exports.DTOUpdateVersionInput = DTOUpdateVersionInput; exports.DTOUser = DTOUser; exports.DTOUserGetResponse = DTOUserGetResponse; exports.DTOUserNotificationSettingsResponse = DTOUserNotificationSettingsResponse; exports.DTOUserOnboarding = DTOUserOnboarding; exports.DTOUserOnboardingDepartment = DTOUserOnboardingDepartment; exports.DTOUserOnboardingJobLevel = DTOUserOnboardingJobLevel; exports.DTOUserProfile = DTOUserProfile; exports.DTOUserProfileUpdate = DTOUserProfileUpdate; exports.DTOUserProfileUpdatePayload = DTOUserProfileUpdatePayload; exports.DTOUserProfileUpdateResponse = DTOUserProfileUpdateResponse; exports.DTOUserSource = DTOUserSource; exports.DTOUserWorkspaceMembership = DTOUserWorkspaceMembership; exports.DTOUserWorkspaceMembershipsResponse = DTOUserWorkspaceMembershipsResponse; exports.DTOWorkspace = DTOWorkspace; exports.DTOWorkspaceCreateInput = DTOWorkspaceCreateInput; exports.DTOWorkspaceIntegrationGetGitObjectsInput = DTOWorkspaceIntegrationGetGitObjectsInput; exports.DTOWorkspaceIntegrationOauthInput = DTOWorkspaceIntegrationOauthInput; exports.DTOWorkspaceIntegrationPATInput = DTOWorkspaceIntegrationPATInput; exports.DTOWorkspaceInvitationInput = DTOWorkspaceInvitationInput; exports.DTOWorkspaceInvitationUpdateResponse = DTOWorkspaceInvitationUpdateResponse; exports.DTOWorkspaceInvitationsListInput = DTOWorkspaceInvitationsListInput; exports.DTOWorkspaceInvitationsResponse = DTOWorkspaceInvitationsResponse; exports.DTOWorkspaceInviteUpdate = DTOWorkspaceInviteUpdate; exports.DTOWorkspaceMember = DTOWorkspaceMember; exports.DTOWorkspaceMembersListResponse = DTOWorkspaceMembersListResponse; exports.DTOWorkspaceProfile = DTOWorkspaceProfile; exports.DTOWorkspaceResponse = DTOWorkspaceResponse; exports.DTOWorkspaceRole = DTOWorkspaceRole; exports.DesignSystemBffEndpoint = DesignSystemBffEndpoint; exports.DesignSystemComponentEndpoint = DesignSystemComponentEndpoint; exports.DesignSystemContactsEndpoint = DesignSystemContactsEndpoint; exports.DesignSystemMembersEndpoint = DesignSystemMembersEndpoint; exports.DesignSystemSourcesEndpoint = DesignSystemSourcesEndpoint; exports.DesignSystemVersionsEndpoint = DesignSystemVersionsEndpoint; exports.DesignSystemsEndpoint = DesignSystemsEndpoint; exports.DimensionsVariableScopeType = DimensionsVariableScopeType; exports.DocsStructureRepo = DocsStructureRepo; exports.DocsStructureRepository = DocsStructureRepository; exports.DocumentationEndpoint = DocumentationEndpoint; exports.DocumentationHierarchySettings = DocumentationHierarchySettings; exports.DocumentationPageEditorModel = DocumentationPageEditorModel; exports.DocumentationPageV1DTO = DocumentationPageV1DTO; exports.ElementPropertyDefinitionsEndpoint = ElementPropertyDefinitionsEndpoint; exports.ElementPropertyValuesEndpoint = ElementPropertyValuesEndpoint; exports.ElementsActionEndpoint = ElementsActionEndpoint; exports.ElementsEndpoint = ElementsEndpoint; exports.ExportersEndpoint = ExportersEndpoint; exports.FigmaComponentGroupsEndpoint = FigmaComponentGroupsEndpoint; exports.FigmaComponentsEndpoint = FigmaComponentsEndpoint; exports.FigmaFrameStructuresEndpoint = FigmaFrameStructuresEndpoint; exports.FigmaUtils = FigmaUtils; exports.FormattedCollections = FormattedCollections; exports.FrontendVersionRoomYDoc = FrontendVersionRoomYDoc; exports.ImportJobsEndpoint = ImportJobsEndpoint; exports.ListTreeBuilder = ListTreeBuilder; exports.LocalStorage = LocalStorage; exports.NpmRegistryInput = NpmRegistryInput; exports.ObjectMeta = ObjectMeta2; exports.OverridesEndpoint = OverridesEndpoint; exports.PageBlockEditorModel = PageBlockEditorModel; exports.PageSectionEditorModel = PageSectionEditorModel; exports.PipelinesEndpoint = PipelinesEndpoint; exports.RGB = RGB; exports.RGBA = RGBA; exports.RequestExecutor = RequestExecutor; exports.RequestExecutorError = RequestExecutorError; exports.ResolvedVariableType = ResolvedVariableType; exports.StringVariableScopeType = StringVariableScopeType; exports.SupernovaApiClient = SupernovaApiClient; exports.ThemesEndpoint = ThemesEndpoint; exports.TokenCollectionsEndpoint = TokenCollectionsEndpoint; exports.TokenGroupsEndpoint = TokenGroupsEndpoint; exports.TokensEndpoint = TokensEndpoint; exports.UsersEndpoint = UsersEndpoint; exports.Variable = Variable; exports.VariableAlias = VariableAlias; exports.VariableMode = VariableMode; exports.VariableValue = VariableValue; exports.VariablesMapping = VariablesMapping; exports.VersionRoomBaseYDoc = VersionRoomBaseYDoc; exports.VersionSQSPayload = VersionSQSPayload; exports.VersionStatsEndpoint = VersionStatsEndpoint; exports.WorkspaceConfigurationPayload = WorkspaceConfigurationPayload; exports.WorkspaceInvitationsEndpoint = WorkspaceInvitationsEndpoint; exports.WorkspaceMembersEndpoint = WorkspaceMembersEndpoint; exports.WorkspacesEndpoint = WorkspacesEndpoint; exports.applyPrivacyConfigurationToNestedItems = applyPrivacyConfigurationToNestedItems; exports.blockToProsemirrorNode = blockToProsemirrorNode; exports.buildDocPagePublishPaths = buildDocPagePublishPaths; exports.calculateElementParentChain = calculateElementParentChain; exports.computeDocsHierarchy = computeDocsHierarchy; exports.documentationItemConfigurationToDTOV1 = documentationItemConfigurationToDTOV1; exports.documentationItemConfigurationToDTOV2 = documentationItemConfigurationToDTOV2; exports.documentationPageToDTOV2 = documentationPageToDTOV2; exports.documentationPagesFixedConfigurationToDTOV1 = documentationPagesFixedConfigurationToDTOV1; exports.documentationPagesFixedConfigurationToDTOV2 = documentationPagesFixedConfigurationToDTOV2; exports.documentationPagesToDTOV1 = documentationPagesToDTOV1; exports.documentationPagesToDTOV2 = documentationPagesToDTOV2; exports.elementGroupsToDocumentationGroupDTOV1 = elementGroupsToDocumentationGroupDTOV1; exports.elementGroupsToDocumentationGroupDTOV2 = elementGroupsToDocumentationGroupDTOV2; exports.elementGroupsToDocumentationGroupFixedConfigurationDTOV1 = elementGroupsToDocumentationGroupFixedConfigurationDTOV1; exports.elementGroupsToDocumentationGroupFixedConfigurationDTOV2 = elementGroupsToDocumentationGroupFixedConfigurationDTOV2; exports.elementGroupsToDocumentationGroupStructureDTOV1 = elementGroupsToDocumentationGroupStructureDTOV1; exports.generateHash = generateHash; exports.generatePageContentHash = generatePageContentHash; exports.getDtoDefaultItemConfigurationV1 = getDtoDefaultItemConfigurationV1; exports.getDtoDefaultItemConfigurationV2 = getDtoDefaultItemConfigurationV2; exports.getMockPageBlockDefinitions = getMockPageBlockDefinitions; exports.gitBranchToDto = gitBranchToDto; exports.gitOrganizationToDto = gitOrganizationToDto; exports.gitProjectToDto = gitProjectToDto; exports.gitRepositoryToDto = gitRepositoryToDto; exports.innerEditorProsemirrorSchema = innerEditorProsemirrorSchema; exports.integrationCredentialToDto = integrationCredentialToDto; exports.integrationToDto = integrationToDto; exports.itemConfigurationToYjs = itemConfigurationToYjs; exports.mainEditorProsemirrorSchema = mainEditorProsemirrorSchema; exports.pageToProsemirrorDoc = pageToProsemirrorDoc; exports.pageToYDoc = pageToYDoc; exports.pageToYXmlFragment = pageToYXmlFragment; exports.pipelineToDto = pipelineToDto; exports.prosemirrorDocToPage = prosemirrorDocToPage; exports.prosemirrorDocToRichTextPropertyValue = prosemirrorDocToRichTextPropertyValue; exports.prosemirrorNodeToSection = prosemirrorNodeToSection; exports.prosemirrorNodesToBlocks = prosemirrorNodesToBlocks; exports.richTextPropertyValueToProsemirror = richTextPropertyValueToProsemirror; exports.serializeAsCustomBlock = serializeAsCustomBlock; exports.serializeQuery = serializeQuery; exports.shallowProsemirrorNodeToBlock = shallowProsemirrorNodeToBlock; exports.validateDesignSystemVersion = validateDesignSystemVersion; exports.validateSsoPayload = validateSsoPayload; exports.yDocToPage = yDocToPage; exports.yXmlFragmentToPage = yXmlFragmentToPage; exports.yjsToDocumentationHierarchy = yjsToDocumentationHierarchy; exports.yjsToItemConfiguration = yjsToItemConfiguration;
13310
13443
  //# sourceMappingURL=index.js.map