@rynt/sdk 0.9.53

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 (332) hide show
  1. package/README.md +122 -0
  2. package/REGISTRIES.md +189 -0
  3. package/env.d.ts +11 -0
  4. package/host-shims.d.ts +30 -0
  5. package/package.json +88 -0
  6. package/src/extension-marketplace/api-types.ts +141 -0
  7. package/src/extension-marketplace/client.ts +296 -0
  8. package/src/extension-marketplace/index.ts +22 -0
  9. package/src/extension-marketplace/schemas.ts +178 -0
  10. package/src/extensions/ExtensionRoutePage.vue +17 -0
  11. package/src/extensions/context.ts +37 -0
  12. package/src/extensions/disabled-folder.ts +21 -0
  13. package/src/extensions/extension-expose-map.ts +5 -0
  14. package/src/extensions/extension-expose.ts +48 -0
  15. package/src/extensions/graph.ts +67 -0
  16. package/src/extensions/index.ts +251 -0
  17. package/src/extensions/invite-handler/types.ts +20 -0
  18. package/src/extensions/launcher-entities/create-launcher-entity.ts +25 -0
  19. package/src/extensions/launcher-entities/keys.ts +46 -0
  20. package/src/extensions/launcher-entities/launcher-entity-components.ts +177 -0
  21. package/src/extensions/launcher-entities/props-map.ts +69 -0
  22. package/src/extensions/launcher-entities/registry.ts +32 -0
  23. package/src/extensions/launcher-models/apis/accounts-contracts.ts +102 -0
  24. package/src/extensions/launcher-models/apis/launcher-model-apis.ts +553 -0
  25. package/src/extensions/launcher-models/keys.ts +23 -0
  26. package/src/extensions/launcher-models/public.ts +9 -0
  27. package/src/extensions/launcher-models/registry-core.ts +34 -0
  28. package/src/extensions/manifest-types.ts +22 -0
  29. package/src/extensions/manifest.ts +46 -0
  30. package/src/extensions/marketplace-open-key.ts +26 -0
  31. package/src/extensions/plugin-types.ts +44 -0
  32. package/src/extensions/plugin.ts +62 -0
  33. package/src/extensions/registries/bootstrap.ts +11 -0
  34. package/src/extensions/registries/builtins/account-provider.ts +6 -0
  35. package/src/extensions/registries/builtins/app-topbar-left-widgets.ts +6 -0
  36. package/src/extensions/registries/builtins/app-topbar-right-widgets.ts +6 -0
  37. package/src/extensions/registries/builtins/app-topbar-status-widgets.ts +6 -0
  38. package/src/extensions/registries/builtins/build-card-actions.ts +6 -0
  39. package/src/extensions/registries/builtins/build-card-after-meta.ts +6 -0
  40. package/src/extensions/registries/builtins/build-card-before-media.ts +6 -0
  41. package/src/extensions/registries/builtins/build-card-before-meta.ts +6 -0
  42. package/src/extensions/registries/builtins/build-card-footer-actions.ts +6 -0
  43. package/src/extensions/registries/builtins/build-detail-after-content.ts +6 -0
  44. package/src/extensions/registries/builtins/build-detail-before-content.ts +6 -0
  45. package/src/extensions/registries/builtins/build-detail-before-hero.ts +6 -0
  46. package/src/extensions/registries/builtins/build-detail-header-actions.ts +6 -0
  47. package/src/extensions/registries/builtins/build-detail-mod-row-actions.ts +6 -0
  48. package/src/extensions/registries/builtins/build-detail-resourcepack-row-actions.ts +6 -0
  49. package/src/extensions/registries/builtins/build-detail-right-column-bottom.ts +6 -0
  50. package/src/extensions/registries/builtins/build-detail-right-column-top.ts +6 -0
  51. package/src/extensions/registries/builtins/dialog-footer-actions.ts +6 -0
  52. package/src/extensions/registries/builtins/feed-after-content.ts +6 -0
  53. package/src/extensions/registries/builtins/feed-before-content.ts +6 -0
  54. package/src/extensions/registries/builtins/file-editor.ts +19 -0
  55. package/src/extensions/registries/builtins/friends-after-list.ts +6 -0
  56. package/src/extensions/registries/builtins/friends-before-list.ts +6 -0
  57. package/src/extensions/registries/builtins/index.ts +141 -0
  58. package/src/extensions/registries/builtins/invite-handler.ts +7 -0
  59. package/src/extensions/registries/builtins/library-after-content.ts +6 -0
  60. package/src/extensions/registries/builtins/library-before-content.ts +6 -0
  61. package/src/extensions/registries/builtins/loader.ts +8 -0
  62. package/src/extensions/registries/builtins/map-card-actions.ts +6 -0
  63. package/src/extensions/registries/builtins/map-card-after-meta.ts +6 -0
  64. package/src/extensions/registries/builtins/map-card-before-meta.ts +6 -0
  65. package/src/extensions/registries/builtins/map-card-footer-actions.ts +6 -0
  66. package/src/extensions/registries/builtins/map-detail-after-content.ts +6 -0
  67. package/src/extensions/registries/builtins/map-detail-before-content.ts +6 -0
  68. package/src/extensions/registries/builtins/map-detail-header-actions.ts +6 -0
  69. package/src/extensions/registries/builtins/markdown-editor-tiptap-extensions.ts +7 -0
  70. package/src/extensions/registries/builtins/markdown-editor-toolbar-actions.ts +6 -0
  71. package/src/extensions/registries/builtins/markdown-renderer-after-content.ts +6 -0
  72. package/src/extensions/registries/builtins/markdown-renderer-before-content.ts +6 -0
  73. package/src/extensions/registries/builtins/mod-details-footer-actions.ts +6 -0
  74. package/src/extensions/registries/builtins/mod-manage-actions.ts +6 -0
  75. package/src/extensions/registries/builtins/mod-provider.ts +5 -0
  76. package/src/extensions/registries/builtins/nav.ts +7 -0
  77. package/src/extensions/registries/builtins/page.ts +13 -0
  78. package/src/extensions/registries/builtins/projects-after-content.ts +6 -0
  79. package/src/extensions/registries/builtins/projects-before-content.ts +6 -0
  80. package/src/extensions/registries/builtins/resourcepack-manage-actions.ts +7 -0
  81. package/src/extensions/registries/builtins/server-card-actions.ts +6 -0
  82. package/src/extensions/registries/builtins/server-card-after-meta.ts +6 -0
  83. package/src/extensions/registries/builtins/server-card-before-meta.ts +6 -0
  84. package/src/extensions/registries/builtins/server-card-footer-actions.ts +6 -0
  85. package/src/extensions/registries/builtins/server-detail-after-content.ts +6 -0
  86. package/src/extensions/registries/builtins/server-detail-before-content.ts +6 -0
  87. package/src/extensions/registries/builtins/server-detail-header-actions.ts +6 -0
  88. package/src/extensions/registries/builtins/settings-after-sections.ts +6 -0
  89. package/src/extensions/registries/builtins/settings-before-sections.ts +6 -0
  90. package/src/extensions/registries/builtins/settings-section-widgets.ts +6 -0
  91. package/src/extensions/registries/builtins/shaderpack-manage-actions.ts +7 -0
  92. package/src/extensions/registries/builtins/shell.ts +5 -0
  93. package/src/extensions/registries/builtins/sidebar-after-content.ts +6 -0
  94. package/src/extensions/registries/builtins/sidebar-before-content.ts +6 -0
  95. package/src/extensions/registries/builtins/sidebar-footer-widgets.ts +6 -0
  96. package/src/extensions/registries/builtins/sidebar-header-widgets.ts +6 -0
  97. package/src/extensions/registries/builtins/sidebar.ts +11 -0
  98. package/src/extensions/registries/builtins/theme.ts +5 -0
  99. package/src/extensions/registries/builtins/user-card-after-meta.ts +6 -0
  100. package/src/extensions/registries/builtins/user-card-before-meta.ts +6 -0
  101. package/src/extensions/registries/builtins/user-menu-actions.ts +6 -0
  102. package/src/extensions/registries/builtins/user-menu-after-actions.ts +6 -0
  103. package/src/extensions/registries/builtins/user-menu-before-actions.ts +6 -0
  104. package/src/extensions/registries/builtins/user-strip.ts +5 -0
  105. package/src/extensions/registries/clear-extension-ui-registries.ts +15 -0
  106. package/src/extensions/registries/define-extension-registry.ts +58 -0
  107. package/src/extensions/registries/extension-host-api.ts +41 -0
  108. package/src/extensions/registries/extension-registry-api.ts +103 -0
  109. package/src/extensions/registries/extension-registry-payload-map.ts +9 -0
  110. package/src/extensions/registries/extension-scope.ts +41 -0
  111. package/src/extensions/registries/get-registry.ts +23 -0
  112. package/src/extensions/registries/index.ts +58 -0
  113. package/src/extensions/registries/manifest-rynt.ts +193 -0
  114. package/src/extensions/registries/registry-slot.ts +40 -0
  115. package/src/extensions/registries/registry-value-map.ts +89 -0
  116. package/src/extensions/registries/store.ts +206 -0
  117. package/src/extensions/resolve-extensions.ts +245 -0
  118. package/src/extensions/router-bridge.ts +103 -0
  119. package/src/extensions/session.ts +6 -0
  120. package/src/extensions/slug.ts +23 -0
  121. package/src/extensions/version.ts +147 -0
  122. package/src/host/extensions-composables.ts +33 -0
  123. package/src/host/extensions-init.ts +194 -0
  124. package/src/host/index.ts +11 -0
  125. package/src/host/launcher-models/index.ts +4 -0
  126. package/src/index.ts +229 -0
  127. package/src/minecraft-loader/base-loader.ts +102 -0
  128. package/src/minecraft-loader/index.ts +11 -0
  129. package/src/minecraft-loader/loader-registry.ts +72 -0
  130. package/src/shared/api/assets.ts +112 -0
  131. package/src/shared/api/auth.ts +283 -0
  132. package/src/shared/api/builds.ts +647 -0
  133. package/src/shared/api/config.ts +19 -0
  134. package/src/shared/api/download-stats.ts +103 -0
  135. package/src/shared/api/downloads.ts +36 -0
  136. package/src/shared/api/entity-authorship.ts +60 -0
  137. package/src/shared/api/events.ts +393 -0
  138. package/src/shared/api/friends.ts +140 -0
  139. package/src/shared/api/graphql.ts +87 -0
  140. package/src/shared/api/index.ts +23 -0
  141. package/src/shared/api/invites.ts +262 -0
  142. package/src/shared/api/library.ts +44 -0
  143. package/src/shared/api/maps.ts +385 -0
  144. package/src/shared/api/notify-websocket.ts +140 -0
  145. package/src/shared/api/posts.ts +357 -0
  146. package/src/shared/api/projectServers.ts +379 -0
  147. package/src/shared/api/serverMembers.ts +173 -0
  148. package/src/shared/api/users.ts +294 -0
  149. package/src/shared/composables/buildEditor/useBuildEditor.ts +66 -0
  150. package/src/shared/composables/buildManifest/buildManifest.ts +447 -0
  151. package/src/shared/composables/filesEditor/filesEditor.ts +346 -0
  152. package/src/shared/composables/index.ts +10 -0
  153. package/src/shared/composables/modsEditor/modsEditor.ts +1678 -0
  154. package/src/shared/composables/registrySlot/registry-slot-utils.ts +25 -0
  155. package/src/shared/composables/registrySlot/useRegistrySlotMissing.ts +35 -0
  156. package/src/shared/composables/resourcePacksEditor/resourcePacksEditor.ts +448 -0
  157. package/src/shared/composables/shaderPacksEditor/shaderPacksEditor.ts +395 -0
  158. package/src/shared/composables/useSkinRender.ts +70 -0
  159. package/src/shared/composables/useZlDeepLink.ts +178 -0
  160. package/src/shared/definitions/defineGraphCache.ts +216 -0
  161. package/src/shared/definitions/defineStore.ts +32 -0
  162. package/src/shared/definitions/index.ts +2 -0
  163. package/src/shared/minecraft-types/build-manifest.ts +611 -0
  164. package/src/shared/minecraft-types/index.ts +3 -0
  165. package/src/shared/minecraft-types/launcher-versions.ts +32 -0
  166. package/src/shared/minecraft-types/minecraft-launcher-types.ts +276 -0
  167. package/src/shared/mocks/index.ts +1 -0
  168. package/src/shared/mocks/navigation.ts +17 -0
  169. package/src/shared/mods/http.ts +45 -0
  170. package/src/shared/mods/index.ts +5 -0
  171. package/src/shared/mods/marketplace-editor-search.ts +266 -0
  172. package/src/shared/mods/marketplace-search-utils.ts +42 -0
  173. package/src/shared/mods/mod-marketplace-registry.ts +66 -0
  174. package/src/shared/mods/mod-marketplace-types.ts +28 -0
  175. package/src/shared/mods/providers/curseforge.ts +464 -0
  176. package/src/shared/mods/providers/index.ts +8 -0
  177. package/src/shared/mods/providers/modrinth.ts +402 -0
  178. package/src/shared/mods/resolve-mods-provider-loader-ids.ts +77 -0
  179. package/src/shared/mods/types.ts +76 -0
  180. package/src/shared/styles/index.css +713 -0
  181. package/src/shared/themes/index.ts +23 -0
  182. package/src/shared/themes/theme-tokens-black.json +126 -0
  183. package/src/shared/themes/theme-tokens-classic.json +126 -0
  184. package/src/shared/themes/theme-tokens-pink.json +126 -0
  185. package/src/shared/themes/theme-tokens.json +126 -0
  186. package/src/shared/themes/types.ts +85 -0
  187. package/src/shared/types/API_DOCUMENTATION.md +422 -0
  188. package/src/shared/types/account.ts +40 -0
  189. package/src/shared/types/build.ts +8 -0
  190. package/src/shared/types/entities.ts +181 -0
  191. package/src/shared/types/index.ts +6 -0
  192. package/src/shared/types/invite-payloads.ts +60 -0
  193. package/src/shared/types/navigation.ts +16 -0
  194. package/src/shared/types/running-build.ts +51 -0
  195. package/src/shared/types/serverMember.ts +17 -0
  196. package/src/shared/types/user.ts +55 -0
  197. package/src/shared/ui/base/Avatar.vue +262 -0
  198. package/src/shared/ui/base/Badge.vue +47 -0
  199. package/src/shared/ui/base/Button.vue +78 -0
  200. package/src/shared/ui/base/Divider.vue +42 -0
  201. package/src/shared/ui/base/Icon.vue +597 -0
  202. package/src/shared/ui/base/StatusIndicator.vue +44 -0
  203. package/src/shared/ui/base/index.ts +7 -0
  204. package/src/shared/ui/cards/InviteCard.vue +47 -0
  205. package/src/shared/ui/cards/index.ts +2 -0
  206. package/src/shared/ui/dialog/Dialog.vue +71 -0
  207. package/src/shared/ui/dialog/DialogContent.vue +31 -0
  208. package/src/shared/ui/dialog/DialogFooter.vue +14 -0
  209. package/src/shared/ui/dialog/DialogHeader.vue +41 -0
  210. package/src/shared/ui/dialog/index.ts +5 -0
  211. package/src/shared/ui/editors/AttachmentImagesEditor.vue +133 -0
  212. package/src/shared/ui/editors/ContentAttachmentsDisplay.vue +76 -0
  213. package/src/shared/ui/editors/MarkdownEditor.vue +956 -0
  214. package/src/shared/ui/editors/MarkdownRenderer.vue +299 -0
  215. package/src/shared/ui/editors/RichContentImageViewer.vue +85 -0
  216. package/src/shared/ui/editors/SocialPostMediaZone.vue +320 -0
  217. package/src/shared/ui/editors/index.ts +6 -0
  218. package/src/shared/ui/editors/markdown-editor-gallery.ts +234 -0
  219. package/src/shared/ui/editors/markdown-editor-image.ts +178 -0
  220. package/src/shared/ui/form/Checkbox.vue +38 -0
  221. package/src/shared/ui/form/FormField.vue +30 -0
  222. package/src/shared/ui/form/FormGrid.vue +38 -0
  223. package/src/shared/ui/form/ImageEditor.vue +598 -0
  224. package/src/shared/ui/form/Input.vue +72 -0
  225. package/src/shared/ui/form/Range.vue +65 -0
  226. package/src/shared/ui/form/Select.vue +76 -0
  227. package/src/shared/ui/form/Switch.vue +38 -0
  228. package/src/shared/ui/form/Textarea.vue +144 -0
  229. package/src/shared/ui/form/index.ts +9 -0
  230. package/src/shared/ui/index.ts +9 -0
  231. package/src/shared/ui/layout/BusyOverlay.vue +31 -0
  232. package/src/shared/ui/layout/Callout.vue +44 -0
  233. package/src/shared/ui/layout/Card.vue +38 -0
  234. package/src/shared/ui/layout/Container.vue +36 -0
  235. package/src/shared/ui/layout/EmptyState.vue +99 -0
  236. package/src/shared/ui/layout/EntityMediaRow.vue +54 -0
  237. package/src/shared/ui/layout/FilterResultsLayout.vue +22 -0
  238. package/src/shared/ui/layout/FloatingPanel.vue +37 -0
  239. package/src/shared/ui/layout/FullscreenDimmer.vue +11 -0
  240. package/src/shared/ui/layout/Grid.vue +40 -0
  241. package/src/shared/ui/layout/Inline.vue +59 -0
  242. package/src/shared/ui/layout/LoadingState.vue +39 -0
  243. package/src/shared/ui/layout/MediaBox.vue +47 -0
  244. package/src/shared/ui/layout/OverlayPanel.vue +28 -0
  245. package/src/shared/ui/layout/OverlayWaitPanel.vue +22 -0
  246. package/src/shared/ui/layout/PageSection.vue +43 -0
  247. package/src/shared/ui/layout/PageToolbar.vue +29 -0
  248. package/src/shared/ui/layout/Panel.vue +39 -0
  249. package/src/shared/ui/layout/ProgressBar.vue +49 -0
  250. package/src/shared/ui/layout/Section.vue +30 -0
  251. package/src/shared/ui/layout/SegmentedControl.vue +43 -0
  252. package/src/shared/ui/layout/SelectableCard.vue +46 -0
  253. package/src/shared/ui/layout/SelectableRow.vue +41 -0
  254. package/src/shared/ui/layout/Skeleton.vue +25 -0
  255. package/src/shared/ui/layout/SkeletonAvatar.vue +30 -0
  256. package/src/shared/ui/layout/SkeletonEntityCard.vue +20 -0
  257. package/src/shared/ui/layout/SkeletonFeedPost.vue +22 -0
  258. package/src/shared/ui/layout/SkeletonGrid.vue +18 -0
  259. package/src/shared/ui/layout/SkeletonListRow.vue +31 -0
  260. package/src/shared/ui/layout/SkeletonText.vue +25 -0
  261. package/src/shared/ui/layout/Stack.vue +42 -0
  262. package/src/shared/ui/layout/StateBlock.vue +44 -0
  263. package/src/shared/ui/layout/TwoPaneLayout.vue +35 -0
  264. package/src/shared/ui/layout/VirtualList.vue +160 -0
  265. package/src/shared/ui/layout/index.ts +35 -0
  266. package/src/shared/ui/layout/skeletonSurfaceStyles.ts +24 -0
  267. package/src/shared/ui/navigation/NavItem.vue +139 -0
  268. package/src/shared/ui/navigation/Tab.vue +61 -0
  269. package/src/shared/ui/navigation/Tabs.vue +37 -0
  270. package/src/shared/ui/navigation/index.ts +4 -0
  271. package/src/shared/ui/primitives/Action.vue +19 -0
  272. package/src/shared/ui/primitives/Block.vue +28 -0
  273. package/src/shared/ui/primitives/CanvasView.vue +19 -0
  274. package/src/shared/ui/primitives/Control.vue +24 -0
  275. package/src/shared/ui/primitives/ControlSelect.vue +19 -0
  276. package/src/shared/ui/primitives/ControlTextarea.vue +17 -0
  277. package/src/shared/ui/primitives/FieldLabel.vue +19 -0
  278. package/src/shared/ui/primitives/Form.vue +19 -0
  279. package/src/shared/ui/primitives/Heading.vue +29 -0
  280. package/src/shared/ui/primitives/Image.vue +17 -0
  281. package/src/shared/ui/primitives/LineBreak.vue +3 -0
  282. package/src/shared/ui/primitives/Link.vue +19 -0
  283. package/src/shared/ui/primitives/List.vue +28 -0
  284. package/src/shared/ui/primitives/ListItem.vue +19 -0
  285. package/src/shared/ui/primitives/OptionItem.vue +19 -0
  286. package/src/shared/ui/primitives/Text.vue +28 -0
  287. package/src/shared/ui/primitives/VideoView.vue +19 -0
  288. package/src/shared/ui/primitives/index.ts +19 -0
  289. package/src/shared/ui/primitives/resolveElement.ts +25 -0
  290. package/src/shared/ui/special/AngularAccent.vue +106 -0
  291. package/src/shared/ui/special/ExtensionRegistrySlotButton.vue +143 -0
  292. package/src/shared/ui/special/InfoRow.vue +39 -0
  293. package/src/shared/ui/special/LogViewer.vue +53 -0
  294. package/src/shared/ui/special/PageHeader.vue +23 -0
  295. package/src/shared/ui/special/RegistrySlotMissingCallout.vue +48 -0
  296. package/src/shared/ui/special/WelcomeCard.vue +32 -0
  297. package/src/shared/ui/special/index.ts +9 -0
  298. package/src/shared/utils/app-paths.ts +50 -0
  299. package/src/shared/utils/attachments.ts +16 -0
  300. package/src/shared/utils/autostart.ts +213 -0
  301. package/src/shared/utils/build-files.ts +439 -0
  302. package/src/shared/utils/build-manifest-init.ts +176 -0
  303. package/src/shared/utils/cloudinary.ts +67 -0
  304. package/src/shared/utils/cn.ts +7 -0
  305. package/src/shared/utils/download-stats-week.ts +165 -0
  306. package/src/shared/utils/entity-api-to-cache.ts +84 -0
  307. package/src/shared/utils/entity-build-from-api.ts +1 -0
  308. package/src/shared/utils/entity-display.ts +27 -0
  309. package/src/shared/utils/entity-map-from-api.ts +1 -0
  310. package/src/shared/utils/file-hash.ts +65 -0
  311. package/src/shared/utils/formatSize.ts +5 -0
  312. package/src/shared/utils/formatTime.ts +157 -0
  313. package/src/shared/utils/getAccountSkinRender.ts +32 -0
  314. package/src/shared/utils/index.ts +34 -0
  315. package/src/shared/utils/local-mods.ts +678 -0
  316. package/src/shared/utils/local-settings.ts +217 -0
  317. package/src/shared/utils/member-join-stats.ts +35 -0
  318. package/src/shared/utils/platform.ts +86 -0
  319. package/src/shared/utils/play-host-slug.ts +92 -0
  320. package/src/shared/utils/rich-content.ts +294 -0
  321. package/src/shared/utils/safeRequest.ts +23 -0
  322. package/src/shared/utils/semver.ts +81 -0
  323. package/src/shared/utils/serverPermissions.ts +155 -0
  324. package/src/shared/utils/skin-render-cache.ts +372 -0
  325. package/src/shared/utils/stripMarkdown.ts +45 -0
  326. package/src/shared/utils/transliterate.ts +74 -0
  327. package/src/shared/utils/updateAccountSkinRender.ts +64 -0
  328. package/src/shared/utils/updater.ts +218 -0
  329. package/src/shared/utils/uploadImage.ts +195 -0
  330. package/src/shared/utils/user-status.ts +9 -0
  331. package/src/tiptap/index.ts +7 -0
  332. package/tsconfig.json +13 -0
