AK-21/Graphite-Industrial-Intelligence
0
1import Container from './container.js'2import Node, { NodeProps } from './node.js'3 4declare namespace Comment {5 export interface CommentRaws extends Record<string, unknown> {6 /**7 * The space symbols before the node.8 */9 before?: string10 11 /**12 * The space symbols between `/*` and the comment’s text.13 */14 left?: string15 16 /**17 * The space symbols between the comment’s text.18 */19 right?: string20 }21 22 export interface CommentProps extends NodeProps {23 /** Information used to generate byte-to-byte equal node string as it was in the origin input. */24 raws?: CommentRaws25 /** Content of the comment. */26 text: string27 }28 29 export { Comment_ as default }30}31 32/**33 * It represents a class that handles34 * [CSS comments](https://developer.mozilla.org/en-US/docs/Web/CSS/Comments)35 *36 * ```js37 * Once (root, { Comment }) {38 * const note = new Comment({ text: 'Note: …' })39 * root.append(note)40 * }41 * ```42 *43 * Remember that CSS comments inside selectors, at-rule parameters,44 * or declaration values will be stored in the `raws` properties45 * explained above.46 */47declare class Comment_ extends Node {48 parent: Container | undefined49 raws: Comment.CommentRaws50 type: 'comment'51 /**52 * The comment's text.53 */54 get text(): string55 56 set text(value: string)57 58 constructor(defaults?: Comment.CommentProps)59 assign(overrides: Comment.CommentProps | object): this60 clone(overrides?: Partial<Comment.CommentProps>): this61 cloneAfter(overrides?: Partial<Comment.CommentProps>): this62 cloneBefore(overrides?: Partial<Comment.CommentProps>): this63}64 65declare class Comment extends Comment_ {}66 67export = Comment68 