@tb-dev/vue 0.1.2 → 0.1.3

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.
@@ -13,3 +13,5 @@ export type OnKeyDownOptions = Omit<OnKeyStrokeOptions, 'eventName'> & {
13
13
  export declare function onKeyDown(key: KeyFilter, handler?: KeyDownEventHandler, options?: OnKeyDownOptions): Fn;
14
14
  export declare function onAltKeyDown(key: KeyFilter, handler?: KeyDownEventHandler, options?: Omit<OnKeyDownOptions, 'altKey' | 'eventName'>): Fn;
15
15
  export declare function onCtrlKeyDown(key: KeyFilter, handler?: KeyDownEventHandler, options?: Omit<OnKeyDownOptions, 'ctrlKey' | 'eventName'>): Fn;
16
+ export declare function onShiftKeyDown(key: KeyFilter, handler?: KeyDownEventHandler, options?: Omit<OnKeyDownOptions, 'eventName' | 'shiftKey'>): Fn;
17
+ export declare function onCtrlShiftKeyDown(key: KeyFilter, handler?: KeyDownEventHandler, options?: Omit<OnKeyDownOptions, 'eventName' | 'ctrlKey' | 'shiftKey'>): Fn;
package/dist/index.js CHANGED
@@ -130,6 +130,12 @@ function onAltKeyDown(key, handler, options) {
130
130
  function onCtrlKeyDown(key, handler, options) {
131
131
  return onKeyDown(key, handler, { ...options, ctrlKey: true });
132
132
  }
133
+ function onShiftKeyDown(key, handler, options) {
134
+ return onKeyDown(key, handler, { ...options, shiftKey: true });
135
+ }
136
+ function onCtrlShiftKeyDown(key, handler, options) {
137
+ return onKeyDown(key, handler, { ...options, ctrlKey: true, shiftKey: true });
138
+ }
133
139
 
134
140
  function localRef(key, initial, options) {
135
141
  const defaultValue = { inner: initial };
@@ -163,4 +169,4 @@ function maybe(value, fn) {
163
169
  return isNil(_value) ? null : fn(_value);
164
170
  }
165
171
 
166
- export { _sfc_main as Link, asyncComputed, asyncRef, getErrorHandler, handleError, localRef, maybe, onAltKeyDown, onCtrlKeyDown, onKeyDown, setErrorHandler, useElementSize, useHeight, useWidth, useWindowHeight, useWindowWidth };
172
+ export { _sfc_main as Link, asyncComputed, asyncRef, getErrorHandler, handleError, localRef, maybe, onAltKeyDown, onCtrlKeyDown, onCtrlShiftKeyDown, onKeyDown, onShiftKeyDown, setErrorHandler, useElementSize, useHeight, useWidth, useWindowHeight, useWindowWidth };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tb-dev/vue",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "Vue utilities",
5
5
  "license": "MIT",
6
6
  "type": "module",