@supernova-studio/client 0.59.11 → 1.0.0-alpha.10

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 (203) hide show
  1. package/dist/index.d.mts +1590 -1909
  2. package/dist/index.d.ts +1590 -1909
  3. package/dist/index.js +866 -349
  4. package/dist/index.js.map +1 -1
  5. package/dist/index.mjs +2570 -2053
  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 -78
  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 -26
  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 -14
  40. package/src/api/dto/design-systems/members.ts +0 -50
  41. package/src/api/dto/design-systems/redirects.ts +0 -33
  42. package/src/api/dto/design-systems/role.ts +0 -11
  43. package/src/api/dto/design-systems/stats.ts +0 -19
  44. package/src/api/dto/design-systems/version.ts +0 -56
  45. package/src/api/dto/design-systems/view.ts +0 -45
  46. package/src/api/dto/design-tokens/design-token.ts +0 -78
  47. package/src/api/dto/design-tokens/index.ts +0 -1
  48. package/src/api/dto/documentation/anchor.ts +0 -15
  49. package/src/api/dto/documentation/approvals.ts +0 -15
  50. package/src/api/dto/documentation/block-definition.ts +0 -28
  51. package/src/api/dto/documentation/block.ts +0 -6
  52. package/src/api/dto/documentation/documentation-page-snapshot.ts +0 -18
  53. package/src/api/dto/documentation/index.ts +0 -8
  54. package/src/api/dto/documentation/link-preview.ts +0 -23
  55. package/src/api/dto/documentation/publish.ts +0 -23
  56. package/src/api/dto/documentation/room.ts +0 -12
  57. package/src/api/dto/elements/components/figma-component-group.ts +0 -19
  58. package/src/api/dto/elements/components/figma-component.ts +0 -56
  59. package/src/api/dto/elements/components/index.ts +0 -2
  60. package/src/api/dto/elements/documentation/draft-state.ts +0 -37
  61. package/src/api/dto/elements/documentation/group-action.ts +0 -108
  62. package/src/api/dto/elements/documentation/group-v1.ts +0 -35
  63. package/src/api/dto/elements/documentation/group-v2.ts +0 -117
  64. package/src/api/dto/elements/documentation/hierarchy.ts +0 -22
  65. package/src/api/dto/elements/documentation/index.ts +0 -13
  66. package/src/api/dto/elements/documentation/item-configuration-v1.ts +0 -24
  67. package/src/api/dto/elements/documentation/item-configuration-v2.ts +0 -14
  68. package/src/api/dto/elements/documentation/metadata.ts +0 -8
  69. package/src/api/dto/elements/documentation/page-actions-v2.ts +0 -121
  70. package/src/api/dto/elements/documentation/page-content.ts +0 -15
  71. package/src/api/dto/elements/documentation/page-v1.ts +0 -21
  72. package/src/api/dto/elements/documentation/page-v2.ts +0 -123
  73. package/src/api/dto/elements/documentation/structure.ts +0 -37
  74. package/src/api/dto/elements/elements-action-v2.ts +0 -111
  75. package/src/api/dto/elements/figma-nodes/figma-node-v1.ts +0 -32
  76. package/src/api/dto/elements/figma-nodes/figma-node-v2.ts +0 -32
  77. package/src/api/dto/elements/figma-nodes/figma-node.ts +0 -103
  78. package/src/api/dto/elements/figma-nodes/index.ts +0 -4
  79. package/src/api/dto/elements/figma-nodes/node-actions-v2.ts +0 -44
  80. package/src/api/dto/elements/frame-node-structures/frame-node-structure.ts +0 -17
  81. package/src/api/dto/elements/frame-node-structures/index.ts +0 -1
  82. package/src/api/dto/elements/get-elements-v2.ts +0 -27
  83. package/src/api/dto/elements/index.ts +0 -7
  84. package/src/api/dto/elements/properties/index.ts +0 -2
  85. package/src/api/dto/elements/properties/property-definitions.ts +0 -75
  86. package/src/api/dto/elements/properties/property-values.ts +0 -38
  87. package/src/api/dto/export/exporter-property.ts +0 -105
  88. package/src/api/dto/export/exporter.ts +0 -87
  89. package/src/api/dto/export/filter.ts +0 -6
  90. package/src/api/dto/export/index.ts +0 -5
  91. package/src/api/dto/export/job.ts +0 -96
  92. package/src/api/dto/export/pipeline.ts +0 -43
  93. package/src/api/dto/figma-components/assets/download.ts +0 -30
  94. package/src/api/dto/figma-components/assets/index.ts +0 -1
  95. package/src/api/dto/figma-components/index.ts +0 -1
  96. package/src/api/dto/index.ts +0 -13
  97. package/src/api/dto/liveblocks/auth-response.ts +0 -7
  98. package/src/api/dto/liveblocks/index.ts +0 -1
  99. package/src/api/dto/themes/index.ts +0 -2
  100. package/src/api/dto/themes/override.ts +0 -27
  101. package/src/api/dto/themes/theme.ts +0 -45
  102. package/src/api/dto/users/authenticated-user.ts +0 -46
  103. package/src/api/dto/users/index.ts +0 -3
  104. package/src/api/dto/users/update.ts +0 -8
  105. package/src/api/dto/users/user.ts +0 -31
  106. package/src/api/dto/workspaces/git.ts +0 -32
  107. package/src/api/dto/workspaces/index.ts +0 -6
  108. package/src/api/dto/workspaces/integrations.ts +0 -34
  109. package/src/api/dto/workspaces/invitations.ts +0 -30
  110. package/src/api/dto/workspaces/membership.ts +0 -41
  111. package/src/api/dto/workspaces/npm-registry.ts +0 -35
  112. package/src/api/dto/workspaces/workspace.ts +0 -34
  113. package/src/api/endpoints/codegen/codegen.ts +0 -16
  114. package/src/api/endpoints/codegen/exporters.ts +0 -25
  115. package/src/api/endpoints/codegen/index.ts +0 -4
  116. package/src/api/endpoints/codegen/jobs.ts +0 -15
  117. package/src/api/endpoints/codegen/pipelines.ts +0 -44
  118. package/src/api/endpoints/design-system/bff.ts +0 -13
  119. package/src/api/endpoints/design-system/contact.ts +0 -12
  120. package/src/api/endpoints/design-system/design-systems.ts +0 -55
  121. package/src/api/endpoints/design-system/index.ts +0 -6
  122. package/src/api/endpoints/design-system/members.ts +0 -24
  123. package/src/api/endpoints/design-system/sources.ts +0 -35
  124. package/src/api/endpoints/design-system/versions/brands.ts +0 -45
  125. package/src/api/endpoints/design-system/versions/documentation.ts +0 -27
  126. package/src/api/endpoints/design-system/versions/ds-components.ts +0 -28
  127. package/src/api/endpoints/design-system/versions/elements-action.ts +0 -60
  128. package/src/api/endpoints/design-system/versions/elements.ts +0 -27
  129. package/src/api/endpoints/design-system/versions/figma-component-groups.ts +0 -13
  130. package/src/api/endpoints/design-system/versions/figma-components.ts +0 -13
  131. package/src/api/endpoints/design-system/versions/figma-frame-structures.ts +0 -13
  132. package/src/api/endpoints/design-system/versions/import-jobs.ts +0 -13
  133. package/src/api/endpoints/design-system/versions/index.ts +0 -18
  134. package/src/api/endpoints/design-system/versions/overrides.ts +0 -17
  135. package/src/api/endpoints/design-system/versions/property-definitions.ts +0 -43
  136. package/src/api/endpoints/design-system/versions/property-values.ts +0 -25
  137. package/src/api/endpoints/design-system/versions/stats.ts +0 -12
  138. package/src/api/endpoints/design-system/versions/themes.ts +0 -35
  139. package/src/api/endpoints/design-system/versions/token-collections.ts +0 -13
  140. package/src/api/endpoints/design-system/versions/token-groups.ts +0 -28
  141. package/src/api/endpoints/design-system/versions/tokens.ts +0 -27
  142. package/src/api/endpoints/design-system/versions/versions.ts +0 -79
  143. package/src/api/endpoints/index.ts +0 -5
  144. package/src/api/endpoints/liveblocks.ts +0 -14
  145. package/src/api/endpoints/users.ts +0 -26
  146. package/src/api/endpoints/workspaces/index.ts +0 -3
  147. package/src/api/endpoints/workspaces/workspace-invites.ts +0 -34
  148. package/src/api/endpoints/workspaces/workspace-members.ts +0 -31
  149. package/src/api/endpoints/workspaces/workspaces.ts +0 -47
  150. package/src/api/index.ts +0 -6
  151. package/src/api/payloads/design-systems/index.ts +0 -2
  152. package/src/api/payloads/design-systems/update-design-system.ts +0 -29
  153. package/src/api/payloads/design-systems/version.ts +0 -29
  154. package/src/api/payloads/documentation/block-definitions.ts +0 -12
  155. package/src/api/payloads/documentation/design-data-doc-diff.ts +0 -7
  156. package/src/api/payloads/documentation/index.ts +0 -2
  157. package/src/api/payloads/export/index.ts +0 -1
  158. package/src/api/payloads/export/pipeline.ts +0 -74
  159. package/src/api/payloads/index.ts +0 -6
  160. package/src/api/payloads/liveblocks/auth.ts +0 -7
  161. package/src/api/payloads/liveblocks/index.ts +0 -1
  162. package/src/api/payloads/users/index.ts +0 -2
  163. package/src/api/payloads/users/notifications/index.ts +0 -1
  164. package/src/api/payloads/users/notifications/notification-settings.ts +0 -17
  165. package/src/api/payloads/users/profile/index.ts +0 -1
  166. package/src/api/payloads/users/profile/update.ts +0 -4
  167. package/src/api/payloads/workspaces/index.ts +0 -3
  168. package/src/api/payloads/workspaces/transfer-ownership.ts +0 -7
  169. package/src/api/payloads/workspaces/workspace-configuration.ts +0 -50
  170. package/src/api/payloads/workspaces/workspace-integrations.ts +0 -26
  171. package/src/api/transport/index.ts +0 -2
  172. package/src/api/transport/request-executor-error.ts +0 -66
  173. package/src/api/transport/request-executor.ts +0 -87
  174. package/src/events/design-system.ts +0 -21
  175. package/src/events/event.ts +0 -6
  176. package/src/events/index.ts +0 -2
  177. package/src/index.ts +0 -4
  178. package/src/utils/figma.ts +0 -72
  179. package/src/utils/hash.ts +0 -62
  180. package/src/utils/index.ts +0 -3
  181. package/src/utils/query.ts +0 -18
  182. package/src/yjs/design-system-content/documentation-hierarchy.ts +0 -35
  183. package/src/yjs/design-system-content/index.ts +0 -2
  184. package/src/yjs/design-system-content/item-configuration.ts +0 -93
  185. package/src/yjs/docs-editor/blocks-to-prosemirror.ts +0 -764
  186. package/src/yjs/docs-editor/index.ts +0 -7
  187. package/src/yjs/docs-editor/list-tree-builder.ts +0 -127
  188. package/src/yjs/docs-editor/mock.ts +0 -2142
  189. package/src/yjs/docs-editor/model/block.ts +0 -8
  190. package/src/yjs/docs-editor/model/index.ts +0 -2
  191. package/src/yjs/docs-editor/model/page.ts +0 -8
  192. package/src/yjs/docs-editor/prosemirror/index.ts +0 -3
  193. package/src/yjs/docs-editor/prosemirror/inner-editor-schema.ts +0 -145
  194. package/src/yjs/docs-editor/prosemirror/main-editor-schema.ts +0 -577
  195. package/src/yjs/docs-editor/prosemirror/types.ts +0 -19
  196. package/src/yjs/docs-editor/prosemirror-to-blocks.ts +0 -975
  197. package/src/yjs/docs-editor/utils.ts +0 -115
  198. package/src/yjs/index.ts +0 -3
  199. package/src/yjs/version-room/backend.ts +0 -78
  200. package/src/yjs/version-room/base.ts +0 -226
  201. package/src/yjs/version-room/frontend.ts +0 -463
  202. package/src/yjs/version-room/index.ts +0 -4
  203. package/src/yjs/version-room/utils.ts +0 -109
package/dist/index.js CHANGED
@@ -130,7 +130,6 @@ var _slugify = require('@sindresorhus/slugify'); var _slugify2 = _interopRequire
130
130
 
131
131
 
132
132
 
133
-
134
133
 
135
134
 
136
135
  var _ipcidr = require('ip-cidr'); var _ipcidr2 = _interopRequireDefault(_ipcidr);
@@ -927,6 +926,23 @@ var ContentLoaderPayload = _zod.z.object({
927
926
  location: _zod.z.string()
928
927
  })
929
928
  );
