@tin.so/core 0.2.0 → 0.3.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;
@@ -196,6 +95,101 @@ declare function resolveLanguage(language: string): string;
196
95
  declare function inferLanguage(fileName: string | undefined): string;
197
96
  /** Splits code into lines of colored tokens with the colors of the theme */
198
97
  declare function highlight(code: string, language: string, theme: Theme, mode: Mode, syntax: Syntax): Promise<Array<HighlightedLine>>;
98
+ /**
99
+ * Backgrounds that the renderer makes from the colors of the image:
100
+ * - ambient-blur: a blurred and larger copy of the code behind the window
101
+ * - ambient-code: a mesh of the colors that the code uses most
102
+ * - ambient-theme: a mesh of the keyword, string, function and constant colors of the theme
103
+ */
104
+ declare const AMBIENT_BACKGROUNDS: readonly ["ambient-blur", "ambient-code", "ambient-theme"];
105
+ declare const AMBIENT_ENABLED = false;
106
+ type AmbientBackground = (typeof AMBIENT_BACKGROUNDS)[number];
107
+ declare function isAmbientBackground(css: string): css is AmbientBackground;
108
+ /** The theme mesh of a theme in a mode, as a preview of the ambient backgrounds before the code is known */
109
+ declare function ambientPreviewCss(theme: Theme, mode: Mode): string;
110
+ /** A background preset of the editor: a gradient, a color or a mesh of radial gradients */
111
+ type BackgroundPreset = {
112
+ id: string;
113
+ name: string;
114
+ kind: "gradient" | "color" | "mesh";
115
+ /** The CSS background, as the background field of a spec takes it */
116
+ css: string;
117
+ };
118
+ declare const BACKGROUNDS: Array<BackgroundPreset>;
119
+ /** The background preset of a theme in a mode, or undefined when the theme has none */
120
+ declare function themeBackground(theme: Theme, mode: Mode): BackgroundPreset | undefined;
121
+ type FontFace = {
122
+ weight: number;
123
+ italic: boolean;
124
+ /** Path relative to the fonts directory of this package */
125
+ file: string;
126
+ /** Family name inside the font file, which resvg uses to match the face */
127
+ family: string;
128
+ };
129
+ type FontMetrics = {
130
+ unitsPerEm: number;
131
+ ascender: number;
132
+ descender: number;
133
+ lineGap: number;
134
+ };
135
+ type CodeFont = {
136
+ id: string;
137
+ name: string;
138
+ kind: "code";
139
+ faces: Array<FontFace>;
140
+ metrics: FontMetrics & {
141
+ advance: number;
142
+ };
143
+ };
144
+ type UiFont = {
145
+ id: string;
146
+ name: string;
147
+ kind: "ui";
148
+ faces: Array<FontFace>;
149
+ metrics: FontMetrics & {
150
+ advances: Record<string, number>;
151
+ };
152
+ };
153
+ type Font = CodeFont | UiFont;
154
+ /** Reads a font file by its path relative to the fonts directory */
155
+ type FontLoader = (file: string) => Promise<Uint8Array>;
156
+ declare const CODE_FONTS: CodeFont[];
157
+ declare const CODE_FONT_IDS: string[];
158
+ declare const DEFAULT_CODE_FONT = "jetbrains-mono";
159
+ declare const UI_FONT: UiFont;
160
+ declare function getCodeFont(id: string): CodeFont;
161
+ /** Picks the face that matches the style best: the exact face, then the regular face of the same style */
162
+ declare function getFace(font: Font, style?: {
163
+ bold?: boolean;
164
+ italic?: boolean;
165
+ }): FontFace;
166
+ /**
167
+ * The CSS font family of a face. The first name is for browsers, which load the faces with @font-face
168
+ * rules under that name. The second name is the family inside the file, for resvg. The names stay
169
+ * unquoted, because resvg does not match a quoted name that follows another name.
170
+ */
171
+ declare function cssFontFamily(font: Font, face: FontFace): string;
172
+ /** Width of a text in the UI font, for title layout. Characters outside of ASCII count as an "M". */
173
+ /** The width of text in a code font, which gives each character the same advance */
174
+ declare function measureCodeText(text: string, fontSize: number, font: CodeFont): number;
175
+ declare function measureUiText(text: string, fontSize: number): number;
176
+ /** An icon on a 24px grid, drawn either filled or as a 2px stroke */
177
+ type Icon = {
178
+ id: string;
179
+ title: string;
180
+ /** SVG elements of the icon, without the root element */
181
+ body: string;
182
+ style: "fill" | "stroke";
183
+ };
184
+ /** The icon of the language, from its id in the language list */
185
+ declare const AUTO_ICON = "auto";
186
+ declare const FILE_ICON = "file";
187
+ declare const NO_ICON = "none";
188
+ /** Icon ids that a pane can name, besides "auto" and "none" */
189
+ declare const ICON_IDS: string[];
190
+ declare function getIcon(id: string): Icon | undefined;
191
+ /** Resolves the icon setting of a pane. Returns undefined for "none". */
192
+ declare function resolveIcon(setting: string, language: string): Icon | undefined;
199
193
  declare const MAC_HEADER: {
200
194
  paddingTop: number;
201
195
  height: number;
@@ -247,6 +241,8 @@ type AnnotationBox = {
247
241
  lines: Array<HighlightedLine>;
248
242
  /** true when the popover is smaller than its code, so that it must cut the code off */
249
243
  clipped: boolean;
244
+ /** The background of the popover from the spec */
245
+ background?: string;
250
246
  };
251
247
  type PaneBox = Rect & {
252
248
  title?: string;
@@ -292,6 +288,8 @@ type WindowBox = Rect & {
292
288
  radius: number;
293
289
  title?: string;
294
290
  controls: "gray" | "color";
291
+ /** The background of the window from the spec, in place of the theme color */
292
+ background?: string;
295
293
  /** The size that fits the panes. The layout can make a window larger to fill the image. */
296
294
  natural: {
297
295
  width: number;
@@ -315,7 +313,14 @@ type Scene = {
315
313
  mode: Mode;
316
314
  syntax: Syntax;
317
315
  frame: FrameColors;
316
+ /** false for a transparent image */
318
317
  background: boolean;
318
+ /** The opacity of the background, from 0 to 1 */
319
+ backgroundOpacity: number;
320
+ /** The color or gradient of the image: the one of the spec, or the background preset of the theme */
321
+ customBackground: CssBackground | undefined;
322
+ /** Draw a blurred copy of the code of each window behind it, over the background color */
323
+ ambientBlur: boolean;
319
324
  font: CodeFont;
320
325
  text: TextMetrics;
321
326
  popoverText: TextMetrics;
@@ -334,6 +339,99 @@ type LayoutOptions = {
334
339
  declare function normalizeCode(code: string, options?: LayoutOptions): string;
335
340
  /** Validates the spec, highlights the code and places every element of the image */
336
341
  declare function layout(input: unknown, options?: LayoutOptions): Promise<Scene>;
342
+ /**
343
+ * The CSS backgrounds that a spec can use: a color, or layers of linear-gradient and
344
+ * radial-gradient with an optional color as the last layer. Colors are hex, rgb(), rgba() and
345
+ * transparent.
346
+ */
347
+ type Rgba = {
348
+ r: number;
349
+ g: number;
350
+ b: number;
351
+ a: number;
352
+ };
353
+ type Length = {
354
+ value: number;
355
+ unit: "%" | "px";
356
+ };
357
+ type ColorStop = {
358
+ color: Rgba;
359
+ position?: Length;
360
+ };
361
+ type Extent = "closest-side" | "closest-corner" | "farthest-side" | "farthest-corner";
362
+ type LinearLayer = {
363
+ type: "linear";
364
+ /** An angle in degrees, or the corner or side of a "to" keyword as -1, 0 or 1 on each axis */
365
+ direction: {
366
+ angle: number;
367
+ } | {
368
+ to: {
369
+ x: number;
370
+ y: number;
371
+ };
372
+ };
373
+ stops: Array<ColorStop>;
374
+ };
375
+ type RadialLayer = {
376
+ type: "radial";
377
+ shape: "circle" | "ellipse";
378
+ size: Extent | {
379
+ x: Length;
380
+ y: Length;
381
+ };
382
+ at: {
383
+ x: Length;
384
+ y: Length;
385
+ };
386
+ stops: Array<ColorStop>;
387
+ };
388
+ type ColorLayer = {
389
+ type: "color";
390
+ color: Rgba;
391
+ };
392
+ type Layer = LinearLayer | RadialLayer | ColorLayer;
393
+ /** A parsed CSS background, with the top layer first as in CSS */
394
+ type CssBackground = Array<Layer>;
395
+ declare function isCssBackground(css: string): boolean;
396
+ /** The URL of the JSON Schema of the latest spec version, on the hosted app */
397
+ declare const SPEC_SCHEMA_URL: string;
398
+ /**
399
+ * The spec as a JSON Schema, for editors and agents. JSON Schema cannot express the custom checks of
400
+ * the spec, such as line ranges, so their rules are only in the descriptions.
401
+ */
402
+ declare function specJsonSchema(): Record<string, unknown>;
403
+ /**
404
+ * True when the value is the URL of a tin.so spec schema: a path that ends with
405
+ * /schema/v<number>.json on the host of the hosted app, on an earlier host of the app, or on the
406
+ * host of the given app URL (for example a local editor).
407
+ */
408
+ declare function isSpecSchemaUrl(value: unknown, appUrl?: string): boolean;
409
+ /**
410
+ * The hosted web app. The CLI takes another app from its TIN_APP_URL environment variable,
411
+ * for example the local editor during development.
412
+ */
413
+ declare const DEFAULT_APP_URL = "https://tin.so/";
414
+ type DecodeOptions = {
415
+ /** The largest size of the inflated spec in bytes, so that a hostile input cannot use much memory */
416
+ maxBytes?: number;
417
+ };
418
+ /**
419
+ * Compresses a spec into a URL-safe string. A spec without a version gets version 1, so that the
420
+ * link keeps its meaning when a later version changes the format.
421
+ */
422
+ declare function encodeSpec(spec: unknown): Promise<string>;
423
+ /**
424
+ * Reads a spec from a string of the encoder, with the fields of older links changed. Throws for
425
+ * bad data and for a spec larger than the limit.
426
+ */
427
+ declare function decodeSpec(encoded: string, options?: DecodeOptions): Promise<unknown>;
428
+ /**
429
+ * A link that opens the spec in the web app. The spec is in the fragment, so it never goes to a
430
+ * server and has no length limit of a request line.
431
+ */
432
+ declare function createLink(spec: unknown, appUrl?: string): Promise<string>;
433
+ /** Reads the spec from the fragment of a link, or returns undefined when the fragment has none */
434
+ declare function readLink(link: string, options?: DecodeOptions): Promise<unknown>;
337
435
  /**
338
436
  * Whether a render writes the metadata when the caller does not say. This is the one place to
339
437
  * change the default.
@@ -386,12 +484,6 @@ declare function schemaVersion(spec: unknown): number | undefined;
386
484
  * them in each object of a spec, so that a spec with such keys stays valid in all versions.
387
485
  */
388
486
  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
487
  /**
396
488
  * Adds the version to a spec without one, so that a stored spec keeps its meaning when a later
397
489
  * version changes the format. The version comes from the $schema URL, or is version 1 without it.
@@ -449,9 +541,10 @@ declare const LATEST_SPEC_VERSION = 1;
449
541
  declare const SpecSchema: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
450
542
  readonly $schema: v.SchemaWithPipe<readonly [v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>, undefined>, v.DescriptionAction<string | undefined, string>]>;
451
543
  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>]>;
544
+ readonly theme: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<string[], undefined>, "github">, v.DescriptionAction<string, string>]>;
453
545
  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>]>;
546
+ 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>]>;
547
+ 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
548
  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
549
  readonly font: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<string[], undefined>, undefined>, v.DescriptionAction<string | undefined, string>]>;
457
550
  readonly lineNumbers: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, undefined>, v.DescriptionAction<boolean | undefined, string>]>;
@@ -464,6 +557,7 @@ declare const SpecSchema: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
464
557
  readonly frame: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, true>, v.DescriptionAction<boolean, string>]>;
465
558
  readonly titleBar: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, true>, v.DescriptionAction<boolean, string>]>;
466
559
  readonly tabs: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, string>]>;
560
+ 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
561
  readonly controls: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<["gray", "color"], undefined>, "gray">, v.DescriptionAction<"color" | "gray", string>]>;
468
562
  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
563
  readonly split: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<["row", "column"], undefined>, "row">, v.DescriptionAction<"column" | "row", string>]>;
@@ -525,6 +619,7 @@ declare const SpecSchema: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
525
619
  color?: string | undefined;
526
620
  background?: string | undefined;
527
621
  }[], string>]>;
622
+ 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
623
  }, undefined>, undefined>, v.MaxLengthAction<{
529
624
  type: "popover";
530
625
  line: number;
@@ -544,6 +639,7 @@ declare const SpecSchema: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
544
639
  color?: string | undefined;
545
640
  background?: string | undefined;
546
641
  }[];
642
+ background?: string | undefined;
547
643
  }[], number, (issue: v.MaxLengthIssue<{
548
644
  type: "popover";
549
645
  line: number;
@@ -563,6 +659,7 @@ declare const SpecSchema: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
563
659
  color?: string | undefined;
564
660
  background?: string | undefined;
565
661
  }[];
662
+ background?: string | undefined;
566
663
  }[], number>) => string>]>, readonly []>, v.DescriptionAction<{
567
664
  type: "popover";
568
665
  line: number;
@@ -582,6 +679,7 @@ declare const SpecSchema: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
582
679
  color?: string | undefined;
583
680
  background?: string | undefined;
584
681
  }[];
682
+ background?: string | undefined;
585
683
  }[], string>]>;
586
684
  readonly marks: v.SchemaWithPipe<readonly [v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
587
685
  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 +744,7 @@ declare const SpecSchema: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
646
744
  color?: string | undefined;
647
745
  background?: string | undefined;
648
746
  }[];
747
+ background?: string | undefined;
649
748
  }[];
650
749
  marks: {
651
750
  line: number;
@@ -682,6 +781,7 @@ declare const SpecSchema: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
682
781
  color?: string | undefined;
683
782
  background?: string | undefined;
684
783
  }[];
784
+ background?: string | undefined;
685
785
  }[];
686
786
  marks: {
687
787
  line: number;
@@ -718,6 +818,7 @@ declare const SpecSchema: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
718
818
  color?: string | undefined;
719
819
  background?: string | undefined;
720
820
  }[];
821
+ background?: string | undefined;
721
822
  }[];
722
823
  marks: {
723
824
  line: number;
@@ -754,6 +855,7 @@ declare const SpecSchema: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
754
855
  color?: string | undefined;
755
856
  background?: string | undefined;
756
857
  }[];
858
+ background?: string | undefined;
757
859
  }[];
758
860
  marks: {
759
861
  line: number;
@@ -769,6 +871,7 @@ declare const SpecSchema: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
769
871
  frame: boolean;
770
872
  titleBar: boolean;
771
873
  tabs: boolean;
874
+ background?: string | undefined;
772
875
  controls: "color" | "gray";
773
876
  title?: string | undefined;
774
877
  split: "column" | "row";
@@ -802,6 +905,7 @@ declare const SpecSchema: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
802
905
  color?: string | undefined;
803
906
  background?: string | undefined;
804
907
  }[];
908
+ background?: string | undefined;
805
909
  }[];
806
910
  marks: {
807
911
  line: number;
@@ -817,6 +921,7 @@ declare const SpecSchema: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
817
921
  frame: boolean;
818
922
  titleBar: boolean;
819
923
  tabs: boolean;
924
+ background?: string | undefined;
820
925
  controls: "color" | "gray";
821
926
  title?: string | undefined;
822
927
  split: "column" | "row";
@@ -850,6 +955,7 @@ declare const SpecSchema: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
850
955
  color?: string | undefined;
851
956
  background?: string | undefined;
852
957
  }[];
958
+ background?: string | undefined;
853
959
  }[];
854
960
  marks: {
855
961
  line: number;
@@ -865,6 +971,7 @@ declare const SpecSchema: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
865
971
  frame: boolean;
866
972
  titleBar: boolean;
867
973
  tabs: boolean;
974
+ background?: string | undefined;
868
975
  controls: "color" | "gray";
869
976
  title?: string | undefined;
870
977
  split: "column" | "row";
@@ -898,6 +1005,7 @@ declare const SpecSchema: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
898
1005
  color?: string | undefined;
899
1006
  background?: string | undefined;
900
1007
  }[];
1008
+ background?: string | undefined;
901
1009
  }[];
902
1010
  marks: {
903
1011
  line: number;
@@ -913,6 +1021,7 @@ declare const SpecSchema: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
913
1021
  frame: boolean;
914
1022
  titleBar: boolean;
915
1023
  tabs: boolean;
1024
+ background?: string | undefined;
916
1025
  controls: "color" | "gray";
917
1026
  title?: string | undefined;
918
1027
  split: "column" | "row";
@@ -946,6 +1055,7 @@ declare const SpecSchema: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
946
1055
  color?: string | undefined;
947
1056
  background?: string | undefined;
948
1057
  }[];
1058
+ background?: string | undefined;
949
1059
  }[];
950
1060
  marks: {
951
1061
  line: number;
@@ -963,7 +1073,8 @@ declare const SpecSchema: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
963
1073
  v: 1;
964
1074
  theme: string;
965
1075
  mode: "dark" | "light";
966
- background: boolean;
1076
+ background?: string | undefined;
1077
+ backgroundOpacity: number;
967
1078
  padding: number;
968
1079
  font?: string | undefined;
969
1080
  lineNumbers?: boolean | undefined;
@@ -976,6 +1087,7 @@ declare const SpecSchema: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
976
1087
  frame: boolean;
977
1088
  titleBar: boolean;
978
1089
  tabs: boolean;
1090
+ background?: string | undefined;
979
1091
  controls: "color" | "gray";
980
1092
  title?: string | undefined;
981
1093
  split: "column" | "row";
@@ -1009,6 +1121,7 @@ declare const SpecSchema: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1009
1121
  color?: string | undefined;
1010
1122
  background?: string | undefined;
1011
1123
  }[];
1124
+ background?: string | undefined;
1012
1125
  }[];
1013
1126
  marks: {
1014
1127
  line: number;
@@ -1026,7 +1139,8 @@ declare const SpecSchema: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1026
1139
  v: 1;
1027
1140
  theme: string;
1028
1141
  mode: "dark" | "light";
1029
- background: boolean;
1142
+ background?: string | undefined;
1143
+ backgroundOpacity: number;
1030
1144
  padding: number;
1031
1145
  font?: string | undefined;
1032
1146
  lineNumbers?: boolean | undefined;
@@ -1039,6 +1153,7 @@ declare const SpecSchema: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1039
1153
  frame: boolean;
1040
1154
  titleBar: boolean;
1041
1155
  tabs: boolean;
1156
+ background?: string | undefined;
1042
1157
  controls: "color" | "gray";
1043
1158
  title?: string | undefined;
1044
1159
  split: "column" | "row";
@@ -1072,6 +1187,7 @@ declare const SpecSchema: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1072
1187
  color?: string | undefined;
1073
1188
  background?: string | undefined;
1074
1189
  }[];
1190
+ background?: string | undefined;
1075
1191
  }[];
1076
1192
  marks: {
1077
1193
  line: number;
@@ -1102,9 +1218,9 @@ declare class SpecError extends Error {
1102
1218
  constructor(issues: Array<string>);
1103
1219
  }
1104
1220
  /**
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.
1221
+ * Validates a spec and applies the defaults. It first removes the keys of other tools, then
1222
+ * validates the spec with the schema of its version and changes it to the latest version. Throws a
1223
+ * SpecError that lists every issue.
1108
1224
  */
1109
1225
  declare function parseSpec(input: unknown): Spec;
1110
1226
  /** Expands highlight entries such as [2, "4-6"] to a set of line numbers, up to the last line */
@@ -1120,4 +1236,4 @@ type SvgOptions = {
1120
1236
  };
1121
1237
  /** Writes the scene as a standalone SVG document */
1122
1238
  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 };
1239
+ export { WindowBox as $, resolveMode as $t, addPngMetadata as A, AMBIENT_ENABLED as At, isSpecSchemaUrl as B, isKnownLanguage 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, LANGUAGE_IDS as Ft, LayoutOptions as G, Mode as Gt, isCssBackground as H, DEFAULT_THEME as Ht, decodeSpec as I, PLAIN_TEXT as It, Rect as J, THEME_IDS as Jt, POPOVER as K, Syntax as Kt, encodeSpec as L, Token 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, getTheme as Qt, readLink as R, highlight as Rt, IMPLICIT_SPEC_VERSION as S, getCodeFont as St, ImageMetadata as T, measureUiText as Tt, FONT_SIZE as U, EditorWindow as Ut, specJsonSchema as V, resolveLanguage as Vt, LINE_HEIGHT as W, FrameColors as Wt, TAB_HEADER as X, getFrameColors as Xt, Scene as Y, Theme as Yt, TextMetrics as Z, getSyntax 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, 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, normalizeCode as nt, MarkStyle as o, ICON_IDS as ot, WindowSpec as p, CodeFont as pt, PaneBox as q, THEMES as qt, ANNOTATION_TYPES as r, MAC_HEADER as rt, PaneSpec as s, Icon as st, SvgOptions as t, 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, inferLanguage 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 resolveMode, A as addPngMetadata, At as AMBIENT_ENABLED, B as isSpecSchemaUrl, Bt as isKnownLanguage, 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 LANGUAGE_IDS, G as LayoutOptions, Gt as Mode, H as isCssBackground, Ht as DEFAULT_THEME, I as decodeSpec, It as PLAIN_TEXT, J as Rect, Jt as THEME_IDS, K as POPOVER, Kt as Syntax, L as encodeSpec, Lt as Token, 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 getTheme, R as readLink, Rt as highlight, S as IMPLICIT_SPEC_VERSION, St as getCodeFont, T as ImageMetadata, Tt as measureUiText, U as FONT_SIZE, Ut as EditorWindow, V as specJsonSchema, Vt as resolveLanguage, W as LINE_HEIGHT, Wt as FrameColors, X as TAB_HEADER, Xt as getFrameColors, Y as Scene, Yt as Theme, Z as TextMetrics, Zt as getSyntax, _ 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, 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, nt as normalizeCode, o as MarkStyle, ot as ICON_IDS, p as WindowSpec, pt as CodeFont, q as PaneBox, qt as THEMES, r as ANNOTATION_TYPES, rt as MAC_HEADER, s as PaneSpec, st as Icon, t as SvgOptions, 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 inferLanguage } from "./index-eoLihZJ2.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, 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, ambientPreviewCss, cellCount, createImageMetadata, createLink, cssFontFamily, decodeSpec, encodeSpec, expandLineRanges, getCodeFont, getFace, getFrameColors, getIcon, getSyntax, getTheme, highlight, inferLanguage, initPng, isAmbientBackground, isCssBackground, isKnownLanguage, isSpecSchemaUrl, 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 { rt as AMBIENT_BACKGROUNDS, it as AMBIENT_ENABLED, T as ANNOTATION_TYPES, J as AUTO_ICON, tt as BACKGROUNDS, mt as CODE_FONTS, ht as CODE_FONT_IDS, z as DEFAULT_APP_URL, gt as DEFAULT_CODE_FONT, st as DEFAULT_THEME, W as EXTENSION_PREFIX, Y as FILE_ICON, p as FONT_SIZE, X as ICON_IDS, G as IMPLICIT_SPEC_VERSION, N 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, Z as NO_ICON, P 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, ct as THEMES, lt as THEME_IDS, _t as UI_FONT, _ as WINDOW_RADIUS, u as addPngMetadata, at as ambientPreviewCss, v as cellCount, d as createImageMetadata, B as createLink, vt as cssFontFamily, V as decodeSpec, H as encodeSpec, j as expandLineRanges, yt as getCodeFont, bt as getFace, ut as getFrameColors, Q as getIcon, dt as getSyntax, ft as getTheme, F as highlight, I as inferLanguage, n as initPng, ot as isAmbientBackground, et as isCssBackground, L as isKnownLanguage, C as isSpecSchemaUrl, y as layout, r as loadSceneFonts, xt as measureCodeText, St as measureUiText, b as normalizeCode, M as parseSpec, f as readImageSpec, U as readLink, $ as resolveIcon, R as resolveLanguage, pt as resolveMode, i as sceneFontFiles, K as schemaVersion, w as specJsonSchema, q as stampSpecVersion, a as svgToPng, nt as themeBackground, t as toSvg } from "./src-Bn8Hly8W.mjs";