@blinkk/root-cms 2.4.4 → 2.4.6
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 +8 -2
- package/dist/cli.js +630 -40
- package/dist/{client-DYO2WWlf.d.ts → client-DrJWXKxt.d.ts} +3 -1
- package/dist/client.d.ts +1 -1
- package/dist/core.d.ts +3 -3
- package/dist/core.js +18 -1
- package/dist/plugin.d.ts +1 -1
- package/dist/plugin.js +10 -4
- package/dist/project.d.ts +1 -1
- package/dist/{schema-BxPmMeRc.d.ts → schema-Bux4PrV2.d.ts} +5 -0
- package/dist/ui/ui.css +1 -1
- package/dist/ui/ui.js +152 -152
- package/package.json +9 -3
|
@@ -165,7 +165,9 @@ type CMSPlugin = Plugin & {
|
|
|
165
165
|
name: 'root-cms';
|
|
166
166
|
getConfig: () => CMSPluginOptions;
|
|
167
167
|
getFirebaseApp: () => App;
|
|
168
|
-
getFirestore: (
|
|
168
|
+
getFirestore: (options?: {
|
|
169
|
+
databaseId?: string;
|
|
170
|
+
}) => Firestore;
|
|
169
171
|
};
|
|
170
172
|
declare function cmsPlugin(options: CMSPluginOptions): CMSPlugin;
|
|
171
173
|
|
package/dist/client.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import '@blinkk/root';
|
|
2
2
|
import 'firebase-admin/app';
|
|
3
3
|
import 'firebase-admin/firestore';
|
|
4
|
-
export { A as Action, p as ArrayObject, z as BatchRequest, B as BatchRequestOptions, w as BatchRequestQuery, x as BatchRequestQueryOptions, C as BatchResponse, c as DataSource, d as DataSourceData, e as DataSourceMode, b as Doc, D as DocMode, h as GetCountOptions, G as GetDocOptions, H as HttpMethod, k as ListActionsOptions, g as ListDocsOptions, L as LoadTranslationsOptions, a as LocaleTranslations, j as Release, R as RootCMSClient, f as SaveDraftOptions, S as SetDocOptions, i as Translation, y as TranslationsDoc, T as TranslationsMap, U as UserRole, m as getCmsPlugin, l as isRichTextData, q as marshalArray, n as marshalData, o as normalizeData, v as parseDocId, t as toArrayObject, s as translationsForLocale, r as unmarshalArray, u as unmarshalData } from './client-
|
|
4
|
+
export { A as Action, p as ArrayObject, z as BatchRequest, B as BatchRequestOptions, w as BatchRequestQuery, x as BatchRequestQueryOptions, C as BatchResponse, c as DataSource, d as DataSourceData, e as DataSourceMode, b as Doc, D as DocMode, h as GetCountOptions, G as GetDocOptions, H as HttpMethod, k as ListActionsOptions, g as ListDocsOptions, L as LoadTranslationsOptions, a as LocaleTranslations, j as Release, R as RootCMSClient, f as SaveDraftOptions, S as SetDocOptions, i as Translation, y as TranslationsDoc, T as TranslationsMap, U as UserRole, m as getCmsPlugin, l as isRichTextData, q as marshalArray, n as marshalData, o as normalizeData, v as parseDocId, t as toArrayObject, s as translationsForLocale, r as unmarshalArray, u as unmarshalData } from './client-DrJWXKxt.js';
|
package/dist/core.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { R as RootCMSClient, D as DocMode, L as LoadTranslationsOptions, T as TranslationsMap, a as LocaleTranslations } from './client-
|
|
2
|
-
export { A as Action, p as ArrayObject, z as BatchRequest, B as BatchRequestOptions, w as BatchRequestQuery, x as BatchRequestQueryOptions, C as BatchResponse, c as DataSource, d as DataSourceData, e as DataSourceMode, b as Doc, h as GetCountOptions, G as GetDocOptions, H as HttpMethod, k as ListActionsOptions, g as ListDocsOptions, E as Locale, N as MultiLocaleTranslationsMap, j as Release, f as SaveDraftOptions, S as SetDocOptions, O as SingleLocaleTranslationsMap, F as SourceString, I as TranslatedString, i as Translation, y as TranslationsDoc, J as TranslationsDocMode, M as TranslationsLocaleDocEntry, K as TranslationsLocaleDocHashMap, P as TranslationsManager, U as UserRole, Q as buildTranslationsDbPath, V as buildTranslationsLocaleDocDbPath, m as getCmsPlugin, l as isRichTextData, q as marshalArray, n as marshalData, o as normalizeData, v as parseDocId, t as toArrayObject, s as translationsForLocale, r as unmarshalArray, u as unmarshalData } from './client-
|
|
1
|
+
import { R as RootCMSClient, D as DocMode, L as LoadTranslationsOptions, T as TranslationsMap, a as LocaleTranslations } from './client-DrJWXKxt.js';
|
|
2
|
+
export { A as Action, p as ArrayObject, z as BatchRequest, B as BatchRequestOptions, w as BatchRequestQuery, x as BatchRequestQueryOptions, C as BatchResponse, c as DataSource, d as DataSourceData, e as DataSourceMode, b as Doc, h as GetCountOptions, G as GetDocOptions, H as HttpMethod, k as ListActionsOptions, g as ListDocsOptions, E as Locale, N as MultiLocaleTranslationsMap, j as Release, f as SaveDraftOptions, S as SetDocOptions, O as SingleLocaleTranslationsMap, F as SourceString, I as TranslatedString, i as Translation, y as TranslationsDoc, J as TranslationsDocMode, M as TranslationsLocaleDocEntry, K as TranslationsLocaleDocHashMap, P as TranslationsManager, U as UserRole, Q as buildTranslationsDbPath, V as buildTranslationsLocaleDocDbPath, m as getCmsPlugin, l as isRichTextData, q as marshalArray, n as marshalData, o as normalizeData, v as parseDocId, t as toArrayObject, s as translationsForLocale, r as unmarshalArray, u as unmarshalData } from './client-DrJWXKxt.js';
|
|
3
3
|
import { Request, RootConfig, Response, RouteParams, GetStaticProps, GetStaticPaths } from '@blinkk/root';
|
|
4
4
|
import { Query } from 'firebase-admin/firestore';
|
|
5
|
-
export { s as schema } from './schema-
|
|
5
|
+
export { s as schema } from './schema-Bux4PrV2.js';
|
|
6
6
|
import 'firebase-admin/app';
|
|
7
7
|
|
|
8
8
|
/**
|
package/dist/core.js
CHANGED
|
@@ -1996,11 +1996,28 @@ function string(field) {
|
|
|
1996
1996
|
function number(field) {
|
|
1997
1997
|
return { type: "number", ...field };
|
|
1998
1998
|
}
|
|
1999
|
+
function validateTimezone(timezone) {
|
|
2000
|
+
if (!timezone) {
|
|
2001
|
+
return void 0;
|
|
2002
|
+
}
|
|
2003
|
+
if (timezone === "UTC") {
|
|
2004
|
+
return timezone;
|
|
2005
|
+
}
|
|
2006
|
+
const timezones = Intl.supportedValuesOf("timeZone");
|
|
2007
|
+
if (!timezones.includes(timezone)) {
|
|
2008
|
+
console.warn(
|
|
2009
|
+
`Invalid timezone: "${timezone}". Must be a valid IANA timezone identifier (e.g. "America/Los_Angeles").`
|
|
2010
|
+
);
|
|
2011
|
+
return void 0;
|
|
2012
|
+
}
|
|
2013
|
+
return timezone;
|
|
2014
|
+
}
|
|
1999
2015
|
function date(field) {
|
|
2000
2016
|
return { type: "date", ...field };
|
|
2001
2017
|
}
|
|
2002
2018
|
function datetime(field) {
|
|
2003
|
-
|
|
2019
|
+
const timezone = validateTimezone(field.timezone);
|
|
2020
|
+
return { type: "datetime", ...field, timezone };
|
|
2004
2021
|
}
|
|
2005
2022
|
function boolean(field) {
|
|
2006
2023
|
return { type: "boolean", ...field };
|
package/dist/plugin.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import '@blinkk/root';
|
|
2
2
|
import 'firebase-admin/app';
|
|
3
3
|
import 'firebase-admin/firestore';
|
|
4
|
-
export { Y as CMSAIConfig, W as CMSBuiltInSidebarTool, $ as CMSPlugin, _ as CMSPluginOptions, Z as CMSSidebarTool, X as CMSUser, a0 as cmsPlugin } from './client-
|
|
4
|
+
export { Y as CMSAIConfig, W as CMSBuiltInSidebarTool, $ as CMSPlugin, _ as CMSPluginOptions, Z as CMSSidebarTool, X as CMSUser, a0 as cmsPlugin } from './client-DrJWXKxt.js';
|
package/dist/plugin.js
CHANGED
|
@@ -2639,7 +2639,7 @@ function api(server, options) {
|
|
|
2639
2639
|
// package.json
|
|
2640
2640
|
var package_default = {
|
|
2641
2641
|
name: "@blinkk/root-cms",
|
|
2642
|
-
version: "2.4.
|
|
2642
|
+
version: "2.4.6",
|
|
2643
2643
|
author: "s@blinkk.com",
|
|
2644
2644
|
license: "MIT",
|
|
2645
2645
|
engines: {
|
|
@@ -2713,10 +2713,14 @@ var package_default = {
|
|
|
2713
2713
|
"@genkit-ai/vertexai": "1.18.0",
|
|
2714
2714
|
"@google-cloud/firestore": "7.11.3",
|
|
2715
2715
|
"@hello-pangea/dnd": "18.0.1",
|
|
2716
|
+
"@types/cli-progress": "3.11.6",
|
|
2716
2717
|
"body-parser": "1.20.2",
|
|
2718
|
+
"cli-progress": "3.12.0",
|
|
2717
2719
|
commander: "11.0.0",
|
|
2718
2720
|
"csv-parse": "5.5.2",
|
|
2719
2721
|
"csv-stringify": "6.4.4",
|
|
2722
|
+
"date-fns": "4.1.0",
|
|
2723
|
+
"date-fns-tz": "3.2.0",
|
|
2720
2724
|
diff: "8.0.2",
|
|
2721
2725
|
"dts-dom": "3.7.0",
|
|
2722
2726
|
"fnv-plus": "1.3.1",
|
|
@@ -2761,6 +2765,7 @@ var package_default = {
|
|
|
2761
2765
|
"@preact/compat": "18.3.1",
|
|
2762
2766
|
"@tabler/icons-preact": "3.35.0",
|
|
2763
2767
|
"@testing-library/preact": "3.2.4",
|
|
2768
|
+
"@testing-library/user-event": "14.6.1",
|
|
2764
2769
|
"@types/body-parser": "1.19.3",
|
|
2765
2770
|
"@types/fnv-plus": "1.3.2",
|
|
2766
2771
|
"@types/gapi": "0.0.47",
|
|
@@ -2778,6 +2783,7 @@ var package_default = {
|
|
|
2778
2783
|
"firebase-functions": "6.4.0",
|
|
2779
2784
|
"firebase-tools": "14.15.2",
|
|
2780
2785
|
"highlight.js": "11.6.0",
|
|
2786
|
+
jsdom: "27.2.0",
|
|
2781
2787
|
"json-diff-kit": "1.0.29",
|
|
2782
2788
|
lexical: "0.33.1",
|
|
2783
2789
|
marked: "9.1.1",
|
|
@@ -2798,7 +2804,7 @@ var package_default = {
|
|
|
2798
2804
|
yjs: "13.6.27"
|
|
2799
2805
|
},
|
|
2800
2806
|
peerDependencies: {
|
|
2801
|
-
"@blinkk/root": "2.4.
|
|
2807
|
+
"@blinkk/root": "2.4.6",
|
|
2802
2808
|
"firebase-admin": ">=11",
|
|
2803
2809
|
"firebase-functions": ">=4",
|
|
2804
2810
|
preact: ">=10",
|
|
@@ -3090,8 +3096,8 @@ function cmsPlugin(options) {
|
|
|
3090
3096
|
/**
|
|
3091
3097
|
* Returns the Firestore instance used by the plugin.
|
|
3092
3098
|
*/
|
|
3093
|
-
getFirestore: () => {
|
|
3094
|
-
const databaseId = firebaseConfig.databaseId || "(default)";
|
|
3099
|
+
getFirestore: (options2) => {
|
|
3100
|
+
const databaseId = options2?.databaseId || firebaseConfig.databaseId || "(default)";
|
|
3095
3101
|
return getFirestore(app, databaseId);
|
|
3096
3102
|
},
|
|
3097
3103
|
hooks: {
|
package/dist/project.d.ts
CHANGED
|
@@ -44,6 +44,11 @@ declare function date(field: Omit<DateField, 'type'>): DateField;
|
|
|
44
44
|
type DateTimeField = CommonFieldProps & {
|
|
45
45
|
type: 'datetime';
|
|
46
46
|
default?: string;
|
|
47
|
+
/**
|
|
48
|
+
* Timezone to use for the datetime field. If set, the field will be limited to
|
|
49
|
+
* this timezone. Example: America/Los_Angeles.
|
|
50
|
+
*/
|
|
51
|
+
timezone?: string;
|
|
47
52
|
};
|
|
48
53
|
declare function datetime(field: Omit<DateTimeField, 'type'>): DateTimeField;
|
|
49
54
|
type BooleanField = CommonFieldProps & {
|