@dosgato/templating 1.0.2 → 1.0.4

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.
package/dist/index.d.ts CHANGED
@@ -1,7 +1,6 @@
1
1
  export * from './apitemplate.js';
2
2
  export * from './component.js';
3
3
  export * from './links.js';
4
- export * from './names.js';
5
4
  export * from './provider.js';
6
5
  export * from './render.js';
7
6
  export * from './stopwords.js';
package/dist/index.js CHANGED
@@ -1,7 +1,6 @@
1
1
  export * from './apitemplate.js';
2
2
  export * from './component.js';
3
3
  export * from './links.js';
4
- export * from './names.js';
5
4
  export * from './provider.js';
6
5
  export * from './render.js';
7
6
  export * from './stopwords.js';
package/dist/render.d.ts CHANGED
@@ -60,6 +60,7 @@ export interface PageForNavigation {
60
60
  href: string;
61
61
  publishedAt?: Date;
62
62
  extra: Record<string, any>;
63
+ tags: string[];
63
64
  children: this[];
64
65
  }
65
66
  export interface APIClient {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dosgato/templating",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "description": "A library to support building templates for dosgato CMS.",
5
5
  "type": "module",
6
6
  "exports": {
@@ -14,11 +14,9 @@
14
14
  "build": "rm -rf dist && tsc"
15
15
  },
16
16
  "dependencies": {
17
- "mime-types": "^2.1.35",
18
17
  "txstate-utils": "^1.8.8"
19
18
  },
20
19
  "devDependencies": {
21
- "@types/mime-types": "^2.1.1",
22
20
  "@types/node": "^18.7.11",
23
21
  "eslint-config-standard-with-typescript": "^34.0.0",
24
22
  "typescript": "^5.0.4"
package/dist/names.d.ts DELETED
@@ -1,4 +0,0 @@
1
- export declare function makeSafeFilename(str: string): string;
2
- export declare function makeFilenamePathSafe(path: string): string;
3
- export declare function makePathSafe(path: string): string;
4
- export declare function makeSafe(str: string): string;
package/dist/names.js DELETED
@@ -1,17 +0,0 @@
1
- import { lookup } from 'mime-types';
2
- export function makeSafeFilename(str) {
3
- const extFromFileName = str.match(/\.(\w+)$/)?.[1];
4
- if (extFromFileName && lookup(extFromFileName))
5
- str = str.replace(/\.(\w+)$/, '');
6
- return str.normalize('NFKD').replace(/[^. _a-z0-9-]/ig, '').replace(/\s+/g, ' ').trim();
7
- }
8
- export function makeFilenamePathSafe(path) {
9
- const parts = path.split('/');
10
- return [...parts.slice(0, -1).map(makeSafe), makeSafeFilename(parts[parts.length - 1])].join('/');
11
- }
12
- export function makePathSafe(path) {
13
- return path.split('/').map(makeSafe).join('/');
14
- }
15
- export function makeSafe(str) {
16
- return str.normalize('NFKD').toLocaleLowerCase().replace(/[^a-z0-9-]/g, '-').replace(/-+/g, '-').replace(/^-/, '').replace(/-$/, '');
17
- }