add some comments, bump to rc4

This commit is contained in:
Matt Hill
2023-05-03 16:09:32 -06:00
parent 9a1dd5a399
commit 0ddd35c8d7
14 changed files with 127 additions and 43 deletions

View File

@@ -2,8 +2,16 @@ import { PackagePropertyGroup } from "../types"
import { PropertyPage } from "./PropertyPage"
import { PropertyString } from "./PropertyString"
/**
* A Property Group is a list of values, separated from other property groups by a whitespace divider with an optional header
*/
export class PropertyGroup {
private constructor(readonly data: PackagePropertyGroup) {}
/**
* Returns a new Property Group with the provided options
* @param options
* @returns
*/
static of(options: {
header: string | null
values: (PropertyPage | PropertyString)[]

View File

@@ -1,8 +1,18 @@
import { PackagePropertyPage } from "../types"
import { PropertyGroup } from "./PropertyGroup"
/**
* A Property Page will display to the user as a button with a name a description.
* Clicking the button will take the user to a nested page displaying the provided
* list of Property Groups
*/
export class PropertyPage {
private constructor(readonly data: PackagePropertyPage) {}
/**
* Returns a new Property Page with the provided options
* @param options
* @returns
*/
static of(options: {
name: string
description: string | null

View File

@@ -1,8 +1,16 @@
import { PackagePropertyString } from "../types"
/**
* A Property String is an arbitrary string value to display to the user
*/
export class PropertyString {
private constructor(readonly data: PackagePropertyString) {}
static of(value: Omit<PackagePropertyString, "type" | "watch">) {
/**
* Returns a new Property String with the provided options
* @param value
* @returns
*/
static of(value: Omit<PackagePropertyString, "type">) {
return new PropertyString({
...value,
type: "string",