@bendyline/docblocks-react 1.0.0 → 1.1.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.
Files changed (92) hide show
  1. package/dist/AppMenu/AppMenu.d.ts +6 -1
  2. package/dist/AppMenu/AppMenu.d.ts.map +1 -1
  3. package/dist/AppMenu/AppMenu.js +3 -2
  4. package/dist/AppMenu/AppMenu.js.map +1 -1
  5. package/dist/AppMenu/index.d.ts +1 -1
  6. package/dist/AppMenu/index.d.ts.map +1 -1
  7. package/dist/DocBlocksShell/DocBlocksShell.d.ts +1 -1
  8. package/dist/DocBlocksShell/DocBlocksShell.d.ts.map +1 -1
  9. package/dist/DocBlocksShell/DocBlocksShell.js +410 -73
  10. package/dist/DocBlocksShell/DocBlocksShell.js.map +1 -1
  11. package/dist/FileExplorer/FileTreeNode.d.ts.map +1 -1
  12. package/dist/FileExplorer/FileTreeNode.js +34 -8
  13. package/dist/FileExplorer/FileTreeNode.js.map +1 -1
  14. package/dist/WorkspacePicker/WorkspacePicker.d.ts.map +1 -1
  15. package/dist/WorkspacePicker/WorkspacePicker.js +9 -3
  16. package/dist/WorkspacePicker/WorkspacePicker.js.map +1 -1
  17. package/dist/icons.d.ts +1 -0
  18. package/dist/icons.d.ts.map +1 -1
  19. package/dist/icons.js +3 -0
  20. package/dist/icons.js.map +1 -1
  21. package/dist/index.d.ts +1 -1
  22. package/dist/index.d.ts.map +1 -1
  23. package/package.json +8 -8
  24. package/src/AppMenu/AppMenu.tsx +78 -1
  25. package/src/AppMenu/index.ts +1 -1
  26. package/src/DocBlocksShell/DocBlocksShell.tsx +480 -87
  27. package/src/FileExplorer/FileTreeNode.tsx +68 -26
  28. package/src/WorkspacePicker/WorkspacePicker.tsx +18 -7
  29. package/src/fonts/fonts.css +362 -0
  30. package/src/fonts/licenses/LICENSE-cormorant-garamond.txt +93 -0
  31. package/src/fonts/licenses/LICENSE-crimson-text.txt +93 -0
  32. package/src/fonts/licenses/LICENSE-dm-sans.txt +93 -0
  33. package/src/fonts/licenses/LICENSE-dm-serif-display.txt +93 -0
  34. package/src/fonts/licenses/LICENSE-hanken-grotesk.txt +94 -0
  35. package/src/fonts/licenses/LICENSE-ibm-plex-sans.txt +93 -0
  36. package/src/fonts/licenses/LICENSE-inter.txt +93 -0
  37. package/src/fonts/licenses/LICENSE-jetbrains-mono.txt +93 -0
  38. package/src/fonts/licenses/LICENSE-lora.txt +93 -0
  39. package/src/fonts/licenses/LICENSE-merriweather.txt +93 -0
  40. package/src/fonts/licenses/LICENSE-oswald.txt +93 -0
  41. package/src/fonts/licenses/LICENSE-playfair-display.txt +93 -0
  42. package/src/fonts/licenses/LICENSE-pt-serif.txt +93 -0
  43. package/src/fonts/licenses/LICENSE-roboto.txt +93 -0
  44. package/src/fonts/licenses/LICENSE-source-serif-4.txt +93 -0
  45. package/src/fonts/woff2/cormorant-garamond-400.woff2 +0 -0
  46. package/src/fonts/woff2/cormorant-garamond-700.woff2 +0 -0
  47. package/src/fonts/woff2/crimson-text-400.woff2 +0 -0
  48. package/src/fonts/woff2/crimson-text-400i.woff2 +0 -0
  49. package/src/fonts/woff2/crimson-text-700.woff2 +0 -0
  50. package/src/fonts/woff2/dm-sans-400.woff2 +0 -0
  51. package/src/fonts/woff2/dm-sans-400i.woff2 +0 -0
  52. package/src/fonts/woff2/dm-sans-500.woff2 +0 -0
  53. package/src/fonts/woff2/dm-sans-700.woff2 +0 -0
  54. package/src/fonts/woff2/dm-serif-display-400.woff2 +0 -0
  55. package/src/fonts/woff2/hanken-grotesk-400.woff2 +0 -0
  56. package/src/fonts/woff2/hanken-grotesk-400i.woff2 +0 -0
  57. package/src/fonts/woff2/hanken-grotesk-500.woff2 +0 -0
  58. package/src/fonts/woff2/hanken-grotesk-600.woff2 +0 -0
  59. package/src/fonts/woff2/hanken-grotesk-700.woff2 +0 -0
  60. package/src/fonts/woff2/ibm-plex-sans-400.woff2 +0 -0
  61. package/src/fonts/woff2/ibm-plex-sans-400i.woff2 +0 -0
  62. package/src/fonts/woff2/ibm-plex-sans-500.woff2 +0 -0
  63. package/src/fonts/woff2/ibm-plex-sans-600.woff2 +0 -0
  64. package/src/fonts/woff2/ibm-plex-sans-700.woff2 +0 -0
  65. package/src/fonts/woff2/inter-400.woff2 +0 -0
  66. package/src/fonts/woff2/inter-400i.woff2 +0 -0
  67. package/src/fonts/woff2/inter-500.woff2 +0 -0
  68. package/src/fonts/woff2/inter-600.woff2 +0 -0
  69. package/src/fonts/woff2/inter-700.woff2 +0 -0
  70. package/src/fonts/woff2/jetbrains-mono-400.woff2 +0 -0
  71. package/src/fonts/woff2/jetbrains-mono-400i.woff2 +0 -0
  72. package/src/fonts/woff2/jetbrains-mono-700.woff2 +0 -0
  73. package/src/fonts/woff2/lora-400.woff2 +0 -0
  74. package/src/fonts/woff2/lora-400i.woff2 +0 -0
  75. package/src/fonts/woff2/lora-700.woff2 +0 -0
  76. package/src/fonts/woff2/merriweather-400.woff2 +0 -0
  77. package/src/fonts/woff2/merriweather-700.woff2 +0 -0
  78. package/src/fonts/woff2/oswald-400.woff2 +0 -0
  79. package/src/fonts/woff2/oswald-700.woff2 +0 -0
  80. package/src/fonts/woff2/playfair-display-400.woff2 +0 -0
  81. package/src/fonts/woff2/playfair-display-700.woff2 +0 -0
  82. package/src/fonts/woff2/pt-serif-400.woff2 +0 -0
  83. package/src/fonts/woff2/pt-serif-700.woff2 +0 -0
  84. package/src/fonts/woff2/roboto-400.woff2 +0 -0
  85. package/src/fonts/woff2/roboto-400i.woff2 +0 -0
  86. package/src/fonts/woff2/roboto-700.woff2 +0 -0
  87. package/src/fonts/woff2/source-serif-4-400.woff2 +0 -0
  88. package/src/fonts/woff2/source-serif-4-400i.woff2 +0 -0
  89. package/src/fonts/woff2/source-serif-4-700.woff2 +0 -0
  90. package/src/icons.tsx +10 -0
  91. package/src/index.ts +1 -1
  92. package/src/styles/docblocks.css +128 -13
