@vosjs/shared 0.1.1 → 0.2.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.
package/dist/index.d.ts CHANGED
@@ -42,65 +42,6 @@ declare function fontManifest(): {
42
42
  }[];
43
43
  };
44
44
 
45
- /**
46
- * Generated by the vosso build; do not edit by hand.
47
- * Curation (and the CC0-only licensing rule) lives in the build script;
48
- * re-run it (then `pnpm assets:push`) to change the catalog.
49
- * Files: https://assets.vos.so/music/{slug}.mp3 (−16 LUFS normalized).
50
- */
51
- interface MusicCatalogEntry {
52
- slug: string;
53
- title: string;
54
- artist: string;
55
- mood: 'upbeat' | 'minimal' | 'chill' | 'groove' | 'cinematic';
56
- /** Track length in seconds (probed from the normalized file). */
57
- duration: number;
58
- license: 'CC0';
59
- }
60
- declare const MUSIC_CATALOG: MusicCatalogEntry[];
61
-
62
- declare const MUSIC_CDN_BASE = "https://assets.vos.so/music";
63
- declare const SFX_CDN_BASE = "https://assets.vos.so/audio-sfx";
64
- type MusicMood = MusicCatalogEntry['mood'];
65
- /** Display order + label for the mood chips (the product vocabulary). */
66
- declare const MUSIC_MOODS: {
67
- mood: MusicMood;
68
- label: string;
69
- }[];
70
- interface SfxCatalogEntry {
71
- slug: string;
72
- title: string;
73
- duration: number;
74
- }
75
- /** Built-in SFX (synthesized by the vosso build, CC0). */
76
- declare const SFX_CATALOG: SfxCatalogEntry[];
77
- /** Public URL of a hosted music track (−16 LUFS normalized MP3). */
78
- declare function musicTrackUrl(slug: string): string;
79
- /** Public URL of a built-in SFX file. */
80
- declare function sfxUrl(slug: string): string;
81
- /** Look a track up by slug or by its hosted URL (for UI labels). */
82
- declare function findMusicTrack(slugOrUrl: string): MusicCatalogEntry | undefined;
83
- /** The manifest shape served by GET /api/music (mirrors music.json + SFX). */
84
- declare function musicManifest(): {
85
- version: number;
86
- base: string;
87
- tracks: {
88
- url: string;
89
- slug: string;
90
- title: string;
91
- artist: string;
92
- mood: "upbeat" | "minimal" | "chill" | "groove" | "cinematic";
93
- duration: number;
94
- license: "CC0";
95
- }[];
96
- sfx: {
97
- url: string;
98
- slug: string;
99
- title: string;
100
- duration: number;
101
- }[];
102
- };
103
-
104
45
  /**
105
46
  * Generated by the vosso build; do not edit by hand.
106
47
  * Curation lives in the build script; regenerate + `pnpm assets:push`, then
@@ -123,4 +64,4 @@ declare function typefaceUrl(slug: string): string;
123
64
  /** Case-insensitive lookup by slug or family name (null = not in catalog). */
124
65
  declare function findTypeface(nameOrSlug: string): TypefaceEntry | null;
125
66
 
126
- export { DEFAULT_TYPEFACE_SLUG, FONT_CATALOG, FONT_CDN_BASE, type FontCatalogEntry, type FontCategory, MUSIC_CATALOG, MUSIC_CDN_BASE, MUSIC_MOODS, type MusicCatalogEntry, type MusicMood, SFX_CATALOG, SFX_CDN_BASE, type SfxCatalogEntry, TYPEFACE_CATALOG, TYPEFACE_CDN_BASE, type TypefaceEntry, findFontFamily, findMusicTrack, findTypeface, fontFaceUrl, fontManifest, fontStack, musicManifest, musicTrackUrl, nearestFontWeight, sfxUrl, typefaceUrl };
67
+ export { DEFAULT_TYPEFACE_SLUG, FONT_CATALOG, FONT_CDN_BASE, type FontCatalogEntry, type FontCategory, TYPEFACE_CATALOG, TYPEFACE_CDN_BASE, type TypefaceEntry, findFontFamily, findTypeface, fontFaceUrl, fontManifest, fontStack, nearestFontWeight, typefaceUrl };
package/dist/index.js CHANGED
@@ -15,141 +15,6 @@ import {
15
15
  nearestFontWeight
16
16
  } from "./chunk-YBEIOW7L.js";
