@hyperbook/types 0.0.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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../src/index.ts"],
4
- "sourcesContent": ["export type HyperbookJson = {\n name: string;\n description?: string;\n logo?: string;\n author?: {\n name?: string;\n url?: string;\n };\n font?: string;\n fonts?: {\n heading?: string;\n body?: string;\n code?: string;\n };\n template?: string;\n colors?: {\n /**\n * @format color-hex\n */\n brand?: string;\n /**\n * @format color-hex\n */\n brandDark?: string;\n /**\n * @format color-hex\n */\n brandText?: string;\n inverted?: boolean;\n };\n basePath?: string;\n license?: string;\n language?: \"de\" | \"en\" | \"fr\" | \"es\";\n repo?: string;\n};\n"],
4
+ "sourcesContent": ["type ElementConfig = {\n version?: string;\n};\n\nexport type LinkWithLinks = {\n label: string;\n icon?: string;\n links: Link[];\n};\n\nexport type LinkWithHref = {\n label: string;\n icon?: string;\n href: string;\n};\n\nexport type Link = LinkWithHref | LinkWithLinks;\n\nexport type HyperbookJson = {\n name: string;\n description?: string;\n logo?: string;\n author?: {\n name?: string;\n url?: string;\n };\n font?: string;\n fonts?: {\n heading?: string;\n body?: string;\n code?: string;\n };\n template?: string;\n colors?: {\n /**\n * @format color-hex\n */\n brand?: string;\n /**\n * @format color-hex\n */\n brandDark?: string;\n /**\n * @format color-hex\n */\n brandText?: string;\n inverted?: boolean;\n };\n basePath?: string;\n license?: string;\n language?: \"de\" | \"en\" | \"fr\" | \"es\";\n repo?: string;\n links?: Link[];\n elements?: {\n bookmarks?: false | ElementConfig;\n excalidraw?: ElementConfig & {\n autoZoom?: boolean;\n center?: boolean;\n aspectRation?: string;\n edit?: boolean;\n };\n };\n};\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;AAAA;AAAA;",
6
6
  "names": []
7
7
  }
package/dist/index.d.ts CHANGED
@@ -1,3 +1,17 @@
1
+ declare type ElementConfig = {
2
+ version?: string;
3
+ };
4
+ export declare type LinkWithLinks = {
5
+ label: string;
6
+ icon?: string;
7
+ links: Link[];
8
+ };
9
+ export declare type LinkWithHref = {
10
+ label: string;
11
+ icon?: string;
12
+ href: string;
13
+ };
14
+ export declare type Link = LinkWithHref | LinkWithLinks;
1
15
  export declare type HyperbookJson = {
2
16
  name: string;
3
17
  description?: string;
@@ -32,4 +46,15 @@ export declare type HyperbookJson = {
32
46
  license?: string;
33
47
  language?: "de" | "en" | "fr" | "es";
34
48
  repo?: string;
49
+ links?: Link[];
50
+ elements?: {
51
+ bookmarks?: false | ElementConfig;
52
+ excalidraw?: ElementConfig & {
53
+ autoZoom?: boolean;
54
+ center?: boolean;
55
+ aspectRation?: string;
56
+ edit?: boolean;
57
+ };
58
+ };
35
59
  };
60
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hyperbook/types",
3
- "version": "0.0.1",
3
+ "version": "0.2.0",
4
4
  "author": "Mike Barkmin",
5
5
  "homepage": "https://github.com/openpatch/hyperbook#readme",
6
6
  "license": "MIT",