@k8slens/extensions 5.3.1-git.5591f8dca5.0 → 5.3.1-git.58ffb8e3e4.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.
Files changed (55) hide show
  1. package/dist/src/common/catalog-entities/kubernetes-cluster.d.ts +1 -2
  2. package/dist/src/common/catalog-entities/web-link.d.ts +0 -2
  3. package/dist/src/common/hotbar-store.d.ts +16 -11
  4. package/dist/src/common/hotbar-store.injectable.d.ts +4 -0
  5. package/dist/src/common/hotbar-types.d.ts +5 -2
  6. package/dist/src/common/ipc/index.d.ts +1 -0
  7. package/dist/src/common/vars.d.ts +1 -0
  8. package/dist/src/extensions/extension-api.js +355 -114
  9. package/dist/src/extensions/lens-renderer-extension.d.ts +2 -1
  10. package/dist/src/extensions/registries/base-registry.d.ts +1 -1
  11. package/dist/src/extensions/registries/entity-setting-registry.d.ts +1 -1
  12. package/dist/src/extensions/registries/index.d.ts +0 -1
  13. package/dist/src/main/routes/port-forward-route.d.ts +0 -1
  14. package/dist/src/renderer/api/__tests__/catalog-entity-registry.test.d.ts +1 -1
  15. package/dist/src/renderer/api/catalog-entity-registry.d.ts +4 -0
  16. package/dist/src/renderer/api/catalog-entity.d.ts +1 -5
  17. package/dist/src/{main/catalog-sources → renderer/api}/helpers/general-active-sync.d.ts +0 -0
  18. package/dist/src/renderer/components/+custom-resources/custom-resources.injectable.d.ts +23 -0
  19. package/dist/src/renderer/components/+network-port-forwards/port-forward-menu.d.ts +2 -0
  20. package/dist/src/renderer/components/+network-services/service-port-component.d.ts +1 -0
  21. package/dist/src/renderer/components/+workloads-pods/pod-container-port.d.ts +1 -0
  22. package/dist/src/renderer/components/activate-entity-command/activate-entity-command.d.ts +1 -9
  23. package/dist/src/renderer/components/catalog-entities/weblink-add-command.d.ts +1 -11
  24. package/dist/src/renderer/components/cluster-manager/active-hotbar-name.d.ts +2 -1
  25. package/dist/src/renderer/components/command-palette/command-container.d.ts +1 -7
  26. package/dist/src/renderer/components/command-palette/command-dialog.d.ts +1 -13
  27. package/dist/src/renderer/components/command-palette/{command-overlay.d.ts → command-overlay.injectable.d.ts} +7 -4
  28. package/dist/src/renderer/components/command-palette/index.d.ts +1 -1
  29. package/dist/src/renderer/components/command-palette/registered-commands/internal-commands.injectable.d.ts +25 -0
  30. package/dist/src/renderer/components/command-palette/registered-commands/registered-commands.injectable.d.ts +25 -0
  31. package/dist/src/renderer/components/hotbar/hotbar-add-command.d.ts +1 -6
  32. package/dist/src/renderer/components/hotbar/hotbar-menu.d.ts +1 -1
  33. package/dist/src/renderer/components/hotbar/hotbar-remove-command.d.ts +1 -9
  34. package/dist/src/renderer/components/hotbar/hotbar-rename-command.d.ts +1 -14
  35. package/dist/src/renderer/components/hotbar/hotbar-selector.d.ts +3 -3
  36. package/dist/src/renderer/components/hotbar/hotbar-switch-command.d.ts +1 -12
  37. package/dist/src/renderer/components/input/input.d.ts +1 -0
  38. package/dist/src/renderer/components/{getDiForUnitTesting.d.ts → input/validators/unique-hotbar-name.injectable.d.ts} +4 -2
  39. package/dist/src/renderer/components/kube-object-menu/dependencies/hide-details.injectable.d.ts +1 -1
  40. package/dist/src/renderer/components/menu/menu-actions.d.ts +1 -1
  41. package/dist/src/renderer/components/monaco-editor/monaco-editor.d.ts +1 -1
  42. package/dist/src/renderer/{components/getDi.d.ts → getDi.d.ts} +0 -0
  43. package/dist/src/renderer/{initializers/command-registry.d.ts → getDiForUnitTesting.d.ts} +2 -1
  44. package/dist/src/renderer/initializers/catalog.d.ts +6 -1
  45. package/dist/src/renderer/initializers/index.d.ts +0 -1
  46. package/dist/src/renderer/navigation/helpers.d.ts +1 -1
  47. package/dist/src/renderer/port-forward/port-forward-dialog.d.ts +1 -1
  48. package/dist/src/renderer/port-forward/port-forward-item.d.ts +4 -4
  49. package/dist/src/renderer/port-forward/port-forward-notify.d.ts +1 -0
  50. package/dist/src/renderer/port-forward/port-forward.store.d.ts +56 -6
  51. package/dist/src/renderer/theme.store.d.ts +0 -1
  52. package/dist/src/renderer/window/event-listener.injectable.d.ts +25 -0
  53. package/package.json +1 -1
  54. package/dist/src/extensions/registries/command-registry.d.ts +0 -36
  55. package/dist/src/renderer/components/hotbar/hotbar-display-label.d.ts +0 -22
@@ -18,8 +18,7 @@
18
18
  * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19
19
  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20
20
  */
