├── .nvmrc ├── .prettierignore ├── renovate.json ├── cypress ├── fixtures │ ├── invalid-history.txt │ ├── import.md │ ├── demo.png │ ├── demo.png.license │ ├── history-2.json.license │ ├── history.json.license │ ├── import.md.license │ ├── invalid-history.txt.license │ ├── history.json │ ├── history-2.json │ └── languages.ts ├── .eslintrc.json.license ├── tsconfig.json.license ├── e2e │ ├── slideshow-only-page.spec.ts │ ├── document-read-only-page.spec.ts │ ├── helpDialog.spec.ts │ ├── diagrams.spec.ts │ ├── iframe-capsule.ts │ ├── linkEmbedder.spec.ts │ └── renderer-mode.spec.ts ├── tsconfig.json ├── support │ ├── logout.ts │ ├── check-links.ts │ └── get-by-id.ts └── .eslintrc.json ├── public ├── public │ ├── motd.md │ ├── readme.md │ ├── img │ │ ├── avatar.png │ │ ├── demo.png │ │ └── highres.jpg │ ├── screenshot.png │ └── intro.md ├── robots.txt └── icons │ ├── favicon.ico │ ├── favicon-16x16.png │ ├── favicon-32x32.png │ ├── mstile-70x70.png │ ├── apple-touch-icon.png │ ├── mstile-144x144.png │ ├── mstile-150x150.png │ ├── mstile-310x150.png │ ├── mstile-310x310.png │ ├── android-chrome-192x192.png │ ├── android-chrome-512x512.png │ ├── browserconfig.xml │ └── site.webmanifest ├── .gitattributes ├── .env.production ├── .netlify └── state.json ├── .dockerignore ├── .nvmrc.license ├── .env.test.license ├── .mailmap.license ├── package.json.license ├── yarn.lock.license ├── .dockerignore.license ├── .env.development.license ├── .env.production.license ├── .env.test ├── .eslintrc.json.license ├── .prettierrc.json.license ├── netlify ├── intro.md.license ├── motd.md.license ├── intro.md └── motd.md ├── next-env.d.ts.license ├── renovate.json.license ├── src ├── links.json.license ├── version.json.license ├── components │ ├── common │ │ ├── user-avatar │ │ │ ├── default-avatar.png │ │ │ ├── default-avatar.png.license │ │ │ └── user-avatar.module.scss │ │ ├── simple-alert │ │ │ └── simple-alert-props.ts │ │ ├── branding │ │ │ └── branding.module.scss │ │ ├── show-if │ │ │ ├── __snapshots__ │ │ │ │ └── show-if.test.tsx.snap │ │ │ ├── show-if.test.tsx │ │ │ └── show-if.tsx │ │ ├── links │ │ │ ├── __snapshots__ │ │ │ │ ├── translated-internal-link.test.tsx.snap │ │ │ │ └── translated-external-link.test.tsx.snap │ │ │ ├── types.d.ts │ │ │ ├── translated-internal-link.test.tsx │ │ │ ├── translated-external-link.test.tsx │ │ │ ├── translated-internal-link.tsx │ │ │ └── translated-external-link.tsx │ │ ├── fields │ │ │ └── fields.ts │ │ ├── fork-awesome │ │ │ └── types.d.ts │ │ ├── number-range │ │ │ ├── number-range.ts │ │ │ └── number-range.test.ts │ │ ├── redirect-back.tsx │ │ ├── upload-image-mimetypes.ts │ │ ├── wait-spinner │ │ │ └── wait-spinner.tsx │ │ ├── icon-button │ │ │ ├── icon-button.module.scss │ │ │ ├── __snapshots__ │ │ │ │ └── translated-icon-button.test.tsx.snap │ │ │ └── translated-icon-button.test.tsx │ │ ├── pagination │ │ │ └── pager-item.tsx │ │ ├── note-loading-boundary │ │ │ └── __snapshots__ │ │ │ │ └── note-loading-boundary.test.tsx.snap │ │ └── modals │ │ │ └── deletion-moadal.test.tsx │ ├── editor-page │ │ ├── editor-pane │ │ │ ├── tool-bar │ │ │ │ ├── emoji-picker │ │ │ │ │ ├── forkawesome.png.license │ │ │ │ │ ├── forkawesome.png │ │ │ │ │ └── emoji-picker.module.scss │ │ │ │ ├── formatters │ │ │ │ │ ├── types │ │ │ │ │ │ ├── cursor-selection.d.ts │ │ │ │ │ │ └── changes.d.ts │ │ │ │ │ └── replace-in-content.ts │ │ │ │ ├── table-picker │ │ │ │ │ └── table-picker.module.scss │ │ │ │ ├── tool-bar.module.scss │ │ │ │ └── buttons │ │ │ │ │ ├── link-button.tsx │ │ │ │ │ ├── bold-button.tsx │ │ │ │ │ ├── italic-button.tsx │ │ │ │ │ ├── highlight-button.tsx │ │ │ │ │ ├── image-link-button.tsx │ │ │ │ │ ├── underline-button.tsx │ │ │ │ │ └── subscript-button.tsx │ │ │ ├── status-bar │ │ │ │ └── separator-dash.tsx │ │ │ ├── hooks │ │ │ │ └── yjs │ │ │ │ │ ├── use-y-doc.ts │ │ │ │ │ ├── use-markdown-content-y-text.ts │ │ │ │ │ └── use-bind-y-text-to-redux.ts │ │ │ └── extended-codemirror │ │ │ │ ├── hints.scss │ │ │ │ └── codemirror.module.scss │ │ ├── sidebar │ │ │ ├── style │ │ │ │ ├── variables.scss │ │ │ │ └── sidebar.module.scss │ │ │ ├── specific-sidebar-entries │ │ │ │ └── pin-note-sidebar-entry.module.css │ │ │ ├── users-online-sidebar-menu │ │ │ │ ├── active-indicator.module.scss │ │ │ │ ├── online-counter.module.scss │ │ │ │ └── active-indicator.tsx │ │ │ ├── sidebar-menu │ │ │ │ ├── sidebar-menu.module.scss │ │ │ │ └── sidebar-menu.tsx │ │ │ └── user-line │ │ │ │ └── user-line.module.scss │ │ ├── app-bar │ │ │ ├── help-button │ │ │ │ └── cheatsheet.module.scss │ │ │ └── new-note-button.tsx │ │ ├── document-bar │ │ │ ├── note-info │ │ │ │ ├── note-info-time-line.ts │ │ │ │ ├── utils │ │ │ │ │ ├── unitalic-bold-time-from-now.tsx │ │ │ │ │ └── unitalic-bold-trans.tsx │ │ │ │ └── time-from-now.tsx │ │ │ ├── revisions │ │ │ │ ├── revision-modal.module.scss │ │ │ │ └── revision-list-entry.module.scss │ │ │ ├── permissions │ │ │ │ └── types.ts │ │ │ └── aliases │ │ │ │ └── __snapshots__ │ │ │ │ ├── aliases-list.test.tsx.snap │ │ │ │ ├── aliases-add-form.test.tsx.snap │ │ │ │ └── aliases-modal.test.tsx.snap │ │ ├── change-content-context │ │ │ └── code-mirror-selection.d.ts │ │ ├── splitter │ │ │ └── splitter.module.scss │ │ ├── table-of-contents │ │ │ └── toc-slugify.ts │ │ ├── utils.ts │ │ └── synced-scroll │ │ │ └── scroll-props.ts │ ├── intro-page │ │ ├── cover-buttons │ │ │ └── cover-buttons.module.scss │ │ └── requests.ts │ ├── document-read-only-page │ │ └── document-infobar.module.scss │ ├── history-page │ │ ├── entry-menu │ │ │ └── entry-menu.module.scss │ │ ├── history-card │ │ │ └── history-card.module.scss │ │ ├── history-toolbar │ │ │ ├── toolbar-context │ │ │ │ └── toolbar-context.d.ts │ │ │ ├── history-toolbar-state.d.ts │ │ │ ├── hooks │ │ │ │ └── use-safe-refresh-history-state.tsx │ │ │ └── export-history-button.tsx │ │ ├── pin-button │ │ │ └── pin-button.module.scss │ │ └── history-table │ │ │ └── history-table.module.scss │ ├── landing-layout │ │ ├── navigation │ │ │ └── header-bar │ │ │ │ └── header-nav-link.module.scss │ │ └── footer │ │ │ └── footer.tsx │ ├── markdown-renderer │ │ ├── extensions │ │ │ ├── image │ │ │ │ ├── lightbox.module.scss │ │ │ │ └── proxy-image-markdown-extension.ts │ │ │ ├── linemarker │ │ │ │ ├── types.d.ts │ │ │ │ └── linemarker-replacer.tsx │ │ │ ├── image-placeholder │ │ │ │ └── image-placeholder.module.scss │ │ │ ├── emoji │ │ │ │ ├── __snapshots__ │ │ │ │ │ └── emoji-markdown-extension.test.tsx.snap │ │ │ │ └── emoji-markdown-extension.ts │ │ │ ├── linkify-fix │ │ │ │ └── __snapshots__ │ │ │ │ │ └── linkify-fix-markdown-extension.test.tsx.snap │ │ │ ├── iframe-capsule │ │ │ │ └── iframe-capsule-markdown-extension.ts │ │ │ ├── base │ │ │ │ └── code-block-markdown-extension │ │ │ │ │ └── code-block-parameters.ts │ │ │ ├── sanitizer │ │ │ │ └── sanitizer-markdown-extension.ts │ │ │ └── upload-indicating-image-frame │ │ │ │ └── upload-indicating-image-frame-markdown-extension.ts │ │ ├── node-preprocessors │ │ │ └── node-processor.ts │ │ ├── common-markdown-renderer-props.ts │ │ ├── loading-slide.tsx │ │ └── test-utils │ │ │ └── mock-i18n.ts │ ├── login-page │ │ └── auth │ │ │ ├── fields │ │ │ └── fields.ts │ │ │ ├── social-link-button │ │ │ └── social-link-button.module.scss │ │ │ └── via-one-click.module.scss │ ├── profile-page │ │ └── access-tokens │ │ │ └── access-token-creation-form │ │ │ └── access-token-creation-form-field.d.ts │ ├── application-loader │ │ ├── application-loader.module.scss │ │ ├── application-loader-error.ts │ │ ├── initializers │ │ │ └── fetch-frontend-config.ts │ │ └── loading-screen │ │ │ └── icon-row.tsx │ ├── render-page │ │ ├── markdown-toc-button │ │ │ └── markdown-toc-button.module.scss │ │ ├── markdown-document.module.scss │ │ └── window-post-message-communicator │ │ │ └── hooks │ │ │ └── use-is-renderer-ready.ts │ ├── notifications │ │ ├── notifications.module.scss │ │ └── types.ts │ └── layout │ │ ├── settings-dialog │ │ └── editor │ │ │ ├── ligature-setting-button-group.tsx │ │ │ ├── smart-paste-setting-button-group.tsx │ │ │ └── sync-scroll-setting-button-group.tsx │ │ ├── base-head.tsx │ │ └── note-and-app-title-head.tsx ├── version.json ├── extensions │ └── extra-integrations │ │ ├── mermaid │ │ ├── mermaid.module.scss │ │ └── mermaid-app-extension.ts │ │ ├── csv │ │ ├── __snapshots__ │ │ │ └── csv-table-markdown-extension.test.tsx.snap │ │ ├── csv-table-app-extension.ts │ │ └── csv-table-markdown-extension.ts │ │ ├── graphviz │ │ ├── __snapshots__ │ │ │ └── graphviz-markdown-extension.test.tsx.snap │ │ └── graphviz-app-extension.ts │ │ ├── flowchart │ │ ├── __snapshots__ │ │ │ ├── flowchart-markdown-extension.test.tsx.snap │ │ │ └── flowchart.test.tsx.snap │ │ └── flowchart-app-extension.ts │ │ ├── abcjs │ │ ├── abc.module.scss │ │ ├── __snapshots__ │ │ │ └── abcjs-markdown-extension.test.tsx.snap │ │ ├── abcjs-app-extension.ts │ │ └── abcjs-markdown-extension.ts │ │ ├── gist │ │ ├── gist-frame.module.scss │ │ ├── gist-app-extension.ts │ │ ├── replace-gist-link.ts │ │ └── replace-legacy-gist-short-code.ts │ │ ├── vega-lite │ │ ├── __snapshots__ │ │ │ └── vega-lite-markdown-extension.test.tsx.snap │ │ └── vega-lite-app-extension.ts │ │ ├── plantuml │ │ ├── __snapshots__ │ │ │ └── plantuml-markdown-extension.test.tsx.snap │ │ ├── plantuml-not-configured-alert.tsx │ │ └── plantuml-app-extension.ts │ │ ├── vimeo │ │ └── __snapshots__ │ │ │ └── vimeo-frame.test.tsx.snap │ │ ├── youtube │ │ └── __snapshots__ │ │ │ ├── youtube-frame.test.tsx.snap │ │ │ └── youtube-markdown-extension.test.tsx.snap │ │ ├── sequence-diagram │ │ └── sequence-diagram.tsx │ │ ├── alert │ │ └── alert-app-extension.ts │ │ ├── katex │ │ └── katex-app-extension.ts │ │ ├── spoiler │ │ └── spoiler-app-extension.ts │ │ ├── highlighted-code-fence │ │ └── highlighted-code-fence-app-extension.ts │ │ ├── blockquote │ │ └── blockquote-app-extension.ts │ │ ├── task-list │ │ └── set-checkbox-in-editor.tsx │ │ └── legacy-short-codes │ │ ├── replace-legacy-slideshare-short-code.test.ts │ │ └── replace-legacy-speakerdeck-short-code.test.ts ├── api │ ├── group │ │ ├── types.ts │ │ └── index.ts │ ├── users │ │ ├── types.ts │ │ └── index.ts │ ├── permissions │ │ └── types.ts │ ├── me │ │ └── types.ts │ ├── common │ │ ├── default-config.ts │ │ └── api-request-builder │ │ │ ├── get-api-request-builder.ts │ │ │ └── post-api-request-builder.ts │ ├── alias │ │ └── types.ts │ ├── media │ │ └── types.ts │ ├── auth │ │ ├── index.ts │ │ └── types.ts │ ├── tokens │ │ └── types.ts │ ├── revisions │ │ └── types.ts │ ├── config │ │ └── index.ts │ └── history │ │ └── types.ts ├── external-types │ ├── markdown-it-regex │ │ ├── interface.ts │ │ └── index.d.ts │ ├── markdown-it-emoji │ │ ├── interface.d.ts │ │ └── index.d.ts │ ├── markdown-it-mark │ │ └── index.d.ts │ ├── markdown-it-ins │ │ └── index.d.ts │ ├── markdown-it-sub │ │ └── index.d.ts │ ├── markdown-it-sup │ │ └── index.d.ts │ ├── markdown-it-abbr │ │ └── index.d.ts │ ├── markdown-it-footnote │ │ └── index.d.ts │ ├── markdown-it-deflist │ │ └── index.d.ts │ ├── markdown-it-linkify │ │ └── index.d.ts │ └── markdown-it-mathjax │ │ ├── index.d.ts │ │ └── interface.ts ├── utils │ ├── is-client-side-rendering.ts │ ├── read-file.test.ts │ ├── wait-for-other-promises-to-finish.ts │ └── test-id.ts ├── links.json ├── redux │ ├── note-details │ │ ├── types │ │ │ └── slide-show-options.d.ts │ │ ├── frontmatter-extractor │ │ │ └── types.d.ts │ │ ├── raw-note-frontmatter-parser │ │ │ └── types.d.ts │ │ ├── calculate-line-start-indexes.ts │ │ ├── reducers │ │ │ ├── build-state-from-server-permissions.ts │ │ │ └── build-state-from-update-cursor-position.test.ts │ │ └── calculate-line-start-indexes.test.ts │ ├── config │ │ ├── methods.ts │ │ └── types.ts │ ├── index.ts │ ├── dark-mode │ │ ├── methods.ts │ │ ├── types.ts │ │ └── reducers.ts │ ├── store-provider.tsx │ ├── renderer-status │ │ ├── types.ts │ │ └── methods.ts │ ├── user │ │ ├── reducers.ts │ │ └── types.ts │ └── realtime │ │ └── reducers │ │ ├── build-state-from-remove-user.ts │ │ └── build-state-from-add-user.ts ├── pages │ ├── 404.tsx │ └── api │ │ ├── private │ │ ├── groups │ │ │ ├── _EVERYONE.ts │ │ │ ├── _LOGGED_IN.ts │ │ │ └── hedgedoc-devs.ts │ │ ├── users │ │ │ ├── erik.ts │ │ │ ├── tilman.ts │ │ │ └── molly.ts │ │ └── me │ │ │ └── index.ts │ │ └── mock-backend │ │ └── private │ │ └── alias.ts └── hooks │ └── common │ ├── use-note-markdown-content.ts │ ├── use-app-title.ts │ ├── use-on-input-change.ts │ ├── use-array-string-url-parameter.ts │ ├── use-note-title.ts │ ├── use-single-string-url-parameter.ts │ ├── use-boolean-state.ts │ └── use-dark-mode-state.ts ├── tsconfig.json.license ├── .env.development ├── .prettierignore.license ├── LICENSES └── LicenseRef-DCO.txt ├── dev-reverse-proxy ├── .gitignore ├── run-caddy.sh └── Caddyfile ├── developer-certificate-of-origin.txt.license ├── .idea ├── prettier.xml ├── copyright │ ├── profiles_settings.xml │ └── hedgedoc.xml └── dictionaries │ └── hedgedoc.xml ├── .yarnrc.yml ├── netlify.toml ├── next-env.d.ts ├── global-styles ├── button-inside.scss ├── highlight-js.scss ├── colors-only-bootstrap │ ├── _helpers.scss │ ├── _type.scss │ ├── forms │ │ ├── _form-text.scss │ │ ├── _labels.scss │ │ ├── _input-group.scss │ │ └── _validation.scss │ ├── _tooltip.scss │ ├── _forms.scss │ ├── _images.scss │ ├── _badge.scss │ ├── _breadcrumb.scss │ ├── _progress.scss │ ├── _card.scss │ ├── helpers │ │ ├── _color-bg.scss │ │ └── _colored-links.scss │ ├── _toasts.scss │ └── _popover.scss ├── typeahead.scss ├── variables.light.scss ├── variables.module.scss └── dark.scss ├── .prettierrc.json ├── cypress.config.ts ├── .github ├── workflows │ └── reuse.yml ├── pull_request_template.md └── ISSUE_TEMPLATE │ └── question---other.md ├── README.md ├── .mailmap ├── AUTHORS.md └── tsconfig.json /.nvmrc: -------------------------------------------------------------------------------- 1 | v18 2 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | -------------------------------------------------------------------------------- /renovate.json: -------------------------------------------------------------------------------- 1 | { 2 | "enabled": false 3 | } 4 | -------------------------------------------------------------------------------- /cypress/fixtures/invalid-history.txt: -------------------------------------------------------------------------------- 1 | Invalid json 2 | -------------------------------------------------------------------------------- /cypress/fixtures/import.md: -------------------------------------------------------------------------------- 1 | # Some short import test file 2 | :) 3 | -------------------------------------------------------------------------------- /public/public/motd.md: -------------------------------------------------------------------------------- 1 | This is the test motd text 2 | :smile: 3 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | /.yarn/releases/** binary 2 | /.yarn/plugins/** binary 3 | 4 | -------------------------------------------------------------------------------- /public/public/readme.md: -------------------------------------------------------------------------------- 1 | This directory should only be used in mock mode. 2 | -------------------------------------------------------------------------------- /.env.production: -------------------------------------------------------------------------------- 1 | NEXT_PUBLIC_USE_MOCK_API=false 2 | NEXT_PUBLIC_TEST_MODE=false 3 | -------------------------------------------------------------------------------- /.netlify/state.json: -------------------------------------------------------------------------------- 1 | { 2 | "siteId": "329450c0-b852-424e-8b75-7441cefb5bea" 3 | } -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /cypress/fixtures/demo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hedgedoc/react-client/HEAD/cypress/fixtures/demo.png -------------------------------------------------------------------------------- /public/icons/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hedgedoc/react-client/HEAD/public/icons/favicon.ico -------------------------------------------------------------------------------- /public/public/img/avatar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hedgedoc/react-client/HEAD/public/public/img/avatar.png -------------------------------------------------------------------------------- /public/public/img/demo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hedgedoc/react-client/HEAD/public/public/img/demo.png -------------------------------------------------------------------------------- /public/public/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hedgedoc/react-client/HEAD/public/public/screenshot.png -------------------------------------------------------------------------------- /.dockerignore: -------------------------------------------------------------------------------- 1 | Dockerfile 2 | .dockerignore 3 | node_modules 4 | npm-debug.log 5 | README.md 6 | .next 7 | .git 8 | -------------------------------------------------------------------------------- /public/icons/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hedgedoc/react-client/HEAD/public/icons/favicon-16x16.png -------------------------------------------------------------------------------- /public/icons/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hedgedoc/react-client/HEAD/public/icons/favicon-32x32.png -------------------------------------------------------------------------------- /public/icons/mstile-70x70.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hedgedoc/react-client/HEAD/public/icons/mstile-70x70.png -------------------------------------------------------------------------------- /public/public/img/highres.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hedgedoc/react-client/HEAD/public/public/img/highres.jpg -------------------------------------------------------------------------------- /public/icons/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hedgedoc/react-client/HEAD/public/icons/apple-touch-icon.png -------------------------------------------------------------------------------- /public/icons/mstile-144x144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hedgedoc/react-client/HEAD/public/icons/mstile-144x144.png -------------------------------------------------------------------------------- /public/icons/mstile-150x150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hedgedoc/react-client/HEAD/public/icons/mstile-150x150.png -------------------------------------------------------------------------------- /public/icons/mstile-310x150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hedgedoc/react-client/HEAD/public/icons/mstile-310x150.png -------------------------------------------------------------------------------- /public/icons/mstile-310x310.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hedgedoc/react-client/HEAD/public/icons/mstile-310x310.png -------------------------------------------------------------------------------- /.nvmrc.license: -------------------------------------------------------------------------------- 1 | SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) 2 | 3 | SPDX-License-Identifier: CC0-1.0 4 | -------------------------------------------------------------------------------- /.env.test.license: -------------------------------------------------------------------------------- 1 | SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) 2 | 3 | SPDX-License-Identifier: CC0-1.0 4 | -------------------------------------------------------------------------------- /.mailmap.license: -------------------------------------------------------------------------------- 1 | SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) 2 | 3 | SPDX-License-Identifier: CC0-1.0 4 | -------------------------------------------------------------------------------- /package.json.license: -------------------------------------------------------------------------------- 1 | SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) 2 | 3 | SPDX-License-Identifier: CC0-1.0 4 | -------------------------------------------------------------------------------- /public/icons/android-chrome-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hedgedoc/react-client/HEAD/public/icons/android-chrome-192x192.png -------------------------------------------------------------------------------- /public/icons/android-chrome-512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hedgedoc/react-client/HEAD/public/icons/android-chrome-512x512.png -------------------------------------------------------------------------------- /yarn.lock.license: -------------------------------------------------------------------------------- 1 | SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) 2 | 3 | SPDX-License-Identifier: CC0-1.0 4 | -------------------------------------------------------------------------------- /.dockerignore.license: -------------------------------------------------------------------------------- 1 | SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) 2 | 3 | SPDX-License-Identifier: CC0-1.0 4 | -------------------------------------------------------------------------------- /.env.development.license: -------------------------------------------------------------------------------- 1 | SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) 2 | 3 | SPDX-License-Identifier: CC0-1.0 4 | -------------------------------------------------------------------------------- /.env.production.license: -------------------------------------------------------------------------------- 1 | SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) 2 | 3 | SPDX-License-Identifier: CC0-1.0 4 | -------------------------------------------------------------------------------- /.env.test: -------------------------------------------------------------------------------- 1 | NEXT_PUBLIC_USE_MOCK_API=true 2 | HD_EDITOR_BASE_URL="http://127.0.0.1:3001/" 3 | HD_RENDERER_BASE_URL="http://127.0.0.1:3001/" 4 | -------------------------------------------------------------------------------- /.eslintrc.json.license: -------------------------------------------------------------------------------- 1 | SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) 2 | 3 | SPDX-License-Identifier: CC0-1.0 4 | -------------------------------------------------------------------------------- /.prettierrc.json.license: -------------------------------------------------------------------------------- 1 | SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) 2 | 3 | SPDX-License-Identifier: CC0-1.0 4 | -------------------------------------------------------------------------------- /netlify/intro.md.license: -------------------------------------------------------------------------------- 1 | SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) 2 | 3 | SPDX-License-Identifier: CC0-1.0 4 | -------------------------------------------------------------------------------- /netlify/motd.md.license: -------------------------------------------------------------------------------- 1 | SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) 2 | 3 | SPDX-License-Identifier: CC0-1.0 4 | -------------------------------------------------------------------------------- /next-env.d.ts.license: -------------------------------------------------------------------------------- 1 | SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) 2 | 3 | SPDX-License-Identifier: CC0-1.0 4 | -------------------------------------------------------------------------------- /renovate.json.license: -------------------------------------------------------------------------------- 1 | SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) 2 | 3 | SPDX-License-Identifier: CC0-1.0 4 | -------------------------------------------------------------------------------- /src/links.json.license: -------------------------------------------------------------------------------- 1 | SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) 2 | 3 | SPDX-License-Identifier: CC0-1.0 4 | -------------------------------------------------------------------------------- /src/version.json.license: -------------------------------------------------------------------------------- 1 | SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) 2 | 3 | SPDX-License-Identifier: CC0-1.0 4 | -------------------------------------------------------------------------------- /tsconfig.json.license: -------------------------------------------------------------------------------- 1 | SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) 2 | 3 | SPDX-License-Identifier: CC0-1.0 4 | -------------------------------------------------------------------------------- /.env.development: -------------------------------------------------------------------------------- 1 | NEXT_PUBLIC_USE_MOCK_API=true 2 | HD_EDITOR_BASE_URL="http://localhost:3001/" 3 | HD_RENDERER_BASE_URL="http://127.0.0.1:3001/" 4 | -------------------------------------------------------------------------------- /.prettierignore.license: -------------------------------------------------------------------------------- 1 | SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) 2 | 3 | SPDX-License-Identifier: CC0-1.0 4 | 5 | -------------------------------------------------------------------------------- /cypress/.eslintrc.json.license: -------------------------------------------------------------------------------- 1 | SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) 2 | 3 | SPDX-License-Identifier: CC0-1.0 4 | -------------------------------------------------------------------------------- /cypress/tsconfig.json.license: -------------------------------------------------------------------------------- 1 | SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) 2 | 3 | SPDX-License-Identifier: CC0-1.0 4 | -------------------------------------------------------------------------------- /cypress/fixtures/demo.png.license: -------------------------------------------------------------------------------- 1 | SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) 2 | 3 | SPDX-License-Identifier: CC0-1.0 4 | -------------------------------------------------------------------------------- /LICENSES/LicenseRef-DCO.txt: -------------------------------------------------------------------------------- 1 | Everyone is permitted to copy and distribute verbatim copies of this 2 | license document, but changing it is not allowed. 3 | -------------------------------------------------------------------------------- /cypress/fixtures/history-2.json.license: -------------------------------------------------------------------------------- 1 | SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) 2 | 3 | SPDX-License-Identifier: CC0-1.0 4 | -------------------------------------------------------------------------------- /cypress/fixtures/history.json.license: -------------------------------------------------------------------------------- 1 | SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) 2 | 3 | SPDX-License-Identifier: CC0-1.0 4 | -------------------------------------------------------------------------------- /cypress/fixtures/import.md.license: -------------------------------------------------------------------------------- 1 | SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) 2 | 3 | SPDX-License-Identifier: CC-BY-SA-4.0 4 | -------------------------------------------------------------------------------- /cypress/fixtures/invalid-history.txt.license: -------------------------------------------------------------------------------- 1 | SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) 2 | 3 | SPDX-License-Identifier: CC0-1.0 4 | -------------------------------------------------------------------------------- /src/components/common/user-avatar/default-avatar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hedgedoc/react-client/HEAD/src/components/common/user-avatar/default-avatar.png -------------------------------------------------------------------------------- /dev-reverse-proxy/.gitignore: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file) 2 | # 3 | # SPDX-License-Identifier: CC0-1.0 4 | 5 | caddy 6 | -------------------------------------------------------------------------------- /developer-certificate-of-origin.txt.license: -------------------------------------------------------------------------------- 1 | SPDX-FileCopyrightText: 2004, 2006 The Linux Foundation and its contributors. 2 | 3 | SPDX-License-Identifier: LicenseRef-DCO -------------------------------------------------------------------------------- /cypress/fixtures/history.json: -------------------------------------------------------------------------------- 1 | {"version":2,"entries":[{"identifier":"cypress","title":"cy-Test","tags":[],"lastVisited":"2019-04-30T09:36:45.249+02:00","pinStatus":false}]} 2 | -------------------------------------------------------------------------------- /src/components/common/user-avatar/default-avatar.png.license: -------------------------------------------------------------------------------- 1 | SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file) 2 | 3 | SPDX-License-Identifier: CC0-1.0 4 | -------------------------------------------------------------------------------- /cypress/fixtures/history-2.json: -------------------------------------------------------------------------------- 1 | {"version":2,"entries":[{"identifier":"cypress2","title":"cy-Test2","tags":[],"lastVisited":"2019-04-30T09:36:45.249+02:00","pinStatus":false}]} 2 | -------------------------------------------------------------------------------- /src/components/editor-page/editor-pane/tool-bar/emoji-picker/forkawesome.png.license: -------------------------------------------------------------------------------- 1 | SPDX-FileCopyrightText: 2018 Dave Gandy & Fork Awesome 2 | 3 | SPDX-License-Identifier: OFL-1.1 4 | -------------------------------------------------------------------------------- /src/components/editor-page/editor-pane/tool-bar/emoji-picker/forkawesome.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hedgedoc/react-client/HEAD/src/components/editor-page/editor-pane/tool-bar/emoji-picker/forkawesome.png -------------------------------------------------------------------------------- /src/version.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "CLIENT_VERSION_MISSING", 3 | "sourceCodeUrl": "https://github.com/hedgedoc/react-client", 4 | "issueTrackerUrl": "https://github.com/hedgedoc/react-client/issues" 5 | } 6 | -------------------------------------------------------------------------------- /.idea/prettier.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | -------------------------------------------------------------------------------- /public/public/intro.md: -------------------------------------------------------------------------------- 1 | :::warning 2 | What you see is an UI-Test! It's filled with dummy data, not connected to a backend and no data will be saved. 3 | ::: 4 | 5 | ![HedgeDoc Screenshot](public/screenshot.png) 6 | -------------------------------------------------------------------------------- /.yarnrc.yml: -------------------------------------------------------------------------------- 1 | nodeLinker: node-modules 2 | 3 | plugins: 4 | - path: .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs 5 | spec: "@yarnpkg/plugin-workspace-tools" 6 | 7 | yarnPath: .yarn/releases/yarn-3.2.4.cjs 8 | -------------------------------------------------------------------------------- /netlify.toml: -------------------------------------------------------------------------------- 1 | [build] 2 | publish = ".next" 3 | command = "echo Pseudo build command because the build is made by the CI" 4 | 5 | [[plugins]] 6 | package = "@netlify/plugin-nextjs" 7 | 8 | [dev] 9 | targetPort = 3001 10 | -------------------------------------------------------------------------------- /next-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | /// 3 | 4 | // NOTE: This file should not be edited 5 | // see https://nextjs.org/docs/basic-features/typescript for more information. 6 | -------------------------------------------------------------------------------- /src/components/editor-page/sidebar/style/variables.scss: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) 3 | * 4 | * SPDX-License-Identifier: AGPL-3.0-only 5 | */ 6 | 7 | $height: 40px; 8 | $menu-width: 175px; 9 | -------------------------------------------------------------------------------- /.idea/copyright/profiles_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /src/components/intro-page/cover-buttons/cover-buttons.module.scss: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) 3 | * 4 | * SPDX-License-Identifier: AGPL-3.0-only 5 | */ 6 | 7 | .cover-button { 8 | min-width: 200px; 9 | } 10 | -------------------------------------------------------------------------------- /global-styles/button-inside.scss: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) 3 | * 4 | * SPDX-License-Identifier: AGPL-3.0-only 5 | */ 6 | 7 | .button-inside { 8 | position: absolute; 9 | bottom: 10px; 10 | right: 10px; 11 | } 12 | -------------------------------------------------------------------------------- /src/components/common/simple-alert/simple-alert-props.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) 3 | * 4 | * SPDX-License-Identifier: AGPL-3.0-only 5 | */ 6 | 7 | export interface SimpleAlertProps { 8 | show: boolean 9 | } 10 | -------------------------------------------------------------------------------- /src/extensions/extra-integrations/mermaid/mermaid.module.scss: -------------------------------------------------------------------------------- 1 | /*! 2 | * SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file) 3 | * 4 | * SPDX-License-Identifier: AGPL-3.0-only 5 | */ 6 | 7 | .mermaid > svg { 8 | background-color: #f8f9fa; 9 | } 10 | -------------------------------------------------------------------------------- /.prettierrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "parser": "typescript", 3 | "singleQuote": true, 4 | "jsxSingleQuote": true, 5 | "semi": false, 6 | "tabWidth": 2, 7 | "trailingComma": "none", 8 | "bracketSpacing": true, 9 | "bracketSameLine": true, 10 | "arrowParens": "always" 11 | } 12 | -------------------------------------------------------------------------------- /src/api/group/types.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) 3 | * 4 | * SPDX-License-Identifier: AGPL-3.0-only 5 | */ 6 | 7 | export interface GroupInfo { 8 | name: string 9 | displayName: string 10 | special: boolean 11 | } 12 | -------------------------------------------------------------------------------- /src/api/users/types.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) 3 | * 4 | * SPDX-License-Identifier: AGPL-3.0-only 5 | */ 6 | 7 | export interface UserInfo { 8 | username: string 9 | displayName: string 10 | photo: string 11 | } 12 | -------------------------------------------------------------------------------- /src/components/document-read-only-page/document-infobar.module.scss: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) 3 | * 4 | * SPDX-License-Identifier: AGPL-3.0-only 5 | */ 6 | 7 | .document-infobar { 8 | color: #777; 9 | font-size: 0.85rem; 10 | } 11 | -------------------------------------------------------------------------------- /src/components/common/branding/branding.module.scss: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) 3 | * 4 | * SPDX-License-Identifier: AGPL-3.0-only 5 | */ 6 | 7 | .regular-size { 8 | height: 50px; 9 | } 10 | 11 | .inline-size { 12 | height: 30px; 13 | } 14 | -------------------------------------------------------------------------------- /src/components/editor-page/app-bar/help-button/cheatsheet.module.scss: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) 3 | * 4 | * SPDX-License-Identifier: AGPL-3.0-only 5 | */ 6 | 7 | .table-cheatsheet > tr > td { 8 | vertical-align: middle !important; 9 | } 10 | -------------------------------------------------------------------------------- /src/components/editor-page/document-bar/note-info/note-info-time-line.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) 3 | * 4 | * SPDX-License-Identifier: AGPL-3.0-only 5 | */ 6 | export interface NoteInfoTimeLineProps { 7 | size?: '2x' | '3x' | '4x' | '5x' 8 | } 9 | -------------------------------------------------------------------------------- /global-styles/highlight-js.scss: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) 3 | * 4 | * SPDX-License-Identifier: AGPL-3.0-only 5 | */ 6 | 7 | @import '~highlight.js/styles/github'; 8 | 9 | body.dark { 10 | @import '~highlight.js/styles/github-dark'; 11 | } 12 | -------------------------------------------------------------------------------- /src/components/common/show-if/__snapshots__/show-if.test.tsx.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`ShowIf does not render child if condition is false 1`] = `
`; 4 | 5 | exports[`ShowIf renders child if condition is true 1`] = ` 6 |
7 | test 8 |
9 | `; 10 | -------------------------------------------------------------------------------- /src/components/editor-page/sidebar/specific-sidebar-entries/pin-note-sidebar-entry.module.css: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file) 3 | * 4 | * SPDX-License-Identifier: AGPL-3.0-only 5 | */ 6 | 7 | .highlighted { 8 | color: #b51f08 !important; 9 | } 10 | -------------------------------------------------------------------------------- /src/components/history-page/entry-menu/entry-menu.module.scss: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) 3 | * 4 | * SPDX-License-Identifier: AGPL-3.0-only 5 | */ 6 | 7 | .history-menu { 8 | &:global(.btn) { 9 | padding: 0.6rem 0.65rem; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /public/icons/browserconfig.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | #b51f08 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /src/api/permissions/types.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file) 3 | * 4 | * SPDX-License-Identifier: AGPL-3.0-only 5 | */ 6 | export interface OwnerChangeDto { 7 | owner: string 8 | } 9 | 10 | export interface PermissionSetDto { 11 | canEdit: boolean 12 | } 13 | -------------------------------------------------------------------------------- /src/components/editor-page/document-bar/revisions/revision-modal.module.scss: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) 3 | * 4 | * SPDX-License-Identifier: AGPL-3.0-only 5 | */ 6 | 7 | .revision-modal .scroll-col { 8 | max-height: 75vh; 9 | overflow-y: auto; 10 | } 11 | -------------------------------------------------------------------------------- /src/components/editor-page/change-content-context/code-mirror-selection.d.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file) 3 | * 4 | * SPDX-License-Identifier: AGPL-3.0-only 5 | */ 6 | 7 | export interface CodeMirrorSelection { 8 | anchor: number 9 | head?: number 10 | } 11 | -------------------------------------------------------------------------------- /src/components/editor-page/editor-pane/tool-bar/formatters/types/cursor-selection.d.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file) 3 | * 4 | * SPDX-License-Identifier: AGPL-3.0-only 5 | */ 6 | 7 | export interface CursorSelection { 8 | from: number 9 | to?: number 10 | } 11 | -------------------------------------------------------------------------------- /netlify/intro.md: -------------------------------------------------------------------------------- 1 | :::info 2 | What you see is an UI-Test! It's filled with dummy data, not connected to a backend and no data will be saved. 3 | ::: 4 | 5 | ![HedgeDoc Screenshot](public/screenshot.png) 6 | 7 | [![Deployed using netlify](https://www.netlify.com/img/global/badges/netlify-color-accent.svg)](https://www.netlify.com) 8 | -------------------------------------------------------------------------------- /src/components/common/links/__snapshots__/translated-internal-link.test.tsx.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`TranslatedInternalLink renders with i18nKey 1`] = ` 4 |
5 | 9 | testi18nKey 10 | 11 |
12 | `; 13 | -------------------------------------------------------------------------------- /src/external-types/markdown-it-regex/interface.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) 3 | * 4 | * SPDX-License-Identifier: AGPL-3.0-only 5 | */ 6 | 7 | export interface RegexOptions { 8 | name: string 9 | regex: RegExp 10 | replace: (match: string) => string 11 | } 12 | -------------------------------------------------------------------------------- /.idea/copyright/hedgedoc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | -------------------------------------------------------------------------------- /netlify/motd.md: -------------------------------------------------------------------------------- 1 | This demo is hosted by [netlify](https://netlify.com). 2 | Please check their [privacy policy](https://netlify.com/privacy) as well as [our privacy policy](https://hedgedoc.org/privacy-policy). 3 | 4 | :::info 5 | What you see is an UI-Test! It's filled with dummy data, not connected to a backend and no data will be saved. 6 | ::: 7 | -------------------------------------------------------------------------------- /src/components/history-page/history-card/history-card.module.scss: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) 3 | * 4 | * SPDX-License-Identifier: AGPL-3.0-only 5 | */ 6 | 7 | .card-min-height { 8 | min-height: 160px; 9 | } 10 | 11 | .card-footer-min-height { 12 | min-height: 27px; 13 | } 14 | -------------------------------------------------------------------------------- /src/components/editor-page/document-bar/revisions/revision-list-entry.module.scss: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) 3 | * 4 | * SPDX-License-Identifier: AGPL-3.0-only 5 | */ 6 | 7 | .revision-item { 8 | cursor: pointer; 9 | 10 | span > img { 11 | height: 1.25rem; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /dev-reverse-proxy/run-caddy.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file) 4 | # 5 | # SPDX-License-Identifier: AGPL-3.0-only 6 | # 7 | 8 | set -e 9 | 10 | if [ ! -f caddy ] 11 | then 12 | curl -o caddy "https://caddyserver.com/api/download" 13 | chmod +x ./caddy 14 | fi 15 | 16 | exec ./caddy run 17 | -------------------------------------------------------------------------------- /src/external-types/markdown-it-emoji/interface.d.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) 3 | * 4 | * SPDX-License-Identifier: AGPL-3.0-only 5 | */ 6 | 7 | export interface EmojiOptions { 8 | defs?: { [key: string]: string } 9 | enabled: string[] 10 | shortcuts?: { [key: string]: string } 11 | } 12 | -------------------------------------------------------------------------------- /global-styles/colors-only-bootstrap/_helpers.scss: -------------------------------------------------------------------------------- 1 | /*! 2 | * SPDX-FileCopyrightText: Original code: Copyright (c) 2011-2022 Twitter, Inc. + Copyright (c) 2011-2022 The Bootstrap Authors. Modification: 2022 The HedgeDoc developers (see AUTHORS file) 3 | * 4 | * SPDX-License-Identifier: MIT 5 | */ 6 | 7 | @import "helpers/color-bg"; 8 | @import "helpers/colored-links"; 9 | -------------------------------------------------------------------------------- /src/components/landing-layout/navigation/header-bar/header-nav-link.module.scss: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) 3 | * 4 | * SPDX-License-Identifier: AGPL-3.0-only 5 | */ 6 | 7 | .nav-link { 8 | border-bottom: 2px solid transparent 9 | } 10 | 11 | .nav-link-active { 12 | border-bottom-color: #fff; 13 | } 14 | -------------------------------------------------------------------------------- /src/components/markdown-renderer/extensions/image/lightbox.module.scss: -------------------------------------------------------------------------------- 1 | /*! 2 | * SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file) 3 | * 4 | * SPDX-License-Identifier: AGPL-3.0-only 5 | */ 6 | 7 | .lightbox img { 8 | max-width: calc(100vw - 3.5rem); 9 | max-height: calc(100vh - 3.5rem - 75px); 10 | object-fit: contain; 11 | } 12 | -------------------------------------------------------------------------------- /src/components/common/fields/fields.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) 3 | * 4 | * SPDX-License-Identifier: AGPL-3.0-only 5 | */ 6 | 7 | import type { ChangeEvent } from 'react' 8 | 9 | export interface CommonFieldProps { 10 | onChange: (event: ChangeEvent) => void 11 | value: string 12 | } 13 | -------------------------------------------------------------------------------- /src/components/common/user-avatar/user-avatar.module.scss: -------------------------------------------------------------------------------- 1 | /*! 2 | * SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file) 3 | * 4 | * SPDX-License-Identifier: AGPL-3.0-only 5 | */ 6 | 7 | .user-line-name { 8 | text-overflow: ellipsis; 9 | flex: 1 1; 10 | overflow: hidden; 11 | } 12 | 13 | .user-image { 14 | color: transparent; 15 | } 16 | -------------------------------------------------------------------------------- /global-styles/colors-only-bootstrap/_type.scss: -------------------------------------------------------------------------------- 1 | /*! 2 | * SPDX-FileCopyrightText: Original code: Copyright (c) 2011-2022 Twitter, Inc. + Copyright (c) 2011-2022 The Bootstrap Authors. Modification: 2022 The HedgeDoc developers (see AUTHORS file) 3 | * 4 | * SPDX-License-Identifier: MIT 5 | */ 6 | 7 | .blockquote-footer { 8 | color: $blockquote-footer-color; 9 | } 10 | -------------------------------------------------------------------------------- /src/components/common/fork-awesome/types.d.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) 3 | * 4 | * SPDX-License-Identifier: AGPL-3.0-only 5 | */ 6 | 7 | import type { ForkAwesomeIcons } from './fork-awesome-icons' 8 | 9 | export type IconName = typeof ForkAwesomeIcons[number] 10 | export type IconSize = '2x' | '3x' | '4x' | '5x' 11 | -------------------------------------------------------------------------------- /src/components/editor-page/editor-pane/tool-bar/formatters/types/changes.d.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file) 3 | * 4 | * SPDX-License-Identifier: AGPL-3.0-only 5 | */ 6 | 7 | export interface ContentEdit { 8 | from: number 9 | to: number 10 | insert: string 11 | } 12 | 13 | export type ContentEdits = ContentEdit[] 14 | -------------------------------------------------------------------------------- /src/components/login-page/auth/fields/fields.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) 3 | * 4 | * SPDX-License-Identifier: AGPL-3.0-only 5 | */ 6 | 7 | import type { ChangeEvent } from 'react' 8 | 9 | export interface AuthFieldProps { 10 | onChange: (event: ChangeEvent) => void 11 | invalid: boolean 12 | } 13 | -------------------------------------------------------------------------------- /src/external-types/markdown-it-mark/index.d.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) 3 | * 4 | * SPDX-License-Identifier: AGPL-3.0-only 5 | */ 6 | 7 | declare module 'markdown-it-mark' { 8 | import type MarkdownIt from 'markdown-it/lib' 9 | const markdownItMark: MarkdownIt.PluginSimple 10 | export = markdownItMark 11 | } 12 | -------------------------------------------------------------------------------- /global-styles/typeahead.scss: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) 3 | * 4 | * SPDX-License-Identifier: AGPL-3.0-only 5 | */ 6 | 7 | .rbt-input-multi { 8 | min-width: 200px !important; 9 | 10 | .rbt-input-main { 11 | &[placeholder=""] { 12 | width: 10px !important; 13 | } 14 | 15 | width: 100%; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/extensions/extra-integrations/csv/__snapshots__/csv-table-markdown-extension.test.tsx.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`CSV Table Markdown Extension renders a csv codeblock 1`] = ` 4 |
5 |
 6 |     
 9 |       a;b;c
