X-Change Life Twee Tools
Publisher: aphroditeThemes in package: 15
Language support for X-Change Life's X-Lowe (Harlowe-derived) Twee: highlighting, navigation, macro handbook, diagnostics, game-dev and modding tools.
Language support for X-Change Life's X-Lowe (Harlowe-derived) Twee: highlighting, navigation, macro handbook, diagnostics, game-dev and modding tools.
Full workbench mockup using this variant's colors and tokenColors.
Loading...
Workbench UI color keys from the theme JSON colors map.
TextMate scopes and font styles (syntax highlighting rules).
| scope | foreground | fontStyle |
|---|---|---|
| comment, comment.block, comment.line, punctuation.definition.comment | #7a7a7a | italic |
| string, string.quoted, string.quoted.double.xcl-twee, string.quoted.single.xcl-twee, string.other.link.title.xcl-twee | #000000 | — |
| constant.numeric, constant.numeric.xcl-twee | #717171 | — |
| constant.language.boolean, constant.language.boolean.xcl-twee, constant.language, constant.character.escape | #717171 | — |
| keyword, keyword.operator, keyword.operator.xcl-twee, keyword.operator.arithmetic.xcl-twee, keyword.control, keyword.control.whitespace-collapse.xcl-twee | #444444 | |
| variable, variable.other, variable.other.xcl-twee, variable.other.identifier.xcl-twee, variable.parameter | #222222 | — |
| entity.name.function, support.function, entity.name.function.macro.xcl-twee, support.function.macro.custom.xcl-twee | #444444 | — |
| support.function.macro.navigation.xcl-twee | #222222 | bold |
| support.function.macro.audio.xcl-twee | #717171 | |
| support.function.macro.ui.xcl-twee | #222222 | |
| entity.name.section.passage.xcl-twee | #222222 | bold |
| punctuation.definition.passage.begin.xcl-twee | #7a7a7a | bold |
| entity.name.tag.hook.xcl-twee | #444444 | — |
| entity.name.tag.html, entity.name.tag.other.html, entity.name.tag | #444444 | — |
| entity.other.attribute-name.html, entity.other.attribute-name | #222222 | — |
| invalid, invalid.illegal, invalid.illegal.unclosed.macro.xcl-twee, invalid.illegal.unclosed.hook.xcl-twee | #b00020 | underline |
| punctuation.section.parens.begin.xcl-twee, punctuation.section.parens.end.xcl-twee | #848484 | bold |
| punctuation.section.brackets.begin.xcl-twee, punctuation.section.brackets.end.xcl-twee | #222222 | bold |
| punctuation.section.braces.begin.xcl-twee, punctuation.section.braces.end.xcl-twee | #444444 | |
| punctuation.separator.key-value.xcl-twee | #717171 | bold |
| punctuation.definition.link.begin.xcl-twee, punctuation.definition.link.end.xcl-twee | #222222 | bold |
| entity.other.attribute-name.passage.tag.xcl-twee | #222222 | italic |
| punctuation.definition.directive.begin.xcl-twee | #444444 | bold |
| keyword.operator.comparison.word.xcl-twee, keyword.operator.logical.xcl-twee, keyword.operator.assignment.word.xcl-twee, keyword.operator.existence.xcl-twee, keyword.operator.comparison.xcl-twee, keyword.operator.assignment.augmented.xcl-twee, keyword.operator.assignment.xcl-twee, keyword.operator.bind.xcl-twee, keyword.operator.spread.xcl-twee, keyword.operator.possessive.xcl-twee, keyword.operator.property.xcl-twee | #444444 | — |
| keyword.control.lambda.xcl-twee | #444444 | italic |
| keyword.control.macro.flow.xcl-twee | #222222 | — |
| support.function.macro.javascript.xcl-twee, keyword.other.script-timing.xcl-twee | #222222 | bold |
| support.type.datatype.xcl-twee, keyword.operator.type-signature.xcl-twee, keyword.operator.type-union.xcl-twee | #222222 | italic |
| variable.language.identifier.xcl-twee | #222222 | italic |
| variable.other.story.xcl-twee | #222222 | — |
| variable.other.temp.xcl-twee | #222222 | italic |
| constant.numeric.ordinal.xcl-twee, keyword.other.unit.time.xcl-twee | #717171 | — |
| constant.other.colour.name.xcl-twee, constant.other.colour.hex.xcl-twee | #000000 | — |
| constant.character.escape.xcl-twee, constant.character.escape.linebreak.xcl-twee | #7a7a7a | — |
| markup.raw.verbatim.xcl-twee | #000000 | — |
| punctuation.definition.raw.begin.xcl-twee, punctuation.definition.raw.end.xcl-twee | #7a7a7a | — |
| markup.bold.xcl-twee, markup.bold.strong.xcl-twee | — | bold |
| markup.italic.xcl-twee, markup.italic.emphasis.xcl-twee | — | italic |
| markup.strikethrough.xcl-twee | — | strikethrough |
| markup.superscript.xcl-twee | — | underline |
| punctuation.definition.bold.xcl-twee, punctuation.definition.italic.xcl-twee, punctuation.definition.strikethrough.xcl-twee, punctuation.definition.superscript.xcl-twee, punctuation.definition.strong.xcl-twee, punctuation.definition.emphasis.xcl-twee | #7a7a7a | — |
| punctuation.definition.heading.xcl-twee, punctuation.definition.list.bullet.xcl-twee, punctuation.definition.list.numbered.xcl-twee, keyword.control.aligner.xcl-twee, keyword.control.column.xcl-twee, meta.separator.hr.xcl-twee | #444444 | bold |
| entity.name.section.passage.link.xcl-twee | #222222 | underline |
| string.other.link.title.xcl-twee | #000000 | — |
| keyword.operator.link.xcl-twee, punctuation.definition.link.begin.xcl-twee, punctuation.definition.link.end.xcl-twee | #444444 | — |
| keyword.other.passage.tag.special.xcl-twee | #222222 | bold |
| punctuation.definition.tags.xcl-twee | #7a7a7a | — |
| entity.name.tag.hook.reference.xcl-twee, punctuation.definition.hook.reference.xcl-twee, punctuation.definition.hook.name.xcl-twee | #444444 | — |
| invalid.illegal.unclosed.macro.xcl-twee, invalid.illegal.unclosed.hook.xcl-twee, invalid.illegal.unclosed.block.xcl-twee | #b00020 | underline |
| invalid.illegal.operator.xcl-twee | #b00020 | underline |
| punctuation.section.parens.begin.xcl-twee, punctuation.section.parens.end.xcl-twee, punctuation.separator.key-value.xcl-twee | #444444 | — |
| punctuation.section.brackets.begin.xcl-twee, punctuation.section.brackets.end.xcl-twee | #444444 | — |
| punctuation.section.braces.begin.xcl-twee, punctuation.section.braces.end.xcl-twee, keyword.control.whitespace-collapse.xcl-twee | #444444 | — |
| punctuation.separator.comma.xcl-twee | #7a7a7a | — |
export interface User {
id: string;
name: string;
role: "admin" | "member";
tags: string[];
}
/**
* Fetch user data by ID
* @param id
* @returns User object or null if ID is invalid
*/
export async function fetchUser(id: string): Promise<User | null> {
if (!id) {
return null;
}
const response = await fetch(`/api/users/${id}`, {
method: "GET",
headers: { Accept: "application/json" },
});
if (!response.ok) {
throw new Error(`HTTP ${response.status}`);
}
return (await response.json()) as User;
}
function greet(user: User): string {
// Simple greeting function that uses the user's name
return `Hello, ${user.name}!`;
}