labmaker-plugin 0.0.7 → 0.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,69 +1,63 @@
1
- import { openBlock as c, createElementBlock as r, Fragment as _, createElementVNode as l, toDisplayString as p } from "vue";
2
- const i = (e, t) => {
3
- const o = e.__vccOpts || e;
4
- for (const [s, n] of t)
5
- o[s] = n;
6
- return o;
7
- }, u = {
8
- props: ["custom-img"],
1
+ import { openBlock as n, createElementBlock as c, createElementVNode as i, normalizeClass as _, createCommentVNode as o } from "vue";
2
+ const l = (t, a) => {
3
+ const e = t.__vccOpts || t;
4
+ for (const [s, r] of a)
5
+ e[s] = r;
6
+ return e;
7
+ };
8
+ const d = {
9
+ props: ["content"],
9
10
  data() {
10
- return {
11
- imgSRC: this.customImg
12
- };
11
+ return {};
12
+ },
13
+ computed: {
14
+ getLastPage() {
15
+ return !!this.$store.getters.getLastPage;
16
+ }
13
17
  },
14
- computed: {},
15
18
  methods: {
16
- fileUpload(e) {
17
- const o = e.target.files[0];
18
- this.fileProcess(o);
19
+ pixelFormat(t) {
20
+ return typeof t == "number" ? t + "px" : t;
19
21
  },
20
- fileProcess(e) {
21
- this.imgSRC = URL.createObjectURL(e);
22
+ checkStepper() {
23
+ this.$store.dispatch("lastPageFocus", {});
22
24
  }
23
25
  },
24
26
  mounted() {
27
+ this.checkStepper();
25
28
  }
26
- }, m = /* @__PURE__ */ l("h1", null, "File Uploader", -1), f = { class: "image-uploader" }, g = /* @__PURE__ */ l("h1", null, "File Uploader", -1), h = { class: "your-file" }, U = ["src"];
27
- function v(e, t, o, s, n, a) {
28
- return c(), r(_, null, [
29
- m,
30
- l("div", f, [
31
- g,
32
- l("input", {
33
- onChange: t[0] || (t[0] = (...d) => a.fileUpload && a.fileUpload(...d)),
34
- type: "file",
35
- id: "file-upload",
36
- name: "fileUpload",
37
- accept: "image/*"
38
- }, null, 32),
39
- l("div", h, [
40
- l("img", {
41
- src: n.imgSRC,
42
- alt: "",
43
- scrset: ""
44
- }, null, 8, U)
45
- ])
29
+ }, u = { class: "image-container" }, p = { class: "image" }, m = ["src", "alt"], g = ["innerHTML"], h = ["innerHTML"], y = ["innerHTML"];
30
+ function f(t, a, e, s, r, L) {
31
+ return n(), c("div", u, [
32
+ i("div", p, [
33
+ i("img", {
34
+ src: e.content.src,
35
+ alt: e.content.alt,
36
+ class: _(e.content.class)
37
+ }, null, 10, m),
38
+ e.content.captionHeader ? (n(), c("span", {
39
+ key: 0,
40
+ class: "captionHeader",
41
+ innerHTML: e.content.captionHeader
42
+ }, null, 8, g)) : o("", !0),
43
+ e.content.caption ? (n(), c("span", {
44
+ key: 1,
45
+ class: "caption",
46
+ innerHTML: e.content.caption
47
+ }, null, 8, h)) : o("", !0),
48
+ e.content.copyright ? (n(), c("span", {
49
+ key: 2,
50
+ innerHTML: e.content.copyright,
51
+ class: "copyright"
52
+ }, null, 8, y)) : o("", !0)
46
53
  ])
47
- ], 64);
48
- }
49
- const y = /* @__PURE__ */ i(u, [["render", v]]);
50
- const x = {
51
- props: ["title"],
52
- data() {
53
- return {};
54
- },
55
- computed: {}
56
- };
57
- function $(e, t, o, s, n, a) {
58
- return c(), r("header", null, [
59
- l("h1", null, p(o.title), 1)
60
54
  ]);
61
55
  }
62
- const R = /* @__PURE__ */ i(x, [["render", $]]), b = {
63
- install: (e, t) => {
64
- e.component("special-uploader", y), e.component("lab-header", R);
56
+ const v = /* @__PURE__ */ l(d, [["render", f], ["__scopeId", "data-v-6d545532"]]), H = {
57
+ install: (t, a) => {
58
+ t.component("lab-image", v);
65
59
  }
66
60
  };
67
61
  export {
68
- b as default
62
+ H as default
69
63
  };
@@ -1 +1 @@
1
- (function(e,l){typeof exports=="object"&&typeof module<"u"?module.exports=l(require("vue")):typeof define=="function"&&define.amd?define(["vue"],l):(e=typeof globalThis<"u"?globalThis:e||self,e.LabmakerPlugin=l(e.Vue))})(this,function(e){"use strict";const l="",r=(t,n)=>{const o=t.__vccOpts||t;for(const[c,s]of n)o[c]=s;return o},a={props:["custom-img"],data(){return{imgSRC:this.customImg}},computed:{},methods:{fileUpload(t){const o=t.target.files[0];this.fileProcess(o)},fileProcess(t){this.imgSRC=URL.createObjectURL(t)}},mounted(){}},d=e.createElementVNode("h1",null,"File Uploader",-1),p={class:"image-uploader"},_=e.createElementVNode("h1",null,"File Uploader",-1),m={class:"your-file"},u=["src"];function f(t,n,o,c,s,i){return e.openBlock(),e.createElementBlock(e.Fragment,null,[d,e.createElementVNode("div",p,[_,e.createElementVNode("input",{onChange:n[0]||(n[0]=(...E)=>i.fileUpload&&i.fileUpload(...E)),type:"file",id:"file-upload",name:"fileUpload",accept:"image/*"},null,32),e.createElementVNode("div",m,[e.createElementVNode("img",{src:s.imgSRC,alt:"",scrset:""},null,8,u)])])],64)}const g=r(a,[["render",f]]),k="",h={props:["title"],data(){return{}},computed:{}};function y(t,n,o,c,s,i){return e.openBlock(),e.createElementBlock("header",null,[e.createElementVNode("h1",null,e.toDisplayString(o.title),1)])}const U=r(h,[["render",y]]);return{install:(t,n)=>{t.component("special-uploader",g),t.component("lab-header",U)}}});
1
+ (function(e,o){typeof exports=="object"&&typeof module<"u"?module.exports=o(require("vue")):typeof define=="function"&&define.amd?define(["vue"],o):(e=typeof globalThis<"u"?globalThis:e||self,e.LabmakerPlugin=o(e.Vue))})(this,function(e){"use strict";const o="",i=(n,c)=>{const t=n.__vccOpts||n;for(const[a,s]of c)t[a]=s;return t},f="",k="",r={props:["content"],data(){return{}},computed:{getLastPage(){return!!this.$store.getters.getLastPage}},methods:{pixelFormat(n){return typeof n=="number"?n+"px":n},checkStepper(){this.$store.dispatch("lastPageFocus",{})}},mounted(){this.checkStepper()}},l={class:"image-container"},_={class:"image"},d=["src","alt"],m=["innerHTML"],p=["innerHTML"],u=["innerHTML"];function g(n,c,t,a,s,L){return e.openBlock(),e.createElementBlock("div",l,[e.createElementVNode("div",_,[e.createElementVNode("img",{src:t.content.src,alt:t.content.alt,class:e.normalizeClass(t.content.class)},null,10,d),t.content.captionHeader?(e.openBlock(),e.createElementBlock("span",{key:0,class:"captionHeader",innerHTML:t.content.captionHeader},null,8,m)):e.createCommentVNode("",!0),t.content.caption?(e.openBlock(),e.createElementBlock("span",{key:1,class:"caption",innerHTML:t.content.caption},null,8,p)):e.createCommentVNode("",!0),t.content.copyright?(e.openBlock(),e.createElementBlock("span",{key:2,innerHTML:t.content.copyright,class:"copyright"},null,8,u)):e.createCommentVNode("",!0)])])}const h=i(r,[["render",g],["__scopeId","data-v-6d545532"]]);return{install:(n,c)=>{n.component("lab-image",h)}}});
package/dist/style.css CHANGED
@@ -1 +1 @@
1
- .image-uploader{display:flex;flex-direction:column;align-items:center;border:1px solid gray;width:53%;background-color:#cecece;margin:0 auto;height:300px;box-shadow:#0000001a 0 4px 12px}.your-file{display:flex;justify-content:center;align-items:center;margin-top:20px}img{width:80%}header{display:flex;justify-content:center;align-items:center;height:40px;margin-top:10px;margin-bottom:10px}
1
+ .image-uploader{display:flex;flex-direction:column;align-items:center;border:1px solid gray;width:53%;background-color:#cecece;margin:0 auto;height:300px;box-shadow:#0000001a 0 4px 12px}.your-file{display:flex;justify-content:center;align-items:center;margin-top:20px}img{width:80%}header{display:flex;justify-content:center;align-items:center;height:40px;margin-top:10px;margin-bottom:10px}#app .image-container[data-v-6d545532]{position:relative;display:block;margin-bottom:10px;height:100%}#app .image-container .image[data-v-6d545532]{height:100%}#app .image-container .image img[data-v-6d545532]{max-height:100%;max-width:100%}#app .image-container.copyright[data-v-6d545532],#app .image-container.captions[data-v-6d545532]{margin-bottom:20px}#app .image-container.copyright[data-v-6d545532],#app .image-container.captions[data-v-6d545532]{margin-bottom:40px}#app .image-container .captionHeader[data-v-6d545532]{font-size:20px;text-align:center;display:block;margin-bottom:10px}#app .image-container .caption[data-v-6d545532]{font-size:13px;font-style:italic;text-align:center;display:block;margin-bottom:10px}#app .image-container .copyright[data-v-6d545532]{font-size:10px;line-height:10px;margin-top:10px;text-align:center;display:block;margin-bottom:10px}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "labmaker-plugin",
3
- "version": "0.0.7",
3
+ "version": "0.0.9",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"