-
Notifications
You must be signed in to change notification settings - Fork 26
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
22 changed files
with
94 additions
and
165 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -2,4 +2,4 @@ | |
"penpot-exporter": minor | ||
--- | ||
|
||
Support for color libraries | ||
Rework remote components |
This file was deleted.
Oops, something went wrong.
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 was deleted.
Oops, something went wrong.
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,12 +1,9 @@ | ||
import { ComponentShape } from '@ui/lib/types/shapes/componentShape'; | ||
import { ComponentProperty } from '@ui/types'; | ||
|
||
import { RemoteComponentsLibrary } from './RemoteComponents'; | ||
|
||
export const textStyles: Map<string, TextStyle | undefined> = new Map(); | ||
export const paintStyles: Map<string, PaintStyle | undefined> = new Map(); | ||
export const overrides: Map<string, NodeChangeProperty[]> = new Map(); | ||
export const images: Map<string, Image | null> = new Map(); | ||
export const components: Map<string, ComponentShape> = new Map(); | ||
export const componentProperties: Map<string, ComponentProperty> = new Map(); | ||
export const remoteComponents = new RemoteComponentsLibrary(); |
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 |
---|---|---|
@@ -1,2 +1,4 @@ | ||
export * from './translatePaintStyle'; | ||
export * from './translateStyleName'; | ||
export * from './translateStylePath'; | ||
export * from './translateTextStyle'; |
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,9 @@ | ||
export const translateStyleName = (figmaStyle: BaseStyle): string => { | ||
const splitName = figmaStyle.name.split('/'); | ||
|
||
if (splitName.length > 0) { | ||
return splitName.pop() as string; | ||
} | ||
|
||
return figmaStyle.name; | ||
}; |
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 @@ | ||
export const translateStylePath = (figmaStyle: BaseStyleMixin) => { | ||
const path = []; | ||
|
||
if (figmaStyle.remote) { | ||
path.push('Remote'); | ||
} | ||
|
||
if (figmaStyle.name.includes('/')) { | ||
const pathParts = figmaStyle.name.split('/'); | ||
pathParts.pop(); | ||
|
||
path.push(...pathParts); | ||
} | ||
|
||
return path.join(' / '); | ||
}; |
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.