21
- import { CatalogEntity, CatalogEntityActionContext, CatalogEntityContextMenuContext, CatalogEntityMetadata, CatalogEntityStatus } from "../catalog";
22
- import { CatalogCategory, CatalogCategorySpec } from "../catalog";
21
+ import { CatalogEntity, CatalogEntityActionContext, CatalogEntityContextMenuContext, CatalogEntityMetadata, CatalogEntityStatus, CatalogCategory, CatalogCategorySpec } from "../catalog";
23
22
  import type { CatalogEntitySpec } from "../catalog/catalog-entity";
24
23
  export interface KubernetesClusterPrometheusMetrics {
25
24
  address?: {
@@ -52,6 +52,4 @@ export declare class WebLinkCategory extends CatalogCategory {
52
52
  kind: string;
53
53
  };
54
54
  };
55
- static onAdd?: () => void;
56
- constructor();
57
55
  }
@@ -20,7 +20,7 @@
20
20
  */
21
21
  import { BaseStore } from "./base-store";
22
22
  import { CatalogEntity } from "./catalog";
23
- import { Hotbar, HotbarCreateOptions } from "./hotbar-types";
23
+ import { Hotbar, CreateHotbarData, CreateHotbarOptions } from "./hotbar-types";
24
24
  export interface HotbarStoreModel {
25
25
  hotbars: Hotbar[];
26
26
  activeHotbarId: string;
@@ -31,19 +31,22 @@ export declare class HotbarStore extends BaseStore<HotbarStoreModel> {
31
31
  private _activeHotbarId;
32
32
  constructor();
33
33
  get activeHotbarId(): string;
34
- set activeHotbarId(id: string);
35
- hotbarIndex(id: string): number;
34
+ /**
35
+ * If `hotbar` points to a known hotbar, make it active. Otherwise, ignore
36
+ * @param hotbar The hotbar instance, or the index, or its ID
37
+ */
38
+ setActiveHotbar(hotbar: Hotbar | number | string): void;
39
+ private hotbarIndexById;
40
+ private hotbarIndex;
36
41
  get activeHotbarIndex(): number;
37
42
  protected fromStore(data?: Partial<HotbarStoreModel>): void;
38
43
  toJSON(): HotbarStoreModel;
39
- getActive(): Required<HotbarCreateOptions>;
40
- getByName(name: string): Required<HotbarCreateOptions>;
41
- getById(id: string): Required<HotbarCreateOptions>;
42
- add(data: HotbarCreateOptions, { setActive }?: {
43
- setActive?: boolean;
44
- }): void;
45
- setHotbarName(id: string, name: string): void;
46
- remove(hotbar: Hotbar): void;
44
+ getActive(): Required<CreateHotbarData>;
45
+ getByName(name: string): Required<CreateHotbarData>;
46
+ getById(id: string): Required<CreateHotbarData>;
47
+ add: (data: CreateHotbarData, { setActive }?: CreateHotbarOptions) => void;
48
+ setHotbarName: (id: string, name: string) => any;
49
+ remove: (hotbar: Hotbar) => void;
47
50
  addToHotbar(item: CatalogEntity, cellIndex?: number): void;
48
51
  removeFromHotbar(uid: string): void;
49
52
  /**
@@ -61,4 +64,6 @@ export declare class HotbarStore extends BaseStore<HotbarStoreModel> {
61
64
  * @returns boolean
62
65
  */
63
66
  isAddedToActive(entity: CatalogEntity): boolean;
67
+ getDisplayLabel(hotbar: Hotbar): string;
68
+ getDisplayIndex(hotbar: Hotbar): string;
64
69
  }
@@ -0,0 +1,4 @@
1
+ /// <reference types="@ogre-tools/injectable" />
2
+ import { HotbarStore } from "./hotbar-store";
3
+ declare const hotbarManagerInjectable: import("@ogre-tools/injectable").Injectable<import("@ogre-tools/injectable").InjectionToken<HotbarStore, unknown>, HotbarStore, unknown>;
4
+ export default hotbarManagerInjectable;
@@ -29,11 +29,14 @@ export interface HotbarItem {
29
29
  [key: string]: string;
30
30
  };
31
31
  }
32
- export declare type Hotbar = Required<HotbarCreateOptions>;
33
- export interface HotbarCreateOptions {
32
+ export declare type Hotbar = Required<CreateHotbarData>;
33
+ export interface CreateHotbarData {
34
34
  id?: string;
35
35
  name: string;
36
36
  items?: Tuple<HotbarItem | null, typeof defaultHotbarCells>;
37
37
  }
38
+ export interface CreateHotbarOptions {
39
+ setActive?: boolean;
40
+ }
38
41
  export declare const defaultHotbarCells = 12;
39
42
  export declare function getEmptyHotbar(name: string, id?: string): Hotbar;
@@ -19,6 +19,7 @@
19
19
  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20
20
  */
21
21
  export declare const dialogShowOpenDialogHandler = "dialog:show-open-dialog";
22
+ export declare const catalogEntityRunListener = "catalog-entity:run";
22
23
  export * from "./ipc";
23
24
  export * from "./invalid-kubeconfig";
24
25
  export * from "./update-available.ipc";
@@ -33,6 +33,7 @@ export declare const isIntegrationTesting: boolean;
33
33
  export declare const productName: string;
34
34
  export declare const appName: string;
35
35
  export declare const publicPath: string;
36
+ export declare const defaultTheme: string;
36
37
  export declare const contextDir: string;
37
38
  export declare const buildDir: string;
38
39
  export declare const preloadEntrypoint: string;