Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vega-tooltip

Package Overview
Dependencies
Maintainers
4
Versions
97
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vega-tooltip - npm Package Compare versions

Comparing version 0.30.0 to 0.30.1

33

build/vega-tooltip.js

@@ -8,3 +8,3 @@ (function (global, factory) {

var name = "vega-tooltip";
var version$1 = "0.30.0";
var version$1 = "0.30.1";
var description = "A tooltip plugin for Vega-Lite and Vega visualizations.";

@@ -67,22 +67,21 @@ var keywords = [

lint: "yarn eslintbase && yarn prettierbase --check",
release: "yarn run prebuild && yarn build && auto shipit"
release: "release-it"
};
var devDependencies = {
"@auto-it/conventional-commits": "^10.37.6",
"@auto-it/first-time-contributor": "^10.37.6",
"@rollup/plugin-json": "^5.0.1",
"@release-it/conventional-changelog": "^5.1.1",
"@rollup/plugin-json": "^6.0.0",
"@rollup/plugin-node-resolve": "^15.0.1",
auto: "^10.37.6",
"browser-sync": "^2.27.10",
concurrently: "^7.5.0",
"gh-pages": "^4.0.0",
"jest-environment-jsdom": "^29.3.1",
"release-it": "^15.6.0",
"browser-sync": "^2.27.11",
concurrently: "^7.6.0",
"gh-pages": "^5.0.0",
"jest-environment-jsdom": "^29.4.2",
path: "^0.12.7",
rollup: "^3.3.0",
rollup: "^3.15.0",
"rollup-plugin-bundle-size": "^1.0.3",
"rollup-plugin-terser": "^7.0.2",
"rollup-plugin-ts": "^3.0.2",
sass: "^1.56.1",
typescript: "~4.9.3",
"vega-datasets": "^2.5.3",
"@rollup/plugin-terser": "^0.4.0",
"rollup-plugin-ts": "^3.2.0",
sass: "^1.58.0",
typescript: "~4.9.5",
"vega-datasets": "^2.5.4",
"vega-lite-dev-config": "^0.21.0",

@@ -116,3 +115,3 @@ "vega-typings": "^0.22.3"

/*! *****************************************************************************
/******************************************************************************
Copyright (c) Microsoft Corporation.

@@ -119,0 +118,0 @@

@@ -1,2 +0,2 @@

!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("vega-util")):"function"==typeof define&&define.amd?define(["exports","vega-util"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).vegaTooltip={},t.vega)}(this,(function(t,e){"use strict";var n="0.30.0",i=function(){return i=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},i.apply(this,arguments)};function o(t,n,i){if(e.isArray(t))return"[".concat(t.map((function(t){return n(e.isString(t)?t:r(t,i))})).join(", "),"]");if(e.isObject(t)){var o="",l=t,a=l.title,s=l.image,d=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(t);o<i.length;o++)e.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(t,i[o])&&(n[i[o]]=t[i[o]])}return n}(l,["title","image"]);a&&(o+="<h2>".concat(n(a),"</h2>")),s&&(o+='<img src="'.concat(n(s),'">'));var p=Object.keys(d);if(p.length>0){o+="<table>";for(var c=0,h=p;c<h.length;c++){var f=h[c],u=d[f];void 0!==u&&(e.isObject(u)&&(u=r(u,i)),o+='<tr><td class="key">'.concat(n(f),':</td><td class="value">').concat(n(u),"</td></tr>"))}o+="</table>"}return o||"{}"}return n(t)}function l(t){var e=[];return function(n,i){if("object"!=typeof i||null===i)return i;var o=e.indexOf(this)+1;return e.length=o,e.length>t?"[Object]":e.indexOf(i)>=0?"[Circular]":(e.push(i),i)}}function r(t,e){return JSON.stringify(t,l(e))}var a="vg-tooltip-element",s={offsetX:10,offsetY:10,id:a,styleId:"vega-tooltip-style",theme:"light",disableDefaultStyle:!1,sanitize:d,maxDepth:2,formatTooltip:o};function d(t){return String(t).replace(/&/g,"&amp;").replace(/</g,"&lt;")}function p(t){if(!/^[A-Za-z]+[-:.\w]*$/.test(t))throw new Error("Invalid HTML ID");return"#vg-tooltip-element {\n visibility: hidden;\n padding: 8px;\n position: fixed;\n z-index: 1000;\n font-family: sans-serif;\n font-size: 11px;\n border-radius: 3px;\n box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);\n /* The default theme is the light theme. */\n background-color: rgba(255, 255, 255, 0.95);\n border: 1px solid #d9d9d9;\n color: black;\n}\n#vg-tooltip-element.visible {\n visibility: visible;\n}\n#vg-tooltip-element h2 {\n margin-top: 0;\n margin-bottom: 10px;\n font-size: 13px;\n}\n#vg-tooltip-element img {\n max-width: 200px;\n max-height: 200px;\n}\n#vg-tooltip-element table {\n border-spacing: 0;\n}\n#vg-tooltip-element table tr {\n border: none;\n}\n#vg-tooltip-element table tr td {\n overflow: hidden;\n text-overflow: ellipsis;\n padding-top: 2px;\n padding-bottom: 2px;\n}\n#vg-tooltip-element table tr td.key {\n color: #808080;\n max-width: 150px;\n text-align: right;\n padding-right: 4px;\n}\n#vg-tooltip-element table tr td.value {\n display: block;\n max-width: 300px;\n max-height: 7em;\n text-align: left;\n}\n#vg-tooltip-element.dark-theme {\n background-color: rgba(32, 32, 32, 0.9);\n border: 1px solid #f5f5f5;\n color: white;\n}\n#vg-tooltip-element.dark-theme td.key {\n color: #bfbfbf;\n}\n".toString().replace(a,t)}function c(t,e,n,i){var o=t.clientX+n;o+e.width>window.innerWidth&&(o=+t.clientX-n-e.width);var l=t.clientY+i;return l+e.height>window.innerHeight&&(l=+t.clientY-i-e.height),{x:o,y:l}}var h=function(){function t(t){this.options=i(i({},s),t);var e=this.options.id;if(this.el=null,this.call=this.tooltipHandler.bind(this),!this.options.disableDefaultStyle&&!document.getElementById(this.options.styleId)){var n=document.createElement("style");n.setAttribute("id",this.options.styleId),n.innerHTML=p(e);var o=document.head;o.childNodes.length>0?o.insertBefore(n,o.childNodes[0]):o.appendChild(n)}}return t.prototype.tooltipHandler=function(t,e,n,i){var o;(this.el=document.getElementById(this.options.id),this.el)||(this.el=document.createElement("div"),this.el.setAttribute("id",this.options.id),this.el.classList.add("vg-tooltip"),(null!==(o=document.fullscreenElement)&&void 0!==o?o:document.body).appendChild(this.el));if(null!=i&&""!==i){this.el.innerHTML=this.options.formatTooltip(i,this.options.sanitize,this.options.maxDepth),this.el.classList.add("visible","".concat(this.options.theme,"-theme"));var l=c(e,this.el.getBoundingClientRect(),this.options.offsetX,this.options.offsetY),r=l.x,a=l.y;this.el.style.top="".concat(a,"px"),this.el.style.left="".concat(r,"px")}else this.el.classList.remove("visible","".concat(this.options.theme,"-theme"))},t}(),f=n;t.DEFAULT_OPTIONS=s,t.Handler=h,t.calculatePosition=c,t.createDefaultStyle=p,t.default=function(t,e){var n=new h(e);return t.tooltip(n.call).run(),n},t.escapeHTML=d,t.formatValue=o,t.replacer=l,t.stringify=r,t.version=f,Object.defineProperty(t,"__esModule",{value:!0})}));
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("vega-util")):"function"==typeof define&&define.amd?define(["exports","vega-util"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).vegaTooltip={},t.vega)}(this,(function(t,e){"use strict";var n="0.30.1",i=function(){return i=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},i.apply(this,arguments)};function o(t,n,i){if(e.isArray(t))return"[".concat(t.map((function(t){return n(e.isString(t)?t:r(t,i))})).join(", "),"]");if(e.isObject(t)){var o="",l=t,a=l.title,s=l.image,d=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(t);o<i.length;o++)e.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(t,i[o])&&(n[i[o]]=t[i[o]])}return n}(l,["title","image"]);a&&(o+="<h2>".concat(n(a),"</h2>")),s&&(o+='<img src="'.concat(n(s),'">'));var p=Object.keys(d);if(p.length>0){o+="<table>";for(var c=0,h=p;c<h.length;c++){var f=h[c],u=d[f];void 0!==u&&(e.isObject(u)&&(u=r(u,i)),o+='<tr><td class="key">'.concat(n(f),':</td><td class="value">').concat(n(u),"</td></tr>"))}o+="</table>"}return o||"{}"}return n(t)}function l(t){var e=[];return function(n,i){if("object"!=typeof i||null===i)return i;var o=e.indexOf(this)+1;return e.length=o,e.length>t?"[Object]":e.indexOf(i)>=0?"[Circular]":(e.push(i),i)}}function r(t,e){return JSON.stringify(t,l(e))}var a="#vg-tooltip-element {\n visibility: hidden;\n padding: 8px;\n position: fixed;\n z-index: 1000;\n font-family: sans-serif;\n font-size: 11px;\n border-radius: 3px;\n box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);\n /* The default theme is the light theme. */\n background-color: rgba(255, 255, 255, 0.95);\n border: 1px solid #d9d9d9;\n color: black;\n}\n#vg-tooltip-element.visible {\n visibility: visible;\n}\n#vg-tooltip-element h2 {\n margin-top: 0;\n margin-bottom: 10px;\n font-size: 13px;\n}\n#vg-tooltip-element img {\n max-width: 200px;\n max-height: 200px;\n}\n#vg-tooltip-element table {\n border-spacing: 0;\n}\n#vg-tooltip-element table tr {\n border: none;\n}\n#vg-tooltip-element table tr td {\n overflow: hidden;\n text-overflow: ellipsis;\n padding-top: 2px;\n padding-bottom: 2px;\n}\n#vg-tooltip-element table tr td.key {\n color: #808080;\n max-width: 150px;\n text-align: right;\n padding-right: 4px;\n}\n#vg-tooltip-element table tr td.value {\n display: block;\n max-width: 300px;\n max-height: 7em;\n text-align: left;\n}\n#vg-tooltip-element.dark-theme {\n background-color: rgba(32, 32, 32, 0.9);\n border: 1px solid #f5f5f5;\n color: white;\n}\n#vg-tooltip-element.dark-theme td.key {\n color: #bfbfbf;\n}\n",s="vg-tooltip-element",d={offsetX:10,offsetY:10,id:s,styleId:"vega-tooltip-style",theme:"light",disableDefaultStyle:!1,sanitize:p,maxDepth:2,formatTooltip:o};function p(t){return String(t).replace(/&/g,"&amp;").replace(/</g,"&lt;")}function c(t){if(!/^[A-Za-z]+[-:.\w]*$/.test(t))throw new Error("Invalid HTML ID");return a.toString().replace(s,t)}function h(t,e,n,i){var o=t.clientX+n;o+e.width>window.innerWidth&&(o=+t.clientX-n-e.width);var l=t.clientY+i;return l+e.height>window.innerHeight&&(l=+t.clientY-i-e.height),{x:o,y:l}}var f=function(){function t(t){this.options=i(i({},d),t);var e=this.options.id;if(this.el=null,this.call=this.tooltipHandler.bind(this),!this.options.disableDefaultStyle&&!document.getElementById(this.options.styleId)){var n=document.createElement("style");n.setAttribute("id",this.options.styleId),n.innerHTML=c(e);var o=document.head;o.childNodes.length>0?o.insertBefore(n,o.childNodes[0]):o.appendChild(n)}}return t.prototype.tooltipHandler=function(t,e,n,i){var o;(this.el=document.getElementById(this.options.id),this.el)||(this.el=document.createElement("div"),this.el.setAttribute("id",this.options.id),this.el.classList.add("vg-tooltip"),(null!==(o=document.fullscreenElement)&&void 0!==o?o:document.body).appendChild(this.el));if(null!=i&&""!==i){this.el.innerHTML=this.options.formatTooltip(i,this.options.sanitize,this.options.maxDepth),this.el.classList.add("visible","".concat(this.options.theme,"-theme"));var l=h(e,this.el.getBoundingClientRect(),this.options.offsetX,this.options.offsetY),r=l.x,a=l.y;this.el.style.top="".concat(a,"px"),this.el.style.left="".concat(r,"px")}else this.el.classList.remove("visible","".concat(this.options.theme,"-theme"))},t}(),u=n;t.DEFAULT_OPTIONS=d,t.Handler=f,t.calculatePosition=h,t.createDefaultStyle=c,t.default=function(t,e){var n=new f(e);return t.tooltip(n.call).run(),n},t.escapeHTML=p,t.formatValue=o,t.replacer=l,t.stringify=r,t.version=u,Object.defineProperty(t,"__esModule",{value:!0})}));
//# sourceMappingURL=vega-tooltip.min.js.map
import { isArray, isString, isObject } from 'vega-util';
var name = "vega-tooltip";
var version$1 = "0.30.0";
var version$1 = "0.30.1";
var description = "A tooltip plugin for Vega-Lite and Vega visualizations.";

