@visulima/ansi
Version:
ANSI escape codes for some terminal swag.
49 lines (44 loc) • 2.03 kB
JavaScript
;
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
const constants = require('./packem_shared/constants-BK26O-46.cjs');
var __defProp = Object.defineProperty;
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
const keyModifierOptions = /* @__PURE__ */ __name((resource, value) => {
if (resource < 0 || !Number.isInteger(resource)) {
return "";
}
const pp = resource.toString();
if (value !== void 0) {
if (!Number.isInteger(value)) {
return "";
}
const pv = value.toString();
return `${constants.CSI}>${pp};${pv}m`;
}
return `${constants.CSI}>${pp}m`;
}, "keyModifierOptions");
const XTMODKEYS = keyModifierOptions;
const queryKeyModifierOptions = /* @__PURE__ */ __name((resource) => {
if (resource < 0 || !Number.isInteger(resource)) {
return "";
}
const pp = resource.toString();
return `${constants.CSI}?${pp}m`;
}, "queryKeyModifierOptions");
const resetKeyModifierOptions = /* @__PURE__ */ __name((resource) => keyModifierOptions(resource), "resetKeyModifierOptions");
const setKeyModifierOptions = /* @__PURE__ */ __name((resource, value) => keyModifierOptions(resource, value), "setKeyModifierOptions");
const XTQMODKEYS = queryKeyModifierOptions;
const setModifyOtherKeys1 = `${constants.CSI}>4;1m`;
const setModifyOtherKeys2 = `${constants.CSI}>4;2m`;
const resetModifyOtherKeys = `${constants.CSI}>4m`;
const queryModifyOtherKeys = `${constants.CSI}?4m`;
exports.XTMODKEYS = XTMODKEYS;
exports.XTQMODKEYS = XTQMODKEYS;
exports.keyModifierOptions = keyModifierOptions;
exports.queryKeyModifierOptions = queryKeyModifierOptions;
exports.queryModifyOtherKeys = queryModifyOtherKeys;
exports.resetKeyModifierOptions = resetKeyModifierOptions;
exports.resetModifyOtherKeys = resetModifyOtherKeys;
exports.setKeyModifierOptions = setKeyModifierOptions;
exports.setModifyOtherKeys1 = setModifyOtherKeys1;
exports.setModifyOtherKeys2 = setModifyOtherKeys2;