openlearn-next 0.2.1 → 0.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/README.md +2 -0
- package/dist/assets/{courseware-BfnpYR-P.js → courseware-CL7gjXZj.js} +1 -1
- package/dist/assets/{index-zi7zNIte.js → index-4xDvXGZ_.js} +4 -4
- package/dist/assets/{index.es-S9HBYdjC.js → index.es-D071ILbD.js} +1 -1
- package/dist/assets/{whiteboard-BpCj1CQU.js → whiteboard-Dp8tFXTO.js} +33 -2
- package/dist/index.html +1 -1
- package/dist/server.cjs +109 -31
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -99,6 +99,7 @@ chmod +x deploy.sh
|
|
|
99
99
|
│ ├── middleware/auth.ts # 认证中间件
|
|
100
100
|
│ ├── routes/auth.ts # 认证路由
|
|
101
101
|
│ └── utils/ # 工具(加密·迁移·日志·上传)
|
|
102
|
+
│ └── bridge-sdk.ts # 交互式课件沙箱 Bridge SDK Proxy 实现
|
|
102
103
|
├── nginx.conf # Nginx 配置模板
|
|
103
104
|
├── deploy.sh # 一键部署脚本
|
|
104
105
|
├── ecosystem.config.cjs # PM2 配置
|
|
@@ -143,6 +144,7 @@ ext-exam.zip
|
|
|
143
144
|
- 共享依赖引用(`ctx.require('recharts')`)
|
|
144
145
|
- 前端 Extension Slot(`teacher.panel` 等 8 个)
|
|
145
146
|
- Worker Thread 隔离执行
|
|
147
|
+
- **交互式 Web 课件支持**(含高度隔离的沙箱环境与 Bridge SDK Proxy 代理)
|
|
146
148
|
|
|
147
149
|
**已安装的课堂工具:** 选择题测验 · 专业测验 · 随机点名 · 思维导图 · 计时器 · 代码沙箱 · 数学图形
|
|
148
150
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as m}from"./vendor-konva-GivUq6dt.js";import{j as e,G as h,M as
|
|
1
|
+
import{r as m}from"./vendor-konva-GivUq6dt.js";import{j as e,G as h,M as w,a as v,X as y}from"./whiteboard-Dp8tFXTO.js";const j=(function(){const l=typeof document<"u"&&document.createElement("link").relList;return l&&l.supports&&l.supports("modulepreload")?"modulepreload":"preload"})(),E=function(n){return"/"+n},g={},N=function(l,c,f){let i=Promise.resolve();if(c&&c.length>0){let t=function(r){return Promise.all(r.map(a=>Promise.resolve(a).then(u=>({status:"fulfilled",value:u}),u=>({status:"rejected",reason:u}))))};document.getElementsByTagName("link");const s=document.querySelector("meta[property=csp-nonce]"),x=s?.nonce||s?.getAttribute("nonce");i=t(c.map(r=>{if(r=E(r),r in g)return;g[r]=!0;const a=r.endsWith(".css"),u=a?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${r}"]${u}`))return;const o=document.createElement("link");if(o.rel=a?"stylesheet":j,a||(o.as="script"),o.crossOrigin="",o.href=r,x&&o.setAttribute("nonce",x),document.head.appendChild(o),a)return new Promise((p,b)=>{o.addEventListener("load",p),o.addEventListener("error",()=>b(new Error(`Unable to preload CSS for ${r}`)))})}))}function d(t){const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=t,window.dispatchEvent(s),!s.defaultPrevented)throw t}return i.then(t=>{for(const s of t||[])s.status==="rejected"&&d(s.reason);return l().catch(d)})},_=m.lazy(()=>N(()=>Promise.resolve().then(()=>F),void 0).then(n=>({default:n.InteractiveCoursewareViewer}))),P=Object.freeze(Object.defineProperty({__proto__:null,CoursewareViewer:_},Symbol.toStringTag,{value:"Module"}));function S({coursewareId:n,onClose:l}){const[c,f]=m.useState(!1),i=m.useRef(null);m.useEffect(()=>{const t=()=>{f(!!document.fullscreenElement&&document.fullscreenElement===i.current)};return document.addEventListener("fullscreenchange",t),()=>{document.removeEventListener("fullscreenchange",t)}},[]);const d=()=>{const t=i.current;t&&(document.fullscreenElement?document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen&&document.webkitExitFullscreen():t.requestFullscreen?t.requestFullscreen():t.webkitRequestFullscreen&&t.webkitRequestFullscreen())};return n?e.jsxs("div",{ref:i,className:"flex flex-col h-full bg-white rounded-xl shadow-sm border border-gray-200 overflow-hidden relative",children:[e.jsxs("div",{className:"flex items-center justify-between px-4 py-2 bg-gray-100 border-b border-gray-200 shrink-0",children:[e.jsxs("div",{className:"flex items-center gap-2 select-none",children:[e.jsx(h,{size:16,className:"text-indigo-500"}),e.jsx("span",{className:"font-semibold text-sm text-gray-700",children:"Interactive Courseware"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("button",{onClick:d,className:"p-1 hover:bg-gray-200 rounded-lg text-gray-500 transition-colors cursor-pointer",title:c?"退出全屏":"全屏播放",children:c?e.jsx(w,{size:16}):e.jsx(v,{size:16})}),l&&e.jsx("button",{onClick:l,className:"p-1 hover:bg-gray-200 rounded-lg text-gray-500 transition-colors cursor-pointer",children:e.jsx(y,{size:16})})]})]}),e.jsx("div",{className:"flex-1 relative bg-white",children:e.jsx("iframe",{src:`/api/courseware/${n}`,sandbox:"allow-scripts allow-same-origin allow-downloads allow-forms",allowFullScreen:!0,className:"w-full h-full border-none",title:"Interactive Courseware"})})]}):e.jsxs("div",{className:"flex flex-col items-center justify-center h-full text-gray-400 bg-gray-50 rounded-xl border border-dashed border-gray-300",children:[e.jsx(h,{size:48,className:"mb-4 text-gray-300 opacity-50"}),e.jsx("h3",{className:"text-lg font-medium text-gray-700",children:"No Courseware Selected"}),e.jsx("p",{className:"mt-2 text-sm text-center",children:"Please select a courseware from the list to view it interactively."})]})}const F=Object.freeze(Object.defineProperty({__proto__:null,InteractiveCoursewareViewer:S},Symbol.toStringTag,{value:"Module"}));export{N as _,P as i};
|