@@ -62,22 +62,21 @@ var keywords = [

lint: "yarn eslintbase && yarn prettierbase --check",
release: "yarn run prebuild && yarn build && auto shipit"
release: "release-it"
};
var devDependencies = {
"@auto-it/conventional-commits": "^10.37.6",
"@auto-it/first-time-contributor": "^10.37.6",
"@rollup/plugin-json": "^5.0.1",
"@release-it/conventional-changelog": "^5.1.1",
"@rollup/plugin-json": "^6.0.0",
"@rollup/plugin-node-resolve": "^15.0.1",
auto: "^10.37.6",
"browser-sync": "^2.27.10",
concurrently: "^7.5.0",
"gh-pages": "^4.0.0",
"jest-environment-jsdom": "^29.3.1",
"release-it": "^15.6.0",
"browser-sync": "^2.27.11",
concurrently: "^7.6.0",
"gh-pages": "^5.0.0",
"jest-environment-jsdom": "^29.4.2",
path: "^0.12.7",
rollup: "^3.3.0",
rollup: "^3.15.0",
"rollup-plugin-bundle-size": "^1.0.3",
"rollup-plugin-terser": "^7.0.2",
"rollup-plugin-ts": "^3.0.2",
sass: "^1.56.1",
typescript: "~4.9.3",
"vega-datasets": "^2.5.3",
"@rollup/plugin-terser": "^0.4.0",
"rollup-plugin-ts": "^3.2.0",
sass: "^1.58.0",
typescript: "~4.9.5",
"vega-datasets": "^2.5.4",
"vega-lite-dev-config": "^0.21.0",

@@ -111,3 +110,3 @@ "vega-typings": "^0.22.3"

/*! *****************************************************************************
/******************************************************************************
Copyright (c) Microsoft Corporation.

@@ -114,0 +113,0 @@

{
"name": "vega-tooltip",
"version": "0.30.0",
"version": "0.30.1",
"description": "A tooltip plugin for Vega-Lite and Vega visualizations.",

@@ -61,22 +61,21 @@ "keywords": [

"lint": "yarn eslintbase && yarn prettierbase --check",
"release": "yarn run prebuild && yarn build && auto shipit"
"release": "release-it"
},
"devDependencies": {
"@auto-it/conventional-commits": "^10.37.6",
"@auto-it/first-time-contributor": "^10.37.6",
"@rollup/plugin-json": "^5.0.1",
"@release-it/conventional-changelog": "^5.1.1",
"@rollup/plugin-json": "^6.0.0",
"@rollup/plugin-node-resolve": "^15.0.1",
"auto": "^10.37.6",
"browser-sync": "^2.27.10",
"concurrently": "^7.5.0",
"gh-pages": "^4.0.0",
"jest-environment-jsdom": "^29.3.1",
"release-it": "^15.6.0",
"browser-sync": "^2.27.11",
"concurrently": "^7.6.0",
"gh-pages": "^5.0.0",
"jest-environment-jsdom": "^29.4.2",
"path": "^0.12.7",
"rollup": "^3.3.0",
"rollup": "^3.15.0",
"rollup-plugin-bundle-size": "^1.0.3",
"rollup-plugin-terser": "^7.0.2",
"rollup-plugin-ts": "^3.0.2",
"sass": "^1.56.1",
"typescript": "~4.9.3",
"vega-datasets": "^2.5.3",
"@rollup/plugin-terser": "^0.4.0",
"rollup-plugin-ts": "^3.2.0",
"sass": "^1.58.0",
"typescript": "~4.9.5",
"vega-datasets": "^2.5.4",
"vega-lite-dev-config": "^0.21.0",

@@ -83,0 +82,0 @@ "vega-typings": "^0.22.3"

@@ -80,7 +80,2 @@ # Tooltip for Vega & Vega-Lite

Publishing is handled by a 2-branch [pre-release process](https://intuit.github.io/auto/docs/generated/shipit#next-branch-default), configured in `publish.yml`. All changes should be based off the default `next` branch, and are published automatically.
- PRs made into the default branch are auto-deployed to the `next` pre-release tag on NPM. The result can be installed with `npm install vega-tooltip/@next`.
- When merging into `next`, please use the `squash and merge` strategy.
- To release a new stable version, open a PR from `next` into `stable` using this [compare link](https://github.com/vega/vega-tooltip/compare/stable...next).
- When merging from `next` into `stable`, please use the `create a merge commit` strategy.
To make a release, run `npm run release`.

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc