Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"typecheck": "tsc -p tsconfig.json"
},
"dependencies": {
"@mdbase-dev/ui": "0.1.0-beta.124",
"@mdbase-dev/ui": "0.1.0-beta.125",
"@mdbase-reader/connect": "workspace:*",
"@mdbase-reader/core": "workspace:*",
"@mdbase-reader/platform": "workspace:*",
Expand Down
39 changes: 30 additions & 9 deletions apps/extension/src/generated/mdbase-app.json

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
---
kind: mdbase.type
name: reader-annotation
version: 1
description: An independently addressable mdbase Reader annotation.
schema:
dialect: json-schema-2020-12
value:
$schema: https://json-schema.org/draft/2020-12/schema
type: object
additionalProperties: true
required: [type, id, source, annotation_type, created_at]
properties:
type: { const: reader-annotation }
id: { type: string, minLength: 1 }
source: { type: string, minLength: 1 }
document:
type: object
additionalProperties: false
required: [file_id, file, revision]
properties:
file_id: { type: string, minLength: 1 }
file: { type: string, minLength: 1 }
revision: { type: string, pattern: "^sha256:[0-9a-f]{64}$" }
annotation_type: { type: string, minLength: 1 }
motivation: { type: string }
color: { type: string }
locator:
type: object
additionalProperties: true
target:
type: object
additionalProperties: true
tags:
type: array
items: { type: string }
created_at: { type: string, format: date-time }
modified_at: { type: string, format: date-time }
created_by: { type: string }
match:
path_glob: annotations/**/*.md
fields_present: [id, source, annotation_type]
collection:
unique:
- field: id
scope: type
links:
source:
target_type: reader-source
validate_exists: true
document.file:
target_type: any
validate_exists: true
implements:
- contract: dev.mdbase.reader.annotation
version: 1.0.0-beta.1
fields:
id: id
source: source
document: document
annotation_type: annotation_type
motivation: motivation
color: color
locator: locator
target: target
tags: tags
created_at: created_at
modified_at: modified_at
created_by: created_by
---

# Reader annotation

The body contains a readable quotation, an optional note, or both.
100 changes: 100 additions & 0 deletions apps/reader/mdbase/baselines/1.0.0-beta.1/types/reader-source.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
---
kind: mdbase.type
name: reader-source
version: 1
description: A source and user-authored literature note for mdbase Reader.
schema:
dialect: json-schema-2020-12
value:
$schema: https://json-schema.org/draft/2020-12/schema
type: object
additionalProperties: true
required: [type, id, title, kind, saved_at]
properties:
type: { const: reader-source }
id: { type: string, minLength: 1 }
title: { type: string, minLength: 1 }
kind: { type: string, minLength: 1 }
authors:
type: array
items: { type: string }
published:
oneOf:
- type: string
- type: number
url: { type: string }
description: { type: string }
language: { type: string }
saved_at: { type: string, format: date-time }
documents:
type: array
items:
type: object
additionalProperties: true
required: [file]
properties:
file_id: { type: string }
file: { type: string, minLength: 1 }
role: { type: string }
revision: { type: string, pattern: "^sha256:[0-9a-f]{64}$" }
format: { type: string }
media_type: { type: string }
label: { type: string }
reading:
type: object
additionalProperties: true
properties:
status: { type: string }
progress: { type: number, minimum: 0, maximum: 1 }
tags:
type: array
items:
type: [string, number, boolean]
relations:
type: array
items:
type: object
additionalProperties: true
required: [relation, target]
properties:
relation: { type: string }
target: { type: string }
csl: { type: object }
match:
path_glob: sources/**/*.md
fields_present: [id, title, kind]
collection:
unique:
- field: id
scope: type
links:
documents[].file:
target_type: any
validate_exists: true
relations[].target:
target_type: reader-source
validate_exists: false
implements:
- contract: dev.mdbase.reader.source
version: 1.0.0-beta.1
fields:
id: id
title: title
kind: kind
authors: authors
published: published
url: url
description: description
language: language
saved_at: saved_at
documents: documents
reading: reading
tags: tags
relations: relations
csl: csl
---

# Reader source

The source body is the user's literature note. Reader never regenerates it
from annotations.
110 changes: 110 additions & 0 deletions apps/reader/mdbase/baselines/1.0.0-beta.2/types/reader-source.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
---
kind: mdbase.type
name: reader-source
version: 1
description: A source and user-authored literature note for mdbase Reader.
schema:
dialect: json-schema-2020-12
value:
$schema: https://json-schema.org/draft/2020-12/schema
type: object
additionalProperties: true
required: [type, id, title, kind, saved_at]
properties:
type: { const: reader-source }
id: { type: string, minLength: 1 }
title: { type: string, minLength: 1 }
kind: { type: string, minLength: 1 }
authors:
type: array
items: { type: string }
published:
oneOf:
- type: string
- type: number
url: { type: string }
original_url: { type: string }
description: { type: string }
language: { type: string }
site: { type: string }
image: { type: string }
capture:
type: object
additionalProperties: true
saved_at: { type: string, format: date-time }
documents:
type: array
items:
type: object
additionalProperties: true
required: [file]
properties:
file_id: { type: string }
file: { type: string, minLength: 1 }
role: { type: string }
revision: { type: string, pattern: "^sha256:[0-9a-f]{64}$" }
format: { type: string }
media_type: { type: string }
label: { type: string }
reading:
type: object
additionalProperties: true
properties:
status: { type: string }
progress: { type: number, minimum: 0, maximum: 1 }
tags:
type: array
items:
type: [string, number, boolean]
relations:
type: array
items:
type: object
additionalProperties: true
required: [relation, target]
properties:
relation: { type: string }
target: { type: string }
csl: { type: object }
match:
path_glob: sources/**/*.md
fields_present: [id, title, kind]
collection:
unique:
- field: id
scope: type
links:
documents[].file:
target_type: any
validate_exists: true
relations[].target:
target_type: reader-source
validate_exists: false
implements:
- contract: dev.mdbase.reader.source
version: 1.0.0-beta.2
fields:
id: id
title: title
kind: kind
authors: authors
published: published
url: url
original_url: original_url
description: description
language: language
site: site
image: image
capture: capture
saved_at: saved_at
documents: documents
reading: reading
tags: tags
relations: relations
csl: csl
---

# Reader source

The source body is the user's literature note. Reader never regenerates it
from annotations.
2 changes: 1 addition & 1 deletion apps/reader/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
},
"dependencies": {
"@citation-js/plugin-csl": "0.8.2",
"@mdbase-dev/ui": "0.1.0-beta.124",
"@mdbase-dev/ui": "0.1.0-beta.125",
"@mdbase-reader/connect": "workspace:*",
"@mdbase-reader/core": "workspace:*",
"@mdbase-reader/markdown-editor": "workspace:*",
Expand Down
Loading