@aigamo/hydrangean-diva 0.0.1-alpha.23 → 0.0.1-alpha.24

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.es.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { makeObservable as Nr, action as v, computed as _, observable as X, reaction as $r } from "mobx";
2
2
  import * as te from "react";
3
- import Lt, { forwardRef as jr, useContext as ct, useState as z, useEffect as Vt, memo as re, useCallback as $, useMemo as Ve, createContext as Ut, useLayoutEffect as zr } from "react";
3
+ import Lt, { createContext as Vt, useContext as ct, forwardRef as jr, useState as z, useEffect as Ut, memo as re, useCallback as $, useMemo as Ve, useLayoutEffect as zr } from "react";
4
4
  import qr from "@emotion/cache";
5
5
  import { EuiSelectable as Lr, EuiPopoverTitle as Vr, EuiPopoverFooter as Ur, EuiButton as Q, EuiPopover as xe, useGeneratedHtmlId as Yr, EuiModalHeaderTitle as Wr, EuiModalHeader as Hr, EuiForm as Gr, EuiFormRow as at, EuiFieldText as xt, EuiModalBody as Jr, EuiModalFooter as Qr, EuiButtonEmpty as Yt, EuiModal as Kr, useEuiTheme as Wt, EuiCheckbox as Ht, EuiTableHeaderCellCheckbox as Br, EuiTableHeader as Xr, EuiTableRowCell as st, EuiTableRowCellCheckbox as Zr, EuiLink as en, EuiTableRow as tn, EuiTable as rn, EuiButtonIcon as W, EuiIcon as Y, EuiContextMenu as ut, EuiTableHeaderCell as tt, EuiCodeBlock as nn, EuiFlyout as an, EuiFlexGroup as oe, EuiFlexItem as J, EuiSpacer as Gt, EuiEmptyPrompt as sn, EuiPageTemplate as dt, EuiRange as Jt, EuiBottomBar as on } from "@elastic/eui";
6
6
  import { AddRegular as Te, PlayRegular as ln, DismissRegular as ft, MoreHorizontalFilled as Qt, ArrowUploadRegular as cn, ArrowDownloadRegular as un, WindowDevToolsRegular as dn, DeleteRegular as fn, ArrowShuffleFilled as pn, ArrowShuffleOffFilled as yn, PreviousFilled as hn, SkipBack10Regular as Kt, PauseFilled as mn, PlayFilled as vn, SkipForward30Regular as Bt, NextFilled as gn, ArrowRepeat1Filled as Pn, ArrowRepeatAllFilled as bn, ArrowRepeatAllOffFilled as wn, OpenRegular as Sn, Speaker2Regular as Xt, TopSpeedRegular as En, NavigationPlayRegular as Rn } from "@fluentui/react-icons";
@@ -21,6 +21,7 @@ class Sa {
21
21
  return t;
22
22
  }
23
23
  }
24
+ const tr = Vt(void 0), rr = () => ct(tr);
24
25
  var N = /* @__PURE__ */ ((e) => (e.Off = "Off", e.All = "All", e.One = "One", e))(N || {}), ze = { exports: {} }, Se = {};
25
26
  var _t;
26
27
  function An() {
@@ -860,7 +861,7 @@ function qn(e, t, r) {
860
861
  e[a] !== void 0 ? t.push(e[a] + ";") : a && (i += a + " ");
861
862
  }), i;
862
863
  }
