@prozilla-os/media-viewer 1.1.9 → 1.1.11
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/main.js +1 -1
- package/dist/main.js.map +1 -1
- package/package.json +3 -3
package/dist/main.js
CHANGED
|
@@ -19,7 +19,7 @@ function w({ file: e, close: o, setTitle: i }) {
|
|
|
19
19
|
return e.extension == null || !t.includes(e.extension) ? /* @__PURE__ */ r("p", { children: "Invalid file format." }) : e.source == null ? /* @__PURE__ */ r("p", { children: "File failed to load." }) : /* @__PURE__ */ r("div", { className: f.MediaViewer, children: /* @__PURE__ */ r("img", { src: e.source, alt: e.id, draggable: "false" }) });
|
|
20
20
|
}
|
|
21
21
|
const g = new u("Media Viewer", "media-viewer", w).setIconUrl("https://os.prozilla.dev/assets/apps/icons/media-viewer.svg").setRole(s.APP_ROLES.mediaViewer).setAssociatedExtensions(t).setCategory("Photo & video");
|
|
22
|
-
g.setMetadata({ name: "@prozilla-os/media-viewer", version: "1.1.
|
|
22
|
+
g.setMetadata({ name: "@prozilla-os/media-viewer", version: "1.1.10", author: "Prozilla" });
|
|
23
23
|
export {
|
|
24
24
|
g as mediaViewer
|
|
25
25
|
};
|
package/dist/main.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.js","sources":["../src/components/MediaViewer.tsx","../src/main.ts"],"sourcesContent":["import { useEffect } from \"react\";\nimport styles from \"./MediaViewer.module.css\";\nimport { AppsConfig, IMAGE_EXTENSIONS, useSystemManager, useWindowsManager, VirtualFile, WindowProps } from \"@prozilla-os/core\";\n\nexport interface MediaViewerProps extends WindowProps {\n\tfile?: VirtualFile;\n}\n\nexport function MediaViewer({ file, close, setTitle }: MediaViewerProps) {\n\tconst { appsConfig } = useSystemManager();\n\tconst windowsManager = useWindowsManager();\n\n\tuseEffect(() => {\n\t\tif (file != null) setTitle?.(file.id);\n\t}, [file, setTitle]);\n\n\tif (file == null) {\n\t\tconst fileExplorerApp = appsConfig.getAppByRole(AppsConfig.APP_ROLES.fileExplorer);\n\n\t\tsetTimeout(() => {\n\t\t\tif (fileExplorerApp != null)\n\t\t\t\twindowsManager?.open(fileExplorerApp.id, { path: \"~/Pictures\" });\n\t\t\tclose?.();\n\t\t}, 10);\n\t\treturn;\n\t}\n\n\tif (file.extension == null || !IMAGE_EXTENSIONS.includes(file.extension)) return <p>Invalid file format.</p>;\n\n\tif (file.source == null) return <p>File failed to load.</p>;\n\n\treturn <div className={styles.MediaViewer}>\n\t\t<img src={file.source} alt={file.id} draggable=\"false\"/>\n\t</div>;\n}","import { App, AppsConfig, IMAGE_EXTENSIONS } from \"@prozilla-os/core\";\nimport { MediaViewer, MediaViewerProps } from \"./components/MediaViewer\";\n\nconst mediaViewer = new App<MediaViewerProps>(\"Media Viewer\", \"media-viewer\", MediaViewer)\n\t.setIconUrl(\"https://os.prozilla.dev/assets/apps/icons/media-viewer.svg\")\n\t.setRole(AppsConfig.APP_ROLES.mediaViewer)\n\t.setAssociatedExtensions(IMAGE_EXTENSIONS)\n\t.setCategory(\"Photo & video\");\nmediaViewer.setMetadata({ name: \"@prozilla-os/media-viewer\", version: \"1.1.
|
|
1
|
+
{"version":3,"file":"main.js","sources":["../src/components/MediaViewer.tsx","../src/main.ts"],"sourcesContent":["import { useEffect } from \"react\";\nimport styles from \"./MediaViewer.module.css\";\nimport { AppsConfig, IMAGE_EXTENSIONS, useSystemManager, useWindowsManager, VirtualFile, WindowProps } from \"@prozilla-os/core\";\n\nexport interface MediaViewerProps extends WindowProps {\n\tfile?: VirtualFile;\n}\n\nexport function MediaViewer({ file, close, setTitle }: MediaViewerProps) {\n\tconst { appsConfig } = useSystemManager();\n\tconst windowsManager = useWindowsManager();\n\n\tuseEffect(() => {\n\t\tif (file != null) setTitle?.(file.id);\n\t}, [file, setTitle]);\n\n\tif (file == null) {\n\t\tconst fileExplorerApp = appsConfig.getAppByRole(AppsConfig.APP_ROLES.fileExplorer);\n\n\t\tsetTimeout(() => {\n\t\t\tif (fileExplorerApp != null)\n\t\t\t\twindowsManager?.open(fileExplorerApp.id, { path: \"~/Pictures\" });\n\t\t\tclose?.();\n\t\t}, 10);\n\t\treturn;\n\t}\n\n\tif (file.extension == null || !IMAGE_EXTENSIONS.includes(file.extension)) return <p>Invalid file format.</p>;\n\n\tif (file.source == null) return <p>File failed to load.</p>;\n\n\treturn <div className={styles.MediaViewer}>\n\t\t<img src={file.source} alt={file.id} draggable=\"false\"/>\n\t</div>;\n}","import { App, AppsConfig, IMAGE_EXTENSIONS } from \"@prozilla-os/core\";\nimport { MediaViewer, MediaViewerProps } from \"./components/MediaViewer\";\n\nconst mediaViewer = new App<MediaViewerProps>(\"Media Viewer\", \"media-viewer\", MediaViewer)\n\t.setIconUrl(\"https://os.prozilla.dev/assets/apps/icons/media-viewer.svg\")\n\t.setRole(AppsConfig.APP_ROLES.mediaViewer)\n\t.setAssociatedExtensions(IMAGE_EXTENSIONS)\n\t.setCategory(\"Photo & video\");\nmediaViewer.setMetadata({ name: \"@prozilla-os/media-viewer\", version: \"1.1.10\", author: \"Prozilla\" });\n\n\nexport { mediaViewer };"],"names":["MediaViewer","file","close","setTitle","appsConfig","useSystemManager","windowsManager","useWindowsManager","useEffect","fileExplorerApp","AppsConfig","IMAGE_EXTENSIONS","jsx","styles","mediaViewer","App"],"mappings":";;;;;;AAQO,SAASA,EAAY,EAAE,MAAAC,GAAM,OAAAC,GAAO,UAAAC,KAA8B;AAClE,QAAA,EAAE,YAAAC,MAAeC,KACjBC,IAAiBC;AAMvB,MAJAC,EAAU,MAAM;AACf,IAAIP,KAAQ,SAAiBE,KAAA,QAAAA,EAAAF,EAAK;AAAA,EAAE,GAClC,CAACA,GAAME,CAAQ,CAAC,GAEfF,KAAQ,MAAM;AACjB,UAAMQ,IAAkBL,EAAW,aAAaM,EAAW,UAAU,YAAY;AAEjF,eAAW,MAAM;AAChB,MAAID,KAAmB,SACtBH,KAAA,QAAAA,EAAgB,KAAKG,EAAgB,IAAI,EAAE,MAAM,kBAC1CP,KAAA,QAAAA;AAAA,OACN,EAAE;AACL;AAAA,EACD;AAEA,SAAID,EAAK,aAAa,QAAQ,CAACU,EAAiB,SAASV,EAAK,SAAS,IAAW,gBAAAW,EAAA,KAAA,EAAE,UAAoB,uBAAA,CAAA,IAEpGX,EAAK,UAAU,OAAa,gBAAAW,EAAC,OAAE,UAAoB,uBAAA,CAAA,IAE/C,gBAAAA,EAAA,OAAA,EAAI,WAAWC,EAAO,aAC7B,UAAC,gBAAAD,EAAA,OAAA,EAAI,KAAKX,EAAK,QAAQ,KAAKA,EAAK,IAAI,WAAU,SAAO,EACvD,CAAA;AACD;AC/BA,MAAMa,IAAc,IAAIC,EAAsB,gBAAgB,gBAAgBf,CAAW,EACvF,WAAW,4DAA4D,EACvE,QAAQU,EAAW,UAAU,WAAW,EACxC,wBAAwBC,CAAgB,EACxC,YAAY,eAAe;AAC7BG,EAAY,YAAY,EAAE,MAAM,6BAA6B,SAAS,UAAU,QAAQ,YAAY;"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prozilla-os/media-viewer",
|
|
3
3
|
"description": "A ProzillaOS application for viewing different kinds of media.",
|
|
4
|
-
"version": "1.1.
|
|
4
|
+
"version": "1.1.11",
|
|
5
5
|
"homepage": "https://os.prozilla.dev/media-viewer",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Prozilla",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"license": "MIT",
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"react": "^18.3.1",
|
|
23
|
-
"@prozilla-os/core": "1.3.
|
|
23
|
+
"@prozilla-os/core": "1.3.6"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"@types/node": "^20.14.5",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"vite": "^5.4.8",
|
|
31
31
|
"vite-plugin-dts": "^3.9.1",
|
|
32
32
|
"vite-plugin-lib-inject-css": "^2.1.1",
|
|
33
|
-
"@prozilla-os/dev-tools": "1.1.
|
|
33
|
+
"@prozilla-os/dev-tools": "1.1.3"
|
|
34
34
|
},
|
|
35
35
|
"files": [
|
|
36
36
|
"dist"
|