@samline/notify 0.1.9 → 0.1.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -47,8 +47,8 @@ CDN / Browser
47
47
  Use the browser build when your project loads scripts directly and cannot compile npm modules (Shopify, WordPress, plain HTML). Example CDN usage (replace version):
48
48
 
49
49
  ```html
50
- <script src="https://unpkg.com/@samline/notify@0.1.8/dist/notify.umd.js"></script>
51
- <link rel="stylesheet" href="https://unpkg.com/@samline/notify@0.1.8/dist/styles.css">
50
+ <script src="https://unpkg.com/@samline/notify@0.1.10/dist/notify.umd.js"></script>
51
+ <link rel="stylesheet" href="https://unpkg.com/@samline/notify@0.1.10/dist/styles.css">
52
52
  ```
53
53
 
54
54
  Entry Points
@@ -59,7 +59,7 @@ Choose the entrypoint matching your stack so you only import what you need.
59
59
  | --- | --- | --- |
60
60
  | Vanilla JS | `import { default as notifications } from '@samline/notify'` | [docs/vanilla.md](docs/vanilla.md) |
61
61
  | Vanilla explicit subpath | `import { sileo } from '@samline/notify/vanilla'` | [docs/vanilla.md](docs/vanilla.md) |
62
- | Browser / CDN | `<script src="https://unpkg.com/@samline/notify@0.1.8/dist/notify.umd.js"></script>` | [docs/browser.md](docs/browser.md) |
62
+ | Browser / CDN | `<script src="https://unpkg.com/@samline/notify@0.1.9/dist/notify.umd.js"></script>` | [docs/browser.md](docs/browser.md) |
63
63
  | React | `import { Toaster } from '@samline/notify/react'` | [docs/react.md](docs/react.md) |
64
64
  | Vue | `import Notifications from '@samline/notify/vue'` | [docs/vue.md](docs/vue.md) |
65
65
  | Svelte | `import Toaster from '@samline/notify/svelte'` | [docs/svelte.md](docs/svelte.md) |
@@ -69,8 +69,8 @@ Quick Start
69
69
  Vanilla example (UMD / modules):
70
70
 
71
71
  ```html
72
- <script src="https://unpkg.com/@samline/notify@0.1.8/dist/notify.umd.js"></script>
73
- <link rel="stylesheet" href="https://unpkg.com/@samline/notify@0.1.8/dist/styles.css">
72
+ <script src="https://unpkg.com/@samline/notify@0.1.10/dist/notify.umd.js"></script>
73
+ <link rel="stylesheet" href="https://unpkg.com/@samline/notify@0.1.10/dist/styles.css">
74
74
  <script>
75
75
  const api = window.notify || window.notifications;
76
76
  api.initToasters(document.body, ['top-right']);
@@ -415,15 +415,6 @@
415
415
  }
416
416
  }
417
417
 
418
- var invariant = function () { };
419
- if (process.env.NODE_ENV !== 'production') {
420
- invariant = function (check, message) {
421
- if (!check) {
422
- throw new Error(message);
423
- }
424
- };
425
- }
426
-
427
418
  /**
428
419
  * The MotionValue tracks the state of a single animatable
429
420
  * value. Currently, updatedAt and current are unused. The
@@ -966,8 +957,6 @@
966
957
  return function animate(elements, keyframes, options = {}) {
967
958
  elements = resolveElements(elements);
968
959
  const numElements = elements.length;
969
- invariant(Boolean(numElements), "No valid element provided.");
970
- invariant(Boolean(keyframes), "No keyframes defined.");
971
960
  /**
972
961
  * Create and start new animations
973
962
  */
package/docs/browser.md CHANGED
@@ -5,8 +5,8 @@ Quick start
5
5
  Include the UMD bundle and stylesheet in a static page:
6
6
 
7
7
  ```html
8
- <link rel="stylesheet" href="https://unpkg.com/@samline/notify@0.1.8/dist/styles.css">
9
- <script src="https://unpkg.com/@samline/notify@0.1.8/dist/notify.umd.js"></script>
8
+ <link rel="stylesheet" href="https://unpkg.com/@samline/notify@0.1.9/dist/styles.css">
9
+ <script src="https://unpkg.com/@samline/notify@0.1.9/dist/notify.umd.js"></script>
10
10
  <script>
11
11
  const api = window.notify || window.notifications;
12
12
  api.initToasters(document.body, ['top-right']);
@@ -27,8 +27,8 @@ Use the browser build when your project loads scripts directly in the page and c
27
27
  Example using the UMD build (replace path/version as needed):
28
28
 
29
29
  ```html
30
- <link rel="stylesheet" href="https://unpkg.com/@samline/notify@0.1.8/dist/styles.css">
31
- <script src="https://unpkg.com/@samline/notify@0.1.8/dist/notify.umd.js"></script>
30
+ <link rel="stylesheet" href="https://unpkg.com/@samline/notify@0.1.9/dist/styles.css">
31
+ <script src="https://unpkg.com/@samline/notify@0.1.9/dist/notify.umd.js"></script>
32
32
  <script>
33
33
  document.addEventListener('DOMContentLoaded', () => {
34
34
  const api = window.notify || window.notifications;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@samline/notify",
3
- "version": "0.1.9",
3
+ "version": "0.1.10",
4
4
  "description": "Notifications engine inspired by Sileo, with adapters for vanilla, React, Vue and Svelte.",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.esm.js",
package/rollup.config.mjs CHANGED
@@ -37,12 +37,20 @@ export default [
37
37
  exports: 'named',
38
38
  name: 'notify'
39
39
  },
40
- plugins: [resolve(), commonjs(), typescript({ tsconfig: './tsconfig.json' }),
40
+ plugins: [
41
+ replace({
42
+ 'process.env.NODE_ENV': JSON.stringify('production'),
43
+ preventAssignment: true
44
+ }),
45
+ resolve(),
46
+ commonjs(),
47
+ typescript({ tsconfig: './tsconfig.json' }),
41
48
  copy({
42
49
  targets: [
43
50
  { src: 'src/styles/sileo.css', dest: 'dist', rename: 'styles.css' }
44
51
  ],
45
52
  verbose: true
46
- })]
53
+ })
54
+ ]
47
55
  }
48
56
  ];
Binary file