xtralab 0.11.1 → 0.12.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/README.md +37 -231
- package/lib/agentSessions.d.ts +6 -2
- package/lib/askAgent/editorSelection.d.ts +53 -0
- package/lib/askAgent/editorSelection.js +95 -0
- package/lib/askAgent/icons.d.ts +7 -0
- package/lib/askAgent/icons.js +15 -0
- package/lib/askAgent/index.d.ts +32 -0
- package/lib/askAgent/index.js +741 -0
- package/lib/askAgent/popup.d.ts +83 -0
- package/lib/askAgent/popup.js +221 -0
- package/lib/askAgent/prompt.d.ts +24 -0
- package/lib/askAgent/prompt.js +116 -0
- package/lib/askAgent/queue.d.ts +93 -0
- package/lib/askAgent/queue.js +207 -0
- package/lib/askAgent/queuePanel.d.ts +76 -0
- package/lib/askAgent/queuePanel.js +188 -0
- package/lib/askAgent/targetPicker.d.ts +58 -0
- package/lib/askAgent/targetPicker.js +74 -0
- package/lib/askAgent/tokens.d.ts +124 -0
- package/lib/askAgent/tokens.js +13 -0
- package/lib/commandBar/index.d.ts +12 -8
- package/lib/commandBar/index.js +58 -41
- package/lib/editorBreadcrumbs/index.js +9 -4
- package/lib/editorBreadcrumbs/widget.d.ts +7 -7
- package/lib/editorBreadcrumbs/widget.js +6 -8
- package/lib/fileBrowser/commands.d.ts +2 -8
- package/lib/fileBrowser/commands.js +39 -30
- package/lib/fileBrowser/contents.d.ts +8 -3
- package/lib/fileBrowser/fileBrowser.d.ts +2 -1
- package/lib/fileBrowser/widget.d.ts +5 -9
- package/lib/fileBrowser/widget.js +1 -1
- package/lib/fileTypeIcons/index.js +5 -2
- package/lib/git/api.d.ts +0 -26
- package/lib/git/api.js +2 -44
- package/lib/git/askRequest.d.ts +23 -0
- package/lib/git/askRequest.js +90 -0
- package/lib/git/commands.d.ts +14 -2
- package/lib/git/commands.js +16 -13
- package/lib/git/diffModel.d.ts +1 -9
- package/lib/git/diffModel.js +1 -1
- package/lib/git/diffProvider.js +8 -3
- package/lib/git/diffSurface.d.ts +19 -2
- package/lib/git/diffSurface.js +64 -18
- package/lib/git/diffTheme.d.ts +0 -4
- package/lib/git/diffTheme.js +1 -1
- package/lib/git/diffWidget.d.ts +9 -0
- package/lib/git/diffWidget.js +38 -10
- package/lib/git/imageDiff.d.ts +17 -4
- package/lib/git/imageDiff.js +90 -30
- package/lib/git/index.js +7 -2
- package/lib/git/notebookDiff.d.ts +10 -67
- package/lib/git/notebookDiff.js +62 -69
- package/lib/git/tokens.d.ts +5 -2
- package/lib/highlight/index.js +12 -8
- package/lib/index.js +2 -0
- package/lib/launcher/agents.js +3 -4
- package/lib/launcher/commands.d.ts +6 -2
- package/lib/launcher/dashboard.d.ts +8 -1
- package/lib/launcher/dashboard.js +39 -33
- package/lib/launcher/editorRegistry.js +5 -3
- package/lib/launcher/editors.d.ts +15 -5
- package/lib/launcher/icons.d.ts +0 -37
- package/lib/launcher/icons.js +11 -12
- package/lib/launcher/index.js +2 -1
- package/lib/launcher/invocation.d.ts +0 -15
- package/lib/launcher/invocation.js +1 -1
- package/lib/launcher/schemaDefaults.d.ts +3 -1
- package/lib/launcher/schemaDefaults.js +3 -1
- package/lib/mimeData.d.ts +7 -0
- package/lib/mimeData.js +16 -0
- package/lib/omnibox/index.d.ts +4 -0
- package/lib/omnibox/index.js +43 -2
- package/lib/omnibox/model.d.ts +43 -14
- package/lib/omnibox/model.js +117 -14
- package/lib/omnibox/recents.d.ts +65 -0
- package/lib/omnibox/recents.js +109 -0
- package/lib/omnibox/tokens.d.ts +6 -2
- package/lib/omnibox/widget.d.ts +23 -6
- package/lib/omnibox/widget.js +26 -7
- package/lib/showOutput/index.js +15 -18
- package/lib/terminals/agentTerminals.d.ts +63 -0
- package/lib/terminals/agentTerminals.js +157 -0
- package/lib/terminals/index.d.ts +7 -1
- package/lib/terminals/index.js +50 -30
- package/lib/terminals/model.d.ts +11 -2
- package/lib/terminals/model.js +27 -8
- package/lib/terminals/tokens.d.ts +66 -0
- package/lib/terminals/tokens.js +7 -0
- package/lib/terminals/widget.d.ts +3 -6
- package/lib/terminals/widget.js +1 -1
- package/lib/topBar/index.js +3 -3
- package/lib/walkthrough/index.js +14 -3
- package/lib/walkthrough/panel.d.ts +12 -4
- package/lib/walkthrough/panel.js +9 -3
- package/package.json +49 -51
- package/schema/command-bar.json +10 -0
- package/schema/omnibox.json +15 -0
- package/src/agentSessions.ts +6 -2
- package/src/askAgent/editorSelection.ts +138 -0
- package/src/askAgent/icons.ts +16 -0
- package/src/askAgent/index.ts +915 -0
- package/src/askAgent/popup.tsx +407 -0
- package/src/askAgent/prompt.ts +144 -0
- package/src/askAgent/queue.ts +269 -0
- package/src/askAgent/queuePanel.tsx +418 -0
- package/src/askAgent/targetPicker.tsx +209 -0
- package/src/askAgent/tokens.ts +139 -0
- package/src/commandBar/index.ts +75 -49
- package/src/editorBreadcrumbs/index.ts +14 -4
- package/src/editorBreadcrumbs/widget.ts +11 -9
- package/src/fileBrowser/commands.ts +45 -31
- package/src/fileBrowser/contents.ts +7 -3
- package/src/fileBrowser/fileBrowser.tsx +1 -1
- package/src/fileBrowser/widget.tsx +5 -3
- package/src/fileTypeIcons/index.ts +6 -3
- package/src/git/api.ts +2 -61
- package/src/git/askRequest.ts +113 -0
- package/src/git/commands.ts +41 -14
- package/src/git/diffModel.ts +1 -1
- package/src/git/diffProvider.tsx +11 -3
- package/src/git/diffSurface.tsx +114 -22
- package/src/git/diffTheme.ts +1 -1
- package/src/git/diffWidget.tsx +54 -7
- package/src/git/imageDiff.tsx +169 -58
- package/src/git/index.ts +10 -2
- package/src/git/notebookDiff.tsx +91 -57
- package/src/git/tokens.ts +4 -2
- package/src/highlight/index.ts +12 -8
- package/src/index.ts +2 -0
- package/src/launcher/agents.ts +3 -4
- package/src/launcher/commands.ts +6 -2
- package/src/launcher/dashboard.tsx +86 -38
- package/src/launcher/editorRegistry.ts +10 -4
- package/src/launcher/editors.ts +15 -5
- package/src/launcher/icons.ts +11 -12
- package/src/launcher/index.ts +2 -1
- package/src/launcher/invocation.ts +1 -1
- package/src/launcher/schemaDefaults.ts +3 -1
- package/src/mimeData.ts +20 -0
- package/src/omnibox/index.ts +48 -1
- package/src/omnibox/model.ts +173 -33
- package/src/omnibox/recents.ts +155 -0
- package/src/omnibox/tokens.ts +6 -2
- package/src/omnibox/widget.tsx +54 -13
- package/src/showOutput/index.ts +20 -23
- package/src/terminals/agentTerminals.ts +238 -0
- package/src/terminals/index.ts +54 -30
- package/src/terminals/model.ts +28 -7
- package/src/terminals/tokens.ts +77 -0
- package/src/terminals/widget.tsx +4 -2
- package/src/topBar/index.ts +12 -6
- package/src/walkthrough/index.ts +19 -4
- package/src/walkthrough/panel.ts +15 -5
- package/style/askAgent.css +544 -0
- package/style/commandBar.css +12 -33
- package/style/git.css +72 -31
- package/style/index.css +1 -0
- package/style/index.js +2 -0
- package/style/topBar.css +4 -4
package/style/git.css
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Styles for xtralab's @pierre/diffs viewer. The same surface is used by
|
|
3
3
|
* the launcher dashboard's own diff tab and by the jupyterlab-git diff
|
|
4
|
-
* providers, so these rules cover both hosts.
|
|
5
|
-
* git changes panel — the upstream jupyterlab-git panel is reused.)
|
|
4
|
+
* providers, so these rules cover both hosts.
|
|
6
5
|
*/
|
|
7
6
|
|
|
8
7
|
/*
|
|
@@ -97,8 +96,8 @@
|
|
|
97
96
|
|
|
98
97
|
.jp-xtralab-DiffWidget-segmented {
|
|
99
98
|
display: inline-flex;
|
|
100
|
-
border:
|
|
101
|
-
border-radius:
|
|
99
|
+
border: var(--jp-border-width) solid var(--jp-border-color2);
|
|
100
|
+
border-radius: var(--jp-border-radius);
|
|
102
101
|
overflow: hidden;
|
|
103
102
|
background-color: var(--jp-layout-color1);
|
|
104
103
|
}
|
|
@@ -109,14 +108,20 @@
|
|
|
109
108
|
background: transparent;
|
|
110
109
|
color: var(--jp-ui-font-color1);
|
|
111
110
|
font-size: var(--jp-ui-font-size0);
|
|
112
|
-
cursor: pointer;
|
|
113
111
|
line-height: 1.4;
|
|
112
|
+
cursor: pointer;
|
|
114
113
|
}
|
|
115
114
|
|
|
116
115
|
.jp-xtralab-DiffWidget-segmentedButton:hover {
|
|
117
116
|
background-color: var(--jp-layout-color2);
|
|
118
117
|
}
|
|
119
118
|
|
|
119
|
+
/*
|
|
120
|
+
* Active segment: brand-colour fill with the inverse UI font colour — the
|
|
121
|
+
* same pair JupyterLab uses to mark selected items (the command palette
|
|
122
|
+
* active item, the file browser selection). The inverse font colour adapts
|
|
123
|
+
* per theme, so the label stays legible on the brand fill in both themes.
|
|
124
|
+
*/
|
|
120
125
|
.jp-xtralab-DiffWidget-segmentedButton[data-active='true'] {
|
|
121
126
|
background-color: var(--jp-brand-color1);
|
|
122
127
|
color: var(--jp-ui-inverse-font-color1);
|
|
@@ -586,17 +591,27 @@
|
|
|
586
591
|
margin: 0;
|
|
587
592
|
}
|
|
588
593
|
|
|
594
|
+
/*
|
|
595
|
+
* Checkerboard + border so transparent regions read clearly. The squares
|
|
596
|
+
* are theme-aware (JupyterLab layout colors) so the frame stays a calm
|
|
597
|
+
* light checkerboard in the light theme and a calm dark one in the dark
|
|
598
|
+
* theme, rather than a bright white block.
|
|
599
|
+
*
|
|
600
|
+
* 2-up and onion fill their whole panel with it; the swipe view instead
|
|
601
|
+
* carries it on its image-sized *frame* (not the surrounding area) so the
|
|
602
|
+
* checkerboard hugs the image. That keeps the divider's top/bottom handles
|
|
603
|
+
* sitting at the image edges instead of floating in the middle of a
|
|
604
|
+
* checkerboard expanse.
|
|
605
|
+
*/
|
|
589
606
|
.jp-xtralab-ImageDiff-frame,
|
|
590
|
-
.jp-xtralab-ImageDiff-stack
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
*/
|
|
594
|
-
background-color: #fff;
|
|
607
|
+
.jp-xtralab-ImageDiff-stack,
|
|
608
|
+
.jp-xtralab-ImageDiff-swipeFrame {
|
|
609
|
+
background-color: var(--jp-layout-color1);
|
|
595
610
|
background-image:
|
|
596
|
-
linear-gradient(45deg,
|
|
597
|
-
linear-gradient(-45deg,
|
|
598
|
-
linear-gradient(45deg, transparent 75%,
|
|
599
|
-
linear-gradient(-45deg, transparent 75%,
|
|
611
|
+
linear-gradient(45deg, var(--jp-layout-color3) 25%, transparent 25%),
|
|
612
|
+
linear-gradient(-45deg, var(--jp-layout-color3) 25%, transparent 25%),
|
|
613
|
+
linear-gradient(45deg, transparent 75%, var(--jp-layout-color3) 75%),
|
|
614
|
+
linear-gradient(-45deg, transparent 75%, var(--jp-layout-color3) 75%);
|
|
600
615
|
background-size: 16px 16px;
|
|
601
616
|
background-position:
|
|
602
617
|
0 0,
|
|
@@ -651,8 +666,8 @@
|
|
|
651
666
|
}
|
|
652
667
|
|
|
653
668
|
/*
|
|
654
|
-
*
|
|
655
|
-
*
|
|
669
|
+
* Onion-skin view: both revisions occupy the same grid cell so they
|
|
670
|
+
* overlay. `place-items: center` keeps each image at its own size (no
|
|
656
671
|
* stretching the smaller revision up to the larger one's box) while
|
|
657
672
|
* `max-height/width` scale either one down to fit the available space.
|
|
658
673
|
*/
|
|
@@ -677,31 +692,57 @@
|
|
|
677
692
|
}
|
|
678
693
|
|
|
679
694
|
/*
|
|
680
|
-
* Swipe view
|
|
681
|
-
*
|
|
682
|
-
*
|
|
683
|
-
*
|
|
684
|
-
* item the interactive column needs to shrink, so `max-height: 100%`
|
|
685
|
-
* on the image still keeps big revisions inside the available area.
|
|
686
|
-
*
|
|
687
|
-
* The whole frame is the drag target: pressing anywhere over the image
|
|
688
|
-
* sets the divider to that x position and drag-tracks the pointer. The
|
|
689
|
-
* dedicated bottom slider was removed because its thumb sat on a
|
|
690
|
-
* narrow centered track that drifted out of sync with the wide
|
|
691
|
-
* divider, which felt off. Dragging directly on the image (GitHub /
|
|
692
|
-
* Pierre style) keeps cursor and divider visually aligned.
|
|
695
|
+
* Swipe view: a transparent container that just centers the image-sized
|
|
696
|
+
* frame in whatever space the body leaves. The checkerboard lives on the
|
|
697
|
+
* frame (above), not here, so it hugs the image rather than spanning the
|
|
698
|
+
* panel.
|
|
693
699
|
*/
|
|
694
|
-
.jp-xtralab-ImageDiff-
|
|
700
|
+
.jp-xtralab-ImageDiff-swipeArea {
|
|
695
701
|
flex: 1 1 auto;
|
|
696
702
|
min-height: 0;
|
|
697
703
|
min-width: 0;
|
|
698
704
|
width: 100%;
|
|
699
|
-
position: relative;
|
|
700
705
|
display: flex;
|
|
706
|
+
align-items: center;
|
|
707
|
+
justify-content: center;
|
|
708
|
+
}
|
|
709
|
+
|
|
710
|
+
/*
|
|
711
|
+
* The frame is sized in JS (inline `width`/`height`) to exactly the
|
|
712
|
+
* displayed image box. Because the frame *is* that box, the divider's
|
|
713
|
+
* `left: N%`, the pointer-to-percent mapping in `setFromClientX` and each
|
|
714
|
+
* image's `clip-path` inset all resolve against the same width — so the
|
|
715
|
+
* white divider line sits precisely on the seam between the two revisions
|
|
716
|
+
* as it is dragged. (A full-width frame instead let the line drift off the
|
|
717
|
+
* seam by up to half the surrounding letterbox.)
|
|
718
|
+
*
|
|
719
|
+
* The whole frame is the drag target: pressing anywhere over the image
|
|
720
|
+
* jumps the divider to that x and then drag-tracks the pointer (GitHub /
|
|
721
|
+
* Pierre style), keeping cursor, divider and seam together.
|
|
722
|
+
*/
|
|
723
|
+
.jp-xtralab-ImageDiff-swipeFrame {
|
|
724
|
+
position: relative;
|
|
725
|
+
max-width: 100%;
|
|
726
|
+
max-height: 100%;
|
|
701
727
|
user-select: none;
|
|
702
728
|
touch-action: none;
|
|
703
729
|
}
|
|
704
730
|
|
|
731
|
+
/*
|
|
732
|
+
* Both revisions fill the frame, so an image's clip inset of N% and the
|
|
733
|
+
* divider at `left: N%` cut at the same x. `object-fit: contain` only
|
|
734
|
+
* letterboxes when the two revisions differ in aspect ratio; for the
|
|
735
|
+
* common same-dimensions edit it fills the box exactly.
|
|
736
|
+
*/
|
|
737
|
+
.jp-xtralab-ImageDiff-swipeImg {
|
|
738
|
+
position: absolute;
|
|
739
|
+
inset: 0;
|
|
740
|
+
width: 100%;
|
|
741
|
+
height: 100%;
|
|
742
|
+
display: block;
|
|
743
|
+
object-fit: contain;
|
|
744
|
+
}
|
|
745
|
+
|
|
705
746
|
/*
|
|
706
747
|
* Swipe divider: a vertical line marking the boundary between the two
|
|
707
748
|
* clipped revisions. The natural seam between two clipped images is
|
package/style/index.css
CHANGED
package/style/index.js
CHANGED
package/style/topBar.css
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* Sidebar toggle buttons in the top bar (xtralab:top-bar). */
|
|
2
2
|
|
|
3
|
-
.xtralab-TopBarButton {
|
|
3
|
+
.jp-xtralab-TopBarButton {
|
|
4
4
|
display: flex;
|
|
5
5
|
align-items: center;
|
|
6
6
|
}
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
* its left so it floats to the far right, mirroring the left button at the
|
|
12
12
|
* leading edge.
|
|
13
13
|
*/
|
|
14
|
-
.xtralab-TopBarButton-right {
|
|
14
|
+
.jp-xtralab-TopBarButton-right {
|
|
15
15
|
margin-left: auto;
|
|
16
16
|
}
|
|
17
17
|
|
|
@@ -29,10 +29,10 @@
|
|
|
29
29
|
* `!important` is needed to override the (non-important) `:host(...)` rules
|
|
30
30
|
* defined inside the component's shadow DOM.
|
|
31
31
|
*/
|
|
32
|
-
.xtralab-TopBarButton .jp-ToolbarButtonComponent {
|
|
32
|
+
.jp-xtralab-TopBarButton .jp-ToolbarButtonComponent {
|
|
33
33
|
box-shadow: none !important;
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
.xtralab-TopBarButton .jp-ToolbarButtonComponent[disabled] {
|
|
36
|
+
.jp-xtralab-TopBarButton .jp-ToolbarButtonComponent[disabled] {
|
|
37
37
|
background: transparent !important;
|
|
38
38
|
}
|