@capacitor/toast 1.0.3 → 1.0.8

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/CHANGELOG.md CHANGED
@@ -3,6 +3,55 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [1.0.8](https://github.com/ionic-team/capacitor-plugins/compare/@capacitor/toast@1.0.7...@capacitor/toast@1.0.8) (2022-02-10)
7
+
8
+ **Note:** Version bump only for package @capacitor/toast
9
+
10
+
11
+
12
+
13
+
14
+ ## [1.0.7](https://github.com/ionic-team/capacitor-plugins/compare/@capacitor/toast@1.0.6...@capacitor/toast@1.0.7) (2022-01-19)
15
+
16
+
17
+ ### Bug Fixes
18
+
19
+ * inline source code in esm map files ([#760](https://github.com/ionic-team/capacitor-plugins/issues/760)) ([a960489](https://github.com/ionic-team/capacitor-plugins/commit/a960489a19db0182b90d187a50deff9dfbe51038))
20
+
21
+
22
+
23
+
24
+
25
+ ## [1.0.6](https://github.com/ionic-team/capacitor-plugins/compare/@capacitor/toast@1.0.5...@capacitor/toast@1.0.6) (2021-11-03)
26
+
27
+ **Note:** Version bump only for package @capacitor/toast
28
+
29
+
30
+
31
+
32
+
33
+ ## [1.0.5](https://github.com/ionic-team/capacitor-plugins/compare/@capacitor/toast@1.0.4...@capacitor/toast@1.0.5) (2021-10-14)
34
+
35
+
36
+ ### Bug Fixes
37
+
38
+ * remove postpublish scripts ([#656](https://github.com/ionic-team/capacitor-plugins/issues/656)) ([ed6ac49](https://github.com/ionic-team/capacitor-plugins/commit/ed6ac499ebf4a47525071ccbfc36c27503e11f60))
39
+
40
+
41
+
42
+
43
+
44
+ ## [1.0.4](https://github.com/ionic-team/capacitor-plugins/compare/@capacitor/toast@1.0.3...@capacitor/toast@1.0.4) (2021-10-13)
45
+
46
+
47
+ ### Bug Fixes
48
+
49
+ * correct addListeners links ([#655](https://github.com/ionic-team/capacitor-plugins/issues/655)) ([f9871e7](https://github.com/ionic-team/capacitor-plugins/commit/f9871e7bd53478addb21155e148829f550c0e457))
50
+
51
+
52
+
53
+
54
+
6
55
  ## [1.0.3](https://github.com/ionic-team/capacitor-plugins/compare/@capacitor/toast@1.0.2...@capacitor/toast@1.0.3) (2021-09-01)
7
56
 
8
57
  **Note:** Version bump only for package @capacitor/toast
package/README.md CHANGED
@@ -9,6 +9,10 @@ npm install @capacitor/toast
9
9
  npx cap sync
10
10
  ```
11
11
 
12
+ ## PWA Notes
13
+
14
+ [PWA Elements](https://capacitorjs.com/docs/web/pwa-elements) are required for the Toast plugin to work.
15
+
12
16
  ## Example
13
17
 
14
18
  ```typescript
@@ -59,6 +63,6 @@ Shows a Toast on the screen
59
63
  | -------------- | ------------------------------------------ | ----------------------------------------------------------------- | --------------------- | ----- |
60
64
  | **`text`** | <code>string</code> | Text to display on the Toast | | 1.0.0 |
61
65
  | **`duration`** | <code>'short' \| 'long'</code> | Duration of the Toast, either 'short' (2000ms) or 'long' (3500ms) | <code>'short'</code> | 1.0.0 |
62
- | **`position`** | <code>'top' \| 'center' \| 'bottom'</code> | Postion of the Toast | <code>'bottom'</code> | 1.0.0 |
66
+ | **`position`** | <code>'top' \| 'center' \| 'bottom'</code> | Position of the Toast | <code>'bottom'</code> | 1.0.0 |
63
67
 
64
68
  </docgen-api>
@@ -43,8 +43,8 @@ android {
43
43
 
44
44
  repositories {
45
45
  google()
46
- jcenter()
47
46
  mavenCentral()
47
+ jcenter()
48
48
  }
49
49
 
50
50
 
package/dist/docs.json CHANGED
@@ -79,7 +79,7 @@
79
79
  "name": "since"
80
80
  }
81
81
  ],
82
- "docs": "Postion of the Toast",
82
+ "docs": "Position of the Toast",
83
83
  "complexTypes": [],
84
84
  "type": "'top' | 'center' | 'bottom' | undefined"
85
85
  }
@@ -21,7 +21,7 @@ export interface ShowOptions {
21
21
  */
22
22
  duration?: 'short' | 'long';
23
23
  /**
24
- * Postion of the Toast
24
+ * Position of the Toast
25
25
  *
26
26
  * @default 'bottom'
27
27
  * @since 1.0.0
@@ -1 +1 @@
1
- {"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"","sourcesContent":["export interface ToastPlugin {\n /**\n * Shows a Toast on the screen\n *\n * @since 1.0.0\n */\n show(options: ShowOptions): Promise<void>;\n}\n\nexport interface ShowOptions {\n /**\n * Text to display on the Toast\n *\n * @since 1.0.0\n */\n text: string;\n\n /**\n * Duration of the Toast, either 'short' (2000ms) or 'long' (3500ms)\n *\n * @default 'short'\n * @since 1.0.0\n */\n duration?: 'short' | 'long';\n\n /**\n * Position of the Toast\n *\n * @default 'bottom'\n * @since 1.0.0\n */\n position?: 'top' | 'center' | 'bottom';\n}\n\n/**\n * @deprecated Use `ToastShowOptions`.\n * @since 1.0.0\n */\nexport type ToastShowOptions = ShowOptions;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAIjD,MAAM,KAAK,GAAG,cAAc,CAAc,OAAO,EAAE;IACjD,GAAG,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,CAAC;CACvD,CAAC,CAAC;AAEH,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAE,KAAK,EAAE,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAIjD,MAAM,KAAK,GAAG,cAAc,CAAc,OAAO,EAAE;IACjD,GAAG,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,CAAC;CACvD,CAAC,CAAC;AAEH,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAE,KAAK,EAAE,CAAC","sourcesContent":["import { registerPlugin } from '@capacitor/core';\n\nimport type { ToastPlugin } from './definitions';\n\nconst Toast = registerPlugin<ToastPlugin>('Toast', {\n web: () => import('./web').then(m => new m.ToastWeb()),\n});\n\nexport * from './definitions';\nexport { Toast };\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAI5C,MAAM,OAAO,QAAS,SAAQ,SAAS;IACrC,KAAK,CAAC,IAAI,CAAC,OAAoB;QAC7B,IAAI,OAAO,QAAQ,KAAK,WAAW,EAAE;YACnC,IAAI,QAAQ,GAAG,IAAI,CAAC;YACpB,IAAI,OAAO,CAAC,QAAQ,EAAE;gBACpB,QAAQ,GAAG,OAAO,CAAC,QAAQ,KAAK,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC;aACtD;YACD,MAAM,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,WAAW,CAAQ,CAAC;YACzD,KAAK,CAAC,QAAQ,GAAG,QAAQ,CAAC;YAC1B,KAAK,CAAC,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;YAC7B,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;SAClC;IACH,CAAC;CACF"}
1
+ {"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAI5C,MAAM,OAAO,QAAS,SAAQ,SAAS;IACrC,KAAK,CAAC,IAAI,CAAC,OAAoB;QAC7B,IAAI,OAAO,QAAQ,KAAK,WAAW,EAAE;YACnC,IAAI,QAAQ,GAAG,IAAI,CAAC;YACpB,IAAI,OAAO,CAAC,QAAQ,EAAE;gBACpB,QAAQ,GAAG,OAAO,CAAC,QAAQ,KAAK,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC;aACtD;YACD,MAAM,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,WAAW,CAAQ,CAAC;YACzD,KAAK,CAAC,QAAQ,GAAG,QAAQ,CAAC;YAC1B,KAAK,CAAC,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;YAC7B,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;SAClC;IACH,CAAC;CACF","sourcesContent":["import { WebPlugin } from '@capacitor/core';\n\nimport type { ToastPlugin, ShowOptions } from './definitions';\n\nexport class ToastWeb extends WebPlugin implements ToastPlugin {\n async show(options: ShowOptions): Promise<void> {\n if (typeof document !== 'undefined') {\n let duration = 2000;\n if (options.duration) {\n duration = options.duration === 'long' ? 3500 : 2000;\n }\n const toast = document.createElement('pwa-toast') as any;\n toast.duration = duration;\n toast.message = options.text;\n document.body.appendChild(toast);\n }\n }\n}\n"]}
package/dist/plugin.js CHANGED
@@ -31,5 +31,5 @@ var capacitorToast = (function (exports, core) {
31
31
 
32
32
  return exports;
33
33
 
34
- }({}, capacitorExports));
34
+ })({}, capacitorExports);
35
35
  //# sourceMappingURL=plugin.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capacitor/toast",
3
- "version": "1.0.3",
3
+ "version": "1.0.8",
4
4
  "description": "The Toast API provides a notification pop up for displaying important information to a user. Just like real toast!",
5
5
  "main": "dist/plugin.cjs.js",
6
6
  "module": "dist/esm/index.js",
@@ -33,7 +33,7 @@
33
33
  "verify:android": "cd android && ./gradlew clean build test && cd ..",
34
34
  "verify:web": "npm run build",
35
35
  "lint": "npm run eslint && npm run prettier -- --check && npm run swiftlint -- lint",
36
- "fmt": "npm run eslint -- --fix && npm run prettier -- --write && npm run swiftlint -- autocorrect --format",
36
+ "fmt": "npm run eslint -- --fix && npm run prettier -- --write && npm run swiftlint -- --fix --format",
37
37
  "eslint": "eslint . --ext ts",
38
38
  "prettier": "prettier \"**/*.{css,html,ts,js,java}\"",
39
39
  "swiftlint": "node-swiftlint",
@@ -42,13 +42,12 @@
42
42
  "clean": "rimraf ./dist",
43
43
  "watch": "tsc --watch",
44
44
  "prepublishOnly": "npm run build",
45
- "postpublish": "npm run publish:cocoapod",
46
45
  "publish:cocoapod": "pod trunk push ./CapacitorToast.podspec --allow-warnings"
47
46
  },
48
47
  "devDependencies": {
49
48
  "@capacitor/android": "^3.0.0",
50
49
  "@capacitor/core": "^3.0.0",
51
- "@capacitor/docgen": "0.0.17",
50
+ "@capacitor/docgen": "0.0.18",
52
51
  "@capacitor/ios": "^3.0.0",
53
52
  "@ionic/eslint-config": "^0.3.0",
54
53
  "@ionic/prettier-config": "~1.0.1",
@@ -80,5 +79,5 @@
80
79
  "publishConfig": {
81
80
  "access": "public"
82
81
  },
83
- "gitHead": "f0dcbb1413ba781714dfdc44f41c0ccab735b1e9"
82
+ "gitHead": "5bebfefe9bdca4d49f0e02dab74b02a692d3ed86"
84
83
  }