@wool-so/vue 1.0.0 → 1.1.0

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
@@ -46,7 +46,8 @@ track('Purchase', { revenue: 29, currency: 'USD' })
46
46
  ```
47
47
 
48
48
  Up to 10 properties per event, with string, number or boolean values. Calls made before the script
49
- has loaded are queued and sent once it has. Without any code, clicks on an element with
49
+ has loaded are queued and sent once it has. A `callback` always runs, once, within a second, even if
50
+ an ad blocker stops the script, so it's safe to navigate from it. Without any code, clicks on an element with
50
51
  `data-wool-event` send that event, with its `data-wool-prop-*` attributes as properties:
51
52
 
52
53
  ```html
@@ -55,7 +56,7 @@ has loaded are queued and sent once it has. Without any code, clicks on an eleme
55
56
 
56
57
  ## Options
57
58
 
58
- Components take the same options as `inject()`, as props: `trackingKey`, `local`, `manual`, `outboundLinks`, `fileDownloads`, `src` and `api`. Every option, and how it works, is in [@wool-so/web](https://www.npmjs.com/package/@wool-so/web).
59
+ Components take the same options as `inject()`, as props: `trackingKey`, `local`, `manual`, `outboundLinks`, `fileDownloads`, `src`, `api` and `disabled`. Every option, and how it works, is in [@wool-so/web](https://www.npmjs.com/package/@wool-so/web).
59
60
 
60
61
  ## License
61
62
 
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { type App, type PropType } from 'vue';
2
- import { type Options } from '@wool-so/web';
2
+ import { pageview, track, type Options } from '@wool-so/web';
3
3
  export { track, pageview, type EventOptions, type Options } from '@wool-so/web';
4
4
  export declare const Analytics: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
5
5
  trackingKey: {
@@ -18,6 +18,7 @@ export declare const Analytics: import("vue").DefineComponent<import("vue").Extr
18
18
  type: PropType<boolean | undefined>;
19
19
  default: undefined;
20
20
  };
21
+ disabled: BooleanConstructor;
21
22
  }>, () => null, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
22
23
  trackingKey: {
23
24
  type: StringConstructor;
@@ -35,12 +36,22 @@ export declare const Analytics: import("vue").DefineComponent<import("vue").Extr
35
36
  type: PropType<boolean | undefined>;
36
37
  default: undefined;
37
38
  };
39
+ disabled: BooleanConstructor;
38
40
  }>> & Readonly<{}>, {
39
41
  local: boolean;
40
42
  manual: boolean;
41
43
  outboundLinks: boolean | undefined;
42
44
  fileDownloads: boolean | undefined;
45
+ disabled: boolean;
43
46
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
47
+ declare module 'vue' {
48
+ interface ComponentCustomProperties {
49
+ $wool: {
50
+ track: typeof track;
51
+ pageview: typeof pageview;
52
+ };
53
+ }
54
+ }
44
55
  export declare function wool(options: Options): {
45
56
  install(app: App): void;
46
57
  };
package/dist/index.js CHANGED
@@ -12,13 +12,14 @@ export const Analytics = defineComponent({
12
12
  manual: Boolean,
13
13
  outboundLinks: { type: Boolean, default: undefined },
14
14
  fileDownloads: { type: Boolean, default: undefined },
15
+ disabled: Boolean,
15
16
  },
16
17
  setup(props) {
17
18
  onMounted(() => inject({ ...props }));
18
19
  return () => null;
19
20
  },
20
21
  });
21
- // Or as a plugin: app.use(wool({ trackingKey: '…' })), which also gives templates $wool.track().
22
+ // Or as a plugin: app.use(wool({ trackingKey: '…' })).
22
23
  export function wool(options) {
23
24
  return {
24
25
  install(app) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wool-so/vue",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
4
4
  "description": "Vue component and plugin for Wool, cookieless analytics for passion projects.",
5
5
  "keywords": [
6
6
  "analytics",
@@ -35,7 +35,7 @@
35
35
  "./package.json": "./package.json"
36
36
  },
37
37
  "dependencies": {
38
- "@wool-so/web": "^1.0.0"
38
+ "@wool-so/web": "^1.1.0"
39
39
  },
40
40
  "peerDependencies": {
41
41
  "vue": ">=3"