claude-code-kanban 6.1.1 → 7.0.0

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/public/style.css CHANGED
@@ -2444,6 +2444,14 @@ body.booting .boot-splash {
2444
2444
  overflow-x: auto;
2445
2445
  }
2446
2446
 
2447
+ code.language-tree .hljs-punctuation {
2448
+ color: var(--text-muted);
2449
+ }
2450
+
2451
+ code.language-tree .hljs-title {
2452
+ font-weight: 600;
2453
+ }
2454
+
2447
2455
  .detail-desc code {
2448
2456
  background: color-mix(in srgb, var(--text-muted) 12%, transparent);
2449
2457
  border: 1px solid color-mix(in srgb, var(--border) 45%, transparent);
@@ -3412,6 +3420,419 @@ body.booting .boot-splash {
3412
3420
 
3413
3421
  /* #endregion */
3414
3422
 
3423
+ /* #region PANES */
3424
+ .pane-strip {
3425
+ display: none;
3426
+ align-items: stretch;
3427
+ gap: 2px;
3428
+ padding: 4px 10px 0;
3429
+ background: var(--bg-surface);
3430
+ border-bottom: 1px solid var(--border);
3431
+ }
3432
+
3433
+ .pane-pin {
3434
+ display: flex;
3435
+ flex: none;
3436
+ margin-bottom: -1px;
3437
+ }
3438
+
3439
+ .session-view.has-panes .pane-strip {
3440
+ display: flex;
3441
+ }
3442
+
3443
+ .session-view.terminal-mode .pane-strip {
3444
+ display: none;
3445
+ }
3446
+
3447
+ .session-view.pane-mode .kanban,
3448
+ .session-view.pane-mode .agent-footer {
3449
+ display: none;
3450
+ }
3451
+
3452
+ .pane-tabs {
3453
+ display: flex;
3454
+ gap: 2px;
3455
+ min-width: 0;
3456
+ margin-bottom: -1px;
3457
+ overflow-x: auto;
3458
+ overflow-y: hidden;
3459
+ scrollbar-width: none;
3460
+ overscroll-behavior-x: contain;
3461
+ }
3462
+
3463
+ .pane-tabs::-webkit-scrollbar {
3464
+ display: none;
3465
+ }
3466
+
3467
+ .pane-tabs.fade-l,
3468
+ .pane-tabs.fade-r {
3469
+ mask-image: linear-gradient(
3470
+ to right,
3471
+ transparent,
3472
+ #000 var(--fade-l, 0),
3473
+ #000 calc(100% - var(--fade-r, 0)),
3474
+ transparent
3475
+ );
3476
+ }
3477
+
3478
+ .pane-tabs.fade-l {
3479
+ --fade-l: 28px;
3480
+ }
3481
+
3482
+ .pane-tabs.fade-r {
3483
+ --fade-r: 28px;
3484
+ }
3485
+
3486
+ .pane-tab {
3487
+ display: flex;
3488
+ flex: 0 1 auto;
3489
+ align-items: center;
3490
+ gap: 6px;
3491
+ min-width: 112px;
3492
+ max-width: 190px;
3493
+ padding: 4px 5px 4px 9px;
3494
+ border: 1px solid transparent;
3495
+ border-bottom: 0;
3496
+ border-radius: 6px 6px 0 0;
3497
+ background: none;
3498
+ color: var(--text-tertiary);
3499
+ font-family: var(--font-mono);
3500
+ font-size: 11.5px;
3501
+ white-space: nowrap;
3502
+ cursor: pointer;
3503
+ }
3504
+
3505
+ .pane-tab:hover {
3506
+ background: var(--bg-hover);
3507
+ }
3508
+
3509
+ .pane-tab.on {
3510
+ background: var(--bg-deep);
3511
+ border-color: var(--border);
3512
+ color: var(--text-primary);
3513
+ }
3514
+
3515
+ .pane-tab.pinned {
3516
+ flex: none;
3517
+ min-width: 0;
3518
+ padding-right: 10px;
3519
+ font-weight: 500;
3520
+ }
3521
+
3522
+ .pane-tab .pane-title {
3523
+ flex: 1;
3524
+ min-width: 0;
3525
+ overflow: hidden;
3526
+ text-overflow: ellipsis;
3527
+ }
3528
+
3529
+ .pane-tab .pin-meta {
3530
+ color: var(--text-muted);
3531
+ font-size: 10px;
3532
+ font-weight: 400;
3533
+ }
3534
+
3535
+ .pane-tab .kind {
3536
+ flex: none;
3537
+ width: 13px;
3538
+ height: 13px;
3539
+ }
3540
+
3541
+ .pane-tab .state {
3542
+ flex: none;
3543
+ width: 6px;
3544
+ height: 6px;
3545
+ border: 1px solid var(--text-muted);
3546
+ border-radius: 50%;
3547
+ }
3548
+
3549
+ .pane-tab .state.loaded {
3550
+ background: var(--success);
3551
+ border-color: var(--success);
3552
+ }
3553
+
3554
+ .pane-tab .state.blocked {
3555
+ background: var(--warning);
3556
+ border-color: var(--warning);
3557
+ }
3558
+
3559
+ .pane-tab .pane-x {
3560
+ flex: none;
3561
+ width: 16px;
3562
+ height: 16px;
3563
+ padding: 0;
3564
+ border: 0;
3565
+ border-radius: 4px;
3566
+ background: none;
3567
+ color: var(--text-muted);
3568
+ font-size: 13px;
3569
+ line-height: 1;
3570
+ cursor: pointer;
3571
+ }
3572
+
3573
+ .pane-tab:not(.on, :hover, :focus-within) .pane-x {
3574
+ visibility: hidden;
3575
+ }
3576
+
3577
+ .pane-tab .pane-x:hover {
3578
+ background: var(--bg-hover);
3579
+ color: var(--text-primary);
3580
+ }
3581
+
3582
+ .pane-sep {
3583
+ flex: none;
3584
+ width: 1px;
3585
+ margin: 5px 6px 7px;
3586
+ background: var(--border);
3587
+ }
3588
+
3589
+ .pane-add,
3590
+ .pane-tool {
3591
+ width: 26px;
3592
+ height: 26px;
3593
+ border-color: transparent;
3594
+ }
3595
+
3596
+ .pane-add svg,
3597
+ .pane-tool svg {
3598
+ width: 14px;
3599
+ height: 14px;
3600
+ }
3601
+
3602
+ .pane-add {
3603
+ align-self: center;
3604
+ margin: 0 0 3px 4px;
3605
+ }
3606
+
3607
+ .pane-tools {
3608
+ display: flex;
3609
+ align-items: center;
3610
+ gap: 2px;
3611
+ margin: 0 0 3px auto;
3612
+ }
3613
+
3614
+ .pane-tool:disabled {
3615
+ opacity: 0.35;
3616
+ cursor: default;
3617
+ background: none;
3618
+ }
3619
+
3620
+ .pane-views {
3621
+ position: relative;
3622
+ display: none;
3623
+ flex: 1;
3624
+ min-height: 0;
3625
+ background: var(--bg-deep);
3626
+ }
3627
+
3628
+ .session-view.pane-mode:not(.terminal-mode) .pane-views {
3629
+ display: flex;
3630
+ }
3631
+
3632
+ .pane-view {
3633
+ position: absolute;
3634
+ inset: 0;
3635
+ display: none;
3636
+ flex-direction: column;
3637
+ }
3638
+
3639
+ .pane-view.on {
3640
+ display: flex;
3641
+ }
3642
+
3643
+ .pane-view:has(> .review-panel) {
3644
+ flex-direction: row;
3645
+ }
3646
+
3647
+ .pane-view:has(> .pane-doc) {
3648
+ gap: 16px;
3649
+ padding: 16px;
3650
+ }
3651
+
3652
+ .pane-view:has(> .review-panel) > :not(.review-panel) {
3653
+ width: auto;
3654
+ min-width: 0;
3655
+ }
3656
+
3657
+ .pane-view > .review-panel {
3658
+ padding: 12px;
3659
+ }
3660
+
3661
+ .pane-frame {
3662
+ flex: 1;
3663
+ width: 100%;
3664
+ min-height: 0;
3665
+ border: 0;
3666
+ background: #fff;
3667
+ }
3668
+
3669
+ .pane-doc {
3670
+ flex: 1;
3671
+ min-height: 0;
3672
+ position: relative;
3673
+ display: flex;
3674
+ width: 100%;
3675
+ max-width: var(--pane-doc-w, 860px);
3676
+ margin: 0 auto;
3677
+ background: var(--bg-surface);
3678
+ border: 1px solid var(--border);
3679
+ border-radius: 12px;
3680
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
3681
+ }
3682
+
3683
+ .pane-doc-body {
3684
+ flex: 1;
3685
+ min-width: 0;
3686
+ overflow-y: auto;
3687
+ padding: 24px;
3688
+ font-size: 13px;
3689
+ line-height: 1.6;
3690
+ word-break: break-word;
3691
+ }
3692
+
3693
+ /* The modal's corner grip; the pane fills the height, so it sets the width only. */
3694
+ .pane-doc > .modal-resize-handle {
3695
+ cursor: ew-resize;
3696
+ }
3697
+
3698
+ .pane-card {
3699
+ display: grid;
3700
+ flex: 1;
3701
+ place-items: center;
3702
+ font-family: var(--font-mono);
3703
+ }
3704
+
3705
+ .pane-card-box {
3706
+ max-width: 460px;
3707
+ padding: 26px 28px;
3708
+ border: 1px solid var(--border);
3709
+ border-radius: 10px;
3710
+ background: var(--bg-elevated);
3711
+ text-align: center;
3712
+ }
3713
+
3714
+ .pane-card-box svg {
3715
+ width: 30px;
3716
+ height: 30px;
3717
+ color: var(--warning);
3718
+ }
3719
+
3720
+ .pane-card-box h3 {
3721
+ margin: 10px 0 6px;
3722
+ font-family: var(--font-serif);
3723
+ font-size: 17px;
3724
+ }
3725
+
3726
+ .pane-card-box p {
3727
+ margin: 0 0 16px;
3728
+ color: var(--text-tertiary);
3729
+ font-size: 12px;
3730
+ overflow-wrap: anywhere;
3731
+ }
3732
+
3733
+ .pane-card .btn {
3734
+ padding: 6px 12px;
3735
+ font-size: 12px;
3736
+ }
3737
+
3738
+ .modal.pane-pop-dialog {
3739
+ display: flex;
3740
+ flex-direction: column;
3741
+ width: 520px;
3742
+ max-width: calc(100vw - 32px);
3743
+ padding: 18px 20px 14px;
3744
+ font-family: var(--font-mono);
3745
+ }
3746
+
3747
+ .pane-pop-dialog .modal-header {
3748
+ margin-bottom: 12px;
3749
+ }
3750
+
3751
+ .pane-pop-dialog .modal-title {
3752
+ margin: 0;
3753
+ font-family: var(--font-serif);
3754
+ font-weight: 500;
3755
+ }
3756
+
3757
+ .pane-pop-dialog .form-input {
3758
+ box-sizing: border-box;
3759
+ font: 13px var(--font-mono);
3760
+ }
3761
+
3762
+ .pane-pop-detect {
3763
+ min-height: 16px;
3764
+ margin: 7px 2px 14px;
3765
+ color: var(--text-muted);
3766
+ font-size: 11px;
3767
+ }
3768
+
3769
+ .pane-pop-detect.error {
3770
+ color: var(--warning);
3771
+ }
3772
+
3773
+ .pane-pop-dialog .sp-hint {
3774
+ margin-top: 12px;
3775
+ padding-top: 10px;
3776
+ border-top: 1px solid var(--border);
3777
+ }
3778
+
3779
+ .pane-pop-label {
3780
+ margin: 6px 2px;
3781
+ color: var(--text-muted);
3782
+ font-size: 10px;
3783
+ letter-spacing: 0.06em;
3784
+ text-transform: uppercase;
3785
+ }
3786
+
3787
+ .pane-pop-docs {
3788
+ max-height: 260px;
3789
+ margin: 0 -6px;
3790
+ overflow-y: auto;
3791
+ }
3792
+
3793
+ .pane-pop-row {
3794
+ display: flex;
3795
+ align-items: center;
3796
+ gap: 8px;
3797
+ width: 100%;
3798
+ padding: 7px 8px;
3799
+ border: 0;
3800
+ border-radius: 6px;
3801
+ outline: none;
3802
+ background: none;
3803
+ color: var(--text-secondary);
3804
+ font: 12px var(--font-mono);
3805
+ text-align: left;
3806
+ cursor: pointer;
3807
+ }
3808
+
3809
+ .pane-pop-row:hover,
3810
+ .pane-pop-row:focus-visible,
3811
+ .pane-pop-row.active {
3812
+ background: var(--bg-hover);
3813
+ color: var(--text-primary);
3814
+ }
3815
+
3816
+ .pane-pop-row span {
3817
+ overflow: hidden;
3818
+ text-overflow: ellipsis;
3819
+ white-space: nowrap;
3820
+ }
3821
+
3822
+ .pane-pop-row svg {
3823
+ flex: none;
3824
+ width: 13px;
3825
+ height: 13px;
3826
+ }
3827
+
3828
+ .pane-pop-empty {
3829
+ padding: 4px 6px;
3830
+ color: var(--text-muted);
3831
+ font-size: 11px;
3832
+ }
3833
+
3834
+ /* #endregion */
3835
+
3415
3836
  /* #region MESSAGE_PANEL */
3416
3837
  .message-panel {
3417
3838
  position: fixed;
@@ -3925,6 +4346,9 @@ body.booting .boot-splash {
3925
4346
  .rendered-md li {
3926
4347
  margin: 0.2em 0;
3927
4348
  }
4349
+ .rendered-md a {
4350
+ color: var(--accent);
4351
+ }
3928
4352
  .rendered-md pre {
3929
4353
  margin: 0.6em 0;
3930
4354
  }
@@ -4407,13 +4831,19 @@ body.booting .boot-splash {
4407
4831
  }
4408
4832
  .agent-log-title {
4409
4833
  display: flex;
4410
- align-items: center;
4834
+ align-items: baseline;
4411
4835
  gap: 6px;
4412
4836
  }
4413
4837
  .agent-log-id {
4414
4838
  font-size: 11px;
4415
4839
  color: var(--text-tertiary);
4416
4840
  }
4841
+ .agent-log-model {
4842
+ font-family: var(--mono);
4843
+ font-size: 12px;
4844
+ font-weight: 600;
4845
+ color: var(--text-primary);
4846
+ }
4417
4847
  .msg-agent-log-btn {
4418
4848
  flex-shrink: 0;
4419
4849
  margin-left: 0;
@@ -4636,7 +5066,8 @@ body.booting .boot-splash {
4636
5066
  border: 1px solid color-mix(in srgb, var(--border) 55%, transparent);
4637
5067
  border-radius: 8px;
4638
5068
  white-space: nowrap;
4639
- min-width: 0;
5069
+ flex-shrink: 0;
5070
+ min-width: 180px;
4640
5071
  overflow: hidden;
4641
5072
  transition:
4642
5073
  opacity 0.3s,
@@ -4675,21 +5106,33 @@ body.booting .boot-splash {
4675
5106
  .agent-card.fading {
4676
5107
  opacity: 0.4;
4677
5108
  }
4678
- .agent-type-row {
5109
+ .agent-task {
5110
+ max-width: 240px;
5111
+ padding-right: 14px;
5112
+ font-size: 12.5px;
5113
+ font-weight: 600;
5114
+ color: var(--text-primary);
5115
+ overflow: hidden;
5116
+ text-overflow: ellipsis;
5117
+ }
5118
+ .agent-ident-row {
4679
5119
  display: flex;
4680
5120
  align-items: center;
4681
- gap: 4px;
5121
+ gap: 5px;
4682
5122
  min-width: 0;
5123
+ max-width: 240px;
5124
+ font-size: 11px;
5125
+ color: var(--text-secondary);
5126
+ }
5127
+ .agent-ident-sep {
5128
+ color: var(--text-muted);
5129
+ flex-shrink: 0;
4683
5130
  }
4684
5131
  .agent-type-ns {
4685
- font-size: 11px;
4686
5132
  color: var(--text-muted);
4687
- font-weight: 400;
4688
5133
  }
4689
5134
  .agent-type-name {
4690
- font-size: 13px;
4691
- font-weight: 600;
4692
- color: var(--text-primary);
5135
+ min-width: 0;
4693
5136
  overflow: hidden;
4694
5137
  text-overflow: ellipsis;
4695
5138
  }
@@ -4697,8 +5140,8 @@ body.booting .boot-splash {
4697
5140
  font-size: 9px;
4698
5141
  padding: 2px 6px;
4699
5142
  border-radius: 3px;
4700
- margin-left: 6px;
4701
- vertical-align: middle;
5143
+ margin-left: 2px;
5144
+ flex-shrink: 0;
4702
5145
  }
4703
5146
  .agent-status-row {
4704
5147
  display: flex;
@@ -4728,30 +5171,13 @@ body.booting .boot-splash {
4728
5171
  color: var(--text-primary);
4729
5172
  }
4730
5173
  .agent-status {
4731
- font-size: 11px;
4732
- color: var(--text-tertiary);
5174
+ font-size: 10px;
5175
+ color: var(--text-muted);
4733
5176
  }
4734
5177
  .agent-card-model {
4735
- margin-left: auto;
4736
- padding: 1px 6px;
4737
- font-family: var(--font-mono, monospace);
4738
- font-size: 9.5px;
4739
- line-height: 1.4;
4740
- color: var(--text-tertiary);
4741
- border: 1px solid var(--border);
4742
- border-radius: 999px;
4743
- white-space: nowrap;
4744
- overflow: hidden;
4745
- text-overflow: ellipsis;
4746
- max-width: 45%;
4747
- }
4748
- .agent-message {
4749
- font-size: 11px;
4750
- color: var(--text-muted);
4751
- max-width: 220px;
4752
- overflow: hidden;
4753
- text-overflow: ellipsis;
4754
- white-space: nowrap;
5178
+ flex-shrink: 0;
5179
+ font-weight: 600;
5180
+ color: var(--text-primary);
4755
5181
  }
4756
5182
 
4757
5183
  .agent-dismiss-btn {
@@ -4918,7 +5344,7 @@ body.booting .boot-splash {
4918
5344
  white-space: nowrap;
4919
5345
  }
4920
5346
 
4921
- .scratch-files-more {
5347
+ .list-more {
4922
5348
  margin: 6px 0 0;
4923
5349
  font-size: 11px;
4924
5350
  }
@@ -5672,16 +6098,19 @@ body.light .msg-assistant .msg-text {
5672
6098
  padding-right: 8px;
5673
6099
  }
5674
6100
 
5675
- #preview-modal-body .preview-image {
6101
+ .preview-image {
5676
6102
  display: block;
5677
6103
  max-width: 100%;
5678
- max-height: 70vh;
5679
6104
  margin: 0 auto;
5680
6105
  border: 1px solid var(--border);
5681
6106
  border-radius: 4px;
5682
6107
  background: var(--bg-hover);
5683
6108
  }
5684
6109
 
6110
+ #preview-modal-body .preview-image {
6111
+ max-height: 70vh;
6112
+ }
6113
+
5685
6114
  #preview-modal-meta {
5686
6115
  margin-top: 12px;
5687
6116
  font-size: 11px;
@@ -7973,8 +8402,9 @@ pre.mermaid svg {
7973
8402
  color: var(--text-primary);
7974
8403
  }
7975
8404
 
7976
- /* Move-to-group menu (right-click / long-press) */
7977
- .sg-menu {
8405
+ /* Move-to-group menu (right-click / long-press); the pane tab menu shares the look */
8406
+ .sg-menu,
8407
+ .pane-menu {
7978
8408
  position: fixed;
7979
8409
  z-index: 3000;
7980
8410
  min-width: 180px;
@@ -7989,7 +8419,8 @@ pre.mermaid svg {
7989
8419
  gap: 1px;
7990
8420
  }
7991
8421
 
7992
- .sg-menu-label {
8422
+ .sg-menu-label,
8423
+ .pane-menu-label {
7993
8424
  padding: 6px 8px 4px;
7994
8425
  font-size: 10px;
7995
8426
  text-transform: uppercase;
@@ -7997,7 +8428,8 @@ pre.mermaid svg {
7997
8428
  color: var(--text-muted);
7998
8429
  }
7999
8430
 
8000
- .sg-menu-item {
8431
+ .sg-menu-item,
8432
+ .pane-menu-item {
8001
8433
  display: flex;
8002
8434
  align-items: center;
8003
8435
  gap: 6px;
@@ -8014,7 +8446,9 @@ pre.mermaid svg {
8014
8446
  }
8015
8447
 
8016
8448
  .sg-menu-item:hover,
8017
- .sg-menu-item:focus-visible {
8449
+ .sg-menu-item:focus-visible,
8450
+ .pane-menu-item:hover,
8451
+ .pane-menu-item:focus-visible {
8018
8452
  background: var(--bg-hover);
8019
8453
  outline: none;
8020
8454
  }
@@ -8022,4 +8456,16 @@ pre.mermaid svg {
8022
8456
  .sg-menu-remove {
8023
8457
  color: var(--text-secondary);
8024
8458
  }
8459
+
8460
+ .pane-menu {
8461
+ font-family: var(--font-mono);
8462
+ }
8463
+
8464
+ .pane-menu-label {
8465
+ overflow: hidden;
8466
+ text-overflow: ellipsis;
8467
+ text-transform: none;
8468
+ letter-spacing: 0;
8469
+ white-space: nowrap;
8470
+ }
8025
8471
  /* #endregion */
@@ -0,0 +1,74 @@
1
+ // Loaded by the page as a plain script and by the tests through require.
2
+ // Highlights plain-text call trees and flows in message code blocks. The output only wraps the
3
+ // input in spans, so a copy of the block stays byte-identical to what Claude wrote.
4
+ const treeHighlight = (() => {
5
+ const TREE_TAGS = new Set(['tree', 'callstack', 'flow']);
6
+ const PLAIN_TAGS = new Set(['', 'text', 'txt', 'plaintext', 'diff']);
7
+ const TREE_LINE = /^[+-]?[ \t]*[│├└▼]/;
8
+ const BOX_CORNERS = /[┌┐┬┼┴┘╔╗╚╝╠╣╦╩╬]/;
9
+ const NAME = String.raw`[\p{L}_$@][\p{L}\p{N}_$@.:<>\-/\\]*`;
10
+ const LINE = new RegExp(
11
+ String.raw`^([+-](?=[ \t│├└▼]|$))?([ \t]*(?:[│├└─▼↓→ \t]*[│├└─▼↓→][ \t]*)?)(${NAME})?(.*)$`,
12
+ 'su',
13
+ );
14
+ const INDENT_NODE_LINE = new RegExp(String.raw`^([ \t]*)${NAME}(\([^()]*\))?( {2,}\S.*)?$`, 'u');
15
+
16
+ function escapeText(s) {
17
+ return s
18
+ .replace(/&/g, '&amp;')
19
+ .replace(/</g, '&lt;')
20
+ .replace(/>/g, '&gt;')
21
+ .replace(/"/g, '&quot;')
22
+ .replace(/'/g, '&#39;');
23
+ }
24
+
25
+ function span(cls, s) {
26
+ return s ? `<span class="${cls}">${escapeText(s)}</span>` : '';
27
+ }
28
+
29
+ // Two tree lines at least, and no table corners: box tables and ASCII art draw with those.
30
+ function looksLikeTree(text) {
31
+ if (BOX_CORNERS.test(text)) return false;
32
+ let hits = 0;
33
+ for (const line of text.split('\n')) {
34
+ if (TREE_LINE.test(line) && ++hits >= 2) return true;
35
+ }
36
+ return false;
37
+ }
38
+
39
+ // A call tree drawn with indentation only: every line is one name or call, with an optional
40
+ // note after two spaces. Prose and pseudocode have single-spaced words, so they never match.
41
+ function looksLikeIndentTree(text, diff) {
42
+ const lines = text.split('\n').filter((l) => l.trim());
43
+ if (lines.length < 3) return false;
44
+ const indents = new Set();
45
+ for (const raw of lines) {
46
+ if (diff && !/^[ +-]/.test(raw)) return false;
47
+ const m = (diff ? raw.slice(1) : raw).match(INDENT_NODE_LINE);
48
+ if (!m) return false;
49
+ indents.add(m[1].length);
50
+ }
51
+ return indents.size >= 2;
52
+ }
53
+
54
+ function wantsTree(lang, text) {
55
+ const tag = (lang || '').trim().toLowerCase();
56
+ if (TREE_TAGS.has(tag)) return true;
57
+ return PLAIN_TAGS.has(tag) && (looksLikeTree(text) || looksLikeIndentTree(text, tag === 'diff'));
58
+ }
59
+
60
+ function highlightLine(line) {
61
+ const [, marker = '', glyphs, node = '', rest] = line.match(LINE);
62
+ const body = span('hljs-punctuation', glyphs) + span('hljs-title', node) + escapeText(rest);
63
+ if (!marker) return body;
64
+ return `<span class="${marker === '+' ? 'hljs-addition' : 'hljs-deletion'}">${marker}${body}</span>`;
65
+ }
66
+
67
+ function highlightTree(text) {
68
+ return text.split('\n').map(highlightLine).join('\n');
69
+ }
70
+
71
+ return { wantsTree, highlightTree };
72
+ })();
73
+
74
+ if (typeof module === 'object' && module.exports) module.exports = treeHighlight;