├── .gitignore ├── README.md ├── grid.min.js ├── imgs ├── codeblock.png ├── full-results.png └── search-sort-results.png ├── js-yaml.js ├── main.ts ├── manifest.json ├── package-lock.json ├── package.json ├── rollup.config.js ├── styles.css ├── tsconfig.json └── versions.json /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | # Logs 3 | logs 4 | *.log 5 | npm-debug.log* 6 | yarn-debug.log* 7 | yarn-error.log* 8 | lerna-debug.log* 9 | 10 | # Diagnostic reports (https://nodejs.org/api/report.html) 11 | report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json 12 | 13 | # Runtime data 14 | pids 15 | *.pid 16 | *.seed 17 | *.pid.lock 18 | 19 | # Directory for instrumented libs generated by jscoverage/JSCover 20 | lib-cov 21 | 22 | # Coverage directory used by tools like istanbul 23 | coverage 24 | *.lcov 25 | 26 | # nyc test coverage 27 | .nyc_output 28 | 29 | # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) 30 | .grunt 31 | 32 | # Bower dependency directory (https://bower.io/) 33 | bower_components 34 | 35 | # node-waf configuration 36 | .lock-wscript 37 | 38 | # Compiled binary addons (https://nodejs.org/api/addons.html) 39 | build/Release 40 | 41 | # Dependency directories 42 | node_modules/ 43 | jspm_packages/ 44 | 45 | # Snowpack dependency directory (https://snowpack.dev/) 46 | web_modules/ 47 | 48 | # TypeScript cache 49 | *.tsbuildinfo 50 | 51 | # Optional npm cache directory 52 | .npm 53 | 54 | # Optional eslint cache 55 | .eslintcache 56 | 57 | # Microbundle cache 58 | .rpt2_cache/ 59 | .rts2_cache_cjs/ 60 | .rts2_cache_es/ 61 | .rts2_cache_umd/ 62 | 63 | # Optional REPL history 64 | .node_repl_history 65 | 66 | # Output of 'npm pack' 67 | *.tgz 68 | 69 | # Yarn Integrity file 70 | .yarn-integrity 71 | 72 | # dotenv environment variables file 73 | .env 74 | .env.test 75 | 76 | # parcel-bundler cache (https://parceljs.org/) 77 | .cache 78 | .parcel-cache 79 | 80 | # Next.js build output 81 | .next 82 | out 83 | 84 | # Nuxt.js build / generate output 85 | .nuxt 86 | dist 87 | 88 | # Gatsby files 89 | .cache/ 90 | # Comment in the public line in if your project uses Gatsby and not Next.js 91 | # https://nextjs.org/blog/next-9-1#public-directory-support 92 | # public 93 | 94 | # vuepress build output 95 | .vuepress/dist 96 | 97 | # Serverless directories 98 | .serverless/ 99 | 100 | # FuseBox cache 101 | .fusebox/ 102 | 103 | # DynamoDB Local files 104 | .dynamodb/ 105 | 106 | # TernJS port file 107 | .tern-port 108 | 109 | # Stores VSCode versions used for testing VSCode extensions 110 | .vscode-test 111 | 112 | # yarn v2 113 | .yarn/cache 114 | .yarn/unplugged 115 | .yarn/build-state.yml 116 | .yarn/install-state.gz 117 | .pnp.* 118 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ARCHIVED 2 | This plugin was a temporary solution to a problem that has now been better solved by [Obsidian Dataview](https://github.com/blacksmithgu/obsidian-dataview). In the future, I may fork Obsidian Dataview to match the rendering featureset that I want while keeping its far superior query handlers. This plugin, however, will receive no further updates. 3 | 4 | # obsidian-query2table 5 | Represent files returned by a query as a table of their YAML frontmatter 6 | 7 | ## Disclaimer 8 | During usage, this plugin *will* overwrite your search pane - this is necessary to run the query. You also will not be able to run two query blocks in the same file. 9 | 10 | Also, I haven't really tested this plugin at all on any vaults but my own, and there are likely many places where the appropriate checks for `null` or `undefined` values are missing. Therefore, you may experience significant errors early on. When this happens, please open DevTools (`ctrl/cmd + shift + i`), save the console error output, and report it as an issue through this repository's `Issues` tab. This plugin *shouldn't* delete your files or anything, but it may just occassionally not work as expected. 11 | 12 | ## Table generation from query 13 | This plugin allows you to output the results of a query as a searchable, sortable table of the frontmatter attributes from relevant notes. 14 | ![sample codeblock](https://github.com/avirut/obsidian-query2table/blob/master/imgs/codeblock.png?raw=true) 15 | 16 | ## Usage 17 | Within your `query2table` codeblock, specify the attributes `query`, `fields`, and `approxNumberOfResults`. 18 | 19 | ### Query 20 | A string (enclosed in `""` or `''`) which indicates what you're searching for. This is the same format as if you were using the built in file-search (because the plugin actually does use the built in file search). 21 | 22 | ### Fields 23 | A list of the YAML frontmatter attributes, and their corresponding "type". Available types are: 24 | - `note` - The text will be the same as the frontmatter attribute, but this column will link to the actual note the row refers to. The frontmatter value for whatever attribute this refers to *must* be present (not `null` or `undefined`), or the row for that file will not be shown. 25 | - `link` - Long links are handled poorly by the table (they take up a lot of width), so use this attribute to replace them with the word `Link` that has a hyperlink to whatever link was specified in the frontmatter attribute. 26 | - `text-as-link` - This one uses the original text of the frontmatter attribute, but makes it a link as well. It's similar to `link`, but possibly better if seeing the actual link before you click it is really important to you. 27 | - `list` - Use this for frontmatter attributes that are text arrays - the value in the table will show as a bullet pointed list. 28 | 29 | If you have any good ideas for field types, feel free to open up an issue and I'll work on it when I get the chance. 30 | 31 | ### Approximate Number of Results 32 | Because of limitations within the Obsidian API, the only way to make the querying part of this plugin work is to run the query through the UI, then pull out the returned files. This means that whenever the `query2table` codeblock is rendered, you'll see the search being run in your UI as well. However, there is some delay between the search being run and the files being output. If this delay is too short, you may not get all your files into the table. Adjust `approxNumberOfResults` as necessary to ensure that you get all your files without waiting too long. 33 | 34 | ## Sample Output 35 | ### Full Results 36 | ![full results](https://github.com/avirut/obsidian-query2table/blob/master/imgs/full-results.png?raw=true) 37 | ### Search and Sort 38 | ![search and sort](https://github.com/avirut/obsidian-query2table/blob/master/imgs/search-sort-results.png?raw=true) 39 | 40 | ## Credits 41 | Much of the code/structure in this plugin came from [obsidian-charts](https://github.com/phibr0/obsidian-charts) and [obsidian-text-expand](https://github.com/mrjackphil/obsidian-text-expand). Also, thanks to Liam and Licat in the Discord #plugins channel for their frequent help! 42 | -------------------------------------------------------------------------------- /grid.min.js: -------------------------------------------------------------------------------- 1 | /*! ***************************************************************************** 2 | Copyright (c) Microsoft Corporation. 3 | 4 | Permission to use, copy, modify, and/or distribute this software for any 5 | purpose with or without fee is hereby granted. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH 8 | REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 9 | AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, 10 | INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 11 | LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 12 | OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 13 | PERFORMANCE OF THIS SOFTWARE. 14 | ***************************************************************************** */ 15 | var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};function e(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}var n=function(){return(n=Object.assign||function(t){for(var e,n=1,r=arguments.length;n0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]3)for(n=[n],i=3;i1&&I(o,e,n),e=T(n,o,o,t.__k,null,o.__e,e),"function"==typeof t.type&&(t.__d=e)))}function R(t,e,n,r,o,i,a,u,l){var p,c,h,f,d,_,y,m,v,b,S,x=e.type;if(void 0!==e.constructor)return null;null!=n.__h&&(l=n.__h,u=e.__e=n.__e,e.__h=null,i=[u]),(p=s.__b)&&p(e);try{t:if("function"==typeof x){if(m=e.props,v=(p=x.contextType)&&r[p.__c],b=p?v?v.props.value:p.__:r,n.__c?y=(c=e.__c=n.__c).__=c.__E:("prototype"in x&&x.prototype.render?e.__c=c=new x(m,b):(e.__c=c=new P(m,b),c.constructor=x,c.render=H),v&&v.sub(c),c.props=m,c.state||(c.state={}),c.context=b,c.__n=r,h=c.__d=!0,c.__h=[]),null==c.__s&&(c.__s=c.state),null!=x.getDerivedStateFromProps&&(c.__s==c.state&&(c.__s=g({},c.__s)),g(c.__s,x.getDerivedStateFromProps(m,c.__s))),f=c.props,d=c.state,h)null==x.getDerivedStateFromProps&&null!=c.componentWillMount&&c.componentWillMount(),null!=c.componentDidMount&&c.__h.push(c.componentDidMount);else{if(null==x.getDerivedStateFromProps&&m!==f&&null!=c.componentWillReceiveProps&&c.componentWillReceiveProps(m,b),!c.__e&&null!=c.shouldComponentUpdate&&!1===c.shouldComponentUpdate(m,c.__s,b)||e.__v===n.__v){c.props=m,c.state=c.__s,e.__v!==n.__v&&(c.__d=!1),c.__v=e,e.__e=n.__e,e.__k=n.__k,c.__h.length&&a.push(c),I(e,u,t);break t}null!=c.componentWillUpdate&&c.componentWillUpdate(m,c.__s,b),null!=c.componentDidUpdate&&c.__h.push((function(){c.componentDidUpdate(f,d,_)}))}c.context=b,c.props=m,c.state=c.__s,(p=s.__r)&&p(e),c.__d=!1,c.__v=e,c.__P=t,p=c.render(c.props,c.state,c.context),c.state=c.__s,null!=c.getChildContext&&(r=g(g({},r),c.getChildContext())),h||null==c.getSnapshotBeforeUpdate||(_=c.getSnapshotBeforeUpdate(f,d)),S=null!=p&&p.type==w&&null==p.key?p.props.children:p,N(t,Array.isArray(S)?S:[S],e,n,r,o,i,a,u,l),c.base=e.__e,e.__h=null,c.__h.length&&a.push(c),y&&(c.__E=c.__=null),c.__e=!1}else null==i&&e.__v===n.__v?(e.__k=n.__k,e.__e=n.__e):e.__e=U(n.__e,e,n,r,o,i,a,l);(p=s.diffed)&&p(e)}catch(t){e.__v=null,(l||null!=i)&&(e.__e=u,e.__h=!!l,i[i.indexOf(u)]=null),s.__e(t,e,n)}return e.__e}function L(t,e){s.__c&&s.__c(e,t),t.some((function(e){try{t=e.__h,e.__h=[],t.some((function(t){t.call(e)}))}catch(t){s.__e(t,e.__v)}}))}function U(t,e,n,r,o,i,s,a){var u,l,p,c,h,_=n.props,g=e.props;if(o="svg"===e.type||o,null!=i)for(u=0;u0&&(this.callbacks[r].forEach((function(t){return t.apply(void 0,e)})),!0)},t}();!function(t){t[t.Initiator=0]="Initiator",t[t.ServerFilter=1]="ServerFilter",t[t.ServerSort=2]="ServerSort",t[t.ServerLimit=3]="ServerLimit",t[t.Extractor=4]="Extractor",t[t.Transformer=5]="Transformer",t[t.Filter=6]="Filter",t[t.Sort=7]="Sort",t[t.Limit=8]="Limit"}(Z||(Z={}));var Q=function(t){function n(e){var n=t.call(this)||this;return n._props={},n.id=W(),e&&n.setProps(e),n}return e(n,t),n.prototype.process=function(){for(var t=[],e=0;e0?e[0]:null},t.prototype.add=function(t){return t.id?null!==this.get(t.id)?(lt.error("Duplicate plugin ID: "+t.id),this):(this.plugins.push(t),this):(lt.error("Plugin ID cannot be empty"),this)},t.prototype.remove=function(t){return this.plugins.splice(this.plugins.indexOf(this.get(t)),1),this},t.prototype.list=function(t){return(null!=t||null!=t?this.plugins.filter((function(e){return e.position===t})):this.plugins).sort((function(t,e){return t.order-e.order}))},t}(),ht=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return e(r,t),r.prototype.render=function(){var t=this;if(this.props.pluginId){var e=this.config.plugin.get(this.props.pluginId);return e?m(w,{},m(e.component,n(n({plugin:e},e.props),this.props.props))):null}return void 0!==this.props.position?m(w,{},this.config.plugin.list(this.props.position).map((function(e){return m(e.component,n(n({plugin:e},e.props),t.props.props))}))):null},r}(z),ft=function(t){function n(e,n){var r=t.call(this,e,n)||this;r.actions=new at(r.config.dispatcher),r.store=new it(r.config.dispatcher);var o=e.enabled,i=e.keyword;if(o){i&&r.actions.search(i),r.storeUpdatedFn=r.storeUpdated.bind(r),r.store.on("updated",r.storeUpdatedFn);var s=void 0;s=e.server?new ut({keyword:e.keyword,url:e.server.url,body:e.server.body}):new tt({keyword:e.keyword,selector:e.selector}),r.searchProcessor=s,r.config.pipeline.register(s)}return r}return e(n,t),n.prototype.componentWillUnmount=function(){this.config.pipeline.unregister(this.searchProcessor),this.store.off("updated",this.storeUpdatedFn)},n.prototype.storeUpdated=function(t){this.searchProcessor.setProps({keyword:t.keyword})},n.prototype.onChange=function(t){var e=t.target.value;this.actions.search(e)},n.prototype.render=function(){if(!this.props.enabled)return null;var t,e,n,r=this.onChange.bind(this);return this.searchProcessor instanceof ut&&(t=r,e=this.props.debounceTimeout,r=function(){for(var r=[],o=0;o=this.pages||t<0||t===this.state.page)return null;this.setState({page:t}),this.processor.setProps({page:t})},n.prototype.setTotal=function(t){this.setState({total:t})},n.prototype.renderPages=function(){var t=this;if(this.props.buttonsCount<=0)return null;var e=Math.min(this.pages,this.props.buttonsCount),n=Math.min(this.state.page,Math.floor(e/2));return this.state.page+Math.floor(e/2)>=this.pages&&(n=e-(this.pages-this.state.page)),m(w,null,this.pages>e&&this.state.page-n>0&&m(w,null,m("button",{tabIndex:0,role:"button",onClick:this.setPage.bind(this,0),title:this._("pagination.firstPage"),"aria-label":this._("pagination.firstPage"),className:this.config.className.paginationButton},this._("1")),m("button",{tabIndex:-1,className:nt(et("spread"),this.config.className.paginationButton)},"...")),Array.from(Array(e).keys()).map((function(e){return t.state.page+(e-n)})).map((function(e){return m("button",{tabIndex:0,role:"button",onClick:t.setPage.bind(t,e),className:nt(t.state.page===e?nt(et("currentPage"),t.config.className.paginationButtonCurrent):null,t.config.className.paginationButton),title:t._("pagination.page",e+1),"aria-label":t._("pagination.page",e+1)},t._(""+(e+1)))})),this.pages>e&&this.pages>this.state.page+n+1&&m(w,null,m("button",{tabIndex:-1,className:nt(et("spread"),this.config.className.paginationButton)},"..."),m("button",{tabIndex:0,role:"button",onClick:this.setPage.bind(this,this.pages-1),title:this._("pagination.page",this.pages),"aria-label":this._("pagination.page",this.pages),className:this.config.className.paginationButton},this._(""+this.pages))))},n.prototype.renderSummary=function(){return m(w,null,this.props.summary&&this.state.total>0&&m("div",{role:"status","aria-live":"polite",className:nt(et("summary"),this.config.className.paginationSummary),title:this._("pagination.navigate",this.state.page+1,this.pages)},this._("pagination.showing")," ",m("b",null,this._(""+(this.state.page*this.state.limit+1)))," ",this._("pagination.to")," ",m("b",null,this._(""+Math.min((this.state.page+1)*this.state.limit,this.state.total)))," ",this._("pagination.of")," ",m("b",null,this._(""+this.state.total))," ",this._("pagination.results")))},n.prototype.render=function(){return this.props.enabled?m("div",{className:nt(et("pagination"),this.config.className.pagination)},this.renderSummary(),m("div",{className:et("pages")},this.props.prevButton&&m("button",{tabIndex:0,role:"button",disabled:0===this.state.page,onClick:this.setPage.bind(this,this.state.page-1),title:this._("pagination.previous"),"aria-label":this._("pagination.previous"),className:nt(this.config.className.paginationButton,this.config.className.paginationButtonPrev)},this._("pagination.previous")),this.renderPages(),this.props.nextButton&&m("button",{tabIndex:0,role:"button",disabled:this.pages===this.state.page+1||0===this.pages,onClick:this.setPage.bind(this,this.state.page+1),title:this._("pagination.next"),"aria-label":this._("pagination.next"),className:nt(this.config.className.paginationButton,this.config.className.paginationButtonNext)},this._("pagination.next")))):null},n.defaultProps={summary:!0,nextButton:!0,prevButton:!0,buttonsCount:3,limit:10,resetPageOnUpdate:!0},n}(pt);function yt(t,e){return"string"==typeof t?t.indexOf("%")>-1?e/100*parseInt(t,10):parseInt(t,10):t}function mt(t){return t?Math.floor(t)+"px":""}function vt(t,e){if(!t)return null;var n=t.querySelector('thead th[data-column-id="'+e+'"]');return n?n.clientWidth:null}var bt=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return e(n,t),n.prototype.render=function(){if(this.props.tableRef.current){var t=this.props.tableRef.current.base.cloneNode(!0);return t.className+=" "+et("shadowTable"),t.style.position="absolute",t.style.zIndex="-2147483640",t.style.visibility="hidden",t.style.tableLayout="auto",t.style.width="auto",t.style.padding="0",t.style.margin="0",t.style.border="none",t.style.outline="none",m("div",{ref:function(e){e&&e.appendChild(t)}})}return null},n}(z);function wt(t){if(!t)return"";var e=t.split(" ");return 1===e.length&&/([a-z][A-Z])+/g.test(t)?t:e.map((function(t,e){return 0==e?t.toLowerCase():t.charAt(0).toUpperCase()+t.slice(1).toLowerCase()})).join("")}var Pt,St=function(t){function r(){var e=t.call(this)||this;return e._columns=[],e}return e(r,t),Object.defineProperty(r.prototype,"columns",{get:function(){return this._columns},set:function(t){this._columns=t},enumerable:!1,configurable:!0}),r.prototype.adjustWidth=function(t,e,n,o){if(void 0===o&&(o=!0),!t)return this;var i=t.clientWidth,s={current:null};if(e.current&&o){var a=m(bt,{tableRef:e});a.ref=s,M(a,n.current)}for(var u=0,l=r.tabularFormat(this.columns).reduce((function(t,e){return t.concat(e)}),[]);u0||(!p.width&&o?p.width=mt(vt(s.current.base,p.id)):p.width=mt(yt(p.width,i)))}return e.current&&o&&M(null,n.current),this},r.prototype.setSort=function(t,e){for(var r=0,o=e||this.columns||[];r0&&(i.sort={enabled:!1}),void 0===i.sort&&t.sort&&(i.sort={enabled:!0}),i.sort?"object"==typeof i.sort&&(i.sort=n({enabled:!0},i.sort)):i.sort={enabled:!1},i.columns&&this.setSort(t,i.columns)}},r.prototype.setFixedHeader=function(t,e){for(var n=0,r=e||this.columns||[];n=e?[4,a.process(r)]:[3,4]):[3,6];case 3:return r=o.sent(),this.cache.set(a.id,r),[3,5];case 4:r=this.cache.get(a.id),o.label=5;case 5:return i++,[3,2];case 6:return[3,8];case 7:throw u=o.sent(),lt.error(u),this.emit("error",r),u;case 8:return this.lastProcessorIndexUpdated=n.length,this.emit("afterProcess",r),[2,r]}}))}))},n.prototype.findProcessorIndexByID=function(t){return this.steps.findIndex((function(e){return e.id==t}))},n.prototype.setLastProcessorIndex=function(t){var e=this.findProcessorIndexByID(t.id);this.lastProcessorIndexUpdated>e&&(this.lastProcessorIndexUpdated=e)},n.prototype.processorPropsUpdated=function(t){this.setLastProcessorIndex(t),this.emit("propsUpdated"),this.emit("updated",t)},n.prototype.afterRegistered=function(t){this.setLastProcessorIndex(t),this.emit("afterRegister"),this.emit("updated",t)},n}(J),Ot=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return e(n,t),Object.defineProperty(n.prototype,"type",{get:function(){return Z.Extractor},enumerable:!1,configurable:!0}),n.prototype._process=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return[4,this.props.storage.get(t)];case 1:return[2,e.sent()]}}))}))},n}(Q),Dt=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return e(n,t),Object.defineProperty(n.prototype,"type",{get:function(){return Z.Transformer},enumerable:!1,configurable:!0}),n.prototype._process=function(t){var e=X.fromArray(t.data);return e.length=t.total,e},n}(Q),Et=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return e(r,t),Object.defineProperty(r.prototype,"type",{get:function(){return Z.Initiator},enumerable:!1,configurable:!0}),r.prototype._process=function(){return Object.entries(this.props.serverStorageOptions).filter((function(t){t[0];return"function"!=typeof t[1]})).reduce((function(t,e){var r,o=e[0],i=e[1];return n(n({},t),((r={})[o]=i,r))}),{})},r}(Q),It=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return e(n,t),Object.defineProperty(n.prototype,"type",{get:function(){return Z.Transformer},enumerable:!1,configurable:!0}),n.prototype.castData=function(t){if(!t||!t.length)return[];if(!this.props.header||!this.props.header.columns)return t;var e=St.leafColumns(this.props.header.columns);return t[0]instanceof Array?t.map((function(t){var n=0;return e.map((function(e,r){return void 0!==e.data?(n++,"function"==typeof e.data?e.data(t):e.data):t[r-n]}))})):"object"!=typeof t[0]||t[0]instanceof Array?[]:t.map((function(t){return e.map((function(e,n){return void 0!==e.data?"function"==typeof e.data?e.data(t):e.data:e.id?t[e.id]:(lt.error("Could not find the correct cell for column at position "+n+".\n Make sure either 'id' or 'selector' is defined for all columns."),null)}))}))},n.prototype._process=function(t){return{data:this.castData(t.data),total:t.total}},n}(Q),Rt=function(){function t(){}return t.createFromConfig=function(t){var e=new Ft;return t.storage instanceof Nt&&e.register(new Et({serverStorageOptions:t.server})),e.register(new Ot({storage:t.storage})),e.register(new It({header:t.header})),e.register(new Dt),e},t}(),Lt=function(){function t(e){Object.assign(this,n(n({},t.defaultConfig()),e)),this._userConfig={}}return t.prototype.assign=function(t){for(var e=0,n=Object.keys(t);ee?1:t1&&(l=!0,u=!0):0===s?u=!0:s>0&&!n?(u=!0,l=!0):s>0&&n&&(u=!0),l&&(o=[]),u)o.push({index:t,direction:e,compare:r});else if(c){var h=o.indexOf(a);o[h].direction=e}else if(p){var f=o.indexOf(a);o.splice(f,1)}this.setState(o)},n}(ot),Bt=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return e(n,t),n.prototype.sortColumn=function(t,e,n,r){this.dispatch("SORT_COLUMN",{index:t,direction:e,multi:n,compare:r})},n.prototype.sortToggle=function(t,e,n){this.dispatch("SORT_COLUMN_TOGGLE",{index:t,multi:e,compare:n})},n}(st),qt=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return e(r,t),Object.defineProperty(r.prototype,"type",{get:function(){return Z.ServerSort},enumerable:!1,configurable:!0}),r.prototype._process=function(t){var e={};return this.props.url&&(e.url=this.props.url(t.url,this.props.columns)),this.props.body&&(e.body=this.props.body(t.body,this.props.columns)),n(n({},t),e)},r}(Q),Gt=function(t){function r(e,n){var r=t.call(this,e,n)||this;return r.actions=new Bt(r.config.dispatcher),r.store=new Wt(r.config.dispatcher),e.enabled&&(r.sortProcessor=r.getOrCreateSortProcessor(),r.updateStateFn=r.updateState.bind(r),r.store.on("updated",r.updateStateFn),r.state={direction:0}),r}return e(r,t),r.prototype.componentWillUnmount=function(){this.config.pipeline.unregister(this.sortProcessor),this.store.off("updated",this.updateStateFn),this.updateSortProcessorFn&&this.store.off("updated",this.updateSortProcessorFn)},r.prototype.updateState=function(){var t=this,e=this.store.state.find((function(e){return e.index===t.props.index}));e?this.setState({direction:e.direction}):this.setState({direction:0})},r.prototype.updateSortProcessor=function(t){this.sortProcessor.setProps({columns:t})},r.prototype.getOrCreateSortProcessor=function(){var t=Z.Sort;this.config.sort&&"object"==typeof this.config.sort.server&&(t=Z.ServerSort);var e,r=this.config.pipeline.getStepsByType(t);return r.length>0?e=r[0]:(this.updateSortProcessorFn=this.updateSortProcessor.bind(this),this.store.on("updated",this.updateSortProcessorFn),e=t===Z.ServerSort?new qt(n({columns:this.store.state},this.config.sort.server)):new Mt({columns:this.store.state}),this.config.pipeline.register(e)),e},r.prototype.changeDirection=function(t){t.preventDefault(),t.stopPropagation(),this.actions.sortToggle(this.props.index,!0===t.shiftKey&&this.config.sort.multiColumn,this.props.compare)},r.prototype.render=function(){if(!this.props.enabled)return null;var t=this.state.direction,e="neutral";return 1===t?e="asc":-1===t&&(e="desc"),m("button",{tabIndex:-1,"aria-label":this._("sort.sort"+(1===t?"Desc":"Asc")),title:this._("sort.sort"+(1===t?"Desc":"Asc")),className:nt(et("sort"),et("sort",e),this.config.className.sort),onClick:this.changeDirection.bind(this)})},r}(z),zt=function(t){function r(e,n){var r=t.call(this,e,n)||this;return r.sortRef={current:null},r.thRef={current:null},r.state={style:{}},r}return e(r,t),r.prototype.isSortable=function(){return this.props.column.sort.enabled},r.prototype.onClick=function(t){t.stopPropagation(),this.isSortable()&&this.sortRef.current.changeDirection(t)},r.prototype.keyDown=function(t){this.isSortable()&&13===t.which&&this.onClick(t)},r.prototype.componentDidMount=function(){var t=this;setTimeout((function(){if(t.props.column.fixedHeader&&t.thRef.current){var e=t.thRef.current.offsetTop;"number"==typeof e&&t.setState({style:{top:e}})}}),0)},r.prototype.content=function(){return void 0!==this.props.column.name?this.props.column.name:void 0!==this.props.column.plugin?m(ht,{pluginId:this.props.column.plugin.id,props:{column:this.props.column}}):null},r.prototype.render=function(){var t={};return this.isSortable()&&(t.tabIndex=0),m("th",n({ref:this.thRef,"data-column-id":this.props.column&&this.props.column.id,className:nt(et("th"),this.isSortable()?et("th","sort"):null,this.props.column.fixedHeader?et("th","fixed"):null,this.config.className.th),onClick:this.onClick.bind(this),style:n(n(n(n({},this.config.style.th),{width:this.props.column.width}),this.state.style),this.props.style),onKeyDown:this.keyDown.bind(this),rowSpan:this.props.rowSpan>1?this.props.rowSpan:void 0,colSpan:this.props.colSpan>1?this.props.colSpan:void 0},t),this.content(),this.isSortable()&&m(Gt,n({ref:this.sortRef,index:this.props.index},this.props.column.sort)))},r}(z);var Kt,$t,Vt,Yt=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return e(n,t),n.prototype.renderColumn=function(t,e,n,r){var o=function(t,e,n){var r=St.maximumDepth(t),o=n-e;return{rowSpan:Math.floor(o-r-r/o),colSpan:t.columns&&t.columns.length||1}}(t,e,r),i=o.rowSpan,s=o.colSpan;return m(zt,{column:t,index:n,colSpan:s,rowSpan:i})},n.prototype.renderRow=function(t,e,n){var r=this,o=St.leafColumns(this.props.header.columns);return m(jt,null,t.map((function(t){return t.hidden?null:r.renderColumn(t,e,o.indexOf(t),n)})))},n.prototype.renderRows=function(){var t=this,e=St.tabularFormat(this.props.header.columns);return e.map((function(n,r){return t.renderRow(n,r,e.length)}))},n.prototype.render=function(){return this.props.header?m("thead",{key:this.props.header.id,className:nt(et("thead"),this.config.className.thead)},this.renderRows()):null},n}(z),Xt=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return e(r,t),r.prototype.render=function(){return m("table",{role:"grid",className:nt(et("table"),this.config.className.table),style:n(n({},this.config.style.table),{width:this.props.width,height:this.props.height})},m(Yt,{header:this.props.header}),m(Ht,{data:this.props.data,status:this.props.status,header:this.props.header}))},r}(z),Zt=function(t){function r(e,n){var r=t.call(this,e,n)||this;return r.headerRef={current:null},r.state={isActive:!0},r}return e(r,t),r.prototype.componentDidMount=function(){0===this.headerRef.current.children.length&&this.setState({isActive:!1})},r.prototype.render=function(){return this.state.isActive?m("div",{ref:this.headerRef,className:nt(et("head"),this.config.className.header),style:n({},this.config.style.header)},m(ht,{position:rt.Header})):null},r}(z),Jt=function(t){function r(e,n){var r=t.call(this,e,n)||this;return r.footerRef={current:null},r.state={isActive:!0},r}return e(r,t),r.prototype.componentDidMount=function(){0===this.footerRef.current.children.length&&this.setState({isActive:!1})},r.prototype.render=function(){return this.state.isActive?m("div",{ref:this.footerRef,className:nt(et("footer"),this.config.className.footer),style:n({},this.config.style.footer)},m(ht,{position:rt.Footer})):null},r}(z),Qt=function(t){function i(e,n){var r=t.call(this,e,n)||this;return r.configContext=function(t,e){var n={__c:e="__cC"+h++,__:t,Consumer:function(t,e){return t.children(e)},Provider:function(t,n,r){return this.getChildContext||(n=[],(r={})[e]=this,this.getChildContext=function(){return r},this.shouldComponentUpdate=function(t){this.props.value!==t.value&&n.some(k)},this.sub=function(t){n.push(t);var e=t.componentWillUnmount;t.componentWillUnmount=function(){n.splice(n.indexOf(t),1),e&&e.call(t)}}),t.children}};return n.Provider.__=n.Consumer.contextType=n}(null),r.state={status:Pt.Loading,header:e.header,data:null},r}return e(i,t),i.prototype.processPipeline=function(){return r(this,void 0,void 0,(function(){var t,e;return o(this,(function(n){switch(n.label){case 0:this.props.config.eventEmitter.emit("beforeLoad"),this.setState({status:Pt.Loading}),n.label=1;case 1:return n.trys.push([1,3,,4]),[4,this.props.pipeline.process()];case 2:return t=n.sent(),this.setState({data:t,status:Pt.Loaded}),this.props.config.eventEmitter.emit("load",t),[3,4];case 3:return e=n.sent(),lt.error(e),this.setState({status:Pt.Error,data:null}),[3,4];case 4:return[2]}}))}))},i.prototype.componentDidMount=function(){return r(this,void 0,void 0,(function(){var t;return o(this,(function(e){switch(e.label){case 0:return t=this.props.config,[4,this.processPipeline()];case 1:return e.sent(),t.header&&this.state.data&&this.state.data.length&&this.setState({header:t.header.adjustWidth(t.container,t.tableRef,t.tempRef,t.autoWidth)}),this.processPipelineFn=this.processPipeline.bind(this),this.props.pipeline.on("updated",this.processPipelineFn),[2]}}))}))},i.prototype.componentWillUnmount=function(){this.props.pipeline.off("updated",this.processPipelineFn)},i.prototype.componentDidUpdate=function(t,e){e.status!=Pt.Rendered&&this.state.status==Pt.Loaded&&(this.setState({status:Pt.Rendered}),this.props.config.eventEmitter.emit("ready"))},i.prototype.render=function(){return m(this.configContext.Provider,{value:this.props.config},m("div",{role:"complementary",className:nt("gridjs",et("container"),this.state.status===Pt.Loading?et("loading"):null,this.props.config.className.container),style:n(n({},this.props.config.style.container),{width:this.props.width})},this.state.status===Pt.Loading&&m("div",{className:et("loading-bar")}),m(Zt,null),m("div",{className:et("wrapper"),style:{width:this.props.width,height:this.props.height}},m(Xt,{ref:this.props.config.tableRef,data:this.state.data,header:this.state.header,width:this.props.width,height:this.props.height,status:this.state.status})),m(Jt,null)),m("div",{ref:this.props.config.tempRef,id:"gridjs-temp",className:et("temp")}))},i}(z),te=function(t){function n(e){var n=t.call(this)||this;return n.config=new Lt({instance:n,eventEmitter:n}).update(e),n.plugin=n.config.plugin,n}return e(n,t),n.prototype.updateConfig=function(t){return this.config.update(t),this},n.prototype.createElement=function(){return m(Qt,{config:this.config,pipeline:this.config.pipeline,header:this.config.header,width:this.config.width,height:this.config.height})},n.prototype.forceRender=function(){return this.config&&this.config.container||lt.error("Container is empty. Make sure you call render() before forceRender()",!0),this.config.pipeline.clearCache(),M(null,this.config.container),M(this.createElement(),this.config.container),this},n.prototype.render=function(t){return t||lt.error("Container element cannot be null",!0),t.childNodes.length>0?(lt.error("The container element "+t+" is not empty. Make sure the container is empty and call render() again"),this):(this.config.container=t,M(this.createElement(),t),this)},n}(J),ee=0,ne=[],re=s.__b,oe=s.__r,ie=s.diffed,se=s.__c,ae=s.unmount;function ue(t,e){s.__h&&s.__h($t,t,ee||e),ee=0;var n=$t.__H||($t.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({}),n.__[t]}function le(t,e){var n=ue(Kt++,3);!s.__s&&_e(n.__H,e)&&(n.__=t,n.__H=e,$t.__H.__h.push(n))}function pe(t){return ee=5,function(t,e){var n=ue(Kt++,7);return _e(n.__H,e)&&(n.__=t(),n.__H=e,n.__h=t),n.__}((function(){return{current:t}}),[])}function ce(){ne.forEach((function(t){if(t.__P)try{t.__H.__h.forEach(fe),t.__H.__h.forEach(de),t.__H.__h=[]}catch(e){t.__H.__h=[],s.__e(e,t.__v)}})),ne=[]}s.__b=function(t){$t=null,re&&re(t)},s.__r=function(t){oe&&oe(t),Kt=0;var e=($t=t.__c).__H;e&&(e.__h.forEach(fe),e.__h.forEach(de),e.__h=[])},s.diffed=function(t){ie&&ie(t);var e=t.__c;e&&e.__H&&e.__H.__h.length&&(1!==ne.push(e)&&Vt===s.requestAnimationFrame||((Vt=s.requestAnimationFrame)||function(t){var e,n=function(){clearTimeout(r),he&&cancelAnimationFrame(e),setTimeout(t)},r=setTimeout(n,100);he&&(e=requestAnimationFrame(n))})(ce)),$t=void 0},s.__c=function(t,e){e.some((function(t){try{t.__h.forEach(fe),t.__h=t.__h.filter((function(t){return!t.__||de(t)}))}catch(n){e.some((function(t){t.__h&&(t.__h=[])})),e=[],s.__e(n,t.__v)}})),se&&se(t,e)},s.unmount=function(t){ae&&ae(t);var e=t.__c;if(e&&e.__H)try{e.__H.__.forEach(fe)}catch(t){s.__e(t,e.__v)}};var he="function"==typeof requestAnimationFrame;function fe(t){var e=$t;"function"==typeof t.__c&&t.__c(),$t=e}function de(t){var e=$t;t.__c=t.__(),$t=e}function _e(t,e){return!t||t.length!==e.length||e.some((function(e,n){return e!==t[n]}))}export{st as BaseActions,z as BaseComponent,ot as BaseStore,V as Cell,P as Component,Lt as Config,xt as Dispatcher,te as Grid,pt as PluginBaseComponent,rt as PluginPosition,Y as Row,et as className,m as createElement,b as createRef,m as h,$ as html,le as useEffect,pe as useRef}; 16 | //# sourceMappingURL=gridjs.production.es.min.js.map 17 | -------------------------------------------------------------------------------- /imgs/codeblock.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avirut/obsidian-query2table/8f1d12e084d872e3546ba2b5a7610e782c679fe5/imgs/codeblock.png -------------------------------------------------------------------------------- /imgs/full-results.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avirut/obsidian-query2table/8f1d12e084d872e3546ba2b5a7610e782c679fe5/imgs/full-results.png -------------------------------------------------------------------------------- /imgs/search-sort-results.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avirut/obsidian-query2table/8f1d12e084d872e3546ba2b5a7610e782c679fe5/imgs/search-sort-results.png -------------------------------------------------------------------------------- /js-yaml.js: -------------------------------------------------------------------------------- 1 | !function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.jsyaml=e()}}(function(){return function e(t,n,i){function r(a,s){if(!n[a]){if(!t[a]){var u="function"==typeof require&&require;if(!s&&u)return u(a,!0);if(o)return o(a,!0);var c=new Error("Cannot find module '"+a+"'");throw c.code="MODULE_NOT_FOUND",c}var l=n[a]={exports:{}};t[a][0].call(l.exports,function(e){var n=t[a][1][e];return r(n?n:e)},l,l.exports,e,t,n,i)}return n[a].exports}for(var o="function"==typeof require&&require,a=0;an;n+=1)r=o[n],e[r]=t[r];return e}function s(e,t){var n,i="";for(n=0;t>n;n+=1)i+=e;return i}function u(e){return 0===e&&Number.NEGATIVE_INFINITY===1/e}t.exports.isNothing=i,t.exports.isObject=r,t.exports.toArray=o,t.exports.repeat=s,t.exports.isNegativeZero=u,t.exports.extend=a},{}],3:[function(e,t,n){"use strict";function i(e,t){var n,i,r,o,a,s,u;if(null===t)return{};for(n={},i=Object.keys(t),r=0,o=i.length;o>r;r+=1)a=i[r],s=String(t[a]),"!!"===a.slice(0,2)&&(a="tag:yaml.org,2002:"+a.slice(2)),u=e.compiledTypeMap[a],u&&F.call(u.styleAliases,s)&&(s=u.styleAliases[s]),n[a]=s;return n}function r(e){var t,n,i;if(t=e.toString(16).toUpperCase(),255>=e)n="x",i=2;else if(65535>=e)n="u",i=4;else{if(!(4294967295>=e))throw new I("code point within a string may not be greater than 0xFFFFFFFF");n="U",i=8}return"\\"+n+j.repeat("0",i-t.length)+t}function o(e){this.schema=e.schema||S,this.indent=Math.max(1,e.indent||2),this.skipInvalid=e.skipInvalid||!1,this.flowLevel=j.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=i(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function a(e,t){for(var n,i=j.repeat(" ",t),r=0,o=-1,a="",s=e.length;s>r;)o=e.indexOf("\n",r),-1===o?(n=e.slice(r),r=s):(n=e.slice(r,o+1),r=o+1),n.length&&"\n"!==n&&(a+=i),a+=n;return a}function s(e,t){return"\n"+j.repeat(" ",e.indent*t)}function u(e,t){var n,i,r;for(n=0,i=e.implicitTypes.length;i>n;n+=1)if(r=e.implicitTypes[n],r.resolve(t))return!0;return!1}function c(e){this.source=e,this.result="",this.checkpoint=0}function l(e,t,n){var i,r,o,s,l,f,m,g,y,x,v,A,b,w,C,k,j,I,S,O,E;if(0===t.length)return void(e.dump="''");if(-1!==te.indexOf(t))return void(e.dump="'"+t+"'");for(i=!0,r=t.length?t.charCodeAt(0):0,o=M===r||M===t.charCodeAt(t.length-1),(K===r||G===r||V===r||J===r)&&(i=!1),o?(i=!1,s=!1,l=!1):(s=!0,l=!0),f=!0,m=new c(t),g=!1,y=0,x=0,v=e.indent*n,A=80,40>v?A-=v:A=40,w=0;w0&&(j=t.charCodeAt(w-1),j===M&&(l=!1,s=!1)),s&&(I=w-y,y=w,I>x&&(x=I))),b!==D&&(f=!1),m.takeUpTo(w),m.escapeChar())}if(i&&u(e,t)&&(i=!1),S="",(s||l)&&(O=0,t.charCodeAt(t.length-1)===T&&(O+=1,t.charCodeAt(t.length-2)===T&&(O+=1)),0===O?S="-":2===O&&(S="+")),l&&A>x&&(s=!1),g||(l=!1),i)e.dump=t;else if(f)e.dump="'"+t+"'";else if(s)E=p(t,A),e.dump=">"+S+"\n"+a(E,v);else if(l)S||(t=t.replace(/\n$/,"")),e.dump="|"+S+"\n"+a(t,v);else{if(!m)throw new Error("Failed to dump scalar value");m.finish(),e.dump='"'+m.result+'"'}}function p(e,t){var n,i="",r=0,o=e.length,a=/\n+$/.exec(e);for(a&&(o=a.index+1);o>r;)n=e.indexOf("\n",r),n>o||-1===n?(i&&(i+="\n\n"),i+=f(e.slice(r,o),t),r=o):(i&&(i+="\n\n"),i+=f(e.slice(r,n),t),r=n+1);return a&&"\n"!==a[0]&&(i+=a[0]),i}function f(e,t){if(""===e)return e;for(var n,i,r,o=/[^\s] [^\s]/g,a="",s=0,u=0,c=o.exec(e);c;)n=c.index,n-u>t&&(i=s!==u?s:n,a&&(a+="\n"),r=e.slice(u,i),a+=r,u=i+1),s=n+1,c=o.exec(e);return a&&(a+="\n"),a+=u!==s&&e.length-u>t?e.slice(u,s)+"\n"+e.slice(s+1):e.slice(u)}function h(e){return N!==e&&T!==e&&_!==e&&B!==e&&W!==e&&Z!==e&&z!==e&&X!==e&&U!==e&&q!==e&&$!==e&&L!==e&&Q!==e&&H!==e&&P!==e&&D!==e&&Y!==e&&R!==e&&!ee[e]&&!d(e)}function d(e){return!(e>=32&&126>=e||133===e||e>=160&&55295>=e||e>=57344&&65533>=e||e>=65536&&1114111>=e)}function m(e,t,n){var i,r,o="",a=e.tag;for(i=0,r=n.length;r>i;i+=1)A(e,t,n[i],!1,!1)&&(0!==i&&(o+=", "),o+=e.dump);e.tag=a,e.dump="["+o+"]"}function g(e,t,n,i){var r,o,a="",u=e.tag;for(r=0,o=n.length;o>r;r+=1)A(e,t+1,n[r],!0,!0)&&(i&&0===r||(a+=s(e,t)),a+="- "+e.dump);e.tag=u,e.dump=a||"[]"}function y(e,t,n){var i,r,o,a,s,u="",c=e.tag,l=Object.keys(n);for(i=0,r=l.length;r>i;i+=1)s="",0!==i&&(s+=", "),o=l[i],a=n[o],A(e,t,o,!1,!1)&&(e.dump.length>1024&&(s+="? "),s+=e.dump+": ",A(e,t,a,!1,!1)&&(s+=e.dump,u+=s));e.tag=c,e.dump="{"+u+"}"}function x(e,t,n,i){var r,o,a,u,c,l,p="",f=e.tag,h=Object.keys(n);if(e.sortKeys===!0)h.sort();else if("function"==typeof e.sortKeys)h.sort(e.sortKeys);else if(e.sortKeys)throw new I("sortKeys must be a boolean or a function");for(r=0,o=h.length;o>r;r+=1)l="",i&&0===r||(l+=s(e,t)),a=h[r],u=n[a],A(e,t+1,a,!0,!0)&&(c=null!==e.tag&&"?"!==e.tag||e.dump&&e.dump.length>1024,c&&(l+=e.dump&&T===e.dump.charCodeAt(0)?"?":"? "),l+=e.dump,c&&(l+=s(e,t)),A(e,t+1,u,!0,c)&&(l+=e.dump&&T===e.dump.charCodeAt(0)?":":": ",l+=e.dump,p+=l));e.tag=f,e.dump=p||"{}"}function v(e,t,n){var i,r,o,a,s,u;for(r=n?e.explicitTypes:e.implicitTypes,o=0,a=r.length;a>o;o+=1)if(s=r[o],(s.instanceOf||s.predicate)&&(!s.instanceOf||"object"==typeof t&&t instanceof s.instanceOf)&&(!s.predicate||s.predicate(t))){if(e.tag=n?s.tag:"?",s.represent){if(u=e.styleMap[s.tag]||s.defaultStyle,"[object Function]"===E.call(s.represent))i=s.represent(t,u);else{if(!F.call(s.represent,u))throw new I("!<"+s.tag+'> tag resolver accepts not "'+u+'" style');i=s.represent[u](t,u)}e.dump=i}return!0}return!1}function A(e,t,n,i,r){e.tag=null,e.dump=n,v(e,n,!1)||v(e,n,!0);var o=E.call(e.dump);i&&(i=0>e.flowLevel||e.flowLevel>t),(null!==e.tag&&"?"!==e.tag||2!==e.indent&&t>0)&&(r=!1);var a,s,u="[object Object]"===o||"[object Array]"===o;if(u&&(a=e.duplicates.indexOf(n),s=-1!==a),s&&e.usedDuplicates[a])e.dump="*ref_"+a;else{if(u&&s&&!e.usedDuplicates[a]&&(e.usedDuplicates[a]=!0),"[object Object]"===o)i&&0!==Object.keys(e.dump).length?(x(e,t,e.dump,r),s&&(e.dump="&ref_"+a+(0===t?"\n":"")+e.dump)):(y(e,t,e.dump),s&&(e.dump="&ref_"+a+" "+e.dump));else if("[object Array]"===o)i&&0!==e.dump.length?(g(e,t,e.dump,r),s&&(e.dump="&ref_"+a+(0===t?"\n":"")+e.dump)):(m(e,t,e.dump),s&&(e.dump="&ref_"+a+" "+e.dump));else{if("[object String]"!==o){if(e.skipInvalid)return!1;throw new I("unacceptable kind of an object to dump "+o)}"?"!==e.tag&&l(e,e.dump,t)}null!==e.tag&&"?"!==e.tag&&(e.dump="!<"+e.tag+"> "+e.dump)}return!0}function b(e,t){var n,i,r=[],o=[];for(w(e,r,o),n=0,i=o.length;i>n;n+=1)t.duplicates.push(r[o[n]]);t.usedDuplicates=new Array(i)}function w(e,t,n){{var i,r,o;E.call(e)}if(null!==e&&"object"==typeof e)if(r=t.indexOf(e),-1!==r)-1===n.indexOf(r)&&n.push(r);else if(t.push(e),Array.isArray(e))for(r=0,o=e.length;o>r;r+=1)w(e[r],t,n);else for(i=Object.keys(e),r=0,o=i.length;o>r;r+=1)w(e[i[r]],t,n)}function C(e,t){t=t||{};var n=new o(t);return b(e,n),A(n,0,e,!0,!0)?n.dump+"\n":""}function k(e,t){return C(e,j.extend({schema:O},t))}var j=e("./common"),I=e("./exception"),S=e("./schema/default_full"),O=e("./schema/default_safe"),E=Object.prototype.toString,F=Object.prototype.hasOwnProperty,N=9,T=10,_=13,M=32,L=33,D=34,U=35,Y=37,q=38,P=39,$=42,B=44,K=45,R=58,H=62,G=63,V=64,W=91,Z=93,J=96,z=123,Q=124,X=125,ee={};ee[0]="\\0",ee[7]="\\a",ee[8]="\\b",ee[9]="\\t",ee[10]="\\n",ee[11]="\\v",ee[12]="\\f",ee[13]="\\r",ee[27]="\\e",ee[34]='\\"',ee[92]="\\\\",ee[133]="\\N",ee[160]="\\_",ee[8232]="\\L",ee[8233]="\\P";var te=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];c.prototype.takeUpTo=function(e){var t;if(e checkpoint"),t.position=e,t.checkpoint=this.checkpoint,t;return this.result+=this.source.slice(this.checkpoint,e),this.checkpoint=e,this},c.prototype.escapeChar=function(){var e,t;return e=this.source.charCodeAt(this.checkpoint),t=ee[e]||r(e),this.result+=t,this.checkpoint+=1,this},c.prototype.finish=function(){this.source.length>this.checkpoint&&this.takeUpTo(this.source.length)},t.exports.dump=C,t.exports.safeDump=k},{"./common":2,"./exception":4,"./schema/default_full":9,"./schema/default_safe":10}],4:[function(e,t,n){"use strict";function i(e,t){this.name="YAMLException",this.reason=e,this.mark=t,this.message=this.toString(!1)}i.prototype.toString=function(e){var t;return t="JS-YAML: "+(this.reason||"(unknown reason)"),!e&&this.mark&&(t+=" "+this.mark.toString()),t},t.exports=i},{}],5:[function(e,t,n){"use strict";function i(e){return 10===e||13===e}function r(e){return 9===e||32===e}function o(e){return 9===e||32===e||10===e||13===e}function a(e){return 44===e||91===e||93===e||123===e||125===e}function s(e){var t;return e>=48&&57>=e?e-48:(t=32|e,t>=97&&102>=t?t-97+10:-1)}function u(e){return 120===e?2:117===e?4:85===e?8:0}function c(e){return e>=48&&57>=e?e-48:-1}function l(e){return 48===e?"\x00":97===e?"":98===e?"\b":116===e?" ":9===e?" ":110===e?"\n":118===e?" ":102===e?"\f":114===e?"\r":101===e?"":32===e?" ":34===e?'"':47===e?"/":92===e?"\\":78===e?"…":95===e?" ":76===e?"\u2028":80===e?"\u2029":""}function p(e){return 65535>=e?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}function f(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||R,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.documents=[]}function h(e,t){return new $(t,new B(e.filename,e.input,e.position,e.line,e.position-e.lineStart))}function d(e,t){throw h(e,t)}function m(e,t){var n=h(e,t);if(!e.onWarning)throw n;e.onWarning.call(null,n)}function g(e,t,n,i){var r,o,a,s;if(n>t){if(s=e.input.slice(t,n),i)for(r=0,o=s.length;o>r;r+=1)a=s.charCodeAt(r),9===a||a>=32&&1114111>=a||d(e,"expected valid JSON character");e.result+=s}}function y(e,t,n){var i,r,o,a;for(P.isObject(n)||d(e,"cannot merge mappings; the provided source object is unacceptable"),i=Object.keys(n),o=0,a=i.length;a>o;o+=1)r=i[o],H.call(t,r)||(t[r]=n[r])}function x(e,t,n,i,r){var o,a;if(i=String(i),null===t&&(t={}),"tag:yaml.org,2002:merge"===n)if(Array.isArray(r))for(o=0,a=r.length;a>o;o+=1)y(e,t,r[o]);else y(e,t,r);else t[i]=r;return t}function v(e){var t;t=e.input.charCodeAt(e.position),10===t?e.position++:13===t?(e.position++,10===e.input.charCodeAt(e.position)&&e.position++):d(e,"a line break is expected"),e.line+=1,e.lineStart=e.position}function A(e,t,n){for(var o=0,a=e.input.charCodeAt(e.position);0!==a;){for(;r(a);)a=e.input.charCodeAt(++e.position);if(t&&35===a)do a=e.input.charCodeAt(++e.position);while(10!==a&&13!==a&&0!==a);if(!i(a))break;for(v(e),a=e.input.charCodeAt(e.position),o++,e.lineIndent=0;32===a;)e.lineIndent++,a=e.input.charCodeAt(++e.position)}return-1!==n&&0!==o&&e.lineIndent1&&(e.result+=P.repeat("\n",t-1))}function C(e,t,n){var s,u,c,l,p,f,h,d,m,y=e.kind,x=e.result;if(m=e.input.charCodeAt(e.position),o(m)||a(m)||35===m||38===m||42===m||33===m||124===m||62===m||39===m||34===m||37===m||64===m||96===m)return!1;if((63===m||45===m)&&(u=e.input.charCodeAt(e.position+1),o(u)||n&&a(u)))return!1;for(e.kind="scalar",e.result="",c=l=e.position,p=!1;0!==m;){if(58===m){if(u=e.input.charCodeAt(e.position+1),o(u)||n&&a(u))break}else if(35===m){if(s=e.input.charCodeAt(e.position-1),o(s))break}else{if(e.position===e.lineStart&&b(e)||n&&a(m))break;if(i(m)){if(f=e.line,h=e.lineStart,d=e.lineIndent,A(e,!1,-1),e.lineIndent>=t){p=!0,m=e.input.charCodeAt(e.position);continue}e.position=l,e.line=f,e.lineStart=h,e.lineIndent=d;break}}p&&(g(e,c,l,!1),w(e,e.line-f),c=l=e.position,p=!1),r(m)||(l=e.position+1),m=e.input.charCodeAt(++e.position)}return g(e,c,l,!1),e.result?!0:(e.kind=y,e.result=x,!1)}function k(e,t){var n,r,o;if(n=e.input.charCodeAt(e.position),39!==n)return!1;for(e.kind="scalar",e.result="",e.position++,r=o=e.position;0!==(n=e.input.charCodeAt(e.position));)if(39===n){if(g(e,r,e.position,!0),n=e.input.charCodeAt(++e.position),39!==n)return!0;r=o=e.position,e.position++}else i(n)?(g(e,r,o,!0),w(e,A(e,!1,t)),r=o=e.position):e.position===e.lineStart&&b(e)?d(e,"unexpected end of the document within a single quoted scalar"):(e.position++,o=e.position);d(e,"unexpected end of the stream within a single quoted scalar")}function j(e,t){var n,r,o,a,c,l;if(l=e.input.charCodeAt(e.position),34!==l)return!1;for(e.kind="scalar",e.result="",e.position++,n=r=e.position;0!==(l=e.input.charCodeAt(e.position));){if(34===l)return g(e,n,e.position,!0),e.position++,!0;if(92===l){if(g(e,n,e.position,!0),l=e.input.charCodeAt(++e.position),i(l))A(e,!1,t);else if(256>l&&re[l])e.result+=oe[l],e.position++;else if((c=u(l))>0){for(o=c,a=0;o>0;o--)l=e.input.charCodeAt(++e.position),(c=s(l))>=0?a=(a<<4)+c:d(e,"expected hexadecimal character");e.result+=p(a),e.position++}else d(e,"unknown escape sequence");n=r=e.position}else i(l)?(g(e,n,r,!0),w(e,A(e,!1,t)),n=r=e.position):e.position===e.lineStart&&b(e)?d(e,"unexpected end of the document within a double quoted scalar"):(e.position++,r=e.position)}d(e,"unexpected end of the stream within a double quoted scalar")}function I(e,t){var n,i,r,a,s,u,c,l,p,f,h,m=!0,g=e.tag,y=e.anchor;if(h=e.input.charCodeAt(e.position),91===h)a=93,c=!1,i=[];else{if(123!==h)return!1;a=125,c=!0,i={}}for(null!==e.anchor&&(e.anchorMap[e.anchor]=i),h=e.input.charCodeAt(++e.position);0!==h;){if(A(e,!0,t),h=e.input.charCodeAt(e.position),h===a)return e.position++,e.tag=g,e.anchor=y,e.kind=c?"mapping":"sequence",e.result=i,!0;m||d(e,"missed comma between flow collection entries"),p=l=f=null,s=u=!1,63===h&&(r=e.input.charCodeAt(e.position+1),o(r)&&(s=u=!0,e.position++,A(e,!0,t))),n=e.line,_(e,t,G,!1,!0),p=e.tag,l=e.result,A(e,!0,t),h=e.input.charCodeAt(e.position),!u&&e.line!==n||58!==h||(s=!0,h=e.input.charCodeAt(++e.position),A(e,!0,t),_(e,t,G,!1,!0),f=e.result),c?x(e,i,p,l,f):i.push(s?x(e,null,p,l,f):l),A(e,!0,t),h=e.input.charCodeAt(e.position),44===h?(m=!0,h=e.input.charCodeAt(++e.position)):m=!1}d(e,"unexpected end of the stream within a flow collection")}function S(e,t){var n,o,a,s,u=J,l=!1,p=t,f=0,h=!1;if(s=e.input.charCodeAt(e.position),124===s)o=!1;else{if(62!==s)return!1;o=!0}for(e.kind="scalar",e.result="";0!==s;)if(s=e.input.charCodeAt(++e.position),43===s||45===s)J===u?u=43===s?Q:z:d(e,"repeat of a chomping mode identifier");else{if(!((a=c(s))>=0))break;0===a?d(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):l?d(e,"repeat of an indentation width identifier"):(p=t+a-1,l=!0)}if(r(s)){do s=e.input.charCodeAt(++e.position);while(r(s));if(35===s)do s=e.input.charCodeAt(++e.position);while(!i(s)&&0!==s)}for(;0!==s;){for(v(e),e.lineIndent=0,s=e.input.charCodeAt(e.position);(!l||e.lineIndentp&&(p=e.lineIndent),i(s))f++;else{if(e.lineIndentt)&&0!==r)d(e,"bad indentation of a sequence entry");else if(e.lineIndentt)&&(_(e,t,Z,!0,a)&&(g?h=e.result:m=e.result),g||(x(e,p,f,h,m),f=h=m=null),A(e,!0,-1),u=e.input.charCodeAt(e.position)),e.lineIndent>t&&0!==u)d(e,"bad indentation of a mapping entry");else if(e.lineIndentt?h=1:e.lineIndent===t?h=0:e.lineIndentt?h=1:e.lineIndent===t?h=0:e.lineIndentu;u+=1)if(l=e.implicitTypes[u],l.resolve(e.result)){e.result=l.construct(e.result),e.tag=l.tag,null!==e.anchor&&(e.anchorMap[e.anchor]=e.result);break}}else H.call(e.typeMap,e.tag)?(l=e.typeMap[e.tag],null!==e.result&&l.kind!==e.kind&&d(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+l.kind+'", not "'+e.kind+'"'),l.resolve(e.result)?(e.result=l.construct(e.result),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):d(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")):m(e,"unknown tag !<"+e.tag+">");return null!==e.tag||null!==e.anchor||y}function M(e){var t,n,a,s,u=e.position,c=!1;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap={},e.anchorMap={};0!==(s=e.input.charCodeAt(e.position))&&(A(e,!0,-1),s=e.input.charCodeAt(e.position),!(e.lineIndent>0||37!==s));){for(c=!0,s=e.input.charCodeAt(++e.position),t=e.position;0!==s&&!o(s);)s=e.input.charCodeAt(++e.position);for(n=e.input.slice(t,e.position),a=[],n.length<1&&d(e,"directive name must not be less than one character in length");0!==s;){for(;r(s);)s=e.input.charCodeAt(++e.position);if(35===s){do s=e.input.charCodeAt(++e.position);while(0!==s&&!i(s));break}if(i(s))break;for(t=e.position;0!==s&&!o(s);)s=e.input.charCodeAt(++e.position);a.push(e.input.slice(t,e.position))}0!==s&&v(e),H.call(se,n)?se[n](e,n,a):m(e,'unknown document directive "'+n+'"')}return A(e,!0,-1),0===e.lineIndent&&45===e.input.charCodeAt(e.position)&&45===e.input.charCodeAt(e.position+1)&&45===e.input.charCodeAt(e.position+2)?(e.position+=3,A(e,!0,-1)):c&&d(e,"directives end mark is expected"),_(e,e.lineIndent-1,Z,!1,!0),A(e,!0,-1),e.checkLineBreaks&&ee.test(e.input.slice(u,e.position))&&m(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&b(e)?void(46===e.input.charCodeAt(e.position)&&(e.position+=3,A(e,!0,-1))):void(e.positioni;i+=1)t(o[i])}function U(e,t){var n=L(e,t);if(0===n.length)return void 0;if(1===n.length)return n[0];throw new $("expected a single document in the stream, but found more")}function Y(e,t,n){D(e,t,P.extend({schema:K},n))}function q(e,t){return U(e,P.extend({schema:K},t))}for(var P=e("./common"),$=e("./exception"),B=e("./mark"),K=e("./schema/default_safe"),R=e("./schema/default_full"),H=Object.prototype.hasOwnProperty,G=1,V=2,W=3,Z=4,J=1,z=2,Q=3,X=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,ee=/[\x85\u2028\u2029]/,te=/[,\[\]\{\}]/,ne=/^(?:!|!!|![a-z\-]+!)$/i,ie=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i,re=new Array(256),oe=new Array(256),ae=0;256>ae;ae++)re[ae]=l(ae)?1:0,oe[ae]=l(ae);var se={YAML:function(e,t,n){var i,r,o;null!==e.version&&d(e,"duplication of %YAML directive"),1!==n.length&&d(e,"YAML directive accepts exactly one argument"),i=/^([0-9]+)\.([0-9]+)$/.exec(n[0]),null===i&&d(e,"ill-formed argument of the YAML directive"),r=parseInt(i[1],10),o=parseInt(i[2],10),1!==r&&d(e,"unacceptable YAML version of the document"),e.version=n[0],e.checkLineBreaks=2>o,1!==o&&2!==o&&m(e,"unsupported YAML version of the document")},TAG:function(e,t,n){var i,r;2!==n.length&&d(e,"TAG directive accepts exactly two arguments"),i=n[0],r=n[1],ne.test(i)||d(e,"ill-formed tag handle (first argument) of the TAG directive"),H.call(e.tagMap,i)&&d(e,'there is a previously declared suffix for "'+i+'" tag handle'),ie.test(r)||d(e,"ill-formed tag prefix (second argument) of the TAG directive"),e.tagMap[i]=r}};t.exports.loadAll=D,t.exports.load=U,t.exports.safeLoadAll=Y,t.exports.safeLoad=q},{"./common":2,"./exception":4,"./mark":6,"./schema/default_full":9,"./schema/default_safe":10}],6:[function(e,t,n){"use strict";function i(e,t,n,i,r){this.name=e,this.buffer=t,this.position=n,this.line=i,this.column=r}var r=e("./common");i.prototype.getSnippet=function(e,t){var n,i,o,a,s;if(!this.buffer)return null;for(e=e||4,t=t||75,n="",i=this.position;i>0&&-1==="\x00\r\n…\u2028\u2029".indexOf(this.buffer.charAt(i-1));)if(i-=1,this.position-i>t/2-1){n=" ... ",i+=5;break}for(o="",a=this.position;at/2-1){o=" ... ",a-=5;break}return s=this.buffer.slice(i,a),r.repeat(" ",e)+n+s+o+"\n"+r.repeat(" ",e+this.position-i+n.length)+"^"},i.prototype.toString=function(e){var t,n="";return this.name&&(n+='in "'+this.name+'" '),n+="at line "+(this.line+1)+", column "+(this.column+1),e||(t=this.getSnippet(),t&&(n+=":\n"+t)),n},t.exports=i},{"./common":2}],7:[function(e,t,n){"use strict";function i(e,t,n){var r=[];return e.include.forEach(function(e){n=i(e,t,n)}),e[t].forEach(function(e){n.forEach(function(t,n){t.tag===e.tag&&r.push(n)}),n.push(e)}),n.filter(function(e,t){return-1===r.indexOf(t)})}function r(){function e(e){i[e.tag]=e}var t,n,i={};for(t=0,n=arguments.length;n>t;t+=1)arguments[t].forEach(e);return i}function o(e){this.include=e.include||[],this.implicit=e.implicit||[],this.explicit=e.explicit||[],this.implicit.forEach(function(e){if(e.loadKind&&"scalar"!==e.loadKind)throw new s("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.")}),this.compiledImplicit=i(this,"implicit",[]),this.compiledExplicit=i(this,"explicit",[]),this.compiledTypeMap=r(this.compiledImplicit,this.compiledExplicit)}var a=e("./common"),s=e("./exception"),u=e("./type");o.DEFAULT=null,o.create=function(){var e,t;switch(arguments.length){case 1:e=o.DEFAULT,t=arguments[0];break;case 2:e=arguments[0],t=arguments[1];break;default:throw new s("Wrong number of arguments for Schema.create function")}if(e=a.toArray(e),t=a.toArray(t),!e.every(function(e){return e instanceof o}))throw new s("Specified list of super schemas (or a single Schema object) contains a non-Schema object.");if(!t.every(function(e){return e instanceof u}))throw new s("Specified list of YAML types (or a single Type object) contains a non-Type object.");return new o({include:e,explicit:t})},t.exports=o},{"./common":2,"./exception":4,"./type":13}],8:[function(e,t,n){"use strict";var i=e("../schema");t.exports=new i({include:[e("./json")]})},{"../schema":7,"./json":12}],9:[function(e,t,n){"use strict";var i=e("../schema");t.exports=i.DEFAULT=new i({include:[e("./default_safe")],explicit:[e("../type/js/undefined"),e("../type/js/regexp"),e("../type/js/function")]})},{"../schema":7,"../type/js/function":18,"../type/js/regexp":19,"../type/js/undefined":20,"./default_safe":10}],10:[function(e,t,n){"use strict";var i=e("../schema");t.exports=new i({include:[e("./core")],implicit:[e("../type/timestamp"),e("../type/merge")],explicit:[e("../type/binary"),e("../type/omap"),e("../type/pairs"),e("../type/set")]})},{"../schema":7,"../type/binary":14,"../type/merge":22,"../type/omap":24,"../type/pairs":25,"../type/set":27,"../type/timestamp":29,"./core":8}],11:[function(e,t,n){"use strict";var i=e("../schema");t.exports=new i({explicit:[e("../type/str"),e("../type/seq"),e("../type/map")]})},{"../schema":7,"../type/map":21,"../type/seq":26,"../type/str":28}],12:[function(e,t,n){"use strict";var i=e("../schema");t.exports=new i({include:[e("./failsafe")],implicit:[e("../type/null"),e("../type/bool"),e("../type/int"),e("../type/float")]})},{"../schema":7,"../type/bool":15,"../type/float":16,"../type/int":17,"../type/null":23,"./failsafe":11}],13:[function(e,t,n){"use strict";function i(e){var t={};return null!==e&&Object.keys(e).forEach(function(n){e[n].forEach(function(e){t[String(e)]=n})}),t}function r(e,t){if(t=t||{},Object.keys(t).forEach(function(t){if(-1===a.indexOf(t))throw new o('Unknown option "'+t+'" is met in definition of "'+e+'" YAML type.')}),this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(e){return e},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.defaultStyle=t.defaultStyle||null,this.styleAliases=i(t.styleAliases||null),-1===s.indexOf(this.kind))throw new o('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}var o=e("./exception"),a=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],s=["scalar","sequence","mapping"];t.exports=r},{"./exception":4}],14:[function(e,t,n){"use strict";function i(e){if(null===e)return!1;var t,n,i=0,r=e.length,o=c;for(n=0;r>n;n++)if(t=o.indexOf(e.charAt(n)),!(t>64)){if(0>t)return!1;i+=6}return i%8===0}function r(e){var t,n,i=e.replace(/[\r\n=]/g,""),r=i.length,o=c,a=0,u=[];for(t=0;r>t;t++)t%4===0&&t&&(u.push(a>>16&255),u.push(a>>8&255),u.push(255&a)),a=a<<6|o.indexOf(i.charAt(t));return n=r%4*6,0===n?(u.push(a>>16&255),u.push(a>>8&255),u.push(255&a)):18===n?(u.push(a>>10&255),u.push(a>>2&255)):12===n&&u.push(a>>4&255),s?new s(u):u}function o(e){var t,n,i="",r=0,o=e.length,a=c;for(t=0;o>t;t++)t%3===0&&t&&(i+=a[r>>18&63],i+=a[r>>12&63],i+=a[r>>6&63],i+=a[63&r]),r=(r<<8)+e[t];return n=o%3,0===n?(i+=a[r>>18&63],i+=a[r>>12&63],i+=a[r>>6&63],i+=a[63&r]):2===n?(i+=a[r>>10&63],i+=a[r>>4&63],i+=a[r<<2&63],i+=a[64]):1===n&&(i+=a[r>>2&63],i+=a[r<<4&63],i+=a[64],i+=a[64]),i}function a(e){return s&&s.isBuffer(e)}var s=e("buffer").Buffer,u=e("../type"),c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";t.exports=new u("tag:yaml.org,2002:binary",{kind:"scalar",resolve:i,construct:r,predicate:a,represent:o})},{"../type":13,buffer:30}],15:[function(e,t,n){"use strict";function i(e){if(null===e)return!1;var t=e.length;return 4===t&&("true"===e||"True"===e||"TRUE"===e)||5===t&&("false"===e||"False"===e||"FALSE"===e); 2 | 3 | }function r(e){return"true"===e||"True"===e||"TRUE"===e}function o(e){return"[object Boolean]"===Object.prototype.toString.call(e)}var a=e("../type");t.exports=new a("tag:yaml.org,2002:bool",{kind:"scalar",resolve:i,construct:r,predicate:o,represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"})},{"../type":13}],16:[function(e,t,n){"use strict";function i(e){if(null===e)return!1;return c.test(e)?!0:!1}function r(e){var t,n,i,r;return t=e.replace(/_/g,"").toLowerCase(),n="-"===t[0]?-1:1,r=[],0<="+-".indexOf(t[0])&&(t=t.slice(1)),".inf"===t?1===n?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===t?0/0:0<=t.indexOf(":")?(t.split(":").forEach(function(e){r.unshift(parseFloat(e,10))}),t=0,i=1,r.forEach(function(e){t+=e*i,i*=60}),n*t):n*parseFloat(t,10)}function o(e,t){if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(s.isNegativeZero(e))return"-0.0";return e.toString(10)}function a(e){return"[object Number]"===Object.prototype.toString.call(e)&&(0!==e%1||s.isNegativeZero(e))}var s=e("../common"),u=e("../type"),c=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)\\.[0-9_]*(?:[eE][-+][0-9]+)?|\\.[0-9_]+(?:[eE][-+][0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");t.exports=new u("tag:yaml.org,2002:float",{kind:"scalar",resolve:i,construct:r,predicate:a,represent:o,defaultStyle:"lowercase"})},{"../common":2,"../type":13}],17:[function(e,t,n){"use strict";function i(e){return e>=48&&57>=e||e>=65&&70>=e||e>=97&&102>=e}function r(e){return e>=48&&55>=e}function o(e){return e>=48&&57>=e}function a(e){if(null===e)return!1;var t,n=e.length,a=0,s=!1;if(!n)return!1;if(t=e[a],("-"===t||"+"===t)&&(t=e[++a]),"0"===t){if(a+1===n)return!0;if(t=e[++a],"b"===t){for(a++;n>a;a++)if(t=e[a],"_"!==t){if("0"!==t&&"1"!==t)return!1;s=!0}return s}if("x"===t){for(a++;n>a;a++)if(t=e[a],"_"!==t){if(!i(e.charCodeAt(a)))return!1;s=!0}return s}for(;n>a;a++)if(t=e[a],"_"!==t){if(!r(e.charCodeAt(a)))return!1;s=!0}return s}for(;n>a;a++)if(t=e[a],"_"!==t){if(":"===t)break;if(!o(e.charCodeAt(a)))return!1;s=!0}return s?":"!==t?!0:/^(:[0-5]?[0-9])+$/.test(e.slice(a)):!1}function s(e){var t,n,i=e,r=1,o=[];return-1!==i.indexOf("_")&&(i=i.replace(/_/g,"")),t=i[0],("-"===t||"+"===t)&&("-"===t&&(r=-1),i=i.slice(1),t=i[0]),"0"===i?0:"0"===t?"b"===i[1]?r*parseInt(i.slice(2),2):"x"===i[1]?r*parseInt(i,16):r*parseInt(i,8):-1!==i.indexOf(":")?(i.split(":").forEach(function(e){o.unshift(parseInt(e,10))}),i=0,n=1,o.forEach(function(e){i+=e*n,n*=60}),r*i):r*parseInt(i,10)}function u(e){return"[object Number]"===Object.prototype.toString.call(e)&&0===e%1&&!c.isNegativeZero(e)}var c=e("../common"),l=e("../type");t.exports=new l("tag:yaml.org,2002:int",{kind:"scalar",resolve:a,construct:s,predicate:u,represent:{binary:function(e){return"0b"+e.toString(2)},octal:function(e){return"0"+e.toString(8)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return"0x"+e.toString(16).toUpperCase()}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})},{"../common":2,"../type":13}],18:[function(e,t,n){"use strict";function i(e){if(null===e)return!1;try{var t="("+e+")",n=s.parse(t,{range:!0});return"Program"!==n.type||1!==n.body.length||"ExpressionStatement"!==n.body[0].type||"FunctionExpression"!==n.body[0].expression.type?!1:!0}catch(i){return!1}}function r(e){var t,n="("+e+")",i=s.parse(n,{range:!0}),r=[];if("Program"!==i.type||1!==i.body.length||"ExpressionStatement"!==i.body[0].type||"FunctionExpression"!==i.body[0].expression.type)throw new Error("Failed to resolve function");return i.body[0].expression.params.forEach(function(e){r.push(e.name)}),t=i.body[0].expression.body.range,new Function(r,n.slice(t[0]+1,t[1]-1))}function o(e){return e.toString()}function a(e){return"[object Function]"===Object.prototype.toString.call(e)}var s;try{s=e("esprima")}catch(u){"undefined"!=typeof window&&(s=window.esprima)}var c=e("../../type");t.exports=new c("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:i,construct:r,predicate:a,represent:o})},{"../../type":13,esprima:"esprima"}],19:[function(e,t,n){"use strict";function i(e){if(null===e)return!1;if(0===e.length)return!1;var t=e,n=/\/([gim]*)$/.exec(e),i="";if("/"===t[0]){if(n&&(i=n[1]),i.length>3)return!1;if("/"!==t[t.length-i.length-1])return!1;t=t.slice(1,t.length-i.length-1)}try{{new RegExp(t,i)}return!0}catch(r){return!1}}function r(e){var t=e,n=/\/([gim]*)$/.exec(e),i="";return"/"===t[0]&&(n&&(i=n[1]),t=t.slice(1,t.length-i.length-1)),new RegExp(t,i)}function o(e){var t="/"+e.source+"/";return e.global&&(t+="g"),e.multiline&&(t+="m"),e.ignoreCase&&(t+="i"),t}function a(e){return"[object RegExp]"===Object.prototype.toString.call(e)}var s=e("../../type");t.exports=new s("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:i,construct:r,predicate:a,represent:o})},{"../../type":13}],20:[function(e,t,n){"use strict";function i(){return!0}function r(){return void 0}function o(){return""}function a(e){return"undefined"==typeof e}var s=e("../../type");t.exports=new s("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:i,construct:r,predicate:a,represent:o})},{"../../type":13}],21:[function(e,t,n){"use strict";var i=e("../type");t.exports=new i("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return null!==e?e:{}}})},{"../type":13}],22:[function(e,t,n){"use strict";function i(e){return"<<"===e||null===e}var r=e("../type");t.exports=new r("tag:yaml.org,2002:merge",{kind:"scalar",resolve:i})},{"../type":13}],23:[function(e,t,n){"use strict";function i(e){if(null===e)return!0;var t=e.length;return 1===t&&"~"===e||4===t&&("null"===e||"Null"===e||"NULL"===e)}function r(){return null}function o(e){return null===e}var a=e("../type");t.exports=new a("tag:yaml.org,2002:null",{kind:"scalar",resolve:i,construct:r,predicate:o,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"})},{"../type":13}],24:[function(e,t,n){"use strict";function i(e){if(null===e)return!0;var t,n,i,r,o,u=[],c=e;for(t=0,n=c.length;n>t;t+=1){if(i=c[t],o=!1,"[object Object]"!==s.call(i))return!1;for(r in i)if(a.call(i,r)){if(o)return!1;o=!0}if(!o)return!1;if(-1!==u.indexOf(r))return!1;u.push(r)}return!0}function r(e){return null!==e?e:[]}var o=e("../type"),a=Object.prototype.hasOwnProperty,s=Object.prototype.toString;t.exports=new o("tag:yaml.org,2002:omap",{kind:"sequence",resolve:i,construct:r})},{"../type":13}],25:[function(e,t,n){"use strict";function i(e){if(null===e)return!0;var t,n,i,r,o,s=e;for(o=new Array(s.length),t=0,n=s.length;n>t;t+=1){if(i=s[t],"[object Object]"!==a.call(i))return!1;if(r=Object.keys(i),1!==r.length)return!1;o[t]=[r[0],i[r[0]]]}return!0}function r(e){if(null===e)return[];var t,n,i,r,o,a=e;for(o=new Array(a.length),t=0,n=a.length;n>t;t+=1)i=a[t],r=Object.keys(i),o[t]=[r[0],i[r[0]]];return o}var o=e("../type"),a=Object.prototype.toString;t.exports=new o("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:i,construct:r})},{"../type":13}],26:[function(e,t,n){"use strict";var i=e("../type");t.exports=new i("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return null!==e?e:[]}})},{"../type":13}],27:[function(e,t,n){"use strict";function i(e){if(null===e)return!0;var t,n=e;for(t in n)if(a.call(n,t)&&null!==n[t])return!1;return!0}function r(e){return null!==e?e:{}}var o=e("../type"),a=Object.prototype.hasOwnProperty;t.exports=new o("tag:yaml.org,2002:set",{kind:"mapping",resolve:i,construct:r})},{"../type":13}],28:[function(e,t,n){"use strict";var i=e("../type");t.exports=new i("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return null!==e?e:""}})},{"../type":13}],29:[function(e,t,n){"use strict";function i(e){if(null===e)return!1;var t;return t=s.exec(e),null===t?!1:!0}function r(e){var t,n,i,r,o,a,u,c,l,p,f=0,h=null;if(t=s.exec(e),null===t)throw new Error("Date resolve error");if(n=+t[1],i=+t[2]-1,r=+t[3],!t[4])return new Date(Date.UTC(n,i,r));if(o=+t[4],a=+t[5],u=+t[6],t[7]){for(f=t[7].slice(0,3);f.length<3;)f+="0";f=+f}return t[9]&&(c=+t[10],l=+(t[11]||0),h=6e4*(60*c+l),"-"===t[9]&&(h=-h)),p=new Date(Date.UTC(n,i,r,o,a,u,f)),h&&p.setTime(p.getTime()-h),p}function o(e){return e.toISOString()}var a=e("../type"),s=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?)?$");t.exports=new a("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:i,construct:r,instanceOf:Date,represent:o})},{"../type":13}],30:[function(e,t,n){},{}],"/":[function(e,t,n){"use strict";var i=e("./lib/js-yaml.js");t.exports=i},{"./lib/js-yaml.js":1}]},{},[])("/")}); 4 | -------------------------------------------------------------------------------- /main.ts: -------------------------------------------------------------------------------- 1 | import { TFile, Plugin, parseFrontMatterEntry } from 'obsidian'; 2 | import * as jsyaml from './js-yaml'; 3 | import * as grid from './grid.min.js'; 4 | 5 | export default class Query2Table extends Plugin { 6 | // half of this plugin is shamelessly ripped from https://github.com/phibr0/obsidian-charts 7 | // the other (even harder) half was from https://github.com/mrjackphil/obsidian-text-expand 8 | 9 | search(s: string) { 10 | // @ts-ignore 11 | const globalSearchFn = this.app.internalPlugins.getPluginById('global-search').instance.openGlobalSearch.bind(this); 12 | const searchFor = (query: string) => globalSearchFn(query); 13 | searchFor(s); 14 | } 15 | 16 | async getFoundAfterDelay(delay: number) { 17 | const searchLeaf = this.app.workspace.getLeavesOfType('search')[0]; 18 | const view = await searchLeaf.open(searchLeaf.view); 19 | return new Promise(resolve => { 20 | // @ts-ignore 21 | setTimeout(() => { 22 | console.log("logging view: "); 23 | console.log(view); 24 | console.log("logging keys: "); 25 | // @ts-ignore 26 | console.log(Array.from(view.dom.resultDomLookup.keys())); 27 | // @ts-ignore 28 | return resolve(Array.from(view.dom.resultDomLookup.keys())); 29 | }, delay); 30 | }) 31 | } 32 | 33 | async getFiles(query: string, approxNumberOfResults: number): Promise { 34 | this.search(query); 35 | let searchTime = approxNumberOfResults * 10 + 500; 36 | let files = await this.getFoundAfterDelay(searchTime) as TFile[]; 37 | console.log("files being returned after query:") 38 | console.log(files); 39 | return files; 40 | } 41 | 42 | onload() { 43 | console.log('loading plugin: query2table'); 44 | this.registerMarkdownPostProcessor((el: HTMLElement) => { 45 | 46 | // select for codeblocks 47 | let blockToReplace = el.querySelector('pre'); 48 | if (!blockToReplace) { return; } 49 | 50 | // out of those, select for query2table codeblocks 51 | let plotBlock = blockToReplace.querySelector('code.language-query2table'); 52 | if (!plotBlock) { return; } 53 | 54 | // parse YAML 55 | let yaml = jsyaml.load(plotBlock.textContent) 56 | if (!yaml || !yaml['query']) { return; } 57 | 58 | // getFiles as a promise, and on completion perform the bulk of the plugin's work 59 | this.getFiles(yaml['query'], parseInt(yaml['approxNumberOfResults'])) 60 | .then((files: TFile[]) => { 61 | // console.log(files); 62 | // console.log(yaml); 63 | 64 | // get initial data, flatten field data 65 | let fmdata: Object[] = []; 66 | let fieldData = Object.assign.apply(Object, yaml['fields']); 67 | let fields = Object.keys(fieldData); 68 | 69 | // build the formatter for each specified field to later pass to grid.js as 'columns' 70 | let columnData = []; 71 | for (let field of fields) { 72 | let curr: any = new Object(); 73 | curr['id'] = field; 74 | curr['name'] = grid.html(`${field}
`); 75 | 76 | let formatter; 77 | switch (fieldData[field]) { 78 | 79 | case 'note': { 80 | formatter = (cell: any) => { 81 | for (let notefile of files) { 82 | let fm = this.app.metadataCache.getFileCache(notefile)?.frontmatter; 83 | if (fm && fm[field] && fm[field].indexOf(cell) >= 0) { 84 | let myLink = 'obsidian://open?vault=' + notefile.vault.getName() + '&file=' + notefile.path; 85 | // console.log(myLink); 86 | return grid.html(`${cell}`); 87 | } 88 | } 89 | return grid.html(`${cell}`); 90 | } 91 | break; 92 | } 93 | 94 | case 'text-as-link': { 95 | formatter = (cell: any) => grid.html(`${cell}`); 96 | break; 97 | } 98 | 99 | case 'link': { 100 | formatter = (cell: any) => grid.html(`Link`); 101 | break; 102 | } 103 | 104 | case 'list': { 105 | formatter = (cell: any) => { 106 | let listhtml = `
    `; 107 | for (let item of cell) { 108 | listhtml += `
  • ${item}
  • `; 109 | } 110 | listhtml += `
