@curiouslearning/gdl-player-core 1.1.0 → 1.2.0
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/{Image-BUpmrK8U.cjs → Image-6EeTKD85.cjs} +1 -1
- package/dist/{Image-Bwx-qXJQ.js → Image-Dh6rF8NX.js} +1 -1
- package/dist/components/Player.d.ts +3 -1
- package/dist/{dolottie-D6pmgIXi.js → dolottie-DSkJyF_U.js} +1 -1
- package/dist/{dolottie-_lFr9NOP.cjs → dolottie-T0a1KdHw.cjs} +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.d.ts +1 -0
- package/dist/index.js +55 -60
- package/dist/lib/utils.d.ts +13 -3
- package/dist/{utils-Dm7P4Nnv.js → utils-D1e5mIt_.js} +5 -6
- package/dist/{utils-DTI6gl3r.cjs → utils-V9RwSxwh.cjs} +1 -1
- package/package.json +7 -2
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as e, c as t, i as n, n as r, o as i, r as a, s as o, t as s } from "./utils-
|
|
1
|
+
import { a as e, c as t, i as n, n as r, o as i, r as a, s as o, t as s } from "./utils-D1e5mIt_.js";
|
|
2
2
|
//#region node_modules/swiper/shared/ssr-window.esm.mjs
|
|
3
3
|
var c = /* @__PURE__ */ t(o(), 1);
|
|
4
4
|
function l(e) {
|
|
@@ -5756,7 +5756,7 @@ var Jc = {
|
|
|
5756
5756
|
style: tl,
|
|
5757
5757
|
children: t
|
|
5758
5758
|
});
|
|
5759
|
-
}, rl = c.lazy(() => import("./dolottie-
|
|
5759
|
+
}, rl = c.lazy(() => import("./dolottie-DSkJyF_U.js")), il = c.lazy(() => import("./Image-Dh6rF8NX.js")), al = ({ item: t, screenScale: n, onMediaClick: r, ref: i }) => {
|
|
5760
5760
|
let { effect: a, mediaType: o } = t, [s, l] = (0, c.useState)(!1), [u, d] = (0, c.useState)(null), { bookId: f } = e(), p = (0, c.useCallback)(() => {
|
|
5761
5761
|
u && !s && (l(!0), u.setFrame(0), u.play());
|
|
5762
5762
|
}, [
|
|
@@ -6016,14 +6016,17 @@ var cl = c.memo(sl), ll = {
|
|
|
6016
6016
|
"aria-hidden": "true",
|
|
6017
6017
|
children: [p && /* @__PURE__ */ (0, I.jsx)(kn, { background: p }), P]
|
|
6018
6018
|
});
|
|
6019
|
-
}, fl = 1280, pl = 600, ml = fl / pl, hl = ({ id: e, analytics: t, fonts: i = []
|
|
6020
|
-
|
|
6019
|
+
}, fl = 1280, pl = 600, ml = fl / pl, hl = ({ id: e, analytics: t, fonts: i = [], bookSource: a = {
|
|
6020
|
+
type: "static",
|
|
6021
|
+
staticFolder: "GDLBookContent"
|
|
6022
|
+
} }) => {
|
|
6023
|
+
let [o, s] = (0, c.useState)(null), [l, u] = (0, c.useState)(null), [d, f] = (0, c.useState)(null), [p, m] = (0, c.useState)(null), h = cn(i, o?.language), g = ln(h), _ = h[0]?.family || "Quicksand", v = o?.illustration && o.illustration.path || o?.coverText && o.coverText !== "", y = o?.credits && o.credits?.text || o?.credits?.logos && o.credits?.logos.length > 0, [b, x] = (0, c.useState)({
|
|
6021
6024
|
width: 0,
|
|
6022
6025
|
height: 0
|
|
6023
|
-
}), { width:
|
|
6026
|
+
}), { width: S, height: C } = b, w = o?.config.textDirection || "LTR";
|
|
6024
6027
|
(0, c.useEffect)(() => {
|
|
6025
6028
|
let e = () => {
|
|
6026
|
-
|
|
6029
|
+
x({
|
|
6027
6030
|
width: window.innerWidth,
|
|
6028
6031
|
height: window.innerHeight
|
|
6029
6032
|
});
|
|
@@ -6032,44 +6035,40 @@ var cl = c.memo(sl), ll = {
|
|
|
6032
6035
|
window.removeEventListener("resize", e);
|
|
6033
6036
|
};
|
|
6034
6037
|
}, []);
|
|
6035
|
-
let
|
|
6038
|
+
let T = 100, E = {
|
|
6036
6039
|
width: fl,
|
|
6037
6040
|
height: pl
|
|
6038
6041
|
};
|
|
6039
|
-
return (
|
|
6040
|
-
height:
|
|
6041
|
-
width:
|
|
6042
|
-
},
|
|
6043
|
-
width:
|
|
6044
|
-
height:
|
|
6045
|
-
},
|
|
6046
|
-
!
|
|
6047
|
-
let n = `/${
|
|
6042
|
+
return (S < fl || C < pl) && (pl / C > fl / S ? (E = {
|
|
6043
|
+
height: C,
|
|
6044
|
+
width: C * ml
|
|
6045
|
+
}, T = C / pl * 100) : (E = {
|
|
6046
|
+
width: S,
|
|
6047
|
+
height: S / ml
|
|
6048
|
+
}, T = S / fl * 100)), (0, c.useEffect)(() => {
|
|
6049
|
+
!o && e && (async (e) => {
|
|
6050
|
+
let n = a.type === "api" ? `${a.apiHost}/api/book?slug=${e}` : `/${a.staticFolder}/${e}/content.json`;
|
|
6048
6051
|
try {
|
|
6049
6052
|
let r = await fetch(n, { cache: "no-store" });
|
|
6050
6053
|
if (!r.ok) throw Error(`Error fetching data for (${e}): ${r.status}`);
|
|
6051
6054
|
let i = await r.json();
|
|
6052
|
-
|
|
6055
|
+
s(i), u(null), navigator.onLine && t?.onBookOpened && t.onBookOpened(i._id, i.title);
|
|
6053
6056
|
} catch (t) {
|
|
6054
|
-
console.error(t),
|
|
6057
|
+
console.error(t), s(null), u(`Error fetching data for (${e}): ${t instanceof Error ? t.message : "Unknown error"}`);
|
|
6055
6058
|
}
|
|
6056
6059
|
})(e);
|
|
6057
|
-
}, [e]),
|
|
6060
|
+
}, [e]), l ? /* @__PURE__ */ (0, I.jsxs)("p", {
|
|
6058
6061
|
role: "alert",
|
|
6059
6062
|
className: "player",
|
|
6060
|
-
children: ["Error: ",
|
|
6061
|
-
}) : !
|
|
6063
|
+
children: ["Error: ", l]
|
|
6064
|
+
}) : !o || !e ? /* @__PURE__ */ (0, I.jsx)("p", {
|
|
6062
6065
|
role: "status",
|
|
6063
6066
|
className: "player",
|
|
6064
6067
|
children: "Loading..."
|
|
6065
|
-
}) : /* @__PURE__ */ (0, I.jsxs)(I.Fragment, { children: [/* @__PURE__ */ (0, I.jsx)("style", { children: `:root, :host, .player { --player-font-family: '${sn(
|
|
6066
|
-
bookId:
|
|
6067
|
-
slug:
|
|
6068
|
-
assetConfig:
|
|
6069
|
-
mode: w,
|
|
6070
|
-
staticFolder: T,
|
|
6071
|
-
assetsHost: ""
|
|
6072
|
-
},
|
|
6068
|
+
}) : /* @__PURE__ */ (0, I.jsxs)(I.Fragment, { children: [/* @__PURE__ */ (0, I.jsx)("style", { children: `:root, :host, .player { --player-font-family: '${sn(_)}'; }${g}${on}` }), /* @__PURE__ */ (0, I.jsx)(n, {
|
|
6069
|
+
bookId: o._id,
|
|
6070
|
+
slug: o.slug,
|
|
6071
|
+
assetConfig: a,
|
|
6073
6072
|
analytics: t,
|
|
6074
6073
|
children: /* @__PURE__ */ (0, I.jsx)("div", {
|
|
6075
6074
|
className: "player",
|
|
@@ -6077,92 +6076,88 @@ var cl = c.memo(sl), ll = {
|
|
|
6077
6076
|
className: "view-box",
|
|
6078
6077
|
children: /* @__PURE__ */ (0, I.jsxs)(en, {
|
|
6079
6078
|
onSlideChange: (e) => {
|
|
6080
|
-
|
|
6079
|
+
f(e.activeIndex), o && (t?.onPageTurned && t.onPageTurned(o._id, e.activeIndex), e.isEnd && t?.onBookCompleted && t.onBookCompleted(o._id, o.title));
|
|
6081
6080
|
},
|
|
6082
6081
|
className: "mySwiper swiper-container",
|
|
6083
6082
|
speed: 1200,
|
|
6084
|
-
dir:
|
|
6083
|
+
dir: w.toLowerCase() ?? "ltr",
|
|
6085
6084
|
modules: [an],
|
|
6086
6085
|
pagination: {
|
|
6087
6086
|
clickable: !1,
|
|
6088
6087
|
type: "progressbar"
|
|
6089
6088
|
},
|
|
6090
6089
|
onSwiper: (e) => {
|
|
6091
|
-
|
|
6090
|
+
m(e);
|
|
6092
6091
|
},
|
|
6093
|
-
style: { ...
|
|
6092
|
+
style: { ...E },
|
|
6094
6093
|
a11y: {
|
|
6095
6094
|
enabled: !0,
|
|
6096
6095
|
prevSlideMessage: "Previous page",
|
|
6097
6096
|
nextSlideMessage: "Next page"
|
|
6098
6097
|
},
|
|
6099
6098
|
children: [
|
|
6100
|
-
|
|
6099
|
+
v && /* @__PURE__ */ (0, I.jsx)(tn, {
|
|
6101
6100
|
"data-hash": "cover",
|
|
6102
6101
|
children: ({ isActive: e }) => /* @__PURE__ */ (0, I.jsxs)("div", {
|
|
6103
6102
|
className: "cover-page",
|
|
6104
6103
|
inert: e ? void 0 : !0,
|
|
6105
6104
|
children: [/* @__PURE__ */ (0, I.jsx)("div", {
|
|
6106
6105
|
className: "cover-illustration",
|
|
6107
|
-
children:
|
|
6106
|
+
children: o.illustration?.path && /* @__PURE__ */ (0, I.jsx)("img", {
|
|
6108
6107
|
src: r({
|
|
6109
|
-
bookId:
|
|
6110
|
-
slug:
|
|
6111
|
-
assetConfig:
|
|
6112
|
-
|
|
6113
|
-
|
|
6114
|
-
assetsHost: ""
|
|
6115
|
-
}
|
|
6116
|
-
}, a.illustration),
|
|
6117
|
-
alt: a.title
|
|
6108
|
+
bookId: o._id,
|
|
6109
|
+
slug: o.slug,
|
|
6110
|
+
assetConfig: a
|
|
6111
|
+
}, o.illustration),
|
|
6112
|
+
alt: o.title
|
|
6118
6113
|
})
|
|
6119
6114
|
}), /* @__PURE__ */ (0, I.jsxs)("div", {
|
|
6120
6115
|
className: "cover-text",
|
|
6121
|
-
dir:
|
|
6122
|
-
children: [/* @__PURE__ */ (0, I.jsx)("h1", { children:
|
|
6116
|
+
dir: w.toLowerCase() || "ltr",
|
|
6117
|
+
children: [/* @__PURE__ */ (0, I.jsx)("h1", { children: o.title }), o.coverText && /* @__PURE__ */ (0, I.jsx)("small", { children: o.coverText })]
|
|
6123
6118
|
})]
|
|
6124
6119
|
})
|
|
6125
6120
|
}),
|
|
6126
|
-
|
|
6121
|
+
o.body.map((e) => /* @__PURE__ */ (0, I.jsx)(tn, {
|
|
6127
6122
|
className: "overflow-hidden",
|
|
6128
6123
|
"data-hash": e._id,
|
|
6129
6124
|
children: ({ isActive: t }) => /* @__PURE__ */ (0, I.jsx)(dl, {
|
|
6130
|
-
screenScale:
|
|
6125
|
+
screenScale: T,
|
|
6131
6126
|
page: e,
|
|
6132
6127
|
isActive: t,
|
|
6133
|
-
textDirection:
|
|
6128
|
+
textDirection: w
|
|
6134
6129
|
})
|
|
6135
6130
|
}, e._id)),
|
|
6136
|
-
|
|
6131
|
+
y && /* @__PURE__ */ (0, I.jsx)(tn, {
|
|
6137
6132
|
"data-hash": "credits",
|
|
6138
6133
|
children: ({ isActive: e }) => /* @__PURE__ */ (0, I.jsxs)("div", {
|
|
6139
6134
|
className: "credits-page",
|
|
6140
6135
|
inert: e ? void 0 : !0,
|
|
6141
6136
|
children: [/* @__PURE__ */ (0, I.jsx)("div", {
|
|
6142
6137
|
className: "credits-page-inner",
|
|
6143
|
-
children:
|
|
6138
|
+
children: o.credits?.logos.map((e) => /* @__PURE__ */ (0, I.jsx)("div", {
|
|
6144
6139
|
className: "logo-item",
|
|
6145
6140
|
children: /* @__PURE__ */ (0, I.jsx)("img", {
|
|
6146
|
-
src:
|
|
6141
|
+
src: a.type === "api" ? `${a.assetsHost}/logos/${e}.jpg` : `/${a.staticFolder}/${o.slug}/assets/${e}.jpg`,
|
|
6147
6142
|
alt: e
|
|
6148
6143
|
})
|
|
6149
6144
|
}, e))
|
|
6150
6145
|
}), /* @__PURE__ */ (0, I.jsxs)("div", {
|
|
6151
6146
|
className: "credits-page-bottom",
|
|
6152
|
-
dir:
|
|
6147
|
+
dir: w.toLowerCase() || "ltr",
|
|
6153
6148
|
children: [/* @__PURE__ */ (0, I.jsxs)("h1", { children: [
|
|
6154
6149
|
"\"",
|
|
6155
|
-
|
|
6150
|
+
o.title,
|
|
6156
6151
|
"\" credits"
|
|
6157
|
-
] }),
|
|
6152
|
+
] }), o.credits?.text && /* @__PURE__ */ (0, I.jsx)("small", { children: o.credits.text })]
|
|
6158
6153
|
})]
|
|
6159
6154
|
})
|
|
6160
6155
|
}),
|
|
6161
|
-
|
|
6162
|
-
isFirst:
|
|
6163
|
-
isLast:
|
|
6164
|
-
activeIndex:
|
|
6165
|
-
textDirection:
|
|
6156
|
+
p && p.slides.length > 1 && /* @__PURE__ */ (0, I.jsx)(En, {
|
|
6157
|
+
isFirst: p.isBeginning === !0,
|
|
6158
|
+
isLast: p.isEnd === !0,
|
|
6159
|
+
activeIndex: d,
|
|
6160
|
+
textDirection: w
|
|
6166
6161
|
})
|
|
6167
6162
|
]
|
|
6168
6163
|
})
|
package/dist/lib/utils.d.ts
CHANGED
|
@@ -1,9 +1,19 @@
|
|
|
1
1
|
import type { BookContextType } from '../types/context';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
/**
|
|
3
|
+
* Describes where the player should load book data and assets from. This is a
|
|
4
|
+
* runtime choice made by the consumer, not the library's build mode:
|
|
5
|
+
* - `api`: load from a backend/DB (library dev server, book builder).
|
|
6
|
+
* - `static`: load from a static folder (production player web component).
|
|
7
|
+
*/
|
|
8
|
+
export type PlayerSource = {
|
|
9
|
+
type: 'api';
|
|
10
|
+
apiHost: string;
|
|
5
11
|
assetsHost: string;
|
|
12
|
+
} | {
|
|
13
|
+
type: 'static';
|
|
14
|
+
staticFolder: string;
|
|
6
15
|
};
|
|
16
|
+
export type AssetConfig = PlayerSource;
|
|
7
17
|
export declare const getContextAssetPath: (context: BookContextType, asset: any, config?: AssetConfig) => string;
|
|
8
18
|
export declare const getContextAudioPath: (context: BookContextType, audio: any) => string;
|
|
9
19
|
export declare const delay: (ms: number) => Promise<void>;
|
|
@@ -1090,9 +1090,8 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
|
|
|
1090
1090
|
bookId: "",
|
|
1091
1091
|
slug: "",
|
|
1092
1092
|
assetConfig: {
|
|
1093
|
-
|
|
1094
|
-
staticFolder: ""
|
|
1095
|
-
assetsHost: ""
|
|
1093
|
+
type: "static",
|
|
1094
|
+
staticFolder: ""
|
|
1096
1095
|
},
|
|
1097
1096
|
analytics: void 0
|
|
1098
1097
|
}), v = ({ bookId: e, slug: t, assetConfig: n, analytics: r, children: i }) => /* @__PURE__ */ (0, g.jsx)(_.Provider, {
|
|
@@ -1105,10 +1104,10 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
|
|
|
1105
1104
|
children: i
|
|
1106
1105
|
}), y = () => (0, h.useContext)(_), b = (e, t, n) => {
|
|
1107
1106
|
let r = n ?? e.assetConfig, i = (t?.path ?? t?.url ?? "").split("/").pop() || t?.filename || t?.name || "";
|
|
1108
|
-
return r.
|
|
1107
|
+
return r.type === "api" ? `${r.assetsHost}${t?.path ?? t?.url ?? ""}` : `/${r.staticFolder}/${encodeURIComponent(e.slug)}/assets/${i}`;
|
|
1109
1108
|
}, x = (e, t) => {
|
|
1110
|
-
let n = t?.path ?? t?.mp3 ?? "",
|
|
1111
|
-
return
|
|
1109
|
+
let n = e.assetConfig, r = t?.path ?? t?.mp3 ?? "", i = r.split("/").pop() || t?.filename || t?.name || "";
|
|
1110
|
+
return n.type === "api" ? `${n.assetsHost}${r}` : `/${n.staticFolder}/${encodeURIComponent(e.slug)}/audio/${i}`;
|
|
1112
1111
|
}, S = (e) => new Promise((t) => {
|
|
1113
1112
|
setTimeout(t, e);
|
|
1114
1113
|
});
|
|
@@ -15,4 +15,4 @@ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix
|
|
|
15
15
|
<%s {...props} />
|
|
16
16
|
React keys must be passed directly to JSX without using spread:
|
|
17
17
|
let props = %s;
|
|
18
|
-
<%s key={someKey} {...props} />`,o,f,m,f),R[f+o]=!0)}if(f=null,i!==void 0&&(r(i),f=``+i),s(n)&&(r(n.key),f=``+n.key),`key`in n)for(var h in i={},n)h!==`key`&&(i[h]=n[h]);else i=n;return f&&c(i,typeof e==`function`?e.displayName||e.name||`Unknown`:e),u(e,f,i,a(),l,d)}function p(e){m(e)?e._store&&(e._store.validated=1):typeof e==`object`&&e&&e.$$typeof===D&&(e._payload.status===`fulfilled`?m(e._payload.value)&&e._payload.value._store&&(e._payload.value._store.validated=1):e._store&&(e._store.validated=1))}function m(e){return typeof e==`object`&&!!e&&e.$$typeof===g}var h=d(),g=Symbol.for(`react.transitional.element`),_=Symbol.for(`react.portal`),v=Symbol.for(`react.fragment`),y=Symbol.for(`react.strict_mode`),b=Symbol.for(`react.profiler`),x=Symbol.for(`react.consumer`),S=Symbol.for(`react.context`),C=Symbol.for(`react.forward_ref`),w=Symbol.for(`react.suspense`),T=Symbol.for(`react.suspense_list`),E=Symbol.for(`react.memo`),D=Symbol.for(`react.lazy`),O=Symbol.for(`react.activity`),k=Symbol.for(`react.client.reference`),A=h.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,j=Object.prototype.hasOwnProperty,M=Array.isArray,N=console.createTask?console.createTask:function(){return null};h={react_stack_bottom_frame:function(e){return e()}};var P,F={},I=h.react_stack_bottom_frame.bind(h,o)(),L=N(i(o)),R={};e.Fragment=v,e.jsx=function(e,t,n){var r=1e4>A.recentlyCreatedOwnerStacks++;return f(e,t,n,!1,r?Error(`react-stack-top-frame`):I,r?N(i(e)):L)},e.jsxs=function(e,t,n){var r=1e4>A.recentlyCreatedOwnerStacks++;return f(e,t,n,!0,r?Error(`react-stack-top-frame`):I,r?N(i(e)):L)}})()})),m=o(((e,t)=>{process.env.NODE_ENV===`production`?t.exports=f():t.exports=p()})),h=c(d(),1),g=m(),_=h.createContext({bookId:``,slug:``,assetConfig:{
|
|
18
|
+
<%s key={someKey} {...props} />`,o,f,m,f),R[f+o]=!0)}if(f=null,i!==void 0&&(r(i),f=``+i),s(n)&&(r(n.key),f=``+n.key),`key`in n)for(var h in i={},n)h!==`key`&&(i[h]=n[h]);else i=n;return f&&c(i,typeof e==`function`?e.displayName||e.name||`Unknown`:e),u(e,f,i,a(),l,d)}function p(e){m(e)?e._store&&(e._store.validated=1):typeof e==`object`&&e&&e.$$typeof===D&&(e._payload.status===`fulfilled`?m(e._payload.value)&&e._payload.value._store&&(e._payload.value._store.validated=1):e._store&&(e._store.validated=1))}function m(e){return typeof e==`object`&&!!e&&e.$$typeof===g}var h=d(),g=Symbol.for(`react.transitional.element`),_=Symbol.for(`react.portal`),v=Symbol.for(`react.fragment`),y=Symbol.for(`react.strict_mode`),b=Symbol.for(`react.profiler`),x=Symbol.for(`react.consumer`),S=Symbol.for(`react.context`),C=Symbol.for(`react.forward_ref`),w=Symbol.for(`react.suspense`),T=Symbol.for(`react.suspense_list`),E=Symbol.for(`react.memo`),D=Symbol.for(`react.lazy`),O=Symbol.for(`react.activity`),k=Symbol.for(`react.client.reference`),A=h.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,j=Object.prototype.hasOwnProperty,M=Array.isArray,N=console.createTask?console.createTask:function(){return null};h={react_stack_bottom_frame:function(e){return e()}};var P,F={},I=h.react_stack_bottom_frame.bind(h,o)(),L=N(i(o)),R={};e.Fragment=v,e.jsx=function(e,t,n){var r=1e4>A.recentlyCreatedOwnerStacks++;return f(e,t,n,!1,r?Error(`react-stack-top-frame`):I,r?N(i(e)):L)},e.jsxs=function(e,t,n){var r=1e4>A.recentlyCreatedOwnerStacks++;return f(e,t,n,!0,r?Error(`react-stack-top-frame`):I,r?N(i(e)):L)}})()})),m=o(((e,t)=>{process.env.NODE_ENV===`production`?t.exports=f():t.exports=p()})),h=c(d(),1),g=m(),_=h.createContext({bookId:``,slug:``,assetConfig:{type:`static`,staticFolder:``},analytics:void 0}),v=({bookId:e,slug:t,assetConfig:n,analytics:r,children:i})=>(0,g.jsx)(_.Provider,{value:{bookId:e,slug:t,assetConfig:n,analytics:r},children:i}),y=()=>(0,h.useContext)(_),b=(e,t,n)=>{let r=n??e.assetConfig,i=(t?.path??t?.url??``).split(`/`).pop()||t?.filename||t?.name||``;return r.type===`api`?`${r.assetsHost}${t?.path??t?.url??``}`:`/${r.staticFolder}/${encodeURIComponent(e.slug)}/assets/${i}`},x=(e,t)=>{let n=e.assetConfig,r=t?.path??t?.mp3??``,i=r.split(`/`).pop()||t?.filename||t?.name||``;return n.type===`api`?`${n.assetsHost}${r}`:`/${n.staticFolder}/${encodeURIComponent(e.slug)}/audio/${i}`},S=e=>new Promise(t=>{setTimeout(t,e)});Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return y}}),Object.defineProperty(exports,"c",{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return v}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return b}}),Object.defineProperty(exports,"o",{enumerable:!0,get:function(){return m}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return x}}),Object.defineProperty(exports,"s",{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return S}});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@curiouslearning/gdl-player-core",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "Package containing the core player components for the GDL interactive books",
|
|
5
5
|
"homepage": "https://github.com/curiouslearning/gdl-player-core#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -35,12 +35,17 @@
|
|
|
35
35
|
"typecheck": "tsc --noEmit",
|
|
36
36
|
"ci:verify": "npm run typecheck && npm run build",
|
|
37
37
|
"prepublishOnly": "npm run build",
|
|
38
|
-
"test": "npm run typecheck"
|
|
38
|
+
"test": "npm run typecheck",
|
|
39
|
+
"dev": "vite --config vite.dev.config.ts"
|
|
39
40
|
},
|
|
40
41
|
"devDependencies": {
|
|
41
42
|
"@types/node": "^25.9.2",
|
|
42
43
|
"@types/react": "^19.2.17",
|
|
44
|
+
"@types/react-dom": "^19.2.3",
|
|
45
|
+
"react": "^19.0.0",
|
|
46
|
+
"react-dom": "^19.0.0",
|
|
43
47
|
"sass-embedded": "^1.100.0",
|
|
48
|
+
"swiper": "^12.0.0",
|
|
44
49
|
"typescript": "^6.0.3",
|
|
45
50
|
"vite": "^8.0.16"
|
|
46
51
|
},
|