@vuepress/plugin-umami-analytics 2.0.0-rc.120 → 2.0.0-rc.122

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.
@@ -88,6 +88,7 @@ declare global {
88
88
  };
89
89
  }
90
90
  }
91
+
91
92
  /**
92
93
  * Initialize Umami Analytics tracking
93
94
  *
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../src/client/composables/useUmamiAnalytics.ts"],"sourcesContent":["import type { UmamiOptions } from '../../shared/index.js'\n\ndeclare global {\n interface Window {\n umami: {\n track: {\n (payload?: Record<string, unknown>): void\n (name: string, data?: Record<string, unknown>): void\n }\n }\n }\n}\n\n/**\n * Initialize Umami Analytics tracking\n *\n * 初始化 Umami Analytics 追踪\n *\n * @param options - Umami Analytics options\n *\n * @description Injects Umami tracking script and configures tracking behavior.\n * The global `umami.track()` function will be available for custom event tracking.\n *\n * 注入 Umami 追踪脚本并配置追踪行为。\n * 全局 `umami.track()` 函数可用于自定义事件追踪。\n *\n * @see https://umami.is/docs/tracker-functions\n * @see https://umami.is/docs/tracker-configuration\n */\nexport const useUmamiAnalytics = ({\n link = 'https://us.umami.is/script.js',\n id,\n domains,\n autoTrack,\n cache,\n hostUrl,\n}: UmamiOptions): void => {\n // avoid duplicated import\n if ('umami' in window) return\n\n const script = document.createElement('script')\n script.src = link!\n script.async = true\n script.setAttribute('data-website-id', id)\n\n if (autoTrack === false) script.setAttribute('data-auto-track', 'false')\n if (cache) script.setAttribute('data-cache', 'true')\n if (domains) script.setAttribute('data-domains', domains.join(','))\n if (hostUrl) script.setAttribute('data-hostUrl', hostUrl)\n\n document.head.appendChild(script)\n}\n"],"names":["useUmamiAnalytics","link","id","domains","autoTrack","cache","hostUrl","script"],"mappings":"AA6BO,MAAMA,EAAoB,CAAC,CAChC,KAAAC,EAAO,gCACP,GAAAC,EACA,QAAAC,EACA,UAAAC,EACA,MAAAC,EACA,QAAAC,CACF,IAA0B,CAExB,GAAI,UAAW,OAAQ,OAEvB,MAAMC,EAAS,SAAS,cAAc,QAAQ,EAC9CA,EAAO,IAAMN,EACbM,EAAO,MAAQ,GACfA,EAAO,aAAa,kBAAmBL,CAAE,EAErCE,IAAc,IAAOG,EAAO,aAAa,kBAAmB,OAAO,EACnEF,GAAOE,EAAO,aAAa,aAAc,MAAM,EAC/CJ,GAASI,EAAO,aAAa,eAAgBJ,EAAQ,KAAK,GAAG,CAAC,EAC9DG,GAASC,EAAO,aAAa,eAAgBD,CAAO,EAExD,SAAS,KAAK,YAAYC,CAAM,CAClC"}
1
+ {"version":3,"file":"index.js","sources":["../../src/client/composables/useUmamiAnalytics.ts"],"sourcesContent":["import type { UmamiOptions } from '../../shared/index.js'\nimport './declare.js'\n\n/**\n * Initialize Umami Analytics tracking\n *\n * 初始化 Umami Analytics 追踪\n *\n * @param options - Umami Analytics options\n *\n * @description Injects Umami tracking script and configures tracking behavior.\n * The global `umami.track()` function will be available for custom event tracking.\n *\n * 注入 Umami 追踪脚本并配置追踪行为。\n * 全局 `umami.track()` 函数可用于自定义事件追踪。\n *\n * @see https://umami.is/docs/tracker-functions\n * @see https://umami.is/docs/tracker-configuration\n */\nexport const useUmamiAnalytics = ({\n link = 'https://us.umami.is/script.js',\n id,\n domains,\n autoTrack,\n cache,\n hostUrl,\n}: UmamiOptions): void => {\n // avoid duplicated import\n if ('umami' in window) return\n\n const script = document.createElement('script')\n script.src = link!\n script.async = true\n script.setAttribute('data-website-id', id)\n\n if (autoTrack === false) script.setAttribute('data-auto-track', 'false')\n if (cache) script.setAttribute('data-cache', 'true')\n if (domains) script.setAttribute('data-domains', domains.join(','))\n if (hostUrl) script.setAttribute('data-hostUrl', hostUrl)\n\n document.head.appendChild(script)\n}\n"],"names":["useUmamiAnalytics","link","id","domains","autoTrack","cache","hostUrl","script"],"mappings":"AAmBO,MAAMA,EAAoB,CAAC,CAChC,KAAAC,EAAO,gCACP,GAAAC,EACA,QAAAC,EACA,UAAAC,EACA,MAAAC,EACA,QAAAC,CACF,IAA0B,CAExB,GAAI,UAAW,OAAQ,OAEvB,MAAMC,EAAS,SAAS,cAAc,QAAQ,EAC9CA,EAAO,IAAMN,EACbM,EAAO,MAAQ,GACfA,EAAO,aAAa,kBAAmBL,CAAE,EAErCE,IAAc,IAAOG,EAAO,aAAa,kBAAmB,OAAO,EACnEF,GAAOE,EAAO,aAAa,aAAc,MAAM,EAC/CJ,GAASI,EAAO,aAAa,eAAgBJ,EAAQ,KAAK,GAAG,CAAC,EAC9DG,GAASC,EAAO,aAAa,eAAgBD,CAAO,EAExD,SAAS,KAAK,YAAYC,CAAM,CAClC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vuepress/plugin-umami-analytics",
3
- "version": "2.0.0-rc.120",
3
+ "version": "2.0.0-rc.122",
4
4
  "description": "VuePress plugin - umami-analytics",
5
5
  "keywords": [
6
6
  "vuepress-plugin",
@@ -36,8 +36,8 @@
36
36
  "lib"
37
37
  ],
38
38
  "dependencies": {
39
- "@vuepress/helper": "2.0.0-rc.120",
40
- "vue": "^3.5.25"
39
+ "@vuepress/helper": "2.0.0-rc.122",
40
+ "vue": "^3.5.27"
41
41
  },
42
42
  "peerDependencies": {
43
43
  "vuepress": "2.0.0-rc.26"
@@ -45,5 +45,5 @@
45
45
  "publishConfig": {
46
46
  "access": "public"
47
47
  },
48
- "gitHead": "02d058c345d689f6a639ca01f937b664deda33d3"
48
+ "gitHead": "5dfd2d24f8335f718182701995420907b0a00905"
49
49
  }