-
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 branch 'main' into feature/amplify-app
- Loading branch information
Showing
183 changed files
with
23,489 additions
and
45,803 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@codedazur/react-essentials": patch | ||
--- | ||
|
||
provide correct frame metrics for useUpdateLoop |
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 |
---|---|---|
|
@@ -21,4 +21,8 @@ yarn-error.log* | |
# turbo | ||
.turbo | ||
|
||
dist | ||
# ide files | ||
.idea | ||
.vscode/ | ||
|
||
dist |
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,16 @@ | ||
{ | ||
"sourceType": "unambiguous", | ||
"presets": [ | ||
[ | ||
"@babel/preset-env", | ||
{ | ||
"targets": { | ||
"chrome": 100 | ||
} | ||
} | ||
], | ||
"@babel/preset-typescript", | ||
"@babel/preset-react" | ||
], | ||
"plugins": [] | ||
} |
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,53 @@ | ||
import { Padding, Portal, Positioned } from "@codedazur/react-components"; | ||
import { FunctionComponent, useEffect, useState } from "react"; | ||
import styled from "styled-components"; | ||
import YAML, { ScalarTag } from "yaml"; | ||
import { Monospace } from "./Monospace"; | ||
|
||
interface DebugOverlayProps { | ||
value: unknown; | ||
} | ||
|
||
export const DebugOverlay: FunctionComponent<DebugOverlayProps> = ({ | ||
value, | ||
}) => { | ||
const [yaml, setYaml] = useState<string>(""); | ||
|
||
useEffect(() => { | ||
setYaml( | ||
YAML.stringify(value, { | ||
aliasDuplicateObjects: false, | ||
keepUndefined: true, | ||
customTags: [functionTag], | ||
}), | ||
); | ||
}, [value]); | ||
|
||
return ( | ||
<Portal> | ||
<DebugBox left={0} top={0}> | ||
<Padding all="1rem"> | ||
<Monospace>{yaml}</Monospace> | ||
</Padding> | ||
</DebugBox> | ||
</Portal> | ||
); | ||
}; | ||
|
||
const DebugBox = styled(Positioned).attrs({ mode: "fixed" })` | ||
pointer-events: none; | ||
font-size: smaller; | ||
line-height: 1.5em; | ||
opacity: 0.75; | ||
`; | ||
|
||
const functionTag: ScalarTag = { | ||
identify: (value: unknown): value is Function => value instanceof Function, | ||
tag: "!fn", | ||
resolve: (string) => { | ||
return new Function(string); | ||
}, | ||
stringify: (item, context) => { | ||
return "Function"; | ||
}, | ||
}; |
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 @@ | ||
import { Text } from "@codedazur/react-components"; | ||
import styled from "styled-components"; | ||
|
||
export const Monospace = styled(Text).attrs({ | ||
as: "pre", | ||
})` | ||
font-family: monospace; | ||
white-space: pre-wrap; | ||
`; |
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,9 +1,9 @@ | ||
import { App } from "@codedazur/react-components"; | ||
import { DecoratorFn } from "@storybook/react"; | ||
import { App, Background, Padding } from "@codedazur/react-components"; | ||
import { Decorator } from "@storybook/react"; | ||
import { storyTheme } from "../themes/storyTheme"; | ||
|
||
export const WithApp: DecoratorFn = (Story) => ( | ||
<App rootSelector="#root" theme={storyTheme}> | ||
export const WithApp: Decorator = (Story) => ( | ||
<App theme={storyTheme}> | ||
<Story /> | ||
</App> | ||
); |
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,16 +1,11 @@ | ||
module.exports = { | ||
stories: [ | ||
"./stories/**/*.stories.mdx", | ||
"./stories/**/*.stories.@(js|jsx|ts|tsx)", | ||
], | ||
addons: [ | ||
"@storybook/addon-links", | ||
"@storybook/addon-essentials", | ||
"@storybook/addon-actions", | ||
"@storybook/addon-interactions", | ||
], | ||
framework: "@storybook/react", | ||
core: { | ||
builder: "@storybook/builder-vite", | ||
stories: ["./stories/**/*.stories.@(js|jsx|ts|tsx)"], | ||
addons: ["@storybook/addon-essentials", "@storybook/addon-interactions"], | ||
docs: { | ||
autodocs: true, | ||
}, | ||
framework: { | ||
name: "@storybook/react-webpack5", | ||
options: {}, | ||
}, | ||
}; |
Oops, something went wrong.