@node-projects/web-component-designer 0.0.177 → 0.0.179
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { IDesignItem } from "../../item/IDesignItem.js";
|
|
2
2
|
import { IStyleDeclaration, IStyleRule, IStylesheet } from "./IStylesheetService.js";
|
|
3
|
-
import type { CssDeclarationAST, CssRuleAST, CssStylesheetAST } from "@adobe/css-tools";
|
|
4
3
|
import { AbstractStylesheetService } from "./AbstractStylesheetService.js";
|
|
4
|
+
type CssRuleAST = any;
|
|
5
|
+
type CssDeclarationAST = any;
|
|
6
|
+
type CssStylesheetAST = any;
|
|
5
7
|
interface IRuleWithAST extends IStyleRule {
|
|
6
8
|
ast: CssRuleAST;
|
|
7
9
|
declarations: IDeclarationWithAST[];
|
|
@@ -1,7 +1,20 @@
|
|
|
1
1
|
import { IDesignItem } from "../../item/IDesignItem.js";
|
|
2
2
|
import { IStyleDeclaration, IStyleRule, IStylesheet } from "./IStylesheetService.js";
|
|
3
|
-
import type * as csstree from 'css-tree';
|
|
4
3
|
import { AbstractStylesheetService } from "./AbstractStylesheetService.js";
|
|
4
|
+
declare namespace csstree {
|
|
5
|
+
type CssNodePlain = any;
|
|
6
|
+
type CssNode = any;
|
|
7
|
+
type ParseOptions = any;
|
|
8
|
+
type GenerateOptions = any;
|
|
9
|
+
type RulePlain = any;
|
|
10
|
+
type DeclarationPlain = any;
|
|
11
|
+
type StyleSheetPlain = any;
|
|
12
|
+
type Raw = any;
|
|
13
|
+
type Declaration = any;
|
|
14
|
+
type AtrulePlain = any;
|
|
15
|
+
type BlockPlain = any;
|
|
16
|
+
type SelectorListPlain = any;
|
|
17
|
+
}
|
|
5
18
|
declare global {
|
|
6
19
|
interface Window {
|
|
7
20
|
csstree: {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { BaseCustomWebComponentLazyAppend, css, html, TypedEvent } from '@node-projects/base-custom-webcomponent';
|
|
2
|
+
import * as monaco from 'monaco-editor';
|
|
2
3
|
import { CommandType } from '../../../commandHandling/CommandType.js';
|
|
3
4
|
export class CodeViewMonaco extends BaseCustomWebComponentLazyAppend {
|
|
4
5
|
dispose() {
|
|
@@ -135,7 +136,7 @@ export class CodeViewMonaco extends BaseCustomWebComponentLazyAppend {
|
|
|
135
136
|
let point1 = model.getPositionAt(position.start);
|
|
136
137
|
let point2 = model.getPositionAt(position.start + position.length);
|
|
137
138
|
this._monacoEditor.setSelection({ startLineNumber: point1.lineNumber, startColumn: point1.column, endLineNumber: point2.lineNumber, endColumn: point2.column });
|
|
138
|
-
setTimeout(() => this._monacoEditor.
|
|
139
|
+
setTimeout(() => this._monacoEditor.revealRangeInCenter(new monaco.Range(point1.lineNumber, point1.column, point2.lineNumber, point2.column), 1));
|
|
139
140
|
}
|
|
140
141
|
}
|
|
141
142
|
customElements.define('node-projects-code-view-monaco', CodeViewMonaco);
|