@kitlangton/ghui 0.1.13 → 0.1.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kitlangton/ghui",
3
- "version": "0.1.13",
3
+ "version": "0.1.14",
4
4
  "description": "Terminal UI for GitHub pull requests",
5
5
  "type": "module",
6
6
  "license": "MIT",
package/src/App.tsx CHANGED
@@ -1263,6 +1263,7 @@ export const App = () => {
1263
1263
  showChecks
1264
1264
  placeholderContent={detailPlaceholderContent}
1265
1265
  loadingIndicator={loadingIndicator}
1266
+ themeId={themeId}
1266
1267
  />
1267
1268
  </scrollbox>
1268
1269
  </box>
@@ -1279,7 +1280,7 @@ export const App = () => {
1279
1280
  <>
1280
1281
  <DetailHeader pullRequest={selectedPullRequest} contentWidth={rightContentWidth} paneWidth={rightPaneWidth} showChecks />
1281
1282
  <scrollbox flexGrow={1} verticalScrollbarOptions={{ visible: wideDetailBodyScrollable }}>
1282
- <DetailBody pullRequest={selectedPullRequest} contentWidth={rightContentWidth} bodyLines={wideDetailLines} loadingIndicator={loadingIndicator} />
1283
+ <DetailBody pullRequest={selectedPullRequest} contentWidth={rightContentWidth} bodyLines={wideDetailLines} loadingIndicator={loadingIndicator} themeId={themeId} />
1283
1284
  </scrollbox>
1284
1285
  </>
1285
1286
  ) : (
@@ -1297,12 +1298,13 @@ export const App = () => {
1297
1298
  paneWidth={contentWidth}
1298
1299
  placeholderContent={detailPlaceholderContent}
1299
1300
  loadingIndicator={loadingIndicator}
1301
+ themeId={themeId}
1300
1302
  />
1301
1303
  </scrollbox>
1302
1304
  </box>
1303
1305
  ) : (
1304
1306
  <box height={wideBodyHeight} flexDirection="column">
1305
- <DetailsPane pullRequest={selectedPullRequest} contentWidth={rightContentWidth} paneWidth={contentWidth} placeholderContent={detailPlaceholderContent} loadingIndicator={loadingIndicator} />
1307
+ <DetailsPane pullRequest={selectedPullRequest} contentWidth={rightContentWidth} paneWidth={contentWidth} placeholderContent={detailPlaceholderContent} loadingIndicator={loadingIndicator} themeId={themeId} />
1306
1308
  <Divider width={contentWidth} />
1307
1309
  <box flexGrow={1} flexDirection="column">
1308
1310
  <scrollbox flexGrow={1}>
@@ -2,7 +2,7 @@ import { TextAttributes } from "@opentui/core"
2
2
  import { Fragment, useMemo } from "react"
3
3
  import { formatRelativeDate } from "../date.js"
4
4
  import type { CheckItem, PullRequestItem } from "../domain.js"
5
- import { colors } from "./colors.js"
5
+ import { colors, type ThemeId } from "./colors.js"
6
6
  import { diffStatText } from "./diff.js"
7
7
  import { centerCell, Divider, fitCell, PlainLine, TextLine } from "./primitives.js"
8
8
  import { labelColor, labelTextColor, reviewLabel, shortRepoName, statusColor } from "./pullRequests.js"
@@ -387,15 +387,17 @@ export const DetailBody = ({
387
387
  contentWidth,
388
388
  bodyLines = DETAIL_BODY_LINES,
389
389
  loadingIndicator,
390
+ themeId,
390
391
  }: {
391
392
  pullRequest: PullRequestItem
392
393
  contentWidth: number
393
394
  bodyLines?: number
394
395
  loadingIndicator: string
396
+ themeId: ThemeId
395
397
  }) => {
396
398
  const previewLines = useMemo(
397
399
  () => bodyPreview(pullRequest.body, contentWidth, bodyLines),
398
- [pullRequest.body, contentWidth, bodyLines],
400
+ [pullRequest.body, contentWidth, bodyLines, themeId],
399
401
  )
400
402
 
401
403
  if (!pullRequest.detailLoaded) {
@@ -486,6 +488,7 @@ export const DetailsPane = ({
486
488
  showChecks = false,
487
489
  placeholderContent,
488
490
  loadingIndicator,
491
+ themeId,
489
492
  }: {
490
493
  pullRequest: PullRequestItem | null
491
494
  contentWidth: number
@@ -494,6 +497,7 @@ export const DetailsPane = ({
494
497
  showChecks?: boolean
495
498
  placeholderContent: DetailPlaceholderContent
496
499
  loadingIndicator: string
500
+ themeId: ThemeId
497
501
  }) => {
498
502
  const contentHeight = getDetailsPaneHeight({ pullRequest, contentWidth, bodyLines, paneWidth, showChecks })
499
503
 
@@ -502,7 +506,7 @@ export const DetailsPane = ({
502
506
  {pullRequest ? (
503
507
  <>
504
508
  <DetailHeader pullRequest={pullRequest} contentWidth={contentWidth} paneWidth={paneWidth} showChecks={showChecks} />
505
- <DetailBody pullRequest={pullRequest} contentWidth={contentWidth} bodyLines={bodyLines} loadingIndicator={loadingIndicator} />
509
+ <DetailBody pullRequest={pullRequest} contentWidth={contentWidth} bodyLines={bodyLines} loadingIndicator={loadingIndicator} themeId={themeId} />
506
510
  </>
507
511
  ) : (
508
512
  <>