refactor: reorganize files in commons package

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
Tilman Vatteroth 2023-05-29 18:37:06 +02:00
parent c9b98f6185
commit 4d9792bcb9
23 changed files with 94 additions and 69 deletions

View file

@ -3,7 +3,7 @@
*
* SPDX-License-Identifier: AGPL-3.0-only
*/
import { NoteFrontmatter } from '../note-frontmatter/frontmatter.js'
import { NoteFrontmatter } from '../note-frontmatter/index.js'
import { parseTags } from './parse-tags.js'
import { RawNoteFrontmatter } from './types.js'

View file

@ -1,33 +0,0 @@
/*
* SPDX-FileCopyrightText: 2023 The HedgeDoc developers (see AUTHORS file)
*
* SPDX-License-Identifier: AGPL-3.0-only
*/
import {
NoteFrontmatter,
NoteTextDirection,
NoteType
} from '../note-frontmatter/frontmatter.js'
import { SlideOptions } from '../note-frontmatter/slide-show-options.js'
export const defaultSlideOptions: SlideOptions = {
transition: 'zoom',
autoSlide: 0,
autoSlideStoppable: true,
backgroundTransition: 'fade',
slideNumber: false
}
export const defaultNoteFrontmatter: NoteFrontmatter = {
title: '',
description: '',
tags: [],
robots: '',
lang: 'en',
dir: NoteTextDirection.LTR,
newlinesAreBreaks: true,
license: '',
type: NoteType.DOCUMENT,
opengraph: {},
slideOptions: defaultSlideOptions
}

View file

@ -0,0 +1,10 @@
/*
* SPDX-FileCopyrightText: 2023 The HedgeDoc developers (see AUTHORS file)
*
* SPDX-License-Identifier: AGPL-3.0-only
*/
export * from './parse-raw-frontmatter-from-yaml.js'
export * from './convert-raw-frontmatter-to-note-frontmatter.js'
export * from './parse-tags.js'
export * from './types.js'

View file

@ -3,14 +3,14 @@
*
* SPDX-License-Identifier: AGPL-3.0-only
*/
import { defaultNoteFrontmatter } from '../note-frontmatter/index.js'
import {
NoteTextDirection,
NoteType,
OpenGraph
} from '../note-frontmatter/frontmatter.js'
} from '../note-frontmatter/index.js'
import { SlideOptions } from '../note-frontmatter/index.js'
import { ISO6391 } from '../note-frontmatter/iso6391.js'
import { SlideOptions } from '../note-frontmatter/slide-show-options.js'
import { defaultNoteFrontmatter } from './default-values.js'
import type { RawNoteFrontmatter } from './types.js'
import type { ValidationError } from 'joi'
import Joi from 'joi'

View file

@ -8,8 +8,8 @@ import {
NoteTextDirection,
NoteType,
OpenGraph
} from '../note-frontmatter/frontmatter.js'
import { SlideOptions } from '../note-frontmatter/slide-show-options.js'
} from '../note-frontmatter/index.js'
import { SlideOptions } from '../note-frontmatter/index.js'
export interface RawNoteFrontmatter {
title: string