@tin.so/core 0.2.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,114 +1,5 @@
1
1
  import * as v from "valibot";
2
2
  import { InitInput } from "@resvg/resvg-wasm";
3
- type FontFace = {
4
- weight: number;
5
- italic: boolean;
6
- /** Path relative to the fonts directory of this package */
7
- file: string;
8
- /** Family name inside the font file, which resvg uses to match the face */
9
- family: string;
10
- };
11
- type FontMetrics = {
12
- unitsPerEm: number;
13
- ascender: number;
14
- descender: number;
15
- lineGap: number;
16
- };
17
- type CodeFont = {
18
- id: string;
19
- name: string;
20
- kind: "code";
21
- faces: Array<FontFace>;
22
- metrics: FontMetrics & {
23
- advance: number;
24
- };
25
- };
26
- type UiFont = {
27
- id: string;
28
- name: string;
29
- kind: "ui";
30
- faces: Array<FontFace>;
31
- metrics: FontMetrics & {
32
- advances: Record<string, number>;
33
- };
34
- };
35
- type Font = CodeFont | UiFont;
36
- /** Reads a font file by its path relative to the fonts directory */
37
- type FontLoader = (file: string) => Promise<Uint8Array>;
38
- declare const CODE_FONTS: CodeFont[];
39
- declare const CODE_FONT_IDS: string[];
40
- declare const DEFAULT_CODE_FONT = "jetbrains-mono";
41
- declare const UI_FONT: UiFont;
42
- declare function getCodeFont(id: string): CodeFont;
43
- /** Picks the face that matches the style best: the exact face, then the regular face of the same style */
44
- declare function getFace(font: Font, style?: {
45
- bold?: boolean;
46
- italic?: boolean;
47
- }): FontFace;
48
- /**
49
- * The CSS font family of a face. The first name is for browsers, which load the faces with @font-face
50
- * rules under that name. The second name is the family inside the file, for resvg. The names stay
51
- * unquoted, because resvg does not match a quoted name that follows another name.
52
- */
53
- declare function cssFontFamily(font: Font, face: FontFace): string;
54
- /** Width of a text in the UI font, for title layout. Characters outside of ASCII count as an "M". */
55
- declare function measureUiText(text: string, fontSize: number): number;
56
- /** An icon on a 24px grid, drawn either filled or as a 2px stroke */
57
- type Icon = {
58
- id: string;
59
- title: string;
60
- /** SVG elements of the icon, without the root element */
61
- body: string;
62
- style: "fill" | "stroke";
63
- };
64
- /** The icon of the language, from its id in the language list */
65
- declare const AUTO_ICON = "auto";
66
- declare const FILE_ICON = "file";
67
- declare const NO_ICON = "none";
68
- /** Icon ids that a pane can name, besides "auto" and "none" */
69
- declare const ICON_IDS: string[];
70
- declare function getIcon(id: string): Icon | undefined;
71
- /** Resolves the icon setting of a pane. Returns undefined for "none". */
72
- declare function resolveIcon(setting: string, language: string): Icon | undefined;
73
- /** The URL of the JSON Schema of the latest spec version, on the hosted app */
74
- declare const SPEC_SCHEMA_URL: string;
75
- /**
76
- * The spec as a JSON Schema, for editors and agents. JSON Schema cannot express the custom checks of
77
- * the spec, such as line ranges, so their rules are only in the descriptions.
78
- */
79
- declare function specJsonSchema(): Record<string, unknown>;
80
- /**
81
- * True when the value is the URL of a tin.so spec schema: a path that ends with
82
- * /schema/v<number>.json on the host of the hosted app, on an earlier host of the app, or on the
83
- * host of the given app URL (for example a local editor).
84
- */
85
- declare function isSpecSchemaUrl(value: unknown, appUrl?: string): boolean;
86
- /**
87
- * The hosted web app. The CLI takes another app from its TIN_APP_URL environment variable,
88
- * for example the local editor during development.
89
- */
90
- declare const DEFAULT_APP_URL = "https://tin.so/";
91
- type DecodeOptions = {
92
- /** The largest size of the inflated spec in bytes, so that a hostile input cannot use much memory */
93
- maxBytes?: number;
94
- };
95
- /**
96
- * Compresses a spec into a URL-safe string. A spec without a version gets version 1, so that the
97
- * link keeps its meaning when a later version changes the format.
98
- */
99
- declare function encodeSpec(spec: unknown): Promise<string>;
100
- /**
101
- * Reads a spec from a string of the encoder, with the fields of older links changed. Throws for
102
- * bad data and for a spec larger than the limit.
103
- */
104
- declare function decodeSpec(encoded: string, options?: DecodeOptions): Promise<unknown>;
105
- /**
106
- * A link that opens the spec in the web app. The spec is in the fragment, so it never goes to a
107
- * server and has no length limit of a request line.
108
- */
109
- declare function createLink(spec: unknown, appUrl?: string): Promise<string>;
110
- /** Reads the spec from the fragment of a link, or returns undefined when the fragment has none */
111
- declare function readLink(link: string, options?: DecodeOptions): Promise<unknown>;
112
3
  type Mode = "light" | "dark";
113
4
  /** Token colors of a theme. Keys that are missing use the foreground color. */
114
5
  type Syntax = {
@@ -138,16 +29,24 @@ type Theme = {
138
29
  from: string;
139
30
  to: string;
140
31
  };
141
- font?: string;
142
- partner?: boolean;
143
- hidden?: boolean;
144
- lineNumbers?: boolean;
32
+ /** The colors of the window by mode, as in the editor of the theme. The background is opaque. */
33
+ window?: Partial<Record<Mode, EditorWindow>>;
34
+ /** The Shiki theme by mode that colors the code, in place of the token colors of the syntax */
35
+ textmate: Partial<Record<Mode, string>>;
145
36
  syntax: {
146
37
  light?: Syntax;
147
38
  dark?: Syntax;
148
39
  };
149
40
  };
