@wix/public-editor-platform-interfaces 1.77.0 → 1.78.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.
@@ -0,0 +1,41 @@
1
+ /**
2
+ * The named context actions a provider can declare on its manifest
3
+ * (`EditorContextProvider.actions`). Mirrors the vocabulary of
4
+ * `@wix/editor-platform-context-actions-service` — `settings` is deliberately
5
+ * excluded there and therefore never surfaces here.
6
+ */
7
+ export type ContextActionName = 'addItem' | 'editItem' | 'openItem' | 'openSource';
8
+ /**
9
+ * What the consumer passes to `execute` — only what is genuinely runtime-known.
10
+ * The `providerIdentifier` is baked into the command at resolution time;
11
+ * `openItem`/`editItem` operate on a concrete item and require its id.
12
+ */
13
+ export type ContextActionExecuteArgsByName = {
14
+ addItem: [];
15
+ editItem: [payload: {
16
+ sourceItemId: string;
17
+ }];
18
+ openItem: [payload: {
19
+ sourceItemId: string;
20
+ }];
21
+ openSource: [];
22
+ };
23
+ /**
24
+ * Commands form a union discriminated on `actionName`, so narrowing the name
25
+ * narrows what `execute` accepts (e.g. an `openItem` command requires
26
+ * `sourceItemId` at compile time, while `openSource` takes no arguments).
27
+ */
28
+ export type ContextActionCommandByName = {
29
+ [TName in ContextActionName]: {
30
+ actionName: TName;
31
+ description?: string;
32
+ displayName: string;
33
+ execute: (...args: ContextActionExecuteArgsByName[TName]) => Promise<void>;
34
+ };
35
+ };
36
+ export type ContextActionCommand<TName extends ContextActionName = ContextActionName> = ContextActionCommandByName[TName];
37
+ export type GetContextActionsOptions = {
38
+ /** Optional filter — omit to resolve every declared action. */
39
+ actionNames?: ContextActionName[];
40
+ providerIdentifier: string;
41
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/dist/index.d.ts CHANGED
@@ -10,6 +10,7 @@ export { DsItem } from './DataItem';
10
10
  export { BuilderStyle, Style, StyleRef } from './StyleData';
11
11
  export * from './Providers';
12
12
  export * from './Bindings';
13
+ export * from './ContextActions';
13
14
  export { OpenColorPickerFn, OpenLinkPanelFn, BasePickerOptions, BackgroundFillValue, BackgroundPickerOptions, ColorPickerOptions, ColorPickerMode, } from './Inputs';
14
15
  export * as PublicDmTypes from './generated/dm-types';
15
16
  export type { SiteLocale } from './generated/dm-types';
package/dist/index.js CHANGED
@@ -45,5 +45,6 @@ var EventType_1 = require("./EventType");
45
45
  Object.defineProperty(exports, "EventType", { enumerable: true, get: function () { return EventType_1.EventType; } });
46
46
  __exportStar(require("./Providers"), exports);
47
47
  __exportStar(require("./Bindings"), exports);
48
+ __exportStar(require("./ContextActions"), exports);
48
49
  exports.PublicDmTypes = __importStar(require("./generated/dm-types"));
49
50
  __exportStar(require("./sdk"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/public-editor-platform-interfaces",
3
- "version": "1.77.0",
3
+ "version": "1.78.0",
4
4
  "license": "UNLICENSED",
5
5
  "contributors": [
6
6
  {
@@ -52,5 +52,5 @@
52
52
  ]
53
53
  }
54
54
  },
55
- "falconPackageHash": "4c76d936e5c1419fd08de70e26ae49deab0dc31f36bce85d4c41e26b"
55
+ "falconPackageHash": "230b2d5239325e17ce78a865b6fc66641cc252206ddaddfd955937ca"
56
56
  }