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

ngx-nightmode

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ngx-nightmode - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

esm2015/lib/widget.options.js

14

bundles/ngx-nightmode.umd.js
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core')) :
typeof define === 'function' && define.amd ? define('ngx-nightmode', ['exports', '@angular/core'], factory) :
(global = global || self, factory(global['ngx-nightmode'] = {}, global.ng.core));
}(this, (function (exports, core) { 'use strict';
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('darkmode-js')) :
typeof define === 'function' && define.amd ? define('ngx-nightmode', ['exports', '@angular/core', 'darkmode-js'], factory) :
(global = global || self, factory(global['ngx-nightmode'] = {}, global.ng.core, global.Darkmode));
}(this, (function (exports, core, Darkmode) { 'use strict';
Darkmode = Darkmode && Darkmode.hasOwnProperty('default') ? Darkmode['default'] : Darkmode;
/*! *****************************************************************************

@@ -207,2 +209,6 @@ Copyright (c) Microsoft Corporation. All rights reserved.

}
NgxNightmodeService.prototype.showWidget = function (options) {
var darkmode = new Darkmode(options);
darkmode.showWidget();
};
NgxNightmodeService.ɵprov = core.ɵɵdefineInjectable({ factory: function NgxNightmodeService_Factory() { return new NgxNightmodeService(); }, token: NgxNightmodeService, providedIn: "root" });

@@ -209,0 +215,0 @@ NgxNightmodeService = __decorate([

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

!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("@angular/core")):"function"==typeof define&&define.amd?define("ngx-nightmode",["exports","@angular/core"],n):n((e=e||self)["ngx-nightmode"]={},e.ng.core)}(this,(function(e,n){"use strict";
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */function t(e,n,t,o){var r,i=arguments.length,c=i<3?n:null===o?o=Object.getOwnPropertyDescriptor(n,t):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,n,t,o);else for(var f=e.length-1;f>=0;f--)(r=e[f])&&(c=(i<3?r(c):i>3?r(n,t,c):r(n,t))||c);return i>3&&c&&Object.defineProperty(n,t,c),c}var o=function(){function e(){}return e.ɵprov=n.ɵɵdefineInjectable({factory:function(){return new e},token:e,providedIn:"root"}),e=t([n.Injectable({providedIn:"root"})],e)}(),r=function(){function e(){}return e.prototype.ngOnInit=function(){},e=t([n.Component({selector:"lib-ngx-nightmode",template:"\n <p>\n ngx-nightmode works!\n </p>\n "})],e)}(),i=function(){function e(){}return e=t([n.NgModule({declarations:[r],imports:[],exports:[r]})],e)}();e.NgxNightmodeComponent=r,e.NgxNightmodeModule=i,e.NgxNightmodeService=o,Object.defineProperty(e,"__esModule",{value:!0})}));
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("darkmode-js")):"function"==typeof define&&define.amd?define("ngx-nightmode",["exports","@angular/core","darkmode-js"],t):t((e=e||self)["ngx-nightmode"]={},e.ng.core,e.Darkmode)}(this,(function(e,t,n){"use strict";n=n&&n.hasOwnProperty("default")?n.default:n;function o(e,t,n,o){var r,i=arguments.length,d=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)d=Reflect.decorate(e,t,n,o);else for(var c=e.length-1;c>=0;c--)(r=e[c])&&(d=(i<3?r(d):i>3?r(t,n,d):r(t,n))||d);return i>3&&d&&Object.defineProperty(t,n,d),d}var r=function(){function e(){}return e.prototype.showWidget=function(e){new n(e).showWidget()},e.ɵprov=t.ɵɵdefineInjectable({factory:function(){return new e},token:e,providedIn:"root"}),e=o([t.Injectable({providedIn:"root"})],e)}(),i=function(){function e(){}return e.prototype.ngOnInit=function(){},e=o([t.Component({selector:"lib-ngx-nightmode",template:"\n <p>\n ngx-nightmode works!\n </p>\n "})],e)}(),d=function(){function e(){}return e=o([t.NgModule({declarations:[i],imports:[],exports:[i]})],e)}();e.NgxNightmodeComponent=i,e.NgxNightmodeModule=d,e.NgxNightmodeService=r,Object.defineProperty(e,"__esModule",{value:!0})}));
//# sourceMappingURL=ngx-nightmode.umd.min.js.map
import { __decorate } from "tslib";
import { Injectable } from '@angular/core';
import Darkmode from 'darkmode-js';
import * as i0 from "@angular/core";

@@ -7,2 +8,6 @@ let NgxNightmodeService = class NgxNightmodeService {

}
showWidget(options) {
const darkmode = new Darkmode(options);
darkmode.showWidget();
}
};

