commandbar 1.6.15 → 1.7.0

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "commandbar",
3
- "version": "1.6.15",
3
+ "version": "1.7.0",
4
4
  "description": "Javascript Utility for CommandBar",
5
5
  "main": "build/commandbar-js/src/index.js",
6
6
  "types": "build/commandbar-js/src/index.d.ts",
@@ -18,9 +18,13 @@
18
18
  "author": "",
19
19
  "license": "ISC",
20
20
  "dependencies": {
21
+ "commandbar-launcher": "^1.1.9",
21
22
  "fp-ts": "2.10.5",
22
23
  "io-ts": "2.2.13"
23
24
  },
24
- "devDependencies": {},
25
- "peerDependencies": {}
25
+ "devDependencies": {
26
+ "rimraf": "3.0.2",
27
+ "typescript": "4.6.2",
28
+ "webpack": "5.74.0"
29
+ }
26
30
  }
@@ -0,0 +1,7 @@
1
+ declare module 'commandbar-launcher' {
2
+ import { CSSProperties, FC } from 'react';
3
+
4
+ export const getControlKey: () => string;
5
+ const Launcher: FC<{ text: string; style: CSSProperties }>;
6
+ export default Launcher;
7
+ }
package/src/index.ts CHANGED
@@ -1,9 +1,11 @@
1
+ import Launcher, { getControlKey } from 'commandbar-launcher';
1
2
  import { CommandBarClientSDK } from '../../internal/src/client/CommandBarClientSDK';
2
3
 
3
4
  export { default as init } from './init';
4
5
  export { initProxySDK as initProxy } from '../../internal/src/client/proxy';
5
6
  export { snippet } from './snippet';
6
7
  export { CommandBarClientSDK };
8
+ export { Launcher, getControlKey };
7
9
 
8
10
  declare global {
9
11
  interface Window {
package/src/snippet.ts CHANGED
@@ -1,5 +1,8 @@
1
1
  /* eslint-disable no-template-curly-in-string */
2
2
  /* eslint-disable prefer-rest-params */
3
+
4
+ import { _eventSubscriptions } from '../../internal/src/client/symbols';
5
+
3
6
  /* eslint-disable @typescript-eslint/no-inferrable-types */
4
7
  export const snippet = (org: string) => {
5
8
  const polyfills = ['Object.assign', 'Symbol', 'Symbol.for'].join('%2C');
@@ -38,11 +41,12 @@ export const snippet = (org: string) => {
38
41
  [_isProxy]: true,
39
42
  [_queue]: new Array<unknown>(),
40
43
  [_unwrap]: () => proxy,
44
+ [_eventSubscriptions]: undefined,
41
45
  },
42
46
  w.CommandBar,
43
47
  );
44
48
 
45
- const ASYNC_METHODS = ['addCommand', 'boot'];
49
+ const ASYNC_METHODS = ['addCommand', 'boot', 'addEventSubscriber'];
46
50
 
47
51
  const sdk = proxy;
48
52