Update example page

This commit is contained in:
Benjamin Bädorf 2022-03-11 19:18:43 +01:00
parent ca8d26ccc9
commit 190a8be207
No known key found for this signature in database
GPG key ID: 4406E80E13CD656C
36 changed files with 34 additions and 30 deletions

View file

@ -1 +0,0 @@
{"version":3,"file":"display.38f829d6.js","sources":["../../../image/lib/display.tsx"],"sourcesContent":["import { defineComponent, PropType } from 'vue';\nimport {\n model,\n SbBlock,\n} from '@schlechtenburg/core';\nimport {\n getDefaultData,\n ImageData,\n} from './util';\n\nimport './style.scss';\n\nexport default defineComponent({\n name: 'sb-image-display',\n\n model,\n\n props: {\n data: {\n type: (null as unknown) as PropType<ImageData>,\n default: getDefaultData,\n },\n },\n\n setup(props) {\n return () => <figure class=\"sb-image\">\n <img\n class=\"sb-image__content\"\n src={props.data.src}\n alt={props.data.alt}\n />\n <SbBlock block={props.data.description} />\n </figure>;\n },\n});\n"],"names":["defineComponent","name","model","props","data","type","default","getDefaultData","setup","src","alt","description"],"mappings":"gGAYA,MAAeA,EAAgB,CAC7BC,KAAM,mBAENC,MAAAA,EAEAC,MAAO,CACLC,KAAM,CACJC,KAAO,KACPC,QAASC,IAIbC,MAAML,GACG,sBAAoB,4BAEf,wBACDA,EAAMC,KAAKK,QACXN,EAAMC,KAAKM,sBAEFP,EAAMC,KAAKO"}

View file

