@kortix/ui 0.16.0 → 0.16.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (285) hide show
  1. package/dist/_vendor/kortix-shared.js +157 -51
  2. package/dist/_vendor/shared/index.d.ts +1 -0
  3. package/dist/_vendor/shared/space-icon.d.ts +30 -0
  4. package/dist/_vendor/shared/space-slug.d.ts +12 -0
  5. package/dist/access/access/access-dialog.js +2 -2
  6. package/dist/access/share-dialog.d.ts +77 -0
  7. package/dist/access/share-dialog.js +160 -0
  8. package/dist/access/sharing-picker.d.ts +8 -1
  9. package/dist/access/sharing-picker.js +2 -2
  10. package/dist/changes/change-list.js +3 -3
  11. package/dist/customize/connectors/catalog/catalog-paging.d.ts +1 -1
  12. package/dist/customize/connectors/catalog/catalog-paging.js +1 -1
  13. package/dist/customize/providers/provider-sheet.js +17 -7
  14. package/dist/customize/sections/component/manifest-copy-block.js +1 -1
  15. package/dist/customize/sections/component/section-wrapper.d.ts +1 -8
  16. package/dist/customize/sections/component/section-wrapper.js +3 -3
  17. package/dist/customize/sections/llm-provider/model-capability-icons.js +1 -1
  18. package/dist/customize/sections/view/gateway/generation-controls.js +1 -1
  19. package/dist/customize/sections/view/git-view.js +1 -1
  20. package/dist/customize/settings/settings-tabs.js +0 -5
  21. package/dist/customize/settings/tabs/general-tab.js +2 -2
  22. package/dist/customize/shared/capability-page-shell.d.ts +2 -2
  23. package/dist/customize/shared/capability-page-shell.js +7 -5
  24. package/dist/customize/shared/capability-scroll-root.js +1 -2
  25. package/dist/customize/shared/catalog/catalog-card.js +1 -1
  26. package/dist/files/project/components/change-requests-panel.js +2 -2
  27. package/dist/files/project/components/checkpoint-detail-dialog.js +4 -4
  28. package/dist/files/project/components/checkpoints-panel.js +2 -2
  29. package/dist/files/project/components/drive-explorer.js +2 -2
  30. package/dist/files/project/components/file-breadcrumbs.js +1 -1
  31. package/dist/files/project/components/file-history-popover.js +2 -2
  32. package/dist/files/project/components/file-thumbnail.js +1 -1
  33. package/dist/files/project/components/open-change-request-dialog.js +1 -1
  34. package/dist/files/renderers/mermaid/mermaid-diagram.js +2 -2
  35. package/dist/files/renderers/show-content-renderer.js +6 -6
  36. package/dist/files/renderers/sqlite-renderer.js +8 -8
  37. package/dist/files/renderers/zip/zip-renderer.js +2 -2
  38. package/dist/files/viewer/file-content-renderer.js +5 -5
  39. package/dist/files/viewer/json-tree-view.js +3 -3
  40. package/dist/i18n/en.d.ts +133 -8
  41. package/dist/i18n/en.js +170 -45
  42. package/dist/i18n/ui-catalog/remaining-ui-translation-keys.generated.js +0 -3
  43. package/dist/internal/billing/use-cost-explorer.d.ts +9 -2
  44. package/dist/internal/billing/use-cost-explorer.js +22 -0
  45. package/dist/internal/billing/use-session-costs.d.ts +7 -2
  46. package/dist/internal/billing/use-session-costs.js +6 -0
  47. package/dist/internal/chrome/use-chrome-offered.d.ts +3 -3
  48. package/dist/internal/chrome/use-chrome-offered.js +3 -3
  49. package/dist/internal/components/nav-rail.d.ts +1 -20
  50. package/dist/internal/components/nav-rail.js +1 -15
  51. package/dist/internal/layout/project-page-header.d.ts +13 -9
  52. package/dist/internal/layout/project-page-header.js +14 -10
  53. package/dist/internal/lib/browser-noise/evidence.d.ts +2 -0
  54. package/dist/internal/lib/browser-noise/rules/injected-scripts.js +16 -1
  55. package/dist/internal/lib/error-handler.js +0 -9
  56. package/dist/internal/lib/interface-theme-defaults.js +2 -2
  57. package/dist/internal/lib/project-actions.d.ts +4 -5
  58. package/dist/internal/lib/project-actions.js +3 -5
  59. package/dist/internal/lib/project-preamble.d.ts +42 -4
  60. package/dist/internal/lib/project-preamble.js +49 -5
  61. package/dist/internal/lib/web-notifications.js +17 -29
  62. package/dist/internal/outcomes/outcome-vocabulary.js +1 -1
  63. package/dist/internal/stores/session-filter-store.d.ts +1 -1
  64. package/dist/internal/stores/user-preferences-store.d.ts +2 -2
  65. package/dist/internal/stores/workspace-settings-rail-store.d.ts +0 -8
  66. package/dist/internal/stores/workspace-settings-rail-store.js +0 -2
  67. package/dist/lib/routes.d.ts +7 -0
  68. package/dist/lib/routes.js +6 -1
  69. package/dist/markdown/doc-editor/doc-extensions.js +2 -0
  70. package/dist/markdown/doc-editor/doc-paste.d.ts +13 -0
  71. package/dist/markdown/doc-editor/doc-paste.js +67 -0
  72. package/dist/markdown/markdown-frontmatter.js +3 -3
  73. package/dist/markdown/markdown-policy.d.ts +1 -1
  74. package/dist/markdown/ordered-list.js +1 -1
  75. package/dist/primitives/context-menu.d.ts +1 -0
  76. package/dist/primitives/definition-list.js +1 -1
  77. package/dist/primitives/dropdown-menu.d.ts +1 -0
  78. package/dist/primitives/emoji-picker.js +1 -1
  79. package/dist/primitives/expandable-search.d.ts +57 -0
  80. package/dist/primitives/expandable-search.js +58 -0
  81. package/dist/primitives/favicon-avatar.js +1 -1
  82. package/dist/primitives/file-tree.d.ts +1 -1
  83. package/dist/primitives/file-tree.js +1 -1
  84. package/dist/primitives/glyph-picker.js +2 -2
  85. package/dist/primitives/input-group.js +1 -1
  86. package/dist/primitives/menu-base.d.ts +10 -0
  87. package/dist/primitives/menu-base.js +7 -2
  88. package/dist/primitives/phone-input.js +1 -1
  89. package/dist/primitives/profile-hover-card.d.ts +28 -0
  90. package/dist/primitives/profile-hover-card.js +22 -0
  91. package/dist/primitives/settings-section-header.d.ts +5 -5
  92. package/dist/primitives/settings-section-header.js +5 -5
  93. package/dist/primitives/sort-menu.d.ts +23 -0
  94. package/dist/primitives/sort-menu.js +54 -0
  95. package/dist/primitives/tabs.js +1 -1
  96. package/dist/primitives/toast-clearance.d.ts +12 -28
  97. package/dist/primitives/toast-clearance.js +23 -45
  98. package/dist/primitives/user-avatar.js +2 -3
  99. package/dist/session/agents/subagent-dialog-content.js +28 -70
  100. package/dist/session/composer/ComposerCard.d.ts +4 -1
  101. package/dist/session/composer/ComposerCard.js +51 -7
  102. package/dist/session/composer/composer-chat-input.js +3 -1
  103. package/dist/session/composer/composer-toolbar.d.ts +3 -1
  104. package/dist/session/composer/composer-toolbar.js +6 -2
  105. package/dist/session/composer/composer-underbar.d.ts +3 -1
  106. package/dist/session/composer/composer-underbar.js +2 -2
  107. package/dist/session/composer/composer.d.ts +12 -0
  108. package/dist/session/composer/composer.js +112 -6
  109. package/dist/session/composer/draft/composer-draft.d.ts +1 -0
  110. package/dist/session/composer/draft/composer-draft.js +10 -2
  111. package/dist/session/composer/draft/draft-uploads.js +13 -2
  112. package/dist/session/composer/draft/use-composer-draft.d.ts +2 -0
  113. package/dist/session/composer/draft/use-composer-draft.js +41 -6
  114. package/dist/session/composer/drive-mentions.d.ts +34 -0
  115. package/dist/session/composer/drive-mentions.js +98 -0
  116. package/dist/session/composer/editor/composer-editor.d.ts +3 -0
  117. package/dist/session/composer/editor/composer-editor.js +3 -1
  118. package/dist/session/composer/editor/serialize.js +3 -4
  119. package/dist/session/composer/menus/mention-controller.d.ts +3 -0
  120. package/dist/session/composer/menus/mention-controller.js +5 -0
  121. package/dist/session/composer/menus/mention-menu.d.ts +20 -3
  122. package/dist/session/composer/menus/mention-menu.js +33 -6
  123. package/dist/session/composer/menus/menu-items.d.ts +16 -1
  124. package/dist/session/composer/menus/menu-items.js +21 -1
  125. package/dist/session/composer/submit-latch.d.ts +3 -1
  126. package/dist/session/composer/submit-latch.js +5 -1
  127. package/dist/session/composer/types.d.ts +9 -2
  128. package/dist/session/header/session-changes-indicator.js +1 -1
  129. package/dist/session/header/session-site-header.js +2 -2
  130. package/dist/session/media/sandbox-url-detector.js +3 -3
  131. package/dist/session/models/model-connection-gate.d.ts +5 -0
  132. package/dist/session/models/model-connection-gate.js +12 -3
  133. package/dist/session/models/model-connection-layout.d.ts +7 -0
  134. package/dist/session/models/model-connection-layout.js +7 -0
  135. package/dist/session/models/provider-failure-recovery.js +1 -1
  136. package/dist/session/models/subscription-offer.d.ts +6 -5
  137. package/dist/session/models/subscription-offer.js +6 -6
  138. package/dist/session/panel/advanced/advanced-panel.js +1 -1
  139. package/dist/session/panel/session-detail-panel.js +1 -1
  140. package/dist/session/panel/session-diff-viewer.js +1 -1
  141. package/dist/session/panel/session-files-explorer.js +1 -1
  142. package/dist/session/panel/session-files-panel.js +3 -3
  143. package/dist/session/panel/shared/action-navigator.js +1 -1
  144. package/dist/session/status/provisioning-failure.d.ts +4 -4
  145. package/dist/session/status/provisioning-failure.js +4 -4
  146. package/dist/session/status/session-busy-indicator.js +1 -1
  147. package/dist/session/status/session-error-banner.js +6 -1
  148. package/dist/session/thread/mention-chip.d.ts +1 -1
  149. package/dist/session/thread/mention-segments.d.ts +4 -2
  150. package/dist/session/thread/mention-segments.js +28 -1
  151. package/dist/session/thread/message-parsing.d.ts +11 -0
  152. package/dist/session/thread/message-parsing.js +22 -3
  153. package/dist/session/thread/optimistic-turn.d.ts +4 -2
  154. package/dist/session/thread/optimistic-turn.js +13 -11
  155. package/dist/session/thread/session-chat.js +6 -1
  156. package/dist/session/thread/session-context-message-explorer.js +1 -1
  157. package/dist/session/thread/session-older-autoload.d.ts +2 -3
  158. package/dist/session/thread/session-older-autoload.js +2 -3
  159. package/dist/session/thread/transcript.js +8 -10
  160. package/dist/session/tool/shared/error-and-connector.js +1 -1
  161. package/dist/session/tool/shared/file-list.js +2 -2
  162. package/dist/session/tool/shared/infrastructure-parts.js +1 -1
  163. package/dist/session/tool/shared/infrastructure-preview.js +1 -1
  164. package/dist/session/tool/shared/infrastructure-row-header.js +3 -3
  165. package/dist/session/tool/shared/infrastructure-rows.js +2 -2
  166. package/dist/session/tool/shared/output-block.js +4 -4
  167. package/dist/session/tool/shared/session-helpers.js +3 -3
  168. package/dist/session/tool/shared/structured-output.js +3 -3
  169. package/dist/session/tool/shared/todo-helpers.js +1 -1
  170. package/dist/session/tool/tool-error.js +2 -2
  171. package/dist/session/tool/tools/agent-spawn-tool.js +3 -3
  172. package/dist/session/tool/tools/agent-status-tool.js +1 -1
  173. package/dist/session/tool/tools/apply-patch-tool.js +1 -1
  174. package/dist/session/tool/tools/connector-get-tool.js +1 -1
  175. package/dist/session/tool/tools/connector-list-tool.js +1 -1
  176. package/dist/session/tool/tools/connector-tools.js +1 -1
  177. package/dist/session/tool/tools/edit-tool.js +1 -1
  178. package/dist/session/tool/tools/get-mem-tool.js +1 -1
  179. package/dist/session/tool/tools/glob-tool.js +1 -1
  180. package/dist/session/tool/tools/image-search-tool.js +1 -1
  181. package/dist/session/tool/tools/memory-search-tool.js +1 -1
  182. package/dist/session/tool/tools/memory-tool.js +4 -4
  183. package/dist/session/tool/tools/presentation-gen-tool.js +2 -2
  184. package/dist/session/tool/tools/project-delete-tool.js +1 -1
  185. package/dist/session/tool/tools/project-list-tool.js +1 -1
  186. package/dist/session/tool/tools/pty-read-tool.js +1 -1
  187. package/dist/session/tool/tools/pty-spawn-tool.js +1 -1
  188. package/dist/session/tool/tools/pty-write-tool.js +1 -1
  189. package/dist/session/tool/tools/read-tool.js +1 -1
  190. package/dist/session/tool/tools/removed-connector-tool.js +1 -1
  191. package/dist/session/tool/tools/scrape-webpage-tool.js +1 -1
  192. package/dist/session/tool/tools/session-get-tool.js +3 -3
  193. package/dist/session/tool/tools/session-list-background-tool.js +1 -1
  194. package/dist/session/tool/tools/session-read-tool.js +1 -1
  195. package/dist/session/tool/tools/session-search-tool.js +1 -1
  196. package/dist/session/tool/tools/session-spawn-tool.js +1 -1
  197. package/dist/session/tool/tools/skill-tool.js +1 -1
  198. package/dist/session/tool/tools/todo-write-tool.js +1 -1
  199. package/dist/session/tool/tools/web-fetch-tool.js +1 -1
  200. package/dist/session/tool/tools/write-tool.js +1 -1
  201. package/dist/session/turn/activity-file-chips.js +7 -3
  202. package/dist/session/turn/activity-step.js +1 -1
  203. package/dist/session/turn/burst-summary-trigger.js +3 -3
  204. package/dist/session/turn/chain-step-trigger.js +1 -1
  205. package/dist/session/turn/plan-card.js +1 -1
  206. package/dist/session/turn/thought-chain-step.js +1 -1
  207. package/dist/session/turn/turn-work-accordion.js +1 -1
  208. package/dist/session/turn/user-message.js +13 -6
  209. package/dist/session/voice/use-call-card-position.d.ts +30 -0
  210. package/dist/session/voice/use-call-card-position.js +126 -0
  211. package/dist/session/voice/voice-call-card.js +10 -3
  212. package/dist/styles/theme.css +12 -0
  213. package/dist/styles/tokens.css +12 -6
  214. package/dist/styles.css +1 -1
  215. package/dist/terminal/session-terminal-panel.js +1 -1
  216. package/dist/test-utils/intl.d.ts +133 -8
  217. package/dist/workspace/admin/project-admin-dashboard.js +7 -24
  218. package/dist/workspace/calendar/calendar-page.js +1 -1
  219. package/dist/workspace/home/first-chat.d.ts +4 -3
  220. package/dist/workspace/home/first-chat.js +6 -6
  221. package/dist/workspace/home/welcome-body.js +2 -2
  222. package/dist/workspace/index.d.ts +1 -1
  223. package/dist/workspace/index.js +1 -1
  224. package/dist/workspace/layout/project-home.js +11 -4
  225. package/dist/workspace/layout/use-project-home-send.d.ts +3 -1
  226. package/dist/workspace/layout/use-project-home-send.js +6 -2
  227. package/dist/workspace/memory/company-memory-page.js +2 -4
  228. package/dist/workspace/new/github-source.js +0 -1
  229. package/dist/workspace/new/new-workspace-form.d.ts +0 -1
  230. package/dist/workspace/new/new-workspace-form.js +0 -3
  231. package/dist/workspace/new/use-create-workspace.d.ts +1 -1
  232. package/dist/workspace/new/use-create-workspace.js +1 -2
  233. package/dist/workspace/session-spaces/space-detail-page.d.ts +35 -0
  234. package/dist/workspace/session-spaces/space-detail-page.js +307 -0
  235. package/dist/workspace/session-spaces/space-form-modal.d.ts +16 -0
  236. package/dist/workspace/session-spaces/space-form-modal.js +92 -0
  237. package/dist/workspace/session-spaces/space-icon.d.ts +36 -0
  238. package/dist/workspace/session-spaces/space-icon.js +52 -0
  239. package/dist/workspace/session-spaces/space-people.d.ts +51 -0
  240. package/dist/workspace/session-spaces/space-people.js +91 -0
  241. package/dist/workspace/session-spaces/space-picker.d.ts +11 -0
  242. package/dist/workspace/session-spaces/space-picker.js +42 -0
  243. package/dist/workspace/session-spaces/space-share-modal.d.ts +14 -0
  244. package/dist/workspace/session-spaces/space-share-modal.js +93 -0
  245. package/dist/workspace/session-spaces/spaces-page.d.ts +8 -0
  246. package/dist/workspace/session-spaces/spaces-page.js +125 -0
  247. package/dist/workspace/sessions/session-owner-filters.d.ts +2 -0
  248. package/dist/workspace/sessions/session-owner-filters.js +2 -0
  249. package/dist/workspace/setup/setup-banner.d.ts +4 -0
  250. package/dist/workspace/setup/setup-banner.js +57 -0
  251. package/dist/workspace/setup/setup-steps.d.ts +14 -0
  252. package/dist/workspace/setup/setup-steps.js +15 -0
  253. package/dist/workspace/setup/use-setup-steps.d.ts +18 -0
  254. package/dist/workspace/setup/use-setup-steps.js +57 -0
  255. package/dist/workspace/setup/workspace-setup-page.js +8 -41
  256. package/dist/workspace/sidebar/footer/project-artifacts-nav.js +1 -1
  257. package/dist/workspace/sidebar/footer/project-promo-cards.d.ts +7 -2
  258. package/dist/workspace/sidebar/footer/project-promo-cards.js +4 -3
  259. package/dist/workspace/sidebar/footer/project-sandbox-alert.js +1 -1
  260. package/dist/workspace/sidebar/footer/promo-card.d.ts +10 -1
  261. package/dist/workspace/sidebar/footer/promo-card.js +31 -2
  262. package/dist/workspace/sidebar/footer/sandbox-health.js +1 -1
  263. package/dist/workspace/sidebar/modal/session-people-picker.d.ts +13 -0
  264. package/dist/workspace/sidebar/modal/session-people-picker.js +72 -0
  265. package/dist/workspace/sidebar/modal/share-session-modal.js +2 -1
  266. package/dist/workspace/sidebar/project-nav-items.d.ts +1 -3
  267. package/dist/workspace/sidebar/project-nav-items.js +3 -8
  268. package/dist/workspace/sidebar/project-session-list.js +19 -12
  269. package/dist/workspace/sidebar/project-sidebar.js +13 -13
  270. package/dist/workspace/sidebar/project-spaces-nav.js +1 -2
  271. package/dist/workspace/sidebar/session-filter-menu.js +19 -13
  272. package/dist/workspace/sidebar/session-group-sections.d.ts +12 -12
  273. package/dist/workspace/sidebar/session-group-sections.js +56 -75
  274. package/dist/workspace/sidebar/sidebar-more-group.js +1 -1
  275. package/dist/workspace/sidebar/workspace-settings-sidebar-nav.js +2 -2
  276. package/dist/workspace/spaces/space-tabs.d.ts +26 -6
  277. package/dist/workspace/spaces/space-tabs.js +19 -8
  278. package/package.json +27 -31
  279. package/skills/kortix-ui/references/modules.md +2 -2
  280. package/dist/workspace/new/clone-param.d.ts +0 -11
  281. package/dist/workspace/new/clone-param.js +0 -15
  282. package/dist/workspace/new/provision-new-workspace.d.ts +0 -14
  283. package/dist/workspace/new/provision-new-workspace.js +0 -14
  284. package/dist/workspace/sidebar/footer/project-inbox-nav.d.ts +0 -8
  285. package/dist/workspace/sidebar/footer/project-inbox-nav.js +0 -29
