@plurid/plurid-ui-state-react 0.0.0-2 → 0.0.0-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.
@@ -1 +1 @@
1
- {"version":3,"file":"index.es.js","sources":["../source/modules/head/types/index.ts","../source/modules/head/actions/index.ts","../source/modules/head/initial/index.ts","../source/modules/head/resolvers/index.ts","../source/modules/head/reducer/index.ts","../source/modules/head/selectors/index.ts","../source/modules/notifications/types/index.ts","../source/modules/notifications/actions/index.ts","../source/modules/notifications/initial/index.ts","../source/modules/notifications/resolvers/index.ts","../source/modules/notifications/reducer/index.ts","../source/modules/notifications/selectors/index.ts","../source/modules/shortcuts/types/index.ts","../source/modules/shortcuts/actions/index.ts","../source/modules/shortcuts/initial/index.ts","../source/modules/shortcuts/resolvers/index.ts","../source/modules/shortcuts/reducer/index.ts","../source/modules/shortcuts/selectors/index.ts","../source/modules/sitting/types/index.ts","../source/modules/sitting/actions/index.ts","../source/modules/sitting/initial/index.ts","../source/modules/sitting/resolvers/index.ts","../source/modules/sitting/reducer/index.ts","../source/modules/sitting/selectors/index.ts","../source/modules/themes/types/index.ts","../source/modules/themes/actions/index.ts","../source/modules/themes/initial/index.ts","../source/modules/themes/resolvers/index.ts","../source/modules/themes/reducer/index.ts","../source/modules/themes/selectors/index.ts"],"sourcesContent":["// #region module\nexport interface Head {\n title: string;\n description: string;\n canonicalURL: string;\n ogTitle: string;\n ogImage: string;\n ogURL: string;\n ogDescription: string;\n styles: string[];\n scripts: string[];\n}\n\n\nexport const SET_HEAD = 'SET_HEAD';\nexport interface SetHeadPayload extends Partial<Head> {}\nexport interface SetHeadAction {\n type: typeof SET_HEAD;\n payload: SetHeadPayload;\n}\n\n\n\nexport interface State extends Head {}\n\n\nexport type Actions =\n | SetHeadAction;\n// #endregion module\n","// #region imports\n // #region external\n import * as Types from '../types';\n // #endregion external\n// #endregion imports\n\n\n\n// #region module\n/**\n * Overwrite any property currently set in the `head`,\n * including `styles` and `scripts`, if any.\n *\n * @param payload\n */\nconst setHead = (\n payload: Types.SetHeadPayload,\n): Types.SetHeadAction => {\n return {\n type: Types.SET_HEAD,\n payload,\n };\n}\n\n\n\nconst actions = {\n setHead,\n};\n// #endregion module\n\n\n\n// #region exports\nexport default actions;\n// #endregion exports\n","// #region imports\n // #region external\n import * as Types from '../types';\n // #endregion external\n// #endregion imports\n\n\n\n// #region module\nconst initialState: Types.State = {\n title: '',\n description: '',\n ogTitle: '',\n ogImage: '',\n ogURL: '',\n ogDescription: '',\n canonicalURL: '',\n styles: [],\n scripts: [],\n};\n// #endregion module\n\n\n\n// #region exports\nexport default initialState;\n// #endregion exports\n","// #region imports\n // #region external\n import * as Types from '../types';\n // #endregion external\n// #endregion imports\n\n\n\n// #region module\nconst setHead = (\n state: Types.State,\n action: Types.SetHeadAction,\n): Types.State => {\n return {\n ...state,\n ...action.payload,\n };\n}\n\n\n\nconst resolvers = {\n setHead,\n};\n// #endregion module\n\n\n\n// #region exports\nexport default resolvers;\n// #endregion exports\n","// #region imports\n // #region external\n import * as Types from '../types';\n\n import initialState from '../initial';\n\n import resolvers from '../resolvers';\n // #endregion external\n// #endregion imports\n\n\n\n// #region module\nconst reducer = (\n state: Types.State = initialState,\n action: Types.Actions,\n): Types.State => {\n switch(action.type) {\n case Types.SET_HEAD:\n return resolvers.setHead(state, action);\n default:\n return {\n ...state,\n };\n }\n}\n\n\nconst metareducer = (\n initialState: Types.State,\n) => (\n state: Types.State = initialState,\n action: Types.Actions,\n) => reducer(\n state,\n action,\n);\n// #endregion module\n\n\n\n// #region exports\nexport {\n reducer,\n metareducer,\n};\n// #endregion exports\n","// #region imports\n // #region external\n import {\n StateOfAny,\n } from '#data/interfaces';\n\n import * as Types from '../types';\n // #endregion external\n// #endregion imports\n\n\n\n// #region module\nconst getHeadData = (\n state: StateOfAny & Record<'head', Types.State>,\n) => state.head;\n\n\n\nconst selectors = {\n getHeadData,\n};\n// #endregion module\n\n\n\n// #region exports\nexport default selectors;\n// #endregion exports\n","// #region module\nexport interface Notification {\n id: string;\n text: string;\n html?: boolean;\n react?: boolean;\n timeout?: number;\n}\n\n\nexport const ADD_NOTIFICATION = 'ADD_NOTIFICATION';\nexport interface AddNotificationPayload extends Notification {}\nexport interface AddNotificationAction {\n type: typeof ADD_NOTIFICATION;\n payload: AddNotificationPayload;\n}\n\n\nexport const UPDATE_NOTIFICATION = 'UPDATE_NOTIFICATION';\nexport interface UpdateNotificationPayload extends Notification {}\nexport interface UpdateNotificationAction {\n type: typeof UPDATE_NOTIFICATION;\n payload: UpdateNotificationPayload;\n}\n\n\nexport const REMOVE_NOTIFICATION = 'REMOVE_NOTIFICATION';\nexport interface RemoveNotificationPayload {\n id: string;\n}\nexport interface RemoveNotificationAction {\n type: typeof REMOVE_NOTIFICATION;\n payload: RemoveNotificationPayload;\n}\n\n\n\nexport type State = Notification[];\n\n\nexport type Actions = AddNotificationAction\n | UpdateNotificationAction\n | RemoveNotificationAction;\n// #endregion module\n","// #region imports\n // #region external\n import * as Types from '../types';\n // #endregion external\n// #endregion imports\n\n\n\n// #region module\nconst addNotification = (\n payload: Types.AddNotificationPayload,\n): Types.AddNotificationAction => {\n return {\n type: Types.ADD_NOTIFICATION,\n payload,\n };\n}\n\n\nconst updateNotification = (\n payload: Types.UpdateNotificationPayload,\n): Types.UpdateNotificationAction => {\n return {\n type: Types.UPDATE_NOTIFICATION,\n payload,\n };\n}\n\n\nconst removeNotification = (\n payload: Types.RemoveNotificationPayload,\n): Types.RemoveNotificationAction => {\n return {\n type: Types.REMOVE_NOTIFICATION,\n payload,\n };\n}\n\n\n\nconst actions = {\n addNotification,\n updateNotification,\n removeNotification,\n};\n// #endregion module\n\n\n\n// #region exports\nexport default actions;\n// #endregion exports\n","// #region imports\n // #region external\n import * as Types from '../types';\n // #endregion external\n// #endregion imports\n\n\n\n// #region module\nconst initialState: Types.State = [];\n// #endregion module\n\n\n\n// #region exports\nexport default initialState;\n// #endregion exports\n","// #region imports\n // #region external\n import * as Types from '../types';\n // #endregion external\n// #endregion imports\n\n\n\n// #region module\nconst addNotification = (\n state: Types.State,\n action: Types.AddNotificationAction,\n): Types.State => {\n const newNotification: Types.Notification = {\n ...action.payload,\n };\n\n const existingNotification = state.find(\n notification => notification.id === newNotification.id,\n );\n\n if (existingNotification) {\n const newState = state.map(notification => {\n if (notification.id === newNotification.id) {\n return newNotification;\n }\n\n return notification;\n });\n\n return newState;\n }\n\n return [\n ...state,\n newNotification,\n ];\n}\n\n\nconst updateNotification = (\n state: Types.State,\n action: Types.UpdateNotificationAction,\n): Types.State => {\n const updatedState = state.map(notification => {\n if (notification.id === action.payload.id) {\n const newNotification: Types.Notification = {\n ...action.payload,\n };\n return newNotification;\n }\n\n return {\n ...notification,\n };\n });\n\n return [\n ...updatedState,\n ];\n}\n\n\nconst removeNotification = (\n state: Types.State,\n action: Types.RemoveNotificationAction,\n): Types.State => {\n const updatedState = state.filter(\n notification => notification.id !== action.payload.id\n );\n\n return [\n ...updatedState,\n ];\n}\n\n\n\nconst resolvers = {\n addNotification,\n updateNotification,\n removeNotification,\n};\n// #endregion module\n\n\n\n// #region exports\nexport default resolvers;\n// #endregion exports\n","// #region imports\n // #region external\n import * as Types from '../types';\n\n import initialState from '../initial';\n\n import resolvers from '../resolvers';\n // #endregion external\n// #endregion imports\n\n\n\n// #region module\nconst reducer = (\n state: Types.State = initialState,\n action: Types.Actions,\n): Types.State => {\n switch(action.type) {\n case Types.ADD_NOTIFICATION:\n return resolvers.addNotification(state, action);\n case Types.UPDATE_NOTIFICATION:\n return resolvers.updateNotification(state, action);\n case Types.REMOVE_NOTIFICATION:\n return resolvers.removeNotification(state, action);\n default:\n return [\n ...state,\n ];\n }\n}\n// #endregion module\n\n\n\n// #region exports\nexport {\n reducer,\n};\n// #endregion exports\n","// #region imports\n // #region external\n import {\n StateOfAny,\n } from '#data/interfaces';\n\n import * as Types from '../types';\n // #endregion external\n// #endregion imports\n\n\n\n// #region module\nconst getAll = (\n state: StateOfAny & Record<'notifications', Types.State>,\n) => state.notifications;\n\n\n\nconst selectors = {\n getAll,\n};\n// #endregion module\n\n\n\n// #region exports\nexport default selectors;\n// #endregion exports\n","// #region module\nexport const TOGGLE_GLOBAL_SHORTCUTS = 'TOGGLE_GLOBAL_SHORTCUTS';\nexport interface ToggleGlobalShortcutsAction {\n type: typeof TOGGLE_GLOBAL_SHORTCUTS;\n payload?: boolean;\n}\n\n\n\nexport interface State {\n global: boolean;\n}\n\n\nexport type Actions =\n | ToggleGlobalShortcutsAction;\n// #endregion module\n","// #region imports\n // #region external\n import * as Types from '../types';\n // #endregion external\n// #endregion imports\n\n\n\n// #region module\nconst toggleGlobalShortcuts = (\n payload?: boolean,\n): Types.ToggleGlobalShortcutsAction => {\n return {\n type: Types.TOGGLE_GLOBAL_SHORTCUTS,\n payload,\n };\n}\n\n\n\nconst actions = {\n toggleGlobalShortcuts,\n};\n// #endregion module\n\n\n\n// #region exports\nexport default actions;\n// #endregion exports\n","// #region imports\n // #region external\n import * as Types from '../types';\n // #endregion external\n// #endregion imports\n\n\n\n// #region module\nconst initialState: Types.State = {\n global: true,\n};\n// #endregion module\n\n\n\n// #region exports\nexport default initialState;\n// #endregion exports\n","// #region imports\n // #region external\n import * as Types from '../types';\n // #endregion external\n// #endregion imports\n\n\n\n// #region module\nconst toggleGlobalShortcuts = (\n state: Types.State,\n action: Types.ToggleGlobalShortcutsAction,\n) => {\n const global = action.payload\n ? action.payload\n : !state.global;\n\n return {\n ...state,\n global,\n };\n}\n\n\nconst resolvers = {\n toggleGlobalShortcuts,\n};\n// #endregion module\n\n\n\n// #region exports\nexport default resolvers;\n// #endregion exports\n","// #region imports\n // #region external\n import * as Types from '../types';\n\n import initialState from '../initial';\n\n import resolvers from '../resolvers';\n // #endregion external\n// #endregion imports\n\n\n\n// #region module\nconst reducer = (\n state: Types.State = initialState,\n action: Types.Actions,\n): Types.State => {\n switch(action.type) {\n case Types.TOGGLE_GLOBAL_SHORTCUTS:\n return resolvers.toggleGlobalShortcuts(state, action);\n default:\n return {\n ...state,\n };\n }\n}\n// #endregion module\n\n\n\n// #region exports\nexport {\n reducer,\n};\n// #endregion exports\n","// #region imports\n // #region external\n import {\n StateOfAny,\n } from '#data/interfaces';\n\n import * as Types from '../types';\n // #endregion external\n// #endregion imports\n\n\n\n// #region module\nconst getGlobal = (\n state: StateOfAny & Record<'shortcuts', Types.State>,\n) => state.shortcuts.global;\n\n\n\nconst selectors = {\n getGlobal,\n};\n// #endregion module\n\n\n\n// #region exports\nexport default selectors;\n// #endregion exports\n","// #region module\nexport const SET_SITTING_CURRENT_LINK = 'SET_SITTING_CURRENT_LINK';\nexport interface SetSittingCurrentLinkAction {\n type: typeof SET_SITTING_CURRENT_LINK;\n payload: string;\n}\n\n\nexport const TOGGLE_SITTING_TRAY = 'TOGGLE_SITTING_TRAY';\nexport interface ToggleSittingTrayAction {\n type: typeof TOGGLE_SITTING_TRAY;\n payload?: boolean;\n}\n\n\n\nexport interface State {\n currentLink: string;\n tray: boolean;\n}\n\n\nexport type Actions =\n | SetSittingCurrentLinkAction\n | ToggleSittingTrayAction;\n// #endregion module\n","// #region imports\n // #region external\n import * as Types from '../types';\n // #endregion external\n// #endregion imports\n\n\n\n// #region module\nconst setSittingCurrentLink = (\n link: string,\n): Types.SetSittingCurrentLinkAction => {\n return {\n type: Types.SET_SITTING_CURRENT_LINK,\n payload: link,\n };\n}\n\n\nconst toggleSittingTray = (): Types.ToggleSittingTrayAction => {\n return {\n type: Types.TOGGLE_SITTING_TRAY,\n };\n}\n\n\n\nconst actions = {\n setSittingCurrentLink,\n toggleSittingTray,\n};\n// #endregion module\n\n\n\n// #region exports\nexport default actions;\n// #endregion exports\n","// #region imports\n // #region external\n import * as Types from '../types';\n // #endregion external\n// #endregion imports\n\n\n\n// #region module\nconst initialState: Types.State = {\n currentLink: '',\n tray: false,\n};\n// #endregion module\n\n\n\n// #region exports\nexport default initialState;\n// #endregion exports\n","// #region imports\n // #region external\n import * as Types from '../types';\n // #endregion external\n// #endregion imports\n\n\n\n// #region module\nconst setSittingCurrentLink = (\n state: Types.State,\n action: Types.SetSittingCurrentLinkAction,\n): Types.State => {\n const currentLink = action.payload;\n\n return {\n ...state,\n currentLink,\n };\n}\n\n\nconst toggleSittingTray = (\n state: Types.State,\n action: Types.ToggleSittingTrayAction,\n): Types.State => {\n if (typeof action.payload === 'boolean') {\n return {\n ...state,\n tray: action.payload,\n };\n }\n\n return {\n ...state,\n tray: !state.tray,\n };\n}\n\n\n\nconst resolvers = {\n setSittingCurrentLink,\n toggleSittingTray,\n};\n// #endregion module\n\n\n\n// #region exports\nexport default resolvers;\n// #endregion exports\n","// #region imports\n // #region external\n import * as Types from '../types';\n\n import initialState from '../initial';\n\n import resolvers from '../resolvers';\n // #endregion external\n// #endregion imports\n\n\n\n// #region module\nconst reducer = (\n state: Types.State = initialState,\n action: Types.Actions,\n): Types.State => {\n switch(action.type) {\n case Types.SET_SITTING_CURRENT_LINK:\n return resolvers.setSittingCurrentLink(state, action);\n case Types.TOGGLE_SITTING_TRAY:\n return resolvers.toggleSittingTray(state, action);\n default:\n return {\n ...state,\n };\n }\n}\n\n\nconst metareducer = (\n initialState: Types.State,\n) => (\n state: Types.State = initialState,\n action: Types.Actions,\n) => reducer(\n state,\n action,\n);\n// #endregion module\n\n\n\n// #region exports\nexport {\n reducer,\n metareducer,\n};\n// #endregion exports\n","// #region imports\n // #region external\n import {\n StateOfAny,\n } from '#data/interfaces';\n\n import * as Types from '../types';\n // #endregion external\n// #endregion imports\n\n\n\n// #region module\nconst getCurrentLink = (\n state: StateOfAny & Record<'sitting', Types.State>,\n) => state.sitting.currentLink;\nconst getTray = (\n state: StateOfAny & Record<'sitting', Types.State>,\n) => state.sitting.tray;\n\n\n\nconst selectors = {\n getCurrentLink,\n getTray,\n};\n// #endregion module\n\n\n\n// #region exports\nexport default selectors;\n// #endregion exports\n","// #region imports\n // #region libraries\n import {\n Theme,\n } from '@plurid/plurid-themes';\n // #endregion libraries\n// #endregion imports\n\n\n\n// #region module\nexport const SET_THEME = 'SET_THEME';\nexport interface SetThemePayload {\n type: 'general' | 'interaction';\n theme: Theme;\n}\nexport interface SetThemeAction {\n type: typeof SET_THEME;\n payload: SetThemePayload;\n}\n\n\n\nexport interface State {\n general: Theme,\n interaction: Theme,\n}\n\n\nexport type Actions =\n | SetThemeAction;\n// #endregion module\n","// #region imports\n // #region external\n import * as Types from '../types';\n // #endregion external\n// #endregion imports\n\n\n\n// #region module\nconst setTheme = (\n payload: Types.SetThemePayload,\n): Types.SetThemeAction => {\n return {\n type: Types.SET_THEME,\n payload,\n };\n}\n\n\n\nconst actions = {\n setTheme,\n};\n// #endregion module\n\n\n\n// #region exports\nexport default actions;\n// #endregion exports\n","// #region imports\n // #region libraries\n import {\n plurid,\n } from '@plurid/plurid-themes';\n // #endregion libraries\n\n\n // #region external\n import * as Types from '../types';\n // #endregion external\n// #endregion imports\n\n\n\n// #region module\nconst initialState: Types.State = {\n general: {\n ...plurid,\n },\n interaction: {\n ...plurid,\n },\n};\n// #endregion module\n\n\n\n// #region exports\nexport default initialState;\n// #endregion exports\n","// #region imports\n // #region external\n import * as Types from '../types';\n // #endregion external\n// #endregion imports\n\n\n\n// #region module\nconst setTheme = (\n state: Types.State,\n action: Types.SetThemeAction,\n): Types.State => {\n const {\n type,\n theme,\n } = action.payload;\n\n const newState = {\n ...state,\n };\n\n newState[type] = {\n ...theme,\n };\n\n return newState;\n}\n\n\n\nconst resolvers = {\n setTheme,\n};\n// #endregion module\n\n\n\n// #region exports\nexport default resolvers;\n// #endregion exports\n","// #region imports\n // #region external\n import * as Types from '../types';\n\n import initialState from '../initial';\n\n import resolvers from '../resolvers';\n // #endregion external\n// #endregion imports\n\n\n\n// #region module\nconst reducer = (\n state: Types.State = initialState,\n action: Types.Actions,\n): Types.State => {\n switch(action.type) {\n case Types.SET_THEME:\n return resolvers.setTheme(state, action);\n default:\n return {\n ...state,\n };\n }\n}\n\n\nconst metareducer = (\n initialState: Types.State,\n) => (\n state: Types.State = initialState,\n action: Types.Actions,\n) => reducer(\n state,\n action,\n);\n// #endregion module\n\n\n\n// #region exports\nexport {\n reducer,\n metareducer,\n};\n// #endregion exports\n","// #region imports\n // #region external\n import {\n StateOfAny,\n } from '#data/interfaces';\n\n import * as Types from '../types';\n // #endregion external\n// #endregion imports\n\n\n\n// #region module\nconst getGeneralTheme = (\n state: StateOfAny & Record<'themes', Types.State>,\n) => state.themes.general;\nconst getInteractionTheme = (\n state: StateOfAny & Record<'themes', Types.State>,\n) => state.themes.interaction;\n\n\n\nconst selectors = {\n getGeneralTheme,\n getInteractionTheme,\n};\n// #endregion module\n\n\n\n// #region exports\nexport default selectors;\n// #endregion exports\n"],"names":["SET_HEAD","setHead","payload","type","Types.SET_HEAD","actions","initialState","title","description","ogTitle","ogImage","ogURL","ogDescription","canonicalURL","styles","scripts","state","action","resolvers","reducer","metareducer","getHeadData","head","selectors","ADD_NOTIFICATION","UPDATE_NOTIFICATION","REMOVE_NOTIFICATION","addNotification","Types.ADD_NOTIFICATION","updateNotification","Types.UPDATE_NOTIFICATION","removeNotification","Types.REMOVE_NOTIFICATION","newNotification","existingNotification","find","notification","id","newState","map","updatedState","filter","getAll","notifications","TOGGLE_GLOBAL_SHORTCUTS","toggleGlobalShortcuts","Types.TOGGLE_GLOBAL_SHORTCUTS","global","getGlobal","shortcuts","SET_SITTING_CURRENT_LINK","TOGGLE_SITTING_TRAY","setSittingCurrentLink","link","Types.SET_SITTING_CURRENT_LINK","toggleSittingTray","Types.TOGGLE_SITTING_TRAY","currentLink","tray","getCurrentLink","sitting","getTray","SET_THEME","setTheme","Types.SET_THEME","general","plurid","interaction","theme","getGeneralTheme","themes","getInteractionTheme"],"mappings":";;AAcO,MAAMA,WAAW;;;;;;;ACCxB,MAAMC,YACFC,YAEO;IACHC,MAAMC;IACNF,SAAAA;;;AAMR,MAAMG,YAAU;aACZJ;;;AClBJ,MAAMK,iBAA4B;IAC9BC,OAAO;IACPC,aAAa;IACbC,SAAS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;IAGP,OAAO9B;;;AAKX,MAAMpB,YAAY;IACd6C,UAAAA;;;ACnBJ,MAAM5C,UAAU,CACZH,QAAqBV,cACrBW;IAEA,QAAOA,OAAOd;MACV,KAAK6D;QACD,OAAO9C,UAAU6C,SAAS/C,OAAOC;;MACrC;QACI,yBACOD;;;;AAMnB,MAAMI,cACFd,gBACC,CACDU,QAAqBV,cACrBW,WACCE,QACDH,OACAC;;ACtBJ,MAAMoD,kBACFrD,SACCA,MAAMsD,OAAOL;;AAClB,MAAMM,sBACFvD,SACCA,MAAMsD,OAAOH;;AAIlB,MAAM5C,YAAY;IACd8C,iBAAAA;IACAE,qBAAAA;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.es.js","sources":["../source/modules/head/types/index.ts","../source/modules/head/actions/index.ts","../source/modules/head/initial/index.ts","../source/modules/head/resolvers/index.ts","../source/modules/head/reducer/index.ts","../source/modules/head/selectors/index.ts","../source/modules/notifications/types/index.ts","../source/modules/notifications/actions/index.ts","../source/modules/notifications/initial/index.ts","../source/modules/notifications/resolvers/index.ts","../source/modules/notifications/reducer/index.ts","../source/modules/notifications/selectors/index.ts","../source/modules/shortcuts/types/index.ts","../source/modules/shortcuts/actions/index.ts","../source/modules/shortcuts/initial/index.ts","../source/modules/shortcuts/resolvers/index.ts","../source/modules/shortcuts/reducer/index.ts","../source/modules/shortcuts/selectors/index.ts","../source/modules/sitting/types/index.ts","../source/modules/sitting/actions/index.ts","../source/modules/sitting/initial/index.ts","../source/modules/sitting/resolvers/index.ts","../source/modules/sitting/reducer/index.ts","../source/modules/sitting/selectors/index.ts","../source/modules/themes/types/index.ts","../source/modules/themes/actions/index.ts","../source/modules/themes/initial/index.ts","../source/modules/themes/resolvers/index.ts","../source/modules/themes/reducer/index.ts","../source/modules/themes/selectors/index.ts"],"sourcesContent":["// #region module\nexport interface Head {\n title: string;\n description: string;\n canonicalURL: string;\n ogTitle: string;\n ogImage: string;\n ogURL: string;\n ogDescription: string;\n styles: string[];\n scripts: string[];\n}\n\n\nexport const SET_HEAD = 'SET_HEAD';\nexport interface SetHeadPayload extends Partial<Head> {}\nexport interface SetHeadAction {\n type: typeof SET_HEAD;\n payload: SetHeadPayload;\n}\n\n\n\nexport interface State extends Head {}\n\n\nexport type Actions =\n | SetHeadAction;\n// #endregion module\n","// #region imports\n // #region external\n import * as Types from '../types';\n // #endregion external\n// #endregion imports\n\n\n\n// #region module\n/**\n * Overwrite any property currently set in the `head`,\n * including `styles` and `scripts`, if any.\n *\n * @param payload\n */\nconst setHead = (\n payload: Types.SetHeadPayload,\n): Types.SetHeadAction => {\n return {\n type: Types.SET_HEAD,\n payload,\n };\n}\n\n\n\nconst actions = {\n setHead,\n};\n// #endregion module\n\n\n\n// #region exports\nexport default actions;\n// #endregion exports\n","// #region imports\n // #region external\n import * as Types from '../types';\n // #endregion external\n// #endregion imports\n\n\n\n// #region module\nconst initialState: Types.State = {\n title: '',\n description: '',\n ogTitle: '',\n ogImage: '',\n ogURL: '',\n ogDescription: '',\n canonicalURL: '',\n styles: [],\n scripts: [],\n};\n// #endregion module\n\n\n\n// #region exports\nexport default initialState;\n// #endregion exports\n","// #region imports\n // #region external\n import * as Types from '../types';\n // #endregion external\n// #endregion imports\n\n\n\n// #region module\nconst setHead = (\n state: Types.State,\n action: Types.SetHeadAction,\n): Types.State => {\n return {\n ...state,\n ...action.payload,\n };\n}\n\n\n\nconst resolvers = {\n setHead,\n};\n// #endregion module\n\n\n\n// #region exports\nexport default resolvers;\n// #endregion exports\n","// #region imports\n // #region external\n import * as Types from '../types';\n\n import initialState from '../initial';\n\n import resolvers from '../resolvers';\n // #endregion external\n// #endregion imports\n\n\n\n// #region module\nconst reducer = (\n state: Types.State = initialState,\n action: Types.Actions,\n): Types.State => {\n switch(action.type) {\n case Types.SET_HEAD:\n return resolvers.setHead(state, action);\n default:\n return {\n ...state,\n };\n }\n}\n\n\nconst metareducer = (\n initialState: Types.State,\n) => (\n state: Types.State = initialState,\n action: Types.Actions,\n) => reducer(\n state,\n action,\n);\n// #endregion module\n\n\n\n// #region exports\nexport {\n reducer,\n metareducer,\n};\n// #endregion exports\n","// #region imports\n // #region external\n import {\n StateOfAny,\n } from '#data/interfaces';\n\n import * as Types from '../types';\n // #endregion external\n// #endregion imports\n\n\n\n// #region module\nconst getHeadData = (\n state: StateOfAny & Record<'head', Types.State>,\n) => state.head;\n\n\n\nconst selectors = {\n getHeadData,\n};\n// #endregion module\n\n\n\n// #region exports\nexport default selectors;\n// #endregion exports\n","// #region module\nexport interface Notification {\n id: string;\n text: string;\n html?: boolean;\n react?: boolean;\n timeout?: number;\n}\n\n\nexport const ADD_NOTIFICATION = 'ADD_NOTIFICATION';\nexport interface AddNotificationPayload extends Notification {}\nexport interface AddNotificationAction {\n type: typeof ADD_NOTIFICATION;\n payload: AddNotificationPayload;\n}\n\n\nexport const UPDATE_NOTIFICATION = 'UPDATE_NOTIFICATION';\nexport interface UpdateNotificationPayload extends Notification {}\nexport interface UpdateNotificationAction {\n type: typeof UPDATE_NOTIFICATION;\n payload: UpdateNotificationPayload;\n}\n\n\nexport const REMOVE_NOTIFICATION = 'REMOVE_NOTIFICATION';\nexport interface RemoveNotificationPayload {\n id: string;\n}\nexport interface RemoveNotificationAction {\n type: typeof REMOVE_NOTIFICATION;\n payload: RemoveNotificationPayload;\n}\n\n\n\nexport type State = Notification[];\n\n\nexport type Actions = AddNotificationAction\n | UpdateNotificationAction\n | RemoveNotificationAction;\n// #endregion module\n","// #region imports\n // #region external\n import * as Types from '../types';\n // #endregion external\n// #endregion imports\n\n\n\n// #region module\nconst addNotification = (\n payload: Types.AddNotificationPayload,\n): Types.AddNotificationAction => {\n return {\n type: Types.ADD_NOTIFICATION,\n payload,\n };\n}\n\n\nconst updateNotification = (\n payload: Types.UpdateNotificationPayload,\n): Types.UpdateNotificationAction => {\n return {\n type: Types.UPDATE_NOTIFICATION,\n payload,\n };\n}\n\n\nconst removeNotification = (\n payload: Types.RemoveNotificationPayload,\n): Types.RemoveNotificationAction => {\n return {\n type: Types.REMOVE_NOTIFICATION,\n payload,\n };\n}\n\n\n\nconst actions = {\n addNotification,\n updateNotification,\n removeNotification,\n};\n// #endregion module\n\n\n\n// #region exports\nexport default actions;\n// #endregion exports\n","// #region imports\n // #region external\n import * as Types from '../types';\n // #endregion external\n// #endregion imports\n\n\n\n// #region module\nconst initialState: Types.State = [];\n// #endregion module\n\n\n\n// #region exports\nexport default initialState;\n// #endregion exports\n","// #region imports\n // #region external\n import * as Types from '../types';\n // #endregion external\n// #endregion imports\n\n\n\n// #region module\nconst addNotification = (\n state: Types.State,\n action: Types.AddNotificationAction,\n): Types.State => {\n const newNotification: Types.Notification = {\n ...action.payload,\n };\n\n const existingNotification = state.find(\n notification => notification.id === newNotification.id,\n );\n\n if (existingNotification) {\n const newState = state.map(notification => {\n if (notification.id === newNotification.id) {\n return newNotification;\n }\n\n return notification;\n });\n\n return newState;\n }\n\n return [\n ...state,\n newNotification,\n ];\n}\n\n\nconst updateNotification = (\n state: Types.State,\n action: Types.UpdateNotificationAction,\n): Types.State => {\n const updatedState = state.map(notification => {\n if (notification.id === action.payload.id) {\n const newNotification: Types.Notification = {\n ...action.payload,\n };\n return newNotification;\n }\n\n return {\n ...notification,\n };\n });\n\n return [\n ...updatedState,\n ];\n}\n\n\nconst removeNotification = (\n state: Types.State,\n action: Types.RemoveNotificationAction,\n): Types.State => {\n const updatedState = state.filter(\n notification => notification.id !== action.payload.id\n );\n\n return [\n ...updatedState,\n ];\n}\n\n\n\nconst resolvers = {\n addNotification,\n updateNotification,\n removeNotification,\n};\n// #endregion module\n\n\n\n// #region exports\nexport default resolvers;\n// #endregion exports\n","// #region imports\n // #region external\n import * as Types from '../types';\n\n import initialState from '../initial';\n\n import resolvers from '../resolvers';\n // #endregion external\n// #endregion imports\n\n\n\n// #region module\nconst reducer = (\n state: Types.State = initialState,\n action: Types.Actions,\n): Types.State => {\n switch(action.type) {\n case Types.ADD_NOTIFICATION:\n return resolvers.addNotification(state, action);\n case Types.UPDATE_NOTIFICATION:\n return resolvers.updateNotification(state, action);\n case Types.REMOVE_NOTIFICATION:\n return resolvers.removeNotification(state, action);\n default:\n return [\n ...state,\n ];\n }\n}\n// #endregion module\n\n\n\n// #region exports\nexport {\n reducer,\n};\n// #endregion exports\n","// #region imports\n // #region external\n import {\n StateOfAny,\n } from '#data/interfaces';\n\n import * as Types from '../types';\n // #endregion external\n// #endregion imports\n\n\n\n// #region module\nconst getAll = (\n state: StateOfAny & Record<'notifications', Types.State>,\n) => state.notifications;\n\n\n\nconst selectors = {\n getAll,\n};\n// #endregion module\n\n\n\n// #region exports\nexport default selectors;\n// #endregion exports\n","// #region module\nexport const TOGGLE_GLOBAL_SHORTCUTS = 'TOGGLE_GLOBAL_SHORTCUTS';\nexport interface ToggleGlobalShortcutsAction {\n type: typeof TOGGLE_GLOBAL_SHORTCUTS;\n payload?: boolean;\n}\n\n\n\nexport interface State {\n global: boolean;\n}\n\n\nexport type Actions =\n | ToggleGlobalShortcutsAction;\n// #endregion module\n","// #region imports\n // #region external\n import * as Types from '../types';\n // #endregion external\n// #endregion imports\n\n\n\n// #region module\nconst toggleGlobalShortcuts = (\n payload?: boolean,\n): Types.ToggleGlobalShortcutsAction => {\n return {\n type: Types.TOGGLE_GLOBAL_SHORTCUTS,\n payload,\n };\n}\n\n\n\nconst actions = {\n toggleGlobalShortcuts,\n};\n// #endregion module\n\n\n\n// #region exports\nexport default actions;\n// #endregion exports\n","// #region imports\n // #region external\n import * as Types from '../types';\n // #endregion external\n// #endregion imports\n\n\n\n// #region module\nconst initialState: Types.State = {\n global: true,\n};\n// #endregion module\n\n\n\n// #region exports\nexport default initialState;\n// #endregion exports\n","// #region imports\n // #region external\n import * as Types from '../types';\n // #endregion external\n// #endregion imports\n\n\n\n// #region module\nconst toggleGlobalShortcuts = (\n state: Types.State,\n action: Types.ToggleGlobalShortcutsAction,\n) => {\n const global = action.payload\n ? action.payload\n : !state.global;\n\n return {\n ...state,\n global,\n };\n}\n\n\nconst resolvers = {\n toggleGlobalShortcuts,\n};\n// #endregion module\n\n\n\n// #region exports\nexport default resolvers;\n// #endregion exports\n","// #region imports\n // #region external\n import * as Types from '../types';\n\n import initialState from '../initial';\n\n import resolvers from '../resolvers';\n // #endregion external\n// #endregion imports\n\n\n\n// #region module\nconst reducer = (\n state: Types.State = initialState,\n action: Types.Actions,\n): Types.State => {\n switch(action.type) {\n case Types.TOGGLE_GLOBAL_SHORTCUTS:\n return resolvers.toggleGlobalShortcuts(state, action);\n default:\n return {\n ...state,\n };\n }\n}\n// #endregion module\n\n\n\n// #region exports\nexport {\n reducer,\n};\n// #endregion exports\n","// #region imports\n // #region external\n import {\n StateOfAny,\n } from '#data/interfaces';\n\n import * as Types from '../types';\n // #endregion external\n// #endregion imports\n\n\n\n// #region module\nconst getGlobal = (\n state: StateOfAny & Record<'shortcuts', Types.State>,\n) => state.shortcuts.global;\n\n\n\nconst selectors = {\n getGlobal,\n};\n// #endregion module\n\n\n\n// #region exports\nexport default selectors;\n// #endregion exports\n","// #region module\nexport const SET_SITTING_CURRENT_LINK = 'SET_SITTING_CURRENT_LINK';\nexport interface SetSittingCurrentLinkAction {\n type: typeof SET_SITTING_CURRENT_LINK;\n payload: string;\n}\n\n\nexport const TOGGLE_SITTING_TRAY = 'TOGGLE_SITTING_TRAY';\nexport interface ToggleSittingTrayAction {\n type: typeof TOGGLE_SITTING_TRAY;\n payload?: boolean;\n}\n\n\n\nexport interface State {\n currentLink: string;\n tray: boolean;\n}\n\n\nexport type Actions =\n | SetSittingCurrentLinkAction\n | ToggleSittingTrayAction;\n// #endregion module\n","// #region imports\n // #region external\n import * as Types from '../types';\n // #endregion external\n// #endregion imports\n\n\n\n// #region module\nconst setSittingCurrentLink = (\n link: string,\n): Types.SetSittingCurrentLinkAction => {\n return {\n type: Types.SET_SITTING_CURRENT_LINK,\n payload: link,\n };\n}\n\n\nconst toggleSittingTray = (): Types.ToggleSittingTrayAction => {\n return {\n type: Types.TOGGLE_SITTING_TRAY,\n };\n}\n\n\n\nconst actions = {\n setSittingCurrentLink,\n toggleSittingTray,\n};\n// #endregion module\n\n\n\n// #region exports\nexport default actions;\n// #endregion exports\n","// #region imports\n // #region external\n import * as Types from '../types';\n // #endregion external\n// #endregion imports\n\n\n\n// #region module\nconst initialState: Types.State = {\n currentLink: '',\n tray: false,\n};\n// #endregion module\n\n\n\n// #region exports\nexport default initialState;\n// #endregion exports\n","// #region imports\n // #region external\n import * as Types from '../types';\n // #endregion external\n// #endregion imports\n\n\n\n// #region module\nconst setSittingCurrentLink = (\n state: Types.State,\n action: Types.SetSittingCurrentLinkAction,\n): Types.State => {\n const currentLink = action.payload;\n\n return {\n ...state,\n currentLink,\n };\n}\n\n\nconst toggleSittingTray = (\n state: Types.State,\n action: Types.ToggleSittingTrayAction,\n): Types.State => {\n if (typeof action.payload === 'boolean') {\n return {\n ...state,\n tray: action.payload,\n };\n }\n\n return {\n ...state,\n tray: !state.tray,\n };\n}\n\n\n\nconst resolvers = {\n setSittingCurrentLink,\n toggleSittingTray,\n};\n// #endregion module\n\n\n\n// #region exports\nexport default resolvers;\n// #endregion exports\n","// #region imports\n // #region external\n import * as Types from '../types';\n\n import initialState from '../initial';\n\n import resolvers from '../resolvers';\n // #endregion external\n// #endregion imports\n\n\n\n// #region module\nconst reducer = (\n state: Types.State = initialState,\n action: Types.Actions,\n): Types.State => {\n switch(action.type) {\n case Types.SET_SITTING_CURRENT_LINK:\n return resolvers.setSittingCurrentLink(state, action);\n case Types.TOGGLE_SITTING_TRAY:\n return resolvers.toggleSittingTray(state, action);\n default:\n return {\n ...state,\n };\n }\n}\n\n\nconst metareducer = (\n initialState: Types.State,\n) => (\n state: Types.State = initialState,\n action: Types.Actions,\n) => reducer(\n state,\n action,\n);\n// #endregion module\n\n\n\n// #region exports\nexport {\n reducer,\n metareducer,\n};\n// #endregion exports\n","// #region imports\n // #region external\n import {\n StateOfAny,\n } from '#data/interfaces';\n\n import * as Types from '../types';\n // #endregion external\n// #endregion imports\n\n\n\n// #region module\nconst getCurrentLink = (\n state: StateOfAny & Record<'sitting', Types.State>,\n) => state.sitting.currentLink;\nconst getTray = (\n state: StateOfAny & Record<'sitting', Types.State>,\n) => state.sitting.tray;\n\n\n\nconst selectors = {\n getCurrentLink,\n getTray,\n};\n// #endregion module\n\n\n\n// #region exports\nexport default selectors;\n// #endregion exports\n","// #region imports\n // #region libraries\n import {\n Theme,\n } from '@plurid/plurid-themes';\n // #endregion libraries\n// #endregion imports\n\n\n\n// #region module\nexport const SET_THEME = 'SET_THEME';\nexport interface SetThemePayload {\n type: 'general' | 'interaction';\n theme: Theme;\n}\nexport interface SetThemeAction {\n type: typeof SET_THEME;\n payload: SetThemePayload;\n}\n\n\n\nexport interface State {\n general: Theme,\n interaction: Theme,\n}\n\n\nexport type Actions =\n | SetThemeAction;\n// #endregion module\n","// #region imports\n // #region external\n import * as Types from '../types';\n // #endregion external\n// #endregion imports\n\n\n\n// #region module\nconst setTheme = (\n payload: Types.SetThemePayload,\n): Types.SetThemeAction => {\n return {\n type: Types.SET_THEME,\n payload,\n };\n}\n\n\n\nconst actions = {\n setTheme,\n};\n// #endregion module\n\n\n\n// #region exports\nexport default actions;\n// #endregion exports\n","// #region imports\n // #region libraries\n import {\n plurid,\n } from '@plurid/plurid-themes';\n // #endregion libraries\n\n\n // #region external\n import * as Types from '../types';\n // #endregion external\n// #endregion imports\n\n\n\n// #region module\nconst initialState: Types.State = {\n general: {\n ...plurid,\n },\n interaction: {\n ...plurid,\n },\n};\n// #endregion module\n\n\n\n// #region exports\nexport default initialState;\n// #endregion exports\n","// #region imports\n // #region external\n import * as Types from '../types';\n // #endregion external\n// #endregion imports\n\n\n\n// #region module\nconst setTheme = (\n state: Types.State,\n action: Types.SetThemeAction,\n): Types.State => {\n const {\n type,\n theme,\n } = action.payload;\n\n const newState = {\n ...state,\n };\n\n newState[type] = {\n ...theme,\n };\n\n return newState;\n}\n\n\n\nconst resolvers = {\n setTheme,\n};\n// #endregion module\n\n\n\n// #region exports\nexport default resolvers;\n// #endregion exports\n","// #region imports\n // #region external\n import * as Types from '../types';\n\n import initialState from '../initial';\n\n import resolvers from '../resolvers';\n // #endregion external\n// #endregion imports\n\n\n\n// #region module\nconst reducer = (\n state: Types.State = initialState,\n action: Types.Actions,\n): Types.State => {\n switch(action.type) {\n case Types.SET_THEME:\n return resolvers.setTheme(state, action);\n default:\n return {\n ...state,\n };\n }\n}\n\n\nconst metareducer = (\n initialState: Types.State,\n) => (\n state: Types.State = initialState,\n action: Types.Actions,\n) => reducer(\n state,\n action,\n);\n// #endregion module\n\n\n\n// #region exports\nexport {\n reducer,\n metareducer,\n};\n// #endregion exports\n","// #region imports\n // #region external\n import {\n StateOfAny,\n } from '#data/interfaces';\n\n import * as Types from '../types';\n // #endregion external\n// #endregion imports\n\n\n\n// #region module\nconst getGeneralTheme = (\n state: StateOfAny & Record<'themes', Types.State>,\n) => state.themes.general;\nconst getInteractionTheme = (\n state: StateOfAny & Record<'themes', Types.State>,\n) => state.themes.interaction;\n\n\n\nconst selectors = {\n getGeneralTheme,\n getInteractionTheme,\n};\n// #endregion module\n\n\n\n// #region exports\nexport default selectors;\n// #endregion exports\n"],"names":["SET_HEAD","setHead","payload","type","Types.SET_HEAD","actions","initialState","title","description","ogTitle","ogImage","ogURL","ogDescription","canonicalURL","styles","scripts","state","action","Object","assign","resolvers","reducer","metareducer","getHeadData","head","selectors","ADD_NOTIFICATION","UPDATE_NOTIFICATION","REMOVE_NOTIFICATION","addNotification","Types.ADD_NOTIFICATION","updateNotification","Types.UPDATE_NOTIFICATION","removeNotification","Types.REMOVE_NOTIFICATION","newNotification","existingNotification","find","notification","id","newState","map","updatedState","filter","getAll","notifications","TOGGLE_GLOBAL_SHORTCUTS","toggleGlobalShortcuts","Types.TOGGLE_GLOBAL_SHORTCUTS","global","getGlobal","shortcuts","SET_SITTING_CURRENT_LINK","TOGGLE_SITTING_TRAY","setSittingCurrentLink","link","Types.SET_SITTING_CURRENT_LINK","toggleSittingTray","Types.TOGGLE_SITTING_TRAY","currentLink","tray","getCurrentLink","sitting","getTray","SET_THEME","setTheme","Types.SET_THEME","general","plurid","interaction","theme","getGeneralTheme","themes","getInteractionTheme"],"mappings":";;AAcO,MAAMA,WAAW;;;;;;;ACCxB,MAAMC,YACFC,YAEO;IACHC,MAAMC;IACNF,SAAAA;;;AAMR,MAAMG,YAAU;aACZJ;;;AClBJ,MAAMK,iBAA4B;IAC9BC,OAAO;IACPC,aAAa;IACbC,SAAS;IACTC,SAAS;IACTC,OAAO;IACPC,eAAe;IACfC,cAAc;IACdC,QAAQ;IACRC,SAAS;;;ACTb,MAAMd,UAAU,CACZe,OACAC,WAEAC,OAAAC,OAAAD,OAAAC,OAAA,IACOH,QACAC,OAAOf;;AAMlB,MAAMkB,cAAY;IACdnB,SAAAA;;;ACTJ,MAAMoB,YAAU,CACZL,QAAqBV,gBACrBW;IAEA,QAAOA,OAAOd;MACV,KAAKC;QACD,OAAOgB,YAAUnB,QAAQe,OAAOC;;MACpC;QACI,OAAAC,OAAAC,OAAA,IACOH;;;;AAMnB,MAAMM,gBACFhB,gBACC,CACDU,QAAqBV,cACrBW,WACCI,UACDL,OACAC;;ACtBJ,MAAMM,cACFP,SACCA,MAAMQ;;AAIX,MAAMC,cAAY;IACdF,aAAAA;;;;;;;;;;;;;ACVG,MAAMG,mBAAmB;;AAQzB,MAAMC,sBAAsB;;AAQ5B,MAAMC,sBAAsB;;;;;;;;;ACjBnC,MAAMC,oBACF3B,YAEO;IACHC,MAAM2B;IACN5B,SAAAA;;;AAKR,MAAM6B,uBACF7B,YAEO;IACHC,MAAM6B;IACN9B,SAAAA;;;AAKR,MAAM+B,uBACF/B,YAEO;IACHC,MAAM+B;IACNhC,SAAAA;;;AAMR,MAAMG,YAAU;qBACZwB;wBACAE;wBACAE;;;AClCJ,MAAM3B,iBAA4B;;ACAlC,MAAMuB,kBAAkB,CACpBb,OACAC;IAEA,MAAMkB,kBACCjB,OAAAC,OAAA,IAAAF,OAAOf;IAGd,M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KAAKyC;QACD,OAAOtC,YAAUqC,kBAAkBzC,OAAOC;;MAC9C;QACI,OAAAC,OAAAC,OAAA,IACOH;;;;AAMnB,MAAMM,gBACFhB,gBACC,CACDU,QAAqBV,cACrBW,WACCI,UACDL,OACAC;;ACxBJ,MAAM4C,iBACF7C,SACCA,MAAM8C,QAAQH;;AACnB,MAAMI,UACF/C,SACCA,MAAM8C,QAAQF;;AAInB,MAAMnC,cAAY;IACdoC,gBAAAA;IACAE,SAAAA;;;;;;;;;;;;;ACbG,MAAMC,YAAY;;;;;;;ACFzB,MAAMC,aACF/D,YAEO;IACHC,MAAM+D;IACNhE,SAAAA;;;AAMR,MAAMG,UAAU;cACZ4D;;;ACLJ,MAAM3D,eAA4B;IAC9B6D,SAAOjD,OAAAC,OAAA,IACAiD;IAEPC,aAAWnD,OAAAC,OAAA,IACJiD;;;ACZX,MAAMH,WAAW,CACbjD,OACAC;IAEA,OAAMd,MACFA,MAAImE,OACJA,SACArD,OAAOf;IAEX,MAAMsC,WAAQtB,OAAAC,OAAA,IACPH;IAGPwB,SAASrC,QACFe,OAAAC,OAAA,IAAAmD;IAGP,OAAO9B;;;AAKX,MAAMpB,YAAY;IACd6C,UAAAA;;;ACnBJ,MAAM5C,UAAU,CACZL,QAAqBV,cACrBW;IAEA,QAAOA,OAAOd;MACV,KAAK+D;QACD,OAAO9C,UAAU6C,SAASjD,OAAOC;;MACrC;QACI,OAAAC,OAAAC,OAAA,IACOH;;;;AAMnB,MAAMM,cACFhB,gBACC,CACDU,QAAqBV,cACrBW,WACCI,QACDL,OACAC;;ACtBJ,MAAMsD,kBACFvD,SACCA,MAAMwD,OAAOL;;AAClB,MAAMM,sBACFzD,SACCA,MAAMwD,OAAOH;;AAIlB,MAAM5C,YAAY;IACd8C,iBAAAA;IACAE,qBAAAA;;;;;;;;;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../source/modules/head/types/index.ts","../source/modules/head/actions/index.ts","../source/modules/head/initial/index.ts","../source/modules/head/resolvers/index.ts","../source/modules/head/reducer/index.ts","../source/modules/head/selectors/index.ts","../source/modules/notifications/types/index.ts","../source/modules/notifications/actions/index.ts","../source/modules/notifications/initial/index.ts","../source/modules/notifications/resolvers/index.ts","../source/modules/notifications/reducer/index.ts","../source/modules/notifications/selectors/index.ts","../source/modules/shortcuts/types/index.ts","../source/modules/shortcuts/actions/index.ts","../source/modules/shortcuts/initial/index.ts","../source/modules/shortcuts/resolvers/index.ts","../source/modules/shortcuts/reducer/index.ts","../source/modules/shortcuts/selectors/index.ts","../source/modules/sitting/types/index.ts","../source/modules/sitting/actions/index.ts","../source/modules/sitting/initial/index.ts","../source/modules/sitting/resolvers/index.ts","../source/modules/sitting/reducer/index.ts","../source/modules/sitting/selectors/index.ts","../source/modules/themes/types/index.ts","../source/modules/themes/actions/index.ts","../source/modules/themes/initial/index.ts","../source/modules/themes/resolvers/index.ts","../source/modules/themes/reducer/index.ts","../source/modules/themes/selectors/index.ts"],"sourcesContent":["// #region module\nexport interface Head {\n title: string;\n description: string;\n canonicalURL: string;\n ogTitle: string;\n ogImage: string;\n ogURL: string;\n ogDescription: string;\n styles: string[];\n scripts: string[];\n}\n\n\nexport const SET_HEAD = 'SET_HEAD';\nexport interface SetHeadPayload extends Partial<Head> {}\nexport interface SetHeadAction {\n type: typeof SET_HEAD;\n payload: SetHeadPayload;\n}\n\n\n\nexport interface State extends Head {}\n\n\nexport type Actions =\n | SetHeadAction;\n// #endregion module\n","// #region imports\n // #region external\n import * as Types from '../types';\n // #endregion external\n// #endregion imports\n\n\n\n// #region module\n/**\n * Overwrite any property currently set in the `head`,\n * including `styles` and `scripts`, if any.\n *\n * @param payload\n */\nconst setHead = (\n payload: Types.SetHeadPayload,\n): Types.SetHeadAction => {\n return {\n type: Types.SET_HEAD,\n payload,\n };\n}\n\n\n\nconst actions = {\n setHead,\n};\n// #endregion module\n\n\n\n// #region exports\nexport default actions;\n// #endregion exports\n","// #region imports\n // #region external\n import * as Types from '../types';\n // #endregion external\n// #endregion imports\n\n\n\n// #region module\nconst initialState: Types.State = {\n title: '',\n description: '',\n ogTitle: '',\n ogImage: '',\n ogURL: '',\n ogDescription: '',\n canonicalURL: '',\n styles: [],\n scripts: [],\n};\n// #endregion module\n\n\n\n// #region exports\nexport default initialState;\n// #endregion exports\n","// #region imports\n // #region external\n import * as Types from '../types';\n // #endregion external\n// #endregion imports\n\n\n\n// #region module\nconst setHead = (\n state: Types.State,\n action: Types.SetHeadAction,\n): Types.State => {\n return {\n ...state,\n ...action.payload,\n };\n}\n\n\n\nconst resolvers = {\n setHead,\n};\n// #endregion module\n\n\n\n// #region exports\nexport default resolvers;\n// #endregion exports\n","// #region imports\n // #region external\n import * as Types from '../types';\n\n import initialState from '../initial';\n\n import resolvers from '../resolvers';\n // #endregion external\n// #endregion imports\n\n\n\n// #region module\nconst reducer = (\n state: Types.State = initialState,\n action: Types.Actions,\n): Types.State => {\n switch(action.type) {\n case Types.SET_HEAD:\n return resolvers.setHead(state, action);\n default:\n return {\n ...state,\n };\n }\n}\n\n\nconst metareducer = (\n initialState: Types.State,\n) => (\n state: Types.State = initialState,\n action: Types.Actions,\n) => reducer(\n state,\n action,\n);\n// #endregion module\n\n\n\n// #region exports\nexport {\n reducer,\n metareducer,\n};\n// #endregion exports\n","// #region imports\n // #region external\n import {\n StateOfAny,\n } from '#data/interfaces';\n\n import * as Types from '../types';\n // #endregion external\n// #endregion imports\n\n\n\n// #region module\nconst getHeadData = (\n state: StateOfAny & Record<'head', Types.State>,\n) => state.head;\n\n\n\nconst selectors = {\n getHeadData,\n};\n// #endregion module\n\n\n\n// #region exports\nexport default selectors;\n// #endregion exports\n","// #region module\nexport interface Notification {\n id: string;\n text: string;\n html?: boolean;\n react?: boolean;\n timeout?: number;\n}\n\n\nexport const ADD_NOTIFICATION = 'ADD_NOTIFICATION';\nexport interface AddNotificationPayload extends Notification {}\nexport interface AddNotificationAction {\n type: typeof ADD_NOTIFICATION;\n payload: AddNotificationPayload;\n}\n\n\nexport const UPDATE_NOTIFICATION = 'UPDATE_NOTIFICATION';\nexport interface UpdateNotificationPayload extends Notification {}\nexport interface UpdateNotificationAction {\n type: typeof UPDATE_NOTIFICATION;\n payload: UpdateNotificationPayload;\n}\n\n\nexport const REMOVE_NOTIFICATION = 'REMOVE_NOTIFICATION';\nexport interface RemoveNotificationPayload {\n id: string;\n}\nexport interface RemoveNotificationAction {\n type: typeof REMOVE_NOTIFICATION;\n payload: RemoveNotificationPayload;\n}\n\n\n\nexport type State = Notification[];\n\n\nexport type Actions = AddNotificationAction\n | UpdateNotificationAction\n | RemoveNotificationAction;\n// #endregion module\n","// #region imports\n // #region external\n import * as Types from '../types';\n // #endregion external\n// #endregion imports\n\n\n\n// #region module\nconst addNotification = (\n payload: Types.AddNotificationPayload,\n): Types.AddNotificationAction => {\n return {\n type: Types.ADD_NOTIFICATION,\n payload,\n };\n}\n\n\nconst updateNotification = (\n payload: Types.UpdateNotificationPayload,\n): Types.UpdateNotificationAction => {\n return {\n type: Types.UPDATE_NOTIFICATION,\n payload,\n };\n}\n\n\nconst removeNotification = (\n payload: Types.RemoveNotificationPayload,\n): Types.RemoveNotificationAction => {\n return {\n type: Types.REMOVE_NOTIFICATION,\n payload,\n };\n}\n\n\n\nconst actions = {\n addNotification,\n updateNotification,\n removeNotification,\n};\n// #endregion module\n\n\n\n// #region exports\nexport default actions;\n// #endregion exports\n","// #region imports\n // #region external\n import * as Types from '../types';\n // #endregion external\n// #endregion imports\n\n\n\n// #region module\nconst initialState: Types.State = [];\n// #endregion module\n\n\n\n// #region exports\nexport default initialState;\n// #endregion exports\n","// #region imports\n // #region external\n import * as Types from '../types';\n // #endregion external\n// #endregion imports\n\n\n\n// #region module\nconst addNotification = (\n state: Types.State,\n action: Types.AddNotificationAction,\n): Types.State => {\n const newNotification: Types.Notification = {\n ...action.payload,\n };\n\n const existingNotification = state.find(\n notification => notification.id === newNotification.id,\n );\n\n if (existingNotification) {\n const newState = state.map(notification => {\n if (notification.id === newNotification.id) {\n return newNotification;\n }\n\n return notification;\n });\n\n return newState;\n }\n\n return [\n ...state,\n newNotification,\n ];\n}\n\n\nconst updateNotification = (\n state: Types.State,\n action: Types.UpdateNotificationAction,\n): Types.State => {\n const updatedState = state.map(notification => {\n if (notification.id === action.payload.id) {\n const newNotification: Types.Notification = {\n ...action.payload,\n };\n return newNotification;\n }\n\n return {\n ...notification,\n };\n });\n\n return [\n ...updatedState,\n ];\n}\n\n\nconst removeNotification = (\n state: Types.State,\n action: Types.RemoveNotificationAction,\n): Types.State => {\n const updatedState = state.filter(\n notification => notification.id !== action.payload.id\n );\n\n return [\n ...updatedState,\n ];\n}\n\n\n\nconst resolvers = {\n addNotification,\n updateNotification,\n removeNotification,\n};\n// #endregion module\n\n\n\n// #region exports\nexport default resolvers;\n// #endregion exports\n","// #region imports\n // #region external\n import * as Types from '../types';\n\n import initialState from '../initial';\n\n import resolvers from '../resolvers';\n // #endregion external\n// #endregion imports\n\n\n\n// #region module\nconst reducer = (\n state: Types.State = initialState,\n action: Types.Actions,\n): Types.State => {\n switch(action.type) {\n case Types.ADD_NOTIFICATION:\n return resolvers.addNotification(state, action);\n case Types.UPDATE_NOTIFICATION:\n return resolvers.updateNotification(state, action);\n case Types.REMOVE_NOTIFICATION:\n return resolvers.removeNotification(state, action);\n default:\n return [\n ...state,\n ];\n }\n}\n// #endregion module\n\n\n\n// #region exports\nexport {\n reducer,\n};\n// #endregion exports\n","// #region imports\n // #region external\n import {\n StateOfAny,\n } from '#data/interfaces';\n\n import * as Types from '../types';\n // #endregion external\n// #endregion imports\n\n\n\n// #region module\nconst getAll = (\n state: StateOfAny & Record<'notifications', Types.State>,\n) => state.notifications;\n\n\n\nconst selectors = {\n getAll,\n};\n// #endregion module\n\n\n\n// #region exports\nexport default selectors;\n// #endregion exports\n","// #region module\nexport const TOGGLE_GLOBAL_SHORTCUTS = 'TOGGLE_GLOBAL_SHORTCUTS';\nexport interface ToggleGlobalShortcutsAction {\n type: typeof TOGGLE_GLOBAL_SHORTCUTS;\n payload?: boolean;\n}\n\n\n\nexport interface State {\n global: boolean;\n}\n\n\nexport type Actions =\n | ToggleGlobalShortcutsAction;\n// #endregion module\n","// #region imports\n // #region external\n import * as Types from '../types';\n // #endregion external\n// #endregion imports\n\n\n\n// #region module\nconst toggleGlobalShortcuts = (\n payload?: boolean,\n): Types.ToggleGlobalShortcutsAction => {\n return {\n type: Types.TOGGLE_GLOBAL_SHORTCUTS,\n payload,\n };\n}\n\n\n\nconst actions = {\n toggleGlobalShortcuts,\n};\n// #endregion module\n\n\n\n// #region exports\nexport default actions;\n// #endregion exports\n","// #region imports\n // #region external\n import * as Types from '../types';\n // #endregion external\n// #endregion imports\n\n\n\n// #region module\nconst initialState: Types.State = {\n global: true,\n};\n// #endregion module\n\n\n\n// #region exports\nexport default initialState;\n// #endregion exports\n","// #region imports\n // #region external\n import * as Types from '../types';\n // #endregion external\n// #endregion imports\n\n\n\n// #region module\nconst toggleGlobalShortcuts = (\n state: Types.State,\n action: Types.ToggleGlobalShortcutsAction,\n) => {\n const global = action.payload\n ? action.payload\n : !state.global;\n\n return {\n ...state,\n global,\n };\n}\n\n\nconst resolvers = {\n toggleGlobalShortcuts,\n};\n// #endregion module\n\n\n\n// #region exports\nexport default resolvers;\n// #endregion exports\n","// #region imports\n // #region external\n import * as Types from '../types';\n\n import initialState from '../initial';\n\n import resolvers from '../resolvers';\n // #endregion external\n// #endregion imports\n\n\n\n// #region module\nconst reducer = (\n state: Types.State = initialState,\n action: Types.Actions,\n): Types.State => {\n switch(action.type) {\n case Types.TOGGLE_GLOBAL_SHORTCUTS:\n return resolvers.toggleGlobalShortcuts(state, action);\n default:\n return {\n ...state,\n };\n }\n}\n// #endregion module\n\n\n\n// #region exports\nexport {\n reducer,\n};\n// #endregion exports\n","// #region imports\n // #region external\n import {\n StateOfAny,\n } from '#data/interfaces';\n\n import * as Types from '../types';\n // #endregion external\n// #endregion imports\n\n\n\n// #region module\nconst getGlobal = (\n state: StateOfAny & Record<'shortcuts', Types.State>,\n) => state.shortcuts.global;\n\n\n\nconst selectors = {\n getGlobal,\n};\n// #endregion module\n\n\n\n// #region exports\nexport default selectors;\n// #endregion exports\n","// #region module\nexport const SET_SITTING_CURRENT_LINK = 'SET_SITTING_CURRENT_LINK';\nexport interface SetSittingCurrentLinkAction {\n type: typeof SET_SITTING_CURRENT_LINK;\n payload: string;\n}\n\n\nexport const TOGGLE_SITTING_TRAY = 'TOGGLE_SITTING_TRAY';\nexport interface ToggleSittingTrayAction {\n type: typeof TOGGLE_SITTING_TRAY;\n payload?: boolean;\n}\n\n\n\nexport interface State {\n currentLink: string;\n tray: boolean;\n}\n\n\nexport type Actions =\n | SetSittingCurrentLinkAction\n | ToggleSittingTrayAction;\n// #endregion module\n","// #region imports\n // #region external\n import * as Types from '../types';\n // #endregion external\n// #endregion imports\n\n\n\n// #region module\nconst setSittingCurrentLink = (\n link: string,\n): Types.SetSittingCurrentLinkAction => {\n return {\n type: Types.SET_SITTING_CURRENT_LINK,\n payload: link,\n };\n}\n\n\nconst toggleSittingTray = (): Types.ToggleSittingTrayAction => {\n return {\n type: Types.TOGGLE_SITTING_TRAY,\n };\n}\n\n\n\nconst actions = {\n setSittingCurrentLink,\n toggleSittingTray,\n};\n// #endregion module\n\n\n\n// #region exports\nexport default actions;\n// #endregion exports\n","// #region imports\n // #region external\n import * as Types from '../types';\n // #endregion external\n// #endregion imports\n\n\n\n// #region module\nconst initialState: Types.State = {\n currentLink: '',\n tray: false,\n};\n// #endregion module\n\n\n\n// #region exports\nexport default initialState;\n// #endregion exports\n","// #region imports\n // #region external\n import * as Types from '../types';\n // #endregion external\n// #endregion imports\n\n\n\n// #region module\nconst setSittingCurrentLink = (\n state: Types.State,\n action: Types.SetSittingCurrentLinkAction,\n): Types.State => {\n const currentLink = action.payload;\n\n return {\n ...state,\n currentLink,\n };\n}\n\n\nconst toggleSittingTray = (\n state: Types.State,\n action: Types.ToggleSittingTrayAction,\n): Types.State => {\n if (typeof action.payload === 'boolean') {\n return {\n ...state,\n tray: action.payload,\n };\n }\n\n return {\n ...state,\n tray: !state.tray,\n };\n}\n\n\n\nconst resolvers = {\n setSittingCurrentLink,\n toggleSittingTray,\n};\n// #endregion module\n\n\n\n// #region exports\nexport default resolvers;\n// #endregion exports\n","// #region imports\n // #region external\n import * as Types from '../types';\n\n import initialState from '../initial';\n\n import resolvers from '../resolvers';\n // #endregion external\n// #endregion imports\n\n\n\n// #region module\nconst reducer = (\n state: Types.State = initialState,\n action: Types.Actions,\n): Types.State => {\n switch(action.type) {\n case Types.SET_SITTING_CURRENT_LINK:\n return resolvers.setSittingCurrentLink(state, action);\n case Types.TOGGLE_SITTING_TRAY:\n return resolvers.toggleSittingTray(state, action);\n default:\n return {\n ...state,\n };\n }\n}\n\n\nconst metareducer = (\n initialState: Types.State,\n) => (\n state: Types.State = initialState,\n action: Types.Actions,\n) => reducer(\n state,\n action,\n);\n// #endregion module\n\n\n\n// #region exports\nexport {\n reducer,\n metareducer,\n};\n// #endregion exports\n","// #region imports\n // #region external\n import {\n StateOfAny,\n } from '#data/interfaces';\n\n import * as Types from '../types';\n // #endregion external\n// #endregion imports\n\n\n\n// #region module\nconst getCurrentLink = (\n state: StateOfAny & Record<'sitting', Types.State>,\n) => state.sitting.currentLink;\nconst getTray = (\n state: StateOfAny & Record<'sitting', Types.State>,\n) => state.sitting.tray;\n\n\n\nconst selectors = {\n getCurrentLink,\n getTray,\n};\n// #endregion module\n\n\n\n// #region exports\nexport default selectors;\n// #endregion exports\n","// #region imports\n // #region libraries\n import {\n Theme,\n } from '@plurid/plurid-themes';\n // #endregion libraries\n// #endregion imports\n\n\n\n// #region module\nexport const SET_THEME = 'SET_THEME';\nexport interface SetThemePayload {\n type: 'general' | 'interaction';\n theme: Theme;\n}\nexport interface SetThemeAction {\n type: typeof SET_THEME;\n payload: SetThemePayload;\n}\n\n\n\nexport interface State {\n general: Theme,\n interaction: Theme,\n}\n\n\nexport type Actions =\n | SetThemeAction;\n// #endregion module\n","// #region imports\n // #region external\n import * as Types from '../types';\n // #endregion external\n// #endregion imports\n\n\n\n// #region module\nconst setTheme = (\n payload: Types.SetThemePayload,\n): Types.SetThemeAction => {\n return {\n type: Types.SET_THEME,\n payload,\n };\n}\n\n\n\nconst actions = {\n setTheme,\n};\n// #endregion module\n\n\n\n// #region exports\nexport default actions;\n// #endregion exports\n","// #region imports\n // #region libraries\n import {\n plurid,\n } from '@plurid/plurid-themes';\n // #endregion libraries\n\n\n // #region external\n import * as Types from '../types';\n // #endregion external\n// #endregion imports\n\n\n\n// #region module\nconst initialState: Types.State = {\n general: {\n ...plurid,\n },\n interaction: {\n ...plurid,\n },\n};\n// #endregion module\n\n\n\n// #region exports\nexport default initialState;\n// #endregion exports\n","// #region imports\n // #region external\n import * as Types from '../types';\n // #endregion external\n// #endregion imports\n\n\n\n// #region module\nconst setTheme = (\n state: Types.State,\n action: Types.SetThemeAction,\n): Types.State => {\n const {\n type,\n theme,\n } = action.payload;\n\n const newState = {\n ...state,\n };\n\n newState[type] = {\n ...theme,\n };\n\n return newState;\n}\n\n\n\nconst resolvers = {\n setTheme,\n};\n// #endregion module\n\n\n\n// #region exports\nexport default resolvers;\n// #endregion exports\n","// #region imports\n // #region external\n import * as Types from '../types';\n\n import initialState from '../initial';\n\n import resolvers from '../resolvers';\n // #endregion external\n// #endregion imports\n\n\n\n// #region module\nconst reducer = (\n state: Types.State = initialState,\n action: Types.Actions,\n): Types.State => {\n switch(action.type) {\n case Types.SET_THEME:\n return resolvers.setTheme(state, action);\n default:\n return {\n ...state,\n };\n }\n}\n\n\nconst metareducer = (\n initialState: Types.State,\n) => (\n state: Types.State = initialState,\n action: Types.Actions,\n) => reducer(\n state,\n action,\n);\n// #endregion module\n\n\n\n// #region exports\nexport {\n reducer,\n metareducer,\n};\n// #endregion exports\n","// #region imports\n // #region external\n import {\n StateOfAny,\n } from '#data/interfaces';\n\n import * as Types from '../types';\n // #endregion external\n// #endregion imports\n\n\n\n// #region module\nconst getGeneralTheme = (\n state: StateOfAny & Record<'themes', Types.State>,\n) => state.themes.general;\nconst getInteractionTheme = (\n state: StateOfAny & Record<'themes', Types.State>,\n) => state.themes.interaction;\n\n\n\nconst selectors = {\n getGeneralTheme,\n getInteractionTheme,\n};\n// #endregion module\n\n\n\n// #region exports\nexport default selectors;\n// #endregion exports\n"],"names":["SET_HEAD","setHead","payload","type","Types.SET_HEAD","actions","initialState","title","description","ogTitle","ogImage","ogURL","ogDescription","canonicalURL","styles","scripts","state","action","resolvers","reducer","metareducer","getHeadData","head","selectors","ADD_NOTIFICATION","UPDATE_NOTIFICATION","REMOVE_NOTIFICATION","addNotification","Types.ADD_NOTIFICATION","updateNotification","Types.UPDATE_NOTIFICATION","removeNotification","Types.REMOVE_NOTIFICATION","newNotification","existingNotification","find","notification","id","newState","map","updatedState","filter","getAll","notifications","TOGGLE_GLOBAL_SHORTCUTS","toggleGlobalShortcuts","Types.TOGGLE_GLOBAL_SHORTCUTS","global","getGlobal","shortcuts","SET_SITTING_CURRENT_LINK","TOGGLE_SITTING_TRAY","setSittingCurrentLink","link","Types.SET_SITTING_CURRENT_LINK","toggleSittingTray","Types.TOGGLE_SITTING_TRAY","currentLink","tray","getCurrentLink","sitting","getTray","SET_THEME","setTheme","Types.SET_THEME","general","plurid","interaction","theme","getGeneralTheme","themes","getInteractionTheme"],"mappings":";;;;;;;;AAcO,MAAMA,WAAW;;;;;;;ACCxB,MAAMC,YACFC,YAEO;IACHC,MAAMC;IACNF,SAAAA;;;AAMR,MAAMG,YAAU;aACZJ;;;AClBJ,MAAMK,iBAA4B;IAC9BC,OAAO;IACPC,aAAa;IACbC,SAAS;IACTC,SAAS;IACTC,OAAO;IACPC,eAAe;IACfC,cAAc;IACdC,QAAQ;IACRC,SAAS;;;ACTb,MAAMd,UAAU,CACZe,OACAC,2CAGOD,QACAC,OAAOf;;AAMlB,MAAMgB,cAAY;IACdjB,SAAAA;;;ACTJ,MAAMkB,YAAU,CACZH,QAAqBV,gBACrBW;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gBACC,CACDU,QAAqBV,cACrBW,WACCE,QACDH,OACAC;;ACtBJ,MAAMoD,kBACFrD,SACCA,MAAMsD,OAAOL;;AAClB,MAAMM,sBACFvD,SACCA,MAAMsD,OAAOH;;AAIlB,MAAM5C,YAAY;IACd8C,iBAAAA;IACAE,qBAAAA;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../source/modules/head/types/index.ts","../source/modules/head/actions/index.ts","../source/modules/head/initial/index.ts","../source/modules/head/resolvers/index.ts","../source/modules/head/reducer/index.ts","../source/modules/head/selectors/index.ts","../source/modules/notifications/types/index.ts","../source/modules/notifications/actions/index.ts","../source/modules/notifications/initial/index.ts","../source/modules/notifications/resolvers/index.ts","../source/modules/notifications/reducer/index.ts","../source/modules/notifications/selectors/index.ts","../source/modules/shortcuts/types/index.ts","../source/modules/shortcuts/actions/index.ts","../source/modules/shortcuts/initial/index.ts","../source/modules/shortcuts/resolvers/index.ts","../source/modules/shortcuts/reducer/index.ts","../source/modules/shortcuts/selectors/index.ts","../source/modules/sitting/types/index.ts","../source/modules/sitting/actions/index.ts","../source/modules/sitting/initial/index.ts","../source/modules/sitting/resolvers/index.ts","../source/modules/sitting/reducer/index.ts","../source/modules/sitting/selectors/index.ts","../source/modules/themes/types/index.ts","../source/modules/themes/actions/index.ts","../source/modules/themes/initial/index.ts","../source/modules/themes/resolvers/index.ts","../source/modules/themes/reducer/index.ts","../source/modules/themes/selectors/index.ts"],"sourcesContent":["// #region module\nexport interface Head {\n title: string;\n description: string;\n canonicalURL: string;\n ogTitle: string;\n ogImage: string;\n ogURL: string;\n ogDescription: string;\n styles: string[];\n scripts: string[];\n}\n\n\nexport const SET_HEAD = 'SET_HEAD';\nexport interface SetHeadPayload extends Partial<Head> {}\nexport interface SetHeadAction {\n type: typeof SET_HEAD;\n payload: SetHeadPayload;\n}\n\n\n\nexport interface State extends Head {}\n\n\nexport type Actions =\n | SetHeadAction;\n// #endregion module\n","// #region imports\n // #region external\n import * as Types from '../types';\n // #endregion external\n// #endregion imports\n\n\n\n// #region module\n/**\n * Overwrite any property currently set in the `head`,\n * including `styles` and `scripts`, if any.\n *\n * @param payload\n */\nconst setHead = (\n payload: Types.SetHeadPayload,\n): Types.SetHeadAction => {\n return {\n type: Types.SET_HEAD,\n payload,\n };\n}\n\n\n\nconst actions = {\n setHead,\n};\n// #endregion module\n\n\n\n// #region exports\nexport default actions;\n// #endregion exports\n","// #region imports\n // #region external\n import * as Types from '../types';\n // #endregion external\n// #endregion imports\n\n\n\n// #region module\nconst initialState: Types.State = {\n title: '',\n description: '',\n ogTitle: '',\n ogImage: '',\n ogURL: '',\n ogDescription: '',\n canonicalURL: '',\n styles: [],\n scripts: [],\n};\n// #endregion module\n\n\n\n// #region exports\nexport default initialState;\n// #endregion exports\n","// #region imports\n // #region external\n import * as Types from '../types';\n // #endregion external\n// #endregion imports\n\n\n\n// #region module\nconst setHead = (\n state: Types.State,\n action: Types.SetHeadAction,\n): Types.State => {\n return {\n ...state,\n ...action.payload,\n };\n}\n\n\n\nconst resolvers = {\n setHead,\n};\n// #endregion module\n\n\n\n// #region exports\nexport default resolvers;\n// #endregion exports\n","// #region imports\n // #region external\n import * as Types from '../types';\n\n import initialState from '../initial';\n\n import resolvers from '../resolvers';\n // #endregion external\n// #endregion imports\n\n\n\n// #region module\nconst reducer = (\n state: Types.State = initialState,\n action: Types.Actions,\n): Types.State => {\n switch(action.type) {\n case Types.SET_HEAD:\n return resolvers.setHead(state, action);\n default:\n return {\n ...state,\n };\n }\n}\n\n\nconst metareducer = (\n initialState: Types.State,\n) => (\n state: Types.State = initialState,\n action: Types.Actions,\n) => reducer(\n state,\n action,\n);\n// #endregion module\n\n\n\n// #region exports\nexport {\n reducer,\n metareducer,\n};\n// #endregion exports\n","// #region imports\n // #region external\n import {\n StateOfAny,\n } from '#data/interfaces';\n\n import * as Types from '../types';\n // #endregion external\n// #endregion imports\n\n\n\n// #region module\nconst getHeadData = (\n state: StateOfAny & Record<'head', Types.State>,\n) => state.head;\n\n\n\nconst selectors = {\n getHeadData,\n};\n// #endregion module\n\n\n\n// #region exports\nexport default selectors;\n// #endregion exports\n","// #region module\nexport interface Notification {\n id: string;\n text: string;\n html?: boolean;\n react?: boolean;\n timeout?: number;\n}\n\n\nexport const ADD_NOTIFICATION = 'ADD_NOTIFICATION';\nexport interface AddNotificationPayload extends Notification {}\nexport interface AddNotificationAction {\n type: typeof ADD_NOTIFICATION;\n payload: AddNotificationPayload;\n}\n\n\nexport const UPDATE_NOTIFICATION = 'UPDATE_NOTIFICATION';\nexport interface UpdateNotificationPayload extends Notification {}\nexport interface UpdateNotificationAction {\n type: typeof UPDATE_NOTIFICATION;\n payload: UpdateNotificationPayload;\n}\n\n\nexport const REMOVE_NOTIFICATION = 'REMOVE_NOTIFICATION';\nexport interface RemoveNotificationPayload {\n id: string;\n}\nexport interface RemoveNotificationAction {\n type: typeof REMOVE_NOTIFICATION;\n payload: RemoveNotificationPayload;\n}\n\n\n\nexport type State = Notification[];\n\n\nexport type Actions = AddNotificationAction\n | UpdateNotificationAction\n | RemoveNotificationAction;\n// #endregion module\n","// #region imports\n // #region external\n import * as Types from '../types';\n // #endregion external\n// #endregion imports\n\n\n\n// #region module\nconst addNotification = (\n payload: Types.AddNotificationPayload,\n): Types.AddNotificationAction => {\n return {\n type: Types.ADD_NOTIFICATION,\n payload,\n };\n}\n\n\nconst updateNotification = (\n payload: Types.UpdateNotificationPayload,\n): Types.UpdateNotificationAction => {\n return {\n type: Types.UPDATE_NOTIFICATION,\n payload,\n };\n}\n\n\nconst removeNotification = (\n payload: Types.RemoveNotificationPayload,\n): Types.RemoveNotificationAction => {\n return {\n type: Types.REMOVE_NOTIFICATION,\n payload,\n };\n}\n\n\n\nconst actions = {\n addNotification,\n updateNotification,\n removeNotification,\n};\n// #endregion module\n\n\n\n// #region exports\nexport default actions;\n// #endregion exports\n","// #region imports\n // #region external\n import * as Types from '../types';\n // #endregion external\n// #endregion imports\n\n\n\n// #region module\nconst initialState: Types.State = [];\n// #endregion module\n\n\n\n// #region exports\nexport default initialState;\n// #endregion exports\n","// #region imports\n // #region external\n import * as Types from '../types';\n // #endregion external\n// #endregion imports\n\n\n\n// #region module\nconst addNotification = (\n state: Types.State,\n action: Types.AddNotificationAction,\n): Types.State => {\n const newNotification: Types.Notification = {\n ...action.payload,\n };\n\n const existingNotification = state.find(\n notification => notification.id === newNotification.id,\n );\n\n if (existingNotification) {\n const newState = state.map(notification => {\n if (notification.id === newNotification.id) {\n return newNotification;\n }\n\n return notification;\n });\n\n return newState;\n }\n\n return [\n ...state,\n newNotification,\n ];\n}\n\n\nconst updateNotification = (\n state: Types.State,\n action: Types.UpdateNotificationAction,\n): Types.State => {\n const updatedState = state.map(notification => {\n if (notification.id === action.payload.id) {\n const newNotification: Types.Notification = {\n ...action.payload,\n };\n return newNotification;\n }\n\n return {\n ...notification,\n };\n });\n\n return [\n ...updatedState,\n ];\n}\n\n\nconst removeNotification = (\n state: Types.State,\n action: Types.RemoveNotificationAction,\n): Types.State => {\n const updatedState = state.filter(\n notification => notification.id !== action.payload.id\n );\n\n return [\n ...updatedState,\n ];\n}\n\n\n\nconst resolvers = {\n addNotification,\n updateNotification,\n removeNotification,\n};\n// #endregion module\n\n\n\n// #region exports\nexport default resolvers;\n// #endregion exports\n","// #region imports\n // #region external\n import * as Types from '../types';\n\n import initialState from '../initial';\n\n import resolvers from '../resolvers';\n // #endregion external\n// #endregion imports\n\n\n\n// #region module\nconst reducer = (\n state: Types.State = initialState,\n action: Types.Actions,\n): Types.State => {\n switch(action.type) {\n case Types.ADD_NOTIFICATION:\n return resolvers.addNotification(state, action);\n case Types.UPDATE_NOTIFICATION:\n return resolvers.updateNotification(state, action);\n case Types.REMOVE_NOTIFICATION:\n return resolvers.removeNotification(state, action);\n default:\n return [\n ...state,\n ];\n }\n}\n// #endregion module\n\n\n\n// #region exports\nexport {\n reducer,\n};\n// #endregion exports\n","// #region imports\n // #region external\n import {\n StateOfAny,\n } from '#data/interfaces';\n\n import * as Types from '../types';\n // #endregion external\n// #endregion imports\n\n\n\n// #region module\nconst getAll = (\n state: StateOfAny & Record<'notifications', Types.State>,\n) => state.notifications;\n\n\n\nconst selectors = {\n getAll,\n};\n// #endregion module\n\n\n\n// #region exports\nexport default selectors;\n// #endregion exports\n","// #region module\nexport const TOGGLE_GLOBAL_SHORTCUTS = 'TOGGLE_GLOBAL_SHORTCUTS';\nexport interface ToggleGlobalShortcutsAction {\n type: typeof TOGGLE_GLOBAL_SHORTCUTS;\n payload?: boolean;\n}\n\n\n\nexport interface State {\n global: boolean;\n}\n\n\nexport type Actions =\n | ToggleGlobalShortcutsAction;\n// #endregion module\n","// #region imports\n // #region external\n import * as Types from '../types';\n // #endregion external\n// #endregion imports\n\n\n\n// #region module\nconst toggleGlobalShortcuts = (\n payload?: boolean,\n): Types.ToggleGlobalShortcutsAction => {\n return {\n type: Types.TOGGLE_GLOBAL_SHORTCUTS,\n payload,\n };\n}\n\n\n\nconst actions = {\n toggleGlobalShortcuts,\n};\n// #endregion module\n\n\n\n// #region exports\nexport default actions;\n// #endregion exports\n","// #region imports\n // #region external\n import * as Types from '../types';\n // #endregion external\n// #endregion imports\n\n\n\n// #region module\nconst initialState: Types.State = {\n global: true,\n};\n// #endregion module\n\n\n\n// #region exports\nexport default initialState;\n// #endregion exports\n","// #region imports\n // #region external\n import * as Types from '../types';\n // #endregion external\n// #endregion imports\n\n\n\n// #region module\nconst toggleGlobalShortcuts = (\n state: Types.State,\n action: Types.ToggleGlobalShortcutsAction,\n) => {\n const global = action.payload\n ? action.payload\n : !state.global;\n\n return {\n ...state,\n global,\n };\n}\n\n\nconst resolvers = {\n toggleGlobalShortcuts,\n};\n// #endregion module\n\n\n\n// #region exports\nexport default resolvers;\n// #endregion exports\n","// #region imports\n // #region external\n import * as Types from '../types';\n\n import initialState from '../initial';\n\n import resolvers from '../resolvers';\n // #endregion external\n// #endregion imports\n\n\n\n// #region module\nconst reducer = (\n state: Types.State = initialState,\n action: Types.Actions,\n): Types.State => {\n switch(action.type) {\n case Types.TOGGLE_GLOBAL_SHORTCUTS:\n return resolvers.toggleGlobalShortcuts(state, action);\n default:\n return {\n ...state,\n };\n }\n}\n// #endregion module\n\n\n\n// #region exports\nexport {\n reducer,\n};\n// #endregion exports\n","// #region imports\n // #region external\n import {\n StateOfAny,\n } from '#data/interfaces';\n\n import * as Types from '../types';\n // #endregion external\n// #endregion imports\n\n\n\n// #region module\nconst getGlobal = (\n state: StateOfAny & Record<'shortcuts', Types.State>,\n) => state.shortcuts.global;\n\n\n\nconst selectors = {\n getGlobal,\n};\n// #endregion module\n\n\n\n// #region exports\nexport default selectors;\n// #endregion exports\n","// #region module\nexport const SET_SITTING_CURRENT_LINK = 'SET_SITTING_CURRENT_LINK';\nexport interface SetSittingCurrentLinkAction {\n type: typeof SET_SITTING_CURRENT_LINK;\n payload: string;\n}\n\n\nexport const TOGGLE_SITTING_TRAY = 'TOGGLE_SITTING_TRAY';\nexport interface ToggleSittingTrayAction {\n type: typeof TOGGLE_SITTING_TRAY;\n payload?: boolean;\n}\n\n\n\nexport interface State {\n currentLink: string;\n tray: boolean;\n}\n\n\nexport type Actions =\n | SetSittingCurrentLinkAction\n | ToggleSittingTrayAction;\n// #endregion module\n","// #region imports\n // #region external\n import * as Types from '../types';\n // #endregion external\n// #endregion imports\n\n\n\n// #region module\nconst setSittingCurrentLink = (\n link: string,\n): Types.SetSittingCurrentLinkAction => {\n return {\n type: Types.SET_SITTING_CURRENT_LINK,\n payload: link,\n };\n}\n\n\nconst toggleSittingTray = (): Types.ToggleSittingTrayAction => {\n return {\n type: Types.TOGGLE_SITTING_TRAY,\n };\n}\n\n\n\nconst actions = {\n setSittingCurrentLink,\n toggleSittingTray,\n};\n// #endregion module\n\n\n\n// #region exports\nexport default actions;\n// #endregion exports\n","// #region imports\n // #region external\n import * as Types from '../types';\n // #endregion external\n// #endregion imports\n\n\n\n// #region module\nconst initialState: Types.State = {\n currentLink: '',\n tray: false,\n};\n// #endregion module\n\n\n\n// #region exports\nexport default initialState;\n// #endregion exports\n","// #region imports\n // #region external\n import * as Types from '../types';\n // #endregion external\n// #endregion imports\n\n\n\n// #region module\nconst setSittingCurrentLink = (\n state: Types.State,\n action: Types.SetSittingCurrentLinkAction,\n): Types.State => {\n const currentLink = action.payload;\n\n return {\n ...state,\n currentLink,\n };\n}\n\n\nconst toggleSittingTray = (\n state: Types.State,\n action: Types.ToggleSittingTrayAction,\n): Types.State => {\n if (typeof action.payload === 'boolean') {\n return {\n ...state,\n tray: action.payload,\n };\n }\n\n return {\n ...state,\n tray: !state.tray,\n };\n}\n\n\n\nconst resolvers = {\n setSittingCurrentLink,\n toggleSittingTray,\n};\n// #endregion module\n\n\n\n// #region exports\nexport default resolvers;\n// #endregion exports\n","// #region imports\n // #region external\n import * as Types from '../types';\n\n import initialState from '../initial';\n\n import resolvers from '../resolvers';\n // #endregion external\n// #endregion imports\n\n\n\n// #region module\nconst reducer = (\n state: Types.State = initialState,\n action: Types.Actions,\n): Types.State => {\n switch(action.type) {\n case Types.SET_SITTING_CURRENT_LINK:\n return resolvers.setSittingCurrentLink(state, action);\n case Types.TOGGLE_SITTING_TRAY:\n return resolvers.toggleSittingTray(state, action);\n default:\n return {\n ...state,\n };\n }\n}\n\n\nconst metareducer = (\n initialState: Types.State,\n) => (\n state: Types.State = initialState,\n action: Types.Actions,\n) => reducer(\n state,\n action,\n);\n// #endregion module\n\n\n\n// #region exports\nexport {\n reducer,\n metareducer,\n};\n// #endregion exports\n","// #region imports\n // #region external\n import {\n StateOfAny,\n } from '#data/interfaces';\n\n import * as Types from '../types';\n // #endregion external\n// #endregion imports\n\n\n\n// #region module\nconst getCurrentLink = (\n state: StateOfAny & Record<'sitting', Types.State>,\n) => state.sitting.currentLink;\nconst getTray = (\n state: StateOfAny & Record<'sitting', Types.State>,\n) => state.sitting.tray;\n\n\n\nconst selectors = {\n getCurrentLink,\n getTray,\n};\n// #endregion module\n\n\n\n// #region exports\nexport default selectors;\n// #endregion exports\n","// #region imports\n // #region libraries\n import {\n Theme,\n } from '@plurid/plurid-themes';\n // #endregion libraries\n// #endregion imports\n\n\n\n// #region module\nexport const SET_THEME = 'SET_THEME';\nexport interface SetThemePayload {\n type: 'general' | 'interaction';\n theme: Theme;\n}\nexport interface SetThemeAction {\n type: typeof SET_THEME;\n payload: SetThemePayload;\n}\n\n\n\nexport interface State {\n general: Theme,\n interaction: Theme,\n}\n\n\nexport type Actions =\n | SetThemeAction;\n// #endregion module\n","// #region imports\n // #region external\n import * as Types from '../types';\n // #endregion external\n// #endregion imports\n\n\n\n// #region module\nconst setTheme = (\n payload: Types.SetThemePayload,\n): Types.SetThemeAction => {\n return {\n type: Types.SET_THEME,\n payload,\n };\n}\n\n\n\nconst actions = {\n setTheme,\n};\n// #endregion module\n\n\n\n// #region exports\nexport default actions;\n// #endregion exports\n","// #region imports\n // #region libraries\n import {\n plurid,\n } from '@plurid/plurid-themes';\n // #endregion libraries\n\n\n // #region external\n import * as Types from '../types';\n // #endregion external\n// #endregion imports\n\n\n\n// #region module\nconst initialState: Types.State = {\n general: {\n ...plurid,\n },\n interaction: {\n ...plurid,\n },\n};\n// #endregion module\n\n\n\n// #region exports\nexport default initialState;\n// #endregion exports\n","// #region imports\n // #region external\n import * as Types from '../types';\n // #endregion external\n// #endregion imports\n\n\n\n// #region module\nconst setTheme = (\n state: Types.State,\n action: Types.SetThemeAction,\n): Types.State => {\n const {\n type,\n theme,\n } = action.payload;\n\n const newState = {\n ...state,\n };\n\n newState[type] = {\n ...theme,\n };\n\n return newState;\n}\n\n\n\nconst resolvers = {\n setTheme,\n};\n// #endregion module\n\n\n\n// #region exports\nexport default resolvers;\n// #endregion exports\n","// #region imports\n // #region external\n import * as Types from '../types';\n\n import initialState from '../initial';\n\n import resolvers from '../resolvers';\n // #endregion external\n// #endregion imports\n\n\n\n// #region module\nconst reducer = (\n state: Types.State = initialState,\n action: Types.Actions,\n): Types.State => {\n switch(action.type) {\n case Types.SET_THEME:\n return resolvers.setTheme(state, action);\n default:\n return {\n ...state,\n };\n }\n}\n\n\nconst metareducer = (\n initialState: Types.State,\n) => (\n state: Types.State = initialState,\n action: Types.Actions,\n) => reducer(\n state,\n action,\n);\n// #endregion module\n\n\n\n// #region exports\nexport {\n reducer,\n metareducer,\n};\n// #endregion exports\n","// #region imports\n // #region external\n import {\n StateOfAny,\n } from '#data/interfaces';\n\n import * as Types from '../types';\n // #endregion external\n// #endregion imports\n\n\n\n// #region module\nconst getGeneralTheme = (\n state: StateOfAny & Record<'themes', Types.State>,\n) => state.themes.general;\nconst getInteractionTheme = (\n state: StateOfAny & Record<'themes', Types.State>,\n) => state.themes.interaction;\n\n\n\nconst selectors = {\n getGeneralTheme,\n getInteractionTheme,\n};\n// #endregion module\n\n\n\n// #region exports\nexport default selectors;\n// #endregion exports\n"],"names":["SET_HEAD","setHead","payload","type","Types.SET_HEAD","actions","initialState","title","description","ogTitle","ogImage","ogURL","ogDescription","canonicalURL","styles","scripts","state","action","Object","assign","resolvers","reducer","metareducer","getHeadData","head","selectors","ADD_NOTIFICATION","UPDATE_NOTIFICATION","REMOVE_NOTIFICATION","addNotification","Types.ADD_NOTIFICATION","updateNotification","Types.UPDATE_NOTIFICATION","removeNotification","Types.REMOVE_NOTIFICATION","newNotification","existingNotification","find","notification","id","newState","map","updatedState","filter","getAll","notifications","TOGGLE_GLOBAL_SHORTCUTS","toggleGlobalShortcuts","Types.TOGGLE_GLOBAL_SHORTCUTS","global","getGlobal","shortcuts","SET_SITTING_CURRENT_LINK","TOGGLE_SITTING_TRAY","setSittingCurrentLink","link","Types.SET_SITTING_CURRENT_LINK","toggleSittingTray","Types.TOGGLE_SITTING_TRAY","currentLink","tray","getCurrentLink","sitting","getTray","SET_THEME","setTheme","Types.SET_THEME","general","plurid","interaction","theme","getGeneralTheme","themes","getInteractionTheme"],"mappings":";;;;;;;;AAcO,MAAMA,WAAW;;;;;;;ACCxB,MAAMC,YACFC,YAEO;IACHC,MAAMC;IACNF,SAAA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,QAAQH;;AACnB,MAAMI,UACF/C,SACCA,MAAM8C,QAAQF;;AAInB,MAAMnC,cAAY;IACdoC,gBAAAA;IACAE,SAAAA;;;;;;;;;;;;;ACbG,MAAMC,YAAY;;;;;;;ACFzB,MAAMC,aACF/D,YAEO;IACHC,MAAM+D;IACNhE,SAAAA;;;AAMR,MAAMG,UAAU;cACZ4D;;;ACLJ,MAAM3D,eAA4B;IAC9B6D,SAAOjD,OAAAC,OAAA,IACAiD,aAAAA;IAEPC,aAAWnD,OAAAC,OAAA,IACJiD,aAAAA;;;ACZX,MAAMH,WAAW,CACbjD,OACAC;IAEA,OAAMd,MACFA,MAAImE,OACJA,SACArD,OAAOf;IAEX,MAAMsC,WAAQtB,OAAAC,OAAA,IACPH;IAGPwB,SAASrC,QACFe,OAAAC,OAAA,IAAAmD;IAGP,OAAO9B;;;AAKX,MAAMpB,YAAY;IACd6C,UAAAA;;;ACnBJ,MAAM5C,UAAU,CACZL,QAAqBV,cACrBW;IAEA,QAAOA,OAAOd;MACV,KAAK+D;QACD,OAAO9C,UAAU6C,SAASjD,OAAOC;;MACrC;QACI,OAAAC,OAAAC,OAAA,IACOH;;;;AAMnB,MAAMM,cACFhB,gBACC,CACDU,QAAqBV,cACrBW,WACCI,QACDL,OACAC;;ACtBJ,MAAMsD,kBACFvD,SACCA,MAAMwD,OAAOL;;AAClB,MAAMM,sBACFzD,SACCA,MAAMwD,OAAOH;;AAIlB,MAAM5C,YAAY;IACd8C,iBAAAA;IACAE,qBAAAA;;;;;;;;;;;;;;;;;;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plurid/plurid-ui-state-react",
3
- "version": "0.0.0-2",
3
+ "version": "0.0.0-3",
4
4
  "description": "Plurid User Interface State for React",
