@node-projects/web-component-designer 0.0.178 → 0.0.180
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.
- package/dist/elements/services/stylesheetService/CssToolsStylesheetService.d.ts +3 -1
- package/dist/elements/services/stylesheetService/CssTreeStylesheetService.d.ts +14 -1
- package/dist/elements/widgets/codeView/code-view-monaco.d.ts +1 -1
- package/dist/elements/widgets/codeView/code-view-monaco.js +2 -1
- package/package.json +1 -1
|
@@ -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,5 +1,4 @@
|
|
|
1
1
|
import { BaseCustomWebComponentLazyAppend, css, html, TypedEvent } from '@node-projects/base-custom-webcomponent';
|
|
2
|
-
import * as monaco from 'monaco-editor';
|
|
3
2
|
import { CommandType } from '../../../commandHandling/CommandType.js';
|
|
4
3
|
export class CodeViewMonaco extends BaseCustomWebComponentLazyAppend {
|
|
5
4
|
dispose() {
|
|
@@ -9,6 +8,7 @@ export class CodeViewMonaco extends BaseCustomWebComponentLazyAppend {
|
|
|
9
8
|
elementsToPackages;
|
|
10
9
|
code;
|
|
11
10
|
onTextChanged = new TypedEvent();
|
|
11
|
+
//@ts-ignore
|
|
12
12
|
_monacoEditor;
|
|
13
13
|
_editor;
|
|
14
14
|
static style = css `
|
|
@@ -136,6 +136,7 @@ export class CodeViewMonaco extends BaseCustomWebComponentLazyAppend {
|
|
|
136
136
|
let point1 = model.getPositionAt(position.start);
|
|
137
137
|
let point2 = model.getPositionAt(position.start + position.length);
|
|
138
138
|
this._monacoEditor.setSelection({ startLineNumber: point1.lineNumber, startColumn: point1.column, endLineNumber: point2.lineNumber, endColumn: point2.column });
|
|
139
|
+
//@ts-ignore
|
|
139
140
|
setTimeout(() => this._monacoEditor.revealRangeInCenter(new monaco.Range(point1.lineNumber, point1.column, point2.lineNumber, point2.column), 1));
|
|
140
141
|
}
|
|
141
142
|
}
|