10 | d;e;f
11 | 
12 |     
13 |   
14 | 15 | 16 |
17 | `; 18 | -------------------------------------------------------------------------------- /src/external-types/markdown-it-ins/index.d.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) 3 | * 4 | * SPDX-License-Identifier: AGPL-3.0-only 5 | */ 6 | 7 | declare module 'markdown-it-ins' { 8 | import type MarkdownIt from 'markdown-it/lib' 9 | const markdownItInserted: MarkdownIt.PluginSimple 10 | export = markdownItInserted 11 | } 12 | -------------------------------------------------------------------------------- /src/external-types/markdown-it-sub/index.d.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) 3 | * 4 | * SPDX-License-Identifier: AGPL-3.0-only 5 | */ 6 | 7 | declare module 'markdown-it-sub' { 8 | import type MarkdownIt from 'markdown-it/lib' 9 | const markdownItSubscript: MarkdownIt.PluginSimple 10 | export = markdownItSubscript 11 | } 12 | -------------------------------------------------------------------------------- /src/external-types/markdown-it-sup/index.d.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) 3 | * 4 | * SPDX-License-Identifier: AGPL-3.0-only 5 | */ 6 | 7 | declare module 'markdown-it-sup' { 8 | import type MarkdownIt from 'markdown-it/lib' 9 | const markdownItSuperscript: MarkdownIt.PluginSimple 10 | export = markdownItSuperscript 11 | } 12 | -------------------------------------------------------------------------------- /src/components/editor-page/document-bar/permissions/types.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file) 3 | * 4 | * SPDX-License-Identifier: AGPL-3.0-only 5 | */ 6 | export enum AccessLevel { 7 | NONE, 8 | READ_ONLY, 9 | WRITEABLE 10 | } 11 | 12 | export enum SpecialGroup { 13 | EVERYONE = '_EVERYONE', 14 | LOGGED_IN = '_LOGGED_IN' 15 | } 16 | -------------------------------------------------------------------------------- /src/components/markdown-renderer/extensions/linemarker/types.d.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file) 3 | * 4 | * SPDX-License-Identifier: AGPL-3.0-only 5 | */ 6 | 7 | export interface LineWithId { 8 | line: string 9 | id: number 10 | } 11 | 12 | export interface LineMarkerPosition { 13 | line: number 14 | position: number 15 | } 16 | -------------------------------------------------------------------------------- /src/components/profile-page/access-tokens/access-token-creation-form/access-token-creation-form-field.d.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) 3 | * 4 | * SPDX-License-Identifier: AGPL-3.0-only 5 | */ 6 | 7 | interface AccessTokenCreationFormFieldProps { 8 | formValues: { 9 | expiryDate: string 10 | label: string 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/external-types/markdown-it-abbr/index.d.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) 3 | * 4 | * SPDX-License-Identifier: AGPL-3.0-only 5 | */ 6 | 7 | declare module 'markdown-it-abbr' { 8 | import type MarkdownIt from 'markdown-it/lib' 9 | const markdownItAbbreviation: MarkdownIt.PluginSimple 10 | export = markdownItAbbreviation 11 | } 12 | -------------------------------------------------------------------------------- /src/external-types/markdown-it-footnote/index.d.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) 3 | * 4 | * SPDX-License-Identifier: AGPL-3.0-only 5 | */ 6 | 7 | declare module 'markdown-it-footnote' { 8 | import type MarkdownIt from 'markdown-it/lib' 9 | const markdownItFootnote: MarkdownIt.PluginSimple 10 | export = markdownItFootnote 11 | } 12 | -------------------------------------------------------------------------------- /src/external-types/markdown-it-deflist/index.d.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) 3 | * 4 | * SPDX-License-Identifier: AGPL-3.0-only 5 | */ 6 | 7 | declare module 'markdown-it-deflist' { 8 | import type MarkdownIt from 'markdown-it/lib' 9 | const markdownItDefinitionList: MarkdownIt.PluginSimple 10 | export = markdownItDefinitionList 11 | } 12 | -------------------------------------------------------------------------------- /src/external-types/markdown-it-linkify/index.d.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) 3 | * 4 | * SPDX-License-Identifier: AGPL-3.0-only 5 | */ 6 | 7 | declare module 'markdown-it/lib/rules_core/linkify' { 8 | import type { RuleCore } from 'markdown-it/lib/parser_core' 9 | const markdownItLinkify: RuleCore 10 | export = markdownItLinkify 11 | } 12 | -------------------------------------------------------------------------------- /global-styles/colors-only-bootstrap/forms/_form-text.scss: -------------------------------------------------------------------------------- 1 | /*! 2 | * SPDX-FileCopyrightText: Original code: Copyright (c) 2011-2022 Twitter, Inc. + Copyright (c) 2011-2022 The Bootstrap Authors. Modification: 2022 The HedgeDoc developers (see AUTHORS file) 3 | * 4 | * SPDX-License-Identifier: MIT 5 | */ 6 | 7 | // 8 | // Form text 9 | // 10 | 11 | .form-text { 12 | color: $form-text-color; 13 | } 14 | -------------------------------------------------------------------------------- /src/external-types/markdown-it-mathjax/index.d.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) 3 | * 4 | * SPDX-License-Identifier: AGPL-3.0-only 5 | */ 6 | 7 | declare module 'markdown-it-mathjax' { 8 | import type MarkdownIt from 'markdown-it/lib' 9 | const markdownItMathJax: (MathJaxOptions) => MarkdownIt.PluginSimple 10 | export = markdownItMathJax 11 | } 12 | -------------------------------------------------------------------------------- /src/api/me/types.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file) 3 | * 4 | * SPDX-License-Identifier: AGPL-3.0-only 5 | */ 6 | import type { UserInfo } from '../users/types' 7 | 8 | export interface LoginUserInfo extends UserInfo { 9 | authProvider: string 10 | email: string 11 | } 12 | 13 | export interface ChangeDisplayNameDto { 14 | displayName: string 15 | } 16 | -------------------------------------------------------------------------------- /src/components/common/links/__snapshots__/translated-external-link.test.tsx.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`TranslatedExternalLink renders with i18nKey 1`] = ` 4 | 15 | `; 16 | -------------------------------------------------------------------------------- /src/components/editor-page/editor-pane/tool-bar/emoji-picker/emoji-picker.module.scss: -------------------------------------------------------------------------------- 1 | /*! 2 | * SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file) 3 | * 4 | * SPDX-License-Identifier: AGPL-3.0-only 5 | */ 6 | 7 | .tooltip { 8 | &, :global(body.dark) & { 9 | --bs-popover-max-width: 100%; 10 | --bs-popover-body-padding-y: 0; 11 | --bs-popover-body-padding-x: 0; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/utils/is-client-side-rendering.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file) 3 | * 4 | * SPDX-License-Identifier: AGPL-3.0-only 5 | */ 6 | 7 | /** 8 | * Detects if the application is running on client side. 9 | */ 10 | export const isClientSideRendering = (): boolean => { 11 | return typeof window !== 'undefined' && typeof window.navigator !== 'undefined' 12 | } 13 | -------------------------------------------------------------------------------- /.idea/dictionaries/hedgedoc.xml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 9 | 10 | CodiMD 11 | HedgeDoc 12 | codimd 13 | hedgedoc 14 | 15 | 16 | -------------------------------------------------------------------------------- /dev-reverse-proxy/Caddyfile: -------------------------------------------------------------------------------- 1 | # 2 | # SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file) 3 | # 4 | # SPDX-License-Identifier: AGPL-3.0-only 5 | # 6 | 7 | :8080 8 | 9 | log { 10 | output stdout 11 | } 12 | 13 | reverse_proxy /realtime http://127.0.0.1:3000 14 | reverse_proxy /api/* http://127.0.0.1:3000 15 | reverse_proxy /public/* http://127.0.0.1:3000 16 | reverse_proxy /* http://127.0.0.1:3001 17 | -------------------------------------------------------------------------------- /src/external-types/markdown-it-mathjax/interface.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) 3 | * 4 | * SPDX-License-Identifier: AGPL-3.0-only 5 | */ 6 | 7 | export interface MathJaxOptions { 8 | beforeMath: string 9 | afterMath: string 10 | beforeInlineMath: string 11 | afterInlineMath: string 12 | beforeDisplayMath: string 13 | afterDisplayMath: string 14 | } 15 | -------------------------------------------------------------------------------- /cypress/e2e/slideshow-only-page.spec.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file) 3 | * 4 | * SPDX-License-Identifier: AGPL-3.0-only 5 | */ 6 | 7 | import { PAGE_MODE } from '../support/visit' 8 | 9 | describe('Slideshow only page', () => { 10 | it('renders slide show mode', () => { 11 | cy.visitTestNote(PAGE_MODE.PRESENTATION) 12 | cy.getReveal().should('exist') 13 | }) 14 | }) 15 | -------------------------------------------------------------------------------- /src/components/application-loader/application-loader.module.scss: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) 3 | * 4 | * SPDX-License-Identifier: AGPL-3.0-only 5 | */ 6 | 7 | .loader { 8 | height: 100%; 9 | width: 100%; 10 | 11 | &.middle, .middle { 12 | display: flex; 13 | align-items: center; 14 | justify-content: center; 15 | flex-direction: column; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/components/markdown-renderer/node-preprocessors/node-processor.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file) 3 | * 4 | * SPDX-License-Identifier: AGPL-3.0-only 5 | */ 6 | 7 | import type { Document } from 'domhandler' 8 | 9 | /** 10 | * Base class for node processors. 11 | */ 12 | export abstract class NodeProcessor { 13 | public abstract process(document: Document): Document 14 | } 15 | -------------------------------------------------------------------------------- /global-styles/variables.light.scss: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) 3 | * 4 | * SPDX-License-Identifier: AGPL-3.0-only 5 | */ 6 | 7 | $blue: #337ab7 !default; 8 | $cyan: #5EB7E0 !default; 9 | $dark: #222222 !default; 10 | 11 | @import "~bootstrap/scss/functions"; 12 | @import "~bootstrap/scss/mixins"; 13 | @import "~bootstrap/scss/variables"; 14 | 15 | $toast-background-color: $white; 16 | 17 | -------------------------------------------------------------------------------- /src/api/common/default-config.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file) 3 | * 4 | * SPDX-License-Identifier: AGPL-3.0-only 5 | */ 6 | 7 | export const defaultHeaders: HeadersInit = {} 8 | 9 | export const defaultConfig: Partial = { 10 | mode: 'cors', 11 | cache: 'no-cache', 12 | credentials: 'same-origin', 13 | redirect: 'follow', 14 | referrerPolicy: 'no-referrer' 15 | } 16 | -------------------------------------------------------------------------------- /src/components/application-loader/application-loader-error.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file) 3 | * 4 | * SPDX-License-Identifier: AGPL-3.0-only 5 | */ 6 | /** 7 | * Custom {@link Error} class for the {@link ApplicationLoader}. 8 | */ 9 | export class ApplicationLoaderError extends Error { 10 | constructor(taskName: string) { 11 | super(`The task ${taskName} failed`) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/components/editor-page/editor-pane/status-bar/separator-dash.tsx: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) 3 | * 4 | * SPDX-License-Identifier: AGPL-3.0-only 5 | */ 6 | 7 | import React, { Fragment } from 'react' 8 | 9 | /** 10 | * Renders a dash without breaking spaces around. 11 | */ 12 | export const SeparatorDash: React.FC = () => { 13 | return  –  14 | } 15 | -------------------------------------------------------------------------------- /src/components/render-page/markdown-toc-button/markdown-toc-button.module.scss: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) 3 | * 4 | * SPDX-License-Identifier: AGPL-3.0-only 5 | */ 6 | 7 | .markdown-toc-sidebar-button { 8 | position: fixed; 9 | right: 70px; 10 | bottom: 30px; 11 | 12 | & > :global(.dropup) { 13 | position: sticky; 14 | bottom: 20px; 15 | right: 0; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /global-styles/variables.module.scss: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) 3 | * 4 | * SPDX-License-Identifier: AGPL-3.0-only 5 | */ 6 | 7 | $font-family-emojis: "Apple Color Emoji", "Twemoji"; 8 | $font-family-base: "Source Sans Pro", Helvetica, Arial, $font-family-emojis, sans-serif; 9 | 10 | :export { 11 | font-family-emojis: $font-family-emojis; 12 | font-family-base: $font-family-base; 13 | } 14 | -------------------------------------------------------------------------------- /src/api/alias/types.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file) 3 | * 4 | * SPDX-License-Identifier: AGPL-3.0-only 5 | */ 6 | export interface Alias { 7 | name: string 8 | primaryAlias: boolean 9 | noteId: string 10 | } 11 | 12 | export interface NewAliasDto { 13 | noteIdOrAlias: string 14 | newAlias: string 15 | } 16 | 17 | export interface PrimaryAliasDto { 18 | primaryAlias: boolean 19 | } 20 | -------------------------------------------------------------------------------- /src/api/media/types.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file) 3 | * 4 | * SPDX-License-Identifier: AGPL-3.0-only 5 | */ 6 | export interface MediaUpload { 7 | url: string 8 | noteId: string | null 9 | createdAt: string 10 | username: string 11 | } 12 | 13 | export interface ImageProxyResponse { 14 | url: string 15 | } 16 | 17 | export interface ImageProxyRequestDto { 18 | url: string 19 | } 20 | -------------------------------------------------------------------------------- /src/extensions/extra-integrations/graphviz/__snapshots__/graphviz-markdown-extension.test.tsx.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`PlantUML markdown extensions renders a plantuml codeblock 1`] = ` 4 |
5 |
 6 |     
 7 |       this is a mock for graphviz frame
 8 |       
 9 |         graph {
10 | a -- b
11 | }
12 | 
13 |       
14 |     
15 |   
16 | 17 | 18 |
19 | `; 20 | -------------------------------------------------------------------------------- /src/external-types/markdown-it-regex/index.d.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) 3 | * 4 | * SPDX-License-Identifier: AGPL-3.0-only 5 | */ 6 | 7 | declare module 'markdown-it-regex' { 8 | import type MarkdownIt from 'markdown-it/lib' 9 | import type { RegexOptions } from './interface' 10 | const markdownItRegex: MarkdownIt.PluginWithOptions 11 | export = markdownItRegex 12 | } 13 | -------------------------------------------------------------------------------- /src/external-types/markdown-it-emoji/index.d.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) 3 | * 4 | * SPDX-License-Identifier: AGPL-3.0-only 5 | */ 6 | 7 | declare module 'markdown-it-emoji/bare' { 8 | import type MarkdownIt from 'markdown-it/lib' 9 | import type { EmojiOptions } from './interface' 10 | const markdownItEmoji: MarkdownIt.PluginWithOptions 11 | export = markdownItEmoji 12 | } 13 | -------------------------------------------------------------------------------- /cypress/e2e/document-read-only-page.spec.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file) 3 | * 4 | * SPDX-License-Identifier: AGPL-3.0-only 5 | */ 6 | 7 | import { PAGE_MODE } from '../support/visit' 8 | 9 | describe('Document read only page', () => { 10 | it('renders the document mode', () => { 11 | cy.visitTestNote(PAGE_MODE.DOCUMENT_READ_ONLY) 12 | cy.getMarkdownBody().should('exist') 13 | }) 14 | }) 15 | -------------------------------------------------------------------------------- /src/links.json: -------------------------------------------------------------------------------- 1 | { 2 | "chat": "https://matrix.to/#/#hedgedoc:matrix.org", 3 | "community": "https://community.hedgedoc.org", 4 | "githubOrg": "https://github.com/hedgedoc/", 5 | "backendSourceCode": "https://github.com/hedgedoc/hedgedoc", 6 | "backendIssues": "https://github.com/hedgedoc/hedgedoc/issues", 7 | "mastodon": "https://social.hedgedoc.org", 8 | "translate": "https://translate.hedgedoc.org", 9 | "webpage": "https://hedgedoc.org" 10 | } 11 | -------------------------------------------------------------------------------- /src/redux/note-details/types/slide-show-options.d.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) 3 | * 4 | * SPDX-License-Identifier: AGPL-3.0-only 5 | */ 6 | 7 | import type { RevealOptions } from 'reveal.js' 8 | 9 | type WantedRevealOptions = 'autoSlide' | 'autoSlideStoppable' | 'transition' | 'backgroundTransition' | 'slideNumber' 10 | 11 | export type SlideOptions = Required> 12 | -------------------------------------------------------------------------------- /cypress.config.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file) 3 | * 4 | * SPDX-License-Identifier: AGPL-3.0-only 5 | */ 6 | 7 | import { defineConfig } from 'cypress' 8 | 9 | export default defineConfig({ 10 | defaultCommandTimeout: 15000, 11 | video: false, 12 | projectId: 'ht3vbo', 13 | 14 | e2e: { 15 | baseUrl: 'http://127.0.0.1:3001/', 16 | specPattern: 'cypress/e2e/**/*.{js,jsx,ts,tsx}' 17 | } 18 | }) 19 | -------------------------------------------------------------------------------- /cypress/e2e/helpDialog.spec.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file) 3 | * 4 | * SPDX-License-Identifier: AGPL-3.0-only 5 | */ 6 | 7 | describe('Help Dialog', () => { 8 | beforeEach(() => { 9 | cy.visitTestNote() 10 | }) 11 | 12 | it('ToDo-List', () => { 13 | cy.getByCypressId('editor-help-button').click() 14 | cy.get('input[type="checkbox"]').should('exist').should('not.be.checked') 15 | }) 16 | }) 17 | -------------------------------------------------------------------------------- /cypress/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "noEmit": true, 5 | "strict": true, 6 | "target": "es6", 7 | "lib": [ 8 | "es6", 9 | "dom" 10 | ], 11 | "types": [ 12 | "cypress", 13 | "cypress-commands", 14 | "cypress-file-upload", 15 | "node" 16 | ] 17 | }, 18 | "include": [ 19 | "../node_modules/cypress", 20 | "./**/*.ts" 21 | ], 22 | "exclude": [] 23 | } 24 | -------------------------------------------------------------------------------- /src/extensions/extra-integrations/flowchart/__snapshots__/flowchart-markdown-extension.test.tsx.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`Flowchart markdown extensions renders a flowchart codeblock 1`] = ` 4 |
5 |
 6 |     
 7 |       this is a mock for flowchart frame
 8 |       
 9 |         st=>start: Start
