-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
255 additions
and
57 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
26 changes: 26 additions & 0 deletions
26
src/api/services/figma/nodes/has-only-valid-blend-modes.ts
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,26 @@ | ||
// import { type FigmaNode, type FigmaPaint } from '~types/figma.ts'; | ||
// import { isEmpty, notEmpty } from '~utils/not-empty.ts'; | ||
// | ||
// // PLUS_LIGHTER is LINEAR_DODGE | ||
// // PLUS_DARKER is LINEAR_BURN | ||
// const unprocessedBlendModes = ['LINEAR_BURN', 'LINEAR_DODGE']; | ||
// | ||
// const isVisibleSolidFill = (fill: FigmaPaint): boolean => | ||
// fill.visible === true && | ||
// (notEmpty(fill.opacity) ? fill.opacity > 0 : true) && | ||
// fill.type === 'SOLID'; | ||
// | ||
// const hasValidBlendMode = (fill: FigmaPaint): boolean => { | ||
// if (isEmpty(fill.blendMode)) return true; | ||
// | ||
// return !unprocessedBlendModes.includes(fill.blendMode); | ||
// }; | ||
// | ||
// export const hasOnlyValidBlendModes = (nodes: FigmaNode[]): boolean => | ||
// nodes.every( | ||
// (node) => | ||
// node.fills | ||
// .filter((fill) => isVisibleSolidFill(fill)) | ||
// .every(hasValidBlendMode) && | ||
// !unprocessedBlendModes.includes(node.blendMode) | ||
// ); |
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
15 changes: 15 additions & 0 deletions
15
src/ui/components/UnprocessedBlendModesSelectionMessage.tsx
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,15 @@ | ||
import layersImage from '~ui/assets/[email protected]'; | ||
import { type ReactElement } from 'react'; | ||
|
||
export const UnprocessedBlendModesSelectionMessage = (): ReactElement => { | ||
return ( | ||
<p | ||
style={{ | ||
backgroundImage: `url(${layersImage})`, | ||
}} | ||
className="mx-auto flex h-[200px] w-[250px] select-none items-end justify-center bg-[length:180px_180px] bg-center bg-no-repeat pt-2 text-center font-martianMono text-xxs text-secondary-75" | ||
> | ||
The blending modes Plus Lighter and Plus Darker are not supported | ||
</p> | ||
); | ||
}; |
Oops, something went wrong.