@capytale/meta-player 0.8.2 → 0.8.3
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/.prettierrc.json +4 -4
- package/LICENSE +674 -674
- package/README.md +12 -12
- package/eslint.config.js +28 -28
- package/index.html +15 -15
- package/package.json +60 -60
- package/public/themes/lara-dark-blue/theme.css +7015 -7015
- package/public/themes/lara-light-blue/theme.css +7005 -7005
- package/src/App.tsx +139 -139
- package/src/AppRedux.css +39 -39
- package/src/MetaPlayer.tsx +170 -170
- package/src/activityJs.ts +7 -7
- package/src/app/createAppSlice.ts +6 -6
- package/src/app/hooks.ts +12 -12
- package/src/app/store.ts +52 -52
- package/src/app.module.scss +80 -80
- package/src/demo.tsx +87 -87
- package/src/external/prime.ts +5 -5
- package/src/features/activityData/ExitWarning.ts +28 -28
- package/src/features/activityData/IsAntiCheatExitDetectionDisabledSetter.tsx +19 -19
- package/src/features/activityData/IsDirtySetter.tsx +17 -17
- package/src/features/activityData/MetaPlayerOptionsSetter.tsx +41 -41
- package/src/features/activityData/activityDataSlice.ts +256 -256
- package/src/features/activityData/activityJsData.ts +82 -82
- package/src/features/activityData/hooks.ts +34 -34
- package/src/features/activityData/metaPlayerOptions.ts +23 -23
- package/src/features/activityData/uiState.ts +20 -20
- package/src/features/activityJS/ActivityJSProvider.tsx +339 -339
- package/src/features/activityJS/AfterResetAction.tsx +23 -23
- package/src/features/activityJS/AfterSaveAction.tsx +23 -23
- package/src/features/activityJS/BeforeResetAction.tsx +23 -23
- package/src/features/activityJS/BeforeSaveAction.tsx +23 -23
- package/src/features/activityJS/Saver.tsx +167 -167
- package/src/features/activityJS/hooks.ts +85 -85
- package/src/features/activityJS/internal-hooks.ts +96 -96
- package/src/features/activityJS/saverSlice.ts +96 -96
- package/src/features/activitySettings/ActivitySettingsSetter.tsx +21 -21
- package/src/features/activitySettings/hooks.ts +12 -12
- package/src/features/activitySettings/index.tsx +43 -43
- package/src/features/activitySettings/store.ts +108 -108
- package/src/features/activitySettings/style.module.scss +8 -8
- package/src/features/activitySettings/types.ts +140 -140
- package/src/features/activitySettings/ui.tsx +299 -299
- package/src/features/functionalities/AttachedFilesFunctionality.ts +23 -23
- package/src/features/functionalities/PreviewDialog.tsx +83 -83
- package/src/features/functionalities/functionalitiesSlice.ts +98 -98
- package/src/features/functionalities/hooks.ts +70 -70
- package/src/features/layout/hooks.ts +7 -7
- package/src/features/layout/layoutSlice.ts +90 -90
- package/src/features/navbar/activity-info/index.tsx +54 -54
- package/src/features/navbar/activity-info/style.module.scss +38 -38
- package/src/features/navbar/activity-menu/ActivityQuickActions.tsx +57 -57
- package/src/features/navbar/activity-menu/index.tsx +154 -153
- package/src/features/navbar/activity-menu/style.module.scss +7 -7
- package/src/features/navbar/capytale-menu/CloneDialog.tsx +75 -75
- package/src/features/navbar/capytale-menu/Countdown.tsx +312 -312
- package/src/features/navbar/capytale-menu/CountdownAndSaveButton.tsx +115 -115
- package/src/features/navbar/capytale-menu/index.tsx +260 -260
- package/src/features/navbar/capytale-menu/style.module.scss +8 -8
- package/src/features/navbar/index.tsx +39 -39
- package/src/features/navbar/navbarSlice.ts +79 -79
- package/src/features/navbar/review-navbar/GradingNav.tsx +128 -128
- package/src/features/navbar/review-navbar/index.tsx +18 -18
- package/src/features/navbar/review-navbar/style.module.scss +22 -22
- package/src/features/navbar/sidebars/ActivitySidebarActions.tsx +57 -57
- package/src/features/navbar/sidebars/AttachedFilesSidebarContent.module.scss +43 -43
- package/src/features/navbar/sidebars/AttachedFilesSidebarContent.tsx +181 -181
- package/src/features/navbar/sidebars/SettingsSidebarContent.tsx +192 -192
- package/src/features/navbar/sidebars/style.module.scss +15 -15
- package/src/features/navbar/student-utils.ts +11 -11
- package/src/features/navbar/style.module.scss +65 -65
- package/src/features/pedago/InstructionsEditor.tsx +102 -102
- package/src/features/pedago/PdfEditor.tsx +91 -91
- package/src/features/pedago/PedagoCommands.tsx +353 -353
- package/src/features/pedago/SharedNotesEditor.tsx +144 -144
- package/src/features/pedago/index.tsx +207 -204
- package/src/features/pedago/style.module.scss +233 -233
- package/src/features/theming/ThemeSwitcher.tsx +51 -51
- package/src/features/theming/hooks.ts +6 -6
- package/src/features/theming/themingSlice.ts +93 -93
- package/src/features/toast.tsx +38 -38
- package/src/hooks/index.ts +16 -16
- package/src/index.css +132 -132
- package/src/index.ts +90 -90
- package/src/logo.svg +1 -1
- package/src/my_json_data.js +4146 -4146
- package/src/settings.ts +6 -6
- package/src/types.ts +9 -9
- package/src/utils/ButtonDoubleIcon.tsx +35 -35
- package/src/utils/CardSelector.tsx +41 -41
- package/src/utils/ErrorBoundary.tsx +41 -41
- package/src/utils/PopupButton.tsx +134 -134
- package/src/utils/activity.ts +8 -8
- package/src/utils/breakpoints.ts +4 -4
- package/src/utils/capytale.ts +10 -10
- package/src/utils/clipboard.ts +11 -11
- package/src/utils/download.ts +7 -7
- package/src/utils/equality.ts +32 -32
- package/src/utils/server-clock.ts +42 -42
- package/src/utils/style.module.scss +45 -45
- package/src/utils/useFullscreen.ts +65 -65
- package/src/vite-env.d.ts +1 -1
- package/tsconfig.json +28 -28
- package/tsconfig.node.json +9 -9
- package/vite.config.ts +11 -11
package/README.md
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
# Meta Player Capytale
|
|
2
|
-
|
|
3
|
-
## To put in player HTML
|
|
4
|
-
|
|
5
|
-
- CSS used by the meta-player:
|
|
6
|
-
```html
|
|
7
|
-
<link id="theme-link" rel="stylesheet" href="https://cdn.ac-paris.fr/capytale/meta-player/themes/lara-light-blue/theme.css">
|
|
8
|
-
```
|
|
9
|
-
- If using the attached files preview capability:
|
|
10
|
-
```html
|
|
11
|
-
<link rel="stylesheet" href="https://cdn.ac-paris.fr/highlight/styles/default.css">
|
|
12
|
-
<script src="https://cdn.ac-paris.fr/highlight/highlight.min.js"></script>
|
|
1
|
+
# Meta Player Capytale
|
|
2
|
+
|
|
3
|
+
## To put in player HTML
|
|
4
|
+
|
|
5
|
+
- CSS used by the meta-player:
|
|
6
|
+
```html
|
|
7
|
+
<link id="theme-link" rel="stylesheet" href="https://cdn.ac-paris.fr/capytale/meta-player/themes/lara-light-blue/theme.css">
|
|
8
|
+
```
|
|
9
|
+
- If using the attached files preview capability:
|
|
10
|
+
```html
|
|
11
|
+
<link rel="stylesheet" href="https://cdn.ac-paris.fr/highlight/styles/default.css">
|
|
12
|
+
<script src="https://cdn.ac-paris.fr/highlight/highlight.min.js"></script>
|
|
13
13
|
```
|
package/eslint.config.js
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import js from '@eslint/js'
|
|
2
|
-
import globals from 'globals'
|
|
3
|
-
import reactHooks from 'eslint-plugin-react-hooks'
|
|
4
|
-
import reactRefresh from 'eslint-plugin-react-refresh'
|
|
5
|
-
import tseslint from 'typescript-eslint'
|
|
6
|
-
|
|
7
|
-
export default tseslint.config(
|
|
8
|
-
{ ignores: ['dist'] },
|
|
9
|
-
{
|
|
10
|
-
extends: [js.configs.recommended, ...tseslint.configs.recommended],
|
|
11
|
-
files: ['**/*.{ts,tsx}'],
|
|
12
|
-
languageOptions: {
|
|
13
|
-
ecmaVersion: 2020,
|
|
14
|
-
globals: globals.browser,
|
|
15
|
-
},
|
|
16
|
-
plugins: {
|
|
17
|
-
'react-hooks': reactHooks,
|
|
18
|
-
'react-refresh': reactRefresh,
|
|
19
|
-
},
|
|
20
|
-
rules: {
|
|
21
|
-
...reactHooks.configs.recommended.rules,
|
|
22
|
-
'react-refresh/only-export-components': [
|
|
23
|
-
'warn',
|
|
24
|
-
{ allowConstantExport: true },
|
|
25
|
-
],
|
|
26
|
-
},
|
|
27
|
-
},
|
|
28
|
-
)
|
|
1
|
+
import js from '@eslint/js'
|
|
2
|
+
import globals from 'globals'
|
|
3
|
+
import reactHooks from 'eslint-plugin-react-hooks'
|
|
4
|
+
import reactRefresh from 'eslint-plugin-react-refresh'
|
|
5
|
+
import tseslint from 'typescript-eslint'
|
|
6
|
+
|
|
7
|
+
export default tseslint.config(
|
|
8
|
+
{ ignores: ['dist'] },
|
|
9
|
+
{
|
|
10
|
+
extends: [js.configs.recommended, ...tseslint.configs.recommended],
|
|
11
|
+
files: ['**/*.{ts,tsx}'],
|
|
12
|
+
languageOptions: {
|
|
13
|
+
ecmaVersion: 2020,
|
|
14
|
+
globals: globals.browser,
|
|
15
|
+
},
|
|
16
|
+
plugins: {
|
|
17
|
+
'react-hooks': reactHooks,
|
|
18
|
+
'react-refresh': reactRefresh,
|
|
19
|
+
},
|
|
20
|
+
rules: {
|
|
21
|
+
...reactHooks.configs.recommended.rules,
|
|
22
|
+
'react-refresh/only-export-components': [
|
|
23
|
+
'warn',
|
|
24
|
+
{ allowConstantExport: true },
|
|
25
|
+
],
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
)
|
package/index.html
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
<!doctype html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8" />
|
|
5
|
-
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
|
6
|
-
<link id="theme-link" rel="stylesheet" href="https://cdn.ac-paris.fr/capytale/meta-player/themes/lara-light-blue/theme.css">
|
|
7
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
8
|
-
<title>Capytale</title>
|
|
9
|
-
</head>
|
|
10
|
-
<body>
|
|
11
|
-
<noscript>You need to enable JavaScript to run this app.</noscript>
|
|
12
|
-
<div id="root"></div>
|
|
13
|
-
<script type="module" src="/src/demo.tsx"></script>
|
|
14
|
-
</body>
|
|
15
|
-
</html>
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
|
6
|
+
<link id="theme-link" rel="stylesheet" href="https://cdn.ac-paris.fr/capytale/meta-player/themes/lara-light-blue/theme.css">
|
|
7
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
8
|
+
<title>Capytale</title>
|
|
9
|
+
</head>
|
|
10
|
+
<body>
|
|
11
|
+
<noscript>You need to enable JavaScript to run this app.</noscript>
|
|
12
|
+
<div id="root"></div>
|
|
13
|
+
<script type="module" src="/src/demo.tsx"></script>
|
|
14
|
+
</body>
|
|
15
|
+
</html>
|
package/package.json
CHANGED
|
@@ -1,60 +1,60 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@capytale/meta-player",
|
|
3
|
-
"version": "0.8.
|
|
4
|
-
"type": "module",
|
|
5
|
-
"scripts": {
|
|
6
|
-
"dev": "vite",
|
|
7
|
-
"start": "vite",
|
|
8
|
-
"build": "tsc && vite build",
|
|
9
|
-
"preview": "vite preview",
|
|
10
|
-
"format": "prettier --write .",
|
|
11
|
-
"type-check": "tsc --noEmit"
|
|
12
|
-
},
|
|
13
|
-
"overrides": {
|
|
14
|
-
"use-file-upload": {
|
|
15
|
-
"react": "^18.3.1"
|
|
16
|
-
}
|
|
17
|
-
},
|
|
18
|
-
"dependencies": {
|
|
19
|
-
"@capytale/activity.js": "^3.1.29",
|
|
20
|
-
"@capytale/capytale-anti-triche": "^0.2.1",
|
|
21
|
-
"@capytale/capytale-rich-text-editor": "^0.4.3",
|
|
22
|
-
"@reduxjs/toolkit": "^2.0.1",
|
|
23
|
-
"@uidotdev/usehooks": "^2.4.1",
|
|
24
|
-
"mime": "^4.0.6",
|
|
25
|
-
"primeicons": "^7.0.0",
|
|
26
|
-
"primereact": "^10.8.3",
|
|
27
|
-
"react-dropzone": "^14.2.9",
|
|
28
|
-
"react-html-props": "^2.0.9",
|
|
29
|
-
"react-redux": "^9.1.0",
|
|
30
|
-
"screenfull": "^6.0.2",
|
|
31
|
-
"use-file-upload": "^1.0.11",
|
|
32
|
-
"zustand": "^5.0.8"
|
|
33
|
-
},
|
|
34
|
-
"devDependencies": {
|
|
35
|
-
"@eslint/js": "^9.19.0",
|
|
36
|
-
"@testing-library/dom": "^9.3.4",
|
|
37
|
-
"@testing-library/jest-dom": "^6.2.0",
|
|
38
|
-
"@testing-library/react": "^14.1.2",
|
|
39
|
-
"@testing-library/user-event": "^14.5.2",
|
|
40
|
-
"@types/react": "^18.3.8",
|
|
41
|
-
"@types/react-dom": "^18.3.0",
|
|
42
|
-
"@vitejs/plugin-react": "^4.3.4",
|
|
43
|
-
"eslint": "^9.19.0",
|
|
44
|
-
"eslint-plugin-react-hooks": "^5.0.0",
|
|
45
|
-
"eslint-plugin-react-refresh": "^0.4.18",
|
|
46
|
-
"globals": "^15.14.0",
|
|
47
|
-
"jsdom": "^23.2.0",
|
|
48
|
-
"prettier": "^3.2.1",
|
|
49
|
-
"react": "^18.3.1",
|
|
50
|
-
"react-dom": "^18.3.1",
|
|
51
|
-
"sass": "^1.75.0",
|
|
52
|
-
"typescript": "^5.7.2",
|
|
53
|
-
"typescript-eslint": "^8.22.0",
|
|
54
|
-
"vite": "^6.1.0"
|
|
55
|
-
},
|
|
56
|
-
"peerDependencies": {
|
|
57
|
-
"react": "^18.3.1",
|
|
58
|
-
"react-dom": "^18.3.1"
|
|
59
|
-
}
|
|
60
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@capytale/meta-player",
|
|
3
|
+
"version": "0.8.3",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"scripts": {
|
|
6
|
+
"dev": "vite",
|
|
7
|
+
"start": "vite",
|
|
8
|
+
"build": "tsc && vite build",
|
|
9
|
+
"preview": "vite preview",
|
|
10
|
+
"format": "prettier --write .",
|
|
11
|
+
"type-check": "tsc --noEmit"
|
|
12
|
+
},
|
|
13
|
+
"overrides": {
|
|
14
|
+
"use-file-upload": {
|
|
15
|
+
"react": "^18.3.1"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"dependencies": {
|
|
19
|
+
"@capytale/activity.js": "^3.1.29",
|
|
20
|
+
"@capytale/capytale-anti-triche": "^0.2.1",
|
|
21
|
+
"@capytale/capytale-rich-text-editor": "^0.4.3",
|
|
22
|
+
"@reduxjs/toolkit": "^2.0.1",
|
|
23
|
+
"@uidotdev/usehooks": "^2.4.1",
|
|
24
|
+
"mime": "^4.0.6",
|
|
25
|
+
"primeicons": "^7.0.0",
|
|
26
|
+
"primereact": "^10.8.3",
|
|
27
|
+
"react-dropzone": "^14.2.9",
|
|
28
|
+
"react-html-props": "^2.0.9",
|
|
29
|
+
"react-redux": "^9.1.0",
|
|
30
|
+
"screenfull": "^6.0.2",
|
|
31
|
+
"use-file-upload": "^1.0.11",
|
|
32
|
+
"zustand": "^5.0.8"
|
|
33
|
+
},
|
|
34
|
+
"devDependencies": {
|
|
35
|
+
"@eslint/js": "^9.19.0",
|
|
36
|
+
"@testing-library/dom": "^9.3.4",
|
|
37
|
+
"@testing-library/jest-dom": "^6.2.0",
|
|
38
|
+
"@testing-library/react": "^14.1.2",
|
|
39
|
+
"@testing-library/user-event": "^14.5.2",
|
|
40
|
+
"@types/react": "^18.3.8",
|
|
41
|
+
"@types/react-dom": "^18.3.0",
|
|
42
|
+
"@vitejs/plugin-react": "^4.3.4",
|
|
43
|
+
"eslint": "^9.19.0",
|
|
44
|
+
"eslint-plugin-react-hooks": "^5.0.0",
|
|
45
|
+
"eslint-plugin-react-refresh": "^0.4.18",
|
|
46
|
+
"globals": "^15.14.0",
|
|
47
|
+
"jsdom": "^23.2.0",
|
|
48
|
+
"prettier": "^3.2.1",
|
|
49
|
+
"react": "^18.3.1",
|
|
50
|
+
"react-dom": "^18.3.1",
|
|
51
|
+
"sass": "^1.75.0",
|
|
52
|
+
"typescript": "^5.7.2",
|
|
53
|
+
"typescript-eslint": "^8.22.0",
|
|
54
|
+
"vite": "^6.1.0"
|
|
55
|
+
},
|
|
56
|
+
"peerDependencies": {
|
|
57
|
+
"react": "^18.3.1",
|
|
58
|
+
"react-dom": "^18.3.1"
|
|
59
|
+
}
|
|
60
|
+
}
|