@prozilla-os/core
TypeScript icon, indicating that this package has built-in type declarations

1.3.11 • Public • Published

ProzillaOS

License Stars Forks NPM Version

About

@prozilla-os/core is a React Vite component library written in TypeScript for building web-based operating systems, made by Prozilla.

Installation

npm install @prozilla-os/core
yarn add @prozilla-os/core
pnpm add @prozilla-os/core

Usage

Basic setup

import { Desktop, ModalsView, ProzillaOS, Taskbar, WindowsView } from "@prozilla-os/core";

function App() {
  return (
    <ProzillaOS systemName="Example" tagLine="Powered by ProzillaOS">
      <Taskbar/>
      <WindowsView/>
      <ModalsView/>
      <Desktop/>
    </ProzillaOS>
  );
}

Configuration

interface ProzillaOSProps {

  systemName: string,

  tagLine: string,

  skin: new Skin({

    appIcons: Record<number, string> | undefined,

 appNames: Record<number, string> | undefined,

 wallpapers: string[],

 defaultWallpaper: string,

 fileIcons: {
  generic: string;
  info: string | undefined;
  text: string | undefined;
  code: string | undefined;
 },

 folderIcons: {
  generic: string;
  images: string | undefined;
  text: string | undefined;
  link: string | undefined;
 },

 loadStyleSheet: () => void | undefined

  })

  config: {
    apps: new AppsConfig({

      apps: App[]

    }),
    desktop: new DesktopConfig({

      /**
       * @default 1
       */
      defaultIconSize: 0 | 1 | 2,

      /**
       * 0: vertical, 1: horizontal
       * @default 0
       * */
      defaultIconDirection: 0 | 1

    }),
 misc: new MiscConfig({

      /**
    * @default 250
    */
   doubleClickDelay: number

 })
    modals: new ModalsConfig({

      /**
       * Default size of a dialog box
       * @default new Vector2(400, 200)
       */
      defaultDialogSize: Vector2,

      /**
       * Default size of a file selector
       * @default new Vector2(700, 400)
       */
      defaultFileSelectorSize: Vector2

    }),
    taskbar: new TaskbarConfig({

      /**
       * Height of the taskbar in CSS pixels
       * @default 3 * 16
       */
      height: number

    }),
    tracking: new TrackingConfig({

      /**
       * Enable tracking
       * @default true
      */
      enabled: boolean,

      /** Google Analytics measurement ID */
      GAMeasurementId: string

    }),
    windows: new WindowsConfig({

      /**
       * @default 32
       */
      screenMargin: number,

      /**
       * @default "-"
       */
      titleSeparator: string,

      /**
       * If the user's screen is smaller than these values, windows will always be maximized
       * @default new Vector2(350, 350)
       */
      minScreenSize: Vector2

    })
  }

}

Links

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.3.114latest

Version History

VersionDownloads (Last 7 Days)Published
1.3.114
1.3.100
1.3.90
1.3.82
1.3.712
1.3.60
1.3.50
1.3.41
1.3.31
1.3.29
1.3.10
1.3.00
1.2.40
1.2.30
1.2.20
1.2.10
1.2.00
1.1.20
1.1.10
1.1.00
1.0.160
1.0.150
1.0.140
1.0.130
1.0.120
1.0.110
1.0.100
1.0.90
1.0.80
1.0.70

Package Sidebar

Install

npm i @prozilla-os/core

Weekly Downloads

29

Version

1.3.11

License

MIT

Unpacked Size

5.37 MB

Total Files

6

Last publish

Collaborators

  • prozilla