@erudit-js/core 3.0.0-dev.30 → 4.0.0-dev.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,15 +1,26 @@
1
1
  interface BaseContentExternal {
2
2
  type: 'web' | 'physical';
3
3
  title: string;
4
- info?: string;
5
4
  reason: string;
5
+ info?: string;
6
+ link?: string;
6
7
  }
7
8
  export interface WebContentExternal extends BaseContentExternal {
8
9
  type: 'web';
9
- link: string;
10
10
  }
11
11
  export interface PhysicalContentExternal extends BaseContentExternal {
12
12
  type: 'physical';
13
13
  }
14
- export type ContentExternal = WebContentExternal | PhysicalContentExternal;
14
+ export type ContentExternalItem = WebContentExternal | PhysicalContentExternal;
15
+ export interface ContentExternalOwnGroup {
16
+ type: 'own';
17
+ items: ContentExternalItem[];
18
+ }
19
+ export interface ContentExternalParentGroup {
20
+ type: 'parent';
21
+ title: string;
22
+ items: ContentExternalItem[];
23
+ }
24
+ export type ContentExternalGroup = ContentExternalOwnGroup | ContentExternalParentGroup;
25
+ export type ContentExternals = ContentExternalGroup[];
15
26
  export {};
@@ -1,7 +1,7 @@
1
1
  import type { ContentFlags } from './flags.js';
2
2
  import type { ContentDependency } from './dependencies.js';
3
3
  import type { ContentType } from './type.js';
4
- import type { ContentExternal } from './externals.js';
4
+ import type { ContentExternalItem } from './externals.js';
5
5
  import type { ContentSeo } from './seo.js';
6
6
  export type ContentItem = {
7
7
  type: ContentType;
@@ -59,7 +59,7 @@ export type ContentItem = {
59
59
  * },
60
60
  * ];
61
61
  */
62
- externals: ContentExternal[];
62
+ externals: ContentExternalItem[];
63
63
  seo: ContentSeo;
64
64
  }>;
65
65
  export type TypelessContentItem<TContentItem extends ContentItem> = Omit<TContentItem, 'type'>;
@@ -2,7 +2,7 @@ export type EruditIndexPage = Partial<{
2
2
  title: string;
3
3
  short: string;
4
4
  description: string;
5
- logotype: {
5
+ topImage: {
6
6
  src: string;
7
7
  maxWidth?: string;
8
8
  invert?: 'light' | 'dark';
@@ -0,0 +1,10 @@
1
+ /** Allows different `formatText()` calls to share state. */
2
+ export interface FormatTextState {
3
+ quote: 'opened' | 'closed';
4
+ }
5
+ export declare function createFormatTextState(): FormatTextState;
6
+ export interface FormatText {
7
+ (text: string, state?: FormatTextState): string;
8
+ (text: undefined, state?: FormatTextState): undefined;
9
+ (text?: string, state?: FormatTextState): string | undefined;
10
+ }
@@ -0,0 +1,5 @@
1
+ export function createFormatTextState() {
2
+ return {
3
+ quote: 'closed',
4
+ };
5
+ }
package/dist/mode.d.ts CHANGED
@@ -1 +1 @@
1
- export type EruditMode = 'dev' | 'build' | 'generate';
1
+ export type EruditMode = 'dev' | 'write' | 'static';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@erudit-js/core",
3
- "version": "3.0.0-dev.30",
3
+ "version": "4.0.0-dev.2",
4
4
  "type": "module",
5
5
  "description": "Erudit core essentials",
6
6
  "exports": {