@ -1,2 +1,2 @@
var e=Object.defineProperty,t=Object.prototype.hasOwnProperty,a=Object.getOwnPropertySymbols,n=Object.prototype.propertyIsEnumerable,o=(t,a,n)=>a in t?e(t,a,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[a]=n,r=(e,r)=>{for(var l in r||(r={}))t.call(r,l)&&o(e,l,r[l]);if(a)for(var l of a(r))n.call(r,l)&&o(e,l,r[l]);return e};import{d as l,m as p,q as s,a as i,n as c}from"./index.87211b72.js";var u=l({name:"sb-missing-block",model:p,props:r(r({},s),{name:String,data:{type:null,default:null},eventUpdate:{type:Function,default:()=>{}},eventAppendBlock:{type:Function,default:()=>{}},eventRemoveBlock:{type:Function,default:()=>{}}}),setup:e=>()=>i("div",{class:"sb-missing-block"},[c("Missing block: "),e.name])});export default u;
//# sourceMappingURL=display.29fe9284.js.map
var e=Object.defineProperty,t=Object.prototype.hasOwnProperty,a=Object.getOwnPropertySymbols,n=Object.prototype.propertyIsEnumerable,o=(t,a,n)=>a in t?e(t,a,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[a]=n,r=(e,r)=>{for(var l in r||(r={}))t.call(r,l)&&o(e,l,r[l]);if(a)for(var l of a(r))n.call(r,l)&&o(e,l,r[l]);return e};import{d as l,m as p,t as s,a as i,n as c}from"./index.2f19b693.js";var u=l({name:"sb-missing-block",model:p,props:r(r({},s),{name:String,data:{type:null,default:null},eventUpdate:{type:Function,default:()=>{}},eventAppendBlock:{type:Function,default:()=>{}},eventRemoveBlock:{type:Function,default:()=>{}}}),setup:e=>()=>i("div",{class:"sb-missing-block"},[c("Missing block: "),e.name])});export default u;
//# sourceMappingURL=display.3df7ba9d.js.map

View file

@ -1 +1 @@
{"version":3,"file":"display.29fe9284.js","sources":["../../../core/lib/components/MissingBlock/display.tsx"],"sourcesContent":["import { defineComponent, PropType } from 'vue';\nimport {\n model,\n blockProps,\n} from '../../block-helpers';\n\nimport './style.scss';\n\nexport default defineComponent({\n name: 'sb-missing-block',\n\n model,\n\n props: {\n ...blockProps,\n name: String,\n data: {\n type: (null as unknown) as PropType<any>,\n default: null,\n },\n eventUpdate: { type: Function, default: () => {} },\n eventAppendBlock: { type: Function, default: () => {} },\n eventRemoveBlock: { type: Function, default: () => {} },\n },\n\n setup(props) {\n return () => (\n <div class=\"sb-missing-block\">Missing block: {props.name}</div>\n );\n },\n});\n"],"names":["defineComponent","name","model","props","__assign","blockProps","String","data","type","default","eventUpdate","Function","eventAppendBlock","eventRemoveBlock","setup"],"mappings":"uZAQeA,EAAgB,CAC7BC,KAAM,mBAENC,MAAAA,EAEAC,MAAOC,OACFC,GADE,CAELJ,KAAMK,OACNC,KAAM,CACJC,KAAO,KACPC,QAAS,MAEXC,YAAa,CAAEF,KAAMG,SAAUF,QAAS,QACxCG,iBAAkB,CAAEJ,KAAMG,SAAUF,QAAS,QAC7CI,iBAAkB,CAAEL,KAAMG,SAAUF,QAAS,UAG/CK,MAAMX,GACG,mBACM,0CAAmCA,EAAMF"}
{"version":3,"file":"display.3df7ba9d.js","sources":["../../../core/lib/components/MissingBlock/display.tsx"],"sourcesContent":["import { defineComponent, PropType } from 'vue';\nimport {\n model,\n blockProps,\n} from '../../block-helpers';\n\nimport './style.scss';\n\nexport default defineComponent({\n name: 'sb-missing-block',\n\n model,\n\n props: {\n ...blockProps,\n name: String,\n data: {\n type: (null as unknown) as PropType<any>,\n default: null,\n },\n eventUpdate: { type: Function, default: () => {} },\n eventAppendBlock: { type: Function, default: () => {} },\n eventRemoveBlock: { type: Function, default: () => {} },\n },\n\n setup(props) {\n return () => (\n <div class=\"sb-missing-block\">Missing block: {props.name}</div>\n );\n },\n});\n"],"names":["defineComponent","name","model","props","__assign","blockProps","String","data","type","default","eventUpdate","Function","eventAppendBlock","eventRemoveBlock","setup"],"mappings":"uZAQeA,EAAgB,CAC7BC,KAAM,mBAENC,MAAAA,EAEAC,MAAOC,OACFC,GADE,CAELJ,KAAMK,OACNC,KAAM,CACJC,KAAO,KACPC,QAAS,MAEXC,YAAa,CAAEF,KAAMG,SAAUF,QAAS,QACxCG,iBAAkB,CAAEJ,KAAMG,SAAUF,QAAS,QAC7CI,iBAAkB,CAAEL,KAAMG,SAAUF,QAAS,UAG/CK,MAAMX,GACG,mBACM,0CAAmCA,EAAMF"}

View file

@ -1 +0,0 @@
{"version":3,"file":"display.3e29429a.js","sources":["../../../layout/lib/display.tsx"],"sourcesContent":["import {\n defineComponent,\n computed,\n PropType,\n} from 'vue';\nimport {\n model,\n SbBlock,\n} from '@schlechtenburg/core';\nimport {\n LayoutData,\n getDefaultData,\n} from './util';\n\nimport './style.scss';\n\nexport default defineComponent({\n name: 'sb-layout-display',\n\n model,\n\n props: {\n data: {\n type: (null as unknown) as PropType<LayoutData>,\n default: getDefaultData,\n },\n },\n\n setup(props) {\n const classes = computed(() => ({\n 'sb-layout': true,\n [`sb-layout_${props.data.orientation}`]: true,\n }));\n\n return () => (\n <div class={classes.value}>\n {...props.data.children.map((child) => (\n <SbBlock\n key={child.id}\n block={child}\n />\n ))}\n </div>\n );\n },\n});\n"],"names":["defineComponent","name","model","props","data","type","default","getDefaultData","setup","classes","computed","orientation","value","children","map","child","id"],"mappings":"uGAgBA,MAAeA,EAAgB,CAC7BC,KAAM,oBAENC,MAAAA,EAEAC,MAAO,CACLC,KAAM,CACJC,KAAO,KACPC,QAASC,IAIbC,MAAML,SACEM,EAAUC,GAAS,KAAO,cACjB,GACX,aAAYP,EAAMC,KAAKO,gBAAgB,YAGpC,mBACOF,EAAQG,WACdT,EAAMC,KAAKS,SAASC,iBAEfC,EAAMC,SACJD"}

View file

@ -1,2 +1,2 @@
import{d as a,m as s,g as t,c as l,a as e,e as o}from"./index.87211b72.js";/* empty css */var d=a({name:"sb-layout-display",model:s,props:{data:{type:null,default:t}},setup(a){const s=l((()=>({"sb-layout":!0,[`sb-layout_${a.data.orientation}`]:!0})));return()=>e("div",{class:s.value},[...a.data.children.map((a=>e(o,{key:a.id,block:a},null)))])}});export default d;
//# sourceMappingURL=display.3e29429a.js.map
import{d as a,m as s,g as t,c as l,a as e,e as o}from"./index.2f19b693.js";/* empty css */var d=a({name:"sb-layout-display",model:s,props:{data:{type:null,default:t}},setup(a){const s=l((()=>({"sb-layout":!0,[`sb-layout_${a.data.orientation}`]:!0})));return()=>e("div",{class:s.value},[...a.data.children.map((a=>e(o,{key:a.id,block:a},null)))])}});export default d;
//# sourceMappingURL=display.53aa9250.js.map

View file

@ -0,0 +1 @@
{"version":3,"file":"display.53aa9250.js","sources":["../../../layout/lib/display.tsx"],"sourcesContent":["import {\n defineComponent,\n computed,\n PropType,\n} from 'vue';\nimport {\n model,\n SbBlock,\n} from '@schlechtenburg/core';\nimport {\n ILayoutData,\n getDefaultData,\n} from './util';\n\nimport './style.scss';\n\nexport default defineComponent({\n name: 'sb-layout-display',\n\n model,\n\n props: {\n data: {\n type: (null as unknown) as PropType<ILayoutData>,\n default: getDefaultData,\n },\n },\n\n setup(props) {\n const classes = computed(() => ({\n 'sb-layout': true,\n [`sb-layout_${props.data.orientation}`]: true,\n }));\n\n return () => (\n <div class={classes.value}>\n {...props.data.children.map((child) => (\n <SbBlock\n key={child.id}\n block={child}\n />\n ))}\n </div>\n );\n },\n});\n"],"names":["defineComponent","name","model","props","data","type","default","getDefaultData","setup","classes","computed","orientation","value","children","map","child","id"],"mappings":"uGAgBA,MAAeA,EAAgB,CAC7BC,KAAM,oBAENC,MAAAA,EAEAC,MAAO,CACLC,KAAM,CACJC,KAAO,KACPC,QAASC,IAIbC,MAAML,SACEM,EAAUC,GAAS,KAAO,cACjB,GACX,aAAYP,EAAMC,KAAKO,gBAAgB,YAGpC,mBACOF,EAAQG,WACdT,EAAMC,KAAKS,SAASC,iBAEfC,EAAMC,SACJD"}

View file

@ -0,0 +1,2 @@
import{d as a,m as s,p,c as r,a as e,f as t}from"./index.2f19b693.js";/* empty css */var l=a({name:"sb-paragraph-display",model:s,props:{data:{type:Object,default:p}},setup(a){const s=r((()=>({"sb-paragraph":!0,[`sb-paragraph_align-${a.data.align}`]:!0})));return()=>e("p",t({class:s.value},{innerHTML:a.data.value}),null)}});export default l;
//# sourceMappingURL=display.9143f05a.js.map

View file

@ -0,0 +1 @@
{"version":3,"file":"display.9143f05a.js","sources":["../../../paragraph/lib/display.tsx"],"sourcesContent":["import {\n defineComponent,\n computed,\n PropType,\n} from 'vue';\nimport {\n model,\n} from '@schlechtenburg/core';\nimport {\n getDefaultData,\n IParagraphData,\n} from './util';\n\nimport './style.scss';\n\nexport default defineComponent({\n name: 'sb-paragraph-display',\n\n model,\n\n props: {\n data: {\n type: Object as PropType<IParagraphData>,\n default: getDefaultData,\n },\n },\n\n setup(props) {\n const classes = computed(() => ({\n 'sb-paragraph': true,\n [`sb-paragraph_align-${props.data.align}`]: true,\n }));\n\n return () => <p\n class={classes.value}\n {...{\n innerHTML: props.data.value,\n }}\n ></p>;\n },\n});\n"],"names":["defineComponent","name","model","props","data","type","Object","default","getDefaultData","setup","classes","computed","align","value","innerHTML"],"mappings":"kGAeA,MAAeA,EAAgB,CAC7BC,KAAM,uBAENC,MAAAA,EAEAC,MAAO,CACLC,KAAM,CACJC,KAAMC,OACNC,QAASC,IAIbC,MAAMN,SACEO,EAAUC,GAAS,KAAO,iBACd,GACd,sBAAqBR,EAAMC,KAAKQ,UAAU,YAGvC,mBACEF,EAAQG,QAEbC,UAAWX,EAAMC,KAAKS"}

View file

@ -1,2 +1,2 @@
import{d as a,m as s,p as e,a as t,e as l}from"./index.87211b72.js";/* empty css */var d=a({name:"sb-image-display",model:s,props:{data:{type:null,default:e}},setup:a=>()=>t("figure",{class:"sb-image"},[t("img",{class:"sb-image__content",src:a.data.src,alt:a.data.alt},null),t(l,{block:a.data.description},null)])});export default d;
//# sourceMappingURL=display.38f829d6.js.map
import{d as a,m as s,s as e,a as t,e as l}from"./index.2f19b693.js";/* empty css */var d=a({name:"sb-image-display",model:s,props:{data:{type:null,default:e}},setup:a=>()=>t("figure",{class:"sb-image"},[t("img",{class:"sb-image__content",src:a.data.src,alt:a.data.alt},null),t(l,{block:a.data.description},null)])});export default d;
//# sourceMappingURL=display.b625d393.js.map

View file

@ -0,0 +1 @@
{"version":3,"file":"display.b625d393.js","sources":["../../../image/lib/display.tsx"],"sourcesContent":["import { defineComponent, PropType } from 'vue';\nimport {\n model,\n SbBlock,\n} from '@schlechtenburg/core';\nimport {\n getDefaultData,\n IImageData,\n} from './util';\n\nimport './style.scss';\n\nexport default defineComponent({\n name: 'sb-image-display',\n\n model,\n\n props: {\n data: {\n type: (null as unknown) as PropType<IImageData>,\n default: getDefaultData,\n },\n },\n\n setup(props) {\n return () => <figure class=\"sb-image\">\n <img\n class=\"sb-image__content\"\n src={props.data.src}\n alt={props.data.alt}\n />\n <SbBlock block={props.data.description} />\n </figure>;\n },\n});\n"],"names":["defineComponent","name","model","props","data","type","default","getDefaultData","setup","src","alt","description"],"mappings":"gGAYA,MAAeA,EAAgB,CAC7BC,KAAM,mBAENC,MAAAA,EAEAC,MAAO,CACLC,KAAM,CACJC,KAAO,KACPC,QAASC,IAIbC,MAAML,GACG,sBAAoB,4BAEf,wBACDA,EAAMC,KAAKK,QACXN,EAAMC,KAAKM,sBAEFP,EAAMC,KAAKO"}

View file

@ -0,0 +1,2 @@
import{d as a,m as e,j as s,c as t,q as d}from"./index.2f19b693.js";/* empty css */var l=a({name:"sb-heading-display",model:e,props:{data:{type:Object,default:s}},setup(a){const e=t((()=>({"sb-heading":!0,[`sb-heading_align-${a.data.align}`]:!0,[`sb-heading_${a.data.level}`]:!0})));return()=>d(`h${a.data.level}`,{class:e.value,innerHTML:a.data.value})}});export default l;
//# sourceMappingURL=display.f1bc6040.js.map

View file

@ -0,0 +1 @@
{"version":3,"file":"display.f1bc6040.js","sources":["../../../heading/lib/display.ts"],"sourcesContent":["import {\n defineComponent,\n computed,\n PropType,\n h,\n} from 'vue';\nimport {\n model,\n} from '@schlechtenburg/core';\nimport {\n getDefaultData,\n IHeadingData,\n} from './util';\n\nimport './style.scss';\n\nexport default defineComponent({\n name: 'sb-heading-display',\n\n model,\n\n props: {\n data: {\n type: Object as PropType<IHeadingData>,\n default: getDefaultData,\n },\n },\n\n setup(props) {\n const classes = computed(() => ({\n 'sb-heading': true,\n [`sb-heading_align-${props.data.align}`]: true,\n [`sb-heading_${props.data.level}`]: true,\n }));\n\n return () => h(\n `h${props.data.level}`,\n {\n class: classes.value,\n innerHTML: props.data.value,\n },\n );\n },\n});\n"],"names":["defineComponent","name","model","props","data","type","Object","default","getDefaultData","[object Object]","classes","computed","sb-heading","align","level","h","class","value","innerHTML"],"mappings":"gGAgBA,MAAeA,EAAgB,CAC7BC,KAAM,qBAENC,MAAAA,EAEAC,MAAO,CACLC,KAAM,CACJC,KAAMC,OACNC,QAASC,IAIbC,MAAMN,SACEO,EAAUC,GAAS,MACvBC,cAAc,GACb,oBAAoBT,EAAMC,KAAKS,UAAU,GACzC,cAAcV,EAAMC,KAAKU,UAAU,YAG/B,IAAMC,EACX,IAAIZ,EAAMC,KAAKU,QACf,CACEE,MAAON,EAAQO,MACfC,UAAWf,EAAMC,KAAKa"}

View file

@ -1,2 +0,0 @@
import{d as a,m as s,j as p,c as r,a as e,f as t}from"./index.87211b72.js";/* empty css */var l=a({name:"sb-paragraph-display",model:s,props:{data:{type:Object,default:p}},setup(a){const s=r((()=>({"sb-paragraph":!0,[`sb-paragraph_align-${a.data.align}`]:!0})));return()=>e("p",t({class:s.value},{innerHTML:a.data.value}),null)}});export default l;
//# sourceMappingURL=display.fddb0311.js.map

View file

@ -1 +0,0 @@
{"version":3,"file":"display.fddb0311.js","sources":["../../../paragraph/lib/display.tsx"],"sourcesContent":["import {\n defineComponent,\n computed,\n PropType,\n} from 'vue';\nimport {\n model,\n} from '@schlechtenburg/core';\nimport {\n getDefaultData,\n ParagraphData,\n} from './util';\n\nimport './style.scss';\n\nexport default defineComponent({\n name: 'sb-paragraph-display',\n\n model,\n\n props: {\n data: {\n type: Object as PropType<ParagraphData>,\n default: getDefaultData,\n },\n },\n\n setup(props) {\n const classes = computed(() => ({\n 'sb-paragraph': true,\n [`sb-paragraph_align-${props.data.align}`]: true,\n }));\n\n return () => <p\n class={classes.value}\n {...{\n innerHTML: props.data.value,\n }}\n ></p>;\n },\n});\n"],"names":["defineComponent","name","model","props","data","type","Object","default","getDefaultData","setup","classes","computed","align","value","innerHTML"],"mappings":"uGAeA,MAAeA,EAAgB,CAC7BC,KAAM,uBAENC,MAAAA,EAEAC,MAAO,CACLC,KAAM,CACJC,KAAMC,OACNC,QAASC,IAIbC,MAAMN,SACEO,EAAUC,GAAS,KAAO,iBACd,GACd,sBAAqBR,EAAMC,KAAKQ,UAAU,YAGvC,mBACEF,EAAQG,QAEbC,UAAWX,EAAMC,KAAKS"}

View file

@ -0,0 +1,2 @@
var e=Object.defineProperty,n=Object.prototype.hasOwnProperty,i=Object.getOwnPropertySymbols,t=Object.prototype.propertyIsEnumerable,r=(n,i,t)=>i in n?e(n,i,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[i]=t,l=(e,l)=>{for(var a in l||(l={}))n.call(l,a)&&r(e,a,l[a]);if(i)for(var a of i(l))t.call(l,a)&&r(e,a,l[a]);return e};import{d as a,m as o,g as c,u as d,r as h,w as s,c as p,a as u,S as f,b,e as v,f as m,h as y,i as U}from"./index.2f19b693.js";/* empty css */var k=a({name:"sb-layout-edit",model:o,props:{onUpdate:{type:Function,default:()=>{}},data:{type:null,default:c}},setup(e){const{activate:n}=d(),i=h({orientation:e.data.orientation,children:[...e.data.children]});s((()=>e.data),(()=>{i.orientation=e.data.orientation,i.children=[...e.data.children]}));const t=p((()=>({"sb-layout":!0,[`sb-layout_${i.orientation}`]:!0}))),r=()=>{e.onUpdate({orientation:"vertical"===i.orientation?"horizontal":"vertical"})},a=t=>{console.log(a),i.children=[...i.children,t],e.onUpdate({children:[...i.children]}),n(t.id)},o=(t,r)=>{i.children=[...i.children.slice(0,t+1),r,...i.children.slice(t+1)],e.onUpdate({children:[...i.children]}),n(r.id)},c=t=>{i.children=[...i.children.slice(0,t),...i.children.slice(t+1)],e.onUpdate({children:[...i.children]});const r=Math.max(t-1,0);n(i.children[r].id)},k=e=>{const t=Math.max(Math.min(i.children.length-1,e),0);n(i.children[t].id)};return()=>u("div",{class:t.value},[u(f,null,{default:()=>[u(b,{type:"button",onClick:r},{default:()=>[i.orientation]})]}),...i.children.map(((n,t)=>u(v,m({key:n.id},{"data-order":t,block:n,onUpdate:t=>((n,t)=>{const r=i.children.indexOf(n);-1!==r&&e.onUpdate({children:[...i.children.slice(0,r),l(l({},n),t),...i.children.slice(r+1)]})})(n,t),onRemoveSelf:()=>c(t),onPrependBlock:e=>o(t-1,e),onAppendBlock:e=>o(t,e),onActivatePrevious:()=>k(t-1),onActivateNext:()=>k(t+1)}),{"context-toolbar":()=>u(y,{onMoveBackward:()=>(n=>{if(0===n)return;const t=i.children[n],r=i.children[n-1];i.children=[...i.children.slice(0,n-1),t,r,...i.children.slice(n+1)],e.onUpdate({children:[...i.children]})})(t),onMoveForward:()=>(n=>{if(n===i.children.length-1)return;const t=i.children[n],r=i.children[n+1];i.children=[...i.children.slice(0,n),r,t,...i.children.slice(n+2)],e.onUpdate({children:[...i.children]})})(t),onRemove:()=>c(t),orientation:i.orientation},null)}))),u(U,{onInsertBlock:a},null)])}});export default k;
//# sourceMappingURL=edit.0e6928af.js.map

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,2 @@
var e=Object.defineProperty,a=Object.prototype.hasOwnProperty,l=Object.getOwnPropertySymbols,n=Object.prototype.propertyIsEnumerable,t=(a,l,n)=>l in a?e(a,l,{enumerable:!0,configurable:!0,writable:!0,value:n}):a[l]=n,o=(e,o)=>{for(var u in o||(o={}))a.call(o,u)&&t(e,u,o[u]);if(l)for(var u of l(o))n.call(o,u)&&t(e,u,o[u]);return e};import{d as u,m as i,j as v,r,k as d,u as s,o as p,w as c,c as f,a as g,S as y,l as b,n as h,p as m}from"./index.2f19b693.js";/* empty css */var w=u({name:"sb-heading-edit",model:i,props:{blockId:{type:String,required:!0},data:{type:null,default:v},onUpdate:{type:Function,default:()=>{}},onAppendBlock:{type:Function,default:()=>{}},onRemoveSelf:{type:Function,default:()=>{}},onActivateNext:{type:Function,default:()=>{}},onActivatePrevious:{type:Function,default:()=>{}}},setup(e){const a=r({value:e.data.value,align:e.data.align,level:e.data.level,focused:!1}),l=d(null),{isActive:n,activate:t}=s(e.blockId),u=()=>{l.value&&n.value&&l.value.focus()};p((()=>{u(),l.value&&(l.value.innerHTML=a.value)})),c(n,u),c((()=>e.data),(()=>{a.value=e.data.value,a.align=e.data.align,a.level=e.data.level,l.value&&(l.value.innerHTML=a.value)}));const i=e=>{a.value=e.target.innerHTML},v=f((()=>({"sb-heading":!0,"sb-heading_focused":a.focused,[`sb-heading_align-${a.align}`]:!0,[`sb-heading_${a.level}`]:!0}))),w=l=>{e.onUpdate(o(o({},a),{level:parseInt(l.target.value,10)}))},k=l=>{e.onUpdate(o(o({},a),{align:l.target.value}))},A=()=>{a.focused=!0,t()},j=()=>{a.focused=!1,e.onUpdate({value:a.value,align:a.align,level:a.level})},O=a=>{if("Enter"===a.key&&!a.shiftKey){const l=""+ +new Date;e.onAppendBlock({id:l,name:"sb-paragraph",data:m()}),t(l),a.preventDefault()}},F=n=>{var t;"Backspace"===n.key&&""===a.value&&e.onRemoveSelf();const o=window.getSelection(),u=null==o?void 0:o.focusNode,i=Array.from((null==(t=null==l?void 0:l.value)?void 0:t.childNodes)||[]),v=u?i.indexOf(u):-1;if(u===l.value||0===v||v===i.length-1)switch(n.key){case"ArrowDown":e.onActivateNext();break;case"ArrowUp":e.onActivatePrevious()}};return()=>g("div",{class:v.value},[g(y,null,{default:()=>[g(b,{value:a.level,onChange:w},{default:()=>[g("option",{value:1},[h("h1")]),g("option",{value:2},[h("h2")]),g("option",{value:3},[h("h3")]),g("option",{value:4},[h("h4")]),g("option",{value:5},[h("h5")]),g("option",{value:6},[h("h6")])]}),g(b,{value:a.align,onChange:k},{default:()=>[g("option",null,[h("left")]),g("option",null,[h("center")]),g("option",null,[h("right")])]})]}),g("p",{class:"sb-heading__input",ref:l,contenteditable:!0,onInput:i,onFocus:A,onBlur:j,onKeydown:O,onKeyup:F},null)])}});export default w;
//# sourceMappingURL=edit.146d9acf.js.map

File diff suppressed because one or more lines are too long

View file

@ -1,2 +0,0 @@
var e=Object.defineProperty,n=Object.prototype.hasOwnProperty,i=Object.getOwnPropertySymbols,t=Object.prototype.propertyIsEnumerable,r=(n,i,t)=>i in n?e(n,i,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[i]=t,l=(e,l)=>{for(var a in l||(l={}))n.call(l,a)&&r(e,a,l[a]);if(i)for(var a of i(l))t.call(l,a)&&r(e,a,l[a]);return e};import{d as a,m as o,g as c,u as d,r as h,w as s,c as p,a as u,S as f,b,e as v,f as m,h as y,i as U}from"./index.87211b72.js";/* empty css */var k=a({name:"sb-layout-edit",model:o,props:{onUpdate:{type:Function,default:()=>{}},data:{type:null,default:c}},setup(e){const{activate:n}=d(),i=h({orientation:e.data.orientation,children:[...e.data.children]});s((()=>e.data),(()=>{i.orientation=e.data.orientation,i.children=[...e.data.children]}));const t=p((()=>({"sb-layout":!0,[`sb-layout_${i.orientation}`]:!0}))),r=()=>{e.onUpdate({orientation:"vertical"===i.orientation?"horizontal":"vertical"})},a=t=>{i.children=[...i.children,t],e.onUpdate({children:[...i.children]}),n(t.id)},o=(t,r)=>{i.children=[...i.children.slice(0,t+1),r,...i.children.slice(t+1)],e.onUpdate({children:[...i.children]}),n(r.id)},c=t=>{i.children=[...i.children.slice(0,t),...i.children.slice(t+1)],e.onUpdate({children:[...i.children]});const r=Math.max(t-1,0);n(i.children[r].id)},k=e=>{const t=Math.max(Math.min(i.children.length-1,e),0);n(i.children[t].id)};return()=>u("div",{class:t.value},[u(f,null,{default:()=>[u(b,{type:"button",onClick:r},{default:()=>[i.orientation]})]}),...i.children.map(((n,t)=>u(v,m({key:n.id},{"data-order":t,block:n,onUpdate:t=>((n,t)=>{const r=i.children.indexOf(n);-1!==r&&e.onUpdate({children:[...i.children.slice(0,r),l(l({},n),t),...i.children.slice(r+1)]})})(n,t),onRemoveSelf:()=>c(t),onPrependBlock:e=>o(t-1,e),onAppendBlock:e=>o(t,e),onActivatePrevious:()=>k(t-1),onActivateNext:()=>k(t+1)}),{"context-toolbar":()=>u(y,{onMoveBackward:()=>(n=>{if(0===n)return;const t=i.children[n],r=i.children[n-1];i.children=[...i.children.slice(0,n-1),t,r,...i.children.slice(n+1)],e.onUpdate({children:[...i.children]})})(t),onMoveForward:()=>(n=>{if(n===i.children.length-1)return;const t=i.children[n],r=i.children[n+1];i.children=[...i.children.slice(0,n),r,t,...i.children.slice(n+2)],e.onUpdate({children:[...i.children]})})(t),onRemove:()=>c(t),orientation:i.orientation},null)}))),u(U,{onInsertBlock:a},null)])}});export default k;
//# sourceMappingURL=edit.1b0f33cf.js.map

File diff suppressed because one or more lines are too long

View file

@ -1,2 +0,0 @@
export default{};
//# sourceMappingURL=edit.3e0c191e.js.map

View file

@ -1 +0,0 @@
{"version":3,"file":"edit.3e0c191e.js","sources":["../../../heading/lib/edit.tsx"],"sourcesContent":["export default {};\n"],"names":[],"mappings":"cAAe"}

View file

@ -1,2 +1,2 @@
var a=Object.defineProperty,e=Object.prototype.hasOwnProperty,t=Object.getOwnPropertySymbols,l=Object.prototype.propertyIsEnumerable,r=(e,t,l)=>t in e?a(e,t,{enumerable:!0,configurable:!0,writable:!0,value:l}):e[t]=l,n=(a,n)=>{for(var s in n||(n={}))e.call(n,s)&&r(a,s,n[s]);if(t)for(var s of t(n))l.call(n,s)&&r(a,s,n[s]);return a};import{d as s,m as o,p as i,r as d,k as c,w as u,a as p,S as f,b as v,n as m,F as b,e as y}from"./index.87211b72.js";/* empty css */var g=s({name:"sb-image-edit",model:o,props:{onUpdate:{type:Function,default:()=>{}},data:{type:null,default:i}},setup(a){const e=d({src:a.data.src,alt:a.data.alt,description:a.data.description}),t=c(null);u((()=>a.data),(()=>{e.src=a.data.src,e.alt=a.data.alt,e.description=a.data.description}));const l=()=>{t.value&&t.value.click()},r=()=>{if(t.value&&t.value.files&&t.value.files.length){const e=new FileReader;e.addEventListener("load",(()=>{var t;const l=null==(t=null==e?void 0:e.result)?void 0:t.toString();if(!l)throw new Error("Couldn't load image src");a.onUpdate({src:l,alt:a.data.alt,description:a.data.description})})),e.readAsDataURL(t.value.files[0])}};return()=>p("figure",{class:"sb-image"},[p(f,null,{default:()=>[e.src?p(v,{onClick:l},{default:()=>[m("Select Image")]}):null,p("input",{type:"file",ref:t,style:"display: none;",onInput:r},null)]}),e.src?p(b,null,[p("img",{src:e.src,alt:e.alt,class:"sb-image__content"},null),p(y,{block:e.description,onUpdate:e=>{return t=e,void a.onUpdate(n(n({},a.data),{description:t}));var t}},null)]):p(v,{onClick:l},{default:()=>[m("Select Image")]})])}});export default g;
//# sourceMappingURL=edit.a95f3ab1.js.map
var a=Object.defineProperty,e=Object.prototype.hasOwnProperty,t=Object.getOwnPropertySymbols,l=Object.prototype.propertyIsEnumerable,r=(e,t,l)=>t in e?a(e,t,{enumerable:!0,configurable:!0,writable:!0,value:l}):e[t]=l,n=(a,n)=>{for(var s in n||(n={}))e.call(n,s)&&r(a,s,n[s]);if(t)for(var s of t(n))l.call(n,s)&&r(a,s,n[s]);return a};import{d as s,m as o,s as i,r as d,k as c,w as u,a as p,S as f,b as v,n as m,F as b,e as y}from"./index.2f19b693.js";/* empty css */var g=s({name:"sb-image-edit",model:o,props:{onUpdate:{type:Function,default:()=>{}},data:{type:null,default:i}},setup(a){const e=d({src:a.data.src,alt:a.data.alt,description:a.data.description}),t=c(null);u((()=>a.data),(()=>{e.src=a.data.src,e.alt=a.data.alt,e.description=a.data.description}));const l=()=>{t.value&&t.value.click()},r=()=>{if(t.value&&t.value.files&&t.value.files.length){const e=new FileReader;e.addEventListener("load",(()=>{var t;const l=null==(t=null==e?void 0:e.result)?void 0:t.toString();if(!l)throw new Error("Couldn't load image src");a.onUpdate({src:l,alt:a.data.alt,description:a.data.description})})),e.readAsDataURL(t.value.files[0])}};return()=>p("figure",{class:"sb-image"},[p(f,null,{default:()=>[e.src?p(v,{onClick:l},{default:()=>[m("Select Image")]}):null,p("input",{type:"file",ref:t,style:"display: none;",onInput:r},null)]}),e.src?p(b,null,[p("img",{src:e.src,alt:e.alt,class:"sb-image__content"},null),p(y,{block:e.description,onUpdate:e=>{return t=e,void a.onUpdate(n(n({},a.data),{description:t}));var t}},null)]):p(v,{onClick:l},{default:()=>[m("Select Image")]})])}});export default g;
//# sourceMappingURL=edit.849203b1.js.map

View file

@ -0,0 +1 @@
{"version":3,"file":"edit.849203b1.js","sources":["../../../image/lib/edit.tsx"],"sourcesContent":["import {\n defineComponent,\n reactive,\n ref,\n Ref,\n watch,\n PropType,\n} from 'vue';\nimport {\n model,\n SbToolbar,\n SbButton,\n SbBlock,\n IBlockData,\n} from '@schlechtenburg/core';\nimport { IParagraphData } from '@schlechtenburg/paragraph';\nimport {\n getDefaultData,\n IImageData,\n} from './util';\n\nimport './style.scss';\n\nexport default defineComponent({\n name: 'sb-image-edit',\n\n model,\n\n props: {\n onUpdate: { type: Function, default: () => {} },\n data: {\n type: (null as unknown) as PropType<IImageData>,\n default: getDefaultData,\n },\n },\n\n setup(props) {\n const localData = reactive({\n src: props.data.src,\n alt: props.data.alt,\n description: props.data.description,\n });\n\n const fileInput: Ref<null|HTMLInputElement> = ref(null);\n\n watch(() => props.data, () => {\n localData.src = props.data.src;\n localData.alt = props.data.alt;\n localData.description = props.data.description;\n });\n\n const selectImage = () => {\n if (fileInput.value) {\n fileInput.value.click();\n }\n };\n\n const onImageSelect = () => {\n if (fileInput.value && fileInput.value.files && fileInput.value.files.length) {\n const reader = new FileReader();\n reader.addEventListener('load', () => {\n const src = reader?.result?.toString();\n if (!src) {\n throw new Error('Couldn\\'t load image src');\n }\n\n props.onUpdate({\n src,\n alt: props.data.alt,\n description: props.data.description,\n });\n });\n\n reader.readAsDataURL(fileInput.value.files[0]);\n }\n };\n\n const onDescriptionUpdate = (description: IBlockData<IParagraphData>) => {\n props.onUpdate({\n ...props.data,\n description,\n });\n };\n\n return () => (\n <figure class=\"sb-image\">\n <SbToolbar>\n {localData.src\n ? <SbButton {...{ onClick: selectImage }}>Select Image</SbButton>\n : null}\n <input\n type=\"file\"\n ref={fileInput}\n style=\"display: none;\"\n onInput={onImageSelect}\n />\n </SbToolbar>\n {localData.src\n ? <>\n <img\n src={localData.src}\n alt={localData.alt}\n class=\"sb-image__content\"\n />\n <SbBlock\n block={localData.description}\n onUpdate={(updated: IBlockData<IParagraphData>) => onDescriptionUpdate(updated)}\n />\n </>\n : <SbButton {...{ onClick: selectImage }}>Select Image</SbButton>\n }\n </figure>\n );\n },\n});\n"],"names":["defineComponent","name","model","props","onUpdate","type","Function","default","data","getDefaultData","setup","localData","reactive","src","alt","description","fileInput","ref","selectImage","value","click","onImageSelect","files","length","reader","FileReader","addEventListener","result","toString","Error","readAsDataURL","onClick","onDescriptionUpdate","updated","__assign"],"mappings":"8dAuBA,MAAeA,EAAgB,CAC7BC,KAAM,gBAENC,MAAAA,EAEAC,MAAO,CACLC,SAAU,CAAEC,KAAMC,SAAUC,QAAS,QACrCC,KAAM,CACJH,KAAO,KACPE,QAASE,IAIbC,MAAMP,SACEQ,EAAYC,EAAS,CACzBC,IAAKV,EAAMK,KAAKK,IAChBC,IAAKX,EAAMK,KAAKM,IAChBC,YAAaZ,EAAMK,KAAKO,cAGpBC,EAAwCC,EAAI,SAE5C,IAAMd,EAAMK,OAAM,OACZK,IAAMV,EAAMK,KAAKK,MACjBC,IAAMX,EAAMK,KAAKM,MACjBC,YAAcZ,EAAMK,KAAKO,qBAG/BG,EAAc,KACdF,EAAUG,SACFA,MAAMC,SAIdC,EAAgB,QAChBL,EAAUG,OAASH,EAAUG,MAAMG,OAASN,EAAUG,MAAMG,MAAMC,OAAQ,OACtEC,EAAS,IAAIC,aACZC,iBAAiB,QAAQ,iBACxBb,EAAMW,0BAAQG,iBAAQC,eACvBf,QACG,IAAIgB,MAAM,6BAGZzB,SAAS,CACbS,IAAAA,EACAC,IAAKX,EAAMK,KAAKM,IAChBC,YAAaZ,EAAMK,KAAKO,mBAIrBe,cAAcd,EAAUG,MAAMG,MAAM,YAWxC,sBACS,oCAETX,EAAUE,SACSkB,QAASb,sCACzB,qBAEG,WACAF,QACC,yBACGK,YAGZV,EAAUE,2BAGEF,EAAUE,QACVF,EAAUG,UACT,sCAGCH,EAAUI,yBACkCiB,SAAoBC,SA5B3E7B,SAAS8B,OACV/B,EAAMK,MADI,CAEbO,YAAAA,KAHyBA,qBAgCLgB,QAASb"}

View file

@ -1 +0,0 @@
{"version":3,"file":"edit.a95f3ab1.js","sources":["../../../image/lib/edit.tsx"],"sourcesContent":["import {\n defineComponent,\n reactive,\n ref,\n Ref,\n watch,\n PropType,\n} from 'vue';\nimport {\n model,\n SbToolbar,\n SbButton,\n SbBlock,\n IBlockData,\n} from '@schlechtenburg/core';\nimport { ParagraphData } from '@schlechtenburg/paragraph';\nimport {\n getDefaultData,\n ImageData,\n} from './util';\n\nimport './style.scss';\n\nexport default defineComponent({\n name: 'sb-image-edit',\n\n model,\n\n props: {\n onUpdate: { type: Function, default: () => {} },\n data: {\n type: (null as unknown) as PropType<ImageData>,\n default: getDefaultData,\n },\n },\n\n setup(props) {\n const localData = reactive({\n src: props.data.src,\n alt: props.data.alt,\n description: props.data.description,\n });\n\n const fileInput: Ref<null|HTMLInputElement> = ref(null);\n\n watch(() => props.data, () => {\n localData.src = props.data.src;\n localData.alt = props.data.alt;\n localData.description = props.data.description;\n });\n\n const selectImage = () => {\n if (fileInput.value) {\n fileInput.value.click();\n }\n };\n\n const onImageSelect = () => {\n if (fileInput.value && fileInput.value.files && fileInput.value.files.length) {\n const reader = new FileReader();\n reader.addEventListener('load', () => {\n const src = reader?.result?.toString();\n if (!src) {\n throw new Error('Couldn\\'t load image src');\n }\n\n props.onUpdate({\n src,\n alt: props.data.alt,\n description: props.data.description,\n });\n });\n\n reader.readAsDataURL(fileInput.value.files[0]);\n }\n };\n\n const onDescriptionUpdate = (description: IBlockData<ParagraphData>) => {\n props.onUpdate({\n ...props.data,\n description,\n });\n };\n\n return () => (\n <figure class=\"sb-image\">\n <SbToolbar>\n {localData.src\n ? <SbButton {...{ onClick: selectImage }}>Select Image</SbButton>\n : null}\n <input\n type=\"file\"\n ref={fileInput}\n style=\"display: none;\"\n onInput={onImageSelect}\n />\n </SbToolbar>\n {localData.src\n ? <>\n <img\n src={localData.src}\n alt={localData.alt}\n class=\"sb-image__content\"\n />\n <SbBlock\n block={localData.description}\n onUpdate={(updated: IBlockData<ParagraphData>) => onDescriptionUpdate(updated)}\n />\n </>\n : <SbButton {...{ onClick: selectImage }}>Select Image</SbButton>\n }\n </figure>\n );\n },\n});\n"],"names":["defineComponent","name","model","props","onUpdate","type","Function","default","data","getDefaultData","setup","localData","reactive","src","alt","description","fileInput","ref","selectImage","value","click","onImageSelect","files","length","reader","FileReader","addEventListener","result","toString","Error","readAsDataURL","onClick","onDescriptionUpdate","updated","__assign"],"mappings":"8dAuBA,MAAeA,EAAgB,CAC7BC,KAAM,gBAENC,MAAAA,EAEAC,MAAO,CACLC,SAAU,CAAEC,KAAMC,SAAUC,QAAS,QACrCC,KAAM,CACJH,KAAO,KACPE,QAASE,IAIbC,MAAMP,SACEQ,EAAYC,EAAS,CACzBC,IAAKV,EAAMK,KAAKK,IAChBC,IAAKX,EAAMK,KAAKM,IAChBC,YAAaZ,EAAMK,KAAKO,cAGpBC,EAAwCC,EAAI,SAE5C,IAAMd,EAAMK,OAAM,OACZK,IAAMV,EAAMK,KAAKK,MACjBC,IAAMX,EAAMK,KAAKM,MACjBC,YAAcZ,EAAMK,KAAKO,qBAG/BG,EAAc,KACdF,EAAUG,SACFA,MAAMC,SAIdC,EAAgB,QAChBL,EAAUG,OAASH,EAAUG,MAAMG,OAASN,EAAUG,MAAMG,MAAMC,OAAQ,OACtEC,EAAS,IAAIC,aACZC,iBAAiB,QAAQ,iBACxBb,EAAMW,0BAAQG,iBAAQC,eACvBf,QACG,IAAIgB,MAAM,6BAGZzB,SAAS,CACbS,IAAAA,EACAC,IAAKX,EAAMK,KAAKM,IAChBC,YAAaZ,EAAMK,KAAKO,mBAIrBe,cAAcd,EAAUG,MAAMG,MAAM,YAWxC,sBACS,oCAETX,EAAUE,SACSkB,QAASb,sCACzB,qBAEG,WACAF,QACC,yBACGK,YAGZV,EAAUE,2BAGEF,EAAUE,QACVF,EAAUG,UACT,sCAGCH,EAAUI,yBACgCiB,SAAoBC,SA5BzE7B,SAAS8B,OACV/B,EAAMK,MADI,CAEbO,YAAAA,KAHyBA,qBAgCLgB,QAASb"}

View file

@ -1,2 +1,2 @@
import{d as a,m as e,j as n,r as l,k as t,u as o,o as u,w as i,c as s,a as r,S as d,l as p,n as v}from"./index.87211b72.js";/* empty css */var c=a({name:"sb-paragraph-edit",model:e,props:{blockId:{type:String,required:!0},data:{type:null,default:n},onUpdate:{type:Function,default:()=>{}},onAppendBlock:{type:Function,default:()=>{}},onRemoveSelf:{type:Function,default:()=>{}},onActivateNext:{type:Function,default:()=>{}},onActivatePrevious:{type:Function,default:()=>{}}},setup(a){const e=l({value:a.data.value,align:a.data.align,focused:!1}),c=t(null),{isActive:f,activate:g}=o(a.blockId),y=()=>{c.value&&f.value&&c.value.focus()};u((()=>{y(),c.value&&(c.value.innerHTML=e.value)})),i(f,y),i((()=>a.data),(()=>{e.value=a.data.value,e.align=a.data.align,c.value&&(c.value.innerHTML=e.value)}));const b=a=>{e.value=a.target.innerHTML},h=s((()=>({"sb-paragraph":!0,"sb-paragraph_focused":e.focused,[`sb-paragraph_align-${e.align}`]:!0}))),k=n=>{a.onUpdate({value:e.value,align:n.target.value})},m=()=>{e.focused=!0,g()},A=()=>{e.focused=!1,a.onUpdate({value:e.value,align:e.align})},w=e=>{if("Enter"===e.key&&!e.shiftKey){const l=""+ +new Date;a.onAppendBlock({id:l,name:"sb-paragraph",data:n()}),g(l),e.preventDefault()}},F=n=>{var l;"Backspace"===n.key&&""===e.value&&a.onRemoveSelf();const t=window.getSelection(),o=null==t?void 0:t.focusNode,u=Array.from((null==(l=null==c?void 0:c.value)?void 0:l.childNodes)||[]),i=o?u.indexOf(o):-1;if(o===c.value||0===i||i===u.length-1)switch(n.key){case"ArrowDown":a.onActivateNext();break;case"ArrowUp":a.onActivatePrevious()}};return()=>r("div",{class:h.value},[r(d,null,{default:()=>[r(p,{value:e.align,onChange:k},{default:()=>[r("option",null,[v("left")]),r("option",null,[v("center")]),r("option",null,[v("right")])]})]}),r("p",{class:"sb-paragraph__input",ref:c,contenteditable:!0,onInput:b,onFocus:m,onBlur:A,onKeydown:w,onKeyup:F},null)])}});export default c;
//# sourceMappingURL=edit.eff76979.js.map
import{d as a,m as e,p as n,r as l,k as t,u as o,o as u,w as i,c as s,a as r,S as d,l as p,n as v}from"./index.2f19b693.js";/* empty css */var c=a({name:"sb-paragraph-edit",model:e,props:{blockId:{type:String,required:!0},data:{type:null,default:n},onUpdate:{type:Function,default:()=>{}},onAppendBlock:{type:Function,default:()=>{}},onRemoveSelf:{type:Function,default:()=>{}},onActivateNext:{type:Function,default:()=>{}},onActivatePrevious:{type:Function,default:()=>{}}},setup(a){const e=l({value:a.data.value,align:a.data.align,focused:!1}),c=t(null),{isActive:f,activate:g}=o(a.blockId),y=()=>{c.value&&f.value&&c.value.focus()};u((()=>{y(),c.value&&(c.value.innerHTML=e.value)})),i(f,y),i((()=>a.data),(()=>{e.value=a.data.value,e.align=a.data.align,c.value&&(c.value.innerHTML=e.value)}));const b=a=>{e.value=a.target.innerHTML},h=s((()=>({"sb-paragraph":!0,"sb-paragraph_focused":e.focused,[`sb-paragraph_align-${e.align}`]:!0}))),k=n=>{a.onUpdate({value:e.value,align:n.target.value})},m=()=>{e.focused=!0,g()},A=()=>{e.focused=!1,a.onUpdate({value:e.value,align:e.align})},w=e=>{if("Enter"===e.key&&!e.shiftKey){const l=""+ +new Date;a.onAppendBlock({id:l,name:"sb-paragraph",data:n()}),g(l),e.preventDefault()}},F=n=>{var l;"Backspace"===n.key&&""===e.value&&a.onRemoveSelf();const t=window.getSelection(),o=null==t?void 0:t.focusNode,u=Array.from((null==(l=null==c?void 0:c.value)?void 0:l.childNodes)||[]),i=o?u.indexOf(o):-1;if(o===c.value||0===i||i===u.length-1)switch(n.key){case"ArrowDown":a.onActivateNext();break;case"ArrowUp":a.onActivatePrevious()}};return()=>r("div",{class:h.value},[r(d,null,{default:()=>[r(p,{value:e.align,onChange:k},{default:()=>[r("option",null,[v("left")]),r("option",null,[v("center")]),r("option",null,[v("right")])]})]}),r("p",{class:"sb-paragraph__input",ref:c,contenteditable:!0,onInput:b,onFocus:m,onBlur:A,onKeydown:w,onKeyup:F},null)])}});export default c;
//# sourceMappingURL=edit.e32652b3.js.map

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1 +0,0 @@
@charset "UTF-8";.sb-button{border:0;padding:8px 12px;background-color:var(--grey-0);border:1px solid var(--grey-2)}.sb-button:hover{border:1px solid var(--interact)}.sb-context{position:relative}.sb-context-menu{display:none;flex-direction:column;background:var(--grey-0);border:1px solid var(--grey-3);top:100%;left:0;margin:0;z-index:var(--z-context-menu);max-height:70vh;max-width:100vw;overflow:auto}.sb-context-menu[open]{display:flex}.sb-tree-block-select__list{list-style:none;margin:0;padding:0}.sb-tree-block-select__list_base{padding-right:1rem}.sb-tree-block-select__block{padding:0;margin:0;padding-left:1rem}.sb-tree-block-select__block-name{display:block;background:0 0;border:0;font:inherit;color:inherit;padding:.5rem 1rem;width:100%;text-align:left}.sb-tree-block-select__block_active>.sb-tree-block-select__block-name{outline:1px solid var(--interact)}.sb-block{display:flex;align-items:stretch;justify-items:stretch;height:auto}.sb-block>*>.sb-toolbar{opacity:0;pointer-events:none}.sb-block>.sb-block-ordering{opacity:0;pointer-events:none}.sb-block_active{outline:4px solid var(--interact)}.sb-block_active>*>.sb-toolbar{opacity:1;pointer-events:all;outline:1px solid var(--grey-2)}.sb-block_active>.sb-block-ordering{opacity:1;pointer-events:all}.sb-block_highlighted{outline:2px solid var(--interact)}.sb-main{position:relative;background-color:var(--bg);padding:50px 40px}.sb-modal__overlay{background-color:var(--grey-3-t);position:fixed;z-index:10;top:0;left:0;bottom:0;right:0;padding:10vh 10vw;display:flex;justify-content:center;align-items:center;opacity:0;pointer-events:none}.sb-modal__content{width:900px;max-width:100%;height:auto;max-height:100%;background-color:var(--grey-0);padding:24px 32px}.sb-modal_open .sb-modal__overlay{opacity:1;pointer-events:all}.sb-block-picker{display:flex;justify-content:center;align-items:center;height:100%;width:100%}.sb-block-picker__add-button{padding:24px 32px}.sb-block-ordering{display:flex;position:absolute;flex-direction:column}.sb-block-placeholder{width:100%;position:relative;overflow:visible}.sb-block-placeholder__add{background-color:var(--grey-1);width:100%}.sb-toolbar{position:absolute;width:auto;height:auto}.sb-select{background-color:var(--grey-0);border:1px solid var(--grey-2);position:relative}.sb-select:hover{border:1px solid var(--interact)}.sb-select::after{position:absolute;content:"⯆";top:6px;height:100%;right:12px;pointer-events:none}.sb-select__input{background:0 0;appearance:none;border:0;padding:8px 32px 8px 12px}#app{font-family:Avenir,Helvetica,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;color:#2c3e50}*,::after,::before{box-sizing:border-box}html{--grey-0:white;--grey-1-t:rgba(0, 0, 0, 0.05);--grey-1:rgb(242, 242, 242);--grey-2-t:rgba(0, 0, 0, 0.1);--grey-2:rgb(230, 230, 230);--grey-3-t:rgba(0, 0, 0, 0.2);--grey-3:rgb(205, 205, 205);--grey-4-t:rgba(0, 0, 0, 0.4);--grey-4:rgb(155, 155, 155);--grey-5-t:rgba(0, 0, 0, 0.7);--grey-5:rgb(75, 75, 75);--black:rgba(0, 0, 0, 0.9);--bg:var(--grey-1);--fg:var(--black);--interact:#3f9cff;--z-context-menu:3000}body{margin:0;min-height:100vh}

View file

@ -0,0 +1 @@
@charset "UTF-8";.sb-button{border:0;padding:8px 12px;background-color:var(--grey-0);border:1px solid var(--grey-2)}.sb-button:hover{border:1px solid var(--interact)}.sb-context{position:relative}.sb-context-menu{display:none;flex-direction:column;background:var(--grey-0);border:1px solid var(--grey-3);top:100%;left:0;margin:0;z-index:var(--z-context-menu);max-height:70vh;max-width:100vw;overflow:auto}.sb-context-menu[open]{display:flex}.sb-tree-block-select__list{list-style:none;margin:0;padding:0}.sb-tree-block-select__list_base{padding-right:1rem}.sb-tree-block-select__block{padding:0;margin:0;padding-left:1rem}.sb-tree-block-select__block-name{display:block;background:0 0;border:0;font:inherit;color:inherit;padding:.5rem 1rem;width:100%;text-align:left}.sb-tree-block-select__block_active>.sb-tree-block-select__block-name{outline:1px solid var(--interact)}.sb-main-menu{display:flex}.sb-hover-cover:hover{outline:1px dashed var(--interact)}.sb-hover-cover_child-hovered:hover{outline:0}.sb-block{display:flex;align-items:stretch;justify-items:stretch;height:auto;min-width:32px;min-height:32px}.sb-block>*>.sb-toolbar{opacity:0;pointer-events:none}.sb-block>.sb-block-ordering{opacity:0;pointer-events:none}.sb-block_active,.sb-block_active:hover{outline:4px solid var(--interact)}.sb-block_active:hover>*>.sb-toolbar,.sb-block_active>*>.sb-toolbar{opacity:1;pointer-events:all;outline:1px solid var(--grey-2)}.sb-block_active:hover>.sb-block-ordering,.sb-block_active>.sb-block-ordering{opacity:1;pointer-events:all}.sb-block_highlighted{outline:2px solid var(--interact)}.sb-main{position:relative;background-color:var(--bg)}.sb-block-picker__add-button{padding:24px 32px}.sb-block-ordering{display:flex;position:absolute;flex-direction:column}.sb-block-placeholder{flex-basis:100%;flex-shrink:2;position:relative;overflow:visible}.sb-block-placeholder__add{background-color:var(--grey-1);width:100%}.sb-block-placeholder .sb-block-picker{display:flex;justify-content:center;align-items:center;height:100%;width:100%}.sb-toolbar{position:absolute;width:auto;height:auto}.sb-select{background-color:var(--grey-0);border:1px solid var(--grey-2);position:relative;font-size:1rem}.sb-select:hover{border:1px solid var(--interact)}.sb-select::after{position:absolute;content:"⯆";top:6px;height:100%;right:12px;pointer-events:none}.sb-select__input{background:0 0;appearance:none;border:0;padding:8px 32px 8px 12px}.app{font-family:Avenir,Helvetica,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;color:#2c3e50;padding:3rem 4rem}.app--mode{margin-bottom:2rem}*,::after,::before{box-sizing:border-box}html{--grey-0:white;--grey-1-t:rgba(0, 0, 0, 0.05);--grey-1:rgb(242, 242, 242);--grey-2-t:rgba(0, 0, 0, 0.1);--grey-2:rgb(230, 230, 230);--grey-3-t:rgba(0, 0, 0, 0.2);--grey-3:rgb(205, 205, 205);--grey-4-t:rgba(0, 0, 0, 0.4);--grey-4:rgb(155, 155, 155);--grey-5-t:rgba(0, 0, 0, 0.7);--grey-5:rgb(75, 75, 75);--black:rgba(0, 0, 0, 0.9);--bg:var(--grey-1);--fg:var(--black);--interact:#3f9cff;--interact-lite:#3f9cff;--z-context-menu:3000}body{margin:0;min-height:100vh}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1 @@
.sb-heading{flex-basis:100%;font-weight:700}.sb-heading_1{font-size:4rem}.sb-heading_2{font-size:3rem}.sb-heading_3{font-size:2rem}.sb-heading_4{font-size:1.6rem}.sb-heading_5{font-size:1.2rem}.sb-heading_6{font-size:1rem}.sb-heading__input{display:block;flex-basis:100%}.sb-heading_align-left,.sb-heading_align-left .sb-heading__input{text-align:left}.sb-heading_align-right,.sb-heading_align-right .sb-heading__input{text-align:right}.sb-heading_align-center,.sb-heading_align-center .sb-heading__input{text-align:center}

View file

@ -5,8 +5,8 @@
<link rel="icon" href="./favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Vite App</title>
<script type="module" crossorigin src="./assets/index.87211b72.js"></script>
<link rel="stylesheet" href="./assets/index.62d1366f.css">
<script type="module" crossorigin src="./assets/index.2f19b693.js"></script>
<link rel="stylesheet" href="./assets/index.73e582b3.css">
</head>
<body>
<div id="app"></div>