10 | e=>end: End
11 | st->e
12 | 
13 |       
14 |     
15 |   
16 | 17 | 18 |
19 | `; 20 | -------------------------------------------------------------------------------- /src/components/history-page/history-toolbar/toolbar-context/toolbar-context.d.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) 3 | * 4 | * SPDX-License-Identifier: AGPL-3.0-only 5 | */ 6 | 7 | import type { Dispatch, SetStateAction } from 'react' 8 | import type { HistoryToolbarState } from '../history-toolbar-state' 9 | 10 | export type HistoryToolbarStateWithDispatcher = [HistoryToolbarState, Dispatch>] 11 | -------------------------------------------------------------------------------- /src/components/history-page/pin-button/pin-button.module.scss: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) 3 | * 4 | * SPDX-License-Identifier: AGPL-3.0-only 5 | */ 6 | 7 | .history-pin { 8 | .fa { 9 | opacity: 0.2; 10 | transition: opacity 0.2s ease-in-out, color 0.2s ease-in-out; 11 | } 12 | 13 | &:hover .fa { 14 | opacity: 1; 15 | } 16 | 17 | &.pinned .fa { 18 | color: #d43f3a; 19 | opacity: 1; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /.github/workflows/reuse.yml: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) 2 | # 3 | # SPDX-License-Identifier: AGPL-3.0-only 4 | 5 | name: REUSE Compliance Check 6 | 7 | on: 8 | push: 9 | branches: [ main ] 10 | pull_request: 11 | branches: [ main ] 12 | 13 | jobs: 14 | reuse: 15 | runs-on: ubuntu-latest 16 | steps: 17 | - uses: actions/checkout@v3 18 | - name: REUSE Compliance Check 19 | uses: fsfe/reuse-action@v1 20 | -------------------------------------------------------------------------------- /src/components/notifications/notifications.module.scss: -------------------------------------------------------------------------------- 1 | /*! 2 | * SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file) 3 | * 4 | * SPDX-License-Identifier: AGPL-3.0-only 5 | */ 6 | 7 | .notifications-area { 8 | position: fixed; 9 | top: 15px; 10 | right: 15px; 11 | z-index: 2000; 12 | 13 | .toast { 14 | min-width: 250px; 15 | max-width: 100vw; 16 | } 17 | 18 | .progress { 19 | border-radius: 0; 20 | height: 0.25rem; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/components/editor-page/splitter/splitter.module.scss: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) 3 | * 4 | * SPDX-License-Identifier: AGPL-3.0-only 5 | */ 6 | .left, .right { 7 | overflow: hidden; 8 | } 9 | 10 | .inner { 11 | display: flex; 12 | min-width: 20vw; 13 | height: 100%; 14 | flex-direction: column; 15 | } 16 | 17 | .move-overlay { 18 | position: absolute; 19 | height: 100%; 20 | width: 100%; 21 | z-index: 100000; 22 | } 23 | -------------------------------------------------------------------------------- /cypress/e2e/diagrams.spec.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file) 3 | * 4 | * SPDX-License-Identifier: AGPL-3.0-only 5 | */ 6 | 7 | describe('Diagram codeblock ', () => { 8 | beforeEach(() => { 9 | cy.visitTestNote() 10 | }) 11 | 12 | it('renders mermaid', () => { 13 | cy.setCodemirrorContent('```mermaid\ngraph TD;\n A-->B;\n```') 14 | cy.getMarkdownBody().findByCypressId('mermaid-frame').children().should('be.visible') 15 | }) 16 | }) 17 | -------------------------------------------------------------------------------- /src/components/common/number-range/number-range.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file) 3 | * 4 | * SPDX-License-Identifier: AGPL-3.0-only 5 | */ 6 | 7 | /** 8 | * Create an array with numbers from 1 to n. 9 | * 10 | * @param length The length of the array (or the number n) 11 | * @return An array of numbers from 1 to n 12 | */ 13 | export const createNumberRangeArray = (length: number): number[] => { 14 | return Array.from(Array(length).keys()) 15 | } 16 | -------------------------------------------------------------------------------- /src/components/editor-page/editor-pane/tool-bar/table-picker/table-picker.module.scss: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) 3 | * 4 | * SPDX-License-Identifier: AGPL-3.0-only 5 | */ 6 | 7 | .table-cell { 8 | margin: 1px; 9 | border-radius: 2px; 10 | border: solid 1px var(--bs-dark); 11 | } 12 | 13 | .table-container { 14 | display: grid; 15 | grid-template-columns: repeat(10, 15px [col-start]); 16 | grid-template-rows: repeat(8, 15px [row-start]); 17 | } 18 | -------------------------------------------------------------------------------- /src/components/editor-page/table-of-contents/toc-slugify.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file) 3 | * 4 | * SPDX-License-Identifier: AGPL-3.0-only 5 | */ 6 | /** 7 | * Transforms a given content into an url slug. 8 | * 9 | * @param content The content to slugify 10 | * @return The slugifyed content. 11 | */ 12 | export const tocSlugify = (content: string): string => { 13 | return encodeURIComponent(content.trim().toLowerCase().replace(/\s+/g, '-')) 14 | } 15 | -------------------------------------------------------------------------------- /src/extensions/extra-integrations/abcjs/abc.module.scss: -------------------------------------------------------------------------------- 1 | /*! 2 | * SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file) 3 | * 4 | * SPDX-License-Identifier: AGPL-3.0-only 5 | */ 6 | 7 | 8 | .abcjs-score { 9 | :global(.markdown-body) & { 10 | overflow-x: auto !important; 11 | } 12 | 13 | & > svg { 14 | max-width: unset !important; 15 | } 16 | 17 | &, text { 18 | @import "../../../../global-styles/variables.module"; 19 | font-family: $font-family-base; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/extensions/extra-integrations/gist/gist-frame.module.scss: -------------------------------------------------------------------------------- 1 | /*! 2 | * SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file) 3 | * 4 | * SPDX-License-Identifier: AGPL-3.0-only 5 | */ 6 | 7 | .gist-resizer-row { 8 | display: flex; 9 | justify-content: center; 10 | 11 | .gist-resizer { 12 | display: flex; 13 | width: 48px; 14 | height: 5px; 15 | background: white; 16 | border-radius: 90px; 17 | cursor: row-resize; 18 | box-shadow: black 0 0 3px; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 6 | 7 | # HedgeDoc - React Client 8 | 9 | 10 | This is the new, improved and better looking frontend for HedgeDoc 2.0. 11 | Our goal is to recreate the current frontend in react and to improve it. 12 | 13 | :warning::warning: This repository is deprecated. The frontend has been merged into the [main HedgeDoc repository](https://github.com/hedgedoc/hedgedoc) :warning::warning: 14 | -------------------------------------------------------------------------------- /global-styles/colors-only-bootstrap/_tooltip.scss: -------------------------------------------------------------------------------- 1 | /*! 2 | * SPDX-FileCopyrightText: Original code: Copyright (c) 2011-2022 Twitter, Inc. + Copyright (c) 2011-2022 The Bootstrap Authors. Modification: 2022 The HedgeDoc developers (see AUTHORS file) 3 | * 4 | * SPDX-License-Identifier: MIT 5 | */ 6 | 7 | // Base class 8 | .tooltip { 9 | // scss-docs-start tooltip-css-vars 10 | --#{$prefix}tooltip-color: #{$tooltip-color}; 11 | --#{$prefix}tooltip-bg: #{$tooltip-bg}; 12 | // scss-docs-end tooltip-css-vars 13 | } 14 | -------------------------------------------------------------------------------- /src/api/auth/index.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file) 3 | * 4 | * SPDX-License-Identifier: AGPL-3.0-only 5 | */ 6 | import { DeleteApiRequestBuilder } from '../common/api-request-builder/delete-api-request-builder' 7 | 8 | /** 9 | * Requests to log out the current user. 10 | * 11 | * @throws {Error} if logout is not possible. 12 | */ 13 | export const doLogout = async (): Promise => { 14 | await new DeleteApiRequestBuilder('auth/logout').sendRequest() 15 | } 16 | -------------------------------------------------------------------------------- /public/icons/site.webmanifest: -------------------------------------------------------------------------------- 1 | { 2 | "name": "HedgeDoc", 3 | "short_name": "HedgeDoc", 4 | "icons": [ 5 | { 6 | "src": "/icons/android-chrome-192x192.png", 7 | "sizes": "192x192", 8 | "type": "image/png" 9 | }, 10 | { 11 | "src": "/icons/android-chrome-512x512.png", 12 | "sizes": "512x512", 13 | "type": "image/png" 14 | } 15 | ], 16 | "theme_color": "#b51f08", 17 | "background_color": "#303030" 18 | } 19 | -------------------------------------------------------------------------------- /src/components/history-page/history-table/history-table.module.scss: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) 3 | * 4 | * SPDX-License-Identifier: AGPL-3.0-only 5 | */ 6 | 7 | .history-table tr { 8 | th, td { 9 | 10 | &:nth-child(1) { 11 | width: 45%; 12 | } 13 | 14 | &:nth-child(2) { 15 | width: 20%; 16 | } 17 | 18 | &:nth-child(3) { 19 | width: 20%; 20 | } 21 | 22 | &:nth-child(4) { 23 | width: 15%; 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/components/editor-page/document-bar/aliases/__snapshots__/aliases-list.test.tsx.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`AliasesList renders the AliasList sorted 1`] = ` 4 |
5 | 6 | Alias: 7 | a-test 8 | ( 9 | non-primary 10 | ) 11 | 12 | 13 | Alias: 14 | b-test 15 | ( 16 | primary 17 | ) 18 | 19 | 20 | Alias: 21 | z-test 22 | ( 23 | non-primary 24 | ) 25 | 26 |
27 | `; 28 | -------------------------------------------------------------------------------- /src/components/editor-page/sidebar/users-online-sidebar-menu/active-indicator.module.scss: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) 3 | * 4 | * SPDX-License-Identifier: AGPL-3.0-only 5 | */ 6 | 7 | .activeIndicator { 8 | $indicator-size: 12px; 9 | border-radius: $indicator-size; 10 | height: $indicator-size; 11 | width: $indicator-size; 12 | 13 | &.active { 14 | background-color: #5cb85c; 15 | } 16 | 17 | &.inactive { 18 | background-color: #d20000; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/components/editor-page/utils.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file) 3 | * 4 | * SPDX-License-Identifier: AGPL-3.0-only 5 | */ 6 | 7 | import { isClientSideRendering } from '../../utils/is-client-side-rendering' 8 | 9 | /** 10 | * Determines if the client is running on a Mac. 11 | * This is necessary to e.g. determine different keyboard shortcuts. 12 | */ 13 | export const isMac: () => boolean = () => isClientSideRendering() && navigator.platform.toLowerCase().includes('mac') 14 | -------------------------------------------------------------------------------- /src/api/tokens/types.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file) 3 | * 4 | * SPDX-License-Identifier: AGPL-3.0-only 5 | */ 6 | 7 | export interface AccessToken { 8 | label: string 9 | validUntil: string 10 | keyId: string 11 | createdAt: string 12 | lastUsedAt: string | null 13 | } 14 | 15 | export interface AccessTokenWithSecret extends AccessToken { 16 | secret: string 17 | } 18 | 19 | export interface CreateAccessTokenDto { 20 | label: string 21 | validUntil: number 22 | } 23 | -------------------------------------------------------------------------------- /src/redux/config/methods.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) 3 | * 4 | * SPDX-License-Identifier: AGPL-3.0-only 5 | */ 6 | 7 | import { store } from '..' 8 | import type { Config } from '../../api/config/types' 9 | import type { SetConfigAction } from './types' 10 | import { ConfigActionType } from './types' 11 | 12 | export const setConfig = (state: Config): void => { 13 | store.dispatch({ 14 | type: ConfigActionType.SET_CONFIG, 15 | state: state 16 | } as SetConfigAction) 17 | } 18 | -------------------------------------------------------------------------------- /src/redux/config/types.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) 3 | * 4 | * SPDX-License-Identifier: AGPL-3.0-only 5 | */ 6 | 7 | import type { Action } from 'redux' 8 | import type { Config } from '../../api/config/types' 9 | 10 | export enum ConfigActionType { 11 | SET_CONFIG = 'config/set' 12 | } 13 | 14 | export type ConfigActions = SetConfigAction 15 | 16 | export interface SetConfigAction extends Action { 17 | type: ConfigActionType.SET_CONFIG 18 | state: Config 19 | } 20 | -------------------------------------------------------------------------------- /src/api/revisions/types.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) 3 | * 4 | * SPDX-License-Identifier: AGPL-3.0-only 5 | */ 6 | 7 | import type { NoteEdit } from '../notes/types' 8 | 9 | export interface RevisionDetails extends RevisionMetadata { 10 | content: string 11 | patch: string 12 | edits: NoteEdit[] 13 | } 14 | 15 | export interface RevisionMetadata { 16 | id: number 17 | createdAt: string 18 | length: number 19 | authorUsernames: string[] 20 | anonymousAuthorCount: number 21 | } 22 | -------------------------------------------------------------------------------- /src/components/common/redirect-back.tsx: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) 3 | * 4 | * SPDX-License-Identifier: AGPL-3.0-only 5 | */ 6 | 7 | import React, { useEffect } from 'react' 8 | import { useRouter } from 'next/router' 9 | 10 | /** 11 | * Redirects the user back to the previous URL. 12 | */ 13 | export const RedirectBack: React.FC = () => { 14 | const router = useRouter() 15 | 16 | useEffect(() => { 17 | router.back() 18 | }) 19 | 20 | return Redirecting back 21 | } 22 | -------------------------------------------------------------------------------- /src/pages/404.tsx: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file) 3 | * 4 | * SPDX-License-Identifier: AGPL-3.0-only 5 | */ 6 | import { CommonErrorPage } from '../components/error-pages/common-error-page' 7 | import type { NextPage } from 'next' 8 | 9 | /** 10 | * Renders a hedgedoc themed 404 page. 11 | */ 12 | const Custom404: NextPage = () => { 13 | return 14 | } 15 | 16 | export default Custom404 17 | -------------------------------------------------------------------------------- /src/redux/note-details/frontmatter-extractor/types.d.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) 3 | * 4 | * SPDX-License-Identifier: AGPL-3.0-only 5 | */ 6 | 7 | export type FrontmatterExtractionResult = PresentFrontmatterExtractionResult | NonPresentFrontmatterExtractionResult 8 | 9 | export interface PresentFrontmatterExtractionResult { 10 | isPresent: true 11 | rawText: string 12 | lineOffset: number 13 | } 14 | 15 | interface NonPresentFrontmatterExtractionResult { 16 | isPresent: false 17 | } 18 | -------------------------------------------------------------------------------- /global-styles/colors-only-bootstrap/_forms.scss: -------------------------------------------------------------------------------- 1 | /*! 2 | * SPDX-FileCopyrightText: Original code: Copyright (c) 2011-2022 Twitter, Inc. + Copyright (c) 2011-2022 The Bootstrap Authors. Modification: 2022 The HedgeDoc developers (see AUTHORS file) 3 | * 4 | * SPDX-License-Identifier: MIT 5 | */ 6 | 7 | @import "forms/labels"; 8 | @import "forms/form-text"; 9 | @import "forms/form-control"; 10 | @import "forms/form-select"; 11 | @import "forms/form-check"; 12 | @import "forms/form-range"; 13 | @import "forms/input-group"; 14 | @import "forms/validation"; 15 | -------------------------------------------------------------------------------- /global-styles/colors-only-bootstrap/_images.scss: -------------------------------------------------------------------------------- 1 | /*! 2 | * SPDX-FileCopyrightText: Original code: Copyright (c) 2011-2022 Twitter, Inc. + Copyright (c) 2011-2022 The Bootstrap Authors. Modification: 2022 The HedgeDoc developers (see AUTHORS file) 3 | * 4 | * SPDX-License-Identifier: MIT 5 | */ 6 | 7 | // Image thumbnails 8 | .img-thumbnail { 9 | background-color: $thumbnail-bg; 10 | border-color: $thumbnail-border-color; 11 | @include box-shadow($thumbnail-box-shadow); 12 | } 13 | 14 | .figure-caption { 15 | color: $figure-caption-color; 16 | } 17 | -------------------------------------------------------------------------------- /cypress/support/logout.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) 3 | * 4 | * SPDX-License-Identifier: AGPL-3.0-only 5 | */ 6 | 7 | declare namespace Cypress { 8 | interface Chainable { 9 | /** 10 | * Custom command to log the user out. 11 | * @example cy.logout() 12 | */ 13 | logout(): Chainable 14 | } 15 | } 16 | 17 | Cypress.Commands.add('logout', () => { 18 | cy.getByCypressId('user-dropdown').click() 19 | cy.getByCypressId('user-dropdown-sign-out-button').click() 20 | }) 21 | -------------------------------------------------------------------------------- /src/components/history-page/history-toolbar/history-toolbar-state.d.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) 3 | * 4 | * SPDX-License-Identifier: AGPL-3.0-only 5 | */ 6 | 7 | import type { SortModeEnum } from '../sort-button/sort-button' 8 | import type { ViewStateEnum } from './history-toolbar' 9 | 10 | export type HistoryToolbarState = { 11 | viewState: ViewStateEnum 12 | search: string 13 | selectedTags: string[] 14 | titleSortDirection: SortModeEnum 15 | lastVisitedSortDirection: SortModeEnum 16 | } 17 | -------------------------------------------------------------------------------- /cypress/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "parserOptions": { 3 | "tsconfigRootDir": "", 4 | "project": [ 5 | "./tsconfig.json" 6 | ] 7 | }, 8 | "plugins": [ 9 | "cypress", 10 | "chai-friendly" 11 | ], 12 | "extends": [ 13 | "plugin:cypress/recommended" 14 | ], 15 | "rules": { 16 | "@typescript-eslint/no-unused-expressions": 0, 17 | "no-unused-expressions": 0, 18 | "chai-friendly/no-unused-expressions": 2, 19 | "@typescript-eslint/no-namespace": 0 20 | }, 21 | "env": { 22 | "cypress/globals": true 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/components/editor-page/editor-pane/hooks/yjs/use-y-doc.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file) 3 | * 4 | * SPDX-License-Identifier: AGPL-3.0-only 5 | */ 6 | 7 | import { Doc } from 'yjs' 8 | import { useEffect, useMemo } from 'react' 9 | 10 | /** 11 | * Creates a new {@link Doc y-doc}. 12 | * 13 | * @return The created {@link Doc y-doc} 14 | */ 15 | export const useYDoc = (): Doc => { 16 | const yDoc = useMemo(() => new Doc(), []) 17 | useEffect(() => () => yDoc.destroy(), [yDoc]) 18 | return yDoc 19 | } 20 | -------------------------------------------------------------------------------- /src/redux/index.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) 3 | * 4 | * SPDX-License-Identifier: AGPL-3.0-only 5 | */ 6 | 7 | import { allReducers } from './reducers' 8 | import type { ApplicationState } from './application-state' 9 | import { configureStore } from '@reduxjs/toolkit' 10 | import { isDevMode } from '../utils/test-modes' 11 | 12 | export const store = configureStore({ 13 | reducer: allReducers, 14 | devTools: isDevMode 15 | }) 16 | 17 | export const getGlobalState = (): ApplicationState => store.getState() 18 | -------------------------------------------------------------------------------- /src/components/landing-layout/footer/footer.tsx: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file) 3 | * 4 | * SPDX-License-Identifier: AGPL-3.0-only 5 | */ 6 | 7 | import React from 'react' 8 | import { PoweredByLinks } from './powered-by-links' 9 | import { SocialLink } from './social-links' 10 | 11 | /** 12 | * Renders the footer. 13 | */ 14 | export const Footer: React.FC = () => { 15 | return ( 16 |
17 | 18 | 19 |
20 | ) 21 | } 22 | -------------------------------------------------------------------------------- /src/components/markdown-renderer/common-markdown-renderer-props.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file) 3 | * 4 | * SPDX-License-Identifier: AGPL-3.0-only 5 | */ 6 | 7 | import type { Ref } from 'react' 8 | 9 | export interface CommonMarkdownRendererProps { 10 | onFirstHeadingChange?: (firstHeading: string | undefined) => void 11 | baseUrl: string 12 | outerContainerRef?: Ref 13 | newlinesAreBreaks?: boolean 14 | lineOffset?: number 15 | className?: string 16 | markdownContentLines: string[] 17 | } 18 | -------------------------------------------------------------------------------- /src/extensions/extra-integrations/vega-lite/__snapshots__/vega-lite-markdown-extension.test.tsx.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`Vega-Lite markdown extensions renders a vega-lite codeblock 1`] = ` 4 |
5 |
 6 |     
 7 |       this is a mock for vega lite
 8 |       
 9 |         {"$schema":"https://vega.github.io/schema/vega-lite/v4.json","data":{"values":[{"a":"","b":28}]},"mark":"bar","encoding":{"x":{"field":"a"},"y":{"field":"b"}}}
