@moises.ai/extension 0.0.10 → 0.0.12
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.js +21 -21
- package/package.json +2 -2
package/dist/index.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
import { jsx as
|
2
|
-
import { useState as f, useEffect as
|
3
|
-
import {
|
1
|
+
import { jsx as h } from "react/jsx-runtime";
|
2
|
+
import { useState as f, useEffect as l } from "react";
|
3
|
+
import { Box as p, Theme as g } from "@radix-ui/themes";
|
4
4
|
export * from "@radix-ui/themes";
|
5
5
|
class m {
|
6
6
|
constructor({ target: e }) {
|
@@ -105,18 +105,7 @@ function q(r) {
|
|
105
105
|
}
|
106
106
|
return { connect: o, plugin: e, api: n };
|
107
107
|
}
|
108
|
-
|
109
|
-
g,
|
110
|
-
{
|
111
|
-
accentColor: "cyan",
|
112
|
-
appearance: "dark",
|
113
|
-
radius: "small",
|
114
|
-
panelBackground: "solid",
|
115
|
-
...e,
|
116
|
-
children: r
|
117
|
-
}
|
118
|
-
);
|
119
|
-
function P(r) {
|
108
|
+
function v(r) {
|
120
109
|
r.id;
|
121
110
|
let e = null, n = !1;
|
122
111
|
function t() {
|
@@ -125,13 +114,13 @@ function P(r) {
|
|
125
114
|
isConnected: n,
|
126
115
|
moises: e == null ? void 0 : e.api
|
127
116
|
});
|
128
|
-
|
117
|
+
l(() => {
|
129
118
|
e || (e = q(r), s((i) => ({
|
130
119
|
...i,
|
131
120
|
plugin: e,
|
132
121
|
moises: e.api
|
133
122
|
})));
|
134
|
-
}, [r]),
|
123
|
+
}, [r]), l(() => {
|
135
124
|
e && !n && e.connect().then(() => {
|
136
125
|
n = !0, s((i) => ({
|
137
126
|
...i,
|
@@ -141,9 +130,9 @@ function P(r) {
|
|
141
130
|
}, []);
|
142
131
|
function a({ children: i, width: c, height: d }) {
|
143
132
|
const { moises: u } = o;
|
144
|
-
return
|
133
|
+
return l(() => {
|
145
134
|
u && u.ui.setPluginSize({ width: c, height: d });
|
146
|
-
}, [c, d, u]), /* @__PURE__ */
|
135
|
+
}, [c, d, u]), /* @__PURE__ */ h(p, { height: "100vh", style: { height: "100vh", backgroundColor: "var(--gray-1)" }, children: /* @__PURE__ */ h(p, { p: "4", children: i }) });
|
147
136
|
}
|
148
137
|
return {
|
149
138
|
...o,
|
@@ -152,7 +141,18 @@ function P(r) {
|
|
152
141
|
}
|
153
142
|
return t;
|
154
143
|
}
|
144
|
+
const P = ({ children: r, ...e }) => /* @__PURE__ */ h(
|
145
|
+
g,
|
146
|
+
{
|
147
|
+
accentColor: "cyan",
|
148
|
+
appearance: "dark",
|
149
|
+
radius: "small",
|
150
|
+
panelBackground: "solid",
|
151
|
+
...e,
|
152
|
+
children: r
|
153
|
+
}
|
154
|
+
);
|
155
155
|
export {
|
156
|
-
|
157
|
-
|
156
|
+
P as Theme,
|
157
|
+
v as initMoisesExtension
|
158
158
|
};
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@moises.ai/extension",
|
3
|
-
"version": "0.0.
|
3
|
+
"version": "0.0.12",
|
4
4
|
"description": "SDK for Moises AI extensions",
|
5
5
|
"private": false,
|
6
6
|
"type": "module",
|
@@ -16,7 +16,7 @@
|
|
16
16
|
"dev": "vite build --watch"
|
17
17
|
},
|
18
18
|
"dependencies": {
|
19
|
-
"@
|
19
|
+
"@moises.ai/design-system": "^0.0.2"
|
20
20
|
},
|
21
21
|
"peerDependencies": {
|
22
22
|
"react": "*",
|