@elek-io/core 0.15.2 → 0.16.0
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/astro/index.astro.d.mts +60 -0
- package/dist/astro/index.astro.mjs +3864 -0
- package/dist/astro/index.astro.mjs.map +1 -0
- package/dist/browser/index.browser.d.ts +172 -61
- package/dist/browser/index.browser.js +1 -1
- package/dist/browser/index.browser.js.map +1 -1
- package/dist/cli/{index.cli.js → index.cli.mjs} +304 -184
- package/dist/node/chunk-DQk6qfdC.mjs +18 -0
- package/dist/node/{index.node.d.ts → index.node.d.mts} +161 -50
- package/dist/node/{index.node.js → index.node.mjs} +134 -134
- package/dist/node/index.node.mjs.map +1 -0
- package/package.json +44 -30
- package/dist/node/chunk-Bp6m_JJh.js +0 -13
- package/dist/node/index.node.js.map +0 -1
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { Loader } from "astro/loaders";
|
|
2
|
+
|
|
3
|
+
//#region src/index.astro.d.ts
|
|
4
|
+
interface ElekAssetsProps {
|
|
5
|
+
projectId: string;
|
|
6
|
+
outDir: string;
|
|
7
|
+
}
|
|
8
|
+
interface ElekEntriesOptions {
|
|
9
|
+
projectId: string;
|
|
10
|
+
collectionId: string;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Astro content loader for elek.io Assets.
|
|
14
|
+
*
|
|
15
|
+
* Reads and saves Assets from a Project and exposes them through
|
|
16
|
+
* Astro's content collection system.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```ts
|
|
20
|
+
* // src/content.config.ts
|
|
21
|
+
* import { defineCollection } from 'astro:content';
|
|
22
|
+
* import { elekAssets } from '@elek-io/core/astro';
|
|
23
|
+
*
|
|
24
|
+
* export const collections = {
|
|
25
|
+
* assets: defineCollection({
|
|
26
|
+
* loader: elekAssets({
|
|
27
|
+
* projectId: 'abc-123-...',
|
|
28
|
+
* outDir: './content/assets',
|
|
29
|
+
* }),
|
|
30
|
+
* });
|
|
31
|
+
* };
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
|
+
declare function elekAssets(props: ElekAssetsProps): Loader;
|
|
35
|
+
/**
|
|
36
|
+
* Astro content loader for elek.io Collection Entries.
|
|
37
|
+
*
|
|
38
|
+
* Reads all Entries from a Collection and exposes them through
|
|
39
|
+
* Astro's content collection system.
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* ```ts
|
|
43
|
+
* // src/content.config.ts
|
|
44
|
+
* import { defineCollection } from 'astro:content';
|
|
45
|
+
* import { elekEntries } from '@elek-io/core/astro';
|
|
46
|
+
*
|
|
47
|
+
* export const collections = {
|
|
48
|
+
* entries: defineCollection({
|
|
49
|
+
* loader: elekEntries({
|
|
50
|
+
* projectId: 'abc-123-...',
|
|
51
|
+
* collectionId: 'def-456-...',
|
|
52
|
+
* }),
|
|
53
|
+
* });
|
|
54
|
+
* };
|
|
55
|
+
* ```
|
|
56
|
+
*/
|
|
57
|
+
declare function elekEntries(props: ElekEntriesOptions): Loader;
|
|
58
|
+
//#endregion
|
|
59
|
+
export { elekAssets, elekEntries };
|
|
60
|
+
//# sourceMappingURL=index.astro.d.mts.map
|