@@ -16,2 +21,2 @@ NgxNightmodeService.ɵprov = i0.ɵɵdefineInjectable({ factory: function NgxNightmodeService_Factory() { return new NgxNightmodeService(); }, token: NgxNightmodeService, providedIn: "root" });

export { NgxNightmodeService };
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmd4LW5pZ2h0bW9kZS5zZXJ2aWNlLmpzIiwic291cmNlUm9vdCI6Im5nOi8vbmd4LW5pZ2h0bW9kZS8iLCJzb3VyY2VzIjpbImxpYi9uZ3gtbmlnaHRtb2RlLnNlcnZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLE9BQU8sRUFBRSxVQUFVLEVBQUUsTUFBTSxlQUFlLENBQUM7O0FBSzNDLElBQWEsbUJBQW1CLEdBQWhDLE1BQWEsbUJBQW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QkFBbUIiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBJbmplY3RhYmxlIH0gZnJvbSAnQGFuZ3VsYXIvY29yZSc7XG5cbmltcG9ydCBEYXJrbW9kZSBmcm9tICdkYXJrbW9kZS1qcyc7XG5cbmltcG9ydCB7IFdpZGdldE9wdGlvbnMgfSBmcm9tICcuL3dpZGdldC5vcHRpb25zJztcblxuQEluamVjdGFibGUoe1xuICBwcm92aWRlZEluOiAncm9vdCdcbn0pXG5leHBvcnQgY2xhc3MgTmd4TmlnaHRtb2RlU2VydmljZSB7XG5cbiAgY29uc3RydWN0b3IoKSB7IH1cblxuICBzaG93V2lkZ2V0KG9wdGlvbnM6IFdpZGdldE9wdGlvbnMpe1xuICAgIGNvbnN0IGRhcmttb2RlID0gbmV3IERhcmttb2RlKG9wdGlvbnMpO1xuICAgIGRhcmttb2RlLnNob3dXaWRnZXQoKTsgICAgXG4gIH1cblxufVxuIl19
import { __decorate } from "tslib";
import { Injectable } from '@angular/core';
import Darkmode from 'darkmode-js';
import * as i0 from "@angular/core";

