fontastic 0.1.3

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 (370) hide show
  1. package/.editorconfig +16 -0
  2. package/.eslintrc.json +54 -0
  3. package/.github/FUNDING.yml +12 -0
  4. package/.github/ISSUE_TEMPLATE/bug_report.md +29 -0
  5. package/.github/ISSUE_TEMPLATE/feature_request.md +20 -0
  6. package/.github/dependabot.yml +6 -0
  7. package/.github/pull_request_template.md +21 -0
  8. package/.github/stale.yml +17 -0
  9. package/.github/workflows/macos.yml +58 -0
  10. package/.github/workflows/ubuntu.yml +70 -0
  11. package/.github/workflows/windows.yml +64 -0
  12. package/.node-version +1 -0
  13. package/.vscode/launch.json +46 -0
  14. package/.vscode/tasks.json +49 -0
  15. package/CODE_OF_CONDUCT.md +45 -0
  16. package/CONTRIBUTING.md +72 -0
  17. package/LICENSE +21 -0
  18. package/README.md +111 -0
  19. package/_config.yml +1 -0
  20. package/angular.json +194 -0
  21. package/angular.webpack.js +32 -0
  22. package/app/Application.js +40 -0
  23. package/app/Application.ts +38 -0
  24. package/app/config/alert.ts +32 -0
  25. package/app/config/database.js +203 -0
  26. package/app/config/database.ts +202 -0
  27. package/app/config/index.js +20 -0
  28. package/app/config/index.ts +3 -0
  29. package/app/config/mimes.js +49 -0
  30. package/app/config/mimes.ts +54 -0
  31. package/app/config/system.js +497 -0
  32. package/app/config/system.ts +498 -0
  33. package/app/config/themes.ts +38 -0
  34. package/app/core/AppLogger.js +31 -0
  35. package/app/core/AppLogger.ts +38 -0
  36. package/app/core/ConfigManager.js +114 -0
  37. package/app/core/ConfigManager.ts +137 -0
  38. package/app/core/ConnectionManager.js +83 -0
  39. package/app/core/ConnectionManager.ts +95 -0
  40. package/app/core/FontCatalog.js +51 -0
  41. package/app/core/FontCatalog.ts +42 -0
  42. package/app/core/FontFinder.js +86 -0
  43. package/app/core/FontFinder.ts +96 -0
  44. package/app/core/FontInstaller.js +67 -0
  45. package/app/core/FontInstaller.ts +63 -0
  46. package/app/core/FontManager.js +165 -0
  47. package/app/core/FontManager.ts +172 -0
  48. package/app/core/FontObject.js +54 -0
  49. package/app/core/FontObject.ts +62 -0
  50. package/app/core/MessageHandler.js +272 -0
  51. package/app/core/MessageHandler.ts +337 -0
  52. package/app/core/SystemManager.js +140 -0
  53. package/app/core/SystemManager.ts +171 -0
  54. package/app/core/menu/Example.ts +280 -0
  55. package/app/core/menu/MenuBuilder.js +45 -0
  56. package/app/core/menu/MenuBuilder.ts +53 -0
  57. package/app/core/menu/templates/DarwinTemplate.js +127 -0
  58. package/app/core/menu/templates/DarwinTemplate.ts +142 -0
  59. package/app/core/menu/templates/SystemTemplate.js +124 -0
  60. package/app/core/menu/templates/SystemTemplate.ts +139 -0
  61. package/app/database/entity/Collection.schema.js +99 -0
  62. package/app/database/entity/Collection.schema.ts +68 -0
  63. package/app/database/entity/Logger.schema.js +50 -0
  64. package/app/database/entity/Logger.schema.ts +26 -0
  65. package/app/database/entity/Store.schema.js +165 -0
  66. package/app/database/entity/Store.schema.ts +116 -0
  67. package/app/database/entity/index.js +20 -0
  68. package/app/database/entity/index.ts +3 -0
  69. package/app/database/repository/Collection.repository.js +181 -0
  70. package/app/database/repository/Collection.repository.ts +190 -0
  71. package/app/database/repository/Logger.repository.js +25 -0
  72. package/app/database/repository/Logger.repository.ts +11 -0
  73. package/app/database/repository/Store.repository.js +328 -0
  74. package/app/database/repository/Store.repository.ts +358 -0
  75. package/app/database/repository/User.repository.js +12 -0
  76. package/app/database/repository/User.repository.ts +8 -0
  77. package/app/database/repository/index.js +20 -0
  78. package/app/database/repository/index.ts +3 -0
  79. package/app/enums/ChannelType.js +62 -0
  80. package/app/enums/ChannelType.ts +65 -0
  81. package/app/enums/StorageType.js +19 -0
  82. package/app/enums/index.js +19 -0
  83. package/app/enums/index.ts +2 -0
  84. package/app/enums/storageType.ts +14 -0
  85. package/app/helpers/command.js +28 -0
  86. package/app/helpers/command.ts +20 -0
  87. package/app/helpers/random.js +16 -0
  88. package/app/helpers/random.ts +12 -0
  89. package/app/main.js +82 -0
  90. package/app/main.ts +94 -0
  91. package/app/package-lock.json +2649 -0
  92. package/app/package.json +35 -0
  93. package/app/types/AppAlert.js +3 -0
  94. package/app/types/AppAlert.ts +8 -0
  95. package/app/types/AuthUser.js +7 -0
  96. package/app/types/AuthUser.ts +5 -0
  97. package/app/types/Breadcrumb.js +3 -0
  98. package/app/types/Breadcrumb.ts +5 -0
  99. package/app/types/ImportOptions.js +7 -0
  100. package/app/types/ImportOptions.ts +3 -0
  101. package/app/types/QueryOptions.js +3 -0
  102. package/app/types/QueryOptions.ts +12 -0
  103. package/app/types/SystemConfig.js +3 -0
  104. package/app/types/SystemConfig.ts +132 -0
  105. package/app/types/SystemStats.js +3 -0
  106. package/app/types/SystemStats.ts +7 -0
  107. package/app/types/SystemTheme.js +3 -0
  108. package/app/types/SystemTheme.ts +5 -0
  109. package/app/types/index.js +25 -0
  110. package/app/types/index.ts +8 -0
  111. package/docs/logo.png +0 -0
  112. package/docs/screenshots/readme.md +7 -0
  113. package/docs/screenshots/screen-grab1.png +0 -0
  114. package/docs/screenshots/screen-grab2.png +0 -0
  115. package/docs/screenshots/screen-grab3.png +0 -0
  116. package/e2e/main.spec.ts +59 -0
  117. package/e2e/playwright.config.ts +19 -0
  118. package/e2e/tsconfig.e2e.json +13 -0
  119. package/electron-builder.json +71 -0
  120. package/package.json +121 -0
  121. package/src/app/app-routing.module.ts +15 -0
  122. package/src/app/app.component.html +1 -0
  123. package/src/app/app.component.scss +0 -0
  124. package/src/app/app.component.spec.ts.dist +33 -0
  125. package/src/app/app.component.ts +37 -0
  126. package/src/app/app.module.ts +63 -0
  127. package/src/app/core/core.module.ts +11 -0
  128. package/src/app/core/model/AuthUserModel.ts +7 -0
  129. package/src/app/core/model/CustomThemeModel.ts +7 -0
  130. package/src/app/core/model/DbConnectionModel.ts +16 -0
  131. package/src/app/core/model/ImportOptionsModel.ts +5 -0
  132. package/src/app/core/model/LatestNewsModel.ts +7 -0
  133. package/src/app/core/model/SearchFormModel.ts +10 -0
  134. package/src/app/core/model/index.ts +6 -0
  135. package/src/app/core/services/alert/alert.service.spec.ts +22 -0
  136. package/src/app/core/services/alert/alert.service.ts +71 -0
  137. package/src/app/core/services/auth/auth.service.ts +30 -0
  138. package/src/app/core/services/boot/boot.service.ts +33 -0
  139. package/src/app/core/services/breadcrumb/breadcrumb.service.spec.ts +22 -0
  140. package/src/app/core/services/breadcrumb/breadcrumb.service.ts +30 -0
  141. package/src/app/core/services/config/config.service.ts +63 -0
  142. package/src/app/core/services/database/database.service.ts +286 -0
  143. package/src/app/core/services/electron/electron.service.spec.ts +12 -0
  144. package/src/app/core/services/electron/electron.service.ts +62 -0
  145. package/src/app/core/services/font/font.service.ts +79 -0
  146. package/src/app/core/services/gravatar/gravatar.service.spec.ts +16 -0
  147. package/src/app/core/services/gravatar/gravatar.service.ts +18 -0
  148. package/src/app/core/services/index.ts +14 -0
  149. package/src/app/core/services/message/message.service.ts +289 -0
  150. package/src/app/core/services/modal/modal.service.spec.ts +16 -0
  151. package/src/app/core/services/modal/modal.service.ts +34 -0
  152. package/src/app/core/services/news/news.service.ts +94 -0
  153. package/src/app/core/services/presentation/presentation.service.ts +341 -0
  154. package/src/app/core/services/utils/utils.service.spec.ts +12 -0
  155. package/src/app/core/services/utils/utils.service.ts +144 -0
  156. package/src/app/layout/aside/aside.component.html +9 -0
  157. package/src/app/layout/aside/aside.component.scss +1 -0
  158. package/src/app/layout/aside/aside.component.ts +26 -0
  159. package/src/app/layout/footer/footer.component.html +11 -0
  160. package/src/app/layout/footer/footer.component.scss +27 -0
  161. package/src/app/layout/footer/footer.component.ts +32 -0
  162. package/src/app/layout/header/header.component.html +35 -0
  163. package/src/app/layout/header/header.component.scss +60 -0
  164. package/src/app/layout/header/header.component.ts +229 -0
  165. package/src/app/layout/layout.component.html +14 -0
  166. package/src/app/layout/layout.component.scss +119 -0
  167. package/src/app/layout/layout.component.ts +23 -0
  168. package/src/app/layout/layout.module.ts +32 -0
  169. package/src/app/layout/layout.service.ts +13 -0
  170. package/src/app/layout/navigation/navigation.component.html +142 -0
  171. package/src/app/layout/navigation/navigation.component.scss +0 -0
  172. package/src/app/layout/navigation/navigation.component.ts +302 -0
  173. package/src/app/pages/main/grid/grid.component.html +160 -0
  174. package/src/app/pages/main/grid/grid.component.scss +3 -0
  175. package/src/app/pages/main/grid/grid.component.ts +98 -0
  176. package/src/app/pages/main/inspect/inspect.component.html +7 -0
  177. package/src/app/pages/main/inspect/inspect.component.scss +3 -0
  178. package/src/app/pages/main/inspect/inspect.component.ts +66 -0
  179. package/src/app/pages/main/main-routing.module.ts +30 -0
  180. package/src/app/pages/main/main.component.html +6 -0
  181. package/src/app/pages/main/main.component.scss +191 -0
  182. package/src/app/pages/main/main.component.ts +35 -0
  183. package/src/app/pages/main/main.module.ts +28 -0
  184. package/src/app/pages/main/preview/preview.component.html +46 -0
  185. package/src/app/pages/main/preview/preview.component.scss +0 -0
  186. package/src/app/pages/main/preview/preview.component.ts +239 -0
  187. package/src/app/pages/main/toolbar/toolbar.component.html +78 -0
  188. package/src/app/pages/main/toolbar/toolbar.component.scss +3 -0
  189. package/src/app/pages/main/toolbar/toolbar.component.ts +132 -0
  190. package/src/app/shared/components/alert/alert.component.html +9 -0
  191. package/src/app/shared/components/alert/alert.component.scss +0 -0
  192. package/src/app/shared/components/alert/alert.component.ts +37 -0
  193. package/src/app/shared/components/breadcrumbs/breadcrumbs.component.html +14 -0
  194. package/src/app/shared/components/breadcrumbs/breadcrumbs.component.scss +0 -0
  195. package/src/app/shared/components/breadcrumbs/breadcrumbs.component.ts +36 -0
  196. package/src/app/shared/components/button/button.component.html +3 -0
  197. package/src/app/shared/components/button/button.component.scss +2 -0
  198. package/src/app/shared/components/button/button.component.ts +22 -0
  199. package/src/app/shared/components/collection/create-collection/create-collection.component.html +41 -0
  200. package/src/app/shared/components/collection/create-collection/create-collection.component.scss +0 -0
  201. package/src/app/shared/components/collection/create-collection/create-collection.component.ts +68 -0
  202. package/src/app/shared/components/collection/form-collection/form-collection.component.html +1 -0
  203. package/src/app/shared/components/collection/form-collection/form-collection.component.scss +0 -0
  204. package/src/app/shared/components/collection/form-collection/form-collection.component.ts +15 -0
  205. package/src/app/shared/components/collection/update-collection/update-collection.component.html +40 -0
  206. package/src/app/shared/components/collection/update-collection/update-collection.component.scss +0 -0
  207. package/src/app/shared/components/collection/update-collection/update-collection.component.ts +71 -0
  208. package/src/app/shared/components/glyph-list/glyph-list.component.html +40 -0
  209. package/src/app/shared/components/glyph-list/glyph-list.component.scss +1 -0
  210. package/src/app/shared/components/glyph-list/glyph-list.component.ts +165 -0
  211. package/src/app/shared/components/glyph-view/glyph-view.component.html +23 -0
  212. package/src/app/shared/components/glyph-view/glyph-view.component.scss +0 -0
  213. package/src/app/shared/components/glyph-view/glyph-view.component.ts +228 -0
  214. package/src/app/shared/components/index.ts +16 -0
  215. package/src/app/shared/components/loading/loading.component.html +1 -0
  216. package/src/app/shared/components/loading/loading.component.scss +0 -0
  217. package/src/app/shared/components/loading/loading.component.ts +26 -0
  218. package/src/app/shared/components/modal/modal.component.html +31 -0
  219. package/src/app/shared/components/modal/modal.component.scss +0 -0
  220. package/src/app/shared/components/modal/modal.component.ts +51 -0
  221. package/src/app/shared/components/page-not-found/page-not-found.component.html +3 -0
  222. package/src/app/shared/components/page-not-found/page-not-found.component.scss +0 -0
  223. package/src/app/shared/components/page-not-found/page-not-found.component.ts +12 -0
  224. package/src/app/shared/components/paginator/paginator.component.html +21 -0
  225. package/src/app/shared/components/paginator/paginator.component.scss +3 -0
  226. package/src/app/shared/components/paginator/paginator.component.ts +133 -0
  227. package/src/app/shared/components/pairing/pairing.component.html +20 -0
  228. package/src/app/shared/components/pairing/pairing.component.scss +0 -0
  229. package/src/app/shared/components/pairing/pairing.component.ts +33 -0
  230. package/src/app/shared/components/search/search.component.html +54 -0
  231. package/src/app/shared/components/search/search.component.scss +10 -0
  232. package/src/app/shared/components/search/search.component.ts +77 -0
  233. package/src/app/shared/components/settings/database/database.component.html +151 -0
  234. package/src/app/shared/components/settings/database/database.component.scss +0 -0
  235. package/src/app/shared/components/settings/database/database.component.ts +145 -0
  236. package/src/app/shared/components/settings/general/general.component.html +170 -0
  237. package/src/app/shared/components/settings/general/general.component.scss +0 -0
  238. package/src/app/shared/components/settings/general/general.component.ts +150 -0
  239. package/src/app/shared/components/settings/logs/logs.component.html +44 -0
  240. package/src/app/shared/components/settings/logs/logs.component.scss +0 -0
  241. package/src/app/shared/components/settings/logs/logs.component.ts +37 -0
  242. package/src/app/shared/components/settings/news/news.component.html +41 -0
  243. package/src/app/shared/components/settings/news/news.component.scss +0 -0
  244. package/src/app/shared/components/settings/news/news.component.ts +52 -0
  245. package/src/app/shared/components/settings/settings.component.html +46 -0
  246. package/src/app/shared/components/settings/settings.component.scss +0 -0
  247. package/src/app/shared/components/settings/settings.component.ts +23 -0
  248. package/src/app/shared/components/settings/system/system.component.html +30 -0
  249. package/src/app/shared/components/settings/system/system.component.scss +0 -0
  250. package/src/app/shared/components/settings/system/system.component.ts +43 -0
  251. package/src/app/shared/components/settings/theme/theme.component.html +22 -0
  252. package/src/app/shared/components/settings/theme/theme.component.scss +0 -0
  253. package/src/app/shared/components/settings/theme/theme.component.ts +50 -0
  254. package/src/app/shared/components/spinner/spinner.component.html +1 -0
  255. package/src/app/shared/components/spinner/spinner.component.scss +0 -0
  256. package/src/app/shared/components/spinner/spinner.component.ts +26 -0
  257. package/src/app/shared/components/store/store.component.html +22 -0
  258. package/src/app/shared/components/store/store.component.scss +10 -0
  259. package/src/app/shared/components/store/store.component.ts +58 -0
  260. package/src/app/shared/components/tables/tables.component.html +47 -0
  261. package/src/app/shared/components/tables/tables.component.scss +10 -0
  262. package/src/app/shared/components/tables/tables.component.ts +81 -0
  263. package/src/app/shared/components/typescale/typescale.component.html +53 -0
  264. package/src/app/shared/components/typescale/typescale.component.scss +0 -0
  265. package/src/app/shared/components/typescale/typescale.component.ts +168 -0
  266. package/src/app/shared/directives/gravatar/gravatar.directive.ts +29 -0
  267. package/src/app/shared/directives/index.ts +2 -0
  268. package/src/app/shared/directives/webview/webview.directive.ts +8 -0
  269. package/src/app/shared/pipes/installable.pipe.ts +10 -0
  270. package/src/app/shared/pipes/prettybytes.pipe.ts +10 -0
  271. package/src/app/shared/pipes/safehtml.pipe.ts +10 -0
  272. package/src/app/shared/shared.module.ts +92 -0
  273. package/src/assets/.gitkeep +0 -0
  274. package/src/assets/fonts/fa/fa-brands-400.eot +0 -0
  275. package/src/assets/fonts/fa/fa-brands-400.svg +3535 -0
  276. package/src/assets/fonts/fa/fa-brands-400.ttf +0 -0
  277. package/src/assets/fonts/fa/fa-brands-400.woff +0 -0
  278. package/src/assets/fonts/fa/fa-brands-400.woff2 +0 -0
  279. package/src/assets/fonts/fa/fa-regular-400.eot +0 -0
  280. package/src/assets/fonts/fa/fa-regular-400.svg +803 -0
  281. package/src/assets/fonts/fa/fa-regular-400.ttf +0 -0
  282. package/src/assets/fonts/fa/fa-regular-400.woff +0 -0
  283. package/src/assets/fonts/fa/fa-regular-400.woff2 +0 -0
  284. package/src/assets/fonts/fa/fa-solid-900.eot +0 -0
  285. package/src/assets/fonts/fa/fa-solid-900.svg +4700 -0
  286. package/src/assets/fonts/fa/fa-solid-900.ttf +0 -0
  287. package/src/assets/fonts/fa/fa-solid-900.woff +0 -0
  288. package/src/assets/fonts/fa/fa-solid-900.woff2 +0 -0
  289. package/src/assets/fonts/md/MaterialIcons-Regular.eot +0 -0
  290. package/src/assets/fonts/md/MaterialIcons-Regular.ijmap +1 -0
  291. package/src/assets/fonts/md/MaterialIcons-Regular.svg +2373 -0
  292. package/src/assets/fonts/md/MaterialIcons-Regular.ttf +0 -0
  293. package/src/assets/fonts/md/MaterialIcons-Regular.woff +0 -0
  294. package/src/assets/fonts/md/MaterialIcons-Regular.woff2 +0 -0
  295. package/src/assets/fonts/md/README.md +9 -0
  296. package/src/assets/fonts/md/codepoints +932 -0
  297. package/src/assets/fonts/md/material-icons.css +36 -0
  298. package/src/assets/fonts/octicon/octicon.eot +0 -0
  299. package/src/assets/fonts/octicon/octicon.svg +378 -0
  300. package/src/assets/fonts/octicon/octicon.ttf +0 -0
  301. package/src/assets/fonts/octicon/octicon.woff +0 -0
  302. package/src/assets/fonts/octicon/octicon.woff2 +0 -0
  303. package/src/assets/fonts/roboto/Roboto-Bold-webfont.eot +0 -0
  304. package/src/assets/fonts/roboto/Roboto-Bold-webfont.svg +607 -0
  305. package/src/assets/fonts/roboto/Roboto-Bold-webfont.ttf +0 -0
  306. package/src/assets/fonts/roboto/Roboto-Bold-webfont.woff +0 -0
  307. package/src/assets/fonts/roboto/Roboto-Medium-webfont.eot +0 -0
  308. package/src/assets/fonts/roboto/Roboto-Medium-webfont.svg +607 -0
  309. package/src/assets/fonts/roboto/Roboto-Medium-webfont.ttf +0 -0
  310. package/src/assets/fonts/roboto/Roboto-Medium-webfont.woff +0 -0
  311. package/src/assets/fonts/roboto/Roboto-Regular-webfont.eot +0 -0
  312. package/src/assets/fonts/roboto/Roboto-Regular-webfont.svg +635 -0
  313. package/src/assets/fonts/roboto/Roboto-Regular-webfont.ttf +0 -0
  314. package/src/assets/fonts/roboto/Roboto-Regular-webfont.woff +0 -0
  315. package/src/assets/i18n/en.json +12 -0
  316. package/src/assets/icons/android-chrome-192x192.png +0 -0
  317. package/src/assets/icons/android-chrome-512x512.png +0 -0
  318. package/src/assets/icons/apple-touch-icon.png +0 -0
  319. package/src/assets/icons/favicon-16x16.png +0 -0
  320. package/src/assets/icons/favicon-32x32.png +0 -0
  321. package/src/assets/icons/favicon.ico +0 -0
  322. package/src/assets/icons/site.webmanifest +1 -0
  323. package/src/assets/images/electron.bmp +0 -0
  324. package/src/bin/activator +0 -0
  325. package/src/bin/activator.exe +0 -0
  326. package/src/environments/environment.dev.ts +4 -0
  327. package/src/environments/environment.prod.ts +4 -0
  328. package/src/environments/environment.ts +4 -0
  329. package/src/environments/environment.web.prod.ts +4 -0
  330. package/src/environments/environment.web.ts +4 -0
  331. package/src/favicon.ico +0 -0
  332. package/src/index.html +55 -0
  333. package/src/karma.conf.js +50 -0
  334. package/src/main.ts +15 -0
  335. package/src/polyfills-test.ts +1 -0
  336. package/src/polyfills.ts +53 -0
  337. package/src/styles/base/loading.scss +87 -0
  338. package/src/styles/base/reset.scss +408 -0
  339. package/src/styles/components/alert.scss +54 -0
  340. package/src/styles/components/buttons.scss +93 -0
  341. package/src/styles/components/forms.scss +96 -0
  342. package/src/styles/components/inputs.scss +113 -0
  343. package/src/styles/components/modal.scss +52 -0
  344. package/src/styles/components/paginator.scss +108 -0
  345. package/src/styles/components/scrollbox.scss +71 -0
  346. package/src/styles/components/spinner.scss +11 -0
  347. package/src/styles/components/tables.scss +42 -0
  348. package/src/styles/components/tabs.scss +44 -0
  349. package/src/styles/components/toolbar.scss +130 -0
  350. package/src/styles/fonts/md.scss +54 -0
  351. package/src/styles/fonts/octicons.scss +1351 -0
  352. package/src/styles/fonts/roboto.scss +32 -0
  353. package/src/styles/themes/dashboard.scss +294 -0
  354. package/src/styles/themes/euphoria.scss +283 -0
  355. package/src/styles/themes/mellow.scss +280 -0
  356. package/src/styles/themes/midnight.scss +283 -0
  357. package/src/styles/themes/passion.scss +280 -0
  358. package/src/styles/themes/swiss.scss +283 -0
  359. package/src/styles/tools/_functions.scss +5 -0
  360. package/src/styles/tools/_mixins.scss +159 -0
  361. package/src/styles/tools/_placeholders.scss +17 -0
  362. package/src/styles/tools/_variables.scss +67 -0
  363. package/src/styles.scss +37 -0
  364. package/src/test.ts +22 -0
  365. package/src/tsconfig.app.json +20 -0
  366. package/src/tsconfig.spec.json +23 -0
  367. package/src/typings.d.ts +9 -0
  368. package/tailwind.config.js +67 -0
  369. package/tsconfig.json +42 -0
  370. package/tsconfig.serve.json +27 -0
