@sudobility/entertainment-components 1.1.0 → 2.0.1

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.d.ts CHANGED
@@ -3,12 +3,5 @@
3
3
  *
4
4
  * Specialized components for entertainment domain
5
5
  */
6
- export * from './audio-waveform';
7
- export * from './live-stream';
8
- export * from './media-playlist';
9
- export * from './media-uploader';
10
- export * from './playlist-manager';
11
6
  export * from './streaming-stats';
12
- export * from './video-editor';
13
- export * from './video-thumbnail';
14
7
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,mBAAmB,CAAC"}
package/dist/index.esm.js CHANGED
@@ -1,49 +1,49 @@
1
- import te, { useState as H, useRef as ae } from "react";
2
- import { cn as v } from "@sudobility/components";
3
- var D = { exports: {} }, T = {};
4
- var Z;
5
- function oe() {
6
- if (Z) return T;
7
- Z = 1;
8
- var n = Symbol.for("react.transitional.element"), l = Symbol.for("react.fragment");
9
- function o(d, u, f) {
10
- var p = null;
11
- if (f !== void 0 && (p = "" + f), u.key !== void 0 && (p = "" + u.key), "key" in u) {
12
- f = {};
13
- for (var m in u)
14
- m !== "key" && (f[m] = u[m]);
15
- } else f = u;
16
- return u = f.ref, {
17
- $$typeof: n,
18
- type: d,
19
- key: p,
20
- ref: u !== void 0 ? u : null,
21
- props: f
1
+ import K from "react";
2
+ import { cn as ee } from "@sudobility/components";
3
+ var p = { exports: {} }, _ = {};
4
+ var $;
5
+ function re() {
6
+ if ($) return _;
7
+ $ = 1;
8
+ var l = Symbol.for("react.transitional.element"), c = Symbol.for("react.fragment");
9
+ function u(f, o, s) {
10
+ var d = null;
11
+ if (s !== void 0 && (d = "" + s), o.key !== void 0 && (d = "" + o.key), "key" in o) {
12
+ s = {};
13
+ for (var m in o)
14
+ m !== "key" && (s[m] = o[m]);
15
+ } else s = o;
16
+ return o = s.ref, {
17
+ $$typeof: l,
18
+ type: f,
19
+ key: d,
20
+ ref: o !== void 0 ? o : null,
21
+ props: s
22
22
  };
23
23
  }
24
- return T.Fragment = l, T.jsx = o, T.jsxs = o, T;
24
+ return _.Fragment = c, _.jsx = u, _.jsxs = u, _;
25
25
  }
26
- var N = {};
27
- var Q;
28
- function ne() {
29
- return Q || (Q = 1, process.env.NODE_ENV !== "production" && (function() {
30
- function n(e) {
26
+ var E = {};
27
+ var I;
28
+ function te() {
29
+ return I || (I = 1, process.env.NODE_ENV !== "production" && (function() {
30
+ function l(e) {
31
31
  if (e == null) return null;
32
32
  if (typeof e == "function")
33
- return e.$$typeof === R ? null : e.displayName || e.name || null;
33
+ return e.$$typeof === H ? null : e.displayName || e.name || null;
34
34
  if (typeof e == "string") return e;
35
35
  switch (e) {
36
- case x:
36
+ case v:
37
37
  return "Fragment";
38
- case P:
38
+ case U:
39
39
  return "Profiler";
40
- case $:
40
+ case W:
41
41
  return "StrictMode";
42
- case C:
42
+ case z:
43
43
  return "Suspense";
44
- case Y:
44
+ case G:
45
45
  return "SuspenseList";
46
- case F:
46
+ case B:
47
47
  return "Activity";
48
48
  }
49
49
  if (typeof e == "object")
@@ -52,98 +52,98 @@ function ne() {
52
52
  ), e.$$typeof) {
53
53
  case M:
54
54
  return "Portal";
55
- case b:
55
+ case J:
56
56
  return e.displayName || "Context";
57
- case t:
57
+ case q:
58
58
  return (e._context.displayName || "Context") + ".Consumer";
59
- case w:
59
+ case V:
60
60
  var r = e.render;
61
61
  return e = e.displayName, e || (e = r.displayName || r.name || "", e = e !== "" ? "ForwardRef(" + e + ")" : "ForwardRef"), e;
62
- case g:
63
- return r = e.displayName || null, r !== null ? r : n(e.type) || "Memo";
64
- case _:
62
+ case X:
63
+ return r = e.displayName || null, r !== null ? r : l(e.type) || "Memo";
64
+ case T:
65
65
  r = e._payload, e = e._init;
66
66
  try {
67
- return n(e(r));
67
+ return l(e(r));
68
68
  } catch {
69
69
  }
70
70
  }
71
71
  return null;
72
72
  }
73
- function l(e) {
73
+ function c(e) {
74
74
  return "" + e;
75
75
  }
76
- function o(e) {
76
+ function u(e) {
77
77
  try {
78
- l(e);
78
+ c(e);
79
79
  var r = !1;
80
80
  } catch {
81
81
  r = !0;
82
82
  }
83
83
  if (r) {
84
84
  r = console;
85
- var s = r.error, i = typeof Symbol == "function" && Symbol.toStringTag && e[Symbol.toStringTag] || e.constructor.name || "Object";
86
- return s.call(
85
+ var t = r.error, n = typeof Symbol == "function" && Symbol.toStringTag && e[Symbol.toStringTag] || e.constructor.name || "Object";
86
+ return t.call(
87
87
  r,
88
88
  "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
89
- i
90
- ), l(e);
89
+ n
90
+ ), c(e);
91
91
  }
92
92
  }
93
- function d(e) {
94
- if (e === x) return "<>";
95
- if (typeof e == "object" && e !== null && e.$$typeof === _)
93
+ function f(e) {
94
+ if (e === v) return "<>";
95
+ if (typeof e == "object" && e !== null && e.$$typeof === T)
96
96
  return "<...>";
97
97
  try {
98
- var r = n(e);
98
+ var r = l(e);
99
99
  return r ? "<" + r + ">" : "<...>";
100
100
  } catch {
101
101
  return "<...>";
102
102
  }
103
103
  }
104
- function u() {
105
- var e = j.A;
104
+ function o() {
105
+ var e = k.A;
106
106
  return e === null ? null : e.getOwner();
107
107
  }
108
- function f() {
108
+ function s() {
109
109
  return Error("react-stack-top-frame");
110
110
  }
111
- function p(e) {
112
- if (z.call(e, "key")) {
111
+ function d(e) {
112
+ if (P.call(e, "key")) {
113
113
  var r = Object.getOwnPropertyDescriptor(e, "key").get;
114
114
  if (r && r.isReactWarning) return !1;
115
115
  }
116
116
  return e.key !== void 0;
117
117
  }
118
118
  function m(e, r) {
119
- function s() {
120
- q || (q = !0, console.error(
119
+ function t() {
120
+ h || (h = !0, console.error(
121
121
  "%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
122
122
  r
123
123
  ));
124
124
  }
125
- s.isReactWarning = !0, Object.defineProperty(e, "key", {
126
- get: s,
125
+ t.isReactWarning = !0, Object.defineProperty(e, "key", {
126
+ get: t,
127
127
  configurable: !0
128
128
  });
129
129
  }
130
- function S() {
131
- var e = n(this.type);
132
- return B[e] || (B[e] = !0, console.error(
130
+ function D() {
131
+ var e = l(this.type);
132
+ return j[e] || (j[e] = !0, console.error(
133
133
  "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
134
134
  )), e = this.props.ref, e !== void 0 ? e : null;
135
135
  }
136
- function L(e, r, s, i, U, W) {
137
- var c = s.ref;
136
+ function L(e, r, t, n, R, g) {
137
+ var a = t.ref;
138
138
  return e = {
139
- $$typeof: O,
139
+ $$typeof: x,
140
140
  type: e,
141
141
  key: r,
142
- props: s,
143
- _owner: i
144
- }, (c !== void 0 ? c : null) !== null ? Object.defineProperty(e, "ref", {
142
+ props: t,
143
+ _owner: n
144
+ }, (a !== void 0 ? a : null) !== null ? Object.defineProperty(e, "ref", {
145
145
  enumerable: !1,
146
- get: S
146
+ get: D
147
147
  }) : Object.defineProperty(e, "ref", { enumerable: !1, value: null }), e._store = {}, Object.defineProperty(e._store, "validated", {
148
148
  configurable: !1,
149
149
  enumerable: !1,
@@ -158,410 +158,128 @@ function ne() {
158
158
  configurable: !1,
159
159
  enumerable: !1,
160
160
  writable: !0,
161
- value: U
161
+ value: R
162
162
  }), Object.defineProperty(e, "_debugTask", {
163
163
  configurable: !1,
164
164
  enumerable: !1,
165
165
  writable: !0,
166
- value: W
166
+ value: g
167
167
  }), Object.freeze && (Object.freeze(e.props), Object.freeze(e)), e;
168
168
  }
169
- function h(e, r, s, i, U, W) {
170
- var c = r.children;
171
- if (c !== void 0)
172
- if (i)
173
- if (ee(c)) {
174
- for (i = 0; i < c.length; i++)
175
- E(c[i]);
176
- Object.freeze && Object.freeze(c);
169
+ function y(e, r, t, n, R, g) {
170
+ var a = r.children;
171
+ if (a !== void 0)
172
+ if (n)
173
+ if (Z(a)) {
174
+ for (n = 0; n < a.length; n++)
175
+ A(a[n]);
176
+ Object.freeze && Object.freeze(a);
177
177
  } else
178
178
  console.error(
179
179
  "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
180
180
  );
181
- else E(c);
182
- if (z.call(r, "key")) {
183
- c = n(e);
184
- var k = Object.keys(r).filter(function(re) {
185
- return re !== "key";
181
+ else A(a);
182
+ if (P.call(r, "key")) {
183
+ a = l(e);
184
+ var i = Object.keys(r).filter(function(Q) {
185
+ return Q !== "key";
186
186
  });
187
- i = 0 < k.length ? "{key: someKey, " + k.join(": ..., ") + ": ...}" : "{key: someKey}", X[c + i] || (k = 0 < k.length ? "{" + k.join(": ..., ") + ": ...}" : "{}", console.error(
187
+ n = 0 < i.length ? "{key: someKey, " + i.join(": ..., ") + ": ...}" : "{key: someKey}", Y[a + n] || (i = 0 < i.length ? "{" + i.join(": ..., ") + ": ...}" : "{}", console.error(
188
188
  `A props object containing a "key" prop is being spread into JSX:
189
189
  let props = %s;
190
190
  <%s {...props} />
191
191
  React keys must be passed directly to JSX without using spread:
192
192
  let props = %s;
193
193
  <%s key={someKey} {...props} />`,
194
+ n,
195
+ a,
194
196
  i,
195
- c,
196
- k,
197
- c
198
- ), X[c + i] = !0);
197
+ a
198
+ ), Y[a + n] = !0);
199
199
  }
200
- if (c = null, s !== void 0 && (o(s), c = "" + s), p(r) && (o(r.key), c = "" + r.key), "key" in r) {
201
- s = {};
202
- for (var V in r)
203
- V !== "key" && (s[V] = r[V]);
204
- } else s = r;
205
- return c && m(
206
- s,
200
+ if (a = null, t !== void 0 && (u(t), a = "" + t), d(r) && (u(r.key), a = "" + r.key), "key" in r) {
201
+ t = {};
202
+ for (var O in r)
203
+ O !== "key" && (t[O] = r[O]);
204
+ } else t = r;
205
+ return a && m(
206
+ t,
207
207
  typeof e == "function" ? e.displayName || e.name || "Unknown" : e
208
208
  ), L(
209
209
  e,
210
- c,
211
- s,
212
- u(),
213
- U,
214
- W
210
+ a,
211
+ t,
212
+ o(),
213
+ R,
214
+ g
215
215
  );
216
216
  }
217
- function E(e) {
218
- A(e) ? e._store && (e._store.validated = 1) : typeof e == "object" && e !== null && e.$$typeof === _ && (e._payload.status === "fulfilled" ? A(e._payload.value) && e._payload.value._store && (e._payload.value._store.validated = 1) : e._store && (e._store.validated = 1));
219
- }
220
217
  function A(e) {
221
- return typeof e == "object" && e !== null && e.$$typeof === O;
218
+ w(e) ? e._store && (e._store.validated = 1) : typeof e == "object" && e !== null && e.$$typeof === T && (e._payload.status === "fulfilled" ? w(e._payload.value) && e._payload.value._store && (e._payload.value._store.validated = 1) : e._store && (e._store.validated = 1));
219
+ }
220
+ function w(e) {
221
+ return typeof e == "object" && e !== null && e.$$typeof === x;
222
222
  }
223
- var y = te, O = Symbol.for("react.transitional.element"), M = Symbol.for("react.portal"), x = Symbol.for("react.fragment"), $ = Symbol.for("react.strict_mode"), P = Symbol.for("react.profiler"), t = Symbol.for("react.consumer"), b = Symbol.for("react.context"), w = Symbol.for("react.forward_ref"), C = Symbol.for("react.suspense"), Y = Symbol.for("react.suspense_list"), g = Symbol.for("react.memo"), _ = Symbol.for("react.lazy"), F = Symbol.for("react.activity"), R = Symbol.for("react.client.reference"), j = y.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, z = Object.prototype.hasOwnProperty, ee = Array.isArray, I = console.createTask ? console.createTask : function() {
223
+ var b = K, x = Symbol.for("react.transitional.element"), M = Symbol.for("react.portal"), v = Symbol.for("react.fragment"), W = Symbol.for("react.strict_mode"), U = Symbol.for("react.profiler"), q = Symbol.for("react.consumer"), J = Symbol.for("react.context"), V = Symbol.for("react.forward_ref"), z = Symbol.for("react.suspense"), G = Symbol.for("react.suspense_list"), X = Symbol.for("react.memo"), T = Symbol.for("react.lazy"), B = Symbol.for("react.activity"), H = Symbol.for("react.client.reference"), k = b.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, P = Object.prototype.hasOwnProperty, Z = Array.isArray, S = console.createTask ? console.createTask : function() {
224
224
  return null;
225
225
  };
226
- y = {
226
+ b = {
227
227
  react_stack_bottom_frame: function(e) {
228
228
  return e();
229
229
  }
230
230
  };
231
- var q, B = {}, J = y.react_stack_bottom_frame.bind(
232
- y,
233
- f
234
- )(), G = I(d(f)), X = {};
235
- N.Fragment = x, N.jsx = function(e, r, s) {
236
- var i = 1e4 > j.recentlyCreatedOwnerStacks++;
237
- return h(
231
+ var h, j = {}, N = b.react_stack_bottom_frame.bind(
232
+ b,
233
+ s
234
+ )(), C = S(f(s)), Y = {};
235
+ E.Fragment = v, E.jsx = function(e, r, t) {
236
+ var n = 1e4 > k.recentlyCreatedOwnerStacks++;
237
+ return y(
238
238
  e,
239
239
  r,
240
- s,
240
+ t,
241
241
  !1,
242
- i ? Error("react-stack-top-frame") : J,
243
- i ? I(d(e)) : G
242
+ n ? Error("react-stack-top-frame") : N,
243
+ n ? S(f(e)) : C
244
244
  );
245
- }, N.jsxs = function(e, r, s) {
246
- var i = 1e4 > j.recentlyCreatedOwnerStacks++;
247
- return h(
245
+ }, E.jsxs = function(e, r, t) {
246
+ var n = 1e4 > k.recentlyCreatedOwnerStacks++;
247
+ return y(
248
248
  e,
249
249
  r,
250
- s,
250
+ t,
251
251
  !0,
252
- i ? Error("react-stack-top-frame") : J,
253
- i ? I(d(e)) : G
252
+ n ? Error("react-stack-top-frame") : N,
253
+ n ? S(f(e)) : C
254
254
  );
255
255
  };
256
- })()), N;
256
+ })()), E;
257
257
  }
258
- var K;
259
- function se() {
260
- return K || (K = 1, process.env.NODE_ENV === "production" ? D.exports = oe() : D.exports = ne()), D.exports;
258
+ var F;
259
+ function ne() {
260
+ return F || (F = 1, process.env.NODE_ENV === "production" ? p.exports = re() : p.exports = te()), p.exports;
261
261
  }
262
- var a = se();
263
- const ce = ({
264
- className: n,
265
- children: l,
266
- disabled: o = !1,
267
- onClick: d
268
- }) => /* @__PURE__ */ a.jsx(
269
- "div",
270
- {
271
- className: v(
272
- "p-4 rounded-lg border transition-colors",
273
- "bg-white dark:bg-gray-900",
274
- "border-gray-200 dark:border-gray-700",
275
- "text-gray-900 dark:text-white",
276
- o && "opacity-50 cursor-not-allowed",
277
- "hover:bg-gray-50 dark:hover:bg-gray-800",
278
- n
279
- ),
280
- onClick: o ? void 0 : d,
281
- role: "region",
282
- "aria-label": "UaudioUwaveform",
283
- children: l || "UaudioUwaveform Component"
284
- }
285
- ), ue = ({
286
- className: n,
287
- children: l,
288
- disabled: o
289
- }) => /* @__PURE__ */ a.jsx(
290
- "div",
291
- {
292
- className: v(
293
- "p-4 rounded-lg border transition-colors",
294
- "bg-white dark:bg-gray-900",
295
- "border-gray-200 dark:border-gray-700",
296
- "text-gray-900 dark:text-white",
297
- o && "opacity-50 cursor-not-allowed",
298
- n
299
- ),
300
- role: "region",
301
- "aria-label": "LiveStream",
302
- children: l || "LiveStream Component"
303
- }
304
- ), de = ({
305
- className: n,
306
- children: l,
307
- disabled: o = !1,
308
- onClick: d
309
- }) => /* @__PURE__ */ a.jsx(
262
+ var ae = ne();
263
+ const le = ({
264
+ className: l,
265
+ children: c,
266
+ disabled: u
267
+ }) => /* @__PURE__ */ ae.jsx(
310
268
  "div",
311
269
  {
312
- className: v(
270
+ className: ee(
313
271
  "p-4 rounded-lg border transition-colors",
314
272
  "bg-white dark:bg-gray-900",
315
273
  "border-gray-200 dark:border-gray-700",
316
274
  "text-gray-900 dark:text-white",
317
- o && "opacity-50 cursor-not-allowed",
318
- "hover:bg-gray-50 dark:hover:bg-gray-800",
319
- n
320
- ),
321
- onClick: o ? void 0 : d,
322
- role: "region",
323
- "aria-label": "UmediaUplaylist",
324
- children: l || "UmediaUplaylist Component"
325
- }
326
- ), fe = ({
327
- accept: n = ["image/*", "video/*", "audio/*"],
328
- maxSize: l = 50 * 1024 * 1024,
329
- // 50MB default
330
- maxFiles: o = 10,
331
- multiple: d = !0,
332
- onUpload: u,
333
- onRemove: f,
334
- className: p
335
- }) => {
336
- const [m, S] = H([]), [L, h] = H(!1), E = ae(null), A = (t) => {
337
- t.preventDefault(), h(!0);
338
- }, y = (t) => {
339
- t.preventDefault(), h(!1);
340
- }, O = (t) => {
341
- t.preventDefault(), h(!1);
342
- const b = Array.from(t.dataTransfer.files);
343
- x(b);
344
- }, M = (t) => {
345
- if (t.target.files) {
346
- const b = Array.from(t.target.files);
347
- x(b);
348
- }
349
- }, x = (t) => {
350
- const b = t.filter((g) => {
351
- const _ = n.some((R) => {
352
- if (R.endsWith("/*")) {
353
- const j = R.split("/")[0];
354
- return g.type.startsWith(j);
355
- }
356
- return g.type === R;
357
- }), F = g.size <= l;
358
- return _ && F;
359
- }), w = o - m.length, C = b.slice(0, w), Y = C.map((g) => ({
360
- id: `${Date.now()}-${Math.random()}`,
361
- file: g,
362
- preview: g.type.startsWith("image/") ? URL.createObjectURL(g) : void 0,
363
- status: "pending"
364
- }));
365
- S((g) => [...g, ...Y]), u && u(C);
366
- }, $ = (t) => {
367
- S((b) => b.filter((w) => w.id !== t)), f && f(t);
368
- }, P = (t) => t < 1024 ? `${t} B` : t < 1024 * 1024 ? `${(t / 1024).toFixed(1)} KB` : `${(t / (1024 * 1024)).toFixed(1)} MB`;
369
- return /* @__PURE__ */ a.jsxs("div", { className: v("space-y-4", p), children: [
370
- /* @__PURE__ */ a.jsxs(
371
- "div",
372
- {
373
- onDragEnter: A,
374
- onDragOver: (t) => t.preventDefault(),
375
- onDragLeave: y,
376
- onDrop: O,
377
- onClick: () => E.current?.click(),
378
- className: v(
379
- "border-2 border-dashed rounded-lg p-8 text-center cursor-pointer transition-colors",
380
- L ? "border-blue-500 bg-blue-50 dark:bg-blue-900/20" : "border-gray-300 dark:border-gray-700 hover:border-gray-400 dark:hover:border-gray-600"
381
- ),
382
- children: [
383
- /* @__PURE__ */ a.jsx(
384
- "svg",
385
- {
386
- className: "w-12 h-12 mx-auto mb-4 text-gray-400 dark:text-gray-600",
387
- fill: "none",
388
- stroke: "currentColor",
389
- viewBox: "0 0 24 24",
390
- children: /* @__PURE__ */ a.jsx(
391
- "path",
392
- {
393
- strokeLinecap: "round",
394
- strokeLinejoin: "round",
395
- strokeWidth: 2,
396
- d: "M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12"
397
- }
398
- )
399
- }
400
- ),
401
- /* @__PURE__ */ a.jsx("p", { className: "text-gray-700 dark:text-gray-300 mb-2", children: "Drag and drop files here, or click to browse" }),
402
- /* @__PURE__ */ a.jsxs("p", { className: "text-sm text-gray-500 dark:text-gray-400", children: [
403
- "Max ",
404
- o,
405
- " files, ",
406
- P(l),
407
- " each"
408
- ] }),
409
- /* @__PURE__ */ a.jsx(
410
- "input",
411
- {
412
- ref: E,
413
- type: "file",
414
- multiple: d,
415
- accept: n.join(","),
416
- onChange: M,
417
- className: "hidden"
418
- }
419
- )
420
- ]
421
- }
422
- ),
423
- m.length > 0 && /* @__PURE__ */ a.jsx("div", { className: "grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-4", children: m.map((t) => /* @__PURE__ */ a.jsxs(
424
- "div",
425
- {
426
- className: "relative aspect-square rounded-lg overflow-hidden bg-gray-100 dark:bg-gray-800",
427
- children: [
428
- t.preview ? /* @__PURE__ */ a.jsx(
429
- "img",
430
- {
431
- src: t.preview,
432
- alt: t.file.name,
433
- className: "w-full h-full object-cover"
434
- }
435
- ) : /* @__PURE__ */ a.jsx("div", { className: "w-full h-full flex items-center justify-center", children: /* @__PURE__ */ a.jsx(
436
- "svg",
437
- {
438
- className: "w-12 h-12 text-gray-400",
439
- fill: "currentColor",
440
- viewBox: "0 0 24 24",
441
- children: /* @__PURE__ */ a.jsx("path", { d: "M14 2H6a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V8l-6-6zm4 18H6V4h7v5h5v11z" })
442
- }
443
- ) }),
444
- /* @__PURE__ */ a.jsx(
445
- "button",
446
- {
447
- onClick: () => $(t.id),
448
- className: "absolute top-2 right-2 w-6 h-6 rounded-full bg-red-500 text-white flex items-center justify-center hover:bg-red-600 transition-colors",
449
- children: /* @__PURE__ */ a.jsx(
450
- "svg",
451
- {
452
- className: "w-4 h-4",
453
- fill: "none",
454
- stroke: "currentColor",
455
- viewBox: "0 0 24 24",
456
- children: /* @__PURE__ */ a.jsx(
457
- "path",
458
- {
459
- strokeLinecap: "round",
460
- strokeLinejoin: "round",
461
- strokeWidth: 2,
462
- d: "M6 18L18 6M6 6l12 12"
463
- }
464
- )
465
- }
466
- )
467
- }
468
- ),
469
- /* @__PURE__ */ a.jsxs("div", { className: "absolute bottom-0 left-0 right-0 bg-black/70 text-white text-xs p-2", children: [
470
- /* @__PURE__ */ a.jsx("p", { className: "truncate", children: t.file.name }),
471
- /* @__PURE__ */ a.jsx("p", { className: "text-gray-300", children: P(t.file.size) })
472
- ] })
473
- ]
474
- },
475
- t.id
476
- )) })
477
- ] });
478
- }, ge = ({
479
- className: n,
480
- children: l,
481
- disabled: o
482
- }) => /* @__PURE__ */ a.jsx(
483
- "div",
484
- {
485
- className: v(
486
- "p-4 rounded-lg border transition-colors",
487
- "bg-white dark:bg-gray-900",
488
- "border-gray-200 dark:border-gray-700",
489
- "text-gray-900 dark:text-white",
490
- o && "opacity-50 cursor-not-allowed",
491
- n
492
- ),
493
- role: "region",
494
- "aria-label": "PlaylistManager",
495
- children: l || "PlaylistManager Component"
496
- }
497
- ), me = ({
498
- className: n,
499
- children: l,
500
- disabled: o
501
- }) => /* @__PURE__ */ a.jsx(
502
- "div",
503
- {
504
- className: v(
505
- "p-4 rounded-lg border transition-colors",
506
- "bg-white dark:bg-gray-900",
507
- "border-gray-200 dark:border-gray-700",
508
- "text-gray-900 dark:text-white",
509
- o && "opacity-50 cursor-not-allowed",
510
- n
275
+ u && "opacity-50 cursor-not-allowed",
276
+ l
511
277
  ),
512
278
  role: "region",
513
279
  "aria-label": "StreamingStats",
514
- children: l || "StreamingStats Component"
515
- }
516
- ), be = ({
517
- className: n,
518
- children: l,
519
- disabled: o
520
- }) => /* @__PURE__ */ a.jsx(
521
- "div",
522
- {
523
- className: v(
524
- "p-4 rounded-lg border transition-colors",
525
- "bg-white dark:bg-gray-900",
526
- "border-gray-200 dark:border-gray-700",
527
- "text-gray-900 dark:text-white",
528
- o && "opacity-50 cursor-not-allowed",
529
- n
530
- ),
531
- role: "region",
532
- "aria-label": "VideoEditor",
533
- children: l || "VideoEditor Component"
534
- }
535
- ), ve = ({
536
- className: n,
537
- children: l,
538
- disabled: o = !1,
539
- onClick: d
540
- }) => /* @__PURE__ */ a.jsx(
541
- "div",
542
- {
543
- className: v(
544
- "p-4 rounded-lg border transition-colors",
545
- "bg-white dark:bg-gray-900",
546
- "border-gray-200 dark:border-gray-700",
547
- "text-gray-900 dark:text-white",
548
- o && "opacity-50 cursor-not-allowed",
549
- "hover:bg-gray-50 dark:hover:bg-gray-800",
550
- n
551
- ),
552
- onClick: o ? void 0 : d,
553
- role: "region",
554
- "aria-label": "UvideoUthumbnail",
555
- children: l || "UvideoUthumbnail Component"
280
+ children: c || "StreamingStats Component"
556
281
  }
557
282
  );
558
283
  export {
559
- ue as LiveStream,
560
- fe as MediaUploader,
561
- ge as PlaylistManager,
562
- me as StreamingStats,
563
- ce as UaudioUwaveform,
564
- de as UmediaUplaylist,
565
- ve as UvideoUthumbnail,
566
- be as VideoEditor
284
+ le as StreamingStats
567
285
  };
package/dist/index.umd.js CHANGED
@@ -1,6 +1,6 @@
1
- (function(d,p){typeof exports=="object"&&typeof module<"u"?p(exports,require("react"),require("@sudobility/components")):typeof define=="function"&&define.amd?define(["exports","react","@sudobility/components"],p):(d=typeof globalThis<"u"?globalThis:d||self,p(d.Components={},d.React,d.components))})(this,(function(d,p,b){"use strict";var A={exports:{}},_={};var J;function re(){if(J)return _;J=1;var n=Symbol.for("react.transitional.element"),i=Symbol.for("react.fragment");function o(f,u,g){var y=null;if(g!==void 0&&(y=""+g),u.key!==void 0&&(y=""+u.key),"key"in u){g={};for(var v in u)v!=="key"&&(g[v]=u[v])}else g=u;return u=g.ref,{$$typeof:n,type:f,key:y,ref:u!==void 0?u:null,props:g}}return _.Fragment=i,_.jsx=o,_.jsxs=o,_}var R={};var q;function te(){return q||(q=1,process.env.NODE_ENV!=="production"&&(function(){function n(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===N?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case E:return"Fragment";case D:return"Profiler";case I:return"StrictMode";case M:return"Suspense";case V:return"SuspenseList";case W:return"Activity"}if(typeof e=="object")switch(typeof e.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),e.$$typeof){case F:return"Portal";case h:return e.displayName||"Context";case t:return(e._context.displayName||"Context")+".Consumer";case T:var r=e.render;return e=e.displayName,e||(e=r.displayName||r.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case m:return r=e.displayName||null,r!==null?r:n(e.type)||"Memo";case S:r=e._payload,e=e._init;try{return n(e(r))}catch{}}return null}function i(e){return""+e}function o(e){try{i(e);var r=!1}catch{r=!0}if(r){r=console;var s=r.error,l=typeof Symbol=="function"&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object";return s.call(r,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",l),i(e)}}function f(e){if(e===E)return"<>";if(typeof e=="object"&&e!==null&&e.$$typeof===S)return"<...>";try{var r=n(e);return r?"<"+r+">":"<...>"}catch{return"<...>"}}function u(){var e=O.A;return e===null?null:e.getOwner()}function g(){return Error("react-stack-top-frame")}function y(e){if(X.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function v(e,r){function s(){H||(H=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",r))}s.isReactWarning=!0,Object.defineProperty(e,"key",{get:s,configurable:!0})}function P(){var e=n(this.type);return Z[e]||(Z[e]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),e=this.props.ref,e!==void 0?e:null}function Y(e,r,s,l,L,z){var c=s.ref;return e={$$typeof:U,type:e,key:r,props:s,_owner:l},(c!==void 0?c:null)!==null?Object.defineProperty(e,"ref",{enumerable:!1,get:P}):Object.defineProperty(e,"ref",{enumerable:!1,value:null}),e._store={},Object.defineProperty(e._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(e,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(e,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:L}),Object.defineProperty(e,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:z}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}function k(e,r,s,l,L,z){var c=r.children;if(c!==void 0)if(l)if(fe(c)){for(l=0;l<c.length;l++)j(c[l]);Object.freeze&&Object.freeze(c)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else j(c);if(X.call(r,"key")){c=n(e);var w=Object.keys(r).filter(function(ge){return ge!=="key"});l=0<w.length?"{key: someKey, "+w.join(": ..., ")+": ...}":"{key: someKey}",ee[c+l]||(w=0<w.length?"{"+w.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
1
+ (function(l,d){typeof exports=="object"&&typeof module<"u"?d(exports,require("react"),require("@sudobility/components")):typeof define=="function"&&define.amd?define(["exports","react","@sudobility/components"],d):(l=typeof globalThis<"u"?globalThis:l||self,d(l.Components={},l.React,l.components))})(this,(function(l,d,L){"use strict";var R={exports:{}},m={};var w;function W(){if(w)return m;w=1;var u=Symbol.for("react.transitional.element"),c=Symbol.for("react.fragment");function i(E,o,s){var b=null;if(s!==void 0&&(b=""+s),o.key!==void 0&&(b=""+o.key),"key"in o){s={};for(var p in o)p!=="key"&&(s[p]=o[p])}else s=o;return o=s.ref,{$$typeof:u,type:E,key:b,ref:o!==void 0?o:null,props:s}}return m.Fragment=c,m.jsx=i,m.jsxs=i,m}var _={};var x;function U(){return x||(x=1,process.env.NODE_ENV!=="production"&&(function(){function u(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===ae?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case k:return"Fragment";case H:return"Profiler";case B:return"StrictMode";case ee:return"Suspense";case re:return"SuspenseList";case ne:return"Activity"}if(typeof e=="object")switch(typeof e.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),e.$$typeof){case X:return"Portal";case Q:return e.displayName||"Context";case Z:return(e._context.displayName||"Context")+".Consumer";case K:var r=e.render;return e=e.displayName,e||(e=r.displayName||r.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case te:return r=e.displayName||null,r!==null?r:u(e.type)||"Memo";case S:r=e._payload,e=e._init;try{return u(e(r))}catch{}}return null}function c(e){return""+e}function i(e){try{c(e);var r=!1}catch{r=!0}if(r){r=console;var t=r.error,n=typeof Symbol=="function"&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t.call(r,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",n),c(e)}}function E(e){if(e===k)return"<>";if(typeof e=="object"&&e!==null&&e.$$typeof===S)return"<...>";try{var r=u(e);return r?"<"+r+">":"<...>"}catch{return"<...>"}}function o(){var e=y.A;return e===null?null:e.getOwner()}function s(){return Error("react-stack-top-frame")}function b(e){if(Y.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function p(e,r){function t(){I||(I=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",r))}t.isReactWarning=!0,Object.defineProperty(e,"key",{get:t,configurable:!0})}function z(){var e=u(this.type);return $[e]||($[e]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),e=this.props.ref,e!==void 0?e:null}function G(e,r,t,n,T,O){var a=t.ref;return e={$$typeof:C,type:e,key:r,props:t,_owner:n},(a!==void 0?a:null)!==null?Object.defineProperty(e,"ref",{enumerable:!1,get:z}):Object.defineProperty(e,"ref",{enumerable:!1,value:null}),e._store={},Object.defineProperty(e._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(e,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(e,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:T}),Object.defineProperty(e,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:O}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}function h(e,r,t,n,T,O){var a=r.children;if(a!==void 0)if(n)if(oe(a)){for(n=0;n<a.length;n++)j(a[n]);Object.freeze&&Object.freeze(a)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else j(a);if(Y.call(r,"key")){a=u(e);var f=Object.keys(r).filter(function(se){return se!=="key"});n=0<f.length?"{key: someKey, "+f.join(": ..., ")+": ...}":"{key: someKey}",M[a+n]||(f=0<f.length?"{"+f.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
2
2
  let props = %s;
3
3
  <%s {...props} />
4
4
  React keys must be passed directly to JSX without using spread:
5
5
  let props = %s;
6
- <%s key={someKey} {...props} />`,l,c,w,c),ee[c+l]=!0)}if(c=null,s!==void 0&&(o(s),c=""+s),y(r)&&(o(r.key),c=""+r.key),"key"in r){s={};for(var B in r)B!=="key"&&(s[B]=r[B])}else s=r;return c&&v(s,typeof e=="function"?e.displayName||e.name||"Unknown":e),Y(e,c,s,u(),L,z)}function j(e){C(e)?e._store&&(e._store.validated=1):typeof e=="object"&&e!==null&&e.$$typeof===S&&(e._payload.status==="fulfilled"?C(e._payload.value)&&e._payload.value._store&&(e._payload.value._store.validated=1):e._store&&(e._store.validated=1))}function C(e){return typeof e=="object"&&e!==null&&e.$$typeof===U}var x=p,U=Symbol.for("react.transitional.element"),F=Symbol.for("react.portal"),E=Symbol.for("react.fragment"),I=Symbol.for("react.strict_mode"),D=Symbol.for("react.profiler"),t=Symbol.for("react.consumer"),h=Symbol.for("react.context"),T=Symbol.for("react.forward_ref"),M=Symbol.for("react.suspense"),V=Symbol.for("react.suspense_list"),m=Symbol.for("react.memo"),S=Symbol.for("react.lazy"),W=Symbol.for("react.activity"),N=Symbol.for("react.client.reference"),O=x.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,X=Object.prototype.hasOwnProperty,fe=Array.isArray,$=console.createTask?console.createTask:function(){return null};x={react_stack_bottom_frame:function(e){return e()}};var H,Z={},Q=x.react_stack_bottom_frame.bind(x,g)(),K=$(f(g)),ee={};R.Fragment=E,R.jsx=function(e,r,s){var l=1e4>O.recentlyCreatedOwnerStacks++;return k(e,r,s,!1,l?Error("react-stack-top-frame"):Q,l?$(f(e)):K)},R.jsxs=function(e,r,s){var l=1e4>O.recentlyCreatedOwnerStacks++;return k(e,r,s,!0,l?Error("react-stack-top-frame"):Q,l?$(f(e)):K)}})()),R}var G;function ae(){return G||(G=1,process.env.NODE_ENV==="production"?A.exports=re():A.exports=te()),A.exports}var a=ae();const oe=({className:n,children:i,disabled:o=!1,onClick:f})=>a.jsx("div",{className:b.cn("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",o&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",n),onClick:o?void 0:f,role:"region","aria-label":"UaudioUwaveform",children:i||"UaudioUwaveform Component"}),ne=({className:n,children:i,disabled:o})=>a.jsx("div",{className:b.cn("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",o&&"opacity-50 cursor-not-allowed",n),role:"region","aria-label":"LiveStream",children:i||"LiveStream Component"}),se=({className:n,children:i,disabled:o=!1,onClick:f})=>a.jsx("div",{className:b.cn("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",o&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",n),onClick:o?void 0:f,role:"region","aria-label":"UmediaUplaylist",children:i||"UmediaUplaylist Component"}),ie=({accept:n=["image/*","video/*","audio/*"],maxSize:i=50*1024*1024,maxFiles:o=10,multiple:f=!0,onUpload:u,onRemove:g,className:y})=>{const[v,P]=p.useState([]),[Y,k]=p.useState(!1),j=p.useRef(null),C=t=>{t.preventDefault(),k(!0)},x=t=>{t.preventDefault(),k(!1)},U=t=>{t.preventDefault(),k(!1);const h=Array.from(t.dataTransfer.files);E(h)},F=t=>{if(t.target.files){const h=Array.from(t.target.files);E(h)}},E=t=>{const h=t.filter(m=>{const S=n.some(N=>{if(N.endsWith("/*")){const O=N.split("/")[0];return m.type.startsWith(O)}return m.type===N}),W=m.size<=i;return S&&W}),T=o-v.length,M=h.slice(0,T),V=M.map(m=>({id:`${Date.now()}-${Math.random()}`,file:m,preview:m.type.startsWith("image/")?URL.createObjectURL(m):void 0,status:"pending"}));P(m=>[...m,...V]),u&&u(M)},I=t=>{P(h=>h.filter(T=>T.id!==t)),g&&g(t)},D=t=>t<1024?`${t} B`:t<1024*1024?`${(t/1024).toFixed(1)} KB`:`${(t/(1024*1024)).toFixed(1)} MB`;return a.jsxs("div",{className:b.cn("space-y-4",y),children:[a.jsxs("div",{onDragEnter:C,onDragOver:t=>t.preventDefault(),onDragLeave:x,onDrop:U,onClick:()=>j.current?.click(),className:b.cn("border-2 border-dashed rounded-lg p-8 text-center cursor-pointer transition-colors",Y?"border-blue-500 bg-blue-50 dark:bg-blue-900/20":"border-gray-300 dark:border-gray-700 hover:border-gray-400 dark:hover:border-gray-600"),children:[a.jsx("svg",{className:"w-12 h-12 mx-auto mb-4 text-gray-400 dark:text-gray-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12"})}),a.jsx("p",{className:"text-gray-700 dark:text-gray-300 mb-2",children:"Drag and drop files here, or click to browse"}),a.jsxs("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:["Max ",o," files, ",D(i)," each"]}),a.jsx("input",{ref:j,type:"file",multiple:f,accept:n.join(","),onChange:F,className:"hidden"})]}),v.length>0&&a.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-4",children:v.map(t=>a.jsxs("div",{className:"relative aspect-square rounded-lg overflow-hidden bg-gray-100 dark:bg-gray-800",children:[t.preview?a.jsx("img",{src:t.preview,alt:t.file.name,className:"w-full h-full object-cover"}):a.jsx("div",{className:"w-full h-full flex items-center justify-center",children:a.jsx("svg",{className:"w-12 h-12 text-gray-400",fill:"currentColor",viewBox:"0 0 24 24",children:a.jsx("path",{d:"M14 2H6a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V8l-6-6zm4 18H6V4h7v5h5v11z"})})}),a.jsx("button",{onClick:()=>I(t.id),className:"absolute top-2 right-2 w-6 h-6 rounded-full bg-red-500 text-white flex items-center justify-center hover:bg-red-600 transition-colors",children:a.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}),a.jsxs("div",{className:"absolute bottom-0 left-0 right-0 bg-black/70 text-white text-xs p-2",children:[a.jsx("p",{className:"truncate",children:t.file.name}),a.jsx("p",{className:"text-gray-300",children:D(t.file.size)})]})]},t.id))})]})},le=({className:n,children:i,disabled:o})=>a.jsx("div",{className:b.cn("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",o&&"opacity-50 cursor-not-allowed",n),role:"region","aria-label":"PlaylistManager",children:i||"PlaylistManager Component"}),ce=({className:n,children:i,disabled:o})=>a.jsx("div",{className:b.cn("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",o&&"opacity-50 cursor-not-allowed",n),role:"region","aria-label":"StreamingStats",children:i||"StreamingStats Component"}),de=({className:n,children:i,disabled:o})=>a.jsx("div",{className:b.cn("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",o&&"opacity-50 cursor-not-allowed",n),role:"region","aria-label":"VideoEditor",children:i||"VideoEditor Component"}),ue=({className:n,children:i,disabled:o=!1,onClick:f})=>a.jsx("div",{className:b.cn("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",o&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",n),onClick:o?void 0:f,role:"region","aria-label":"UvideoUthumbnail",children:i||"UvideoUthumbnail Component"});d.LiveStream=ne,d.MediaUploader=ie,d.PlaylistManager=le,d.StreamingStats=ce,d.UaudioUwaveform=oe,d.UmediaUplaylist=se,d.UvideoUthumbnail=ue,d.VideoEditor=de,Object.defineProperty(d,Symbol.toStringTag,{value:"Module"})}));
6
+ <%s key={someKey} {...props} />`,n,a,f,a),M[a+n]=!0)}if(a=null,t!==void 0&&(i(t),a=""+t),b(r)&&(i(r.key),a=""+r.key),"key"in r){t={};for(var A in r)A!=="key"&&(t[A]=r[A])}else t=r;return a&&p(t,typeof e=="function"?e.displayName||e.name||"Unknown":e),G(e,a,t,o(),T,O)}function j(e){N(e)?e._store&&(e._store.validated=1):typeof e=="object"&&e!==null&&e.$$typeof===S&&(e._payload.status==="fulfilled"?N(e._payload.value)&&e._payload.value._store&&(e._payload.value._store.validated=1):e._store&&(e._store.validated=1))}function N(e){return typeof e=="object"&&e!==null&&e.$$typeof===C}var v=d,C=Symbol.for("react.transitional.element"),X=Symbol.for("react.portal"),k=Symbol.for("react.fragment"),B=Symbol.for("react.strict_mode"),H=Symbol.for("react.profiler"),Z=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"),S=Symbol.for("react.lazy"),ne=Symbol.for("react.activity"),ae=Symbol.for("react.client.reference"),y=v.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Y=Object.prototype.hasOwnProperty,oe=Array.isArray,g=console.createTask?console.createTask:function(){return null};v={react_stack_bottom_frame:function(e){return e()}};var I,$={},F=v.react_stack_bottom_frame.bind(v,s)(),D=g(E(s)),M={};_.Fragment=k,_.jsx=function(e,r,t){var n=1e4>y.recentlyCreatedOwnerStacks++;return h(e,r,t,!1,n?Error("react-stack-top-frame"):F,n?g(E(e)):D)},_.jsxs=function(e,r,t){var n=1e4>y.recentlyCreatedOwnerStacks++;return h(e,r,t,!0,n?Error("react-stack-top-frame"):F,n?g(E(e)):D)}})()),_}var P;function q(){return P||(P=1,process.env.NODE_ENV==="production"?R.exports=W():R.exports=U()),R.exports}var J=q();const V=({className:u,children:c,disabled:i})=>J.jsx("div",{className:L.cn("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",i&&"opacity-50 cursor-not-allowed",u),role:"region","aria-label":"StreamingStats",children:c||"StreamingStats Component"});l.StreamingStats=V,Object.defineProperty(l,Symbol.toStringTag,{value:"Module"})}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sudobility/entertainment-components",
3
- "version": "1.1.0",
3
+ "version": "2.0.1",
4
4
  "description": "Entertainment and media UI components for React",
5
5
  "type": "module",
6
6
  "main": "dist/index.umd.js",
@@ -31,7 +31,7 @@
31
31
  "author": "John Q Huang",
32
32
  "license": "MIT",
33
33
  "peerDependencies": {
34
- "@sudobility/components": "^3.0.0",
34
+ "@sudobility/components": "^4.0.0",
35
35
  "@sudobility/design": "^1.1.3",
36
36
  "react": "^18.0.0 || ^19.0.0",
37
37
  "react-dom": "^18.0.0 || ^19.0.0"
@@ -1,33 +0,0 @@
1
- /**
2
- * UaudioUwaveform Component
3
- *
4
- * A reusable UaudioUwaveform component with full dark mode support.
5
- * Optimized for accessibility and AI-assisted development.
6
- *
7
- * @component
8
- * @example
9
- * ```tsx
10
- * <UaudioUwaveform className="custom-class" />
11
- * ```
12
- *
13
- * @remarks
14
- * This component supports:
15
- * - Light and dark themes automatically
16
- * - Responsive design
17
- * - Accessibility features
18
- * - TypeScript type safety
19
- *
20
- * @see {@link https://docs.example.com/components/audio-waveform}
21
- */
22
- export interface UaudioUwaveformProps {
23
- /** Additional CSS classes */
24
- className?: string;
25
- /** Component children */
26
- children?: React.ReactNode;
27
- /** Disabled state */
28
- disabled?: boolean;
29
- /** Callback when component is interacted with */
30
- onClick?: () => void;
31
- }
32
- export declare const UaudioUwaveform: ({ className, children, disabled, onClick, }: UaudioUwaveformProps) => import("react/jsx-runtime").JSX.Element;
33
- //# sourceMappingURL=audio-waveform.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"audio-waveform.d.ts","sourceRoot":"","sources":["../src/audio-waveform.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,MAAM,WAAW,oBAAoB;IACnC,6BAA6B;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,yBAAyB;IACzB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,qBAAqB;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,iDAAiD;IACjD,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,eAAO,MAAM,eAAe,GAAI,6CAK7B,oBAAoB,4CAmBtB,CAAC"}
@@ -1,18 +0,0 @@
1
- /**
2
- * LiveStream Component
3
- *
4
- * Gaming component with full dark mode support.
5
- *
6
- * @component
7
- * @example
8
- * ```tsx
9
- * <LiveStream className="custom-class" />
10
- * ```
11
- */
12
- export interface LiveStreamProps {
13
- className?: string;
14
- children?: React.ReactNode;
15
- disabled?: boolean;
16
- }
17
- export declare const LiveStream: ({ className, children, disabled, }: LiveStreamProps) => import("react/jsx-runtime").JSX.Element;
18
- //# sourceMappingURL=live-stream.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"live-stream.d.ts","sourceRoot":"","sources":["../src/live-stream.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AACH,MAAM,WAAW,eAAe;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,eAAO,MAAM,UAAU,GAAI,oCAIxB,eAAe,4CAiBjB,CAAC"}
@@ -1,33 +0,0 @@
1
- /**
2
- * UmediaUplaylist Component
3
- *
4
- * A reusable UmediaUplaylist component with full dark mode support.
5
- * Optimized for accessibility and AI-assisted development.
6
- *
7
- * @component
8
- * @example
9
- * ```tsx
10
- * <UmediaUplaylist className="custom-class" />
11
- * ```
12
- *
13
- * @remarks
14
- * This component supports:
15
- * - Light and dark themes automatically
16
- * - Responsive design
17
- * - Accessibility features
18
- * - TypeScript type safety
19
- *
20
- * @see {@link https://docs.example.com/components/media-playlist}
21
- */
22
- export interface UmediaUplaylistProps {
23
- /** Additional CSS classes */
24
- className?: string;
25
- /** Component children */
26
- children?: React.ReactNode;
27
- /** Disabled state */
28
- disabled?: boolean;
29
- /** Callback when component is interacted with */
30
- onClick?: () => void;
31
- }
32
- export declare const UmediaUplaylist: ({ className, children, disabled, onClick, }: UmediaUplaylistProps) => import("react/jsx-runtime").JSX.Element;
33
- //# sourceMappingURL=media-playlist.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"media-playlist.d.ts","sourceRoot":"","sources":["../src/media-playlist.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,MAAM,WAAW,oBAAoB;IACnC,6BAA6B;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,yBAAyB;IACzB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,qBAAqB;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,iDAAiD;IACjD,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,eAAO,MAAM,eAAe,GAAI,6CAK7B,oBAAoB,4CAmBtB,CAAC"}
@@ -1,44 +0,0 @@
1
- import { default as React } from 'react';
2
- export interface UploadedFile {
3
- id: string;
4
- file: File;
5
- preview?: string;
6
- progress?: number;
7
- status: 'pending' | 'uploading' | 'success' | 'error';
8
- error?: string;
9
- }
10
- export interface MediaUploaderProps {
11
- /** Accepted file types */
12
- accept?: string[];
13
- /** Maximum file size in bytes */
14
- maxSize?: number;
15
- /** Maximum number of files */
16
- maxFiles?: number;
17
- /** Multiple file upload */
18
- multiple?: boolean;
19
- /** Upload handler */
20
- onUpload?: (files: File[]) => void;
21
- /** File remove handler */
22
- onRemove?: (fileId: string) => void;
23
- /** Additional className */
24
- className?: string;
25
- }
26
- /**
27
- * MediaUploader Component
28
- *
29
- * Drag-and-drop media uploader with previews.
30
- * Supports images, videos, and audio files.
31
- *
32
- * @example
33
- * ```tsx
34
- * <MediaUploader
35
- * accept={['image/*', 'video/*']}
36
- * maxSize={10 * 1024 * 1024} // 10MB
37
- * maxFiles={5}
38
- * multiple
39
- * onUpload={(files) => console.log('Uploading:', files)}
40
- * />
41
- * ```
42
- */
43
- export declare const MediaUploader: React.FC<MediaUploaderProps>;
44
- //# sourceMappingURL=media-uploader.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"media-uploader.d.ts","sourceRoot":"","sources":["../src/media-uploader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2B,MAAM,OAAO,CAAC;AAGhD,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,IAAI,CAAC;IACX,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,SAAS,GAAG,WAAW,GAAG,SAAS,GAAG,OAAO,CAAC;IACtD,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,kBAAkB;IACjC,0BAA0B;IAC1B,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,iCAAiC;IACjC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,8BAA8B;IAC9B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,2BAA2B;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,qBAAqB;IACrB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,IAAI,CAAC;IACnC,0BAA0B;IAC1B,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC,2BAA2B;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CA+LtD,CAAC"}
@@ -1,18 +0,0 @@
1
- /**
2
- * PlaylistManager Component
3
- *
4
- * Entertainment component with full dark mode support.
5
- *
6
- * @component
7
- * @example
8
- * ```tsx
9
- * <PlaylistManager className="custom-class" />
10
- * ```
11
- */
12
- export interface PlaylistManagerProps {
13
- className?: string;
14
- children?: React.ReactNode;
15
- disabled?: boolean;
16
- }
17
- export declare const PlaylistManager: ({ className, children, disabled, }: PlaylistManagerProps) => import("react/jsx-runtime").JSX.Element;
18
- //# sourceMappingURL=playlist-manager.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"playlist-manager.d.ts","sourceRoot":"","sources":["../src/playlist-manager.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AACH,MAAM,WAAW,oBAAoB;IACnC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,eAAO,MAAM,eAAe,GAAI,oCAI7B,oBAAoB,4CAiBtB,CAAC"}
@@ -1,18 +0,0 @@
1
- /**
2
- * VideoEditor Component
3
- *
4
- * Entertainment component with full dark mode support.
5
- *
6
- * @component
7
- * @example
8
- * ```tsx
9
- * <VideoEditor className="custom-class" />
10
- * ```
11
- */
12
- export interface VideoEditorProps {
13
- className?: string;
14
- children?: React.ReactNode;
15
- disabled?: boolean;
16
- }
17
- export declare const VideoEditor: ({ className, children, disabled, }: VideoEditorProps) => import("react/jsx-runtime").JSX.Element;
18
- //# sourceMappingURL=video-editor.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"video-editor.d.ts","sourceRoot":"","sources":["../src/video-editor.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AACH,MAAM,WAAW,gBAAgB;IAC/B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,eAAO,MAAM,WAAW,GAAI,oCAIzB,gBAAgB,4CAiBlB,CAAC"}
@@ -1,33 +0,0 @@
1
- /**
2
- * UvideoUthumbnail Component
3
- *
4
- * A reusable UvideoUthumbnail component with full dark mode support.
5
- * Optimized for accessibility and AI-assisted development.
6
- *
7
- * @component
8
- * @example
9
- * ```tsx
10
- * <UvideoUthumbnail className="custom-class" />
11
- * ```
12
- *
13
- * @remarks
14
- * This component supports:
15
- * - Light and dark themes automatically
16
- * - Responsive design
17
- * - Accessibility features
18
- * - TypeScript type safety
19
- *
20
- * @see {@link https://docs.example.com/components/video-thumbnail}
21
- */
22
- export interface UvideoUthumbnailProps {
23
- /** Additional CSS classes */
24
- className?: string;
25
- /** Component children */
26
- children?: React.ReactNode;
27
- /** Disabled state */
28
- disabled?: boolean;
29
- /** Callback when component is interacted with */
30
- onClick?: () => void;
31
- }
32
- export declare const UvideoUthumbnail: ({ className, children, disabled, onClick, }: UvideoUthumbnailProps) => import("react/jsx-runtime").JSX.Element;
33
- //# sourceMappingURL=video-thumbnail.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"video-thumbnail.d.ts","sourceRoot":"","sources":["../src/video-thumbnail.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,MAAM,WAAW,qBAAqB;IACpC,6BAA6B;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,yBAAyB;IACzB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,qBAAqB;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,iDAAiD;IACjD,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,eAAO,MAAM,gBAAgB,GAAI,6CAK9B,qBAAqB,4CAmBvB,CAAC"}