@prozilla-os/browser 1.1.16 → 1.1.18
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/LICENSE +20 -20
- package/README.md +79 -79
- package/dist/main.js +19 -19
- package/dist/main.js.map +1 -1
- package/package.json +3 -3
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2023 Sieben De Beule
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2023 Sieben De Beule
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
21
|
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,79 +1,79 @@
|
|
|
1
|
-
<div align="center">
|
|
2
|
-
<br />
|
|
3
|
-
<p>
|
|
4
|
-
<a href="https://os.prozilla.dev/"><img src="https://os.prozilla.dev/assets/logo.svg?v=2" height="200" alt="ProzillaOS" /></a>
|
|
5
|
-
</p>
|
|
6
|
-
<p>
|
|
7
|
-
<a href="https://github.com/prozilla-os/ProzillaOS/blob/main/LICENSE.md"><img alt="License" src="https://img.shields.io/github/license/Prozilla/ProzillaOS?style=flat-square&color=FF4D5B&label=License"></a>
|
|
8
|
-
<a href="https://github.com/prozilla-os/ProzillaOS"><img alt="Stars" src="https://img.shields.io/github/stars/Prozilla/ProzillaOS?style=flat-square&color=FED24C&label=%E2%AD%90"></a>
|
|
9
|
-
<a href="https://github.com/prozilla-os/ProzillaOS"><img alt="Forks" src="https://img.shields.io/github/forks/Prozilla/ProzillaOS?style=flat-square&color=4D9CFF&label=Forks&logo=github"></a>
|
|
10
|
-
<a href="https://www.npmjs.com/package/prozilla-os"><img alt="NPM Version" src="https://img.shields.io/npm/v/prozilla-os?logo=npm&style=flat-square&label=prozilla-os&color=FF4D5B"></a>
|
|
11
|
-
</p>
|
|
12
|
-
</div>
|
|
13
|
-
|
|
14
|
-
## About
|
|
15
|
-
|
|
16
|
-
`@prozilla-os/browser` is a ProzillaOS application for browsing the internet.
|
|
17
|
-
|
|
18
|
-
## Installation
|
|
19
|
-
|
|
20
|
-
`@prozilla-os/core` is required to run this application.
|
|
21
|
-
|
|
22
|
-
```sh
|
|
23
|
-
npm install @prozilla-os/core @prozilla-os/browser
|
|
24
|
-
yarn add @prozilla-os/core @prozilla-os/browser
|
|
25
|
-
pnpm add @prozilla-os/core @prozilla-os/browser
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
## Usage
|
|
29
|
-
|
|
30
|
-
### Basic setup
|
|
31
|
-
|
|
32
|
-
```tsx
|
|
33
|
-
import { Desktop, ModalsView, ProzillaOS, Taskbar, WindowsView, AppsConfig } from "@prozilla-os/core";
|
|
34
|
-
import { browser } from "@prozilla-os/browser";
|
|
35
|
-
|
|
36
|
-
function App() {
|
|
37
|
-
return (
|
|
38
|
-
<ProzillaOS
|
|
39
|
-
systemName="Example"
|
|
40
|
-
tagLine="Powered by ProzillaOS"
|
|
41
|
-
config={{
|
|
42
|
-
apps: new AppsConfig({
|
|
43
|
-
apps: [ browser ]
|
|
44
|
-
})
|
|
45
|
-
}}
|
|
46
|
-
>
|
|
47
|
-
<Taskbar/>
|
|
48
|
-
<WindowsView/>
|
|
49
|
-
<ModalsView/>
|
|
50
|
-
<Desktop/>
|
|
51
|
-
</ProzillaOS>
|
|
52
|
-
);
|
|
53
|
-
}
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
### Window options
|
|
57
|
-
|
|
58
|
-
```tsx
|
|
59
|
-
/**
|
|
60
|
-
* URL to open
|
|
61
|
-
*/
|
|
62
|
-
url: string;
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
## Links
|
|
66
|
-
|
|
67
|
-
- [Demo][demo]
|
|
68
|
-
- [Docs][docs]
|
|
69
|
-
- [GitHub][github]
|
|
70
|
-
- [npm][npm]
|
|
71
|
-
- [Discord][discord]
|
|
72
|
-
- [Ko-fi][ko-fi]
|
|
73
|
-
|
|
74
|
-
[demo]: https://os.prozilla.dev/browser
|
|
75
|
-
[docs]: https://os.prozilla.dev/docs/reference/apps/browser
|
|
76
|
-
[github]: https://github.com/prozilla-os/ProzillaOS/tree/main/packages/apps/browser
|
|
77
|
-
[npm]: https://www.npmjs.com/package/@prozilla-os/browser
|
|
78
|
-
[discord]: https://discord.gg/JwbyQP4tdz
|
|
79
|
-
[ko-fi]: https://ko-fi.com/prozilla
|
|
1
|
+
<div align="center">
|
|
2
|
+
<br />
|
|
3
|
+
<p>
|
|
4
|
+
<a href="https://os.prozilla.dev/"><img src="https://os.prozilla.dev/assets/logo.svg?v=2" height="200" alt="ProzillaOS" /></a>
|
|
5
|
+
</p>
|
|
6
|
+
<p>
|
|
7
|
+
<a href="https://github.com/prozilla-os/ProzillaOS/blob/main/LICENSE.md"><img alt="License" src="https://img.shields.io/github/license/Prozilla/ProzillaOS?style=flat-square&color=FF4D5B&label=License"></a>
|
|
8
|
+
<a href="https://github.com/prozilla-os/ProzillaOS"><img alt="Stars" src="https://img.shields.io/github/stars/Prozilla/ProzillaOS?style=flat-square&color=FED24C&label=%E2%AD%90"></a>
|
|
9
|
+
<a href="https://github.com/prozilla-os/ProzillaOS"><img alt="Forks" src="https://img.shields.io/github/forks/Prozilla/ProzillaOS?style=flat-square&color=4D9CFF&label=Forks&logo=github"></a>
|
|
10
|
+
<a href="https://www.npmjs.com/package/prozilla-os"><img alt="NPM Version" src="https://img.shields.io/npm/v/prozilla-os?logo=npm&style=flat-square&label=prozilla-os&color=FF4D5B"></a>
|
|
11
|
+
</p>
|
|
12
|
+
</div>
|
|
13
|
+
|
|
14
|
+
## About
|
|
15
|
+
|
|
16
|
+
`@prozilla-os/browser` is a ProzillaOS application for browsing the internet.
|
|
17
|
+
|
|
18
|
+
## Installation
|
|
19
|
+
|
|
20
|
+
`@prozilla-os/core` is required to run this application.
|
|
21
|
+
|
|
22
|
+
```sh
|
|
23
|
+
npm install @prozilla-os/core @prozilla-os/browser
|
|
24
|
+
yarn add @prozilla-os/core @prozilla-os/browser
|
|
25
|
+
pnpm add @prozilla-os/core @prozilla-os/browser
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Usage
|
|
29
|
+
|
|
30
|
+
### Basic setup
|
|
31
|
+
|
|
32
|
+
```tsx
|
|
33
|
+
import { Desktop, ModalsView, ProzillaOS, Taskbar, WindowsView, AppsConfig } from "@prozilla-os/core";
|
|
34
|
+
import { browser } from "@prozilla-os/browser";
|
|
35
|
+
|
|
36
|
+
function App() {
|
|
37
|
+
return (
|
|
38
|
+
<ProzillaOS
|
|
39
|
+
systemName="Example"
|
|
40
|
+
tagLine="Powered by ProzillaOS"
|
|
41
|
+
config={{
|
|
42
|
+
apps: new AppsConfig({
|
|
43
|
+
apps: [ browser ]
|
|
44
|
+
})
|
|
45
|
+
}}
|
|
46
|
+
>
|
|
47
|
+
<Taskbar/>
|
|
48
|
+
<WindowsView/>
|
|
49
|
+
<ModalsView/>
|
|
50
|
+
<Desktop/>
|
|
51
|
+
</ProzillaOS>
|
|
52
|
+
);
|
|
53
|
+
}
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### Window options
|
|
57
|
+
|
|
58
|
+
```tsx
|
|
59
|
+
/**
|
|
60
|
+
* URL to open
|
|
61
|
+
*/
|
|
62
|
+
url: string;
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
## Links
|
|
66
|
+
|
|
67
|
+
- [Demo][demo]
|
|
68
|
+
- [Docs][docs]
|
|
69
|
+
- [GitHub][github]
|
|
70
|
+
- [npm][npm]
|
|
71
|
+
- [Discord][discord]
|
|
72
|
+
- [Ko-fi][ko-fi]
|
|
73
|
+
|
|
74
|
+
[demo]: https://os.prozilla.dev/browser
|
|
75
|
+
[docs]: https://os.prozilla.dev/docs/reference/apps/browser
|
|
76
|
+
[github]: https://github.com/prozilla-os/ProzillaOS/tree/main/packages/apps/browser
|
|
77
|
+
[npm]: https://www.npmjs.com/package/@prozilla-os/browser
|
|
78
|
+
[discord]: https://discord.gg/JwbyQP4tdz
|
|
79
|
+
[ko-fi]: https://ko-fi.com/prozilla
|
package/dist/main.js
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
(function(){"use strict";try{if(typeof document<"u"){var
|
|
1
|
+
(function(){"use strict";try{if(typeof document<"u"){var r=document.createElement("style");r.appendChild(document.createTextNode('._Browser_rk8bv_1{--header-height: 3.5rem;--nav-bar-height: 2.25rem;display:flex;flex-direction:column;width:100%;height:100%}._Header_rk8bv_11{display:flex;flex-direction:column;width:100%;height:var(--header-height);background-color:var(--background-color-0)}._NavBar_rk8bv_19{display:flex;gap:1rem;justify-content:flex-start;align-items:center;width:100%;height:var(--nav-bar-height);padding:1.25rem}._IconButton_rk8bv_29{--color: var(--foreground-color-0);position:relative;display:flex;justify-content:center;align-items:center;height:1rem;width:auto;padding:0;background:none;border:none;outline:none;aspect-ratio:1;cursor:pointer}._IconButton_rk8bv_29:after{content:"";position:absolute;top:0;left:0;width:100%;height:100%;background-color:#fff0;border-radius:var(--border-radius-99);transform:scale(1);transform-origin:center;transition:all var(--transition-duration-1) var(--ease-in-out-default)}._IconButton_rk8bv_29:hover:after,._IconButton_rk8bv_29:focus-visible:after{background-color:#ffffff1a;transform:scale(175%)}._IconButton_rk8bv_29:disabled{--color: var(--foreground-color-2)}._IconButton_rk8bv_29 svg{height:100%}._IconButton_rk8bv_29 svg path{fill:var(--color);transition:fill var(--transition-duration-0) var(--ease-in-out-default)}._SearchBar_rk8bv_79{flex:1;padding:.25rem .5rem;background-color:var(--background-color-2);border:none;border-radius:var(--border-radius-1);outline:none;font-family:inherit;font-size:.875em}._Bookmarks_rk8bv_90{height:calc(var(--header-height) - var(--nav-bar-height))}')),document.head.appendChild(r)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
|
|
2
2
|
import { useHistory as x, WebView as R, isValidUrl as H, App as S, Vector2 as y, AppsConfig as A } from "@prozilla-os/core";
|
|
3
3
|
import { jsxs as u, jsx as e } from "react/jsx-runtime";
|
|
4
|
-
import { useState as
|
|
4
|
+
import { useState as h, useRef as z, useEffect as E } from "react";
|
|
5
5
|
import { FontAwesomeIcon as a } from "@fortawesome/react-fontawesome";
|
|
6
6
|
import { faCaretLeft as L, faCaretRight as P, faRotateRight as V, faHome as W } from "@fortawesome/free-solid-svg-icons";
|
|
7
|
-
const $ = "
|
|
7
|
+
const $ = "_Browser_rk8bv_1", j = "_Header_rk8bv_11", F = "_NavBar_rk8bv_19", M = "_IconButton_rk8bv_29", O = "_SearchBar_rk8bv_79", U = "_Bookmarks_rk8bv_90", o = {
|
|
8
8
|
Browser: $,
|
|
9
9
|
Header: j,
|
|
10
10
|
NavBar: F,
|
|
11
11
|
IconButton: M,
|
|
12
12
|
SearchBar: O,
|
|
13
13
|
Bookmarks: U
|
|
14
|
-
},
|
|
15
|
-
function D({ url: s =
|
|
16
|
-
const [c, d] =
|
|
14
|
+
}, p = "https://prozilla.dev/", q = "https://www.google.com/search?igu=1";
|
|
15
|
+
function D({ url: s = p, focus: v }) {
|
|
16
|
+
const [c, d] = h(s), [f, m] = h(s), { history: i, pushState: _, stateIndex: b, undo: k, redo: w, undoAvailable: I, redoAvailable: g } = x(s), r = z(null);
|
|
17
17
|
E(() => {
|
|
18
|
-
i.length !== 0 && d(i[
|
|
19
|
-
}, [i,
|
|
20
|
-
const
|
|
18
|
+
i.length !== 0 && d(i[b]);
|
|
19
|
+
}, [i, b]);
|
|
20
|
+
const B = () => {
|
|
21
21
|
r.current == null || r.current.contentWindow == null || (r.current.contentWindow.location.href = c);
|
|
22
22
|
}, l = (t) => {
|
|
23
23
|
if (c === t)
|
|
24
|
-
return
|
|
25
|
-
d(t), m(t),
|
|
24
|
+
return B();
|
|
25
|
+
d(t), m(t), _(t);
|
|
26
26
|
}, N = (t) => {
|
|
27
27
|
m(t.target.value);
|
|
28
28
|
}, C = (t) => {
|
|
@@ -39,7 +39,7 @@ function D({ url: s = f, focus: b }) {
|
|
|
39
39
|
tabIndex: 0,
|
|
40
40
|
className: o.IconButton,
|
|
41
41
|
onClick: () => {
|
|
42
|
-
|
|
42
|
+
k();
|
|
43
43
|
},
|
|
44
44
|
disabled: !I,
|
|
45
45
|
children: /* @__PURE__ */ e(a, { icon: L })
|
|
@@ -52,9 +52,9 @@ function D({ url: s = f, focus: b }) {
|
|
|
52
52
|
tabIndex: 0,
|
|
53
53
|
className: o.IconButton,
|
|
54
54
|
onClick: () => {
|
|
55
|
-
|
|
55
|
+
w();
|
|
56
56
|
},
|
|
57
|
-
disabled: !
|
|
57
|
+
disabled: !g,
|
|
58
58
|
children: /* @__PURE__ */ e(a, { icon: P })
|
|
59
59
|
}
|
|
60
60
|
),
|
|
@@ -64,7 +64,7 @@ function D({ url: s = f, focus: b }) {
|
|
|
64
64
|
title: "Reload",
|
|
65
65
|
tabIndex: 0,
|
|
66
66
|
className: o.IconButton,
|
|
67
|
-
onClick:
|
|
67
|
+
onClick: B,
|
|
68
68
|
children: /* @__PURE__ */ e(a, { icon: V })
|
|
69
69
|
}
|
|
70
70
|
),
|
|
@@ -75,7 +75,7 @@ function D({ url: s = f, focus: b }) {
|
|
|
75
75
|
tabIndex: 0,
|
|
76
76
|
className: o.IconButton,
|
|
77
77
|
onClick: () => {
|
|
78
|
-
l(
|
|
78
|
+
l(p);
|
|
79
79
|
},
|
|
80
80
|
children: /* @__PURE__ */ e(a, { icon: W })
|
|
81
81
|
}
|
|
@@ -83,7 +83,7 @@ function D({ url: s = f, focus: b }) {
|
|
|
83
83
|
/* @__PURE__ */ e(
|
|
84
84
|
"input",
|
|
85
85
|
{
|
|
86
|
-
value:
|
|
86
|
+
value: f,
|
|
87
87
|
type: "text",
|
|
88
88
|
"aria-label": "Search bar",
|
|
89
89
|
className: o.SearchBar,
|
|
@@ -95,11 +95,11 @@ function D({ url: s = f, focus: b }) {
|
|
|
95
95
|
] }),
|
|
96
96
|
/* @__PURE__ */ e("div", { className: o.Bookmarks })
|
|
97
97
|
] }),
|
|
98
|
-
/* @__PURE__ */ e(R, { ref: r, source: c, title: "Browser", focus:
|
|
98
|
+
/* @__PURE__ */ e(R, { ref: r, source: c, title: "Browser", focus: v })
|
|
99
99
|
] });
|
|
100
100
|
}
|
|
101
101
|
const K = new S("Browser", "browser", D, { size: new y(700, 500) }).setIconUrl("https://os.prozilla.dev/assets/apps/icons/browser.svg").setRole(A.APP_ROLES.browser).setCategory("Utilities & tools");
|
|
102
|
-
K.setMetadata({ name: "@prozilla-os/browser", version: "1.1.
|
|
102
|
+
K.setMetadata({ name: "@prozilla-os/browser", version: "1.1.17", author: "Prozilla" });
|
|
103
103
|
export {
|
|
104
104
|
K as browser
|
|
105
105
|
};
|
package/dist/main.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.js","sources":["../src/constants/browser.const.ts","../src/components/Browser.tsx","../src/main.ts"],"sourcesContent":["export const HOME_URL = \"https://prozilla.dev/\";\
|
|
1
|
+
{"version":3,"file":"main.js","sources":["../src/constants/browser.const.ts","../src/components/Browser.tsx","../src/main.ts"],"sourcesContent":["export const HOME_URL = \"https://prozilla.dev/\";\nexport const SEARCH_URL = \"https://www.google.com/search?igu=1\";","import { ChangeEventHandler, KeyboardEventHandler, useEffect, useRef, useState } from \"react\";\nimport styles from \"./Browser.module.css\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport { faCaretLeft, faCaretRight, faHome, faRotateRight } from \"@fortawesome/free-solid-svg-icons\";\nimport { isValidUrl, useHistory, WebView, WindowProps } from \"@prozilla-os/core\";\nimport { HOME_URL, SEARCH_URL } from \"../constants/browser.const\";\n\nexport interface BrowserProps extends WindowProps {\n\turl?: string;\n}\n\nexport function Browser({ url: startUrl = HOME_URL, focus }: BrowserProps) {\n\tconst [url, setUrl] = useState<string>(startUrl);\n\tconst [input, setInput] = useState(startUrl);\n\tconst { history, pushState, stateIndex, undo, redo, undoAvailable, redoAvailable } = useHistory(startUrl);\n\tconst ref = useRef<HTMLIFrameElement>(null);\n\n\tuseEffect(() => {\n\t\tif (history.length === 0)\n\t\t\treturn;\n\n\t\tsetUrl(history[stateIndex]);\n\t}, [history, stateIndex]);\n\n\tconst reload = () => {\n\t\tif (ref.current == null || ref.current.contentWindow == null)\n\t\t\treturn;\n\n\t\tref.current.contentWindow.location.href = url;\n\t};\n\n\tconst updateUrl = (newUrl: string) => {\n\t\tif (url === newUrl) {\n\t\t\treturn reload();\n\t\t}\n\n\t\tsetUrl(newUrl);\n\t\tsetInput(newUrl);\n\t\tpushState(newUrl);\n\t};\n\n\tconst onInputChange = (event: Event) => {\n\t\tsetInput((event.target as HTMLInputElement).value);\n\t};\n\n\tconst onKeyDown = (event: KeyboardEvent) => {\n\t\tconst value = (event.target as HTMLInputElement).value;\n\n\t\tif (event.key === \"Enter\" && value !== \"\") {\n\t\t\tif (isValidUrl(value)) {\n\t\t\t\tupdateUrl(value);\n\t\t\t} else {\n\t\t\t\tupdateUrl(`${SEARCH_URL}&q=${value}`);\n\t\t\t}\n\t\t}\n\t};\n\n\treturn (<div className={styles.Browser}>\n\t\t<div className={styles.Header}>\n\t\t\t<div className={styles.NavBar}>\n\t\t\t\t<button\n\t\t\t\t\ttitle=\"Back\"\n\t\t\t\t\ttabIndex={0}\n\t\t\t\t\tclassName={styles.IconButton}\n\t\t\t\t\tonClick={() => { undo(); }}\n\t\t\t\t\tdisabled={!undoAvailable}\n\t\t\t\t>\n\t\t\t\t\t<FontAwesomeIcon icon={faCaretLeft}/>\n\t\t\t\t</button>\n\t\t\t\t<button\n\t\t\t\t\ttitle=\"Forward\"\n\t\t\t\t\ttabIndex={0}\n\t\t\t\t\tclassName={styles.IconButton}\n\t\t\t\t\tonClick={() => { redo(); }}\n\t\t\t\t\tdisabled={!redoAvailable}\n\t\t\t\t>\n\t\t\t\t\t<FontAwesomeIcon icon={faCaretRight}/>\n\t\t\t\t</button>\n\t\t\t\t<button\n\t\t\t\t\ttitle=\"Reload\"\n\t\t\t\t\ttabIndex={0}\n\t\t\t\t\tclassName={styles.IconButton}\n\t\t\t\t\tonClick={reload}\n\t\t\t\t>\n\t\t\t\t\t<FontAwesomeIcon icon={faRotateRight}/>\n\t\t\t\t</button>\n\t\t\t\t<button\n\t\t\t\t\ttitle=\"Home\"\n\t\t\t\t\ttabIndex={0}\n\t\t\t\t\tclassName={styles.IconButton}\n\t\t\t\t\tonClick={() => { updateUrl(HOME_URL); }}\n\t\t\t\t>\n\t\t\t\t\t<FontAwesomeIcon icon={faHome}/>\n\t\t\t\t</button>\n\t\t\t\t<input\n\t\t\t\t\tvalue={input}\n\t\t\t\t\ttype=\"text\"\n\t\t\t\t\taria-label=\"Search bar\"\n\t\t\t\t\tclassName={styles.SearchBar}\n\t\t\t\t\ttabIndex={0}\n\t\t\t\t\tonChange={onInputChange as unknown as ChangeEventHandler}\n\t\t\t\t\tonKeyDown={onKeyDown as unknown as KeyboardEventHandler}\n\t\t\t\t/>\n\t\t\t</div>\n\t\t\t<div className={styles.Bookmarks}>\n\n\t\t\t</div>\n\t\t</div>\n\t\t<WebView ref={ref} source={url} title=\"Browser\" focus={focus}/>\n\t</div>);\n}","import { App, AppsConfig, Vector2 } from \"@prozilla-os/core\";\nimport { Browser, BrowserProps } from \"./components/Browser\";\n\nconst browser = new App<BrowserProps>(\"Browser\", \"browser\", Browser, { size: new Vector2(700, 500) })\n\t.setIconUrl(\"https://os.prozilla.dev/assets/apps/icons/browser.svg\")\n\t.setRole(AppsConfig.APP_ROLES.browser)\n\t.setCategory(\"Utilities & tools\");\nbrowser.setMetadata({ name: \"@prozilla-os/browser\", version: \"1.1.17\", author: \"Prozilla\" });\n\n\nexport { browser };"],"names":["HOME_URL","SEARCH_URL","Browser","startUrl","focus","url","setUrl","useState","input","setInput","history","pushState","stateIndex","undo","redo","undoAvailable","redoAvailable","useHistory","ref","useRef","useEffect","reload","updateUrl","newUrl","onInputChange","event","onKeyDown","value","isValidUrl","jsxs","styles","jsx","FontAwesomeIcon","faCaretLeft","faCaretRight","faRotateRight","faHome","WebView","browser","App","Vector2","AppsConfig"],"mappings":"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"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prozilla-os/browser",
|
|
3
3
|
"description": "A ProzillaOS application for browsing the internet.",
|
|
4
|
-
"version": "1.1.
|
|
4
|
+
"version": "1.1.18",
|
|
5
5
|
"homepage": "https://os.prozilla.dev/browser",
|
|
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.13"
|
|
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.10"
|
|
34
34
|
},
|
|
35
35
|
"files": [
|
|
36
36
|
"dist"
|