diff --git a/notNeededPackages.json b/notNeededPackages.json index 40ede9b00d1ff1..d560783ad06e85 100644 --- a/notNeededPackages.json +++ b/notNeededPackages.json @@ -1012,6 +1012,10 @@ "libraryName": "cli-truncate", "asOfVersion": "2.0.0" }, + "cli-welcome": { + "libraryName": "cli-welcome", + "asOfVersion": "3.0.0" + }, "clipboard": { "libraryName": "clipboard", "asOfVersion": "2.0.7" @@ -2749,6 +2753,10 @@ "libraryName": "http-terminator", "asOfVersion": "3.0.0" }, + "httpsnippet": { + "libraryName": "httpsnippet", + "asOfVersion": "3.0.1" + }, "human-object-diff": { "libraryName": "human-object-diff", "asOfVersion": "3.0.0" @@ -4825,6 +4833,10 @@ "libraryName": "package-json-validator", "asOfVersion": "0.8.0" }, + "package-name-regex": { + "libraryName": "package-name-regex", + "asOfVersion": "3.1.0" + }, "pad": { "libraryName": "pad", "asOfVersion": "2.1.0" @@ -6523,6 +6535,10 @@ "libraryName": "@simonwep/selection-js", "asOfVersion": "1.7.0" }, + "simple-datatables": { + "libraryName": "simple-datatables", + "asOfVersion": "6.0.0" + }, "simple-diff": { "libraryName": "simple-diff", "asOfVersion": "1.7.0" @@ -7147,6 +7163,10 @@ "libraryName": "tiny-secp256k1", "asOfVersion": "2.0.0" }, + "tinymce": { + "libraryName": "tinymce", + "asOfVersion": "5.5.0" + }, "title": { "libraryName": "title", "asOfVersion": "4.0.0" diff --git a/types/cli-welcome/.npmignore b/types/cli-welcome/.npmignore deleted file mode 100644 index 93e307400a5456..00000000000000 --- a/types/cli-welcome/.npmignore +++ /dev/null @@ -1,5 +0,0 @@ -* -!**/*.d.ts -!**/*.d.cts -!**/*.d.mts -!**/*.d.*.ts diff --git a/types/cli-welcome/cli-welcome-tests.ts b/types/cli-welcome/cli-welcome-tests.ts deleted file mode 100644 index eac930c23ab0bd..00000000000000 --- a/types/cli-welcome/cli-welcome-tests.ts +++ /dev/null @@ -1,16 +0,0 @@ -// Tests -import welcome = require("cli-welcome"); - -// Use it. -welcome({ title: `Welcome CLI`, tagLine: `by Ahmad Awais` }); - -// OR with all the options set like this: -welcome({ - title: `Welcome CLI`, - tagLine: `by Ahmad Awais`, - bgColor: `#FADC00`, - color: `#000000`, - bold: true, - clear: true, - version: `v1.0`, -}); diff --git a/types/cli-welcome/index.d.ts b/types/cli-welcome/index.d.ts deleted file mode 100644 index 88a7e47a58bd83..00000000000000 --- a/types/cli-welcome/index.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -interface WelcomeOptions { - title: string; - tagLine: string; - description?: string; - version?: string; - bgColor?: string; - color?: string; - clear?: boolean; - bold?: boolean; -} - -declare function welcome(options: WelcomeOptions): void; - -export = welcome; diff --git a/types/cli-welcome/package.json b/types/cli-welcome/package.json deleted file mode 100644 index 5c2395dddc3399..00000000000000 --- a/types/cli-welcome/package.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "private": true, - "name": "@types/cli-welcome", - "version": "2.2.9999", - "projects": [ - "https://github.com/ahmadawais/cli-welcome" - ], - "devDependencies": { - "@types/cli-welcome": "workspace:." - }, - "owners": [ - { - "name": "Max Programming", - "githubUsername": "max-programming" - } - ] -} diff --git a/types/cli-welcome/tsconfig.json b/types/cli-welcome/tsconfig.json deleted file mode 100644 index aeca80761e441a..00000000000000 --- a/types/cli-welcome/tsconfig.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "compilerOptions": { - "module": "node16", - "lib": [ - "es6" - ], - "noImplicitAny": true, - "noImplicitThis": true, - "strictFunctionTypes": true, - "strictNullChecks": true, - "types": [], - "noEmit": true, - "forceConsistentCasingInFileNames": true - }, - "files": [ - "index.d.ts", - "cli-welcome-tests.ts" - ] -} diff --git a/types/httpsnippet/.npmignore b/types/httpsnippet/.npmignore deleted file mode 100644 index 93e307400a5456..00000000000000 --- a/types/httpsnippet/.npmignore +++ /dev/null @@ -1,5 +0,0 @@ -* -!**/*.d.ts -!**/*.d.cts -!**/*.d.mts -!**/*.d.*.ts diff --git a/types/httpsnippet/httpsnippet-tests.ts b/types/httpsnippet/httpsnippet-tests.ts deleted file mode 100644 index 14940ed6111206..00000000000000 --- a/types/httpsnippet/httpsnippet-tests.ts +++ /dev/null @@ -1,15 +0,0 @@ -import HTTPSnippet = require("httpsnippet"); - -const snippet = new HTTPSnippet({ - method: "POST", - url: "https://asd", - httpVersion: "2.0", - cookies: [], - headers: [], - bodySize: 0, - headersSize: 12, - queryString: [], -}); - -// $ExpectType string | false -snippet.convert("c", "libcurl"); diff --git a/types/httpsnippet/index.d.ts b/types/httpsnippet/index.d.ts deleted file mode 100644 index 52698a8ace7c09..00000000000000 --- a/types/httpsnippet/index.d.ts +++ /dev/null @@ -1,52 +0,0 @@ -import { Har, Request } from "har-format"; - -/*~ This declaration specifies that the class constructor function - *~ is the exported object from the file - */ -export = HTTPSnippet; - -/*~ Write your module's methods and properties in this class */ -declare class HTTPSnippet { - constructor(data: HTTPSnippet.Data); - - convert(target: string, options?: HTTPSnippet.Options): string | false; - - convert(target: string, client?: string, options?: HTTPSnippet.Options): string | false; - - static addTarget(target: HTTPSnippet.Target): void; - - static addTargetClient(target: string, client: HTTPSnippet.TargetClient): void; - - static availableTargets: string[]; - - static extName(target: string): string; -} - -declare namespace HTTPSnippet { - type Data = Har | Request; - - type Options = object; - - interface TargetClientInfo { - key: string; - title: string; - link?: string | undefined; - description?: string | undefined; - } - - interface TargetClient { - (source: Request, options: Options): string; - info: TargetClientInfo; - } - - interface TargetInfo { - key: string; - title: string; - extname: string; - default: C; - } - - type Target = { - info: TargetInfo; - } & Record; -} diff --git a/types/httpsnippet/package.json b/types/httpsnippet/package.json deleted file mode 100644 index 74201f50f11dee..00000000000000 --- a/types/httpsnippet/package.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "private": true, - "name": "@types/httpsnippet", - "version": "1.23.9999", - "projects": [ - "https://github.com/Kong/httpsnippet" - ], - "dependencies": { - "@types/har-format": "*" - }, - "devDependencies": { - "@types/httpsnippet": "workspace:." - }, - "owners": [ - { - "name": "Marcell Toth", - "githubUsername": "marcelltoth" - } - ] -} diff --git a/types/httpsnippet/tsconfig.json b/types/httpsnippet/tsconfig.json deleted file mode 100644 index 72723d4ca0055b..00000000000000 --- a/types/httpsnippet/tsconfig.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "compilerOptions": { - "module": "node16", - "lib": [ - "es6" - ], - "noImplicitAny": true, - "noImplicitThis": true, - "strictFunctionTypes": true, - "strictNullChecks": true, - "types": [], - "noEmit": true, - "forceConsistentCasingInFileNames": true - }, - "files": [ - "index.d.ts", - "httpsnippet-tests.ts" - ] -} diff --git a/types/package-name-regex/.npmignore b/types/package-name-regex/.npmignore deleted file mode 100644 index 93e307400a5456..00000000000000 --- a/types/package-name-regex/.npmignore +++ /dev/null @@ -1,5 +0,0 @@ -* -!**/*.d.ts -!**/*.d.cts -!**/*.d.mts -!**/*.d.*.ts diff --git a/types/package-name-regex/index.d.ts b/types/package-name-regex/index.d.ts deleted file mode 100644 index ee2aaafb583143..00000000000000 --- a/types/package-name-regex/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -declare const packageNameRegex: RegExp; - -export = packageNameRegex; diff --git a/types/package-name-regex/package-name-regex-tests.ts b/types/package-name-regex/package-name-regex-tests.ts deleted file mode 100644 index a6ee49500b44b9..00000000000000 --- a/types/package-name-regex/package-name-regex-tests.ts +++ /dev/null @@ -1,4 +0,0 @@ -import packageNameRegex = require("package-name-regex"); - -// $ExpectType RegExp -packageNameRegex; diff --git a/types/package-name-regex/package.json b/types/package-name-regex/package.json deleted file mode 100644 index a02251f8cf06dc..00000000000000 --- a/types/package-name-regex/package.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "private": true, - "name": "@types/package-name-regex", - "version": "2.0.9999", - "projects": [ - "https://github.com/dword-design/package-name-regex#readme" - ], - "devDependencies": { - "@types/package-name-regex": "workspace:." - }, - "owners": [ - { - "name": "Rajas Paranjpe", - "githubUsername": "ChocolateLoverRaj" - } - ] -} diff --git a/types/package-name-regex/tsconfig.json b/types/package-name-regex/tsconfig.json deleted file mode 100644 index 9b4599221074f8..00000000000000 --- a/types/package-name-regex/tsconfig.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "compilerOptions": { - "module": "node16", - "lib": [ - "es6" - ], - "types": [], - "noImplicitAny": true, - "noImplicitThis": true, - "strictNullChecks": true, - "strictFunctionTypes": true, - "noEmit": true, - "forceConsistentCasingInFileNames": true - }, - "files": [ - "index.d.ts", - "package-name-regex-tests.ts" - ] -} diff --git a/types/react-mce/package.json b/types/react-mce/package.json index 0ffa643bc94d0d..dcbed874257977 100644 --- a/types/react-mce/package.json +++ b/types/react-mce/package.json @@ -7,7 +7,7 @@ ], "dependencies": { "@types/react": "*", - "@types/tinymce": "*" + "@types/tinymce": "<5" }, "devDependencies": { "@types/react-mce": "workspace:." diff --git a/types/simple-datatables/.npmignore b/types/simple-datatables/.npmignore deleted file mode 100644 index 93e307400a5456..00000000000000 --- a/types/simple-datatables/.npmignore +++ /dev/null @@ -1,5 +0,0 @@ -* -!**/*.d.ts -!**/*.d.cts -!**/*.d.mts -!**/*.d.*.ts diff --git a/types/simple-datatables/index.d.ts b/types/simple-datatables/index.d.ts deleted file mode 100644 index 4202f6a9fcc073..00000000000000 --- a/types/simple-datatables/index.d.ts +++ /dev/null @@ -1,160 +0,0 @@ -export type DataTableOrderDirection = "asc" | "desc"; -export type DataTableColumnType = "string" | "number" | "date"; - -export interface DataTableOptions { - columns?: DataTableColumnOptions[]; - data?: any; // TODO: define data - firstLast?: boolean; - firstText?: string; - fixedColumns?: boolean; - fixedHeight?: boolean; - footer?: boolean; - header?: boolean; - hiddenHeader?: boolean; - labels?: DataTableLabels; - layout?: DataTableLayout; - lastText?: string; - nextPrev?: boolean; - nextText?: string; - paging?: boolean; - perPage?: number; - perPageSelect?: number[]; - prevText?: string; - scrollY?: string; - searchable?: boolean; - sortable?: boolean; - truncatePager?: boolean; -} - -export interface DataTableColumnOptions { - select: number | number[]; - sort?: DataTableOrderDirection; - sortable?: boolean; - hidden?: boolean; - type?: DataTableColumnType; - format?: string; - render?: (data: string, cell: HTMLTableCellElement, row: DataTableRow) => string; -} - -// TODO: some of the attributes only exist depending on the type selected -export interface DataTableExportOptions { - type: "csv" | "txt" | "json" | "sql"; - download?: boolean; - filename?: string; - selection?: number | number[]; - skipColumn?: number[]; - // csv - lineDelimiter?: string; - columnDelimiter?: string; - // sql - tableName?: string; - // json - replacer?: (this: any, key: string, value: any) => any; - space?: number; -} - -// TODO: some of the attributes only exist depending on the type selected -export interface DataTableImportOptions { - type: "csv" | "json"; - data: string; - // csv only - headings?: boolean; - lineDelimiter?: string; - columnDelimiter?: string; -} - -export interface DataTableLabels { - placeholder?: string; - perPage?: string; - noRows?: string; - info?: string; -} - -export interface DataTableLayout { - top?: string; - bottom?: string; -} - -export interface DataTableColumn { - heading: string; - data: string[]; - sortable?: boolean; - type?: DataTableColumnType; - format?: string; -} - -export class DataTableRow extends HTMLTableRowElement { - dataIndex: number; -} - -export class DataTableRows { - add(data: string[] | string[][]): void; - remove(select: number | number[]): void; -} - -export class DataTableColumns { - sort(column: number, direction: DataTableOrderDirection): void; - add(data: DataTableColumn): void; - remove(select: number | number[]): void; - hide(select: number | number[]): void; - show(select: number | number[]): void; - visible(): boolean | boolean[]; - visible(select: number | number[]): void; - /** @deprecated */ - hidden(select: number | number[]): void; - swap(indexes: number[]): void; - order(indexes: number[]): void; -} - -export class DataTablePlugin { - constructor(); - init(): void; -} - -export class DataTable { - table: HTMLTableElement; - head: HTMLElement; - body: HTMLElement; - foot: HTMLElement; - wrapper: HTMLDivElement; - container: HTMLDivElement; - pagers: []; // TODO: array of what ? - headings: HTMLCollection; // TODO: array of what ? - options: DataTableOptions; - initialized: boolean; - data: DataTableRow[]; - dataIndex: number; - activeRows: []; // TODO: array of what ? - pages: []; // TODO: array of what ? - hasRows: boolean; - hasHeadings: boolean; - currentPage: number; - totalPages: number; - onFirstPage: boolean; - onLastPage: boolean; - searching: boolean; - searchData: DataTableRow[]; - - constructor(table: string | Element, options?: DataTableOptions); - - static extend(pluginName: string, callback: (options: DataTableOptions) => DataTablePlugin): void; - - on(event: "datatable.init" | "datatable.refresh" | "datatable.update", callback: () => void): void; - on(event: "datatable.page", callback: (page: number) => void): void; - on(event: "datatable.sort", callback: (column: number, direction: DataTableOrderDirection) => void): void; - on(event: "datatable.perpage", callback: (perpage: number) => void): void; - on(event: "datatable.search", callback: (query: string, matched: DataTableRow[]) => void): void; - - rows(): DataTableRows; - columns(): DataTableColumns; - refresh(): void; - page(pageNumber: number): void; - insert(data: any): void; // TODO: define data - setMessage(message: string): void; - destroy(): void; - init(options?: DataTableOptions): void; - export(options: DataTableExportOptions): boolean; - import(options: DataTableImportOptions): boolean; - /** @deprecated */ - print(): void; -} diff --git a/types/simple-datatables/package.json b/types/simple-datatables/package.json deleted file mode 100644 index dae3cc8e01ddfb..00000000000000 --- a/types/simple-datatables/package.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "private": true, - "name": "@types/simple-datatables", - "version": "3.2.9999", - "projects": [ - "https://github.com/fiduswriter/Simple-DataTables" - ], - "devDependencies": { - "@types/simple-datatables": "workspace:." - }, - "owners": [ - { - "name": "Jonatas de Moraes Junior", - "githubUsername": "Honatas" - } - ] -} diff --git a/types/simple-datatables/simple-datatables-tests.ts b/types/simple-datatables/simple-datatables-tests.ts deleted file mode 100644 index 1e7849adeca5a2..00000000000000 --- a/types/simple-datatables/simple-datatables-tests.ts +++ /dev/null @@ -1,149 +0,0 @@ -import { DataTable, DataTableRow } from "simple-datatables"; - -// ------- -// Options -// ------- -const datatable = new DataTable("#myTable", { - columns: [ - { select: 1, sort: "asc" }, - { select: 2, type: "date", format: "DD/MM/YYYY" }, - { select: [3, 4], sortable: false }, - { select: 5, hidden: true }, - { - select: 6, - render: (data, cell, row) => { - return `${data}`; - }, - }, - ], - firstLast: false, - firstText: "«", - fixedColumns: true, - fixedHeight: false, - footer: false, - header: true, - hiddenHeader: false, - labels: { - placeholder: "Search...", - perPage: "{select} entries per page", - noRows: "No entries to found", - info: "Showing {start} to {end} of {rows} entries", - }, - layout: { - top: "{select}{search}", - bottom: "{info}{pager}", - }, - lastText: "»", - nextPrev: true, - nextText: "›", - paging: true, - perPage: 10, - perPageSelect: [5, 10, 15, 20, 25], - prevText: "‹", - scrollY: "", - searchable: true, - sortable: true, - truncatePager: true, -}); - -// ------ -// Events -// ------ -datatable.on("datatable.init", () => {}); -datatable.on("datatable.page", page => {}); -datatable.on("datatable.sort", (column, direction) => {}); -datatable.on("datatable.perpage", perpage => {}); -datatable.on("datatable.search", (query, matched) => {}); - -// ---- -// Rows -// ---- -datatable.rows().add(["column1", "column2", "column3", "column4"]); -datatable.rows().add([ - ["column1", "column2", "column3", "column4"], - ["column1", "column2", "column3", "column4"], - ["column1", "column2", "column3", "column4"], - ["column1", "column2", "column3", "column4"], -]); -datatable.rows().remove(5); -datatable.rows().remove([0, 1, 2, 3, 4]); -datatable.rows().remove(new DataTableRow().dataIndex); - -// ------- -// Columns -// ------- -datatable.columns().add({ - heading: "Column Heading", - data: ["Value 1", "Value 2", "Value 3"], -}); -datatable.columns().add({ - type: "date", - format: "YYYY/MM/DD", - heading: "Start Date", - data: ["1999/10/25", "2000/05/12", "2003/08/01"], -}); -datatable.columns().remove(3); -datatable.columns().remove([0, 1]); -datatable.columns().remove(datatable.headings.length - 1); -datatable.columns().hide([0, 1]); -datatable.columns().show([0, 1]); -datatable.columns().visible(3); -datatable.columns().visible([0, 1, 2, 3]); -datatable.columns().visible(); -datatable.columns().swap([0, 5]); -datatable.columns().order([1, 3, 4, 2, 0]); - -// ----------- -// Rest of API -// ----------- -datatable.refresh(); -datatable.page(1); -datatable.insert([ - { - "Heading 1": "Cell 1", - "Heading 2": "Cell 2", - "Heading 3": "Cell 3", - "Heading 4": "Cell 4", - }, - { - "Heading 1": "Cell 5", - "Heading 2": "Cell 6", - "Heading 3": "Cell 7", - "Heading 4": "Cell 8", - }, -]); -datatable.insert({ - headings: ["Name", "Position", "Town", "Ext.", "Start Date", "Salary"], - data: [ - ["Cedric Kelly", "Senior Javascript Developer", "Edinburgh", "6224", "2012/03/29", "$433,060"], - ["Airi Satou", "Accountant", "Tokyo", "5407", "2008/11/28", "$162,700"], - ], -}); -datatable.setMessage("message"); -datatable.destroy(); -datatable.init({}); -datatable.export({ - type: "csv", - filename: "my-csv-file", - selection: datatable.currentPage, -}); -datatable.export({ - type: "sql", - tableName: "sql_users", - selection: [1, 2, 3, 4, 5], -}); -datatable.export({ - type: "json", -}); -datatable.export({ - type: "json", - skipColumn: [0, 2, 4], - download: false, -}); -datatable.import({ - type: "csv", - data: "Heading 1,Heading 2,Heading 3|Value 1,Value 2,Value 3|Value 4,Value 5,Value 6", - headings: true, - lineDelimiter: "|", - columnDelimiter: ",", -}); diff --git a/types/simple-datatables/tsconfig.json b/types/simple-datatables/tsconfig.json deleted file mode 100644 index 06c4b25194f47f..00000000000000 --- a/types/simple-datatables/tsconfig.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "compilerOptions": { - "module": "node16", - "lib": [ - "es2018", - "dom" - ], - "noImplicitAny": true, - "noImplicitThis": true, - "strictFunctionTypes": true, - "strictNullChecks": true, - "types": [], - "noEmit": true, - "forceConsistentCasingInFileNames": true - }, - "files": [ - "index.d.ts", - "simple-datatables-tests.ts" - ] -} diff --git a/types/tinymce/.eslintrc.json b/types/tinymce/.eslintrc.json deleted file mode 100644 index 0ef1734492af0c..00000000000000 --- a/types/tinymce/.eslintrc.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "rules": { - "@definitelytyped/no-unnecessary-generics": "off", - "@typescript-eslint/no-empty-interface": "off" - } -} diff --git a/types/tinymce/.npmignore b/types/tinymce/.npmignore deleted file mode 100644 index 93e307400a5456..00000000000000 --- a/types/tinymce/.npmignore +++ /dev/null @@ -1,5 +0,0 @@ -* -!**/*.d.ts -!**/*.d.cts -!**/*.d.mts -!**/*.d.*.ts diff --git a/types/tinymce/index.d.ts b/types/tinymce/index.d.ts deleted file mode 100644 index 3b82841d4c25e0..00000000000000 --- a/types/tinymce/index.d.ts +++ /dev/null @@ -1,1498 +0,0 @@ -// Work In Progress - -/// - -export const DOM: dom.DOMUtils; - -export const PluginManager: AddOnManager; - -export const ScriptLoader: dom.ScriptLoader; - -export const ThemeManager: AddOnManager; - -export const EditorManager: EditorManager; - -export const baseURL: string; - -export const activeEditor: Editor; - -export function create(s: string, p: {}, root?: {}): void; - -export function createNS(n: string, o: {}): {}; - -export function each(o: {}, cb: () => void, s?: {}): void; - -export function explode(s: string, d: string): void; - -export function grep(a: any[], f: () => void): any[]; - -export function inArray(item: any, arr: any[]): number; - -export function is(obj: {}, type?: string): boolean; - -export function isArray(obj: {}): boolean; - -export function makeMap(items: any[], delim?: string, map?: {}): {}; - -export function map(array: any[], callback: () => void): any[]; - -export function resolve(n: string, o?: {}): {}; - -export function toArray(obj: {}): any[]; - -export function trim(s: string): string; - -export function walk(o: {}, f: () => void, n?: string, s?: string): void; - -export function init(settings: Settings): void; - -export function triggerSave(): void; - -export function get(id: string | number): Editor; - -export interface Settings { - base_url?: string | undefined; - - table_toolbar?: string | undefined; - - table_appearance_options?: boolean | undefined; - - table_clone_elements?: string | undefined; - - table_grid?: boolean | undefined; - - table_tab_navigation?: boolean | undefined; - - table_default_attributes?: object | string | undefined; - - table_default_styles?: object | string | undefined; - - table_sizing_mode?: "fixed" | "relative" | "responsive" | "auto" | undefined; - - table_class_list?: object[] | undefined; - - table_cell_class_list?: object[] | undefined; - - table_row_class_list?: object[] | undefined; - - table_advtab?: boolean | undefined; - - table_cell_advtab?: boolean | undefined; - - table_row_advtab?: boolean | undefined; - - table_resize_bars?: boolean | undefined; - - table_style_by_css?: boolean | undefined; - - auto_focus?: string | undefined; - - cache_suffix?: string | undefined; - - content_security_policy?: string | undefined; - - external_plugins?: {} | undefined; - - hidden_input?: boolean | undefined; - - paste_data_images?: boolean | undefined; - - paste_as_text?: boolean | undefined; - - paste_enable_default_filters?: boolean | undefined; - - paste_filter_drop?: boolean | undefined; - - paste_preprocess?(plugin: any, args: any): void; - - paste_postprocess?(plugin: any, args: any): void; - - paste_word_valid_elements?: string | undefined; - - paste_webkit_styles?: string | undefined; - - paste_retain_style_properties?: string | undefined; - - paste_merge_formats?: boolean | undefined; - - paste_convert_word_fake_lists?: boolean | undefined; - - paste_remove_styles_if_webkit?: boolean | undefined; - - pagebreak_separator?: string | undefined; - - pagebreak_split_block?: boolean | undefined; - - advlist_number_styles?: string | undefined; - - init_instance_callback?(editor: Editor): void; - - plugins?: string | string[] | undefined; - - selector?: string | undefined; - - setup?(edtor: Editor): void; - - target?: Element | undefined; - - branding?: boolean | undefined; - - color_picker_callback?(callback: (hexColor: string) => void, value: string): void; - - custom_ui_selector?: string | undefined; - - elementpath?: boolean | undefined; - - event_root?: boolean | undefined; - - fixed_toolbar_container?: string | undefined; - - height?: number | string | undefined; - - inline?: boolean | undefined; - - insert_button_items?: string | undefined; - - insert_toolbar?: string | undefined; - - max_height?: number | undefined; - - max_width?: number | undefined; - - menu?: settings.Menu | undefined; - - menubar?: string | boolean | undefined; - - min_height?: number | string | undefined; - - min_width?: number | string | undefined; - - preview_styles?: boolean | string | undefined; - - removed_menuitems?: string | undefined; - - resize?: boolean | string | undefined; - - selection_toolbar?: string | undefined; - - skin_url?: string | undefined; - - skin?: false | string | undefined; - - statusbar?: boolean | undefined; - - theme_url?: string | undefined; - - theme?: string | undefined; - - toolbar?: boolean | string | string[] | undefined; - - width?: number | string | undefined; - - body_class?: string | undefined; - - body_id?: string | undefined; - - content_css?: string | string[] | undefined; - - content_style?: string | undefined; - - inline_boundaries?: boolean | undefined; - - inline_boundaries_selector?: boolean | undefined; - - visual_anchor_class?: string | undefined; - - visual_table_class?: string | undefined; - - visual?: boolean | undefined; - - allow_conditional_comments?: boolean | undefined; - - allow_html_in_named_anchor?: boolean | undefined; - - allow_unsafe_link_target?: boolean | undefined; - - convert_fonts_to_spans?: boolean | undefined; - - custom_elements?: string | undefined; - - doctype?: string | undefined; - - element_format?: string | undefined; - - encoding?: string | undefined; - - entities?: string | undefined; - - entity_encoding?: string | undefined; - - extended_valid_elements?: string | undefined; - - fix_list_elements?: boolean | undefined; - - force_hex_style_colors?: boolean | undefined; - - forced_root_block?: string | undefined; - - forced_root_block_attrs?: {} | undefined; - - invalid_elements?: string | undefined; - - invalid_styles?: string | {} | undefined; - - keep_styles?: boolean | undefined; - - protect?: RegExp[] | undefined; - - remove_trailing_brs?: boolean | undefined; - - schema?: string | undefined; - - valid_children?: string | undefined; - - valid_classes?: string | {} | undefined; - - valid_elements?: string | undefined; - - valid_styles?: {} | undefined; - - block_formats?: string | undefined; - - font_formats?: string | undefined; - - fontsize_formats?: string | undefined; - - formats?: {} | undefined; - - removeFormat?: Array<{}> | undefined; - - indentation?: string | undefined; - - style_formats?: Array<{}> | undefined; - - style_formats_autohide?: boolean | undefined; - - style_formats_merge?: boolean | undefined; - - browser_spellcheck?: boolean | undefined; - - gecko_spellcheck?: boolean | undefined; - - automatic_uploads?: boolean | undefined; - - file_browser_callback?(field_name: string, url: string, type: string, win: Window): void; - - file_browser_callback_types?: string | undefined; - - file_picker_callback?(callback: (filename: string, metadata: {}) => void, valud: string, meta: {}): void; - - file_picker_types?: string | undefined; - - images_dataimg_filter?(img: HTMLImageElement): void; - - images_reuse_filename?: boolean | undefined; - - images_upload_base_path?: string | undefined; - - images_upload_credentials?: boolean | undefined; - - images_upload_handler?(blobInfo: any, success: (msg: string) => void, failure: (msg: string) => void): void; - - images_upload_url?: string | undefined; - - directionality?: string | undefined; - - language?: string | undefined; - - language_url?: string | undefined; - - allow_script_urls?: boolean | undefined; - - convert_urls?: boolean | undefined; - - document_base_url?: string | undefined; - - relative_urls?: boolean | undefined; - - remove_script_host?: boolean | undefined; - - urlconverter_callback?(url: string, node: HTMLElement, on_save: boolean, name: string): void; - - anchor_bottom?: string | undefined; - - anchor_top?: string | undefined; - - br_in_pre?: boolean | undefined; - - custom_undo_redo_levels?: number | undefined; - - end_container_on_empty_block?: boolean | undefined; - - nowrap?: boolean | undefined; - - object_resizing?: boolean | string | undefined; - - type_ahead_urls?: boolean | undefined; - - autosave_ask_before_unload?: boolean | undefined; - - autosave_interval?: string | undefined; - - autosave_prefix?: string | undefined; - - autosave_restore_when_empty?: boolean | undefined; - - autosave_retention?: string | undefined; - - imagetools_cors_hosts?: string[] | undefined; - - imagetools_proxy?: string | undefined; - - imagetools_toolbar?: string | undefined; - - imagetools_api_key?: string | undefined; - - spellchecker_rpc_url?: string | undefined; - - spellchecker_language?: string | undefined; - - spellchecker_languages?: string | undefined; - - spellchecker_dialog?: boolean | undefined; - - spellchecker_whitelist?: string[] | undefined; - - spellchecker_on_load?: boolean | undefined; - - spellchecker_active?: boolean | undefined; -} - -export namespace settings { - interface Menu { - file?: MenuItem | undefined; - edit?: MenuItem | undefined; - insert?: MenuItem | undefined; - view?: MenuItem | undefined; - format?: MenuItem | undefined; - table?: MenuItem | undefined; - tools?: MenuItem | undefined; - } - - interface MenuItem { - title: string; - items: string; - } -} - -export interface AddOnManager { - add(id: string, addOn: (editor: Editor, url: string) => void): Theme | Plugin; - - addComponents(pluginName: string, scripts: string[]): void; - - get(name: string): Theme | Plugin; - - load(name: string, addOnUrl: string, success?: () => void, scope?: {}, failure?: () => void): void; - - requireLangPack(name: string, languages?: string): void; -} - -export class Editor extends util.Observable { - constructor(id: string, settings: Settings, editorManager: EditorManager); - - $: dom.DomQuery; - - baseURI: util.URI; - - contentCSS: string[]; - - contentStyles: string[]; - - documentBaseURI: util.URI; - - dom: dom.DOMUtils; - - formatter: Formatter; - - id: string; - - initialized: boolean; - - notificationManager: notificationManager; - - parser: html.DomParser; - - schema: html.Schema; - - selection: dom.Selection; - - serializer: dom.Serializer; - - settings: Settings; - - theme: Theme; - - undoManager: UndoManager; - - windowManager: WindowManager; - - addButton(name: string, settings: {}): void; - - addCommand(name: string, callback: (ui: boolean, value: {}) => boolean, scope?: {}): void; - - addContextToolbar(predicate: ((el: Node) => boolean) | string, items: string): void; - - addMenuItem(name: string, settings: {}): void; - - addQueryStateHandler(name: string, callback: () => boolean, scope?: {}): void; - - addQueryValueHandler(name: string, callback: () => {}, scope?: {}): void; - - addShortcut(pattern: string, desc: string, cmdFunc: string, sc?: {}): boolean; - - addSidebar(name: string, settings: {}): void; - - addVisual(elm?: Element): void; - - convertURL(url: string, name: string, elm: string): string; - - destroy(automatic?: boolean): void; - - execCallback(name: string): {}; - - execCommand(cmd: string, ui?: boolean, value?: any, args?: {}): void; - - focus(skipFocus: boolean): void; - - getBody(): HTMLBodyElement; - - getContainer(): Element; - - getContent(args?: {}): string; - - getContentAreaContainer(): Element; - - getDoc(): Document; - - getElement(): Element; - - getLang(name: string, defaultVal?: string): void; - - getParam(name: string, defaultVal?: string, type?: string): string; - - getWin(): Window; - - hasEventListeners(name: string): boolean; - - hide(): void; - - init(): void; - - insertContent(content: string, args?: {}): void; - - isDirty(): boolean; - - isHidden(): boolean; - - load(args?: {}): string; - - nodeChanged(args?: {}): void; - - queryCommandState(cmd: string): boolean; - - queryCommandSupported(cmd: string): boolean; - - queryCommandValue(cmd: string): {}; - - remove(): void; - - render(): void; - - save(args: {}): string; - - setContent(content: string, args?: {}): string; - - setDirty(state: boolean): void; - - setMode(mode: string): void; - - setProgressState(state: boolean, time: number): boolean; - - show(): void; - - translate(text: string): string; - - uploadImages(callback: () => void): Promise; -} - -export interface EditorCommands { - addCommands(command_list: {}, type?: string): void; - - execCommand(command: string, ui?: boolean, value?: {}, args?: {}): boolean; - - queryCommandState(command: string): boolean | number; - - queryCommandSupported(command: string): boolean; - - queryCommandValue(command: string): {}; -} - -export interface EditorManager extends util.Observable { - $: dom.DomQuery; - - activeEditor: Editor; - - baseURI: util.URI; - - baseURL: string; - - documentBaseURL: string; - - editors: Editor[]; - - i18n: {}; - - majorVersion: string; - - minorVersion: string; - - releaseDate: string; - - suffix: string; - - add(editor: Editor): Editor; - - addI18n(code: string, items: {}): void; - - createEditor(id: string, settings: {}): Editor; - - execCommand(cmd: string, ui?: boolean, value?: string): boolean; - - get(id: string): Editor; - - init(settings: Settings): Promise; - - overrideDefaults(defaultSettings: {}): void; - - remove(selector: Editor): Editor; - - setActive(editor: Editor): void; - - translate(text: string): string; - - triggerSave(): void; -} - -export interface Env { - android: boolean; - - ceFalse: boolean; - - contentEditable: boolean; - - documentMode: boolean; - - fileApi: boolean; - - gecko: boolean; - - iOS: boolean; - - ie: boolean; - - mac: boolean; - - noCaretAfter: boolean; - - opera: boolean; - - range: boolean; - - transparentSrc: boolean; - - webKit: boolean; -} - -export namespace Events { - interface Event { - type: string; - - target: string; - - isDefaultPrevented(): boolean; - - isImmediatePropagationStopped(): boolean; - - isPropagationStopped(): boolean; - - preventDefault(): void; - - stopImmediatePropagation(): void; - - stopPropagation(): void; - } - - interface FocusBlurEvent extends Event { - blurredEditor: Editor; - } - - interface ContentEvent extends Event { - format: string; - - set: boolean; - - content: string; - } - - interface ProcessEvent extends Event { - content: string; - - forced_root_block: string; - - format: string; - - get: boolean; - - get_inner: boolean; - - node: Node; - - selection: true; - } - - interface NodeChangeEvent extends Event { - element: Node; - - parents: Node[]; - - selectionChange: boolean; - } - - interface UndoRedoEvent extends Event { - level: {}; - } - - interface ChangeEvent extends Event { - lastLevel: {}; - - level: {}; - } - - interface CommandEvent extends Event { - command: string; - - ui: boolean; - - value: string; - } -} - -export class FocusManager { - constructor(); - static isEditorUIElement(elm: Element): boolean; -} - -export interface Formatter { - apply(name: string, vars?: {}, node?: html.Node): void; - - canApply(name: string): boolean; - - formatChanged(formats: string, callback: () => void, similar: boolean): void; - - get(name?: string): any[] | {}; - - getCssText(format: string): string; - - match(name: string, vars?: {}, node?: html.Node): boolean; - - matchAll(names: any[], vars?: {}): any[]; - - matchNode(node: html.Node, name: string, vars: {}, similar: boolean): {}; - - register(name: {}, format?: {}): void; - - remove(name: string, vars?: {}, node?: html.Node): void; - - toggle(name: string, vars?: {}, node?: html.Node): void; - - unregister(name: string): void; -} - -export class Formatter implements Formatter { - constructor(ed: Editor); -} - -export interface Shortcuts { - // eslint-disable-next-line @typescript-eslint/no-invalid-void-type - add(pattern: string, desc: string, cmdFunc: () => void | string, scope?: {}): boolean; - - remove(pattern: string): boolean; -} - -export interface Theme { - renderUI(obj: {}): {}; -} - -export interface UndoManager { - add(level?: {}, event?: Event): {}; - - beforeChange(): void; - - clear(): void; - - extra(callback1: () => void, callback2: () => void): void; - - hasRedo(): boolean; - - hasUndo(): boolean; - - ignore(callback: () => void): void; - - redo(): {}; - - transact(callback: () => void): {}; - - undo(): {}; -} - -export interface WindowManager { - alert(message: string, callback: () => void, scope?: {}): void; - - close(): void; - - confirm(message: string, callback: () => void, scope?: {}): void; - - getParams(): {}; - - getWindows(): Window[]; - - open(args: {}, params: {}): void; - - setParams(params: {}): void; -} - -export interface notificationManager { - close(): void; - - getNotifications(): Array<{}>; - - open(args?: {}): void; -} - -export namespace ui { - interface ControlSettings { - menu: Menu; - } - - interface Collection {} - - interface Container { - add(items: any): Collection; - items(): Collection; - } - - interface Moveable { - moveRel(elm: Node, rel: string): Control; - } - - interface FloatPanel extends Control, Moveable {} - - interface Menu extends FloatPanel, Control, Container {} - - interface Factory { - create(settings: any): Control; - } - - class Control { - constructor(); - - $el: JQuery; - on(name: string, callback: string): Control; - tooltip(): Control; - settings: ControlSettings; - disabled(state: boolean): void; - active(state: boolean): void; - } -} - -export namespace dom { - interface BookmarkManager { - getBookmark(type?: number, normalized?: boolean): {}; - - isBookmarkNode(node: HTMLElement): boolean; - - moveToBookmark(bookmark: {}): boolean; - } - - interface DOMUtils { - add(parentElm: string, name: string, attrs?: {}, html?: string, create?: boolean): Element | T[]; - - addClass(elm: string, cls: string): string | T[]; - - addStyle(cssText: string): void; - - bind(target: Element, name: string, func: () => void, scope?: {}): () => void; - - create(name: string, attrs?: {}, html?: string): Element; - - createFragment(html: string): DocumentFragment; - - createHTML(name: string, attrs?: {}, html?: string): string; - - createRng(): Range; - - decode(s: string): string; - - destroy(): void; - - encode(text: string): string; - - findCommonAncestor(a: Element, b: Element): Element; - - fire(target: Node, name: string, evt: {}): Event; - - get(n: string): Element; - - getAttrib(elm: string, name: string, defaultVal: string): string; - - getAttribs(elm?: HTMLElement): NodeList; - - getNext(node: Node, selector: string): Node; - - getOuterHTML(elm: string): string; - - getParent(node: Node, selector: any, root?: Node): Node; - - getParents(node: Node, selector: () => void, root?: Node): T[]; - - getPos(elm: Element, rootElm?: Element): {}; - - getPrev(node: Node, selector: string): Node; - - getRect(elm: Element): {}; - - getRoot(): Element; - - getSize(elm: Element): {}; - - getStyle(elm: string, name: string, computed: boolean): string; - - getViewPort(win?: Window): {}; - - hasClass(elm: string, cls: string): boolean; - - hide(elm: string): void; - - insertAfter(node: Element, referenceNode: Element): Element | T[]; - - is(elm: Node, selector: string): boolean; - - isBlock(node: Node): boolean; - - isEmpty(elements?: {}): boolean; - - isHidden(elm: string): boolean; - - loadCSS(url: string): void; - - nodeIndex(node: Node, normalized?: boolean): number; - - parseStyle(cssText: string): {}; - - remove(node: string | Element, keepChildren?: boolean): Element | T[]; - - removeAllAttribs(e: Element): void; - - removeClass(elm: string, cls: string): string | T[]; - - rename(elm: Element, name: string): Element; - - replace(newElm: Element, oldElm: Element, keepChildren?: boolean): void; - - run(elm: string, func: () => void, scope?: {}): {} | T[]; - - select(selector: string, scope?: {}): T[]; - - serializeStyle(styles: {}, name?: string): string; - - setAttrib(elm: Element, name: string, value: string): void; - - setAttribs(elm: Element, attrs: {}): void; - - setHTML(elm: Element, html: string): void; - - setOuterHTML(elm: Element, html: {}): void; - - setStyle(elm: string, name: string, value: string): void; - - setStyles(elm: Element, styles: {}): void; - - show(elm: string): void; - - split(parentElm: Element, splitElm: Element, replacementElm?: Element): Element; - - toHex(rgbVal: string): string; - - toggleClass(elm: Element, cls: string, state?: string): void; - - unbind(target: Element, name: string, func: () => void): boolean | T[]; - - uniqueId(prefix?: string): string; - } - - class DOMUtils implements DOMUtils { - constructor(doc: Document, settings?: {}); - } - - interface DomQuery { - add(items: T[], sort?: boolean): DomQuery; - - addClass(className: string): DomQuery; - - after(content: string): DomQuery; - - append(content: string): DomQuery; - - appendTo(val: string): DomQuery; - - attr(name: string, value?: string): DomQuery | string; - - before(content: string): DomQuery; - - children(node: Element | string): DomQuery; - - clone(): DomQuery; - - closest(selector: string): DomQuery; - - contents(node: Element | string): DomQuery; - - css(name: string, value?: string): DomQuery | string; - - each(callback: () => void): DomQuery; - - each(obj: {}, callback: () => void): void; - - empty(): DomQuery; - - eq(index: number): DomQuery; - - extend(target: {}, object: {}): {}; - - filter(selector: string): DomQuery; - - find(selector: string): DomQuery; - - first(): DomQuery; - - grep(array: T[], callback: () => void): T[]; - - hasClass(className: string): boolean; - - hide(): DomQuery; - - html(value?: string): DomQuery | string; - - inArray(item: {}, array: T[]): number; - - is(selector: string): boolean; - - isArray(array: {}): boolean; - - last(): DomQuery; - - makeArray(object: {}): T[]; - - next(node: Element | string): DomQuery; - - nextUntil(node: Element | string, until: string): DomQuery; - - off(name?: string, callback?: () => void): DomQuery; - - offset(offset?: {}): {} | DomQuery; - - on(name: string, callback: () => void): DomQuery; - - parent(node: Element | string): DomQuery; - - parents(node: Element | string): DomQuery; - - parentsUntil(node: Element | string, until: string): DomQuery; - - prepend(content: string): DomQuery; - - prependTo(val: string): DomQuery; - - prev(node: Element | string): DomQuery; - - prevUntil(node: Element | string, until: string): DomQuery; - - remove(): DomQuery; - - removeAttr(name: string): DomQuery | string; - - removeClass(className: string): DomQuery; - - replaceWith(content: string): DomQuery; - - show(): DomQuery; - - slice(start: number, end?: number): DomQuery; - - text(value?: string): DomQuery | string; - - toArray(): T[]; - - toggleClass(className: string, state?: boolean): DomQuery; - - trigger(name: string): DomQuery; - - trim(str: string): string; - - unwrap(): DomQuery; - - wrap(content: string): DomQuery; - - wrapAll(content: string): DomQuery; - - wrapInner(content: string): DomQuery; - } - - class DomQuery implements DomQuery { - constructor(selector?: string, context?: Document); - } - - interface EventUtils { - bind(target: {}, names: string, callback: () => void, scope: {}): () => void; - - clean(target: {}): EventUtils; - - fire(target: {}, name: string, args?: {}): EventUtils; - - unbind(target: {}, names?: string, callback?: () => void): EventUtils; - } - - interface RangeUtils { - compareRanges(rng1: Range, rng2: Range): boolean; - - getCaretRangeFromPoint(clientX: number, clientY: number, doc: Document): Range; - } - - interface ScriptLoader { - add(url: string, success?: () => void, scope?: {}, failure?: () => void): void; - - isDone(url: string): boolean; - - load(url: string, callback1?: () => void, callback2?: () => void): void; - - loadQueue(success?: () => void, failure?: () => void, scope?: {}): void; - - loadScripts(scripts: string[], callback1?: () => void, scope?: {}, callback2?: () => void): void; - - markDone(url: string): void; - } - - interface Selection { - collapse(toStart?: boolean): void; - - getBookmark(type?: number, normalized?: boolean): {}; - - getContent(args?: {}): string; - - getEnd(real?: boolean): Element; - - getNode(): Element; - - getRng(): Range; - - getSel(): Selection; - - getStart(real?: boolean): Element; - - isCollapsed(): boolean; - - moveToBookmark(bookmark: {}): boolean; - - select(node: Element, content?: boolean): Element; - - selectorChanged(selector: string, callback: () => void): void; - - setContent(content: string, args?: {}): void; - - setCursorLocation(node?: Node, offset?: number): void; - - setNode(elm: Element): Element; - - setRng(rng: Range, forward?: boolean): void; - } - - class Selection implements Selection { - constructor(dom: DOMUtils, win: Window, editor: Editor, serializer: Serializer); - } - - interface Serializer { - addAttributeFilter(callback: () => void): void; - - addNodeFilter(callback: () => void): void; - - addRules(rules: string): void; - - addTempAttr(name: string): void; - - serialize(node: HTMLElement, args: {}): void; - - setRules(rules: string): void; - } - - class Serializer implements Serializer { - constructor(settings: {}, editor?: Editor); - } - - interface TreeWalker { - current(): html.Node; - - next(): html.Node; - - prev(): html.Node; - } - - class TreeWalker implements TreeWalker { - constructor(startNode: html.Node, rootNode: html.Node); - } -} - -export namespace geom { - interface Rect { - clamp(rect: Rect, clampRect: Rect, fixedSize: boolean): Rect; - - create(x: number, y: number, w: number, h: number): Rect; - - findBestRelativePosition(rect: Rect, targetRect: Rect, constrainRect: Rect, rels: any[]): void; - - fromClientRect(clientRect: ClientRect): Rect; - - inflate(rect: Rect, w: number, h: number): Rect; - - intersect(rect: Rect, cropRect: Rect): Rect; - - relativePosition(rect: Rect, targetRect: Rect, rel: string): void; - } -} - -export namespace html { - interface DomParser { - addAttributeFilter(attributes: string, callback: () => void): void; - - addNodeFilter(attributes: string, callback: () => void): void; - - filterNode(node: Node): Node; - - parse(html: string, args?: {}): Node; - } - - class DomParser implements DomParser { - constructor(settings: {}, schema: Schema); - } - - interface Entities { - decode(text: string): string; - - encodeAllRaw(text: string): string; - - encodeNamed(text: string, attr?: boolean, entities?: {}): string; - - encodeNumeric(text: string, attr?: boolean): string; - - encodeRaw(text: string, attr?: boolean): string; - - getEncodeFunc(name: string, entities?: string): () => void; - } - - interface Node { - append(node: Node): Node; - - attr(name: string, value?: string): string | Node; - - clone(): Node; - - create(name: string, attrs: {}): void; - - empty(): Node; - - getAll(name: string): Node[]; - - insert(node: Node, ref_node: Node, before?: boolean): Node; - - isEmpty(elements: {}): boolean; - - remove(): Node; - - replace(node: Node): Node; - - unwrap(): void; - - walk(prev?: boolean): Node; - - wrap(wrapperNode: Node): Node; - } - - class Node implements Node { - constructor(name: string, type: number); - } - - interface SaxParser { - parse(html: string): void; - } - - class SaxParser implements SaxParser { - constructor(settings: {}, schema: Schema); - } - - interface Schema { - addCustomElements(custom_elements: string): void; - - addValidChildren(valid_children: string): void; - - addValidElements(valid_elements: string): void; - - getBlockElements(): { [name: string]: {} }; - - getBoolAttrs(): { [name: string]: {} }; - - getCustomElements(): { [name: string]: {} }; - - getElementRule(name: string): {}; - - getInvalidStyles(): void; - - getMoveCaretBeforeOnEnterElements(): { [name: string]: {} }; - - getNonEmptyElements(): { [name: string]: {} }; - - getSelfClosingElements(): { [name: string]: {} }; - - getShortEndedElements(): { [name: string]: {} }; - - getSpecialElements(): { [name: string]: {} }; - - getTextBlockElements(): { [name: string]: {} }; - - getTextInlineElements(): { [name: string]: {} }; - - getValidClasses(): void; - - getValidStyles(): void; - - getWhiteSpaceElements(): { [name: string]: {} }; - - isValid(name: string, attr?: string): boolean; - - isValidChild(name: string, child: string): boolean; - - setValidElements(valid_elements: string): void; - } - - class Schema implements Schema { - constructor(settings: {}); - } - - interface Serializer { - serialize(node: Node): string; - } - - class Serializer implements Serializer { - constructor(settings: {}, schema: Schema); - } - - interface Styles { - parse(css: string): {}; - - serialize(styles: {}, elementName: string): string; - - toHex(color: string): string; - } - - interface Writer { - cdata(text: string): void; - - doctype(text: string): void; - - end(name: string): void; - - getContent(): string; - - pi(name: string, text: string): void; - - reset(): void; - - start(name: string, attrs?: any[], empty?: boolean): void; - - text(text: string, raw: boolean): void; - } - - class Writer implements Writer { - constructor(settings: {}); - } -} - -export namespace util { - interface Color { - parse(value: {}): Color; - - toHex(): string; - - toHsv(): {}; - - toRgb(): {}; - } - - class Color implements Color { - constructor(value: string | {}); - } - - interface Delay { - clearInterval(interval: number): void; - - clearTimeout(timeout: number): void; - - debounce(callback: () => void, time: number): () => void; - - requestAnimationFrame(callback: () => void, element?: HTMLElement): void; - - setEditorInterval(callback: () => void, time: number): number; - - setEditorTimeout(editor: Editor, callback: () => void, time: number): number; - - setInterval(callback: () => void, time: number): number; - - setTimeout(callback: () => void, time: number): number; - } - - interface EventDispatcher { - fire(name: string, args?: {}): {}; - - has(name: string): boolean; - - isNative(name: string): boolean; - - off(name: string, callback?: () => void): {}; - - on(name: string, callback: () => void, first?: boolean): {}; - - once(name: string, callback: () => void, first: boolean): {}; - } - - interface i18n { - rtl: boolean; - - add(code: string, items: Array<{}>): void; - - getCode(): string; - - setCode(newCode: string): void; - - translate(text: string): string; - } - - interface JSON { - parse(s: string): {}; - - serialize(obj: {}, quote?: string): string; - } - - interface JSONRequest { - send(args: {}): void; - - sendRPC(o: {}): void; - } - - interface LocalStorage { - length: number; - - clear(): void; - - getItem(key: string): string; - - key(index: number): string; - - removeItem(key: string): void; - - setItem(key: string, value: string): void; - } - - class Observable { - fire(name: string, args?: {}, bubble?: boolean): {}; - - hasEventListeners(name: string): boolean; - - off(name?: string, callback?: () => void): {}; - - on(name: string, callback: (event: any) => void, first?: boolean): {}; - - once(name: string, callback: (event: any) => void): {}; - } - - interface Tools { - create(s: string, p: {}, root?: {}): void; - - createNS(n: string, o?: {}): {}; - - each(o: {}, cb: () => void, s?: {}): void; - - explode(s: string, d: string): void; - - grep(a: T[], f: () => void): T[]; - - inArray(item: T, arr: T[]): number; - - is(obj: {}, type: string): boolean; - - isArray(obj: {}): boolean; - - makeMap(items: T[], delim?: string, map?: {}): {}; - - map(array: T[], callback: (c: T) => S): S[]; - - resolve(n: string, o?: {}): {}; - - toArray(obj: {}): T[]; - - trim(s: string): string; - - walk(o: {}, f: () => void, n?: string, s?: string): void; - } - - interface URI { - getURI(noProtoHost: boolean): URI; - - isSameOrigin(uri: URI): boolean; - - setPath(path: string): void; - - toAbsPath(base: string, path: string): void; - - toAbsolute(uri: string, noHost: boolean): string; - - toRelPath(base: string, path: string): void; - - toRelative(uri: string): string; - } - - class URI implements URI { - constructor(url: string, settings?: {}); - } - - interface XHR { - fire(name: string, args?: {}, bubble?: boolean): {}; - - hasEventListeners(name: string): boolean; - - off(name?: string, callback?: () => void): {}; - - on(name: string, callback: () => void, first?: boolean): {}; - - once(name: string, callback: () => void): {}; - - send(settings: {}): void; - } -} diff --git a/types/tinymce/package.json b/types/tinymce/package.json deleted file mode 100644 index 6cd64ecc23123c..00000000000000 --- a/types/tinymce/package.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "private": true, - "name": "@types/tinymce", - "version": "4.6.9999", - "projects": [ - "https://github.com/tinymce/tinymce", - "https://github.com/tinymce/tinymce-dist" - ], - "dependencies": { - "@types/jquery": "*" - }, - "devDependencies": { - "@types/tinymce": "workspace:." - }, - "owners": [ - { - "name": "Martin Duparc", - "githubUsername": "martinduparc" - }, - { - "name": "Poul Poulsen", - "githubUsername": "iampoul" - }, - { - "name": "Nico Hartto", - "githubUsername": "nicohartto" - }, - { - "name": "Tyler Romeo", - "githubUsername": "Parent5446" - }, - { - "name": "Ashley Workman", - "githubUsername": "CymruKakashi" - }, - { - "name": "Tagawa Hirotaka", - "githubUsername": "wafuwafu13" - } - ] -} diff --git a/types/tinymce/tinymce-tests.ts b/types/tinymce/tinymce-tests.ts deleted file mode 100644 index 12710d08cf8cd9..00000000000000 --- a/types/tinymce/tinymce-tests.ts +++ /dev/null @@ -1,72 +0,0 @@ -import * as tinymce from "tinymce"; - -const settings: tinymce.Settings = { - selector: "textarea", - height: 500, - menubar: false, - plugins: [ - "advlist autolink lists link image charmap print preview anchor", - "searchreplace visualblocks code fullscreen", - "insertdatetime media table contextmenu paste code", - "autosave imagetools", - ], - autosave_ask_before_unload: false, - autosave_interval: "20s", - autosave_prefix: "tinymce-autosave-{path}{query}-{id}-", - autosave_restore_when_empty: false, - autosave_retention: "30m", - toolbar: - "undo redo | insert | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image", - content_css: "//www.tinymce.com/css/codepen.min.css", - imagetools_cors_hosts: ["mydomain.com", "otherdomain.com"], - imagetools_proxy: "proxy.php", - table_toolbar: - "tableprops tabledelete | tableinsertrowbefore tableinsertrowafter tabledeleterow | tableinsertcolbefore tableinsertcolafter tabledeletecol", - table_appearance_options: false, - table_clone_elements: "strong em a", - table_grid: false, - table_tab_navigation: false, - table_default_attributes: { - title: "My table", - }, - table_default_styles: { - fontWeight: "bold", - }, - table_sizing_mode: "auto", - table_class_list: [ - { title: "None", value: "" }, - { title: "Dog", value: "dog" }, - { title: "Cat", value: "cat" }, - ], - table_cell_class_list: [ - { title: "None", value: "" }, - { title: "Dog", value: "dog" }, - { title: "Cat", value: "cat" }, - ], - table_row_class_list: [ - { title: "None", value: "" }, - { title: "Dog", value: "dog" }, - { title: "Cat", value: "cat" }, - ], - table_advtab: false, - table_cell_advtab: false, - table_row_advtab: false, - table_resize_bars: false, - table_style_by_css: false, - spellchecker_rpc_url: "https://mydomain.com", - spellchecker_language: "en", - spellchecker_languages: "US English=en,UK English=en_gb", - spellchecker_dialog: true, - spellchecker_whitelist: ["itemOne", "itemTwo"], - spellchecker_on_load: true, - spellchecker_active: true, -}; - -tinymce.init(settings); - -const c = new tinymce.util.Color("#FFFFFF"); - -const n1 = new tinymce.html.Node("strong", 1); -const n2 = new tinymce.html.Node("strong", 2); -const treeWalker = new tinymce.dom.TreeWalker(n1, n2); -treeWalker.current(); diff --git a/types/tinymce/tsconfig.json b/types/tinymce/tsconfig.json deleted file mode 100644 index d7da2f14124baf..00000000000000 --- a/types/tinymce/tsconfig.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "compilerOptions": { - "module": "node16", - "lib": [ - "es6", - "dom" - ], - "noImplicitAny": true, - "strictNullChecks": true, - "strictFunctionTypes": true, - "noImplicitThis": true, - "types": [], - "noEmit": true, - "forceConsistentCasingInFileNames": true - }, - "files": [ - "index.d.ts", - "tinymce-tests.ts" - ] -}