npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@acrodata/watermark

v1.2.0

Published

Add watermark to your page

Downloads

86

Readme

Watermark

npm license

Add watermark to your page.

Quick links

Documentation | Playground

Installation

npm install @acrodata/watermark --save

Usage

import { Component } from '@angular/core';
import { WatermarkDirective, WatermarkOptions } from '@acrodata/watermark';

@Component({
  selector: 'your-app',
  template: `
    <div watermark [watermarkOptions]="options">
      <p>...</p>
    </div>
  `,
  standalone: true,
  imports: [WatermarkDirective],
})
export class YourAppComponent {
  options: WatermarkOptions = {
    text: '...',
  };
}

API

Inputs

| Name | Type | Default | Description | | -------------- | ----------------------------- | ----------- | -------------------------------------- | | [options] | WatermarkOptions | {} | See WatermarkOptions | | [container] | HTMLElement | string | null | undefined | See WatermarkOptions['container'] | | [secure] | boolean | true | See WatermarkOptions['secure'] | | [zIndex] | number | 9999 | See WatermarkOptions['zIndex'] | | [scrollHeight] | string |number | undefined | See WatermarkOptions['scrollHeight'] |

WatermarkOptions

| Name | Type | Default | Description | | ------------- | -------------------------------- | ------------ | --------------------------------------------------------------------- | | container | HTMLElement | string | null | undefined | Container of the watermark | | secure | boolean | true | Whether prevent the watermark being removed | | image | string | undefined | Image source of the watermark, it's recommended to use 2x or 3x image | | text | string | string[] | undefined | Text of the watermark and dispaly multiple lines with using array | | blindText | string | undefined | Text of the blind-watermark | | blindFontSize | string | number | 16 | Font size of the blind-watermark | | blindOpacity | boolean | 0.005 | Opacity of the blind-watermark | | repeat | 'none' | 'normal' | 'multiply' | multiply | Specify how watermarks are repeated | | position | string | undefined | Specify background-position of the watermark | | zIndex | number | 9999 | Specify z-index of the watermark | | scrollHeight | number | string | undefined | Specify the height of watermark in a scroll container | | gapX | number | 100 | Horizontal gap of watermark contents | | gapY | number | 100 | Vertical gap of watermark contents | | offsetX | number | 0 | Horizontal offset of the watermark content | | offsetY | number | 0 | Vertical offset of the watermark content | | width | number | 120 | Width of the watermark content | | height | number | 60 | Height of the watermark content | | opacity | number | 0.15 | Opacity of the watermark | | rotate | number | -24 | Rotation degree of the watermark content | | fontSize | number | 16 | Font size of the text-watermark | | fontWeight | string | number | 400 | Font weight of the text-watermark | | fontStyle | 'normal' | 'italic' | normal | Font style of the text-watermark | | fontVariant | 'normal' | 'small-caps | normal | Font variant of the text-watermark | | fontColor | string | #000 | Font color of the text-watermark | | fontFamily | string | sans-serif | Font family of the text-watermark | | textAlign | CanvasTextAlign | center | Text alignment of the text-watermark | | textBaseline | CanvasTextBaseline | alphabetic | Text alignment of the text-watermark |

License

MIT