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 |
|---|---|---|
| entity.name.section.passage.xcl-twee, entity.name.section.passage.link.xcl-twee | #d8bfd8 | bold |
| entity.other.attribute-name.passage.tag.xcl-twee, meta.passage.tags.xcl-twee | #d8bfd8 | italic |
| keyword.other.passage.tag.special.xcl-twee | #ffb2d3 | bold |
| entity.name.function.macro.xcl-twee, support.function.macro.custom.xcl-twee, entity.name.function, support.function | #ffb2d3 | bold |
| support.function.macro.navigation.xcl-twee, keyword.control.macro.flow.xcl-twee | #7fc4b5 | bold |
| support.function.macro.audio.xcl-twee | #d8bfd8 | bold |
| support.function.macro.ui.xcl-twee | #c9b6ea | bold |
| support.function.macro.javascript.xcl-twee, keyword.other.script-timing.xcl-twee | #b6d2c2 | bold |
| variable.other.xcl-twee, variable.other.story.xcl-twee, variable.other.identifier.xcl-twee, variable.other, variable | #6edb6e | — |
| variable.other.temp.xcl-twee, variable.language.identifier.xcl-twee, variable.language, variable.parameter | #a9e5a9 | italic |
| string, string.quoted.double.xcl-twee, string.quoted.single.xcl-twee, string.other.link.title.xcl-twee, punctuation.definition.string | #d8bfd8 | — |
| constant.numeric, constant.numeric.xcl-twee, constant.numeric.ordinal.xcl-twee, constant.language.boolean.xcl-twee, constant.language, constant.other.colour.name.xcl-twee, constant.other.colour.hex.xcl-twee, keyword.other.unit.time.xcl-twee | #eac97e | — |
| support.type.datatype.xcl-twee, keyword.operator.type-signature.xcl-twee, keyword.operator.type-union.xcl-twee, storage.type, support.type, entity.name.type, constant.character.escape, constant.character.escape.xcl-twee, constant.character.escape.linebreak.xcl-twee, punctuation.definition.directive.begin.xcl-twee | #eac97e | italic |
| keyword.operator, keyword.operator.xcl-twee, keyword.operator.comparison.word.xcl-twee, keyword.operator.existence.xcl-twee, keyword.operator.logical.xcl-twee, keyword.operator.assignment.word.xcl-twee, keyword.operator.comparison.xcl-twee, keyword.operator.arithmetic.xcl-twee, keyword.operator.assignment.xcl-twee, keyword.operator.assignment.augmented.xcl-twee, keyword.operator.spread.xcl-twee, keyword.operator.bind.xcl-twee, keyword.operator.possessive.xcl-twee, keyword.operator.property.xcl-twee, keyword.operator.link.xcl-twee, punctuation.separator.key-value.xcl-twee, keyword.control, storage.modifier | #7fc4b5 | — |
| keyword.control.lambda.xcl-twee | #7fc4b5 | italic |
| entity.name.tag.hook.xcl-twee, entity.name.tag.hook.reference.xcl-twee, entity.name.tag, entity.name.tag.html, entity.name.tag.other.html | #c9b6ea | bold |
| punctuation.definition.hook.name.xcl-twee, punctuation.definition.hook.reference.xcl-twee | #c9b6ea | — |
| entity.other.attribute-name.html, entity.other.attribute-name, meta.tag.attributes.html | #ab99c8 | — |
| punctuation.definition.passage.begin.xcl-twee, punctuation.section.parens.begin.xcl-twee, punctuation.section.parens.end.xcl-twee, punctuation.section.brackets.begin.xcl-twee, punctuation.section.brackets.end.xcl-twee, punctuation.section.braces.begin.xcl-twee, punctuation.section.braces.end.xcl-twee, punctuation.definition.variable.xcl-twee, punctuation.definition.tag.begin.html, punctuation.definition.tag.end.html, punctuation.definition.tags.xcl-twee, punctuation.separator.comma.xcl-twee, keyword.control.whitespace-collapse.xcl-twee, punctuation.definition.link.begin.xcl-twee, punctuation.definition.link.end.xcl-twee, meta.brace, punctuation.separator, punctuation.terminator | #9882b8 | — |
| 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 | #9882b8 | bold |
| comment, comment.block.html, comment.block, comment.line, punctuation.definition.comment | #98849b | italic |
| markup.raw.verbatim.xcl-twee, markup.raw, markup.inline.raw, meta.embedded, source.embedded | #b6d2c2 | — |
| punctuation.definition.raw.begin.xcl-twee, punctuation.definition.raw.end.xcl-twee | #7a9d8a | — |
| invalid.illegal.unclosed.macro.xcl-twee, invalid.illegal.unclosed.hook.xcl-twee, invalid.illegal.unclosed.block.xcl-twee | #eac97e | bold underline |
| invalid.illegal.operator.xcl-twee, invalid.illegal, invalid | #ff6282 | underline |
| invalid.deprecated | #b4a8c4 | strikethrough |
| markup.underline.link, string.other.link, markup.link | #7fc4b5 | underline |
| markup.italic.xcl-twee, markup.italic.emphasis.xcl-twee, markup.italic | — | italic |
| markup.bold.xcl-twee, markup.bold.strong.xcl-twee, markup.bold | — | bold |
| markup.strikethrough.xcl-twee, markup.strikethrough | — | 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 | #6a5580 | — |
| keyword, keyword.control.flow, storage, storage.type.function, keyword.operator.new, keyword.operator.expression | #7fc4b5 | — |
| entity.name.function, meta.function-call, support.function, meta.definition.method entity.name.function | #ffb2d3 | — |
| entity.name.class, entity.name.type.class, support.class, entity.name.namespace, support.type.primitive | #eac97e | — |
| variable.other.property, meta.object-literal.key, support.variable.property, variable.other.constant | #c9b6ea | — |
| constant.language.null, constant.language.undefined, variable.language.this, variable.language.super | #a9e5a9 | italic |
| entity.other.attribute-name.class.css, entity.other.attribute-name.id.css, entity.name.tag.css | #c9b6ea | — |
| support.type.property-name.css, support.type.property-name | #7fc4b5 | — |
| support.type.property-name.json, meta.structure.dictionary.key.json string | #c9b6ea | — |
| markup.heading, entity.name.section.markdown | #d8bfd8 | bold |
| markup.quote, punctuation.definition.list.begin.markdown, beginning.punctuation.definition.list | #9882b8 | — |
| markup.inserted | #6edb6e | — |
| markup.deleted | #ff6282 | — |
| markup.changed | #7fc4b5 | — |
| string.regexp, constant.other.character-class.regexp | #b6d2c2 | — |
| 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 | #ffb2d3 | — |
| keyword.control.lambda.xcl-twee | #ffb2d3 | italic |
| keyword.control.macro.flow.xcl-twee | #7fc4b5 | — |
| support.function.macro.javascript.xcl-twee, keyword.other.script-timing.xcl-twee | #7fc4b5 | bold |
| support.type.datatype.xcl-twee, keyword.operator.type-signature.xcl-twee, keyword.operator.type-union.xcl-twee | #d8bfd8 | italic |
| variable.language.identifier.xcl-twee | #6edb6e | italic |
| variable.other.story.xcl-twee | #6edb6e | — |
| variable.other.temp.xcl-twee | #6edb6e | italic |
| constant.numeric.ordinal.xcl-twee, keyword.other.unit.time.xcl-twee | #eac97e | — |
| constant.other.colour.name.xcl-twee, constant.other.colour.hex.xcl-twee | #d8bfd8 | — |
| constant.character.escape.xcl-twee, constant.character.escape.linebreak.xcl-twee | #98849b | — |
| markup.raw.verbatim.xcl-twee | #d8bfd8 | — |
| punctuation.definition.raw.begin.xcl-twee, punctuation.definition.raw.end.xcl-twee | #98849b | — |
| 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 | #98849b | — |
| 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 | #ffb2d3 | bold |
| entity.name.section.passage.link.xcl-twee | #d8bfd8 | underline |
| string.other.link.title.xcl-twee | #d8bfd8 | — |
| keyword.operator.link.xcl-twee, punctuation.definition.link.begin.xcl-twee, punctuation.definition.link.end.xcl-twee | #ffb2d3 | — |
| keyword.other.passage.tag.special.xcl-twee | #d8bfd8 | bold |
| punctuation.definition.tags.xcl-twee | #98849b | — |
| entity.name.tag.hook.reference.xcl-twee, punctuation.definition.hook.reference.xcl-twee, punctuation.definition.hook.name.xcl-twee | #c9b6ea | — |
| invalid.illegal.unclosed.macro.xcl-twee, invalid.illegal.unclosed.hook.xcl-twee, invalid.illegal.unclosed.block.xcl-twee | #eac97e | bold underline |
| invalid.illegal.operator.xcl-twee | #eac97e | underline |
| punctuation.section.parens.begin.xcl-twee, punctuation.section.parens.end.xcl-twee, punctuation.separator.key-value.xcl-twee | #ffb2d3 | — |
| punctuation.section.brackets.begin.xcl-twee, punctuation.section.brackets.end.xcl-twee | #c9b6ea | — |
| punctuation.section.braces.begin.xcl-twee, punctuation.section.braces.end.xcl-twee, keyword.control.whitespace-collapse.xcl-twee | #ffb2d3 | — |
| punctuation.separator.comma.xcl-twee | #98849b | — |
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}!`;
}