10 | 
11 |       
12 |     
13 |   
14 | 15 | 16 |
17 | `; 18 | -------------------------------------------------------------------------------- /src/hooks/common/use-note-markdown-content.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file) 3 | * 4 | * SPDX-License-Identifier: AGPL-3.0-only 5 | */ 6 | 7 | import { useApplicationState } from './use-application-state' 8 | 9 | /** 10 | * Extracts the markdown content of the current note from the global application state. 11 | * 12 | * @return The markdown content of the note 13 | */ 14 | export const useNoteMarkdownContent = (): string => { 15 | return useApplicationState((state) => state.noteDetails.markdownContent.plain) 16 | } 17 | -------------------------------------------------------------------------------- /global-styles/colors-only-bootstrap/_badge.scss: -------------------------------------------------------------------------------- 1 | /*! 2 | * SPDX-FileCopyrightText: Original code: Copyright (c) 2011-2022 Twitter, Inc. + Copyright (c) 2011-2022 The Bootstrap Authors. Modification: 2022 The HedgeDoc developers (see AUTHORS file) 3 | * 4 | * SPDX-License-Identifier: MIT 5 | */ 6 | 7 | // Base class 8 | // 9 | // Requires one of the contextual, color modifier classes for `color` and 10 | // `background-color`. 11 | 12 | .badge { 13 | // scss-docs-start badge-css-vars 14 | --#{$prefix}badge-color: #{$badge-color}; 15 | // scss-docs-end badge-css-vars 16 | } 17 | -------------------------------------------------------------------------------- /src/components/markdown-renderer/extensions/image-placeholder/image-placeholder.module.scss: -------------------------------------------------------------------------------- 1 | /*! 2 | * SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file) 3 | * 4 | * SPDX-License-Identifier: AGPL-3.0-only 5 | */ 6 | 7 | .image-drop { 8 | border: 3px dashed var(--bs-dark); 9 | 10 | border-radius: 3px; 11 | transition: background-color 50ms, color 50ms; 12 | 13 | .altText { 14 | text-overflow: ellipsis; 15 | flex: 1 1; 16 | overflow: hidden; 17 | width: 100%; 18 | white-space: nowrap; 19 | text-align: center; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/redux/dark-mode/methods.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file) 3 | * 4 | * SPDX-License-Identifier: AGPL-3.0-only 5 | */ 6 | 7 | import { store } from '..' 8 | import type { DarkModeConfigAction, DarkModePreference } from './types' 9 | import { DarkModeConfigActionType } from './types' 10 | 11 | export const setDarkModePreference = (darkModePreference: DarkModePreference): void => { 12 | store.dispatch({ 13 | type: DarkModeConfigActionType.SET_DARK_MODE, 14 | darkModePreference 15 | } as DarkModeConfigAction) 16 | } 17 | -------------------------------------------------------------------------------- /src/components/common/upload-image-mimetypes.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) 3 | * 4 | * SPDX-License-Identifier: AGPL-3.0-only 5 | */ 6 | 7 | export const supportedMimeTypes: string[] = [ 8 | 'image/apng', 9 | 'image/bmp', 10 | 'image/gif', 11 | 'image/heif', 12 | 'image/heic', 13 | 'image/heif-sequence', 14 | 'image/heic-sequence', 15 | 'image/jpeg', 16 | 'image/png', 17 | 'image/svg+xml', 18 | 'image/tiff', 19 | 'image/webp' 20 | ] 21 | 22 | export const acceptedMimeTypes = supportedMimeTypes.join(', ') 23 | -------------------------------------------------------------------------------- /global-styles/colors-only-bootstrap/forms/_labels.scss: -------------------------------------------------------------------------------- 1 | /*! 2 | * SPDX-FileCopyrightText: Original code: Copyright (c) 2011-2022 Twitter, Inc. + Copyright (c) 2011-2022 The Bootstrap Authors. Modification: 2022 The HedgeDoc developers (see AUTHORS file) 3 | * 4 | * SPDX-License-Identifier: MIT 5 | */ 6 | 7 | // 8 | // Labels 9 | // 10 | 11 | .form-label { 12 | color: $form-label-color; 13 | } 14 | 15 | // For use with horizontal and inline forms, when you need the label (or legend) 16 | // text to align with the form controls. 17 | .col-form-label { 18 | color: $form-label-color; 19 | } 20 | -------------------------------------------------------------------------------- /src/components/markdown-renderer/loading-slide.tsx: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) 3 | * 4 | * SPDX-License-Identifier: AGPL-3.0-only 5 | */ 6 | 7 | import React from 'react' 8 | import { Trans, useTranslation } from 'react-i18next' 9 | 10 | /** 11 | * Shows a static text placeholder while reveal.js is loading. 12 | */ 13 | export const LoadingSlide: React.FC = () => { 14 | useTranslation() 15 | return ( 16 |
17 |

18 | 19 |

20 |
21 | ) 22 | } 23 | -------------------------------------------------------------------------------- /src/redux/dark-mode/types.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file) 3 | * 4 | * SPDX-License-Identifier: AGPL-3.0-only 5 | */ 6 | 7 | import type { Action } from 'redux' 8 | 9 | export enum DarkModeConfigActionType { 10 | SET_DARK_MODE = 'dark-mode/set' 11 | } 12 | 13 | export enum DarkModePreference { 14 | DARK, 15 | LIGHT, 16 | AUTO 17 | } 18 | 19 | export interface DarkModeConfig { 20 | darkModePreference: DarkModePreference 21 | } 22 | 23 | export type DarkModeConfigAction = Action & DarkModeConfig 24 | -------------------------------------------------------------------------------- /src/components/login-page/auth/social-link-button/social-link-button.module.scss: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) 3 | * 4 | * SPDX-License-Identifier: AGPL-3.0-only 5 | */ 6 | 7 | .social-link-button { 8 | 9 | &, &:hover { 10 | color: #FFFFFF; 11 | } 12 | 13 | .icon-part { 14 | padding: 0.375rem 0.375rem; 15 | border-right: 1px solid rgba(0, 0, 0, 0.2); 16 | display: flex; 17 | 18 | .social-icon { 19 | font-size: 1.5em; 20 | } 21 | } 22 | 23 | .text-part { 24 | padding: 0.375rem 0.75rem; 25 | } 26 | } 27 | 28 | -------------------------------------------------------------------------------- /src/components/common/wait-spinner/wait-spinner.tsx: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file) 3 | * 4 | * SPDX-License-Identifier: AGPL-3.0-only 5 | */ 6 | 7 | import React from 'react' 8 | import { ForkAwesomeIcon } from '../fork-awesome/fork-awesome-icon' 9 | 10 | /** 11 | * Renders a indefinitely spinning spinner. 12 | */ 13 | export const WaitSpinner: React.FC = () => { 14 | return ( 15 |
16 | 17 |
18 | ) 19 | } 20 | -------------------------------------------------------------------------------- /src/components/render-page/markdown-document.module.scss: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) 3 | * 4 | * SPDX-License-Identifier: AGPL-3.0-only 5 | */ 6 | 7 | .markdown-document { 8 | width: 100%; 9 | height: 100%; 10 | margin: 0; 11 | overflow: auto; 12 | display: flex; 13 | flex-direction: row; 14 | 15 | .markdown-document-side { 16 | flex: 1 0 0; 17 | } 18 | 19 | .markdown-document-content { 20 | padding-left: 10px; 21 | padding-right: 10px; 22 | flex: 0 0 900px; 23 | max-width: 100%; 24 | width: 900px; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/components/render-page/window-post-message-communicator/hooks/use-is-renderer-ready.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file) 3 | * 4 | * SPDX-License-Identifier: AGPL-3.0-only 5 | */ 6 | 7 | import { useApplicationState } from '../../../../hooks/common/use-application-state' 8 | 9 | /** 10 | * Extracts the ready status of the renderer from the global application state. 11 | * 12 | * @return The current ready status of the renderer. 13 | */ 14 | export const useIsRendererReady = (): boolean => useApplicationState((state) => state.rendererStatus.rendererReady) 15 | -------------------------------------------------------------------------------- /.mailmap: -------------------------------------------------------------------------------- 1 | Tilman Vatteroth mrdrogdrog 2 | Tilman Vatteroth mrdrogdrog 3 | Tilman Vatteroth Tilman Vatteroth 4 | 5 | Philip Molares Philip Molares 6 | Philip Molares Philip Molares 7 | 8 | Sheogorath Christoph Kern 9 | -------------------------------------------------------------------------------- /global-styles/colors-only-bootstrap/_breadcrumb.scss: -------------------------------------------------------------------------------- 1 | /*! 2 | * SPDX-FileCopyrightText: Original code: Copyright (c) 2011-2022 Twitter, Inc. + Copyright (c) 2011-2022 The Bootstrap Authors. Modification: 2022 The HedgeDoc developers (see AUTHORS file) 3 | * 4 | * SPDX-License-Identifier: MIT 5 | */ 6 | 7 | .breadcrumb { 8 | // scss-docs-start breadcrumb-css-vars 9 | --#{$prefix}breadcrumb-bg: #{$breadcrumb-bg}; 10 | --#{$prefix}breadcrumb-divider-color: #{$breadcrumb-divider-color}; 11 | --#{$prefix}breadcrumb-item-active-color: #{$breadcrumb-active-color}; 12 | // scss-docs-end breadcrumb-css-vars 13 | } 14 | -------------------------------------------------------------------------------- /.github/pull_request_template.md: -------------------------------------------------------------------------------- 1 | ### Component/Part 2 | 3 | 4 | ### Description 5 | This PR fixes/adds/improves/... 6 | 7 | ### Steps 8 | 9 | 10 | 11 | - [ ] Added implementation 12 | - [ ] Added / updated tests 13 | - [ ] Added / updated documentation 14 | - [ ] Extended changelog 15 | - [ ] I read the [contribution documentation](https://github.com/hedgedoc/react-client/blob/main/CONTRIBUTING.md) and signed-off my commits to accept the DCO. 16 | 17 | ### Related Issue(s) 18 | 19 | -------------------------------------------------------------------------------- /src/extensions/extra-integrations/abcjs/__snapshots__/abcjs-markdown-extension.test.tsx.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`AbcJs Markdown Extension renders an abc codeblock 1`] = ` 4 |
5 |
 6 |     
 7 |       this is a mock for abc js frame
 8 |       
 9 |         X:1\\nT:Speed the Plough\\nM:4/4\\nC:Trad.\\nK:G\\n|:GABc dedB|dedB dedB|c2ec B2dB|c2A2 A2BA|\\nGABc dedB|dedB dedB|c2ec B2dB|A2F2 G4:|\\n|:g2gf gdBd|g2f2 e2d2|c2ec B2dB|c2A2 A2df|\\ng2gf g2Bd|g2f2 e2d2|c2ec B2dB|A2F2 G4:|
