@wix/editor 1.686.0 → 1.688.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.
@@ -5,7 +5,7 @@ import * as _wix_sdk_types from '@wix/sdk-types';
5
5
  import { Host } from '@wix/sdk-types';
6
6
  import * as _wix_sdk_runtime_host_modules from '@wix/sdk-runtime/host-modules';
7
7
  import * as _wix_editor_platform_transport from '@wix/editor-platform-transport';
8
- import { IElement, SiteLocale, ComponentRef, IElementSDK, ElementStyleDefinitions, ElementStyles, ElementStylesUpdate, ElementStylesRemoval, ElementDataDefinitions, ElementData, ElementDataInput, ElementPresetDefinitions, ElementStateDefinitions, SelectFontParams, SelectFontFamilyParams, SelectMediaParams, SelectLinkParams, ElementLink, SelectSortParams, ElementSort, SelectFilterParams, ElementFilter, SelectColorParams, BackgroundPickerOptions, SelectFontWeightParams, IFontWeight, SelectTextThemeParams, DsItem, BuilderStyle, StyleRef, OpenLinkPanelFn, OpenColorPickerFn, ListProvidersOptions, Provider, BindingProperties, BindingDetailsMap, UnbindAll, ListBindingsOptions, BindingTargetDetails, findBindingCandidatesOptions, BindingCandidate, SelectBindingOptions, GetContextActionsOptions, ContextActionCommand, IRouter, IPage, AddTemplateOptions, AddExtensionOptions } from '@wix/public-editor-platform-interfaces';
8
+ import { IElement, SiteLocale, ComponentRef, IElementSDK, ElementStyleDefinitions, ElementStyles, ElementStylesUpdate, ElementStylesRemoval, ElementDataDefinitions, ElementData, ElementDataInput, ElementPresetDefinitions, ElementStateDefinitions, SelectFontParams, SelectFontFamilyParams, SelectMediaParams, SelectLinkParams, ElementLink, SelectSortParams, ElementSort, SelectFilterParams, ElementFilter, SelectColorParams, BackgroundPickerOptions, SelectFontWeightParams, IFontWeight, SelectTextThemeParams, DsItem, BuilderStyle, StyleRef, OpenLinkPanelFn, OpenColorPickerFn, ListProvidersOptions, Provider, BindingProperties, BindingDetailsMap, UnbindAll, ListBindingsOptions, BindingTargetDetails, findBindingCandidatesOptions, BindingCandidate, SelectBindingOptions, GetContextActionsOptions, ContextActionCommand, IRouter, IReadOnlyPage, AddTemplateOptions, IPage, AddExtensionOptions } from '@wix/public-editor-platform-interfaces';
9
9
  export { ContextActionCommand, ContextActionName, DataType, ElementA11y, ElementAddressLink, ElementAnchorLink, ElementAudio, ElementData, ElementDataDefinition, ElementDataDefinitions, ElementDataInput, ElementDataObject, ElementDataValue, ElementDirection, ElementDocumentLink, ElementDynamicPageLink, ElementEmailLink, ElementExternalLink, ElementFilter, ElementImage, ElementLink, ElementLoginToWixLink, ElementMenuItems, ElementPageLink, ElementPhoneLink, ElementPresetDefinition, ElementPresetDefinitions, ElementRichText, ElementSort, ElementStateDefinition, ElementStateDefinitions, ElementStyleDefinition, ElementStyleDefinitions, ElementStyles, ElementStylesRemoval, ElementStylesUpdate, ElementTextLink, ElementTpaPageLink, ElementVectorArt, ElementVideo, ElementWhatsAppLink, GetContextActionsOptions, NativeStateType, SiteLocale } from '@wix/public-editor-platform-interfaces';
10
10
 
