@motiadev/plugin-example 0.14.0-beta.164 → 0.14.0-beta.165-707935
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.css +669 -0
- package/dist/index.css.map +1 -0
- package/dist/index.d.ts +6 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +164 -434
- package/dist/index.js.map +1 -0
- package/dist/plugin.d.ts +6 -2
- package/dist/plugin.d.ts.map +1 -1
- package/dist/plugin.js +14 -16
- package/dist/plugin.js.map +1 -0
- package/package.json +22 -26
- package/dist/components/example-page.d.ts +0 -3
- package/dist/components/example-page.d.ts.map +0 -1
- package/dist/index.cjs +0 -47
- package/dist/plugin-example.css +0 -1
- package/dist/plugin.cjs +0 -1
package/dist/index.js
CHANGED
|
@@ -1,435 +1,165 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { Badge
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
*/
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
}, (n !== void 0 ? n : null) !== null ? Object.defineProperty(e, "ref", {
|
|
162
|
-
enumerable: !1,
|
|
163
|
-
get: _
|
|
164
|
-
}) : Object.defineProperty(e, "ref", { enumerable: !1, value: null }), e._store = {}, Object.defineProperty(e._store, "validated", {
|
|
165
|
-
configurable: !1,
|
|
166
|
-
enumerable: !1,
|
|
167
|
-
writable: !0,
|
|
168
|
-
value: 0
|
|
169
|
-
}), Object.defineProperty(e, "_debugInfo", {
|
|
170
|
-
configurable: !1,
|
|
171
|
-
enumerable: !1,
|
|
172
|
-
writable: !0,
|
|
173
|
-
value: null
|
|
174
|
-
}), Object.defineProperty(e, "_debugStack", {
|
|
175
|
-
configurable: !1,
|
|
176
|
-
enumerable: !1,
|
|
177
|
-
writable: !0,
|
|
178
|
-
value: N
|
|
179
|
-
}), Object.defineProperty(e, "_debugTask", {
|
|
180
|
-
configurable: !1,
|
|
181
|
-
enumerable: !1,
|
|
182
|
-
writable: !0,
|
|
183
|
-
value: y
|
|
184
|
-
}), Object.freeze && (Object.freeze(e.props), Object.freeze(e)), e;
|
|
185
|
-
}
|
|
186
|
-
function E(e, r, n, l, p, f, N, y) {
|
|
187
|
-
var i = r.children;
|
|
188
|
-
if (i !== void 0)
|
|
189
|
-
if (l)
|
|
190
|
-
if (se(i)) {
|
|
191
|
-
for (l = 0; l < i.length; l++)
|
|
192
|
-
S(i[l]);
|
|
193
|
-
Object.freeze && Object.freeze(i);
|
|
194
|
-
} else
|
|
195
|
-
console.error(
|
|
196
|
-
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
197
|
-
);
|
|
198
|
-
else S(i);
|
|
199
|
-
if (I.call(r, "key")) {
|
|
200
|
-
i = a(e);
|
|
201
|
-
var x = Object.keys(r).filter(function(oe) {
|
|
202
|
-
return oe !== "key";
|
|
203
|
-
});
|
|
204
|
-
l = 0 < x.length ? "{key: someKey, " + x.join(": ..., ") + ": ...}" : "{key: someKey}", F[i + l] || (x = 0 < x.length ? "{" + x.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
205
|
-
`A props object containing a "key" prop is being spread into JSX:
|
|
206
|
-
let props = %s;
|
|
207
|
-
<%s {...props} />
|
|
208
|
-
React keys must be passed directly to JSX without using spread:
|
|
209
|
-
let props = %s;
|
|
210
|
-
<%s key={someKey} {...props} />`,
|
|
211
|
-
l,
|
|
212
|
-
i,
|
|
213
|
-
x,
|
|
214
|
-
i
|
|
215
|
-
), F[i + l] = !0);
|
|
216
|
-
}
|
|
217
|
-
if (i = null, n !== void 0 && (c(n), i = "" + n), h(r) && (c(r.key), i = "" + r.key), "key" in r) {
|
|
218
|
-
n = {};
|
|
219
|
-
for (var A in r)
|
|
220
|
-
A !== "key" && (n[A] = r[A]);
|
|
221
|
-
} else n = r;
|
|
222
|
-
return i && m(
|
|
223
|
-
n,
|
|
224
|
-
typeof e == "function" ? e.displayName || e.name || "Unknown" : e
|
|
225
|
-
), R(
|
|
226
|
-
e,
|
|
227
|
-
i,
|
|
228
|
-
f,
|
|
229
|
-
p,
|
|
230
|
-
u(),
|
|
231
|
-
n,
|
|
232
|
-
N,
|
|
233
|
-
y
|
|
234
|
-
);
|
|
235
|
-
}
|
|
236
|
-
function S(e) {
|
|
237
|
-
typeof e == "object" && e !== null && e.$$typeof === O && e._store && (e._store.validated = 1);
|
|
238
|
-
}
|
|
239
|
-
var g = le, O = Symbol.for("react.transitional.element"), G = Symbol.for("react.portal"), w = Symbol.for("react.fragment"), X = Symbol.for("react.strict_mode"), Z = Symbol.for("react.profiler"), H = Symbol.for("react.consumer"), Q = Symbol.for("react.context"), K = Symbol.for("react.forward_ref"), ee = Symbol.for("react.suspense"), re = Symbol.for("react.suspense_list"), te = Symbol.for("react.memo"), C = Symbol.for("react.lazy"), ae = Symbol.for("react.activity"), ne = Symbol.for("react.client.reference"), T = g.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, I = Object.prototype.hasOwnProperty, se = Array.isArray, k = console.createTask ? console.createTask : function() {
|
|
240
|
-
return null;
|
|
241
|
-
};
|
|
242
|
-
g = {
|
|
243
|
-
react_stack_bottom_frame: function(e) {
|
|
244
|
-
return e();
|
|
245
|
-
}
|
|
246
|
-
};
|
|
247
|
-
var M, Y = {}, $ = g.react_stack_bottom_frame.bind(
|
|
248
|
-
g,
|
|
249
|
-
o
|
|
250
|
-
)(), L = k(d(o)), F = {};
|
|
251
|
-
v.Fragment = w, v.jsx = function(e, r, n, l, p) {
|
|
252
|
-
var f = 1e4 > T.recentlyCreatedOwnerStacks++;
|
|
253
|
-
return E(
|
|
254
|
-
e,
|
|
255
|
-
r,
|
|
256
|
-
n,
|
|
257
|
-
!1,
|
|
258
|
-
l,
|
|
259
|
-
p,
|
|
260
|
-
f ? Error("react-stack-top-frame") : $,
|
|
261
|
-
f ? k(d(e)) : L
|
|
262
|
-
);
|
|
263
|
-
}, v.jsxs = function(e, r, n, l, p) {
|
|
264
|
-
var f = 1e4 > T.recentlyCreatedOwnerStacks++;
|
|
265
|
-
return E(
|
|
266
|
-
e,
|
|
267
|
-
r,
|
|
268
|
-
n,
|
|
269
|
-
!0,
|
|
270
|
-
l,
|
|
271
|
-
p,
|
|
272
|
-
f ? Error("react-stack-top-frame") : $,
|
|
273
|
-
f ? k(d(e)) : L
|
|
274
|
-
);
|
|
275
|
-
};
|
|
276
|
-
}()), v;
|
|
277
|
-
}
|
|
278
|
-
var q;
|
|
279
|
-
function de() {
|
|
280
|
-
return q || (q = 1, process.env.NODE_ENV === "production" ? j.exports = ce() : j.exports = ue()), j.exports;
|
|
281
|
-
}
|
|
282
|
-
var t = de();
|
|
283
|
-
/**
|
|
284
|
-
* @license lucide-react v0.548.0 - ISC
|
|
285
|
-
*
|
|
286
|
-
* This source code is licensed under the ISC license.
|
|
287
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
288
|
-
*/
|
|
289
|
-
const fe = (a) => a.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), me = (a) => a.replace(
|
|
290
|
-
/^([A-Z])|[\s-_]+(\w)/g,
|
|
291
|
-
(s, c, d) => d ? d.toUpperCase() : c.toLowerCase()
|
|
292
|
-
), z = (a) => {
|
|
293
|
-
const s = me(a);
|
|
294
|
-
return s.charAt(0).toUpperCase() + s.slice(1);
|
|
295
|
-
}, B = (...a) => a.filter((s, c, d) => !!s && s.trim() !== "" && d.indexOf(s) === c).join(" ").trim(), pe = (a) => {
|
|
296
|
-
for (const s in a)
|
|
297
|
-
if (s.startsWith("aria-") || s === "role" || s === "title")
|
|
298
|
-
return !0;
|
|
299
|
-
};
|
|
300
|
-
/**
|
|
301
|
-
* @license lucide-react v0.548.0 - ISC
|
|
302
|
-
*
|
|
303
|
-
* This source code is licensed under the ISC license.
|
|
304
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
305
|
-
*/
|
|
306
|
-
var he = {
|
|
307
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
308
|
-
width: 24,
|
|
309
|
-
height: 24,
|
|
310
|
-
viewBox: "0 0 24 24",
|
|
311
|
-
fill: "none",
|
|
312
|
-
stroke: "currentColor",
|
|
313
|
-
strokeWidth: 2,
|
|
314
|
-
strokeLinecap: "round",
|
|
315
|
-
strokeLinejoin: "round"
|
|
316
|
-
};
|
|
317
|
-
/**
|
|
318
|
-
* @license lucide-react v0.548.0 - ISC
|
|
319
|
-
*
|
|
320
|
-
* This source code is licensed under the ISC license.
|
|
321
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
322
|
-
*/
|
|
323
|
-
const xe = V(
|
|
324
|
-
({
|
|
325
|
-
color: a = "currentColor",
|
|
326
|
-
size: s = 24,
|
|
327
|
-
strokeWidth: c = 2,
|
|
328
|
-
absoluteStrokeWidth: d,
|
|
329
|
-
className: u = "",
|
|
330
|
-
children: o,
|
|
331
|
-
iconNode: h,
|
|
332
|
-
...m
|
|
333
|
-
}, _) => P(
|
|
334
|
-
"svg",
|
|
335
|
-
{
|
|
336
|
-
ref: _,
|
|
337
|
-
...he,
|
|
338
|
-
width: s,
|
|
339
|
-
height: s,
|
|
340
|
-
stroke: a,
|
|
341
|
-
strokeWidth: d ? Number(c) * 24 / Number(s) : c,
|
|
342
|
-
className: B("lucide", u),
|
|
343
|
-
...!o && !pe(m) && { "aria-hidden": "true" },
|
|
344
|
-
...m
|
|
345
|
-
},
|
|
346
|
-
[
|
|
347
|
-
...h.map(([R, E]) => P(R, E)),
|
|
348
|
-
...Array.isArray(o) ? o : [o]
|
|
349
|
-
]
|
|
350
|
-
)
|
|
351
|
-
);
|
|
352
|
-
/**
|
|
353
|
-
* @license lucide-react v0.548.0 - ISC
|
|
354
|
-
*
|
|
355
|
-
* This source code is licensed under the ISC license.
|
|
356
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
357
|
-
*/
|
|
358
|
-
const be = (a, s) => {
|
|
359
|
-
const c = V(
|
|
360
|
-
({ className: d, ...u }, o) => P(xe, {
|
|
361
|
-
ref: o,
|
|
362
|
-
iconNode: s,
|
|
363
|
-
className: B(
|
|
364
|
-
`lucide-${fe(z(a))}`,
|
|
365
|
-
`lucide-${a}`,
|
|
366
|
-
d
|
|
367
|
-
),
|
|
368
|
-
...u
|
|
369
|
-
})
|
|
370
|
-
);
|
|
371
|
-
return c.displayName = z(a), c;
|
|
372
|
-
};
|
|
373
|
-
/**
|
|
374
|
-
* @license lucide-react v0.548.0 - ISC
|
|
375
|
-
*
|
|
376
|
-
* This source code is licensed under the ISC license.
|
|
377
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
378
|
-
*/
|
|
379
|
-
const ve = [
|
|
380
|
-
[
|
|
381
|
-
"path",
|
|
382
|
-
{
|
|
383
|
-
d: "M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",
|
|
384
|
-
key: "1s2grr"
|
|
385
|
-
}
|
|
386
|
-
],
|
|
387
|
-
["path", { d: "M20 2v4", key: "1rf3ol" }],
|
|
388
|
-
["path", { d: "M22 4h-4", key: "gwowj6" }],
|
|
389
|
-
["circle", { cx: "4", cy: "20", r: "2", key: "6kqj1y" }]
|
|
390
|
-
], J = be("sparkles", ve), je = () => /* @__PURE__ */ t.jsx("div", { className: "h-full w-full p-6 overflow-auto", children: /* @__PURE__ */ t.jsxs("div", { className: "max-w-4xl mx-auto space-y-6", children: [
|
|
391
|
-
/* @__PURE__ */ t.jsxs("div", { className: "flex items-center gap-3", children: [
|
|
392
|
-
/* @__PURE__ */ t.jsx(J, { className: "w-8 h-8 text-primary" }),
|
|
393
|
-
/* @__PURE__ */ t.jsx("h1", { className: "text-3xl font-bold", children: "Example Plugin" }),
|
|
394
|
-
/* @__PURE__ */ t.jsx(ie, { variant: "info", children: "v1.0.0" })
|
|
395
|
-
] }),
|
|
396
|
-
/* @__PURE__ */ t.jsx("p", { className: "text-muted-foreground text-lg", children: "Welcome to the example plugin! This demonstrates the basic structure and functionality of a Motia plugin." }),
|
|
397
|
-
/* @__PURE__ */ t.jsxs("div", { className: "p-6 space-y-4", children: [
|
|
398
|
-
/* @__PURE__ */ t.jsx("h2", { className: "text-xl font-semibold", children: "What is this?" }),
|
|
399
|
-
/* @__PURE__ */ t.jsx("p", { className: "text-muted-foreground", children: "This is a minimal example plugin that shows how to create custom workbench tabs in Motia. Plugins can extend the Motia workbench with custom functionality, visualizations, and tools." }),
|
|
400
|
-
/* @__PURE__ */ t.jsxs("div", { className: "grid grid-cols-1 md:grid-cols-3 gap-4 mt-6", children: [
|
|
401
|
-
/* @__PURE__ */ t.jsxs("div", { className: "p-4 border rounded-lg", children: [
|
|
402
|
-
/* @__PURE__ */ t.jsx("h3", { className: "font-semibold mb-2", children: "Easy to Create" }),
|
|
403
|
-
/* @__PURE__ */ t.jsx("p", { className: "text-sm text-muted-foreground", children: "Build plugins with React, TypeScript, and Tailwind CSS" })
|
|
404
|
-
] }),
|
|
405
|
-
/* @__PURE__ */ t.jsxs("div", { className: "p-4 border rounded-lg", children: [
|
|
406
|
-
/* @__PURE__ */ t.jsx("h3", { className: "font-semibold mb-2", children: "Integrated" }),
|
|
407
|
-
/* @__PURE__ */ t.jsx("p", { className: "text-sm text-muted-foreground", children: "Seamlessly integrate with Motia's workbench UI" })
|
|
408
|
-
] }),
|
|
409
|
-
/* @__PURE__ */ t.jsxs("div", { className: "p-4 border rounded-lg", children: [
|
|
410
|
-
/* @__PURE__ */ t.jsx("h3", { className: "font-semibold mb-2", children: "Powerful" }),
|
|
411
|
-
/* @__PURE__ */ t.jsx("p", { className: "text-sm text-muted-foreground", children: "Access Motia's plugin context and APIs" })
|
|
412
|
-
] })
|
|
413
|
-
] }),
|
|
414
|
-
/* @__PURE__ */ t.jsxs("div", { className: "flex gap-2 mt-6", children: [
|
|
415
|
-
/* @__PURE__ */ t.jsxs(W, { variant: "default", children: [
|
|
416
|
-
/* @__PURE__ */ t.jsx(J, { className: "w-4 h-4" }),
|
|
417
|
-
"Get Started"
|
|
418
|
-
] }),
|
|
419
|
-
/* @__PURE__ */ t.jsx(W, { variant: "outline", children: "View Documentation" })
|
|
420
|
-
] })
|
|
421
|
-
] }),
|
|
422
|
-
/* @__PURE__ */ t.jsxs("div", { className: "p-6 space-y-4", children: [
|
|
423
|
-
/* @__PURE__ */ t.jsx("h2", { className: "text-xl font-semibold", children: "Plugin Features" }),
|
|
424
|
-
/* @__PURE__ */ t.jsxs("ul", { className: "list-disc list-inside space-y-2 text-muted-foreground", children: [
|
|
425
|
-
/* @__PURE__ */ t.jsx("li", { children: "Custom workbench tabs with position control (top/bottom)" }),
|
|
426
|
-
/* @__PURE__ */ t.jsx("li", { children: "Access to Motia's UI components library" }),
|
|
427
|
-
/* @__PURE__ */ t.jsx("li", { children: "Integration with state management and APIs" }),
|
|
428
|
-
/* @__PURE__ */ t.jsx("li", { children: "Real-time updates through streams" }),
|
|
429
|
-
/* @__PURE__ */ t.jsx("li", { children: "TypeScript support with full type safety" })
|
|
430
|
-
] })
|
|
431
|
-
] })
|
|
432
|
-
] }) });
|
|
433
|
-
export {
|
|
434
|
-
je as ExamplePage
|
|
1
|
+
import { c } from "react/compiler-runtime";
|
|
2
|
+
import { Badge, Button } from "@motiadev/ui";
|
|
3
|
+
import { Sparkles } from "lucide-react";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
|
|
6
|
+
//#region src/components/example-page.tsx
|
|
7
|
+
const ExamplePage = () => {
|
|
8
|
+
const $ = c(10);
|
|
9
|
+
let t0;
|
|
10
|
+
let t1;
|
|
11
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
12
|
+
t0 = /* @__PURE__ */ jsxs("div", {
|
|
13
|
+
className: "flex items-center gap-3",
|
|
14
|
+
children: [
|
|
15
|
+
/* @__PURE__ */ jsx(Sparkles, { className: "w-8 h-8 text-primary" }),
|
|
16
|
+
/* @__PURE__ */ jsx("h1", {
|
|
17
|
+
className: "text-3xl font-bold",
|
|
18
|
+
children: "Example Plugin"
|
|
19
|
+
}),
|
|
20
|
+
/* @__PURE__ */ jsx(Badge, {
|
|
21
|
+
variant: "info",
|
|
22
|
+
children: "v1.0.0"
|
|
23
|
+
})
|
|
24
|
+
]
|
|
25
|
+
});
|
|
26
|
+
t1 = /* @__PURE__ */ jsx("p", {
|
|
27
|
+
className: "text-muted-foreground text-lg",
|
|
28
|
+
children: "Welcome to the example plugin! This demonstrates the basic structure and functionality of a Motia plugin."
|
|
29
|
+
});
|
|
30
|
+
$[0] = t0;
|
|
31
|
+
$[1] = t1;
|
|
32
|
+
} else {
|
|
33
|
+
t0 = $[0];
|
|
34
|
+
t1 = $[1];
|
|
35
|
+
}
|
|
36
|
+
let t2;
|
|
37
|
+
let t3;
|
|
38
|
+
if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
39
|
+
t2 = /* @__PURE__ */ jsx("h2", {
|
|
40
|
+
className: "text-xl font-semibold",
|
|
41
|
+
children: "What is this?"
|
|
42
|
+
});
|
|
43
|
+
t3 = /* @__PURE__ */ jsx("p", {
|
|
44
|
+
className: "text-muted-foreground",
|
|
45
|
+
children: "This is a minimal example plugin that shows how to create custom workbench tabs in Motia. Plugins can extend the Motia workbench with custom functionality, visualizations, and tools."
|
|
46
|
+
});
|
|
47
|
+
$[2] = t2;
|
|
48
|
+
$[3] = t3;
|
|
49
|
+
} else {
|
|
50
|
+
t2 = $[2];
|
|
51
|
+
t3 = $[3];
|
|
52
|
+
}
|
|
53
|
+
let t4;
|
|
54
|
+
if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
|
|
55
|
+
t4 = /* @__PURE__ */ jsxs("div", {
|
|
56
|
+
className: "p-4 border rounded-lg",
|
|
57
|
+
children: [/* @__PURE__ */ jsx("h3", {
|
|
58
|
+
className: "font-semibold mb-2",
|
|
59
|
+
children: "Easy to Create"
|
|
60
|
+
}), /* @__PURE__ */ jsx("p", {
|
|
61
|
+
className: "text-sm text-muted-foreground",
|
|
62
|
+
children: "Build plugins with React, TypeScript, and Tailwind CSS"
|
|
63
|
+
})]
|
|
64
|
+
});
|
|
65
|
+
$[4] = t4;
|
|
66
|
+
} else t4 = $[4];
|
|
67
|
+
let t5;
|
|
68
|
+
if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
|
|
69
|
+
t5 = /* @__PURE__ */ jsxs("div", {
|
|
70
|
+
className: "p-4 border rounded-lg",
|
|
71
|
+
children: [/* @__PURE__ */ jsx("h3", {
|
|
72
|
+
className: "font-semibold mb-2",
|
|
73
|
+
children: "Integrated"
|
|
74
|
+
}), /* @__PURE__ */ jsx("p", {
|
|
75
|
+
className: "text-sm text-muted-foreground",
|
|
76
|
+
children: "Seamlessly integrate with Motia's workbench UI"
|
|
77
|
+
})]
|
|
78
|
+
});
|
|
79
|
+
$[5] = t5;
|
|
80
|
+
} else t5 = $[5];
|
|
81
|
+
let t6;
|
|
82
|
+
if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
|
|
83
|
+
t6 = /* @__PURE__ */ jsxs("div", {
|
|
84
|
+
className: "grid grid-cols-1 md:grid-cols-3 gap-4 mt-6",
|
|
85
|
+
children: [
|
|
86
|
+
t4,
|
|
87
|
+
t5,
|
|
88
|
+
/* @__PURE__ */ jsxs("div", {
|
|
89
|
+
className: "p-4 border rounded-lg",
|
|
90
|
+
children: [/* @__PURE__ */ jsx("h3", {
|
|
91
|
+
className: "font-semibold mb-2",
|
|
92
|
+
children: "Powerful"
|
|
93
|
+
}), /* @__PURE__ */ jsx("p", {
|
|
94
|
+
className: "text-sm text-muted-foreground",
|
|
95
|
+
children: "Access Motia's plugin context and APIs"
|
|
96
|
+
})]
|
|
97
|
+
})
|
|
98
|
+
]
|
|
99
|
+
});
|
|
100
|
+
$[6] = t6;
|
|
101
|
+
} else t6 = $[6];
|
|
102
|
+
let t7;
|
|
103
|
+
if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
|
|
104
|
+
t7 = /* @__PURE__ */ jsxs("div", {
|
|
105
|
+
className: "p-6 space-y-4",
|
|
106
|
+
children: [
|
|
107
|
+
t2,
|
|
108
|
+
t3,
|
|
109
|
+
t6,
|
|
110
|
+
/* @__PURE__ */ jsxs("div", {
|
|
111
|
+
className: "flex gap-2 mt-6",
|
|
112
|
+
children: [/* @__PURE__ */ jsxs(Button, {
|
|
113
|
+
variant: "default",
|
|
114
|
+
children: [/* @__PURE__ */ jsx(Sparkles, { className: "w-4 h-4" }), "Get Started"]
|
|
115
|
+
}), /* @__PURE__ */ jsx(Button, {
|
|
116
|
+
variant: "outline",
|
|
117
|
+
children: "View Documentation"
|
|
118
|
+
})]
|
|
119
|
+
})
|
|
120
|
+
]
|
|
121
|
+
});
|
|
122
|
+
$[7] = t7;
|
|
123
|
+
} else t7 = $[7];
|
|
124
|
+
let t8;
|
|
125
|
+
if ($[8] === Symbol.for("react.memo_cache_sentinel")) {
|
|
126
|
+
t8 = /* @__PURE__ */ jsx("h2", {
|
|
127
|
+
className: "text-xl font-semibold",
|
|
128
|
+
children: "Plugin Features"
|
|
129
|
+
});
|
|
130
|
+
$[8] = t8;
|
|
131
|
+
} else t8 = $[8];
|
|
132
|
+
let t9;
|
|
133
|
+
if ($[9] === Symbol.for("react.memo_cache_sentinel")) {
|
|
134
|
+
t9 = /* @__PURE__ */ jsx("div", {
|
|
135
|
+
className: "h-full w-full p-6 overflow-auto",
|
|
136
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
137
|
+
className: "max-w-4xl mx-auto space-y-6",
|
|
138
|
+
children: [
|
|
139
|
+
t0,
|
|
140
|
+
t1,
|
|
141
|
+
t7,
|
|
142
|
+
/* @__PURE__ */ jsxs("div", {
|
|
143
|
+
className: "p-6 space-y-4",
|
|
144
|
+
children: [t8, /* @__PURE__ */ jsxs("ul", {
|
|
145
|
+
className: "list-disc list-inside space-y-2 text-muted-foreground",
|
|
146
|
+
children: [
|
|
147
|
+
/* @__PURE__ */ jsx("li", { children: "Custom workbench tabs with position control (top/bottom)" }),
|
|
148
|
+
/* @__PURE__ */ jsx("li", { children: "Access to Motia's UI components library" }),
|
|
149
|
+
/* @__PURE__ */ jsx("li", { children: "Integration with state management and APIs" }),
|
|
150
|
+
/* @__PURE__ */ jsx("li", { children: "Real-time updates through streams" }),
|
|
151
|
+
/* @__PURE__ */ jsx("li", { children: "TypeScript support with full type safety" })
|
|
152
|
+
]
|
|
153
|
+
})]
|
|
154
|
+
})
|
|
155
|
+
]
|
|
156
|
+
})
|
|
157
|
+
});
|
|
158
|
+
$[9] = t9;
|
|
159
|
+
} else t9 = $[9];
|
|
160
|
+
return t9;
|
|
435
161
|
};
|
|
162
|
+
|
|
163
|
+
//#endregion
|
|
164
|
+
export { ExamplePage };
|
|
165
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["Badge","Button","Sparkles","React","ExamplePage","FC","$","_c","t0","t1","Symbol","for","t2","t3","t4","t5","t6","t7","t8","t9"],"sources":["../src/components/example-page.tsx"],"sourcesContent":["import { Badge, Button } from '@motiadev/ui'\nimport { Sparkles } from 'lucide-react'\nimport type React from 'react'\n\nexport const ExamplePage: React.FC = () => {\n return (\n <div className=\"h-full w-full p-6 overflow-auto\">\n <div className=\"max-w-4xl mx-auto space-y-6\">\n <div className=\"flex items-center gap-3\">\n <Sparkles className=\"w-8 h-8 text-primary\" />\n <h1 className=\"text-3xl font-bold\">Example Plugin</h1>\n <Badge variant=\"info\">v1.0.0</Badge>\n </div>\n\n <p className=\"text-muted-foreground text-lg\">\n Welcome to the example plugin! This demonstrates the basic structure and functionality of a Motia plugin.\n </p>\n\n <div className=\"p-6 space-y-4\">\n <h2 className=\"text-xl font-semibold\">What is this?</h2>\n <p className=\"text-muted-foreground\">\n This is a minimal example plugin that shows how to create custom workbench tabs in Motia. Plugins can extend\n the Motia workbench with custom functionality, visualizations, and tools.\n </p>\n\n <div className=\"grid grid-cols-1 md:grid-cols-3 gap-4 mt-6\">\n <div className=\"p-4 border rounded-lg\">\n <h3 className=\"font-semibold mb-2\">Easy to Create</h3>\n <p className=\"text-sm text-muted-foreground\">Build plugins with React, TypeScript, and Tailwind CSS</p>\n </div>\n <div className=\"p-4 border rounded-lg\">\n <h3 className=\"font-semibold mb-2\">Integrated</h3>\n <p className=\"text-sm text-muted-foreground\">Seamlessly integrate with Motia's workbench UI</p>\n </div>\n <div className=\"p-4 border rounded-lg\">\n <h3 className=\"font-semibold mb-2\">Powerful</h3>\n <p className=\"text-sm text-muted-foreground\">Access Motia's plugin context and APIs</p>\n </div>\n </div>\n\n <div className=\"flex gap-2 mt-6\">\n <Button variant=\"default\">\n <Sparkles className=\"w-4 h-4\" />\n Get Started\n </Button>\n <Button variant=\"outline\">View Documentation</Button>\n </div>\n </div>\n\n <div className=\"p-6 space-y-4\">\n <h2 className=\"text-xl font-semibold\">Plugin Features</h2>\n <ul className=\"list-disc list-inside space-y-2 text-muted-foreground\">\n <li>Custom workbench tabs with position control (top/bottom)</li>\n <li>Access to Motia's UI components library</li>\n <li>Integration with state management and APIs</li>\n <li>Real-time updates through streams</li>\n <li>TypeScript support with full type safety</li>\n </ul>\n </div>\n </div>\n </div>\n )\n}\n"],"mappings":";;;;;;AAIA,MAAaI,oBAAwB;CAAA,MAAAE,IAAAC,EAAA,GAAA;CAAA,IAAAC;CAAA,IAAAC;AAAA,KAAAH,EAAA,OAAAI,OAAAC,IAAA,4BAAA,EAAA;AAI7BH,OAAA,qBAAA;GAAe,WAAA;;IACb,oBAAC,YAAmB,WAAA,yBACpB;wBAAA;KAAc,WAAA;eAAqB;MACnC;wBAAC;KAAc,SAAA;eAAO;MACxB;;IAAM;AAENC,OAAA,oBAAA;GAAa,WAAA;aAAgC;IAEzC;AAAAH,IAAA,KAAAE;AAAAF,IAAA,KAAAG;QAAA;AAAAD,OAAAF,EAAA;AAAAG,OAAAH,EAAA;;CAAA,IAAAM;CAAA,IAAAC;AAAA,KAAAP,EAAA,OAAAI,OAAAC,IAAA,4BAAA,EAAA;AAGFC,OAAA,oBAAA;GAAc,WAAA;aAAwB;IAAkB;AACxDC,OAAA,oBAAA;GAAa,WAAA;aAAwB;IAGjC;AAAAP,IAAA,KAAAM;AAAAN,IAAA,KAAAO;QAAA;AAAAD,OAAAN,EAAA;AAAAO,OAAAP,EAAA;;CAAA,IAAAQ;AAAA,KAAAR,EAAA,OAAAI,OAAAC,IAAA,4BAAA,EAAA;AAGFG,OAAA,qBAAA;GAAe,WAAA;cACb,oBAAA;IAAc,WAAA;cAAqB;KACnC,sBAAA;IAAa,WAAA;cAAgC;KAC/C;IAAM;AAAAR,IAAA,KAAAQ;OAAAA,MAAAR,EAAA;CAAA,IAAAS;AAAA,KAAAT,EAAA,OAAAI,OAAAC,IAAA,4BAAA,EAAA;AACNI,OAAA,qBAAA;GAAe,WAAA;cACb,oBAAA;IAAc,WAAA;cAAqB;KACnC,sBAAA;IAAa,WAAA;cAAgC;KAC/C;IAAM;AAAAT,IAAA,KAAAS;OAAAA,MAAAT,EAAA;CAAA,IAAAU;AAAA,KAAAV,EAAA,OAAAI,OAAAC,IAAA,4BAAA,EAAA;AARRK,OAAA,qBAAA;GAAe,WAAA;;IACbF;IAIAC;IAIA,qBAAA;KAAe,WAAA;gBACb,oBAAA;MAAc,WAAA;gBAAqB;OACnC,sBAAA;MAAa,WAAA;gBAAgC;OAC/C;MACF;;IAAM;AAAAT,IAAA,KAAAU;OAAAA,MAAAV,EAAA;CAAA,IAAAW;AAAA,KAAAX,EAAA,OAAAI,OAAAC,IAAA,4BAAA,EAAA;AApBRM,OAAA,qBAAA;GAAe,WAAA;;IACbL;IACAC;IAKAG;IAeA,qBAAA;KAAe,WAAA;gBACb,qBAAC;MAAe,SAAA;iBACd,oBAAC,YAAmB,WAAA,YAAY;OAGlC,sBAAC;MAAe,SAAA;gBAAU;OAC5B;MACF;;IAAM;AAAAV,IAAA,KAAAW;OAAAA,MAAAX,EAAA;CAAA,IAAAY;AAAA,KAAAZ,EAAA,OAAAI,OAAAC,IAAA,4BAAA,EAAA;AAGJO,OAAA,oBAAA;GAAc,WAAA;aAAwB;IAAoB;AAAAZ,IAAA,KAAAY;OAAAA,MAAAZ,EAAA;CAAA,IAAAa;AAAA,KAAAb,EAAA,OAAAI,OAAAC,IAAA,4BAAA,EAAA;AA5ChEQ,OAAA,oBAAA;GAAe,WAAA;aACb,qBAAA;IAAe,WAAA;;KACbX;KAMAC;KAIAQ;KA+BA,qBAAA;MAAe,WAAA;iBACbC,IACA,qBAAA;OAAc,WAAA;;QACZ,oBAAA,kBAAI,6DACJ;4BAAA,kBAAI,4CACJ;4BAAA,kBAAI,+CACJ;4BAAA,kBAAI,sCACJ;4BAAA,kBAAI,6CACN;;QACF;OACF;;KACF;IAAM;AAAAZ,IAAA,KAAAa;OAAAA,MAAAb,EAAA;AAAA,QAtDNa"}
|
package/dist/plugin.d.ts
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
-
import { MotiaPlugin, MotiaPluginContext } from
|
|
2
|
-
|
|
1
|
+
import { MotiaPlugin, MotiaPluginContext } from "@motiadev/core";
|
|
2
|
+
|
|
3
|
+
//#region src/plugin.d.ts
|
|
4
|
+
declare function plugin(_motia: MotiaPluginContext): MotiaPlugin;
|
|
5
|
+
//#endregion
|
|
6
|
+
export { plugin as default };
|
|
3
7
|
//# sourceMappingURL=plugin.d.ts.map
|
package/dist/plugin.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.ts","
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","names":[],"sources":["../src/plugin.ts"],"sourcesContent":[],"mappings":";;;iBAEwB,MAAA,SAAe,qBAAqB"}
|