10 | 
11 |       
12 |     
13 |   
14 | 15 | 16 |
17 | `; 18 | -------------------------------------------------------------------------------- /src/extensions/extra-integrations/plantuml/__snapshots__/plantuml-markdown-extension.test.tsx.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`PlantUML markdown extensions renders a plantuml codeblock 1`] = ` 4 |
5 | uml diagram 9 | 10 | 11 |
12 | `; 13 | 14 | exports[`PlantUML markdown extensions renders an error if no server is defined 1`] = ` 15 |
16 |

19 | renderer.plantuml.notConfigured 20 |

21 |
22 | `; 23 | -------------------------------------------------------------------------------- /AUTHORS.md: -------------------------------------------------------------------------------- 1 | 6 | 7 | 11 | 12 | # Authors 13 | 14 | - Erik Michelson 15 | - Henrik Hüttemann 16 | - Jakob Klepp 17 | - Philip Molares 18 | - Christoph Kern 19 | - Tilman Vatteroth 20 | -------------------------------------------------------------------------------- /src/components/editor-page/sidebar/sidebar-menu/sidebar-menu.module.scss: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) 3 | * 4 | * SPDX-License-Identifier: AGPL-3.0-only 5 | */ 6 | 7 | .sidebar-menu { 8 | transition: height 0.2s, flex-basis 0.2s; 9 | display: flex; 10 | flex-direction: column; 11 | overflow: hidden; 12 | flex: 0 1 0; 13 | height: 0; 14 | 15 | &.show { 16 | height: 100%; 17 | flex-basis: 100%; 18 | overflow-y: auto; 19 | } 20 | 21 | & > div { 22 | background: var(--bs-body-bg); 23 | box-shadow: inset 0 7px 7px -6px #bbbbbb; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/extensions/extra-integrations/plantuml/plantuml-not-configured-alert.tsx: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file) 3 | * 4 | * SPDX-License-Identifier: AGPL-3.0-only 5 | */ 6 | 7 | import React from 'react' 8 | import { Trans, useTranslation } from 'react-i18next' 9 | 10 | /** 11 | * Renders an alert if plantuml is not configured. 12 | */ 13 | export const PlantumlNotConfiguredAlert: React.FC = () => { 14 | useTranslation() 15 | 16 | return ( 17 |

18 | 19 |

20 | ) 21 | } 22 | -------------------------------------------------------------------------------- /global-styles/colors-only-bootstrap/_progress.scss: -------------------------------------------------------------------------------- 1 | /*! 2 | * SPDX-FileCopyrightText: Original code: Copyright (c) 2011-2022 Twitter, Inc. + Copyright (c) 2011-2022 The Bootstrap Authors. Modification: 2022 The HedgeDoc developers (see AUTHORS file) 3 | * 4 | * SPDX-License-Identifier: MIT 5 | */ 6 | 7 | .progress { 8 | // scss-docs-start progress-css-vars 9 | --#{$prefix}progress-bg: #{$progress-bg}; 10 | --#{$prefix}progress-box-shadow: #{$progress-box-shadow}; 11 | --#{$prefix}progress-bar-color: #{$progress-bar-color}; 12 | --#{$prefix}progress-bar-bg: #{$progress-bar-bg}; 13 | // scss-docs-end progress-css-vars 14 | } 15 | -------------------------------------------------------------------------------- /src/components/editor-page/editor-pane/tool-bar/tool-bar.module.scss: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) 3 | * 4 | * SPDX-License-Identifier: AGPL-3.0-only 5 | */ 6 | 7 | :global(.btn-toolbar).toolbar { 8 | border-bottom: 1px solid #ededed; 9 | border-top: 1px solid #ededed; 10 | 11 | :global(.btn) { 12 | padding: 0.1875rem 0.5rem; 13 | min-width: 30px; 14 | } 15 | 16 | :global(.btn-group):not(:last-of-type)::after { 17 | background-color: #e2e6ea; 18 | width: 2px; 19 | padding: 0.25rem 0; 20 | content: ' '; 21 | margin-left: 0.5rem; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/components/editor-page/sidebar/users-online-sidebar-menu/online-counter.module.scss: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) 3 | * 4 | * SPDX-License-Identifier: AGPL-3.0-only 5 | */ 6 | .online-entry { 7 | &:hover { 8 | :global(.sidebar-button-icon):after { 9 | color: inherit; 10 | } 11 | } 12 | 13 | --users-online: '0'; 14 | 15 | :global(.sidebar-button-icon):after { 16 | content: var(--users-online); 17 | position: absolute; 18 | right: 5px; 19 | bottom: 3px; 20 | font-size: 0.9rem; 21 | color: var(--bg-primary); 22 | line-height: 1; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/components/markdown-renderer/extensions/emoji/__snapshots__/emoji-markdown-extension.test.tsx.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`Emoji Markdown Extension renders a fork awesome code 1`] = ` 4 |
5 |