@@ -0,0 +1,37 @@
1
+ <template>
2
+ <div v-if="open" :class="classes">
3
+ <slot />
4
+ </div>
5
+ </template>
6
+
7
+ <script setup lang="ts">
8
+ import { computed } from 'vue';
9
+ import { cn } from '../../utils/cn';
10
+
11
+ const props = withDefaults(
12
+ defineProps<{
13
+ open?: boolean;
14
+ placement?: 'top' | 'bottom' | 'left' | 'right';
15
+ class?: string;
16
+ }>(),
17
+ {
18
+ open: true,
19
+ placement: 'bottom',
20
+ },
21
+ );
22
+
23
+ const placementClasses = {
24
+ top: 'bottom-full mb-2',
25
+ bottom: 'top-full mt-2',
26
+ left: 'right-full mr-2',
27
+ right: 'left-full ml-2',
28
+ };
29
+
30
+ const classes = computed(() =>
31
+ cn(
32
+ 'absolute z-50 min-w-48 border border-border bg-surface-solid p-2 shadow-xl',
33
+ placementClasses[props.placement],
34
+ props.class,
35
+ ),
36
+ );
37
+ </script>
@@ -0,0 +1,11 @@
1
+ <template>
2
+ <Block
3
+ class="fixed inset-0 bg-background/80 backdrop-blur-sm z-50 flex items-center justify-center"
4
+ >
5
+ <slot />
6
+ </Block>
7
+ </template>
8
+
9
+ <script setup lang="ts">
10
+ import Block from '../primitives/Block.vue';
11
+ </script>
@@ -0,0 +1,40 @@
1
+ <template>
2
+ <div :class="classes">
3
+ <slot />
4
+ </div>
5
+ </template>
6
+
7
+ <script setup lang="ts">
8
+ import { computed } from 'vue';
9
+ import { cn } from '../../utils/cn';
10
+
11
+ const props = withDefaults(
12
+ defineProps<{
13
+ cols?: 1 | 2 | 3 | 4;
14
+ gap?: 'sm' | 'md' | 'lg';
15
+ class?: string;
16
+ }>(),
17
+ {
18
+ cols: 2,
19
+ gap: 'md',
20
+ },
21
+ );
22
+
23
+ const colClasses = {
24
+ 1: 'grid-cols-1',
25
+ 2: 'grid-cols-1 md:grid-cols-2',
26
+ /** Три колонки с lg — xl слише поздно для типичных окон лаунчера (останавливалось на двух между md и xl). */
27
+ 3: 'grid-cols-1 md:grid-cols-2 lg:grid-cols-3',
28
+ 4: 'grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4',
29
+ };
30
+
31
+ const gapClasses = {
32
+ sm: 'gap-2',
33
+ md: 'gap-4',
34
+ lg: 'gap-6',
35
+ };
36
+
37
+ const classes = computed(() =>
38
+ cn('grid', colClasses[props.cols], gapClasses[props.gap], props.class),
39
+ );
40
+ </script>
@@ -0,0 +1,59 @@
1
+ <template>
2
+ <div :class="classes">
3
+ <slot />
4
+ </div>
5
+ </template>
6
+
7
+ <script setup lang="ts">
8
+ import { computed } from 'vue';
9
+ import { cn } from '../../utils/cn';
10
+
11
+ const props = withDefaults(
12
+ defineProps<{
13
+ gap?: 'none' | 'xs' | 'sm' | 'md' | 'lg';
14
+ align?: 'start' | 'center' | 'end' | 'stretch';
15
+ justify?: 'start' | 'center' | 'end' | 'between';
16
+ wrap?: boolean;
17
+ class?: string;
18
+ }>(),
19
+ {
20
+ gap: 'sm',
21
+ align: 'center',
22
+ justify: 'start',
23
+ wrap: false,
24
+ },
25
+ );
26
+
27
+ const gapClasses = {
28
+ none: 'gap-0',
29
+ xs: 'gap-1',
30
+ sm: 'gap-2',
31
+ md: 'gap-4',
32
+ lg: 'gap-6',
33
+ };
34
+
35
+ const alignClasses = {
36
+ start: 'items-start',
37
+ center: 'items-center',
38
+ end: 'items-end',
39
+ stretch: 'items-stretch',
40
+ };
41
+
42
+ const justifyClasses = {
43
+ start: 'justify-start',
44
+ center: 'justify-center',
45
+ end: 'justify-end',
46
+ between: 'justify-between',
47
+ };
48
+
49
+ const classes = computed(() =>
50
+ cn(
51
+ 'flex',
52
+ gapClasses[props.gap],
53
+ alignClasses[props.align],
54
+ justifyClasses[props.justify],
55
+ props.wrap && 'flex-wrap',
56
+ props.class,
57
+ ),
58
+ );
59
+ </script>
@@ -0,0 +1,39 @@
1
+ <template>
2
+ <Block :class="wrapperClass">
3
+ <Icon
4
+ :name="icon"
5
+ size="lg"
6
+ class="mx-auto mb-2 animate-spin text-accent-secondary"
7
+ />
8
+ <Text class="text-muted-foreground">{{ message }}</Text>
9
+ </Block>
10
+ </template>
11
+
12
+ <script setup lang="ts">
13
+ import { computed } from 'vue';
14
+ import { cn } from '../../utils/cn';
15
+ import { Icon } from '../base';
16
+ import Block from '../primitives/Block.vue';
17
+ import Text from '../primitives/Text.vue';
18
+
19
+ const props = withDefaults(
20
+ defineProps<{
21
+ message: string;
22
+ icon?: string;
23
+ density?: 'comfortable' | 'compact';
24
+ containerClass?: string;
25
+ }>(),
26
+ {
27
+ icon: 'refresh-cw',
28
+ density: 'comfortable',
29
+ },
30
+ );
31
+
32
+ const wrapperClass = computed(() =>
33
+ cn(
34
+ 'flex flex-col items-center justify-center text-center',
35
+ props.density === 'comfortable' ? 'py-12' : 'py-8',
36
+ props.containerClass,
37
+ ),
38
+ );
39
+ </script>
@@ -0,0 +1,47 @@
1
+ <template>
2
+ <div :class="classes">
3
+ <img v-if="src" :src="src" :alt="alt" class="h-full w-full object-cover" />
4
+ <slot v-else>
5
+ <Icon v-if="icon" :name="icon" :size="iconSize" class="text-accent-secondary/55" />
6
+ </slot>
7
+ </div>
8
+ </template>
9
+
10
+ <script setup lang="ts">
11
+ import { computed } from 'vue';
12
+ import { Icon } from '../base';
13
+ import { cn } from '../../utils/cn';
14
+
15
+ const props = withDefaults(
16
+ defineProps<{
17
+ src?: string | null;
18
+ alt?: string;
19
+ icon?: string;
20
+ size?: 'sm' | 'md' | 'lg' | 'wide' | 'fill';
21
+ iconSize?: 'sm' | 'md' | 'lg' | 'xl' | 'xxl';
22
+ class?: string;
23
+ }>(),
24
+ {
25
+ alt: '',
26
+ icon: 'image',
27
+ size: 'md',
28
+ iconSize: 'md',
29
+ },
30
+ );
31
+
32
+ const sizeClasses = {
33
+ sm: 'h-8 w-8',
34
+ md: 'h-12 w-12',
35
+ lg: 'h-24 w-24',
36
+ wide: 'aspect-video w-full',
37
+ fill: 'h-full w-full',
38
+ };
39
+
40
+ const classes = computed(() =>
41
+ cn(
42
+ 'flex shrink-0 items-center justify-center overflow-hidden bg-gradient-to-br from-primary to-accent-secondary',
43
+ sizeClasses[props.size],
44
+ props.class,
45
+ ),
46
+ );
47
+ </script>
@@ -0,0 +1,28 @@
1
+ <template>
2
+ <div v-if="open" :class="classes" @click.self="$emit('close')">
3
+ <slot />
4
+ </div>
5
+ </template>
6
+
7
+ <script setup lang="ts">
8
+ import { computed } from 'vue';
9
+ import { cn } from '../../utils/cn';
10
+
11
+ const props = withDefaults(
12
+ defineProps<{
13
+ open?: boolean;
14
+ class?: string;
15
+ }>(),
16
+ {
17
+ open: true,
18
+ },
19
+ );
20
+
21
+ defineEmits<{
22
+ close: [];
23
+ }>();
24
+
25
+ const classes = computed(() =>
26
+ cn('fixed inset-0 z-40 bg-foreground/55 p-4', props.class),
27
+ );
28
+ </script>
@@ -0,0 +1,22 @@
1
+ <template>
2
+ <Block class="text-center max-w-md mx-4">
3
+ <Icon
4
+ name="refresh-cw"
5
+ size="xl"
6
+ class="mx-auto mb-4 animate-spin text-accent-secondary"
7
+ />
8
+ <Text class="text-foreground font-medium mb-1">{{ title }}</Text>
9
+ <Text v-if="subtitle" class="text-muted-foreground text-sm">{{ subtitle }}</Text>
10
+ </Block>
11
+ </template>
12
+
13
+ <script setup lang="ts">
14
+ import { Icon } from '../base';
15
+ import Block from '../primitives/Block.vue';
16
+ import Text from '../primitives/Text.vue';
17
+
18
+ defineProps<{
19
+ title: string;
20
+ subtitle?: string;
21
+ }>();
22
+ </script>
@@ -0,0 +1,43 @@
1
+ <template>
2
+ <section :class="classes">
3
+ <div v-if="title || description || $slots.actions" class="flex items-start justify-between gap-4">
4
+ <div>
5
+ <h2 v-if="title" class="text-base font-semibold text-foreground">
6
+ {{ title }}
7
+ </h2>
8
+ <p v-if="description" class="mt-1 text-sm text-muted-foreground">
9
+ {{ description }}
10
+ </p>
11
+ </div>
12
+ <div v-if="$slots.actions" class="flex items-center gap-2">
13
+ <slot name="actions" />
14
+ </div>
15
+ </div>
16
+ <slot />
17
+ </section>
18
+ </template>
19
+
20
+ <script setup lang="ts">
21
+ import { computed } from 'vue';
22
+ import { cn } from '../../utils/cn';
23
+
24
+ const props = withDefaults(
25
+ defineProps<{
26
+ title?: string;
27
+ description?: string;
28
+ spacing?: 'sm' | 'md' | 'lg';
29
+ class?: string;
30
+ }>(),
31
+ {
32
+ spacing: 'md',
33
+ },
34
+ );
35
+
36
+ const spacingClasses = {
37
+ sm: 'space-y-3',
38
+ md: 'space-y-4',
39
+ lg: 'space-y-6',
40
+ };
41
+
42
+ const classes = computed(() => cn(spacingClasses[props.spacing], props.class));
43
+ </script>
@@ -0,0 +1,29 @@
1
+ <template>
2
+ <Block class="flex items-center justify-between">
3
+ <Block>
4
+ <Heading :level="level" class="text-2xl font-bold text-foreground mb-1">
5
+ {{ title }}
6
+ </Heading>
7
+ <Text v-if="description" class="text-muted-foreground text-sm">{{ description }}</Text>
8
+ <slot name="below-description" />
9
+ </Block>
10
+ <slot name="actions" />
11
+ </Block>
12
+ </template>
13
+
14
+ <script setup lang="ts">
15
+ import Block from '../primitives/Block.vue';
16
+ import Heading from '../primitives/Heading.vue';
17
+ import Text from '../primitives/Text.vue';
18
+
19
+ withDefaults(
20
+ defineProps<{
21
+ title: string;
22
+ description?: string;
23
+ level?: 1 | 2 | 3 | 4 | 5 | 6;
24
+ }>(),
25
+ {
26
+ level: 2,
27
+ },
28
+ );
29
+ </script>
@@ -0,0 +1,39 @@
1
+ <template>
2
+ <div :class="panelClasses" :style="angularStyle">
3
+ <slot />
4
+ </div>
5
+ </template>
6
+
7
+ <script setup lang="ts">
8
+ import { computed } from 'vue';
9
+ import { cn } from '../../utils/cn';
10
+
11
+ interface Props {
12
+ variant?: 'default' | 'accent';
13
+ angular?: boolean;
14
+ class?: string;
15
+ }
16
+
17
+ const props = withDefaults(defineProps<Props>(), {
18
+ variant: 'default',
19
+ angular: true,
20
+ });
21
+
22
+ const panelClasses = computed(() => {
23
+ const baseClasses =
24
+ 'h-full overflow-y-auto border-l border-primary/14 bg-card/98 p-3.5 shadow-[inset_1px_0_0_color-mix(in_srgb,var(--primary)_22%,transparent)]';
25
+
26
+ const variantClasses = {
27
+ default: '',
28
+ accent: 'bg-gradient-to-b from-primary/6 to-transparent bg-card/95',
29
+ };
30
+
31
+ return cn(baseClasses, variantClasses[props.variant], props.class);
32
+ });
33
+
34
+ const angularStyle = computed(() => {
35
+ // Убрали clip-path для панелей
36
+ return {};
37
+ });
38
+ </script>
39
+
@@ -0,0 +1,49 @@
1
+ <template>
2
+ <div :class="classes">
3
+ <div
4
+ v-if="label || showValue"
5
+ class="flex items-center justify-between text-xs text-muted-foreground"
6
+ >
7
+ <span>{{ label }}</span>
8
+ <span v-if="showValue">{{ normalizedValue }}%</span>
9
+ </div>
10
+ <div class="h-2 overflow-hidden rounded bg-muted">
11
+ <div :class="barClasses" :style="{ width: `${normalizedValue}%` }" />
12
+ </div>
13
+ </div>
14
+ </template>
15
+
16
+ <script setup lang="ts">
17
+ import { computed } from 'vue';
18
+ import { cn } from '../../utils/cn';
19
+
20
+ const props = withDefaults(
21
+ defineProps<{
22
+ value: number;
23
+ label?: string;
24
+ showValue?: boolean;
25
+ tone?: 'primary' | 'success' | 'warning' | 'danger';
26
+ class?: string;
27
+ }>(),
28
+ {
29
+ showValue: false,
30
+ tone: 'primary',
31
+ },
32
+ );
33
+
34
+ const normalizedValue = computed(() =>
35
+ Math.max(0, Math.min(100, Math.round(props.value))),
36
+ );
37
+
38
+ const toneClasses = {
39
+ primary: 'rnt-fill-primary',
40
+ success: 'rnt-fill-success',
41
+ warning: 'rnt-fill-warning',
42
+ danger: 'rnt-fill-danger',
43
+ };
44
+
45
+ const classes = computed(() => cn('space-y-2', props.class));
46
+ const barClasses = computed(() =>
47
+ cn('h-full rounded transition-all duration-300', toneClasses[props.tone]),
48
+ );
49
+ </script>
@@ -0,0 +1,30 @@
1
+ <template>
2
+ <section :class="sectionClasses">
3
+ <slot />
4
+ </section>
5
+ </template>
6
+
7
+ <script setup lang="ts">
8
+ import { computed } from 'vue';
9
+ import { cn } from '../../utils/cn';
10
+
11
+ interface Props {
12
+ spacing?: 'none' | 'sm' | 'md' | 'lg';
13
+ class?: string;
14
+ }
15
+
16
+ const props = withDefaults(defineProps<Props>(), {
17
+ spacing: 'md',
18
+ });
19
+
20
+ const stackModifier = {
21
+ none: 'rnt-section-stack--none',
22
+ sm: 'rnt-section-stack--sm',
23
+ md: 'rnt-section-stack--md',
24
+ lg: 'rnt-section-stack--lg',
25
+ } as const satisfies Record<NonNullable<Props['spacing']>, string>;
26
+
27
+ const sectionClasses = computed(() => {
28
+ return cn('rnt-section-stack', stackModifier[props.spacing], props.class);
29
+ });
30
+ </script>
@@ -0,0 +1,43 @@
1
+ <template>
2
+ <Block
3
+ :class="
4
+ cn(
5
+ 'flex items-center gap-2 bg-muted/70 border border-border rounded p-1 w-fit',
6
+ containerClass,
7
+ )
8
+ "
9
+ >
10
+ <Button
11
+ v-for="opt in options"
12
+ :key="opt.value"
13
+ :variant="modelValue === opt.value ? 'primary' : 'secondary'"
14
+ size="sm"
15
+ class="!px-4"
16
+ @click="emit('update:modelValue', opt.value)"
17
+ >
18
+ {{ opt.label }}
19
+ </Button>
20
+ </Block>
21
+ </template>
22
+
23
+ <script setup lang="ts">
24
+ import { cn } from '../../utils/cn';
25
+ import { Button } from '../base';
26
+ import Block from '../primitives/Block.vue';
27
+
28
+ export interface SegmentedOption {
29
+ value: string;
30
+ label: string;
31
+ }
32
+
33
+ defineProps<{
34
+ modelValue: string;
35
+ options: SegmentedOption[];
36
+ /** Tailwind / cn классы для обёртки (избегаем имени `class`) */
37
+ containerClass?: string;
38
+ }>();
39
+
40
+ const emit = defineEmits<{
41
+ 'update:modelValue': [value: string];
42
+ }>();
43
+ </script>
@@ -0,0 +1,46 @@
1
+ <template>
2
+ <Card
3
+ :variant="disabled ? 'default' : 'hover'"
4
+ :class="classes"
5
+ @click="handleClick"
6
+ >
7
+ <slot />
8
+ </Card>
9
+ </template>
10
+
11
+ <script setup lang="ts">
12
+ import { computed } from 'vue';
13
+ import Card from './Card.vue';
14
+ import { cn } from '../../utils/cn';
15
+
16
+ const props = withDefaults(
17
+ defineProps<{
18
+ selected?: boolean;
19
+ disabled?: boolean;
20
+ class?: string;
21
+ }>(),
22
+ {
23
+ selected: false,
24
+ disabled: false,
25
+ },
26
+ );
27
+
28
+ const emit = defineEmits<{
29
+ select: [];
30
+ }>();
31
+
32
+ const classes = computed(() =>
33
+ cn(
34
+ '!border transition-all duration-200',
35
+ props.selected
36
+ ? '!border-primary bg-primary/[0.14] ring-2 ring-primary/35 ring-offset-2 ring-offset-background'
37
+ : '!border-primary/14',
38
+ props.disabled && 'cursor-not-allowed opacity-50',
39
+ props.class,
40
+ ),
41
+ );
42
+
43
+ const handleClick = () => {
44
+ if (!props.disabled) emit('select');
45
+ };
46
+ </script>
@@ -0,0 +1,41 @@
1
+ <template>
2
+ <div :class="classes" @click="handleClick">
3
+ <slot />
4
+ </div>
5
+ </template>
6
+
7
+ <script setup lang="ts">
8
+ import { computed } from 'vue';
9
+ import { cn } from '../../utils/cn';
10
+
11
+ const props = withDefaults(
12
+ defineProps<{
13
+ selected?: boolean;
14
+ disabled?: boolean;
15
+ class?: string;
16
+ }>(),
17
+ {
18
+ selected: false,
19
+ disabled: false,
20
+ },
21
+ );
22
+
23
+ const emit = defineEmits<{
24
+ select: [];
25
+ }>();
26
+
27
+ const classes = computed(() =>
28
+ cn(
29
+ 'border p-3 transition-colors',
30
+ props.selected
31
+ ? 'border-primary bg-primary/10'
32
+ : 'border-border bg-surface-overlay hover:border-accent-secondary/50',
33
+ props.disabled ? 'cursor-not-allowed opacity-50' : 'cursor-pointer',
34
+ props.class,
35
+ ),
36
+ );
37
+
38
+ const handleClick = () => {
39
+ if (!props.disabled) emit('select');
40
+ };
41
+ </script>
@@ -0,0 +1,25 @@
1
+ <template>
2
+ <div
3
+ aria-hidden="true"
4
+ :class="cn('animate-pulse rounded-md', props.class)"
5
+ :style="mergedStyle"
6
+ />
7
+ </template>
8
+
9
+ <script setup lang="ts">
10
+ import { computed } from 'vue';
11
+ import { cn } from '../../utils/cn';
12
+ import { skeletonBarSurfaceStyle } from './skeletonSurfaceStyles';
13
+
14
+ const props = defineProps<{
15
+ class?: string;
16
+ width?: string;
17
+ height?: string;
18
+ }>();
19
+
20
+ const mergedStyle = computed(() => ({
21
+ ...skeletonBarSurfaceStyle(),
22
+ ...(props.width ? { width: props.width } : {}),
23
+ ...(props.height ? { height: props.height } : {}),
24
+ }));
25
+ </script>
@@ -0,0 +1,30 @@
1
+ <template>
2
+ <Skeleton
3
+ :class="cn('shrink-0 rounded-full', sizeClass)"
4
+ aria-hidden="true"
5
+ />
6
+ </template>
7
+
8
+ <script setup lang="ts">
9
+ import { computed } from 'vue';
10
+ import { cn } from '../../utils/cn';
11
+ import Skeleton from './Skeleton.vue';
12
+
13
+ const props = withDefaults(
14
+ defineProps<{
15
+ size?: 'sm' | 'md' | 'lg';
16
+ }>(),
17
+ { size: 'md' },
18
+ );
19
+
20
+ const sizeClass = computed(() => {
21
+ switch (props.size) {
22
+ case 'sm':
23
+ return 'h-8 w-8';
24
+ case 'lg':
25
+ return 'h-12 w-12';
26
+ default:
27
+ return 'h-10 w-10';
28
+ }
29
+ });
30
+ </script>