@@ -2,8 +2,10 @@
2
2
  * FileTreeNode — recursive tree node for the file explorer.
3
3
  */
4
4
 
5
- import { useCallback, useState, useRef, useEffect } from 'react';
5
+ import { useCallback, useState, useRef, useEffect, useLayoutEffect } from 'react';
6
+ import { createPortal } from 'react-dom';
6
7
  import type { FileSystemEntry } from '@bendyline/docblocks/filesystem';
8
+ import { MoreIcon } from '../icons.js';
7
9
 
8
10
  export interface FileTreeNodeProps {
9
11
  entry: FileSystemEntry;
@@ -50,11 +52,15 @@ export function FileTreeNode({
50
52
  const handleContextMenu = useCallback((e: React.MouseEvent) => {
51
53
  e.preventDefault();
52
54
  e.stopPropagation();
53
- const rect = nodeRef.current?.getBoundingClientRect();
54
- setContextPos({
55
- x: e.clientX - (rect?.left ?? 0),
56
- y: e.clientY - (rect?.top ?? 0),
57
- });
55
+ setContextPos({ x: e.clientX, y: e.clientY });
56
+ setShowContext(true);
57
+ }, []);
58
+
59
+ const handleMoreClick = useCallback((e: React.MouseEvent) => {
60
+ e.preventDefault();
61
+ e.stopPropagation();
62
+ const rect = (e.currentTarget as HTMLElement).getBoundingClientRect();
63
+ setContextPos({ x: rect.right, y: rect.bottom });
58
64
  setShowContext(true);
59
65
  }, []);
60
66
 
@@ -106,6 +112,26 @@ export function FileTreeNode({
106
112
  }
107
113
  }, [renaming]);
108
114
 
115
+ // Clamp menu inside viewport after it renders
116
+ useLayoutEffect(() => {
117
+ if (!showContext || !contextRef.current) return;
118
+ const menu = contextRef.current;
119
+ const rect = menu.getBoundingClientRect();
120
+ const margin = 4;
121
+ let left = contextPos.x;
122
+ let top = contextPos.y;
123
+ if (rect.right > window.innerWidth - margin) {
124
+ left = Math.max(margin, window.innerWidth - rect.width - margin);
125
+ }
126
+ if (rect.bottom > window.innerHeight - margin) {
127
+ top = Math.max(margin, window.innerHeight - rect.height - margin);
128
+ }
129
+ if (left !== contextPos.x || top !== contextPos.y) {
130
+ menu.style.left = `${left}px`;
131
+ menu.style.top = `${top}px`;
132
+ }
133
+ }, [showContext, contextPos]);
134
+
109
135
  return (
110
136
  <div className="db-tree-node" ref={nodeRef}>
111
137
  <div
@@ -136,30 +162,46 @@ export function FileTreeNode({
136
162
  onClick={(e) => e.stopPropagation()}
137
163
  />
138
164
  ) : (
139
- <span className="db-tree-label">
140
- {entry.name.endsWith('.md') ? entry.name.slice(0, -3) : entry.name}
141
- </span>
165
+ <>
166
+ <span className="db-tree-label">
167
+ {entry.name.endsWith('.md') ? entry.name.slice(0, -3) : entry.name}
168
+ </span>
169
+ <button
170
+ type="button"
171
+ className={`db-tree-more${showContext ? ' db-tree-more--active' : ''}`}
172
+ onClick={handleMoreClick}
173
+ onContextMenu={handleMoreClick}
174
+ aria-label="More actions"
175
+ aria-haspopup="menu"
176
+ aria-expanded={showContext}
177
+ tabIndex={-1}
178
+ >
179
+ <MoreIcon width={14} height={14} />
180
+ </button>
181
+ </>
142
182
  )}
143
183
  </div>
144
184
 
145
- {/* Context menu */}
146
- {showContext && (
147
- <div
148
- ref={contextRef}
149
- className="db-tree-context"
150
- style={{ left: contextPos.x, top: contextPos.y }}
151
- >
152
- <button className="db-tree-context-item" onClick={handleRenameStart}>
153
- Rename
154
- </button>
155
- <button
156
- className="db-tree-context-item db-tree-context-item--danger"
157
- onClick={handleDeleteClick}
185
+ {/* Context menu — portaled so ancestor overflow:hidden doesn't clip it */}
186
+ {showContext &&
187
+ createPortal(
188
+ <div
189
+ ref={contextRef}
190
+ className="db-tree-context"
191
+ style={{ left: contextPos.x, top: contextPos.y }}
158
192
  >
159
- Delete
160
- </button>
161
- </div>
162
- )}
193
+ <button className="db-tree-context-item" onClick={handleRenameStart}>
194
+ Rename
195
+ </button>
196
+ <button
197
+ className="db-tree-context-item db-tree-context-item--danger"
198
+ onClick={handleDeleteClick}
199
+ >
200
+ Delete
201
+ </button>
202
+ </div>,
203
+ document.body,
204
+ )}
163
205
 
164
206
  {/* Render children if directory is expanded */}
165
207
  {isDir && expanded && renderChildren && (
@@ -7,6 +7,7 @@ import { useState, useEffect, useCallback, useRef } from 'react';
7
7
  import type { WorkspaceDescriptor } from '@bendyline/docblocks/workspace';
8
8
  import { listWorkspaces, saveWorkspace, touchWorkspace } from '@bendyline/docblocks/workspace';
9
9
  import { isNativeFileSystemSupported } from '@bendyline/docblocks/filesystem';
10
+ import { isElectronHost } from '@bendyline/docblocks/host';
10
11
 
11
12
  export interface WorkspacePickerProps {
12
13
  /** Currently active workspace id. */
@@ -41,10 +42,16 @@ export function WorkspacePicker({
41
42
  return () => document.removeEventListener('mousedown', handleOutsideClick);
42
43
  }, [isOpen]);
43
44
 
45
+ const electron = isElectronHost();
46
+
44
47
  const refresh = useCallback(async () => {
45
48
  const list = await listWorkspaces();
46
- setWorkspaces(list);
47
- }, []);
49
+ // On desktop, hide web-only workspaces (indexeddb/native).
50
+ const filtered = electron
51
+ ? list.filter((w) => w.type === 'electron-native')
52
+ : list.filter((w) => w.type !== 'electron-native');
53
+ setWorkspaces(filtered);
54
+ }, [electron]);
48
55
 
49
56
  useEffect(() => {
50
57
  refresh();
@@ -98,17 +105,21 @@ export function WorkspacePicker({
98
105
  onClick={() => handleSelect(ws)}
99
106
  >
100
107
  {ws.name}
101
- <span className="db-workspace-type">{ws.type === 'native' ? '(folder)' : ''}</span>
108
+ <span className="db-workspace-type">
109
+ {ws.type === 'native' || ws.type === 'electron-native' ? '(folder)' : ''}
110
+ </span>
102
111
  </button>
103
112
  ))}
104
113
 
105
114
  <div className="db-workspace-dropdown-divider" />
106
115
 
107
- <button className="db-workspace-dropdown-item" onClick={handleCreateNew}>
108
- + New Workspace
109
- </button>
116
+ {!electron && (
117
+ <button className="db-workspace-dropdown-item" onClick={handleCreateNew}>
118
+ + New Workspace
119
+ </button>
120
+ )}
110
121
 
111
- {isNativeFileSystemSupported() && (
122
+ {(electron || isNativeFileSystemSupported()) && (
112
123
  <button
113
124
  className="db-workspace-dropdown-item"
114
125
  onClick={() => {
@@ -0,0 +1,362 @@
1
+ /* Google Fonts - Latin subset, self-hosted WOFF2 */
2
+ /* See licenses/ directory for individual font licenses */
3
+
4
+ @font-face {
5
+ font-family: 'Playfair Display';
6
+ font-style: normal;
7
+ font-weight: 400;
8
+ font-display: swap;
9
+ src: url('./woff2/playfair-display-400.woff2') format('woff2');
10
+ }
11
+
12
+ @font-face {
13
+ font-family: 'Playfair Display';
14
+ font-style: normal;
15
+ font-weight: 700;
16
+ font-display: swap;
17
+ src: url('./woff2/playfair-display-700.woff2') format('woff2');
18
+ }
19
+
20
+ @font-face {
21
+ font-family: 'Oswald';
22
+ font-style: normal;
23
+ font-weight: 400;
24
+ font-display: swap;
25
+ src: url('./woff2/oswald-400.woff2') format('woff2');
26
+ }
27
+
28
+ @font-face {
29
+ font-family: 'Oswald';
30
+ font-style: normal;
31
+ font-weight: 700;
32
+ font-display: swap;
33
+ src: url('./woff2/oswald-700.woff2') format('woff2');
34
+ }
35
+
36
+ @font-face {
37
+ font-family: 'Merriweather';
38
+ font-style: normal;
39
+ font-weight: 400;
40
+ font-display: swap;
41
+ src: url('./woff2/merriweather-400.woff2') format('woff2');
42
+ }
43
+
44
+ @font-face {
45
+ font-family: 'Merriweather';
46
+ font-style: normal;
47
+ font-weight: 700;
48
+ font-display: swap;
49
+ src: url('./woff2/merriweather-700.woff2') format('woff2');
50
+ }
51
+
52
+ @font-face {
53
+ font-family: 'DM Serif Display';
54
+ font-style: normal;
55
+ font-weight: 400;
56
+ font-display: swap;
57
+ src: url('./woff2/dm-serif-display-400.woff2') format('woff2');
58
+ }
59
+
60
+ @font-face {
61
+ font-family: 'Cormorant Garamond';
62
+ font-style: normal;
63
+ font-weight: 400;
64
+ font-display: swap;
65
+ src: url('./woff2/cormorant-garamond-400.woff2') format('woff2');
66
+ }
67
+
68
+ @font-face {
69
+ font-family: 'Cormorant Garamond';
70
+ font-style: normal;
71
+ font-weight: 700;
72
+ font-display: swap;
73
+ src: url('./woff2/cormorant-garamond-700.woff2') format('woff2');
74
+ }
75
+
76
+ @font-face {
77
+ font-family: 'PT Serif';
78
+ font-style: normal;
79
+ font-weight: 400;
80
+ font-display: swap;
81
+ src: url('./woff2/pt-serif-400.woff2') format('woff2');
82
+ }
83
+
84
+ @font-face {
85
+ font-family: 'PT Serif';
86
+ font-style: normal;
87
+ font-weight: 700;
88
+ font-display: swap;
89
+ src: url('./woff2/pt-serif-700.woff2') format('woff2');
90
+ }
91
+
92
+ @font-face {
93
+ font-family: 'Source Serif 4';
94
+ font-style: italic;
95
+ font-weight: 400;
96
+ font-display: swap;
97
+ src: url('./woff2/source-serif-4-400i.woff2') format('woff2');
98
+ }
99
+
100
+ @font-face {
101
+ font-family: 'Source Serif 4';
102
+ font-style: normal;
103
+ font-weight: 400;
104
+ font-display: swap;
105
+ src: url('./woff2/source-serif-4-400.woff2') format('woff2');
106
+ }
107
+
108
+ @font-face {
109
+ font-family: 'Source Serif 4';
110
+ font-style: normal;
111
+ font-weight: 700;
112
+ font-display: swap;
113
+ src: url('./woff2/source-serif-4-700.woff2') format('woff2');
114
+ }
115
+
116
+ @font-face {
117
+ font-family: 'Roboto';
118
+ font-style: italic;
119
+ font-weight: 400;
120
+ font-display: swap;
121
+ src: url('./woff2/roboto-400i.woff2') format('woff2');
122
+ }
123
+
124
+ @font-face {
125
+ font-family: 'Roboto';
126
+ font-style: normal;
127
+ font-weight: 400;
128
+ font-display: swap;
129
+ src: url('./woff2/roboto-400.woff2') format('woff2');
130
+ }
131
+
132
+ @font-face {
133
+ font-family: 'Roboto';
134
+ font-style: normal;
135
+ font-weight: 700;
136
+ font-display: swap;
137
+ src: url('./woff2/roboto-700.woff2') format('woff2');
138
+ }
139
+
140
+ @font-face {
141
+ font-family: 'Lora';
142
+ font-style: italic;
143
+ font-weight: 400;
144
+ font-display: swap;
145
+ src: url('./woff2/lora-400i.woff2') format('woff2');
146
+ }
147
+
148
+ @font-face {
149
+ font-family: 'Lora';
150
+ font-style: normal;
151
+ font-weight: 400;
152
+ font-display: swap;
153
+ src: url('./woff2/lora-400.woff2') format('woff2');
154
+ }
155
+
156
+ @font-face {
157
+ font-family: 'Lora';
158
+ font-style: normal;
159
+ font-weight: 700;
160
+ font-display: swap;
161
+ src: url('./woff2/lora-700.woff2') format('woff2');
162
+ }
163
+
164
+ @font-face {
165
+ font-family: 'IBM Plex Sans';
166
+ font-style: italic;
167
+ font-weight: 400;
168
+ font-display: swap;
169
+ src: url('./woff2/ibm-plex-sans-400i.woff2') format('woff2');
170
+ }
171
+
172
+ @font-face {
173
+ font-family: 'IBM Plex Sans';
174
+ font-style: normal;
175
+ font-weight: 400;
176
+ font-display: swap;
177
+ src: url('./woff2/ibm-plex-sans-400.woff2') format('woff2');
178
+ }
179
+
180
+ @font-face {
181
+ font-family: 'IBM Plex Sans';
182
+ font-style: normal;
183
+ font-weight: 500;
184
+ font-display: swap;
185
+ src: url('./woff2/ibm-plex-sans-500.woff2') format('woff2');
186
+ }
187
+
188
+ @font-face {
189
+ font-family: 'IBM Plex Sans';
190
+ font-style: normal;
191
+ font-weight: 600;
192
+ font-display: swap;
193
+ src: url('./woff2/ibm-plex-sans-600.woff2') format('woff2');
194
+ }
195
+
196
+ @font-face {
197
+ font-family: 'IBM Plex Sans';
198
+ font-style: normal;
199
+ font-weight: 700;
200
+ font-display: swap;
201
+ src: url('./woff2/ibm-plex-sans-700.woff2') format('woff2');
202
+ }
203
+
204
+ @font-face {
205
+ font-family: 'DM Sans';
206
+ font-style: italic;
207
+ font-weight: 400;
208
+ font-display: swap;
209
+ src: url('./woff2/dm-sans-400i.woff2') format('woff2');
210
+ }
211
+
212
+ @font-face {
213
+ font-family: 'DM Sans';
214
+ font-style: normal;
215
+ font-weight: 400;
216
+ font-display: swap;
217
+ src: url('./woff2/dm-sans-400.woff2') format('woff2');
218
+ }
219
+
220
+ @font-face {
221
+ font-family: 'DM Sans';
222
+ font-style: normal;
223
+ font-weight: 500;
224
+ font-display: swap;
225
+ src: url('./woff2/dm-sans-500.woff2') format('woff2');
226
+ }
227
+
228
+ @font-face {
229
+ font-family: 'DM Sans';
230
+ font-style: normal;
231
+ font-weight: 700;
232
+ font-display: swap;
233
+ src: url('./woff2/dm-sans-700.woff2') format('woff2');
234
+ }
235
+
236
+ @font-face {
237
+ font-family: 'Crimson Text';
238
+ font-style: italic;
239
+ font-weight: 400;
240
+ font-display: swap;
241
+ src: url('./woff2/crimson-text-400i.woff2') format('woff2');
242
+ }
243
+
244
+ @font-face {
245
+ font-family: 'Crimson Text';
246
+ font-style: normal;
247
+ font-weight: 400;
248
+ font-display: swap;
249
+ src: url('./woff2/crimson-text-400.woff2') format('woff2');
250
+ }
251
+
252
+ @font-face {
253
+ font-family: 'Crimson Text';
254
+ font-style: normal;
255
+ font-weight: 700;
256
+ font-display: swap;
257
+ src: url('./woff2/crimson-text-700.woff2') format('woff2');
258
+ }
259
+
260
+ @font-face {
261
+ font-family: 'Hanken Grotesk';
262
+ font-style: italic;
263
+ font-weight: 400;
264
+ font-display: swap;
265
+ src: url('./woff2/hanken-grotesk-400i.woff2') format('woff2');
266
+ }
267
+
268
+ @font-face {
269
+ font-family: 'Hanken Grotesk';
270
+ font-style: normal;
271
+ font-weight: 400;
272
+ font-display: swap;
273
+ src: url('./woff2/hanken-grotesk-400.woff2') format('woff2');
274
+ }
275
+
276
+ @font-face {
277
+ font-family: 'Hanken Grotesk';
278
+ font-style: normal;
279
+ font-weight: 500;
280
+ font-display: swap;
281
+ src: url('./woff2/hanken-grotesk-500.woff2') format('woff2');
282
+ }
283
+
284
+ @font-face {
285
+ font-family: 'Hanken Grotesk';
286
+ font-style: normal;
287
+ font-weight: 600;
288
+ font-display: swap;
289
+ src: url('./woff2/hanken-grotesk-600.woff2') format('woff2');
290
+ }
291
+
292
+ @font-face {
293
+ font-family: 'Hanken Grotesk';
294
+ font-style: normal;
295
+ font-weight: 700;
296
+ font-display: swap;
297
+ src: url('./woff2/hanken-grotesk-700.woff2') format('woff2');
298
+ }
299
+
300
+ @font-face {
301
+ font-family: 'Inter';
302
+ font-style: italic;
303
+ font-weight: 400;
304
+ font-display: swap;
305
+ src: url('./woff2/inter-400i.woff2') format('woff2');
306
+ }
307
+
308
+ @font-face {
309
+ font-family: 'Inter';
310
+ font-style: normal;
311
+ font-weight: 400;
312
+ font-display: swap;
313
+ src: url('./woff2/inter-400.woff2') format('woff2');
314
+ }
315
+
316
+ @font-face {
317
+ font-family: 'Inter';
318
+ font-style: normal;
319
+ font-weight: 500;
320
+ font-display: swap;
321
+ src: url('./woff2/inter-500.woff2') format('woff2');
322
+ }
323
+
324
+ @font-face {
325
+ font-family: 'Inter';
326
+ font-style: normal;
327
+ font-weight: 600;
328
+ font-display: swap;
329
+ src: url('./woff2/inter-600.woff2') format('woff2');
330
+ }
331
+
332
+ @font-face {
333
+ font-family: 'Inter';
334
+ font-style: normal;
335
+ font-weight: 700;
336
+ font-display: swap;
337
+ src: url('./woff2/inter-700.woff2') format('woff2');
338
+ }
339
+
340
+ @font-face {
341
+ font-family: 'JetBrains Mono';
342
+ font-style: italic;
343
+ font-weight: 400;
344
+ font-display: swap;
345
+ src: url('./woff2/jetbrains-mono-400i.woff2') format('woff2');
346
+ }
347
+
348
+ @font-face {
349
+ font-family: 'JetBrains Mono';
350
+ font-style: normal;
351
+ font-weight: 400;
352
+ font-display: swap;
353
+ src: url('./woff2/jetbrains-mono-400.woff2') format('woff2');
354
+ }
355
+
356
+ @font-face {
357
+ font-family: 'JetBrains Mono';
358
+ font-style: normal;
359
+ font-weight: 700;
360
+ font-display: swap;
361
+ src: url('./woff2/jetbrains-mono-700.woff2') format('woff2');
362
+ }
@@ -0,0 +1,93 @@
1
+ Copyright 2015 the Cormorant Project Authors (github.com/CatharsisFonts/Cormorant)
2
+
3
+ This Font Software is licensed under the SIL Open Font License, Version 1.1.
4
+ This license is copied below, and is also available with a FAQ at:
5
+ https://scripts.sil.org/OFL
6
+
7
+
8
+ -----------------------------------------------------------
9
+ SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
10
+ -----------------------------------------------------------
11
+
12
+ PREAMBLE
13
+ The goals of the Open Font License (OFL) are to stimulate worldwide
14
+ development of collaborative font projects, to support the font creation
15
+ efforts of academic and linguistic communities, and to provide a free and
16
+ open framework in which fonts may be shared and improved in partnership
17
+ with others.
18
+
19
+ The OFL allows the licensed fonts to be used, studied, modified and
20
+ redistributed freely as long as they are not sold by themselves. The
21
+ fonts, including any derivative works, can be bundled, embedded,
22
+ redistributed and/or sold with any software provided that any reserved
23
+ names are not used by derivative works. The fonts and derivatives,
24
+ however, cannot be released under any other type of license. The
25
+ requirement for fonts to remain under this license does not apply
26
+ to any document created using the fonts or their derivatives.
27
+
28
+ DEFINITIONS
29
+ "Font Software" refers to the set of files released by the Copyright
30
+ Holder(s) under this license and clearly marked as such. This may
31
+ include source files, build scripts and documentation.
32
+
33
+ "Reserved Font Name" refers to any names specified as such after the
34
+ copyright statement(s).
35
+
36
+ "Original Version" refers to the collection of Font Software components as
37
+ distributed by the Copyright Holder(s).
38
+
39
+ "Modified Version" refers to any derivative made by adding to, deleting,
40
+ or substituting -- in part or in whole -- any of the components of the
41
+ Original Version, by changing formats or by porting the Font Software to a
42
+ new environment.
43
+
44
+ "Author" refers to any designer, engineer, programmer, technical
45
+ writer or other person who contributed to the Font Software.
46
+
47
+ PERMISSION & CONDITIONS
48
+ Permission is hereby granted, free of charge, to any person obtaining
49
+ a copy of the Font Software, to use, study, copy, merge, embed, modify,
50
+ redistribute, and sell modified and unmodified copies of the Font
51
+ Software, subject to the following conditions:
52
+
53
+ 1) Neither the Font Software nor any of its individual components,
54
+ in Original or Modified Versions, may be sold by itself.
55
+
56
+ 2) Original or Modified Versions of the Font Software may be bundled,
57
+ redistributed and/or sold with any software, provided that each copy
58
+ contains the above copyright notice and this license. These can be
59
+ included either as stand-alone text files, human-readable headers or
60
+ in the appropriate machine-readable metadata fields within text or
61
+ binary files as long as those fields can be easily viewed by the user.
62
+
63
+ 3) No Modified Version of the Font Software may use the Reserved Font
64
+ Name(s) unless explicit written permission is granted by the corresponding
65
+ Copyright Holder. This restriction only applies to the primary font name as
66
+ presented to the users.
67
+
68
+ 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
69
+ Software shall not be used to promote, endorse or advertise any
70
+ Modified Version, except to acknowledge the contribution(s) of the
71
+ Copyright Holder(s) and the Author(s) or with their explicit written
72
+ permission.
73
+
74
+ 5) The Font Software, modified or unmodified, in part or in whole,
75
+ must be distributed entirely under this license, and must not be
76
+ distributed under any other license. The requirement for fonts to
77
+ remain under this license does not apply to any document created
78
+ using the Font Software.
79
+
80
+ TERMINATION
81
+ This license becomes null and void if any of the above conditions are
82
+ not met.
83
+
84
+ DISCLAIMER
85
+ THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
86
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
87
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
88
+ OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
89
+ COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
90
+ INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
91
+ DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
92
+ FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
93
+ OTHER DEALINGS IN THE FONT SOFTWARE.