@curiouslearning/gdl-player-core 1.2.0 → 1.2.2
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-D8mWyc98.js +12 -0
- package/dist/Image-DBMEc_qA.cjs +1 -0
- package/dist/{dolottie-DSkJyF_U.js → dolottie-BJIvntzd.js} +429 -427
- package/dist/{dolottie-T0a1KdHw.cjs → dolottie-C7QXtKyz.cjs} +2 -2
- package/dist/index.cjs +3 -3
- package/dist/index.js +1200 -3548
- package/dist/utils-B8vKMuMn.js +31 -0
- package/dist/utils-Cu46IIpo.cjs +1 -0
- package/package.json +1 -1
- package/dist/Image-6EeTKD85.cjs +0 -1
- package/dist/Image-Dh6rF8NX.js +0 -10
- package/dist/utils-D1e5mIt_.js +0 -1115
- package/dist/utils-V9RwSxwh.cjs +0 -18
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import e, { useContext as t } from "react";
|
|
3
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
4
|
+
//#region src/context/BookProvider.tsx
|
|
5
|
+
var r = e.createContext({
|
|
6
|
+
bookId: "",
|
|
7
|
+
slug: "",
|
|
8
|
+
assetConfig: {
|
|
9
|
+
type: "static",
|
|
10
|
+
staticFolder: ""
|
|
11
|
+
},
|
|
12
|
+
analytics: void 0
|
|
13
|
+
}), i = ({ bookId: e, slug: t, assetConfig: i, analytics: a, children: o }) => /* @__PURE__ */ n(r.Provider, {
|
|
14
|
+
value: {
|
|
15
|
+
bookId: e,
|
|
16
|
+
slug: t,
|
|
17
|
+
assetConfig: i,
|
|
18
|
+
analytics: a
|
|
19
|
+
},
|
|
20
|
+
children: o
|
|
21
|
+
}), a = () => t(r), o = (e, t, n) => {
|
|
22
|
+
let r = n ?? e.assetConfig, i = (t?.path ?? t?.url ?? "").split("/").pop() || t?.filename || t?.name || "";
|
|
23
|
+
return r.type === "api" ? `${r.assetsHost}${t?.path ?? t?.url ?? ""}` : `/${r.staticFolder}/${encodeURIComponent(e.slug)}/assets/${i}`;
|
|
24
|
+
}, s = (e, t) => {
|
|
25
|
+
let n = e.assetConfig, r = t?.path ?? t?.mp3 ?? "", i = r.split("/").pop() || t?.filename || t?.name || "";
|
|
26
|
+
return n.type === "api" ? `${n.assetsHost}${r}` : `/${n.staticFolder}/${encodeURIComponent(e.slug)}/audio/${i}`;
|
|
27
|
+
}, c = (e) => new Promise((t) => {
|
|
28
|
+
setTimeout(t, e);
|
|
29
|
+
});
|
|
30
|
+
//#endregion
|
|
31
|
+
export { a, i, o as n, s as r, c as t };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},s=(n,r,a)=>(a=n==null?{}:e(i(n)),o(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));let c=require("react");c=s(c,1);let l=require("react/jsx-runtime");var u=c.default.createContext({bookId:``,slug:``,assetConfig:{type:`static`,staticFolder:``},analytics:void 0}),d=({bookId:e,slug:t,assetConfig:n,analytics:r,children:i})=>(0,l.jsx)(u.Provider,{value:{bookId:e,slug:t,assetConfig:n,analytics:r},children:i}),f=()=>(0,c.useContext)(u),p=(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}`},m=(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}`},h=e=>new Promise(t=>{setTimeout(t,e)});Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return f}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return p}}),Object.defineProperty(exports,"o",{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return m}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return h}});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@curiouslearning/gdl-player-core",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.2",
|
|
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": {
|
package/dist/Image-6EeTKD85.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e=require("./utils-V9RwSxwh.cjs");var t=e.o(),n=({mediaItem:n})=>(0,t.jsx)(`img`,{src:e.n(e.a(),n),alt:``,loading:`lazy`,className:`max-w-full max-h-full w-full h-full -z-10`});exports.Image=n,exports.default=n;
|
package/dist/Image-Dh6rF8NX.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { a as e, n as t, o as n } from "./utils-D1e5mIt_.js";
|
|
2
|
-
//#region src/components/Image.tsx
|
|
3
|
-
var r = n(), i = ({ mediaItem: n }) => /* @__PURE__ */ (0, r.jsx)("img", {
|
|
4
|
-
src: t(e(), n),
|
|
5
|
-
alt: "",
|
|
6
|
-
loading: "lazy",
|
|
7
|
-
className: "max-w-full max-h-full w-full h-full -z-10"
|
|
8
|
-
});
|
|
9
|
-
//#endregion
|
|
10
|
-
export { i as Image, i as default };
|