-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #20 from dragonrealms-phoenix/grid-layout
New Grid System, Sidebars, PubSub, and much more
- Loading branch information
Showing
96 changed files
with
7,511 additions
and
4,311 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
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
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,10 @@ | ||
export interface Account { | ||
accountName: string; | ||
accountPassword: string; | ||
} | ||
|
||
export interface Character { | ||
accountName: string; | ||
characterName: string; | ||
gameCode: string; | ||
} |
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
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
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
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,18 @@ | ||
import { describe, expect, it } from 'vitest'; | ||
import { isBlank } from '../is-blank.js'; | ||
|
||
describe('is-blank', () => { | ||
it.each([undefined, null, '', ' ', '\n'])( | ||
'returns true when string is `%s`q', | ||
async (text: null | undefined | string) => { | ||
expect(isBlank(text)).toBe(true); | ||
} | ||
); | ||
|
||
it.each(['a', ' a', 'a ', ' a '])( | ||
'returns false when string is `%s`', | ||
async (text: string) => { | ||
expect(isBlank(text)).toBe(false); | ||
} | ||
); | ||
}); |
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,18 @@ | ||
import { describe, expect, it } from 'vitest'; | ||
import { isEmpty } from '../is-empty.js'; | ||
|
||
describe('is-empty', () => { | ||
it.each([undefined, null, ''])( | ||
'returns true when string is `%s`', | ||
async (text: null | undefined | string) => { | ||
expect(isEmpty(text)).toBe(true); | ||
} | ||
); | ||
|
||
it.each(['a', ' a', 'a ', ' a ', ' ', '\n'])( | ||
'returns false when string is `%s`', | ||
async (text: string) => { | ||
expect(isEmpty(text)).toBe(false); | ||
} | ||
); | ||
}); |
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,14 @@ | ||
import { isEmpty } from './is-empty.js'; | ||
|
||
/** | ||
* Returns true if the text is undefined, null, or is empty when trimmed. | ||
* Whitespace characters are ignored. | ||
* | ||
* We use a type guard in result to hint that if this function returns false | ||
* then the value cannot be null or undefined. | ||
*/ | ||
export const isBlank = ( | ||
text: string | null | undefined | ||
): text is null | undefined => { | ||
return isEmpty(text?.trim()); | ||
}; |
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,12 @@ | ||
/** | ||
* Returns true if the text is undefined, null, or empty string (''). | ||
* Whitespace characters are considered non-empty. | ||
* | ||
* We use a type guard in result to hint that if this function returns false | ||
* then the value cannot be null or undefined. | ||
*/ | ||
export const isEmpty = ( | ||
text: string | null | undefined | ||
): text is null | undefined => { | ||
return !text || text === ''; | ||
}; |
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
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
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
Oops, something went wrong.