Skip to content

Commit

Permalink
Updated pixel skin shadows + updated windowOptions
Browse files Browse the repository at this point in the history
  • Loading branch information
Prozilla committed Oct 30, 2024
1 parent fa0328f commit 45bacb3
Show file tree
Hide file tree
Showing 44 changed files with 174 additions and 62 deletions.
Binary file modified docs/src/public/screenshots/skins/pixel.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions docs/src/reference/core/classes/apps/app.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Applications can be installed by adding them to the `apps` array in [`AppsConfig
- **windowContent**
- **Type:** `React.FC<AppProps>`
- **windowOptions**
- **Type:** `WindowOptions | undefined`
- **Type:** `(Partial<AppProps> & WindowOptions) | undefined`

```ts
interface WindowOptions {
Expand Down Expand Up @@ -69,7 +69,7 @@ React component that renders this app inside a window when the app is running

Default options that get passed to the `windowContent` component

- **Type:** `WindowOptions`
- **Type:** `(Partial<AppProps> & WindowOptions) | undefined`

```ts
interface WindowOptions {
Expand Down
8 changes: 4 additions & 4 deletions docs/src/reference/skins/classes/skin.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ A skin inspired by the MacOS interface

![Preview of the MacOS skin](/screenshots/skins/mac.png)

#### Example
#### Usage

```tsx
// App.tsx
Expand Down Expand Up @@ -178,7 +178,7 @@ A minimalistic skin with monochrome icons

![Preview of the minimalistic skin](/screenshots/skins/minimal.png)

#### Example
#### Usage

```tsx
// App.tsx
Expand Down Expand Up @@ -208,7 +208,7 @@ A skin inspired by the Windows95 interface

![Preview of the Windows95 skin](/screenshots/skins/windows95.png)

#### Example
#### Usage

```tsx
// App.tsx
Expand Down Expand Up @@ -238,7 +238,7 @@ A pixelated skin with pixel art

![Preview of the Pixel skin](/screenshots/skins/pixel.png)

#### Example
#### Usage

```tsx
// App.tsx
Expand Down
7 changes: 7 additions & 0 deletions packages/apps/app-center/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @prozilla-os/app-center

## 1.0.8

### Patch Changes

- Updated dependencies
- @prozilla-os/core@1.3.10

## 1.0.7

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/apps/app-center/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@prozilla-os/app-center",
"description": "A ProzillaOS application for browsing and installing applications.",
"version": "1.0.7",
"version": "1.0.8",
"homepage": "https://os.prozilla.dev/app-center",
"author": {
"name": "Prozilla",
Expand Down
7 changes: 7 additions & 0 deletions packages/apps/browser/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @prozilla-os/browser

## 1.1.15

### Patch Changes

- Updated dependencies
- @prozilla-os/core@1.3.10

## 1.1.14

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/apps/browser/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@prozilla-os/browser",
"description": "A ProzillaOS application for browsing the internet.",
"version": "1.1.14",
"version": "1.1.15",
"homepage": "https://os.prozilla.dev/browser",
"author": {
"name": "Prozilla",
Expand Down
7 changes: 7 additions & 0 deletions packages/apps/calculator/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @prozilla-os/calculator

## 1.1.15

### Patch Changes

- Updated dependencies
- @prozilla-os/core@1.3.10

## 1.1.14

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/apps/calculator/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@prozilla-os/calculator",
"description": "A ProzillaOS application for making basic calculations.",
"version": "1.1.14",
"version": "1.1.15",
"homepage": "https://os.prozilla.dev/calculator",
"author": {
"name": "Prozilla",
Expand Down
7 changes: 7 additions & 0 deletions packages/apps/file-explorer/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @prozilla-os/file-explorer

## 1.1.15

### Patch Changes

- Updated dependencies
- @prozilla-os/core@1.3.10

## 1.1.14

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/apps/file-explorer/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@prozilla-os/file-explorer",
"description": "A standard ProzillaOS application for browsing files.",
"version": "1.1.14",
"version": "1.1.15",
"homepage": "https://os.prozilla.dev/file-explorer",
"author": {
"name": "Prozilla",
Expand Down
7 changes: 7 additions & 0 deletions packages/apps/logic-sim/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @prozilla-os/logic-sim

## 1.1.15

### Patch Changes

- Updated dependencies
- @prozilla-os/core@1.3.10

## 1.1.14

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/apps/logic-sim/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@prozilla-os/logic-sim",
"description": "A ProzillaOS application for simulating digital logic.",
"version": "1.1.14",
"version": "1.1.15",
"homepage": "https://os.prozilla.dev/logic-sim",
"author": {
"name": "Prozilla",
Expand Down
7 changes: 7 additions & 0 deletions packages/apps/media-viewer/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @prozilla-os/media-viewer

## 1.1.15

### Patch Changes

- Updated dependencies
- @prozilla-os/core@1.3.10

## 1.1.14

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/apps/media-viewer/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@prozilla-os/media-viewer",
"description": "A ProzillaOS application for viewing different kinds of media.",
"version": "1.1.14",
"version": "1.1.15",
"homepage": "https://os.prozilla.dev/media-viewer",
"author": {
"name": "Prozilla",
Expand Down
9 changes: 9 additions & 0 deletions packages/apps/settings/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# @prozilla-os/settings

## 1.1.15

### Patch Changes

- Updated dependencies
- @prozilla-os/skins@1.1.8
- @prozilla-os/core@1.3.10
- @prozilla-os/file-explorer@1.1.15

## 1.1.14

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/apps/settings/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@prozilla-os/settings",
"description": "A settings app for ProzillaOS.",
"version": "1.1.14",
"version": "1.1.15",
"homepage": "https://os.prozilla.dev/settings",
"author": {
"name": "Prozilla",
Expand Down
8 changes: 8 additions & 0 deletions packages/apps/terminal/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# @prozilla-os/terminal

## 1.1.16

### Patch Changes

- Updated dependencies
- @prozilla-os/skins@1.1.8
- @prozilla-os/core@1.3.10

## 1.1.15

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/apps/terminal/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@prozilla-os/terminal",
"description": "A terminal/shell application for ProzillaOS.",
"version": "1.1.15",
"version": "1.1.16",
"homepage": "https://os.prozilla.dev/terminal",
"author": {
"name": "Prozilla",
Expand Down
7 changes: 7 additions & 0 deletions packages/apps/text-editor/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @prozilla-os/text-editor

## 1.1.15

### Patch Changes

- Updated dependencies
- @prozilla-os/core@1.3.10

## 1.1.14

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/apps/text-editor/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@prozilla-os/text-editor",
"description": "A text editor application for ProzillaOS.",
"version": "1.1.14",
"version": "1.1.15",
"homepage": "https://os.prozilla.dev/text-editor",
"author": {
"name": "Prozilla",
Expand Down
13 changes: 13 additions & 0 deletions packages/core/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# @prozilla-os/core

## 1.3.10

### Patch Changes

- `@prozilla-os/core`

- Updated windowOptions for apps
`@prozilla-os/skins`
- Updated shadows for pixel skin

- Updated dependencies
- @prozilla-os/skins@1.1.8

## 1.3.9

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@prozilla-os/core",
"description": "A React component library written in TypeScript for building web-based operating systems, made by Prozilla.",
"version": "1.3.9",
"version": "1.3.10",
"homepage": "https://os.prozilla.dev",
"author": {
"name": "Prozilla",
Expand Down
17 changes: 8 additions & 9 deletions packages/core/src/components/prozilla-os/ProzillaOS.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import { ModalsConfig, ModalsConfigOptions } from "../../features/system/configs
import { TaskbarConfig, TaskbarConfigOptions } from "../../features/system/configs/taskbarConfig";
import { TrackingConfig, TrackingConfigOptions } from "../../features/system/configs/trackingConfig";
import { WindowsConfig, WindowsConfigOptions } from "../../features/system/configs/windowsConfig";
import { OptionalInterface } from "../../types/utils";
import { TrackingManagerProvider } from "../../hooks/tracking/trackingManagerProvider";
import { VirtualDriveConfig, VirtualDriveConfigOptions } from "../../features/system/configs/virtualDriveConfig";
import { Main } from "./Main";
Expand All @@ -24,14 +23,14 @@ export interface ProzillaOSProps {
systemName?: string;
tagLine?: string;
config?: {
apps?: OptionalInterface<AppsConfigOptions>;
desktop?: OptionalInterface<DesktopConfigOptions>;
misc?: OptionalInterface<MiscConfigOptions>;
modals?: OptionalInterface<ModalsConfigOptions>;
taskbar?: OptionalInterface<TaskbarConfigOptions>;
tracking?: OptionalInterface<TrackingConfigOptions>;
windows?: OptionalInterface<WindowsConfigOptions>;
virtualDrive?: OptionalInterface<VirtualDriveConfigOptions>;
apps?: Partial<AppsConfigOptions>;
desktop?: Partial<DesktopConfigOptions>;
misc?: Partial<MiscConfigOptions>;
modals?: Partial<ModalsConfigOptions>;
taskbar?: Partial<TaskbarConfigOptions>;
tracking?: Partial<TrackingConfigOptions>;
windows?: Partial<WindowsConfigOptions>;
virtualDrive?: Partial<VirtualDriveConfigOptions>;
},
skin?: Skin;
children?: ReactNode;
Expand Down
20 changes: 15 additions & 5 deletions packages/core/src/features/apps/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ interface AppMetadata {
author: string;
}

interface WindowOptions {
size?: Vector2;
[key: string]: unknown;
}

/**
* An application that can be ran by ProzillaOS
* Applications can be installed by adding them to the `apps` array in {@link AppsConfig}
Expand All @@ -34,10 +39,7 @@ export class App<AppProps extends WindowProps = WindowProps> {
/**
* Default options that get passed to the {@link this.windowContent} component
*/
windowOptions?: {
size: Vector2;
[key: string]: unknown;
};
windowOptions?: Partial<AppProps> & WindowOptions;

/**
* Description of this application
Expand Down Expand Up @@ -91,7 +93,7 @@ export class App<AppProps extends WindowProps = WindowProps> {
isPinned?: boolean;
isInstalled = true;

constructor(name: App["name"], id: App["id"], windowContent: App<AppProps>["windowContent"], windowOptions?: App["windowOptions"]) {
constructor(name: App["name"], id: App["id"], windowContent: App<AppProps>["windowContent"], windowOptions?: Partial<AppProps> & WindowOptions) {
this.name = name;
this.id = id;
this.windowContent = windowContent;
Expand Down Expand Up @@ -198,4 +200,12 @@ export class App<AppProps extends WindowProps = WindowProps> {
this.showDesktopIcon = showDesktopIcon;
return this;
}

/**
* Changes the default options for the {@link this.windowContent} component
*/
setWindowOptions(windowOptions: Partial<AppProps> & WindowOptions): this {
this.windowOptions = windowOptions;
return this;
}
}
3 changes: 1 addition & 2 deletions packages/core/src/features/system/configs/appsConfig.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { APP_CATEGORIES } from "../../../constants/apps.const";
import { App } from "../../";
import { OptionalInterface } from "../../../types/utils";
import { WindowProps } from "../../../components";

export interface AppsConfigOptions {
Expand All @@ -23,7 +22,7 @@ export class AppsConfig {
browser: "browser",
};

constructor(options: OptionalInterface<AppsConfigOptions> = {}) {
constructor(options: Partial<AppsConfigOptions> = {}) {
const { apps } = options as AppsConfigOptions;

if (apps != null) {
Expand Down
4 changes: 1 addition & 3 deletions packages/core/src/features/system/configs/desktopConfig.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import { OptionalInterface } from "../../../types/utils";

export interface DesktopConfigOptions {
/**
* @default 1
Expand All @@ -17,7 +15,7 @@ export class DesktopConfig {
defaultIconSize: DesktopConfigOptions["defaultIconSize"];
defaultIconDirection: DesktopConfigOptions["defaultIconDirection"];

constructor(options: OptionalInterface<DesktopConfigOptions> = {}) {
constructor(options: Partial<DesktopConfigOptions> = {}) {
const { defaultIconSize, defaultIconDirection } = options as DesktopConfigOptions;

this.defaultIconSize = defaultIconSize ?? 1;
Expand Down
Loading

0 comments on commit 45bacb3

Please sign in to comment.