@plurid/plurid-ui-state-react 0.0.0-1
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.
- package/LICENSE +6 -0
- package/LICENSE.deon +8 -0
- package/README.md +62 -0
- package/distribution/data/interfaces/index.d.ts +3 -0
- package/distribution/index.d.ts +2 -0
- package/distribution/index.es.js +365 -0
- package/distribution/index.es.js.map +1 -0
- package/distribution/index.js +379 -0
- package/distribution/index.js.map +1 -0
- package/distribution/modules/head/actions/index.d.ts +5 -0
- package/distribution/modules/head/index.d.ts +6 -0
- package/distribution/modules/head/initial/index.d.ts +3 -0
- package/distribution/modules/head/reducer/index.d.ts +4 -0
- package/distribution/modules/head/resolvers/index.d.ts +5 -0
- package/distribution/modules/head/selectors/index.d.ts +6 -0
- package/distribution/modules/head/types/index.d.ts +21 -0
- package/distribution/modules/index.d.ts +6 -0
- package/distribution/modules/notifications/actions/index.d.ts +7 -0
- package/distribution/modules/notifications/index.d.ts +6 -0
- package/distribution/modules/notifications/initial/index.d.ts +3 -0
- package/distribution/modules/notifications/reducer/index.d.ts +3 -0
- package/distribution/modules/notifications/resolvers/index.d.ts +7 -0
- package/distribution/modules/notifications/selectors/index.d.ts +6 -0
- package/distribution/modules/notifications/types/index.d.ts +31 -0
- package/distribution/modules/shortcuts/actions/index.d.ts +5 -0
- package/distribution/modules/shortcuts/index.d.ts +6 -0
- package/distribution/modules/shortcuts/initial/index.d.ts +3 -0
- package/distribution/modules/shortcuts/reducer/index.d.ts +3 -0
- package/distribution/modules/shortcuts/resolvers/index.d.ts +7 -0
- package/distribution/modules/shortcuts/selectors/index.d.ts +6 -0
- package/distribution/modules/shortcuts/types/index.d.ts +9 -0
- package/distribution/modules/sitting/actions/index.d.ts +6 -0
- package/distribution/modules/sitting/index.d.ts +6 -0
- package/distribution/modules/sitting/initial/index.d.ts +3 -0
- package/distribution/modules/sitting/reducer/index.d.ts +4 -0
- package/distribution/modules/sitting/resolvers/index.d.ts +6 -0
- package/distribution/modules/sitting/selectors/index.d.ts +7 -0
- package/distribution/modules/sitting/types/index.d.ts +15 -0
- package/distribution/modules/themes/actions/index.d.ts +5 -0
- package/distribution/modules/themes/index.d.ts +6 -0
- package/distribution/modules/themes/initial/index.d.ts +3 -0
- package/distribution/modules/themes/reducer/index.d.ts +4 -0
- package/distribution/modules/themes/resolvers/index.d.ts +5 -0
- package/distribution/modules/themes/selectors/index.d.ts +7 -0
- package/distribution/modules/themes/types/index.d.ts +15 -0
- package/package.json +64 -0
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import * as Types from '../types';
|
|
2
|
+
declare const reducer: (state: Types.State | undefined, action: Types.Actions) => Types.State;
|
|
3
|
+
declare const metareducer: (initialState: Types.State) => (state: Types.State | undefined, action: Types.Actions) => Types.State;
|
|
4
|
+
export { reducer, metareducer, };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as Types from '../types';
|
|
2
|
+
declare const resolvers: {
|
|
3
|
+
setSittingCurrentLink: (state: Types.State, action: Types.SetSittingCurrentLinkAction) => Types.State;
|
|
4
|
+
toggleSittingTray: (state: Types.State, action: Types.ToggleSittingTrayAction) => Types.State;
|
|
5
|
+
};
|
|
6
|
+
export default resolvers;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { StateOfAny } from "../../../data/interfaces";
|
|
2
|
+
import * as Types from '../types';
|
|
3
|
+
declare const selectors: {
|
|
4
|
+
getCurrentLink: (state: StateOfAny & Record<'sitting', Types.State>) => string;
|
|
5
|
+
getTray: (state: StateOfAny & Record<'sitting', Types.State>) => boolean;
|
|
6
|
+
};
|
|
7
|
+
export default selectors;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare const SET_SITTING_CURRENT_LINK = "SET_SITTING_CURRENT_LINK";
|
|
2
|
+
export interface SetSittingCurrentLinkAction {
|
|
3
|
+
type: typeof SET_SITTING_CURRENT_LINK;
|
|
4
|
+
payload: string;
|
|
5
|
+
}
|
|
6
|
+
export declare const TOGGLE_SITTING_TRAY = "TOGGLE_SITTING_TRAY";
|
|
7
|
+
export interface ToggleSittingTrayAction {
|
|
8
|
+
type: typeof TOGGLE_SITTING_TRAY;
|
|
9
|
+
payload?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export interface State {
|
|
12
|
+
currentLink: string;
|
|
13
|
+
tray: boolean;
|
|
14
|
+
}
|
|
15
|
+
export declare type Actions = SetSittingCurrentLinkAction | ToggleSittingTrayAction;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import actions from './actions';
|
|
2
|
+
import initialState from './initial';
|
|
3
|
+
import { reducer, metareducer } from './reducer';
|
|
4
|
+
import selectors from './selectors';
|
|
5
|
+
import * as Types from './types';
|
|
6
|
+
export { actions, initialState, reducer, metareducer, selectors, Types, };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import * as Types from '../types';
|
|
2
|
+
declare const reducer: (state: Types.State | undefined, action: Types.Actions) => Types.State;
|
|
3
|
+
declare const metareducer: (initialState: Types.State) => (state: Types.State | undefined, action: Types.Actions) => Types.State;
|
|
4
|
+
export { reducer, metareducer, };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { StateOfAny } from "../../../data/interfaces";
|
|
2
|
+
import * as Types from '../types';
|
|
3
|
+
declare const selectors: {
|
|
4
|
+
getGeneralTheme: (state: StateOfAny & Record<'themes', Types.State>) => import("@plurid/plurid-themes/distribution").Theme;
|
|
5
|
+
getInteractionTheme: (state: StateOfAny & Record<'themes', Types.State>) => import("@plurid/plurid-themes/distribution").Theme;
|
|
6
|
+
};
|
|
7
|
+
export default selectors;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Theme } from '@plurid/plurid-themes';
|
|
2
|
+
export declare const SET_THEME = "SET_THEME";
|
|
3
|
+
export interface SetThemePayload {
|
|
4
|
+
type: 'general' | 'interaction';
|
|
5
|
+
theme: Theme;
|
|
6
|
+
}
|
|
7
|
+
export interface SetThemeAction {
|
|
8
|
+
type: typeof SET_THEME;
|
|
9
|
+
payload: SetThemePayload;
|
|
10
|
+
}
|
|
11
|
+
export interface State {
|
|
12
|
+
general: Theme;
|
|
13
|
+
interaction: Theme;
|
|
14
|
+
}
|
|
15
|
+
export declare type Actions = SetThemeAction;
|
package/package.json
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@plurid/plurid-ui-state-react",
|
|
3
|
+
"version": "0.0.0-1",
|
|
4
|
+
"description": "Plurid User Interface State for React",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"plurid",
|
|
7
|
+
"ui",
|
|
8
|
+
"state",
|
|
9
|
+
"react"
|
|
10
|
+
],
|
|
11
|
+
"author": "ly3xqhl8g9 <ly3xqhl8g9@plurid.com> (https://plurid.com)",
|
|
12
|
+
"license": "SEE LICENSE IN LICENSE",
|
|
13
|
+
"repository": {
|
|
14
|
+
"type": "git",
|
|
15
|
+
"url": "https://github.com/plurid/plurid-ui"
|
|
16
|
+
},
|
|
17
|
+
"bugs": {
|
|
18
|
+
"email": "source@plurid.com",
|
|
19
|
+
"url": "https://github.com/plurid/plurid-ui/issues"
|
|
20
|
+
},
|
|
21
|
+
"homepage": "https://github.com/plurid/plurid-ui",
|
|
22
|
+
"publishConfig": {
|
|
23
|
+
"registry": "https://registry.npmjs.org/",
|
|
24
|
+
"access": "public"
|
|
25
|
+
},
|
|
26
|
+
"files": [
|
|
27
|
+
"distribution/"
|
|
28
|
+
],
|
|
29
|
+
"main": "distribution/index.js",
|
|
30
|
+
"module": "distribution/index.es.js",
|
|
31
|
+
"types": "distribution/index.d.ts",
|
|
32
|
+
"engines": {
|
|
33
|
+
"node": ">=12",
|
|
34
|
+
"npm": ">=6"
|
|
35
|
+
},
|
|
36
|
+
"scripts": {
|
|
37
|
+
"test": "jest -c ./configurations/jest.config.js",
|
|
38
|
+
"lint": "eslint -c ./configurations/.eslintrc.js ./source/index.ts",
|
|
39
|
+
"clean": "rm -rf ./distribution",
|
|
40
|
+
"build.clean": "rm -rf `find ./distribution/ -type d -name __tests__`",
|
|
41
|
+
"build.production": "rollup -c ./scripts/rollup.config.js --environment BUILD:production",
|
|
42
|
+
"build": "yarn clean && yarn lint && yarn test && yarn build.production && yarn build.clean",
|
|
43
|
+
"prepublishOnly": "yarn build"
|
|
44
|
+
},
|
|
45
|
+
"peerDependencies": {
|
|
46
|
+
"@plurid/plurid-themes": "*"
|
|
47
|
+
},
|
|
48
|
+
"devDependencies": {
|
|
49
|
+
"@plurid/plurid-themes": "^0.0.0-0",
|
|
50
|
+
"@types/jest": "^27.0.2",
|
|
51
|
+
"@typescript-eslint/eslint-plugin": "^4.31.2",
|
|
52
|
+
"@typescript-eslint/parser": "^4.31.2",
|
|
53
|
+
"@zerollup/ts-transform-paths": "^1.7.18",
|
|
54
|
+
"eslint": "^7.32.0",
|
|
55
|
+
"jest": "^27.2.1",
|
|
56
|
+
"rollup": "^2.57.0",
|
|
57
|
+
"rollup-plugin-terser": "^7.0.2",
|
|
58
|
+
"rollup-plugin-typescript2": "^0.30.0",
|
|
59
|
+
"ts-jest": "^27.0.5",
|
|
60
|
+
"ts-node": "^10.2.1",
|
|
61
|
+
"ttypescript": "^1.5.12",
|
|
62
|
+
"typescript": "^4.4.3"
|
|
63
|
+
}
|
|
64
|
+
}
|