@wix/editor-application 1.308.0
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 -0
- package/dist/cjs/environment-api/index.js +584 -0
- package/dist/cjs/environment-api/index.js.map +1 -0
- package/dist/cjs/index.js +773 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/platform-frame/index.js +368 -0
- package/dist/cjs/platform-frame/index.js.map +1 -0
- package/dist/cjs/platform-frame-api/index.js +341 -0
- package/dist/cjs/platform-frame-api/index.js.map +1 -0
- package/dist/cjs/platform-worker/index.js +552 -0
- package/dist/cjs/platform-worker/index.js.map +1 -0
- package/dist/cjs/platform-worker-api/index.js +550 -0
- package/dist/cjs/platform-worker-api/index.js.map +1 -0
- package/dist/esm/environment-api/index.js +579 -0
- package/dist/esm/environment-api/index.js.map +1 -0
- package/dist/esm/index.js +764 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/platform-frame/index.js +366 -0
- package/dist/esm/platform-frame/index.js.map +1 -0
- package/dist/esm/platform-frame-api/index.js +339 -0
- package/dist/esm/platform-frame-api/index.js.map +1 -0
- package/dist/esm/platform-worker/index.js +550 -0
- package/dist/esm/platform-worker/index.js.map +1 -0
- package/dist/esm/platform-worker-api/index.js +548 -0
- package/dist/esm/platform-worker-api/index.js.map +1 -0
- package/dist/statics/environment-api/index.js +586 -0
- package/dist/statics/environment-api/index.js.map +1 -0
- package/dist/statics/index.js +775 -0
- package/dist/statics/index.js.map +1 -0
- package/dist/statics/platform-frame/index.js +369 -0
- package/dist/statics/platform-frame/index.js.map +1 -0
- package/dist/statics/platform-frame-api/index.js +344 -0
- package/dist/statics/platform-frame-api/index.js.map +1 -0
- package/dist/statics/platform-worker/index.js +553 -0
- package/dist/statics/platform-worker/index.js.map +1 -0
- package/dist/statics/platform-worker-api/index.js +552 -0
- package/dist/statics/platform-worker-api/index.js.map +1 -0
- package/dist/types/environment-api/index.d.ts +27 -0
- package/dist/types/environment-api/index.d.ts.map +1 -0
- package/dist/types/index.d.ts +253 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/platform-frame/index.d.ts +27 -0
- package/dist/types/platform-frame/index.d.ts.map +1 -0
- package/dist/types/platform-frame-api/index.d.ts +27 -0
- package/dist/types/platform-frame-api/index.d.ts.map +1 -0
- package/dist/types/platform-worker/index.d.ts +27 -0
- package/dist/types/platform-worker/index.d.ts.map +1 -0
- package/dist/types/platform-worker-api/index.d.ts +27 -0
- package/dist/types/platform-worker-api/index.d.ts.map +1 -0
- package/package.json +96 -0
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
import * as _wix_public_editor_platform_errors from '@wix/public-editor-platform-errors';
|
|
2
|
+
import * as _wix_editor_platform_transport from '@wix/editor-platform-transport';
|
|
3
|
+
import { WithPromiseFunctions } from '@wix/editor-platform-transport';
|
|
4
|
+
import { PlatformAppEventEmitter, IPlatformAppEvent, IPlatformEditorReadyEvent, IPlatformPrivateEvent } from '@wix/public-editor-platform-events';
|
|
5
|
+
import { ComponentRef } from '@wix/public-editor-platform-interfaces';
|
|
6
|
+
|
|
7
|
+
type PrivateAPIFixMe = any;
|
|
8
|
+
interface Component<TComponentType extends string> {
|
|
9
|
+
compRef: ComponentRef;
|
|
10
|
+
type: TComponentType;
|
|
11
|
+
}
|
|
12
|
+
interface TextComponent extends Component<'text'> {
|
|
13
|
+
text(): Promise<string>;
|
|
14
|
+
text(content: string): Promise<void>;
|
|
15
|
+
}
|
|
16
|
+
interface ImageComponent extends Component<'image'> {
|
|
17
|
+
src(src?: string): Promise<void>;
|
|
18
|
+
}
|
|
19
|
+
interface UnknownComponent extends Component<'unknown'> {
|
|
20
|
+
}
|
|
21
|
+
type IComponent = TextComponent | ImageComponent | UnknownComponent;
|
|
22
|
+
type EventsToAutocomplete = 'componentSelectionChanged';
|
|
23
|
+
type AllowedEvents = Omit<string, EventsToAutocomplete> | EventsToAutocomplete;
|
|
24
|
+
type AppEventPayload<EventType extends AllowedEvents> = EventType extends 'componentSelectionChanged' ? {
|
|
25
|
+
type: EventType;
|
|
26
|
+
components: IComponent[];
|
|
27
|
+
} : Record<string, string>;
|
|
28
|
+
|
|
29
|
+
type OmitEventMeta<T> = T extends {
|
|
30
|
+
meta: any;
|
|
31
|
+
} ? Omit<T, 'meta'> : T;
|
|
32
|
+
declare class ApplicationBoundEvents {
|
|
33
|
+
private appDefinitionId;
|
|
34
|
+
private privateAPI;
|
|
35
|
+
private events;
|
|
36
|
+
subscribe: (callback: (event: IPlatformAppEvent) => void) => () => void;
|
|
37
|
+
commit: () => void;
|
|
38
|
+
startTransaction: () => void;
|
|
39
|
+
silent: (isSilent?: boolean | undefined) => void;
|
|
40
|
+
constructor(appDefinitionId: string, events: PlatformAppEventEmitter, privateAPI: PrivateAPIFixMe);
|
|
41
|
+
notify(event: OmitEventMeta<IPlatformAppEvent>): void;
|
|
42
|
+
notifyCustomEvent(type: string, payload: Record<string, string>): void;
|
|
43
|
+
/**
|
|
44
|
+
* TODO: we should use same interface for all events
|
|
45
|
+
* (subscribe vs addEventListener)
|
|
46
|
+
*/
|
|
47
|
+
addEventListener<EventType extends AllowedEvents>(eventType: EventType, fn: (payload: AppEventPayload<EventType>) => void): () => void;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
type IPrivateAPIFixMe$1 = any;
|
|
51
|
+
declare global {
|
|
52
|
+
var __ENVIRONMENT_CONTEXT_KEY: EnvironmentContext;
|
|
53
|
+
}
|
|
54
|
+
declare enum PlatformEnvironment {
|
|
55
|
+
Worker = "Worker",
|
|
56
|
+
Frame = "Frame"
|
|
57
|
+
}
|
|
58
|
+
interface IEnvironmentContext {
|
|
59
|
+
environment: PlatformEnvironment;
|
|
60
|
+
privateApi: WithPromiseFunctions<IPrivateAPIFixMe$1>;
|
|
61
|
+
events: PlatformAppEventEmitter;
|
|
62
|
+
/**
|
|
63
|
+
* Probably, we need to rename this prop
|
|
64
|
+
*/
|
|
65
|
+
applicationAPIs?: Record<string, any>;
|
|
66
|
+
}
|
|
67
|
+
declare class EnvironmentContext {
|
|
68
|
+
private environmentContext;
|
|
69
|
+
private static status;
|
|
70
|
+
static inject(context: IEnvironmentContext): Promise<void>;
|
|
71
|
+
static getInstance(): Promise<EnvironmentContext>;
|
|
72
|
+
constructor(environmentContext: IEnvironmentContext);
|
|
73
|
+
getPrivateAPI(): WithPromiseFunctions<any>;
|
|
74
|
+
getEvents(): PlatformAppEventEmitter;
|
|
75
|
+
getApplicationAPIs(): Record<string, any>;
|
|
76
|
+
getEnvironment(): PlatformEnvironment;
|
|
77
|
+
}
|
|
78
|
+
declare global {
|
|
79
|
+
var __APPLICATION_CONTEXT_KEY: ApplicationContext<IApplicationContext>;
|
|
80
|
+
}
|
|
81
|
+
type IEditorApplicationContext = {
|
|
82
|
+
appDefinitionId: string;
|
|
83
|
+
};
|
|
84
|
+
type IAddonContext = {
|
|
85
|
+
appDefinitionId: string;
|
|
86
|
+
appDefinitionName: string;
|
|
87
|
+
data: {
|
|
88
|
+
toolPanelConfig: {
|
|
89
|
+
url: string;
|
|
90
|
+
width: string;
|
|
91
|
+
height: string;
|
|
92
|
+
initialPosition: {
|
|
93
|
+
x: string;
|
|
94
|
+
y: string;
|
|
95
|
+
};
|
|
96
|
+
};
|
|
97
|
+
};
|
|
98
|
+
};
|
|
99
|
+
type IApplicationContext = IEditorApplicationContext | IAddonContext;
|
|
100
|
+
declare class ApplicationContext<TContext extends IApplicationContext> {
|
|
101
|
+
private applicationContext;
|
|
102
|
+
private environment;
|
|
103
|
+
private static status;
|
|
104
|
+
/**
|
|
105
|
+
* TODO: use generics for context type
|
|
106
|
+
* - application
|
|
107
|
+
* - editor
|
|
108
|
+
*/
|
|
109
|
+
static inject<TContext extends IApplicationContext>(context: TContext): Promise<void>;
|
|
110
|
+
static getInstance<TContext extends IApplicationContext>(): Promise<ApplicationContext<TContext>>;
|
|
111
|
+
private events;
|
|
112
|
+
constructor(applicationContext: TContext, environment: EnvironmentContext);
|
|
113
|
+
getAppDefinitionId(): string;
|
|
114
|
+
getBindings(): TContext;
|
|
115
|
+
getEvents(): ApplicationBoundEvents;
|
|
116
|
+
getPrivateAPI(): _wix_editor_platform_transport.WithPromiseFunctions<any>;
|
|
117
|
+
getPrivateApplicationAPI(): any;
|
|
118
|
+
}
|
|
119
|
+
//# sourceMappingURL=index.d.ts.map
|
|
120
|
+
|
|
121
|
+
declare class ApplicationLifecycle {
|
|
122
|
+
private events;
|
|
123
|
+
private callbacks;
|
|
124
|
+
constructor(events: ApplicationBoundEvents);
|
|
125
|
+
private subscribe;
|
|
126
|
+
private addCallback;
|
|
127
|
+
/**
|
|
128
|
+
* NOTE: currently, we return function to unsubscribe from the event,
|
|
129
|
+
* probably it is better to return `this` to allow chaining
|
|
130
|
+
* and provide another way to unsubscribe from events.
|
|
131
|
+
*/
|
|
132
|
+
onEditorReady(fn: (payload: IPlatformEditorReadyEvent['payload']) => void): () => void;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
declare enum EditorPlatformApplicationErrorCode {
|
|
136
|
+
ApplicationRuntimeError = "ApplicationRuntimeError",
|
|
137
|
+
ApplicationCreationError = "ApplicationCreationError",
|
|
138
|
+
ApplicationLoadError = "ApplicationLoadError",
|
|
139
|
+
ApplicationFetchError = "ApplicationFetchError",
|
|
140
|
+
ApplicationExecuteError = "ApplicationExecuteError",
|
|
141
|
+
ApplicationWasRemoved = "ApplicationWasRemoved",
|
|
142
|
+
UndefinedApiMethod = "UndefinedApiMethod",
|
|
143
|
+
ApplicationIsNotMutable = "ApplicationIsNotMutable",
|
|
144
|
+
FailedToGetPrivateAPI = "FailedToGetPrivateAPI"
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
type IPrivateAPIFixMe = any;
|
|
148
|
+
type IApplicationSpec = any;
|
|
149
|
+
declare enum ApplicationType {
|
|
150
|
+
EditorAddon = "EDITOR_ADDON",
|
|
151
|
+
Platform = "PLATFORM"
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* TODO: duplicated type to get rid of extra dependency
|
|
156
|
+
*/
|
|
157
|
+
type IApplicationRegistry = (instance: EditorPlatformApplication) => void;
|
|
158
|
+
declare global {
|
|
159
|
+
var __APPLICATION_REGISTRY_KEY: IApplicationRegistry;
|
|
160
|
+
}
|
|
161
|
+
interface IApplicationAPI<TPublicAPI, TPrivateAPI> {
|
|
162
|
+
public?: TPublicAPI;
|
|
163
|
+
private?: TPrivateAPI;
|
|
164
|
+
}
|
|
165
|
+
declare class ChainAPIConfiguration<TPublicAPI, TPrivateAPI> {
|
|
166
|
+
private api;
|
|
167
|
+
constructor(api: IApplicationAPI<TPublicAPI, TPrivateAPI>);
|
|
168
|
+
exposePublicAPI(api: TPublicAPI): this;
|
|
169
|
+
exposePrivateAPI(api: TPrivateAPI): this;
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* TODO: should accept generic type
|
|
173
|
+
*/
|
|
174
|
+
declare abstract class EditorPlatformApplication<TContext extends IApplicationContext = IApplicationContext, TPublicAPI = unknown, TPrivateAPI = unknown> {
|
|
175
|
+
#private;
|
|
176
|
+
readonly type: ApplicationType;
|
|
177
|
+
appDefinitionId: string;
|
|
178
|
+
state: 'READY' | 'REMOVED';
|
|
179
|
+
lifecycle: ApplicationLifecycle;
|
|
180
|
+
protected constructor(type: ApplicationType, context: ApplicationContext<TContext>);
|
|
181
|
+
protected get context(): ApplicationContext<TContext>;
|
|
182
|
+
get events(): ApplicationBoundEvents;
|
|
183
|
+
setManifest(manifest: any): void;
|
|
184
|
+
getManifest(): any;
|
|
185
|
+
exposePublicAPI(api: TPublicAPI): ChainAPIConfiguration<TPublicAPI, TPrivateAPI>;
|
|
186
|
+
exposePrivateAPI(api: TPrivateAPI): ChainAPIConfiguration<TPublicAPI, TPrivateAPI>;
|
|
187
|
+
getPublicAPI(): TPublicAPI | undefined;
|
|
188
|
+
getPrivateAPI(): TPrivateAPI | undefined;
|
|
189
|
+
ready(): void;
|
|
190
|
+
buildApplicationError(message: string): {
|
|
191
|
+
state: Partial<{
|
|
192
|
+
url: string;
|
|
193
|
+
appDefinitionId: string;
|
|
194
|
+
apiMethod: string;
|
|
195
|
+
apiType: string;
|
|
196
|
+
}>;
|
|
197
|
+
withUrl(url: string): any;
|
|
198
|
+
withAppDefinitionId(appDefinitionId: string): any;
|
|
199
|
+
withApiMethod(apiMethod: string): any;
|
|
200
|
+
withApiType(apiType: string): any;
|
|
201
|
+
displayName: string;
|
|
202
|
+
prefix: string;
|
|
203
|
+
errorMessage: string;
|
|
204
|
+
parent: _wix_public_editor_platform_errors.BaseError<EditorPlatformApplicationErrorCode> | Error | undefined;
|
|
205
|
+
messages: string[][];
|
|
206
|
+
code: EditorPlatformApplicationErrorCode;
|
|
207
|
+
readonly parentError: _wix_public_editor_platform_errors.BaseError<any> | null;
|
|
208
|
+
getDisplayMessage(): string;
|
|
209
|
+
getMessage(): string;
|
|
210
|
+
getBreadcrumbs(): string[];
|
|
211
|
+
withParentError(e: Error | _wix_public_editor_platform_errors.BaseError<any>): any;
|
|
212
|
+
withMessage(...messages: string[]): any;
|
|
213
|
+
name: string;
|
|
214
|
+
message: string;
|
|
215
|
+
stack?: string | undefined;
|
|
216
|
+
cause?: unknown;
|
|
217
|
+
};
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
declare class WixEditorPlatformApplication<TPublicAPI = unknown, TPrivateAPI = unknown> extends EditorPlatformApplication<IEditorApplicationContext, TPublicAPI, TPrivateAPI> {
|
|
221
|
+
static create<TPublicAPI = unknown, TPrivateAPI = unknown>(): Promise<WixEditorPlatformApplication<TPublicAPI, TPrivateAPI>>;
|
|
222
|
+
constructor(context: ApplicationContext<IEditorApplicationContext>);
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
declare class WixEditorPlatformAddon<TPublicAPI = unknown, TPrivateAPI = unknown> extends EditorPlatformApplication<IAddonContext, TPublicAPI, TPrivateAPI> {
|
|
226
|
+
static create<TPublicAPI = unknown, TPrivateAPI = unknown>(): Promise<WixEditorPlatformAddon<TPublicAPI, TPrivateAPI>>;
|
|
227
|
+
constructor(context: ApplicationContext<IAddonContext>);
|
|
228
|
+
private init;
|
|
229
|
+
private registerToolsPanel;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
declare const PLATFORM_FRAME_API_TYPE = "PLATFORM_FRAME_API";
|
|
233
|
+
declare class PlatformFrameAPI {
|
|
234
|
+
#private;
|
|
235
|
+
type: string;
|
|
236
|
+
initFrameEnvironment(appDefinitionId: string, privateAPI: IPrivateAPIFixMe, applicationPrivateAPI: any): Promise<void>;
|
|
237
|
+
notify(event: IPlatformPrivateEvent): void;
|
|
238
|
+
subscribe(cb: (event: IPlatformAppEvent) => void): void;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
declare const PLATFORM_WORKER_API_TYPE = "PLATFORM_WORKER_API";
|
|
242
|
+
declare class PlatformWorkerAPI {
|
|
243
|
+
#private;
|
|
244
|
+
type: string;
|
|
245
|
+
initWorkerEnvironment(buildPrivateAPI: (config: any) => IPrivateAPIFixMe): Promise<void>;
|
|
246
|
+
notify(event: IPlatformPrivateEvent): Promise<void>;
|
|
247
|
+
subscribe(cb: (event: IPlatformAppEvent) => void): void;
|
|
248
|
+
runApplication(app: IApplicationSpec): Promise<void>;
|
|
249
|
+
waitReady(): Promise<this>;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
export { ApplicationType, EditorPlatformApplication, type IApplicationAPI, type IApplicationSpec, type IPrivateAPIFixMe, PLATFORM_FRAME_API_TYPE, PLATFORM_WORKER_API_TYPE, PlatformFrameAPI, PlatformWorkerAPI, WixEditorPlatformAddon, WixEditorPlatformApplication };
|
|
253
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { IPlatformPrivateEvent, IPlatformAppEvent } from '@wix/public-editor-platform-events';
|
|
2
|
+
|
|
3
|
+
type IPrivateAPIFixMe = any;
|
|
4
|
+
type IApplicationSpec = any;
|
|
5
|
+
|
|
6
|
+
declare const PLATFORM_FRAME_API_TYPE = "PLATFORM_FRAME_API";
|
|
7
|
+
declare class PlatformFrameAPI {
|
|
8
|
+
#private;
|
|
9
|
+
type: string;
|
|
10
|
+
initFrameEnvironment(appDefinitionId: string, privateAPI: IPrivateAPIFixMe, applicationPrivateAPI: any): Promise<void>;
|
|
11
|
+
notify(event: IPlatformPrivateEvent): void;
|
|
12
|
+
subscribe(cb: (event: IPlatformAppEvent) => void): void;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
declare const PLATFORM_WORKER_API_TYPE = "PLATFORM_WORKER_API";
|
|
16
|
+
declare class PlatformWorkerAPI {
|
|
17
|
+
#private;
|
|
18
|
+
type: string;
|
|
19
|
+
initWorkerEnvironment(buildPrivateAPI: (config: any) => IPrivateAPIFixMe): Promise<void>;
|
|
20
|
+
notify(event: IPlatformPrivateEvent): Promise<void>;
|
|
21
|
+
subscribe(cb: (event: IPlatformAppEvent) => void): void;
|
|
22
|
+
runApplication(app: IApplicationSpec): Promise<void>;
|
|
23
|
+
waitReady(): Promise<this>;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export { PLATFORM_FRAME_API_TYPE, PLATFORM_WORKER_API_TYPE, PlatformFrameAPI, PlatformWorkerAPI };
|
|
27
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { IPlatformPrivateEvent, IPlatformAppEvent } from '@wix/public-editor-platform-events';
|
|
2
|
+
|
|
3
|
+
type IPrivateAPIFixMe = any;
|
|
4
|
+
type IApplicationSpec = any;
|
|
5
|
+
|
|
6
|
+
declare const PLATFORM_FRAME_API_TYPE = "PLATFORM_FRAME_API";
|
|
7
|
+
declare class PlatformFrameAPI {
|
|
8
|
+
#private;
|
|
9
|
+
type: string;
|
|
10
|
+
initFrameEnvironment(appDefinitionId: string, privateAPI: IPrivateAPIFixMe, applicationPrivateAPI: any): Promise<void>;
|
|
11
|
+
notify(event: IPlatformPrivateEvent): void;
|
|
12
|
+
subscribe(cb: (event: IPlatformAppEvent) => void): void;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
declare const PLATFORM_WORKER_API_TYPE = "PLATFORM_WORKER_API";
|
|
16
|
+
declare class PlatformWorkerAPI {
|
|
17
|
+
#private;
|
|
18
|
+
type: string;
|
|
19
|
+
initWorkerEnvironment(buildPrivateAPI: (config: any) => IPrivateAPIFixMe): Promise<void>;
|
|
20
|
+
notify(event: IPlatformPrivateEvent): Promise<void>;
|
|
21
|
+
subscribe(cb: (event: IPlatformAppEvent) => void): void;
|
|
22
|
+
runApplication(app: IApplicationSpec): Promise<void>;
|
|
23
|
+
waitReady(): Promise<this>;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export { PLATFORM_FRAME_API_TYPE, PLATFORM_WORKER_API_TYPE, PlatformFrameAPI, PlatformWorkerAPI };
|
|
27
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { IPlatformPrivateEvent, IPlatformAppEvent } from '@wix/public-editor-platform-events';
|
|
2
|
+
|
|
3
|
+
type IPrivateAPIFixMe = any;
|
|
4
|
+
type IApplicationSpec = any;
|
|
5
|
+
|
|
6
|
+
declare const PLATFORM_FRAME_API_TYPE = "PLATFORM_FRAME_API";
|
|
7
|
+
declare class PlatformFrameAPI {
|
|
8
|
+
#private;
|
|
9
|
+
type: string;
|
|
10
|
+
initFrameEnvironment(appDefinitionId: string, privateAPI: IPrivateAPIFixMe, applicationPrivateAPI: any): Promise<void>;
|
|
11
|
+
notify(event: IPlatformPrivateEvent): void;
|
|
12
|
+
subscribe(cb: (event: IPlatformAppEvent) => void): void;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
declare const PLATFORM_WORKER_API_TYPE = "PLATFORM_WORKER_API";
|
|
16
|
+
declare class PlatformWorkerAPI {
|
|
17
|
+
#private;
|
|
18
|
+
type: string;
|
|
19
|
+
initWorkerEnvironment(buildPrivateAPI: (config: any) => IPrivateAPIFixMe): Promise<void>;
|
|
20
|
+
notify(event: IPlatformPrivateEvent): Promise<void>;
|
|
21
|
+
subscribe(cb: (event: IPlatformAppEvent) => void): void;
|
|
22
|
+
runApplication(app: IApplicationSpec): Promise<void>;
|
|
23
|
+
waitReady(): Promise<this>;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export { PLATFORM_FRAME_API_TYPE, PLATFORM_WORKER_API_TYPE, PlatformFrameAPI, PlatformWorkerAPI };
|
|
27
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { IPlatformPrivateEvent, IPlatformAppEvent } from '@wix/public-editor-platform-events';
|
|
2
|
+
|
|
3
|
+
type IPrivateAPIFixMe = any;
|
|
4
|
+
type IApplicationSpec = any;
|
|
5
|
+
|
|
6
|
+
declare const PLATFORM_FRAME_API_TYPE = "PLATFORM_FRAME_API";
|
|
7
|
+
declare class PlatformFrameAPI {
|
|
8
|
+
#private;
|
|
9
|
+
type: string;
|
|
10
|
+
initFrameEnvironment(appDefinitionId: string, privateAPI: IPrivateAPIFixMe, applicationPrivateAPI: any): Promise<void>;
|
|
11
|
+
notify(event: IPlatformPrivateEvent): void;
|
|
12
|
+
subscribe(cb: (event: IPlatformAppEvent) => void): void;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
declare const PLATFORM_WORKER_API_TYPE = "PLATFORM_WORKER_API";
|
|
16
|
+
declare class PlatformWorkerAPI {
|
|
17
|
+
#private;
|
|
18
|
+
type: string;
|
|
19
|
+
initWorkerEnvironment(buildPrivateAPI: (config: any) => IPrivateAPIFixMe): Promise<void>;
|
|
20
|
+
notify(event: IPlatformPrivateEvent): Promise<void>;
|
|
21
|
+
subscribe(cb: (event: IPlatformAppEvent) => void): void;
|
|
22
|
+
runApplication(app: IApplicationSpec): Promise<void>;
|
|
23
|
+
waitReady(): Promise<this>;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export { PLATFORM_FRAME_API_TYPE, PLATFORM_WORKER_API_TYPE, PlatformFrameAPI, PlatformWorkerAPI };
|
|
27
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/package.json
ADDED
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@wix/editor-application",
|
|
3
|
+
"version": "1.308.0",
|
|
4
|
+
"description": "",
|
|
5
|
+
"main": "dist/cjs/index.js",
|
|
6
|
+
"module": "dist/esm/index.js",
|
|
7
|
+
"types": "dist/types/index.d.ts",
|
|
8
|
+
"scripts": {
|
|
9
|
+
"start": "exit 0",
|
|
10
|
+
"build": "yarn typecheck && rollup -c",
|
|
11
|
+
"test": "exit 0",
|
|
12
|
+
"lint": "prettier --check ./src",
|
|
13
|
+
"lint:fix": "prettier --write ./src",
|
|
14
|
+
"typecheck": "tsc --noEmit"
|
|
15
|
+
},
|
|
16
|
+
"exports": {
|
|
17
|
+
".": {
|
|
18
|
+
"import": "./dist/esm/index.js",
|
|
19
|
+
"require": "./dist/cjs/index.js",
|
|
20
|
+
"types": "./dist/types/index.d.ts"
|
|
21
|
+
},
|
|
22
|
+
"./platform-frame": {
|
|
23
|
+
"import": "./dist/esm/platform-frame/index.js",
|
|
24
|
+
"require": "./dist/cjs/platform-frame/index.js"
|
|
25
|
+
},
|
|
26
|
+
"./platform-worker": {
|
|
27
|
+
"import": "./dist/esm/platform-worker/index.js",
|
|
28
|
+
"require": "./dist/cjs/platform-worker/index.js"
|
|
29
|
+
},
|
|
30
|
+
"./environment-api": {
|
|
31
|
+
"import": "./dist/esm/environment-api/index.js",
|
|
32
|
+
"require": "./dist/cjs/environment-api/index.js",
|
|
33
|
+
"types": "./dist/types/environment-api/index.d.ts"
|
|
34
|
+
},
|
|
35
|
+
"./platform-frame-api": {
|
|
36
|
+
"import": "./dist/esm/platform-frame-api/index.js",
|
|
37
|
+
"require": "./dist/cjs/platform-frame-api/index.js",
|
|
38
|
+
"types": "./dist/types/platform-frame-api/index.d.ts"
|
|
39
|
+
},
|
|
40
|
+
"./platform-worker-api": {
|
|
41
|
+
"import": "./dist/esm/platform-worker-api/index.js",
|
|
42
|
+
"require": "./dist/cjs/platform-worker-api/index.js",
|
|
43
|
+
"types": "./dist/types/platform-worker-api/index.d.ts"
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
"keywords": [],
|
|
47
|
+
"files": [
|
|
48
|
+
"dist"
|
|
49
|
+
],
|
|
50
|
+
"author": {
|
|
51
|
+
"name": "Editor Platform <editor-platform-dev@wix.com>",
|
|
52
|
+
"email": "editor-platform-dev@wix.com"
|
|
53
|
+
},
|
|
54
|
+
"license": "UNLICENSED",
|
|
55
|
+
"devDependencies": {
|
|
56
|
+
"@rollup/plugin-node-resolve": "^15.2.3",
|
|
57
|
+
"@wix/editor-application-context": "^1.0.0",
|
|
58
|
+
"esbuild": "^0.19.5",
|
|
59
|
+
"eslint": "^8.54.0",
|
|
60
|
+
"prettier": "^3.1.0",
|
|
61
|
+
"rollup": "^3.29.4",
|
|
62
|
+
"rollup-plugin-dts": "^6.1.0",
|
|
63
|
+
"rollup-plugin-esbuild": "^5.0.0",
|
|
64
|
+
"typescript": "~5.2.2"
|
|
65
|
+
},
|
|
66
|
+
"dependencies": {
|
|
67
|
+
"@wix/editor-platform-transport": "1.5.0",
|
|
68
|
+
"@wix/public-editor-platform-errors": "1.5.0",
|
|
69
|
+
"@wix/public-editor-platform-events": "1.284.0",
|
|
70
|
+
"@wix/public-editor-platform-interfaces": "1.0.0"
|
|
71
|
+
},
|
|
72
|
+
"publishConfig": {
|
|
73
|
+
"registry": "https://registry.npmjs.org/",
|
|
74
|
+
"access": "public"
|
|
75
|
+
},
|
|
76
|
+
"unpkg": true,
|
|
77
|
+
"publishScoped": true,
|
|
78
|
+
"lint-staged": {
|
|
79
|
+
"*.{js,ts}": "yarn run lint"
|
|
80
|
+
},
|
|
81
|
+
"wix": {
|
|
82
|
+
"artifact": {
|
|
83
|
+
"groupId": "com.wixpress",
|
|
84
|
+
"artifactId": "public-editor-platform-application-runtime",
|
|
85
|
+
"targets": {
|
|
86
|
+
"static": true
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
"validations": {
|
|
90
|
+
"postDependenciesBuild": [
|
|
91
|
+
"lint"
|
|
92
|
+
]
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
"falconPackageHash": "908873eca5f2ef3f56dde3408ca8856888b34356e6f46fb98214e850"
|
|
96
|
+
}
|