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

markmap-toolbar

Package Overview
Dependencies
Maintainers
1
Versions
86
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

markmap-toolbar - npm Package Compare versions

Comparing version 0.14.0 to 0.14.2-alpha.0

4

dist/index.esm.js

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

/*! markmap-toolbar v0.14.0 | MIT License */
/*! markmap-toolbar v0.14.2-alpha.0+518591b | MIT License */
import { mountDom } from '@gera2ld/jsx-dom';

@@ -23,3 +23,3 @@ import { jsx, jsxs } from '@gera2ld/jsx-dom/jsx-runtime';

/*! markmap-common v0.14.0 | MIT License */
/*! markmap-common v0.14.2-alpha.0+518591b | MIT License */

@@ -26,0 +26,0 @@ Math.random().toString(36).slice(2, 8);

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

/*! markmap-toolbar v0.14.0 | MIT License */
/*! markmap-toolbar v0.14.2-alpha.0+518591b | MIT License */
(function (global, factory) {

@@ -258,3 +258,3 @@ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :

/*! markmap-common v0.14.0 | MIT License */
/*! markmap-common v0.14.2-alpha.0+518591b | MIT License */

@@ -261,0 +261,0 @@ Math.random().toString(36).slice(2, 8);

@@ -1,4 +0,4 @@

/*! markmap-toolbar v0.14.0 | MIT License */
/*! markmap-toolbar v0.14.2-alpha.0+518591b | MIT License */
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).markmap=t.markmap||{})}(this,(function(t){"use strict";function e(){return e=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var A in r)Object.prototype.hasOwnProperty.call(r,A)&&(t[A]=r[A])}return t},e.apply(this,arguments)}
/*! @gera2ld/jsx-dom v2.1.1 | ISC License */var r="http://www.w3.org/1999/xlink",A={show:r,actuate:r,href:r};function n(t,e){var r;if("string"==typeof t)r=1;else{if("function"!=typeof t)throw new Error("Invalid VNode type");r=2}return{vtype:r,type:t,props:e}}var i=n;function o(t){return t.children}var a={isSvg:!1};function s(t,e){if(1===e.type)null!=e.node&&t.append(e.node);else{if(4!==e.type)throw new Error("Unkown ref type "+JSON.stringify(e));e.children.forEach((function(e){s(t,e)}))}}var l={className:"class",labelFor:"for"};function h(t,e,r,n){if(e=l[e]||e,!0===r)t.setAttribute(e,"");else if(!1===r)t.removeAttribute(e);else{var i=n?A[e]:void 0;void 0!==i?t.setAttributeNS(i,e,r):t.setAttribute(e,r)}}function c(t,e){if(void 0===e&&(e=a),null==t||"boolean"==typeof t)return{type:1,node:null};if(t instanceof Node)return{type:1,node:t};if(2===(null==(l=t)?void 0:l.vtype)){var r=t,A=r.type,n=r.props;if(A===o){var i=document.createDocumentFragment();if(n.children)s(i,c(n.children,e));return{type:1,node:i}}return c(A(n),e)}var l;if(function(t){return"string"==typeof t||"number"==typeof t}(t))return{type:1,node:document.createTextNode(""+t)};if(function(t){return 1===(null==t?void 0:t.vtype)}(t)){var d,u,v=t,f=v.type,g=v.props;if(e.isSvg||"svg"!==f||(e=Object.assign({},e,{isSvg:!0})),function(t,e,r){for(var A in e)"key"!==A&&"children"!==A&&"ref"!==A&&("dangerouslySetInnerHTML"===A?t.innerHTML=e[A].__html:"innerHTML"===A||"textContent"===A||"innerText"===A?t[A]=e[A]:A.startsWith("on")?t[A.toLowerCase()]=e[A]:h(t,A,e[A],r.isSvg))}(d=e.isSvg?document.createElementNS("http://www.w3.org/2000/svg",f):document.createElement(f),g,e),g.children){var p=e;e.isSvg&&"foreignObject"===f&&(p=Object.assign({},p,{isSvg:!1})),u=c(g.children,p)}null!=u&&s(d,u);var m=g.ref;return"function"==typeof m&&m(d),{type:1,node:d}}if(Array.isArray(t))return{type:4,children:t.map((function(t){return c(t,e)}))};throw new Error("mount: Invalid Vnode!")}function d(t){for(var e=[],r=0;r<t.length;r+=1){var A=t[r];Array.isArray(A)?e=e.concat(d(A)):null!=A&&e.push(A)}return e}function u(t){return 1===t.type?t.node:t.children.map(u)}function v(t){return Array.isArray(t)?d(t.map(v)):u(c(t))}
/*! markmap-common v0.14.0 | MIT License */Math.random().toString(36).slice(2,8);const f="mm-toolbar-item";function g({title:t,content:e,onClick:r}){return n("div",{className:f,title:t,onClick:r,children:e})}let p;class m{static create(t){const e=new m;return e.attach(t),e.render()}static icon(t,r={}){return r=e({stroke:"none",fill:"currentColor","fill-rule":"evenodd"},r),n("svg",{width:"20",height:"20",viewBox:"0 0 20 20",children:n("path",e({},r,{d:t}))})}constructor(){this.showBrand=!0,this.registry={},this.markmap=null,this.register({id:"zoomIn",title:"Zoom in",content:m.icon("M9 5v4h-4v2h4v4h2v-4h4v-2h-4v-4z"),onClick:this.getHandler((t=>t.rescale(1.25)))}),this.register({id:"zoomOut",title:"Zoom out",content:m.icon("M5 9h10v2h-10z"),onClick:this.getHandler((t=>t.rescale(.8)))}),this.register({id:"fit",title:"Fit window size",content:m.icon("M4 7h2v-2h2v4h-4zM4 13h2v2h2v-4h-4zM16 7h-2v-2h-2v4h4zM16 13h-2v2h-2v-4h4z"),onClick:this.getHandler((t=>t.fit()))}),this.register({id:"recurse",title:"Recursively toggle the next node",content:m.icon("M16 4h-12v12h12v-8h-8v4h2v-2h4v4h-8v-8h10z"),onClick:t=>{const e=t.target.closest(".mm-toolbar-item"),r=()=>e.classList.toggle("active"),A=r();this.handleRecurse(A,r)}}),this.setItems(m.defaultItems)}setBrand(t){this.showBrand=t}register(t){this.registry[t.id]=t}getHandler(t){var e;return e=t,t=async(...t)=>{if(!p){p=e(...t);try{await p}finally{p=null}}},()=>{this.markmap&&t(this.markmap)}}setItems(t){this.items=[...t]}attach(t){this.markmap=t}handleRecurse(t,r){const A=this.markmap;var n,i;if(!t)return void(null==(n=A.handleClick)||null==(i=n.__reset)||i.call(n));const o=A.handleClick;if(!o)return;const a=(t,n)=>{var i;const o=null!=(i=n.data.payload)&&i.fold?0:1;!function(t,e,r="children"){const A=(t,n)=>e(t,(()=>{var e;null==(e=t[r])||e.forEach((e=>{A(e,t)}))}),n);A(t)}(n.data,((t,r)=>{t.payload=e({},t.payload,{fold:o}),r()})),A.renderData(n.data),r(),a.__reset()};a.__reset=()=>{A.handleClick=o},A.handleClick=a}render(){const t=this.items.map((t=>{if("string"==typeof t){const e=this.registry[t];return e||console.warn(`[markmap-toolbar] ${t} not found`),e}return t})).filter(Boolean);return v(i("div",{className:"mm-toolbar",children:[this.showBrand&&i("a",{className:"mm-toolbar-brand",href:"https://markmap.js.org/",children:[n("img",{alt:"markmap",src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAACoFBMVEUAAAAAAAD//wAAAACAgAD//wAAAABVVQCqqgBAQACAQACAgABmZgBtbQAAAABgQABgYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAaFQAAAAAAAAAAAAAAAAAHAAARBQIdGAIYEwI/OgJYUQUfHQI+OgJDPgJJRARBPQRJQgRRSwRRTQRIQQRUTgRUUARZUgRSTQRPSQRjWgZORQRfWQZsZAhTTQRNRwRWUAZkXAZOSARUTgZPRwRRSQRoYwZWUQZWTgRbUwZmXQZoXghmXwdqYwdsYwdfVwVmXQdqYgdiWgVpYAl3bgl6cgl4cAqLggw8OAOWjA2Uig1OSAR2bQihlg55cAh5cAh6cQmMgwyOhAyUjA2QhQ2Uiw2Viw2soBCflA+voxGwpRGhlg+hlg+snxGroBGjmBCpnBC0pxKyphKxpRG2qhK0qBK5rBK5rBP/7h3/8B7/8R3/8h3/8R7/8h786x397B3+7R3EtxT66Rz66hz76hz86xz96xz97Bz+7Rz45xz56Bz76hz97Bz97B3MvRX15Rv25Rv45xz66Rz76hz97B3+7R3IuxX05Bv15Bv25Rz56Bz66Ry/sxPAsxPCtR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MZ2nVHbk+fMX/+jMmTp3Sf9MLiULG45q237txaPG3yxPYrYQzYMo60RWbD3E27Ll68Uq+AK+uJqOlZBiSEKGLNnMA0iDfzwrI/NKgBOivk9piPdtUAAAAASUVORK5CYII="}),n("span",{children:"markmap"})]}),t.map(g)]}))}}m.defaultItems=["zoomIn","zoomOut","fit","recurse"],t.Toolbar=m}));
/*! markmap-common v0.14.2-alpha.0+518591b | MIT License */Math.random().toString(36).slice(2,8);const f="mm-toolbar-item";function g({title:t,content:e,onClick:r}){return n("div",{className:f,title:t,onClick:r,children:e})}let p;class m{static create(t){const e=new m;return e.attach(t),e.render()}static icon(t,r={}){return r=e({stroke:"none",fill:"currentColor","fill-rule":"evenodd"},r),n("svg",{width:"20",height:"20",viewBox:"0 0 20 20",children:n("path",e({},r,{d:t}))})}constructor(){this.showBrand=!0,this.registry={},this.markmap=null,this.register({id:"zoomIn",title:"Zoom in",content:m.icon("M9 5v4h-4v2h4v4h2v-4h4v-2h-4v-4z"),onClick:this.getHandler((t=>t.rescale(1.25)))}),this.register({id:"zoomOut",title:"Zoom out",content:m.icon("M5 9h10v2h-10z"),onClick:this.getHandler((t=>t.rescale(.8)))}),this.register({id:"fit",title:"Fit window size",content:m.icon("M4 7h2v-2h2v4h-4zM4 13h2v2h2v-4h-4zM16 7h-2v-2h-2v4h4zM16 13h-2v2h-2v-4h4z"),onClick:this.getHandler((t=>t.fit()))}),this.register({id:"recurse",title:"Recursively toggle the next node",content:m.icon("M16 4h-12v12h12v-8h-8v4h2v-2h4v4h-8v-8h10z"),onClick:t=>{const e=t.target.closest(".mm-toolbar-item"),r=()=>e.classList.toggle("active"),A=r();this.handleRecurse(A,r)}}),this.setItems(m.defaultItems)}setBrand(t){this.showBrand=t}register(t){this.registry[t.id]=t}getHandler(t){var e;return e=t,t=async(...t)=>{if(!p){p=e(...t);try{await p}finally{p=null}}},()=>{this.markmap&&t(this.markmap)}}setItems(t){this.items=[...t]}attach(t){this.markmap=t}handleRecurse(t,r){const A=this.markmap;var n,i;if(!t)return void(null==(n=A.handleClick)||null==(i=n.__reset)||i.call(n));const o=A.handleClick;if(!o)return;const a=(t,n)=>{var i;const o=null!=(i=n.data.payload)&&i.fold?0:1;!function(t,e,r="children"){const A=(t,n)=>e(t,(()=>{var e;null==(e=t[r])||e.forEach((e=>{A(e,t)}))}),n);A(t)}(n.data,((t,r)=>{t.payload=e({},t.payload,{fold:o}),r()})),A.renderData(n.data),r(),a.__reset()};a.__reset=()=>{A.handleClick=o},A.handleClick=a}render(){const t=this.items.map((t=>{if("string"==typeof t){const e=this.registry[t];return e||console.warn(`[markmap-toolbar] ${t} not found`),e}return t})).filter(Boolean);return v(i("div",{className:"mm-toolbar",children:[this.showBrand&&i("a",{className:"mm-toolbar-brand",href:"https://markmap.js.org/",children:[n("img",{alt:"markmap",src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAACoFBMVEUAAAAAAAD//wAAAACAgAD//wAAAABVVQCqqgBAQACAQACAgABmZgBtbQAAAABgQABgYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAaFQAAAAAAAAAAAAAAAAAHAAARBQIdGAIYEwI/OgJYUQUfHQI+OgJDPgJJRARBPQRJQgRRSwRRTQRIQQRUTgRUUARZUgRSTQRPSQRjWgZORQRfWQZsZAhTTQRNRwRWUAZkXAZOSARUTgZPRwRRSQRoYwZWUQZWTgRbUwZmXQZoXghmXwdqYwdsYwdfVwVmXQdqYgdiWgVpYAl3bgl6cgl4cAqLggw8OAOWjA2Uig1OSAR2bQihlg55cAh5cAh6cQmMgwyOhAyUjA2QhQ2Uiw2Viw2soBCflA+voxGwpRGhlg+hlg+snxGroBGjmBCpnBC0pxKyphKxpRG2qhK0qBK5rBK5rBP/7h3/8B7/8R3/8h3/8R7/8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k9G8CfQoN0pAtSoxCMACihk9qGtBQZ2LHtRIkRUMiqwd2TJADiswsrjQlAGju/o+MLrPNkWo8mFN1ewMWmvBCebQ0rKMJG87QzF0FRwMRuvugpLcrXu3rp7Zs61UCtMZ2nVHbk+fMX/+jMmTp3Sf9MLiULG45q237txaPG3yxPYrYQzYMo60RWbD3E27Ll68Uq+AK+uJqOlZBiSEKGLNnMA0iDfzwrI/NKgBOivk9piPdtUAAAAASUVORK5CYII="}),n("span",{children:"markmap"})]}),t.map(g)]}))}}m.defaultItems=["zoomIn","zoomOut","fit","recurse"],t.Toolbar=m}));
{
"name": "markmap-toolbar",
"version": "0.14.0",
"version": "0.14.2-alpha.0+518591b",
"description": "Extensible toolbar for markmap",

@@ -27,3 +27,3 @@ "author": "Gerald <gera2ld@live.com>",

"devDependencies": {
"markmap-view": "^0.14.0"
"markmap-view": "^0.14.2-alpha.0+518591b"
},

@@ -34,3 +34,3 @@ "dependencies": {

},
"gitHead": "2d6a50992256a2d2e4d945c2c075ddc42d6ccb0d"
"gitHead": "518591b51ec505addc238f00be97a280af7341f3"
}
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