@visulima/ansi 4.0.0-alpha.16 → 4.0.0-alpha.18
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/CHANGELOG.md +65 -0
- package/LICENSE.md +0 -17
- package/README.md +38 -10
- package/dist/alternative-screen.js +1 -1
- package/dist/background.d.ts +72 -0
- package/dist/background.js +1 -0
- package/dist/charset.d.ts +52 -0
- package/dist/charset.js +1 -0
- package/dist/clear.js +1 -1
- package/dist/clipboard.d.ts +76 -0
- package/dist/clipboard.js +1 -0
- package/dist/constants.d.ts +28 -0
- package/dist/constants.js +1 -0
- package/dist/cursor.js +1 -1
- package/dist/cwd.d.ts +26 -0
- package/dist/cwd.js +1 -0
- package/dist/erase.js +1 -1
- package/dist/finalterm.d.ts +47 -0
- package/dist/finalterm.js +1 -0
- package/dist/focus.d.ts +20 -0
- package/dist/focus.js +1 -0
- package/dist/hyperlink.d.ts +25 -0
- package/dist/hyperlink.js +1 -1
- package/dist/image.d.ts +3 -4
- package/dist/image.js +1 -1
- package/dist/index.d.ts +16 -43
- package/dist/index.js +1 -1
- package/dist/iterm2.js +1 -1
- package/dist/keypad.d.ts +27 -0
- package/dist/keypad.js +1 -0
- package/dist/kitty-graphics.d.ts +17 -0
- package/dist/kitty-graphics.js +1 -0
- package/dist/mode.js +1 -1
- package/dist/mouse.js +1 -1
- package/dist/notification.d.ts +30 -0
- package/dist/notification.js +1 -0
- package/dist/packem_shared/IT2_AUTO-K3GubKy7.js +1 -0
- package/dist/packem_shared/ITerm2File-BkLc5ipB.js +1 -0
- package/dist/packem_shared/cursor-BXG1O_IE.js +1 -0
- package/dist/packem_shared/restoreCursor-CyaXIMQf.js +2 -0
- package/dist/passthrough.js +1 -1
- package/dist/paste.d.ts +23 -0
- package/dist/paste.js +1 -0
- package/dist/progress.d.ts +42 -0
- package/dist/progress.js +1 -0
- package/dist/screen.js +1 -1
- package/dist/scroll.js +1 -1
- package/dist/sixel.d.ts +19 -0
- package/dist/sixel.js +1 -0
- package/dist/status.js +1 -1
- package/dist/strip.d.ts +25 -0
- package/dist/strip.js +1 -1
- package/dist/termcap.js +1 -1
- package/dist/title.js +1 -1
- package/dist/urxvt.d.ts +15 -0
- package/dist/urxvt.js +1 -0
- package/dist/window-ops.js +1 -1
- package/dist/xterm.d.ts +83 -1
- package/dist/xterm.js +1 -1
- package/package.json +57 -1
- package/dist/packem_shared/IT2_AUTO-OiB8EaxU.js +0 -1
- package/dist/packem_shared/ITerm2File-XoC8RMzs.js +0 -1
- package/dist/packem_shared/constants-D12jy2Zh.js +0 -1
- package/dist/packem_shared/cursor-BAcJR4p_.js +0 -1
- package/dist/packem_shared/resetProgressBar-H_gzPKNE.js +0 -1
- package/dist/packem_shared/restoreCursor-CHy0jZuu.js +0 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,66 +1,39 @@
|
|
|
1
1
|
export { ALT_SCREEN_OFF, ALT_SCREEN_ON, alternativeScreenOff, alternativeScreenOn } from "./alternative-screen.js";
|
|
2
|
+
export { requestBackgroundColor, requestCursorColor, requestForegroundColor, resetBackgroundColor, resetCursorColor, resetForegroundColor, setBackgroundColor, setCursorColor, setForegroundColor } from "./background.js";
|
|
3
|
+
export { DEC_SPECIAL_GRAPHICS, G0, G1, G2, G3, LS0, LS1, LS1R, LS2, LS2R, LS3, LS3R, SCS, SI, SO, UNITED_KINGDOM, USASCII, selectCharacterSet } from "./charset.js";
|
|
2
4
|
export { clearLineAndHomeCursor, clearScreenAndHomeCursor, clearScreenFromTopLeft, resetTerminal } from "./clear.js";
|
|
5
|
+
export { type ClipboardSelection, clearClipboard, requestClipboard, setClipboard } from "./clipboard.js";
|
|
6
|
+
export { APC, BEL, CSI, DCS, ESC, OSC, PM, SEP, SOS, ST } from "./constants.js";
|
|
3
7
|
export { CURSOR_BACKWARD_1, CURSOR_DOWN_1, CURSOR_FORWARD_1, CURSOR_UP_1, type CursorStyle, REQUEST_CURSOR_POSITION, REQUEST_EXTENDED_CURSOR_POSITION, RESTORE_CURSOR_DEC, SAVE_CURSOR_DEC, cursorBackward, cursorBackwardTab, cursorDown, cursorForward, cursorHide, cursorHorizontalAbsolute, cursorHorizontalForwardTab, cursorLeft, cursorMove, cursorNextLine, cursorPosition, cursorPreviousLine, cursorRestore, cursorSave, cursorShow, cursorTo, cursorToColumn1, cursorUp, cursorVerticalAbsolute, eraseCharacter, setCursorStyle } from "./cursor.js";
|
|
8
|
+
export { notifyWorkingDirectory, setWorkingDirectory } from "./cwd.js";
|
|
4
9
|
export { type EraseDisplayMode, type EraseLineMode, eraseDisplay, eraseDown, eraseInLine, eraseLine, eraseLineEnd, eraseLineStart, eraseLines, eraseScreen, eraseScreenAndScrollback, eraseUp } from "./erase.js";
|
|
10
|
+
export { finalTerm, finalTermCmdExecuted, finalTermCmdFinished, finalTermCmdStart, finalTermPrompt } from "./finalterm.js";
|
|
11
|
+
export { BLUR, FOCUS, focusInEvent, focusOutEvent } from "./focus.js";
|
|
5
12
|
export { default as hyperlink } from "./hyperlink.js";
|
|
6
13
|
export { type ImageOptions, image } from "./image.js";
|
|
7
14
|
export { type IITerm2Payload, IT2_AUTO, ITerm2File, ITerm2FileEnd, ITerm2FilePart, type ITerm2FileProperties, ITerm2MultipartFileStart, iTerm2, it2Cells, it2Percent, it2Pixels } from "./iterm2.js";
|
|
15
|
+
export { DECKPAM, DECKPNM, keypadApplicationMode, keypadNumericMode } from "./keypad.js";
|
|
16
|
+
export { default as kittyGraphics } from "./kitty-graphics.js";
|
|
8
17
|
export { type AnsiMode, BDSM, BiDirectionalSupportMode, BracketedPasteMode, DECRPM, DECRQM, type DecMode, DisableModifiersMode, IRM, InBandResizeMode, InsertReplaceMode, KAM, KeyboardActionMode, LNM, LightDarkMode, LineFeedNewLineMode, LocalEchoMode, type Mode, type ModeSetting, OriginMode, RM, RequestBiDirectionalSupportMode, RequestInBandResizeMode, RequestInsertReplaceMode, RequestKeyboardActionMode, RequestLineFeedNewLineMode, RequestLocalEchoMode, RequestSendReceiveMode, RequestUnicodeCoreMode, ResetBiDirectionalSupportMode, ResetInBandResizeMode, ResetInsertReplaceMode, ResetKeyboardActionMode, ResetLineFeedNewLineMode, ResetLocalEchoMode, ResetSendReceiveMode, ResetUnicodeCoreMode, SGRMouseMode, SM, SRM, SendFocusEventsMode, SendReceiveMode, SetBiDirectionalSupportMode, SetInBandResizeMode, SetInsertReplaceMode, SetKeyboardActionMode, SetLineFeedNewLineMode, SetLocalEchoMode, SetSendReceiveMode, SetUnicodeCoreMode, TextCursorEnableMode, UnicodeCoreMode, createAnsiMode, createDecMode, isModeNotRecognized, isModePermanentlyReset, isModePermanentlySet, isModeReset, isModeSet, reportMode, requestMode, resetMode, setMode } from "./mode.js";
|
|
9
18
|
export { MouseButton, type MouseButtonType, type MouseModifiers, disableAnyEventMouse, disableButtonEventMouse, disableFocusTracking, disableNormalMouse, disableSgrMouse, disableX10Mouse, enableAnyEventMouse, enableButtonEventMouse, enableFocusTracking, enableNormalMouse, enableSgrMouse, enableX10Mouse, encodeMouseButtonByte, mouseSgrSequence, mouseX10Sequence } from "./mouse.js";
|
|
19
|
+
export { desktopNotification, notify } from "./notification.js";
|
|
10
20
|
export { SCREEN_MAX_LEN_DEFAULT, SCREEN_TYPICAL_LIMIT, screenPassthrough, tmuxPassthrough } from "./passthrough.js";
|
|
21
|
+
export { bracketedPasteEnd, bracketedPasteStart, wrapBracketedPaste } from "./paste.js";
|
|
22
|
+
export { resetProgressBar, setErrorProgressBar, setIndeterminateProgressBar, setProgressBar, setWarningProgressBar } from "./progress.js";
|
|
11
23
|
export { RESET_INITIAL_STATE, RIS } from "./reset.js";
|
|
12
24
|
export { clearTabStop, deleteCharacter, deleteLine, insertCharacter, insertLine, repeatPreviousCharacter, requestPresentationStateReport, setLeftRightMargins, setTopBottomMargins } from "./screen.js";
|
|
13
25
|
export { SCROLL_DOWN_1, SCROLL_UP_1, scrollDown, scrollUp } from "./scroll.js";
|
|
26
|
+
export { default as sixelGraphics } from "./sixel.js";
|
|
14
27
|
export { type AnsiStatusReport, CPR, DA1, DA2, DA3, DECXCPR, DSR, DSR_KeyboardLanguageDEC, DSR_PrinterStatusDEC, DSR_TerminalStatus, DSR_UDKStatusDEC, type DecStatusReport, LightDarkReport, RequestLightDarkReport, RequestNameVersion, type StatusReport, XTVERSION, createAnsiStatusReport, createDecStatusReport, cursorPositionReport, deviceStatusReport, extendedCursorPositionReport, reportKeyboardLanguageDEC, reportPrimaryDeviceAttributes, reportPrinterNoPaperDEC, reportPrinterNotReadyDEC, reportPrinterReadyDEC, reportSecondaryDeviceAttributes, reportTerminalNotOK, reportTerminalOK, reportTertiaryDeviceAttributes, reportUDKLockedDEC, reportUDKUnlockedDEC, requestCursorPositionReport, requestExtendedCursorPositionReport, requestKeyboardLanguageDEC, requestPrimaryDeviceAttributes, requestPrimaryDeviceAttributesParam0, requestPrinterStatusDEC, requestSecondaryDeviceAttributes, requestSecondaryDeviceAttributesParam0, requestTerminalStatus, requestTertiaryDeviceAttributes, requestTertiaryDeviceAttributesParam0, requestUDKStatusDEC } from "./status.js";
|
|
15
28
|
export { default as strip } from "./strip.js";
|
|
16
29
|
export { XTGETTCAP, requestTermcap, requestTerminfo } from "./termcap.js";
|
|
17
30
|
export { decsin, decswt, setIconName, setIconNameAndWindowTitle, setIconNameAndWindowTitleWithST, setIconNameWithST, setWindowTitle, setWindowTitleWithST } from "./title.js";
|
|
31
|
+
export { default as urxvtExtension } from "./urxvt.js";
|
|
18
32
|
export { XTWINOPS, type XTermWindowOp, deiconifyWindow, iconifyWindow, lowerWindow, maximizeWindow, moveWindow, raiseWindow, refreshWindow, reportWindowPosition, reportWindowState, requestCellSizePixels, requestTextAreaSizeChars, requestTextAreaSizePixels, resizeTextAreaChars, resizeTextAreaPixels, restoreMaximizedWindow, setPageSizeLines, xtermWindowOp } from "./window-ops.js";
|
|
19
|
-
export { XTMODKEYS, XTQMODKEYS, keyModifierOptions, queryKeyModifierOptions, queryModifyOtherKeys, resetKeyModifierOptions, resetModifyOtherKeys, setKeyModifierOptions, setModifyOtherKeys1, setModifyOtherKeys2 } from "./xterm.js";
|
|
33
|
+
export { KittyKeyboardFlag, type KittyKeyboardFlags, XTMODKEYS, XTQMODKEYS, keyModifierOptions, popKittyKeyboard, pushKittyKeyboard, queryKeyModifierOptions, queryKittyKeyboard, queryModifyOtherKeys, resetKeyModifierOptions, resetModifyOtherKeys, setKeyModifierOptions, setKittyKeyboard, setModifyOtherKeys1, setModifyOtherKeys2 } from "./xterm.js";
|
|
20
34
|
import 'type-fest';
|
|
21
35
|
/**
|
|
22
|
-
* Resets the progress bar to its default state (hidden).
|
|
23
|
-
*
|
|
24
|
-
* Sequence: `OSC 9 ; 4 ; 0 BEL`
|
|
25
|
-
* @see {@link https://learn.microsoft.com/en-us/windows/terminal/tutorials/progress-bar-sequences}
|
|
26
|
-
*/
|
|
27
|
-
declare const resetProgressBar: string;
|
|
28
|
-
/**
|
|
29
|
-
* Returns a sequence for setting the progress bar to a specific percentage (0-100) in the "default" state.
|
|
30
|
-
*
|
|
31
|
-
* Sequence: `OSC 9 ; 4 ; 1 ; Percentage BEL`
|
|
32
|
-
* @param percentage The progress percentage (0-100, clamped automatically)
|
|
33
|
-
* @returns The progress bar sequence
|
|
34
|
-
* @see {@link https://learn.microsoft.com/en-us/windows/terminal/tutorials/progress-bar-sequences}
|
|
35
|
-
*/
|
|
36
|
-
declare const setProgressBar: (percentage: number) => string;
|
|
37
|
-
/**
|
|
38
|
-
* Returns a sequence for setting the progress bar to a specific percentage (0-100) in the "Error" state.
|
|
39
|
-
*
|
|
40
|
-
* Sequence: `OSC 9 ; 4 ; 2 ; Percentage BEL`
|
|
41
|
-
* @param percentage The progress percentage (0-100, clamped automatically)
|
|
42
|
-
* @returns The error progress bar sequence
|
|
43
|
-
* @see {@link https://learn.microsoft.com/en-us/windows/terminal/tutorials/progress-bar-sequences}
|
|
44
|
-
*/
|
|
45
|
-
declare const setErrorProgressBar: (percentage: number) => string;
|
|
46
|
-
/**
|
|
47
|
-
* Sets the progress bar to the indeterminate state.
|
|
48
|
-
*
|
|
49
|
-
* Sequence: `OSC 9 ; 4 ; 3 BEL`
|
|
50
|
-
* @see {@link https://learn.microsoft.com/en-us/windows/terminal/tutorials/progress-bar-sequences}
|
|
51
|
-
*/
|
|
52
|
-
declare const setIndeterminateProgressBar: string;
|
|
53
|
-
/**
|
|
54
|
-
* Returns a sequence for setting the progress bar to a specific percentage (0-100) in the "Warning" state.
|
|
55
|
-
*
|
|
56
|
-
* Sequence: `OSC 9 ; 4 ; 4 ; Percentage BEL`
|
|
57
|
-
* @param percentage The progress percentage (0-100, clamped automatically)
|
|
58
|
-
* @returns The warning progress bar sequence
|
|
59
|
-
* @see {@link https://learn.microsoft.com/en-us/windows/terminal/tutorials/progress-bar-sequences}
|
|
60
|
-
*/
|
|
61
|
-
declare const setWarningProgressBar: (percentage: number) => string;
|
|
62
|
-
/**
|
|
63
36
|
* Output a beeping sound.
|
|
64
37
|
*/
|
|
65
38
|
declare const beep = "\x07";
|
|
66
|
-
export { beep
|
|
39
|
+
export { beep };
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ALT_SCREEN_OFF as t,ALT_SCREEN_ON as s,alternativeScreenOff as i,alternativeScreenOn as a}from"./alternative-screen.js";import{clearLineAndHomeCursor as d,clearScreenAndHomeCursor as u,clearScreenFromTopLeft as c,resetTerminal as S}from"./clear.js";import{C as M,a as l,b as p,c as m,R as D,d as T,e as E,S as C,f as P,g as A,h as L,i as f,j as y,k as x,l as O,m as b,n as _,o as q,p as I,q as N,r as g,s as w,t as h,u as v,v as U,w as B,x as K,y as W,z as F}from"./packem_shared/cursor-BAcJR4p_.js";import{eraseDisplay as k,eraseDown as X,eraseInLine as H,eraseLine as Q,eraseLineEnd as V,eraseLineStart as Y,eraseLines as G,eraseScreen as j,eraseScreenAndScrollback as J,eraseUp as Z}from"./erase.js";import{default as ee}from"./hyperlink.js";import{image as oe}from"./image.js";import{iTerm2 as se}from"./iterm2.js";import{BDSM as ae,BiDirectionalSupportMode as ne,BracketedPasteMode as de,DECRPM as ue,DECRQM as ce,DisableModifiersMode as Se,IRM as Re,InBandResizeMode as Me,InsertReplaceMode as le,KAM as pe,KeyboardActionMode as me,LNM as De,LightDarkMode as Te,LineFeedNewLineMode as Ee,LocalEchoMode as Ce,OriginMode as Pe,RM as Ae,RequestBiDirectionalSupportMode as Le,RequestInBandResizeMode as fe,RequestInsertReplaceMode as ye,RequestKeyboardActionMode as xe,RequestLineFeedNewLineMode as Oe,RequestLocalEchoMode as be,RequestSendReceiveMode as _e,RequestUnicodeCoreMode as qe,ResetBiDirectionalSupportMode as Ie,ResetInBandResizeMode as Ne,ResetInsertReplaceMode as ge,ResetKeyboardActionMode as we,ResetLineFeedNewLineMode as he,ResetLocalEchoMode as ve,ResetSendReceiveMode as Ue,ResetUnicodeCoreMode as Be,SGRMouseMode as Ke,SM as We,SRM as Fe,SendFocusEventsMode as ze,SendReceiveMode as ke,SetBiDirectionalSupportMode as Xe,SetInBandResizeMode as He,SetInsertReplaceMode as Qe,SetKeyboardActionMode as Ve,SetLineFeedNewLineMode as Ye,SetLocalEchoMode as Ge,SetSendReceiveMode as je,SetUnicodeCoreMode as Je,TextCursorEnableMode as Ze,UnicodeCoreMode as $e,createAnsiMode as er,createDecMode as rr,isModeNotRecognized as or,isModePermanentlyReset as tr,isModePermanentlySet as sr,isModeReset as ir,isModeSet as ar,reportMode as nr,requestMode as dr,resetMode as ur,setMode as cr}from"./mode.js";import{MouseButton as Rr,disableAnyEventMouse as Mr,disableButtonEventMouse as lr,disableFocusTracking as pr,disableNormalMouse as mr,disableSgrMouse as Dr,disableX10Mouse as Tr,enableAnyEventMouse as Er,enableButtonEventMouse as Cr,enableFocusTracking as Pr,enableNormalMouse as Ar,enableSgrMouse as Lr,enableX10Mouse as fr,encodeMouseButtonByte as yr,mouseSgrSequence as xr,mouseX10Sequence as Or}from"./mouse.js";import{SCREEN_MAX_LEN_DEFAULT as _r,SCREEN_TYPICAL_LIMIT as qr,screenPassthrough as Ir,tmuxPassthrough as Nr}from"./passthrough.js";import{resetProgressBar as wr,setErrorProgressBar as hr,setIndeterminateProgressBar as vr,setProgressBar as Ur,setWarningProgressBar as Br}from"./packem_shared/resetProgressBar-H_gzPKNE.js";import{RESET_INITIAL_STATE as Wr,RIS as Fr}from"./reset.js";import{clearTabStop as kr,deleteCharacter as Xr,deleteLine as Hr,insertCharacter as Qr,insertLine as Vr,repeatPreviousCharacter as Yr,requestPresentationStateReport as Gr,setLeftRightMargins as jr,setTopBottomMargins as Jr}from"./screen.js";import{SCROLL_DOWN_1 as $r,SCROLL_UP_1 as eo,scrollDown as ro,scrollUp as oo}from"./scroll.js";import{CPR as so,DA1 as io,DA2 as ao,DA3 as no,DECXCPR as uo,DSR as co,DSR_KeyboardLanguageDEC as So,DSR_PrinterStatusDEC as Ro,DSR_TerminalStatus as Mo,DSR_UDKStatusDEC as lo,LightDarkReport as po,RequestLightDarkReport as mo,RequestNameVersion as Do,XTVERSION as To,createAnsiStatusReport as Eo,createDecStatusReport as Co,cursorPositionReport as Po,deviceStatusReport as Ao,extendedCursorPositionReport as Lo,reportKeyboardLanguageDEC as fo,reportPrimaryDeviceAttributes as yo,reportPrinterNoPaperDEC as xo,reportPrinterNotReadyDEC as Oo,reportPrinterReadyDEC as bo,reportSecondaryDeviceAttributes as _o,reportTerminalNotOK as qo,reportTerminalOK as Io,reportTertiaryDeviceAttributes as No,reportUDKLockedDEC as go,reportUDKUnlockedDEC as wo,requestCursorPositionReport as ho,requestExtendedCursorPositionReport as vo,requestKeyboardLanguageDEC as Uo,requestPrimaryDeviceAttributes as Bo,requestPrimaryDeviceAttributesParam0 as Ko,requestPrinterStatusDEC as Wo,requestSecondaryDeviceAttributes as Fo,requestSecondaryDeviceAttributesParam0 as zo,requestTerminalStatus as ko,requestTertiaryDeviceAttributes as Xo,requestTertiaryDeviceAttributesParam0 as Ho,requestUDKStatusDEC as Qo}from"./status.js";import{default as Yo}from"./strip.js";import{XTGETTCAP as jo,requestTermcap as Jo,requestTerminfo as Zo}from"./termcap.js";import{decsin as et,decswt as rt,setIconName as ot,setIconNameAndWindowTitle as tt,setIconNameAndWindowTitleWithST as st,setIconNameWithST as it,setWindowTitle as at,setWindowTitleWithST as nt}from"./title.js";import{XTWINOPS as ut,deiconifyWindow as ct,iconifyWindow as St,lowerWindow as Rt,maximizeWindow as Mt,moveWindow as lt,raiseWindow as pt,refreshWindow as mt,reportWindowPosition as Dt,reportWindowState as Tt,requestCellSizePixels as Et,requestTextAreaSizeChars as Ct,requestTextAreaSizePixels as Pt,resizeTextAreaChars as At,resizeTextAreaPixels as Lt,restoreMaximizedWindow as ft,setPageSizeLines as yt,xtermWindowOp as xt}from"./window-ops.js";import{XTMODKEYS as bt,XTQMODKEYS as _t,keyModifierOptions as qt,queryKeyModifierOptions as It,queryModifyOtherKeys as Nt,resetKeyModifierOptions as gt,resetModifyOtherKeys as wt,setKeyModifierOptions as ht,setModifyOtherKeys1 as vt,setModifyOtherKeys2 as Ut}from"./xterm.js";import{IT2_AUTO as Kt,it2Cells as Wt,it2Percent as Ft,it2Pixels as zt}from"./packem_shared/IT2_AUTO-OiB8EaxU.js";import{ITerm2File as Xt,ITerm2FileEnd as Ht,ITerm2FilePart as Qt,ITerm2MultipartFileStart as Vt}from"./packem_shared/ITerm2File-XoC8RMzs.js";const e="\x07";export{t as ALT_SCREEN_OFF,s as ALT_SCREEN_ON,ae as BDSM,ne as BiDirectionalSupportMode,de as BracketedPasteMode,so as CPR,M as CURSOR_BACKWARD_1,l as CURSOR_DOWN_1,p as CURSOR_FORWARD_1,m as CURSOR_UP_1,io as DA1,ao as DA2,no as DA3,ue as DECRPM,ce as DECRQM,uo as DECXCPR,co as DSR,So as DSR_KeyboardLanguageDEC,Ro as DSR_PrinterStatusDEC,Mo as DSR_TerminalStatus,lo as DSR_UDKStatusDEC,Se as DisableModifiersMode,Re as IRM,Kt as IT2_AUTO,Xt as ITerm2File,Ht as ITerm2FileEnd,Qt as ITerm2FilePart,Vt as ITerm2MultipartFileStart,Me as InBandResizeMode,le as InsertReplaceMode,pe as KAM,me as KeyboardActionMode,De as LNM,Te as LightDarkMode,po as LightDarkReport,Ee as LineFeedNewLineMode,Ce as LocalEchoMode,Rr as MouseButton,Pe as OriginMode,D as REQUEST_CURSOR_POSITION,T as REQUEST_EXTENDED_CURSOR_POSITION,Wr as RESET_INITIAL_STATE,E as RESTORE_CURSOR_DEC,Fr as RIS,Ae as RM,Le as RequestBiDirectionalSupportMode,fe as RequestInBandResizeMode,ye as RequestInsertReplaceMode,xe as RequestKeyboardActionMode,mo as RequestLightDarkReport,Oe as RequestLineFeedNewLineMode,be as RequestLocalEchoMode,Do as RequestNameVersion,_e as RequestSendReceiveMode,qe as RequestUnicodeCoreMode,Ie as ResetBiDirectionalSupportMode,Ne as ResetInBandResizeMode,ge as ResetInsertReplaceMode,we as ResetKeyboardActionMode,he as ResetLineFeedNewLineMode,ve as ResetLocalEchoMode,Ue as ResetSendReceiveMode,Be as ResetUnicodeCoreMode,C as SAVE_CURSOR_DEC,_r as SCREEN_MAX_LEN_DEFAULT,qr as SCREEN_TYPICAL_LIMIT,$r as SCROLL_DOWN_1,eo as SCROLL_UP_1,Ke as SGRMouseMode,We as SM,Fe as SRM,ze as SendFocusEventsMode,ke as SendReceiveMode,Xe as SetBiDirectionalSupportMode,He as SetInBandResizeMode,Qe as SetInsertReplaceMode,Ve as SetKeyboardActionMode,Ye as SetLineFeedNewLineMode,Ge as SetLocalEchoMode,je as SetSendReceiveMode,Je as SetUnicodeCoreMode,Ze as TextCursorEnableMode,$e as UnicodeCoreMode,jo as XTGETTCAP,bt as XTMODKEYS,_t as XTQMODKEYS,To as XTVERSION,ut as XTWINOPS,i as alternativeScreenOff,a as alternativeScreenOn,e as beep,d as clearLineAndHomeCursor,u as clearScreenAndHomeCursor,c as clearScreenFromTopLeft,kr as clearTabStop,er as createAnsiMode,Eo as createAnsiStatusReport,rr as createDecMode,Co as createDecStatusReport,P as cursorBackward,A as cursorBackwardTab,L as cursorDown,f as cursorForward,y as cursorHide,x as cursorHorizontalAbsolute,O as cursorHorizontalForwardTab,b as cursorLeft,_ as cursorMove,q as cursorNextLine,I as cursorPosition,Po as cursorPositionReport,N as cursorPreviousLine,g as cursorRestore,w as cursorSave,h as cursorShow,v as cursorTo,U as cursorToColumn1,B as cursorUp,K as cursorVerticalAbsolute,et as decsin,rt as decswt,ct as deiconifyWindow,Xr as deleteCharacter,Hr as deleteLine,Ao as deviceStatusReport,Mr as disableAnyEventMouse,lr as disableButtonEventMouse,pr as disableFocusTracking,mr as disableNormalMouse,Dr as disableSgrMouse,Tr as disableX10Mouse,Er as enableAnyEventMouse,Cr as enableButtonEventMouse,Pr as enableFocusTracking,Ar as enableNormalMouse,Lr as enableSgrMouse,fr as enableX10Mouse,yr as encodeMouseButtonByte,W as eraseCharacter,k as eraseDisplay,X as eraseDown,H as eraseInLine,Q as eraseLine,V as eraseLineEnd,Y as eraseLineStart,G as eraseLines,j as eraseScreen,J as eraseScreenAndScrollback,Z as eraseUp,Lo as extendedCursorPositionReport,ee as hyperlink,se as iTerm2,St as iconifyWindow,oe as image,Qr as insertCharacter,Vr as insertLine,or as isModeNotRecognized,tr as isModePermanentlyReset,sr as isModePermanentlySet,ir as isModeReset,ar as isModeSet,Wt as it2Cells,Ft as it2Percent,zt as it2Pixels,qt as keyModifierOptions,Rt as lowerWindow,Mt as maximizeWindow,xr as mouseSgrSequence,Or as mouseX10Sequence,lt as moveWindow,It as queryKeyModifierOptions,Nt as queryModifyOtherKeys,pt as raiseWindow,mt as refreshWindow,Yr as repeatPreviousCharacter,fo as reportKeyboardLanguageDEC,nr as reportMode,yo as reportPrimaryDeviceAttributes,xo as reportPrinterNoPaperDEC,Oo as reportPrinterNotReadyDEC,bo as reportPrinterReadyDEC,_o as reportSecondaryDeviceAttributes,qo as reportTerminalNotOK,Io as reportTerminalOK,No as reportTertiaryDeviceAttributes,go as reportUDKLockedDEC,wo as reportUDKUnlockedDEC,Dt as reportWindowPosition,Tt as reportWindowState,Et as requestCellSizePixels,ho as requestCursorPositionReport,vo as requestExtendedCursorPositionReport,Uo as requestKeyboardLanguageDEC,dr as requestMode,Gr as requestPresentationStateReport,Bo as requestPrimaryDeviceAttributes,Ko as requestPrimaryDeviceAttributesParam0,Wo as requestPrinterStatusDEC,Fo as requestSecondaryDeviceAttributes,zo as requestSecondaryDeviceAttributesParam0,Jo as requestTermcap,ko as requestTerminalStatus,Zo as requestTerminfo,Xo as requestTertiaryDeviceAttributes,Ho as requestTertiaryDeviceAttributesParam0,Ct as requestTextAreaSizeChars,Pt as requestTextAreaSizePixels,Qo as requestUDKStatusDEC,gt as resetKeyModifierOptions,ur as resetMode,wt as resetModifyOtherKeys,wr as resetProgressBar,S as resetTerminal,At as resizeTextAreaChars,Lt as resizeTextAreaPixels,ft as restoreMaximizedWindow,Ir as screenPassthrough,ro as scrollDown,oo as scrollUp,F as setCursorStyle,hr as setErrorProgressBar,ot as setIconName,tt as setIconNameAndWindowTitle,st as setIconNameAndWindowTitleWithST,it as setIconNameWithST,vr as setIndeterminateProgressBar,ht as setKeyModifierOptions,jr as setLeftRightMargins,cr as setMode,vt as setModifyOtherKeys1,Ut as setModifyOtherKeys2,yt as setPageSizeLines,Ur as setProgressBar,Jr as setTopBottomMargins,Br as setWarningProgressBar,at as setWindowTitle,nt as setWindowTitleWithST,Yo as strip,Nr as tmuxPassthrough,xt as xtermWindowOp};
|
|
1
|
+
import{ALT_SCREEN_OFF as t,ALT_SCREEN_ON as s,alternativeScreenOff as a,alternativeScreenOn as i}from"./alternative-screen.js";import{requestBackgroundColor as d,requestCursorColor as u,requestForegroundColor as c,resetBackgroundColor as S,resetCursorColor as p,resetForegroundColor as l,setBackgroundColor as R,setCursorColor as M,setForegroundColor as C}from"./background.js";import{DEC_SPECIAL_GRAPHICS as E,G0 as D,G1 as f,G2 as T,G3 as y,LS0 as P,LS1 as x,LS1R as L,LS2 as A,LS2R as b,LS3 as O,LS3R as I,SCS as _,SI as g,SO as q,UNITED_KINGDOM as K,USASCII as N,selectCharacterSet as h}from"./charset.js";import{clearLineAndHomeCursor as v,clearScreenAndHomeCursor as B,clearScreenFromTopLeft as U,resetTerminal as k}from"./clear.js";import{clearClipboard as F,requestClipboard as z,setClipboard as X}from"./clipboard.js";import{APC as H,BEL as Q,CSI as V,DCS as Y,ESC as j,OSC as J,PM as Z,SEP as $,SOS as ee,ST as re}from"./constants.js";import{C as te,a as se,b as ae,c as ie,R as ne,d as de,e as ue,S as ce,f as Se,g as pe,h as le,i as Re,j as Me,k as Ce,l as me,m as Ee,n as De,o as fe,p as Te,q as ye,r as Pe,s as xe,t as Le,u as Ae,v as be,w as Oe,x as Ie,y as _e,z as ge}from"./packem_shared/cursor-BXG1O_IE.js";import{notifyWorkingDirectory as Ke,setWorkingDirectory as Ne}from"./cwd.js";import{eraseDisplay as we,eraseDown as ve,eraseInLine as Be,eraseLine as Ue,eraseLineEnd as ke,eraseLineStart as We,eraseLines as Fe,eraseScreen as ze,eraseScreenAndScrollback as Xe,eraseUp as Ge}from"./erase.js";import{finalTerm as Qe,finalTermCmdExecuted as Ve,finalTermCmdFinished as Ye,finalTermCmdStart as je,finalTermPrompt as Je}from"./finalterm.js";import{BLUR as $e,FOCUS as er,focusInEvent as rr,focusOutEvent as or}from"./focus.js";import{default as sr}from"./hyperlink.js";import{image as ir}from"./image.js";import{iTerm2 as dr}from"./iterm2.js";import{DECKPAM as cr,DECKPNM as Sr,keypadApplicationMode as pr,keypadNumericMode as lr}from"./keypad.js";import{default as Mr}from"./kitty-graphics.js";import{BDSM as mr,BiDirectionalSupportMode as Er,BracketedPasteMode as Dr,DECRPM as fr,DECRQM as Tr,DisableModifiersMode as yr,IRM as Pr,InBandResizeMode as xr,InsertReplaceMode as Lr,KAM as Ar,KeyboardActionMode as br,LNM as Or,LightDarkMode as Ir,LineFeedNewLineMode as _r,LocalEchoMode as gr,OriginMode as qr,RM as Kr,RequestBiDirectionalSupportMode as Nr,RequestInBandResizeMode as hr,RequestInsertReplaceMode as wr,RequestKeyboardActionMode as vr,RequestLineFeedNewLineMode as Br,RequestLocalEchoMode as Ur,RequestSendReceiveMode as kr,RequestUnicodeCoreMode as Wr,ResetBiDirectionalSupportMode as Fr,ResetInBandResizeMode as zr,ResetInsertReplaceMode as Xr,ResetKeyboardActionMode as Gr,ResetLineFeedNewLineMode as Hr,ResetLocalEchoMode as Qr,ResetSendReceiveMode as Vr,ResetUnicodeCoreMode as Yr,SGRMouseMode as jr,SM as Jr,SRM as Zr,SendFocusEventsMode as $r,SendReceiveMode as eo,SetBiDirectionalSupportMode as ro,SetInBandResizeMode as oo,SetInsertReplaceMode as to,SetKeyboardActionMode as so,SetLineFeedNewLineMode as ao,SetLocalEchoMode as io,SetSendReceiveMode as no,SetUnicodeCoreMode as uo,TextCursorEnableMode as co,UnicodeCoreMode as So,createAnsiMode as po,createDecMode as lo,isModeNotRecognized as Ro,isModePermanentlyReset as Mo,isModePermanentlySet as Co,isModeReset as mo,isModeSet as Eo,reportMode as Do,requestMode as fo,resetMode as To,setMode as yo}from"./mode.js";import{MouseButton as xo,disableAnyEventMouse as Lo,disableButtonEventMouse as Ao,disableFocusTracking as bo,disableNormalMouse as Oo,disableSgrMouse as Io,disableX10Mouse as _o,enableAnyEventMouse as go,enableButtonEventMouse as qo,enableFocusTracking as Ko,enableNormalMouse as No,enableSgrMouse as ho,enableX10Mouse as wo,encodeMouseButtonByte as vo,mouseSgrSequence as Bo,mouseX10Sequence as Uo}from"./mouse.js";import{desktopNotification as Wo,notify as Fo}from"./notification.js";import{SCREEN_MAX_LEN_DEFAULT as Xo,SCREEN_TYPICAL_LIMIT as Go,screenPassthrough as Ho,tmuxPassthrough as Qo}from"./passthrough.js";import{bracketedPasteEnd as Yo,bracketedPasteStart as jo,wrapBracketedPaste as Jo}from"./paste.js";import{resetProgressBar as $o,setErrorProgressBar as et,setIndeterminateProgressBar as rt,setProgressBar as ot,setWarningProgressBar as tt}from"./progress.js";import{RESET_INITIAL_STATE as at,RIS as it}from"./reset.js";import{clearTabStop as dt,deleteCharacter as ut,deleteLine as ct,insertCharacter as St,insertLine as pt,repeatPreviousCharacter as lt,requestPresentationStateReport as Rt,setLeftRightMargins as Mt,setTopBottomMargins as Ct}from"./screen.js";import{SCROLL_DOWN_1 as Et,SCROLL_UP_1 as Dt,scrollDown as ft,scrollUp as Tt}from"./scroll.js";import{default as Pt}from"./sixel.js";import{CPR as Lt,DA1 as At,DA2 as bt,DA3 as Ot,DECXCPR as It,DSR as _t,DSR_KeyboardLanguageDEC as gt,DSR_PrinterStatusDEC as qt,DSR_TerminalStatus as Kt,DSR_UDKStatusDEC as Nt,LightDarkReport as ht,RequestLightDarkReport as wt,RequestNameVersion as vt,XTVERSION as Bt,createAnsiStatusReport as Ut,createDecStatusReport as kt,cursorPositionReport as Wt,deviceStatusReport as Ft,extendedCursorPositionReport as zt,reportKeyboardLanguageDEC as Xt,reportPrimaryDeviceAttributes as Gt,reportPrinterNoPaperDEC as Ht,reportPrinterNotReadyDEC as Qt,reportPrinterReadyDEC as Vt,reportSecondaryDeviceAttributes as Yt,reportTerminalNotOK as jt,reportTerminalOK as Jt,reportTertiaryDeviceAttributes as Zt,reportUDKLockedDEC as $t,reportUDKUnlockedDEC as es,requestCursorPositionReport as rs,requestExtendedCursorPositionReport as os,requestKeyboardLanguageDEC as ts,requestPrimaryDeviceAttributes as ss,requestPrimaryDeviceAttributesParam0 as as,requestPrinterStatusDEC as is,requestSecondaryDeviceAttributes as ns,requestSecondaryDeviceAttributesParam0 as ds,requestTerminalStatus as us,requestTertiaryDeviceAttributes as cs,requestTertiaryDeviceAttributesParam0 as Ss,requestUDKStatusDEC as ps}from"./status.js";import{default as Rs}from"./strip.js";import{XTGETTCAP as Cs,requestTermcap as ms,requestTerminfo as Es}from"./termcap.js";import{decsin as fs,decswt as Ts,setIconName as ys,setIconNameAndWindowTitle as Ps,setIconNameAndWindowTitleWithST as xs,setIconNameWithST as Ls,setWindowTitle as As,setWindowTitleWithST as bs}from"./title.js";import{default as Is}from"./urxvt.js";import{XTWINOPS as gs,deiconifyWindow as qs,iconifyWindow as Ks,lowerWindow as Ns,maximizeWindow as hs,moveWindow as ws,raiseWindow as vs,refreshWindow as Bs,reportWindowPosition as Us,reportWindowState as ks,requestCellSizePixels as Ws,requestTextAreaSizeChars as Fs,requestTextAreaSizePixels as zs,resizeTextAreaChars as Xs,resizeTextAreaPixels as Gs,restoreMaximizedWindow as Hs,setPageSizeLines as Qs,xtermWindowOp as Vs}from"./window-ops.js";import{KittyKeyboardFlag as js,XTMODKEYS as Js,XTQMODKEYS as Zs,keyModifierOptions as $s,popKittyKeyboard as ea,pushKittyKeyboard as ra,queryKeyModifierOptions as oa,queryKittyKeyboard as ta,queryModifyOtherKeys as sa,resetKeyModifierOptions as aa,resetModifyOtherKeys as ia,setKeyModifierOptions as na,setKittyKeyboard as da,setModifyOtherKeys1 as ua,setModifyOtherKeys2 as ca}from"./xterm.js";import{IT2_AUTO as pa,it2Cells as la,it2Percent as Ra,it2Pixels as Ma}from"./packem_shared/IT2_AUTO-K3GubKy7.js";import{ITerm2File as ma,ITerm2FileEnd as Ea,ITerm2FilePart as Da,ITerm2MultipartFileStart as fa}from"./packem_shared/ITerm2File-BkLc5ipB.js";const e="\x07";export{t as ALT_SCREEN_OFF,s as ALT_SCREEN_ON,H as APC,mr as BDSM,Q as BEL,$e as BLUR,Er as BiDirectionalSupportMode,Dr as BracketedPasteMode,Lt as CPR,V as CSI,te as CURSOR_BACKWARD_1,se as CURSOR_DOWN_1,ae as CURSOR_FORWARD_1,ie as CURSOR_UP_1,At as DA1,bt as DA2,Ot as DA3,Y as DCS,cr as DECKPAM,Sr as DECKPNM,fr as DECRPM,Tr as DECRQM,It as DECXCPR,E as DEC_SPECIAL_GRAPHICS,_t as DSR,gt as DSR_KeyboardLanguageDEC,qt as DSR_PrinterStatusDEC,Kt as DSR_TerminalStatus,Nt as DSR_UDKStatusDEC,yr as DisableModifiersMode,j as ESC,er as FOCUS,D as G0,f as G1,T as G2,y as G3,Pr as IRM,pa as IT2_AUTO,ma as ITerm2File,Ea as ITerm2FileEnd,Da as ITerm2FilePart,fa as ITerm2MultipartFileStart,xr as InBandResizeMode,Lr as InsertReplaceMode,Ar as KAM,br as KeyboardActionMode,js as KittyKeyboardFlag,Or as LNM,P as LS0,x as LS1,L as LS1R,A as LS2,b as LS2R,O as LS3,I as LS3R,Ir as LightDarkMode,ht as LightDarkReport,_r as LineFeedNewLineMode,gr as LocalEchoMode,xo as MouseButton,J as OSC,qr as OriginMode,Z as PM,ne as REQUEST_CURSOR_POSITION,de as REQUEST_EXTENDED_CURSOR_POSITION,at as RESET_INITIAL_STATE,ue as RESTORE_CURSOR_DEC,it as RIS,Kr as RM,Nr as RequestBiDirectionalSupportMode,hr as RequestInBandResizeMode,wr as RequestInsertReplaceMode,vr as RequestKeyboardActionMode,wt as RequestLightDarkReport,Br as RequestLineFeedNewLineMode,Ur as RequestLocalEchoMode,vt as RequestNameVersion,kr as RequestSendReceiveMode,Wr as RequestUnicodeCoreMode,Fr as ResetBiDirectionalSupportMode,zr as ResetInBandResizeMode,Xr as ResetInsertReplaceMode,Gr as ResetKeyboardActionMode,Hr as ResetLineFeedNewLineMode,Qr as ResetLocalEchoMode,Vr as ResetSendReceiveMode,Yr as ResetUnicodeCoreMode,ce as SAVE_CURSOR_DEC,Xo as SCREEN_MAX_LEN_DEFAULT,Go as SCREEN_TYPICAL_LIMIT,Et as SCROLL_DOWN_1,Dt as SCROLL_UP_1,_ as SCS,$ as SEP,jr as SGRMouseMode,g as SI,Jr as SM,q as SO,ee as SOS,Zr as SRM,re as ST,$r as SendFocusEventsMode,eo as SendReceiveMode,ro as SetBiDirectionalSupportMode,oo as SetInBandResizeMode,to as SetInsertReplaceMode,so as SetKeyboardActionMode,ao as SetLineFeedNewLineMode,io as SetLocalEchoMode,no as SetSendReceiveMode,uo as SetUnicodeCoreMode,co as TextCursorEnableMode,K as UNITED_KINGDOM,N as USASCII,So as UnicodeCoreMode,Cs as XTGETTCAP,Js as XTMODKEYS,Zs as XTQMODKEYS,Bt as XTVERSION,gs as XTWINOPS,a as alternativeScreenOff,i as alternativeScreenOn,e as beep,Yo as bracketedPasteEnd,jo as bracketedPasteStart,F as clearClipboard,v as clearLineAndHomeCursor,B as clearScreenAndHomeCursor,U as clearScreenFromTopLeft,dt as clearTabStop,po as createAnsiMode,Ut as createAnsiStatusReport,lo as createDecMode,kt as createDecStatusReport,Se as cursorBackward,pe as cursorBackwardTab,le as cursorDown,Re as cursorForward,Me as cursorHide,Ce as cursorHorizontalAbsolute,me as cursorHorizontalForwardTab,Ee as cursorLeft,De as cursorMove,fe as cursorNextLine,Te as cursorPosition,Wt as cursorPositionReport,ye as cursorPreviousLine,Pe as cursorRestore,xe as cursorSave,Le as cursorShow,Ae as cursorTo,be as cursorToColumn1,Oe as cursorUp,Ie as cursorVerticalAbsolute,fs as decsin,Ts as decswt,qs as deiconifyWindow,ut as deleteCharacter,ct as deleteLine,Wo as desktopNotification,Ft as deviceStatusReport,Lo as disableAnyEventMouse,Ao as disableButtonEventMouse,bo as disableFocusTracking,Oo as disableNormalMouse,Io as disableSgrMouse,_o as disableX10Mouse,go as enableAnyEventMouse,qo as enableButtonEventMouse,Ko as enableFocusTracking,No as enableNormalMouse,ho as enableSgrMouse,wo as enableX10Mouse,vo as encodeMouseButtonByte,_e as eraseCharacter,we as eraseDisplay,ve as eraseDown,Be as eraseInLine,Ue as eraseLine,ke as eraseLineEnd,We as eraseLineStart,Fe as eraseLines,ze as eraseScreen,Xe as eraseScreenAndScrollback,Ge as eraseUp,zt as extendedCursorPositionReport,Qe as finalTerm,Ve as finalTermCmdExecuted,Ye as finalTermCmdFinished,je as finalTermCmdStart,Je as finalTermPrompt,rr as focusInEvent,or as focusOutEvent,sr as hyperlink,dr as iTerm2,Ks as iconifyWindow,ir as image,St as insertCharacter,pt as insertLine,Ro as isModeNotRecognized,Mo as isModePermanentlyReset,Co as isModePermanentlySet,mo as isModeReset,Eo as isModeSet,la as it2Cells,Ra as it2Percent,Ma as it2Pixels,$s as keyModifierOptions,pr as keypadApplicationMode,lr as keypadNumericMode,Mr as kittyGraphics,Ns as lowerWindow,hs as maximizeWindow,Bo as mouseSgrSequence,Uo as mouseX10Sequence,ws as moveWindow,Fo as notify,Ke as notifyWorkingDirectory,ea as popKittyKeyboard,ra as pushKittyKeyboard,oa as queryKeyModifierOptions,ta as queryKittyKeyboard,sa as queryModifyOtherKeys,vs as raiseWindow,Bs as refreshWindow,lt as repeatPreviousCharacter,Xt as reportKeyboardLanguageDEC,Do as reportMode,Gt as reportPrimaryDeviceAttributes,Ht as reportPrinterNoPaperDEC,Qt as reportPrinterNotReadyDEC,Vt as reportPrinterReadyDEC,Yt as reportSecondaryDeviceAttributes,jt as reportTerminalNotOK,Jt as reportTerminalOK,Zt as reportTertiaryDeviceAttributes,$t as reportUDKLockedDEC,es as reportUDKUnlockedDEC,Us as reportWindowPosition,ks as reportWindowState,d as requestBackgroundColor,Ws as requestCellSizePixels,z as requestClipboard,u as requestCursorColor,rs as requestCursorPositionReport,os as requestExtendedCursorPositionReport,c as requestForegroundColor,ts as requestKeyboardLanguageDEC,fo as requestMode,Rt as requestPresentationStateReport,ss as requestPrimaryDeviceAttributes,as as requestPrimaryDeviceAttributesParam0,is as requestPrinterStatusDEC,ns as requestSecondaryDeviceAttributes,ds as requestSecondaryDeviceAttributesParam0,ms as requestTermcap,us as requestTerminalStatus,Es as requestTerminfo,cs as requestTertiaryDeviceAttributes,Ss as requestTertiaryDeviceAttributesParam0,Fs as requestTextAreaSizeChars,zs as requestTextAreaSizePixels,ps as requestUDKStatusDEC,S as resetBackgroundColor,p as resetCursorColor,l as resetForegroundColor,aa as resetKeyModifierOptions,To as resetMode,ia as resetModifyOtherKeys,$o as resetProgressBar,k as resetTerminal,Xs as resizeTextAreaChars,Gs as resizeTextAreaPixels,Hs as restoreMaximizedWindow,Ho as screenPassthrough,ft as scrollDown,Tt as scrollUp,h as selectCharacterSet,R as setBackgroundColor,X as setClipboard,M as setCursorColor,ge as setCursorStyle,et as setErrorProgressBar,C as setForegroundColor,ys as setIconName,Ps as setIconNameAndWindowTitle,xs as setIconNameAndWindowTitleWithST,Ls as setIconNameWithST,rt as setIndeterminateProgressBar,na as setKeyModifierOptions,da as setKittyKeyboard,Mt as setLeftRightMargins,yo as setMode,ua as setModifyOtherKeys1,ca as setModifyOtherKeys2,Qs as setPageSizeLines,ot as setProgressBar,Ct as setTopBottomMargins,tt as setWarningProgressBar,As as setWindowTitle,bs as setWindowTitleWithST,Ne as setWorkingDirectory,Pt as sixelGraphics,Rs as strip,Qo as tmuxPassthrough,Is as urxvtExtension,Jo as wrapBracketedPaste,Vs as xtermWindowOp};
|
package/dist/iterm2.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import{OSC as r,BEL as e}from"./constants.js";import{IT2_AUTO as n,it2Cells as a,it2Percent as p,it2Pixels as I}from"./packem_shared/IT2_AUTO-K3GubKy7.js";import{ITerm2File as S,ITerm2FileEnd as d,ITerm2FilePart as s,ITerm2MultipartFileStart as c}from"./packem_shared/ITerm2File-BkLc5ipB.js";const i=t=>{if(t.toString===Object.prototype.toString)throw new Error("Invalid payload: must implement IITerm2Payload with a custom toString method");return`${r}1337;${t.toString()}${e}`};export{n as IT2_AUTO,S as ITerm2File,d as ITerm2FileEnd,s as ITerm2FilePart,c as ITerm2MultipartFileStart,i as iTerm2,a as it2Cells,p as it2Percent,I as it2Pixels};
|
package/dist/keypad.d.ts
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Keypad Application Mode (DECKPAM).
|
|
3
|
+
*
|
|
4
|
+
* Switches the numeric keypad into "application" mode, so its keys transmit
|
|
5
|
+
* application control sequences instead of the plain numeric/cursor characters.
|
|
6
|
+
* This is equivalent to setting the DEC private mode DECNKM.
|
|
7
|
+
*
|
|
8
|
+
* Sequence: `ESC =`
|
|
9
|
+
* @see {@link https://vt100.net/docs/vt510-rm/DECKPAM.html}
|
|
10
|
+
*/
|
|
11
|
+
declare const keypadApplicationMode: string;
|
|
12
|
+
/** Alias for {@link keypadApplicationMode} (DEC Keypad Application Mode). */
|
|
13
|
+
declare const DECKPAM: string;
|
|
14
|
+
/**
|
|
15
|
+
* Keypad Numeric Mode (DECKPNM).
|
|
16
|
+
*
|
|
17
|
+
* Switches the numeric keypad back into "numeric" mode, so its keys transmit the
|
|
18
|
+
* plain numeric/cursor characters. This is equivalent to resetting the DEC
|
|
19
|
+
* private mode DECNKM.
|
|
20
|
+
*
|
|
21
|
+
* Sequence: `ESC >`
|
|
22
|
+
* @see {@link https://vt100.net/docs/vt510-rm/DECKPNM.html}
|
|
23
|
+
*/
|
|
24
|
+
declare const keypadNumericMode: string;
|
|
25
|
+
/** Alias for {@link keypadNumericMode} (DEC Keypad Numeric Mode). */
|
|
26
|
+
declare const DECKPNM: string;
|
|
27
|
+
export { DECKPAM, DECKPNM, keypadApplicationMode, keypadNumericMode };
|
package/dist/keypad.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{ESC as o}from"./constants.js";const e=`${o}=`,i=e,p=`${o}>`,r=p;export{i as DECKPAM,r as DECKPNM,e as keypadApplicationMode,p as keypadNumericMode};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Wraps a Kitty graphics protocol `payload` in the APC frame the protocol uses
|
|
3
|
+
* (`APC _ G options ; payload ST`).
|
|
4
|
+
*
|
|
5
|
+
* This is an emit-only helper: it frames a (typically Base64-encoded) `payload`
|
|
6
|
+
* together with the control `options`. It does **not** encode image data or
|
|
7
|
+
* split large payloads into chunks — the caller is responsible for Base64
|
|
8
|
+
* encoding and chunking (using the `m=1`/`m=0` options) when needed.
|
|
9
|
+
*
|
|
10
|
+
* Sequence: `APC _ G options ; payload ST`
|
|
11
|
+
* @param payload The (already-encoded) image/control payload. May be empty for control-only sequences.
|
|
12
|
+
* @param options The control options as `key=value` strings, joined with `,` (e.g. `"a=T"`, `"f=100"`).
|
|
13
|
+
* @returns The Kitty graphics `APC` escape sequence.
|
|
14
|
+
* @see {@link https://sw.kovidgoyal.net/kitty/graphics-protocol/}
|
|
15
|
+
*/
|
|
16
|
+
declare const kittyGraphics: (payload: string, ...options: string[]) => string;
|
|
17
|
+
export { kittyGraphics as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{APC as r,ST as $}from"./constants.js";const s=(o,...n)=>{const t=o.length>0?`;${o}`:"";return`${r}G${n.join(",")}${t}${$}`};export{s as default};
|
package/dist/mode.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import{CSI as e}from"./constants.js";class a{code;isDecMode=!1;constructor(M){this.code=M}}class c{code;isDecMode=!0;constructor(M){this.code=M}}const R=(o,...M)=>{if(M.length===0)return"";const s=o?"l":"h";if(M.length===1){const d=M[0];let i=e;return d.isDecMode&&(i+="?"),i+String(d.code)+s}const r=M.filter(d=>!d.isDecMode).map(d=>d.code),u=M.filter(d=>d.isDecMode).map(d=>d.code);let n="";return r.length>0&&(n+=`${e}${r.join(";")}${s}`),u.length>0&&(n+=`${e}?${u.join(";")}${s}`),n};var S=(o=>(o[o.NotRecognized=0]="NotRecognized",o[o.Set=1]="Set",o[o.Reset=2]="Reset",o[o.PermanentlySet=3]="PermanentlySet",o[o.PermanentlyReset=4]="PermanentlyReset",o))(S||{});const G=o=>o===0,H=o=>o===1||o===3,T=o=>o===2||o===4,X=o=>o===3,j=o=>o===4,$=o=>new a(o),t=o=>new c(o),p=(...o)=>R(!1,...o),Q=p,h=(...o)=>R(!0,...o),J=h,g=o=>{let M=e;return o.isDecMode&&(M+="?"),`${M}${String(o.code)}$p`},V=g,E=(o,M)=>{let s=M;(M<0||M>4)&&(s=0);let r=e;return o.isDecMode&&(r+="?"),`${r}${String(o.code)};${String(s)}$y`},Y=E,C=$(2),Z=C,_=`${e}2h`,ee=`${e}2l`,oe=`${e}2$p`,q=$(4),te=q,Me=`${e}4h`,de=`${e}4l`,se=`${e}4$p`,y=$(8),re=y,$e=`${e}8h`,ne=`${e}8l`,ue=`${e}8$p`,l=$(12),ie=l,Re=l,v=`${e}12h`,x=`${e}12l`,D=`${e}12$p`,le=v,ae=x,ce=D,A=$(20),Se=A,pe=`${e}20h`,he=`${e}20l`,ge=`${e}20$p`,m=t(1),Ee=m,Ce=`${e}?1h`,qe=`${e}?1l`,ye=`${e}?1$p`,B=t(6),ve=B,xe=`${e}?6h`,De=`${e}?6l`,Ae=`${e}?6$p`,L=t(7),me=L,Be=`${e}?7h`,Le=`${e}?7l`,Ke=`${e}?7$p`,fe=t(9),Ne=`${e}?9h`,Pe=`${e}?9l`,Ie=`${e}?9$p`,K=t(25),be=K,f=`${e}?25h`,N=`${e}?25l`,ke=`${e}?25$p`,Ue=f,we=N,P=t(66),ze=P,Fe=`${e}?66h`,Oe=`${e}?66l`,We=`${e}?66$p`,I=t(67),Ge=I,He=`${e}?67h`,Te=`${e}?67l`,Xe=`${e}?67$p`,b=t(69),je=b,Qe=`${e}?69h`,Je=`${e}?69l`,Ve=`${e}?69$p`,Ye=t(1e3),Ze=`${e}?1000h`,_e=`${e}?1000l`,eo=`${e}?1000$p`,oo=t(1001),to=`${e}?1001h`,Mo=`${e}?1001l`,so=`${e}?1001$p`,ro=t(1002),$o=`${e}?1002h`,no=`${e}?1002l`,uo=`${e}?1002$p`,io=t(1003),Ro=`${e}?1003h`,lo=`${e}?1003l`,ao=`${e}?1003$p`,k=t(1004),co=`${e}?1004h`,So=`${e}?1004l`,po=`${e}?1004$p`,ho=t(1005),go=`${e}?1005h`,Eo=`${e}?1005l`,Co=`${e}?1005$p`,U=t(1006),qo=`${e}?1006h`,yo=`${e}?1006l`,vo=`${e}?1006$p`,xo=t(1015),Do=`${e}?1015h`,Ao=`${e}?1015l`,mo=`${e}?1015$p`,Bo=t(1016),Lo=`${e}?1016h`,Ko=`${e}?1016l`,fo=`${e}?1016$p`,No=U,Po=k,Io=t(1035),bo=`${e}?1035h`,ko=`${e}?1035l`,Uo=`${e}?1035$p`,wo=t(1047),zo=`${e}?1047h`,Fo=`${e}?1047l`,Oo=`${e}?1047$p`,Wo=t(1048),Go=`${e}?1048h`,Ho=`${e}?1048l`,To=`${e}?1048$p`,Xo=t(1049),jo=`${e}?1049h`,Qo=`${e}?1049l`,Jo=`${e}?1049$p`,Vo=t(2004),Yo=`${e}?2004h`,Zo=`${e}?2004l`,_o=`${e}?2004$p`,et=t(2026),ot=`${e}?2026h`,tt=`${e}?2026l`,Mt=`${e}?2026$p`,w=t(2027),z=`${e}?2027h`,F=`${e}?2027l`,O=`${e}?2027$p`,dt=w,st=z,rt=F,$t=O,nt=t(9001),ut=`${e}?9001h`,it=`${e}?9001l`,Rt=`${e}?9001$p`,lt=t(2031),at=`${e}?2031h`,ct=`${e}?2031l`,St=`${e}?2031$p`,pt=t(2048),ht=`${e}?2048h`,gt=`${e}?2048l`,Et=`${e}?2048$p`;export{wo as AltScreenMode,Xo as AltScreenSaveCursorMode,io as AnyEventMouseMode,L as AutoWrapMode,re as BDSM,I as BackarrowKeyMode,y as BiDirectionalSupportMode,Vo as BracketedPasteMode,ro as ButtonEventMouseMode,m as CursorKeysMode,me as DECAWM,Ge as DECBKM,Ee as DECCKM,je as DECLRMM,ze as DECNKM,ve as DECOM,Y as DECRPM,V as DECRQM,be as DECTCEM,Io as DisableModifiersMode,k as FocusEventMode,dt as GraphemeClusteringMode,we as HideCursor,oo as HighlightMouseMode,te as IRM,pt as InBandResizeMode,q as InsertReplaceMode,Z as KAM,C as KeyboardActionMode,Se as LNM,b as LeftRightMarginMode,lt as LightDarkMode,A as LineFeedNewLineMode,ie as LocalEchoMode,S as ModeSetting,Ye as NormalMouseMode,P as NumericKeypadMode,B as OriginMode,J as RM,Oo as RequestAltScreenMode,Jo as RequestAltScreenSaveCursorMode,ao as RequestAnyEventMouseMode,Ke as RequestAutoWrapMode,Xe as RequestBackarrowKeyMode,ue as RequestBiDirectionalSupportMode,_o as RequestBracketedPasteMode,uo as RequestButtonEventMouseMode,ye as RequestCursorKeysMode,Uo as RequestDisableModifiersMode,po as RequestFocusEventMode,$t as RequestGraphemeClusteringMode,so as RequestHighlightMouseMode,Et as RequestInBandResizeMode,se as RequestInsertReplaceMode,oe as RequestKeyboardActionMode,Ve as RequestLeftRightMarginMode,St as RequestLightDarkMode,ge as RequestLineFeedNewLineMode,ce as RequestLocalEchoMode,eo as RequestNormalMouseMode,We as RequestNumericKeypadMode,Ae as RequestOriginMode,To as RequestSaveCursorMode,D as RequestSendReceiveMode,vo as RequestSgrExtMouseMode,fo as RequestSgrPixelExtMouseMode,Mt as RequestSynchronizedOutputMode,ke as RequestTextCursorEnableMode,O as RequestUnicodeCoreMode,mo as RequestUrxvtExtMouseMode,Co as RequestUtf8ExtMouseMode,Rt as RequestWin32InputMode,Ie as RequestX10MouseMode,Fo as ResetAltScreenMode,Qo as ResetAltScreenSaveCursorMode,lo as ResetAnyEventMouseMode,Le as ResetAutoWrapMode,Te as ResetBackarrowKeyMode,ne as ResetBiDirectionalSupportMode,Zo as ResetBracketedPasteMode,no as ResetButtonEventMouseMode,qe as ResetCursorKeysMode,ko as ResetDisableModifiersMode,So as ResetFocusEventMode,rt as ResetGraphemeClusteringMode,Mo as ResetHighlightMouseMode,gt as ResetInBandResizeMode,de as ResetInsertReplaceMode,ee as ResetKeyboardActionMode,Je as ResetLeftRightMarginMode,ct as ResetLightDarkMode,he as ResetLineFeedNewLineMode,ae as ResetLocalEchoMode,_e as ResetNormalMouseMode,Oe as ResetNumericKeypadMode,De as ResetOriginMode,Ho as ResetSaveCursorMode,x as ResetSendReceiveMode,yo as ResetSgrExtMouseMode,Ko as ResetSgrPixelExtMouseMode,tt as ResetSynchronizedOutputMode,N as ResetTextCursorEnableMode,F as ResetUnicodeCoreMode,Ao as ResetUrxvtExtMouseMode,Eo as ResetUtf8ExtMouseMode,it as ResetWin32InputMode,Pe as ResetX10MouseMode,No as SGRMouseMode,Q as SM,Re as SRM,Wo as SaveCursorMode,Po as SendFocusEventsMode,l as SendReceiveMode,zo as SetAltScreenMode,jo as SetAltScreenSaveCursorMode,Ro as SetAnyEventMouseMode,Be as SetAutoWrapMode,He as SetBackarrowKeyMode,$e as SetBiDirectionalSupportMode,Yo as SetBracketedPasteMode,$o as SetButtonEventMouseMode,Ce as SetCursorKeysMode,bo as SetDisableModifiersMode,co as SetFocusEventMode,st as SetGraphemeClusteringMode,to as SetHighlightMouseMode,ht as SetInBandResizeMode,Me as SetInsertReplaceMode,_ as SetKeyboardActionMode,Qe as SetLeftRightMarginMode,at as SetLightDarkMode,pe as SetLineFeedNewLineMode,le as SetLocalEchoMode,Ze as SetNormalMouseMode,Fe as SetNumericKeypadMode,xe as SetOriginMode,Go as SetSaveCursorMode,v as SetSendReceiveMode,qo as SetSgrExtMouseMode,Lo as SetSgrPixelExtMouseMode,ot as SetSynchronizedOutputMode,f as SetTextCursorEnableMode,z as SetUnicodeCoreMode,Do as SetUrxvtExtMouseMode,go as SetUtf8ExtMouseMode,ut as SetWin32InputMode,Ne as SetX10MouseMode,U as SgrExtMouseMode,Bo as SgrPixelExtMouseMode,Ue as ShowCursor,et as SynchronizedOutputMode,K as TextCursorEnableMode,w as UnicodeCoreMode,xo as UrxvtExtMouseMode,ho as Utf8ExtMouseMode,nt as Win32InputMode,fe as X10MouseMode,$ as createAnsiMode,t as createDecMode,G as isModeNotRecognized,j as isModePermanentlyReset,X as isModePermanentlySet,T as isModeReset,H as isModeSet,E as reportMode,g as requestMode,h as resetMode,p as setMode};
|
package/dist/mouse.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import{ESC as o}from"./constants.js";const l=4,i=8,B=16,$=32,_=64,a=128,N=3,E=32,t={BACKWARD:8,BUTTON_1:1,BUTTON_2:2,BUTTON_3:3,BUTTON_4:4,BUTTON_5:5,BUTTON_6:6,BUTTON_7:7,BUTTON_8:8,BUTTON_9:9,BUTTON_10:10,BUTTON_11:11,FORWARD:9,LEFT:1,MIDDLE:2,NONE:0,RELEASE:0,RIGHT:3,WHEEL_DOWN:5,WHEEL_LEFT:6,WHEEL_RIGHT:7,WHEEL_UP:4},O=(e,s,T={})=>{let n;if(e===t.RELEASE)n=N;else if(e>=t.LEFT&&e<=t.RIGHT)n=e-t.LEFT;else if(e>=t.WHEEL_UP&&e<=t.WHEEL_RIGHT)n=e-t.WHEEL_UP,n|=_;else if(e>=t.BACKWARD&&e<=t.BUTTON_11)n=e-t.BACKWARD,n|=a;else return 255;return T.shift&&(n|=l),T.alt&&(n|=i),T.ctrl&&(n|=B),s&&(n|=$),n},U=(e,s,T)=>{if(e===255)return"";const n=String.fromCodePoint(e+E),r=String.fromCodePoint(s+1+E),u=String.fromCodePoint(T+1+E);return`${o}[M${n}${r}${u}`},L=(e,s,T,n)=>{if(e===255)return"";const r=n?"m":"M";return`${o}[<${String(e)};${String(s+1)};${String(T+1)}${r}`},S=`${o}[?9h`,c=`${o}[?9l`,b=`${o}[?1000h`,W=`${o}[?1000l`,f=`${o}[?1002h`,g=`${o}[?1002l`,A=`${o}[?1003h`,H=`${o}[?1003l`,R=`${o}[?1006h`,d=`${o}[?1006l`,m=`${o}[?1004h`,h=`${o}[?1004l`;export{t as MouseButton,H as disableAnyEventMouse,g as disableButtonEventMouse,h as disableFocusTracking,W as disableNormalMouse,d as disableSgrMouse,c as disableX10Mouse,A as enableAnyEventMouse,f as enableButtonEventMouse,m as enableFocusTracking,b as enableNormalMouse,R as enableSgrMouse,S as enableX10Mouse,O as encodeMouseButtonByte,L as mouseSgrSequence,U as mouseX10Sequence};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns a sequence that triggers a desktop notification using the simple
|
|
3
|
+
* `OSC 9` protocol popularised by iTerm2.
|
|
4
|
+
*
|
|
5
|
+
* Sequence: `OSC 9 ; Mc BEL`
|
|
6
|
+
* @param message The notification body.
|
|
7
|
+
* @returns The `OSC 9` escape sequence.
|
|
8
|
+
* @example
|
|
9
|
+
* ```typescript
|
|
10
|
+
* import { notify } from "@visulima/ansi/notification";
|
|
11
|
+
*
|
|
12
|
+
* process.stdout.write(notify("Build finished"));
|
|
13
|
+
* ```
|
|
14
|
+
* @see {@link https://iterm2.com/documentation-escape-codes.html}
|
|
15
|
+
*/
|
|
16
|
+
declare const notify: (message: string) => string;
|
|
17
|
+
/**
|
|
18
|
+
* Returns a sequence for the extensible `OSC 99` desktop notification protocol.
|
|
19
|
+
*
|
|
20
|
+
* `OSC 99` supports optional metadata (colon-separated `key=value` pairs, e.g.
|
|
21
|
+
* `"i=1"`, `"d=1"`, `"p=title"`) followed by the payload body.
|
|
22
|
+
*
|
|
23
|
+
* Sequence: `OSC 99 ; metadata ; payload BEL`
|
|
24
|
+
* @param payload The notification body.
|
|
25
|
+
* @param metadata Optional metadata entries, joined with `:`.
|
|
26
|
+
* @returns The `OSC 99` escape sequence.
|
|
27
|
+
* @see {@link https://sw.kovidgoyal.net/kitty/desktop-notifications/}
|
|
28
|
+
*/
|
|
29
|
+
declare const desktopNotification: (payload: string, ...metadata: string[]) => string;
|
|
30
|
+
export { desktopNotification, notify };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{OSC as i,BEL as $,stripOscTerminators as t}from"./constants.js";const s=o=>`${i}9;${t(o)}${$}`,m=(o,...r)=>`${i}99;${r.map(n=>t(n)).join(":")};${t(o)}${$}`;export{m as desktopNotification,s as notify};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const i="auto",e=t=>t.toString(),n=t=>`${String(t)}px`,r=t=>`${String(t)}%`;export{i as IT2_AUTO,e as it2Cells,r as it2Percent,n as it2Pixels};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createRequire as o}from"node:module";const n=o(import.meta.url),s=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,l=t=>{if(typeof s<"u"&&s.versions&&s.versions.node){const[e,r]=s.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return s.getBuiltinModule(t)}return n(t)},{Buffer:h}=l("node:buffer"),i=t=>{const e=[];return t.name&&e.push(`name=${t.name}`),t.size!==void 0&&e.push(`size=${String(t.size)}`),t.width!==void 0&&e.push(`width=${t.width.toString()}`),t.height!==void 0&&e.push(`height=${t.height.toString()}`),t.ignoreAspectRatio&&e.push("preserveAspectRatio=0"),t.inline&&e.push("inline=1"),t.doNotMoveCursor&&e.push("doNotMoveCursor=1"),e.join(";")};class u{fileProps;constructor(e,r){if(this.fileProps={...e},r){if(r.byteLength>10*1024*1024)throw new Error("File size exceeds maximum limit of 10MB");if(this.fileProps.content=h.from(r).toString("base64"),this.fileProps.size??=r.byteLength,this.fileProps.size!==r.byteLength)throw new Error("File size property doesn't match actual data length")}}toString(){let e="File=";return e+=i(this.fileProps),this.fileProps.content!==void 0&&(e+=`:${this.fileProps.content}`),e}}class c{toString(){return"FileEnd"}}class a{constructor(e){this.base64Chunk=e}base64Chunk;toString(){return`FilePart=${this.base64Chunk}`}}class f{constructor(e){this.properties=e}properties;toString(){return`MultipartFile=${i(this.properties)}`}}export{u as ITerm2File,c as ITerm2FileEnd,a as ITerm2FilePart,f as ITerm2MultipartFileStart};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{CSI as s,ESC as o,SEP as t}from"../constants.js";import"./restoreCursor-CyaXIMQf.js";const $=typeof globalThis<"u"&&typeof globalThis.window=="object"&&globalThis.window.document!==void 0,e=/^(?:msys|cygwin)$/,n=!$&&process.env.TERM_PROGRAM==="Apple_Terminal",B=!$&&(process.platform==="win32"||e.test(process.env.OSTYPE)),S=`${o}7`,c=`${o}8`,C=`${s}A`,_=`${s}B`,E=`${s}C`,O=`${s}D`,T=`${s}6n`,U=`${s}?6n`,l=(r=1)=>`${s}${String(r)}D`,p=(r=1)=>`${s}${String(r)}B`,w=(r=1)=>`${s}${String(r)}C`,k=`${s}?25l`,y=`${s}G`,A=(r=1)=>l(r),g=(r=1)=>`${s}${String(r)}G`,D=(r,a)=>{let i="";return r<0?i+=`${s}${String(-r)}D`:r>0&&(i+=`${s}${String(r)}C`),a<0?i+=`${s}${String(-a)}A`:a>0&&(i+=`${s}${String(a)}B`),i},m=(r=1)=>`${s}${String(r)}E`,v=(r=1)=>`${s}${String(r)}F`,b=n?c:`${o}u`,f=n?S:`${o}s`,P=`${s}?25h`,h=(r,a)=>a===void 0?g(r+1):`${s}${String(a+1)}${t}${String(r+1)}H`,H=(r,a)=>a===void 0?`${s}${String(r)}H`:`${s}${String(r)}${t}${String(a)}H`,I=(r=1)=>`${s}${String(r)}I`,N=(r=1)=>`${s}${String(r)}Z`,F=(r=1)=>`${s}${String(r)}X`,W=(r=1)=>`${s}${String(r)}d`,x=(r=1)=>`${s}${String(r)}A`;var u=(r=>(r[r.Default=0]="Default",r[r.BlinkingBlock=1]="BlinkingBlock",r[r.SteadyBlock=2]="SteadyBlock",r[r.BlinkingUnderline=3]="BlinkingUnderline",r[r.SteadyUnderline=4]="SteadyUnderline",r[r.BlinkingBar=5]="BlinkingBar",r[r.SteadyBar=6]="SteadyBar",r))(u||{});const z=r=>`${s}${String(r)} q`;export{B as A,u as B,O as C,T as R,S,_ as a,E as b,C as c,U as d,c as e,l as f,N as g,p as h,w as i,k as j,g as k,I as l,A as m,D as n,m as o,H as p,v as q,b as r,f as s,P as t,h as u,y as v,x as w,W as x,F as y,z};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{createRequire as g}from"node:module";const U=g(import.meta.url),x=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,a=x,w=(e,t,i,s)=>{if(i==="length"||i==="prototype"||i==="arguments"||i==="caller")return;const r=Object.getOwnPropertyDescriptor(e,i),n=Object.getOwnPropertyDescriptor(t,i);!S(r,n)&&s||Object.defineProperty(e,i,n)},S=function(e,t){return e===void 0||e.configurable||e.writable===t.writable&&e.enumerable===t.enumerable&&e.configurable===t.configurable&&(e.writable||e.value===t.value)},_=(e,t)=>{const i=Object.getPrototypeOf(t);i!==Object.getPrototypeOf(e)&&Object.setPrototypeOf(e,i)},I=(e,t)=>`/* Wrapped ${e}*/
|
|
2
|
+
${t}`,O=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),E=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),T=(e,t,i)=>{const s=i===""?"":`with ${i.trim()}() `,r=I.bind(null,s,t.toString());Object.defineProperty(r,"name",E);const{writable:n,enumerable:l,configurable:f}=O;Object.defineProperty(e,"toString",{value:r,writable:n,enumerable:l,configurable:f})};function G(e,t,{ignoreNonConfigurable:i=!1}={}){const{name:s}=e;for(const r of Reflect.ownKeys(t))w(e,t,r,i);return _(e,t),T(e,t,s),e}const u=new WeakMap,b=(e,t={})=>{if(typeof e!="function")throw new TypeError("Expected a function");let i,s=0;const r=e.displayName||e.name||"<anonymous>",n=function(...l){if(u.set(n,++s),s===1)i=e.apply(this,l),e=void 0;else if(t.throw===!0)throw new Error(`Function \`${r}\` can only be called once`);return i};return G(n,e),u.set(n,s),n};b.callCount=e=>{if(!u.has(e))throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return u.get(e)};const o=[];o.push("SIGHUP","SIGINT","SIGTERM");process.platform!=="win32"&&o.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&o.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");const c=e=>!!e&&!0&&typeof e.removeListener=="function"&&typeof e.emit=="function"&&typeof e.reallyExit=="function"&&typeof e.listeners=="function"&&typeof e.kill=="function"&&typeof e.pid=="number"&&typeof e.on=="function",h=Symbol.for("signal-exit emitter"),p=globalThis,P=Object.defineProperty.bind(Object);class j{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(p[h])return p[h];P(p,h,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(t,i){this.listeners[t].push(i)}removeListener(t,i){const s=this.listeners[t],r=s.indexOf(i);r!==-1&&(r===0&&s.length===1?s.length=0:s.splice(r,1))}emit(t,i,s){if(this.emitted[t])return!1;this.emitted[t]=!0;let r=!1;for(const n of this.listeners[t])r=n(i,s)===!0||r;return t==="exit"&&(r=this.emit("afterExit",i,s)||r),r}}class y{}const v=e=>({onExit(t,i){return e.onExit(t,i)},load(){return e.load()},unload(){return e.unload()}});class L extends y{onExit(){return()=>{}}load(){}unload(){}}class $ extends y{#o=d.platform==="win32"?"SIGINT":"SIGHUP";#e=new j;#t;#r;#n;#s={};#i=!1;constructor(t){super(),this.#t=t,this.#s={};for(const i of o)this.#s[i]=()=>{const s=this.#t.listeners(i);let{count:r}=this.#e;const n=t;if(typeof n.__signal_exit_emitter__=="object"&&typeof n.__signal_exit_emitter__.count=="number"&&(r+=n.__signal_exit_emitter__.count),s.length===r){this.unload();const l=this.#e.emit("exit",null,i),f=i==="SIGHUP"?this.#o:i;l||t.kill(t.pid,f)}};this.#n=t.reallyExit,this.#r=t.emit}onExit(t,i){if(!c(this.#t))return()=>{};this.#i===!1&&this.load();const s=i?.alwaysLast?"afterExit":"exit";return this.#e.on(s,t),()=>{this.#e.removeListener(s,t),this.#e.listeners.exit.length===0&&this.#e.listeners.afterExit.length===0&&this.unload()}}load(){if(!this.#i){this.#i=!0,this.#e.count+=1;for(const t of o)try{const i=this.#s[t];i&&this.#t.on(t,i)}catch{}this.#t.emit=(t,...i)=>this.#a(t,...i),this.#t.reallyExit=t=>this.#l(t)}}unload(){this.#i&&(this.#i=!1,o.forEach(t=>{const i=this.#s[t];if(!i)throw new Error("Listener not defined for signal: "+t);try{this.#t.removeListener(t,i)}catch{}}),this.#t.emit=this.#r,this.#t.reallyExit=this.#n,this.#e.count-=1)}#l(t){return c(this.#t)?(this.#t.exitCode=t||0,this.#e.emit("exit",this.#t.exitCode,null),this.#n.call(this.#t,this.#t.exitCode)):0}#a(t,...i){const s=this.#r;if(t==="exit"&&c(this.#t)){typeof i[0]=="number"&&(this.#t.exitCode=i[0]);const r=s.call(this.#t,t,...i);return this.#e.emit("exit",this.#t.exitCode,null),r}else return s.call(this.#t,t,...i)}}const d=globalThis.process,{onExit:R}=v(c(d)?new $(d):new L),m=a.stderr.isTTY?a.stderr:a.stdout.isTTY?a.stdout:void 0,F=m?b(()=>{R(()=>{m.write("\x1B[?25h")},{alwaysLast:!0})}):()=>{};export{F as default};
|
package/dist/passthrough.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import{ST as r,DCS as s,ESC as h}from"./constants.js";const E=0,g=768,u=(e,t=E)=>{let n=s;if(t>0&&e.length>t)for(let l=0;l<e.length;l+=t){const o=Math.min(l+t,e.length);n+=e.slice(l,o),o<e.length&&(n+=r+s)}else n+=e;return n+=r,n},m=e=>{const t=e.replaceAll(h,h+h);return`${s}tmux;${t}${r}`};export{E as SCREEN_MAX_LEN_DEFAULT,g as SCREEN_TYPICAL_LIMIT,u as screenPassthrough,m as tmuxPassthrough};
|
package/dist/paste.d.ts
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Marker a terminal emits immediately before pasted text when bracketed paste
|
|
3
|
+
* mode is enabled.
|
|
4
|
+
*
|
|
5
|
+
* Sequence: `CSI 200 ~`
|
|
6
|
+
* @see {@link https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h3-Bracketed-Paste-Mode}
|
|
7
|
+
*/
|
|
8
|
+
declare const bracketedPasteStart: string;
|
|
9
|
+
/**
|
|
10
|
+
* Marker a terminal emits immediately after pasted text when bracketed paste
|
|
11
|
+
* mode is enabled.
|
|
12
|
+
*
|
|
13
|
+
* Sequence: `CSI 201 ~`
|
|
14
|
+
*/
|
|
15
|
+
declare const bracketedPasteEnd: string;
|
|
16
|
+
/**
|
|
17
|
+
* Wraps `text` in the bracketed-paste start/end markers, mirroring how a
|
|
18
|
+
* terminal delivers pasted content to an application.
|
|
19
|
+
* @param text The text to wrap.
|
|
20
|
+
* @returns `text` surrounded by {@link bracketedPasteStart} and {@link bracketedPasteEnd}.
|
|
21
|
+
*/
|
|
22
|
+
declare const wrapBracketedPaste: (text: string) => string;
|
|
23
|
+
export { bracketedPasteEnd, bracketedPasteStart, wrapBracketedPaste };
|
package/dist/paste.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{CSI as t}from"./constants.js";const a=`${t}200~`,r=`${t}201~`,c=e=>`${a}${e}${r}`;export{r as bracketedPasteEnd,a as bracketedPasteStart,c as wrapBracketedPaste};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Resets the progress bar to its default state (hidden).
|
|
3
|
+
*
|
|
4
|
+
* Sequence: `OSC 9 ; 4 ; 0 BEL`
|
|
5
|
+
* @see {@link https://learn.microsoft.com/en-us/windows/terminal/tutorials/progress-bar-sequences}
|
|
6
|
+
*/
|
|
7
|
+
declare const resetProgressBar: string;
|
|
8
|
+
/**
|
|
9
|
+
* Returns a sequence for setting the progress bar to a specific percentage (0-100) in the "default" state.
|
|
10
|
+
*
|
|
11
|
+
* Sequence: `OSC 9 ; 4 ; 1 ; Percentage BEL`
|
|
12
|
+
* @param percentage The progress percentage (0-100, clamped automatically)
|
|
13
|
+
* @returns The progress bar sequence
|
|
14
|
+
* @see {@link https://learn.microsoft.com/en-us/windows/terminal/tutorials/progress-bar-sequences}
|
|
15
|
+
*/
|
|
16
|
+
declare const setProgressBar: (percentage: number) => string;
|
|
17
|
+
/**
|
|
18
|
+
* Returns a sequence for setting the progress bar to a specific percentage (0-100) in the "Error" state.
|
|
19
|
+
*
|
|
20
|
+
* Sequence: `OSC 9 ; 4 ; 2 ; Percentage BEL`
|
|
21
|
+
* @param percentage The progress percentage (0-100, clamped automatically)
|
|
22
|
+
* @returns The error progress bar sequence
|
|
23
|
+
* @see {@link https://learn.microsoft.com/en-us/windows/terminal/tutorials/progress-bar-sequences}
|
|
24
|
+
*/
|
|
25
|
+
declare const setErrorProgressBar: (percentage: number) => string;
|
|
26
|
+
/**
|
|
27
|
+
* Sets the progress bar to the indeterminate state.
|
|
28
|
+
*
|
|
29
|
+
* Sequence: `OSC 9 ; 4 ; 3 BEL`
|
|
30
|
+
* @see {@link https://learn.microsoft.com/en-us/windows/terminal/tutorials/progress-bar-sequences}
|
|
31
|
+
*/
|
|
32
|
+
declare const setIndeterminateProgressBar: string;
|
|
33
|
+
/**
|
|
34
|
+
* Returns a sequence for setting the progress bar to a specific percentage (0-100) in the "Warning" state.
|
|
35
|
+
*
|
|
36
|
+
* Sequence: `OSC 9 ; 4 ; 4 ; Percentage BEL`
|
|
37
|
+
* @param percentage The progress percentage (0-100, clamped automatically)
|
|
38
|
+
* @returns The warning progress bar sequence
|
|
39
|
+
* @see {@link https://learn.microsoft.com/en-us/windows/terminal/tutorials/progress-bar-sequences}
|
|
40
|
+
*/
|
|
41
|
+
declare const setWarningProgressBar: (percentage: number) => string;
|
|
42
|
+
export { resetProgressBar, setErrorProgressBar, setIndeterminateProgressBar, setProgressBar, setWarningProgressBar };
|
package/dist/progress.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{OSC as s,BEL as e}from"./constants.js";const a=`${s}9;4;0${e}`,o=r=>{const t=Math.min(Math.max(0,r),100);return`${s}9;4;1;${String(t)}${e}`},$=r=>{const t=Math.min(Math.max(0,r),100);return`${s}9;4;2;${String(t)}${e}`},g=`${s}9;4;3${e}`,i=r=>{const t=Math.min(Math.max(0,r),100);return`${s}9;4;4;${String(t)}${e}`};export{a as resetProgressBar,$ as setErrorProgressBar,g as setIndeterminateProgressBar,o as setProgressBar,i as setWarningProgressBar};
|
package/dist/screen.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import{CSI as t,SEP as n}from"./constants.js";const g=(r=1)=>`${t}${r<=1?"":String(r)}L`,S=(r=1)=>`${t}${r<=1?"":String(r)}M`,s=(r,e)=>{const $=r&&r>0?r.toString():"",i=e&&e>0?e.toString():"";return $===""&&i===""?`${t}${n}r`:`${t}${$}${n}${i}r`},a=(r,e)=>{const $=r&&r>0?r.toString():"",i=e&&e>0?e.toString():"";return $===""&&i===""?`${t}${n}s`:`${t}${$}${n}${i}s`},c=(r=1)=>`${t}${r<=1?"":String(r)}@`,p=(r=1)=>`${t}${r<=1?"":String(r)}P`,u=(r=0)=>`${t}${String(r)}g`,h=r=>`${t}${String(r)}$u`,C=(r=1)=>`${t}${r<=1?"":String(r)}b`;export{u as clearTabStop,p as deleteCharacter,S as deleteLine,c as insertCharacter,g as insertLine,C as repeatPreviousCharacter,h as requestPresentationStateReport,a as setLeftRightMargins,s as setTopBottomMargins};
|
package/dist/scroll.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import{CSI as S}from"./constants.js";const t=(o=1)=>o===0?"":`${S}${o<=1?"":String(o)}S`,l=(o=1)=>o===0?"":`${S}${o<=1?"":String(o)}T`,n=`${S}S`,L=`${S}T`;export{L as SCROLL_DOWN_1,n as SCROLL_UP_1,l as scrollDown,t as scrollUp};
|
package/dist/sixel.d.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Wraps a pre-encoded Sixel `payload` in the Sixel graphics device-control
|
|
3
|
+
* string (`DCS … q … ST`).
|
|
4
|
+
*
|
|
5
|
+
* This is an emit-only helper: it does **not** encode pixel data into Sixel
|
|
6
|
+
* format, it only frames already-encoded Sixel data so it can be written to a
|
|
7
|
+
* Sixel-capable terminal. Pass a negative value for `aspectRatio`/`backgroundMode`
|
|
8
|
+
* to omit that parameter and a non-positive value for `gridSize` to omit it.
|
|
9
|
+
*
|
|
10
|
+
* Sequence: `DCS aspectRatio ; backgroundMode ; gridSize q payload ST`
|
|
11
|
+
* @param aspectRatio The pixel aspect ratio macro parameter (omitted when negative).
|
|
12
|
+
* @param backgroundMode The background color / transparency mode (omitted when negative).
|
|
13
|
+
* @param gridSize The grid size (omitted when not positive).
|
|
14
|
+
* @param payload The already-encoded Sixel data.
|
|
15
|
+
* @returns The Sixel `DCS` escape sequence.
|
|
16
|
+
* @see {@link https://vt100.net/docs/vt3xx-gp/chapter14.html}
|
|
17
|
+
*/
|
|
18
|
+
declare const sixelGraphics: (aspectRatio: number, backgroundMode: number, gridSize: number, payload: string) => string;
|
|
19
|
+
export { sixelGraphics as default };
|
package/dist/sixel.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{DCS as c,ST as e}from"./constants.js";const m=(t,$,r,i)=>{const n=t>=0?String(t):"",o=$>=0?String($):"",S=r>0?`;${String(r)}`:"";return`${c}${n};${o}${S}q${i}${e}`};export{m as default};
|
package/dist/status.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import{CSI as e,SEP as o,DCS as D,ST as $}from"./constants.js";class p{constructor(r){this.reportCode=r}reportCode;isDecReport=!1}class S{constructor(r){this.reportCode=r}reportCode;isDecReport=!0}const R=t=>new p(t),c=t=>new S(t),u=(...t)=>{if(t.length===0)return"";const r=t.some(a=>a.isDecReport),i=t.map(a=>a.reportCode.toString());let n=e;return r&&(n+="?"),`${n}${i.join(o)}n`},l=t=>u(t),v=`${e}6n`,x=`${e}?6n`,C=(t,r)=>{const i=Math.max(1,t),n=Math.max(1,r);return`${e}${i.toString()}${o}${n.toString()}R`},K=C,m=(t,r,i)=>{const n=Math.max(1,t),a=Math.max(1,r);let s=`${e}?`;return s+=n.toString()+o+a.toString(),i>0&&(s+=o+i.toString()),s+="R",s},T=m,g=`${e}>0q`,M=g,d=`${e}c`,L=d,N=(...t)=>t.length===0?"":`${e}?${t.join(o)}c`,P=`${e}>c`,U=P,k=(t,r,i=0)=>{const n=Math.max(0,t),a=Math.max(0,r),s=Math.max(0,i);return`${e}>${String(n)}${o}${String(a)}${o}${String(s)}c`},E=`${e}=c`,_=E,f=t=>`${D}!|${t}${$}`,O=`${e}0c`,j=`${e}>0c`,w=`${e}=0c`,q=R(5),I=u(q),V=`${e}0n`,X=`${e}3n`,y=c(15),z=u(y),B=`${e}?10n`,F=`${e}?11n`,G=`${e}?13n`,h=c(25),H=u(h),J=`${e}?20n`,Q=`${e}?21n`,A=c(26),W=u(A),Y=t=>`${e}?27${o}${t.toString()}n`,Z=`${e}?996n`,tt=t=>`${e}?997${o}${t?"1":"2"}n`;export{K as CPR,L as DA1,U as DA2,_ as DA3,T as DECXCPR,l as DSR,W as DSR_KeyboardLanguageDEC,z as DSR_PrinterStatusDEC,I as DSR_TerminalStatus,H as DSR_UDKStatusDEC,tt as LightDarkReport,Z as RequestLightDarkReport,g as RequestNameVersion,M as XTVERSION,R as createAnsiStatusReport,c as createDecStatusReport,C as cursorPositionReport,u as deviceStatusReport,m as extendedCursorPositionReport,Y as reportKeyboardLanguageDEC,N as reportPrimaryDeviceAttributes,G as reportPrinterNoPaperDEC,F as reportPrinterNotReadyDEC,B as reportPrinterReadyDEC,k as reportSecondaryDeviceAttributes,X as reportTerminalNotOK,V as reportTerminalOK,f as reportTertiaryDeviceAttributes,J as reportUDKLockedDEC,Q as reportUDKUnlockedDEC,v as requestCursorPositionReport,x as requestExtendedCursorPositionReport,A as requestKeyboardLanguageDEC,d as requestPrimaryDeviceAttributes,O as requestPrimaryDeviceAttributesParam0,y as requestPrinterStatusDEC,P as requestSecondaryDeviceAttributes,j as requestSecondaryDeviceAttributesParam0,q as requestTerminalStatus,E as requestTertiaryDeviceAttributes,w as requestTertiaryDeviceAttributesParam0,h as requestUDKStatusDEC};
|
package/dist/strip.d.ts
CHANGED
|
@@ -1,2 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Removes ANSI escape codes from a string.
|
|
3
|
+
*
|
|
4
|
+
* The implementation is a single linear pass over the input (O(n)) — it never
|
|
5
|
+
* relies on a backtracking regular expression, so it is safe to run on
|
|
6
|
+
* untrusted subprocess/log output without risking polynomial ReDoS on
|
|
7
|
+
* adversarial input (e.g. many unterminated `ESC ]` prefixes).
|
|
8
|
+
*
|
|
9
|
+
* Recognised sequences: CSI (`ESC [ ... final`, final byte `0x40`-`0x7e`),
|
|
10
|
+
* OSC (`ESC ] ... BEL` or terminated by ST, covering window titles and
|
|
11
|
+
* hyperlinks), string sequences DCS/SOS/PM/APC (`ESC P|X|^|_ ... ST`), and
|
|
12
|
+
* two-character escapes (`ESC` plus a single byte, e.g. `ESC 7`, `ESC c`).
|
|
13
|
+
* The 8-bit C1 single-byte introducers (`0x9b` CSI, `0x9d` OSC, `0x90` DCS,
|
|
14
|
+
* `0x98` SOS, `0x9e` PM, `0x9f` APC) are recognised as equivalents of their
|
|
15
|
+
* `ESC`-prefixed forms.
|
|
16
|
+
* @param input The string from which to remove ANSI escape codes.
|
|
17
|
+
* @returns The input string with all ANSI escape codes stripped.
|
|
18
|
+
* @example
|
|
19
|
+
* ```typescript
|
|
20
|
+
* import { strip } from "@visulima/ansi";
|
|
21
|
+
*
|
|
22
|
+
* const textWithAnsi = "\x1b[32mHello\x1b[0m";
|
|
23
|
+
* console.log(strip(textWithAnsi)); // "Hello"
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
1
26
|
declare const strip: (input: string) => string;
|
|
2
27
|
export { strip as default };
|
package/dist/strip.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const f=t=>t===155||t===157||t===144||t===152||t===158||t===159,s=(t,o)=>{for(let e=o;e<t.length;e+=1){const r=t.codePointAt(e);if(r>=64&&r<=126)return e}return-1},c=(t,o,e)=>{for(let r=o;r<t.length;r+=1){const i=t.codePointAt(r);if(i===156||e&&i===7)return r;if(i===27&&t.codePointAt(r+1)===92)return r+1}return-1},n=(t,o)=>{const e=t.codePointAt(o+1);return e===91?s(t,o+2):e===93?c(t,o+2,!0):e===80||e===88||e===94||e===95?c(t,o+2,!1):e!==void 0?o+1:-1},d=(t,o)=>{const e=t.codePointAt(o);return e===155?s(t,o+1):e===157?c(t,o+1,!0):e===144||e===152||e===158||e===159?c(t,o+1,!1):-1},A=t=>{if(t.includes(String.fromCodePoint(27)))return!0;for(let o=0;o<t.length;o+=1)if(f(t.codePointAt(o)))return!0;return!1},P=t=>{if(!A(t))return t;let o="",e=0,r=0;const{length:i}=t;for(;r<i;){const l=t.codePointAt(r);let u;if(l===27)u=n(t,r);else if(f(l))u=d(t,r);else{r+=1;continue}u===-1&&(u=i-1),o+=t.slice(e,r),e=u+1,r=u+1}return o+=t.slice(e),o};export{P as default};
|
package/dist/termcap.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import{DCS as n,ST as c,SEP as p}from"./constants.js";const s=e=>{let r="";for(const t of new TextEncoder().encode(e))r+=t.toString(16).toUpperCase().padStart(2,"0");return r},o=(...e)=>{if(e.length===0)return"";const r=e.map(t=>s(t));return`${n}+q${r.join(p)}${c}`},i=o,a=o;export{o as XTGETTCAP,i as requestTermcap,a as requestTerminfo};
|
package/dist/title.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import{OSC as e,ST as i,BEL as n,stripOscTerminators as o}from"./constants.js";const $=t=>{if(typeof t!="string")throw new TypeError("Title must be a string");return o(t)},r=t=>`${e}0;${$(t)}${n}`,T=t=>`${e}1;${$(t)}${n}`,c=t=>`${e}2;${$(t)}${n}`,d=t=>`${e}21;${$(t)}${i}`,m=t=>`${e}2L;${$(t)}${i}`,w=t=>`${e}0;${$(t)}${i}`,W=t=>`${e}1;${$(t)}${i}`,a=t=>`${e}2;${$(t)}${i}`;export{m as decsin,d as decswt,T as setIconName,r as setIconNameAndWindowTitle,w as setIconNameAndWindowTitleWithST,W as setIconNameWithST,c as setWindowTitle,a as setWindowTitleWithST};
|
package/dist/urxvt.d.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns a urxvt (rxvt-unicode) extension sequence (`OSC 777`).
|
|
3
|
+
*
|
|
4
|
+
* urxvt exposes Perl extensions through `OSC 777`, where the first parameter is
|
|
5
|
+
* the extension name followed by its arguments, e.g.
|
|
6
|
+
* `urxvtExtension("notify", "title", "body")`.
|
|
7
|
+
*
|
|
8
|
+
* Sequence: `OSC 777 ; extension ; param1 ; param2 ; … BEL`
|
|
9
|
+
* @param extension The extension name to invoke.
|
|
10
|
+
* @param parameters The extension parameters, joined with `;`.
|
|
11
|
+
* @returns The `OSC 777` escape sequence.
|
|
12
|
+
* @see {@link https://man.archlinux.org/man/urxvt.7}
|
|
13
|
+
*/
|
|
14
|
+
declare const urxvtExtension: (extension: string, ...parameters: string[]) => string;
|
|
15
|
+
export { urxvtExtension as default };
|
package/dist/urxvt.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{OSC as a,BEL as e,stripOscTerminators as o}from"./constants.js";const m=(r,...t)=>`${a}777;${o(r)};${t.map(s=>o(s)).join(";")}${e}`;export{m as default};
|