@narrat/plugin-counter 3.9.6 → 3.9.7
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,10 +1,10 @@
|
|
|
1
1
|
var i = Object.defineProperty;
|
|
2
|
-
var m = (t,
|
|
3
|
-
var c = (t,
|
|
4
|
-
import { defineComponent as l, computed as p, openBlock as
|
|
5
|
-
import { defineStore as
|
|
6
|
-
import { NarratPlugin as
|
|
7
|
-
const r =
|
|
2
|
+
var m = (t, o, n) => o in t ? i(t, o, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[o] = n;
|
|
3
|
+
var c = (t, o, n) => (m(t, typeof o != "symbol" ? o + "" : o, n), n);
|
|
4
|
+
import { defineComponent as l, computed as p, openBlock as d, createElementBlock as g, toDisplayString as f } from "vue";
|
|
5
|
+
import { defineStore as C } from "pinia";
|
|
6
|
+
import { NarratPlugin as _, CommandPlugin as a } from "narrat";
|
|
7
|
+
const r = C("counter", {
|
|
8
8
|
state: () => ({
|
|
9
9
|
count: 0
|
|
10
10
|
}),
|
|
@@ -27,26 +27,25 @@ const r = f("counter", {
|
|
|
27
27
|
const t = r();
|
|
28
28
|
return { counter: p(() => t.count) };
|
|
29
29
|
}
|
|
30
|
-
})
|
|
31
|
-
const
|
|
32
|
-
const
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
return o;
|
|
30
|
+
}), $ = (t, o) => {
|
|
31
|
+
const n = t.__vccOpts || t;
|
|
32
|
+
for (const [e, u] of o)
|
|
33
|
+
n[e] = u;
|
|
34
|
+
return n;
|
|
36
35
|
};
|
|
37
|
-
function
|
|
38
|
-
return
|
|
36
|
+
function v(t, o, n, e, u, s) {
|
|
37
|
+
return d(), g("h1", null, "Counter value: " + f(t.counter), 1);
|
|
39
38
|
}
|
|
40
|
-
const
|
|
41
|
-
class w extends
|
|
39
|
+
const x = /* @__PURE__ */ $(h, [["render", v]]);
|
|
40
|
+
class w extends _ {
|
|
42
41
|
constructor() {
|
|
43
42
|
super();
|
|
44
43
|
c(this, "customStores");
|
|
45
44
|
c(this, "customCommands");
|
|
46
45
|
c(this, "customMenuTabs");
|
|
47
|
-
const
|
|
46
|
+
const n = "3.9.7", e = (/* @__PURE__ */ new Date("2024-02-03T15:09:09.174Z")).toLocaleString();
|
|
48
47
|
console.log(
|
|
49
|
-
`%c [Narrat plugin] [@narrat/plugin-counter] v${
|
|
48
|
+
`%c [Narrat plugin] [@narrat/plugin-counter] v${n} - Built at ${e}`,
|
|
50
49
|
"background: #222; color: #bada55"
|
|
51
50
|
), this.customStores = {
|
|
52
51
|
counter: r
|
|
@@ -66,7 +65,7 @@ class w extends C {
|
|
|
66
65
|
cssClass: "counter-menu-button",
|
|
67
66
|
component: "CounterUi"
|
|
68
67
|
},
|
|
69
|
-
component:
|
|
68
|
+
component: x
|
|
70
69
|
}
|
|
71
70
|
];
|
|
72
71
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(t,n){typeof exports=="object"&&typeof module<"u"?n(exports,require("vue"),require("pinia"),require("narrat")):typeof define=="function"&&define.amd?define(["exports","vue","pinia","narrat"],n):(t=typeof globalThis<"u"?globalThis:t||self,n(t["narrat-plugin-counter"]={},t.Vue,t.pinia,t.narrat))})(this,function(t,n,o,a){"use strict";var
|
|
1
|
+
(function(t,n){typeof exports=="object"&&typeof module<"u"?n(exports,require("vue"),require("pinia"),require("narrat")):typeof define=="function"&&define.amd?define(["exports","vue","pinia","narrat"],n):(t=typeof globalThis<"u"?globalThis:t||self,n(t["narrat-plugin-counter"]={},t.Vue,t.pinia,t.narrat))})(this,function(t,n,o,a){"use strict";var h=Object.defineProperty;var _=(t,n,o)=>n in t?h(t,n,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[n]=o;var i=(t,n,o)=>(_(t,typeof n!="symbol"?n+"":n,o),o);const c=o.defineStore("counter",{state:()=>({count:0}),actions:{save(){return{count:this.count}},load(e){this.count=e.count},reset(){this.count=0}}}),p=n.defineComponent({setup(){console.log("counter ui");const e=c();return{counter:n.computed(()=>e.count)}}}),l=(e,r)=>{const u=e.__vccOpts||e;for(const[s,d]of r)u[s]=d;return u};function f(e,r,u,s,d,m){return n.openBlock(),n.createElementBlock("h1",null,"Counter value: "+n.toDisplayString(e.counter),1)}const g=l(p,[["render",f]]);class C extends a.NarratPlugin{constructor(){super();i(this,"customStores");i(this,"customCommands");i(this,"customMenuTabs");const u="3.9.7",s=new Date("2024-02-03T15:09:09.174Z").toLocaleString();console.log(`%c [Narrat plugin] [@narrat/plugin-counter] v${u} - Built at ${s}`,"background: #222; color: #bada55"),this.customStores={counter:c},this.customCommands=[new a.CommandPlugin("increase_counter",[],async m=>c().count++),new a.CommandPlugin("get_counter",[],async m=>c().count)],this.customMenuTabs=[{menuId:"menu",config:{id:"counter",text:"Counter",cssClass:"counter-menu-button",component:"CounterUi"},component:g}]}}t.CounterPlugin=C,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})});
|
package/package.json
CHANGED