myst-templates
Advanced tools
Comparing version 0.0.2 to 0.0.3
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.TemplateKind = void 0; | ||
exports.TemplateOptionTypes = exports.TemplateKind = void 0; | ||
var TemplateKind; | ||
(function (TemplateKind) { | ||
TemplateKind["tex"] = "tex"; | ||
TemplateKind["docx"] = "docx"; | ||
})(TemplateKind = exports.TemplateKind || (exports.TemplateKind = {})); | ||
var TemplateOptionTypes; | ||
(function (TemplateOptionTypes) { | ||
TemplateOptionTypes["boolean"] = "boolean"; | ||
TemplateOptionTypes["string"] = "string"; | ||
TemplateOptionTypes["choice"] = "choice"; | ||
})(TemplateOptionTypes = exports.TemplateOptionTypes || (exports.TemplateOptionTypes = {})); | ||
//# sourceMappingURL=index.js.map |
export var TemplateKind; | ||
(function (TemplateKind) { | ||
TemplateKind["tex"] = "tex"; | ||
TemplateKind["docx"] = "docx"; | ||
})(TemplateKind || (TemplateKind = {})); | ||
export var TemplateOptionTypes; | ||
(function (TemplateOptionTypes) { | ||
TemplateOptionTypes["boolean"] = "boolean"; | ||
TemplateOptionTypes["string"] = "string"; | ||
TemplateOptionTypes["choice"] = "choice"; | ||
})(TemplateOptionTypes || (TemplateOptionTypes = {})); | ||
//# sourceMappingURL=index.js.map |
@@ -1,20 +0,93 @@ | ||
import type { Author, License } from 'myst-frontmatter'; | ||
import type { Author, Licenses } from 'myst-frontmatter'; | ||
export declare enum TemplateKind { | ||
tex = "tex" | ||
tex = "tex", | ||
docx = "docx" | ||
} | ||
export declare type TemplateDTO = { | ||
export declare type TemplatePartDefinition = { | ||
id: string; | ||
kind: TemplateKind; | ||
title: string; | ||
description: string; | ||
authors: Author[]; | ||
license?: License; | ||
tags: string[]; | ||
version: string; | ||
title?: string; | ||
description?: string; | ||
required?: boolean; | ||
plain?: boolean; | ||
max_chars?: number; | ||
max_words?: number; | ||
condition?: { | ||
id: string; | ||
value?: any; | ||
}; | ||
}; | ||
export declare enum TemplateOptionTypes { | ||
boolean = "boolean", | ||
string = "string", | ||
choice = "choice" | ||
} | ||
export declare type TemplateDocDefinition = { | ||
id: string; | ||
title?: string; | ||
description?: string; | ||
required?: boolean; | ||
condition?: { | ||
id: string; | ||
value?: any; | ||
}; | ||
}; | ||
export declare type TemplateOptionDefinition = TemplateDocDefinition & { | ||
type: TemplateOptionTypes; | ||
default?: any; | ||
choices?: string[]; | ||
max_chars?: number; | ||
}; | ||
export declare type TemplateStyles = { | ||
citation?: 'numerical-only'; | ||
bibliography?: 'natbib' | 'biblatex'; | ||
}; | ||
declare type TemplateYmlListPartial = { | ||
title?: string; | ||
description?: string; | ||
version?: string; | ||
authors?: Author[]; | ||
license?: Licenses; | ||
tags?: string[]; | ||
}; | ||
declare type TemplateYmlPartial = { | ||
jtex: 'v1'; | ||
github?: string; | ||
build?: { | ||
engine?: string; | ||
}; | ||
style?: TemplateStyles; | ||
parts?: TemplatePartDefinition[]; | ||
doc?: TemplateDocDefinition[]; | ||
options?: TemplateOptionDefinition[]; | ||
packages?: string[]; | ||
files?: string[]; | ||
}; | ||
declare type TemplateYmlIdLinks = { | ||
id: string; | ||
links: { | ||
self: string; | ||
source: string; | ||
download: string; | ||
thumbnail: string; | ||
download: string; | ||
source?: string; | ||
}; | ||
}; | ||
/** | ||
* Type template.yml files are directly validated against | ||
*/ | ||
export declare type TemplateYml = TemplateYmlPartial & TemplateYmlListPartial & { | ||
source?: string; | ||
thumbnail?: string; | ||
}; | ||
/** | ||
* Type for /template/tex API list response | ||
*/ | ||
export declare type TemplateYmlListResponse = { | ||
items: (TemplateYmlListPartial & TemplateYmlIdLinks & { | ||
kind: TemplateKind; | ||
})[]; | ||
}; | ||
/** | ||
* Type for /template/tex/org/name API response | ||
*/ | ||
export declare type TemplateYmlResponse = TemplateYmlPartial & TemplateYmlListPartial & TemplateYmlIdLinks; | ||
export {}; |
{ | ||
"name": "myst-templates", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"description": "API types and scripts for downloading MyST Tempaltes", | ||
"author": "Rowan Cockett <rowan@curvenote.com>", | ||
"homepage": "https://github.com/myst-templates", | ||
"homepage": "https://github.com/executablebooks/mystjs/tree/main/packages/myst-templates", | ||
"license": "MIT", | ||
@@ -31,3 +31,3 @@ "main": "dist/cjs/index.js", | ||
"type": "git", | ||
"url": "git+https://github.com/myst-templates/templates.git" | ||
"url": "git+https://github.com/executablebooks/mystjs.git" | ||
}, | ||
@@ -48,3 +48,3 @@ "scripts": { | ||
"dependencies": { | ||
"myst-frontmatter": "^0.0.2" | ||
"myst-frontmatter": "^0.0.3" | ||
}, | ||
@@ -51,0 +51,0 @@ "devDependencies": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5629
118
+ Addedmyst-frontmatter@0.0.3(transitive)
+ Addedsimple-validators@0.0.2(transitive)
- Removedmyst-frontmatter@0.0.2(transitive)
- Removedsimple-validators@0.0.1(transitive)
Updatedmyst-frontmatter@^0.0.3