@acdh-oeaw/keystatic-lib 0.5.0 → 0.5.1
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/chunk-H5A2VGUF.js +15 -0
- package/dist/chunk-H5A2VGUF.js.map +1 -0
- package/dist/{chunk-5ZKY25OZ.js → chunk-PU3H6JFY.js} +5 -5
- package/dist/chunk-PU3H6JFY.js.map +1 -0
- package/dist/create-asset-options.d.ts +7 -3
- package/dist/create-asset-options.js +1 -1
- package/dist/create-content-field-options.d.ts +7 -3
- package/dist/create-content-field-options.js +2 -2
- package/dist/index.js +2 -2
- package/package.json +1 -1
- package/dist/chunk-5ZKY25OZ.js.map +0 -1
- package/dist/chunk-EAFZLNV4.js +0 -15
- package/dist/chunk-EAFZLNV4.js.map +0 -1
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { createAssetOptions } from './chunk-PU3H6JFY.js';
|
|
2
|
+
|
|
3
|
+
// src/create-content-field-options.ts
|
|
4
|
+
function createContentFieldOptions(paths) {
|
|
5
|
+
const assetPaths = createAssetOptions(paths);
|
|
6
|
+
const headingLevels = [2, 3, 4, 5];
|
|
7
|
+
return {
|
|
8
|
+
heading: headingLevels,
|
|
9
|
+
image: assetPaths
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export { createContentFieldOptions };
|
|
14
|
+
//# sourceMappingURL=chunk-H5A2VGUF.js.map
|
|
15
|
+
//# sourceMappingURL=chunk-H5A2VGUF.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/create-content-field-options.ts"],"names":[],"mappings":";;;AAGO,SAAS,0BAAuD,KAAqB,EAAA;AAC3F,EAAM,MAAA,UAAA,GAAa,mBAAmB,KAAK,CAAA;AAC3C,EAAA,MAAM,aAAgB,GAAA,CAAC,CAAG,EAAA,CAAA,EAAG,GAAG,CAAC,CAAA;AAEjC,EAAO,OAAA;AAAA,IACN,OAAS,EAAA,aAAA;AAAA,IACT,KAAO,EAAA;AAAA,GACR;AACD","file":"chunk-H5A2VGUF.js","sourcesContent":["import { createAssetOptions } from \"./create-asset-options\";\nimport type { Paths } from \"./resources\";\n\nexport function createContentFieldOptions<TPath extends `/${string}/`>(paths: Paths<TPath>) {\n\tconst assetPaths = createAssetOptions(paths);\n\tconst headingLevels = [2, 3, 4, 5] as const;\n\n\treturn {\n\t\theading: headingLevels,\n\t\timage: assetPaths,\n\t};\n}\n"]}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import slugify from '@sindresorhus/slugify';
|
|
2
2
|
|
|
3
3
|
// src/create-asset-options.ts
|
|
4
|
-
function createAssetOptions(
|
|
4
|
+
function createAssetOptions(paths) {
|
|
5
5
|
return {
|
|
6
|
-
directory: `./public/assets${
|
|
7
|
-
publicPath: `/assets${
|
|
6
|
+
directory: `./public/assets${paths.assetPath}`,
|
|
7
|
+
publicPath: `/assets${paths.assetPath}`,
|
|
8
8
|
transformFilename(originalFilename) {
|
|
9
9
|
return slugify(originalFilename, { preserveCharacters: ["."] });
|
|
10
10
|
}
|
|
@@ -12,5 +12,5 @@ function createAssetOptions(path) {
|
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
export { createAssetOptions };
|
|
15
|
-
//# sourceMappingURL=chunk-
|
|
16
|
-
//# sourceMappingURL=chunk-
|
|
15
|
+
//# sourceMappingURL=chunk-PU3H6JFY.js.map
|
|
16
|
+
//# sourceMappingURL=chunk-PU3H6JFY.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/create-asset-options.ts"],"names":[],"mappings":";;;AAIO,SAAS,mBAAgD,KAAqB,EAAA;AACpF,EAAO,OAAA;AAAA,IACN,SAAA,EAAW,CAAkB,eAAA,EAAA,KAAA,CAAM,SAAS,CAAA,CAAA;AAAA,IAC5C,UAAA,EAAY,CAAU,OAAA,EAAA,KAAA,CAAM,SAAS,CAAA,CAAA;AAAA,IACrC,kBAAkB,gBAA0B,EAAA;AAC3C,MAAA,OAAO,QAAQ,gBAAkB,EAAA,EAAE,oBAAoB,CAAC,GAAG,GAAG,CAAA;AAAA;AAC/D,GACD;AACD","file":"chunk-PU3H6JFY.js","sourcesContent":["import slugify from \"@sindresorhus/slugify\";\n\nimport type { Paths } from \"./resources\";\n\nexport function createAssetOptions<TPath extends `/${string}/`>(paths: Paths<TPath>) {\n\treturn {\n\t\tdirectory: `./public/assets${paths.assetPath}` as const,\n\t\tpublicPath: `/assets${paths.assetPath}` as const,\n\t\ttransformFilename(originalFilename: string) {\n\t\t\treturn slugify(originalFilename, { preserveCharacters: [\".\"] });\n\t\t},\n\t};\n}\n"]}
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { Paths } from './resources.js';
|
|
2
|
+
import '@keystatic/core';
|
|
3
|
+
import './config.js';
|
|
4
|
+
|
|
5
|
+
declare function createAssetOptions<TPath extends `/${string}/`>(paths: Paths<TPath>): {
|
|
6
|
+
directory: `./public/assets/content/assets/${string}${TPath}`;
|
|
7
|
+
publicPath: `/assets/content/assets/${string}${TPath}`;
|
|
4
8
|
transformFilename(originalFilename: string): string;
|
|
5
9
|
};
|
|
6
10
|
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
import { Paths } from './resources.js';
|
|
2
|
+
import '@keystatic/core';
|
|
3
|
+
import './config.js';
|
|
4
|
+
|
|
5
|
+
declare function createContentFieldOptions<TPath extends `/${string}/`>(paths: Paths<TPath>): {
|
|
2
6
|
heading: readonly [2, 3, 4, 5];
|
|
3
7
|
image: {
|
|
4
|
-
directory: `./public/assets${TPath}`;
|
|
5
|
-
publicPath: `/assets${TPath}`;
|
|
8
|
+
directory: `./public/assets/content/assets/${string}${TPath}`;
|
|
9
|
+
publicPath: `/assets/content/assets/${string}${TPath}`;
|
|
6
10
|
transformFilename(originalFilename: string): string;
|
|
7
11
|
};
|
|
8
12
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { createContentFieldOptions } from './chunk-
|
|
2
|
-
import './chunk-
|
|
1
|
+
export { createContentFieldOptions } from './chunk-H5A2VGUF.js';
|
|
2
|
+
import './chunk-PU3H6JFY.js';
|
|
3
3
|
//# sourceMappingURL=create-content-field-options.js.map
|
|
4
4
|
//# sourceMappingURL=create-content-field-options.js.map
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { createComponent } from './chunk-ZWZCXCMD.js';
|
|
2
|
-
export { createContentFieldOptions } from './chunk-
|
|
3
|
-
export { createAssetOptions } from './chunk-
|
|
2
|
+
export { createContentFieldOptions } from './chunk-H5A2VGUF.js';
|
|
3
|
+
export { createAssetOptions } from './chunk-PU3H6JFY.js';
|
|
4
4
|
export { createLabel } from './chunk-CI4JBTGG.js';
|
|
5
5
|
export { withI18nPrefix } from './chunk-M7J4ISS4.js';
|
|
6
6
|
export { createCollection, createCollectionPaths, createSingleton, createSingletonPaths } from './chunk-FK3EHKPW.js';
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/create-asset-options.ts"],"names":[],"mappings":";;;AAEO,SAAS,mBAAgD,IAAa,EAAA;AAC5E,EAAO,OAAA;AAAA,IACN,SAAA,EAAW,kBAAkB,IAAI,CAAA,CAAA;AAAA,IACjC,UAAA,EAAY,UAAU,IAAI,CAAA,CAAA;AAAA,IAC1B,kBAAkB,gBAA0B,EAAA;AAC3C,MAAA,OAAO,QAAQ,gBAAkB,EAAA,EAAE,oBAAoB,CAAC,GAAG,GAAG,CAAA;AAAA;AAC/D,GACD;AACD","file":"chunk-5ZKY25OZ.js","sourcesContent":["import slugify from \"@sindresorhus/slugify\";\n\nexport function createAssetOptions<TPath extends `/${string}/`>(path: TPath) {\n\treturn {\n\t\tdirectory: `./public/assets${path}` as const,\n\t\tpublicPath: `/assets${path}` as const,\n\t\ttransformFilename(originalFilename: string) {\n\t\t\treturn slugify(originalFilename, { preserveCharacters: [\".\"] });\n\t\t},\n\t};\n}\n"]}
|
package/dist/chunk-EAFZLNV4.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { createAssetOptions } from './chunk-5ZKY25OZ.js';
|
|
2
|
-
|
|
3
|
-
// src/create-content-field-options.ts
|
|
4
|
-
function createContentFieldOptions(assetPath) {
|
|
5
|
-
const assetPaths = createAssetOptions(assetPath);
|
|
6
|
-
const headingLevels = [2, 3, 4, 5];
|
|
7
|
-
return {
|
|
8
|
-
heading: headingLevels,
|
|
9
|
-
image: assetPaths
|
|
10
|
-
};
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export { createContentFieldOptions };
|
|
14
|
-
//# sourceMappingURL=chunk-EAFZLNV4.js.map
|
|
15
|
-
//# sourceMappingURL=chunk-EAFZLNV4.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/create-content-field-options.ts"],"names":[],"mappings":";;;AAEO,SAAS,0BAAuD,SAAkB,EAAA;AACxF,EAAM,MAAA,UAAA,GAAa,mBAAmB,SAAS,CAAA;AAC/C,EAAA,MAAM,aAAgB,GAAA,CAAC,CAAG,EAAA,CAAA,EAAG,GAAG,CAAC,CAAA;AAEjC,EAAO,OAAA;AAAA,IACN,OAAS,EAAA,aAAA;AAAA,IACT,KAAO,EAAA;AAAA,GACR;AACD","file":"chunk-EAFZLNV4.js","sourcesContent":["import { createAssetOptions } from \"./create-asset-options\";\n\nexport function createContentFieldOptions<TPath extends `/${string}/`>(assetPath: TPath) {\n\tconst assetPaths = createAssetOptions(assetPath);\n\tconst headingLevels = [2, 3, 4, 5] as const;\n\n\treturn {\n\t\theading: headingLevels,\n\t\timage: assetPaths,\n\t};\n}\n"]}
|