@motiadev/plugin-states 0.8.5-beta.143-666227 → 0.8.6-beta.143

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/api.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAwC,kBAAkB,EAAE,MAAM,gBAAgB,CAAA;AAE9F,eAAO,MAAM,GAAG,GAAI,OAAO,kBAAkB,KAAG,IAuE/C,CAAA"}
1
+ {"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAwC,kBAAkB,EAAE,MAAM,gBAAgB,CAAA;AAE9F,eAAO,MAAM,GAAG,GAAI,OAAO,kBAAkB,KAAG,IAwE/C,CAAA"}
package/dist/plugin.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";const n=s=>{s.registerApi({method:"GET",path:"/__motia/state"},async r=>{try{const e=r.queryParams.groupId,t=r.queryParams.filter?JSON.parse(r.queryParams.filter):void 0;return{status:200,body:await s.state.items({groupId:e,filter:t})}}catch(e){return{status:500,body:{error:e instanceof Error?e.message:"Unknown error"}}}}),s.registerApi({method:"POST",path:"/__motia/state"},async(r,e)=>{try{const{key:t,groupId:a,value:o}=r.body;return await e.state.set(a,t,o),{status:200,body:{key:t,groupId:a,value:o}}}catch(t){return{status:500,body:{error:t instanceof Error?t.message:"Unknown error"}}}}),s.registerApi({method:"POST",path:"/__motia/state/delete"},async(r,e)=>{try{for(const t of r.body.ids){const[a,o]=t.split(":");await e.state.delete(a,o)}return{status:204,body:""}}catch(t){return{status:500,body:{error:t instanceof Error?t.message:"Unknown error"}}}})};function i(s){return n(s),{workbench:[{packageName:"@motiadev/plugin-states",cssImports:["@motiadev/plugin-states/dist/plugin-states.css"],label:"States",position:"bottom",componentName:"StatesPage",labelIcon:"file"}]}}module.exports=i;
1
+ "use strict";const i=s=>{s.registerApi({method:"GET",path:"/__motia/state"},async r=>{try{const e=r.queryParams.groupId,t=r.queryParams.filter?JSON.parse(r.queryParams.filter):void 0;return{status:200,body:await s.state.items({groupId:e,filter:t})}}catch(e){return{status:500,body:{error:e instanceof Error?e.message:"Unknown error"}}}}),s.registerApi({method:"POST",path:"/__motia/state"},async(r,e)=>{try{const{key:t,groupId:o,value:a}=r.body;return await e.state.set(o,t,a),{status:200,body:{key:t,groupId:o,value:a}}}catch(t){return{status:500,body:{error:t instanceof Error?t.message:"Unknown error"}}}}),s.registerApi({method:"POST",path:"/__motia/state/delete"},async(r,e)=>{try{for(const t of r.body.ids){const[o,...a]=t.split(":"),n=a.join(":");await e.state.delete(o,n)}return{status:204,body:""}}catch(t){return{status:500,body:{error:t instanceof Error?t.message:"Unknown error"}}}})};function c(s){return i(s),{workbench:[{packageName:"@motiadev/plugin-states",cssImports:["@motiadev/plugin-states/dist/plugin-states.css"],label:"States",position:"bottom",componentName:"StatesPage",labelIcon:"file"}]}}module.exports=c;
package/dist/plugin.js CHANGED
@@ -1,4 +1,4 @@
1
- const n = (s) => {
1
+ const i = (s) => {
2
2
  s.registerApi(
3
3
  {
4
4
  method: "GET",
@@ -45,8 +45,8 @@ const n = (s) => {
45
45
  async (r, e) => {
46
46
  try {
47
47
  for (const t of r.body.ids) {
48
- const [a, o] = t.split(":");
49
- await e.state.delete(a, o);
48
+ const [a, ...o] = t.split(":"), n = o.join(":");
49
+ await e.state.delete(a, n);
50
50
  }
51
51
  return {
52
52
  status: 204,
@@ -61,8 +61,8 @@ const n = (s) => {
61
61
  }
62
62
  );
63
63
  };
64
- function i(s) {
65
- return n(s), {
64
+ function c(s) {
65
+ return i(s), {
66
66
  workbench: [
67
67
  {
68
68
  packageName: "@motiadev/plugin-states",
@@ -76,5 +76,5 @@ function i(s) {
76
76
  };
77
77
  }
78
78
  export {
79
- i as default
79
+ c as default
80
80
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@motiadev/plugin-states",
3
- "version": "0.8.5-beta.143-666227",
3
+ "version": "0.8.6-beta.143",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",
@@ -28,9 +28,9 @@
28
28
  "zustand": "^5.0.8"
29
29
  },
30
30
  "peerDependencies": {
31
- "@motiadev/stream-client-browser": "0.8.5-beta.143-666227",
32
- "@motiadev/core": "0.8.5-beta.143-666227",
33
- "@motiadev/ui": "0.8.5-beta.143-666227"
31
+ "@motiadev/ui": "0.8.6-beta.143",
32
+ "@motiadev/core": "0.8.6-beta.143",
33
+ "@motiadev/stream-client-browser": "0.8.6-beta.143"
34
34
  },
35
35
  "devDependencies": {
36
36
  "@tailwindcss/vite": "^4.1.14",