@motiadev/plugin-logs 0.11.1-beta.156-879726 → 0.11.1-beta.156-491458
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.
package/dist/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const st=require("@motiadev/stream-client-browser"),p=require("react"),Y=require("@motiadev/ui");function ot(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const T=ot(p),Ee=e=>{let t;const n=new Set,r=(d,m)=>{const v=typeof d=="function"?d(t):d;if(!Object.is(v,t)){const w=t;t=m??(typeof v!="object"||v===null)?v:Object.assign({},t,v),n.forEach(E=>E(t,w))}},l=()=>t,c={setState:r,getState:l,getInitialState:()=>u,subscribe:d=>(n.add(d),()=>n.delete(d))},u=t=e(r,l,c);return c},it=e=>e?Ee(e):Ee,lt=e=>e;function ct(e,t=lt){const n=p.useSyncExternalStore(e.subscribe,p.useCallback(()=>t(e.getState()),[e,t]),p.useCallback(()=>t(e.getInitialState()),[e,t]));return p.useDebugValue(n),n}const ut=e=>{const t=it(e),n=r=>ct(t,r);return Object.assign(n,t),n},ft=e=>ut,Q=ft()(e=>({logs:[],selectedLogId:void 0,addLog:t=>e(n=>
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const st=require("@motiadev/stream-client-browser"),p=require("react"),Y=require("@motiadev/ui");function ot(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const T=ot(p),Ee=e=>{let t;const n=new Set,r=(d,m)=>{const v=typeof d=="function"?d(t):d;if(!Object.is(v,t)){const w=t;t=m??(typeof v!="object"||v===null)?v:Object.assign({},t,v),n.forEach(E=>E(t,w))}},l=()=>t,c={setState:r,getState:l,getInitialState:()=>u,subscribe:d=>(n.add(d),()=>n.delete(d))},u=t=e(r,l,c);return c},it=e=>e?Ee(e):Ee,lt=e=>e;function ct(e,t=lt){const n=p.useSyncExternalStore(e.subscribe,p.useCallback(()=>t(e.getState()),[e,t]),p.useCallback(()=>t(e.getInitialState()),[e,t]));return p.useDebugValue(n),n}const ut=e=>{const t=it(e),n=r=>ct(t,r);return Object.assign(n,t),n},ft=e=>ut,Q=ft()(e=>({logs:[],selectedLogId:void 0,addLog:t=>e(n=>({logs:[t,...n.logs]})),resetLogs:()=>{e({logs:[]})},selectLogId:t=>e({selectedLogId:t})})),dt="__motia.logs",pt="default",gt="log",mt=()=>{new st.Stream(window.location.origin.replace("http","ws")).subscribeGroup(dt,pt).onEvent(gt,Q.getState().addLog)};var te={exports:{}},G={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.js
|
|
4
4
|
*
|
package/dist/index.js
CHANGED
|
@@ -27,21 +27,15 @@ const kt = (e) => {
|
|
|
27
27
|
}, _t = (e) => kt, ee = _t()((e) => ({
|
|
28
28
|
logs: [],
|
|
29
29
|
selectedLogId: void 0,
|
|
30
|
-
addLog: (t) => e((n) =>
|
|
30
|
+
addLog: (t) => e((n) => ({
|
|
31
31
|
logs: [t, ...n.logs]
|
|
32
|
-
}),
|
|
33
|
-
setLogs: (t) => e({
|
|
34
|
-
logs: [...t].reverse()
|
|
35
|
-
}),
|
|
32
|
+
})),
|
|
36
33
|
resetLogs: () => {
|
|
37
34
|
e({ logs: [] });
|
|
38
35
|
},
|
|
39
36
|
selectLogId: (t) => e({ selectedLogId: t })
|
|
40
37
|
})), Tt = "__motia.logs", Nt = "default", Ot = "log", Rt = () => {
|
|
41
|
-
|
|
42
|
-
t.addChangeListener((r) => {
|
|
43
|
-
r && n.setLogs(r);
|
|
44
|
-
}), t.onEvent(Ot, n.addLog);
|
|
38
|
+
new gt(window.location.origin.replace("http", "ws")).subscribeGroup(Tt, Nt).onEvent(Ot, ee.getState().addLog);
|
|
45
39
|
};
|
|
46
40
|
var ae = { exports: {} }, X = {};
|
|
47
41
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-logs-store.d.ts","sourceRoot":"","sources":["../../src/stores/use-logs-store.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAA;AAEvC,MAAM,MAAM,SAAS,GAAG;IACtB,IAAI,EAAE,GAAG,EAAE,CAAA;IACX,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,MAAM,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,IAAI,CAAA;IAC1B,
|
|
1
|
+
{"version":3,"file":"use-logs-store.d.ts","sourceRoot":"","sources":["../../src/stores/use-logs-store.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAA;AAEvC,MAAM,MAAM,SAAS,GAAG;IACtB,IAAI,EAAE,GAAG,EAAE,CAAA;IACX,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,MAAM,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,IAAI,CAAA;IAC1B,SAAS,EAAE,MAAM,IAAI,CAAA;IACrB,WAAW,EAAE,CAAC,KAAK,CAAC,EAAE,MAAM,KAAK,IAAI,CAAA;CACtC,CAAA;AAED,eAAO,MAAM,YAAY,wEAWtB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init-log-listener.d.ts","sourceRoot":"","sources":["../../src/utils/init-log-listener.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"init-log-listener.d.ts","sourceRoot":"","sources":["../../src/utils/init-log-listener.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,eAAe,YAK3B,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@motiadev/plugin-logs",
|
|
3
|
-
"version": "0.11.1-beta.156-
|
|
3
|
+
"version": "0.11.1-beta.156-491458",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -26,9 +26,9 @@
|
|
|
26
26
|
"zustand": "^5.0.8"
|
|
27
27
|
},
|
|
28
28
|
"peerDependencies": {
|
|
29
|
-
"@motiadev/
|
|
30
|
-
"@motiadev/
|
|
31
|
-
"@motiadev/
|
|
29
|
+
"@motiadev/stream-client-browser": "0.11.1-beta.156-491458",
|
|
30
|
+
"@motiadev/ui": "0.11.1-beta.156-491458",
|
|
31
|
+
"@motiadev/core": "0.11.1-beta.156-491458"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@tailwindcss/vite": "^4.1.14",
|