6 | 9 |

10 | 11 | 12 |
13 | `; 14 | 15 | exports[`Emoji Markdown Extension renders a skin tone code 1`] = ` 16 |
17 |

18 | 🏽 19 |

20 | 21 | 22 |
23 | `; 24 | 25 | exports[`Emoji Markdown Extension renders an emoji code 1`] = ` 26 |
27 |

28 | 😄 29 |

30 | 31 | 32 |
33 | `; 34 | -------------------------------------------------------------------------------- /cypress/e2e/iframe-capsule.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file) 3 | * 4 | * SPDX-License-Identifier: AGPL-3.0-only 5 | */ 6 | 7 | describe('Iframe capsule', () => { 8 | beforeEach(() => { 9 | cy.visitTestNote() 10 | }) 11 | 12 | it('shows a clickable click shield instead of the iframe', () => { 13 | cy.setCodemirrorContent('') 14 | cy.getMarkdownBody().findByCypressId('iframe-capsule-click-shield').should('exist').click() 15 | cy.getMarkdownBody().find('iframe').should('exist').should('have.attr', 'src', 'https://example.org') 16 | }) 17 | }) 18 | -------------------------------------------------------------------------------- /global-styles/colors-only-bootstrap/forms/_input-group.scss: -------------------------------------------------------------------------------- 1 | /*! 2 | * SPDX-FileCopyrightText: Original code: Copyright (c) 2011-2022 Twitter, Inc. + Copyright (c) 2011-2022 The Bootstrap Authors. Modification: 2022 The HedgeDoc developers (see AUTHORS file) 3 | * 4 | * SPDX-License-Identifier: MIT 5 | */ 6 | 7 | // Textual addons 8 | // 9 | // Serves as a catch-all element for any text or radio/checkbox input you wish 10 | // to prepend or append to an input. 11 | 12 | .input-group-text { 13 | color: $input-group-addon-color; 14 | background-color: $input-group-addon-bg; 15 | border: $input-border-width solid $input-group-addon-border-color; 16 | } 17 | -------------------------------------------------------------------------------- /src/components/editor-page/synced-scroll/scroll-props.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file) 3 | * 4 | * SPDX-License-Identifier: AGPL-3.0-only 5 | */ 6 | 7 | export type ScrollCallback = (scrollState: ScrollState) => void 8 | 9 | export interface ScrollProps { 10 | scrollState?: ScrollState 11 | onScroll?: ScrollCallback 12 | onMakeScrollSource?: () => void 13 | } 14 | 15 | export interface ScrollState { 16 | firstLineInView: number 17 | scrolledPercentage: number 18 | } 19 | 20 | export interface DualScrollState { 21 | editorScrollState: ScrollState 22 | rendererScrollState: ScrollState 23 | } 24 | -------------------------------------------------------------------------------- /src/extensions/extra-integrations/vimeo/__snapshots__/vimeo-frame.test.tsx.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`VimeoFrame renders a click shield 1`] = ` 4 |
5 | 6 | This is a click shield for 7 | 10 |