mirror of
https://github.com/quine-global/hyper.git
synced 2026-01-12 20:18:41 -09:00
move constants to typings as well
This commit is contained in:
parent
c62ed62752
commit
f48c0e0608
22 changed files with 34 additions and 34 deletions
|
|
@ -1,4 +1,4 @@
|
|||
import {CONFIG_LOAD, CONFIG_RELOAD} from '../constants/config';
|
||||
import {CONFIG_LOAD, CONFIG_RELOAD} from '../../typings/constants/config';
|
||||
import type {HyperActions} from '../../typings/hyper';
|
||||
import type {configOptions} from '../../typings/config';
|
||||
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
import {CLOSE_TAB, CHANGE_TAB} from '../constants/tabs';
|
||||
import {CLOSE_TAB, CHANGE_TAB} from '../../typings/constants/tabs';
|
||||
import {
|
||||
UI_WINDOW_MAXIMIZE,
|
||||
UI_WINDOW_UNMAXIMIZE,
|
||||
UI_OPEN_HAMBURGER_MENU,
|
||||
UI_WINDOW_MINIMIZE,
|
||||
UI_WINDOW_CLOSE
|
||||
} from '../constants/ui';
|
||||
} from '../../typings/constants/ui';
|
||||
import rpc from '../rpc';
|
||||
import {userExitTermGroup, setActiveGroup} from './term-groups';
|
||||
import type {HyperDispatch} from '../../typings/hyper';
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import rpc from '../rpc';
|
||||
import {INIT} from '../constants';
|
||||
import {INIT} from '../../typings/constants';
|
||||
import type {HyperDispatch} from '../../typings/hyper';
|
||||
|
||||
export default function init() {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import {NOTIFICATION_MESSAGE, NOTIFICATION_DISMISS} from '../constants/notifications';
|
||||
import {NOTIFICATION_MESSAGE, NOTIFICATION_DISMISS} from '../../typings/constants/notifications';
|
||||
import type {HyperActions} from '../../typings/hyper';
|
||||
|
||||
export function dismissNotification(id: string): HyperActions {
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ import {
|
|||
SESSION_USER_DATA,
|
||||
SESSION_SET_XTERM_TITLE,
|
||||
SESSION_SEARCH
|
||||
} from '../constants/sessions';
|
||||
} from '../../typings/constants/sessions';
|
||||
import type {HyperState, HyperDispatch, HyperActions} from '../../typings/hyper';
|
||||
import type {Session} from '../../typings/common';
|
||||
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@ import {
|
|||
TERM_GROUP_REQUEST,
|
||||
TERM_GROUP_EXIT,
|
||||
TERM_GROUP_EXIT_ACTIVE
|
||||
} from '../constants/term-groups';
|
||||
import {SESSION_REQUEST} from '../constants/sessions';
|
||||
} from '../../typings/constants/term-groups';
|
||||
import {SESSION_REQUEST} from '../../typings/constants/sessions';
|
||||
import findBySession from '../utils/term-groups';
|
||||
import {getRootGroups} from '../selectors';
|
||||
import {setActiveSession, ptyExitSession, userExitSession} from './sessions';
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ import {
|
|||
UI_OPEN_SSH_URL,
|
||||
UI_CONTEXTMENU_OPEN,
|
||||
UI_COMMAND_EXEC
|
||||
} from '../constants/ui';
|
||||
} from '../../typings/constants/ui';
|
||||
|
||||
import {setActiveGroup} from './term-groups';
|
||||
import type parseUrl from 'parse-url';
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import {UPDATE_INSTALL, UPDATE_AVAILABLE} from '../constants/updater';
|
||||
import {UPDATE_INSTALL, UPDATE_AVAILABLE} from '../../typings/constants/updater';
|
||||
import rpc from '../rpc';
|
||||
import type {HyperActions} from '../../typings/hyper';
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ import {
|
|||
SESSION_SET_XTERM_TITLE,
|
||||
SESSION_SET_CWD,
|
||||
SESSION_SEARCH
|
||||
} from '../constants/sessions';
|
||||
} from '../../typings/constants/sessions';
|
||||
import type {sessionState, session, Mutable, ISessionReducer} from '../../typings/hyper';
|
||||
|
||||
const initialState: sessionState = Immutable<Mutable<sessionState>>({
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
import {v4 as uuidv4} from 'uuid';
|
||||
import type {Immutable as ImmutableType} from 'seamless-immutable';
|
||||
import Immutable from 'seamless-immutable';
|
||||
import {TERM_GROUP_EXIT, TERM_GROUP_RESIZE} from '../constants/term-groups';
|
||||
import type {SessionAddAction} from '../constants/sessions';
|
||||
import {SESSION_ADD, SESSION_SET_ACTIVE} from '../constants/sessions';
|
||||
import {TERM_GROUP_EXIT, TERM_GROUP_RESIZE} from '../../typings/constants/term-groups';
|
||||
import type {SessionAddAction} from '../../typings/constants/sessions';
|
||||
import {SESSION_ADD, SESSION_SET_ACTIVE} from '../../typings/constants/sessions';
|
||||
import findBySession from '../utils/term-groups';
|
||||
import {decorateTermGroupsReducer} from '../utils/plugins';
|
||||
import type {ITermGroup, ITermState, ITermGroups, ITermGroupReducer, Mutable} from '../../typings/hyper';
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import type {Immutable as ImmutableType} from 'seamless-immutable';
|
||||
import Immutable from 'seamless-immutable';
|
||||
import {decorateUIReducer} from '../utils/plugins';
|
||||
import {CONFIG_LOAD, CONFIG_RELOAD} from '../constants/config';
|
||||
import {CONFIG_LOAD, CONFIG_RELOAD} from '../../typings/constants/config';
|
||||
import {
|
||||
UI_FONT_SIZE_SET,
|
||||
UI_FONT_SIZE_RESET,
|
||||
|
|
@ -11,8 +11,8 @@ import {
|
|||
UI_WINDOW_GEOMETRY_CHANGED,
|
||||
UI_ENTER_FULLSCREEN,
|
||||
UI_LEAVE_FULLSCREEN
|
||||
} from '../constants/ui';
|
||||
import {NOTIFICATION_MESSAGE, NOTIFICATION_DISMISS} from '../constants/notifications';
|
||||
} from '../../typings/constants/ui';
|
||||
import {NOTIFICATION_MESSAGE, NOTIFICATION_DISMISS} from '../../typings/constants/notifications';
|
||||
import {
|
||||
SESSION_ADD,
|
||||
SESSION_RESIZE,
|
||||
|
|
@ -20,8 +20,8 @@ import {
|
|||
SESSION_PTY_EXIT,
|
||||
SESSION_SET_ACTIVE,
|
||||
SESSION_SET_CWD
|
||||
} from '../constants/sessions';
|
||||
import {UPDATE_AVAILABLE} from '../constants/updater';
|
||||
} from '../../typings/constants/sessions';
|
||||
import {UPDATE_AVAILABLE} from '../../typings/constants/updater';
|
||||
import type {uiState, Mutable, IUiReducer} from '../../typings/hyper';
|
||||
import {release} from 'os';
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
"./lib/",
|
||||
"./test/",
|
||||
"./cli/",
|
||||
"./typings"
|
||||
"./typings/"
|
||||
],
|
||||
"references": [
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import type {configOptions} from '../../typings/config';
|
||||
import type {configOptions} from '../config';
|
||||
|
||||
export const CONFIG_LOAD = 'CONFIG_LOAD';
|
||||
export const CONFIG_RELOAD = 'CONFIG_RELOAD';
|
||||
|
|
@ -2,10 +2,10 @@ export const TERM_GROUP_REQUEST = 'TERM_GROUP_REQUEST';
|
|||
export const TERM_GROUP_EXIT = 'TERM_GROUP_EXIT';
|
||||
export const TERM_GROUP_RESIZE = 'TERM_GROUP_RESIZE';
|
||||
export const TERM_GROUP_EXIT_ACTIVE = 'TERM_GROUP_EXIT_ACTIVE';
|
||||
export const DIRECTION = {
|
||||
HORIZONTAL: 'HORIZONTAL',
|
||||
VERTICAL: 'VERTICAL'
|
||||
} as const;
|
||||
export enum DIRECTION {
|
||||
HORIZONTAL = 'HORIZONTAL',
|
||||
VERTICAL = 'VERTICAL'
|
||||
}
|
||||
|
||||
export interface TermGroupRequestAction {
|
||||
type: typeof TERM_GROUP_REQUEST;
|
||||
16
typings/hyper.d.ts
vendored
16
typings/hyper.d.ts
vendored
|
|
@ -167,14 +167,14 @@ export type HyperState = {
|
|||
termGroups: ITermState;
|
||||
};
|
||||
|
||||
import type {UIActions} from '../lib/constants/ui';
|
||||
import type {ConfigActions} from '../lib/constants/config';
|
||||
import type {SessionActions} from '../lib/constants/sessions';
|
||||
import type {NotificationActions} from '../lib/constants/notifications';
|
||||
import type {UpdateActions} from '../lib/constants/updater';
|
||||
import type {TermGroupActions} from '../lib/constants/term-groups';
|
||||
import type {InitActions} from '../lib/constants';
|
||||
import type {TabActions} from '../lib/constants/tabs';
|
||||
import type {UIActions} from './constants/ui';
|
||||
import type {ConfigActions} from './constants/config';
|
||||
import type {SessionActions} from './constants/sessions';
|
||||
import type {NotificationActions} from './constants/notifications';
|
||||
import type {UpdateActions} from './constants/updater';
|
||||
import type {TermGroupActions} from './constants/term-groups';
|
||||
import type {InitActions} from './constants';
|
||||
import type {TabActions} from './constants/tabs';
|
||||
|
||||
export type HyperActions = (
|
||||
| UIActions
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ const config: webpack.Configuration[] = [
|
|||
mode: 'none',
|
||||
name: 'hyper',
|
||||
resolve: {
|
||||
extensions: ['.js', '.jsx', '.ts', '.tsx']
|
||||
extensions: ['.js', '.jsx', '.ts', '.tsx', '.d.ts']
|
||||
},
|
||||
devtool: isProd ? 'hidden-source-map' : 'cheap-module-source-map',
|
||||
entry: './lib/index.tsx',
|
||||
|
|
|
|||
Loading…
Reference in a new issue