5
5
  "keywords": [
6
6
  "plurid",
@@ -39,26 +39,27 @@
39
39
  "clean": "rm -rf ./distribution",
40
40
  "build.clean": "rm -rf `find ./distribution/ -type d -name __tests__`",
41
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"
42
+ "build": "pnpm clean && pnpm lint && pnpm test && pnpm build.production && pnpm build.clean",
43
+ "prepublishOnly": "pnpm build"
44
44
  },
45
45
  "peerDependencies": {
46
46
  "@plurid/plurid-themes": "*"
47
47
  },
48
48
  "devDependencies": {
49
- "@plurid/plurid-themes": "^0.0.0-0",
50
- "@types/jest": "^27.0.2",
51
- "@typescript-eslint/eslint-plugin": "^5.0.0",
52
- "@typescript-eslint/parser": "^5.0.0",
49
+ "@plurid/plurid-themes": "^0.0.0-2",
50
+ "@types/jest": "^27.4.1",
51
+ "@types/node": "^17.0.30",
52
+ "@typescript-eslint/eslint-plugin": "^5.21.0",
53
+ "@typescript-eslint/parser": "^5.21.0",
53
54
  "@zerollup/ts-transform-paths": "^1.7.18",
54
- "eslint": "^8.0.0",
55
- "jest": "^27.2.5",
56
- "rollup": "^2.58.0",
55
+ "eslint": "^8.14.0",
56
+ "jest": "^27.5.1",
57
+ "rollup": "^2.71.1",
57
58
  "rollup-plugin-terser": "^7.0.2",
58
- "rollup-plugin-typescript2": "^0.30.0",
59
- "ts-jest": "^27.0.5",
60
- "ts-node": "^10.3.0",
61
- "ttypescript": "^1.5.12",
62
- "typescript": "^4.4.4"
59
+ "rollup-plugin-typescript2": "^0.31.2",
60
+ "ts-jest": "^27.1.4",
61
+ "ts-node": "^10.7.0",
62
+ "ttypescript": "^1.5.13",
63
+ "typescript": "^4.6.4"
63
64
  }
64
65
  }