coralite-plugin-aggregation 0.5.1 → 0.5.2
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/lib/index.d.ts +20 -0
- package/dist/lib/index.d.ts.map +1 -0
- package/dist/types/index.d.ts +66 -0
- package/dist/types/index.d.ts.map +1 -0
- package/package.json +3 -5
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
name: string;
|
|
3
|
+
method: import("coralite/types").CoralitePluginModule;
|
|
4
|
+
templates: {
|
|
5
|
+
content: string;
|
|
6
|
+
path: {
|
|
7
|
+
pathname: string;
|
|
8
|
+
dirname: string;
|
|
9
|
+
filename: string;
|
|
10
|
+
};
|
|
11
|
+
}[];
|
|
12
|
+
onPageSet: import("coralite/types").CoralitePluginPageSetCallback;
|
|
13
|
+
onPageUpdate: import("coralite/types").CoralitePluginPageUpdateCallback;
|
|
14
|
+
onPageDelete: import("coralite/types").CoralitePluginPageDeleteCallback;
|
|
15
|
+
onTemplateSet: import("coralite/types").CoralitePluginTemplateCallback;
|
|
16
|
+
onTemplateUpdate: import("coralite/types").CoralitePluginTemplateCallback;
|
|
17
|
+
onTemplateDelete: import("coralite/types").CoralitePluginTemplateCallback;
|
|
18
|
+
};
|
|
19
|
+
export default _default;
|
|
20
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../lib/index.js"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* - Templates used to display the result
|
|
3
|
+
*/
|
|
4
|
+
export type CoraliteAggregateTemplate = {
|
|
5
|
+
/**
|
|
6
|
+
* - Unique identifier for the component used for each document
|
|
7
|
+
*/
|
|
8
|
+
item: string;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Callback function for filtering aggregated content based on metadata.
|
|
12
|
+
*/
|
|
13
|
+
export type CoraliteAggregateFilter = (metadata: CoraliteToken) => any;
|
|
14
|
+
/**
|
|
15
|
+
* Callback function for sorting aggregated results based on metadata.
|
|
16
|
+
*/
|
|
17
|
+
export type CoraliteAggregateSort = (a: {
|
|
18
|
+
[x: string]: string | CoraliteToken[];
|
|
19
|
+
}, b: {
|
|
20
|
+
[x: string]: string | CoraliteToken[];
|
|
21
|
+
}) => any;
|
|
22
|
+
/**
|
|
23
|
+
* – Configuration object for the aggregation process
|
|
24
|
+
*/
|
|
25
|
+
export type CoraliteAggregate = {
|
|
26
|
+
/**
|
|
27
|
+
* - The path to aggregate, relative to pages directory
|
|
28
|
+
*/
|
|
29
|
+
path: string[];
|
|
30
|
+
/**
|
|
31
|
+
* - Templates used to display the result
|
|
32
|
+
*/
|
|
33
|
+
template: CoraliteAggregateTemplate | string;
|
|
34
|
+
pagination?: {
|
|
35
|
+
template: CoraliteAggregateTemplate | string;
|
|
36
|
+
segment?: string;
|
|
37
|
+
maxVisible: number;
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* - Callback to filter out unwanted elements from the aggregated content.
|
|
41
|
+
*/
|
|
42
|
+
filter?: CoraliteAggregateFilter;
|
|
43
|
+
/**
|
|
44
|
+
* - Whether to recursively search subdirectories
|
|
45
|
+
*/
|
|
46
|
+
recursive?: boolean;
|
|
47
|
+
/**
|
|
48
|
+
* - Token configuration options
|
|
49
|
+
*/
|
|
50
|
+
tokens?: CoraliteTokenOptions;
|
|
51
|
+
/**
|
|
52
|
+
* - Sort aggregated pages
|
|
53
|
+
*/
|
|
54
|
+
sort?: CoraliteAggregateSort;
|
|
55
|
+
/**
|
|
56
|
+
* - Specifies the maximum number of results to retrieve.
|
|
57
|
+
*/
|
|
58
|
+
limit?: number;
|
|
59
|
+
/**
|
|
60
|
+
* - Specifies the starting index for the results list.
|
|
61
|
+
*/
|
|
62
|
+
offset?: number;
|
|
63
|
+
};
|
|
64
|
+
import type { CoraliteToken } from 'coralite/types';
|
|
65
|
+
import type { CoraliteTokenOptions } from 'coralite/types';
|
|
66
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../types/index.js"],"names":[],"mappings":";;;;;;;UAOc,MAAM;;;;;iDAMT,aAAa;;;;;;;;;;;;;;;;UAaV,MAAM,EAAE;;;;cACR,yBAAyB,GAAG,MAAM;iBAE7C;QAA0D,QAAQ,EAAvD,yBAAyB,GAAG,MAAM;QACd,OAAO,GAA3B,MAAM;QACa,UAAU,EAA7B,MAAM;KACjB;;;;aAAW,uBAAuB;;;;gBACvB,OAAO;;;;aACP,oBAAoB;;;;WACpB,qBAAqB;;;;YACrB,MAAM;;;;aACN,MAAM;;mCApCqD,gBAAgB;0CAAhB,gBAAgB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "coralite-plugin-aggregation",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.2",
|
|
4
4
|
"description": "A Coralite plugin for dynamically collecting, filtering, sorting, and displaying content across multiple sources. Build database-free Coralite websites with automated content aggregation.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"keywords": [
|
|
@@ -31,11 +31,12 @@
|
|
|
31
31
|
},
|
|
32
32
|
"exports": {
|
|
33
33
|
".": {
|
|
34
|
-
"types": "./
|
|
34
|
+
"types": "./dist/lib/index.d.ts",
|
|
35
35
|
"default": "./lib/index.js"
|
|
36
36
|
}
|
|
37
37
|
},
|
|
38
38
|
"files": [
|
|
39
|
+
"dist",
|
|
39
40
|
"lib",
|
|
40
41
|
"types"
|
|
41
42
|
],
|
|
@@ -51,9 +52,6 @@
|
|
|
51
52
|
"dom-serializer": "^2.0.0",
|
|
52
53
|
"htmlparser2": "^10.0.0"
|
|
53
54
|
},
|
|
54
|
-
"peerDependencies": {
|
|
55
|
-
"coralite": "^0.18.2"
|
|
56
|
-
},
|
|
57
55
|
"scripts": {
|
|
58
56
|
"build": "coralite -t tests/fixtures/templates -p tests/fixtures/pages -o dist",
|
|
59
57
|
"test-e2e": "playwright test",
|