-
Notifications
You must be signed in to change notification settings - Fork 7
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 #593 from tokens-studio/fix-prettier
fix prettier
- Loading branch information
Showing
32 changed files
with
1,648 additions
and
1,605 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
"@tokens-studio/graph-editor": patch | ||
"@tokens-studio/graph-engine-nodes-figma": patch | ||
"@tokens-studio/graph-engine-ui": patch | ||
--- | ||
|
||
fix prettier |
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 +1 @@ | ||
export const version = '4.3.4'; | ||
export const version = '4.3.6'; |
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,4 @@ | ||
dist | ||
docs | ||
jest-coverage | ||
node_modules |
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,11 @@ | ||
dist/** | ||
build/** | ||
coverage/** | ||
storybook-static/** | ||
.docusaurus | ||
docs | ||
site | ||
cypress | ||
cli | ||
.rollup | ||
*.md |
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,6 @@ | ||
/* eslint-disable no-undef */ | ||
/** @type {import("eslint").Linter.Config} */ | ||
module.exports = { | ||
root:true, | ||
extends: [require.resolve('@tokens-studio/eslint-config-custom')] | ||
}; |
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 @@ | ||
package.json | ||
package-lock.json | ||
dist | ||
coverage | ||
docs | ||
jest-coverage | ||
site | ||
cli | ||
.turbo | ||
.rollup.cache | ||
.rollup | ||
build | ||
storybook-static | ||
.docusaurus | ||
cypress |
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 @@ | ||
"@tokens-studio/prettier-config-custom" |
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 +1 @@ | ||
export * from "./nodes/index.js"; | ||
export * from './nodes/index.js'; |
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,82 +1,82 @@ | ||
import { | ||
INodeDefinition, | ||
Node, | ||
StringSchema, | ||
ToInput, | ||
ToOutput, | ||
} from "@tokens-studio/graph-engine"; | ||
import { SingleToken } from "@tokens-studio/types"; | ||
import { TokenSchema } from "@tokens-studio/graph-engine-nodes-design-tokens/schemas/index.js"; | ||
import { mergeTokenExtensions } from "../utils/tokenMerge.js"; | ||
INodeDefinition, | ||
Node, | ||
StringSchema, | ||
ToInput, | ||
ToOutput | ||
} from '@tokens-studio/graph-engine'; | ||
import { SingleToken } from '@tokens-studio/types'; | ||
import { TokenSchema } from '@tokens-studio/graph-engine-nodes-design-tokens/schemas/index.js'; | ||
import { mergeTokenExtensions } from '../utils/tokenMerge.js'; | ||
|
||
export default class NodeDefinition extends Node { | ||
static title = "Code Syntax"; | ||
static type = "studio.tokens.figma.codeSyntax"; | ||
static description = "Defines code syntax for different platforms in Figma"; | ||
static title = 'Code Syntax'; | ||
static type = 'studio.tokens.figma.codeSyntax'; | ||
static description = 'Defines code syntax for different platforms in Figma'; | ||
|
||
declare inputs: ToInput<{ | ||
token: SingleToken; | ||
web: string; | ||
android: string; | ||
ios: string; | ||
}>; | ||
declare outputs: ToOutput<{ | ||
token: SingleToken; | ||
}>; | ||
declare inputs: ToInput<{ | ||
token: SingleToken; | ||
web: string; | ||
android: string; | ||
ios: string; | ||
}>; | ||
declare outputs: ToOutput<{ | ||
token: SingleToken; | ||
}>; | ||
|
||
constructor(props: INodeDefinition) { | ||
super(props); | ||
constructor(props: INodeDefinition) { | ||
super(props); | ||
|
||
this.addInput("token", { | ||
type: { | ||
...TokenSchema, | ||
description: "The design token to add code syntax to", | ||
}, | ||
}); | ||
this.addInput('token', { | ||
type: { | ||
...TokenSchema, | ||
description: 'The design token to add code syntax to' | ||
} | ||
}); | ||
|
||
this.addInput("web", { | ||
type: { | ||
...StringSchema, | ||
default: "", | ||
description: "Web platform code syntax", | ||
}, | ||
}); | ||
this.addInput('web', { | ||
type: { | ||
...StringSchema, | ||
default: '', | ||
description: 'Web platform code syntax' | ||
} | ||
}); | ||
|
||
this.addInput("android", { | ||
type: { | ||
...StringSchema, | ||
default: "", | ||
description: "Android platform code syntax", | ||
}, | ||
}); | ||
this.addInput('android', { | ||
type: { | ||
...StringSchema, | ||
default: '', | ||
description: 'Android platform code syntax' | ||
} | ||
}); | ||
|
||
this.addInput("ios", { | ||
type: { | ||
...StringSchema, | ||
default: "", | ||
description: "iOS platform code syntax", | ||
}, | ||
}); | ||
this.addInput('ios', { | ||
type: { | ||
...StringSchema, | ||
default: '', | ||
description: 'iOS platform code syntax' | ||
} | ||
}); | ||
|
||
this.addOutput("token", { | ||
type: TokenSchema, | ||
}); | ||
} | ||
this.addOutput('token', { | ||
type: TokenSchema | ||
}); | ||
} | ||
|
||
execute(): void | Promise<void> { | ||
const inputs = this.getAllInputs(); | ||
execute(): void | Promise<void> { | ||
const inputs = this.getAllInputs(); | ||
|
||
const codeSyntax = { | ||
...(inputs.web && { Web: inputs.web }), | ||
...(inputs.android && { Android: inputs.android }), | ||
...(inputs.ios && { iOS: inputs.ios }), | ||
}; | ||
const codeSyntax = { | ||
...(inputs.web && { Web: inputs.web }), | ||
...(inputs.android && { Android: inputs.android }), | ||
...(inputs.ios && { iOS: inputs.ios }) | ||
}; | ||
|
||
const modifiedToken = mergeTokenExtensions(inputs.token, { | ||
hiddenFromPublishing: false, | ||
codeSyntax, | ||
}); | ||
const modifiedToken = mergeTokenExtensions(inputs.token, { | ||
hiddenFromPublishing: false, | ||
codeSyntax | ||
}); | ||
|
||
this.outputs.token.set(modifiedToken); | ||
} | ||
this.outputs.token.set(modifiedToken); | ||
} | ||
} |
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,17 +1,17 @@ | ||
import codeSyntax from "./codeSyntax.js"; | ||
import publish from "./publish.js"; | ||
import scopeAll from "./scopeAll.js"; | ||
import scopeByType from "./scopeByType.js"; | ||
import scopeColor from "./scopeColor.js"; | ||
import scopeNumber from "./scopeNumber.js"; | ||
import scopeString from "./scopeString.js"; | ||
import codeSyntax from './codeSyntax.js'; | ||
import publish from './publish.js'; | ||
import scopeAll from './scopeAll.js'; | ||
import scopeByType from './scopeByType.js'; | ||
import scopeColor from './scopeColor.js'; | ||
import scopeNumber from './scopeNumber.js'; | ||
import scopeString from './scopeString.js'; | ||
|
||
export const nodes = [ | ||
codeSyntax, | ||
publish, | ||
scopeAll, | ||
scopeByType, | ||
scopeColor, | ||
scopeNumber, | ||
scopeString, | ||
codeSyntax, | ||
publish, | ||
scopeAll, | ||
scopeByType, | ||
scopeColor, | ||
scopeNumber, | ||
scopeString | ||
]; |
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,57 +1,57 @@ | ||
import { | ||
BooleanSchema, | ||
INodeDefinition, | ||
Node, | ||
ToInput, | ||
ToOutput, | ||
} from "@tokens-studio/graph-engine"; | ||
import { SingleToken } from "@tokens-studio/types"; | ||
import { TokenSchema } from "@tokens-studio/graph-engine-nodes-design-tokens/schemas/index.js"; | ||
import { mergeTokenExtensions } from "../utils/tokenMerge.js"; | ||
BooleanSchema, | ||
INodeDefinition, | ||
Node, | ||
ToInput, | ||
ToOutput | ||
} from '@tokens-studio/graph-engine'; | ||
import { SingleToken } from '@tokens-studio/types'; | ||
import { TokenSchema } from '@tokens-studio/graph-engine-nodes-design-tokens/schemas/index.js'; | ||
import { mergeTokenExtensions } from '../utils/tokenMerge.js'; | ||
|
||
export default class NodeDefinition extends Node { | ||
static title = "Publish Variable"; | ||
static type = "studio.tokens.figma.publish"; | ||
static description = "Controls whether a variable is published to Users"; | ||
|
||
declare inputs: ToInput<{ | ||
token: SingleToken; | ||
publish: boolean; | ||
}>; | ||
declare outputs: ToOutput<{ | ||
token: SingleToken; | ||
}>; | ||
|
||
constructor(props: INodeDefinition) { | ||
super(props); | ||
|
||
this.addInput("token", { | ||
type: { | ||
...TokenSchema, | ||
description: "The design token to control publishing for", | ||
}, | ||
}); | ||
|
||
this.addInput("publish", { | ||
type: { | ||
...BooleanSchema, | ||
default: true, | ||
description: "Whether to publish this token to Figma", | ||
}, | ||
}); | ||
|
||
this.addOutput("token", { | ||
type: TokenSchema, | ||
}); | ||
} | ||
|
||
execute(): void | Promise<void> { | ||
const { token, publish } = this.getAllInputs(); | ||
|
||
const modifiedToken = mergeTokenExtensions(token, { | ||
hiddenFromPublishing: !publish, | ||
}); | ||
|
||
this.outputs.token.set(modifiedToken); | ||
} | ||
static title = 'Publish Variable'; | ||
static type = 'studio.tokens.figma.publish'; | ||
static description = 'Controls whether a variable is published to Users'; | ||
|
||
declare inputs: ToInput<{ | ||
token: SingleToken; | ||
publish: boolean; | ||
}>; | ||
declare outputs: ToOutput<{ | ||
token: SingleToken; | ||
}>; | ||
|
||
constructor(props: INodeDefinition) { | ||
super(props); | ||
|
||
this.addInput('token', { | ||
type: { | ||
...TokenSchema, | ||
description: 'The design token to control publishing for' | ||
} | ||
}); | ||
|
||
this.addInput('publish', { | ||
type: { | ||
...BooleanSchema, | ||
default: true, | ||
description: 'Whether to publish this token to Figma' | ||
} | ||
}); | ||
|
||
this.addOutput('token', { | ||
type: TokenSchema | ||
}); | ||
} | ||
|
||
execute(): void | Promise<void> { | ||
const { token, publish } = this.getAllInputs(); | ||
|
||
const modifiedToken = mergeTokenExtensions(token, { | ||
hiddenFromPublishing: !publish | ||
}); | ||
|
||
this.outputs.token.set(modifiedToken); | ||
} | ||
} |
Oops, something went wrong.