diff --git a/types/blessed/blessed-tests.ts b/types/blessed/blessed-tests.ts index cf66035f543977..23a5167a65447f 100644 --- a/types/blessed/blessed-tests.ts +++ b/types/blessed/blessed-tests.ts @@ -832,6 +832,50 @@ const list = blessed.list({ list.setItems(["string1", "string2", "string3"]); +// https://github.com/chjj/blessed/blob/master/test/widget-log.js +// modified for testing purposes + +screen = blessed.screen({ + dump: __dirname + "/logs/logger.log", + smartCSR: true, + autoPadding: false, + warnings: true, +}); + +var logger = blessed.log({ + parent: screen, + top: "center", + left: "center", + width: "50%", + height: "50%", + border: "line", + tags: true, + keys: true, + vi: true, + mouse: true, + scrollback: 100, + scrollbar: { + ch: " ", + track: { + bg: "yellow", + }, + style: { + inverse: true, + }, + }, +}); + +logger.align = "right"; +logger.valign = "bottom"; + +logger.focus(); + +screen.key("q", function() { + return screen.destroy(); +}); + +screen.render(); + // https://github.com/chjj/blessed/blob/master/test/program-mouse.js const program = blessed.program({ diff --git a/types/blessed/index.d.ts b/types/blessed/index.d.ts index 254af51d0eacd5..7256d88dd0f78f 100644 --- a/types/blessed/index.d.ts +++ b/types/blessed/index.d.ts @@ -3073,6 +3073,12 @@ export namespace Widgets { */ scrollOnInput: boolean; + /** + * Content/Text alignment + */ + align: "left" | "center" | "right"; + valign: "top" | "middle" | "bottom"; + /** * add a log line. */ diff --git a/types/bun/package.json b/types/bun/package.json index 8f9838d449064b..b5476efab26d71 100644 --- a/types/bun/package.json +++ b/types/bun/package.json @@ -6,7 +6,7 @@ "https://bun.com" ], "dependencies": { - "bun-types": "1.3.2" + "bun-types": "1.3.3" }, "devDependencies": { "@types/bun": "workspace:." diff --git a/types/karma-html2js-preprocessor/.npmignore b/types/karma-html2js-preprocessor/.npmignore new file mode 100644 index 00000000000000..93e307400a5456 --- /dev/null +++ b/types/karma-html2js-preprocessor/.npmignore @@ -0,0 +1,5 @@ +* +!**/*.d.ts +!**/*.d.cts +!**/*.d.mts +!**/*.d.*.ts diff --git a/types/karma-html2js-preprocessor/index.d.ts b/types/karma-html2js-preprocessor/index.d.ts new file mode 100644 index 00000000000000..5d6f3632a422ab --- /dev/null +++ b/types/karma-html2js-preprocessor/index.d.ts @@ -0,0 +1,40 @@ +import "karma"; + +declare module "karma" { + interface ConfigOptions { + /** + * see {@link https://github.com/karma-runner/karma-html2js-preprocessor#configuration} + */ + html2JsPreprocessor?: HTML2JSPreprocessorOptions | undefined; + } + + interface HTML2JSPreprocessorOptions { + /** + * Strip this from the file path + * + * @default '' + */ + stripPrefix?: string | undefined; + + /** + * Prepend this to the file path + * + * @default '' + */ + prependPrefix?: string | undefined; + + /** + * Define a custom transform function + */ + processPath?: (filePath: string) => string; + } +} + +declare global { + interface Window { + /** + * Collection of HTML files converted into JS strings by karma-html2js-preprocessor. + */ + __html__: Record; + } +} diff --git a/types/karma-html2js-preprocessor/karma-html2js-preprocessor-tests.ts b/types/karma-html2js-preprocessor/karma-html2js-preprocessor-tests.ts new file mode 100644 index 00000000000000..b537bce77be38f --- /dev/null +++ b/types/karma-html2js-preprocessor/karma-html2js-preprocessor-tests.ts @@ -0,0 +1,24 @@ +import karma = require("karma"); + +// Mocha reporter options tests +const mochaReporter: karma.HTML2JSPreprocessorOptions = { + stripPrefix: "strip", + prependPrefix: "prepend", + processPath: (filePath) => filePath, +}; + +module.exports = (config: karma.Config) => { + config.set({ + preprocessors: { + "**/*.json": ["json"], + }, + files: ["**/*.js", "**/*.json"], + html2JsPreprocessor: { + stripPrefix: "strip", + prependPrefix: "$json", + processPath: (filePath) => filePath, + }, + }); +}; + +window.__html__["fixture"]; diff --git a/types/karma-html2js-preprocessor/package.json b/types/karma-html2js-preprocessor/package.json new file mode 100644 index 00000000000000..d936f51d726ac2 --- /dev/null +++ b/types/karma-html2js-preprocessor/package.json @@ -0,0 +1,20 @@ +{ + "private": true, + "name": "@types/karma-html2js-preprocessor", + "version": "1.1.9999", + "projects": [ + "https://github.com/karma-runner/karma-html2js-preprocessor#readme" + ], + "dependencies": { + "@types/karma": "*" + }, + "devDependencies": { + "@types/karma-html2js-preprocessor": "workspace:." + }, + "owners": [ + { + "name": "Ivan Nikolić", + "githubUsername": "niksy" + } + ] +} diff --git a/types/karma-html2js-preprocessor/tsconfig.json b/types/karma-html2js-preprocessor/tsconfig.json new file mode 100644 index 00000000000000..369e4d6ca985f0 --- /dev/null +++ b/types/karma-html2js-preprocessor/tsconfig.json @@ -0,0 +1,20 @@ +{ + "compilerOptions": { + "module": "node16", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictFunctionTypes": true, + "strictNullChecks": true, + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "karma-html2js-preprocessor-tests.ts" + ] +} diff --git a/types/leo-profanity/package.json b/types/leo-profanity/package.json index 3cf3fea341769a..27d6928ab46388 100644 --- a/types/leo-profanity/package.json +++ b/types/leo-profanity/package.json @@ -8,10 +8,5 @@ "devDependencies": { "@types/leo-profanity": "workspace:." }, - "owners": [ - { - "name": "Jack Humphries", - "githubUsername": "jackhumphries9" - } - ] + "owners": [] } diff --git a/types/micro-cors/package.json b/types/micro-cors/package.json index 107e924d6ab0b0..27a483af772a90 100644 --- a/types/micro-cors/package.json +++ b/types/micro-cors/package.json @@ -12,10 +12,6 @@ "@types/micro-cors": "workspace:." }, "owners": [ - { - "name": "Callum Denby", - "githubUsername": "CallumDenby" - }, { "name": "ChanYong Moon", "githubUsername": "moonchanyong" diff --git a/types/systemjs/package.json b/types/systemjs/package.json index 2ff025586188dd..ae3f6cbbe78245 100644 --- a/types/systemjs/package.json +++ b/types/systemjs/package.json @@ -8,10 +8,5 @@ "devDependencies": { "@types/systemjs": "workspace:." }, - "owners": [ - { - "name": "Jolyn Denning", - "githubUsername": "jolyndenning" - } - ] + "owners": [] }