kritzel-angular 0.1.1 → 0.1.3
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.
|
@@ -3,6 +3,9 @@ import * as i0 from '@angular/core';
|
|
|
3
3
|
import { EventEmitter, Output, ChangeDetectionStrategy, Component, makeEnvironmentProviders, provideAppInitializer } from '@angular/core';
|
|
4
4
|
import { fromEvent } from 'rxjs';
|
|
5
5
|
import { defineCustomElement as defineCustomElement$1 } from 'kritzel-stencil/dist/components/kritzel-editor.js';
|
|
6
|
+
import { defineCustomElement as defineCustomElement$2 } from 'kritzel-stencil/dist/components/kritzel-line-endings.js';
|
|
7
|
+
import { defineCustomElement as defineCustomElement$3 } from 'kritzel-stencil/dist/components/kritzel-opacity-slider.js';
|
|
8
|
+
import { defineCustomElement as defineCustomElement$4 } from 'kritzel-stencil/dist/components/kritzel-shape-fill.js';
|
|
6
9
|
import { defineCustomElements } from 'kritzel-stencil/loader';
|
|
7
10
|
export { DEFAULT_BRUSH_CONFIG, DEFAULT_TEXT_CONFIG, KritzelBrushTool, KritzelEraserTool, KritzelImage, KritzelImageTool, KritzelPath, KritzelSelectionTool, KritzelText, KritzelTextTool } from 'kritzel-stencil';
|
|
8
11
|
|
|
@@ -100,9 +103,99 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
|
|
|
100
103
|
}], undoStateChange: [{
|
|
101
104
|
type: Output
|
|
102
105
|
}] } });
|
|
106
|
+
let KritzelLineEndings = class KritzelLineEndings {
|
|
107
|
+
constructor(c, r, z) {
|
|
108
|
+
this.z = z;
|
|
109
|
+
this.valueChange = new EventEmitter();
|
|
110
|
+
c.detach();
|
|
111
|
+
this.el = r.nativeElement;
|
|
112
|
+
}
|
|
113
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: KritzelLineEndings, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
114
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.0.6", type: KritzelLineEndings, isStandalone: true, selector: "kritzel-line-endings", inputs: { strokeColor: "strokeColor", styles: "styles", value: "value" }, outputs: { valueChange: "valueChange" }, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
115
|
+
};
|
|
116
|
+
KritzelLineEndings = __decorate([
|
|
117
|
+
ProxyCmp({
|
|
118
|
+
defineCustomElementFn: defineCustomElement$2,
|
|
119
|
+
inputs: ['strokeColor', 'styles', 'value']
|
|
120
|
+
})
|
|
121
|
+
], KritzelLineEndings);
|
|
122
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: KritzelLineEndings, decorators: [{
|
|
123
|
+
type: Component,
|
|
124
|
+
args: [{
|
|
125
|
+
selector: 'kritzel-line-endings',
|
|
126
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
127
|
+
template: '<ng-content></ng-content>',
|
|
128
|
+
// eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
|
|
129
|
+
inputs: ['strokeColor', 'styles', 'value'],
|
|
130
|
+
outputs: ['valueChange'],
|
|
131
|
+
}]
|
|
132
|
+
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i0.NgZone }], propDecorators: { valueChange: [{
|
|
133
|
+
type: Output
|
|
134
|
+
}] } });
|
|
135
|
+
let KritzelOpacitySlider = class KritzelOpacitySlider {
|
|
136
|
+
constructor(c, r, z) {
|
|
137
|
+
this.z = z;
|
|
138
|
+
this.valueChange = new EventEmitter();
|
|
139
|
+
c.detach();
|
|
140
|
+
this.el = r.nativeElement;
|
|
141
|
+
}
|
|
142
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: KritzelOpacitySlider, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
143
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.0.6", type: KritzelOpacitySlider, isStandalone: true, selector: "kritzel-opacity-slider", inputs: { max: "max", min: "min", previewColor: "previewColor", step: "step", value: "value" }, outputs: { valueChange: "valueChange" }, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
144
|
+
};
|
|
145
|
+
KritzelOpacitySlider = __decorate([
|
|
146
|
+
ProxyCmp({
|
|
147
|
+
defineCustomElementFn: defineCustomElement$3,
|
|
148
|
+
inputs: ['max', 'min', 'previewColor', 'step', 'value']
|
|
149
|
+
})
|
|
150
|
+
], KritzelOpacitySlider);
|
|
151
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: KritzelOpacitySlider, decorators: [{
|
|
152
|
+
type: Component,
|
|
153
|
+
args: [{
|
|
154
|
+
selector: 'kritzel-opacity-slider',
|
|
155
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
156
|
+
template: '<ng-content></ng-content>',
|
|
157
|
+
// eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
|
|
158
|
+
inputs: ['max', 'min', 'previewColor', 'step', 'value'],
|
|
159
|
+
outputs: ['valueChange'],
|
|
160
|
+
}]
|
|
161
|
+
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i0.NgZone }], propDecorators: { valueChange: [{
|
|
162
|
+
type: Output
|
|
163
|
+
}] } });
|
|
164
|
+
let KritzelShapeFill = class KritzelShapeFill {
|
|
165
|
+
constructor(c, r, z) {
|
|
166
|
+
this.z = z;
|
|
167
|
+
this.valueChange = new EventEmitter();
|
|
168
|
+
c.detach();
|
|
169
|
+
this.el = r.nativeElement;
|
|
170
|
+
}
|
|
171
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: KritzelShapeFill, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
172
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.0.6", type: KritzelShapeFill, isStandalone: true, selector: "kritzel-shape-fill", inputs: { value: "value" }, outputs: { valueChange: "valueChange" }, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
173
|
+
};
|
|
174
|
+
KritzelShapeFill = __decorate([
|
|
175
|
+
ProxyCmp({
|
|
176
|
+
defineCustomElementFn: defineCustomElement$4,
|
|
177
|
+
inputs: ['value']
|
|
178
|
+
})
|
|
179
|
+
], KritzelShapeFill);
|
|
180
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: KritzelShapeFill, decorators: [{
|
|
181
|
+
type: Component,
|
|
182
|
+
args: [{
|
|
183
|
+
selector: 'kritzel-shape-fill',
|
|
184
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
185
|
+
template: '<ng-content></ng-content>',
|
|
186
|
+
// eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
|
|
187
|
+
inputs: ['value'],
|
|
188
|
+
outputs: ['valueChange'],
|
|
189
|
+
}]
|
|
190
|
+
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i0.NgZone }], propDecorators: { valueChange: [{
|
|
191
|
+
type: Output
|
|
192
|
+
}] } });
|
|
103
193
|
|
|
104
194
|
const DIRECTIVES = [
|
|
105
|
-
KritzelEditor
|
|
195
|
+
KritzelEditor,
|
|
196
|
+
KritzelLineEndings,
|
|
197
|
+
KritzelOpacitySlider,
|
|
198
|
+
KritzelShapeFill
|
|
106
199
|
];
|
|
107
200
|
|
|
108
201
|
function provideKritzel() {
|
|
@@ -118,5 +211,5 @@ function provideKritzel() {
|
|
|
118
211
|
* Generated bundle index. Do not edit.
|
|
119
212
|
*/
|
|
120
213
|
|
|
121
|
-
export { DIRECTIVES, KritzelEditor, provideKritzel };
|
|
214
|
+
export { DIRECTIVES, KritzelEditor, KritzelLineEndings, KritzelOpacitySlider, KritzelShapeFill, provideKritzel };
|
|
122
215
|
//# sourceMappingURL=kritzel-angular.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kritzel-angular.mjs","sources":["../../../projects/lib/src/lib/angular-component-lib/utils.ts","../../../projects/lib/src/lib/proxy.ts","../../../projects/lib/src/lib/index.ts","../../../projects/lib/src/lib/provide.function.ts","../../../projects/lib/src/kritzel-angular.ts"],"sourcesContent":["/* eslint-disable */\n/* tslint:disable */\nimport { fromEvent } from 'rxjs';\n\nexport const proxyInputs = (Cmp: any, inputs: string[]) => {\n const Prototype = Cmp.prototype;\n inputs.forEach((item) => {\n Object.defineProperty(Prototype, item, {\n get() {\n return this.el[item];\n },\n set(val: any) {\n this.z.runOutsideAngular(() => (this.el[item] = val));\n },\n /**\n * In the event that proxyInputs is called\n * multiple times re-defining these inputs\n * will cause an error to be thrown. As a result\n * we set configurable: true to indicate these\n * properties can be changed.\n */\n configurable: true,\n });\n });\n};\n\nexport const proxyMethods = (Cmp: any, methods: string[]) => {\n const Prototype = Cmp.prototype;\n methods.forEach((methodName) => {\n Prototype[methodName] = function () {\n const args = arguments;\n return this.z.runOutsideAngular(() => this.el[methodName].apply(this.el, args));\n };\n });\n};\n\nexport const proxyOutputs = (instance: any, el: any, events: string[]) => {\n events.forEach((eventName) => (instance[eventName] = fromEvent(el, eventName)));\n};\n\nexport const defineCustomElement = (tagName: string, customElement: any) => {\n if (customElement !== undefined && typeof customElements !== 'undefined' && !customElements.get(tagName)) {\n customElements.define(tagName, customElement);\n }\n};\n\n// tslint:disable-next-line: only-arrow-functions\nexport function ProxyCmp(opts: { defineCustomElementFn?: () => void; inputs?: any; methods?: any }) {\n const decorator = function (cls: any) {\n const { defineCustomElementFn, inputs, methods } = opts;\n\n if (defineCustomElementFn !== undefined) {\n defineCustomElementFn();\n }\n\n if (inputs) {\n proxyInputs(cls, inputs);\n }\n if (methods) {\n proxyMethods(cls, methods);\n }\n return cls;\n };\n return decorator;\n}\n","/* tslint:disable */\n/* auto-generated angular directive proxies */\nimport { ChangeDetectionStrategy, ChangeDetectorRef, Component, ElementRef, EventEmitter, Output, NgZone } from '@angular/core';\n\nimport { ProxyCmp } from './angular-component-lib/utils';\n\nimport type { Components } from 'kritzel-stencil/dist/components';\n\nimport { defineCustomElement as defineKritzelEditor } from 'kritzel-stencil/dist/components/kritzel-editor.js';\n@ProxyCmp({\n defineCustomElementFn: defineKritzelEditor,\n inputs: ['controls', 'customSvgIcons', 'globalContextMenuItems', 'isControlsVisible', 'isUtilityPanelVisible', 'objectContextMenuItems', 'scaleMax', 'scaleMin', 'syncConfig'],\n methods: ['getObjectById', 'addObject', 'updateObject', 'removeObject', 'getSelectedObjects', 'selectObjects', 'selectAllObjectsInViewport', 'clearSelection', 'centerObjectInViewport', 'createWorkspace', 'updateWorkspace', 'deleteWorkspace', 'getWorkspaces', 'getActiveWorkspace']\n})\n@Component({\n selector: 'kritzel-editor',\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: '<ng-content></ng-content>',\n // eslint-disable-next-line @angular-eslint/no-inputs-metadata-property\n inputs: ['controls', 'customSvgIcons', 'globalContextMenuItems', 'isControlsVisible', 'isUtilityPanelVisible', 'objectContextMenuItems', 'scaleMax', 'scaleMin', 'syncConfig'],\n outputs: ['isReady', 'objectsChange', 'undoStateChange'],\n})\nexport class KritzelEditor {\n protected el: HTMLKritzelEditorElement;\n @Output() isReady = new EventEmitter<CustomEvent<HTMLElement>>();\n @Output() objectsChange = new EventEmitter<CustomEvent<IKritzelEditorKritzelBaseObject[]>>();\n @Output() undoStateChange = new EventEmitter<CustomEvent<IKritzelEditorKritzelUndoState>>();\n constructor(c: ChangeDetectorRef, r: ElementRef, protected z: NgZone) {\n c.detach();\n this.el = r.nativeElement;\n }\n}\n\n\nimport type { KritzelBaseObject as IKritzelEditorKritzelBaseObject } from 'kritzel-stencil/dist/components';\nimport type { KritzelUndoState as IKritzelEditorKritzelUndoState } from 'kritzel-stencil/dist/components';\n\nexport declare interface KritzelEditor extends Components.KritzelEditor {\n\n isReady: EventEmitter<CustomEvent<HTMLElement>>;\n\n objectsChange: EventEmitter<CustomEvent<IKritzelEditorKritzelBaseObject[]>>;\n\n undoStateChange: EventEmitter<CustomEvent<IKritzelEditorKritzelUndoState>>;\n}\n\n\n","\nimport * as d from './proxy';\n\nexport const DIRECTIVES = [\n d.KritzelEditor\n];\n","import {\r\n provideAppInitializer,\r\n EnvironmentProviders,\r\n makeEnvironmentProviders,\r\n} from '@angular/core';\r\nimport { defineCustomElements } from 'kritzel-stencil/loader';\r\n\r\nexport function provideKritzel(): EnvironmentProviders {\r\n return makeEnvironmentProviders([\r\n provideAppInitializer(() => {\r\n console.info('Initializing Kritzel custom elements');\r\n return defineCustomElements(window);\r\n }),\r\n ]);\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["defineKritzelEditor","d.KritzelEditor"],"mappings":";;;;;;;;AAAA;AACA;AAGO,MAAM,WAAW,GAAG,CAAC,GAAQ,EAAE,MAAgB,KAAI;AACxD,IAAA,MAAM,SAAS,GAAG,GAAG,CAAC,SAAS;AAC/B,IAAA,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,KAAI;AACtB,QAAA,MAAM,CAAC,cAAc,CAAC,SAAS,EAAE,IAAI,EAAE;YACrC,GAAG,GAAA;AACD,gBAAA,OAAO,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC;YACtB,CAAC;AACD,YAAA,GAAG,CAAC,GAAQ,EAAA;AACV,gBAAA,IAAI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}
|
|
1
|
+
{"version":3,"file":"kritzel-angular.mjs","sources":["../../../projects/lib/src/lib/angular-component-lib/utils.ts","../../../projects/lib/src/lib/proxy.ts","../../../projects/lib/src/lib/index.ts","../../../projects/lib/src/lib/provide.function.ts","../../../projects/lib/src/kritzel-angular.ts"],"sourcesContent":["/* eslint-disable */\n/* tslint:disable */\nimport { fromEvent } from 'rxjs';\n\nexport const proxyInputs = (Cmp: any, inputs: string[]) => {\n const Prototype = Cmp.prototype;\n inputs.forEach((item) => {\n Object.defineProperty(Prototype, item, {\n get() {\n return this.el[item];\n },\n set(val: any) {\n this.z.runOutsideAngular(() => (this.el[item] = val));\n },\n /**\n * In the event that proxyInputs is called\n * multiple times re-defining these inputs\n * will cause an error to be thrown. As a result\n * we set configurable: true to indicate these\n * properties can be changed.\n */\n configurable: true,\n });\n });\n};\n\nexport const proxyMethods = (Cmp: any, methods: string[]) => {\n const Prototype = Cmp.prototype;\n methods.forEach((methodName) => {\n Prototype[methodName] = function () {\n const args = arguments;\n return this.z.runOutsideAngular(() => this.el[methodName].apply(this.el, args));\n };\n });\n};\n\nexport const proxyOutputs = (instance: any, el: any, events: string[]) => {\n events.forEach((eventName) => (instance[eventName] = fromEvent(el, eventName)));\n};\n\nexport const defineCustomElement = (tagName: string, customElement: any) => {\n if (customElement !== undefined && typeof customElements !== 'undefined' && !customElements.get(tagName)) {\n customElements.define(tagName, customElement);\n }\n};\n\n// tslint:disable-next-line: only-arrow-functions\nexport function ProxyCmp(opts: { defineCustomElementFn?: () => void; inputs?: any; methods?: any }) {\n const decorator = function (cls: any) {\n const { defineCustomElementFn, inputs, methods } = opts;\n\n if (defineCustomElementFn !== undefined) {\n defineCustomElementFn();\n }\n\n if (inputs) {\n proxyInputs(cls, inputs);\n }\n if (methods) {\n proxyMethods(cls, methods);\n }\n return cls;\n };\n return decorator;\n}\n","/* tslint:disable */\n/* auto-generated angular directive proxies */\nimport { ChangeDetectionStrategy, ChangeDetectorRef, Component, ElementRef, EventEmitter, Output, NgZone } from '@angular/core';\n\nimport { ProxyCmp } from './angular-component-lib/utils';\n\nimport type { Components } from 'kritzel-stencil/dist/components';\n\nimport { defineCustomElement as defineKritzelEditor } from 'kritzel-stencil/dist/components/kritzel-editor.js';\nimport { defineCustomElement as defineKritzelLineEndings } from 'kritzel-stencil/dist/components/kritzel-line-endings.js';\nimport { defineCustomElement as defineKritzelOpacitySlider } from 'kritzel-stencil/dist/components/kritzel-opacity-slider.js';\nimport { defineCustomElement as defineKritzelShapeFill } from 'kritzel-stencil/dist/components/kritzel-shape-fill.js';\n@ProxyCmp({\n defineCustomElementFn: defineKritzelEditor,\n inputs: ['controls', 'customSvgIcons', 'globalContextMenuItems', 'isControlsVisible', 'isUtilityPanelVisible', 'objectContextMenuItems', 'scaleMax', 'scaleMin', 'syncConfig'],\n methods: ['getObjectById', 'addObject', 'updateObject', 'removeObject', 'getSelectedObjects', 'selectObjects', 'selectAllObjectsInViewport', 'clearSelection', 'centerObjectInViewport', 'createWorkspace', 'updateWorkspace', 'deleteWorkspace', 'getWorkspaces', 'getActiveWorkspace']\n})\n@Component({\n selector: 'kritzel-editor',\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: '<ng-content></ng-content>',\n // eslint-disable-next-line @angular-eslint/no-inputs-metadata-property\n inputs: ['controls', 'customSvgIcons', 'globalContextMenuItems', 'isControlsVisible', 'isUtilityPanelVisible', 'objectContextMenuItems', 'scaleMax', 'scaleMin', 'syncConfig'],\n outputs: ['isReady', 'objectsChange', 'undoStateChange'],\n})\nexport class KritzelEditor {\n protected el: HTMLKritzelEditorElement;\n @Output() isReady = new EventEmitter<CustomEvent<HTMLElement>>();\n @Output() objectsChange = new EventEmitter<CustomEvent<IKritzelEditorKritzelBaseObject[]>>();\n @Output() undoStateChange = new EventEmitter<CustomEvent<IKritzelEditorKritzelUndoState>>();\n constructor(c: ChangeDetectorRef, r: ElementRef, protected z: NgZone) {\n c.detach();\n this.el = r.nativeElement;\n }\n}\n\n\nimport type { KritzelBaseObject as IKritzelEditorKritzelBaseObject } from 'kritzel-stencil/dist/components';\nimport type { KritzelUndoState as IKritzelEditorKritzelUndoState } from 'kritzel-stencil/dist/components';\n\nexport declare interface KritzelEditor extends Components.KritzelEditor {\n\n isReady: EventEmitter<CustomEvent<HTMLElement>>;\n\n objectsChange: EventEmitter<CustomEvent<IKritzelEditorKritzelBaseObject[]>>;\n\n undoStateChange: EventEmitter<CustomEvent<IKritzelEditorKritzelUndoState>>;\n}\n\n\n@ProxyCmp({\n defineCustomElementFn: defineKritzelLineEndings,\n inputs: ['strokeColor', 'styles', 'value']\n})\n@Component({\n selector: 'kritzel-line-endings',\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: '<ng-content></ng-content>',\n // eslint-disable-next-line @angular-eslint/no-inputs-metadata-property\n inputs: ['strokeColor', 'styles', 'value'],\n outputs: ['valueChange'],\n})\nexport class KritzelLineEndings {\n protected el: HTMLKritzelLineEndingsElement;\n @Output() valueChange = new EventEmitter<CustomEvent<IKritzelLineEndingsLineArrowConfig>>();\n constructor(c: ChangeDetectorRef, r: ElementRef, protected z: NgZone) {\n c.detach();\n this.el = r.nativeElement;\n }\n}\n\n\nimport type { LineArrowConfig as IKritzelLineEndingsLineArrowConfig } from 'kritzel-stencil/dist/components';\n\nexport declare interface KritzelLineEndings extends Components.KritzelLineEndings {\n\n valueChange: EventEmitter<CustomEvent<IKritzelLineEndingsLineArrowConfig>>;\n}\n\n\n@ProxyCmp({\n defineCustomElementFn: defineKritzelOpacitySlider,\n inputs: ['max', 'min', 'previewColor', 'step', 'value']\n})\n@Component({\n selector: 'kritzel-opacity-slider',\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: '<ng-content></ng-content>',\n // eslint-disable-next-line @angular-eslint/no-inputs-metadata-property\n inputs: ['max', 'min', 'previewColor', 'step', 'value'],\n outputs: ['valueChange'],\n})\nexport class KritzelOpacitySlider {\n protected el: HTMLKritzelOpacitySliderElement;\n @Output() valueChange = new EventEmitter<CustomEvent<number>>();\n constructor(c: ChangeDetectorRef, r: ElementRef, protected z: NgZone) {\n c.detach();\n this.el = r.nativeElement;\n }\n}\n\n\nexport declare interface KritzelOpacitySlider extends Components.KritzelOpacitySlider {\n\n valueChange: EventEmitter<CustomEvent<number>>;\n}\n\n\n@ProxyCmp({\n defineCustomElementFn: defineKritzelShapeFill,\n inputs: ['value']\n})\n@Component({\n selector: 'kritzel-shape-fill',\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: '<ng-content></ng-content>',\n // eslint-disable-next-line @angular-eslint/no-inputs-metadata-property\n inputs: ['value'],\n outputs: ['valueChange'],\n})\nexport class KritzelShapeFill {\n protected el: HTMLKritzelShapeFillElement;\n @Output() valueChange = new EventEmitter<CustomEvent<IKritzelShapeFillShapeFillType>>();\n constructor(c: ChangeDetectorRef, r: ElementRef, protected z: NgZone) {\n c.detach();\n this.el = r.nativeElement;\n }\n}\n\n\nimport type { ShapeFillType as IKritzelShapeFillShapeFillType } from 'kritzel-stencil/dist/components';\n\nexport declare interface KritzelShapeFill extends Components.KritzelShapeFill {\n\n valueChange: EventEmitter<CustomEvent<IKritzelShapeFillShapeFillType>>;\n}\n\n\n","\nimport * as d from './proxy';\n\nexport const DIRECTIVES = [\n d.KritzelEditor,\n d.KritzelLineEndings,\n d.KritzelOpacitySlider,\n d.KritzelShapeFill\n];\n","import {\r\n provideAppInitializer,\r\n EnvironmentProviders,\r\n makeEnvironmentProviders,\r\n} from '@angular/core';\r\nimport { defineCustomElements } from 'kritzel-stencil/loader';\r\n\r\nexport function provideKritzel(): EnvironmentProviders {\r\n return makeEnvironmentProviders([\r\n provideAppInitializer(() => {\r\n console.info('Initializing Kritzel custom elements');\r\n return defineCustomElements(window);\r\n }),\r\n ]);\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["defineKritzelEditor","defineKritzelLineEndings","defineKritzelOpacitySlider","defineKritzelShapeFill","d.KritzelEditor","d.KritzelLineEndings","d.KritzelOpac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,EAAE,CAAC,OAAO;KACjB;AASY,CAAA,EAAA,gBAAgB,CAO5B;2FAPY,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAR5B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,oBAAoB;oBAC9B,eAAe,EAAE,uBAAuB,CAAC,MAAM;AAC/C,oBAAA,QAAQ,EAAE,2BAA2B;;oBAErC,MAAM,EAAE,CAAC,OAAO,CAAC;oBACjB,OAAO,EAAE,CAAC,aAAa,CAAC;AACzB,iBAAA;;sBAGE;;;ACvHI,MAAM,UAAU,GAAG;AACxB,IAAAC,aAAe;AACf,IAAAC,kBAAoB;AACpB,IAAAC,oBAAsB;AACtB,IAAAC;;;SCAc,cAAc,GAAA;AAC5B,IAAA,OAAO,wBAAwB,CAAC;QAC9B,qBAAqB,CAAC,MAAK;AACzB,YAAA,OAAO,CAAC,IAAI,CAAC,sCAAsC,CAAC;AACpD,YAAA,OAAO,oBAAoB,CAAC,MAAM,CAAC;AACrC,QAAA,CAAC,CAAC;AACH,KAAA,CAAC;AACJ;;ACdA;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "kritzel-angular",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@angular/common": "^19.0.0 || ^20.0.0 || ^21.0.0",
|
|
6
6
|
"@angular/core": "^19.0.0 || ^20.0.0 || ^21.0.0",
|
|
7
|
-
"kritzel-stencil": "^0.1.
|
|
7
|
+
"kritzel-stencil": "^0.1.3"
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
10
|
"tslib": "^2.3.0"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { NgZone, EventEmitter, ChangeDetectorRef, ElementRef, EnvironmentProviders } from '@angular/core';
|
|
3
|
-
import { KritzelBaseObject, KritzelUndoState, Components } from 'kritzel-stencil/dist/components';
|
|
3
|
+
import { KritzelBaseObject, KritzelUndoState, Components, LineArrowConfig, ShapeFillType } from 'kritzel-stencil/dist/components';
|
|
4
4
|
export { DEFAULT_BRUSH_CONFIG, DEFAULT_TEXT_CONFIG, KritzelBrushTool, KritzelEraserTool, KritzelImage, KritzelImageTool, KritzelPath, KritzelSelectionTool, KritzelText, KritzelTextTool, KritzelToolbarControl } from 'kritzel-stencil';
|
|
5
5
|
|
|
6
6
|
declare class KritzelEditor {
|
|
@@ -18,9 +18,42 @@ declare interface KritzelEditor extends Components.KritzelEditor {
|
|
|
18
18
|
objectsChange: EventEmitter<CustomEvent<KritzelBaseObject[]>>;
|
|
19
19
|
undoStateChange: EventEmitter<CustomEvent<KritzelUndoState>>;
|
|
20
20
|
}
|
|
21
|
+
declare class KritzelLineEndings {
|
|
22
|
+
protected z: NgZone;
|
|
23
|
+
protected el: HTMLKritzelLineEndingsElement;
|
|
24
|
+
valueChange: EventEmitter<CustomEvent<LineArrowConfig>>;
|
|
25
|
+
constructor(c: ChangeDetectorRef, r: ElementRef, z: NgZone);
|
|
26
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<KritzelLineEndings, never>;
|
|
27
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<KritzelLineEndings, "kritzel-line-endings", never, { "strokeColor": { "alias": "strokeColor"; "required": false; }; "styles": { "alias": "styles"; "required": false; }; "value": { "alias": "value"; "required": false; }; }, { "valueChange": "valueChange"; }, never, ["*"], true, never>;
|
|
28
|
+
}
|
|
29
|
+
declare interface KritzelLineEndings extends Components.KritzelLineEndings {
|
|
30
|
+
valueChange: EventEmitter<CustomEvent<LineArrowConfig>>;
|
|
31
|
+
}
|
|
32
|
+
declare class KritzelOpacitySlider {
|
|
33
|
+
protected z: NgZone;
|
|
34
|
+
protected el: HTMLKritzelOpacitySliderElement;
|
|
35
|
+
valueChange: EventEmitter<CustomEvent<number>>;
|
|
36
|
+
constructor(c: ChangeDetectorRef, r: ElementRef, z: NgZone);
|
|
37
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<KritzelOpacitySlider, never>;
|
|
38
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<KritzelOpacitySlider, "kritzel-opacity-slider", never, { "max": { "alias": "max"; "required": false; }; "min": { "alias": "min"; "required": false; }; "previewColor": { "alias": "previewColor"; "required": false; }; "step": { "alias": "step"; "required": false; }; "value": { "alias": "value"; "required": false; }; }, { "valueChange": "valueChange"; }, never, ["*"], true, never>;
|
|
39
|
+
}
|
|
40
|
+
declare interface KritzelOpacitySlider extends Components.KritzelOpacitySlider {
|
|
41
|
+
valueChange: EventEmitter<CustomEvent<number>>;
|
|
42
|
+
}
|
|
43
|
+
declare class KritzelShapeFill {
|
|
44
|
+
protected z: NgZone;
|
|
45
|
+
protected el: HTMLKritzelShapeFillElement;
|
|
46
|
+
valueChange: EventEmitter<CustomEvent<ShapeFillType>>;
|
|
47
|
+
constructor(c: ChangeDetectorRef, r: ElementRef, z: NgZone);
|
|
48
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<KritzelShapeFill, never>;
|
|
49
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<KritzelShapeFill, "kritzel-shape-fill", never, { "value": { "alias": "value"; "required": false; }; }, { "valueChange": "valueChange"; }, never, ["*"], true, never>;
|
|
50
|
+
}
|
|
51
|
+
declare interface KritzelShapeFill extends Components.KritzelShapeFill {
|
|
52
|
+
valueChange: EventEmitter<CustomEvent<ShapeFillType>>;
|
|
53
|
+
}
|
|
21
54
|
|
|
22
|
-
declare const DIRECTIVES: (typeof KritzelEditor)[];
|
|
55
|
+
declare const DIRECTIVES: (typeof KritzelEditor | typeof KritzelLineEndings | typeof KritzelOpacitySlider | typeof KritzelShapeFill)[];
|
|
23
56
|
|
|
24
57
|
declare function provideKritzel(): EnvironmentProviders;
|
|
25
58
|
|
|
26
|
-
export { DIRECTIVES, KritzelEditor, provideKritzel };
|
|
59
|
+
export { DIRECTIVES, KritzelEditor, KritzelLineEndings, KritzelOpacitySlider, KritzelShapeFill, provideKritzel };
|