@@ -0,0 +1,35 @@
1
+ {
2
+ "name": "fontastic",
3
+ "version": "0.1.3",
4
+ "description": "A gorgeous multi-platform font management application.",
5
+ "private": false,
6
+ "author": {
7
+ "name": "Tom Shaw",
8
+ "email": "dev@tomshaw.us"
9
+ },
10
+ "keywords": [
11
+ "angular",
12
+ "electron",
13
+ "font",
14
+ "type",
15
+ "typography"
16
+ ],
17
+ "main": "main.js",
18
+ "dependencies": {
19
+ "@mozilla/readability": "^0.4.2",
20
+ "electron-is-dev": "^2.0.0",
21
+ "electron-log": "^5.0.0-beta.6",
22
+ "electron-store": "^8.1.0",
23
+ "jsdom": "^20.0.1",
24
+ "mime": "^3.0.0",
25
+ "mysql": "^2.18.1",
26
+ "node-fetch": "^2.6.7",
27
+ "node-machine-id": "^1.1.12",
28
+ "opentype.js": "^1.3.4",
29
+ "pretty-bytes": "^5.6.0",
30
+ "reflect-metadata": "^0.1.13",
31
+ "sqlite3": "^5.1.4",
32
+ "sudo-prompt": "^9.2.1",
33
+ "typeorm": "^0.3.11"
34
+ }
35
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=AppAlert.js.map
@@ -0,0 +1,8 @@
1
+ export interface AppAlert {
2
+ type: string;
3
+ message: string;
4
+ icon: string;
5
+ class: string;
6
+ keep: boolean;
7
+ timeout: number;
8
+ }
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AuthUser = void 0;
4
+ class AuthUser {
5
+ }
6
+ exports.AuthUser = AuthUser;
7
+ //# sourceMappingURL=AuthUser.js.map
@@ -0,0 +1,5 @@
1
+ export class AuthUser {
2
+ name: string;
3
+ email: string;
4
+ status: string;
5
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=Breadcrumb.js.map
@@ -0,0 +1,5 @@
1
+ export interface Breadcrumb {
2
+ title: string;
3
+ link: string;
4
+ type?: string;
5
+ }
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ImportOptions = void 0;
4
+ class ImportOptions {
5
+ }
6
+ exports.ImportOptions = ImportOptions;
7
+ //# sourceMappingURL=ImportOptions.js.map
@@ -0,0 +1,3 @@
1
+ export class ImportOptions {
2
+ type: string;
3
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=QueryOptions.js.map
@@ -0,0 +1,12 @@
1
+ export interface SortOrder {
2
+ column: string;
3
+ direction: string;
4
+ }
5
+
6
+ export interface QueryOptions {
7
+ where: any[];
8
+ order: SortOrder;
9
+ skip: number;
10
+ take: number;
11
+ run: boolean;
12
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=SystemConfig.js.map
@@ -0,0 +1,132 @@
1
+ import { AuthUser } from "./AuthUser";
2
+
3
+ export interface DatabaseConnectionsType {
4
+ name: string,
5
+ type: string,
6
+ title: string,
7
+ description: string,
8
+ enabled: boolean,
9
+ synchronize: boolean,
10
+ database: string,
11
+ charset: string,
12
+ logger: string,
13
+ logging: boolean
14
+ }
15
+
16
+ export interface DatabaseLoggersType {
17
+ title: string,
18
+ value: string
19
+ }
20
+
21
+ export interface DatabaseType {
22
+ drivers: string[],
23
+ connections: DatabaseConnectionsType[],
24
+ loggers: DatabaseLoggersType[]
25
+ }
26
+
27
+ export interface LayoutPanelType {
28
+ _gridEnabled: boolean,
29
+ _asideEnabled: boolean,
30
+ _asideComponent: string,
31
+ _asideTableTabs: any[],
32
+ _navigationEnabled: boolean,
33
+ _toolbarEnabled: boolean,
34
+ _previewEnabled: boolean,
35
+ _inspectEnabled: boolean,
36
+ _inspectComponent: string,
37
+ _statsCollapsed: boolean,
38
+ _foldersCollapsed: boolean,
39
+ _optionsCollapsed: boolean
40
+ }
41
+
42
+ export interface LayoutThemeType {
43
+ _defaultTheme: string
44
+ }
45
+
46
+ export interface LayoutPreviewType {
47
+ _fontSize: number,
48
+ _fontColor: string,
49
+ _displayText: string,
50
+ _backgroundColor: string,
51
+ _wordSpacing: number,
52
+ _letterSpacing: number,
53
+ _displayNews?: boolean
54
+ }
55
+
56
+ export interface LayoutType {
57
+ panel: LayoutPanelType,
58
+ theme: LayoutThemeType,
59
+ preview: LayoutPreviewType
60
+ }
61
+
62
+ export interface NewsArticlesType {
63
+ source?: {
64
+ id: string,
65
+ name: string
66
+ },
67
+ author?: string,
68
+ title?: string,
69
+ description?: string,
70
+ url?: string,
71
+ urlToImage?: string,
72
+ publishedAt?: string,
73
+ content?: string
74
+ }
75
+
76
+ export interface NewsType {
77
+ ts?: number,
78
+ articles?: NewsArticlesType[],
79
+ apiKey?: string,
80
+ status?: string
81
+ }
82
+
83
+ export interface OptionsType {
84
+ import?: {
85
+ type: string
86
+ }
87
+ }
88
+
89
+ export interface CatalogType {
90
+ collection?: {
91
+ id: number
92
+ },
93
+ store?: {
94
+ id: number
95
+ }
96
+ }
97
+
98
+ export interface UptimeType {
99
+ ts: number,
100
+ hours: number,
101
+ minutes: number,
102
+ seconds: number
103
+ }
104
+
105
+ export interface SystemType {
106
+ uptime: UptimeType,
107
+ locale: string,
108
+ is_dev: boolean,
109
+ is_production: boolean,
110
+ is_x86: boolean,
111
+ is_x64: boolean,
112
+ is_mac: boolean,
113
+ is_windows: boolean,
114
+ is_linux: boolean,
115
+ cache_path: string,
116
+ app_path: string,
117
+ app_data_path: string,
118
+ user_data_path: string,
119
+ downloads_path: string,
120
+ session_path: string,
121
+ catalog_path: string
122
+ }
123
+
124
+ export interface SystemConfig {
125
+ catalog?: CatalogType;
126
+ database: DatabaseType;
127
+ layout?: LayoutType;
128
+ news?: NewsType;
129
+ options: OptionsType;
130
+ system: SystemType;
131
+ user?: AuthUser;
132
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=SystemStats.js.map
@@ -0,0 +1,7 @@
1
+ export interface SystemStats {
2
+ rowCount?: number;
3
+ favoriteCount?: number;
4
+ systemCount?: number;
5
+ activatedCount?: number;
6
+ temporaryCount?: number;
7
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=SystemTheme.js.map
@@ -0,0 +1,5 @@
1
+ export interface SystemTheme {
2
+ key: string;
3
+ title: string;
4
+ description: string;
5
+ }
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./AppAlert"), exports);
18
+ __exportStar(require("./AuthUser"), exports);
19
+ __exportStar(require("./Breadcrumb"), exports);
20
+ __exportStar(require("./QueryOptions"), exports);
21
+ __exportStar(require("./SystemTheme"), exports);
22
+ __exportStar(require("./SystemStats"), exports);
23
+ __exportStar(require("./SystemConfig"), exports);
24
+ __exportStar(require("./ImportOptions"), exports);
25
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,8 @@
1
+ export * from './AppAlert';
2
+ export * from './AuthUser';
3
+ export * from './Breadcrumb';
4
+ export * from './QueryOptions';
5
+ export * from './SystemTheme';
6
+ export * from './SystemStats';
7
+ export * from './SystemConfig';
8
+ export * from './ImportOptions';
package/docs/logo.png ADDED
Binary file
@@ -0,0 +1,7 @@
1
+ # Typepress Screen Shots
2
+
3
+ ![](screen-grab1.png)
4
+
5
+ ![](screen-grab2.png)
6
+
7
+ ![](screen-grab3.png)
@@ -0,0 +1,59 @@
1
+ import { BrowserContext, ElectronApplication, Page, _electron as electron } from 'playwright';
2
+ import { test, expect } from '@playwright/test';
3
+ const PATH = require('path');
4
+
5
+ test.describe('Check Home Page', async () => {
6
+ let app: ElectronApplication;
7
+ let firstWindow: Page;
8
+ let context: BrowserContext;
9
+
10
+ test.beforeAll( async () => {
11
+ app = await electron.launch({ args: [PATH.join(__dirname, '../app/main.js'), PATH.join(__dirname, '../app/package.json')] });
12
+ context = app.context();
13
+ await context.tracing.start({ screenshots: true, snapshots: true });
14
+ firstWindow = await app.firstWindow();
15
+ await firstWindow.waitForLoadState('domcontentloaded');
16
+ });
17
+
18
+ test('Launch electron app', async () => {
19
+
20
+ const windowState: { isVisible: boolean; isDevToolsOpened: boolean; isCrashed: boolean } = await app.evaluate(async (process) => {
21
+ const mainWindow = process.BrowserWindow.getAllWindows()[0];
22
+
23
+ const getState = () => ({
24
+ isVisible: mainWindow.isVisible(),
25
+ isDevToolsOpened: mainWindow.webContents.isDevToolsOpened(),
26
+ isCrashed: mainWindow.webContents.isCrashed(),
27
+ });
28
+
29
+ return new Promise((resolve) => {
30
+ if (mainWindow.isVisible()) {
31
+ resolve(getState());
32
+ } else {
33
+ mainWindow.once('ready-to-show', () => setTimeout(() => resolve(getState()), 0));
34
+ }
35
+ });
36
+ });
37
+
38
+ expect(windowState.isVisible).toBeTruthy();
39
+ expect(windowState.isDevToolsOpened).toBeFalsy();
40
+ expect(windowState.isCrashed).toBeFalsy();
41
+ });
42
+
43
+ // test('Check Home Page design', async ({ browserName}) => {
44
+ // // Uncomment if you change the design of Home Page in order to create a new screenshot
45
+ // const screenshot = await firstWindow.screenshot({ path: '/tmp/home.png' });
46
+ // expect(screenshot).toMatchSnapshot(`home-${browserName}.png`);
47
+ // });
48
+
49
+ // test('Check title', async () => {
50
+ // const elem = await firstWindow.$('app-home h1');
51
+ // const text = await elem.innerText();
52
+ // expect(text).toBe('App works !');
53
+ // });
54
+
55
+ test.afterAll( async () => {
56
+ await context.tracing.stop({ path: 'e2e/tracing/trace.zip' });
57
+ await app.close();
58
+ });
59
+ });
@@ -0,0 +1,19 @@
1
+ /** @type {import('@playwright/test').PlaywrightTestConfig} */
2
+ const config = {
3
+ testDir: '.',
4
+ timeout: 45000,
5
+ outputDir: './screenshots',
6
+ use: {
7
+ headless: false,
8
+ viewport: { width: 1280, height: 720 },
9
+ launchOptions: {
10
+ slowMo: 1000,
11
+ },
12
+ trace: 'on',
13
+ },
14
+ expect: {
15
+ toMatchSnapshot: { threshold: 0.2 },
16
+ },
17
+ };
18
+
19
+ module.exports = config;
@@ -0,0 +1,13 @@
1
+ {
2
+ "extends": "../tsconfig.json",
3
+ "compilerOptions": {
4
+ "outDir": "../out-tsc/e2e",
5
+ "module": "commonjs",
6
+ "types": [
7
+ "node"
8
+ ]
9
+ },
10
+ "include": [
11
+ "**.spec.ts"
12
+ ],
13
+ }
@@ -0,0 +1,71 @@
1
+ {
2
+ "asar": true,
3
+ "directories": {
4
+ "output": "release/"
5
+ },
6
+ "files": [
7
+ "**/*",
8
+ "!**/*.ts",
9
+ "!*.map",
10
+ "!package.json",
11
+ "!package-lock.json",
12
+ {
13
+ "from": "../dist",
14
+ "filter": [
15
+ "**/*"
16
+ ]
17
+ }
18
+ ],
19
+ "extraResources": [
20
+ {
21
+ "from": "src/bin",
22
+ "to": "bin"
23
+ }
24
+ ],
25
+ "productName": "Fontastic",
26
+ "win": {
27
+ "icon": "dist/assets/icons",
28
+ "target": [
29
+ "portable",
30
+ "msi"
31
+ ]
32
+ },
33
+ "mac": {
34
+ "icon": "dist/assets/icons",
35
+ "target": [
36
+ "dmg"
37
+ ]
38
+ },
39
+ "linux": {
40
+ "icon": "dist/assets/icons",
41
+ "category": "Utility",
42
+ "synopsis": "A gorgeous multi-platform font management application.",
43
+ "target": [
44
+ "deb",
45
+ "rpm",
46
+ "AppImage",
47
+ "snap"
48
+ ],
49
+ "desktop": {
50
+ "Name": "Fontastic",
51
+ "Type": "Application",
52
+ "GenericName": "Font Manager"
53
+ }
54
+ },
55
+ "msi": {
56
+ "artifactName": "${productName}-installer-${version}.${ext}"
57
+ },
58
+ "portable": {
59
+ "splashImage": "dist/assets/images/electron.bmp",
60
+ "artifactName": "${productName}-portable-${version}.${ext}"
61
+ },
62
+ "deb": {
63
+ "artifactName": "${productName}-${version}-${arch}.${ext}"
64
+ },
65
+ "rpm": {
66
+ "artifactName": "${productName}-${version}-${arch}.${ext}"
67
+ },
68
+ "appImage": {
69
+ "artifactName": "${productName}-${version}-${arch}.${ext}"
70
+ }
71
+ }
package/package.json ADDED
@@ -0,0 +1,121 @@
1
+ {
2
+ "name": "fontastic",
3
+ "version": "0.1.3",
4
+ "description": "A gorgeous multi-platform font management application.",
5
+ "homepage": "https://github.com/tomshaw/fontastic",
6
+ "private": false,
7
+ "author": {
8
+ "name": "Tom Shaw",
9
+ "email": "dev@tomshaw.us"
10
+ },
11
+ "keywords": [
12
+ "angular",
13
+ "electron",
14
+ "font",
15
+ "type",
16
+ "typography"
17
+ ],
18
+ "main": "app/main.js",
19
+ "scripts": {
20
+ "postinstall": "electron-builder install-app-deps",
21
+ "ng": "ng",
22
+ "start": "npm-run-all -p electron:serve ng:serve",
23
+ "ng:serve": "ng serve -c web -o",
24
+ "build": "npm run electron:serve-tsc && ng build --base-href ./",
25
+ "build:dev": "npm run build -- -c dev",
26
+ "build:prod": "npm run build -- -c production",
27
+ "web:build": "npm run build -- -c web-production",
28
+ "electron": "electron",
29
+ "electron:serve-tsc": "tsc -p tsconfig.serve.json",
30
+ "electron:serve": "wait-on tcp:4200 && npm run electron:serve-tsc && electron . --serve",
31
+ "electron:local": "npm run build:prod && electron .",
32
+ "electron:build": "npm run build:prod && electron-builder build --publish=never",
33
+ "test": "ng test --watch=false",
34
+ "test:watch": "ng test",
35
+ "e2e": "npm run build:prod && playwright test -c e2e/playwright.config.ts e2e/",
36
+ "e2e:show-trace": "playwright show-trace e2e/tracing/trace.zip",
37
+ "version": "conventional-changelog -i CHANGELOG.md -s -r 0 && git add CHANGELOG.md",
38
+ "lint": "ng lint"
39
+ },
40
+ "dependencies": {
41
+ "@angular/common": "14.2.6",
42
+ "@angular/compiler": "14.2.6",
43
+ "@angular/core": "14.2.6",
44
+ "@angular/forms": "14.2.6",
45
+ "@angular/language-service": "14.2.6",
46
+ "@angular/platform-browser": "14.2.6",
47
+ "@angular/platform-browser-dynamic": "14.2.6",
48
+ "@angular/router": "14.2.6",
49
+ "@tailwindcss/forms": "0.5.3",
50
+ "@tailwindcss/typography": "0.5.8",
51
+ "chart.js": "4.1.1",
52
+ "dot-prop": "7.2.0",
53
+ "electron-log": "4.4.8",
54
+ "electron-store": "8.1.0",
55
+ "gsap": "3.11.4",
56
+ "mime": "3.0.0",
57
+ "mysql": "2.18.1",
58
+ "node-machine-id": "1.1.12",
59
+ "opentype.js": "1.3.4",
60
+ "postcss": "8.4.20",
61
+ "pretty-bytes": "6.0.0",
62
+ "reflect-metadata": "0.1.13",
63
+ "rxjs": "7.5.7",
64
+ "sqlite3": "5.1.4",
65
+ "sudo-prompt": "9.2.1",
66
+ "ts-md5": "1.3.1",
67
+ "tslib": "^2.4.0",
68
+ "typeorm": "0.3.11",
69
+ "zone.js": "~0.11.8"
70
+ },
71
+ "devDependencies": {
72
+ "@angular-builders/custom-webpack": "14.0.1",
73
+ "@angular-devkit/build-angular": "14.2.6",
74
+ "@angular-eslint/builder": "14.1.2",
75
+ "@angular-eslint/eslint-plugin": "14.1.2",
76
+ "@angular-eslint/eslint-plugin-template": "14.1.2",
77
+ "@angular-eslint/schematics": "14.1.2",
78
+ "@angular-eslint/template-parser": "14.1.2",
79
+ "@angular/cli": "14.2.6",
80
+ "@angular/compiler-cli": "14.2.6",
81
+ "@ngx-translate/core": "14.0.0",
82
+ "@ngx-translate/http-loader": "7.0.0",
83
+ "@playwright/test": "1.27.1",
84
+ "@types/jasmine": "4.3.0",
85
+ "@types/jasminewd2": "2.0.10",
86
+ "@types/node": "18.11.0",
87
+ "@types/opentype.js": "1.3.4",
88
+ "@typescript-eslint/eslint-plugin": "5.40.0",
89
+ "@typescript-eslint/parser": "5.40.0",
90
+ "conventional-changelog-cli": "2.2.2",
91
+ "electron": "21.1.1",
92
+ "electron-builder": "23.6.0",
93
+ "electron-debug": "3.2.0",
94
+ "electron-reloader": "1.2.3",
95
+ "eslint": "8.25.0",
96
+ "eslint-plugin-import": "2.26.0",
97
+ "eslint-plugin-jsdoc": "39.3.6",
98
+ "eslint-plugin-prefer-arrow": "1.2.3",
99
+ "jasmine-core": "4.4.0",
100
+ "jasmine-spec-reporter": "7.0.0",
101
+ "karma": "6.4.1",
102
+ "karma-coverage-istanbul-reporter": "3.0.3",
103
+ "karma-electron": "7.3.0",
104
+ "karma-jasmine": "5.1.0",
105
+ "karma-jasmine-html-reporter": "2.0.0",
106
+ "node-polyfill-webpack-plugin": "2.0.1",
107
+ "npm-run-all": "4.1.5",
108
+ "playwright": "1.27.1",
109
+ "tailwindcss": "3.2.4",
110
+ "ts-node": "10.9.1",
111
+ "typescript": "4.8.4",
112
+ "wait-on": "6.0.1",
113
+ "webdriver-manager": "12.1.8"
114
+ },
115
+ "engines": {
116
+ "node": ">= 14.15.0"
117
+ },
118
+ "browserslist": [
119
+ "chrome 100"
120
+ ]
121
+ }
@@ -0,0 +1,15 @@
1
+ import { NgModule } from '@angular/core';
2
+ import { Routes, RouterModule } from '@angular/router';
3
+
4
+ import { PageNotFoundComponent } from './shared/components';
5
+
6
+ const routes: Routes = [
7
+ { path: '', redirectTo: 'main', pathMatch: 'full' },
8
+ { path: '**', component: PageNotFoundComponent }
9
+ ];
10
+
11
+ @NgModule({
12
+ imports: [RouterModule.forRoot(routes, { useHash: true })],
13
+ exports: [RouterModule]
14
+ })
15
+ export class AppRoutingModule {}
@@ -0,0 +1 @@
1
+ <router-outlet></router-outlet>
File without changes
@@ -0,0 +1,33 @@
1
+ import { TestBed, waitForAsync } from '@angular/core/testing';
2
+ import { RouterTestingModule } from '@angular/router/testing';
3
+ import { AppComponent } from './app.component';
4
+ import { TranslateModule } from '@ngx-translate/core';
5
+ import { ElectronService, PresentationService } from './core/services';
6
+
7
+ describe('AppComponent', () => {
8
+ let originalTimeout: number;
9
+
10
+ beforeEach(() => {
11
+ originalTimeout = jasmine.DEFAULT_TIMEOUT_INTERVAL;
12
+ jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000000;
13
+ });
14
+
15
+ afterEach(() => {
16
+ jasmine.DEFAULT_TIMEOUT_INTERVAL = originalTimeout;
17
+ });
18
+
19
+ beforeEach(waitForAsync(() => {
20
+ TestBed.configureTestingModule({
21
+ declarations: [AppComponent],
22
+ providers: [ElectronService, PresentationService],
23
+ imports: [RouterTestingModule, TranslateModule.forRoot()]
24
+ }).compileComponents();
25
+ }));
26
+
27
+ it('should create the app', waitForAsync(() => {
28
+ const fixture = TestBed.createComponent(AppComponent);
29
+ const app = fixture.debugElement.componentInstance;
30
+ expect(app).toBeTruthy();
31
+ }));
32
+
33
+ });