kritzel-react 0.3.15 → 0.3.16
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.
|
@@ -7,6 +7,7 @@ import { KritzelButton as KritzelButtonElement, defineCustomElement as defineKri
|
|
|
7
7
|
import { KritzelCurrentUserDialog as KritzelCurrentUserDialogElement, defineCustomElement as defineKritzelCurrentUserDialog } from "../../../../kritzel-stencil/dist/components/kritzel-current-user-dialog.js";
|
|
8
8
|
import { KritzelDialog as KritzelDialogElement, defineCustomElement as defineKritzelDialog } from "../../../../kritzel-stencil/dist/components/kritzel-dialog.js";
|
|
9
9
|
import { KritzelEditor as KritzelEditorElement, defineCustomElement as defineKritzelEditor } from "../../../../kritzel-stencil/dist/components/kritzel-editor.js";
|
|
10
|
+
import { KritzelEngine as KritzelEngineElement, defineCustomElement as defineKritzelEngine } from "../../../../kritzel-stencil/dist/components/kritzel-engine.js";
|
|
10
11
|
import { KritzelExport as KritzelExportElement, defineCustomElement as defineKritzelExport } from "../../../../kritzel-stencil/dist/components/kritzel-export.js";
|
|
11
12
|
import { KritzelInput as KritzelInputElement, defineCustomElement as defineKritzelInput } from "../../../../kritzel-stencil/dist/components/kritzel-input.js";
|
|
12
13
|
import { KritzelLineEndings as KritzelLineEndingsElement, defineCustomElement as defineKritzelLineEndings } from "../../../../kritzel-stencil/dist/components/kritzel-line-endings.js";
|
|
@@ -81,6 +82,29 @@ export const KritzelEditor = /*@__PURE__*/ createComponent({
|
|
|
81
82
|
},
|
|
82
83
|
defineCustomElement: defineKritzelEditor
|
|
83
84
|
});
|
|
85
|
+
export const KritzelEngine = /*@__PURE__*/ createComponent({
|
|
86
|
+
tagName: 'kritzel-engine',
|
|
87
|
+
elementClass: KritzelEngineElement,
|
|
88
|
+
// @ts-ignore - ignore potential React type mismatches between the Stencil Output Target and your project.
|
|
89
|
+
react: React,
|
|
90
|
+
events: {
|
|
91
|
+
onIsEngineReady: 'isEngineReady',
|
|
92
|
+
onActiveToolChange: 'activeToolChange',
|
|
93
|
+
onObjectsSelectionChange: 'objectsSelectionChange',
|
|
94
|
+
onWorkspacesChange: 'workspacesChange',
|
|
95
|
+
onActiveWorkspaceChange: 'activeWorkspaceChange',
|
|
96
|
+
onLongpress: 'longpress',
|
|
97
|
+
onObjectsChange: 'objectsChange',
|
|
98
|
+
onObjectsAdded: 'objectsAdded',
|
|
99
|
+
onObjectsRemoved: 'objectsRemoved',
|
|
100
|
+
onObjectsUpdated: 'objectsUpdated',
|
|
101
|
+
onUndoStateChange: 'undoStateChange',
|
|
102
|
+
onObjectsInViewportChange: 'objectsInViewportChange',
|
|
103
|
+
onViewportChange: 'viewportChange',
|
|
104
|
+
onAwarenessChange: 'awarenessChange'
|
|
105
|
+
},
|
|
106
|
+
defineCustomElement: defineKritzelEngine
|
|
107
|
+
});
|
|
84
108
|
export const KritzelExport = /*@__PURE__*/ createComponent({
|
|
85
109
|
tagName: 'kritzel-export',
|
|
86
110
|
elementClass: KritzelExportElement,
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Changes to this file may cause incorrect behavior and will be lost if the code is regenerated.
|
|
4
4
|
*/
|
|
5
5
|
import type { EventName, StencilReactComponent } from '@stencil/react-output-target/runtime';
|
|
6
|
-
import { type ActiveWorkspaceChangeEvent, type EditorIsReadyEvent, type IKritzelDialogCloseEvent, type IKritzelIsPublicChangedEvent, type IKritzelMasterDetailSelectEvent, type KritzelBackToContentCustomEvent, type KritzelBaseObject, type KritzelButtonCustomEvent, type KritzelDialogCustomEvent, type KritzelEditorCustomEvent, type KritzelExportCustomEvent, type KritzelInputCustomEvent, type KritzelLineEndingsCustomEvent, type KritzelLoginDialogCustomEvent, type KritzelMasterDetailCustomEvent, type KritzelNumericInputCustomEvent, type KritzelOpacitySliderCustomEvent, type KritzelPillTabsCustomEvent, type KritzelSettingsConfig, type KritzelSettingsCustomEvent, type KritzelUndoState, type KritzelViewportState, type LineArrowConfig, type LoginEvent, type ObjectsAddedEvent, type ObjectsRemovedEvent, type ObjectsUpdatedEvent, type ThemeName } from "../../../../kritzel-stencil";
|
|
6
|
+
import { type ActiveWorkspaceChangeEvent, type EditorIsReadyEvent, type IKritzelDialogCloseEvent, type IKritzelIsPublicChangedEvent, type IKritzelMasterDetailSelectEvent, type KritzelBackToContentCustomEvent, type KritzelBaseObject, type KritzelBaseTool, type KritzelButtonCustomEvent, type KritzelDialogCustomEvent, type KritzelEditorCustomEvent, type KritzelEngineCustomEvent, type KritzelEngineState, type KritzelExportCustomEvent, type KritzelInputCustomEvent, type KritzelLineEndingsCustomEvent, type KritzelLoginDialogCustomEvent, type KritzelMasterDetailCustomEvent, type KritzelNumericInputCustomEvent, type KritzelOpacitySliderCustomEvent, type KritzelPillTabsCustomEvent, type KritzelSettingsConfig, type KritzelSettingsCustomEvent, type KritzelUndoState, type KritzelViewportState, type KritzelWorkspace, type LineArrowConfig, type LoginEvent, type ObjectsAddedEvent, type ObjectsInViewportChangeEvent, type ObjectsRemovedEvent, type ObjectsUpdatedEvent, type ThemeName } from "../../../../kritzel-stencil";
|
|
7
7
|
import type { Components } from "../../../../kritzel-stencil/dist/components";
|
|
8
8
|
import { KritzelAwarenessCursors as KritzelAwarenessCursorsElement } from "../../../../kritzel-stencil/dist/components/kritzel-awareness-cursors.js";
|
|
9
9
|
import { KritzelBackToContent as KritzelBackToContentElement } from "../../../../kritzel-stencil/dist/components/kritzel-back-to-content.js";
|
|
@@ -11,6 +11,7 @@ import { KritzelButton as KritzelButtonElement } from "../../../../kritzel-stenc
|
|
|
11
11
|
import { KritzelCurrentUserDialog as KritzelCurrentUserDialogElement } from "../../../../kritzel-stencil/dist/components/kritzel-current-user-dialog.js";
|
|
12
12
|
import { KritzelDialog as KritzelDialogElement } from "../../../../kritzel-stencil/dist/components/kritzel-dialog.js";
|
|
13
13
|
import { KritzelEditor as KritzelEditorElement } from "../../../../kritzel-stencil/dist/components/kritzel-editor.js";
|
|
14
|
+
import { KritzelEngine as KritzelEngineElement } from "../../../../kritzel-stencil/dist/components/kritzel-engine.js";
|
|
14
15
|
import { KritzelExport as KritzelExportElement } from "../../../../kritzel-stencil/dist/components/kritzel-export.js";
|
|
15
16
|
import { KritzelInput as KritzelInputElement } from "../../../../kritzel-stencil/dist/components/kritzel-input.js";
|
|
16
17
|
import { KritzelLineEndings as KritzelLineEndingsElement } from "../../../../kritzel-stencil/dist/components/kritzel-line-endings.js";
|
|
@@ -53,6 +54,23 @@ export type KritzelEditorEvents = {
|
|
|
53
54
|
onAwarenessChange: EventName<KritzelEditorCustomEvent<Map<number, Record<string, any>>>>;
|
|
54
55
|
};
|
|
55
56
|
export declare const KritzelEditor: StencilReactComponent<KritzelEditorElement, KritzelEditorEvents, Components.KritzelEditor>;
|
|
57
|
+
export type KritzelEngineEvents = {
|
|
58
|
+
onIsEngineReady: EventName<KritzelEngineCustomEvent<KritzelEngineState>>;
|
|
59
|
+
onActiveToolChange: EventName<KritzelEngineCustomEvent<KritzelBaseTool>>;
|
|
60
|
+
onObjectsSelectionChange: EventName<KritzelEngineCustomEvent<void>>;
|
|
61
|
+
onWorkspacesChange: EventName<KritzelEngineCustomEvent<KritzelWorkspace[]>>;
|
|
62
|
+
onActiveWorkspaceChange: EventName<KritzelEngineCustomEvent<KritzelWorkspace>>;
|
|
63
|
+
onLongpress: EventName<KritzelEngineCustomEvent<PointerEvent>>;
|
|
64
|
+
onObjectsChange: EventName<KritzelEngineCustomEvent<KritzelBaseObject[]>>;
|
|
65
|
+
onObjectsAdded: EventName<KritzelEngineCustomEvent<ObjectsAddedEvent>>;
|
|
66
|
+
onObjectsRemoved: EventName<KritzelEngineCustomEvent<ObjectsRemovedEvent>>;
|
|
67
|
+
onObjectsUpdated: EventName<KritzelEngineCustomEvent<ObjectsUpdatedEvent>>;
|
|
68
|
+
onUndoStateChange: EventName<KritzelEngineCustomEvent<KritzelUndoState>>;
|
|
69
|
+
onObjectsInViewportChange: EventName<KritzelEngineCustomEvent<ObjectsInViewportChangeEvent>>;
|
|
70
|
+
onViewportChange: EventName<KritzelEngineCustomEvent<KritzelViewportState>>;
|
|
71
|
+
onAwarenessChange: EventName<KritzelEngineCustomEvent<Map<number, Record<string, any>>>>;
|
|
72
|
+
};
|
|
73
|
+
export declare const KritzelEngine: StencilReactComponent<KritzelEngineElement, KritzelEngineEvents, Components.KritzelEngine>;
|
|
56
74
|
export type KritzelExportEvents = {
|
|
57
75
|
onExportPng: EventName<KritzelExportCustomEvent<void>>;
|
|
58
76
|
onExportSvg: EventName<KritzelExportCustomEvent<void>>;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export * from './components/stencil-generated/components';
|
|
2
2
|
export { KritzelBaseObject, KritzelText, KritzelPath, KritzelImage, KritzelLine, KritzelShape, KritzelGroup, KritzelBrushTool, KritzelTextTool, KritzelLineTool, KritzelShapeTool, KritzelEraserTool, KritzelSelectionTool, KritzelImageTool, KritzelWorkspace, InMemorySyncProvider, IndexedDBSyncProvider, BroadcastSyncProvider, WebSocketSyncProvider, HocuspocusSyncProvider, KritzelThemeManager, ShapeType, KritzelAlignment, lightTheme, darkTheme, DEFAULT_BRUSH_CONFIG, DEFAULT_TEXT_CONFIG, } from 'kritzel-stencil';
|
|
3
|
-
export type { KritzelToolbarControl, KritzelBrushToolConfig, KritzelLineToolConfig, KritzelShapeToolConfig, KritzelTextToolConfig, KritzelSyncConfig, KritzelTheme, KritzelViewportState, ContextMenuItem, ThemeAwareColor, ThemeName, LoginEvent, EditorIsReadyEvent, ActiveWorkspaceChangeEvent, ObjectsAddedEvent, ObjectsRemovedEvent, ObjectsUpdatedEvent, } from 'kritzel-stencil';
|
|
3
|
+
export type { HTMLKritzelEditorElement, HTMLKritzelEngineElement, KritzelToolbarControl, KritzelBrushToolConfig, KritzelLineToolConfig, KritzelShapeToolConfig, KritzelTextToolConfig, KritzelSyncConfig, KritzelTheme, KritzelViewportState, ContextMenuItem, ThemeAwareColor, ThemeName, LoginEvent, EditorIsReadyEvent, ActiveWorkspaceChangeEvent, ObjectsAddedEvent, ObjectsRemovedEvent, ObjectsUpdatedEvent, ObjectsInViewportChangeEvent, } from 'kritzel-stencil';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "kritzel-react",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.16",
|
|
4
4
|
"homepage": "https://github.com/kasual1/kritzel#readme",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"@stencil/react-output-target": "^1.2.0"
|
|
21
21
|
},
|
|
22
22
|
"peerDependencies": {
|
|
23
|
-
"kritzel-stencil": "^0.3.
|
|
23
|
+
"kritzel-stencil": "^0.3.16"
|
|
24
24
|
},
|
|
25
25
|
"repository": {
|
|
26
26
|
"type": "git",
|