@@ -75,7 +75,7 @@ function statusBadgeFor(status) {
75
75
  // ---------------------------------------------------------------------------
76
76
  function FileRailRow({ file, active, onClick, }) {
77
77
  const tI18nComplete = useTranslations('hardcodedUi.i18nComplete');
78
- return (_jsxs("button", { onClick: onClick, className: cn('group flex w-full items-center gap-2 px-3 py-1.5 text-left text-xs', 'border-l-2', active ? 'border-l-primary bg-primary/[0.04]' : 'hover:bg-muted/40 border-l-transparent'), children: [statusIconFor(file.status, tI18nComplete.raw('textba0e4962bc0f')), _jsxs("span", { className: "min-w-0 flex-1 truncate font-mono text-xs", title: file.old_path ? `${file.old_path} → ${file.path}` : file.path, children: [file.old_path && file.old_path !== file.path && (_jsxs("span", { className: "text-muted-foreground/60", children: [file.old_path, " \u2192 "] })), file.path] }), _jsxs("span", { className: "flex shrink-0 items-center gap-1 text-xs tabular-nums", children: [file.additions > 0 && _jsxs("span", { className: "text-kortix-green", children: ["+", file.additions] }), file.deletions > 0 && _jsxs("span", { className: "text-kortix-red", children: ["\u2212", file.deletions] })] })] }));
78
+ return (_jsxs("button", { onClick: onClick, className: cn('group flex w-full items-center gap-2 px-3 py-1.5 text-left text-xs', 'border-l-2', active ? 'border-l-primary bg-primary/[0.04]' : 'hover:bg-muted/40 border-l-transparent'), children: [statusIconFor(file.status, tI18nComplete.raw('textba0e4962bc0f')), _jsxs("span", { className: "min-w-0 flex-1 truncate font-mono text-xs", title: file.old_path ? `${file.old_path} → ${file.path}` : file.path, children: [file.old_path && file.old_path !== file.path && (_jsxs("span", { className: "text-muted-foreground", children: [file.old_path, " \u2192 "] })), file.path] }), _jsxs("span", { className: "flex shrink-0 items-center gap-1 text-xs tabular-nums", children: [file.additions > 0 && _jsxs("span", { className: "text-kortix-green", children: ["+", file.additions] }), file.deletions > 0 && _jsxs("span", { className: "text-kortix-red", children: ["\u2212", file.deletions] })] })] }));
79
79
  }
80
80
  // ---------------------------------------------------------------------------
81
81
  // Main diff column — fetches the selected file's diff and renders it
@@ -87,9 +87,9 @@ function MainDiffColumn({ sha, file }) {
87
87
  enabled: Boolean(file),
88
88
  });
89
89
  if (!file) {
90
- return (_jsxs("div", { className: "flex h-full flex-col items-center justify-center gap-2 text-center", children: [_jsx(History, { className: "text-muted-foreground/20 h-10 w-10" }), _jsx("p", { className: "text-muted-foreground text-sm", children: tHardcodedUi.raw('featuresProjectFilesComponentsCheckpointDetailDialog.line166JsxTextSelectAFileToViewTheDiff') })] }));
90
+ return (_jsxs("div", { className: "flex h-full flex-col items-center justify-center gap-2 text-center", children: [_jsx(History, { className: "text-muted-foreground h-10 w-10" }), _jsx("p", { className: "text-muted-foreground text-sm", children: tHardcodedUi.raw('featuresProjectFilesComponentsCheckpointDetailDialog.line166JsxTextSelectAFileToViewTheDiff') })] }));
91
91
  }
92
- return (_jsxs("div", { className: "flex h-full min-h-0 flex-col", children: [_jsxs("div", { className: "border-border/40 bg-background flex shrink-0 items-center gap-3 border-b px-5 py-3", children: [statusIconFor(file.status, 'size-4'), _jsx("div", { className: "min-w-0 flex-1", children: _jsxs("div", { className: "flex min-w-0 items-center gap-2", children: [file.old_path && file.old_path !== file.path && (_jsx("span", { className: "text-muted-foreground/60 truncate font-mono text-xs", children: file.old_path })), file.old_path && file.old_path !== file.path && (_jsx("span", { className: "text-muted-foreground/40", children: "\u2192" })), _jsx("span", { className: "truncate font-mono text-sm font-medium", children: file.path })] }) }), _jsxs("div", { className: "flex shrink-0 items-center gap-2", children: [statusBadgeFor(file.status), _jsxs("span", { className: "flex items-center gap-1.5 text-xs tabular-nums", children: [file.additions > 0 && (_jsxs("span", { className: "text-kortix-green font-medium", children: ["+", file.additions] })), file.deletions > 0 && (_jsxs("span", { className: "text-kortix-red font-medium", children: ["\u2212", file.deletions] }))] })] })] }), _jsxs(ScrollArea, { className: "min-h-0 flex-1", children: [isLoading && (_jsxs("div", { className: "space-y-1.5 p-5", children: [_jsx(Skeleton, { className: "h-4 w-full" }), _jsx(Skeleton, { className: "h-4 w-11/12" }), _jsx(Skeleton, { className: "h-4 w-10/12" }), _jsx(Skeleton, { className: "h-4 w-full" }), _jsx(Skeleton, { className: "h-4 w-9/12" }), _jsx(Skeleton, { className: "h-4 w-11/12" }), _jsx(Skeleton, { className: "h-4 w-8/12" })] })), error && !isLoading && (_jsxs("div", { className: "flex flex-col items-center justify-center gap-2 p-10 text-center", children: [_jsx(AlertCircle, { className: "text-muted-foreground/30 h-6 w-6" }), _jsx("p", { className: "text-muted-foreground text-xs", children: tHardcodedUi.raw('featuresProjectFilesComponentsCheckpointDetailDialog.line220JsxTextFailedToLoadDiff') })] })), data && !data.patch && !isLoading && (_jsxs("div", { className: "flex flex-col items-center justify-center gap-2 p-10 text-center", children: [_jsx(History, { className: "text-muted-foreground/30 h-6 w-6" }), _jsx("p", { className: "text-muted-foreground text-xs", children: tHardcodedUi.raw('featuresProjectFilesComponentsCheckpointDetailDialog.line226JsxTextNoTextualDiff') }), _jsx("p", { className: "text-muted-foreground/60 text-xs", children: tHardcodedUi.raw('featuresProjectFilesComponentsCheckpointDetailDialog.line228JsxTextFileMayBeBinaryOrUnchangedInThis') })] })), data?.patch && _jsx(DiffRenderer, { patch: data.patch, filename: file.path, className: "py-2" })] })] }));
92
+ return (_jsxs("div", { className: "flex h-full min-h-0 flex-col", children: [_jsxs("div", { className: "border-border/40 bg-background flex shrink-0 items-center gap-3 border-b px-5 py-3", children: [statusIconFor(file.status, 'size-4'), _jsx("div", { className: "min-w-0 flex-1", children: _jsxs("div", { className: "flex min-w-0 items-center gap-2", children: [file.old_path && file.old_path !== file.path && (_jsx("span", { className: "text-muted-foreground truncate font-mono text-xs", children: file.old_path })), file.old_path && file.old_path !== file.path && (_jsx("span", { className: "text-muted-foreground", children: "\u2192" })), _jsx("span", { className: "truncate font-mono text-sm font-medium", children: file.path })] }) }), _jsxs("div", { className: "flex shrink-0 items-center gap-2", children: [statusBadgeFor(file.status), _jsxs("span", { className: "flex items-center gap-1.5 text-xs tabular-nums", children: [file.additions > 0 && (_jsxs("span", { className: "text-kortix-green font-medium", children: ["+", file.additions] })), file.deletions > 0 && (_jsxs("span", { className: "text-kortix-red font-medium", children: ["\u2212", file.deletions] }))] })] })] }), _jsxs(ScrollArea, { className: "min-h-0 flex-1", children: [isLoading && (_jsxs("div", { className: "space-y-1.5 p-5", children: [_jsx(Skeleton, { className: "h-4 w-full" }), _jsx(Skeleton, { className: "h-4 w-11/12" }), _jsx(Skeleton, { className: "h-4 w-10/12" }), _jsx(Skeleton, { className: "h-4 w-full" }), _jsx(Skeleton, { className: "h-4 w-9/12" }), _jsx(Skeleton, { className: "h-4 w-11/12" }), _jsx(Skeleton, { className: "h-4 w-8/12" })] })), error && !isLoading && (_jsxs("div", { className: "flex flex-col items-center justify-center gap-2 p-10 text-center", children: [_jsx(AlertCircle, { className: "text-muted-foreground h-6 w-6" }), _jsx("p", { className: "text-muted-foreground text-xs", children: tHardcodedUi.raw('featuresProjectFilesComponentsCheckpointDetailDialog.line220JsxTextFailedToLoadDiff') })] })), data && !data.patch && !isLoading && (_jsxs("div", { className: "flex flex-col items-center justify-center gap-2 p-10 text-center", children: [_jsx(History, { className: "text-muted-foreground h-6 w-6" }), _jsx("p", { className: "text-muted-foreground text-xs", children: tHardcodedUi.raw('featuresProjectFilesComponentsCheckpointDetailDialog.line226JsxTextNoTextualDiff') }), _jsx("p", { className: "text-muted-foreground text-xs", children: tHardcodedUi.raw('featuresProjectFilesComponentsCheckpointDetailDialog.line228JsxTextFileMayBeBinaryOrUnchangedInThis') })] })), data?.patch && _jsx(DiffRenderer, { patch: data.patch, filename: file.path, className: "py-2" })] })] }));
93
93
  }
94
94
  // ---------------------------------------------------------------------------
95
95
  // Dialog root
@@ -195,7 +195,7 @@ export function CheckpointDetailDialog({ sha, shaList = EMPTY_SHA_LIST, onSelect
195
195
  setCopied(true);
196
196
  setTimeout(() => setCopied(false), 1500);
197
197
  }, [sha]);
