@blinkk/root-cms 1.0.0-rc.0 → 1.0.0-rc.10
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/app.js +4 -3
- package/dist/cli.js +67 -34
- package/dist/client.js +346 -0
- package/dist/core/client.d.ts +196 -0
- package/dist/core/core.d.ts +56 -0
- package/dist/{project.d.ts → core/project.d.ts} +1 -1
- package/dist/core.js +415 -109
- package/dist/functions.js +29 -20
- package/dist/plugin.js +29 -20
- package/dist/project.js +4 -1
- package/dist/richtext/richtext.d.ts +65 -0
- package/dist/richtext.js +119 -0
- package/dist/{schema-49de9659.d.ts → schema-710fda8a.d.ts} +16 -1
- package/dist/ui/signin.css +44 -57
- package/dist/ui/signin.js +1318 -706
- package/dist/ui/ui.css +97 -44
- package/dist/ui/ui.js +23832 -10136
- package/package.json +41 -25
- package/dist/core.d.ts +0 -108
- /package/dist/{functions.d.ts → core/functions.d.ts} +0 -0
- /package/dist/{plugin.d.ts → core/plugin.d.ts} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blinkk/root-cms",
|
|
3
|
-
"version": "1.0.0-rc.
|
|
3
|
+
"version": "1.0.0-rc.10",
|
|
4
4
|
"author": "s@blinkk.com",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"engines": {
|
|
@@ -25,6 +25,10 @@
|
|
|
25
25
|
"types": "./dist/core.d.ts",
|
|
26
26
|
"import": "./dist/core.js"
|
|
27
27
|
},
|
|
28
|
+
"./client": {
|
|
29
|
+
"types": "./dist/client.d.ts",
|
|
30
|
+
"import": "./dist/client.js"
|
|
31
|
+
},
|
|
28
32
|
"./core": {
|
|
29
33
|
"types": "./dist/core.d.ts",
|
|
30
34
|
"import": "./dist/core.js"
|
|
@@ -40,59 +44,71 @@
|
|
|
40
44
|
"./project": {
|
|
41
45
|
"types": "./dist/project.d.ts",
|
|
42
46
|
"import": "./dist/project.js"
|
|
47
|
+
},
|
|
48
|
+
"./richtext": {
|
|
49
|
+
"types": "./dist/richtext.d.ts",
|
|
50
|
+
"import": "./dist/richtext.js"
|
|
43
51
|
}
|
|
44
52
|
},
|
|
45
53
|
"dependencies": {
|
|
46
|
-
"body-parser": "^1.20.
|
|
47
|
-
"commander": "^
|
|
48
|
-
"csv-parse": "^5.
|
|
49
|
-
"csv-stringify": "^6.
|
|
54
|
+
"body-parser": "^1.20.2",
|
|
55
|
+
"commander": "^11.0.0",
|
|
56
|
+
"csv-parse": "^5.5.2",
|
|
57
|
+
"csv-stringify": "^6.4.4",
|
|
50
58
|
"dts-dom": "^3.7.0",
|
|
51
59
|
"kleur": "^4.1.5",
|
|
52
|
-
"sirv": "^2.0.
|
|
60
|
+
"sirv": "^2.0.3",
|
|
53
61
|
"tiny-glob": "^0.2.9"
|
|
54
62
|
},
|
|
55
63
|
"//": "NOTE(stevenle): due to compat issues with mantine and preact, mantine is pinned to v4.2.12",
|
|
56
64
|
"devDependencies": {
|
|
57
65
|
"@babel/core": "^7.17.9",
|
|
66
|
+
"@editorjs/editorjs": "^2.28.2",
|
|
67
|
+
"@editorjs/header": "^2.8.1",
|
|
68
|
+
"@editorjs/image": "^2.9.0",
|
|
69
|
+
"@editorjs/list": "^1.9.0",
|
|
70
|
+
"@editorjs/nested-list": "^1.4.2",
|
|
71
|
+
"@editorjs/raw": "^2.5.0",
|
|
72
|
+
"@editorjs/table": "^2.3.0",
|
|
73
|
+
"@editorjs/underline": "^1.1.0",
|
|
58
74
|
"@emotion/react": "^11.10.5",
|
|
59
|
-
"@firebase/app-compat": "^0.
|
|
60
|
-
"@firebase/app-types": "^0.
|
|
61
|
-
"@firebase/rules-unit-testing": "^
|
|
75
|
+
"@firebase/app-compat": "^0.2.19",
|
|
76
|
+
"@firebase/app-types": "^0.9.0",
|
|
77
|
+
"@firebase/rules-unit-testing": "^3.0.1",
|
|
62
78
|
"@mantine/core": "4.2.12",
|
|
63
79
|
"@mantine/hooks": "4.2.12",
|
|
64
80
|
"@mantine/modals": "4.2.12",
|
|
65
81
|
"@mantine/notifications": "4.2.12",
|
|
66
82
|
"@mantine/spotlight": "4.2.12",
|
|
67
83
|
"@preact/compat": "^17.1.2",
|
|
68
|
-
"@tabler/icons-preact": "^2.
|
|
69
|
-
"@types/body-parser": "^1.19.
|
|
84
|
+
"@tabler/icons-preact": "^2.39.0",
|
|
85
|
+
"@types/body-parser": "^1.19.3",
|
|
70
86
|
"@types/jsonwebtoken": "^9.0.1",
|
|
71
|
-
"@types/marked": "^4.0.8",
|
|
72
87
|
"@types/node": "^18.11.8",
|
|
73
88
|
"concurrently": "^7.6.0",
|
|
74
89
|
"esbuild": "0.19.4",
|
|
75
|
-
"firebase": "^
|
|
76
|
-
"firebase-admin": "^11.
|
|
77
|
-
"firebase-functions": "^4.4.
|
|
78
|
-
"
|
|
90
|
+
"firebase": "^10.5.2",
|
|
91
|
+
"firebase-admin": "^11.11.0",
|
|
92
|
+
"firebase-functions": "^4.4.1",
|
|
93
|
+
"firebase-tools": "^12.9.1",
|
|
94
|
+
"marked": "^9.1.1",
|
|
79
95
|
"preact": "*",
|
|
80
|
-
"preact-render-to-string": "^
|
|
81
|
-
"preact-router": "^4.1.
|
|
96
|
+
"preact-render-to-string": "^6.2.2",
|
|
97
|
+
"preact-router": "^4.1.2",
|
|
82
98
|
"react": "npm:@preact/compat@^17.1.2",
|
|
83
99
|
"react-dom": "npm:@preact/compat@^17.1.2",
|
|
84
100
|
"tsup": "^7.2.0",
|
|
85
|
-
"typescript": "
|
|
86
|
-
"vite": "4.
|
|
87
|
-
"vitest": "^0.
|
|
88
|
-
"@blinkk/root": "1.0.0-rc.
|
|
101
|
+
"typescript": "5.2.2",
|
|
102
|
+
"vite": "4.4.11",
|
|
103
|
+
"vitest": "^0.34.6",
|
|
104
|
+
"@blinkk/root": "1.0.0-rc.10"
|
|
89
105
|
},
|
|
90
106
|
"peerDependencies": {
|
|
91
|
-
"@blinkk/root": "1.0.0-rc.
|
|
107
|
+
"@blinkk/root": "1.0.0-rc.10",
|
|
92
108
|
"firebase-admin": ">=11",
|
|
93
109
|
"firebase-functions": ">=4",
|
|
94
|
-
"preact": "10
|
|
95
|
-
"preact-render-to-string": "5
|
|
110
|
+
"preact": ">=10",
|
|
111
|
+
"preact-render-to-string": ">=5"
|
|
96
112
|
},
|
|
97
113
|
"peerDependenciesMeta": {
|
|
98
114
|
"firebase-functions": {
|
package/dist/core.d.ts
DELETED
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
export { s as schema } from './schema-49de9659.js';
|
|
2
|
-
import { RootConfig } from '@blinkk/root';
|
|
3
|
-
import { Query } from 'firebase-admin/firestore';
|
|
4
|
-
import { CMSPlugin } from './plugin.js';
|
|
5
|
-
import 'preact';
|
|
6
|
-
import 'firebase-admin/app';
|
|
7
|
-
import 'firebase-admin/auth';
|
|
8
|
-
|
|
9
|
-
interface GetDocOptions {
|
|
10
|
-
mode: 'draft' | 'published';
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Retrieves a doc from Root.js CMS.
|
|
14
|
-
*/
|
|
15
|
-
declare function getDoc<T>(rootConfig: RootConfig, collectionId: string, slug: string, options: GetDocOptions): Promise<T | null>;
|
|
16
|
-
interface ListDocsOptions {
|
|
17
|
-
mode: 'draft' | 'published';
|
|
18
|
-
offset?: number;
|
|
19
|
-
limit?: number;
|
|
20
|
-
orderBy?: string;
|
|
21
|
-
orderByDirection?: 'asc' | 'desc';
|
|
22
|
-
query?: (query: Query) => Query;
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Lists docs from a Root.js CMS collection.
|
|
26
|
-
*/
|
|
27
|
-
declare function listDocs<T>(rootConfig: RootConfig, collectionId: string, options: ListDocsOptions): Promise<{
|
|
28
|
-
docs: T[];
|
|
29
|
-
}>;
|
|
30
|
-
interface NumDocsOptions {
|
|
31
|
-
mode: 'draft' | 'published';
|
|
32
|
-
query?: (query: Query) => Query;
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* Returns the number of docs in a Root.js CMS collection.
|
|
36
|
-
*/
|
|
37
|
-
declare function numDocs(rootConfig: RootConfig, collectionId: string, options: NumDocsOptions): Promise<number>;
|
|
38
|
-
/**
|
|
39
|
-
* Publishes scheduled docs.
|
|
40
|
-
*/
|
|
41
|
-
declare function publishScheduledDocs(rootConfig: RootConfig): Promise<any[]>;
|
|
42
|
-
/**
|
|
43
|
-
* Walks the data tree and converts any Timestamp objects to millis and any
|
|
44
|
-
* _array maps to normal arrays.
|
|
45
|
-
*
|
|
46
|
-
* E.g.:
|
|
47
|
-
*
|
|
48
|
-
* normalizeData({
|
|
49
|
-
* sys: {modifiedAt: Timestamp(123)},
|
|
50
|
-
* fields: {
|
|
51
|
-
* _array: ['asdf'],
|
|
52
|
-
* asdf: {title: 'hello'}
|
|
53
|
-
* }
|
|
54
|
-
* })
|
|
55
|
-
* // => {sys: {modifiedAt: 123}, fields: {foo: [{title: 'hello'}]}}
|
|
56
|
-
*/
|
|
57
|
-
declare function normalizeData(data: any): any;
|
|
58
|
-
declare function getCmsPlugin(rootConfig: RootConfig): CMSPlugin;
|
|
59
|
-
interface Translation {
|
|
60
|
-
[locale: string]: string;
|
|
61
|
-
source: string;
|
|
62
|
-
}
|
|
63
|
-
interface TranslationsMap {
|
|
64
|
-
[hash: string]: Translation;
|
|
65
|
-
}
|
|
66
|
-
interface LocaleTranslations {
|
|
67
|
-
[source: string]: string;
|
|
68
|
-
}
|
|
69
|
-
interface LoadTranslationsOptions {
|
|
70
|
-
tags?: string[];
|
|
71
|
-
}
|
|
72
|
-
/**
|
|
73
|
-
* Loads translations saved in the trasnlations collection, optionally filtered
|
|
74
|
-
* by tag.
|
|
75
|
-
*
|
|
76
|
-
* Returns a map like:
|
|
77
|
-
* ```
|
|
78
|
-
* {
|
|
79
|
-
* "<hash>": {"source": "Hello", "es": "Hola", "fr": "Bonjour"},
|
|
80
|
-
* }
|
|
81
|
-
* ```
|
|
82
|
-
*/
|
|
83
|
-
declare function loadTranslations(rootConfig: RootConfig, options?: LoadTranslationsOptions): Promise<TranslationsMap>;
|
|
84
|
-
/**
|
|
85
|
-
* Loads translations for a particular locale.
|
|
86
|
-
*
|
|
87
|
-
* Returns a map like:
|
|
88
|
-
* ```
|
|
89
|
-
* {
|
|
90
|
-
* "Hello": "Bonjour",
|
|
91
|
-
* }
|
|
92
|
-
* ```
|
|
93
|
-
*/
|
|
94
|
-
declare function loadTranslationsForLocale(rootConfig: RootConfig, locale: string, options?: LoadTranslationsOptions): Promise<LocaleTranslations>;
|
|
95
|
-
/**
|
|
96
|
-
* Converts a translations map from `loadTranslations()` to a map of source to
|
|
97
|
-
* translated string for a particular locale.
|
|
98
|
-
*
|
|
99
|
-
* Returns a map like:
|
|
100
|
-
* ```
|
|
101
|
-
* {
|
|
102
|
-
* "Hello": "Bonjour",
|
|
103
|
-
* }
|
|
104
|
-
* ```
|
|
105
|
-
*/
|
|
106
|
-
declare function translationsForLocale(translationsMap: TranslationsMap, locale: string): LocaleTranslations;
|
|
107
|
-
|
|
108
|
-
export { GetDocOptions, ListDocsOptions, LoadTranslationsOptions, LocaleTranslations, NumDocsOptions, Translation, TranslationsMap, getCmsPlugin, getDoc, listDocs, loadTranslations, loadTranslationsForLocale, normalizeData, numDocs, publishScheduledDocs, translationsForLocale };
|
|
File without changes
|
|
File without changes
|