@node-projects/web-component-designer 0.0.292 → 0.1.1
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/README.md +1 -30
- package/dist/elements/helper/NpmPackageLoader.d.ts +1 -2
- package/dist/elements/{loader → services/manifestParsers}/OldCustomElementsManifestLoader.d.ts +1 -1
- package/dist/elements/{loader → services/manifestParsers}/OldCustomElementsManifestLoader.js +2 -2
- package/dist/index.d.ts +4 -17
- package/dist/index.js +2 -16
- package/package.json +3 -25
- package/.editorconfig +0 -7
- package/.github/FUNDING.yml +0 -4
- package/.vscode/settings.json +0 -3
- package/ACKNOWLEDGMENTS +0 -15
- package/LICENSE +0 -21
- package/RemoveOldRemoteBranches.bat +0 -7
- package/dist/elements/services/demoProviderService/DemoProviderService.d.ts +0 -6
- package/dist/elements/services/demoProviderService/DemoProviderService.js +0 -38
- package/dist/elements/services/demoProviderService/IframeDemoProviderService copy.d.ts +0 -6
- package/dist/elements/services/demoProviderService/IframeDemoProviderService copy.js +0 -38
- package/dist/elements/services/designerAddons/IDesignerAddonJson copy.d.ts +0 -3
- package/dist/elements/services/designerAddons/IDesignerAddonJson copy.js +0 -1
- package/dist/elements/services/designerAddons/IDesignerInfoJson.d.ts +0 -7
- package/dist/elements/services/designerAddons/IDesignerInfoJson.js +0 -19
- package/dist/elements/services/dragDropService/IExternalDragDropService copy.d.ts +0 -5
- package/dist/elements/services/dragDropService/IExternalDragDropService copy.js +0 -1
- package/dist/elements/services/eventsService/IEventsService copy.d.ts +0 -2
- package/dist/elements/services/eventsService/IEventsService copy.js +0 -1
- package/dist/elements/services/htmlParserService/BaseCustomWebcomponentParserService.d.ts +0 -11
- package/dist/elements/services/htmlParserService/BaseCustomWebcomponentParserService.js +0 -90
- package/dist/elements/services/htmlParserService/LitElementParserService.d.ts +0 -12
- package/dist/elements/services/htmlParserService/LitElementParserService.js +0 -91
- package/dist/elements/services/htmlParserService/NodeHtmlParserService.d.ts +0 -11
- package/dist/elements/services/htmlParserService/NodeHtmlParserService.js +0 -89
- package/dist/elements/services/htmlParserService/VueParserService.d.ts +0 -9
- package/dist/elements/services/htmlParserService/VueParserService.js +0 -10
- package/dist/elements/services/htmlWriterService/HtmlWriterOptions.d.ts +0 -7
- package/dist/elements/services/htmlWriterService/HtmlWriterOptions.js +0 -7
- package/dist/elements/services/propertiesService/propertyEditors/GridAssignedRowColumnPropertyEditor.d.ts +0 -8
- package/dist/elements/services/propertiesService/propertyEditors/GridAssignedRowColumnPropertyEditor.js +0 -45
- package/dist/elements/services/propertiesService/propertyEditors/GridRowColumnPropertyEditor.d.ts +0 -10
- package/dist/elements/services/propertiesService/propertyEditors/GridRowColumnPropertyEditor.js +0 -25
- package/dist/elements/services/propertiesService/propertyEditors/JsonPropertyEditor copy.d.ts +0 -9
- package/dist/elements/services/propertiesService/propertyEditors/JsonPropertyEditor copy.js +0 -21
- package/dist/elements/services/propertiesService/propertyEditors/MetricsPropertyEditor.d.ts +0 -8
- package/dist/elements/services/propertiesService/propertyEditors/MetricsPropertyEditor.js +0 -14
- package/dist/elements/services/propertiesService/propertyEditors/SelectPropertyEditor copy.d.ts +0 -7
- package/dist/elements/services/propertiesService/propertyEditors/SelectPropertyEditor copy.js +0 -28
- package/dist/elements/services/propertiesService/services/CommonPropertiesService copy.d.ts +0 -13
- package/dist/elements/services/propertiesService/services/CommonPropertiesService copy.js +0 -44
- package/dist/elements/services/propertiesService/services/ContentPropertiesService.d.ts +0 -14
- package/dist/elements/services/propertiesService/services/ContentPropertiesService.js +0 -30
- package/dist/elements/services/propertiesService/services/CssCurrentPropertiesService copy.d.ts +0 -34
- package/dist/elements/services/propertiesService/services/CssCurrentPropertiesService copy.js +0 -105
- package/dist/elements/services/propertiesService/services/PolymerPropertiesService copy.d.ts +0 -8
- package/dist/elements/services/propertiesService/services/PolymerPropertiesService copy.js +0 -10
- package/dist/elements/services/propertiesService/services/UnkownElemntPropertiesService.d.ts +0 -24
- package/dist/elements/services/propertiesService/services/UnkownElemntPropertiesService.js +0 -198
- package/dist/elements/services/stylesheetService/CssToolsStylesheetService.d.ts +0 -42
- package/dist/elements/services/stylesheetService/CssToolsStylesheetService.js +0 -114
- package/dist/elements/services/stylesheetService/CssTreeStylesheetService.d.ts +0 -58
- package/dist/elements/services/stylesheetService/CssTreeStylesheetService.js +0 -204
- package/dist/elements/services/stylesheetService/SpecificityCalculator.d.ts +0 -7
- package/dist/elements/services/stylesheetService/SpecificityCalculator.js +0 -178
- package/dist/elements/services/undoService/transactionItems/AttributeChangeAction copy.d.ts +0 -15
- package/dist/elements/services/undoService/transactionItems/AttributeChangeAction copy.js +0 -70
- package/dist/elements/widgets/bindableObjectsBrowser/bindable-objects-browser.d.ts +0 -14
- package/dist/elements/widgets/bindableObjectsBrowser/bindable-objects-browser.js +0 -137
- package/dist/elements/widgets/codeView/code-view-ace.d.ts +0 -24
- package/dist/elements/widgets/codeView/code-view-ace.js +0 -134
- package/dist/elements/widgets/codeView/code-view-code-mirror.d.ts +0 -25
- package/dist/elements/widgets/codeView/code-view-code-mirror.js +0 -117
- package/dist/elements/widgets/codeView/code-view-monaco.d.ts +0 -37
- package/dist/elements/widgets/codeView/code-view-monaco.js +0 -197
- package/dist/elements/widgets/designerView/extensions/EditText/EditTextWithStyloExtension.d.ts +0 -23
- package/dist/elements/widgets/designerView/extensions/EditText/EditTextWithStyloExtension.js +0 -87
- package/dist/elements/widgets/designerView/extensions/EditText/EditTextWithStyloExtensionProvider.d.ts +0 -10
- package/dist/elements/widgets/designerView/extensions/EditText/EditTextWithStyloExtensionProvider.js +0 -15
- package/dist/elements/widgets/miniatureView/html-2-canvas-miniature-view.d.ts +0 -10
- package/dist/elements/widgets/miniatureView/html-2-canvas-miniature-view.js +0 -21
- package/dist/elements/widgets/paletteView/paletteTreeView.d.ts +0 -12
- package/dist/elements/widgets/paletteView/paletteTreeView.js +0 -141
- package/dist/elements/widgets/treeView/treeViewExtended.d.ts +0 -32
- package/dist/elements/widgets/treeView/treeViewExtended.js +0 -366
- package/fixesimport.js +0 -98
- package/jest.config.cjs +0 -7
- package/polymer.json +0 -42
- package/tsconfig.json +0 -75
- /package/dist/elements/{loader → services/manifestParsers}/IOldCustomElementsManifest.d.ts +0 -0
- /package/dist/elements/{loader → services/manifestParsers}/IOldCustomElementsManifest.js +0 -0
package/README.md
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
# web-component-designer
|
|
2
2
|
|
|
3
|
-
```It
|
|
3
|
+
```It's now considered beta. It works, we use it in production, but there are many more features to come```
|
|
4
4
|
|
|
5
5
|
A HTML web component for designing web components and HTML pages based on PolymerLabs wizzywid which can easily be integrated in your own software.
|
|
6
6
|
Meanwhile polymer is not used anymore.
|
|
7
7
|
|
|
8
8
|