`; 111 | return grid.html(listhtml); 112 | } 113 | break; 114 | } 115 | 116 | default: { 117 | formatter = undefined; 118 | } 119 | } 120 | 121 | if (formatter) { 122 | curr['formatter'] = formatter; 123 | } 124 | columnData.push(curr); 125 | } 126 | 127 | // build JSON data (or rather javascript objects) from the pulled files 128 | fileloop: 129 | for (let file of files) { 130 | let curr: any = new Object(); 131 | let fm = this.app.metadataCache.getFileCache(file)?.frontmatter; 132 | for (let field of fields) { 133 | curr[field] = parseFrontMatterEntry(fm, field); 134 | 135 | // if the main field is null or undefined, just don't add it 136 | if (!curr[field] && fieldData[field] == 'note') { 137 | continue fileloop; 138 | } 139 | } 140 | 141 | fmdata.push(curr); 142 | } 143 | 144 | // render the data with column formatting to destination 145 | const destination = document.createElement('div'); 146 | new grid.Grid({ 147 | sort: true, 148 | search: true, 149 | columns: columnData, 150 | data: fmdata 151 | }).render(destination); 152 | 153 | // replace the initial codeblock with the destination 154 | el.replaceChild(destination, blockToReplace); 155 | }) 156 | }) 157 | } 158 | 159 | onunload() { 160 | console.log('unloading plugin: query2table'); 161 | } 162 | 163 | } 164 | -------------------------------------------------------------------------------- /manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "obsidian-query2table", 3 | "name": "query2table", 4 | "author": "avirut", 5 | "version": "0.1.1", 6 | "minAppVersion": "0.10.6", 7 | "description": "Represent files returned by a query as a table of their YAML frontmatter", 8 | "authorURL": "https://avirut.me/", 9 | "isDesktopOnly": "false" 10 | } 11 | -------------------------------------------------------------------------------- /package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "obsidian-query2table", 3 | "version": "0.1.0", 4 | "lockfileVersion": 1, 5 | "requires": true, 6 | "dependencies": { 7 | "@nodelib/fs.scandir": { 8 | "version": "2.1.4", 9 | "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.4.tgz", 10 | "integrity": "sha512-33g3pMJk3bg5nXbL/+CY6I2eJDzZAni49PfJnL5fghPTggPvBd/pFNSgJsdAgWptuFu7qq/ERvOYFlhvsLTCKA==", 11 | "dev": true, 12 | "requires": { 13 | "@nodelib/fs.stat": "2.0.4", 14 | "run-parallel": "^1.1.9" 15 | } 16 | }, 17 | "@nodelib/fs.stat": { 18 | "version": "2.0.4", 19 | "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.4.tgz", 20 | "integrity": "sha512-IYlHJA0clt2+Vg7bccq+TzRdJvv19c2INqBSsoOLp1je7xjtr7J26+WXR72MCdvU9q1qTzIWDfhMf+DRvQJK4Q==", 21 | "dev": true 22 | }, 23 | "@nodelib/fs.walk": { 24 | "version": "1.2.6", 25 | "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.6.tgz", 26 | "integrity": "sha512-8Broas6vTtW4GIXTAHDoE32hnN2M5ykgCpWGbuXHQ15vEMqr23pB76e/GZcYsZCHALv50ktd24qhEyKr6wBtow==", 27 | "dev": true, 28 | "requires": { 29 | "@nodelib/fs.scandir": "2.1.4", 30 | "fastq": "^1.6.0" 31 | } 32 | }, 33 | "@rollup/plugin-commonjs": { 34 | "version": "17.0.0", 35 | "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-17.0.0.tgz", 36 | "integrity": "sha512-/omBIJG1nHQc+bgkYDuLpb/V08QyutP9amOrJRUSlYJZP+b/68gM//D8sxJe3Yry2QnYIr3QjR3x4AlxJEN3GA==", 37 | "dev": true, 38 | "requires": { 39 | "@rollup/pluginutils": "^3.1.0", 40 | "commondir": "^1.0.1", 41 | "estree-walker": "^2.0.1", 42 | "glob": "^7.1.6", 43 | "is-reference": "^1.2.1", 44 | "magic-string": "^0.25.7", 45 | "resolve": "^1.17.0" 46 | }, 47 | "dependencies": { 48 | "estree-walker": { 49 | "version": "2.0.2", 50 | "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", 51 | "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", 52 | "dev": true 53 | } 54 | } 55 | }, 56 | "@rollup/plugin-node-resolve": { 57 | "version": "11.0.1", 58 | "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-11.0.1.tgz", 59 | "integrity": "sha512-ltlsj/4Bhwwhb+Nb5xCz/6vieuEj2/BAkkqVIKmZwC7pIdl8srmgmglE4S0jFlZa32K4qvdQ6NHdmpRKD/LwoQ==", 60 | "dev": true, 61 | "requires": { 62 | "@rollup/pluginutils": "^3.1.0", 63 | "@types/resolve": "1.17.1", 64 | "builtin-modules": "^3.1.0", 65 | "deepmerge": "^4.2.2", 66 | "is-module": "^1.0.0", 67 | "resolve": "^1.19.0" 68 | } 69 | }, 70 | "@rollup/plugin-typescript": { 71 | "version": "8.1.0", 72 | "resolved": "https://registry.npmjs.org/@rollup/plugin-typescript/-/plugin-typescript-8.1.0.tgz", 73 | "integrity": "sha512-pyQlcGQYRsONUDwXK3ckGPHjPzmjlq4sinzr7emW8ZMb2oZjg9WLcdcP8wyHSvBjvHrLzMayyPy079RROqb4vw==", 74 | "dev": true, 75 | "requires": { 76 | "@rollup/pluginutils": "^3.1.0", 77 | "resolve": "^1.17.0" 78 | } 79 | }, 80 | "@rollup/pluginutils": { 81 | "version": "3.1.0", 82 | "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-3.1.0.tgz", 83 | "integrity": "sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg==", 84 | "dev": true, 85 | "requires": { 86 | "@types/estree": "0.0.39", 87 | "estree-walker": "^1.0.1", 88 | "picomatch": "^2.2.2" 89 | } 90 | }, 91 | "@types/codemirror": { 92 | "version": "0.0.98", 93 | "resolved": "https://registry.npmjs.org/@types/codemirror/-/codemirror-0.0.98.tgz", 94 | "integrity": "sha512-cbty5LPayy2vNSeuUdjNA9tggG+go5vAxmnLDRWpiZI5a+RDBi9dlozy4/jW/7P/gletbBWbQREEa7A81YxstA==", 95 | "dev": true, 96 | "requires": { 97 | "@types/tern": "*" 98 | } 99 | }, 100 | "@types/estree": { 101 | "version": "0.0.39", 102 | "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz", 103 | "integrity": "sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==", 104 | "dev": true 105 | }, 106 | "@types/fs-extra": { 107 | "version": "8.1.1", 108 | "resolved": "https://registry.npmjs.org/@types/fs-extra/-/fs-extra-8.1.1.tgz", 109 | "integrity": "sha512-TcUlBem321DFQzBNuz8p0CLLKp0VvF/XH9E4KHNmgwyp4E3AfgI5cjiIVZWlbfThBop2qxFIh4+LeY6hVWWZ2w==", 110 | "dev": true, 111 | "requires": { 112 | "@types/node": "*" 113 | } 114 | }, 115 | "@types/glob": { 116 | "version": "7.1.3", 117 | "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.1.3.tgz", 118 | "integrity": "sha512-SEYeGAIQIQX8NN6LDKprLjbrd5dARM5EXsd8GI/A5l0apYI1fGMWgPHSe4ZKL4eozlAyI+doUE9XbYS4xCkQ1w==", 119 | "dev": true, 120 | "requires": { 121 | "@types/minimatch": "*", 122 | "@types/node": "*" 123 | } 124 | }, 125 | "@types/minimatch": { 126 | "version": "3.0.3", 127 | "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.3.tgz", 128 | "integrity": "sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA==", 129 | "dev": true 130 | }, 131 | "@types/node": { 132 | "version": "14.14.20", 133 | "resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.20.tgz", 134 | "integrity": "sha512-Y93R97Ouif9JEOWPIUyU+eyIdyRqQR0I8Ez1dzku4hDx34NWh4HbtIc3WNzwB1Y9ULvNGeu5B8h8bVL5cAk4/A==", 135 | "dev": true 136 | }, 137 | "@types/resolve": { 138 | "version": "1.17.1", 139 | "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.17.1.tgz", 140 | "integrity": "sha512-yy7HuzQhj0dhGpD8RLXSZWEkLsV9ibvxvi6EiJ3bkqLAO1RGo0WbkWQiwpRlSFymTJRz0d3k5LM3kkx8ArDbLw==", 141 | "dev": true, 142 | "requires": { 143 | "@types/node": "*" 144 | } 145 | }, 146 | "@types/tern": { 147 | "version": "0.23.3", 148 | "resolved": "https://registry.npmjs.org/@types/tern/-/tern-0.23.3.tgz", 149 | "integrity": "sha512-imDtS4TAoTcXk0g7u4kkWqedB3E4qpjXzCpD2LU5M5NAXHzCDsypyvXSaG7mM8DKYkCRa7tFp4tS/lp/Wo7Q3w==", 150 | "dev": true, 151 | "requires": { 152 | "@types/estree": "*" 153 | } 154 | }, 155 | "array-union": { 156 | "version": "2.1.0", 157 | "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", 158 | "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", 159 | "dev": true 160 | }, 161 | "balanced-match": { 162 | "version": "1.0.0", 163 | "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", 164 | "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", 165 | "dev": true 166 | }, 167 | "brace-expansion": { 168 | "version": "1.1.11", 169 | "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", 170 | "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", 171 | "dev": true, 172 | "requires": { 173 | "balanced-match": "^1.0.0", 174 | "concat-map": "0.0.1" 175 | } 176 | }, 177 | "braces": { 178 | "version": "3.0.2", 179 | "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", 180 | "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", 181 | "dev": true, 182 | "requires": { 183 | "fill-range": "^7.0.1" 184 | } 185 | }, 186 | "builtin-modules": { 187 | "version": "3.2.0", 188 | "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.2.0.tgz", 189 | "integrity": "sha512-lGzLKcioL90C7wMczpkY0n/oART3MbBa8R9OFGE1rJxoVI86u4WAGfEk8Wjv10eKSyTHVGkSo3bvBylCEtk7LA==", 190 | "dev": true 191 | }, 192 | "colorette": { 193 | "version": "1.2.1", 194 | "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.2.1.tgz", 195 | "integrity": "sha512-puCDz0CzydiSYOrnXpz/PKd69zRrribezjtE9yd4zvytoRc8+RY/KJPvtPFKZS3E3wP6neGyMe0vOTlHO5L3Pw==", 196 | "dev": true 197 | }, 198 | "commondir": { 199 | "version": "1.0.1", 200 | "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", 201 | "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", 202 | "dev": true 203 | }, 204 | "concat-map": { 205 | "version": "0.0.1", 206 | "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", 207 | "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", 208 | "dev": true 209 | }, 210 | "deepmerge": { 211 | "version": "4.2.2", 212 | "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz", 213 | "integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==", 214 | "dev": true 215 | }, 216 | "dir-glob": { 217 | "version": "3.0.1", 218 | "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", 219 | "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", 220 | "dev": true, 221 | "requires": { 222 | "path-type": "^4.0.0" 223 | } 224 | }, 225 | "estree-walker": { 226 | "version": "1.0.1", 227 | "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-1.0.1.tgz", 228 | "integrity": "sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg==", 229 | "dev": true 230 | }, 231 | "fast-glob": { 232 | "version": "3.2.4", 233 | "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.4.tgz", 234 | "integrity": "sha512-kr/Oo6PX51265qeuCYsyGypiO5uJFgBS0jksyG7FUeCyQzNwYnzrNIMR1NXfkZXsMYXYLRAHgISHBz8gQcxKHQ==", 235 | "dev": true, 236 | "requires": { 237 | "@nodelib/fs.stat": "^2.0.2", 238 | "@nodelib/fs.walk": "^1.2.3", 239 | "glob-parent": "^5.1.0", 240 | "merge2": "^1.3.0", 241 | "micromatch": "^4.0.2", 242 | "picomatch": "^2.2.1" 243 | } 244 | }, 245 | "fastq": { 246 | "version": "1.10.0", 247 | "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.10.0.tgz", 248 | "integrity": "sha512-NL2Qc5L3iQEsyYzweq7qfgy5OtXCmGzGvhElGEd/SoFWEMOEczNh5s5ocaF01HDetxz+p8ecjNPA6cZxxIHmzA==", 249 | "dev": true, 250 | "requires": { 251 | "reusify": "^1.0.4" 252 | } 253 | }, 254 | "fill-range": { 255 | "version": "7.0.1", 256 | "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", 257 | "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", 258 | "dev": true, 259 | "requires": { 260 | "to-regex-range": "^5.0.1" 261 | } 262 | }, 263 | "fs-extra": { 264 | "version": "8.1.0", 265 | "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", 266 | "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", 267 | "dev": true, 268 | "requires": { 269 | "graceful-fs": "^4.2.0", 270 | "jsonfile": "^4.0.0", 271 | "universalify": "^0.1.0" 272 | } 273 | }, 274 | "fs.realpath": { 275 | "version": "1.0.0", 276 | "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", 277 | "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", 278 | "dev": true 279 | }, 280 | "fsevents": { 281 | "version": "2.1.3", 282 | "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.3.tgz", 283 | "integrity": "sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ==", 284 | "dev": true, 285 | "optional": true 286 | }, 287 | "function-bind": { 288 | "version": "1.1.1", 289 | "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", 290 | "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", 291 | "dev": true 292 | }, 293 | "glob": { 294 | "version": "7.1.6", 295 | "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", 296 | "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", 297 | "dev": true, 298 | "requires": { 299 | "fs.realpath": "^1.0.0", 300 | "inflight": "^1.0.4", 301 | "inherits": "2", 302 | "minimatch": "^3.0.4", 303 | "once": "^1.3.0", 304 | "path-is-absolute": "^1.0.0" 305 | } 306 | }, 307 | "glob-parent": { 308 | "version": "5.1.1", 309 | "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz", 310 | "integrity": "sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==", 311 | "dev": true, 312 | "requires": { 313 | "is-glob": "^4.0.1" 314 | } 315 | }, 316 | "globby": { 317 | "version": "10.0.1", 318 | "resolved": "https://registry.npmjs.org/globby/-/globby-10.0.1.tgz", 319 | "integrity": "sha512-sSs4inE1FB2YQiymcmTv6NWENryABjUNPeWhOvmn4SjtKybglsyPZxFB3U1/+L1bYi0rNZDqCLlHyLYDl1Pq5A==", 320 | "dev": true, 321 | "requires": { 322 | "@types/glob": "^7.1.1", 323 | "array-union": "^2.1.0", 324 | "dir-glob": "^3.0.1", 325 | "fast-glob": "^3.0.3", 326 | "glob": "^7.1.3", 327 | "ignore": "^5.1.1", 328 | "merge2": "^1.2.3", 329 | "slash": "^3.0.0" 330 | } 331 | }, 332 | "graceful-fs": { 333 | "version": "4.2.4", 334 | "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.4.tgz", 335 | "integrity": "sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==", 336 | "dev": true 337 | }, 338 | "has": { 339 | "version": "1.0.3", 340 | "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", 341 | "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", 342 | "dev": true, 343 | "requires": { 344 | "function-bind": "^1.1.1" 345 | } 346 | }, 347 | "ignore": { 348 | "version": "5.1.8", 349 | "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.8.tgz", 350 | "integrity": "sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw==", 351 | "dev": true 352 | }, 353 | "inflight": { 354 | "version": "1.0.6", 355 | "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", 356 | "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", 357 | "dev": true, 358 | "requires": { 359 | "once": "^1.3.0", 360 | "wrappy": "1" 361 | } 362 | }, 363 | "inherits": { 364 | "version": "2.0.4", 365 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", 366 | "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", 367 | "dev": true 368 | }, 369 | "is-core-module": { 370 | "version": "2.2.0", 371 | "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.2.0.tgz", 372 | "integrity": "sha512-XRAfAdyyY5F5cOXn7hYQDqh2Xmii+DEfIcQGxK/uNwMHhIkPWO0g8msXcbzLe+MpGoR951MlqM/2iIlU4vKDdQ==", 373 | "dev": true, 374 | "requires": { 375 | "has": "^1.0.3" 376 | } 377 | }, 378 | "is-extglob": { 379 | "version": "2.1.1", 380 | "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", 381 | "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", 382 | "dev": true 383 | }, 384 | "is-glob": { 385 | "version": "4.0.1", 386 | "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", 387 | "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", 388 | "dev": true, 389 | "requires": { 390 | "is-extglob": "^2.1.1" 391 | } 392 | }, 393 | "is-module": { 394 | "version": "1.0.0", 395 | "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz", 396 | "integrity": "sha1-Mlj7afeMFNW4FdZkM2tM/7ZEFZE=", 397 | "dev": true 398 | }, 399 | "is-number": { 400 | "version": "7.0.0", 401 | "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", 402 | "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", 403 | "dev": true 404 | }, 405 | "is-plain-object": { 406 | "version": "3.0.1", 407 | "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-3.0.1.tgz", 408 | "integrity": "sha512-Xnpx182SBMrr/aBik8y+GuR4U1L9FqMSojwDQwPMmxyC6bvEqly9UBCxhauBF5vNh2gwWJNX6oDV7O+OM4z34g==", 409 | "dev": true 410 | }, 411 | "is-reference": { 412 | "version": "1.2.1", 413 | "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-1.2.1.tgz", 414 | "integrity": "sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ==", 415 | "dev": true, 416 | "requires": { 417 | "@types/estree": "*" 418 | } 419 | }, 420 | "jsonfile": { 421 | "version": "4.0.0", 422 | "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", 423 | "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", 424 | "dev": true, 425 | "requires": { 426 | "graceful-fs": "^4.1.6" 427 | } 428 | }, 429 | "magic-string": { 430 | "version": "0.25.7", 431 | "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.7.tgz", 432 | "integrity": "sha512-4CrMT5DOHTDk4HYDlzmwu4FVCcIYI8gauveasrdCu2IKIFOJ3f0v/8MDGJCDL9oD2ppz/Av1b0Nj345H9M+XIA==", 433 | "dev": true, 434 | "requires": { 435 | "sourcemap-codec": "^1.4.4" 436 | } 437 | }, 438 | "merge2": { 439 | "version": "1.4.1", 440 | "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", 441 | "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", 442 | "dev": true 443 | }, 444 | "micromatch": { 445 | "version": "4.0.2", 446 | "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.2.tgz", 447 | "integrity": "sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q==", 448 | "dev": true, 449 | "requires": { 450 | "braces": "^3.0.1", 451 | "picomatch": "^2.0.5" 452 | } 453 | }, 454 | "minimatch": { 455 | "version": "3.0.4", 456 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", 457 | "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", 458 | "dev": true, 459 | "requires": { 460 | "brace-expansion": "^1.1.7" 461 | } 462 | }, 463 | "obsidian": { 464 | "version": "https://github.com/obsidianmd/obsidian-api/tarball/master", 465 | "integrity": "sha512-oE7FLE1ICQNKWBm9swMJPlO/iSYtCpau0ANbHx2RNfVyb2/jJMkqcUCcyVYNjwSb1bEn+uU5lkgzrPsk9wJNYA==", 466 | "dev": true, 467 | "requires": { 468 | "@types/codemirror": "0.0.98" 469 | } 470 | }, 471 | "once": { 472 | "version": "1.4.0", 473 | "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", 474 | "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", 475 | "dev": true, 476 | "requires": { 477 | "wrappy": "1" 478 | } 479 | }, 480 | "path-is-absolute": { 481 | "version": "1.0.1", 482 | "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", 483 | "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", 484 | "dev": true 485 | }, 486 | "path-parse": { 487 | "version": "1.0.6", 488 | "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", 489 | "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", 490 | "dev": true 491 | }, 492 | "path-type": { 493 | "version": "4.0.0", 494 | "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", 495 | "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", 496 | "dev": true 497 | }, 498 | "picomatch": { 499 | "version": "2.2.2", 500 | "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz", 501 | "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==", 502 | "dev": true 503 | }, 504 | "resolve": { 505 | "version": "1.19.0", 506 | "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.19.0.tgz", 507 | "integrity": "sha512-rArEXAgsBG4UgRGcynxWIWKFvh/XZCcS8UJdHhwy91zwAvCZIbcs+vAbflgBnNjYMs/i/i+/Ux6IZhML1yPvxg==", 508 | "dev": true, 509 | "requires": { 510 | "is-core-module": "^2.1.0", 511 | "path-parse": "^1.0.6" 512 | } 513 | }, 514 | "reusify": { 515 | "version": "1.0.4", 516 | "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", 517 | "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", 518 | "dev": true 519 | }, 520 | "rollup": { 521 | "version": "2.36.1", 522 | "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.36.1.tgz", 523 | "integrity": "sha512-eAfqho8dyzuVvrGqpR0ITgEdq0zG2QJeWYh+HeuTbpcaXk8vNFc48B7bJa1xYosTCKx0CuW+447oQOW8HgBIZQ==", 524 | "dev": true, 525 | "requires": { 526 | "fsevents": "~2.1.2" 527 | } 528 | }, 529 | "rollup-plugin-copy": { 530 | "version": "3.3.0", 531 | "resolved": "https://registry.npmjs.org/rollup-plugin-copy/-/rollup-plugin-copy-3.3.0.tgz", 532 | "integrity": "sha512-euDjCUSBXZa06nqnwCNADbkAcYDfzwowfZQkto9K/TFhiH+QG7I4PUsEMwM9tDgomGWJc//z7KLW8t+tZwxADA==", 533 | "dev": true, 534 | "requires": { 535 | "@types/fs-extra": "^8.0.1", 536 | "colorette": "^1.1.0", 537 | "fs-extra": "^8.1.0", 538 | "globby": "10.0.1", 539 | "is-plain-object": "^3.0.0" 540 | } 541 | }, 542 | "run-parallel": { 543 | "version": "1.1.10", 544 | "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.1.10.tgz", 545 | "integrity": "sha512-zb/1OuZ6flOlH6tQyMPUrE3x3Ulxjlo9WIVXR4yVYi4H9UXQaeIsPbLn2R3O3vQCnDKkAl2qHiuocKKX4Tz/Sw==", 546 | "dev": true 547 | }, 548 | "slash": { 549 | "version": "3.0.0", 550 | "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", 551 | "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", 552 | "dev": true 553 | }, 554 | "sourcemap-codec": { 555 | "version": "1.4.8", 556 | "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz", 557 | "integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==", 558 | "dev": true 559 | }, 560 | "to-regex-range": { 561 | "version": "5.0.1", 562 | "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", 563 | "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", 564 | "dev": true, 565 | "requires": { 566 | "is-number": "^7.0.0" 567 | } 568 | }, 569 | "tslib": { 570 | "version": "2.1.0", 571 | "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.1.0.tgz", 572 | "integrity": "sha512-hcVC3wYEziELGGmEEXue7D75zbwIIVUMWAVbHItGPx0ziyXxrOMQx4rQEVEV45Ut/1IotuEvwqPopzIOkDMf0A==", 573 | "dev": true 574 | }, 575 | "typescript": { 576 | "version": "4.1.3", 577 | "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.1.3.tgz", 578 | "integrity": "sha512-B3ZIOf1IKeH2ixgHhj6la6xdwR9QrLC5d1VKeCSY4tvkqhF2eqd9O7txNlS0PO3GrBAFIdr3L1ndNwteUbZLYg==", 579 | "dev": true 580 | }, 581 | "universalify": { 582 | "version": "0.1.2", 583 | "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", 584 | "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", 585 | "dev": true 586 | }, 587 | "wrappy": { 588 | "version": "1.0.2", 589 | "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", 590 | "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", 591 | "dev": true 592 | } 593 | } 594 | } 595 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "obsidian-query2table", 3 | "version": "0.1.0", 4 | "description": "add functionality to YAML metadata in obsidian.md", 5 | "main": "main.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "repository": { 10 | "type": "git", 11 | "url": "git+https://github.com/avirut/obsidian-query2table.git" 12 | }, 13 | "author": "avirut", 14 | "license": "ISC", 15 | "bugs": { 16 | "url": "https://github.com/avirut/obsidian-query2table/issues" 17 | }, 18 | "homepage": "https://github.com/avirut/obsidian-query2table#readme", 19 | "dependencies": {}, 20 | "devDependencies": { 21 | "@rollup/plugin-commonjs": "^17.0.0", 22 | "@rollup/plugin-node-resolve": "^11.0.1", 23 | "@rollup/plugin-typescript": "^8.1.0", 24 | "rollup-plugin-copy": "^3.3.0", 25 | "obsidian": "https://github.com/obsidianmd/obsidian-api/tarball/master", 26 | "rollup": "^2.32.1", 27 | "tslib": "^2.0.3", 28 | "typescript": "^4.0.3" 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /rollup.config.js: -------------------------------------------------------------------------------- 1 | import typescript from '@rollup/plugin-typescript'; 2 | import {nodeResolve} from '@rollup/plugin-node-resolve'; 3 | import commonjs from '@rollup/plugin-commonjs'; 4 | import copy from 'rollup-plugin-copy'; 5 | 6 | export default { 7 | input: 'main.ts', 8 | output: { 9 | dir: 'C:/Users/avirut/Documents/GitHub/obsidian-pluginpilot/.obsidian/plugins/obsidian-query2table', 10 | sourcemap: 'inline', 11 | format: 'cjs', 12 | exports: 'default', 13 | }, 14 | external: ['obsidian'], 15 | plugins: [ 16 | typescript(), 17 | nodeResolve({browser: true}), 18 | commonjs(), 19 | copy({ 20 | targets: [ 21 | {src: 'manifest.json', dest: 'C:/Users/avirut/Documents/GitHub/obsidian-pluginpilot/.obsidian/plugins/obsidian-query2table'}, 22 | {src: 'styles.css', dest: 'C:/Users/avirut/Documents/GitHub/obsidian-pluginpilot/.obsidian/plugins/obsidian-query2table'} 23 | ] 24 | }) 25 | ] 26 | }; 27 | -------------------------------------------------------------------------------- /styles.css: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "baseUrl": ".", 4 | "outDir": "C:/Users/avirut/Documents/GitHub/obsidian-pluginpilot/.obsidian/plugins/obsidian-query2table", 5 | "inlineSourceMap": true, 6 | "inlineSources": true, 7 | "module": "ESNext", 8 | "target": "es5", 9 | "allowJs": true, 10 | "noImplicitAny": true, 11 | "moduleResolution": "node", 12 | "importHelpers": true, 13 | "allowSyntheticDefaultImports": true, 14 | "lib": [ 15 | "dom", 16 | "es5", 17 | "scripthost", 18 | "es2015" 19 | ] 20 | }, 21 | "include": [ 22 | "**/*.ts", 23 | ] 24 | } 25 | -------------------------------------------------------------------------------- /versions.json: -------------------------------------------------------------------------------- 1 | { 2 | "0.1.0": "0.10.6", 3 | "0.1.1": "0.10.6" 4 | } 5 | --------------------------------------------------------------------------------