@@ -7,2 +8,6 @@ var NgxNightmodeService = /** @class */ (function () {

}
NgxNightmodeService.prototype.showWidget = function (options) {
var darkmode = new Darkmode(options);
darkmode.showWidget();
};
NgxNightmodeService.ɵprov = i0.ɵɵdefineInjectable({ factory: function NgxNightmodeService_Factory() { return new NgxNightmodeService(); }, token: NgxNightmodeService, providedIn: "root" });

@@ -17,2 +22,2 @@ NgxNightmodeService = __decorate([

export { NgxNightmodeService };
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmd4LW5pZ2h0bW9kZS5zZXJ2aWNlLmpzIiwic291cmNlUm9vdCI6Im5nOi8vbmd4LW5pZ2h0bW9kZS8iLCJzb3VyY2VzIjpbImxpYi9uZ3gtbmlnaHRtb2RlLnNlcnZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLE9BQU8sRUFBRSxVQUFVLEV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VRELElBU0M7U0FUWSxtQkFBbUIiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBJbmplY3RhYmxlIH0gZnJvbSAnQGFuZ3VsYXIvY29yZSc7XG5cbmltcG9ydCBEYXJrbW9kZSBmcm9tICdkYXJrbW9kZS1qcyc7XG5cbmltcG9ydCB7IFdpZGdldE9wdGlvbnMgfSBmcm9tICcuL3dpZGdldC5vcHRpb25zJztcblxuQEluamVjdGFibGUoe1xuICBwcm92aWRlZEluOiAncm9vdCdcbn0pXG5leHBvcnQgY2xhc3MgTmd4TmlnaHRtb2RlU2VydmljZSB7XG5cbiAgY29uc3RydWN0b3IoKSB7IH1cblxuICBzaG93V2lkZ2V0KG9wdGlvbnM6IFdpZGdldE9wdGlvbnMpe1xuICAgIGNvbnN0IGRhcmttb2RlID0gbmV3IERhcmttb2RlKG9wdGlvbnMpO1xuICAgIGRhcmttb2RlLnNob3dXaWRnZXQoKTsgICAgXG4gIH1cblxufVxuIl19
import { __decorate } from 'tslib';
import { ɵɵdefineInjectable, Injectable, Component, NgModule } from '@angular/core';
import Darkmode from 'darkmode-js';

@@ -7,2 +8,6 @@ let NgxNightmodeService = class NgxNightmodeService {

}
showWidget(options) {
const darkmode = new Darkmode(options);
darkmode.showWidget();
}
};

@@ -9,0 +14,0 @@ NgxNightmodeService.ɵprov = ɵɵdefineInjectable({ factory: function NgxNightmodeService_Factory() { return new NgxNightmodeService(); }, token: NgxNightmodeService, providedIn: "root" });

import { __decorate } from 'tslib';
import { ɵɵdefineInjectable, Injectable, Component, NgModule } from '@angular/core';
import Darkmode from 'darkmode-js';

@@ -7,2 +8,6 @@ var NgxNightmodeService = /** @class */ (function () {

}
NgxNightmodeService.prototype.showWidget = function (options) {
var darkmode = new Darkmode(options);
darkmode.showWidget();
};
NgxNightmodeService.ɵprov = ɵɵdefineInjectable({ factory: function NgxNightmodeService_Factory() { return new NgxNightmodeService(); }, token: NgxNightmodeService, providedIn: "root" });

@@ -9,0 +14,0 @@ NgxNightmodeService = __decorate([

@@ -0,3 +1,5 @@

import { WidgetOptions } from './widget.options';
export declare class NgxNightmodeService {
constructor();
showWidget(options: WidgetOptions): void;
}

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

{"__symbolic":"module","version":4,"metadata":{"NgxNightmodeService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":2,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor"}]},"statics":{"ɵprov":{}}},"NgxNightmodeComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":2,"character":1},"arguments":[{"selector":"lib-ngx-nightmode","template":"\n <p>\n ngx-nightmode works!\n </p>\n ","styles":[]}]}],"members":{"__ctor__":[{"__symbolic":"constructor"}],"ngOnInit":[{"__symbolic":"method"}]}},"NgxNightmodeModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":5,"character":1},"arguments":[{"declarations":[{"__symbolic":"reference","name":"NgxNightmodeComponent"}],"imports":[],"exports":[{"__symbolic":"reference","name":"NgxNightmodeComponent"}]}]}],"members":{}}},"origins":{"NgxNightmodeService":"./lib/ngx-nightmode.service","NgxNightmodeComponent":"./lib/ngx-nightmode.component","NgxNightmodeModule":"./lib/ngx-nightmode.module"},"importAs":"ngx-nightmode"}
{"__symbolic":"module","version":4,"metadata":{"NgxNightmodeService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":6,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor"}],"showWidget":[{"__symbolic":"method"}]},"statics":{"ɵprov":{}}},"NgxNightmodeComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":2,"character":1},"arguments":[{"selector":"lib-ngx-nightmode","template":"\n <p>\n ngx-nightmode works!\n </p>\n ","styles":[]}]}],"members":{"__ctor__":[{"__symbolic":"constructor"}],"ngOnInit":[{"__symbolic":"method"}]}},"NgxNightmodeModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":5,"character":1},"arguments":[{"declarations":[{"__symbolic":"reference","name":"NgxNightmodeComponent"}],"imports":[],"exports":[{"__symbolic":"reference","name":"NgxNightmodeComponent"}]}]}],"members":{}}},"origins":{"NgxNightmodeService":"./lib/ngx-nightmode.service","NgxNightmodeComponent":"./lib/ngx-nightmode.component","NgxNightmodeModule":"./lib/ngx-nightmode.module"},"importAs":"ngx-nightmode"}
{
"name": "ngx-nightmode",
"version": "0.0.1",
"version": "0.0.2",
"peerDependencies": {

@@ -5,0 +5,0 @@ "@angular/common": "^9.0.0",

@@ -1,24 +0,11 @@

# NgxNightmode
# Angular 9 Night Mode Library
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 9.0.0.
A library for adding night-mode to your Angular 9 app.
## Code scaffolding
Run `ng generate component component-name --project ngx-nightmode` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project ngx-nightmode`.
> Note: Don't forget to add `--project ngx-nightmode` or else it will be added to the default project in your `angular.json` file.
## Features
## Build
Run `ng build ngx-nightmode` to build the project. The build artifacts will be stored in the `dist/` directory.
## Publishing
After building your library with `ng build ngx-nightmode`, go to the dist folder `cd dist/ngx-nightmode` and run `npm publish`.
## Running unit tests
Run `ng test ngx-nightmode` to execute the unit tests via [Karma](https://karma-runner.github.io).
## Further help
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).
- Widget appears automatically
- Saving users choice
- Automatically shows Darkmode if the OS prefered theme is dark (if the browsers supports prefers-color-scheme)
- Can be used programmatically without widget

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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