Merge remote-tracking branch 'template/main'
This commit is contained in:
commit
b51c1dfaef
5 changed files with 66 additions and 23 deletions
41
CHANGELOG.md
41
CHANGELOG.md
|
@ -6,6 +6,47 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
|
||||
## [Unreleased]
|
||||
|
||||
## [0.5.1] - 2022-07-17
|
||||
### Added
|
||||
- Notif component that displays a jumping exclamation point
|
||||
- showAmount boolean to buyable displays
|
||||
- Tab families now take option to style the tab buttons container
|
||||
- Utility for creating text of a certain color
|
||||
### Changed
|
||||
- Improved typing of player.layers
|
||||
- Improved typing of createCollapsibleModifierSections's parameters
|
||||
- Made Particles vue component typed as GenericComponent due to issues generating documentation
|
||||
- Minimized how much of pixi.js is included in the built site
|
||||
- Split bundles into smaller bundles for faster loading
|
||||
- Updated TypeScript
|
||||
- Descriptions on buyables are now optional
|
||||
- Improved tooltips performance
|
||||
- Improved how MainDisplay displays effect strings
|
||||
- MainDisplays are now sticky
|
||||
- processComputable now binds uncached functions as well
|
||||
### Fixed
|
||||
- trackResetTime stopped working once its layer was removed and re-added
|
||||
- Runtime compilation was disabled in vite config
|
||||
- Websites had to be hosted on root directory to have assets load correctly
|
||||
- Tooltips' persistent ref was lazily created
|
||||
- In some situations Links would not update its bounding rect
|
||||
- Achievements' and milestones' onComplete callbacks were firing on load
|
||||
- Processed JSXFunctions were not considered coercable components by isCoercableComponent
|
||||
- Error from passing in overlay text to bar component
|
||||
### Removed
|
||||
- lodash.cloneDeep dependency, which hasn't been used in awhile
|
||||
- Some unused configs from vue-cli-service
|
||||
### Documented
|
||||
- Update vitepress, and updated the content of many pages
|
||||
- Rest of /game
|
||||
- Rest of /data
|
||||
- layers.tsx
|
||||
- Any type augmentations to Window object
|
||||
- Various cleanup of docs comments
|
||||
- Fixed doc generation being broken from switch to vite
|
||||
### Tests
|
||||
- Switched from jest to vitest
|
||||
|
||||
## [0.5.0] - 2022-06-27
|
||||
### Added
|
||||
- Projects now cache for offline play, and show notification when an update is available
|
||||
|
|
4
package-lock.json
generated
4
package-lock.json
generated
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "profectus",
|
||||
"version": "0.5.0",
|
||||
"version": "0.5.1",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "profectus",
|
||||
"version": "0.5.0",
|
||||
"version": "0.5.1",
|
||||
"dependencies": {
|
||||
"@pixi/app": "^6.4.2",
|
||||
"@pixi/core": "^6.4.2",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "profectus",
|
||||
"version": "0.5.0",
|
||||
"version": "0.5.1",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"start": "vite",
|
||||
|
|
|
@ -232,28 +232,30 @@ export function createLayerTreeNode<T extends LayerTreeNodeOptions>(
|
|||
}) as unknown as LayerTreeNode<T>;
|
||||
}
|
||||
|
||||
/** An option object for a modifier display as a single section. **/
|
||||
export interface Section {
|
||||
/** The header for this modifier. **/
|
||||
title: string;
|
||||
/** A subtitle for this modifier, e.g. to explain the context for the modifier. **/
|
||||
subtitle?: string;
|
||||
/** The modifier to be displaying in this section. **/
|
||||
modifier: WithRequired<Modifier, "description">;
|
||||
/** The base value being modified. **/
|
||||
base?: Computable<DecimalSource>;
|
||||
/** The unit of measurement for the base. **/
|
||||
unit?: string;
|
||||
/** The label to call the base amount. Defaults to "Base". **/
|
||||
baseText?: Computable<CoercableComponent>;
|
||||
/** Whether or not this section should be currently visible to the player. **/
|
||||
visible?: Computable<boolean>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Takes an array of modifier "sections", and creates a JSXFunction that can render all those sections, and allow each section to be collapsed.
|
||||
* Also returns a list of persistent refs that are used to control which sections are currently collapsed.
|
||||
* @param sections An array of options objects for each section to display.
|
||||
* @param sections.title The header for this modifier.
|
||||
* @param sections.subtitle A subtitle for this modifier, e.g. to explain the context for the modifier.
|
||||
* @param sections.modifier The modifier to be displaying in this section.
|
||||
* @param sections.base The base value being modified.
|
||||
* @param sections.unit The unit of measurement for the base.
|
||||
* @param sections.baseText The label to call the base amount.
|
||||
* @param sections.visible Whether or not this section should be currently visible to the player.
|
||||
*/
|
||||
export function createCollapsibleModifierSections(
|
||||
sections: {
|
||||
title: string;
|
||||
subtitle?: string;
|
||||
modifier: WithRequired<Modifier, "description">;
|
||||
base?: Computable<DecimalSource>;
|
||||
unit?: string;
|
||||
baseText?: Computable<CoercableComponent>;
|
||||
visible?: Computable<boolean>;
|
||||
}[]
|
||||
sections: Section[]
|
||||
): [JSXFunction, Persistent<boolean>[]] {
|
||||
const processedBase = sections.map(s => convertComputable(s.base));
|
||||
const processedBaseText = sections.map(s => convertComputable(s.baseText));
|
||||
|
@ -314,6 +316,6 @@ export function createCollapsibleModifierSections(
|
|||
* @param textToColor The content to change the color of
|
||||
* @param color The color to change the content to look like. Defaults to the current theme's accent 2 variable.
|
||||
*/
|
||||
export function colorText(textToColor: string, color = "var(--accent2)"): string {
|
||||
return `<span style="color: ${color}">${textToColor}</span>`;
|
||||
export function colorText(textToColor: string, color = "var(--accent2)"): JSX.Element {
|
||||
return <span style={{ color }}>${textToColor}</span>;
|
||||
}
|
||||
|
|
|
@ -42,7 +42,7 @@ export type Player = ProxiedWithState<PlayerData>;
|
|||
/** A layer's save data. Automatically unwraps refs. */
|
||||
export type LayerData<T> = {
|
||||
[P in keyof T]?: T[P] extends (infer U)[]
|
||||
? LayerData<U>[]
|
||||
? Record<string, LayerData<U>>
|
||||
: T[P] extends Record<string, never>
|
||||
? never
|
||||
: T[P] extends Ref<infer S>
|
||||
|
|
Loading…
Reference in a new issue