929
+ var shortPersistentIdLength = 8;
930
+ var alphanumeric = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
931
+ function generateShortPersistentId() {
932
+ return generateAlphanumericId(shortPersistentIdLength);
933
+ }
934
+ function generateAlphanumericId(length) {
935
+ let randomString = "";
936
+ for (let i = 0; i < length; i++) {
937
+ const randomIndex = Math.floor(Math.random() * alphanumeric.length);
938
+ randomString += alphanumeric.charAt(randomIndex);
939
+ }
940
+ return randomString;
941
+ }
942
+ function slugify(str, options) {
943
+ const slug = _slugify2.default.call(void 0, _nullishCoalesce(str, () => ( "")), options);
944
+ return _optionalChain([slug, 'optionalAccess', _2 => _2.length]) > 0 ? slug : "item";
945
+ }
930
946
  var RESERVED_SLUGS = [
931
947
  "workspaces",
932
948
  "workspace",
@@ -3689,14 +3705,6 @@ var DocumentationPage = _zod.z.object({
3689
3705
  createdAt: _zod.z.coerce.date(),
3690
3706
  updatedAt: _zod.z.coerce.date()
3691
3707
  });
3692
- var PageRedirect = _zod.z.object({
3693
- id: _zod.z.string(),
3694
- pagePersistentId: _zod.z.string(),
3695
- path: _zod.z.string(),
3696
- createdAt: _zod.z.coerce.date(),
3697
- updatedAt: _zod.z.coerce.date(),
3698
- designSystemId: _zod.z.string()
3699
- });
3700
3708
  var DocumentationSettings = _zod.z.object({
3701
3709
  // Basic
3702
3710
  designSystemVersionId: _zod.z.string(),
@@ -3876,7 +3884,7 @@ var HANDLE_MIN_LENGTH = 2;
3876
3884
  var HANDLE_MAX_LENGTH = 64;
3877
3885
  var CreateWorkspaceInput = _zod.z.object({
3878
3886
  name: _zod.z.string().min(WORKSPACE_NAME_MIN_LENGTH).max(WORKSPACE_NAME_MAX_LENGTH).trim(),
3879
- handle: _zod.z.string().regex(slugRegex).min(HANDLE_MIN_LENGTH).max(HANDLE_MAX_LENGTH).refine((value) => _optionalChain([value, 'optionalAccess', _2 => _2.length]) > 0).optional()
3887
+ handle: _zod.z.string().regex(slugRegex).min(HANDLE_MIN_LENGTH).max(HANDLE_MAX_LENGTH).refine((value) => _optionalChain([value, 'optionalAccess', _3 => _3.length]) > 0).optional()
3880
3888
  });
3881
3889
  var WorkspaceInvitation = _zod.z.object({
3882
3890
  id: _zod.z.string(),
@@ -4527,7 +4535,7 @@ var IntegrationToken = _zod.z.object({
4527
4535
  token_bitbucket_username: _zod.z.string().optional(),
4528
4536
  // Bitbucket only
4529
4537
  custom_url: _zod.z.string().optional().transform((value) => {
4530
- if (!_optionalChain([value, 'optionalAccess', _3 => _3.trim, 'call', _4 => _4()]))
4538
+ if (!_optionalChain([value, 'optionalAccess', _4 => _4.trim, 'call', _5 => _5()]))
4531
4539
  return void 0;
4532
4540
  return formatCustomUrl(value);
4533
4541
  })
@@ -4939,7 +4947,7 @@ function calculateElementParentChain(elementParentPersistentId, groupPersistentI
4939
4947
  const parent = groupPersistentIdToGroupMap.get(parentId);
4940
4948
  if (parent)
4941
4949
  result.push(parent);
4942
- parentId = _optionalChain([parent, 'optionalAccess', _5 => _5.parentPersistentId]);
4950
+ parentId = _optionalChain([parent, 'optionalAccess', _6 => _6.parentPersistentId]);
4943
4951
  }
4944
4952
  return result;
4945
4953
  }
@@ -4948,7 +4956,7 @@ function applyPrivacyConfigurationToNestedItems(pages, groups, getDefaultItemCon
4948
4956
  ...group,
4949
4957
  data: {
4950
4958
  ...group.data,
4951
- configuration: _nullishCoalesce(_optionalChain([group, 'access', _6 => _6.data, 'optionalAccess', _7 => _7.configuration]), () => ( getDefaultItemConfiguration()))
4959
+ configuration: _nullishCoalesce(_optionalChain([group, 'access', _7 => _7.data, 'optionalAccess', _8 => _8.configuration]), () => ( getDefaultItemConfiguration()))
4952
4960
  }
4953
4961
  }));
4954
4962
  const groupPersistentIdToGroupMap = mapByUnique(fixedGroups, (group) => group.persistentId);
@@ -4960,8 +4968,8 @@ function applyPrivacyConfigurationToNestedItems(pages, groups, getDefaultItemCon
4960
4968
  const parent = groupPersistentIdToGroupMap.get(nextParentId);
4961
4969
  if (!parent)
4962
4970
  break;
4963
- isHidden = isHidden || _optionalChain([parent, 'access', _8 => _8.data, 'optionalAccess', _9 => _9.configuration, 'optionalAccess', _10 => _10.isHidden]) || false;
4964
- isPrivate = isPrivate || _optionalChain([parent, 'access', _11 => _11.data, 'optionalAccess', _12 => _12.configuration, 'optionalAccess', _13 => _13.isPrivate]) || false;
4971
+ isHidden = isHidden || _optionalChain([parent, 'access', _9 => _9.data, 'optionalAccess', _10 => _10.configuration, 'optionalAccess', _11 => _11.isHidden]) || false;
4972
+ isPrivate = isPrivate || _optionalChain([parent, 'access', _12 => _12.data, 'optionalAccess', _13 => _13.configuration, 'optionalAccess', _14 => _14.isPrivate]) || false;
4965
4973
  nextParentId = parent.parentPersistentId;
4966
4974
  }
4967
4975
  groupToFix.data.configuration.isHidden = isHidden;
@@ -4969,7 +4977,7 @@ function applyPrivacyConfigurationToNestedItems(pages, groups, getDefaultItemCon
4969
4977
  }
4970
4978
  const fixedPages = [];
4971
4979
  for (const page of pages) {
4972
- const configuration = _nullishCoalesce(_optionalChain([page, 'access', _14 => _14.data, 'optionalAccess', _15 => _15.configuration]), () => ( getDefaultItemConfiguration()));
4980
+ const configuration = _nullishCoalesce(_optionalChain([page, 'access', _15 => _15.data, 'optionalAccess', _16 => _16.configuration]), () => ( getDefaultItemConfiguration()));
4973
4981
  const parent = groupPersistentIdToGroupMap.get(page.parentPersistentId);
4974
4982
  fixedPages.push({
4975
4983
  ...page,
@@ -4977,8 +4985,8 @@ function applyPrivacyConfigurationToNestedItems(pages, groups, getDefaultItemCon
4977
4985
  ...page.data,
4978
4986
  configuration: {
4979
4987
  ...configuration,
4980
- isHidden: configuration.isHidden || _optionalChain([parent, 'optionalAccess', _16 => _16.data, 'optionalAccess', _17 => _17.configuration, 'optionalAccess', _18 => _18.isHidden]) || false,
4981
- isPrivate: configuration.isPrivate || _optionalChain([parent, 'optionalAccess', _19 => _19.data, 'optionalAccess', _20 => _20.configuration, 'optionalAccess', _21 => _21.isPrivate]) || false
4988
+ isHidden: configuration.isHidden || _optionalChain([parent, 'optionalAccess', _17 => _17.data, 'optionalAccess', _18 => _18.configuration, 'optionalAccess', _19 => _19.isHidden]) || false,
4989
+ isPrivate: configuration.isPrivate || _optionalChain([parent, 'optionalAccess', _20 => _20.data, 'optionalAccess', _21 => _21.configuration, 'optionalAccess', _22 => _22.isPrivate]) || false
4982
4990
  }
4983
4991
  }
4984
4992
  });
@@ -4996,7 +5004,7 @@ function elementGroupsToDocumentationGroupDTOV1(groups, pages) {
4996
5004
  return groups.map((group) => {
4997
5005
  return {
4998
5006
  ...elementGroupToDocumentationGroupStructureDTOV1(group, childrenIdsMap),
4999
- configuration: documentationItemConfigurationToDTOV1(_optionalChain([group, 'access', _22 => _22.data, 'optionalAccess', _23 => _23.configuration]))
5007
+ configuration: documentationItemConfigurationToDTOV1(_optionalChain([group, 'access', _23 => _23.data, 'optionalAccess', _24 => _24.configuration]))
5000
5008
  };
5001
5009
  });
5002
5010
  }
@@ -5004,7 +5012,7 @@ function elementGroupsToDocumentationGroupFixedConfigurationDTOV1(groups, pages)
5004
5012
  const childrenIdsMap = calculateChildrenIdsMapV1(pages, groups);
5005
5013
  const { groups: fixedGroups } = applyPrivacyConfigurationToNestedItems(pages, groups, getDtoDefaultItemConfigurationV1);
5006
5014
  return fixedGroups.map((group) => {
5007
- const configuration = documentationItemConfigurationToDTOV1(_optionalChain([group, 'access', _24 => _24.data, 'optionalAccess', _25 => _25.configuration]));
5015
+ const configuration = documentationItemConfigurationToDTOV1(_optionalChain([group, 'access', _25 => _25.data, 'optionalAccess', _26 => _26.configuration]));
5008
5016
  return {
5009
5017
  ...elementGroupToDocumentationGroupStructureDTOV1(group, childrenIdsMap),
5010
5018
  // backward compatibility with custom doc exporters, anyway these groups will not be shown, so we can adjust title
@@ -5029,7 +5037,7 @@ function elementGroupToDocumentationGroupStructureDTOV1(group, childrenIdsMap) {
5029
5037
  title: group.meta.name,
5030
5038
  childrenIds,
5031
5039
  isRoot: !group.parentPersistentId,
5032
- groupBehavior: _nullishCoalesce(_optionalChain([group, 'access', _26 => _26.data, 'optionalAccess', _27 => _27.behavior]), () => ( "Group")),
5040
+ groupBehavior: _nullishCoalesce(_optionalChain([group, 'access', _27 => _27.data, 'optionalAccess', _28 => _28.behavior]), () => ( "Group")),
5033
5041
  shortPersistentId: group.shortPersistentId,
5034
5042
  type: "Group"
5035
5043
  };
@@ -5087,10 +5095,10 @@ function elementGroupsToDocumentationGroupFixedConfigurationDTOV2(groups, pages)
5087
5095
  function elementGroupToDocumentationGroupStructureDTOV2(group, childrenIdsMap) {
5088
5096
  const childrenIds = _nullishCoalesce(childrenIdsMap.get(group.persistentId), () => ( []));
5089
5097
  if (!group.shortPersistentId) {
5090
- throw new Error(`Short persistent id is required for docs groups, group id: ${group.id}`);
5098
+ throw new Error(`Short persistent id is required for docs groups, group id: ${group.persistentId}`);
5091
5099
  }
5092
5100
  return {
5093
- id: group.id,
5101
+ id: "to_be_removed",
5094
5102
  designSystemVersionId: group.designSystemVersionId,
5095
5103
  persistentId: group.persistentId,
5096
5104
  slug: group.slug,
@@ -5098,10 +5106,10 @@ function elementGroupToDocumentationGroupStructureDTOV2(group, childrenIdsMap) {
5098
5106
  createdAt: group.createdAt,
5099
5107
  updatedAt: group.updatedAt,
5100
5108
  title: group.meta.name,
5101
- configuration: documentationItemConfigurationToDTOV2(_optionalChain([group, 'optionalAccess', _28 => _28.data, 'optionalAccess', _29 => _29.configuration])),
5109
+ configuration: documentationItemConfigurationToDTOV2(_optionalChain([group, 'optionalAccess', _29 => _29.data, 'optionalAccess', _30 => _30.configuration])),
5102
5110
  childrenIds,
5103
5111
  isRoot: !group.parentPersistentId,
5104
- groupBehavior: _nullishCoalesce(_optionalChain([group, 'access', _30 => _30.data, 'optionalAccess', _31 => _31.behavior]), () => ( "Group")),
5112
+ groupBehavior: _nullishCoalesce(_optionalChain([group, 'access', _31 => _31.data, 'optionalAccess', _32 => _32.behavior]), () => ( "Group")),
5105
5113
  shortPersistentId: group.shortPersistentId,
5106
5114
  type: "Group"
5107
5115
  };
@@ -5172,12 +5180,12 @@ function documentationPagesFixedConfigurationToDTOV2(pages, groups, routingVersi
5172
5180
  function _documentationPageToDTOV2(page, pagePathMap, pageLiveblocksRoomIdMap) {
5173
5181
  let path = pagePathMap.get(page.persistentId);
5174
5182
  if (!path)
5175
- throw new Error(`Path for page ${page.id} was not calculated`);
5183
+ throw new Error(`Path for page ${page.persistentId} was not calculated`);
5176
5184
  if (path.startsWith("/"))
5177
5185
  path = path.substring(1);
5178
5186
  const liveblocksRoomId = pageLiveblocksRoomIdMap.get(page.persistentId);
5179
5187
  return {
5180
- id: page.id,
5188
+ id: "to_be_removed",
5181
5189
  designSystemVersionId: page.designSystemVersionId,
5182
5190
  persistentId: page.persistentId,
5183
5191
  shortPersistentId: page.shortPersistentId,
@@ -5258,7 +5266,7 @@ function integrationToDto(integration) {
5258
5266
  workspaceId: integration.workspaceId,
5259
5267
  type: integration.type,
5260
5268
  createdAt: integration.createdAt,
5261
- integrationCredentials: _optionalChain([integration, 'access', _32 => _32.integrationCredentials, 'optionalAccess', _33 => _33.map, 'call', _34 => _34(integrationCredentialToDto)]),
5269
+ integrationCredentials: _optionalChain([integration, 'access', _33 => _33.integrationCredentials, 'optionalAccess', _34 => _34.map, 'call', _35 => _35(integrationCredentialToDto)]),
5262
5270
  integrationDesignSystems: _nullishCoalesce(integration.integrationDesignSystems, () => ( void 0))
5263
5271
  };
5264
5272
  }
@@ -5377,7 +5385,6 @@ var DTOUserProfileUpdate = UserProfileUpdate;
5377
5385
  var DTOUserOnboardingDepartment = UserOnboardingDepartment;
5378
5386
  var DTOUserOnboardingJobLevel = UserOnboardingJobLevel;
5379
5387
  var DTOUserSource = UserSource;
5380
- var DTOUserTheme = UserTheme;
5381
5388
  var DTOUserOnboarding = _zod.z.object({
5382
5389
  companyName: _zod.z.string().optional(),
5383
5390
  numberOfPeopleInOrg: _zod.z.string().optional(),
@@ -5391,8 +5398,7 @@ var DTOUserOnboarding = _zod.z.object({
5391
5398
  isPageDraftOnboardingFinished: _zod.z.boolean().optional()
5392
5399
  });
5393
5400
  var DTOAuthenticatedUserProfile = DTOUserProfile.extend({
5394
- onboarding: DTOUserOnboarding.optional(),
5395
- theme: DTOUserTheme.optional()
5401
+ onboarding: DTOUserOnboarding.optional()
5396
5402
  });
5397
5403
  var DTOAuthenticatedUser = DTOUser.extend({
5398
5404
  profile: DTOAuthenticatedUserProfile,
@@ -5731,28 +5737,6 @@ var DTOBffImportRequestBody = _zod.z.discriminatedUnion("type", [
5731
5737
  DTOBffUploadImportRequestBody
5732
5738
  ]);
5733
5739
 
5734
- // src/api/dto/design-systems/redirects.ts
5735
-
5736
- var DTOPageRedirectCreateBody = _zod.z.object({
5737
- pagePersistentId: _zod.z.string(),
5738
- path: _zod.z.string()
5739
- });
5740
- var DTOPageRedirectUpdateBody = DTOPageRedirectCreateBody.partial();
5741
- var DTOPageRedirect = _zod.z.object({
5742
- id: _zod.z.string(),
5743
- pagePersistentId: _zod.z.string(),
5744
- path: _zod.z.string()
5745
- });
5746
- var DTOPageRedirectListResponse = _zod.z.object({
5747
- redirects: DTOPageRedirect.array()
5748
- });
5749
- var DTOPageRedirectResponse = _zod.z.object({
5750
- redirect: DTOPageRedirect
5751
- });
5752
- var DTOPageRedirectDeleteResponse = _zod.z.object({
5753
- success: _zod.z.boolean()
5754
- });
5755
-
5756
5740
  // src/api/dto/design-systems/stats.ts
5757
5741
 
5758
5742
  var DTODesignSystemVersionStats = _zod.z.object({
@@ -6354,7 +6338,7 @@ var DTOGetDocumentationPageAnchorsResponse = _zod.z.object({
6354
6338
  var DTODocumentationPageApprovalState = DocumentationPageApproval;
6355
6339
  var DTODocumentationGroupApprovalState = _zod.z.object({
6356
6340
  persistentId: _zod.z.string(),
6357
- groupId: _zod.z.string(),
6341
+ groupPersistentId: _zod.z.string(),
6358
6342
  designSystemVersionId: _zod.z.string(),
6359
6343
  approvalState: DocumentationPageApprovalState
6360
6344
  });
@@ -8346,7 +8330,7 @@ var RequestExecutor = class {
8346
8330
  }
8347
8331
  fullUrl(path, query) {
8348
8332
  let url = `https://${this.testServerConfig.host}/api/v2${path}`;
8349
- const queryString = _optionalChain([query, 'optionalAccess', _35 => _35.toString, 'call', _36 => _36()]);
8333
+ const queryString = _optionalChain([query, 'optionalAccess', _36 => _36.toString, 'call', _37 => _37()]);
8350
8334
  if (queryString)
8351
8335
  url += `?${queryString}`;
8352
8336
  return url;
@@ -8373,26 +8357,8 @@ var SupernovaApiClient = class {
8373
8357
  }
8374
8358
  };
8375
8359
 
8376
- // src/events/design-system.ts
8377
-
8378
- var DTOEventFigmaNodesRendered = _zod.z.object({
8379
- type: _zod.z.literal("DesignSystem.FigmaNodesRendered"),
8380
- designSystemId: _zod.z.string(),
8381
- versionId: _zod.z.string(),
8382
- figmaNodePersistentIds: _zod.z.string().array()
8383
- });
8384
- var DTOEventDataSourcesImported = _zod.z.object({
8385
- type: _zod.z.literal("DesignSystem.ImportJobFinished"),
8386
- designSystemId: _zod.z.string(),
8387
- versionId: _zod.z.string(),
8388
- importJobId: _zod.z.string(),
8389
- dataSourceType: DataSourceRemoteType,
8390
- dataSourceIds: _zod.z.string().array()
8391
- });
8392
-
8393
- // src/events/event.ts
8394
-
8395
- var DTOEvent = _zod.z.discriminatedUnion("type", [DTOEventDataSourcesImported, DTOEventFigmaNodesRendered]);
8360
+ // src/sync/docs-structure-repo.ts
8361
+ var _pqueue = require('p-queue'); var _pqueue2 = _interopRequireDefault(_pqueue);
8396
8362
 
8397
8363
  // src/yjs/design-system-content/documentation-hierarchy.ts
8398
8364
 
@@ -8403,6 +8369,21 @@ var VersionRoomBaseYDoc = class {
8403
8369
  __publicField(this, "yDoc");
8404
8370
  this.yDoc = yDoc;
8405
8371
  }
8372
+ getState() {
8373
+ const groups = this.getGroups();
8374
+ const isLoaded = !!groups.length;
8375
+ return {
8376
+ isLoaded,
8377
+ groups,
8378
+ pages: this.getPages(),
8379
+ approvals: this.getApprovals(),
8380
+ groupSnapshots: this.getGroupSnapshots(),
8381
+ pageContentHashes: this.getDocumentationPageContentHashes(),
8382
+ pageSnapshots: this.getPageSnapshots(),
8383
+ settings: this.getDocumentationInternalSettings(),
8384
+ pageLiveblockRoomIds: this.getDocumentationPageLiveblocksRoomIds()
8385
+ };
8386
+ }
8406
8387
  //
8407
8388
  // Pages
8408
8389
  //
@@ -8566,6 +8547,236 @@ var VersionRoomBaseYDoc = class {
8566
8547
  }
8567
8548
  };
8568
8549
 
8550
+ // src/yjs/version-room/compute-dto.ts
8551
+ function computeDocsHierarchy(input, options = {}) {
8552
+ const includeDeletedContent = _nullishCoalesce(options.includeDeletedContent, () => ( false));
8553
+ const debug = _nullishCoalesce(options.debug, () => ( false));
8554
+ const { pages, groups, pageSnapshots, groupSnapshots, settings, pageContentHashes, approvals, pageLiveblockRoomIds } = input;
8555
+ if (includeDeletedContent) {
8556
+ pages.push(...getDeletedPages(pages, pageSnapshots));
8557
+ groups.push(...getDeletedGroups(groups, groupSnapshots));
8558
+ }
8559
+ const pageDTOs = documentationPagesToDTOV2(pages, groups, settings.routingVersion, recordToMap(pageLiveblockRoomIds));
8560
+ const groupDTOs = elementGroupsToDocumentationGroupDTOV2(groups, pages);
8561
+ if (!settings.isDraftFeatureAdopted) {
8562
+ return {
8563
+ pages: pageDTOs,
8564
+ groups: groupDTOs
8565
+ };
8566
+ }
8567
+ const pageDraftStates = buildPageDraftCreatedAndUpdatedStates(pages, pageSnapshots, pageContentHashes, debug);
8568
+ const pageDraftDeletedStates = buildPageDraftDeletedStates(pages, pageSnapshots);
8569
+ const pagePublishedMetadata = buildPagePublishedMetadata(pages, pageSnapshots);
8570
+ const pageApprovalStates = mapByUnique(approvals, (a) => a.pagePersistentId);
8571
+ pageDTOs.forEach((p) => {
8572
+ const draftState = _nullishCoalesce(pageDraftDeletedStates.get(p.persistentId), () => ( pageDraftStates.get(p.persistentId)));
8573
+ draftState && (p.draftState = draftState);
8574
+ const publishMetadata = pagePublishedMetadata.get(p.persistentId);
8575
+ publishMetadata && (p.publishMetadata = publishMetadata);
8576
+ const approvalState = pageApprovalStates.get(p.persistentId);
8577
+ approvalState && (p.approvalState = approvalState);
8578
+ });
8579
+ const groupDraftStates = buildGroupDraftCreatedAndUpdatedStates(groups, groupSnapshots, debug);
8580
+ const groupDraftDeletedStates = buildGroupDraftDeletedStates(groups, groupSnapshots);
8581
+ const groupPublishedMetadata = buildGroupPublishedMetadata(groups, groupSnapshots);
8582
+ const groupApprovalStates = buildGroupApprovalStates(groups, groupSnapshots);
8583
+ groupDTOs.forEach((g) => {
8584
+ const draftState = _nullishCoalesce(groupDraftDeletedStates.get(g.persistentId), () => ( groupDraftStates.get(g.persistentId)));
8585
+ draftState && (g.draftState = draftState);
8586
+ const publishMetadata = groupPublishedMetadata.get(g.persistentId);
8587
+ publishMetadata && (g.publishMetadata = publishMetadata);
8588
+ const approvalState = groupApprovalStates.get(g.persistentId);
8589
+ approvalState && (g.approvalState = approvalState);
8590
+ });
8591
+ return {
8592
+ pages: pageDTOs,
8593
+ groups: groupDTOs
8594
+ };
8595
+ }
8596
+ function getDeletedPages(pages, pageSnapshots) {
8597
+ const existingPagePersistentIds = new Set(pages.map((p) => p.persistentId));
8598
+ const latestSnapshots = pickLatestPageSnapshots(pageSnapshots);
8599
+ return latestSnapshots.filter((s) => !existingPagePersistentIds.has(s.page.persistentId)).map((s) => s.page);
8600
+ }
8601
+ function getDeletedGroups(groups, groupSnapshots) {
8602
+ const existingGroupPersistentIds = new Set(groups.map((p) => p.persistentId));
8603
+ const latestSnapshots = pickLatestGroupSnapshots(groupSnapshots);
8604
+ return latestSnapshots.filter((s) => !existingGroupPersistentIds.has(s.group.persistentId)).map((s) => s.group);
8605
+ }
8606
+ function buildPageDraftCreatedAndUpdatedStates(pages, pageSnapshots, pageHashes, debug) {
8607
+ const publishedSnapshots = pickLatestPageSnapshots(pageSnapshots.filter((s) => s.reason === "Publish"));
8608
+ const publishedSnapshotsByPagePersistentId = mapByUnique(publishedSnapshots, (s) => s.page.persistentId);
8609
+ const result = /* @__PURE__ */ new Map();
8610
+ pages.forEach((page) => {
8611
+ const snapshot = publishedSnapshotsByPagePersistentId.get(page.persistentId);
8612
+ let publishedState;
8613
+ if (snapshot) {
8614
+ publishedState = itemStateFromPage(snapshot.page, snapshot.pageContentHash);
8615
+ }
8616
+ const currentPageContentHash = _nullishCoalesce(_nullishCoalesce(pageHashes[page.persistentId], () => ( _optionalChain([snapshot, 'optionalAccess', _38 => _38.pageContentHash]))), () => ( ""));
8617
+ const currentState = itemStateFromPage(page, currentPageContentHash);
8618
+ const draftState = createDraftState(page.persistentId, currentState, publishedState, debug);
8619
+ if (draftState)
8620
+ result.set(page.persistentId, draftState);
8621
+ });
8622
+ return result;
8623
+ }
8624
+ function itemStateFromPage(page, pageContentHash) {
8625
+ return {
8626
+ title: page.meta.name,
8627
+ configuration: _nullishCoalesce(page.data.configuration, () => ( defaultDocumentationItemConfigurationV2)),
8628
+ contentHash: pageContentHash
8629
+ };
8630
+ }
8631
+ function buildPagePublishedMetadata(pages, pageSnapshots) {
8632
+ const publishedPageSnapshotsByPersistentId = mapByUnique(
8633
+ pickLatestPageSnapshots(pageSnapshots.filter((s) => s.reason === "Publish")),
8634
+ (s) => s.page.persistentId
8635
+ );
8636
+ const result = /* @__PURE__ */ new Map();
8637
+ pages.forEach((p) => {
8638
+ const publishedSnapshot = publishedPageSnapshotsByPersistentId.get(p.persistentId);
8639
+ if (!publishedSnapshot)
8640
+ return;
8641
+ result.set(p.persistentId, {
8642
+ lastPublishedAt: publishedSnapshot.createdAt,
8643
+ lastPublishedByUserId: publishedSnapshot.createdByUserId
8644
+ });
8645
+ });
8646
+ return result;
8647
+ }
8648
+ function createDraftState(itemPersistentId, currentState, publishedState, debug) {
8649
+ if (!publishedState) {
8650
+ return { changeType: "Created" };
8651
+ }
8652
+ const updatedDraftState = {
8653
+ changeType: "Updated",
8654
+ changes: {}
8655
+ };
8656
+ if (currentState.title !== publishedState.title) {
8657
+ if (debug) {
8658
+ console.log(`Item ${itemPersistentId} (${currentState.title}): updated title`);
8659
+ }
8660
+ updatedDraftState.changes.previousTitle = publishedState.title;
8661
+ }
8662
+ const currentConfigHash = generateHash(currentState.configuration, debug);
8663
+ const publishedConfigHash = generateHash(publishedState.configuration, debug);
8664
+ if (currentConfigHash !== publishedConfigHash) {
8665
+ if (debug) {
8666
+ console.log(`Item ${itemPersistentId} (${currentState.title}): updated configuration`);
8667
+ }
8668
+ const configurationDto = documentationItemConfigurationToDTOV2(publishedState.configuration);
8669
+ updatedDraftState.changes.previousConfiguration = configurationDto;
8670
+ }
8671
+ if (currentState.contentHash !== publishedState.contentHash) {
8672
+ if (debug) {
8673
+ console.log(`Item ${itemPersistentId} (${currentState.title}): updated content hash`);
8674
+ }
8675
+ updatedDraftState.changes.previousContentHash = publishedState.contentHash;
8676
+ }
8677
+ if (Object.keys(updatedDraftState.changes).length) {
8678
+ return updatedDraftState;
8679
+ }
8680
+ return void 0;
8681
+ }
8682
+ function buildGroupApprovalStates(groups, groupSnapshots) {
8683
+ const result = /* @__PURE__ */ new Map();
8684
+ const allGroups = [...groups, ...groupSnapshots];
8685
+ for (const g of allGroups) {
8686
+ const approvalState = {
8687
+ approvalState: "Approved",
8688
+ designSystemVersionId: g.designSystemVersionId,
8689
+ persistentId: g.persistentId,
8690
+ groupPersistentId: g.persistentId
8691
+ };
8692
+ result.set(g.persistentId, approvalState);
8693
+ }
8694
+ return result;
8695
+ }
8696
+ function buildPageDraftDeletedStates(pages, pageSnapshots) {
8697
+ const deletedSnapshotsByPagePersistentId = mapByUnique(
8698
+ pickLatestPageSnapshots(pageSnapshots.filter((s) => s.reason === "Deletion")),
8699
+ (s) => s.page.persistentId
8700
+ );
8701
+ const result = /* @__PURE__ */ new Map();
8702
+ pages.forEach((page) => {
8703
+ const deletedSnapshot = deletedSnapshotsByPagePersistentId.get(page.persistentId);
8704
+ if (!deletedSnapshot)
8705
+ return;
8706
+ result.set(page.persistentId, {
8707
+ changeType: "Deleted",
8708
+ deletedAt: deletedSnapshot.createdAt,
8709
+ deletedByUserId: deletedSnapshot.createdByUserId
8710
+ });
8711
+ });
8712
+ return result;
8713
+ }
8714
+ function buildGroupDraftDeletedStates(groups, groupSnapshots) {
8715
+ const deletedSnapshotsByGroupPersistentId = mapByUnique(
8716
+ pickLatestGroupSnapshots(groupSnapshots.filter((s) => s.reason === "Deletion")),
8717
+ (s) => s.group.persistentId
8718
+ );
8719
+ const result = /* @__PURE__ */ new Map();
8720
+ groups.forEach((group) => {
8721
+ if (!group.parentPersistentId)
8722
+ return;
8723
+ const deletedSnapshot = deletedSnapshotsByGroupPersistentId.get(group.persistentId);
8724
+ if (!deletedSnapshot)
8725
+ return;
8726
+ result.set(group.persistentId, {
8727
+ changeType: "Deleted",
8728
+ deletedAt: deletedSnapshot.createdAt,
8729
+ deletedByUserId: deletedSnapshot.createdByUserId
8730
+ });
8731
+ });
8732
+ return result;
8733
+ }
8734
+ function buildGroupDraftCreatedAndUpdatedStates(groups, groupSnapshots, debug) {
8735
+ const publishedSnapshots = pickLatestGroupSnapshots(groupSnapshots.filter((s) => s.reason === "Publish"));
8736
+ const publishedSnapshotsByGroupPersistent = mapByUnique(publishedSnapshots, (s) => s.group.persistentId);
8737
+ const result = /* @__PURE__ */ new Map();
8738
+ groups.forEach((group) => {
8739
+ if (!group.parentPersistentId)
8740
+ return;
8741
+ const currentState = itemStateFromGroup(group);
8742
+ const snapshot = publishedSnapshotsByGroupPersistent.get(group.persistentId);
8743
+ let publishedState;
8744
+ if (snapshot) {
8745
+ publishedState = itemStateFromGroup(snapshot.group);
8746
+ }
8747
+ const draftState = createDraftState(group.persistentId, currentState, publishedState, debug);
8748
+ if (draftState)
8749
+ result.set(group.persistentId, draftState);
8750
+ });
8751
+ return result;
8752
+ }
8753
+ function itemStateFromGroup(group) {
8754
+ return {
8755
+ title: group.meta.name,
8756
+ configuration: _nullishCoalesce(_optionalChain([group, 'access', _39 => _39.data, 'optionalAccess', _40 => _40.configuration]), () => ( defaultDocumentationItemConfigurationV2)),
8757
+ contentHash: "-"
8758
+ };
8759
+ }
8760
+ function buildGroupPublishedMetadata(groups, groupSnapshots) {
8761
+ const publishedGroupSnapshotsByPersistentId = mapByUnique(
8762
+ pickLatestGroupSnapshots(groupSnapshots.filter((s) => s.reason === "Publish")),
8763
+ (s) => s.group.persistentId
8764
+ );
8765
+ const result = /* @__PURE__ */ new Map();
8766
+ groups.forEach((g) => {
8767
+ if (!g.parentPersistentId)
8768
+ return;
8769
+ const publishedSnapshot = publishedGroupSnapshotsByPersistentId.get(g.persistentId);
8770
+ if (!publishedSnapshot)
8771
+ return;
8772
+ result.set(g.persistentId, {
8773
+ lastPublishedAt: publishedSnapshot.createdAt,
8774
+ lastPublishedByUserId: publishedSnapshot.createdByUserId
8775
+ });
8776
+ });
8777
+ return result;
8778
+ }
8779
+
8569
8780
  // src/yjs/version-room/utils.ts
8570
8781
  function generatePageContentHash(content, definitions, debug = false) {
8571
8782
  let sanitizedContent = structuredClone(content);
@@ -8645,248 +8856,8 @@ var FrontendVersionRoomYDoc = class {
8645
8856
  // Hierarchy
8646
8857
  //
8647
8858
  getDocumentationHierarchy(options = {}) {
8648
- const includeDeletedContent = _nullishCoalesce(options.includeDeletedContent, () => ( false));
8649
- const doc = new VersionRoomBaseYDoc(this.yDoc);
8650
- const pages = doc.getPages();
8651
- const groups = doc.getGroups();
8652
- const pageSnapshots = doc.getPageSnapshots();
8653
- const groupSnapshots = doc.getGroupSnapshots();
8654
- const liveblocksRoomIds = recordToMap(doc.getDocumentationPageLiveblocksRoomIds());
8655
- if (includeDeletedContent) {
8656
- pages.push(...this.getDeletedPages(pages, pageSnapshots));
8657
- groups.push(...this.getDeletedGroups(groups, groupSnapshots));
8658
- }
8659
- const settings = doc.getDocumentationInternalSettings();
8660
- const pageDTOs = documentationPagesToDTOV2(pages, groups, settings.routingVersion, liveblocksRoomIds);
8661
- const groupDTOs = elementGroupsToDocumentationGroupDTOV2(groups, pages);
8662
- if (!settings.isDraftFeatureAdopted) {
8663
- return {
8664
- pages: pageDTOs,
8665
- groups: groupDTOs
8666
- };
8667
- }
8668
- const pageDraftStates = this.buildPageDraftCreatedAndUpdatedStates(pages, pageSnapshots);
8669
- const pageDraftDeletedStates = this.buildPageDraftDeletedStates(pages, pageSnapshots);
8670
- const pagePublishedMetadata = this.buildPagePublishedMetadata(pages, pageSnapshots);
8671
- const pageApprovalStates = this.buildPageApprovalStates(pages);
8672
- pageDTOs.forEach((p) => {
8673
- const draftState = _nullishCoalesce(pageDraftDeletedStates.get(p.id), () => ( pageDraftStates.get(p.id)));
8674
- draftState && (p.draftState = draftState);
8675
- const publishMetadata = pagePublishedMetadata.get(p.id);
8676
- publishMetadata && (p.publishMetadata = publishMetadata);
8677
- const approvalState = pageApprovalStates.get(p.id);
8678
- approvalState && (p.approvalState = approvalState);
8679
- });
8680
- const groupDraftStates = this.buildGroupDraftCreatedAndUpdatedStates(groups, groupSnapshots);
8681
- const groupDraftDeletedStates = this.buildGroupDraftDeletedStates(groups, groupSnapshots);
8682
- const groupPublishedMetadata = this.buildGroupPublishedMetadata(groups, groupSnapshots);
8683
- const groupApprovalStates = this.buildGroupApprovalStates(groups, groupSnapshots);
8684
- groupDTOs.forEach((g) => {
8685
- const draftState = _nullishCoalesce(groupDraftDeletedStates.get(g.id), () => ( groupDraftStates.get(g.id)));
8686
- draftState && (g.draftState = draftState);
8687
- const publishMetadata = groupPublishedMetadata.get(g.id);
8688
- publishMetadata && (g.publishMetadata = publishMetadata);
8689
- const approvalState = groupApprovalStates.get(g.id);
8690
- approvalState && (g.approvalState = approvalState);
8691
- });
8692
- return {
8693
- pages: pageDTOs,
8694
- groups: groupDTOs
8695
- };
8696
- }
8697
- //
8698
- // Drafts - Pages
8699
- //
8700
- buildPageDraftDeletedStates(pages, pageSnapshots) {
8701
- const deletedSnapshotsByPageId = mapByUnique(
8702
- pickLatestPageSnapshots(pageSnapshots.filter((s) => s.reason === "Deletion")),
8703
- (s) => s.page.id
8704
- );
8705
- const result = /* @__PURE__ */ new Map();
8706
- pages.forEach((page) => {
8707
- const deletedSnapshot = deletedSnapshotsByPageId.get(page.id);
8708
- if (!deletedSnapshot)
8709
- return;
8710
- result.set(page.id, {
8711
- changeType: "Deleted",
8712
- deletedAt: deletedSnapshot.createdAt,
8713
- deletedByUserId: deletedSnapshot.createdByUserId
8714
- });
8715
- });
8716
- return result;
8717
- }
8718
- buildPageDraftCreatedAndUpdatedStates(pages, pageSnapshots) {
8719
8859
  const doc = new VersionRoomBaseYDoc(this.yDoc);
8720
- const pageHashes = doc.getDocumentationPageContentHashes();
8721
- const publishedSnapshots = pickLatestPageSnapshots(pageSnapshots.filter((s) => s.reason === "Publish"));
8722
- const publishedSnapshotsByPageId = mapByUnique(publishedSnapshots, (s) => s.page.id);
8723
- const result = /* @__PURE__ */ new Map();
8724
- pages.forEach((page) => {
8725
- const snapshot = publishedSnapshotsByPageId.get(page.id);
8726
- let publishedState;
8727
- if (snapshot) {
8728
- publishedState = this.itemStateFromPage(snapshot.page, snapshot.pageContentHash);
8729
- }
8730
- const currentPageContentHash = _nullishCoalesce(_nullishCoalesce(pageHashes[page.persistentId], () => ( _optionalChain([snapshot, 'optionalAccess', _37 => _37.pageContentHash]))), () => ( ""));
8731
- const currentState = this.itemStateFromPage(page, currentPageContentHash);
8732
- const draftState = this.createDraftState(page.persistentId, currentState, publishedState);
8733
- if (draftState)
8734
- result.set(page.id, draftState);
8735
- });
8736
- return result;
8737
- }
8738
- itemStateFromPage(page, pageContentHash) {
8739
- return {
8740
- title: page.meta.name,
8741
- configuration: _nullishCoalesce(page.data.configuration, () => ( defaultDocumentationItemConfigurationV2)),
8742
- contentHash: pageContentHash
8743
- };
8744
- }
8745
- getDeletedPages(pages, pageSnapshots) {
8746
- const existingPageIds = new Set(pages.map((p) => p.id));
8747
- const latestSnapshots = pickLatestPageSnapshots(pageSnapshots);
8748
- return latestSnapshots.filter((s) => !existingPageIds.has(s.page.id)).map((s) => s.page);
8749
- }
8750
- buildPagePublishedMetadata(pages, pageSnapshots) {
8751
- const publishedPageSnapshotsById = mapByUnique(
8752
- pickLatestPageSnapshots(pageSnapshots.filter((s) => s.reason === "Publish")),
8753
- (s) => s.page.id
8754
- );
8755
- const result = /* @__PURE__ */ new Map();
8756
- pages.forEach((p) => {
8757
- const publishedSnapshot = publishedPageSnapshotsById.get(p.id);
8758
- if (!publishedSnapshot)
8759
- return;
8760
- result.set(p.id, {
8761
- lastPublishedAt: publishedSnapshot.createdAt,
8762
- lastPublishedByUserId: publishedSnapshot.createdByUserId
8763
- });
8764
- });
8765
- return result;
8766
- }
8767
- //
8768
- // Drafts - Groups
8769
- //
8770
- buildGroupDraftDeletedStates(groups, groupSnapshots) {
8771
- const deletedSnapshotsByGroupId = mapByUnique(
8772
- pickLatestGroupSnapshots(groupSnapshots.filter((s) => s.reason === "Deletion")),
8773
- (s) => s.group.id
8774
- );
8775
- const result = /* @__PURE__ */ new Map();
8776
- groups.forEach((group) => {
8777
- if (!group.parentPersistentId)
8778
- return;
8779
- const deletedSnapshot = deletedSnapshotsByGroupId.get(group.id);
8780
- if (!deletedSnapshot)
8781
- return;
8782
- result.set(group.id, {
8783
- changeType: "Deleted",
8784
- deletedAt: deletedSnapshot.createdAt,
8785
- deletedByUserId: deletedSnapshot.createdByUserId
8786
- });
8787
- });
8788
- return result;
8789
- }
8790
- buildGroupDraftCreatedAndUpdatedStates(groups, groupSnapshots) {
8791
- const publishedSnapshots = pickLatestGroupSnapshots(groupSnapshots.filter((s) => s.reason === "Publish"));
8792
- const publishedSnapshotsByGroupId = mapByUnique(publishedSnapshots, (s) => s.group.id);
8793
- const result = /* @__PURE__ */ new Map();
8794
- groups.forEach((group) => {
8795
- if (!group.parentPersistentId)
8796
- return;
8797
- const currentState = this.itemStateFromGroup(group);
8798
- const snapshot = publishedSnapshotsByGroupId.get(group.id);
8799
- let publishedState;
8800
- if (snapshot) {
8801
- publishedState = this.itemStateFromGroup(snapshot.group);
8802
- }
8803
- const draftState = this.createDraftState(group.persistentId, currentState, publishedState);
8804
- if (draftState)
8805
- result.set(group.id, draftState);
8806
- });
8807
- return result;
8808
- }
8809
- itemStateFromGroup(group) {
8810
- return {
8811
- title: group.meta.name,
8812
- configuration: _nullishCoalesce(_optionalChain([group, 'access', _38 => _38.data, 'optionalAccess', _39 => _39.configuration]), () => ( defaultDocumentationItemConfigurationV2)),
8813
- contentHash: "-"
8814
- };
8815
- }
8816
- getDeletedGroups(groups, groupSnapshots) {
8817
- const existingGroupIds = new Set(groups.map((p) => p.id));
8818
- const latestSnapshots = pickLatestGroupSnapshots(groupSnapshots);
8819
- return latestSnapshots.filter((s) => !existingGroupIds.has(s.group.id)).map((s) => s.group);
8820
- }
8821
- buildGroupPublishedMetadata(groups, groupSnapshots) {
8822
- const publishedGroupSnapshotsById = mapByUnique(
8823
- pickLatestGroupSnapshots(groupSnapshots.filter((s) => s.reason === "Publish")),
8824
- (s) => s.group.id
8825
- );
8826
- const result = /* @__PURE__ */ new Map();
8827
- groups.forEach((g) => {
8828
- if (!g.parentPersistentId)
8829
- return;
8830
- const publishedSnapshot = publishedGroupSnapshotsById.get(g.id);
8831
- if (!publishedSnapshot)
8832
- return;
8833
- result.set(g.id, {
8834
- lastPublishedAt: publishedSnapshot.createdAt,
8835
- lastPublishedByUserId: publishedSnapshot.createdByUserId
8836
- });
8837
- });
8838
- return result;
8839
- }
8840
- //
8841
- // Drafts - Shared
8842
- //
8843
- createDraftState(itemPersistentId, currentState, publishedState) {
8844
- if (!publishedState) {
8845
- return { changeType: "Created" };
8846
- }
8847
- const updatedDraftState = {
8848
- changeType: "Updated",
8849
- changes: {}
8850
- };
8851
- if (currentState.title !== publishedState.title) {
8852
- if (this.debug) {
8853
- console.log(`Item ${itemPersistentId} (${currentState.title}): updated title`);
8854
- }
8855
- updatedDraftState.changes.previousTitle = publishedState.title;
8856
- }
8857
- const currentConfigHash = generateHash(currentState.configuration, this.debug);
8858
- const publishedConfigHash = generateHash(publishedState.configuration, this.debug);
8859
- if (currentConfigHash !== publishedConfigHash) {
8860
- if (this.debug) {
8861
- console.log(`Item ${itemPersistentId} (${currentState.title}): updated configuration`);
8862
- }
8863
- const configurationDto = documentationItemConfigurationToDTOV2(publishedState.configuration);
8864
- updatedDraftState.changes.previousConfiguration = configurationDto;
8865
- }
8866
- if (currentState.contentHash !== publishedState.contentHash) {
8867
- if (this.debug) {
8868
- console.log(`Item ${itemPersistentId} (${currentState.title}): updated content hash`);
8869
- }
8870
- updatedDraftState.changes.previousContentHash = publishedState.contentHash;
8871
- }
8872
- if (Object.keys(updatedDraftState.changes).length) {
8873
- return updatedDraftState;
8874
- }
8875
- return void 0;
8876
- }
8877
- buildGroupApprovalStates(groups, groupSnapshots) {
8878
- const result = /* @__PURE__ */ new Map();
8879
- const allGroups = [...groups, ...groupSnapshots];
8880
- for (const g of allGroups) {
8881
- const approvalState = {
8882
- approvalState: "Approved",
8883
- designSystemVersionId: g.designSystemVersionId,
8884
- persistentId: g.persistentId,
8885
- groupId: g.id
8886
- };
8887
- result.set(g.id, approvalState);
8888
- }
8889
- return result;
8860
+ return computeDocsHierarchy(doc.getState(), options);
8890
8861
  }
8891
8862
  //
8892
8863
  // Update page content hash
@@ -8922,19 +8893,6 @@ var FrontendVersionRoomYDoc = class {
8922
8893
  const settings = doc.getDocumentationInternalSettings();
8923
8894
  return settings.approvalRequiredForPublishing;
8924
8895
  }
8925
- buildPageApprovalStates(pages) {
8926
- const doc = new VersionRoomBaseYDoc(this.yDoc);
8927
- const pageIds = pages.map((p) => p.id);
8928
- const result = /* @__PURE__ */ new Map();
8929
- const approvals = doc.getApprovals();
8930
- for (const pId of pageIds) {
8931
- const approval = approvals.find((approval2) => approval2.pageId === pId);
8932
- if (approval) {
8933
- result.set(pId, approval);
8934
- }
8935
- }
8936
- return result;
8937
- }
8938
8896
  };
8939
8897
 
8940
8898
  // src/yjs/design-system-content/documentation-hierarchy.ts
@@ -8961,7 +8919,7 @@ var DTODocumentationPageRoomHeaderDataUpdate = _zod.z.object({
8961
8919
  function itemConfigurationToYjs(yDoc, item) {
8962
8920
  yDoc.transact((trx) => {
8963
8921
  const { title, configuration } = item;
8964
- const header = _optionalChain([configuration, 'optionalAccess', _40 => _40.header]);
8922
+ const header = _optionalChain([configuration, 'optionalAccess', _41 => _41.header]);
8965
8923
  if (title !== void 0) {
8966
8924
  const headerYMap = trx.doc.getMap("itemTitle");
8967
8925
  headerYMap.set("title", title);
@@ -8979,9 +8937,9 @@ function itemConfigurationToYjs(yDoc, item) {
8979
8937
  header.minHeight !== void 0 && headerYMap.set("minHeight", header.minHeight);
8980
8938
  }
8981
8939
  const configYMap = trx.doc.getMap("itemConfiguration");
8982
- _optionalChain([configuration, 'optionalAccess', _41 => _41.showSidebar]) !== void 0 && configYMap.set("showSidebar", configuration.showSidebar);
8983
- _optionalChain([configuration, 'optionalAccess', _42 => _42.isHidden]) !== void 0 && configYMap.set("isHidden", configuration.isHidden);
8984
- _optionalChain([configuration, 'optionalAccess', _43 => _43.isPrivate]) !== void 0 && configYMap.set("isPrivate", configuration.isPrivate);
8940
+ _optionalChain([configuration, 'optionalAccess', _42 => _42.showSidebar]) !== void 0 && configYMap.set("showSidebar", configuration.showSidebar);
8941
+ _optionalChain([configuration, 'optionalAccess', _43 => _43.isHidden]) !== void 0 && configYMap.set("isHidden", configuration.isHidden);
8942
+ _optionalChain([configuration, 'optionalAccess', _44 => _44.isPrivate]) !== void 0 && configYMap.set("isPrivate", configuration.isPrivate);
8985
8943
  });
8986
8944
  }
8987
8945
  function yjsToItemConfiguration(yDoc) {
@@ -9838,7 +9796,7 @@ var ListTreeBuilder = class {
9838
9796
  }
9839
9797
  addWithProperty(block, multiRichTextProperty) {
9840
9798
  const parsedOptions = PageBlockDefinitionMutiRichTextOptions.optional().parse(multiRichTextProperty.options);
9841
- return this.add(block, multiRichTextProperty.id, _optionalChain([parsedOptions, 'optionalAccess', _44 => _44.multiRichTextStyle]) || "OL");
9799
+ return this.add(block, multiRichTextProperty.id, _optionalChain([parsedOptions, 'optionalAccess', _45 => _45.multiRichTextStyle]) || "OL");
9842
9800
  }
9843
9801
  add(block, multiRichTextPropertyId, multiRichTextPropertyStyle) {
9844
9802
  const list = this.createList(block, multiRichTextPropertyId, multiRichTextPropertyStyle);
@@ -9853,7 +9811,7 @@ var ListTreeBuilder = class {
9853
9811
  }
9854
9812
  const listParent = this.getParentOfDepth(block.data.indentLevel);
9855
9813
  const lastChild = listParent.children[listParent.children.length - 1];
9856
- if (_optionalChain([lastChild, 'optionalAccess', _45 => _45.type]) === "List") {
9814
+ if (_optionalChain([lastChild, 'optionalAccess', _46 => _46.type]) === "List") {
9857
9815
  lastChild.children.push(...list.leadingChildren);
9858
9816
  return;
9859
9817
  } else {
@@ -10084,7 +10042,7 @@ function serializeAsRichTextBlock(input) {
10084
10042
  const textPropertyValue = BlockParsingUtils.richTextPropertyValue(blockItem, richTextProperty.id);
10085
10043
  const enrichedInput = { ...input, richTextPropertyValue: textPropertyValue };
10086
10044
  const parsedOptions = PageBlockDefinitionRichTextOptions.optional().parse(richTextProperty.options);
10087
- const style = _nullishCoalesce(_optionalChain([parsedOptions, 'optionalAccess', _46 => _46.richTextStyle]), () => ( "Default"));
10045
+ const style = _nullishCoalesce(_optionalChain([parsedOptions, 'optionalAccess', _47 => _47.richTextStyle]), () => ( "Default"));
10088
10046
  switch (style) {
10089
10047
  case "Callout":
10090
10048
  return serializeAsCallout(enrichedInput);
@@ -10308,7 +10266,7 @@ function serializeBlockNodeAttributes(block) {
10308
10266
  };
10309
10267
  }
10310
10268
  function richTextHeadingLevel(property) {
10311
- const style = _optionalChain([property, 'access', _47 => _47.options, 'optionalAccess', _48 => _48.richTextStyle]);
10269
+ const style = _optionalChain([property, 'access', _48 => _48.options, 'optionalAccess', _49 => _49.richTextStyle]);
10312
10270
  if (!style)
10313
10271
  return void 0;
10314
10272
  switch (style) {
@@ -10429,7 +10387,7 @@ function serializeAsCustomBlock(block, definition) {
10429
10387
  linksTo: i.linksTo
10430
10388
  };
10431
10389
  });
10432
- const columns = _optionalChain([block, 'access', _49 => _49.data, 'access', _50 => _50.appearance, 'optionalAccess', _51 => _51.numberOfColumns]);
10390
+ const columns = _optionalChain([block, 'access', _50 => _50.data, 'access', _51 => _51.appearance, 'optionalAccess', _52 => _52.numberOfColumns]);
10433
10391
  return {
10434
10392
  type: serializeCustomBlockNodeType(block, definition),
10435
10393
  attrs: {
@@ -12626,7 +12584,7 @@ function parseAsListNode(prosemirrorNode) {
12626
12584
  function parseAsListNodeItem(prosemirrorNode) {
12627
12585
  if (prosemirrorNode.type !== "listItem")
12628
12586
  return null;
12629
- const firstChild = _optionalChain([prosemirrorNode, 'access', _52 => _52.content, 'optionalAccess', _53 => _53[0]]);
12587
+ const firstChild = _optionalChain([prosemirrorNode, 'access', _53 => _53.content, 'optionalAccess', _54 => _54[0]]);
12630
12588
  if (!firstChild || firstChild.type !== "paragraph")
12631
12589
  return null;
12632
12590
  return parseRichText(_nullishCoalesce(firstChild.content, () => ( [])));
@@ -12781,10 +12739,10 @@ function parseAsMultiRichText(prosemirrorNode, definition, property, definitions
12781
12739
  const variantId = getProsemirrorBlockVariantId(prosemirrorNode);
12782
12740
  const result = [];
12783
12741
  const listItems = [];
12784
- _optionalChain([prosemirrorNode, 'access', _54 => _54.content, 'optionalAccess', _55 => _55.forEach, 'call', _56 => _56((c) => {
12742
+ _optionalChain([prosemirrorNode, 'access', _55 => _55.content, 'optionalAccess', _56 => _56.forEach, 'call', _57 => _57((c) => {
12785
12743
  if (c.type !== "listItem")
12786
12744
  return;
12787
- _optionalChain([c, 'access', _57 => _57.content, 'optionalAccess', _58 => _58.forEach, 'call', _59 => _59((cc) => {
12745
+ _optionalChain([c, 'access', _58 => _58.content, 'optionalAccess', _59 => _59.forEach, 'call', _60 => _60((cc) => {
12788
12746
  listItems.push(cc);
12789
12747
  })]);
12790
12748
  })]);
@@ -12900,17 +12858,17 @@ function parseAsTable(prosemirrorNode, definition, property) {
12900
12858
  return null;
12901
12859
  const variantId = getProsemirrorBlockVariantId(prosemirrorNode);
12902
12860
  const hasBorder = getProsemirrorAttribute(prosemirrorNode, "hasBorder", _zod.z.boolean().optional()) !== false;
12903
- const tableChild = _optionalChain([prosemirrorNode, 'access', _60 => _60.content, 'optionalAccess', _61 => _61.find, 'call', _62 => _62((c) => c.type === "table")]);
12861
+ const tableChild = _optionalChain([prosemirrorNode, 'access', _61 => _61.content, 'optionalAccess', _62 => _62.find, 'call', _63 => _63((c) => c.type === "table")]);
12904
12862
  if (!tableChild) {
12905
12863
  return emptyTable(id, variantId, 0);
12906
12864
  }
12907
- 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]))]), () => ( []));
12865
+ 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]))]), () => ( []));
12908
12866
  if (!rows.length) {
12909
12867
  return emptyTable(id, variantId, 0);
12910
12868
  }
12911
- 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));
12912
- const columnHeaderCells = rows.filter((r) => _optionalChain([r, 'access', _73 => _73.content, 'optionalAccess', _74 => _74[0], 'optionalAccess', _75 => _75.type]) === "tableHeader").length;
12913
- const hasHeaderRow = _optionalChain([rows, 'access', _76 => _76[0], 'access', _77 => _77.content, 'optionalAccess', _78 => _78.length]) === rowHeaderCells;
12869
+ 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));
12870
+ const columnHeaderCells = rows.filter((r) => _optionalChain([r, 'access', _74 => _74.content, 'optionalAccess', _75 => _75[0], 'optionalAccess', _76 => _76.type]) === "tableHeader").length;
12871
+ const hasHeaderRow = _optionalChain([rows, 'access', _77 => _77[0], 'access', _78 => _78.content, 'optionalAccess', _79 => _79.length]) === rowHeaderCells;
12914
12872
  const hasHeaderColumn = rows.length === columnHeaderCells;
12915
12873
  const tableValue = {
12916
12874
  showBorder: hasBorder,
@@ -12992,7 +12950,7 @@ function parseAsTableNode(prosemirrorNode) {
12992
12950
  const parsedItems = PageBlockItemV2.array().safeParse(JSON.parse(items));
12993
12951
  if (!parsedItems.success)
12994
12952
  return null;
12995
- const rawImagePropertyValue = _optionalChain([parsedItems, 'access', _79 => _79.data, 'access', _80 => _80[0], 'optionalAccess', _81 => _81.props, 'access', _82 => _82.image]);
12953
+ const rawImagePropertyValue = _optionalChain([parsedItems, 'access', _80 => _80.data, 'access', _81 => _81[0], 'optionalAccess', _82 => _82.props, 'access', _83 => _83.image]);
12996
12954
  if (!rawImagePropertyValue)
12997
12955
  return null;
12998
12956
  const imagePropertyValueParseResult = PageBlockItemImageValue.safeParse(rawImagePropertyValue);
@@ -13233,7 +13191,7 @@ function getProsemirrorBlockVariantId(prosemirrorNode) {
13233
13191
  return getProsemirrorAttribute(prosemirrorNode, "variantId", nullishToOptional(_zod.z.string()));
13234
13192
  }
13235
13193
  function getProsemirrorAttribute(prosemirrorNode, attributeName, validationSchema) {
13236
- const parsedAttr = validationSchema.safeParse(_optionalChain([prosemirrorNode, 'access', _83 => _83.attrs, 'optionalAccess', _84 => _84[attributeName]]));
13194
+ const parsedAttr = validationSchema.safeParse(_optionalChain([prosemirrorNode, 'access', _84 => _84.attrs, 'optionalAccess', _85 => _85[attributeName]]));
13237
13195
  if (parsedAttr.success) {
13238
13196
  return parsedAttr.data;
13239
13197
  } else {
@@ -13288,11 +13246,570 @@ var BackendVersionRoomYDoc = class {
13288
13246
  }
13289
13247
  };
13290
13248
 
13249
+ // src/sync/local-state.ts
13250
+ var LocalStorage = class {
13251
+ constructor() {
13252
+ __publicField(this, "pages", /* @__PURE__ */ new Map());
13253
+ __publicField(this, "liveblocksRoomIds", /* @__PURE__ */ new Map());
13254
+ __publicField(this, "deletedPageIds", /* @__PURE__ */ new Set());
13255
+ __publicField(this, "groups", /* @__PURE__ */ new Map());
13256
+ }
13257
+ setPage(page) {
13258
+ if (this.pages.has(page.persistentId)) {
13259
+ throw new Error(`Page with id ${page.persistentId} already exists`);
13260
+ }
13261
+ this.pages.set(page.persistentId, page);
13262
+ }
13263
+ deletePage(persistentId) {
13264
+ this.pages.delete(persistentId);
13265
+ this.deletedPageIds.add(persistentId);
13266
+ }
13267
+ tryGetPage(persistentId) {
13268
+ return this.pages.get(persistentId);
13269
+ }
13270
+ getPage(persistentId) {
13271
+ const page = this.tryGetPage(persistentId);
13272
+ if (!page)
13273
+ throw new Error(`Page with id ${persistentId} doesn't exist`);
13274
+ return page;
13275
+ }
13276
+ getAllPages() {
13277
+ return Array.from(this.pages.values());
13278
+ }
13279
+ getAllDeletedPages() {
13280
+ return this.deletedPageIds;
13281
+ }
13282
+ removePage(persistentId) {
13283
+ this.pages.delete(persistentId);
13284
+ }
13285
+ setPageLiveblocksRoomId(pagePersistentId, id) {
13286
+ this.liveblocksRoomIds.set(pagePersistentId, id);
13287
+ }
13288
+ getPageLiveblocksRoomId(pagePersistentId) {
13289
+ return this.liveblocksRoomIds.get(pagePersistentId);
13290
+ }
13291
+ getAllPageLiveblocksRoomIds() {
13292
+ return this.liveblocksRoomIds;
13293
+ }
13294
+ };
13291
13295
 
13296
+ // src/sync/docs-structure-repo.ts
13297
+ var DocsStructureRepository = class {
13298
+ constructor(designSystemVersionId, yDoc, transactionExecutor) {
13299
+ __publicField(this, "localState", new LocalStorage());
13300
+ __publicField(this, "designSystemVersionId");
13301
+ __publicField(this, "yDoc");
13302
+ __publicField(this, "yObserver");
13303
+ __publicField(this, "_yState");
13304
+ __publicField(this, "_currentHierarchy");
13305
+ __publicField(this, "trxQueue");
13306
+ __publicField(this, "hierarchyObservers", /* @__PURE__ */ new Set());
13307
+ __publicField(this, "initCallbacks", /* @__PURE__ */ new Set());
13308
+ this.designSystemVersionId = designSystemVersionId;
13309
+ this.yDoc = yDoc;
13310
+ this.yObserver = yDoc.on("update", () => this.onYUpdate());
13311
+ this.onYUpdate();
13312
+ this.trxQueue = new TransactionQueue(transactionExecutor);
13313
+ }
13314
+ //
13315
+ // Convenience
13316
+ //
13317
+ get yState() {
13318
+ const yState = this._yState;
13319
+ if (!yState)
13320
+ throw SupernovaException.shouldNotHappen(`Accessing Y state before it was loaded`);
13321
+ return yState;
13322
+ }
13323
+ //
13324
+ // Lifecycle
13325
+ //
13326
+ get isInitialized() {
13327
+ return !!this._currentHierarchy;
13328
+ }
13329
+ onInitialized() {
13330
+ if (this.isInitialized)
13331
+ return Promise.resolve();
13332
+ return new Promise((resolve) => {
13333
+ this.initCallbacks.add(resolve);
13334
+ });
13335
+ }
13336
+ addHierarchyObserver(observer) {
13337
+ this.hierarchyObservers.add(observer);
13338
+ if (this._currentHierarchy)
13339
+ observer(this._currentHierarchy);
13340
+ }
13341
+ removeHierarchyObserver(observer) {
13342
+ this.hierarchyObservers.delete(observer);
13343
+ }
13344
+ dispose() {
13345
+ this.yDoc.off("update", this.yObserver);
13346
+ this.hierarchyObservers.clear();
13347
+ this.trxQueue.clear();
13348
+ }
13349
+ //
13350
+ // Accessors
13351
+ //
13352
+ get currentHierarchy() {
13353
+ const hierarchy = this._currentHierarchy;
13354
+ if (!hierarchy)
13355
+ throw new Error(`Hierarchy cannot be accessed while it's still loading`);
13356
+ return hierarchy;
13357
+ }
13358
+ //
13359
+ // Actions
13360
+ //
13361
+ createPage(input) {
13362
+ void this.createPagePromise(input);
13363
+ }
13364
+ createPagePromise(input) {
13365
+ this.localState.setPage({
13366
+ createdAt: /* @__PURE__ */ new Date(),
13367
+ parentPersistentId: input.parentPersistentId,
13368
+ persistentId: input.persistentId,
13369
+ shortPersistentId: generateShortPersistentId(),
13370
+ slug: slugify(input.title),
13371
+ meta: { name: input.title },
13372
+ updatedAt: /* @__PURE__ */ new Date(),
13373
+ data: { configuration: input.configuration },
13374
+ sortOrder: this.calculateSortOrder(input.parentPersistentId, input.afterPersistentId),
13375
+ designSystemVersionId: ""
13376
+ });
13377
+ this.localState.setPageLiveblocksRoomId(
13378
+ input.persistentId,
13379
+ `${RoomType.DocumentationPage}:${this.designSystemVersionId}:${input.persistentId}`
13380
+ );
13381
+ this.refreshHierarchy();
13382
+ return this.trxQueue.enqueue({
13383
+ type: "DocumentationPageCreate",
13384
+ input: {
13385
+ persistentId: input.persistentId,
13386
+ parentPersistentId: input.parentPersistentId,
13387
+ title: input.title,
13388
+ afterPersistentId: input.afterPersistentId,
13389
+ configuration: input.configuration
13390
+ }
13391
+ });
13392
+ }
13393
+ updatePage(update) {
13394
+ void this.updatePagePromise(update);
13395
+ }
13396
+ updatePagePromise(update) {
13397
+ this.updatePageLocally(update);
13398
+ this.refreshHierarchy();
13399
+ return this.trxQueue.enqueue({
13400
+ type: "DocumentationPageUpdate",
13401
+ input: {
13402
+ id: update.persistentId,
13403
+ configuration: update.configuration,
13404
+ title: update.title
13405
+ }
13406
+ });
13407
+ }
13408
+ updatePageLocally(update) {
13409
+ const basePage = this.lookupPage(update.persistentId);
13410
+ this.localState.setPage(this.createLocalPageUpdate(basePage, update));
13411
+ }
13412
+ deletePagePromise(persistentId) {
13413
+ this.lookupPage(persistentId);
13414
+ this.localState.deletePage(persistentId);
13415
+ this.refreshHierarchy();
13416
+ return this.trxQueue.enqueue({
13417
+ type: "DocumentationPageDelete",
13418
+ input: {
13419
+ id: persistentId
13420
+ }
13421
+ });
13422
+ }
13423
+ deletePage(persistentId) {
13424
+ void this.deletePagePromise(persistentId);
13425
+ }
13426
+ createLocalPageUpdate(basePage, update) {
13427
+ let updatedConfiguration = basePage.data.configuration;
13428
+ if (update.configuration && Object.keys(update.configuration).length) {
13429
+ updatedConfiguration = { ..._nullishCoalesce(updatedConfiguration, () => ( defaultDocumentationItemConfigurationV2)) };
13430
+ updatedConfiguration.header = _nullishCoalesce(update.configuration.header, () => ( updatedConfiguration.header));
13431
+ updatedConfiguration.isHidden = _nullishCoalesce(update.configuration.isHidden, () => ( updatedConfiguration.isHidden));
13432
+ updatedConfiguration.isPrivate = _nullishCoalesce(update.configuration.isPrivate, () => ( updatedConfiguration.isPrivate));
13433
+ updatedConfiguration.showSidebar = _nullishCoalesce(update.configuration.showSidebar, () => ( updatedConfiguration.showSidebar));
13434
+ }
13435
+ return {
13436
+ createdAt: basePage.createdAt,
13437
+ data: {
13438
+ configuration: updatedConfiguration
13439
+ },
13440
+ designSystemVersionId: basePage.designSystemVersionId,
13441
+ meta: { name: _nullishCoalesce(update.title, () => ( basePage.meta.name)) },
13442
+ parentPersistentId: basePage.parentPersistentId,
13443
+ persistentId: basePage.persistentId,
13444
+ shortPersistentId: basePage.shortPersistentId,
13445
+ sortOrder: basePage.sortOrder,
13446
+ updatedAt: /* @__PURE__ */ new Date(),
13447
+ slug: basePage.slug
13448
+ };
13449
+ }
13450
+ lookupPage(persistentId) {
13451
+ const localPageToUpdate = this.localState.tryGetPage(persistentId);
13452
+ if (localPageToUpdate)
13453
+ return localPageToUpdate;
13454
+ const remotePage = this.yState.pages.find((p) => p.persistentId === persistentId);
13455
+ if (remotePage)
13456
+ return remotePage;
13457
+ throw SupernovaException.notFound(`Page ${persistentId} was not found`);
13458
+ }
13459
+ //
13460
+ // Reactions
13461
+ //
13462
+ refreshHierarchy() {
13463
+ const hierarchy = this.calculateHierarchy();
13464
+ if (!hierarchy)
13465
+ return;
13466
+ this._currentHierarchy = hierarchy;
13467
+ this.initCallbacks.forEach((f) => f());
13468
+ this.initCallbacks.clear();
13469
+ this.hierarchyObservers.forEach((o) => o(hierarchy));
13470
+ }
13471
+ calculateHierarchy() {
13472
+ const yState = this._yState;
13473
+ if (!yState)
13474
+ return;
13475
+ const allPagesById = mapByUnique(yState.pages, (p) => p.persistentId);
13476
+ this.localState.getAllPages().forEach((p) => {
13477
+ allPagesById.set(p.persistentId, p);
13478
+ });
13479
+ this.localState.getAllDeletedPages().forEach((id) => allPagesById.delete(id));
13480
+ const pageLiveblockRoomIds = { ...this.yState.pageLiveblockRoomIds };
13481
+ this.localState.getAllPageLiveblocksRoomIds().forEach((v, k) => {
13482
+ pageLiveblockRoomIds[k] = v;
13483
+ });
13484
+ const hierarchy = computeDocsHierarchy({
13485
+ approvals: yState.approvals,
13486
+ groups: yState.groups,
13487
+ groupSnapshots: yState.groupSnapshots,
13488
+ pageContentHashes: yState.pageContentHashes,
13489
+ pages: Array.from(allPagesById.values()),
13490
+ pageSnapshots: yState.pageSnapshots,
13491
+ settings: yState.settings,
13492
+ pageLiveblockRoomIds
13493
+ });
13494
+ return hierarchy;
13495
+ }
13496
+ onYUpdate() {
13497
+ const newState = new VersionRoomBaseYDoc(this.yDoc).getState();
13498
+ if (newState.groups.length) {
13499
+ this._yState = newState;
13500
+ this.refreshHierarchy();
13501
+ }
13502
+ }
13503
+ //
13504
+ // Utils
13505
+ //
13506
+ calculateSortOrder(parentPersistentId, afterPersistentId) {
13507
+ const sortOrderStep = Math.pow(2, 16);
13508
+ const neighbours = [
13509
+ ...this.yState.pages.filter((p) => p.parentPersistentId === parentPersistentId),
13510
+ ...this.yState.groups.filter((g) => g.parentPersistentId === parentPersistentId)
13511
+ ];
13512
+ if (!neighbours.length)
13513
+ return 0;
13514
+ neighbours.sort((lhs, rhs) => lhs.sortOrder - rhs.sortOrder);
13515
+ if (afterPersistentId === null)
13516
+ return neighbours[0].sortOrder - sortOrderStep;
13517
+ if (!afterPersistentId)
13518
+ return neighbours[neighbours.length - 1].sortOrder + sortOrderStep;
13519
+ const index = neighbours.findIndex((e) => e.persistentId === afterPersistentId);
13520
+ if (index < 0 || index === neighbours.length - 1) {
13521
+ return neighbours[neighbours.length - 1].sortOrder + sortOrderStep;
13522
+ }
13523
+ const left = neighbours[index].sortOrder;
13524
+ const right = _nullishCoalesce(_optionalChain([neighbours, 'access', _86 => _86[index + 1], 'optionalAccess', _87 => _87.sortOrder]), () => ( left + sortOrderStep * 2));
13525
+ return (right + left) / 2;
13526
+ }
13527
+ };
13528
+ var TransactionQueue = class {
13529
+ constructor(executor) {
13530
+ __publicField(this, "executor");
13531
+ __publicField(this, "queue", new (0, _pqueue2.default)({
13532
+ concurrency: 1
13533
+ }));
13534
+ this.executor = executor;
13535
+ }
13536
+ enqueue(trx) {
13537
+ return this.queue.add(() => this.executor(trx));
13538
+ }
13539
+ onEmpty() {
13540
+ return this.queue.onEmpty();
13541
+ }
13542
+ clear() {
13543
+ this.queue.clear();
13544
+ }
13545
+ };
13292
13546
 
13547
+ // src/sync-v2/docs-structure-repo.ts
13293
13548
 
13294
13549
 
13550
+ // src/sync-v2/local-action-executor.ts
13551
+ function applyActionsLocally(versionId, remoteState, trx) {
13552
+ const actionExecutor = new LocalDocsElementActionExecutor(versionId, remoteState);
13553
+ actionExecutor.applyTransactions(trx);
13554
+ return actionExecutor.localState;
13555
+ }
13556
+ var LocalDocsElementActionExecutor = class {
13557
+ constructor(designSystemVersionId, remoteState) {
13558
+ __publicField(this, "designSystemVersionId");
13559
+ __publicField(this, "pages");
13560
+ __publicField(this, "groups");
13561
+ this.designSystemVersionId = designSystemVersionId;
13562
+ this.pages = mapByUnique(remoteState.pages, (p) => p.persistentId);
13563
+ this.groups = mapByUnique(remoteState.groups, (p) => p.persistentId);
13564
+ }
13565
+ get localState() {
13566
+ return {
13567
+ pages: Array.from(this.pages.values()),
13568
+ groups: Array.from(this.groups.values())
13569
+ };
13570
+ }
13571
+ applyTransactions(trx) {
13572
+ trx.forEach((trx2) => this.applyTransaction(trx2));
13573
+ }
13574
+ applyTransaction(trx) {
13575
+ switch (trx.type) {
13576
+ case "DocumentationGroupCreate":
13577
+ case "DocumentationGroupDelete":
13578
+ case "DocumentationGroupDuplicate":
13579
+ case "DocumentationGroupMove":
13580
+ case "DocumentationGroupRestore":
13581
+ case "DocumentationGroupUpdate":
13582
+ throw new Error(`Transaction type ${trx.type} is not yet implemented`);
13583
+ case "DocumentationPageCreate":
13584
+ return this.documentationPageCreate(trx);
13585
+ case "DocumentationPageUpdate":
13586
+ return this.documentationPageUpdate(trx);
13587
+ case "DocumentationPageMove":
13588
+ return this.documentationPageMove(trx);
13589
+ case "DocumentationPageDelete":
13590
+ return this.documentationPageDelete(trx);
13591
+ case "DocumentationPageApprovalStateChange":
13592
+ case "DocumentationPageDuplicate":
13593
+ case "DocumentationPageRestore":
13594
+ throw new Error(`Transaction type ${trx.type} is not yet implemented`);
13595
+ case "DocumentationTabCreate":
13596
+ case "DocumentationTabGroupDelete":
13597
+ throw new Error(`Transaction type ${trx.type} is not yet implemented`);
13598
+ case "FigmaNodeRender":
13599
+ case "FigmaNodeRenderAsync":
13600
+ throw new Error(`Transaction type ${trx.type} is not a documentation element action`);
13601
+ }
13602
+ }
13603
+ documentationPageCreate(trx) {
13604
+ const { input } = trx;
13605
+ if (this.pages.has(input.persistentId)) {
13606
+ return;
13607
+ }
13608
+ const localPage = {
13609
+ createdAt: /* @__PURE__ */ new Date(),
13610
+ parentPersistentId: input.parentPersistentId,
13611
+ persistentId: input.persistentId,
13612
+ shortPersistentId: generateShortPersistentId(),
13613
+ slug: slugify(input.title),
13614
+ meta: { name: input.title },
13615
+ updatedAt: /* @__PURE__ */ new Date(),
13616
+ data: {
13617
+ // TODO Artem: move somewhere reusable
13618
+ configuration: input.configuration ? { ...defaultDocumentationItemConfigurationV2, ...input.configuration } : input.configuration
13619
+ },
13620
+ sortOrder: this.calculateSortOrder(input.parentPersistentId, input.afterPersistentId),
13621
+ designSystemVersionId: this.designSystemVersionId
13622
+ };
13623
+ this.pages.set(localPage.persistentId, localPage);
13624
+ }
13625
+ documentationPageUpdate(trx) {
13626
+ const { input } = trx;
13627
+ const existingPage = this.pages.get(input.id);
13628
+ if (!existingPage) {
13629
+ throw new Error(`Cannot update page: page id ${input.id} was not found`);
13630
+ }
13631
+ const localPage = {
13632
+ ...existingPage,
13633
+ userSlug: void 0,
13634
+ meta: {
13635
+ ...existingPage.meta,
13636
+ name: _nullishCoalesce(input.title, () => ( existingPage.meta.name))
13637
+ },
13638
+ data: {
13639
+ // TODO Artem: move somewhere reusable
13640
+ configuration: input.configuration ? { ..._nullishCoalesce(existingPage.data.configuration, () => ( defaultDocumentationItemConfigurationV2)), ...input.configuration } : existingPage.data.configuration
13641
+ }
13642
+ };
13643
+ this.pages.set(localPage.persistentId, localPage);
13644
+ }
13645
+ documentationPageMove(trx) {
13646
+ const { input } = trx;
13647
+ if (!this.groups.has(input.parentPersistentId)) {
13648
+ throw new Error(`Cannot move page: page parent id ${input.parentPersistentId} was not found`);
13649
+ }
13650
+ const existingPage = this.pages.get(input.id);
13651
+ if (!existingPage) {
13652
+ throw new Error(`Cannot update page: page id ${input.id} was not found`);
13653
+ }
13654
+ const localPage = {
13655
+ ...existingPage,
13656
+ userSlug: void 0,
13657
+ sortOrder: this.calculateSortOrder(input.parentPersistentId, input.afterPersistentId),
13658
+ parentPersistentId: input.parentPersistentId
13659
+ };
13660
+ this.pages.set(localPage.persistentId, localPage);
13661
+ }
13662
+ documentationPageDelete(trx) {
13663
+ const { input } = trx;
13664
+ if (!this.pages.delete(trx.input.id)) {
13665
+ throw new Error(`Cannot delete page: page id ${input.id} was not found`);
13666
+ }
13667
+ }
13668
+ //
13669
+ // Utils
13670
+ //
13671
+ calculateSortOrder(parentPersistentId, afterPersistentId) {
13672
+ const sortOrderStep = Math.pow(2, 16);
13673
+ const neighbours = [
13674
+ ...Array.from(this.pages.values()).filter((p) => p.parentPersistentId === parentPersistentId),
13675
+ ...Array.from(this.groups.values()).filter((g) => g.parentPersistentId === parentPersistentId)
13676
+ ];
13677
+ if (!neighbours.length)
13678
+ return 0;
13679
+ neighbours.sort((lhs, rhs) => lhs.sortOrder - rhs.sortOrder);
13680
+ if (afterPersistentId === null)
13681
+ return neighbours[0].sortOrder - sortOrderStep;
13682
+ if (!afterPersistentId)
13683
+ return neighbours[neighbours.length - 1].sortOrder + sortOrderStep;
13684
+ const index = neighbours.findIndex((e) => e.persistentId === afterPersistentId);
13685
+ if (index < 0 || index === neighbours.length - 1) {
13686
+ return neighbours[neighbours.length - 1].sortOrder + sortOrderStep;
13687
+ }
13688
+ const left = neighbours[index].sortOrder;
13689
+ const right = _nullishCoalesce(_optionalChain([neighbours, 'access', _88 => _88[index + 1], 'optionalAccess', _89 => _89.sortOrder]), () => ( left + sortOrderStep * 2));
13690
+ return (right + left) / 2;
13691
+ }
13692
+ };
13295
13693
 
13694
+ // src/sync-v2/docs-structure-repo.ts
13695
+ var DocsStructureRepositoryV2 = class {
13696
+ constructor(designSystemVersionId, yDoc, transactionExecutor) {
13697
+ __publicField(this, "designSystemVersionId");
13698
+ __publicField(this, "yDoc");
13699
+ __publicField(this, "yObserver");
13700
+ __publicField(this, "_yState");
13701
+ __publicField(this, "_currentHierarchy");
13702
+ __publicField(this, "localActions", []);
13703
+ __publicField(this, "actionQueue");
13704
+ __publicField(this, "hierarchyObservers", /* @__PURE__ */ new Set());
13705
+ __publicField(this, "initCallbacks", /* @__PURE__ */ new Set());
13706
+ this.designSystemVersionId = designSystemVersionId;
13707
+ this.yDoc = yDoc;
13708
+ this.yObserver = yDoc.on("update", () => this.onYUpdate());
13709
+ this.onYUpdate();
13710
+ this.actionQueue = new TransactionQueue2(transactionExecutor);
13711
+ }
13712
+ //
13713
+ // Lifecycle
13714
+ //
13715
+ get isInitialized() {
13716
+ return !!this._currentHierarchy;
13717
+ }
13718
+ onInitialized() {
13719
+ if (this.isInitialized)
13720
+ return Promise.resolve();
13721
+ return new Promise((resolve) => {
13722
+ this.initCallbacks.add(resolve);
13723
+ });
13724
+ }
13725
+ addHierarchyObserver(observer) {
13726
+ this.hierarchyObservers.add(observer);
13727
+ if (this._currentHierarchy)
13728
+ observer(this._currentHierarchy);
13729
+ }
13730
+ removeHierarchyObserver(observer) {
13731
+ this.hierarchyObservers.delete(observer);
13732
+ }
13733
+ dispose() {
13734
+ this.yDoc.off("update", this.yObserver);
13735
+ this.hierarchyObservers.clear();
13736
+ this.actionQueue.clear();
13737
+ }
13738
+ //
13739
+ // Accessors
13740
+ //
13741
+ get currentHierarchy() {
13742
+ const hierarchy = this._currentHierarchy;
13743
+ if (!hierarchy)
13744
+ throw new Error(`Hierarchy cannot be accessed while it's still loading`);
13745
+ return hierarchy;
13746
+ }
13747
+ //
13748
+ // Actions
13749
+ //
13750
+ executeAction(action) {
13751
+ void this.executeActionPromise(action);
13752
+ }
13753
+ executeActionPromise(action) {
13754
+ this.localActions.push(action);
13755
+ this.refreshHierarchy();
13756
+ return this.actionQueue.enqueue(action);
13757
+ }
13758
+ //
13759
+ // Reactions
13760
+ //
13761
+ refreshHierarchy() {
13762
+ const hierarchy = this.calculateHierarchy();
13763
+ if (!hierarchy)
13764
+ return;
13765
+ this._currentHierarchy = hierarchy;
13766
+ this.initCallbacks.forEach((f) => f());
13767
+ this.initCallbacks.clear();
13768
+ this.hierarchyObservers.forEach((o) => o(hierarchy));
13769
+ }
13770
+ calculateHierarchy() {
13771
+ const yState = this._yState;
13772
+ if (!yState)
13773
+ return;
13774
+ const { pages, groups } = applyActionsLocally(this.designSystemVersionId, yState, this.localActions);
13775
+ const hierarchy = computeDocsHierarchy({
13776
+ pages,
13777
+ groups,
13778
+ approvals: yState.approvals,
13779
+ groupSnapshots: yState.groupSnapshots,
13780
+ pageContentHashes: yState.pageContentHashes,
13781
+ pageSnapshots: yState.pageSnapshots,
13782
+ settings: yState.settings,
13783
+ pageLiveblockRoomIds: yState.pageLiveblockRoomIds
13784
+ });
13785
+ return hierarchy;
13786
+ }
13787
+ onYUpdate() {
13788
+ const newState = new VersionRoomBaseYDoc(this.yDoc).getState();
13789
+ if (newState.groups.length) {
13790
+ this._yState = newState;
13791
+ this.refreshHierarchy();
13792
+ }
13793
+ }
13794
+ };
13795
+ var TransactionQueue2 = class {
13796
+ constructor(executor) {
13797
+ __publicField(this, "executor");
13798
+ __publicField(this, "queue", new (0, _pqueue2.default)({
13799
+ concurrency: 1
13800
+ }));
13801
+ this.executor = executor;
13802
+ }
13803
+ enqueue(trx) {
13804
+ return this.queue.add(() => this.executor(trx));
13805
+ }
13806
+ onEmpty() {
13807
+ return this.queue.onEmpty();
13808
+ }
13809
+ clear() {
13810
+ this.queue.clear();
13811
+ }
13812
+ };
13296
13813
 
13297
13814
 
13298
13815
 
@@ -13702,5 +14219,5 @@ var BackendVersionRoomYDoc = class {
13702
14219
 
13703
14220
 
13704
14221
 
13705
- 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.DTOElementsGetOutputV2 = DTOElementsGetOutputV2; exports.DTOElementsGetQuerySchema = DTOElementsGetQuerySchema; exports.DTOElementsGetTypeFilter = DTOElementsGetTypeFilter; exports.DTOEvent = DTOEvent; exports.DTOEventDataSourcesImported = DTOEventDataSourcesImported; exports.DTOEventFigmaNodesRendered = DTOEventFigmaNodesRendered; exports.DTOExportJob = DTOExportJob; exports.DTOExportJobCreatedBy = DTOExportJobCreatedBy; exports.DTOExportJobDesignSystemPreview = DTOExportJobDesignSystemPreview; exports.DTOExportJobDesignSystemVersionPreview = DTOExportJobDesignSystemVersionPreview; exports.DTOExportJobDestinations = DTOExportJobDestinations; exports.DTOExportJobResponse = DTOExportJobResponse; exports.DTOExportJobResponseLegacy = DTOExportJobResponseLegacy; exports.DTOExportJobResult = DTOExportJobResult; exports.DTOExportJobsListFilter = DTOExportJobsListFilter; exports.DTOExporter = DTOExporter; exports.DTOExporterCreateInput = DTOExporterCreateInput; 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.DTOExporterPropertyDefinitionEnumOption = DTOExporterPropertyDefinitionEnumOption; exports.DTOExporterPropertyDefinitionNumber = DTOExporterPropertyDefinitionNumber; exports.DTOExporterPropertyDefinitionObject = DTOExporterPropertyDefinitionObject; exports.DTOExporterPropertyDefinitionString = DTOExporterPropertyDefinitionString; exports.DTOExporterPropertyDefinitionValue = DTOExporterPropertyDefinitionValue; exports.DTOExporterPropertyDefinitionValueMap = DTOExporterPropertyDefinitionValueMap; exports.DTOExporterPropertyDefinitionsResponse = DTOExporterPropertyDefinitionsResponse; exports.DTOExporterPropertyType = DTOExporterPropertyType; exports.DTOExporterResponse = DTOExporterResponse; 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.DTOFigmaNodeDataV2 = DTOFigmaNodeDataV2; exports.DTOFigmaNodeOrigin = DTOFigmaNodeOrigin; exports.DTOFigmaNodeRenderActionInput = DTOFigmaNodeRenderActionInput; exports.DTOFigmaNodeRenderActionOutput = DTOFigmaNodeRenderActionOutput; exports.DTOFigmaNodeRenderAsyncActionInput = DTOFigmaNodeRenderAsyncActionInput; exports.DTOFigmaNodeRenderAsyncActionOutput = DTOFigmaNodeRenderAsyncActionOutput; exports.DTOFigmaNodeRenderFormat = DTOFigmaNodeRenderFormat; exports.DTOFigmaNodeRenderIdInput = DTOFigmaNodeRenderIdInput; exports.DTOFigmaNodeRenderInput = DTOFigmaNodeRenderInput; exports.DTOFigmaNodeRenderUrlInput = DTOFigmaNodeRenderUrlInput; exports.DTOFigmaNodeRerenderInput = DTOFigmaNodeRerenderInput; exports.DTOFigmaNodeV2 = DTOFigmaNodeV2; 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.DTOPageRedirect = DTOPageRedirect; exports.DTOPageRedirectCreateBody = DTOPageRedirectCreateBody; exports.DTOPageRedirectDeleteResponse = DTOPageRedirectDeleteResponse; exports.DTOPageRedirectListResponse = DTOPageRedirectListResponse; exports.DTOPageRedirectResponse = DTOPageRedirectResponse; exports.DTOPageRedirectUpdateBody = DTOPageRedirectUpdateBody; 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.DTOUserTheme = DTOUserTheme; 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.ExporterJobsEndpoint = ExporterJobsEndpoint; 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.LiveblocksEndpoint = LiveblocksEndpoint; exports.NpmRegistryInput = NpmRegistryInput; exports.ObjectMeta = ObjectMeta2; exports.OverridesEndpoint = OverridesEndpoint; exports.PageBlockEditorModel = PageBlockEditorModel; exports.PageSectionEditorModel = PageSectionEditorModel; exports.ParsedFigmaFileURLError = ParsedFigmaFileURLError; 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;
14222
+ 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.DTOElementsGetOutputV2 = DTOElementsGetOutputV2; 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.DTOExportJobResponseLegacy = DTOExportJobResponseLegacy; exports.DTOExportJobResult = DTOExportJobResult; exports.DTOExportJobsListFilter = DTOExportJobsListFilter; exports.DTOExporter = DTOExporter; exports.DTOExporterCreateInput = DTOExporterCreateInput; 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.DTOExporterPropertyDefinitionEnumOption = DTOExporterPropertyDefinitionEnumOption; exports.DTOExporterPropertyDefinitionNumber = DTOExporterPropertyDefinitionNumber; exports.DTOExporterPropertyDefinitionObject = DTOExporterPropertyDefinitionObject; exports.DTOExporterPropertyDefinitionString = DTOExporterPropertyDefinitionString; exports.DTOExporterPropertyDefinitionValue = DTOExporterPropertyDefinitionValue; exports.DTOExporterPropertyDefinitionValueMap = DTOExporterPropertyDefinitionValueMap; exports.DTOExporterPropertyDefinitionsResponse = DTOExporterPropertyDefinitionsResponse; exports.DTOExporterPropertyType = DTOExporterPropertyType; exports.DTOExporterResponse = DTOExporterResponse; 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.DTOFigmaNodeDataV2 = DTOFigmaNodeDataV2; exports.DTOFigmaNodeOrigin = DTOFigmaNodeOrigin; exports.DTOFigmaNodeRenderActionInput = DTOFigmaNodeRenderActionInput; exports.DTOFigmaNodeRenderActionOutput = DTOFigmaNodeRenderActionOutput; exports.DTOFigmaNodeRenderAsyncActionInput = DTOFigmaNodeRenderAsyncActionInput; exports.DTOFigmaNodeRenderAsyncActionOutput = DTOFigmaNodeRenderAsyncActionOutput; exports.DTOFigmaNodeRenderFormat = DTOFigmaNodeRenderFormat; exports.DTOFigmaNodeRenderIdInput = DTOFigmaNodeRenderIdInput; exports.DTOFigmaNodeRenderInput = DTOFigmaNodeRenderInput; exports.DTOFigmaNodeRenderUrlInput = DTOFigmaNodeRenderUrlInput; exports.DTOFigmaNodeRerenderInput = DTOFigmaNodeRerenderInput; exports.DTOFigmaNodeV2 = DTOFigmaNodeV2; 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.DocsStructureRepository = DocsStructureRepository; exports.DocsStructureRepositoryV2 = DocsStructureRepositoryV2; 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.ExporterJobsEndpoint = ExporterJobsEndpoint; 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.LiveblocksEndpoint = LiveblocksEndpoint; exports.LocalStorage = LocalStorage; exports.NpmRegistryInput = NpmRegistryInput; exports.ObjectMeta = ObjectMeta2; exports.OverridesEndpoint = OverridesEndpoint; exports.PageBlockEditorModel = PageBlockEditorModel; exports.PageSectionEditorModel = PageSectionEditorModel; exports.ParsedFigmaFileURLError = ParsedFigmaFileURLError; 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;
13706
14223
  //# sourceMappingURL=index.js.map