11
11
  declare class Workspace implements NonNullable<WorkspaceHost$1['workspace']> {
@@ -41,18 +41,18 @@ declare class ApplicationSDKShape extends BaseSDKShape {
41
41
  getPublicAPI<T>(appDefinitionId: string): Promise<T>;
42
42
  getAppInstance(): Promise<any>;
43
43
  }
44
- declare const _default$g: ApplicationSDKShape & _wix_sdk_runtime_host_modules.HostModule<ApplicationSDKShape, _wix_sdk_types.Host>;
44
+ declare const _default$h: ApplicationSDKShape & _wix_sdk_runtime_host_modules.HostModule<ApplicationSDKShape, _wix_sdk_types.Host>;
45
45
 
46
46
  declare class ElementsSDKShape extends BaseSDKShape {
47
47
  getSelection(): Promise<IElement[]>;
48
48
  onSelectionChange(cb: (elements: IElement[]) => void): Promise<void>;
49
49
  }
50
- declare const _default$f: ElementsSDKShape & _wix_sdk_runtime_host_modules.HostModule<ElementsSDKShape, _wix_sdk_types.Host>;
50
+ declare const _default$g: ElementsSDKShape & _wix_sdk_runtime_host_modules.HostModule<ElementsSDKShape, _wix_sdk_types.Host>;
51
51
 
52
52
  declare class EventsSDKShape extends BaseSDKShape {
53
53
  addEventListener(name: any, cb: (payload: AppEventPayload<AllowedEvents>) => void): Promise<() => void>;
54
54
  }
55
- declare const _default$e: EventsSDKShape & _wix_sdk_runtime_host_modules.HostModule<EventsSDKShape, _wix_sdk_types.Host>;
55
+ declare const _default$f: EventsSDKShape & _wix_sdk_runtime_host_modules.HostModule<EventsSDKShape, _wix_sdk_types.Host>;
56
56
 
57
57
  type ThemeCustomProperty = {
58
58
  type: string;
@@ -86,7 +86,7 @@ declare class InfoSDKShape extends BaseSDKShape {
86
86
  getFontFamilyDisplayName(fontFamily: string): Promise<string | undefined>;
87
87
  getMetaSiteId(): Promise<string>;
88
88
  }
89
- declare const _default$d: InfoSDKShape & _wix_sdk_runtime_host_modules.HostModule<InfoSDKShape, _wix_sdk_types.Host>;
89
+ declare const _default$e: InfoSDKShape & _wix_sdk_runtime_host_modules.HostModule<InfoSDKShape, _wix_sdk_types.Host>;
90
90
 
91
91
  declare class WidgetScopedSDK {
92
92
  private compRef;
@@ -107,7 +107,7 @@ declare class WidgetSDKShape extends BaseSDKShape {
107
107
  setDesignPreset(designPresetName: string): Promise<void>;
108
108
  getNestedWidget(selector: `#${string}`): Promise<WidgetScopedSDK | null>;
109
109
  }
110
- declare const _default$c: WidgetSDKShape & _wix_sdk_runtime_host_modules.HostModule<WidgetSDKShape, _wix_sdk_types.Host>;
110
+ declare const _default$d: WidgetSDKShape & _wix_sdk_runtime_host_modules.HostModule<WidgetSDKShape, _wix_sdk_types.Host>;
111
111
 
112
112
  interface FontPickerValue {
113
113
  font: string;
@@ -123,13 +123,13 @@ declare class InputsSDKShape extends BaseSDKShape {
123
123
  onChange?: (value: FontPickerValue) => void;
124
124
  }): Promise<FontPickerValue | undefined>;
125
125
  }
126
- declare const _default$b: InputsSDKShape & _wix_sdk_runtime_host_modules.HostModule<InputsSDKShape, _wix_sdk_types.Host>;
126
+ declare const _default$c: InputsSDKShape & _wix_sdk_runtime_host_modules.HostModule<InputsSDKShape, _wix_sdk_types.Host>;
127
127
 
128
128
  declare class PanelsSDKShape extends BaseSDKShape {
129
129
  openLanguageSupportPanel(): Promise<any>;
130
130
  openFontsUploadPanel(): Promise<any>;
131
131
  }
132
- declare const _default$a: PanelsSDKShape & _wix_sdk_runtime_host_modules.HostModule<PanelsSDKShape, _wix_sdk_types.Host>;
132
+ declare const _default$b: PanelsSDKShape & _wix_sdk_runtime_host_modules.HostModule<PanelsSDKShape, _wix_sdk_types.Host>;
133
133
 
134
134
  declare class ModalsSDKShape extends BaseSDKShape {
135
135
  openDashboardModal(options: {
@@ -137,7 +137,7 @@ declare class ModalsSDKShape extends BaseSDKShape {
137
137
  closeOtherPanels?: boolean;
138
138
  }): Promise<any>;
139
139
  }
140
- declare const _default$9: ModalsSDKShape & _wix_sdk_runtime_host_modules.HostModule<ModalsSDKShape, _wix_sdk_types.Host>;
140
+ declare const _default$a: ModalsSDKShape & _wix_sdk_runtime_host_modules.HostModule<ModalsSDKShape, _wix_sdk_types.Host>;
141
141
 
142
142
  /**
143
143
  * Methods for interacting with a component from a custom panel.
@@ -684,13 +684,13 @@ declare class ElementSDKShape extends BaseSDKShape implements IElementSDK {
684
684
  getBiToken(): Promise<string>;
685
685
  }
686
686
 
687
- declare const _default$8: ElementSDKShape & _wix_sdk_runtime_host_modules.HostModule<ElementSDKShape, _wix_sdk_types.Host>;
687
+ declare const _default$9: ElementSDKShape & _wix_sdk_runtime_host_modules.HostModule<ElementSDKShape, _wix_sdk_types.Host>;
688
688
 
689
689
  declare class PreferencesSDKShape extends BaseSDKShape {
690
690
  get(keys: string[]): Promise<any>;
691
691
  set(preferences: Record<string, any>): Promise<any>;
692
692
  }
693
- declare const _default$7: PreferencesSDKShape & _wix_sdk_runtime_host_modules.HostModule<PreferencesSDKShape, _wix_sdk_types.Host>;
693
+ declare const _default$8: PreferencesSDKShape & _wix_sdk_runtime_host_modules.HostModule<PreferencesSDKShape, _wix_sdk_types.Host>;
694
694
 
695
695
  declare class ExternalPanelsSDKShape extends BaseSDKShape {
696
696
  getData(): Promise<any>;
@@ -703,7 +703,7 @@ declare class ExternalPanelsSDKShape extends BaseSDKShape {
703
703
  selectColor(...options: any): Promise<OpenColorPickerFn>;
704
704
  translate(key: string | string[], values?: Record<string, any>): Promise<any>;
705
705
  }
706
- declare const _default$6: ExternalPanelsSDKShape & _wix_sdk_runtime_host_modules.HostModule<ExternalPanelsSDKShape, _wix_sdk_types.Host>;
706
+ declare const _default$7: ExternalPanelsSDKShape & _wix_sdk_runtime_host_modules.HostModule<ExternalPanelsSDKShape, _wix_sdk_types.Host>;
707
707
 
708
708
  interface AppController {
709
709
  type: string;
@@ -714,7 +714,7 @@ declare class ControllersSDKShape extends BaseSDKShape {
714
714
  #private;
715
715
  get(): Promise<AppController[]>;
716
716
  }
717
- declare const _default$5: ControllersSDKShape & _wix_sdk_runtime_host_modules.HostModule<ControllersSDKShape, _wix_sdk_types.Host>;
717
+ declare const _default$6: ControllersSDKShape & _wix_sdk_runtime_host_modules.HostModule<ControllersSDKShape, _wix_sdk_types.Host>;
718
718
 
719
719
  /**
720
720
  * Binding target for public SDK
@@ -737,12 +737,12 @@ interface IBindingConnectionItem<T = unknown> {
737
737
  declare class CmsBindingsSDKShape extends BaseSDKShape {
738
738
  get(target: BindingTarget): Promise<IBindingConnectionItem | null>;
739
739
  }
740
- declare const _default$4: CmsBindingsSDKShape & _wix_sdk_runtime_host_modules.HostModule<CmsBindingsSDKShape, _wix_sdk_types.Host>;
740
+ declare const _default$5: CmsBindingsSDKShape & _wix_sdk_runtime_host_modules.HostModule<CmsBindingsSDKShape, _wix_sdk_types.Host>;
741
741
 
742
742
  declare class BindingsProvidersSDKShape extends BaseSDKShape {
743
743
  list(bindingTarget: BindingTarget): Promise<any>;
744
744
  }
745
- declare const _default$3: BindingsProvidersSDKShape & _wix_sdk_runtime_host_modules.HostModule<BindingsProvidersSDKShape, _wix_sdk_types.Host>;
745
+ declare const _default$4: BindingsProvidersSDKShape & _wix_sdk_runtime_host_modules.HostModule<BindingsProvidersSDKShape, _wix_sdk_types.Host>;
746
746
 
747
747
  declare class ProvidersPublicSDKShape extends BaseSDKShape {
748
748
  protected overriddenApplicationContext: Promise<ApplicationContext> | null;
@@ -787,7 +787,7 @@ declare class ContextActionsSDKShape extends BaseSDKShape {
787
787
  */
788
788
  getContextActions(options: GetContextActionsOptions): Promise<ContextActionCommand[]>;
789
789
  }
790
- declare const _default$2: ContextActionsSDKShape & _wix_sdk_runtime_host_modules.HostModule<ContextActionsSDKShape, _wix_sdk_types.Host>;
790
+ declare const _default$3: ContextActionsSDKShape & _wix_sdk_runtime_host_modules.HostModule<ContextActionsSDKShape, _wix_sdk_types.Host>;
791
791
 
792
792
  type MethodNames<T> = Extract<{
793
793
  [K in keyof T]: T[K] extends (...args: any[]) => any ? K : never;
@@ -807,16 +807,49 @@ declare class RoutersSDKShape extends BaseSDKShape {
807
807
  list(): Promise<IRouter[]>;
808
808
  add(extensionId: string): Promise<IRouter>;
809
809
  }
810
- declare const _default$1: RoutersSDKShape & _wix_sdk_runtime_host_modules.HostModule<RoutersSDKShape, _wix_sdk_types.Host>;
810
+ declare const _default$2: RoutersSDKShape & _wix_sdk_runtime_host_modules.HostModule<RoutersSDKShape, _wix_sdk_types.Host>;
811
811
 
812
812
  declare class PagesSDKShape extends BaseSDKShape {
813
813
  protected overriddenApplicationContext: Promise<ApplicationContext> | null;
814
814
  constructor(overriddenApplicationContext?: Promise<ApplicationContext> | null);
815
- list(): Promise<IPage[]>;
815
+ list(): Promise<IReadOnlyPage[]>;
816
816
  addTemplate(templateId: string, options: AddTemplateOptions): Promise<IPage>;
817
817
  addExtension(extensionId: string, options?: AddExtensionOptions): Promise<IPage>;
818
818
  }
819
- declare const _default: PagesSDKShape & _wix_sdk_runtime_host_modules.HostModule<PagesSDKShape, _wix_sdk_types.Host>;
819
+ declare const _default$1: PagesSDKShape & _wix_sdk_runtime_host_modules.HostModule<PagesSDKShape, _wix_sdk_types.Host>;
820
+
821
+ /**
822
+ * Read-only SDK surface for the page the host initialized the client for. The
823
+ * page is bound through the host context, so it is already "the page in scope" —
824
+ * there is no page id to pass and no mutation surface.
825
+ *
826
+ * @example
827
+ * ```ts
828
+ * import { page } from '@wix/editor';
829
+ *
830
+ * const title = await page.getTitle();
831
+ * const router = await page.getRouter();
832
+ * const role = await page.getPageRole();
833
+ * ```
834
+ */
835
+ declare class PageSDKShape extends BaseSDKShape {
836
+ #private;
837
+ protected overriddenApplicationContext: Promise<ApplicationContext> | null;
838
+ constructor(overriddenApplicationContext?: Promise<ApplicationContext> | null);
839
+ getTitle(): Promise<string>;
840
+ getExtensionId(): Promise<string | undefined>;
841
+ /**
842
+ * The page's role within its router, or `undefined` when the page is not
843
+ * connected to a router owned by the calling app.
844
+ */
845
+ getPageRole(): Promise<string | undefined>;
846
+ /**
847
+ * Read-only access to the page's router, or `undefined` when the page is not
848
+ * connected to a router owned by the calling app.
849
+ */
850
+ getRouter(): Promise<IRouter | undefined>;
851
+ }
852
+ declare const _default: PageSDKShape & _wix_sdk_runtime_host_modules.HostModule<PageSDKShape, _wix_sdk_types.Host>;
820
853
 
821
854
  declare const editor: {
822
855
  host: () => _wix_sdk_types.Host & {
@@ -832,4 +865,4 @@ declare const editor: {
832
865
  };
833
866
  };
834
867
 
835
- export { BaseSDKShape, ContextActionsSDKShape, ElementSDKShape, PagesSDKShape, PlatformSDKShape, ElementSDKShape as ReactElementsSDKShape, RoutersSDKShape, Workspace, WorkspaceHost, _default$g as application, bindingsPublicSDKShape as bindings, _default$3 as bindingsProviders, _default$4 as cmsBindings, _default$2 as contextActions, _default$5 as controllers, editor, _default$8 as element, _default$f as elements, _default$e as events, _default$6 as externalPanels, _default$d as info, _default$b as inputs, _default$9 as modals, _default as pages, _default$a as panels, _default$7 as preferences, providersPublicSDKShape as providers, _default$8 as reactElements, _default$1 as routers, _default$c as widget };
868
+ export { BaseSDKShape, ContextActionsSDKShape, ElementSDKShape, PageSDKShape, PagesSDKShape, PlatformSDKShape, ElementSDKShape as ReactElementsSDKShape, RoutersSDKShape, Workspace, WorkspaceHost, _default$h as application, bindingsPublicSDKShape as bindings, _default$4 as bindingsProviders, _default$5 as cmsBindings, _default$3 as contextActions, _default$6 as controllers, editor, _default$9 as element, _default$g as elements, _default$f as events, _default$7 as externalPanels, _default$e as info, _default$c as inputs, _default$a as modals, _default as page, _default$1 as pages, _default$b as panels, _default$8 as preferences, providersPublicSDKShape as providers, _default$9 as reactElements, _default$2 as routers, _default$d as widget };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/editor",
3
- "version": "1.686.0",
3
+ "version": "1.688.0",
4
4
  "license": "UNLICENSED",
5
5
  "author": {
6
6
  "name": "Editor Platform <editor-platform-dev@wix.com>",
@@ -31,11 +31,11 @@
31
31
  "*.{js,ts}": "yarn lint"
32
32
  },
33
33
  "dependencies": {
34
- "@wix/editor-platform-contexts": "1.144.0",
35
- "@wix/editor-platform-environment-api": "1.145.0",
34
+ "@wix/editor-platform-contexts": "1.145.0",
35
+ "@wix/editor-platform-environment-api": "1.146.0",
36
36
  "@wix/monitoring-browser-sdk-host": "^0.1.25",
37
37
  "@wix/public-editor-platform-errors": "1.9.0",
38
- "@wix/public-editor-platform-interfaces": "1.87.0",
38
+ "@wix/public-editor-platform-interfaces": "1.88.0",
39
39
  "@wix/sdk-runtime": "^0.7.0",
40
40
  "@wix/sdk-types": "^1.17.9",
41
41
  "@wix/workspace": "^1.3.13"
@@ -69,5 +69,5 @@
69
69
  ]
70
70
  }
71
71
  },
72
- "falconPackageHash": "e0087df1f4fc65221d4a93141b8ab31308a937e167032ad8c7f7f0aa"
72
+ "falconPackageHash": "17f4fe152bf947a9750887cfc6891990178fea8cf341e2ea69f771c9"
73
73
  }