-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
29 changed files
with
680 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"README": { | ||
"display": "hidden" | ||
}, | ||
"ions": "Ions", | ||
"atoms": "Atoms", | ||
"molecules": "Molecules", | ||
"organisms": "Organisms" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,7 @@ | ||
{ | ||
"README": { | ||
"display": "hidden" | ||
}, | ||
"classes": "Classes", | ||
"interfaces": "Interfaces" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
{ | ||
"README": { | ||
"display": "hidden" | ||
}, | ||
"enums": "Enums" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
{ | ||
"README": "Overview" | ||
"README": { | ||
"display": "hidden" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
{ | ||
"README": "Overview" | ||
"README": { | ||
"display": "hidden" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
{ | ||
"README": "Overview" | ||
"README": { | ||
"display": "hidden" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
{ | ||
"README": "Overview" | ||
"README": { | ||
"display": "hidden" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
{ | ||
"README": "Overview" | ||
"README": { | ||
"display": "hidden" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,7 @@ | ||
{ | ||
"README": { | ||
"display": "hidden" | ||
}, | ||
"ions": "Ions", | ||
"atoms": "Atoms", | ||
"molecules": "Molecules", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
import { Tabs } from 'nextra/components' | ||
|
||
# Create Captain App | ||
|
||
`create-captain-app` is a command-line utility designed to streamline the process of creating applications using Captain, an Electron app framework. It enables users to generate projects from a variety of customizable templates that can be exported as static websites, supporting a wide range of web technologies. | ||
|
||
## Features | ||
|
||
- **Versatility**: Supports multiple front-end frameworks, including Next.js, Svelte, Vue.js, and basic HTML + CSS. | ||
- **Simplicity**: Allows easy project generation with a single command, akin to `create-react-app` or `create-next-app`. | ||
- **Template-based**: Offers a selection of templates to kick-start your project, each customizable to meet specific needs. | ||
|
||
## Prerequisites | ||
|
||
- **Node.js**: Version 20 or later must be installed on your system. | ||
- **Git**: Required for version control. | ||
|
||
## Usage | ||
|
||
To create a new Captain application, specify the name of your app and optionally, a template URL: | ||
|
||
<Tabs items={["npm", "yarn", "pnpm"]}> | ||
<Tabs.Tab> | ||
```shell | ||
npx create-captain-app@latest [app-name] [--template 'template-url'] | ||
``` | ||
</Tabs.Tab> | ||
<Tabs.Tab> | ||
```shell | ||
yarn create captain-app [app-name] [--template 'template-url'] | ||
``` | ||
</Tabs.Tab> | ||
<Tabs.Tab> | ||
```shell | ||
pnpm create captain-app [app-name] [--template 'template-url'] | ||
``` | ||
</Tabs.Tab> | ||
</Tabs> | ||
|
||
### Default Settings | ||
|
||
- **App Name**: If not specified, `create-captain-app` defaults to using "my-captain-app" as the project name. | ||
- **Template**: If no template URL is provided, the default Next.js template for Captain will be used. | ||
|
||
### Template Selection | ||
|
||
Specify any GitHub repository URL hosting a Captain-compatible template to use: | ||
|
||
<Tabs items={["npm", "yarn", "pnpm"]}> | ||
<Tabs.Tab> | ||
```shell | ||
npx create-captain-app@latest my-vue-app --template https://github.com/some-user/some-captain-vue-template | ||
``` | ||
</Tabs.Tab> | ||
<Tabs.Tab> | ||
```shell | ||
yarn create captain-app my-vue-app --template https://github.com/some-user/some-captain-vue-template | ||
``` | ||
</Tabs.Tab> | ||
<Tabs.Tab> | ||
```shell | ||
pnpm create captain-app my-vue-app --template https://github.com/some-user/some-captain-vue-template | ||
``` | ||
</Tabs.Tab> | ||
</Tabs> | ||
|
||
|
||
## Creating Custom Templates | ||
|
||
To develop a custom template, ensure your project aligns with Captain requirements and can be exported as a static site. Consult the [default starter app](https://github.com/blib-la/captain-starter-app) for setup guidance. | ||
|
||
## Configuring Your Project | ||
|
||
After project setup, adjust the metadata in the `captain.md` file to match your project specifics. This file uses YAML frontmatter for configuration: | ||
|
||
- **Preserve the Default ID**: The initial `id` matches the `packageJson.name` and is uniquely set by our CLI. We recommend keeping the default settings to avoid conflicts. | ||
|
||
## Building Your App | ||
|
||
Depending on your chosen template, begin by modifying the source files. For example, our Next.js starter app features a simple random cat generator powered by Stable Diffusion XL (SDXL). | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
import { Tabs } from 'nextra/components' | ||
|
||
# @captn/joy | ||
|
||
The `@captn/joy` package provides a suite of UI components and utilities that facilitate building attractive and consistent interfaces for applications within the Captain framework. Built on top of the MUI Joy library, it extends and customizes its components to fit the specific needs of Captain applications, ensuring seamless integration and enhanced user experiences. | ||
|
||
## Features | ||
|
||
- **Theme Customization**: Extends MUI Joy's theme capabilities to include custom colors and styles specific to the Captain ecosystem. | ||
- **App Frame**: Provides a structured container for application interfaces, integrating essential UI components such as title bars. | ||
- **Title Bar**: Customizable title bar component with window control actions (minimize, maximize, close). | ||
- **Custom Scrollbars**: Enhances the default scrollbar appearance for a more consistent and appealing look across platforms. | ||
|
||
## Installation | ||
|
||
To add the `@captn/joy` package to your project, run the following command: | ||
|
||
<Tabs items={["npm", "yarn", "pnpm"]}> | ||
<Tabs.Tab> | ||
```shell | ||
npm install @captn/joy | ||
``` | ||
</Tabs.Tab> | ||
<Tabs.Tab> | ||
```shell | ||
yarn add @captn/joy | ||
``` | ||
</Tabs.Tab> | ||
<Tabs.Tab> | ||
```shell | ||
pnpm add @captn/joy | ||
``` | ||
</Tabs.Tab> | ||
</Tabs> | ||
|
||
## Usage | ||
|
||
### Theme Customization | ||
|
||
`@captn/joy` extends MUI Joy's theme with additional colors and utility functions for more dynamic theming capabilities. | ||
|
||
```javascript | ||
import { ThemeProvider } from '@captn/joy'; | ||
|
||
function MyApp() { | ||
return ( | ||
<ThemeProvider> | ||
{/* Your component tree */} | ||
</ThemeProvider> | ||
); | ||
} | ||
``` | ||
|
||
### App Frame and Title Bar | ||
|
||
Embed your application within an `AppFrame` and include a `TitleBar` to handle window controls seamlessly and display your app title. | ||
|
||
```tsx | ||
import { AppFrame, TitleBar } from '@captn/joy'; | ||
|
||
function MyApplication() { | ||
return ( | ||
<AppFrame titleBar={<TitleBar>My Custom App</TitleBar>}> | ||
{/* Content of your application */} | ||
</AppFrame> | ||
); | ||
} | ||
``` | ||
|
||
### Custom Scrollbars | ||
|
||
Use the `CustomScrollbars` component to apply consistent scrollbars throughout your application. | ||
|
||
```tsx | ||
import { CustomScrollbars } from '@captn/joy'; | ||
|
||
function MyScrollableComponent() { | ||
return ( | ||
<CustomScrollbars> | ||
{/* Scrollable content here */} | ||
</CustomScrollbars> | ||
); | ||
} | ||
``` | ||
|
||
### Required Downloads | ||
|
||
Use the `RequiredDownloads` to show a note about required resources that need to be downloaded. | ||
|
||
|
||
```tsx | ||
import { RequiredDownloads } from "@captn/joy/required-downloads"; | ||
|
||
import models from "./models.json"; | ||
|
||
export default function App() { | ||
return ( | ||
<div> | ||
<RequiredDownloads allRequiredDownloads={models} /> | ||
{/* Rest of the application */} | ||
</div> | ||
); | ||
} | ||
``` | ||
|
||
## Versioning | ||
|
||
We use [SemVer](http://semver.org/) for versioning. For the versions available, see the tags on this repository. |
Oops, something went wrong.