198
- return (_jsx(Dialog, { open: Boolean(sha), onOpenChange: (v) => !v && onClose(), children: _jsxs(DialogContent, { hideCloseButton: true, className: cn('border-border/60 bg-background gap-0 p-0', 'h-[92vh] max-h-[1100px] w-[96vw] max-w-[1400px] sm:max-w-[1400px]', 'flex flex-col overflow-hidden rounded-2xl'), "aria-describedby": undefined, children: [_jsxs(DialogTitle, { className: "sr-only", children: [tHardcodedUi.raw('i18nComplete.textee325afd9b4e'), " ", data?.short_hash ?? sha?.slice(0, 7)] }), _jsxs("div", { className: "border-border/40 flex h-14 shrink-0 items-center gap-4 border-b px-5", children: [_jsx(Button, { variant: "ghost", size: "icon", className: "-ml-2 h-8 w-8", onClick: onClose, title: tHardcodedUi.raw('i18nComplete.text7d9eb7acb13e'), children: _jsx(X, { className: "h-4 w-4" }) }), shaList.length > 1 && (_jsxs("div", { className: "flex shrink-0 items-center gap-0.5", children: [_jsx(Button, { variant: "ghost", size: "icon", className: "h-8 w-8", disabled: !hasPrevSha, onClick: gotoPrevSha, title: tHardcodedUi.raw('featuresProjectFilesComponentsCheckpointDetailDialog.line407JsxAttrTitlePreviousCheckpoint'), children: _jsx(ChevronLeft, { className: "h-4 w-4" }) }), _jsx(Button, { variant: "ghost", size: "icon", className: "h-8 w-8", disabled: !hasNextSha, onClick: gotoNextSha, title: tHardcodedUi.raw('featuresProjectFilesComponentsCheckpointDetailDialog.line417JsxAttrTitleNextCheckpoint'), children: _jsx(ChevronRight, { className: "h-4 w-4" }) }), shaIndex >= 0 && (_jsxs("span", { className: "text-muted-foreground ml-1 text-xs tabular-nums", children: [shaIndex + 1, " / ", shaList.length] }))] })), _jsxs("div", { className: "flex min-w-0 flex-1 items-center gap-2.5", children: [_jsx(History, { className: "text-muted-foreground h-4 w-4 shrink-0" }), isLoading ? (_jsx(Skeleton, { className: "h-4 w-64" })) : (_jsx("h2", { className: "truncate text-sm font-medium", title: data?.subject, children: data?.subject || tHardcodedUi.raw('i18nComplete.textc480160e33b8') }))] }), data && (_jsxs("div", { className: "flex shrink-0 items-center gap-1.5", children: [activeRef && (_jsxs("span", { className: "bg-muted/60 text-muted-foreground hidden items-center gap-1.5 rounded-full px-2 py-1 text-xs md:inline-flex", title: `Version: ${activeRef}`, children: [_jsx(Layers, { className: "h-3 w-3" }), activeRef] })), _jsxs("span", { className: "bg-muted/60 hidden items-center gap-1.5 rounded-full py-0.5 pr-2 pl-0.5 text-xs md:inline-flex", title: `${data.author_name} <${data.author_email}>`, children: [_jsx(UserAvatar, { email: data.author_email, name: data.author_name, size: "xs" }), _jsx("span", { className: "max-w-30 truncate", children: data.author_name })] }), _jsxs("span", { className: "bg-muted/60 text-muted-foreground hidden items-center gap-1.5 rounded-full px-2 py-1 text-xs md:inline-flex", title: formatFull(ts), children: [_jsx(Calendar, { className: "h-3 w-3" }), formatRelative(ts)] }), _jsxs("button", { onClick: handleCopyHash, className: cn('bg-muted/60 hover:bg-muted inline-flex items-center gap-1.5 rounded-full px-2 py-1 text-xs', 'font-mono tabular-nums transition-colors'), title: tHardcodedUi.raw('featuresProjectFilesComponentsCheckpointDetailDialog.line482JsxAttrTitleCopyCheckpointId'), children: [copied ? (_jsx(Check, { className: "text-kortix-green h-3 w-3" })) : (_jsx(Copy, { className: "text-muted-foreground/70 h-3 w-3" })), data.short_hash] })] }))] }), _jsxs("div", { className: "flex min-h-0 flex-1", children: [_jsxs("aside", { className: "border-border/40 bg-muted/[0.15] flex w-[320px] shrink-0 flex-col border-r", children: [_jsxs("div", { className: "border-border/40 shrink-0 space-y-2 border-b px-3 py-3", children: [data?.body && (_jsx("pre", { className: "text-muted-foreground border-border/60 max-h-[80px] overflow-auto border-l-2 pl-2 font-sans text-xs leading-relaxed whitespace-pre-wrap", children: data.body.trim() })), data && (_jsxs("div", { className: "flex items-center justify-between text-xs", children: [_jsxs("span", { className: "text-muted-foreground", children: [data.files.length, " ", tHardcodedUi.raw('i18nComplete.text3b9c358f36f0'), data.files.length === 1 ? '' : 's'] }), _jsxs("span", { className: "flex items-center gap-2 tabular-nums", children: [totals.add > 0 && _jsxs("span", { className: "text-kortix-green", children: ["+", totals.add] }), totals.del > 0 && _jsxs("span", { className: "text-kortix-red", children: ["\u2212", totals.del] })] })] })), _jsxs("div", { className: "relative", children: [_jsx(Search, { className: "text-muted-foreground/50 absolute top-1/2 left-2 h-3 w-3 -translate-y-1/2" }), _jsx(Input, { value: fileFilter, onChange: (e) => setFileFilter(e.target.value), placeholder: tHardcodedUi.raw('featuresProjectFilesComponentsCheckpointDetailDialog.line528JsxAttrPlaceholderFilterFiles'), className: "h-7 pl-7 text-xs" })] })] }), _jsxs(ScrollArea, { className: "min-h-0 flex-1", children: [isLoading && (_jsx("div", { className: "space-y-2 p-3", children: Array.from({ length: 8 }).map((_, i) => (_jsx(Skeleton, { className: "h-6 w-full" }, i))) })), error && !isLoading && (_jsxs("div", { className: "flex flex-col items-center justify-center gap-2 p-6 text-center", children: [_jsx(AlertCircle, { className: "text-muted-foreground/30 h-5 w-5" }), _jsx("p", { className: "text-muted-foreground text-xs", children: tHardcodedUi.raw('featuresProjectFilesComponentsCheckpointDetailDialog.line546JsxTextFailedToLoadCheckpoint') })] })), data && filteredFiles.length === 0 && !isLoading && (_jsx("div", { className: "text-muted-foreground px-3 py-6 text-center text-xs", children: data.files.length === 0
198
+ return (_jsx(Dialog, { open: Boolean(sha), onOpenChange: (v) => !v && onClose(), children: _jsxs(DialogContent, { hideCloseButton: true, className: cn('border-border/60 bg-background gap-0 p-0', 'h-[92vh] max-h-[1100px] w-[96vw] max-w-[1400px] sm:max-w-[1400px]', 'flex flex-col overflow-hidden rounded-2xl'), "aria-describedby": undefined, children: [_jsxs(DialogTitle, { className: "sr-only", children: [tHardcodedUi.raw('i18nComplete.textee325afd9b4e'), " ", data?.short_hash ?? sha?.slice(0, 7)] }), _jsxs("div", { className: "border-border/40 flex h-14 shrink-0 items-center gap-4 border-b px-5", children: [_jsx(Button, { variant: "ghost", size: "icon", className: "-ml-2 h-8 w-8", onClick: onClose, title: tHardcodedUi.raw('i18nComplete.text7d9eb7acb13e'), children: _jsx(X, { className: "h-4 w-4" }) }), shaList.length > 1 && (_jsxs("div", { className: "flex shrink-0 items-center gap-0.5", children: [_jsx(Button, { variant: "ghost", size: "icon", className: "h-8 w-8", disabled: !hasPrevSha, onClick: gotoPrevSha, title: tHardcodedUi.raw('featuresProjectFilesComponentsCheckpointDetailDialog.line407JsxAttrTitlePreviousCheckpoint'), children: _jsx(ChevronLeft, { className: "h-4 w-4" }) }), _jsx(Button, { variant: "ghost", size: "icon", className: "h-8 w-8", disabled: !hasNextSha, onClick: gotoNextSha, title: tHardcodedUi.raw('featuresProjectFilesComponentsCheckpointDetailDialog.line417JsxAttrTitleNextCheckpoint'), children: _jsx(ChevronRight, { className: "h-4 w-4" }) }), shaIndex >= 0 && (_jsxs("span", { className: "text-muted-foreground ml-1 text-xs tabular-nums", children: [shaIndex + 1, " / ", shaList.length] }))] })), _jsxs("div", { className: "flex min-w-0 flex-1 items-center gap-2.5", children: [_jsx(History, { className: "text-muted-foreground h-4 w-4 shrink-0" }), isLoading ? (_jsx(Skeleton, { className: "h-4 w-64" })) : (_jsx("h2", { className: "truncate text-sm font-medium", title: data?.subject, children: data?.subject || tHardcodedUi.raw('i18nComplete.textc480160e33b8') }))] }), data && (_jsxs("div", { className: "flex shrink-0 items-center gap-1.5", children: [activeRef && (_jsxs("span", { className: "bg-muted/60 text-muted-foreground hidden items-center gap-1.5 rounded-full px-2 py-1 text-xs md:inline-flex", title: `Version: ${activeRef}`, children: [_jsx(Layers, { className: "h-3 w-3" }), activeRef] })), _jsxs("span", { className: "bg-muted/60 hidden items-center gap-1.5 rounded-full py-0.5 pr-2 pl-0.5 text-xs md:inline-flex", title: `${data.author_name} <${data.author_email}>`, children: [_jsx(UserAvatar, { email: data.author_email, name: data.author_name, size: "xs" }), _jsx("span", { className: "max-w-30 truncate", children: data.author_name })] }), _jsxs("span", { className: "bg-muted/60 text-muted-foreground hidden items-center gap-1.5 rounded-full px-2 py-1 text-xs md:inline-flex", title: formatFull(ts), children: [_jsx(Calendar, { className: "h-3 w-3" }), formatRelative(ts)] }), _jsxs("button", { onClick: handleCopyHash, className: cn('bg-muted/60 hover:bg-muted inline-flex items-center gap-1.5 rounded-full px-2 py-1 text-xs', 'font-mono tabular-nums transition-colors'), title: tHardcodedUi.raw('featuresProjectFilesComponentsCheckpointDetailDialog.line482JsxAttrTitleCopyCheckpointId'), children: [copied ? (_jsx(Check, { className: "text-kortix-green h-3 w-3" })) : (_jsx(Copy, { className: "text-muted-foreground h-3 w-3" })), data.short_hash] })] }))] }), _jsxs("div", { className: "flex min-h-0 flex-1", children: [_jsxs("aside", { className: "border-border/40 bg-muted/[0.15] flex w-[320px] shrink-0 flex-col border-r", children: [_jsxs("div", { className: "border-border/40 shrink-0 space-y-2 border-b px-3 py-3", children: [data?.body && (_jsx("pre", { className: "text-muted-foreground border-border/60 max-h-[80px] overflow-auto border-l-2 pl-2 font-sans text-xs leading-relaxed whitespace-pre-wrap", children: data.body.trim() })), data && (_jsxs("div", { className: "flex items-center justify-between text-xs", children: [_jsxs("span", { className: "text-muted-foreground", children: [data.files.length, " ", tHardcodedUi.raw('i18nComplete.text3b9c358f36f0'), data.files.length === 1 ? '' : 's'] }), _jsxs("span", { className: "flex items-center gap-2 tabular-nums", children: [totals.add > 0 && _jsxs("span", { className: "text-kortix-green", children: ["+", totals.add] }), totals.del > 0 && _jsxs("span", { className: "text-kortix-red", children: ["\u2212", totals.del] })] })] })), _jsxs("div", { className: "relative", children: [_jsx(Search, { className: "text-muted-foreground absolute top-1/2 left-2 h-3 w-3 -translate-y-1/2" }), _jsx(Input, { value: fileFilter, onChange: (e) => setFileFilter(e.target.value), placeholder: tHardcodedUi.raw('featuresProjectFilesComponentsCheckpointDetailDialog.line528JsxAttrPlaceholderFilterFiles'), className: "h-7 pl-7 text-xs" })] })] }), _jsxs(ScrollArea, { className: "min-h-0 flex-1", children: [isLoading && (_jsx("div", { className: "space-y-2 p-3", children: Array.from({ length: 8 }).map((_, i) => (_jsx(Skeleton, { className: "h-6 w-full" }, i))) })), error && !isLoading && (_jsxs("div", { className: "flex flex-col items-center justify-center gap-2 p-6 text-center", children: [_jsx(AlertCircle, { className: "text-muted-foreground h-5 w-5" }), _jsx("p", { className: "text-muted-foreground text-xs", children: tHardcodedUi.raw('featuresProjectFilesComponentsCheckpointDetailDialog.line546JsxTextFailedToLoadCheckpoint') })] })), data && filteredFiles.length === 0 && !isLoading && (_jsx("div", { className: "text-muted-foreground px-3 py-6 text-center text-xs", children: data.files.length === 0
199
199
  ? tHardcodedUi.raw('i18nComplete.texteba7b22dda11')
200
200
  : tHardcodedUi.raw('i18nComplete.textadbc4608457d') })), _jsx("div", { className: "py-1", children: filteredFiles.map((f) => (_jsx(FileRailRow, { file: f, active: selectedFile === f.path, onClick: () => setSelectedFile(f.path) }, f.path))) })] })] }), _jsxs("main", { className: "flex min-w-0 flex-1 flex-col", children: [isLoading && !data && (_jsxs("div", { className: "flex h-full flex-col items-center justify-center gap-2", children: [_jsx(Loading, { className: "h-5 w-5 shrink-0" }), _jsx("p", { className: "text-muted-foreground text-xs", children: tHardcodedUi.raw('featuresProjectFilesComponentsCheckpointDetailDialog.line575JsxTextLoadingCheckpoint') })] })), sha && (data || !isLoading) && _jsx(MainDiffColumn, { sha: sha, file: currentFile })] })] })] }) }));
201
201
  }
@@ -71,6 +71,6 @@ export function CheckpointsPanel({ open = false, onClose }) {
71
71
  // is the only way to pull a checkpoint that landed while it was open.
72
72
  actions: _jsx(Hint, { label: tI18nComplete.raw('text0e9161011702'), side: "bottom", children: _jsx(Button, { variant: "ghost", size: "icon-sm", "aria-label": tI18nComplete.raw('text0e9161011702'), onClick: () => refetch(), disabled: isFetching, className: "text-muted-foreground hover:text-foreground active:scale-[0.96]", children: isFetching ? (_jsx(Loading, { className: "size-4 shrink-0" })) : (_jsx(ArrowClockwiseIcon, { className: "size-4" })) }) }), children: [isLoading && _jsx(ReviewRowSkeleton, { count: 7 }), error && !isLoading && (_jsx(ReviewError, { title: tI18nComplete.raw('textdaf44c9faf1b'), error: error })), !isLoading && !error && total === 0 && (_jsx(ReviewEmpty, { size: "sm", className: "py-10", icon: ClockCounterClockwiseIcon, title: tI18nComplete.raw('text36b14500f828'), description: tI18nComplete.raw('textb86941027ad4') })), !isLoading && !error && total > 0 && (_jsxs("div", { className: "pb-3", children: [groups.map((group, gi) => (_jsxs("div", { children: [_jsx(ReviewGroupLabel, { first: gi === 0, children: group.label }), group.items.map((c) => {
73
73
  const ts = tsFromCommit(c);
74
- return (_jsxs(ReviewRow, { isActive: selectedSha === c.hash, onSelect: () => setSelectedSha(c.hash), children: [_jsx(UserAvatar, { email: c.author_email, name: c.author_name, size: "sm", className: "mt-0.5 shrink-0" }), _jsxs("span", { className: "min-w-0 flex-1", children: [_jsx("span", { className: "text-foreground line-clamp-2 text-sm leading-snug font-medium", children: c.subject || tI18nComplete.raw('textc480160e33b8') }), _jsxs("span", { className: "text-muted-foreground mt-0.5 flex items-center gap-1.5 text-xs", children: [_jsx("span", { className: "truncate", title: c.author_email, children: c.author_name }), _jsx("span", { className: "text-muted-foreground/30", "aria-hidden": true, children: "\u00B7" }), _jsx("span", { className: "shrink-0", title: fullDateTimeFormat.format(ts), children: formatRelative(ts) })] })] })] }, c.hash));
75
- })] }, group.label))), data?.hasMore && (_jsxs("p", { className: "text-muted-foreground/60 px-3 pt-4 text-xs", children: [tI18nComplete.raw('text55fa9981994c'), " ", total, ' ', tI18nComplete.raw('text0b9049066497')] }))] }))] }), _jsx(CheckpointDetailDialog, { sha: selectedSha, shaList: shaList, onSelectSha: setSelectedSha, onClose: () => setSelectedSha(null) })] }));
74
+ return (_jsxs(ReviewRow, { isActive: selectedSha === c.hash, onSelect: () => setSelectedSha(c.hash), children: [_jsx(UserAvatar, { email: c.author_email, name: c.author_name, size: "sm", className: "mt-0.5 shrink-0" }), _jsxs("span", { className: "min-w-0 flex-1", children: [_jsx("span", { className: "text-foreground line-clamp-2 text-sm leading-snug font-medium", children: c.subject || tI18nComplete.raw('textc480160e33b8') }), _jsxs("span", { className: "text-muted-foreground mt-0.5 flex items-center gap-1.5 text-xs", children: [_jsx("span", { className: "truncate", title: c.author_email, children: c.author_name }), _jsx("span", { className: "text-muted-foreground", "aria-hidden": true, children: "\u00B7" }), _jsx("span", { className: "shrink-0", title: fullDateTimeFormat.format(ts), children: formatRelative(ts) })] })] })] }, c.hash));
75
+ })] }, group.label))), data?.hasMore && (_jsxs("p", { className: "text-muted-foreground px-3 pt-4 text-xs", children: [tI18nComplete.raw('text55fa9981994c'), " ", total, ' ', tI18nComplete.raw('text0b9049066497')] }))] }))] }), _jsx(CheckpointDetailDialog, { sha: selectedSha, shaList: shaList, onSelectSha: setSelectedSha, onClose: () => setSelectedSha(null) })] }));
76
76
  }
