Release 2.0.6

This commit is contained in:
github-actions
2021-05-23 06:13:49 +00:00
parent cb598c11b1
commit 01ef10652e
12 changed files with 30 additions and 11 deletions
+1
View File
@@ -0,0 +1 @@
var e=Object.defineProperty,a=Object.defineProperties,t=Object.getOwnPropertyDescriptors,n=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable,s=(a,t,n)=>t in a?e(a,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):a[t]=n,i=(e,a)=>{for(var t in a||(a={}))o.call(a,t)&&s(e,t,a[t]);if(n)for(var t of n(a))r.call(a,t)&&s(e,t,a[t]);return e},c=(e,n)=>a(e,t(n));import{a2 as l,a3 as d,C as u,a4 as p,a0 as f,a6 as h,a9 as m,S as y,i as g,s as v,e as b,c as O,a as w,d as S,b as E,O as x,f as D,F as j,G as C,a7 as T,z as P,a8 as J,J as N}from"./vendor-05ca1e79.js";const I=l(u({code:"graph TD\n A[Christmas] --\x3e|Get money| B(Go shopping)\n B --\x3e C{Let me think}\n C --\x3e|One| D[Laptop]\n C --\x3e|Two| E[iPhone]\n C --\x3e|Three| F[fa:fa-car Car]\n ",mermaid:JSON.stringify({theme:"default"},null,2),updateEditor:!1,autoSync:!0,updateDiagram:!0}),d(),"codeStore"),L=p([I],(([e],a)=>{a(f(JSON.stringify(e),!0))})),G=e=>{I.update((a=>i(i({},a),e)))};let V=!1;const k=(e,a,t=!1)=>{if((e.match(/\n/g)||"").length+1>50&&!V&&h(I).autoSync){const e=confirm("Long diagram deteced. Turn off Auto Sync? Click the sync logo to manually sync.");V=!0,e&&G({autoSync:!1})}I.update((n=>c(i({},n),{code:e,updateEditor:a,updateDiagram:t})))},z=(e,a)=>{I.update((t=>c(i({},t),{mermaid:e,updateEditor:a})))},A=()=>JSON.stringify(h(I)),B=u(void 0);function F(e){let a,t;return{c(){a=b("div"),t=b("div"),this.h()},l(e){a=O(e,"DIV",{id:!0,class:!0});var n=w(a);t=O(n,"DIV",{id:!0,class:!0}),w(t).forEach(S),n.forEach(S),this.h()},h(){E(t,"id","container"),E(t,"class","flex-1 overflow-auto"),E(a,"id","view"),E(a,"class","p-2 svelte-7vvt6c"),x(a,"error",e[1]),x(a,"outOfSync",e[2])},m(n,o){D(n,a,o),j(a,t),e[3](t)},p(e,[t]){2&t&&x(a,"error",e[1]),4&t&&x(a,"outOfSync",e[2])},i:C,o:C,d(t){t&&S(a),e[3](null)}}}function _(e,a,t){let n;T(e,I,(e=>t(6,n=e)));var o=this&&this.__awaiter||function(e,a,t,n){return new(t||(t=Promise))((function(o,r){function s(e){try{c(n.next(e))}catch(a){r(a)}}function i(e){try{c(n.throw(e))}catch(a){r(a)}}function c(e){var a;e.done?o(e.value):(a=e.value,a instanceof t?a:new t((function(e){e(a)}))).then(s,i)}c((n=n.apply(e,a||[])).next())}))};const r=window.mermaid;let s,i="",c=!1,l=!1,d=!0;P((()=>o(void 0,void 0,void 0,(function*(){I.subscribe((e=>{try{if(s&&e&&(e.updateDiagram||e.autoSync)){e.autoSync||J(I,n.updateDiagram=!1,n),t(2,l=!1),d=!0,i=e.code;const a=s.parentElement.parentElement.parentElement.scrollTop;t(0,s.innerHTML=i,s),delete s.dataset.processed,r.initialize(Object.assign({},JSON.parse(e.mermaid))),r.init(s),r.render("graph-div",i,u),t(0,s.parentElement.parentElement.parentElement.scrollTop=a,s)}else d?d=!1:t(2,l=!0)}catch(a){console.log("view fail",a),t(1,c=!0)}})),B.subscribe((e=>{void 0===e?t(1,c=!1):(t(1,c=!0),console.log("Error: ",e))}))}))));const u=(e,a)=>{};return[s,c,l,function(e){N[e?"unshift":"push"]((()=>{s=e,t(0,s)}))}]}class H extends y{constructor(e){super(),g(this,e,_,F,v,{})}}const M=()=>{(e=>{let a;try{const t=m(e);console.log(`Tring to load state: ${t}`),a=JSON.parse(t)}catch(t){e&&console.error("Init error",t),a=h(I),console.log(a)}G(c(i({},a),{updateEditor:!0}))})(window.location.hash.slice(1))},$=()=>{G({updateDiagram:!0})},q=()=>{M(),$(),L.subscribe((e=>{window.location.hash=e}))};export{H as V,z as a,L as b,I as c,B as e,A as g,q as i,$ as s,k as u};
File diff suppressed because one or more lines are too long
+1
View File
@@ -0,0 +1 @@
import{S as s,i as r,s as a,e as t,t as e,c as o,a as c,g as n,d as u,f as p,F as l,h as f,k as i,l as d,n as m,G as h}from"./chunks/vendor-05ca1e79.js";function k(s){let r,a,i=s[1].stack+"";return{c(){r=t("pre"),a=e(i)},l(s){r=o(s,"PRE",{});var t=c(r);a=n(t,i),t.forEach(u)},m(s,t){p(s,r,t),l(r,a)},p(s,r){2&r&&i!==(i=s[1].stack+"")&&f(a,i)},d(s){s&&u(r)}}}function v(s){let r,a,v,E,g,x,P,$=s[1].message+"",j=s[1].stack&&k(s);return{c(){r=t("h1"),a=e(s[0]),v=i(),E=t("p"),g=e($),x=i(),j&&j.c(),P=d()},l(t){r=o(t,"H1",{});var e=c(r);a=n(e,s[0]),e.forEach(u),v=m(t),E=o(t,"P",{});var p=c(E);g=n(p,$),p.forEach(u),x=m(t),j&&j.l(t),P=d()},m(s,t){p(s,r,t),l(r,a),p(s,v,t),p(s,E,t),l(E,g),p(s,x,t),j&&j.m(s,t),p(s,P,t)},p(s,[r]){1&r&&f(a,s[0]),2&r&&$!==($=s[1].message+"")&&f(g,$),s[1].stack?j?j.p(s,r):(j=k(s),j.c(),j.m(P.parentNode,P)):j&&(j.d(1),j=null)},i:h,o:h,d(s){s&&u(r),s&&u(v),s&&u(E),s&&u(x),j&&j.d(s),s&&u(P)}}}function E({error:s,status:r}){return{props:{error:s,status:r}}}function g(s,r,a){let{status:t}=r,{error:e}=r;return s.$$set=s=>{"status"in s&&a(0,t=s.status),"error"in s&&a(1,e=s.error)},[t,e]}export default class extends s{constructor(s){super(),r(this,s,g,v,a,{status:0,error:1})}}export{E as load};
@@ -0,0 +1 @@
import{S as s,i as a,s as e,D as t,e as c,c as l,a as n,d as o,b as r,f as u,E as i,v as $,r as h}from"../chunks/vendor-05ca1e79.js";function p(s){let a,e;const p=s[1].default,d=t(p,s,s[0],null);return{c(){a=c("main"),d&&d.c(),this.h()},l(s){a=l(s,"MAIN",{class:!0});var e=n(a);d&&d.l(e),e.forEach(o),this.h()},h(){r(a,"class","h-screen")},m(s,t){u(s,a,t),d&&d.m(a,null),e=!0},p(s,[a]){d&&d.p&&(!e||1&a)&&i(d,p,s,s[0],a,null,null)},i(s){e||($(d,s),e=!0)},o(s){h(d,s),e=!1},d(s){s&&o(a),d&&d.d(s)}}}function d(s,a,e){let{$$slots:t={},$$scope:c}=a;return s.$$set=s=>{"$$scope"in s&&e(0,c=s.$$scope)},[c,t]}export default class extends s{constructor(s){super(),a(this,s,d,p,e,{})}}
File diff suppressed because one or more lines are too long
+1
View File
@@ -0,0 +1 @@
import{S as t,i as n,s as e,H as i,d as o,G as s,z as a}from"../chunks/vendor-05ca1e79.js";import{g as c}from"../chunks/navigation-20968cc5.js";import{b as r}from"../chunks/paths-45dac81d.js";import"../chunks/singletons-bb9012b7.js";function u(t){return{c(){this.h()},l(t){i('[data-svelte="svelte-wtz6kg"]',document.head).forEach(o),this.h()},h(){document.title="Mermaid Live Editor"},m:s,p:s,i:s,o:s,d:s}}function h(t){var n=this&&this.__awaiter||function(t,n,e,i){return new(e||(e=Promise))((function(o,s){function a(t){try{r(i.next(t))}catch(n){s(n)}}function c(t){try{r(i.throw(t))}catch(n){s(n)}}function r(t){var n;t.done?o(t.value):(n=t.value,n instanceof e?n:new e((function(t){t(n)}))).then(a,c)}r((i=i.apply(t,n||[])).next())}))};return a((()=>n(void 0,void 0,void 0,(function*(){const t=window.location.hash.split("/");let n="edit";t.length>2&&(n=`${t[1]}#${t[2]}`),yield c(`${r}/${n}`,{replaceState:!0})})))),[]}export default class extends t{constructor(t){super(),n(this,t,h,u,e,{})}}
+1
View File
@@ -0,0 +1 @@
import{S as s,i as a,s as r,j as t,m as n,o as e,G as o,v as c,r as m,w as u,z as f}from"../chunks/vendor-05ca1e79.js";import{V as i,i as $}from"../chunks/util-bc8a8da5.js";function d(s){let a,r;return a=new i({}),{c(){t(a.$$.fragment)},l(s){n(a.$$.fragment,s)},m(s,t){e(a,s,t),r=!0},p:o,i(s){r||(c(a.$$.fragment,s),r=!0)},o(s){m(a.$$.fragment,s),r=!1},d(s){u(a,s)}}}function l(s){return f($),[]}export default class extends s{constructor(s){super(),a(this,s,l,d,r,{})}}
File diff suppressed because one or more lines are too long
+4 -3
View File
@@ -57,14 +57,14 @@
<link rel="modulepreload" href="/mermaid-live-editor/_app/start-f696efea.js">
<link rel="modulepreload" href="/mermaid-live-editor/_app/chunks/vendor-a9bf48e1.js">
<link rel="modulepreload" href="/mermaid-live-editor/_app/start-f0454743.js">
<link rel="modulepreload" href="/mermaid-live-editor/_app/chunks/vendor-05ca1e79.js">
<link rel="modulepreload" href="/mermaid-live-editor/_app/chunks/singletons-bb9012b7.js">
<link rel="modulepreload" href="/mermaid-live-editor/_app/chunks/paths-45dac81d.js">
<link rel="stylesheet" href="/mermaid-live-editor/_app/assets/start-0826e215.css">
<script type="module">
import { start } from "/mermaid-live-editor/_app/start-f696efea.js";
import { start } from "/mermaid-live-editor/_app/start-f0454743.js";
start({
target: document.querySelector("#svelte"),
paths: {"base":"/mermaid-live-editor","assets":"/mermaid-live-editor"},
@@ -72,6 +72,7 @@
host: location.host,
route: true,
spa: true,
trailing_slash: "never",
hydrate: null
});
</script>
+4 -3
View File
@@ -57,14 +57,14 @@
<link rel="modulepreload" href="/mermaid-live-editor/_app/start-f696efea.js">
<link rel="modulepreload" href="/mermaid-live-editor/_app/chunks/vendor-a9bf48e1.js">
<link rel="modulepreload" href="/mermaid-live-editor/_app/start-f0454743.js">
<link rel="modulepreload" href="/mermaid-live-editor/_app/chunks/vendor-05ca1e79.js">
<link rel="modulepreload" href="/mermaid-live-editor/_app/chunks/singletons-bb9012b7.js">
<link rel="modulepreload" href="/mermaid-live-editor/_app/chunks/paths-45dac81d.js">
<link rel="stylesheet" href="/mermaid-live-editor/_app/assets/start-0826e215.css">
<script type="module">
import { start } from "/mermaid-live-editor/_app/start-f696efea.js";
import { start } from "/mermaid-live-editor/_app/start-f0454743.js";
start({
target: document.querySelector("#svelte"),
paths: {"base":"/mermaid-live-editor","assets":"/mermaid-live-editor"},
@@ -72,6 +72,7 @@
host: location.host,
route: true,
spa: true,
trailing_slash: "never",
hydrate: null
});
</script>
+4 -3
View File
@@ -57,14 +57,14 @@
<link rel="modulepreload" href="/mermaid-live-editor/_app/start-f696efea.js">
<link rel="modulepreload" href="/mermaid-live-editor/_app/chunks/vendor-a9bf48e1.js">
<link rel="modulepreload" href="/mermaid-live-editor/_app/start-f0454743.js">
<link rel="modulepreload" href="/mermaid-live-editor/_app/chunks/vendor-05ca1e79.js">
<link rel="modulepreload" href="/mermaid-live-editor/_app/chunks/singletons-bb9012b7.js">
<link rel="modulepreload" href="/mermaid-live-editor/_app/chunks/paths-45dac81d.js">
<link rel="stylesheet" href="/mermaid-live-editor/_app/assets/start-0826e215.css">
<script type="module">
import { start } from "/mermaid-live-editor/_app/start-f696efea.js";
import { start } from "/mermaid-live-editor/_app/start-f0454743.js";
start({
target: document.querySelector("#svelte"),
paths: {"base":"/mermaid-live-editor","assets":"/mermaid-live-editor"},
@@ -72,6 +72,7 @@
host: location.host,
route: true,
spa: true,
trailing_slash: "never",
hydrate: null
});
</script>