Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Socket
Sign inDemoInstall

piral-notifications

Package Overview
Dependencies
Maintainers
1
Versions
931
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

piral-notifications - npm Package Compare versions

Comparing version 0.8.0-pre.679 to 0.8.0-pre.682

lib/components.d.ts

3

lib/create.js

@@ -6,2 +6,3 @@ "use strict";

const react_arbiter_1 = require("react-arbiter");
const default_1 = require("./default");
function createNotification(context, id, content, defaultOptions, customOptions = {}) {

@@ -37,3 +38,3 @@ const options = Object.assign({}, defaultOptions, customOptions);

context.defineActions(actions);
react_atom_1.swap(context.state, state => (Object.assign({}, state, { notifications: getNotifications(context, messages, defaultOptions) })));
react_atom_1.swap(context.state, state => (Object.assign({}, state, { components: Object.assign({}, state.components, { NotificationsHost: default_1.DefaultHost, NotificationsToast: default_1.DefaultToast }), notifications: getNotifications(context, messages, defaultOptions) })));
return {

@@ -40,0 +41,0 @@ showNotification(content, customOptions) {

export * from './create';
export * from './components';
export * from './Notifications';
export * from './types';

@@ -5,2 +5,4 @@ "use strict";

tslib_1.__exportStar(require("./create"), exports);
tslib_1.__exportStar(require("./components"), exports);
tslib_1.__exportStar(require("./Notifications"), exports);
//# sourceMappingURL=index.js.map

@@ -1,2 +0,2 @@

import { ReactChild, ReactNode } from 'react';
import { ReactChild, ReactNode, ComponentType } from 'react';
import { Disposable } from 'piral-core';

@@ -25,4 +25,18 @@ declare module 'piral-core/lib/types/custom' {

interface PiralCustomComponentsState {
/**
* The host component for notifications.
*/
NotificationsHost: ComponentType<NotificationsHostProps>;
/**
* The notification toast component.
*/
NotificationsToast: ComponentType<NotificationsToastProps>;
}
interface PiralCustomRegistryState {
}
}
export interface NotificationsHostProps {
}
export interface NotificationsToastProps extends OpenNotification {
}
export interface NotificationOptions {

@@ -29,0 +43,0 @@ /**

{
"name": "piral-notifications",
"version": "0.8.0-pre.679",
"version": "0.8.0-pre.682",
"description": "Extensions for triggering notifications in Piral.",

@@ -39,3 +39,3 @@ "keywords": [

"devDependencies": {
"piral-core": "^0.8.0-pre.679"
"piral-core": "^0.8.0-pre.682"
},

@@ -45,3 +45,3 @@ "peerDependencies": {

},
"gitHead": "4cbfa79aedc070a50a81f76b345ad2394eb37299"
"gitHead": "04da0183524adea0bae44c0f30f2b3ee1ce36e88"
}

@@ -6,2 +6,3 @@ import * as actions from './actions';

import { Extend, GlobalStateContext } from 'piral-core';
import { DefaultHost, DefaultToast } from './default';
import { PiletNotificationsApi, NotificationOptions, OpenNotification } from './types';

@@ -95,2 +96,7 @@

...state,
components: {
...state.components,
NotificationsHost: DefaultHost,
NotificationsToast: DefaultToast,
},
notifications: getNotifications(context, messages, defaultOptions),

@@ -97,0 +103,0 @@ }));

export * from './create';
export * from './components';
export * from './Notifications';
export * from './types';

@@ -1,2 +0,2 @@

import { ReactChild, ReactNode } from 'react';
import { ReactChild, ReactNode, ComponentType } from 'react';
import { Disposable } from 'piral-core';

@@ -27,5 +27,20 @@

interface PiralCustomComponentsState {}
interface PiralCustomComponentsState {
/**
* The host component for notifications.
*/
NotificationsHost: ComponentType<NotificationsHostProps>;
/**
* The notification toast component.
*/
NotificationsToast: ComponentType<NotificationsToastProps>;
}
interface PiralCustomRegistryState {}
}
export interface NotificationsHostProps {}
export interface NotificationsToastProps extends OpenNotification {}
export interface NotificationOptions {

@@ -32,0 +47,0 @@ /**

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc