@unified-latex/unified-latex-prettier
Advanced tools
Comparing version 1.6.1 to 1.7.0
@@ -1,14 +0,72 @@ | ||
export * from "./libs/printer"; | ||
export * from "./libs/prettier-plugin-latex"; | ||
import * as Ast from '@unified-latex/unified-latex-types'; | ||
import type { AstPath as AstPath_2 } from 'prettier'; | ||
import type { Doc } from 'prettier'; | ||
import type { Options } from 'prettier'; | ||
import type { ParserOptions } from 'prettier'; | ||
import type { Plugin as Plugin_2 } from 'prettier'; | ||
declare type AstPath = AstPath_2<Ast.Node | Ast.Argument>; | ||
export declare const prettierPluginLatex: Plugin_2<Ast.Node>; | ||
declare namespace PrettierTypes { | ||
export { | ||
Doc, | ||
Options, | ||
AstPath, | ||
PrintFunc, | ||
RecursivePrintFunc | ||
} | ||
} | ||
declare interface PrintFunc { | ||
(path: AstPath, options: ParserOptions, print: (path: AstPath) => Doc): Doc; | ||
} | ||
declare function printLatexAst(path: PrettierTypes.AstPath, options: PrettierTypes.Options & { | ||
referenceMap?: ReferenceMap; | ||
}, print: PrettierTypes.RecursivePrintFunc): Doc; | ||
export { printLatexAst } | ||
export { printLatexAst as printer } | ||
declare interface RecursivePrintFunc<U = any> { | ||
(path: U, index?: number, value?: any): Doc; | ||
} | ||
/** | ||
* ## What is this? | ||
* Generate a data structure that can be queried | ||
* for the next/previous node. This allows for "peeking" | ||
* during the rendering process. | ||
* | ||
* A [Prettier](https://prettier.io/) plugin for formatting and pretty-printing LaTeX source code. | ||
* | ||
* ## When should I use this? | ||
* | ||
* If you want to construct a `Prettier` instance that has LaTeX parsing abilities. | ||
* | ||
* You should probably use the `prettier-plugin-latex` package instead of directly accessing this package. | ||
* @class ReferenceMap | ||
*/ | ||
//# sourceMappingURL=index.d.ts.map | ||
declare class ReferenceMap { | ||
ast: Ast.Ast; | ||
map: Map<Ast.Ast, { | ||
previous?: Ast.Ast; | ||
next?: Ast.Ast; | ||
renderCache?: any; | ||
}>; | ||
constructor(ast: Ast.Ast); | ||
/** | ||
* Associate render-specific data with this node. This data | ||
* will be overwritten if `setRenderCache` is called twice. | ||
* | ||
* @param {Ast.Ast} node | ||
* @param {*} data | ||
* @memberof ReferenceMap | ||
*/ | ||
setRenderCache(node: any, data: any): void; | ||
/** | ||
* Retrieve data associated with `node` via `setRenderCache` | ||
* | ||
* @param {Ast.Ast} node | ||
* @returns {(object | undefined)} | ||
* @memberof ReferenceMap | ||
*/ | ||
getRenderCache(node: any): object | any[] | undefined; | ||
getPreviousNode(node: Ast.Ast): Ast.Node | undefined; | ||
getNextNode(node: Ast.Ast): Ast.Node | undefined; | ||
} | ||
export { } |
{ | ||
"name": "@unified-latex/unified-latex-prettier", | ||
"version": "1.6.1", | ||
"version": "1.7.0", | ||
"description": "Prettier plugin for processing LaTeX code via unified-latex", | ||
@@ -8,11 +8,11 @@ "main": "index.js", | ||
"dependencies": { | ||
"@unified-latex/unified-latex-ctan": "^1.6.1", | ||
"@unified-latex/unified-latex-types": "^1.6.1", | ||
"@unified-latex/unified-latex-util-align": "^1.6.1", | ||
"@unified-latex/unified-latex-util-match": "^1.6.1", | ||
"@unified-latex/unified-latex-util-parse": "^1.6.1", | ||
"@unified-latex/unified-latex-util-pgfkeys": "^1.6.1", | ||
"@unified-latex/unified-latex-util-print-raw": "^1.6.1", | ||
"@unified-latex/unified-latex-util-trim": "^1.6.1", | ||
"@unified-latex/unified-latex-util-visit": "^1.6.1", | ||
"@unified-latex/unified-latex-ctan": "^1.7.0", | ||
"@unified-latex/unified-latex-types": "^1.7.0", | ||
"@unified-latex/unified-latex-util-align": "^1.7.0", | ||
"@unified-latex/unified-latex-util-match": "^1.7.0", | ||
"@unified-latex/unified-latex-util-parse": "^1.7.0", | ||
"@unified-latex/unified-latex-util-pgfkeys": "^1.7.0", | ||
"@unified-latex/unified-latex-util-print-raw": "^1.7.0", | ||
"@unified-latex/unified-latex-util-trim": "^1.7.0", | ||
"@unified-latex/unified-latex-util-visit": "^1.7.0", | ||
"prettier": "^3.0.3" | ||
@@ -19,0 +19,0 @@ }, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
220708
7
2172
1