150
- /** Colors of the window around the code, from the ray.so default frame */
41
+ /** The colors of the window of an editor theme */
42
+ type EditorWindow = {
43
+ background: string;
44
+ /** The text of the title bar and the tabs */
45
+ title?: string;
46
+ lineNumber?: string;
47
+ divider?: string;
48
+ };
49
+ /** Colors of the window around the code, from the default frame of ray.so */
151
50
  type FrameColors = {
152
51
  /** The gradient behind the windows */
153
52
  backdrop: {
@@ -166,7 +65,7 @@ type FrameColors = {
166
65
  };
167
66
  declare const THEMES: Array<Theme>;
168
67
  declare const THEME_IDS: string[];
169
- declare const DEFAULT_THEME = "candy";
68
+ declare const DEFAULT_THEME = "github";
170
69
  declare function getTheme(id: string): Theme;
171
70
  /** A theme with only one mode always uses that mode */
172
71
  declare function resolveMode(theme: Theme, mode: Mode): Mode;
@@ -185,6 +84,15 @@ type Token = {
185
84
  type HighlightedLine = Array<Token>;
186
85
  declare const PLAIN_TEXT = "text";
187
86
  declare const LANGUAGE_IDS: string[];
87
+ /** A language with its display name and its other names, such as "bash" for the shell */
88
+ type LanguageInfo = {
89
+ id: string;
90
+ name: string;
91
+ aliases: Array<string>;
92
+ };
93
+ declare const LANGUAGES: Array<LanguageInfo>;
94
+ /** The display name of a language, such as "TypeScript" for "typescript" */
95
+ declare function languageName(language: string): string;
188
96
  /**
189
97
  * Whether the language is a language id, an alias or a file extension that this package knows.
190
98
  * The check ignores the case, as the resolution of the language does.
@@ -196,6 +104,101 @@ declare function resolveLanguage(language: string): string;
196
104
  declare function inferLanguage(fileName: string | undefined): string;
197
105
  /** Splits code into lines of colored tokens with the colors of the theme */
198
106
  declare function highlight(code: string, language: string, theme: Theme, mode: Mode, syntax: Syntax): Promise<Array<HighlightedLine>>;
107
+ /**
108
+ * Backgrounds that the renderer makes from the colors of the image:
109
+ * - ambient-blur: a blurred and larger copy of the code behind the window
110
+ * - ambient-code: a mesh of the colors that the code uses most
111
+ * - ambient-theme: a mesh of the keyword, string, function and constant colors of the theme
112
+ */
113
+ declare const AMBIENT_BACKGROUNDS: readonly ["ambient-blur", "ambient-code", "ambient-theme"];
114
+ declare const AMBIENT_ENABLED = false;
115
+ type AmbientBackground = (typeof AMBIENT_BACKGROUNDS)[number];
116
+ declare function isAmbientBackground(css: string): css is AmbientBackground;
117
+ /** The theme mesh of a theme in a mode, as a preview of the ambient backgrounds before the code is known */
118
+ declare function ambientPreviewCss(theme: Theme, mode: Mode): string;
119
+ /** A background preset of the editor: a gradient, a color or a mesh of radial gradients */
120
+ type BackgroundPreset = {
121
+ id: string;
122
+ name: string;
123
+ kind: "gradient" | "color" | "mesh";
124
+ /** The CSS background, as the background field of a spec takes it */
125
+ css: string;
126
+ };
127
+ declare const BACKGROUNDS: Array<BackgroundPreset>;
128
+ /** The background preset of a theme in a mode, or undefined when the theme has none */
129
+ declare function themeBackground(theme: Theme, mode: Mode): BackgroundPreset | undefined;
130
+ type FontFace = {
131
+ weight: number;
132
+ italic: boolean;
133
+ /** Path relative to the fonts directory of this package */
134
+ file: string;
135
+ /** Family name inside the font file, which resvg uses to match the face */
136
+ family: string;
137
+ };
138
+ type FontMetrics = {
139
+ unitsPerEm: number;
140
+ ascender: number;
141
+ descender: number;
142
+ lineGap: number;
143
+ };
144
+ type CodeFont = {
145
+ id: string;
146
+ name: string;
147
+ kind: "code";
148
+ faces: Array<FontFace>;
149
+ metrics: FontMetrics & {
150
+ advance: number;
151
+ };
152
+ };
153
+ type UiFont = {
154
+ id: string;
155
+ name: string;
156
+ kind: "ui";
157
+ faces: Array<FontFace>;
158
+ metrics: FontMetrics & {
159
+ advances: Record<string, number>;
160
+ };
161
+ };
162
+ type Font = CodeFont | UiFont;
163
+ /** Reads a font file by its path relative to the fonts directory */
164
+ type FontLoader = (file: string) => Promise<Uint8Array>;
165
+ declare const CODE_FONTS: CodeFont[];
166
+ declare const CODE_FONT_IDS: string[];
167
+ declare const DEFAULT_CODE_FONT = "jetbrains-mono";
168
+ declare const UI_FONT: UiFont;
169
+ declare function getCodeFont(id: string): CodeFont;
170
+ /** Picks the face that matches the style best: the exact face, then the regular face of the same style */
171
+ declare function getFace(font: Font, style?: {
172
+ bold?: boolean;
173
+ italic?: boolean;
174
+ }): FontFace;
175
+ /**
176
+ * The CSS font family of a face. The first name is for browsers, which load the faces with @font-face
177
+ * rules under that name. The second name is the family inside the file, for resvg. The names stay
178
+ * unquoted, because resvg does not match a quoted name that follows another name.
179
+ */
180
+ declare function cssFontFamily(font: Font, face: FontFace): string;
181
+ /** Width of a text in the UI font, for title layout. Characters outside of ASCII count as an "M". */
182
+ /** The width of text in a code font, which gives each character the same advance */
183
+ declare function measureCodeText(text: string, fontSize: number, font: CodeFont): number;
184
+ declare function measureUiText(text: string, fontSize: number): number;
185
+ /** An icon on a 24px grid, drawn either filled or as a 2px stroke */
186
+ type Icon = {
187
+ id: string;
188
+ title: string;
189
+ /** SVG elements of the icon, without the root element */
190
+ body: string;
191
+ style: "fill" | "stroke";
192
+ };
193
+ /** The icon of the language, from its id in the language list */
194
+ declare const AUTO_ICON = "auto";
195
+ declare const FILE_ICON = "file";
196
+ declare const NO_ICON = "none";
197
+ /** Icon ids that a pane can name, besides "auto" and "none" */
198
+ declare const ICON_IDS: string[];
199
+ declare function getIcon(id: string): Icon | undefined;
200
+ /** Resolves the icon setting of a pane. Returns undefined for "none". */
201
+ declare function resolveIcon(setting: string, language: string): Icon | undefined;
199
202
  declare const MAC_HEADER: {
200
203
  paddingTop: number;
201
204
  height: number;
@@ -247,6 +250,8 @@ type AnnotationBox = {
247
250
  lines: Array<HighlightedLine>;
248
251
  /** true when the popover is smaller than its code, so that it must cut the code off */
249
252
  clipped: boolean;
253
+ /** The background of the popover from the spec */
254
+ background?: string;
250
255
  };
251
256
  type PaneBox = Rect & {
252
257
  title?: string;
@@ -292,6 +297,8 @@ type WindowBox = Rect & {
292
297
  radius: number;
293
298
  title?: string;
294
299
  controls: "gray" | "color";
300
+ /** The background of the window from the spec, in place of the theme color */
301
+ background?: string;
295
302
  /** The size that fits the panes. The layout can make a window larger to fill the image. */
296
303
  natural: {
297
304
  width: number;
@@ -315,7 +322,14 @@ type Scene = {
315
322
  mode: Mode;
316
323
  syntax: Syntax;
317
324
  frame: FrameColors;
325
+ /** false for a transparent image */
318
326
  background: boolean;
327
+ /** The opacity of the background, from 0 to 1 */
328
+ backgroundOpacity: number;
329
+ /** The color or gradient of the image: the one of the spec, or the background preset of the theme */
330
+ customBackground: CssBackground | undefined;
331
+ /** Draw a blurred copy of the code of each window behind it, over the background color */
332
+ ambientBlur: boolean;
319
333
  font: CodeFont;
320
334
  text: TextMetrics;
321
335
  popoverText: TextMetrics;
@@ -334,6 +348,99 @@ type LayoutOptions = {
334
348
  declare function normalizeCode(code: string, options?: LayoutOptions): string;
335
349
  /** Validates the spec, highlights the code and places every element of the image */
336
350
  declare function layout(input: unknown, options?: LayoutOptions): Promise<Scene>;
351
+ /**
352
+ * The CSS backgrounds that a spec can use: a color, or layers of linear-gradient and
353
+ * radial-gradient with an optional color as the last layer. Colors are hex, rgb(), rgba() and
354
+ * transparent.
355
+ */
356
+ type Rgba = {
357
+ r: number;
358
+ g: number;
359
+ b: number;
360
+ a: number;
361
+ };
362
+ type Length = {
363
+ value: number;
364
+ unit: "%" | "px";
365
+ };
366
+ type ColorStop = {
367
+ color: Rgba;
368
+ position?: Length;
369
+ };
370
+ type Extent = "closest-side" | "closest-corner" | "farthest-side" | "farthest-corner";
371
+ type LinearLayer = {
372
+ type: "linear";
373
+ /** An angle in degrees, or the corner or side of a "to" keyword as -1, 0 or 1 on each axis */
374
+ direction: {
375
+ angle: number;
376
+ } | {
377
+ to: {
378
+ x: number;
379
+ y: number;
380
+ };
381
+ };
382
+ stops: Array<ColorStop>;
383
+ };
384
+ type RadialLayer = {
385
+ type: "radial";
386
+ shape: "circle" | "ellipse";
387
+ size: Extent | {
388
+ x: Length;
389
+ y: Length;
390
+ };
391
+ at: {
392
+ x: Length;
393
+ y: Length;
394
+ };
395
+ stops: Array<ColorStop>;
396
+ };
397
+ type ColorLayer = {
398
+ type: "color";
399
+ color: Rgba;
400
+ };
401
+ type Layer = LinearLayer | RadialLayer | ColorLayer;
402
+ /** A parsed CSS background, with the top layer first as in CSS */
403
+ type CssBackground = Array<Layer>;
404
+ declare function isCssBackground(css: string): boolean;
405
+ /** The URL of the JSON Schema of the latest spec version, on the hosted app */
406
+ declare const SPEC_SCHEMA_URL: string;
407
+ /**
408
+ * The spec as a JSON Schema, for editors and agents. JSON Schema cannot express the custom checks of
409
+ * the spec, such as line ranges, so their rules are only in the descriptions.
410
+ */
411
+ declare function specJsonSchema(): Record<string, unknown>;
412
+ /**
413
+ * True when the value is the URL of a tin.so spec schema: a path that ends with
414
+ * /schema/v<number>.json on the host of the hosted app, on an earlier host of the app, or on the
415
+ * host of the given app URL (for example a local editor).
416
+ */
417
+ declare function isSpecSchemaUrl(value: unknown, appUrl?: string): boolean;
418
+ /**
419
+ * The hosted web app. The CLI takes another app from its TIN_APP_URL environment variable,
420
+ * for example the local editor during development.
421
+ */
422
+ declare const DEFAULT_APP_URL = "https://tin.so/";
423
+ type DecodeOptions = {
424
+ /** The largest size of the inflated spec in bytes, so that a hostile input cannot use much memory */
425
+ maxBytes?: number;
426
+ };
427
+ /**
428
+ * Compresses a spec into a URL-safe string. A spec without a version gets version 1, so that the
429
+ * link keeps its meaning when a later version changes the format.
430
+ */
431
+ declare function encodeSpec(spec: unknown): Promise<string>;
432
+ /**
433
+ * Reads a spec from a string of the encoder, with the fields of older links changed. Throws for
434
+ * bad data and for a spec larger than the limit.
435
+ */
436
+ declare function decodeSpec(encoded: string, options?: DecodeOptions): Promise<unknown>;
437
+ /**
438
+ * A link that opens the spec in the web app. The spec is in the fragment, so it never goes to a
439
+ * server and has no length limit of a request line.
440
+ */
441
+ declare function createLink(spec: unknown, appUrl?: string): Promise<string>;
442
+ /** Reads the spec from the fragment of a link, or returns undefined when the fragment has none */
443
+ declare function readLink(link: string, options?: DecodeOptions): Promise<unknown>;
337
444
  /**
338
445
  * Whether a render writes the metadata when the caller does not say. This is the one place to
339
446
  * change the default.
@@ -386,12 +493,6 @@ declare function schemaVersion(spec: unknown): number | undefined;
386
493
  * them in each object of a spec, so that a spec with such keys stays valid in all versions.
387
494
  */
388
495
  declare const EXTENSION_PREFIX = "x-";
389
- /**
390
- * Changes the fields of older specs from before the v field to the current fields, so that old
391
- * links, files and images stay valid. Input that is not a spec stays as it is, so that the spec
392
- * validation reports it.
393
- */
394
- declare function migrateLegacySpec(spec: unknown): unknown;
395
496
  /**
396
497
  * Adds the version to a spec without one, so that a stored spec keeps its meaning when a later
397
498
  * version changes the format. The version comes from the $schema URL, or is version 1 without it.
@@ -449,9 +550,10 @@ declare const LATEST_SPEC_VERSION = 1;
449
550
  declare const SpecSchema: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
450
551
  readonly $schema: v.SchemaWithPipe<readonly [v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>, undefined>, v.DescriptionAction<string | undefined, string>]>;
451
552
  readonly v: v.SchemaWithPipe<readonly [v.OptionalSchema<v.LiteralSchema<1, undefined>, 1>, v.DescriptionAction<1, string>]>;
452
- readonly theme: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<string[], undefined>, "candy">, v.DescriptionAction<string, string>]>;
553
+ readonly theme: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<string[], undefined>, "github">, v.DescriptionAction<string, string>]>;
453
554
  readonly mode: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<["dark", "light"], undefined>, "dark">, v.DescriptionAction<"dark" | "light", string>]>;
454
- readonly background: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, true>, v.DescriptionAction<boolean, string>]>;
555
+ readonly background: v.SchemaWithPipe<readonly [v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "Use a hex color such as \"#1e1e2e\", or a CSS gradient such as \"linear-gradient(135deg, #2e1065, #a78bfa)\". Gradients are linear-gradient and radial-gradient, with hex, rgb(), rgba() or transparent colors, several layers separated by commas, and a color as the last layer">]>, undefined>, v.DescriptionAction<string | undefined, string>]>;
556
+ readonly backgroundOpacity: v.SchemaWithPipe<readonly [v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 1, undefined>]>, 1>, v.DescriptionAction<number, string>]>;
455
557
  readonly padding: v.SchemaWithPipe<readonly [v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 256, undefined>]>, 64>, v.DescriptionAction<number, string>]>;
456
558
  readonly font: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<string[], undefined>, undefined>, v.DescriptionAction<string | undefined, string>]>;
457
559
  readonly lineNumbers: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, undefined>, v.DescriptionAction<boolean | undefined, string>]>;
@@ -464,6 +566,7 @@ declare const SpecSchema: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
464
566
  readonly frame: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, true>, v.DescriptionAction<boolean, string>]>;
465
567
  readonly titleBar: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, true>, v.DescriptionAction<boolean, string>]>;
466
568
  readonly tabs: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, string>]>;
569
+ readonly background: v.SchemaWithPipe<readonly [v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "Use a hex color such as \"#ff5c57\"">]>, undefined>, v.DescriptionAction<string | undefined, string>]>;
467
570
  readonly controls: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<["gray", "color"], undefined>, "gray">, v.DescriptionAction<"color" | "gray", string>]>;
468
571
  readonly title: v.SchemaWithPipe<readonly [v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>, v.DescriptionAction<string | undefined, string>]>;
469
572
  readonly split: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<["row", "column"], undefined>, "row">, v.DescriptionAction<"column" | "row", string>]>;
@@ -525,6 +628,7 @@ declare const SpecSchema: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
525
628
  color?: string | undefined;
526
629
  background?: string | undefined;
527
630
  }[], string>]>;
631
+ readonly background: v.SchemaWithPipe<readonly [v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "Use a hex color such as \"#ff5c57\"">]>, undefined>, v.DescriptionAction<string | undefined, string>]>;
528
632
  }, undefined>, undefined>, v.MaxLengthAction<{
529
633
  type: "popover";
530
634
  line: number;
@@ -544,6 +648,7 @@ declare const SpecSchema: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
544
648
  color?: string | undefined;
545
649
  background?: string | undefined;
546
650
  }[];
651
+ background?: string | undefined;
547
652
  }[], number, (issue: v.MaxLengthIssue<{
548
653
  type: "popover";
549
654
  line: number;
@@ -563,6 +668,7 @@ declare const SpecSchema: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
563
668
  color?: string | undefined;
564
669
  background?: string | undefined;
565
670
  }[];
671
+ background?: string | undefined;
566
672
  }[], number>) => string>]>, readonly []>, v.DescriptionAction<{
567
673
  type: "popover";
568
674
  line: number;
@@ -582,6 +688,7 @@ declare const SpecSchema: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
582
688
  color?: string | undefined;
583
689
  background?: string | undefined;
584
690
  }[];
691
+ background?: string | undefined;
585
692
  }[], string>]>;
586
693
  readonly marks: v.SchemaWithPipe<readonly [v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
587
694
  readonly line: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>]>, v.DescriptionAction<number, string>]>;
@@ -646,6 +753,7 @@ declare const SpecSchema: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
646
753
  color?: string | undefined;
647
754
  background?: string | undefined;
648
755
  }[];
756
+ background?: string | undefined;
649
757
  }[];
650
758
  marks: {
651
759
  line: number;
@@ -682,6 +790,7 @@ declare const SpecSchema: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
682
790
  color?: string | undefined;
683
791
  background?: string | undefined;
684
792
  }[];
793
+ background?: string | undefined;
685
794
  }[];
686
795
  marks: {
687
796
  line: number;
@@ -718,6 +827,7 @@ declare const SpecSchema: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
718
827
  color?: string | undefined;
719
828
  background?: string | undefined;
720
829
  }[];
830
+ background?: string | undefined;
721
831
  }[];
722
832
  marks: {
723
833
  line: number;
@@ -754,6 +864,7 @@ declare const SpecSchema: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
754
864
  color?: string | undefined;
755
865
  background?: string | undefined;
756
866
  }[];
867
+ background?: string | undefined;
757
868
  }[];
758
869
  marks: {
759
870
  line: number;
@@ -769,6 +880,7 @@ declare const SpecSchema: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
769
880
  frame: boolean;
770
881
  titleBar: boolean;
771
882
  tabs: boolean;
883
+ background?: string | undefined;
772
884
  controls: "color" | "gray";
773
885
  title?: string | undefined;
774
886
  split: "column" | "row";
@@ -802,6 +914,7 @@ declare const SpecSchema: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
802
914
  color?: string | undefined;
803
915
  background?: string | undefined;
804
916
  }[];
917
+ background?: string | undefined;
805
918
  }[];
806
919
  marks: {
807
920
  line: number;
@@ -817,6 +930,7 @@ declare const SpecSchema: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
817
930
  frame: boolean;
818
931
  titleBar: boolean;
819
932
  tabs: boolean;
933
+ background?: string | undefined;
820
934
  controls: "color" | "gray";
821
935
  title?: string | undefined;
822
936
  split: "column" | "row";
@@ -850,6 +964,7 @@ declare const SpecSchema: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
850
964
  color?: string | undefined;
851
965
  background?: string | undefined;
852
966
  }[];
967
+ background?: string | undefined;
853
968
  }[];
854
969
  marks: {
855
970
  line: number;
@@ -865,6 +980,7 @@ declare const SpecSchema: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
865
980
  frame: boolean;
866
981
  titleBar: boolean;
867
982
  tabs: boolean;
983
+ background?: string | undefined;
868
984
  controls: "color" | "gray";
869
985
  title?: string | undefined;
870
986
  split: "column" | "row";
@@ -898,6 +1014,7 @@ declare const SpecSchema: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
898
1014
  color?: string | undefined;
899
1015
  background?: string | undefined;
900
1016
  }[];
1017
+ background?: string | undefined;
901
1018
  }[];
902
1019
  marks: {
903
1020
  line: number;
@@ -913,6 +1030,7 @@ declare const SpecSchema: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
913
1030
  frame: boolean;
914
1031
  titleBar: boolean;
915
1032
  tabs: boolean;
1033
+ background?: string | undefined;
916
1034
  controls: "color" | "gray";
917
1035
  title?: string | undefined;
918
1036
  split: "column" | "row";
@@ -946,6 +1064,7 @@ declare const SpecSchema: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
946
1064
  color?: string | undefined;
947
1065
  background?: string | undefined;
948
1066
  }[];
1067
+ background?: string | undefined;
949
1068
  }[];
950
1069
  marks: {
951
1070
  line: number;
@@ -963,7 +1082,8 @@ declare const SpecSchema: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
963
1082
  v: 1;
964
1083
  theme: string;
965
1084
  mode: "dark" | "light";
966
- background: boolean;
1085
+ background?: string | undefined;
1086
+ backgroundOpacity: number;
967
1087
  padding: number;
968
1088
  font?: string | undefined;
969
1089
  lineNumbers?: boolean | undefined;
@@ -976,6 +1096,7 @@ declare const SpecSchema: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
976
1096
  frame: boolean;
977
1097
  titleBar: boolean;
978
1098
  tabs: boolean;
1099
+ background?: string | undefined;
979
1100
  controls: "color" | "gray";
980
1101
  title?: string | undefined;
981
1102
  split: "column" | "row";
@@ -1009,6 +1130,7 @@ declare const SpecSchema: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1009
1130
  color?: string | undefined;
1010
1131
  background?: string | undefined;
1011
1132
  }[];
1133
+ background?: string | undefined;
1012
1134
  }[];
1013
1135
  marks: {
1014
1136
  line: number;
@@ -1026,7 +1148,8 @@ declare const SpecSchema: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1026
1148
  v: 1;
1027
1149
  theme: string;
1028
1150
  mode: "dark" | "light";
1029
- background: boolean;
1151
+ background?: string | undefined;
1152
+ backgroundOpacity: number;
1030
1153
  padding: number;
1031
1154
  font?: string | undefined;
1032
1155
  lineNumbers?: boolean | undefined;
@@ -1039,6 +1162,7 @@ declare const SpecSchema: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1039
1162
  frame: boolean;
1040
1163
  titleBar: boolean;
1041
1164
  tabs: boolean;
1165
+ background?: string | undefined;
1042
1166
  controls: "color" | "gray";
1043
1167
  title?: string | undefined;
1044
1168
  split: "column" | "row";
@@ -1072,6 +1196,7 @@ declare const SpecSchema: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1072
1196
  color?: string | undefined;
1073
1197
  background?: string | undefined;
1074
1198
  }[];
1199
+ background?: string | undefined;
1075
1200
  }[];
1076
1201
  marks: {
1077
1202
  line: number;
@@ -1102,9 +1227,9 @@ declare class SpecError extends Error {
1102
1227
  constructor(issues: Array<string>);
1103
1228
  }
1104
1229
  /**
1105
- * Validates a spec and applies the defaults. It first removes the keys of other tools and changes
1106
- * the fields of older specs, then validates the spec with the schema of its version and changes it
1107
- * to the latest version. Throws a SpecError that lists every issue.
1230
+ * Validates a spec and applies the defaults. It first removes the keys of other tools, then
1231
+ * validates the spec with the schema of its version and changes it to the latest version. Throws a
1232
+ * SpecError that lists every issue.
1108
1233
  */
1109
1234
  declare function parseSpec(input: unknown): Spec;
1110
1235
  /** Expands highlight entries such as [2, "4-6"] to a set of line numbers, up to the last line */
@@ -1120,4 +1245,4 @@ type SvgOptions = {
1120
1245
  };
1121
1246
  /** Writes the scene as a standalone SVG document */
1122
1247
  declare function toSvg(scene: Scene, options?: SvgOptions): string;
1123
- export { highlight as $, SVG_NAMESPACE as A, CODE_FONTS as At, Scene as B, cssFontFamily as Bt, migrateLegacySpec as C, AUTO_ICON as Ct, METADATA_BY_DEFAULT as D, NO_ICON as Dt, ImageMetadata as E, Icon as Et, LINE_HEIGHT as F, FontFace as Ft, cellCount as G, TextMetrics as H, getFace as Ht, LayoutOptions as I, FontLoader as It, MAC_HEADER as J, layout as K, POPOVER as L, FontMetrics as Lt, createImageMetadata as M, CodeFont as Mt, readImageSpec as N, DEFAULT_CODE_FONT as Nt, PNG_KEYWORDS as O, getIcon as Ot, FONT_SIZE as P, Font as Pt, Token as Q, PaneBox as R, UI_FONT as Rt, IMPLICIT_SPEC_VERSION as S, specJsonSchema as St, stampSpecVersion as T, ICON_IDS as Tt, WINDOW_RADIUS as U, measureUiText as Ut, TAB_HEADER as V, getCodeFont as Vt, WindowBox as W, LANGUAGE_IDS as X, HighlightedLine as Y, PLAIN_TEXT as Z, initPng as _, decodeSpec as _t, MARK_STYLES as a, Mode as at, svgToPng as b, SPEC_SCHEMA_URL as bt, SPEC_LIMITS as c, THEME_IDS as ct, SpecInput as d, getSyntax as dt, inferLanguage as et, SpecSchema as f, getTheme as ft, PngOptions as g, createLink as gt, parseSpec as h, DecodeOptions as ht, LATEST_SPEC_VERSION as i, FrameColors as it, addPngMetadata as j, CODE_FONT_IDS as jt, SOFTWARE as k, resolveIcon as kt, Spec as l, Theme as lt, expandLineRanges as m, DEFAULT_APP_URL as mt, toSvg as n, resolveLanguage as nt, MarkStyle as o, Syntax as ot, WindowSpec as p, resolveMode as pt, normalizeCode as q, ANNOTATION_TYPES as r, DEFAULT_THEME as rt, PaneSpec as s, THEMES as st, SvgOptions as t, isKnownLanguage as tt, SpecError as u, getFrameColors as ut, loadSceneFonts as v, encodeSpec as vt, schemaVersion as w, FILE_ICON as wt, EXTENSION_PREFIX as x, isSpecSchemaUrl as xt, sceneFontFiles as y, readLink as yt, Rect as z, UiFont as zt };
1248
+ export { WindowBox as $, getFrameColors as $t, addPngMetadata as A, AMBIENT_ENABLED as At, isSpecSchemaUrl as B, highlight as Bt, schemaVersion as C, getFace as Ct, PNG_KEYWORDS as D, BackgroundPreset as Dt, METADATA_BY_DEFAULT as E, BACKGROUNDS as Et, createLink as F, LANGUAGES as Ft, LayoutOptions as G, DEFAULT_THEME as Gt, isCssBackground as H, isKnownLanguage as Ht, decodeSpec as I, LANGUAGE_IDS as It, Rect as J, Mode as Jt, POPOVER as K, EditorWindow as Kt, encodeSpec as L, LanguageInfo as Lt, readImageSpec as M, ambientPreviewCss as Mt, DEFAULT_APP_URL as N, isAmbientBackground as Nt, SOFTWARE as O, themeBackground as Ot, DecodeOptions as P, HighlightedLine as Pt, WINDOW_RADIUS as Q, Theme as Qt, readLink as R, PLAIN_TEXT as Rt, IMPLICIT_SPEC_VERSION as S, getCodeFont as St, ImageMetadata as T, measureUiText as Tt, FONT_SIZE as U, languageName as Ut, specJsonSchema as V, inferLanguage as Vt, LINE_HEIGHT as W, resolveLanguage as Wt, TAB_HEADER as X, THEMES as Xt, Scene as Y, Syntax as Yt, TextMetrics as Z, THEME_IDS as Zt, initPng as _, FontLoader as _t, MARK_STYLES as a, FILE_ICON as at, svgToPng as b, UiFont as bt, SPEC_LIMITS as c, NO_ICON as ct, SpecInput as d, CODE_FONTS as dt, getSyntax as en, cellCount as et, SpecSchema as f, CODE_FONT_IDS as ft, PngOptions as g, FontFace as gt, parseSpec as h, Font as ht, LATEST_SPEC_VERSION as i, AUTO_ICON as it, createImageMetadata as j, AmbientBackground as jt, SVG_NAMESPACE as k, AMBIENT_BACKGROUNDS as kt, Spec as l, getIcon as lt, expandLineRanges as m, DEFAULT_CODE_FONT as mt, toSvg as n, resolveMode as nn, normalizeCode as nt, MarkStyle as o, ICON_IDS as ot, WindowSpec as p, CodeFont as pt, PaneBox as q, FrameColors as qt, ANNOTATION_TYPES as r, MAC_HEADER as rt, PaneSpec as s, Icon as st, SvgOptions as t, getTheme as tn, layout as tt, SpecError as u, resolveIcon as ut, loadSceneFonts as v, FontMetrics as vt, stampSpecVersion as w, measureCodeText as wt, EXTENSION_PREFIX as x, cssFontFamily as xt, sceneFontFiles as y, UI_FONT as yt, SPEC_SCHEMA_URL as z, Token as zt };
package/dist/index.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- import { $ as highlight, A as SVG_NAMESPACE, At as CODE_FONTS, B as Scene, Bt as cssFontFamily, C as migrateLegacySpec, Ct as AUTO_ICON, D as METADATA_BY_DEFAULT, Dt as NO_ICON, E as ImageMetadata, Et as Icon, F as LINE_HEIGHT, Ft as FontFace, G as cellCount, H as TextMetrics, Ht as getFace, I as LayoutOptions, It as FontLoader, J as MAC_HEADER, K as layout, L as POPOVER, Lt as FontMetrics, M as createImageMetadata, Mt as CodeFont, N as readImageSpec, Nt as DEFAULT_CODE_FONT, O as PNG_KEYWORDS, Ot as getIcon, P as FONT_SIZE, Pt as Font, Q as Token, R as PaneBox, Rt as UI_FONT, S as IMPLICIT_SPEC_VERSION, St as specJsonSchema, T as stampSpecVersion, Tt as ICON_IDS, U as WINDOW_RADIUS, Ut as measureUiText, V as TAB_HEADER, Vt as getCodeFont, W as WindowBox, X as LANGUAGE_IDS, Y as HighlightedLine, Z as PLAIN_TEXT, _ as initPng, _t as decodeSpec, a as MARK_STYLES, at as Mode, b as svgToPng, bt as SPEC_SCHEMA_URL, c as SPEC_LIMITS, ct as THEME_IDS, d as SpecInput, dt as getSyntax, et as inferLanguage, f as SpecSchema, ft as getTheme, g as PngOptions, gt as createLink, h as parseSpec, ht as DecodeOptions, i as LATEST_SPEC_VERSION, it as FrameColors, j as addPngMetadata, jt as CODE_FONT_IDS, k as SOFTWARE, kt as resolveIcon, l as Spec, lt as Theme, m as expandLineRanges, mt as DEFAULT_APP_URL, n as toSvg, nt as resolveLanguage, o as MarkStyle, ot as Syntax, p as WindowSpec, pt as resolveMode, q as normalizeCode, r as ANNOTATION_TYPES, rt as DEFAULT_THEME, s as PaneSpec, st as THEMES, t as SvgOptions, tt as isKnownLanguage, u as SpecError, ut as getFrameColors, v as loadSceneFonts, vt as encodeSpec, w as schemaVersion, wt as FILE_ICON, x as EXTENSION_PREFIX, xt as isSpecSchemaUrl, y as sceneFontFiles, yt as readLink, z as Rect, zt as UiFont } from "./index-blYEvwPp.mjs";
2
- export { ANNOTATION_TYPES, AUTO_ICON, CODE_FONTS, CODE_FONT_IDS, CodeFont, DEFAULT_APP_URL, DEFAULT_CODE_FONT, DEFAULT_THEME, type DecodeOptions, EXTENSION_PREFIX, FILE_ICON, FONT_SIZE, Font, FontFace, FontLoader, FontMetrics, FrameColors, type HighlightedLine, ICON_IDS, IMPLICIT_SPEC_VERSION, type Icon, type ImageMetadata, LANGUAGE_IDS, LATEST_SPEC_VERSION, LINE_HEIGHT, type LayoutOptions, MAC_HEADER, MARK_STYLES, METADATA_BY_DEFAULT, type MarkStyle, Mode, NO_ICON, PLAIN_TEXT, PNG_KEYWORDS, POPOVER, type PaneBox, type PaneSpec, type PngOptions, type Rect, SOFTWARE, SPEC_LIMITS, SPEC_SCHEMA_URL, SVG_NAMESPACE, type Scene, type Spec, SpecError, type SpecInput, SpecSchema, type SvgOptions, Syntax, TAB_HEADER, THEMES, THEME_IDS, type TextMetrics, Theme, type Token, UI_FONT, UiFont, WINDOW_RADIUS, type WindowBox, type WindowSpec, addPngMetadata, cellCount, createImageMetadata, createLink, cssFontFamily, decodeSpec, encodeSpec, expandLineRanges, getCodeFont, getFace, getFrameColors, getIcon, getSyntax, getTheme, highlight, inferLanguage, initPng, isKnownLanguage, isSpecSchemaUrl, layout, loadSceneFonts, measureUiText, migrateLegacySpec, normalizeCode, parseSpec, readImageSpec, readLink, resolveIcon, resolveLanguage, resolveMode, sceneFontFiles, schemaVersion, specJsonSchema, stampSpecVersion, svgToPng, toSvg };
1
+ import { $ as WindowBox, $t as getFrameColors, A as addPngMetadata, At as AMBIENT_ENABLED, B as isSpecSchemaUrl, Bt as highlight, C as schemaVersion, Ct as getFace, D as PNG_KEYWORDS, Dt as BackgroundPreset, E as METADATA_BY_DEFAULT, Et as BACKGROUNDS, F as createLink, Ft as LANGUAGES, G as LayoutOptions, Gt as DEFAULT_THEME, H as isCssBackground, Ht as isKnownLanguage, I as decodeSpec, It as LANGUAGE_IDS, J as Rect, Jt as Mode, K as POPOVER, Kt as EditorWindow, L as encodeSpec, Lt as LanguageInfo, M as readImageSpec, Mt as ambientPreviewCss, N as DEFAULT_APP_URL, Nt as isAmbientBackground, O as SOFTWARE, Ot as themeBackground, P as DecodeOptions, Pt as HighlightedLine, Q as WINDOW_RADIUS, Qt as Theme, R as readLink, Rt as PLAIN_TEXT, S as IMPLICIT_SPEC_VERSION, St as getCodeFont, T as ImageMetadata, Tt as measureUiText, U as FONT_SIZE, Ut as languageName, V as specJsonSchema, Vt as inferLanguage, W as LINE_HEIGHT, Wt as resolveLanguage, X as TAB_HEADER, Xt as THEMES, Y as Scene, Yt as Syntax, Z as TextMetrics, Zt as THEME_IDS, _ as initPng, _t as FontLoader, a as MARK_STYLES, at as FILE_ICON, b as svgToPng, bt as UiFont, c as SPEC_LIMITS, ct as NO_ICON, d as SpecInput, dt as CODE_FONTS, en as getSyntax, et as cellCount, f as SpecSchema, ft as CODE_FONT_IDS, g as PngOptions, gt as FontFace, h as parseSpec, ht as Font, i as LATEST_SPEC_VERSION, it as AUTO_ICON, j as createImageMetadata, jt as AmbientBackground, k as SVG_NAMESPACE, kt as AMBIENT_BACKGROUNDS, l as Spec, lt as getIcon, m as expandLineRanges, mt as DEFAULT_CODE_FONT, n as toSvg, nn as resolveMode, nt as normalizeCode, o as MarkStyle, ot as ICON_IDS, p as WindowSpec, pt as CodeFont, q as PaneBox, qt as FrameColors, r as ANNOTATION_TYPES, rt as MAC_HEADER, s as PaneSpec, st as Icon, t as SvgOptions, tn as getTheme, tt as layout, u as SpecError, ut as resolveIcon, v as loadSceneFonts, vt as FontMetrics, w as stampSpecVersion, wt as measureCodeText, x as EXTENSION_PREFIX, xt as cssFontFamily, y as sceneFontFiles, yt as UI_FONT, z as SPEC_SCHEMA_URL, zt as Token } from "./index-Bjaw7_tu.mjs";
2
+ export { AMBIENT_BACKGROUNDS, AMBIENT_ENABLED, ANNOTATION_TYPES, AUTO_ICON, type AmbientBackground, BACKGROUNDS, type BackgroundPreset, CODE_FONTS, CODE_FONT_IDS, CodeFont, DEFAULT_APP_URL, DEFAULT_CODE_FONT, DEFAULT_THEME, type DecodeOptions, EXTENSION_PREFIX, EditorWindow, FILE_ICON, FONT_SIZE, Font, FontFace, FontLoader, FontMetrics, FrameColors, type HighlightedLine, ICON_IDS, IMPLICIT_SPEC_VERSION, type Icon, type ImageMetadata, LANGUAGES, LANGUAGE_IDS, LATEST_SPEC_VERSION, LINE_HEIGHT, type LanguageInfo, type LayoutOptions, MAC_HEADER, MARK_STYLES, METADATA_BY_DEFAULT, type MarkStyle, Mode, NO_ICON, PLAIN_TEXT, PNG_KEYWORDS, POPOVER, type PaneBox, type PaneSpec, type PngOptions, type Rect, SOFTWARE, SPEC_LIMITS, SPEC_SCHEMA_URL, SVG_NAMESPACE, type Scene, type Spec, SpecError, type SpecInput, SpecSchema, type SvgOptions, Syntax, TAB_HEADER, THEMES, THEME_IDS, type TextMetrics, Theme, type Token, UI_FONT, UiFont, WINDOW_RADIUS, type WindowBox, type WindowSpec, addPngMetadata, ambientPreviewCss, cellCount, createImageMetadata, createLink, cssFontFamily, decodeSpec, encodeSpec, expandLineRanges, getCodeFont, getFace, getFrameColors, getIcon, getSyntax, getTheme, highlight, inferLanguage, initPng, isAmbientBackground, isCssBackground, isKnownLanguage, isSpecSchemaUrl, languageName, layout, loadSceneFonts, measureCodeText, measureUiText, normalizeCode, parseSpec, readImageSpec, readLink, resolveIcon, resolveLanguage, resolveMode, sceneFontFiles, schemaVersion, specJsonSchema, stampSpecVersion, svgToPng, themeBackground, toSvg };
package/dist/index.mjs CHANGED
@@ -1 +1 @@
1
- export { T as ANNOTATION_TYPES, nt as AUTO_ICON, ct as CODE_FONTS, lt as CODE_FONT_IDS, K as DEFAULT_APP_URL, ut as DEFAULT_CODE_FONT, N as DEFAULT_THEME, Z as EXTENSION_PREFIX, rt as FILE_ICON, p as FONT_SIZE, it as ICON_IDS, Q as IMPLICIT_SPEC_VERSION, B as LANGUAGE_IDS, E as LATEST_SPEC_VERSION, m as LINE_HEIGHT, x as MAC_HEADER, D as MARK_STYLES, o as METADATA_BY_DEFAULT, at as NO_ICON, V as PLAIN_TEXT, s as PNG_KEYWORDS, h as POPOVER, c as SOFTWARE, O as SPEC_LIMITS, S as SPEC_SCHEMA_URL, l as SVG_NAMESPACE, k as SpecError, A as SpecSchema, g as TAB_HEADER, P as THEMES, F as THEME_IDS, dt as UI_FONT, _ as WINDOW_RADIUS, u as addPngMetadata, v as cellCount, d as createImageMetadata, q as createLink, ft as cssFontFamily, J as decodeSpec, Y as encodeSpec, j as expandLineRanges, pt as getCodeFont, mt as getFace, I as getFrameColors, ot as getIcon, L as getSyntax, R as getTheme, H as highlight, U as inferLanguage, n as initPng, W as isKnownLanguage, C as isSpecSchemaUrl, y as layout, r as loadSceneFonts, ht as measureUiText, $ as migrateLegacySpec, b as normalizeCode, M as parseSpec, f as readImageSpec, X as readLink, st as resolveIcon, G as resolveLanguage, z as resolveMode, i as sceneFontFiles, et as schemaVersion, w as specJsonSchema, tt as stampSpecVersion, a as svgToPng, t as toSvg } from "./src-VhDXsdB0.mjs";
1
+ export { it as AMBIENT_BACKGROUNDS, at as AMBIENT_ENABLED, T as ANNOTATION_TYPES, X as AUTO_ICON, nt as BACKGROUNDS, gt as CODE_FONTS, _t as CODE_FONT_IDS, V as DEFAULT_APP_URL, vt as DEFAULT_CODE_FONT, ct as DEFAULT_THEME, K as EXTENSION_PREFIX, Z as FILE_ICON, p as FONT_SIZE, Q as ICON_IDS, q as IMPLICIT_SPEC_VERSION, N as LANGUAGES, P as LANGUAGE_IDS, E as LATEST_SPEC_VERSION, m as LINE_HEIGHT, x as MAC_HEADER, D as MARK_STYLES, o as METADATA_BY_DEFAULT, $ as NO_ICON, F as PLAIN_TEXT, s as PNG_KEYWORDS, h as POPOVER, c as SOFTWARE, O as SPEC_LIMITS, S as SPEC_SCHEMA_URL, l as SVG_NAMESPACE, k as SpecError, A as SpecSchema, g as TAB_HEADER, lt as THEMES, ut as THEME_IDS, yt as UI_FONT, _ as WINDOW_RADIUS, u as addPngMetadata, ot as ambientPreviewCss, v as cellCount, d as createImageMetadata, H as createLink, bt as cssFontFamily, U as decodeSpec, W as encodeSpec, j as expandLineRanges, xt as getCodeFont, St as getFace, dt as getFrameColors, et as getIcon, ft as getSyntax, pt as getTheme, I as highlight, L as inferLanguage, n as initPng, st as isAmbientBackground, ht as isCssBackground, R as isKnownLanguage, C as isSpecSchemaUrl, z as languageName, y as layout, r as loadSceneFonts, Ct as measureCodeText, wt as measureUiText, b as normalizeCode, M as parseSpec, f as readImageSpec, G as readLink, tt as resolveIcon, B as resolveLanguage, mt as resolveMode, i as sceneFontFiles, J as schemaVersion, w as specJsonSchema, Y as stampSpecVersion, a as svgToPng, rt as themeBackground, t as toSvg } from "./src-B_SjzWhY.mjs";