Skip to content

Commit

Permalink
remove brand.typography.base.color
Browse files Browse the repository at this point in the history
  • Loading branch information
gordonwoodhull committed Oct 30, 2024
1 parent 8f2b063 commit f395179
Show file tree
Hide file tree
Showing 14 changed files with 47 additions and 62 deletions.
25 changes: 12 additions & 13 deletions src/resources/editor/tools/vs-code.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -11911,6 +11911,7 @@ var require_yaml_intelligence_resources = __commonJS({
closed: true,
properties: {
images: {
description: "A dictionary of named logo resources.",
schema: {
object: {
additionalProperties: {
Expand Down Expand Up @@ -12095,31 +12096,31 @@ var require_yaml_intelligence_resources = __commonJS({
ref: "brand-typography-options-base"
},
headings: {
description: "Settings for headings\n",
description: "Settings for headings, or a string specifying the font family only.",
ref: "brand-typography-options-headings"
},
monospace: {
description: "Settings for monospace text\n",
description: "Settings for monospace text, or a string specifying the font family only.",
ref: "brand-typography-options-monospace"
},
"monospace-inline": {
description: "Settings for inline code",
description: "Settings for inline code, or a string specifying the font family only.",
ref: "brand-typography-options-monospace-inline"
},
"monospace-block": {
description: "Settings for code blocks",
description: "Settings for code blocks, or a string specifying the font family only.",
ref: "brand-typography-options-monospace-block"
},
link: {
description: "Settings for links",
description: "Settings for links.",
ref: "brand-typography-options-link"
}
}
}
},
{
id: "brand-typography-options-base",
description: "Typographic options.",
description: "Base typographic options.",
anyOf: [
"string",
{
Expand All @@ -12131,9 +12132,6 @@ var require_yaml_intelligence_resources = __commonJS({
weight: {
ref: "brand-font-weight"
},
color: {
ref: "brand-maybe-named-color"
},
"line-height": {
ref: "line-height-number-string"
}
Expand All @@ -12144,7 +12142,7 @@ var require_yaml_intelligence_resources = __commonJS({
},
{
id: "brand-typography-options-headings",
description: "Typographic options without a font size.",
description: "Typographic options for headings.",
anyOf: [
"string",
{
Expand Down Expand Up @@ -22809,6 +22807,7 @@ var require_yaml_intelligence_resources = __commonJS({
},
"If <code>true</code>, force the presence of the OJS runtime. If\n<code>false</code>, force the absence instead. If unset, the OJS runtime\nis included only if OJS cells are present in the document.",
"Use the specified file as a style reference in producing a docx,\npptx, or odt file.",
"Branding information to use for this document. If a string, the path\nto a brand file. If false, don\u2019t use branding on this document. If an\nobject, an inline brand definition.",
"Theme name, theme scss file, or a mix of both.",
"The light theme name, theme scss file, or a mix of both.",
"The light theme name, theme scss file, or a mix of both.",
Expand Down Expand Up @@ -24131,12 +24130,12 @@ var require_yaml_intelligence_resources = __commonJS({
mermaid: "%%"
},
"handlers/mermaid/schema.yml": {
_internalId: 193258,
_internalId: 193399,
type: "object",
description: "be an object",
properties: {
"mermaid-format": {
_internalId: 193250,
_internalId: 193391,
type: "enum",
enum: [
"png",
Expand All @@ -24152,7 +24151,7 @@ var require_yaml_intelligence_resources = __commonJS({
exhaustiveCompletions: true
},
theme: {
_internalId: 193257,
_internalId: 193398,
type: "anyOf",
anyOf: [
{
Expand Down
25 changes: 12 additions & 13 deletions src/resources/editor/tools/yaml/web-worker.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 12 additions & 13 deletions src/resources/editor/tools/yaml/yaml-intelligence-resources.json
Original file line number Diff line number Diff line change
Expand Up @@ -4883,6 +4883,7 @@
"closed": true,
"properties": {
"images": {
"description": "A dictionary of named logo resources.",
"schema": {
"object": {
"additionalProperties": {
Expand Down Expand Up @@ -5067,31 +5068,31 @@
"ref": "brand-typography-options-base"
},
"headings": {
"description": "Settings for headings\n",
"description": "Settings for headings, or a string specifying the font family only.",
"ref": "brand-typography-options-headings"
},
"monospace": {
"description": "Settings for monospace text\n",
"description": "Settings for monospace text, or a string specifying the font family only.",
"ref": "brand-typography-options-monospace"
},
"monospace-inline": {
"description": "Settings for inline code",
"description": "Settings for inline code, or a string specifying the font family only.",
"ref": "brand-typography-options-monospace-inline"
},
"monospace-block": {
"description": "Settings for code blocks",
"description": "Settings for code blocks, or a string specifying the font family only.",
"ref": "brand-typography-options-monospace-block"
},
"link": {
"description": "Settings for links",
"description": "Settings for links.",
"ref": "brand-typography-options-link"
}
}
}
},
{
"id": "brand-typography-options-base",
"description": "Typographic options.",
"description": "Base typographic options.",
"anyOf": [
"string",
{
Expand All @@ -5103,9 +5104,6 @@
"weight": {
"ref": "brand-font-weight"
},
"color": {
"ref": "brand-maybe-named-color"
},
"line-height": {
"ref": "line-height-number-string"
}
Expand All @@ -5116,7 +5114,7 @@
},
{
"id": "brand-typography-options-headings",
"description": "Typographic options without a font size.",
"description": "Typographic options for headings.",
"anyOf": [
"string",
{
Expand Down Expand Up @@ -15781,6 +15779,7 @@
},
"If <code>true</code>, force the presence of the OJS runtime. If\n<code>false</code>, force the absence instead. If unset, the OJS runtime\nis included only if OJS cells are present in the document.",
"Use the specified file as a style reference in producing a docx,\npptx, or odt file.",
"Branding information to use for this document. If a string, the path\nto a brand file. If false, don’t use branding on this document. If an\nobject, an inline brand definition.",
"Theme name, theme scss file, or a mix of both.",
"The light theme name, theme scss file, or a mix of both.",
"The light theme name, theme scss file, or a mix of both.",
Expand Down Expand Up @@ -17103,12 +17102,12 @@
"mermaid": "%%"
},
"handlers/mermaid/schema.yml": {
"_internalId": 193258,
"_internalId": 193399,
"type": "object",
"description": "be an object",
"properties": {
"mermaid-format": {
"_internalId": 193250,
"_internalId": 193391,
"type": "enum",
"enum": [
"png",
Expand All @@ -17124,7 +17123,7 @@
"exhaustiveCompletions": true
},
"theme": {
"_internalId": 193257,
"_internalId": 193398,
"type": "anyOf",
"anyOf": [
{
Expand Down
1 change: 0 additions & 1 deletion src/resources/filters/quarto-post/typst-brand-yaml.lua
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ function render_typst_brand_yaml()
'#set text(',
-- '#show par: set text(', overrules #show heading!
conditional_entry('weight', base.weight),
conditional_entry('fill', base.color, false),
')'
}))
end
Expand Down
2 changes: 0 additions & 2 deletions src/resources/schema/definitions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2711,8 +2711,6 @@
size: string
weight:
ref: brand-font-weight
color:
ref: brand-maybe-named-color
line-height:
ref: line-height-number-string

Expand Down
3 changes: 0 additions & 3 deletions src/resources/schema/json-schemas.json
Original file line number Diff line number Diff line change
Expand Up @@ -3415,9 +3415,6 @@
"weight": {
"$ref": "#/$defs/BrandFontWeight"
},
"color": {
"$ref": "#/$defs/BrandMaybeNamedColor"
},
"line-height": {
"$ref": "#/$defs/LineHeightNumberString"
}
Expand Down
5 changes: 2 additions & 3 deletions src/resources/types/schema-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1349,19 +1349,18 @@ export type BrandTypography = {

export type BrandTypographyOptionsBase = string | {
"line-height"?: LineHeightNumberString;
color?: BrandMaybeNamedColor;
family?: string;
size?: string;
weight?: BrandFontWeight;
}; /* Typographic options. */
}; /* Base typographic options. */

export type BrandTypographyOptionsHeadings = string | {
"line-height"?: LineHeightNumberString;
color?: BrandMaybeNamedColor;
family?: string;
style?: BrandFontStyle;
weight?: BrandFontWeight;
}; /* Typographic options without a font size. */
}; /* Typographic options for headings. */

export type BrandTypographyOptionsMonospace = string | {
"background-color"?: BrandMaybeNamedColor;
Expand Down
3 changes: 1 addition & 2 deletions tests/docs/brand-yaml/kitchen-sink/_brand.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ color:
black: "#002040"

primary: red
foreground: black
foreground: "#21f"
background: "#e6f8ff"

typography:
Expand All @@ -26,7 +26,6 @@ typography:
# sass fails to typecheck
size: 12pt
weight: 400
color: "#21f"
line-height: 0.9
headings:
family: PT Sans
Expand Down
5 changes: 1 addition & 4 deletions tests/docs/brand-yaml/monospace-colors/_brand.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
color:
## ERROR: Expecting punctuation: "}" if no palette
palette:
orangeblue: "#ccc"
background: "#e6f8ff"
typography:
monospace:
color: "#eee"
background-color: "#0a3c07"
background-color: "#339d2c"
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ format:

We're using only `brand.typography.monospace.color` and `.background-color`.

Raw inlines `3 * fib(5)` and raw blocks will inherit the same colors, off-white and dark green.
Raw inlines `3 * fib(5)` and raw blocks will inherit the same colors, off-white and green.

:::{.sourceCode}
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ color:
black: "#002040"
white: "#FFE0C0"
primary: red
foreground: black
foreground: "#080180"
background: white

typography:
Expand All @@ -28,7 +28,6 @@ typography:
family: Aguafina Script
size: 14pt
weight: 200
color: "#080180"
line-height: 1.5
headings:
family: Montserrat
Expand Down
Loading

0 comments on commit f395179

Please sign in to comment.