|
|
9
9
|
|
|
10
|
-
There is also a Preview VS-Code Addon using the Designer: https://github.com/node-projects/vs-code-designer-addon
|
|
11
10
|
|
|
12
11
|
## NPM Package
|
|
13
12
|
|
|
@@ -20,34 +19,6 @@ https://www.npmjs.com/package/@node-projects/web-component-designer
|
|
|
20
19
|
- At the moment Chrome, and Firefox Nightly with Experimental Import Assertions enabled.
|
|
21
20
|
But when import Assertions are landing in Safari and Firefox they will work again.
|
|
22
21
|
And you could transpile them away in the meantime.
|
|
23
|
-
|
|
24
|
-
## Projects using it
|
|
25
|
-
|
|
26
|
-
A ZPL Designer included in a comercial Application:
|
|
27
|
-

|
|
28
|
-
|
|
29
|
-
A Materialflow Layout Editor in a comercial Application:
|
|
30
|
-

|
|
31
|
-
|
|
32
|
-
## Demo
|
|
33
|
-
|
|
34
|
-
look at: https://node-projects.github.io/web-component-designer-demo/index.html
|
|
35
|
-
repository: https://github.com/node-projects/web-component-designer-demo
|
|
36
|
-
|
|
37
|
-
or a simple one: https://node-projects.github.io/web-component-designer-simple-demo/index.html
|
|
38
|
-
repository: https://github.com/node-projects/web-component-designer-simple-demo
|
|
39
|
-
|
|
40
|
-
## What is needed
|
|
41
|
-
|
|
42
|
-
- @node-projects/base-custom-webcomponent a very small basic webcomponent library (maybe this will be included directly later, to be dependecy free)
|
|
43
|
-
- optional - ace code editor
|
|
44
|
-
- optional - monaco code editor (if you use code-view-monaco)
|
|
45
|
-
- optional - code mirror code editor (if you use code-view-codemirror) (workin but buggy)
|
|
46
|
-
- optional - fancytree (if you use tree-view-extended, palette-tree-view or bindable-objects-browser)
|
|
47
|
-
|
|
48
|
-
## Features we are workin on
|
|
49
|
-
|
|
50
|
-
https://github.com/node-projects/web-component-designer/issues
|
|
51
22
|
|
|
52
23
|
## Developing
|
|
53
24
|
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { ServiceContainer } from "../services/ServiceContainer.js";
|
|
2
|
-
import { PaletteTreeView } from "../widgets/paletteView/paletteTreeView.js";
|
|
3
2
|
export declare class NpmPackageLoader {
|
|
4
3
|
private static registryPatchedTohandleErrors;
|
|
5
4
|
private _packageSource;
|
|
6
5
|
private _dependecies;
|
|
7
6
|
constructor(packageSource?: string);
|
|
8
7
|
static patchCustomElementsRegistryToHandleErrors(): void;
|
|
9
|
-
loadNpmPackage(pkg: string, serviceContainer?: ServiceContainer, paletteTree?:
|
|
8
|
+
loadNpmPackage(pkg: string, serviceContainer?: ServiceContainer, paletteTree?: any, loadAllImports?: boolean, reportState?: (state: string) => void): Promise<{
|
|
10
9
|
html: string;
|
|
11
10
|
style: string;
|
|
12
11
|
}>;
|
package/dist/elements/{loader → services/manifestParsers}/OldCustomElementsManifestLoader.d.ts
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ServiceContainer } from '../
|
|
1
|
+
import { ServiceContainer } from '../ServiceContainer.js';
|
|
2
2
|
export declare class OldCustomElementsManifestLoader {
|
|
3
3
|
static loadManifest(serviceContainer: ServiceContainer, nodeModule: string, options?: {
|
|
4
4
|
name?: string;
|
package/dist/elements/{loader → services/manifestParsers}/OldCustomElementsManifestLoader.js
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { LazyLoader } from '@node-projects/base-custom-webcomponent';
|
|
2
|
-
import { PreDefinedElementsService } from '../
|
|
3
|
-
import { ListPropertiesService } from '../
|
|
2
|
+
import { PreDefinedElementsService } from '../elementsService/PreDefinedElementsService.js';
|
|
3
|
+
import { ListPropertiesService } from '../propertiesService/services/ListPropertiesService.js';
|
|
4
4
|
export class OldCustomElementsManifestLoader {
|
|
5
5
|
static async loadManifest(serviceContainer, nodeModule, options) {
|
|
6
6
|
const nodePath = './node_modules/';
|
package/dist/index.d.ts
CHANGED
|
@@ -8,7 +8,6 @@ export * from "./elements/helper/IndentedTextWriter.js";
|
|
|
8
8
|
export * from "./elements/helper/PathDataPolyfill.js";
|
|
9
9
|
export * from "./elements/helper/Screenshot.js";
|
|
10
10
|
export * from "./elements/helper/ClipboardHelper.js";
|
|
11
|
-
export * from "./elements/loader/OldCustomElementsManifestLoader.js";
|
|
12
11
|
export type { ITextWriter } from "./elements/helper/ITextWriter.js";
|
|
13
12
|
export * from "./elements/helper/w3color.js";
|
|
14
13
|
export * from "./elements/helper/contextMenu/ContextMenu.js";
|
|
@@ -21,6 +20,7 @@ export type { IDesignItem } from "./elements/item/IDesignItem.js";
|
|
|
21
20
|
export type { IBinding } from "./elements/item/IBinding.js";
|
|
22
21
|
export * from "./elements/item/BindingMode.js";
|
|
23
22
|
export * from "./elements/item/BindingTarget.js";
|
|
23
|
+
export * from "./elements/item/NodeType.js";
|
|
24
24
|
export * from "./elements/services/bindableObjectsService/BindableObjectType.js";
|
|
25
25
|
export type { IBindableObject } from "./elements/services/bindableObjectsService/IBindableObject.js";
|
|
26
26
|
export type { IBindableObjectsService } from "./elements/services/bindableObjectsService/IBindableObjectsService.js";
|
|
@@ -71,11 +71,7 @@ export * from "./elements/services/htmlWriterService/AbstractHtmlWriterService.j
|
|
|
71
71
|
export * from "./elements/services/htmlWriterService/FormatingHtmlWriterService.js";
|
|
72
72
|
export * from "./elements/services/htmlWriterService/HtmlWriterService.js";
|
|
73
73
|
export * from "./elements/services/htmlWriterService/LitTsElementWriterService.js";
|
|
74
|
-
export * from "./elements/services/htmlParserService/BaseCustomWebcomponentParserService.js";
|
|
75
74
|
export * from "./elements/services/htmlParserService/DefaultHtmlParserService.js";
|
|
76
|
-
export * from "./elements/services/htmlParserService/NodeHtmlParserService.js";
|
|
77
|
-
export * from "./elements/services/htmlParserService/LitElementParserService.js";
|
|
78
|
-
export * from "./elements/services/htmlParserService/VueParserService.js";
|
|
79
75
|
export type { IHtmlParserService } from "./elements/services/htmlParserService/IHtmlParserService.js";
|
|
80
76
|
export type { IIntializationService } from "./elements/services/initializationService/IIntializationService.js";
|
|
81
77
|
export * from "./elements/services/instanceService/DefaultInstanceService.js";
|
|
@@ -126,10 +122,8 @@ export * from "./elements/services/propertiesService/PropertyTabsService.js";
|
|
|
126
122
|
export type { ISelectionChangedEvent } from "./elements/services/selectionService/ISelectionChangedEvent.js";
|
|
127
123
|
export type { ISelectionService } from "./elements/services/selectionService/ISelectionService.js";
|
|
128
124
|
export * from "./elements/services/selectionService/SelectionService.js";
|
|
129
|
-
export type { IStyleRule, IStyleDeclaration, IStylesheet, IStylesheetService } from "./elements/services/stylesheetService/IStylesheetService.js";
|
|
130
|
-
export * from "./elements/services/stylesheetService/
|
|
131
|
-
export * from "./elements/services/stylesheetService/CssToolsStylesheetService.js";
|
|
132
|
-
export * from "./elements/services/stylesheetService/SpecificityCalculator.js";
|
|
125
|
+
export type { IStyleRule, IStyleDeclaration, IStylesheet, IStylesheetService, IDocumentStylesheet } from "./elements/services/stylesheetService/IStylesheetService.js";
|
|
126
|
+
export * from "./elements/services/stylesheetService/AbstractStylesheetService.js";
|
|
133
127
|
export * from "./elements/services/undoService/ChangeGroup.js";
|
|
134
128
|
export type { ITransactionItem } from "./elements/services/undoService/ITransactionItem.js";
|
|
135
129
|
export type { IUndoService } from "./elements/services/undoService/IUndoService.js";
|
|
@@ -147,7 +141,6 @@ export * from "./elements/services/InstanceServiceContainer.js";
|
|
|
147
141
|
export type { IService } from "./elements/services/IService.js";
|
|
148
142
|
export type { IServiceContainer } from "./elements/services/IServiceContainer.js";
|
|
149
143
|
export * from "./elements/services/ServiceContainer.js";
|
|
150
|
-
export * from "./elements/widgets/bindableObjectsBrowser/bindable-objects-browser.js";
|
|
151
144
|
export type { IBindableObjectsBrowser } from "./elements/widgets/bindableObjectsBrowser/IBindableObjectsBrowser.js";
|
|
152
145
|
export * from "./elements/widgets/propertyGrid/PropertyGrid.js";
|
|
153
146
|
export * from "./elements/widgets/propertyGrid/PropertyGridPropertyList.js";
|
|
@@ -233,8 +226,6 @@ export * from "./elements/widgets/designerView/extensions/buttons/StylesheetServ
|
|
|
233
226
|
export type { IDesignViewConfigButtonsProvider } from './elements/widgets/designerView/extensions/buttons/IDesignViewConfigButtonsProvider.js';
|
|
234
227
|
export * from "./elements/widgets/designerView/extensions/EditText/EditTextExtension.js";
|
|
235
228
|
export * from "./elements/widgets/designerView/extensions/EditText/EditTextExtensionProvider.js";
|
|
236
|
-
export * from "./elements/widgets/designerView/extensions/EditText/EditTextWithStyloExtension.js";
|
|
237
|
-
export * from "./elements/widgets/designerView/extensions/EditText/EditTextWithStyloExtensionProvider.js";
|
|
238
229
|
export type { IContextMenuExtension, ContextmenuInitiator } from "./elements/widgets/designerView/extensions/contextMenu/IContextMenuExtension.js";
|
|
239
230
|
export * from "./elements/widgets/designerView/extensions/contextMenu/CopyPasteContextMenu.js";
|
|
240
231
|
export * from "./elements/widgets/designerView/extensions/contextMenu/ItemsBelowContextMenu.js";
|
|
@@ -252,18 +243,14 @@ export type { IDesignerPointerExtensionProvider } from "./elements/widgets/desig
|
|
|
252
243
|
export * from "./elements/widgets/designerView/extensions/pointerExtensions/AbstractDesignerPointerExtension.js";
|
|
253
244
|
export * from "./elements/widgets/designerView/extensions/pointerExtensions/CursorLinePointerExtension.js";
|
|
254
245
|
export * from "./elements/widgets/designerView/extensions/pointerExtensions/CursorLinePointerExtensionProvider.js";
|
|
246
|
+
export type { IMiniatureView } from "./elements/widgets/miniatureView/IMiniatureView.js";
|
|
255
247
|
export * from "./elements/widgets/debugView/debug-view.js";
|
|
256
248
|
export * from "./elements/widgets/demoView/demoView.js";
|
|
257
249
|
export * from "./elements/widgets/paletteView/paletteElements.js";
|
|
258
250
|
export * from "./elements/widgets/paletteView/paletteView.js";
|
|
259
|
-
export * from "./elements/widgets/paletteView/paletteTreeView.js";
|
|
260
251
|
export type { ITreeView } from "./elements/widgets/treeView/ITreeView.js";
|
|
261
252
|
export * from "./elements/widgets/treeView/treeView.js";
|
|
262
|
-
export * from "./elements/widgets/treeView/treeViewExtended.js";
|
|
263
253
|
export type { ICodeView } from "./elements/widgets/codeView/ICodeView.js";
|
|
264
|
-
export * from "./elements/widgets/codeView/code-view-monaco.js";
|
|
265
|
-
export * from "./elements/widgets/codeView/code-view-ace.js";
|
|
266
|
-
export * from "./elements/widgets/codeView/code-view-code-mirror.js";
|
|
267
254
|
export * from "./elements/widgets/codeView/code-view-simple.js";
|
|
268
255
|
export * from "./elements/documentContainer.js";
|
|
269
256
|
export * from "./enums/EventNames.js";
|
package/dist/index.js
CHANGED
|
@@ -8,7 +8,6 @@ export * from "./elements/helper/IndentedTextWriter.js";
|
|
|
8
8
|
export * from "./elements/helper/PathDataPolyfill.js";
|
|
9
9
|
export * from "./elements/helper/Screenshot.js";
|
|
10
10
|
export * from "./elements/helper/ClipboardHelper.js";
|
|
11
|
-
export * from "./elements/loader/OldCustomElementsManifestLoader.js";
|
|
12
11
|
export * from "./elements/helper/w3color.js";
|
|
13
12
|
export * from "./elements/helper/contextMenu/ContextMenu.js";
|
|
14
13
|
export * from "./elements/helper/Helper.js";
|
|
@@ -17,6 +16,7 @@ export * from "./elements/helper/NpmPackageLoader.js";
|
|
|
17
16
|
export * from "./elements/item/DesignItem.js";
|
|
18
17
|
export * from "./elements/item/BindingMode.js";
|
|
19
18
|
export * from "./elements/item/BindingTarget.js";
|
|
19
|
+
export * from "./elements/item/NodeType.js";
|
|
20
20
|
export * from "./elements/services/bindableObjectsService/BindableObjectType.js";
|
|
21
21
|
export * from "./elements/services/bindingsService/BaseCustomWebcomponentBindingsService.js";
|
|
22
22
|
export * from "./elements/services/placementService/DefaultPlacementService.js";
|
|
@@ -41,11 +41,7 @@ export * from "./elements/services/htmlWriterService/AbstractHtmlWriterService.j
|
|
|
41
41
|
export * from "./elements/services/htmlWriterService/FormatingHtmlWriterService.js";
|
|
42
42
|
export * from "./elements/services/htmlWriterService/HtmlWriterService.js";
|
|
43
43
|
export * from "./elements/services/htmlWriterService/LitTsElementWriterService.js";
|
|
44
|
-
export * from "./elements/services/htmlParserService/BaseCustomWebcomponentParserService.js";
|
|
45
44
|
export * from "./elements/services/htmlParserService/DefaultHtmlParserService.js";
|
|
46
|
-
export * from "./elements/services/htmlParserService/NodeHtmlParserService.js";
|
|
47
|
-
export * from "./elements/services/htmlParserService/LitElementParserService.js";
|
|
48
|
-
export * from "./elements/services/htmlParserService/VueParserService.js";
|
|
49
45
|
export * from "./elements/services/instanceService/DefaultInstanceService.js";
|
|
50
46
|
export * from "./elements/services/manifestParsers/WebcomponentManifestParserService.js";
|
|
51
47
|
export * from "./elements/services/modelCommandService/DefaultModelCommandService.js";
|
|
@@ -84,9 +80,7 @@ export * from "./elements/services/propertiesService/PropertyType.js";
|
|
|
84
80
|
export * from "./elements/services/propertiesService/ValueType.js";
|
|
85
81
|
export * from "./elements/services/propertiesService/PropertyTabsService.js";
|
|
86
82
|
export * from "./elements/services/selectionService/SelectionService.js";
|
|
87
|
-
export * from "./elements/services/stylesheetService/
|
|
88
|
-
export * from "./elements/services/stylesheetService/CssToolsStylesheetService.js";
|
|
89
|
-
export * from "./elements/services/stylesheetService/SpecificityCalculator.js";
|
|
83
|
+
export * from "./elements/services/stylesheetService/AbstractStylesheetService.js";
|
|
90
84
|
export * from "./elements/services/undoService/ChangeGroup.js";
|
|
91
85
|
export * from "./elements/services/undoService/UndoService.js";
|
|
92
86
|
export * from "./elements/services/undoService/transactionItems/AttributeChangeAction.js";
|
|
@@ -100,7 +94,6 @@ export * from "./elements/services/undoService/transactionItems/TextContentChang
|
|
|
100
94
|
export * from "./elements/services/BaseServiceContainer.js";
|
|
101
95
|
export * from "./elements/services/InstanceServiceContainer.js";
|
|
102
96
|
export * from "./elements/services/ServiceContainer.js";
|
|
103
|
-
export * from "./elements/widgets/bindableObjectsBrowser/bindable-objects-browser.js";
|
|
104
97
|
export * from "./elements/widgets/propertyGrid/PropertyGrid.js";
|
|
105
98
|
export * from "./elements/widgets/propertyGrid/PropertyGridPropertyList.js";
|
|
106
99
|
export * from "./elements/widgets/propertyGrid/PropertyGridWithHeader.js";
|
|
@@ -177,8 +170,6 @@ export * from "./elements/widgets/designerView/extensions/buttons/ButtonSeperato
|
|
|
177
170
|
export * from "./elements/widgets/designerView/extensions/buttons/StylesheetServiceDesignViewConfigButtons.js";
|
|
178
171
|
export * from "./elements/widgets/designerView/extensions/EditText/EditTextExtension.js";
|
|
179
172
|
export * from "./elements/widgets/designerView/extensions/EditText/EditTextExtensionProvider.js";
|
|
180
|
-
export * from "./elements/widgets/designerView/extensions/EditText/EditTextWithStyloExtension.js";
|
|
181
|
-
export * from "./elements/widgets/designerView/extensions/EditText/EditTextWithStyloExtensionProvider.js";
|
|
182
173
|
export * from "./elements/widgets/designerView/extensions/contextMenu/CopyPasteContextMenu.js";
|
|
183
174
|
export * from "./elements/widgets/designerView/extensions/contextMenu/ItemsBelowContextMenu.js";
|
|
184
175
|
export * from "./elements/widgets/designerView/extensions/contextMenu/MultipleItemsSelectedContextMenu.js";
|
|
@@ -197,12 +188,7 @@ export * from "./elements/widgets/debugView/debug-view.js";
|
|
|
197
188
|
export * from "./elements/widgets/demoView/demoView.js";
|
|
198
189
|
export * from "./elements/widgets/paletteView/paletteElements.js";
|
|
199
190
|
export * from "./elements/widgets/paletteView/paletteView.js";
|
|
200
|
-
export * from "./elements/widgets/paletteView/paletteTreeView.js";
|
|
201
191
|
export * from "./elements/widgets/treeView/treeView.js";
|
|
202
|
-
export * from "./elements/widgets/treeView/treeViewExtended.js";
|
|
203
|
-
export * from "./elements/widgets/codeView/code-view-monaco.js";
|
|
204
|
-
export * from "./elements/widgets/codeView/code-view-ace.js";
|
|
205
|
-
export * from "./elements/widgets/codeView/code-view-code-mirror.js";
|
|
206
192
|
export * from "./elements/widgets/codeView/code-view-simple.js";
|
|
207
193
|
export * from "./elements/documentContainer.js";
|
|
208
194
|
export * from "./enums/EventNames.js";
|
package/package.json
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"description": "A UI designer for Polymer apps",
|
|
3
3
|
"name": "@node-projects/web-component-designer",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.1.1",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
|
-
"author": "",
|
|
7
|
+
"author": "jochen.kuehner@gmx.de",
|
|
8
8
|
"license": "MIT",
|
|
9
9
|
"scripts": {
|
|
10
10
|
"tsc": "tsc",
|
|
11
|
-
"test": "node --experimental-vm-modules node_modules/jest/bin/jest.js",
|
|
12
11
|
"build": "tsc",
|
|
13
12
|
"prepublishOnly": "npm run build"
|
|
14
13
|
},
|
|
@@ -16,28 +15,7 @@
|
|
|
16
15
|
"@node-projects/base-custom-webcomponent": "^0.17.2"
|
|
17
16
|
},
|
|
18
17
|
"devDependencies": {
|
|
19
|
-
"
|
|
20
|
-
"@node-projects/lean-he-esm": "^3.3.0",
|
|
21
|
-
"@node-projects/node-html-parser-esm": "^6.1.5",
|
|
22
|
-
"@papyrs/stylo": "^0.0.45",
|
|
23
|
-
"@types/codemirror": "^5.60.10",
|
|
24
|
-
"@types/css-tree": "^2.3.2",
|
|
25
|
-
"@types/jquery": "^3.5.18",
|
|
26
|
-
"@types/jquery.fancytree": "0.0.7",
|
|
27
|
-
"@types/node": "^20.5.9",
|
|
28
|
-
"ace-builds": "^1.24.1",
|
|
29
|
-
"codemirror": "^5.0.0",
|
|
30
|
-
"css-tree": "^2.3.1",
|
|
31
|
-
"esprima-next": "^5.8.4",
|
|
32
|
-
"html2canvas": "*",
|
|
33
|
-
"jest": "^29.6.4",
|
|
34
|
-
"jquery": "^3.7.1",
|
|
35
|
-
"jquery.fancytree": "^2.38.3",
|
|
36
|
-
"mdn-data": "^2.1.0",
|
|
37
|
-
"monaco-editor": "^0.41.0",
|
|
38
|
-
"ts-jest": "^29.1.1",
|
|
39
|
-
"typescript": "^5.2.2",
|
|
40
|
-
"typescript-lit-html-plugin": "^0.9.0"
|
|
18
|
+
"mdn-data": "^2.1.0"
|
|
41
19
|
},
|
|
42
20
|
"repository": {
|
|
43
21
|
"type": "git",
|
package/.editorconfig
DELETED
package/.github/FUNDING.yml
DELETED
package/.vscode/settings.json
DELETED
package/ACKNOWLEDGMENTS
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
# Acknowledgments
|
|
2
|
-
|
|
3
|
-
- Thanks to @notwaldorf who created the original `wizzywid` project (MIT License).
|
|
4
|
-
https://github.com/PolymerLabs/wizzywid
|
|
5
|
-
This was a start for this whole project (even if mostly nothing of the original code is left)
|
|
6
|
-
- Thanks to @chdh for plain-scrollbar component
|
|
7
|
-
https://github.com/chdh/plain-scrollbar
|
|
8
|
-
- Thanks to @m-thalmann for contextmenujs
|
|
9
|
-
https://github.com/m-thalmann/contextmenujs (also we have heavily modified it)
|
|
10
|
-
- Levi Cole for parts of the cssUnits conversion code
|
|
11
|
-
https://stackoverflow.com/a/66569574/579623
|
|
12
|
-
- Domi for text-width code
|
|
13
|
-
https://stackoverflow.com/a/21015393
|
|
14
|
-
- gwwar for getColsestStackingContext
|
|
15
|
-
https://github.com/gwwar/z-context
|
package/LICENSE
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2021 node-projects
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { InstanceServiceContainer } from "../InstanceServiceContainer.js";
|
|
2
|
-
import { ServiceContainer } from "../ServiceContainer.js";
|
|
3
|
-
import { IDemoProviderService } from "./IDemoProviderService.js";
|
|
4
|
-
export declare class DemoProviderService implements IDemoProviderService {
|
|
5
|
-
provideDemo(container: HTMLElement, serviceContainer: ServiceContainer, instanceServiceContainer: InstanceServiceContainer, code: string, style: string): Promise<void>;
|
|
6
|
-
}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { DomHelper } from '@node-projects/base-custom-webcomponent/dist/DomHelper.js';
|
|
2
|
-
export class DemoProviderService {
|
|
3
|
-
provideDemo(container, serviceContainer, instanceServiceContainer, code, style) {
|
|
4
|
-
return new Promise(resolve => {
|
|
5
|
-
const iframe = document.createElement('iframe');
|
|
6
|
-
iframe.style.width = '100%';
|
|
7
|
-
iframe.style.height = '100%';
|
|
8
|
-
iframe.style.border = 'none';
|
|
9
|
-
iframe.style.display = 'none';
|
|
10
|
-
DomHelper.removeAllChildnodes(container);
|
|
11
|
-
container.appendChild(iframe);
|
|
12
|
-
iframe.onload = () => {
|
|
13
|
-
iframe.style.display = 'block';
|
|
14
|
-
resolve();
|
|
15
|
-
};
|
|
16
|
-
const doc = iframe.contentWindow.document;
|
|
17
|
-
doc.open();
|
|
18
|
-
doc.write('<script type="module">');
|
|
19
|
-
if (instanceServiceContainer.designContext.npmPackages?.length) {
|
|
20
|
-
doc.write("import { NpmPackageLoader } from '../../helper/NpmPackageLoader.js'");
|
|
21
|
-
doc.write("let loader = new NpmPackageLoader();");
|
|
22
|
-
for (let p of instanceServiceContainer.designContext.npmPackages) {
|
|
23
|
-
doc.write("loader.loadNpmPackage('" + p + "', null, null, true);");
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
if (instanceServiceContainer.designContext.imports?.length) {
|
|
27
|
-
for (let i of instanceServiceContainer.designContext.imports) {
|
|
28
|
-
doc.write("import '" + i + "';");
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
doc.write("document.body.style.display='';");
|
|
32
|
-
doc.write('</script>');
|
|
33
|
-
doc.write('<style>' + (style ?? '') + '</style>');
|
|
34
|
-
doc.write('<body style="display:none; width: 100%; height: 100%; margin: 0; padding: 0; position: absolute;">' + code + '</body>');
|
|
35
|
-
doc.close();
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { InstanceServiceContainer } from "../InstanceServiceContainer.js";
|
|
2
|
-
import { ServiceContainer } from "../ServiceContainer.js";
|
|
3
|
-
import { IDemoProviderService } from "./IDemoProviderService.js";
|
|
4
|
-
export declare class IframeDemoProviderService implements IDemoProviderService {
|
|
5
|
-
provideDemo(container: HTMLElement, serviceContainer: ServiceContainer, instanceServiceContainer: InstanceServiceContainer, code: string, style: string): Promise<void>;
|
|
6
|
-
}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { DomHelper } from '@node-projects/base-custom-webcomponent/dist/DomHelper.js';
|
|
2
|
-
export class IframeDemoProviderService {
|
|
3
|
-
provideDemo(container, serviceContainer, instanceServiceContainer, code, style) {
|
|
4
|
-
return new Promise(resolve => {
|
|
5
|
-
const iframe = document.createElement('iframe');
|
|
6
|
-
iframe.style.width = '100%';
|
|
7
|
-
iframe.style.height = '100%';
|
|
8
|
-
iframe.style.border = 'none';
|
|
9
|
-
iframe.style.display = 'none';
|
|
10
|
-
DomHelper.removeAllChildnodes(container);
|
|
11
|
-
container.appendChild(iframe);
|
|
12
|
-
iframe.onload = () => {
|
|
13
|
-
iframe.style.display = 'block';
|
|
14
|
-
resolve();
|
|
15
|
-
};
|
|
16
|
-
const doc = iframe.contentWindow.document;
|
|
17
|
-
doc.open();
|
|
18
|
-
doc.write('<script type="module">');
|
|
19
|
-
if (instanceServiceContainer.designContext.npmPackages?.length) {
|
|
20
|
-
doc.write("import { NpmPackageLoader } from '../../helper/NpmPackageLoader.js'");
|
|
21
|
-
doc.write("let loader = new NpmPackageLoader();");
|
|
22
|
-
for (let p of instanceServiceContainer.designContext.npmPackages) {
|
|
23
|
-
doc.write("loader.loadNpmPackage('" + p + "', null, null, true);");
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
if (instanceServiceContainer.designContext.imports?.length) {
|
|
27
|
-
for (let i of instanceServiceContainer.designContext.imports) {
|
|
28
|
-
doc.write("import '" + i + "';");
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
doc.write("document.body.style.display='';");
|
|
32
|
-
doc.write('</script>');
|
|
33
|
-
doc.write('<style>' + (style ?? '') + '</style>');
|
|
34
|
-
doc.write('<body style="display:none; width: 100%; height: 100%; margin: 0; padding: 0; position: absolute;">' + code + '</body>');
|
|
35
|
-
doc.close();
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { InstanceServiceContainer } from '../InstanceServiceContainer.js';
|
|
2
|
-
import { ServiceContainer } from '../ServiceContainer.js';
|
|
3
|
-
import { IHtmlParserService } from './IHtmlParserService.js';
|
|
4
|
-
import { IDesignItem } from '../../item/IDesignItem.js';
|
|
5
|
-
export declare class BaseCustomWebcomponentParserService implements IHtmlParserService {
|
|
6
|
-
private htmlParser;
|
|
7
|
-
constructor(htmlParser: IHtmlParserService);
|
|
8
|
-
parse(code: string, serviceContainer: ServiceContainer, instanceServiceContainer: InstanceServiceContainer, parseSnippet: boolean): Promise<IDesignItem[]>;
|
|
9
|
-
writeBack(code: string, html: string, css: string, newLineCrLf: boolean): string;
|
|
10
|
-
private parseTypescriptFile;
|
|
11
|
-
}
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
function* findAllNodesOfKind(node, kind) {
|
|
2
|
-
if (node.kind == kind)
|
|
3
|
-
yield node;
|
|
4
|
-
for (const c of node.getChildren())
|
|
5
|
-
yield* findAllNodesOfKind(c, kind);
|
|
6
|
-
}
|
|
7
|
-
export class BaseCustomWebcomponentParserService {
|
|
8
|
-
htmlParser;
|
|
9
|
-
constructor(htmlParser) {
|
|
10
|
-
this.htmlParser = htmlParser;
|
|
11
|
-
}
|
|
12
|
-
async parse(code, serviceContainer, instanceServiceContainer, parseSnippet) {
|
|
13
|
-
const sourceFile = this.parseTypescriptFile(code);
|
|
14
|
-
let htmlCode = "";
|
|
15
|
-
let cssStyle = "";
|
|
16
|
-
//@ts-ignore
|
|
17
|
-
const nodes = findAllNodesOfKind(sourceFile, ts.SyntaxKind.TaggedTemplateExpression);
|
|
18
|
-
for (let nd of nodes) {
|
|
19
|
-
if (nd.tag.escapedText == 'html' && nd.parent.name.escapedText == "template")
|
|
20
|
-
htmlCode = nd.template.rawText;
|
|
21
|
-
if (nd.tag.escapedText == 'css' && nd.parent.name.escapedText == "style")
|
|
22
|
-
cssStyle = nd.template.rawText;
|
|
23
|
-
}
|
|
24
|
-
if (cssStyle)
|
|
25
|
-
instanceServiceContainer.stylesheetService.setStylesheets([{ name: 'css', content: cssStyle }]);
|
|
26
|
-
return this.htmlParser.parse(htmlCode, serviceContainer, instanceServiceContainer, parseSnippet);
|
|
27
|
-
}
|
|
28
|
-
writeBack(code, html, css, newLineCrLf) {
|
|
29
|
-
const sourceFile = this.parseTypescriptFile(code);
|
|
30
|
-
const transformTemplateLiterals = (context) => (rootNode) => {
|
|
31
|
-
function visit(node) {
|
|
32
|
-
//@ts-ignore
|
|
33
|
-
if (ts.isTemplateLiteral(node) &&
|
|
34
|
-
//@ts-ignore
|
|
35
|
-
ts.isTaggedTemplateExpression(node.parent) &&
|
|
36
|
-
node.parent.tag.escapedText == 'html' &&
|
|
37
|
-
node.parent.parent.name.escapedText == "template") {
|
|
38
|
-
//@ts-ignore
|
|
39
|
-
return ts.factory.createNoSubstitutionTemplateLiteral(html.replaceAll('\n', '\r\n'), html.replaceAll('\n', '\r\n'));
|
|
40
|
-
}
|
|
41
|
-
else if (css &&
|
|
42
|
-
//@ts-ignore
|
|
43
|
-
ts.isTemplateLiteral(node) &&
|
|
44
|
-
//@ts-ignore
|
|
45
|
-
ts.isTaggedTemplateExpression(node.parent) &&
|
|
46
|
-
node.parent.tag.escapedText == 'css' &&
|
|
47
|
-
node.parent.parent.name.escapedText == "style") {
|
|
48
|
-
//@ts-ignore
|
|
49
|
-
return ts.factory.createNoSubstitutionTemplateLiteral(css.replaceAll('\n', '\r\n'), css.replaceAll('\n', '\r\n'));
|
|
50
|
-
}
|
|
51
|
-
//@ts-ignore
|
|
52
|
-
return ts.visitEachChild(node, visit, context);
|
|
53
|
-
}
|
|
54
|
-
//@ts-ignore
|
|
55
|
-
return ts.visitNode(rootNode, visit);
|
|
56
|
-
};
|
|
57
|
-
//@ts-ignore
|
|
58
|
-
let transformed = ts.transform(sourceFile, [transformTemplateLiterals]).transformed[0];
|
|
59
|
-
//@ts-ignore
|
|
60
|
-
const printer = ts.createPrinter({ newLine: newLineCrLf ? ts.NewLineKind.CarriageReturnLineFeed : ts.NewLineKind.LineFeed });
|
|
61
|
-
//@ts-ignore
|
|
62
|
-
const result = printer.printNode(ts.EmitHint.Unspecified, transformed, transformed);
|
|
63
|
-
return result;
|
|
64
|
-
}
|
|
65
|
-
parseTypescriptFile(code) {
|
|
66
|
-
const compilerHost = {
|
|
67
|
-
fileExists: () => true,
|
|
68
|
-
getCanonicalFileName: filename => filename,
|
|
69
|
-
getCurrentDirectory: () => '',
|
|
70
|
-
getDefaultLibFileName: () => 'lib.d.ts',
|
|
71
|
-
getNewLine: () => '\n',
|
|
72
|
-
getSourceFile: filename => {
|
|
73
|
-
//@ts-ignore
|
|
74
|
-
return ts.createSourceFile(filename, code, ts.ScriptTarget.Latest, true);
|
|
75
|
-
},
|
|
76
|
-
readFile: () => null,
|
|
77
|
-
useCaseSensitiveFileNames: () => true,
|
|
78
|
-
writeFile: () => null,
|
|
79
|
-
};
|
|
80
|
-
const filename = 'aa.ts';
|
|
81
|
-
//@ts-ignore
|
|
82
|
-
const program = ts.createProgram([filename], {
|
|
83
|
-
noResolve: true,
|
|
84
|
-
//@ts-ignore
|
|
85
|
-
target: ts.ScriptTarget.Latest,
|
|
86
|
-
}, compilerHost);
|
|
87
|
-
const sourceFile = program.getSourceFile(filename);
|
|
88
|
-
return sourceFile;
|
|
89
|
-
}
|
|
90
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { InstanceServiceContainer } from '../InstanceServiceContainer.js';
|
|
2
|
-
import { ServiceContainer } from '../ServiceContainer.js';
|
|
3
|
-
import { IHtmlParserService } from './IHtmlParserService.js';
|
|
4
|
-
import { IDesignItem } from '../../item/IDesignItem.js';
|
|
5
|
-
export declare class LitElementParserService implements IHtmlParserService {
|
|
6
|
-
private _parserUrl;
|
|
7
|
-
private _esprimaUrl;
|
|
8
|
-
constructor(parserUrl?: string, esprimaUrl?: string);
|
|
9
|
-
parse(module: string, serviceContainer: ServiceContainer, instanceServiceContainer: InstanceServiceContainer, parseSnippet: boolean): Promise<IDesignItem[]>;
|
|
10
|
-
private _parseDiv;
|
|
11
|
-
_createDesignItemsRecursive(item: any, serviceContainer: ServiceContainer, instanceServiceContainer: InstanceServiceContainer, namespace: string): IDesignItem;
|
|
12
|
-
}
|