Skip to content

Commit

Permalink
0.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jmesrje committed Sep 12, 2024
1 parent c4cf574 commit 3149f2d
Show file tree
Hide file tree
Showing 20 changed files with 173 additions and 22 deletions.
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ jobs:
tag_name: ${{ github.ref_name }}
name: ${{ github.ref_name }}
prerelease: ${{ contains(github.ref_name, 'rc') }}
generate_release_notes: true
body: |
## Changelog
${{ needs.bump.outputs.release-body }}
Expand Down
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# Mkdocs
venv

# Wally
Packages
DevPackages
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
[![release](https://img.shields.io/github/v/release/luminlabsdev/plugin-framework)](https://github.com/luminlabsdev/plugin-framework/releases/latest)
[![discord](https://img.shields.io/discord/1105688855375511642?logo=discord&logoColor=white&label=discord&color=4d3dff)](https://luminlabsdev.github.io/link/discord)

An extension of Lumin Framework with added plugin support and methods.
An extension of Framework with added plugin support and methods.
2 changes: 1 addition & 1 deletion dev.project.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"ReplicatedStorage": {
"Plugin": {
"$path": "Packages",
"framework": {
"pluginframework": {
"$path": "src"
},
"Test": {
Expand Down
13 changes: 13 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
hide:
- navigation
---

# Changelog

All notable changes to this project will be documented in this file.
Expand All @@ -7,6 +12,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Added

- Added new library API to create menus, toolbars, and toolbar buttons

### Changed

- Merged `Menu` library with new `Interface` library

## [0.2.0] - 2024-09-11

### Changed
Expand Down
1 change: 1 addition & 0 deletions docs/guides/creating-actions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Creating Actions
1 change: 1 addition & 0 deletions docs/guides/creating-menus.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Creating Menus
1 change: 1 addition & 0 deletions docs/guides/creating-toolbars.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Creating Toolbars
1 change: 1 addition & 0 deletions docs/guides/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Setup
1 change: 1 addition & 0 deletions docs/guides/saving-data.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Saving Data
10 changes: 10 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
hide:
- toc
- navigation
---

An extension of Framework with added plugin support and methods.

[Guides](./guides/){ .md-button .md-button--primary }
[API Reference](./api/){ .md-button }
11 changes: 8 additions & 3 deletions docs/installation.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
---
hide:
- navigation
---

# Installation

### Roblox

1. Go to the [latest releases page](https://github.com/lumin-dev/LuminPluginFramework/releases/latest)
1. Go to the [latest releases page](https://github.com/luminlabsdev/plugin-framework/releases/latest)
2. Download `Standalone.rbxm`
3. Select `Insert from file`, and find `Standalone.rbxm` in your designated downloads folder

### Wally

1. Open a project in your favorite text editor
2. Add `lumin/plugin-framework@^0.1.0` to your `wally.toml` file
3. Run `wally install` the project should be inside of your `/Packages` directory.
2. Add `lumin/plugin-framework@^0.3.0` to your `wally.toml` file
3. Run `wally install` the project should be inside of your `/Packages` directory.
79 changes: 79 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
site_name: Lumin Plugin Framework
repo_url: https://github.com/luminlabsdev/plugin-framework
repo_name: plugin-framework
copyright: Copyright © 2021 - 2024 Lumin Labs & Contributors
edit_uri: edit/main/docs/
nav:
- Home: index.md
- Guides:
- Setup: guides/index.md
- Saving Data: guides/saving-data.md
- Creating Toolbars: guides/creating-toolbars.md
- Creating Actions: guides/creating-actions.md
- Creating Menus: guides/creating-menus.md
- API: api/index.md
- Install: installation.md
- Changelog: changelog.md
markdown_extensions:
- attr_list
- pymdownx.emoji:
emoji_index: !!python/name:material.extensions.emoji.twemoji
emoji_generator: !!python/name:material.extensions.emoji.to_svg
- pymdownx.highlight:
anchor_linenums: true
line_spans: __span
pygments_lang_class: true
- pymdownx.superfences:
custom_fences:
- name: mermaid
class: mermaid
format: !!python/name:pymdownx.superfences.fence_code_format
extra:
social:
- icon: fontawesome/brands/github
link: https://github.com/luminlabsdev
- icon: fontawesome/brands/discord
link: https://luminlabsdev.github.io/link/discord
theme:
name: material
favicon: assets/images/favicon.ico
font:
text: Inter
code: JetBrains Mono
icon:
edit: material/pencil
view: material/eye
features:
- navigation.instant
- navigation.instant.progress
- navigation.tabs
- navigation.path
- navigation.top
- navigation.footer
- content.action.edit
- content.code.copy
- content.code.select
- content.tooltips
palette:

# Palette toggle for automatic mode
- media: "(prefers-color-scheme)"
toggle:
icon: material/brightness-auto
name: Switch to light mode

# Palette toggle for light mode
- media: "(prefers-color-scheme: light)"
scheme: default
primary: black
toggle:
icon: material/brightness-7
name: Switch to dark mode

# Palette toggle for dark mode
- media: "(prefers-color-scheme: dark)"
scheme: slate
primary: black
toggle:
icon: material/weather-night
name: Switch to system preference
6 changes: 3 additions & 3 deletions src/Library/Action.luau
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ local plugin: Plugin = script:FindFirstAncestorWhichIsA("Plugin")

-- Functions

local function new(
local function New(
name: string,
description: string,
icon: string,
Expand All @@ -20,5 +20,5 @@ end
-- Module

return {
new = new,
}
New = New,
}
6 changes: 3 additions & 3 deletions src/Library/Menu.luau → src/Library/Interface/Menu.luau
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
local HttpService = game:GetService("HttpService")
local plugin: Plugin = script:FindFirstAncestorWhichIsA("Plugin")

local Types = require(script.Parent.Parent.Types)
local Types = require(script.Parent.Parent.Parent.Types)

local Index = {}
Index.__index = Index
Expand Down Expand Up @@ -35,7 +35,7 @@ local function PluginMenu(name: string, children: Types.MenuChildren, icon: stri
return Menu
end

local function new(name: string, children: Types.MenuChildren, icon: string?)
local function New(name: string, children: Types.MenuChildren, icon: string?)
local self = setmetatable({
Menu = PluginMenu(name, children, icon or ""),
}, Index)
Expand All @@ -60,5 +60,5 @@ end
-- Module

return {
new = new,
New = New,
}
28 changes: 28 additions & 0 deletions src/Library/Interface/Toolbar.luau
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
-- Variables

local plugin = script:FindFirstAncestorWhichIsA("Plugin")

local Index = {}
Index.__index = Index

-- Functions

local function New(name: string)
local self = setmetatable({
Toolbar = plugin:CreateToolbar(name),
Buttons = {}
}, Index)
return self
end

function Index.Button(self: any, name: string, tooltip: string, image: string, onClick: () -> ())
local Button = self.Toolbar:CreateButton(name, tooltip, image)
Button.Click:Connect(onClick)
table.insert(self.Buttons, Button)
end

-- Module

return {
New = New,
}
5 changes: 5 additions & 0 deletions src/Library/Interface/init.luau
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
return {
Menu = require(script.Menu),
Toolbar = require(script.Toolbar),
Widget = require(script.Widget),
}
14 changes: 11 additions & 3 deletions src/init.luau
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,31 @@ local Library = script.Library

local Data = require(Library.Data)
local Action = require(Library.Action)
local Menu = require(Library.Menu)
local Interface = require(Library.Interface)

-- Module

return {
-- Framework
Start = Lumin.Start,
OnStart = Lumin.OnStart,
New = Lumin.New,
Worker = Lumin.Worker,
Load = Lumin.Load,
version = "0.2.0",
version = "0.3.0", -- Uses plugin framework version

-- Unloading
Unloading = plugin.Unloading,

-- Actions
Data = Data,
Action = Action,
Menu = Menu,

-- Interface
Menu = Interface.Menu,
Toolbar = Interface.Toolbar,
Widget = Interface.Widget,

-- Plugin
Plugin = plugin,
}
8 changes: 4 additions & 4 deletions tests/test.server.luau
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
local Framework = require(script.Parent.plugin_framework)
local Framework = require(script.Parent.pluginframework)
local Bool = Instance.new("BoolValue")

local Menu = Framework.Menu.new("TestingMenu", {
local Menu = Framework.Menu.New("TestingMenu", {
{ "ActionA", "A", "rbxasset://textures/loading/robloxTiltRed.png" },
{ "ActionB", "B", "rbxasset://textures/loading/robloxTilt.png" },
{
Expand All @@ -23,6 +23,6 @@ end)
Bool.Name = "Toggle Menu"
Bool.Parent = game

Framework.Action.new("Shortcut", "A test shortcut", "rbxasset://textures/whiteCircle.png", function()
Framework.Action.New("Shortcut", "A test shortcut", "rbxasset://textures/whiteCircle.png", function()
print("You did it!")
end)
end)
2 changes: 1 addition & 1 deletion wally.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "lumin/plugin-framework"
version = "0.2.0"
version = "0.3.0"
registry = "https://github.com/UpliftGames/wally-index"
realm = "shared"

Expand Down

0 comments on commit 3149f2d

Please sign in to comment.