17
17
 
18
- // src/musicCatalog.ts
19
- var MUSIC_CATALOG = [
20
- {
21
- slug: "fresh-focus",
22
- title: "Fresh Focus",
23
- artist: "Kevin MacLeod",
24
- mood: "upbeat",
25
- duration: 124.1,
26
- license: "CC0"
27
- },
28
- {
29
- slug: "motions",
30
- title: "Motions",
31
- artist: "Rafael Krux",
32
- mood: "upbeat",
33
- duration: 117,
34
- license: "CC0"
35
- },
36
- {
37
- slug: "and-just-like-that",
38
- title: "And Just Like That",
39
- artist: "Bryan Teoh",
40
- mood: "upbeat",
41
- duration: 114.3,
42
- license: "CC0"
43
- },
44
- {
45
- slug: "arpent",
46
- title: "Arpent",
47
- artist: "Kevin MacLeod",
48
- mood: "minimal",
49
- duration: 162.1,
50
- license: "CC0"
51
- },
52
- {
53
- slug: "beat-one",
54
- title: "Beat One",
55
- artist: "Kevin MacLeod",
56
- mood: "minimal",
57
- duration: 180,
58
- license: "CC0"
59
- },
60
- {
61
- slug: "meditating-beat",
62
- title: "Meditating Beat",
63
- artist: "Kevin MacLeod",
64
- mood: "chill",
65
- duration: 157.2,
66
- license: "CC0"
67
- },
68
- {
69
- slug: "study-and-relax",
70
- title: "Study and Relax",
71
- artist: "Kevin MacLeod",
72
- mood: "chill",
73
- duration: 223.4,
74
- license: "CC0"
75
- },
76
- {
77
- slug: "starcourt-mall",
78
- title: "Starcourt Mall",
79
- artist: "Bryan Teoh",
80
- mood: "chill",
81
- duration: 217.5,
82
- license: "CC0"
83
- },
84
- {
85
- slug: "gotta-keep-on-movin",
86
- title: "Gotta Keep On Movin",
87
- artist: "Bryan Teoh",
88
- mood: "groove",
89
- duration: 144,
90
- license: "CC0"
91
- },
92
- {
93
- slug: "hold-on-a-sec",
94
- title: "Hold on a Sec",
95
- artist: "Bryan Teoh",
96
- mood: "groove",
97
- duration: 125.5,
98
- license: "CC0"
99
- },
100
- {
101
- slug: "slice-of-life",
102
- title: "Slice of Life",
103
- artist: "Bryan Teoh",
104
- mood: "cinematic",
105
- duration: 140.8,
106
- license: "CC0"
107
- },
108
- {
109
- slug: "ice-and-snow",
110
- title: "Ice and Snow",
111
- artist: "Rafael Krux",
112
- mood: "cinematic",
113
- duration: 141.5,
114
- license: "CC0"
115
- }
116
- ];
117
-
118
- // src/music.ts
119
- var MUSIC_CDN_BASE = "https://assets.vos.so/music";
120
- var SFX_CDN_BASE = "https://assets.vos.so/audio-sfx";
121
- var MUSIC_MOODS = [
122
- { mood: "upbeat", label: "Upbeat" },
123
- { mood: "minimal", label: "Minimal" },
124
- { mood: "chill", label: "Chill" },
125
- { mood: "groove", label: "Groove" },
126
- { mood: "cinematic", label: "Cinematic" }
127
- ];
128
- var SFX_CATALOG = [
129
- { slug: "sfx-click", title: "Click", duration: 0.07 },
130
- { slug: "sfx-pop", title: "Pop", duration: 0.12 },
131
- { slug: "sfx-whoosh", title: "Whoosh", duration: 0.6 },
132
- { slug: "sfx-chime", title: "Chime", duration: 1.4 }
133
- ];
134
- function musicTrackUrl(slug) {
135
- return `${MUSIC_CDN_BASE}/${slug}.mp3`;
136
- }
137
- function sfxUrl(slug) {
138
- return `${SFX_CDN_BASE}/${slug}.wav`;
139
- }
140
- function findMusicTrack(slugOrUrl) {
141
- const slug = slugOrUrl.startsWith(MUSIC_CDN_BASE) ? slugOrUrl.slice(MUSIC_CDN_BASE.length + 1).replace(/\.mp3$/, "") : slugOrUrl;
142
- return MUSIC_CATALOG.find((t) => t.slug === slug);
143
- }
144
- function musicManifest() {
145
- return {
146
- version: 1,
147
- base: MUSIC_CDN_BASE,
148
- tracks: MUSIC_CATALOG.map((t) => ({ ...t, url: musicTrackUrl(t.slug) })),
149
- sfx: SFX_CATALOG.map((s) => ({ ...s, url: sfxUrl(s.slug) }))
150
- };
151
- }
152
-
153
18
  // src/typefaceCatalog.ts