863
- var tr = function(t, r, i) {
864
+ var nr = function(t, r, i) {
864
865
  var a = t.key + "-" + r.name;
865
866
  // we only need to add the styles to the registered cache if the
866
867
  // class name could be used further down
@@ -873,7 +874,7 @@ var tr = function(t, r, i) {
873
874
  // also, note that this check will be dead code eliminated in the browser
874
875
  zn === !1) && t.registered[a] === void 0 && (t.registered[a] = r.styles);
875
876
  }, Ln = function(t, r, i) {
876
- tr(t, r, i);
877
+ nr(t, r, i);
877
878
  var a = t.key + "-" + r.name;
878
879
  if (t.inserted[r.name] === void 0) {
879
880
  var o = r;
@@ -957,12 +958,12 @@ function Yn(e) {
957
958
  return t[r] === void 0 && (t[r] = e(r)), t[r];
958
959
  };
959
960
  }
960
- var Wn = /[A-Z]|^ms/g, Hn = /_EMO_([^_]+?)_([^]*?)_EMO_/g, rr = function(t) {
961
+ var Wn = /[A-Z]|^ms/g, Hn = /_EMO_([^_]+?)_([^]*?)_EMO_/g, ir = function(t) {
961
962
  return t.charCodeAt(1) === 45;
962
963
  }, $t = function(t) {
963
964
  return t != null && typeof t != "boolean";
964
965
  }, nt = /* @__PURE__ */ Yn(function(e) {
965
- return rr(e) ? e : e.replace(Wn, "-$&").toLowerCase();
966
+ return ir(e) ? e : e.replace(Wn, "-$&").toLowerCase();
966
967
  }), jt = function(t, r) {
967
968
  switch (t) {
968
969
  case "animation":
@@ -976,7 +977,7 @@ var Wn = /[A-Z]|^ms/g, Hn = /_EMO_([^_]+?)_([^]*?)_EMO_/g, rr = function(t) {
976
977
  }, a;
977
978
  });
978
979
  }
979
- return Un[t] !== 1 && !rr(t) && typeof r == "number" && r !== 0 ? r + "px" : r;
980
+ return Un[t] !== 1 && !ir(t) && typeof r == "number" && r !== 0 ? r + "px" : r;
980
981
  };
981
982
  function Ie(e, t, r) {
982
983
  if (r == null)
@@ -1080,7 +1081,7 @@ function Jn(e, t, r) {
1080
1081
  }
1081
1082
  var Qn = function(t) {
1082
1083
  return t();
1083
- }, Kn = te.useInsertionEffect ? te.useInsertionEffect : !1, Bn = Kn || Qn, nr = /* @__PURE__ */ te.createContext(
1084
+ }, Kn = te.useInsertionEffect ? te.useInsertionEffect : !1, Bn = Kn || Qn, ar = /* @__PURE__ */ te.createContext(
1084
1085
  // we're doing this to avoid preconstruct's dead code elimination in this one case
1085
1086
  // because this module is primarily intended for the browser and node
1086
1087
  // but it's also required in react native and similar environments sometimes
@@ -1091,20 +1092,20 @@ var Qn = function(t) {
1091
1092
  key: "css"
1092
1093
  }) : null
1093
1094
  );
1094
- nr.Provider;
1095
+ ar.Provider;
1095
1096
  var Xn = function(t) {
1096
1097
  return /* @__PURE__ */ jr(function(r, i) {
1097
- var a = ct(nr);
1098
+ var a = ct(ar);
1098
1099
  return t(r, a, i);
1099
1100
  });
1100
- }, Zn = /* @__PURE__ */ te.createContext({}), Ue = {}.hasOwnProperty, ot = "__EMOTION_TYPE_PLEASE_DO_NOT_USE__", ir = function(t, r) {
1101
+ }, Zn = /* @__PURE__ */ te.createContext({}), Ue = {}.hasOwnProperty, ot = "__EMOTION_TYPE_PLEASE_DO_NOT_USE__", sr = function(t, r) {
1101
1102
  var i = {};
1102
1103
  for (var a in r)
1103
1104
  Ue.call(r, a) && (i[a] = r[a]);
1104
1105
  return i[ot] = t, i;
1105
1106
  }, ei = function(t) {
1106
1107
  var r = t.cache, i = t.serialized, a = t.isStringTag;
1107
- return tr(r, i, a), Bn(function() {
1108
+ return nr(r, i, a), Bn(function() {
1108
1109
  return Ln(r, i, a);
1109
1110
  }), null;
1110
1111
  }, ti = /* @__PURE__ */ Xn(function(e, t, r) {
@@ -1122,17 +1123,17 @@ var Xn = function(t) {
1122
1123
  serialized: f,
1123
1124
  isStringTag: typeof a == "string"
1124
1125
  }), /* @__PURE__ */ te.createElement(a, p));
1125
- }), ar = ti, Ye = Ce.Fragment, s = function(t, r, i) {
1126
- return Ue.call(r, "css") ? Ce.jsx(ar, ir(t, r), i) : Ce.jsx(t, r, i);
1126
+ }), or = ti, Ye = Ce.Fragment, s = function(t, r, i) {
1127
+ return Ue.call(r, "css") ? Ce.jsx(or, sr(t, r), i) : Ce.jsx(t, r, i);
1127
1128
  }, M = function(t, r, i) {
1128
- return Ue.call(r, "css") ? Ce.jsxs(ar, ir(t, r), i) : Ce.jsxs(t, r, i);
1129
+ return Ue.call(r, "css") ? Ce.jsxs(or, sr(t, r), i) : Ce.jsxs(t, r, i);
1129
1130
  };
