@ycodium-ai/plugin-browser-workbench 0.2.6295 → 0.2.6450
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/assets/ui.js +197 -4
- package/dist/index.js +1 -1
- package/package.json +3 -3
package/assets/ui.js
CHANGED
|
@@ -1,20 +1,67 @@
|
|
|
1
|
-
var X=window.__ycodiumPluginHost.react;var{Activity:re,Children:se,Component:ae,Fragment:ie,Profiler:le,PureComponent:ce,StrictMode:pe,Suspense:de,__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE:ue,__COMPILER_RUNTIME:ge,act:fe,cache:he,cacheSignal:me,captureOwnerStack:ye,cloneElement:be,createContext:we,createElement:ke,createRef:xe,forwardRef:Se,isValidElement:Pe,lazy:ve,memo:Ee,startTransition:Re,unstable_useCacheRefresh:Ce,use:We,useActionState:Oe,useCallback:Be,useContext:_e,useDebugValue:Te,useDeferredValue:Ne,useEffect:O,useEffectEvent:Ie,useId:Ke,useImperativeHandle:De,useInsertionEffect:Ae,useLayoutEffect:Ue,useMemo:He,useOptimistic:Le,useReducer:Me,useRef:B,useState:x,useSyncExternalStore:Fe,useTransition:ze,version:je}=X;var _=["license","check-cli","download-cli","start-server","download-server","register-port"],A=["started","progress","output","succeeded","skipped","failed"],U=["license-required","download-failed","disk-full","launch-failed","port-in-use","server-download-failed","grant-expired","host-key-mismatch","channel-failed","unknown"];function H(){let e=new Map,n=Promise.resolve();return{run:(t,l,o)=>{let c=e.get(t);if(c!==void 0&&!c.signal?.aborted)return c.run;let a=n.then(l),d=()=>{e.get(t)?.run===a&&e.delete(t)};return n=a.then(d,d),e.set(t,{run:a,signal:o}),a}}}var L=[..._,"open-channel","open-forward","open-browser"],M=H(),P=e=>typeof e=="object"&&e!==null?e:{},R=class extends Error{detailKey;constructor(n){super(n),this.detailKey=n}};function T(e){if(e instanceof R)return{kind:"unknown",detailKey:e.detailKey,detail:void 0};let n=P(e),t=P(n.pluginData).failureKind??n.pluginCode??n.failureKind??n.code;return{kind:U.find(o=>o===t)??"unknown",detailKey:void 0,detail:e instanceof Error?e.message:typeof n.message=="string"?n.message:void 0}}function N(e){return!e.registeredPorts||!e.commands.stream||e.registeredPorts.availability==="upgrade-required"?"workbench.gate.desktopNeedsUpgrade":e.registeredPorts.availability==="desktop-required"?"workbench.gate.webNeedsDesktop":null}function Z(e){let n=P(e);if(!(!_.some(t=>t===n.stage)||!A.some(t=>t===n.status)||typeof n.at!="string"))return e}function F(e,n,t,l,o){return M.run(JSON.stringify(["open",n.environmentId,n.folder,t]),async()=>{l.throwIfAborted();let c=e.registeredPorts;if(!c||!e.commands.stream||c.availability!=="ready")throw new R("workbench.openError.forwardingUnavailable");let a=new AbortController,d=!1,u=!1,S=e.commands.stream("progress",{},{environmentId:n.environmentId,signal:AbortSignal.any([l,a.signal]),onValue:i=>{let p=Z(i);p&&(o(p),p.status==="failed"&&(u=!0,d&&a.abort()))}}).catch(()=>{});try{let i;try{i=P(await e.commands.invoke("open",{...t?{acceptLicense:!0}:{},...n.machineLabel?{machineLabel:n.machineLabel}:{}},{environmentId:n.environmentId}))}catch(h){throw d=T(h).kind!=="license-required",h}if(l.throwIfAborted(),typeof i.portId!="string"||!i.portId.trim())throw new R("workbench.openError.missingPort");let p=[];typeof i.token=="string"&&i.token.trim()&&p.push("tkn="+encodeURIComponent(i.token.trim())),n.folder?.trim()&&p.push("folder="+encodeURIComponent(n.folder.trim())),await c.open({environmentId:n.environmentId,portId:i.portId,path:p.length?"/?"+p.join("&"):"/",signal:l,onProgress:(h,b)=>o({stage:h,status:b,at:new Date().toISOString()})})}finally{(!d||u||l.aborted)&&(a.abort(),await S)}},l)}function z(e,n,t,l){return M.run(JSON.stringify(["stop",n]),async()=>{let o=P(await e.commands.invoke("stop",{},{environmentId:n})),c=P(o.released).port;typeof c=="number"&&l(c),t&&await e.registeredPorts?.close({environmentId:n,portId:t})})}var I=`/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */
|
|
1
|
+
var se=window.__ycodiumPluginHost.react;var{Activity:_e,Children:Ke,Component:ae,Fragment:ie,Profiler:Fe,PureComponent:Be,StrictMode:Me,Suspense:Oe,__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE:Ue,__COMPILER_RUNTIME:We,act:ze,cache:Ge,cacheSignal:$e,captureOwnerStack:Ve,cloneElement:H,createContext:$,createElement:P,createRef:je,forwardRef:qe,isValidElement:K,lazy:Qe,memo:le,startTransition:Xe,unstable_useCacheRefresh:Je,use:V,useActionState:Ye,useCallback:j,useContext:Ze,useDebugValue:en,useDeferredValue:nn,useEffect:A,useEffectEvent:tn,useId:on,useImperativeHandle:rn,useInsertionEffect:ce,useLayoutEffect:sn,useMemo:F,useOptimistic:an,useReducer:ln,useRef:D,useState:x,useSyncExternalStore:de,useTransition:cn,version:dn}=se;var{jsx:s,jsxs:p,Fragment:S}=window.__ycodiumPluginHost.jsxRuntime;var Q=$(null);function L(e){let n=e.scopeClass??"",t=F(()=>({bridge:e.bridge,scopeClass:n}),[e.bridge,n]);return P(Q,{value:t},e.children)}var ue={PluginIcon:"className",ProviderInstanceIcon:"className",MachineName:"className",MachineSelect:"none",BlockedTooltip:"popupClassName",ProjectName:"className",ProviderName:"className",ThreadName:"className",PluginName:"className",UserAvatar:"className",Badge:"className",CountBadge:"className",Button:"className",Checkbox:"className",SplitButton:"className",CommunicationFlow:"none",CommunicationGraph:"none",Card:"className",CardAction:"className",CardPanel:"className",CardDescription:"className",CardFooter:"className",CardHeader:"className",CardTitle:"className",Empty:"className",EmptyContent:"className",EmptyDescription:"className",EmptyHeader:"className",EmptyInline:"className",EmptyMedia:"className",EmptyTitle:"className",DraftInput:"className",DiffStat:"className",Field:"className",FieldDescription:"className",FieldError:"className",FieldLabel:"className",Input:"className",InputGroup:"className",InputGroupAddon:"className",InputGroupInput:"className",MiddleTruncate:"className",NumberField:"className",NumberFieldDecrement:"className",NumberFieldGroup:"className",NumberFieldIncrement:"className",NumberFieldInput:"className",SearchInput:"className",SelectableCard:"className",SelectableCardGroup:"className",DecisionCard:"className",DecisionCardSection:"none",ChoiceList:"none",StatusPill:"className",TaskList:"className",TaskRow:"className",FilterTagStrip:"className",FilterTag:"className",Meter:"className",InlineTag:"className",DocumentPanel:"none",MasterDetail:"none",Label:"className",ScrollArea:"className",Select:"none",SelectListBody:"className",SelectListGroupLabel:"className",SelectionCheckboxRow:"className",SelectionDialog:"popupClassName",SelectionDialogContent:"none",SelectionRow:"className",FormDialog:"popupClassName",FormDialogContent:"none",ConfirmDialog:"popupClassName",ConfirmDialogContent:"none",SelectItem:"className",SelectTrigger:"className",SelectValue:"className",Separator:"className",Skeleton:"className",Spinner:"className",RefreshIcon:"className",Switch:"className",Textarea:"className",AlertDialog:"none",AlertDialogClose:"className",AlertDialogDescription:"className",AlertDialogFooter:"className",AlertDialogHeader:"className",AlertDialogPopup:"className",AlertDialogTitle:"className",Dialog:"none",DialogClose:"className",DialogDescription:"className",DialogFooter:"className",DialogHeader:"className",DialogPopup:"className",DialogTitle:"className",DialogTrigger:"className",Menu:"none",MenuCheckboxItem:"className",MenuGroupLabel:"className",MenuItem:"className",MenuPopup:"className",MenuRadioGroup:"className",MenuRadioItem:"className",MenuSeparator:"className",MenuTrigger:"className",Popover:"none",PopoverPopup:"className",PopoverTrigger:"className",Table:"className",TableBody:"className",TableCell:"className",TableHead:"className",TableHeader:"className",TableRow:"className",Tooltip:"none",TooltipPopup:"className",TooltipTrigger:"className",Toggle:"className",ToggleGroup:"className",Tabs:"className",TabsDetachedPanel:"className",TabsList:"className",TabsPanel:"className",TabsTab:"className",Collapsible:"className",CollapsiblePanel:"className",CollapsibleTrigger:"className",ChevronDown:"className",Alert:"className",AlertAction:"className",AlertDescription:"className",AlertTitle:"className",Kbd:"className",Command:"none",CommandGroup:"className",CommandItem:"className",CommandList:"className",Combobox:"none",ComboboxEmpty:"className",ComboboxInput:"className",ComboboxItem:"className",ComboboxListVirtualized:"className",TooltipProvider:"none",StyledDiffCodeView:"className",DevBackdropArt:"none",SelectPopup:"popupClassName",MenuGroup:"className",DialogPanel:"className",Markdown:"className",DiffView:"className",DetailViewport:"className",MediaPlayer:"className",SandboxedHtmlCard:"none",QRCodeSvg:"className",ProxyChoiceSelect:"none",ProviderSignInChallenge:"none",RuntimeMaintenanceActions:"none",ProviderModelPicker:"none",TraitsPicker:"none",TraitsMenuContent:"none",ComposerControl:"className",ComposerControlIcon:"className",ComposerControlChevron:"none",ComposerSelectControl:"className",TimelineRowErrorFallback:"className",TimelineSeparator:"className",ModelIdentity:"className",TimelineProcessShell:"className",ProcessRowIcon:"none",WorkEntryStatusDot:"none",WorkEntryIcon:"className"},pe={WorkspaceBreadcrumb:"className",WorkspaceBreadcrumbItem:"className",WorkspaceBreadcrumbSeparator:"className",WorkspacePageContainer:"className",WorkspacePageHeader:"className",SidebarInset:"className"};function B(e){return P("div",typeof e.className=="string"?{className:e.className}:null,e.children)}function me(e){let{size:n,className:t,role:a="alert",children:o,...l}=e;return P("span",{...l,role:a,className:he(t,"text-destructive-foreground")},o)}function ge(e){let{render:n,reason:t,children:a}=e;if(!K(n))return a??null;let o=typeof t=="string"&&t.trim().length>0?{title:t}:void 0;return a!==void 0?H(n,o,a):o===void 0?n:H(n,o)}function fe(e){return e.children??null}function ye(e){let{render:n,children:t}=e;return K(n)?t!==void 0?H(n,void 0,t):n:t??null}var be={BlockedTooltip:ge,Collapsible:B,CollapsiblePanel:B,CollapsibleTrigger:B,FieldError:me,Tooltip:fe,TooltipTrigger:ye};function he(e,n){if(typeof e!="string")return n;let t=e.trim();return t.length===0?n:t.split(/\s+/u).includes(n)?e:`${e} ${n}`}function we(e,n){if(typeof n!="string")return e;let t=n.trim();return t.length===0?e:t.split(/\s+/u).includes(e)?n:`${e} ${n}`}function q(e,n,t){return n.length===0||t==="none"?e:{...e,[t]:we(n,e[t])}}function X(e){let n=e?.useBridge,t=e?.scopeClass,a=typeof t=="function"?t:void 0,o=typeof t=="string"?t:void 0;function l(r,c,m,k){let d=r==="ui"?be[c]:void 0,u=k??d,g=f=>{let y=V(Q),w=n?n():y?.bridge,T=a?a():o??y?.scopeClass??"",R=w?.[r]?.[c];return R===void 0?u!==void 0?P(u,q(f,T,m)):null:P(R,q(f,T,m))};return g.displayName=c,g}return{control(r,c){return l("ui",r,ue[r],c?.fallback)},layout(r,c){return l("layout",r,pe[r],c?.fallback)}}}var ke=X();function h(e,n){return ke.control(e,n)}var M="[a-zA-Z][a-zA-Z0-9:_-]*";var xe="ycodium",Ln=`${xe}:`,_n=new RegExp(String.raw`(^|\s)([$/])(${M})(?=\s|$)`,"g");var Kn=new RegExp(String.raw`([$/])(${M})(?=\s|$)`,"y");var Fn=new RegExp(String.raw`^/(${M})$`);var O=["license","check-cli","download-cli","start-server","download-server","register-port"],J=["started","progress","output","succeeded","skipped","failed"],Y=["license-required","download-failed","disk-full","launch-failed","port-in-use","server-download-failed","grant-expired","host-key-mismatch","channel-failed","unknown"];function Z(){let e=new Map,n=Promise.resolve();return{run:(t,a,o)=>{let l=e.get(t);if(l!==void 0&&!l.signal?.aborted)return l.run;let r=n.then(a),c=()=>{e.get(t)?.run===r&&e.delete(t)};return n=r.then(c,c),e.set(t,{run:r,signal:o}),r}}}var ee=[...O,"open-channel","open-forward","open-browser"],ne=Z(),E=e=>typeof e=="object"&&e!==null?e:{},I=class extends Error{detailKey;constructor(n){super(n),this.detailKey=n}};function U(e){if(e instanceof I)return{kind:"unknown",detailKey:e.detailKey,detail:void 0};let n=E(e),t=E(n.pluginData).failureKind??n.pluginCode??n.failureKind??n.code;return{kind:Y.find(o=>o===t)??"unknown",detailKey:void 0,detail:e instanceof Error?e.message:typeof n.message=="string"?n.message:void 0}}function W(e){return!e.registeredPorts||!e.commands.stream||e.registeredPorts.availability==="upgrade-required"?"workbench.gate.desktopNeedsUpgrade":e.registeredPorts.availability==="desktop-required"?"workbench.gate.webNeedsDesktop":null}function Ne(e){let n=E(e);if(!(!O.some(t=>t===n.stage)||!J.some(t=>t===n.status)||typeof n.at!="string"))return e}function te(e,n,t,a,o){return ne.run(JSON.stringify(["open",n.environmentId,n.folder,t]),async()=>{a.throwIfAborted();let l=e.registeredPorts;if(!l||!e.commands.stream||l.availability!=="ready")throw new I("workbench.openError.forwardingUnavailable");let r=new AbortController,c=!1,m=!1,k=e.commands.stream("progress",{},{environmentId:n.environmentId,signal:AbortSignal.any([a,r.signal]),onValue:d=>{let u=Ne(d);u&&(o(u),u.status==="failed"&&(m=!0,c&&r.abort()))}}).catch(()=>{});try{let d;try{d=E(await e.commands.invoke("open",{...t?{acceptLicense:!0}:{},...n.machineLabel?{machineLabel:n.machineLabel}:{}},{environmentId:n.environmentId}))}catch(g){throw c=U(g).kind!=="license-required",g}if(a.throwIfAborted(),typeof d.portId!="string"||!d.portId.trim())throw new I("workbench.openError.missingPort");let u=[];typeof d.token=="string"&&d.token.trim()&&u.push("tkn="+encodeURIComponent(d.token.trim())),n.folder?.trim()&&u.push("folder="+encodeURIComponent(n.folder.trim())),await l.open({environmentId:n.environmentId,portId:d.portId,path:u.length?"/?"+u.join("&"):"/",signal:a,onProgress:(g,f)=>o({stage:g,status:f,at:new Date().toISOString()})})}finally{(!c||m||a.aborted)&&(r.abort(),await k)}},a)}function oe(e,n,t,a){return ne.run(JSON.stringify(["stop",n]),async()=>{let o=E(await e.commands.invoke("stop",{},{environmentId:n})),l=E(o.released).port;typeof l=="number"&&a(l),t&&await e.registeredPorts?.close({environmentId:n,portId:t})})}var z=`/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */
|
|
2
2
|
@layer properties, theme, base, components, utilities;
|
|
3
3
|
@layer properties;
|
|
4
4
|
@layer utilities {
|
|
5
5
|
@scope (.ycodium-browser-workbench) {
|
|
6
|
+
.fixed:where(:scope, *) {
|
|
7
|
+
position: fixed;
|
|
8
|
+
}
|
|
9
|
+
.static:where(:scope, *) {
|
|
10
|
+
position: static;
|
|
11
|
+
}
|
|
12
|
+
.col-start-2:where(:scope, *) {
|
|
13
|
+
grid-column-start: 2;
|
|
14
|
+
}
|
|
6
15
|
.block:where(:scope, *) {
|
|
7
16
|
display: block;
|
|
8
17
|
}
|
|
18
|
+
.contents:where(:scope, *) {
|
|
19
|
+
display: contents;
|
|
20
|
+
}
|
|
9
21
|
.flex:where(:scope, *) {
|
|
10
22
|
display: flex;
|
|
11
23
|
}
|
|
24
|
+
.grid:where(:scope, *) {
|
|
25
|
+
display: grid;
|
|
26
|
+
}
|
|
27
|
+
.inline:where(:scope, *) {
|
|
28
|
+
display: inline;
|
|
29
|
+
}
|
|
30
|
+
.inline-flex:where(:scope, *) {
|
|
31
|
+
display: inline-flex;
|
|
32
|
+
}
|
|
33
|
+
.inline-grid:where(:scope, *) {
|
|
34
|
+
display: inline-grid;
|
|
35
|
+
}
|
|
36
|
+
.size-4:where(:scope, *) {
|
|
37
|
+
width: calc(var(--spacing, 0.25rem) * 4);
|
|
38
|
+
height: calc(var(--spacing, 0.25rem) * 4);
|
|
39
|
+
}
|
|
40
|
+
.size-6:where(:scope, *) {
|
|
41
|
+
width: calc(var(--spacing, 0.25rem) * 6);
|
|
42
|
+
height: calc(var(--spacing, 0.25rem) * 6);
|
|
43
|
+
}
|
|
12
44
|
.max-h-48:where(:scope, *) {
|
|
13
45
|
max-height: calc(var(--spacing, 0.25rem) * 48);
|
|
14
46
|
}
|
|
47
|
+
.w-fit:where(:scope, *) {
|
|
48
|
+
width: fit-content;
|
|
49
|
+
}
|
|
50
|
+
.w-full:where(:scope, *) {
|
|
51
|
+
width: 100%;
|
|
52
|
+
}
|
|
15
53
|
.max-w-lg:where(:scope, *) {
|
|
16
54
|
max-width: var(--container-lg, 32rem);
|
|
17
55
|
}
|
|
56
|
+
.min-w-0:where(:scope, *) {
|
|
57
|
+
min-width: calc(var(--spacing, 0.25rem) * 0);
|
|
58
|
+
}
|
|
59
|
+
.shrink-0:where(:scope, *) {
|
|
60
|
+
flex-shrink: 0;
|
|
61
|
+
}
|
|
62
|
+
.grid-cols-\\[4ch_4ch\\]:where(:scope, *) {
|
|
63
|
+
grid-template-columns: 4ch 4ch;
|
|
64
|
+
}
|
|
18
65
|
.flex-wrap:where(:scope, *) {
|
|
19
66
|
flex-wrap: wrap;
|
|
20
67
|
}
|
|
@@ -24,6 +71,12 @@ var X=window.__ycodiumPluginHost.react;var{Activity:re,Children:se,Component:ae,
|
|
|
24
71
|
.justify-between:where(:scope, *) {
|
|
25
72
|
justify-content: space-between;
|
|
26
73
|
}
|
|
74
|
+
.gap-1:where(:scope, *) {
|
|
75
|
+
gap: calc(var(--spacing, 0.25rem) * 1);
|
|
76
|
+
}
|
|
77
|
+
.gap-1\\.5:where(:scope, *) {
|
|
78
|
+
gap: calc(var(--spacing, 0.25rem) * 1.5);
|
|
79
|
+
}
|
|
27
80
|
.gap-2:where(:scope, *) {
|
|
28
81
|
gap: calc(var(--spacing, 0.25rem) * 2);
|
|
29
82
|
}
|
|
@@ -37,37 +90,177 @@ var X=window.__ycodiumPluginHost.react;var{Activity:re,Children:se,Component:ae,
|
|
|
37
90
|
.overflow-auto:where(:scope, *) {
|
|
38
91
|
overflow: auto;
|
|
39
92
|
}
|
|
93
|
+
.rounded-md:where(:scope, *) {
|
|
94
|
+
border-radius: calc(var(--radius) - 2px);
|
|
95
|
+
}
|
|
96
|
+
.rounded-sm:where(:scope, *) {
|
|
97
|
+
border-radius: calc(var(--radius) - 4px);
|
|
98
|
+
}
|
|
99
|
+
.border:where(:scope, *) {
|
|
100
|
+
border-style: var(--tw-border-style);
|
|
101
|
+
border-width: 1px;
|
|
102
|
+
}
|
|
103
|
+
.border-border\\/70:where(:scope, *) {
|
|
104
|
+
border-color: var(--contrast-border);
|
|
105
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
106
|
+
border-color: color-mix(in oklab, var(--contrast-border) 70%, transparent);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
.bg-muted\\/40:where(:scope, *) {
|
|
110
|
+
background-color: var(--muted);
|
|
111
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
112
|
+
background-color: color-mix(in oklab, var(--muted) 40%, transparent);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
.p-0:where(:scope, *) {
|
|
116
|
+
padding: calc(var(--spacing, 0.25rem) * 0);
|
|
117
|
+
}
|
|
118
|
+
.p-2\\.5:where(:scope, *) {
|
|
119
|
+
padding: calc(var(--spacing, 0.25rem) * 2.5);
|
|
120
|
+
}
|
|
121
|
+
.px-2:where(:scope, *) {
|
|
122
|
+
padding-inline: calc(var(--spacing, 0.25rem) * 2);
|
|
123
|
+
}
|
|
40
124
|
.py-2:where(:scope, *) {
|
|
41
125
|
padding-block: calc(var(--spacing, 0.25rem) * 2);
|
|
42
126
|
}
|
|
127
|
+
.text-left:where(:scope, *) {
|
|
128
|
+
text-align: left;
|
|
129
|
+
}
|
|
130
|
+
.text-right:where(:scope, *) {
|
|
131
|
+
text-align: right;
|
|
132
|
+
}
|
|
133
|
+
.align-middle:where(:scope, *) {
|
|
134
|
+
vertical-align: middle;
|
|
135
|
+
}
|
|
43
136
|
.font-mono:where(:scope, *) {
|
|
44
137
|
font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New',
|
|
45
138
|
monospace);
|
|
46
139
|
}
|
|
140
|
+
.text-lg:where(:scope, *) {
|
|
141
|
+
font-size: var(--text-lg, 1.125rem);
|
|
142
|
+
line-height: var(--tw-leading, var(--text-lg--line-height, calc(1.75 / 1.125)));
|
|
143
|
+
}
|
|
144
|
+
.text-ui-2xs:where(:scope, *) {
|
|
145
|
+
font-size: var(--ui-text-2xs);
|
|
146
|
+
line-height: var(--tw-leading, var(--ui-leading-2xs));
|
|
147
|
+
}
|
|
148
|
+
.text-ui-sm:where(:scope, *) {
|
|
149
|
+
font-size: var(--ui-text-sm);
|
|
150
|
+
line-height: var(--tw-leading, var(--ui-leading-sm));
|
|
151
|
+
}
|
|
152
|
+
.text-ui-xs:where(:scope, *) {
|
|
153
|
+
font-size: var(--ui-text-xs);
|
|
154
|
+
line-height: var(--tw-leading, var(--ui-leading-xs));
|
|
155
|
+
}
|
|
47
156
|
.text-xs:where(:scope, *) {
|
|
48
157
|
font-size: var(--text-xs, 0.75rem);
|
|
49
158
|
line-height: var(--tw-leading, var(--text-xs--line-height, calc(1 / 0.75)));
|
|
50
159
|
}
|
|
160
|
+
.leading-none:where(:scope, *) {
|
|
161
|
+
--tw-leading: 1;
|
|
162
|
+
line-height: 1;
|
|
163
|
+
}
|
|
164
|
+
.font-medium:where(:scope, *) {
|
|
165
|
+
--tw-font-weight: var(--font-weight-medium, 500);
|
|
166
|
+
font-weight: var(--font-weight-medium, 500);
|
|
167
|
+
}
|
|
168
|
+
.font-semibold:where(:scope, *) {
|
|
169
|
+
--tw-font-weight: var(--font-weight-semibold, 600);
|
|
170
|
+
font-weight: var(--font-weight-semibold, 600);
|
|
171
|
+
}
|
|
172
|
+
.tracking-\\[0\\.2em\\]:where(:scope, *) {
|
|
173
|
+
--tw-tracking: 0.2em;
|
|
174
|
+
letter-spacing: 0.2em;
|
|
175
|
+
}
|
|
176
|
+
.tracking-wider:where(:scope, *) {
|
|
177
|
+
--tw-tracking: var(--tracking-wider, 0.05em);
|
|
178
|
+
letter-spacing: var(--tracking-wider, 0.05em);
|
|
179
|
+
}
|
|
180
|
+
.break-all:where(:scope, *) {
|
|
181
|
+
word-break: break-all;
|
|
182
|
+
}
|
|
51
183
|
.whitespace-pre-wrap:where(:scope, *) {
|
|
52
184
|
white-space: pre-wrap;
|
|
53
185
|
}
|
|
186
|
+
.text-\\[var\\(--control-disabled-foreground\\)\\]:where(:scope, *) {
|
|
187
|
+
color: var(--control-disabled-foreground);
|
|
188
|
+
}
|
|
189
|
+
.text-diff-addition:where(:scope, *) {
|
|
190
|
+
color: var(--diff-addition);
|
|
191
|
+
}
|
|
192
|
+
.text-diff-deletion:where(:scope, *) {
|
|
193
|
+
color: var(--diff-deletion);
|
|
194
|
+
}
|
|
195
|
+
.text-foreground:where(:scope, *) {
|
|
196
|
+
color: var(--contrast-foreground);
|
|
197
|
+
}
|
|
198
|
+
.text-icon-muted:where(:scope, *) {
|
|
199
|
+
color: var(--contrast-icon-muted);
|
|
200
|
+
}
|
|
201
|
+
.text-muted-foreground:where(:scope, *) {
|
|
202
|
+
color: var(--contrast-muted-foreground);
|
|
203
|
+
}
|
|
204
|
+
.text-muted-foreground\\/70:where(:scope, *) {
|
|
205
|
+
color: var(--contrast-muted-foreground);
|
|
206
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
207
|
+
color: color-mix(in oklab, var(--contrast-muted-foreground) 70%, transparent);
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
.text-primary:where(:scope, *) {
|
|
211
|
+
color: var(--primary);
|
|
212
|
+
}
|
|
213
|
+
.uppercase:where(:scope, *) {
|
|
214
|
+
text-transform: uppercase;
|
|
215
|
+
}
|
|
216
|
+
.tabular-nums:where(:scope, *) {
|
|
217
|
+
--tw-numeric-spacing: tabular-nums;
|
|
218
|
+
font-variant-numeric: var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,);
|
|
219
|
+
}
|
|
54
220
|
.underline:where(:scope, *) {
|
|
55
221
|
text-decoration-line: underline;
|
|
56
222
|
}
|
|
223
|
+
.underline-offset-2:where(:scope, *) {
|
|
224
|
+
text-underline-offset: 2px;
|
|
225
|
+
}
|
|
57
226
|
.outline:where(:scope, *) {
|
|
58
227
|
outline-style: var(--tw-outline-style);
|
|
59
228
|
outline-width: 1px;
|
|
60
229
|
}
|
|
230
|
+
.select-none:where(:scope, *) {
|
|
231
|
+
-webkit-user-select: none;
|
|
232
|
+
user-select: none;
|
|
233
|
+
}
|
|
234
|
+
.select-text:where(:scope, *) {
|
|
235
|
+
-webkit-user-select: text;
|
|
236
|
+
user-select: text;
|
|
237
|
+
}
|
|
238
|
+
.hover\\:text-foreground:where(:scope, *) {
|
|
239
|
+
&:hover {
|
|
240
|
+
@media (hover: hover) {
|
|
241
|
+
color: var(--contrast-foreground);
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
}
|
|
61
245
|
}
|
|
62
246
|
}
|
|
63
247
|
@layer properties {
|
|
64
248
|
@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))) {
|
|
65
249
|
*, ::before, ::after, ::backdrop {
|
|
66
250
|
--tw-space-y-reverse: 0;
|
|
251
|
+
--tw-border-style: solid;
|
|
252
|
+
--tw-leading: initial;
|
|
253
|
+
--tw-font-weight: initial;
|
|
254
|
+
--tw-tracking: initial;
|
|
255
|
+
--tw-ordinal: initial;
|
|
256
|
+
--tw-slashed-zero: initial;
|
|
257
|
+
--tw-numeric-figure: initial;
|
|
258
|
+
--tw-numeric-spacing: initial;
|
|
259
|
+
--tw-numeric-fraction: initial;
|
|
67
260
|
--tw-outline-style: solid;
|
|
68
261
|
}
|
|
69
262
|
}
|
|
70
263
|
}
|
|
71
|
-
`;var
|
|
72
|
-
`)).catch(
|
|
73
|
-
`)})]})}),
|
|
264
|
+
`;var v=h("Button"),Se=h("BlockedTooltip"),ve=h("Dialog"),Te=h("DialogPopup"),Pe=h("DialogPanel"),Ee=h("DialogTitle"),Re=h("DialogHeader"),Ie=h("DialogFooter"),G=e=>e.replace(/-([a-z])/gu,(n,t)=>t.toUpperCase()),He=e=>!["open-channel","open-forward","open-browser"].includes(e.stage);function Ae(e,n){let t=e.at(-1);return[...(n.status==="progress"&&t?.stage===n.stage&&t.status==="progress"?e.slice(0,-1):e).slice(-255),n]}function re({bridge:e,environmentId:n,folder:t,onClose:a}){let o=e.i18n.usePluginTranslation(),l=e.useConnectedEnvironments().find(i=>i.environmentId===n)?.label,[r,c]=x("opening"),[m,k]=x(null),[d,u]=x([]),[g,f]=x(!1),[y,w]=x({accepted:!1}),T=D({onClose:a,label:l,t:o});T.current={onClose:a,label:l,t:o};let _=D(null);A(()=>{let i=_.current;i&&(i.scrollTop=i.scrollHeight)},[d]),A(()=>{let i=new AbortController,{label:b}=T.current;return c("opening"),k(null),u([]),f(!1),Promise.resolve().then(async()=>{if(!i.signal.aborted)try{await te(e,{environmentId:n,...t?{folder:t}:{},...b?{machineLabel:b}:{}},y.accepted,i.signal,N=>{i.signal.aborted||(u(C=>Ae(C,N)),He(N)&&["started","output","progress","failed"].includes(N.status)&&f(!0))}),i.signal.aborted||T.current.onClose()}catch(N){if(i.signal.aborted)return;let C=U(N);k(C),c(C.kind==="license-required"?"license":"failed"),f(!0)}}),()=>i.abort()},[e,n,t,y]);let R=i=>[i.at.slice(11,19),o("workbench.stage."+G(i.stage)),i.status==="progress"||i.status==="output"?"":o("workbench.progressStatus."+i.status),i.detail??(i.skipReason?o("workbench.skipReason."+G(i.skipReason)):"")].filter(Boolean).join(" ");return p(S,{children:[s("style",{children:z}),s(ve,{open:g,onOpenChange:i=>{i||a()},children:p(Te,{className:"max-w-lg",children:[s(Re,{children:s(Ee,{children:o(r==="license"?"workbench.license.title":"workbench.wizard.title")})}),s(Pe,{className:"space-y-3",children:r==="license"?p(S,{children:[s("p",{children:o("workbench.license.body")}),s("a",{className:"underline",href:"https://code.visualstudio.com/license/server",target:"_blank",rel:"noreferrer",children:o("workbench.license.link")})]}):p(S,{children:[s("ol",{children:ee.map(i=>{let b=d.findLast(C=>C.stage===i&&C.status!=="output"),N=b?.status==="progress"?"started":b?.status??"pending";return p("li",{className:"flex items-center justify-between gap-2",children:[s("span",{children:o("workbench.stage."+G(i))}),p("span",{children:[o("workbench.progressStatus."+N),b?.transfer?" \xB7 "+[b.transfer.transferredBytes.toLocaleString()+" B",...b.transfer.totalBytes===null?[]:["/ "+b.transfer.totalBytes.toLocaleString()+" B"],...b.transfer.bytesPerSecond===null?[]:["\xB7 "+Math.round(b.transfer.bytesPerSecond).toLocaleString()+" B/s"]].join(" "):""]})]},i)})}),m&&p("p",{role:"alert",children:[o("failure."+m.kind)," ",m.detailKey?o(m.detailKey):m.detail,s("span",{className:"block",children:o(m.kind==="host-key-mismatch"||m.kind==="grant-expired"?"workbench.next.retry":"workbench.next.log")})]}),p("div",{className:"flex items-center justify-between",children:[s("span",{children:o("workbench.wizard.logTitle")}),s(v,{type:"button",variant:"ghost",size:"xs",disabled:!d.length,onClick:()=>{e.writeClipboard(d.map(R).join(`
|
|
265
|
+
`)).catch(i=>e.notify(String(i),"error"))},children:o("workbench.wizard.copyLog")})]}),s("div",{ref:_,className:"max-h-48 overflow-auto whitespace-pre-wrap font-mono text-xs",children:d.map(R).join(`
|
|
266
|
+
`)})]})}),p(Ie,{children:[s(v,{type:"button",variant:"outline",onClick:a,children:o(r==="license"?"workbench.license.cancel":"workbench.wizard.close")}),r==="failed"&&e.openPluginSettings&&s(v,{type:"button",variant:"outline",onClick:()=>{a(),e.openPluginSettings?.()},children:o("workbench.wizard.openPlugins")}),r!=="opening"&&s(v,{type:"button",onClick:()=>w({accepted:r==="license"}),children:o(r==="license"?"workbench.license.accept":"workbench.wizard.retry")})]})]})})]})}function De({bridge:e,environmentId:n}){let t=e.i18n.usePluginTranslation(),a=e.useConnectedEnvironments().find(y=>y.environmentId===n),o=W(e)??(a?.connected?null:"workbench.gate.environmentOffline"),l=e.commands.useQuery("status",{},{environmentId:n}),r=l.data,c=r?.running===!0,m=r?.external,k=l.isPending&&!r?"loading":r?m?"external":c?r.port?"running":"runningNoPort":r.installed?"stopped":"notInstalled":"unknown",[d,u]=x(null),g=async y=>{u(y);try{y==="stop"?await oe(e,n,r?.portId,w=>e.notify(t("workbench.stopReleased.title"),"warning",t("workbench.stopReleased.body",{port:w}))):await e.commands.invoke("update",{},{environmentId:n})}catch(w){e.notify(t("workbench."+y+"Failed"),"error",w instanceof Error?w.message:String(w))}finally{u(null),l.refresh()}},f=!!(o||d);return p("section",{className:"ycodium-browser-workbench",children:[s("style",{children:z}),p("div",{className:"flex flex-wrap items-center justify-between gap-2 py-2",children:[s("span",{children:t("workbench.status."+k,{port:m?.port??r?.port})}),p("div",{className:"flex gap-2",children:[s(v,{size:"xs",disabled:f,onClick:()=>u("open"),children:t(d==="open"?"workbench.opening":"workbench.open")}),s(v,{size:"xs",variant:"outline",disabled:f||!c,onClick:()=>{g("stop")},children:t(d==="stop"?"workbench.stopping":"workbench.stop")}),s(Se,{reason:!o&&c?t("workbench.updateRequiresStop"):null,render:s(v,{size:"xs",variant:"outline",disabled:f,softDisabled:c,onClick:()=>{c||g("update")}}),children:t(d==="update"?"workbench.updating":"workbench.update")})]})]}),o&&s("p",{children:t(o)}),d==="open"&&s(re,{bridge:e,environmentId:n,onClose:()=>{u(null),l.refresh()}})]})}function Le(e){return{pages:{},panels:{},views:{openMachine:n=>s(L,{bridge:e,scopeClass:"ycodium-browser-workbench",children:s(re,{...n,bridge:e})})},slots:[{name:"sidebar.machine.actions",titleKey:"workbench.openMachine",icon:"./icon.svg",actionView:"openMachine",disabledReasonKey:()=>W(e)},{name:"machine.overview.section",titleKey:"workbench.sectionTitle",component:({environmentId:n})=>s(L,{bridge:e,scopeClass:"ycodium-browser-workbench",children:s(De,{bridge:e,environmentId:n})})}]}}export{Le as default};
|
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ycodium-ai/plugin-browser-workbench",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.6450",
|
|
4
4
|
"description": "Installs the official VS Code CLI on this machine and opens it in a system browser.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"browser-workbench",
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
"tailwindcss": "^4.0.0",
|
|
32
32
|
"typescript": "~6.0.3",
|
|
33
33
|
"vite-plus": "0.2.2",
|
|
34
|
-
"
|
|
35
|
-
"ycodium-plugin-
|
|
34
|
+
"ycodium-plugin-testing": "0.0.0",
|
|
35
|
+
"@ycodium-ai/plugin-api": "0.2.6450"
|
|
36
36
|
},
|
|
37
37
|
"ycodium": {
|
|
38
38
|
"plugin": "./dist/index.js",
|