154
19
  var TYPEFACE_CDN_BASE = "https://assets.vos.so/typefaces";
155
20
  var DEFAULT_TYPEFACE_SLUG = "lexend";
@@ -178,26 +43,17 @@ export {
178
43
  DEFAULT_TYPEFACE_SLUG,
179
44
  FONT_CATALOG,
180
45
  FONT_CDN_BASE,
181
- MUSIC_CATALOG,
182
- MUSIC_CDN_BASE,
183
- MUSIC_MOODS,
184
- SFX_CATALOG,
185
- SFX_CDN_BASE,
186
46
  TYPEFACE_CATALOG,
187
47
  TYPEFACE_CDN_BASE,
188
48
  findFontFamily,
189
- findMusicTrack,
190
49
  findTypeface,
191
50
  fontFaceUrl,
192
51
  fontManifest,
193
52
  fontStack,
194
53
  formatLabel,
195
54
  generateId,
196
- musicManifest,
197
- musicTrackUrl,
198
55
  nearestFontWeight,
199
56
  safeJsonParse,
200
- sfxUrl,
201
57
  sleep,
202
58
  typefaceUrl
203
59
  };
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/musicCatalog.ts","../src/music.ts","../src/typefaceCatalog.ts"],"sourcesContent":["/**\n * Generated by the vosso build; do not edit by hand.\n * Curation (and the CC0-only licensing rule) lives in the build script;\n * re-run it (then `pnpm assets:push`) to change the catalog.\n * Files: https://assets.vos.so/music/{slug}.mp3 (−16 LUFS normalized).\n */\nexport interface MusicCatalogEntry {\n slug: string\n title: string\n artist: string\n mood: 'upbeat' | 'minimal' | 'chill' | 'groove' | 'cinematic'\n /** Track length in seconds (probed from the normalized file). */\n duration: number\n license: 'CC0'\n}\n\nexport const MUSIC_CATALOG: MusicCatalogEntry[] = [\n {\n slug: 'fresh-focus',\n title: 'Fresh Focus',\n artist: 'Kevin MacLeod',\n mood: 'upbeat',\n duration: 124.1,\n license: 'CC0',\n },\n {\n slug: 'motions',\n title: 'Motions',\n artist: 'Rafael Krux',\n mood: 'upbeat',\n duration: 117,\n license: 'CC0',\n },\n {\n slug: 'and-just-like-that',\n title: 'And Just Like That',\n artist: 'Bryan Teoh',\n mood: 'upbeat',\n duration: 114.3,\n license: 'CC0',\n },\n {\n slug: 'arpent',\n title: 'Arpent',\n artist: 'Kevin MacLeod',\n mood: 'minimal',\n duration: 162.1,\n license: 'CC0',\n },\n {\n slug: 'beat-one',\n title: 'Beat One',\n artist: 'Kevin MacLeod',\n mood: 'minimal',\n duration: 180,\n license: 'CC0',\n },\n {\n slug: 'meditating-beat',\n title: 'Meditating Beat',\n artist: 'Kevin MacLeod',\n mood: 'chill',\n duration: 157.2,\n license: 'CC0',\n },\n {\n slug: 'study-and-relax',\n title: 'Study and Relax',\n artist: 'Kevin MacLeod',\n mood: 'chill',\n duration: 223.4,\n license: 'CC0',\n },\n {\n slug: 'starcourt-mall',\n title: 'Starcourt Mall',\n artist: 'Bryan Teoh',\n mood: 'chill',\n duration: 217.5,\n license: 'CC0',\n },\n {\n slug: 'gotta-keep-on-movin',\n title: 'Gotta Keep On Movin',\n artist: 'Bryan Teoh',\n mood: 'groove',\n duration: 144,\n license: 'CC0',\n },\n {\n slug: 'hold-on-a-sec',\n title: 'Hold on a Sec',\n artist: 'Bryan Teoh',\n mood: 'groove',\n duration: 125.5,\n license: 'CC0',\n },\n {\n slug: 'slice-of-life',\n title: 'Slice of Life',\n artist: 'Bryan Teoh',\n mood: 'cinematic',\n duration: 140.8,\n license: 'CC0',\n },\n {\n slug: 'ice-and-snow',\n title: 'Ice and Snow',\n artist: 'Rafael Krux',\n mood: 'cinematic',\n duration: 141.5,\n license: 'CC0',\n },\n]\n","/**\n * The ONE audio-catalog seam (mirrors the fonts pattern): the curated,\n * self-hosted music tracks and SFX every surface reads — the Audio panel\n * picker, the API's GET /music, and agent contracts. Generated by the vosso\n * build; do not edit by hand (curation + the CC0-only licensing rule live in\n * the build script); SFX are synthesized at build time, so their four\n * entries are stable literals here. Files live in the vosso-public bucket\n * (assets.vos.so) — docs store these absolute URLs (the backgrounds rule: a\n * ProjectDoc travels across environments, so keys must resolve everywhere).\n */\nimport { MUSIC_CATALOG } from './musicCatalog'\nimport type { MusicCatalogEntry } from './musicCatalog'\n\nexport { MUSIC_CATALOG } from './musicCatalog'\nexport type { MusicCatalogEntry } from './musicCatalog'\n\nexport const MUSIC_CDN_BASE = 'https://assets.vos.so/music'\nexport const SFX_CDN_BASE = 'https://assets.vos.so/audio-sfx'\n\nexport type MusicMood = MusicCatalogEntry['mood']\n\n/** Display order + label for the mood chips (the product vocabulary). */\nexport const MUSIC_MOODS: { mood: MusicMood; label: string }[] = [\n { mood: 'upbeat', label: 'Upbeat' },\n { mood: 'minimal', label: 'Minimal' },\n { mood: 'chill', label: 'Chill' },\n { mood: 'groove', label: 'Groove' },\n { mood: 'cinematic', label: 'Cinematic' },\n]\n\nexport interface SfxCatalogEntry {\n slug: string\n title: string\n duration: number\n}\n\n/** Built-in SFX (synthesized by the vosso build, CC0). */\nexport const SFX_CATALOG: SfxCatalogEntry[] = [\n { slug: 'sfx-click', title: 'Click', duration: 0.07 },\n { slug: 'sfx-pop', title: 'Pop', duration: 0.12 },\n { slug: 'sfx-whoosh', title: 'Whoosh', duration: 0.6 },\n { slug: 'sfx-chime', title: 'Chime', duration: 1.4 },\n]\n\n/** Public URL of a hosted music track (−16 LUFS normalized MP3). */\nexport function musicTrackUrl(slug: string): string {\n return `${MUSIC_CDN_BASE}/${slug}.mp3`\n}\n\n/** Public URL of a built-in SFX file. */\nexport function sfxUrl(slug: string): string {\n return `${SFX_CDN_BASE}/${slug}.wav`\n}\n\n/** Look a track up by slug or by its hosted URL (for UI labels). */\nexport function findMusicTrack(\n slugOrUrl: string,\n): MusicCatalogEntry | undefined {\n const slug = slugOrUrl.startsWith(MUSIC_CDN_BASE)\n ? slugOrUrl.slice(MUSIC_CDN_BASE.length + 1).replace(/\\.mp3$/, '')\n : slugOrUrl\n return MUSIC_CATALOG.find((t) => t.slug === slug)\n}\n\n/** The manifest shape served by GET /api/music (mirrors music.json + SFX). */\nexport function musicManifest() {\n return {\n version: 1,\n base: MUSIC_CDN_BASE,\n tracks: MUSIC_CATALOG.map((t) => ({ ...t, url: musicTrackUrl(t.slug) })),\n sfx: SFX_CATALOG.map((s) => ({ ...s, url: sfxUrl(s.slug) })),\n }\n}\n","/**\n * Generated by the vosso build; do not edit by hand.\n * Curation lives in the build script; regenerate + `pnpm assets:push`, then\n * commit this file. One catalog: the 3D prop panel, take lowering, and the\n * CLI lints all read it.\n */\n\nexport interface TypefaceEntry {\n /** Catalog family name (matches the webfont catalog). */\n family: string\n /** File slug — typefaces/{slug}.typeface.json on assets.vos.so. */\n slug: string\n /** The converted weight (one file per family; extrusion wants bold). */\n weight: number\n}\n\nexport const TYPEFACE_CDN_BASE = 'https://assets.vos.so/typefaces'\n\n/** The house default 3D face. */\nexport const DEFAULT_TYPEFACE_SLUG = 'lexend'\n\nexport const TYPEFACE_CATALOG: TypefaceEntry[] = [\n { family: 'Lexend', slug: 'lexend', weight: 700 },\n { family: 'Space Grotesk', slug: 'space-grotesk', weight: 700 },\n { family: 'Bebas Neue', slug: 'bebas-neue', weight: 400 },\n { family: 'Archivo Black', slug: 'archivo-black', weight: 400 },\n { family: 'Anton', slug: 'anton', weight: 400 },\n { family: 'Righteous', slug: 'righteous', weight: 400 },\n { family: 'Playfair Display', slug: 'playfair-display', weight: 700 },\n { family: 'Fraunces', slug: 'fraunces', weight: 700 },\n { family: 'Pacifico', slug: 'pacifico', weight: 400 },\n { family: 'JetBrains Mono', slug: 'jetbrains-mono', weight: 700 },\n]\n\nexport function typefaceUrl(slug: string): string {\n return `${TYPEFACE_CDN_BASE}/${slug}.typeface.json`\n}\n\n/** Case-insensitive lookup by slug or family name (null = not in catalog). */\nexport function findTypeface(nameOrSlug: string): TypefaceEntry | null {\n const needle = nameOrSlug.trim().toLowerCase()\n return (\n TYPEFACE_CATALOG.find(\n (t) => t.slug === needle || t.family.toLowerCase() === needle,\n ) ?? null\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAgBO,IAAM,gBAAqC;AAAA,EAChD;AAAA,IACE,MAAM;AAAA,IACN,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,MAAM;AAAA,IACN,UAAU;AAAA,IACV,SAAS;AAAA,EACX;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,MAAM;AAAA,IACN,UAAU;AAAA,IACV,SAAS;AAAA,EACX;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,MAAM;AAAA,IACN,UAAU;AAAA,IACV,SAAS;AAAA,EACX;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,MAAM;AA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Q,IAAI;AAAA,EAC9D,EAAE,QAAQ,SAAS,MAAM,SAAS,QAAQ,IAAI;AAAA,EAC9C,EAAE,QAAQ,aAAa,MAAM,aAAa,QAAQ,IAAI;AAAA,EACtD,EAAE,QAAQ,oBAAoB,MAAM,oBAAoB,QAAQ,IAAI;AAAA,EACpE,EAAE,QAAQ,YAAY,MAAM,YAAY,QAAQ,IAAI;AAAA,EACpD,EAAE,QAAQ,YAAY,MAAM,YAAY,QAAQ,IAAI;AAAA,EACpD,EAAE,QAAQ,kBAAkB,MAAM,kBAAkB,QAAQ,IAAI;AAClE;AAEO,SAAS,YAAY,MAAsB;AAChD,SAAO,GAAG,iBAAiB,IAAI,IAAI;AACrC;AAGO,SAAS,aAAa,YAA0C;AACrE,QAAM,SAAS,WAAW,KAAK,EAAE,YAAY;AAC7C,SACE,iBAAiB;AAAA,IACf,CAAC,MAAM,EAAE,SAAS,UAAU,EAAE,OAAO,YAAY,MAAM;AAAA,EACzD,KAAK;AAET;","names":[]}
1
+ {"version":3,"sources":["../src/typefaceCatalog.ts"],"sourcesContent":["/**\n * Generated by the vosso build; do not edit by hand.\n * Curation lives in the build script; regenerate + `pnpm assets:push`, then\n * commit this file. One catalog: the 3D prop panel, take lowering, and the\n * CLI lints all read it.\n */\n\nexport interface TypefaceEntry {\n /** Catalog family name (matches the webfont catalog). */\n family: string\n /** File slug — typefaces/{slug}.typeface.json on assets.vos.so. */\n slug: string\n /** The converted weight (one file per family; extrusion wants bold). */\n weight: number\n}\n\nexport const TYPEFACE_CDN_BASE = 'https://assets.vos.so/typefaces'\n\n/** The house default 3D face. */\nexport const DEFAULT_TYPEFACE_SLUG = 'lexend'\n\nexport const TYPEFACE_CATALOG: TypefaceEntry[] = [\n { family: 'Lexend', slug: 'lexend', weight: 700 },\n { family: 'Space Grotesk', slug: 'space-grotesk', weight: 700 },\n { family: 'Bebas Neue', slug: 'bebas-neue', weight: 400 },\n { family: 'Archivo Black', slug: 'archivo-black', weight: 400 },\n { family: 'Anton', slug: 'anton', weight: 400 },\n { family: 'Righteous', slug: 'righteous', weight: 400 },\n { family: 'Playfair Display', slug: 'playfair-display', weight: 700 },\n { family: 'Fraunces', slug: 'fraunces', weight: 700 },\n { family: 'Pacifico', slug: 'pacifico', weight: 400 },\n { family: 'JetBrains Mono', slug: 'jetbrains-mono', weight: 700 },\n]\n\nexport function typefaceUrl(slug: string): string {\n return `${TYPEFACE_CDN_BASE}/${slug}.typeface.json`\n}\n\n/** Case-insensitive lookup by slug or family name (null = not in catalog). */\nexport function findTypeface(nameOrSlug: string): TypefaceEntry | null {\n const needle = nameOrSlug.trim().toLowerCase()\n return (\n TYPEFACE_CATALOG.find(\n (t) => t.slug === needle || t.family.toLowerCase() === needle,\n ) ?? null\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAgBO,IAAM,oBAAoB;AAG1B,IAAM,wBAAwB;AAE9B,IAAM,mBAAoC;AAAA,EAC/C,EAAE,QAAQ,UAAU,MAAM,UAAU,QAAQ,IAAI;AAAA,EAChD,EAAE,QAAQ,iBAAiB,MAAM,iBAAiB,QAAQ,IAAI;AAAA,EAC9D,EAAE,QAAQ,cAAc,MAAM,cAAc,QAAQ,IAAI;AAAA,EACxD,EAAE,QAAQ,iBAAiB,MAAM,iBAAiB,QAAQ,IAAI;AAAA,EAC9D,EAAE,QAAQ,SAAS,MAAM,SAAS,QAAQ,IAAI;AAAA,EAC9C,EAAE,QAAQ,aAAa,MAAM,aAAa,QAAQ,IAAI;AAAA,EACtD,EAAE,QAAQ,oBAAoB,MAAM,oBAAoB,QAAQ,IAAI;AAAA,EACpE,EAAE,QAAQ,YAAY,MAAM,YAAY,QAAQ,IAAI;AAAA,EACpD,EAAE,QAAQ,YAAY,MAAM,YAAY,QAAQ,IAAI;AAAA,EACpD,EAAE,QAAQ,kBAAkB,MAAM,kBAAkB,QAAQ,IAAI;AAClE;AAEO,SAAS,YAAY,MAAsB;AAChD,SAAO,GAAG,iBAAiB,IAAI,IAAI;AACrC;AAGO,SAAS,aAAa,YAA0C;AACrE,QAAM,SAAS,WAAW,KAAK,EAAE,YAAY;AAC7C,SACE,iBAAiB;AAAA,IACf,CAAC,MAAM,EAAE,SAAS,UAAU,EAAE,OAAO,YAAY,MAAM;AAAA,EACzD,KAAK;AAET;","names":[]}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vosjs/shared",
3
- "version": "0.1.1",
4
- "description": "The small shared layer under the vos CLI and the vosso studio: the semantic differ, the free-tier limits, frontmatter, params, the font, music and typeface catalogs.",
3
+ "version": "0.2.0",
4
+ "description": "The small shared layer under the vos CLI and the vosso studio: the semantic differ, the free-tier limits, frontmatter, params, the font and typeface catalogs.",
5
5
  "license": "MIT",
6
6
  "author": "vosso",
7
7
  "homepage": "https://vos.so",