1130
1131
  const ri = {
1131
1132
  mediaPlayer: {
1132
1133
  enablePlaylists: process.env.NODE_ENV !== "production"
1133
1134
  }
1134
1135
  }, ni = "http://localhost".replace(/\/+$/, "");
1135
- class sr {
1136
+ class lr {
1136
1137
  constructor(t = {}) {
1137
1138
  this.configuration = t;
1138
1139
  }
@@ -1149,7 +1150,7 @@ class sr {
1149
1150
  return this.configuration.middleware || [];
1150
1151
  }
1151
1152
  get queryParamsStringify() {
1152
- return this.configuration.queryParamsStringify || or;
1153
+ return this.configuration.queryParamsStringify || cr;
1153
1154
  }
1154
1155
  get username() {
1155
1156
  return this.configuration.username;
@@ -1174,7 +1175,7 @@ class sr {
1174
1175
  return this.configuration.credentials;
1175
1176
  }
1176
1177
  }
1177
- const ii = new sr();
1178
+ const ii = new lr();
1178
1179
  class pt {
1179
1180
  constructor(t = ii) {
1180
1181
  this.configuration = t, this.middleware = t.middleware;
@@ -1301,10 +1302,10 @@ class Re extends Error {
1301
1302
  }
1302
1303
  name = "RequiredError";
1303
1304
  }
1304
- function or(e, t = "") {
1305
- return Object.keys(e).map((r) => lr(r, e[r], t)).filter((r) => r.length > 0).join("&");
1305
+ function cr(e, t = "") {
1306
+ return Object.keys(e).map((r) => ur(r, e[r], t)).filter((r) => r.length > 0).join("&");
1306
1307
  }
1307
- function lr(e, t, r = "") {
1308
+ function ur(e, t, r = "") {
1308
1309
  const i = r + (r.length ? `[${e}]` : e);
1309
1310
  if (t instanceof Array) {
1310
1311
  const a = t.map((o) => encodeURIComponent(String(o))).join(`&${encodeURIComponent(i)}=`);
@@ -1312,9 +1313,9 @@ function lr(e, t, r = "") {
1312
1313
  }
1313
1314
  if (t instanceof Set) {
1314
1315
  const a = Array.from(t);
1315
- return lr(e, a, r);
1316
+ return ur(e, a, r);
1316
1317
  }
1317
- return t instanceof Date ? `${encodeURIComponent(i)}=${encodeURIComponent(t.toISOString())}` : t instanceof Object ? or(t, i) : `${encodeURIComponent(i)}=${encodeURIComponent(String(t))}`;
1318
+ return t instanceof Date ? `${encodeURIComponent(i)}=${encodeURIComponent(t.toISOString())}` : t instanceof Object ? cr(t, i) : `${encodeURIComponent(i)}=${encodeURIComponent(String(t))}`;
1318
1319
  }
1319
1320
  class se {
1320
1321
  constructor(t, r = (i) => i) {
@@ -1324,7 +1325,7 @@ class se {
1324
1325
  return this.transformer(await this.raw.json());
1325
1326
  }
1326
1327
  }
1327
- function cr(e) {
1328
+ function dr(e) {
1328
1329
  return ci(e);
1329
1330
  }
1330
1331
  function ci(e, t) {
@@ -1338,7 +1339,7 @@ function ui(e) {
1338
1339
  }
1339
1340
  function di(e, t) {
1340
1341
  return e == null ? e : {
1341
- playlist: cr(e.playlist)
1342
+ playlist: dr(e.playlist)
1342
1343
  };
1343
1344
  }
1344
1345
  function fi(e) {
@@ -1346,7 +1347,7 @@ function fi(e) {
1346
1347
  }
1347
1348
  function pi(e, t) {
1348
1349
  return e == null ? e : {
1349
- items: e.items.map(cr)
1350
+ items: e.items.map(dr)
1350
1351
  };
1351
1352
  }
1352
1353
  function yi(e) {
@@ -1544,7 +1545,7 @@ class Si extends pt {
1544
1545
  return await (await this.mediaPlayerPlaylistsPostRaw(t, r)).value();
1545
1546
  }
1546
1547
  }
1547
- const Ei = new sr({
1548
+ const Ei = new lr({
1548
1549
  basePath: new URL("api", window.location.origin).toString()
1549
1550
  }), Ri = new Si(
1550
1551
  Ei
@@ -1555,7 +1556,7 @@ const Ei = new sr({
1555
1556
  const [r, i] = z(!1), [a, o] = z(
1556
1557
  "loading"
1557
1558
  );
1558
- return Vt(() => {
1559
+ return Ut(() => {
1559
1560
  Ri.mediaPlayerPlaylistsGet().then(
1560
1561
  (c) => o(
1561
1562
  c.items.map((f) => ({
@@ -1683,7 +1684,7 @@ const Ei = new sr({
1683
1684
  )
1684
1685
  ] });
1685
1686
  }
1686
- ), ur = {
1687
+ ), fr = {
1687
1688
  Audio: "",
1688
1689
  Dailymotion: "https://www.dailymotion.com/favicon.ico",
1689
1690
  Niconico: "https://www.nicovideo.jp/favicon.ico",
@@ -1870,7 +1871,7 @@ const Ei = new sr({
1870
1871
  /* @__PURE__ */ s(st, { textOnly: !1, children: /* @__PURE__ */ s(
1871
1872
  "img",
1872
1873
  {
1873
- src: ur[e.type],
1874
+ src: fr[e.type],
1874
1875
  width: 16,
1875
1876
  height: 16,
1876
1877
  alt: e.type
@@ -2060,7 +2061,7 @@ const Ni = C(
2060
2061
  ) : /* @__PURE__ */ s(Di, { playQueueStore: e })
2061
2062
  ] });
2062
2063
  }
2063
- ), dr = Ut(void 0), fr = () => ct(dr), it = new _n({
2064
+ ), it = new _n({
2064
2065
  coerceTypes: !0
2065
2066
  });
2066
2067
  function $i(e, t) {
@@ -2461,12 +2462,12 @@ const Ea = ({
2461
2462
  const [t] = z(
2462
2463
  () => new qi(new er())
2463
2464
  ), r = le();
2464
- return Vt(() => $r(
2465
+ return Ut(() => $r(
2465
2466
  () => t.currentItem,
2466
2467
  async (i, a) => {
2467
2468
  i === void 0 || a === void 0 || i.type === a.type && i.videoId === a.videoId && await r.setCurrentTime(0);
2468
2469
  }
2469
- ), [t, r]), /* @__PURE__ */ s(dr.Provider, { value: t, children: e });
2470
+ ), [t, r]), /* @__PURE__ */ s(tr.Provider, { value: t, children: e });
2470
2471
  }, Li = ({
2471
2472
  breadcrumbs: e,
2472
2473
  tabs: t,
@@ -2500,7 +2501,7 @@ const Ea = ({
2500
2501
  }
2501
2502
  );
2502
2503
  }, Ra = () => {
2503
- const e = fr();
2504
+ const e = rr();
2504
2505
  return /* @__PURE__ */ M(Ye, { children: [
2505
2506
  /* @__PURE__ */ s(
2506
2507
  Li,
@@ -2686,7 +2687,7 @@ const Ea = ({
2686
2687
  button: /* @__PURE__ */ s(
2687
2688
  Yt,
2688
2689
  {
2689
- iconType: ur[e.type],
2690
+ iconType: fr[e.type],
2690
2691
  size: "s",
2691
2692
  onClick: i,
2692
2693
  children: e.title
@@ -3049,7 +3050,7 @@ const Ea = ({
3049
3050
  height: 225
3050
3051
  }, Ia = C(
3051
3052
  ({ children: e }) => {
3052
- const t = fr();
3053
+ const t = rr();
3053
3054
  return /* @__PURE__ */ M(
3054
3055
  dt,
3055
3056
  {
@@ -3148,7 +3149,7 @@ class ua {
3148
3149
  t !== void 0 && (this.seeking || (this.percent = t));
3149
3150
  }
3150
3151
  }
3151
- const pr = Ut(void 0), Oa = ({
3152
+ const pr = Vt(void 0), Oa = ({
3152
3153
  children: e
3153
3154
  }) => {
3154
3155
  const [t] = z(
@@ -3165,10 +3166,12 @@ export {
3165
3166
  Sa as ObservableStateProvider,
3166
3167
  Ni as PlayQueue,
3167
3168
  Ra as PlayQueuePage,
3169
+ tr as PlayQueueStoreContext,
3168
3170
  Ea as PlayQueueStoreProvider,
3169
3171
  Oa as PlayerStoreProvider,
3170
3172
  N as RepeatMode,
3171
3173
  Zt as bottomBarHeight,
3174
+ rr as usePlayQueueStore,
3172
3175
  _a as usePlayerStore
3173
3176
  };
3174
3177
  //# sourceMappingURL=index.es.js.map