@@ -972,7 +972,7 @@ export function DriveExplorer({ embedded = false, shareContext, leading, trailin
972
972
  !listing.hasNextPage &&
973
973
  dirs.length === 0 &&
974
974
  fileItems.length === 0;
975
- return (_jsx(DriveSelectionContext.Provider, { value: selectionValue, children: _jsx(DriveRenameContext.Provider, { value: canWrite ? requestRename : null, children: _jsxs("div", { className: "bg-background relative flex h-full flex-col", onDragEnter: handlePageDragEnter, onDragLeave: handlePageDragLeave, onDragOver: handlePageDragOver, onDrop: handlePageDrop, children: [_jsx(DriveActionRow, { leading: leading, actions: (() => {
975
+ return (_jsx(DriveSelectionContext.Provider, { value: selectionValue, children: _jsx(DriveRenameContext.Provider, { value: canWrite ? requestRename : null, children: _jsxs("div", { className: "bg-background relative flex h-full flex-col", onDragEnter: handlePageDragEnter, onDragLeave: handlePageDragLeave, onDragOver: handlePageDragOver, onDrop: handlePageDrop, children: [isEmpty && !parked && !leading && !trailing ? null : (_jsx(DriveActionRow, { leading: leading, actions: isEmpty && !parked ? trailing : (() => {
976
976
  const newMenu = (_jsx(DriveNewMenu, { compact: embedded, onUpload: canWrite && filesAllowedHere ? handleUpload : undefined, onUploadFolder: canWrite ? handlePickFolder : undefined, onNewFile: canWrite && filesAllowedHere && capabilities.newFile !== false ? () => setCreateKind('file') : undefined, onNewFolder: canWrite ? () => setCreateKind('folder') : undefined }));
977
977
  const viewMenu = (_jsx(DriveViewMenu, { variant: "secondary", showSearch: capabilities.search, showHiddenToggle: capabilities.hiddenToggle, onRefresh: () => refetchFiles(), isRefreshing: isFetching, onDownloadDir: () => {
978
978
  const dirName = isRootPath
@@ -983,7 +983,7 @@ export function DriveExplorer({ embedded = false, shareContext, leading, trailin
983
983
  }, isDownloading: isDirDownloading(isRootPath ? '/workspace' : currentPath), sortDisabled: partial }));
984
984
  // One secondary group whether or not the host adds actions.
985
985
  return (_jsxs(_Fragment, { children: [newMenu, viewMenu, trailing] }));
986
- })() }), _jsx(DrivePathBar, { as: "row", rootLabel: rootLabel, rootIcon: rootIcon, base: pathBase }), capabilities.search && isSearchOpen && _jsx(FileSearch, {}), _jsx("input", { type: "file", ref: fileInputRef, className: "hidden", onChange: handleFileInputChange, multiple: true }), _jsx("input", { type: "file", ref: folderPickerRef, className: "hidden", multiple: true, webkitdirectory: '', onChange: (e) => {
986
+ })() })), _jsx(DrivePathBar, { as: "row", rootLabel: rootLabel, rootIcon: rootIcon, base: pathBase }), capabilities.search && isSearchOpen && _jsx(FileSearch, {}), _jsx("input", { type: "file", ref: fileInputRef, className: "hidden", onChange: handleFileInputChange, multiple: true }), _jsx("input", { type: "file", ref: folderPickerRef, className: "hidden", multiple: true, webkitdirectory: '', onChange: (e) => {
987
987
  const picked = e.target.files;
988
988
  if (picked?.length)
989
989
  void handleUploadFolder(picked);
@@ -22,7 +22,7 @@ function BreadcrumbSegments({ segments, onSegmentClick, onHomeClick, fileMode, f
22
22
  // Recover the absolute index for the click handler
23
23
  const absoluteIndex = rootPath ? visibleIndex + rootSegmentCount : visibleIndex;
24
24
  const pathToHere = '/' + segments.slice(0, absoluteIndex + 1).join('/');
25
- return (_jsxs("div", { className: "flex min-w-0 shrink-0 items-center gap-0.5", children: [_jsx(ChevronRight, { className: "text-muted-foreground/50 h-3 w-3 shrink-0" }), isLast && fileMode ? (
25
+ return (_jsxs("div", { className: "flex min-w-0 shrink-0 items-center gap-0.5", children: [_jsx(ChevronRight, { className: "text-muted-foreground h-3 w-3 shrink-0" }), isLast && fileMode ? (
26
26
  /* File name — non-clickable active segment with optional icon */
27
27
  _jsxs("span", { className: "text-foreground bg-muted/30 inline-flex max-w-[200px] items-center gap-1.5 truncate rounded-lg px-1.5 py-1 text-xs font-medium", children: [fileIcon, segment] })) : (_jsx("button", { onClick: () => onSegmentClick(absoluteIndex), className: cn('max-w-[180px] cursor-pointer truncate rounded-lg px-1.5 py-1 text-xs transition-colors', 'hover:bg-muted', isLast && !fileMode
28
28
  ? 'text-foreground bg-muted/30 font-medium'
@@ -91,8 +91,8 @@ export function FileHistoryPopoverContent({ filePath, onClose }) {
91
91
  const { data: history, isLoading, error } = useFileHistory(filePath);
92
92
  const fileName = filePath.split('/').pop() || '';
93
93
  const totalCheckpoints = history?.commits.length ?? 0;
94
- return (_jsxs("div", { className: "flex max-h-[500px] w-[420px] flex-col", children: [_jsxs("div", { className: "flex shrink-0 items-center gap-2 border-b py-2 pr-2 pl-3", children: [_jsx("span", { className: "flex-1 truncate text-sm font-medium", children: fileName }), totalCheckpoints > 0 && (_jsxs("span", { className: "text-muted-foreground shrink-0 text-xs tabular-nums", children: [totalCheckpoints, " ", tHardcodedUi.raw('i18nComplete.text5ca4f3850ccc'), totalCheckpoints !== 1 ? 's' : ''] })), _jsx(Button, { variant: "secondary", size: "icon-sm", className: "shrink-0", onClick: onClose, children: _jsx(X, { className: "size-3.5" }) })] }), _jsxs(ScrollArea, { className: "flex-1 overflow-hidden", children: [isLoading && (_jsx("div", { className: "space-y-2 p-3", children: Array.from({ length: 4 }).map((_, i) => (_jsx(Skeleton, { className: "h-12 w-full rounded-lg" }, i))) })), !!error && !isLoading && (_jsxs("div", { className: "flex flex-col items-center justify-center gap-2 p-6 text-center", children: [_jsx(AlertCircle, { className: "text-muted-foreground/30 h-6 w-6" }), _jsx("p", { className: "text-muted-foreground text-xs", children: error instanceof Error &&
94
+ return (_jsxs("div", { className: "flex max-h-[500px] w-[420px] flex-col", children: [_jsxs("div", { className: "flex shrink-0 items-center gap-2 border-b py-2 pr-2 pl-3", children: [_jsx("span", { className: "flex-1 truncate text-sm font-medium", children: fileName }), totalCheckpoints > 0 && (_jsxs("span", { className: "text-muted-foreground shrink-0 text-xs tabular-nums", children: [totalCheckpoints, " ", tHardcodedUi.raw('i18nComplete.text5ca4f3850ccc'), totalCheckpoints !== 1 ? 's' : ''] })), _jsx(Button, { variant: "secondary", size: "icon-sm", className: "shrink-0", onClick: onClose, children: _jsx(X, { className: "size-3.5" }) })] }), _jsxs(ScrollArea, { className: "flex-1 overflow-hidden", children: [isLoading && (_jsx("div", { className: "space-y-2 p-3", children: Array.from({ length: 4 }).map((_, i) => (_jsx(Skeleton, { className: "h-12 w-full rounded-lg" }, i))) })), !!error && !isLoading && (_jsxs("div", { className: "flex flex-col items-center justify-center gap-2 p-6 text-center", children: [_jsx(AlertCircle, { className: "text-muted-foreground h-6 w-6" }), _jsx("p", { className: "text-muted-foreground text-xs", children: error instanceof Error &&
95
95
  error.message.includes(tHardcodedUi.raw('i18nComplete.texte7d93eed5869'))
96
96
  ? tHardcodedUi.raw('i18nComplete.textf903b3885c5e')
97
- : tHardcodedUi.raw('featuresProjectFilesComponentsFileHistoryPopover.line216JsxTextFailedToLoadHistory') })] })), !isLoading && !error && totalCheckpoints === 0 && (_jsxs("div", { className: "flex flex-col items-center justify-center gap-2 p-6 text-center", children: [_jsx(History, { className: "text-muted-foreground/20 h-6 w-6" }), _jsx("p", { className: "text-muted-foreground text-xs", children: tHardcodedUi.raw('featuresProjectFilesComponentsFileHistoryPopover.line224JsxTextNoCheckpointsYet') })] })), !isLoading && !error && totalCheckpoints > 0 && (_jsxs("div", { className: "p-2", children: [_jsxs("ol", { className: "relative space-y-0.5", children: [_jsx("span", { "aria-hidden": true, className: "bg-border absolute top-4 bottom-4 left-[12.5px] w-px" }), history.commits.map((commit) => (_jsx(CompactCommitRow, { commit: commit, filePath: filePath }, commit.hash)))] }), history?.hasMore && (_jsx("div", { className: "pt-2 text-center", children: _jsxs("span", { className: "text-muted-foreground text-xs", children: [tHardcodedUi.raw('featuresProjectFilesComponentsFileHistoryPopover.line240JsxTextShowingTheMostRecent'), ' ', totalCheckpoints, " ", tHardcodedUi.raw('i18nComplete.text4612828a45f1')] }) }))] }))] })] }));
97
+ : tHardcodedUi.raw('featuresProjectFilesComponentsFileHistoryPopover.line216JsxTextFailedToLoadHistory') })] })), !isLoading && !error && totalCheckpoints === 0 && (_jsxs("div", { className: "flex flex-col items-center justify-center gap-2 p-6 text-center", children: [_jsx(History, { className: "text-muted-foreground h-6 w-6" }), _jsx("p", { className: "text-muted-foreground text-xs", children: tHardcodedUi.raw('featuresProjectFilesComponentsFileHistoryPopover.line224JsxTextNoCheckpointsYet') })] })), !isLoading && !error && totalCheckpoints > 0 && (_jsxs("div", { className: "p-2", children: [_jsxs("ol", { className: "relative space-y-0.5", children: [_jsx("span", { "aria-hidden": true, className: "bg-border absolute top-4 bottom-4 left-[12.5px] w-px" }), history.commits.map((commit) => (_jsx(CompactCommitRow, { commit: commit, filePath: filePath }, commit.hash)))] }), history?.hasMore && (_jsx("div", { className: "pt-2 text-center", children: _jsxs("span", { className: "text-muted-foreground text-xs", children: [tHardcodedUi.raw('featuresProjectFilesComponentsFileHistoryPopover.line240JsxTextShowingTheMostRecent'), ' ', totalCheckpoints, " ", tHardcodedUi.raw('i18nComplete.text4612828a45f1')] }) }))] }))] })] }));
98
98
  }
@@ -68,7 +68,7 @@ export function FileThumbnail({ filePath, fileName, className, deferPreview, onO
68
68
  }, children: ext })) : null;
69
69
  const [nearRef, near] = useNearViewport();
70
70
  if (deferPreview || !near) {
71
- return (_jsxs("div", { ref: deferPreview ? undefined : nearRef, "data-thumbnail-deferred": true, className: cn('bg-popover relative overflow-hidden rounded-md', className), children: [_jsx("div", { className: "flex h-full w-full items-center justify-center", children: _jsx(Loading, { className: "text-muted-foreground/40 size-4" }) }), extBadge] }));
71
+ return (_jsxs("div", { ref: deferPreview ? undefined : nearRef, "data-thumbnail-deferred": true, className: cn('bg-popover relative overflow-hidden rounded-md', className), children: [_jsx("div", { className: "flex h-full w-full items-center justify-center", children: _jsx(Loading, { className: "text-muted-foreground size-4" }) }), extBadge] }));
72
72
  }
73
73
  return (_jsxs("div", { className: cn('bg-popover relative overflow-hidden rounded-md', className), children: [_jsx("div", { className: "pointer-events-none absolute top-0 left-0 origin-top-left select-none [&_*]:!cursor-default [&_button]:hidden", style: rendersAsPicture
74
74
  ? { width: '100%', height: '100%' }
@@ -28,7 +28,7 @@ function BranchValue({ name }) {
28
28
  }
29
29
  function BranchRow({ branch }) {
30
30
  const tI18nComplete = useTranslations('hardcodedUi.i18nComplete');
31
- return (_jsxs("div", { className: "flex items-center justify-start gap-2 py-0.5", children: [_jsx(Layers, { className: "text-muted-foreground size-4 shrink-0" }), _jsxs("div", { className: "flex flex-col items-start gap-0", children: [branch.subject && (_jsx("span", { className: "text-muted-foreground/80 truncate text-xs", children: branch.subject })), _jsxs("div", { className: "flex items-center gap-1.5", children: [_jsx("span", { className: "text-foreground truncate font-mono text-xs", children: displayBranchName(branch.name) }), branch.is_default && (_jsx(Badge, { variant: "kortix", size: "xs", className: "shrink-0 text-[11px]", children: tI18nComplete.raw('text37a8eec1ce19') }))] })] })] }));
31
+ return (_jsxs("div", { className: "flex items-center justify-start gap-2 py-0.5", children: [_jsx(Layers, { className: "text-muted-foreground size-4 shrink-0" }), _jsxs("div", { className: "flex flex-col items-start gap-0", children: [branch.subject && (_jsx("span", { className: "text-muted-foreground truncate text-xs", children: branch.subject })), _jsxs("div", { className: "flex items-center gap-1.5", children: [_jsx("span", { className: "text-foreground truncate font-mono text-xs", children: displayBranchName(branch.name) }), branch.is_default && (_jsx(Badge, { variant: "kortix", size: "xs", className: "shrink-0 text-[11px]", children: tI18nComplete.raw('text37a8eec1ce19') }))] })] })] }));
32
32
  }
33
33
  const NO_BRANCHES = [];
34
34
  const PICKER_TRIGGER_CLASS = 'py-2 flex-1 min-w-0 rounded-sm border-0 bg-transparent px-2 hover:bg-muted/40 focus:ring-0';
@@ -143,11 +143,11 @@ export function MermaidDiagram({ source, fileName, onShowSource, className }) {
143
143
  a.click();
144
144
  }, [url, svgName]);
145
145
  if (state.status === 'empty') {
146
- return (_jsxs(Centered, { className: className, children: [_jsx(Diagram, { className: "text-muted-foreground/60 size-5" }), _jsx("span", { children: t.raw('textde340d411411') })] }));
146
+ return (_jsxs(Centered, { className: className, children: [_jsx(Diagram, { className: "text-muted-foreground size-5" }), _jsx("span", { children: t.raw('textde340d411411') })] }));
147
147
  }
148
148
  if (state.status === 'error') {
149
149
  const { message, line } = state.error;
150
- return (_jsxs(Centered, { className: className, role: "alert", children: [_jsx(Warning, { className: "text-muted-foreground/60 size-5" }), _jsx("span", { className: "text-foreground font-medium", children: t.raw('textc53147a0d05b') }), line !== null && (_jsx("span", { className: "text-muted-foreground text-xs tabular-nums", children: t('text751dfdcf3878', { value0: line }) })), _jsx("pre", { className: "bg-muted/50 text-muted-foreground max-h-48 w-full max-w-lg overflow-auto rounded-md p-3 text-left font-mono text-xs whitespace-pre-wrap", children: message }), onShowSource && (_jsxs(Button, { variant: "outline", size: "sm", className: "gap-1.5", onClick: onShowSource, children: [_jsx(Code, { className: "size-3.5" }), t.raw('text6ee818aa2de3')] }))] }));
150
+ return (_jsxs(Centered, { className: className, role: "alert", children: [_jsx(Warning, { className: "text-muted-foreground size-5" }), _jsx("span", { className: "text-foreground font-medium", children: t.raw('textc53147a0d05b') }), line !== null && (_jsx("span", { className: "text-muted-foreground text-xs tabular-nums", children: t('text751dfdcf3878', { value0: line }) })), _jsx("pre", { className: "bg-muted/50 text-muted-foreground max-h-48 w-full max-w-lg overflow-auto rounded-md p-3 text-left font-mono text-xs whitespace-pre-wrap", children: message }), onShowSource && (_jsxs(Button, { variant: "outline", size: "sm", className: "gap-1.5", onClick: onShowSource, children: [_jsx(Code, { className: "size-3.5" }), t.raw('text6ee818aa2de3')] }))] }));
151
151
  }
152
152
  if (!url) {
153
153
  return (_jsx(Centered, { className: className, children: _jsx(Loading, { className: "size-4" }) }));
@@ -160,13 +160,13 @@ export function showBlobSource(input) {
160
160
  return stored ?? input.sandboxPath;
161
161
  }
162
162
  function RendererFallback({ className }) {
163
- return (_jsx("div", { className: cn('flex items-center justify-center', className || 'h-[420px]'), children: _jsx(Loading, { className: "text-muted-foreground/40 h-4 w-4" }) }));
163
+ return (_jsx("div", { className: cn('flex items-center justify-center', className || 'h-[420px]'), children: _jsx(Loading, { className: "text-muted-foreground h-4 w-4" }) }));
164
164
  }
165
165
  function LoadError({ message }) {
166
- return (_jsxs("div", { className: "flex h-[300px] flex-col items-center justify-center gap-2 p-8 text-center", children: [_jsx(FileWarning, { className: "text-muted-foreground/30 h-6 w-6" }), _jsx("p", { className: "text-muted-foreground/60 max-w-sm text-xs", children: message })] }));
166
+ return (_jsxs("div", { className: "flex h-[300px] flex-col items-center justify-center gap-2 p-8 text-center", children: [_jsx(FileWarning, { className: "text-muted-foreground h-6 w-6" }), _jsx("p", { className: "text-muted-foreground max-w-sm text-xs", children: message })] }));
167
167
  }
168
168
  function FileCard({ title, fileName, path }) {
169
- return (_jsxs("div", { className: "flex items-center gap-4 px-5 py-5", children: [_jsx("div", { className: "bg-muted/20 flex size-12 items-center justify-center rounded-xl", children: _jsx(FileText, { className: "text-muted-foreground/40 size-6" }) }), _jsxs("div", { className: "min-w-0 flex-1", children: [_jsx("div", { className: "text-foreground truncate text-sm font-medium", children: title || fileName }), _jsx("div", { className: "text-muted-foreground/50 mt-0.5 truncate font-mono text-xs", children: path })] })] }));
169
+ return (_jsxs("div", { className: "flex items-center gap-4 px-5 py-5", children: [_jsx("div", { className: "bg-muted/20 flex size-12 items-center justify-center rounded-xl", children: _jsx(FileText, { className: "text-muted-foreground size-6" }) }), _jsxs("div", { className: "min-w-0 flex-1", children: [_jsx("div", { className: "text-foreground truncate text-sm font-medium", children: title || fileName }), _jsx("div", { className: "text-muted-foreground mt-0.5 truncate font-mono text-xs", children: path })] })] }));
170
170
  }
171
171
  // ── Component ──────────────────────────────────────────────────────────────
172
172
  export function ShowContentRenderer({ type, title = '', description = '', path: inputPath, url = '', content = '', language = '', aspectRatio = '', attachment, sha256, LocalhostPreview, fill = false, onStatusChange, toolbarActions, }) {
@@ -307,7 +307,7 @@ export function ShowContentRenderer({ type, title = '', description = '', path:
307
307
  // Error fallback for FileContentRenderer (used for generic 'file' type)
308
308
  const fileErrorFallback = useCallback((_error, fp) => {
309
309
  const name = fp.split('/').pop() || fp;
310
- return (_jsxs("div", { className: "flex h-full items-center gap-4 px-5 py-5", children: [_jsx("div", { className: "bg-muted/20 flex size-12 items-center justify-center rounded-xl", children: _jsx(FileText, { className: "text-muted-foreground/40 size-6" }) }), _jsxs("div", { className: "min-w-0 flex-1", children: [_jsx("div", { className: "text-foreground truncate text-sm font-medium", children: title || name }), _jsx("div", { className: "text-muted-foreground/50 mt-0.5 truncate font-mono text-xs", children: path })] })] }));
310
+ return (_jsxs("div", { className: "flex h-full items-center gap-4 px-5 py-5", children: [_jsx("div", { className: "bg-muted/20 flex size-12 items-center justify-center rounded-xl", children: _jsx(FileText, { className: "text-muted-foreground size-6" }) }), _jsxs("div", { className: "min-w-0 flex-1", children: [_jsx("div", { className: "text-foreground truncate text-sm font-medium", children: title || name }), _jsx("div", { className: "text-muted-foreground mt-0.5 truncate font-mono text-xs", children: path })] })] }));
311
311
  }, [title, path]);
312
312
  // ═════════════════════════════════════════════════════════════════════════
313
313
  // Load-status reporting — lets the parent (ShowTool) hide a dead reference
@@ -446,7 +446,7 @@ export function ShowContentRenderer({ type, title = '', description = '', path:
446
446
  if (blobError)
447
447
  return _jsx(LoadError, { message: blobError });
448
448
  if (blobUrl) {
449
- return (_jsxs("div", { className: cn('flex flex-col items-center justify-center gap-5', fill ? 'h-full' : 'py-10'), children: [_jsx("div", { className: "bg-muted/50 flex h-14 w-14 items-center justify-center rounded-2xl", children: _jsx(Music, { className: "text-muted-foreground/40 size-6" }) }), (title || fileName) && (_jsx("p", { className: "text-muted-foreground/60 text-xs", children: title || fileName })), _jsx("audio", { controls: true, src: blobUrl, className: "w-full max-w-sm", preload: "metadata" })] }));
449
+ return (_jsxs("div", { className: cn('flex flex-col items-center justify-center gap-5', fill ? 'h-full' : 'py-10'), children: [_jsx("div", { className: "bg-muted/50 flex h-14 w-14 items-center justify-center rounded-2xl", children: _jsx(Music, { className: "text-muted-foreground size-6" }) }), (title || fileName) && (_jsx("p", { className: "text-muted-foreground text-xs", children: title || fileName })), _jsx("audio", { controls: true, src: blobUrl, className: "w-full max-w-sm", preload: "metadata" })] }));
450
450
  }
451
451
  return null;
452
452
  }
@@ -751,5 +751,5 @@ export function ShowCarousel({ items, LocalhostPreview, onIndexChange, fill = fa
751
751
  }, type: "button", onClick: () => goTo(i), "aria-label": getShowCarouselItemAriaLabel(item, i, count, labels[i], tI18nComplete('text7ce01e1f5095', { current: i + 1, total: count })), "aria-current": i === currentIndex ? 'true' : undefined, className: cn('shrink-0 rounded-md px-2 py-1 text-xs font-medium', 'transition-[background-color,color,transform] active:scale-[0.96]', i === currentIndex
752
752
  ? 'bg-foreground/10 text-foreground'
753
753
  : 'text-muted-foreground hover:bg-muted/60 hover:text-foreground'), children: _jsx("span", { className: cn(isPortLabel && 'tabular-nums'), children: label }) }, i));
754
- }) }) }), _jsxs("span", { className: "text-muted-foreground shrink-0 pl-1 text-xs tabular-nums", children: [currentIndex + 1, _jsx("span", { className: "text-muted-foreground/40", children: "/" }), count] })] }))] }));
754
+ }) }) }), _jsxs("span", { className: "text-muted-foreground shrink-0 pl-1 text-xs tabular-nums", children: [currentIndex + 1, _jsx("span", { className: "text-muted-foreground", children: "/" }), count] })] }))] }));
755
755
  }
@@ -89,7 +89,7 @@ function getTypeIcon(sqlType) {
89
89
  return _jsx(Calendar, { className: "text-kortix-purple h-3 w-3" });
90
90
  if (t.includes('BLOB') || t.includes('BINARY'))
91
91
  return _jsx(Database, { className: "text-kortix-orange h-3 w-3" });
92
- return _jsx(FileQuestion, { className: "text-muted-foreground/50 h-3 w-3" });
92
+ return _jsx(FileQuestion, { className: "text-muted-foreground h-3 w-3" });
93
93
  }
94
94
  // ── Helpers ──────────────────────────────────────────────────────────────
95
95
  /** Escape a value for a SQL literal. */
@@ -662,7 +662,7 @@ export function SqliteRenderer({ filePath, fileName, className, readOnly = false
662
662
  }, [selectedTable]);
663
663
  // ── Loading state ─────────────────────────────────────────────────────
664
664
  if (isLoading) {
665
- return (_jsx("div", { className: cn('flex h-full w-full items-center justify-center', className), children: _jsxs("div", { className: "flex flex-col items-center gap-3", children: [_jsx(Loading, { className: "text-muted-foreground/40 h-6 w-6" }), _jsx("span", { className: "text-muted-foreground/60 text-sm", children: tHardcodedUi.raw('componentsFileRenderersSqliteRenderer.line733JsxTextLoadingDatabase') })] }) }));
665
+ return (_jsx("div", { className: cn('flex h-full w-full items-center justify-center', className), children: _jsxs("div", { className: "flex flex-col items-center gap-3", children: [_jsx(Loading, { className: "text-muted-foreground h-6 w-6" }), _jsx("span", { className: "text-muted-foreground text-sm", children: tHardcodedUi.raw('componentsFileRenderersSqliteRenderer.line733JsxTextLoadingDatabase') })] }) }));
666
666
  }
667
667
  // ── Error state ───────────────────────────────────────────────────────
668
668
  if (error) {
@@ -673,9 +673,9 @@ export function SqliteRenderer({ filePath, fileName, className, readOnly = false
673
673
  return (_jsx("div", { className: cn('flex h-full w-full items-center justify-center', className), children: _jsxs("div", { className: "space-y-3 text-center", children: [_jsx("div", { className: "bg-muted mx-auto flex h-16 w-16 items-center justify-center rounded-full", children: _jsx(Database, { className: "text-muted-foreground h-8 w-8" }) }), _jsxs("div", { children: [_jsx("h3", { className: "text-foreground text-lg font-medium", children: tHardcodedUi.raw('componentsFileRenderersSqliteRenderer.line772JsxTextEmptyDatabase') }), _jsx("p", { className: "text-muted-foreground text-sm", children: tHardcodedUi.raw('componentsFileRenderersSqliteRenderer.line773JsxTextNoTablesOrViewsFoundInThisDatabase') })] })] }) }));
674
674
  }
675
675
  // ── Main layout ───────────────────────────────────────────────────────
676
- return (_jsxs("div", { className: cn('bg-background relative flex h-full w-full flex-col', className), children: [_jsxs("div", { className: "flex h-10 shrink-0 items-center gap-2 border-b px-3 py-1.5", children: [_jsxs("span", { className: "text-muted-foreground/60 text-xs tabular-nums", children: [tables.filter((t) => t.type === 'table').length, ' ', tHardcodedUi.raw('i18nComplete.text0d4fc4a78d37'), tables.filter((t) => t.type === 'table').length !== 1 ? 's' : '', tables.some((t) => t.type === 'view') && (_jsxs(_Fragment, { children: [' ', "\u00B7 ", tables.filter((t) => t.type === 'view').length, ' ', tHardcodedUi.raw('i18nComplete.text2bcb43cbc8f6'), tables.filter((t) => t.type === 'view').length !== 1 ? 's' : ''] })), _jsxs(_Fragment, { children: [' ', "\u00B7 ", tables.reduce((sum, t) => sum + t.rowCount, 0).toLocaleString(), ' ', tHardcodedUi.raw('i18nComplete.textbc51e9e65d79')] })] }), hasUnsavedChanges && (_jsx("span", { className: "bg-kortix-yellow h-1.5 w-1.5 shrink-0 rounded-full", title: tHardcodedUi.raw('componentsFileRenderersSqliteRenderer.line795JsxAttrTitleUnsavedChanges') })), _jsxs("div", { className: "ml-auto flex items-center gap-1", children: [hasUnsavedChanges && (_jsxs(_Fragment, { children: [_jsxs(Button, { variant: "muted", size: "toolbar", onClick: handleDiscard, title: tHardcodedUi.raw('componentsFileRenderersSqliteRenderer.line806JsxAttrTitleDiscardChanges'), children: [_jsx(Undo2, { className: "h-3 w-3" }), tHardcodedUi.raw('i18nComplete.texteb1a70e39274')] }), _jsxs(Button, { variant: "default", size: "toolbar", onClick: handleSave, disabled: isSaving, title: tHardcodedUi.raw('componentsFileRenderersSqliteRenderer.line816JsxAttrTitleSaveToFileS'), children: [isSaving ? _jsx(Loading, { className: "h-3 w-3" }) : _jsx(Save, { className: "h-3 w-3" }), tHardcodedUi.raw('i18nComplete.text1509f561f241')] })] })), _jsx("div", { className: "bg-muted/60 ml-1 flex items-center rounded-md p-0.5", children: ['data', 'schema', 'query'].map((mode) => (_jsxs("button", { className: cn('inline-flex h-6 cursor-pointer items-center gap-1 rounded-sm px-2 text-xs transition-colors', viewMode === mode
676
+ return (_jsxs("div", { className: cn('bg-background relative flex h-full w-full flex-col', className), children: [_jsxs("div", { className: "flex h-10 shrink-0 items-center gap-2 border-b px-3 py-1.5", children: [_jsxs("span", { className: "text-muted-foreground text-xs tabular-nums", children: [tables.filter((t) => t.type === 'table').length, ' ', tHardcodedUi.raw('i18nComplete.text0d4fc4a78d37'), tables.filter((t) => t.type === 'table').length !== 1 ? 's' : '', tables.some((t) => t.type === 'view') && (_jsxs(_Fragment, { children: [' ', "\u00B7 ", tables.filter((t) => t.type === 'view').length, ' ', tHardcodedUi.raw('i18nComplete.text2bcb43cbc8f6'), tables.filter((t) => t.type === 'view').length !== 1 ? 's' : ''] })), _jsxs(_Fragment, { children: [' ', "\u00B7 ", tables.reduce((sum, t) => sum + t.rowCount, 0).toLocaleString(), ' ', tHardcodedUi.raw('i18nComplete.textbc51e9e65d79')] })] }), hasUnsavedChanges && (_jsx("span", { className: "bg-kortix-yellow h-1.5 w-1.5 shrink-0 rounded-full", title: tHardcodedUi.raw('componentsFileRenderersSqliteRenderer.line795JsxAttrTitleUnsavedChanges') })), _jsxs("div", { className: "ml-auto flex items-center gap-1", children: [hasUnsavedChanges && (_jsxs(_Fragment, { children: [_jsxs(Button, { variant: "muted", size: "toolbar", onClick: handleDiscard, title: tHardcodedUi.raw('componentsFileRenderersSqliteRenderer.line806JsxAttrTitleDiscardChanges'), children: [_jsx(Undo2, { className: "h-3 w-3" }), tHardcodedUi.raw('i18nComplete.texteb1a70e39274')] }), _jsxs(Button, { variant: "default", size: "toolbar", onClick: handleSave, disabled: isSaving, title: tHardcodedUi.raw('componentsFileRenderersSqliteRenderer.line816JsxAttrTitleSaveToFileS'), children: [isSaving ? _jsx(Loading, { className: "h-3 w-3" }) : _jsx(Save, { className: "h-3 w-3" }), tHardcodedUi.raw('i18nComplete.text1509f561f241')] })] })), _jsx("div", { className: "bg-muted/60 ml-1 flex items-center rounded-md p-0.5", children: ['data', 'schema', 'query'].map((mode) => (_jsxs("button", { className: cn('inline-flex h-6 cursor-pointer items-center gap-1 rounded-sm px-2 text-xs transition-colors', viewMode === mode
677
677
  ? 'bg-background text-foreground shadow-sm'
678
- : 'text-muted-foreground/60 hover:text-foreground'), onClick: () => setViewMode(mode), children: [mode === 'data' && _jsx(List, { className: "h-3 w-3" }), mode === 'schema' && _jsx(Code2, { className: "h-3 w-3" }), mode === 'query' && _jsx(Play, { className: "h-3 w-3" }), mode.charAt(0).toUpperCase() + mode.slice(1)] }, mode))) })] })] }), _jsxs("div", { className: "flex flex-1 overflow-hidden", children: [_jsxs("div", { className: "bg-muted/10 flex w-56 shrink-0 flex-col border-r", children: [_jsx("div", { className: "border-b p-2", children: _jsxs("div", { className: "relative", children: [_jsx(Search, { className: "text-muted-foreground/50 absolute top-1/2 left-2 h-3 w-3 -translate-y-1/2" }), _jsx(Input, { type: "text", placeholder: tHardcodedUi.raw('componentsFileRenderersSqliteRenderer.line860JsxAttrPlaceholderFilterTables'), autoComplete: "off", value: tableSearch, onChange: (e) => setTableSearch(e.target.value), className: "h-7 pr-7 pl-7 text-xs" }), tableSearch && (_jsx("button", { onClick: () => setTableSearch(''), "aria-label": tHardcodedUi.raw('i18nComplete.text83b12c2216ef'), className: "text-muted-foreground hover:text-foreground absolute top-1/2 right-2 -translate-y-1/2 cursor-pointer", children: _jsx(X, { className: "h-3 w-3" }) }))] }) }), _jsx("div", { className: "flex-1 overflow-y-auto py-1", children: filteredTables.map((table) => (_jsxs("button", { onClick: () => {
678
+ : 'text-muted-foreground hover:text-foreground'), onClick: () => setViewMode(mode), children: [mode === 'data' && _jsx(List, { className: "h-3 w-3" }), mode === 'schema' && _jsx(Code2, { className: "h-3 w-3" }), mode === 'query' && _jsx(Play, { className: "h-3 w-3" }), mode.charAt(0).toUpperCase() + mode.slice(1)] }, mode))) })] })] }), _jsxs("div", { className: "flex flex-1 overflow-hidden", children: [_jsxs("div", { className: "bg-muted/10 flex w-56 shrink-0 flex-col border-r", children: [_jsx("div", { className: "border-b p-2", children: _jsxs("div", { className: "relative", children: [_jsx(Search, { className: "text-muted-foreground absolute top-1/2 left-2 h-3 w-3 -translate-y-1/2" }), _jsx(Input, { type: "text", placeholder: tHardcodedUi.raw('componentsFileRenderersSqliteRenderer.line860JsxAttrPlaceholderFilterTables'), autoComplete: "off", value: tableSearch, onChange: (e) => setTableSearch(e.target.value), className: "h-7 pr-7 pl-7 text-xs" }), tableSearch && (_jsx("button", { onClick: () => setTableSearch(''), "aria-label": tHardcodedUi.raw('i18nComplete.text83b12c2216ef'), className: "text-muted-foreground hover:text-foreground absolute top-1/2 right-2 -translate-y-1/2 cursor-pointer", children: _jsx(X, { className: "h-3 w-3" }) }))] }) }), _jsx("div", { className: "flex-1 overflow-y-auto py-1", children: filteredTables.map((table) => (_jsxs("button", { onClick: () => {
679
679
  setSelectedTable(table.name);
680
680
  setSearchTerm('');
681
681
  if (viewMode === 'query') {
@@ -683,7 +683,7 @@ export function SqliteRenderer({ filePath, fileName, className, readOnly = false
683
683
  }
684
684
  }, className: cn('flex w-full cursor-pointer items-center gap-2 px-3 py-1.5 text-left text-sm transition-colors', selectedTable === table.name
685
685
  ? 'bg-accent text-accent-foreground'
686
- : 'text-muted-foreground hover:bg-muted/50 hover:text-foreground'), children: [table.type === 'view' ? (_jsx(Eye, { className: "text-kortix-purple h-3.5 w-3.5 shrink-0" })) : (_jsx(Table2, { className: "text-kortix-blue h-3.5 w-3.5 shrink-0" })), _jsx("span", { className: "flex-1 truncate text-xs font-medium", children: table.name }), _jsx("span", { className: "text-muted-foreground/50 shrink-0 text-xs tabular-nums", children: table.rowCount.toLocaleString() })] }, table.name))) }), _jsxs("div", { className: "text-muted-foreground/30 border-t px-3 py-1.5 text-xs tabular-nums", children: [filteredTables.length, "/", tables.length, ' ', tHardcodedUi.raw('i18nComplete.textbaaf53622a51')] })] }), _jsxs("div", { className: "flex flex-1 flex-col overflow-hidden", children: [viewMode === 'data' && selectedTableInfo && (_jsxs(_Fragment, { children: [_jsxs("div", { className: "flex h-9 shrink-0 items-center gap-2 border-b px-3 py-1.5", children: [_jsxs("div", { className: "flex min-w-0 items-center gap-1.5", children: [selectedTableInfo.type === 'view' ? (_jsx(Eye, { className: "text-kortix-purple h-3.5 w-3.5 shrink-0" })) : (_jsx(Table2, { className: "text-kortix-blue h-3.5 w-3.5 shrink-0" })), _jsx("span", { className: "text-foreground truncate text-xs font-medium", children: selectedTableInfo.name }), _jsxs("span", { className: "text-muted-foreground/40 shrink-0 text-xs tabular-nums", children: [selectedTableInfo.rowCount.toLocaleString(), " \u00D7", ' ', selectedTableInfo.columns.length] })] }), _jsxs("div", { className: "ml-auto flex items-center gap-1", children: [isEditable && (_jsxs(_Fragment, { children: [_jsx("button", { className: "text-muted-foreground/50 hover:text-foreground hover:bg-muted inline-flex h-7 w-7 cursor-pointer items-center justify-center rounded-md transition-colors", onClick: handleAddRow, title: tHardcodedUi.raw('componentsFileRenderersSqliteRenderer.line941JsxAttrTitleInsertRow'), children: _jsx(Plus, { className: "h-3.5 w-3.5" }) }), _jsx("button", { className: "text-muted-foreground/50 hover:bg-destructive/10 hover:text-destructive inline-flex h-7 w-7 cursor-pointer items-center justify-center rounded-md transition-colors", onClick: handleDeleteSelected, title: tHardcodedUi.raw('componentsFileRenderersSqliteRenderer.line948JsxAttrTitleDeleteSelectedRows'), children: _jsx(Trash2, { className: "h-3.5 w-3.5" }) }), _jsx("div", { className: "bg-border mx-0.5 h-4 w-px" })] })), _jsxs("div", { className: "relative", children: [_jsx(Search, { className: "text-muted-foreground/40 absolute top-1/2 left-2 h-3 w-3 -translate-y-1/2" }), _jsx(Input, { type: "text", placeholder: tHardcodedUi.raw('componentsFileRenderersSqliteRenderer.line961JsxAttrPlaceholderFilter'), autoComplete: "off", value: searchTerm, onChange: (e) => setSearchTerm(e.target.value), className: "h-7 w-40 pr-7 pl-7 text-xs" }), searchTerm && (_jsx("button", { onClick: () => setSearchTerm(''), "aria-label": tHardcodedUi.raw('i18nComplete.text83b12c2216ef'), className: "text-muted-foreground hover:text-foreground absolute top-1/2 right-2 -translate-y-1/2 cursor-pointer", children: _jsx(X, { className: "h-3 w-3" }) }))] }), _jsx("button", { className: "text-muted-foreground/50 hover:text-foreground hover:bg-muted inline-flex h-7 w-7 cursor-pointer items-center justify-center rounded-md transition-colors", onClick: handleExportCsv, title: tHardcodedUi.raw('componentsFileRenderersSqliteRenderer.line979JsxAttrTitleExportAsCsv'), children: _jsx(Download, { className: "h-3.5 w-3.5" }) })] })] }), _jsx("div", { className: "flex-1 overflow-hidden", children: tableData.rows.length > 0 ? (_jsx("div", { className: "h-full w-full", children: _jsx(AgGridReact, { ref: gridApiRef, theme: agTheme, rowData: tableData.rows, columnDefs: columnDefs, defaultColDef: {
686
+ : 'text-muted-foreground hover:bg-muted/50 hover:text-foreground'), children: [table.type === 'view' ? (_jsx(Eye, { className: "text-kortix-purple h-3.5 w-3.5 shrink-0" })) : (_jsx(Table2, { className: "text-kortix-blue h-3.5 w-3.5 shrink-0" })), _jsx("span", { className: "flex-1 truncate text-xs font-medium", children: table.name }), _jsx("span", { className: "text-muted-foreground shrink-0 text-xs tabular-nums", children: table.rowCount.toLocaleString() })] }, table.name))) }), _jsxs("div", { className: "text-muted-foreground border-t px-3 py-1.5 text-xs tabular-nums", children: [filteredTables.length, "/", tables.length, ' ', tHardcodedUi.raw('i18nComplete.textbaaf53622a51')] })] }), _jsxs("div", { className: "flex flex-1 flex-col overflow-hidden", children: [viewMode === 'data' && selectedTableInfo && (_jsxs(_Fragment, { children: [_jsxs("div", { className: "flex h-9 shrink-0 items-center gap-2 border-b px-3 py-1.5", children: [_jsxs("div", { className: "flex min-w-0 items-center gap-1.5", children: [selectedTableInfo.type === 'view' ? (_jsx(Eye, { className: "text-kortix-purple h-3.5 w-3.5 shrink-0" })) : (_jsx(Table2, { className: "text-kortix-blue h-3.5 w-3.5 shrink-0" })), _jsx("span", { className: "text-foreground truncate text-xs font-medium", children: selectedTableInfo.name }), _jsxs("span", { className: "text-muted-foreground shrink-0 text-xs tabular-nums", children: [selectedTableInfo.rowCount.toLocaleString(), " \u00D7", ' ', selectedTableInfo.columns.length] })] }), _jsxs("div", { className: "ml-auto flex items-center gap-1", children: [isEditable && (_jsxs(_Fragment, { children: [_jsx("button", { className: "text-muted-foreground hover:text-foreground hover:bg-muted inline-flex h-7 w-7 cursor-pointer items-center justify-center rounded-md transition-colors", onClick: handleAddRow, title: tHardcodedUi.raw('componentsFileRenderersSqliteRenderer.line941JsxAttrTitleInsertRow'), children: _jsx(Plus, { className: "h-3.5 w-3.5" }) }), _jsx("button", { className: "text-muted-foreground hover:bg-destructive/10 hover:text-destructive inline-flex h-7 w-7 cursor-pointer items-center justify-center rounded-md transition-colors", onClick: handleDeleteSelected, title: tHardcodedUi.raw('componentsFileRenderersSqliteRenderer.line948JsxAttrTitleDeleteSelectedRows'), children: _jsx(Trash2, { className: "h-3.5 w-3.5" }) }), _jsx("div", { className: "bg-border mx-0.5 h-4 w-px" })] })), _jsxs("div", { className: "relative", children: [_jsx(Search, { className: "text-muted-foreground absolute top-1/2 left-2 h-3 w-3 -translate-y-1/2" }), _jsx(Input, { type: "text", placeholder: tHardcodedUi.raw('componentsFileRenderersSqliteRenderer.line961JsxAttrPlaceholderFilter'), autoComplete: "off", value: searchTerm, onChange: (e) => setSearchTerm(e.target.value), className: "h-7 w-40 pr-7 pl-7 text-xs" }), searchTerm && (_jsx("button", { onClick: () => setSearchTerm(''), "aria-label": tHardcodedUi.raw('i18nComplete.text83b12c2216ef'), className: "text-muted-foreground hover:text-foreground absolute top-1/2 right-2 -translate-y-1/2 cursor-pointer", children: _jsx(X, { className: "h-3 w-3" }) }))] }), _jsx("button", { className: "text-muted-foreground hover:text-foreground hover:bg-muted inline-flex h-7 w-7 cursor-pointer items-center justify-center rounded-md transition-colors", onClick: handleExportCsv, title: tHardcodedUi.raw('componentsFileRenderersSqliteRenderer.line979JsxAttrTitleExportAsCsv'), children: _jsx(Download, { className: "h-3.5 w-3.5" }) })] })] }), _jsx("div", { className: "flex-1 overflow-hidden", children: tableData.rows.length > 0 ? (_jsx("div", { className: "h-full w-full", children: _jsx(AgGridReact, { ref: gridApiRef, theme: agTheme, rowData: tableData.rows, columnDefs: columnDefs, defaultColDef: {
687
687
  sortable: true,
688
688
  filter: true,
689
689
  resizable: true,
@@ -719,14 +719,14 @@ export function SqliteRenderer({ filePath, fileName, className, readOnly = false
719
719
  /* ignore */
720
720
  }
721
721
  }
722
- }, overlayNoRowsTemplate: tHardcodedUi.raw('componentsFileRenderersSqliteRenderer.line1035JsxAttrOverlaynorowstemplateSpanClassTextMutedForegroundTextSmNo') }, `${selectedTable}-${dataVersion}`) })) : (_jsx("div", { className: "text-muted-foreground flex h-full w-full items-center justify-center text-sm", children: tHardcodedUi.raw('componentsFileRenderersSqliteRenderer.line1040JsxTextNoDataInThisTable') })) })] })), viewMode === 'schema' && selectedTableInfo && (_jsxs("div", { className: "flex-1 space-y-4 overflow-auto p-4", children: [_jsxs("div", { className: "space-y-2", children: [_jsxs("div", { className: "flex items-center justify-between", children: [_jsx("h3", { className: "text-muted-foreground text-xs font-medium", children: tHardcodedUi.raw('componentsFileRenderersSqliteRenderer.line1054JsxTextCreateStatement') }), _jsxs(Button, { variant: "muted", size: "xs", onClick: handleCopySchema, children: [copied ? (_jsx(Check, { className: "text-kortix-green h-3 w-3" })) : (_jsx(Copy, { className: "h-3 w-3" })), copied ? 'Copied' : 'Copy'] })] }), _jsx("pre", { className: "bg-muted/50 text-muted-foreground overflow-x-auto rounded-md border p-4 font-mono text-xs whitespace-pre-wrap select-text", children: selectedTableInfo.sql || tHardcodedUi.raw('i18nComplete.text86dcb7f9e791') })] }), _jsxs("div", { className: "space-y-2", children: [_jsxs("h3", { className: "text-muted-foreground text-xs font-medium", children: [tHardcodedUi.raw('componentsFileRenderersSqliteRenderer.line1077JsxTextColumns'), selectedTableInfo.columns.length, ")"] }), _jsx("div", { className: "overflow-hidden rounded-md border", children: _jsxs("table", { className: "w-full text-xs", children: [_jsx("thead", { children: _jsxs("tr", { className: "bg-muted/50 border-b", children: [_jsx("th", { className: "text-muted-foreground w-8 px-3 py-2 text-left font-medium", children: "#" }), _jsx("th", { className: "text-muted-foreground px-3 py-2 text-left font-medium", children: tHardcodedUi.raw('i18nComplete.textdcd1d5223f73') }), _jsx("th", { className: "text-muted-foreground px-3 py-2 text-left font-medium", children: tHardcodedUi.raw('i18nComplete.textbaaddf70fb5d') }), _jsx("th", { className: "text-muted-foreground w-16 px-3 py-2 text-center font-medium", children: "PK" }), _jsx("th", { className: "text-muted-foreground w-20 px-3 py-2 text-center font-medium", children: tHardcodedUi.raw('componentsFileRenderersSqliteRenderer.line1087JsxTextNotNull') }), _jsx("th", { className: "text-muted-foreground px-3 py-2 text-left font-medium", children: tHardcodedUi.raw('i18nComplete.text21b111cbfe6e') })] }) }), _jsx("tbody", { children: selectedTableInfo.columns.map((col) => (_jsxs("tr", { className: "hover:bg-muted/30 border-b transition-colors last:border-0", children: [_jsx("td", { className: "text-muted-foreground/50 px-3 py-2 tabular-nums", children: col.cid }), _jsx("td", { className: "text-foreground px-3 py-2 font-medium", children: _jsxs("span", { className: "inline-flex items-center gap-1.5", children: [col.pk && _jsx(Key, { className: "text-kortix-orange h-3 w-3" }), col.name] }) }), _jsx("td", { className: "px-3 py-2", children: _jsxs("span", { className: "inline-flex items-center gap-1", children: [getTypeIcon(col.type), _jsx("span", { className: "text-muted-foreground font-mono", children: col.type || 'ANY' })] }) }), _jsx("td", { className: "px-3 py-2 text-center", children: col.pk && (_jsx("span", { className: "bg-kortix-orange/10 text-kortix-orange inline-flex h-4 w-4 items-center justify-center rounded-full text-xs font-semibold", children: "\u2713" })) }), _jsx("td", { className: "px-3 py-2 text-center", children: col.notnull && (_jsx("span", { className: "bg-destructive/10 text-destructive inline-flex h-4 w-4 items-center justify-center rounded-full text-xs font-semibold", children: "\u2713" })) }), _jsx("td", { className: "text-muted-foreground/60 px-3 py-2 font-mono", children: col.dflt_value ?? '—' })] }, col.cid))) })] }) })] }), _jsxs("div", { className: "flex items-center gap-4 text-xs", children: [_jsxs("div", { className: "flex items-center gap-1.5", children: [_jsx("span", { className: "text-muted-foreground/50", children: tHardcodedUi.raw('i18nComplete.text101f2ff3de22') }), _jsx("span", { className: "font-medium tabular-nums", children: selectedTableInfo.rowCount.toLocaleString() })] }), _jsxs("div", { className: "flex items-center gap-1.5", children: [_jsx("span", { className: "text-muted-foreground/50", children: tHardcodedUi.raw('i18nComplete.text53aade77cd69') }), _jsx("span", { className: "font-medium tabular-nums", children: selectedTableInfo.columns.length })] }), selectedTableInfo.columns.some((c) => c.pk) && (_jsxs("div", { className: "flex items-center gap-1.5", children: [_jsx("span", { className: "text-muted-foreground/50", children: tHardcodedUi.raw('componentsFileRenderersSqliteRenderer.line1146JsxTextPrimaryKeys') }), _jsx("span", { className: "font-medium tabular-nums", children: selectedTableInfo.columns.filter((c) => c.pk).length })] })), selectedTableInfo.columns.some((c) => c.notnull) && (_jsxs("div", { className: "flex items-center gap-1.5", children: [_jsx("span", { className: "text-muted-foreground/50", children: tHardcodedUi.raw('componentsFileRenderersSqliteRenderer.line1152JsxTextNotNull') }), _jsx("span", { className: "font-medium tabular-nums", children: selectedTableInfo.columns.filter((c) => c.notnull).length })] }))] })] })), viewMode === 'query' && (_jsxs("div", { className: "flex flex-1 flex-col overflow-hidden", children: [_jsxs("div", { className: "shrink-0 space-y-2 border-b p-3", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx("span", { className: "text-muted-foreground/50 text-xs", children: "SQL" }), _jsxs("div", { className: "ml-auto flex items-center gap-1.5", children: [_jsxs("span", { className: "text-muted-foreground/30 text-xs", children: [typeof navigator !== 'undefined' && navigator.platform?.includes('Mac')
722
+ }, overlayNoRowsTemplate: tHardcodedUi.raw('componentsFileRenderersSqliteRenderer.line1035JsxAttrOverlaynorowstemplateSpanClassTextMutedForegroundTextSmNo') }, `${selectedTable}-${dataVersion}`) })) : (_jsx("div", { className: "text-muted-foreground flex h-full w-full items-center justify-center text-sm", children: tHardcodedUi.raw('componentsFileRenderersSqliteRenderer.line1040JsxTextNoDataInThisTable') })) })] })), viewMode === 'schema' && selectedTableInfo && (_jsxs("div", { className: "flex-1 space-y-4 overflow-auto p-4", children: [_jsxs("div", { className: "space-y-2", children: [_jsxs("div", { className: "flex items-center justify-between", children: [_jsx("h3", { className: "text-muted-foreground text-xs font-medium", children: tHardcodedUi.raw('componentsFileRenderersSqliteRenderer.line1054JsxTextCreateStatement') }), _jsxs(Button, { variant: "muted", size: "xs", onClick: handleCopySchema, children: [copied ? (_jsx(Check, { className: "text-kortix-green h-3 w-3" })) : (_jsx(Copy, { className: "h-3 w-3" })), copied ? 'Copied' : 'Copy'] })] }), _jsx("pre", { className: "bg-muted/50 text-muted-foreground overflow-x-auto rounded-md border p-4 font-mono text-xs whitespace-pre-wrap select-text", children: selectedTableInfo.sql || tHardcodedUi.raw('i18nComplete.text86dcb7f9e791') })] }), _jsxs("div", { className: "space-y-2", children: [_jsxs("h3", { className: "text-muted-foreground text-xs font-medium", children: [tHardcodedUi.raw('componentsFileRenderersSqliteRenderer.line1077JsxTextColumns'), selectedTableInfo.columns.length, ")"] }), _jsx("div", { className: "overflow-hidden rounded-md border", children: _jsxs("table", { className: "w-full text-xs", children: [_jsx("thead", { children: _jsxs("tr", { className: "bg-muted/50 border-b", children: [_jsx("th", { className: "text-muted-foreground w-8 px-3 py-2 text-left font-medium", children: "#" }), _jsx("th", { className: "text-muted-foreground px-3 py-2 text-left font-medium", children: tHardcodedUi.raw('i18nComplete.textdcd1d5223f73') }), _jsx("th", { className: "text-muted-foreground px-3 py-2 text-left font-medium", children: tHardcodedUi.raw('i18nComplete.textbaaddf70fb5d') }), _jsx("th", { className: "text-muted-foreground w-16 px-3 py-2 text-center font-medium", children: "PK" }), _jsx("th", { className: "text-muted-foreground w-20 px-3 py-2 text-center font-medium", children: tHardcodedUi.raw('componentsFileRenderersSqliteRenderer.line1087JsxTextNotNull') }), _jsx("th", { className: "text-muted-foreground px-3 py-2 text-left font-medium", children: tHardcodedUi.raw('i18nComplete.text21b111cbfe6e') })] }) }), _jsx("tbody", { children: selectedTableInfo.columns.map((col) => (_jsxs("tr", { className: "hover:bg-muted/30 border-b transition-colors last:border-0", children: [_jsx("td", { className: "text-muted-foreground px-3 py-2 tabular-nums", children: col.cid }), _jsx("td", { className: "text-foreground px-3 py-2 font-medium", children: _jsxs("span", { className: "inline-flex items-center gap-1.5", children: [col.pk && _jsx(Key, { className: "text-kortix-orange h-3 w-3" }), col.name] }) }), _jsx("td", { className: "px-3 py-2", children: _jsxs("span", { className: "inline-flex items-center gap-1", children: [getTypeIcon(col.type), _jsx("span", { className: "text-muted-foreground font-mono", children: col.type || 'ANY' })] }) }), _jsx("td", { className: "px-3 py-2 text-center", children: col.pk && (_jsx("span", { className: "bg-kortix-orange/10 text-kortix-orange inline-flex h-4 w-4 items-center justify-center rounded-full text-xs font-semibold", children: "\u2713" })) }), _jsx("td", { className: "px-3 py-2 text-center", children: col.notnull && (_jsx("span", { className: "bg-destructive/10 text-destructive inline-flex h-4 w-4 items-center justify-center rounded-full text-xs font-semibold", children: "\u2713" })) }), _jsx("td", { className: "text-muted-foreground px-3 py-2 font-mono", children: col.dflt_value ?? '—' })] }, col.cid))) })] }) })] }), _jsxs("div", { className: "flex items-center gap-4 text-xs", children: [_jsxs("div", { className: "flex items-center gap-1.5", children: [_jsx("span", { className: "text-muted-foreground", children: tHardcodedUi.raw('i18nComplete.text101f2ff3de22') }), _jsx("span", { className: "font-medium tabular-nums", children: selectedTableInfo.rowCount.toLocaleString() })] }), _jsxs("div", { className: "flex items-center gap-1.5", children: [_jsx("span", { className: "text-muted-foreground", children: tHardcodedUi.raw('i18nComplete.text53aade77cd69') }), _jsx("span", { className: "font-medium tabular-nums", children: selectedTableInfo.columns.length })] }), selectedTableInfo.columns.some((c) => c.pk) && (_jsxs("div", { className: "flex items-center gap-1.5", children: [_jsx("span", { className: "text-muted-foreground", children: tHardcodedUi.raw('componentsFileRenderersSqliteRenderer.line1146JsxTextPrimaryKeys') }), _jsx("span", { className: "font-medium tabular-nums", children: selectedTableInfo.columns.filter((c) => c.pk).length })] })), selectedTableInfo.columns.some((c) => c.notnull) && (_jsxs("div", { className: "flex items-center gap-1.5", children: [_jsx("span", { className: "text-muted-foreground", children: tHardcodedUi.raw('componentsFileRenderersSqliteRenderer.line1152JsxTextNotNull') }), _jsx("span", { className: "font-medium tabular-nums", children: selectedTableInfo.columns.filter((c) => c.notnull).length })] }))] })] })), viewMode === 'query' && (_jsxs("div", { className: "flex flex-1 flex-col overflow-hidden", children: [_jsxs("div", { className: "shrink-0 space-y-2 border-b p-3", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx("span", { className: "text-muted-foreground text-xs", children: "SQL" }), _jsxs("div", { className: "ml-auto flex items-center gap-1.5", children: [_jsxs("span", { className: "text-muted-foreground text-xs", children: [typeof navigator !== 'undefined' && navigator.platform?.includes('Mac')
723
723
  ? '⌘'
724
724
  : 'Ctrl', tHardcodedUi.raw('componentsFileRenderersSqliteRenderer.line1169JsxTextEnter')] }), _jsxs("button", { className: cn('inline-flex h-7 cursor-pointer items-center gap-1 rounded-md px-2.5 text-xs transition-colors', sqlQuery.trim()
725
725
  ? 'bg-primary text-primary-foreground hover:bg-primary/90'
726
- : 'bg-muted text-muted-foreground cursor-not-allowed'), onClick: runQuery, disabled: isQueryRunning || !sqlQuery.trim(), children: [isQueryRunning ? (_jsx(Loading, { className: "h-3 w-3" })) : (_jsx(Play, { className: "h-3 w-3" })), tHardcodedUi.raw('i18nComplete.text00d60e31a4e6')] })] })] }), _jsx("textarea", { value: sqlQuery, onChange: (e) => setSqlQuery(e.target.value), onKeyDown: handleQueryKeyDown, placeholder: `SELECT * FROM "${selectedTable || 'table_name'}" LIMIT 100`, className: cn('bg-muted/30 h-24 w-full cursor-text rounded-md border px-3 py-2 font-mono text-xs', 'focus:ring-ring resize-none focus:ring-1 focus:outline-none', 'placeholder:text-muted-foreground/30'), spellCheck: false })] }), _jsxs("div", { className: "flex flex-1 flex-col overflow-hidden", children: [queryResult?.error && (_jsxs("div", { className: "border-destructive/20 bg-destructive/5 text-destructive shrink-0 border-b px-4 py-2 font-mono text-xs select-text", children: [tHardcodedUi.raw('i18nComplete.text617062906764'), " ", queryResult.error] })), queryResult && !queryResult.error && (_jsxs("div", { className: "text-muted-foreground flex shrink-0 items-center gap-2 border-b px-3 py-1.5 text-xs", children: [_jsxs("span", { children: [queryResult.rowCount.toLocaleString(), ' ', tHardcodedUi.raw('i18nComplete.text634768dae147'), queryResult.rowCount !== 1 ? 's' : ''] }), _jsx("span", { className: "text-muted-foreground/30", children: "\u00B7" }), _jsxs("span", { children: [queryResult.time.toFixed(1), tHardcodedUi.raw('i18nComplete.textf785c3ce1d58')] })] })), queryResult && queryResult.rows.length > 0 && (_jsx("div", { className: "flex-1 overflow-hidden", children: _jsx(Suspense, { fallback: _jsx(GridFallback, {}), children: _jsx(DataGrid, { rowData: queryResult.rows, className: "h-full" }, `query-${queryResult.time}`) }) })), !queryResult && (_jsx("div", { className: "flex flex-1 items-center justify-center", children: _jsxs("div", { className: "space-y-2 text-center", children: [_jsx(Play, { className: "text-muted-foreground/20 mx-auto h-8 w-8" }), _jsx("p", { className: "text-muted-foreground/40 text-sm", children: tHardcodedUi.raw('componentsFileRenderersSqliteRenderer.line1237JsxTextWriteAQueryAndPressRun') })] }) })), queryResult && queryResult.rows.length === 0 && !queryResult.error && (_jsx("div", { className: "flex flex-1 items-center justify-center", children: _jsxs("p", { className: "text-muted-foreground/40 text-sm", children: [tHardcodedUi.raw('componentsFileRenderersSqliteRenderer.line1246JsxTextQueryReturnedNoRows'), queryResult.time.toFixed(1), tHardcodedUi.raw('i18nComplete.text9e7d85a50dc3')] }) }))] })] }))] })] }), expandedCell && (_jsx("div", { role: "presentation", className: "absolute inset-0 z-50 flex items-center justify-center bg-black/40 p-6 backdrop-blur-[2px]", onClick: (e) => {
726
+ : 'bg-muted text-muted-foreground cursor-not-allowed'), onClick: runQuery, disabled: isQueryRunning || !sqlQuery.trim(), children: [isQueryRunning ? (_jsx(Loading, { className: "h-3 w-3" })) : (_jsx(Play, { className: "h-3 w-3" })), tHardcodedUi.raw('i18nComplete.text00d60e31a4e6')] })] })] }), _jsx("textarea", { value: sqlQuery, onChange: (e) => setSqlQuery(e.target.value), onKeyDown: handleQueryKeyDown, placeholder: `SELECT * FROM "${selectedTable || 'table_name'}" LIMIT 100`, className: cn('bg-muted/30 h-24 w-full cursor-text rounded-md border px-3 py-2 font-mono text-xs', 'focus:ring-ring resize-none focus:ring-1 focus:outline-none', 'placeholder:text-muted-foreground'), spellCheck: false })] }), _jsxs("div", { className: "flex flex-1 flex-col overflow-hidden", children: [queryResult?.error && (_jsxs("div", { className: "border-destructive/20 bg-destructive/5 text-destructive shrink-0 border-b px-4 py-2 font-mono text-xs select-text", children: [tHardcodedUi.raw('i18nComplete.text617062906764'), " ", queryResult.error] })), queryResult && !queryResult.error && (_jsxs("div", { className: "text-muted-foreground flex shrink-0 items-center gap-2 border-b px-3 py-1.5 text-xs", children: [_jsxs("span", { children: [queryResult.rowCount.toLocaleString(), ' ', tHardcodedUi.raw('i18nComplete.text634768dae147'), queryResult.rowCount !== 1 ? 's' : ''] }), _jsx("span", { className: "text-muted-foreground", children: "\u00B7" }), _jsxs("span", { children: [queryResult.time.toFixed(1), tHardcodedUi.raw('i18nComplete.textf785c3ce1d58')] })] })), queryResult && queryResult.rows.length > 0 && (_jsx("div", { className: "flex-1 overflow-hidden", children: _jsx(Suspense, { fallback: _jsx(GridFallback, {}), children: _jsx(DataGrid, { rowData: queryResult.rows, className: "h-full" }, `query-${queryResult.time}`) }) })), !queryResult && (_jsx("div", { className: "flex flex-1 items-center justify-center", children: _jsxs("div", { className: "space-y-2 text-center", children: [_jsx(Play, { className: "text-muted-foreground mx-auto h-8 w-8" }), _jsx("p", { className: "text-muted-foreground text-sm", children: tHardcodedUi.raw('componentsFileRenderersSqliteRenderer.line1237JsxTextWriteAQueryAndPressRun') })] }) })), queryResult && queryResult.rows.length === 0 && !queryResult.error && (_jsx("div", { className: "flex flex-1 items-center justify-center", children: _jsxs("p", { className: "text-muted-foreground text-sm", children: [tHardcodedUi.raw('componentsFileRenderersSqliteRenderer.line1246JsxTextQueryReturnedNoRows'), queryResult.time.toFixed(1), tHardcodedUi.raw('i18nComplete.text9e7d85a50dc3')] }) }))] })] }))] })] }), expandedCell && (_jsx("div", { role: "presentation", className: "absolute inset-0 z-50 flex items-center justify-center bg-black/40 p-6 backdrop-blur-[2px]", onClick: (e) => {
727
727
  if (e.target === e.currentTarget)
728
728
  setExpandedCell(null);
729
729
  else
730
730
  e.stopPropagation();
731
- }, children: _jsxs("div", { className: "bg-background border-border/60 flex max-h-[70vh] w-full max-w-xl flex-col overflow-hidden rounded-md border shadow-xl", children: [_jsxs("div", { className: "flex items-center justify-between border-b px-4 py-2.5", children: [_jsxs("div", { className: "flex min-w-0 items-center gap-2", children: [_jsx("span", { className: "text-muted-foreground truncate font-mono text-xs", children: expandedCell.column }), _jsxs("span", { className: "text-muted-foreground/30 shrink-0 text-xs tabular-nums", children: [tHardcodedUi.raw('i18nComplete.text634768dae147'), " ", expandedCell.rowIndex + 1] })] }), _jsxs("div", { className: "flex shrink-0 items-center gap-1", children: [isEditable && expandedEditValue !== expandedCell.value && (_jsxs(Button, { variant: "default", size: "toolbar", onClick: handleExpandedSave, children: [_jsx(Check, { className: "h-3 w-3" }), tHardcodedUi.raw('i18nComplete.text31e392d1c037')] })), _jsx(Button, { onClick: () => setExpandedCell(null), variant: "ghost", size: "icon-sm", children: _jsx(X, { className: "h-3.5 w-3.5" }) })] })] }), _jsx("div", { className: "flex-1 overflow-auto", children: isEditable ? (_jsx("textarea", { value: expandedEditValue, onChange: (e) => setExpandedEditValue(e.target.value), className: cn('h-full min-h-[180px] w-full cursor-text bg-transparent p-4 font-mono text-sm', 'resize-none focus:outline-none', 'placeholder:text-muted-foreground/20'), placeholder: "NULL", "aria-label": `${expandedCell.column} value`, spellCheck: false, autoFocus: true })) : (_jsx("pre", { className: "text-muted-foreground min-h-[180px] p-4 font-mono text-sm break-all whitespace-pre-wrap select-text", children: expandedCell.value || (_jsx("span", { className: "text-muted-foreground/30 italic", children: "NULL" })) })) }), _jsxs("div", { className: "text-muted-foreground/30 border-t px-4 py-1.5 text-xs tabular-nums", children: [expandedEditValue.length.toLocaleString(), ' ', tHardcodedUi.raw('i18nComplete.text1ce93dacbcf4')] })] }) }))] }));
731
+ }, children: _jsxs("div", { className: "bg-background border-border/60 flex max-h-[70vh] w-full max-w-xl flex-col overflow-hidden rounded-md border shadow-xl", children: [_jsxs("div", { className: "flex items-center justify-between border-b px-4 py-2.5", children: [_jsxs("div", { className: "flex min-w-0 items-center gap-2", children: [_jsx("span", { className: "text-muted-foreground truncate font-mono text-xs", children: expandedCell.column }), _jsxs("span", { className: "text-muted-foreground shrink-0 text-xs tabular-nums", children: [tHardcodedUi.raw('i18nComplete.text634768dae147'), " ", expandedCell.rowIndex + 1] })] }), _jsxs("div", { className: "flex shrink-0 items-center gap-1", children: [isEditable && expandedEditValue !== expandedCell.value && (_jsxs(Button, { variant: "default", size: "toolbar", onClick: handleExpandedSave, children: [_jsx(Check, { className: "h-3 w-3" }), tHardcodedUi.raw('i18nComplete.text31e392d1c037')] })), _jsx(Button, { onClick: () => setExpandedCell(null), variant: "ghost", size: "icon-sm", children: _jsx(X, { className: "h-3.5 w-3.5" }) })] })] }), _jsx("div", { className: "flex-1 overflow-auto", children: isEditable ? (_jsx("textarea", { value: expandedEditValue, onChange: (e) => setExpandedEditValue(e.target.value), className: cn('h-full min-h-[180px] w-full cursor-text bg-transparent p-4 font-mono text-sm', 'resize-none focus:outline-none', 'placeholder:text-muted-foreground'), placeholder: "NULL", "aria-label": `${expandedCell.column} value`, spellCheck: false, autoFocus: true })) : (_jsx("pre", { className: "text-muted-foreground min-h-[180px] p-4 font-mono text-sm break-all whitespace-pre-wrap select-text", children: expandedCell.value || (_jsx("span", { className: "text-muted-foreground italic", children: "NULL" })) })) }), _jsxs("div", { className: "text-muted-foreground border-t px-4 py-1.5 text-xs tabular-nums", children: [expandedEditValue.length.toLocaleString(), ' ', tHardcodedUi.raw('i18nComplete.text1ce93dacbcf4')] })] }) }))] }));
732
732
  }
@@ -226,7 +226,7 @@ function EntryPreview({ zip, entry }) {
226
226
  const tooBig = kind !== 'none' && entry.size > MAX_ZIP_PREVIEW_BYTES;
227
227
  return (_jsxs(Centered, { children: [_jsx(FileXIcon, { className: "size-5" }), _jsx("span", { children: tooBig
228
228
  ? tI18nComplete('textf37bf4f7a338', { value0: formatFileSize(entry.size) })
229
- : tI18nComplete.raw('text05b10b151f65') }), _jsx("span", { className: "text-muted-foreground/70 text-xs", children: tI18nComplete.raw('text43f9e1786f27') })] }));
229
+ : tI18nComplete.raw('text05b10b151f65') }), _jsx("span", { className: "text-muted-foreground text-xs", children: tI18nComplete.raw('text43f9e1786f27') })] }));
230
230
  }
231
231
  if (failed) {
232
232
  return (_jsxs(Centered, { children: [_jsx(FileXIcon, { className: "size-5" }), _jsx("span", { children: tI18nComplete.raw('text5a219a418ec7') })] }));
@@ -313,5 +313,5 @@ export function ZipRenderer({ blob, fileName, className, }) {
313
313
  return (_jsxs("div", { className: cn('flex h-full min-h-0 flex-col', className), children: [_jsxs("div", { className: "flex shrink-0 items-center gap-2 border-b px-2.5 py-2", children: [_jsx(Hint, { label: tI18nComplete.raw('text644c438ba508'), side: "bottom", children: _jsx(Button, { variant: "ghost", size: "icon", "aria-label": tI18nComplete.raw('text644c438ba508'), onClick: () => setSelected(null), className: "size-7 active:scale-[0.96]", children: _jsx(ArrowLeftIcon, { className: "size-3.5" }) }) }), getFileIcon(selected.name, { className: 'size-4 shrink-0' }), _jsx("span", { className: "text-foreground min-w-0 flex-1 truncate text-sm", title: selected.path, children: selected.path }), _jsx("span", { className: "text-muted-foreground shrink-0 text-xs tabular-nums", children: formatFileSize(selected.size) }), _jsx(Hint, { label: tI18nComplete.raw('textc15301c0e647'), side: "bottom", children: _jsx(Button, { variant: "ghost", size: "icon", "aria-label": `Extract ${selected.name}`, onClick: () => void extract(selected), className: "size-7 active:scale-[0.96]", children: _jsx(Download, { className: "size-3.5" }) }) })] }), _jsx("div", { className: "min-h-0 min-w-0 flex-1 overflow-auto", children: _jsx(EntryPreview, { zip: loaded.zip, entry: selected }, selected.path) })] }));
314
314
  }
315
315
  // ── The archive's tree ────────────────────────────────────────────────────
316
- return (_jsxs("div", { className: cn('flex h-full min-h-0 flex-col', className), children: [_jsxs("div", { className: "flex shrink-0 items-center justify-between gap-2 border-b py-1.5 pr-2 pl-3.5", children: [_jsxs("div", { className: "text-muted-foreground flex min-w-0 items-center gap-1.5 overflow-hidden text-xs", children: [_jsxs("span", { className: "tabular-nums", children: [summary.files, " ", summary.files === 1 ? 'file' : 'files'] }), summary.folders > 0 && (_jsxs(_Fragment, { children: [_jsx("span", { className: "text-muted-foreground/40", children: tI18nComplete.raw('text3b9453dad42b') }), _jsxs("span", { className: "tabular-nums", children: [summary.folders, " ", summary.folders === 1 ? 'folder' : 'folders'] })] })), _jsx("span", { className: "text-muted-foreground/40", children: tI18nComplete.raw('text3b9453dad42b') }), _jsxs("span", { className: "tabular-nums", children: [formatFileSize(summary.bytes), " ", tI18nComplete.raw('text83055ac70034')] }), loaded.truncated > 0 && (_jsxs(_Fragment, { children: [_jsx("span", { className: "text-muted-foreground/40", children: tI18nComplete.raw('text3b9453dad42b') }), _jsxs("span", { className: "text-kortix-orange tabular-nums", children: [loaded.truncated, " ", tI18nComplete.raw('text37023affd996')] })] }))] }), _jsx(DownloadArchiveButton, { blob: blob, fileName: fileName })] }), _jsx("div", { className: "min-h-0 flex-1 overflow-auto py-1", children: summary.files === 0 ? (_jsx(Centered, { children: _jsx("span", { children: tI18nComplete.raw('text49b0393b0546') }) })) : (_jsx(FolderContents, { folder: loaded.root, depth: 0, openFolders: openFolders, onToggle: toggleFolder, onOpen: setSelected })) })] }));
316
+ return (_jsxs("div", { className: cn('flex h-full min-h-0 flex-col', className), children: [_jsxs("div", { className: "flex shrink-0 items-center justify-between gap-2 border-b py-1.5 pr-2 pl-3.5", children: [_jsxs("div", { className: "text-muted-foreground flex min-w-0 items-center gap-1.5 overflow-hidden text-xs", children: [_jsxs("span", { className: "tabular-nums", children: [summary.files, " ", summary.files === 1 ? 'file' : 'files'] }), summary.folders > 0 && (_jsxs(_Fragment, { children: [_jsx("span", { className: "text-muted-foreground", children: tI18nComplete.raw('text3b9453dad42b') }), _jsxs("span", { className: "tabular-nums", children: [summary.folders, " ", summary.folders === 1 ? 'folder' : 'folders'] })] })), _jsx("span", { className: "text-muted-foreground", children: tI18nComplete.raw('text3b9453dad42b') }), _jsxs("span", { className: "tabular-nums", children: [formatFileSize(summary.bytes), " ", tI18nComplete.raw('text83055ac70034')] }), loaded.truncated > 0 && (_jsxs(_Fragment, { children: [_jsx("span", { className: "text-muted-foreground", children: tI18nComplete.raw('text3b9453dad42b') }), _jsxs("span", { className: "text-kortix-orange tabular-nums", children: [loaded.truncated, " ", tI18nComplete.raw('text37023affd996')] })] }))] }), _jsx(DownloadArchiveButton, { blob: blob, fileName: fileName })] }), _jsx("div", { className: "min-h-0 flex-1 overflow-auto py-1", children: summary.files === 0 ? (_jsx(Centered, { children: _jsx("span", { children: tI18nComplete.raw('text49b0393b0546') }) })) : (_jsx(FolderContents, { folder: loaded.root, depth: 0, openFolders: openFolders, onToggle: toggleFolder, onOpen: setSelected })) })] }));
317
317
  }
@@ -41,7 +41,7 @@ const ZipRenderer = lazy(() => import('../renderers/zip/zip-renderer.js').then((
41
41
  // ---------------------------------------------------------------------------
42
42
  /** Spinner placeholder used inside <Suspense> for lazy-loaded renderers. */
43
43
  function RendererFallback() {
44
- return (_jsx("div", { className: "flex h-full items-center justify-center", children: _jsx(Loading, { className: "text-muted-foreground/40 h-4 w-4" }) }));
44
+ return (_jsx("div", { className: "flex h-full items-center justify-center", children: _jsx(Loading, { className: "text-muted-foreground h-4 w-4" }) }));
45
45
  }
46
46
  /** kortix-brand `motion.easing.out`: enter and exit. */
47
47
  const EASE_OUT = [0, 0, 0.2, 1];
@@ -75,7 +75,7 @@ function CaptionedImage({ caption, open, onOpenChange, children, }) {
75
75
  /** Shared "file does not exist" UI shown when a file cannot be loaded. */
76
76
  function FileNotFoundState({ filePath }) {
77
77
  const tHardcodedUi = useTranslations('hardcodedUi');
78
- return (_jsxs("div", { className: "flex h-full flex-col items-center justify-center gap-3 p-8 text-center", children: [_jsx("div", { className: "bg-muted/50 flex h-12 w-12 items-center justify-center rounded-sm", children: _jsx(FileX, { className: "text-muted-foreground/40 h-6 w-6" }) }), _jsx("p", { className: "text-muted-foreground text-sm font-medium", children: tHardcodedUi.raw('featuresFilesComponentsFileContentRenderer.line195JsxTextFileNotFound') }), _jsx("p", { className: "text-muted-foreground/50 max-w-sm font-mono text-xs break-all", children: filePath }), _jsx("p", { className: "text-muted-foreground/40 max-w-xs text-xs", children: tHardcodedUi.raw('featuresFilesComponentsFileContentRenderer.line201JsxTextThisFileDoesNotExistOrMayHave') })] }));
78
+ return (_jsxs("div", { className: "flex h-full flex-col items-center justify-center gap-3 p-8 text-center", children: [_jsx("div", { className: "bg-muted/50 flex h-12 w-12 items-center justify-center rounded-sm", children: _jsx(FileX, { className: "text-muted-foreground h-6 w-6" }) }), _jsx("p", { className: "text-muted-foreground text-sm font-medium", children: tHardcodedUi.raw('featuresFilesComponentsFileContentRenderer.line195JsxTextFileNotFound') }), _jsx("p", { className: "text-muted-foreground max-w-sm font-mono text-xs break-all", children: filePath }), _jsx("p", { className: "text-muted-foreground max-w-xs text-xs", children: tHardcodedUi.raw('featuresFilesComponentsFileContentRenderer.line201JsxTextThisFileDoesNotExistOrMayHave') })] }));
79
79
  }
80
80
  export function FileContentRenderer({ filePath, showHeader = true, headerSlot, headerActions, onUnsavedChange, onSaved, className, errorFallback, targetLine, readOnly = false, markdownPreview, onMarkdownPreviewChange, onStatusChange, imageControls, fitOnOpen = false, findText, codeEditorEditorClassName, reloadKey = 0, showCaption = false, }) {
81
81
  const { source, Breadcrumbs, fileContent, isLoading, error, contentRevision, fetchRevision, hasUnsavedChanges, setHasUnsavedChanges, isSaving, saveFlash, latestContentRef, discardKey, fileName, isHeicImage, language, fileCategory, isMarkdownFile, isMermaidFile, hasPreviewToggle, isJsonFile, isHtmlFile, isMarkdownPreview, setIsMarkdownPreview, isJsonTreeView, setIsJsonTreeView, isHtmlPreview, setIsHtmlPreview, fileDiagErrorCount, fileDiagWarningCount, fileDiagnostics, tHardcodedUi, tI18nHardcoded, blobUrl, rawBlob, blobLoading, blobError, sharedImagePath, retrySharedImage, heicImageUrl, heicConverting, displayContent, handleDownload, handleSave, handleDiscard, handleEditorChange, imageDataUrl, needsBlob, isContentReady, contentError, showLoadingState, isSandboxWaking, isNotFound, } = useFileContentState({
@@ -127,18 +127,18 @@ export function FileContentRenderer({ filePath, showHeader = true, headerSlot, h
127
127
  targetLine,
128
128
  };
129
129
  const discardLabel = tHardcodedUi.raw('featuresFilesComponentsFileContentRenderer.line600JsxAttrTitleDiscardChanges');
130
- return (_jsxs("div", { className: cn('flex h-full flex-col', className), children: [_jsx(FileHeader, { showHeader, headerSlot, Breadcrumbs, filePath, readOnly, hasUnsavedChanges, saveFlash, fileDiagErrorCount, fileDiagWarningCount, fileContent, isSaving, handleSave, latestContentRef, discardLabel, handleDiscard, isHtmlFile, isHtmlPreview, setIsHtmlPreview, isJsonFile, isJsonTreeView, setIsJsonTreeView, hasPreviewToggle, isMarkdownPreview, setIsMarkdownPreview, headerActions, handleDownload, blobUrl, rawBlob, tI18nHardcoded, tHardcodedUi }), _jsx("div", { className: cn('flex-1', readOnly ? 'overflow-auto' : 'overflow-hidden'), children: _jsxs(ErrorBoundary, { fallback: () => (_jsxs("div", { className: "flex h-full flex-col items-center justify-center gap-3 p-8 text-center", children: [_jsx("div", { className: "bg-destructive/10 flex h-12 w-12 items-center justify-center rounded-sm", children: _jsx(FileWarning, { className: "text-destructive/50 h-6 w-6" }) }), _jsx("p", { className: "text-muted-foreground text-sm font-medium", children: tI18nHardcoded.raw('autoFeaturesFileViewerFileContentRendererJsxTextCouldnT794ae800') }), _jsx("p", { className: "text-muted-foreground/50 max-w-sm font-mono text-xs break-all", children: filePath }), _jsxs(Button, { variant: "outline", size: "sm", onClick: handleDownload, children: [_jsx(Download, { className: "mr-1.5 h-3.5 w-3.5" }), tI18nHardcoded.raw('i18nComplete.textd6eafe823591')] })] })), children: [showLoadingState && (_jsx("div", { className: "flex h-full items-center justify-center", children: _jsx(Loading, { className: "text-muted-foreground/40 h-4 w-4" }) })), contentError && !showLoadingState && isSandboxWaking && (_jsxs("div", { className: "flex h-full flex-col items-center justify-center gap-3 p-8 text-center", children: [_jsx(Loading, { className: "text-muted-foreground/40 h-4 w-4" }), _jsx("p", { className: "text-muted-foreground text-sm font-medium", children: tI18nHardcoded.raw('i18nComplete.text5e3de76869f3') }), _jsx("p", { className: "text-muted-foreground/50 max-w-sm font-mono text-xs break-all", children: filePath }), _jsx("p", { className: "text-muted-foreground/40 max-w-xs text-xs", children: tI18nHardcoded.raw('i18nComplete.textd4707c58c4a4') })] })), contentError &&
130
+ return (_jsxs("div", { className: cn('flex h-full flex-col', className), children: [_jsx(FileHeader, { showHeader, headerSlot, Breadcrumbs, filePath, readOnly, hasUnsavedChanges, saveFlash, fileDiagErrorCount, fileDiagWarningCount, fileContent, isSaving, handleSave, latestContentRef, discardLabel, handleDiscard, isHtmlFile, isHtmlPreview, setIsHtmlPreview, isJsonFile, isJsonTreeView, setIsJsonTreeView, hasPreviewToggle, isMarkdownPreview, setIsMarkdownPreview, headerActions, handleDownload, blobUrl, rawBlob, tI18nHardcoded, tHardcodedUi }), _jsx("div", { className: cn('flex-1', readOnly ? 'overflow-auto' : 'overflow-hidden'), children: _jsxs(ErrorBoundary, { fallback: () => (_jsxs("div", { className: "flex h-full flex-col items-center justify-center gap-3 p-8 text-center", children: [_jsx("div", { className: "bg-destructive/10 flex h-12 w-12 items-center justify-center rounded-sm", children: _jsx(FileWarning, { className: "text-destructive/50 h-6 w-6" }) }), _jsx("p", { className: "text-muted-foreground text-sm font-medium", children: tI18nHardcoded.raw('autoFeaturesFileViewerFileContentRendererJsxTextCouldnT794ae800') }), _jsx("p", { className: "text-muted-foreground max-w-sm font-mono text-xs break-all", children: filePath }), _jsxs(Button, { variant: "outline", size: "sm", onClick: handleDownload, children: [_jsx(Download, { className: "mr-1.5 h-3.5 w-3.5" }), tI18nHardcoded.raw('i18nComplete.textd6eafe823591')] })] })), children: [showLoadingState && (_jsx("div", { className: "flex h-full items-center justify-center", children: _jsx(Loading, { className: "text-muted-foreground h-4 w-4" }) })), contentError && !showLoadingState && isSandboxWaking && (_jsxs("div", { className: "flex h-full flex-col items-center justify-center gap-3 p-8 text-center", children: [_jsx(Loading, { className: "text-muted-foreground h-4 w-4" }), _jsx("p", { className: "text-muted-foreground text-sm font-medium", children: tI18nHardcoded.raw('i18nComplete.text5e3de76869f3') }), _jsx("p", { className: "text-muted-foreground max-w-sm font-mono text-xs break-all", children: filePath }), _jsx("p", { className: "text-muted-foreground max-w-xs text-xs", children: tI18nHardcoded.raw('i18nComplete.textd4707c58c4a4') })] })), contentError &&
131
131
  !showLoadingState &&
132
132
  !isSandboxWaking &&
133
133
  (sharedImagePath && !isNotFound ? (
134
134
  // An image never shows the read's raw error text (R38).
135
- _jsx("div", { className: "flex h-full items-center justify-center p-8", children: _jsx(ImageUnavailable, { onRetry: retrySharedImage }) })) : errorFallback ? (errorFallback(contentError, filePath)) : isNotFound ? (_jsx(FileNotFoundState, { filePath: filePath })) : (_jsxs("div", { className: "flex h-full flex-col items-center justify-center gap-3 p-8 text-center", children: [_jsx("div", { className: "bg-destructive/10 flex h-12 w-12 items-center justify-center rounded-sm", children: _jsx(FileWarning, { className: "text-destructive/50 h-6 w-6" }) }), _jsx("p", { className: "text-muted-foreground text-sm font-medium", children: tHardcodedUi.raw('featuresFilesComponentsFileContentRenderer.line692JsxTextFailedToLoadFile') }), _jsx("p", { className: "text-muted-foreground/50 max-w-sm font-mono text-xs break-all", children: filePath }), _jsx("p", { className: "text-muted-foreground/60 max-w-sm text-xs", children: contentError })] }))), !isLoading && !error && imageDataUrl && (_jsx(CaptionedImage, { caption: caption, open: captionOpen, onOpenChange: onCaptionOpenChange, children: _jsx(Suspense, { fallback: _jsx(RendererFallback, {}), children: _jsx(ImageRenderer, { url: imageDataUrl, className: "h-full", fileName: fileName, controls: imageControls, info: imageInfo }) }) })), isHeicImage && (blobLoading || heicConverting) && _jsx(RendererFallback, {}), isHeicImage && !blobLoading && !blobError && heicImageUrl && !heicConverting && (_jsx(CaptionedImage, { caption: caption, open: captionOpen, onOpenChange: onCaptionOpenChange, children: _jsx(Suspense, { fallback: _jsx(RendererFallback, {}), children: _jsx(ImageRenderer, { url: heicImageUrl, className: "h-full", fileName: fileName, controls: imageControls, info: imageInfo }) }) })), isContentReady && fileCategory === 'pdf' && fileContent?.content && (_jsx(Suspense, { fallback: _jsx(RendererFallback, {}), children: _jsx(PdfRenderer, { fileContent: fileContent.content, fileName: fileName, className: "h-full", fitOnOpen: fitOnOpen, findText: findText, showDownload: false }) })), isContentReady && fileCategory === 'docx' && rawBlob && (_jsx(Suspense, { fallback: _jsx(RendererFallback, {}), children: _jsx(DocxRenderer, { blob: rawBlob, fileName: fileName, className: "h-full", showDownload: false }) })), isContentReady && fileCategory === 'zip' && rawBlob && (_jsx(Suspense, { fallback: _jsx(RendererFallback, {}), children: _jsx(ZipRenderer, { blob: rawBlob, fileName: fileName, className: "h-full" }, filePath) })), isContentReady && fileCategory === 'xlsx' && rawBlob && (_jsx(Suspense, { fallback: _jsx(RendererFallback, {}), children: _jsx(XlsxRenderer, { blob: rawBlob, fileName: fileName, className: "h-full", showDownload: false }, `xlsx-${filePath}-${contentRevision}-${reloadKey}`) })), !isLoading && !error && !isNotFound && fileCategory === 'sqlite' && (!bytesOnly || rawBlob) && (_jsx(Suspense, { fallback: _jsx(RendererFallback, {}), children: _jsx(SqliteRenderer, { filePath: filePath, fileName: fileName, className: "h-full", readOnly: readOnly, ...(bytesOnly ? { bytes: rawBlob, onSave: saveThroughSource } : {}) }, `sqlite-${filePath}-${contentRevision}-${reloadKey}`) })), !isLoading && !error && csvAsTable && fileContent && (_jsx(Suspense, { fallback: _jsx(RendererFallback, {}), children: _jsx(CsvRenderer, { content: fileContent.content, fileName: fileName, className: "h-full", showDownload: false }) })), isContentReady && fileCategory === 'video' && blobUrl && (_jsx(Suspense, { fallback: _jsx(RendererFallback, {}), children: _jsx(VideoRenderer, { url: blobUrl, className: "h-full" }) })), isContentReady && fileCategory === 'audio' && blobUrl && (_jsxs("div", { className: "flex h-full flex-col items-center justify-center gap-5 p-8", children: [_jsx("div", { className: "bg-muted/50 flex h-14 w-14 items-center justify-center rounded-sm", children: _jsxs("svg", { className: "text-muted-foreground/40 h-6 w-6", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", children: [_jsx("path", { d: "M9 18V5l12-2v13" }), _jsx("circle", { cx: "6", cy: "18", r: "3" }), _jsx("circle", { cx: "18", cy: "16", r: "3" })] }) }), _jsx("p", { className: "text-muted-foreground/60 text-sm", children: fileName }), _jsx("audio", { controls: true, src: blobUrl, className: "w-full max-w-sm" })] })), isContentReady && fileCategory === 'pptx' && rawBlob && (_jsx(Suspense, { fallback: _jsx(RendererFallback, {}), children: _jsx(PptxRenderer, { blob: rawBlob, binaryUrl: blobUrl, filePath: filePath, fileName: fileName, className: "h-full", onDownload: handleDownload }) })), isHtmlFile && isHtmlPreview && (_jsx(HtmlPreview, { path: toSandboxAbsolutePath(filePath), reloadKey: `${fetchRevision}-${reloadKey}`, fileName: fileName, pendingLabel: tHardcodedUi.raw('featuresFilesComponentsFileContentRenderer.line805JsxTextStartingPreviewServer') }, `html-preview-${filePath}`)), isHtmlFile && !isHtmlPreview && !isLoading && !error && fileContent?.type === 'text' && (_jsx(CodeEditor, { editorClassName: codeEditorEditorClassName, ...codeEditorProps, className: readOnly ? 'min-h-full' : 'h-full' }, `html-source-${filePath}-${discardKey}`)), !isLoading &&
135
+ _jsx("div", { className: "flex h-full items-center justify-center p-8", children: _jsx(ImageUnavailable, { onRetry: retrySharedImage }) })) : errorFallback ? (errorFallback(contentError, filePath)) : isNotFound ? (_jsx(FileNotFoundState, { filePath: filePath })) : (_jsxs("div", { className: "flex h-full flex-col items-center justify-center gap-3 p-8 text-center", children: [_jsx("div", { className: "bg-destructive/10 flex h-12 w-12 items-center justify-center rounded-sm", children: _jsx(FileWarning, { className: "text-destructive/50 h-6 w-6" }) }), _jsx("p", { className: "text-muted-foreground text-sm font-medium", children: tHardcodedUi.raw('featuresFilesComponentsFileContentRenderer.line692JsxTextFailedToLoadFile') }), _jsx("p", { className: "text-muted-foreground max-w-sm font-mono text-xs break-all", children: filePath }), _jsx("p", { className: "text-muted-foreground max-w-sm text-xs", children: contentError })] }))), !isLoading && !error && imageDataUrl && (_jsx(CaptionedImage, { caption: caption, open: captionOpen, onOpenChange: onCaptionOpenChange, children: _jsx(Suspense, { fallback: _jsx(RendererFallback, {}), children: _jsx(ImageRenderer, { url: imageDataUrl, className: "h-full", fileName: fileName, controls: imageControls, info: imageInfo }) }) })), isHeicImage && (blobLoading || heicConverting) && _jsx(RendererFallback, {}), isHeicImage && !blobLoading && !blobError && heicImageUrl && !heicConverting && (_jsx(CaptionedImage, { caption: caption, open: captionOpen, onOpenChange: onCaptionOpenChange, children: _jsx(Suspense, { fallback: _jsx(RendererFallback, {}), children: _jsx(ImageRenderer, { url: heicImageUrl, className: "h-full", fileName: fileName, controls: imageControls, info: imageInfo }) }) })), isContentReady && fileCategory === 'pdf' && fileContent?.content && (_jsx(Suspense, { fallback: _jsx(RendererFallback, {}), children: _jsx(PdfRenderer, { fileContent: fileContent.content, fileName: fileName, className: "h-full", fitOnOpen: fitOnOpen, findText: findText, showDownload: false }) })), isContentReady && fileCategory === 'docx' && rawBlob && (_jsx(Suspense, { fallback: _jsx(RendererFallback, {}), children: _jsx(DocxRenderer, { blob: rawBlob, fileName: fileName, className: "h-full", showDownload: false }) })), isContentReady && fileCategory === 'zip' && rawBlob && (_jsx(Suspense, { fallback: _jsx(RendererFallback, {}), children: _jsx(ZipRenderer, { blob: rawBlob, fileName: fileName, className: "h-full" }, filePath) })), isContentReady && fileCategory === 'xlsx' && rawBlob && (_jsx(Suspense, { fallback: _jsx(RendererFallback, {}), children: _jsx(XlsxRenderer, { blob: rawBlob, fileName: fileName, className: "h-full", showDownload: false }, `xlsx-${filePath}-${contentRevision}-${reloadKey}`) })), !isLoading && !error && !isNotFound && fileCategory === 'sqlite' && (!bytesOnly || rawBlob) && (_jsx(Suspense, { fallback: _jsx(RendererFallback, {}), children: _jsx(SqliteRenderer, { filePath: filePath, fileName: fileName, className: "h-full", readOnly: readOnly, ...(bytesOnly ? { bytes: rawBlob, onSave: saveThroughSource } : {}) }, `sqlite-${filePath}-${contentRevision}-${reloadKey}`) })), !isLoading && !error && csvAsTable && fileContent && (_jsx(Suspense, { fallback: _jsx(RendererFallback, {}), children: _jsx(CsvRenderer, { content: fileContent.content, fileName: fileName, className: "h-full", showDownload: false }) })), isContentReady && fileCategory === 'video' && blobUrl && (_jsx(Suspense, { fallback: _jsx(RendererFallback, {}), children: _jsx(VideoRenderer, { url: blobUrl, className: "h-full" }) })), isContentReady && fileCategory === 'audio' && blobUrl && (_jsxs("div", { className: "flex h-full flex-col items-center justify-center gap-5 p-8", children: [_jsx("div", { className: "bg-muted/50 flex h-14 w-14 items-center justify-center rounded-sm", children: _jsxs("svg", { className: "text-muted-foreground h-6 w-6", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", children: [_jsx("path", { d: "M9 18V5l12-2v13" }), _jsx("circle", { cx: "6", cy: "18", r: "3" }), _jsx("circle", { cx: "18", cy: "16", r: "3" })] }) }), _jsx("p", { className: "text-muted-foreground text-sm", children: fileName }), _jsx("audio", { controls: true, src: blobUrl, className: "w-full max-w-sm" })] })), isContentReady && fileCategory === 'pptx' && rawBlob && (_jsx(Suspense, { fallback: _jsx(RendererFallback, {}), children: _jsx(PptxRenderer, { blob: rawBlob, binaryUrl: blobUrl, filePath: filePath, fileName: fileName, className: "h-full", onDownload: handleDownload }) })), isHtmlFile && isHtmlPreview && (_jsx(HtmlPreview, { path: toSandboxAbsolutePath(filePath), reloadKey: `${fetchRevision}-${reloadKey}`, fileName: fileName, pendingLabel: tHardcodedUi.raw('featuresFilesComponentsFileContentRenderer.line805JsxTextStartingPreviewServer') }, `html-preview-${filePath}`)), isHtmlFile && !isHtmlPreview && !isLoading && !error && fileContent?.type === 'text' && (_jsx(CodeEditor, { editorClassName: codeEditorEditorClassName, ...codeEditorProps, className: readOnly ? 'min-h-full' : 'h-full' }, `html-source-${filePath}-${discardKey}`)), !isLoading &&
136
136
  !error &&
137
137
  fileContent &&
138
138
  fileContent.type === 'binary' &&
139
139
  !imageDataUrl &&
140
140
  !isHeicImage &&
141
- !['pdf', 'docx', 'pptx', 'xlsx', 'sqlite', 'video', 'audio'].includes(fileCategory) && (_jsxs("div", { className: "flex h-full flex-col items-center justify-center gap-3 p-8 text-center", children: [_jsx("div", { className: "bg-muted/50 flex h-12 w-12 items-center justify-center rounded-sm", children: _jsx(FileWarning, { className: "text-muted-foreground/30 h-6 w-6" }) }), _jsx("p", { className: "text-muted-foreground/50 text-sm", children: tHardcodedUi.raw('featuresFilesComponentsFileContentRenderer.line844JsxTextBinaryFile') }), _jsxs(Button, { variant: "outline", size: "sm", className: "", onClick: handleDownload, children: [_jsx(Download, { className: "mr-1.5 h-3.5 w-3.5" }), tI18nHardcoded.raw('i18nComplete.textd6eafe823591')] })] })), !isLoading &&
141
+ !['pdf', 'docx', 'pptx', 'xlsx', 'sqlite', 'video', 'audio'].includes(fileCategory) && (_jsxs("div", { className: "flex h-full flex-col items-center justify-center gap-3 p-8 text-center", children: [_jsx("div", { className: "bg-muted/50 flex h-12 w-12 items-center justify-center rounded-sm", children: _jsx(FileWarning, { className: "text-muted-foreground h-6 w-6" }) }), _jsx("p", { className: "text-muted-foreground text-sm", children: tHardcodedUi.raw('featuresFilesComponentsFileContentRenderer.line844JsxTextBinaryFile') }), _jsxs(Button, { variant: "outline", size: "sm", className: "", onClick: handleDownload, children: [_jsx(Download, { className: "mr-1.5 h-3.5 w-3.5" }), tI18nHardcoded.raw('i18nComplete.textd6eafe823591')] })] })), !isLoading &&
142
142
  !error &&
143
143
  fileContent &&
144
144
  fileContent.type === 'text' &&
@@ -24,7 +24,7 @@ function JsonNode({ value, keyName, depth, }) {
24
24
  const tHardcodedUi = useTranslations('hardcodedUi');
25
25
  const [isCollapsed, setIsCollapsed] = useState(depth > 2);
26
26
  if (value === null) {
27
- return (_jsxs("div", { style: { paddingLeft: depth * 20 }, children: [keyName !== null && _jsxs("span", { className: "text-primary/70", children: [`"${keyName}"`, ": "] }), _jsx("span", { className: "text-muted-foreground/50 italic", children: tHardcodedUi.raw('i18nComplete.text74234e98afe7') })] }));
27
+ return (_jsxs("div", { style: { paddingLeft: depth * 20 }, children: [keyName !== null && _jsxs("span", { className: "text-primary/70", children: [`"${keyName}"`, ": "] }), _jsx("span", { className: "text-muted-foreground italic", children: tHardcodedUi.raw('i18nComplete.text74234e98afe7') })] }));
28
28
  }
29
29
  if (typeof value === 'boolean') {
30
30
  return (_jsxs("div", { style: { paddingLeft: depth * 20 }, children: [keyName !== null && _jsxs("span", { className: "text-primary/70", children: [`"${keyName}"`, ": "] }), _jsx("span", { className: "text-kortix-yellow", children: String(value) })] }));
@@ -38,12 +38,12 @@ function JsonNode({ value, keyName, depth, }) {
38
38
  }
39
39
  if (Array.isArray(value)) {
40
40
  const count = value.length;
41
- return (_jsxs("div", { children: [_jsxs("button", { type: "button", style: { paddingLeft: depth * 20 }, "aria-expanded": !isCollapsed, className: "hover:bg-muted/30 inline-flex cursor-pointer items-center gap-1 rounded-sm text-left transition-colors", onClick: () => setIsCollapsed((v) => !v), children: [_jsx("span", { className: "text-muted-foreground/40 w-3.5 text-center text-xs select-none", children: isCollapsed ? '\u25B6' : '\u25BC' }), keyName !== null && _jsxs("span", { className: "text-primary/70", children: [`"${keyName}"`, ": "] }), isCollapsed ? (_jsxs("span", { className: "text-muted-foreground/40", children: ["[", count, " ", tHardcodedUi.raw('i18nComplete.text4a33eacd5fa6'), count !== 1 ? 's' : '', "]"] })) : (_jsx("span", { className: "text-muted-foreground/30", children: "[" }))] }), !isCollapsed && (_jsxs(_Fragment, { children: [value.map((item, idx) => (_jsx(JsonNode, { value: item, keyName: null, depth: depth + 1 }, idx))), _jsx("div", { style: { paddingLeft: depth * 20 }, className: "text-muted-foreground/30", children: "]" })] }))] }));
41
+ return (_jsxs("div", { children: [_jsxs("button", { type: "button", style: { paddingLeft: depth * 20 }, "aria-expanded": !isCollapsed, className: "hover:bg-muted/30 inline-flex cursor-pointer items-center gap-1 rounded-sm text-left transition-colors", onClick: () => setIsCollapsed((v) => !v), children: [_jsx("span", { className: "text-muted-foreground w-3.5 text-center text-xs select-none", children: isCollapsed ? '\u25B6' : '\u25BC' }), keyName !== null && _jsxs("span", { className: "text-primary/70", children: [`"${keyName}"`, ": "] }), isCollapsed ? (_jsxs("span", { className: "text-muted-foreground", children: ["[", count, " ", tHardcodedUi.raw('i18nComplete.text4a33eacd5fa6'), count !== 1 ? 's' : '', "]"] })) : (_jsx("span", { className: "text-muted-foreground", children: "[" }))] }), !isCollapsed && (_jsxs(_Fragment, { children: [value.map((item, idx) => (_jsx(JsonNode, { value: item, keyName: null, depth: depth + 1 }, idx))), _jsx("div", { style: { paddingLeft: depth * 20 }, className: "text-muted-foreground", children: "]" })] }))] }));
42
42
  }
43
43
  if (typeof value === 'object') {
44
44
  const entries = Object.entries(value);
45
45
  const count = entries.length;
46
- return (_jsxs("div", { children: [_jsxs("button", { type: "button", style: { paddingLeft: depth * 20 }, "aria-expanded": !isCollapsed, className: "hover:bg-muted/30 inline-flex cursor-pointer items-center gap-1 rounded-sm text-left transition-colors", onClick: () => setIsCollapsed((v) => !v), children: [_jsx("span", { className: "text-muted-foreground/40 w-3.5 text-center text-xs select-none", children: isCollapsed ? '\u25B6' : '\u25BC' }), keyName !== null && _jsxs("span", { className: "text-primary/70", children: [`"${keyName}"`, ": "] }), isCollapsed ? (_jsx("span", { className: "text-muted-foreground/40", children: '{' + count + ' key' + (count !== 1 ? 's' : '') + '}' })) : (_jsx("span", { className: "text-muted-foreground/30", children: '{' }))] }), !isCollapsed && (_jsxs(_Fragment, { children: [entries.map(([k, v]) => (_jsx(JsonNode, { value: v, keyName: k, depth: depth + 1 }, k))), _jsx("div", { style: { paddingLeft: depth * 20 }, className: "text-muted-foreground/30", children: '}' })] }))] }));
46
+ return (_jsxs("div", { children: [_jsxs("button", { type: "button", style: { paddingLeft: depth * 20 }, "aria-expanded": !isCollapsed, className: "hover:bg-muted/30 inline-flex cursor-pointer items-center gap-1 rounded-sm text-left transition-colors", onClick: () => setIsCollapsed((v) => !v), children: [_jsx("span", { className: "text-muted-foreground w-3.5 text-center text-xs select-none", children: isCollapsed ? '\u25B6' : '\u25BC' }), keyName !== null && _jsxs("span", { className: "text-primary/70", children: [`"${keyName}"`, ": "] }), isCollapsed ? (_jsx("span", { className: "text-muted-foreground", children: '{' + count + ' key' + (count !== 1 ? 's' : '') + '}' })) : (_jsx("span", { className: "text-muted-foreground", children: '{' }))] }), !isCollapsed && (_jsxs(_Fragment, { children: [entries.map(([k, v]) => (_jsx(JsonNode, { value: v, keyName: k, depth: depth + 1 }, k))), _jsx("div", { style: { paddingLeft: depth * 20 }, className: "text-muted-foreground", children: '}' })] }))] }));
47
47
  }
48
48
  return null;
49
49
  }