@cmssy/core 16.8.0 → 16.9.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/index.cjs +1 -1
- package/dist/index.d.cts +25 -23
- package/dist/index.d.ts +25 -23
- package/dist/index.js +1 -1
- package/dist/internal/locale.cjs +1 -1
- package/dist/internal/locale.js +1 -1
- package/dist/internal.cjs +1 -1
- package/dist/internal.js +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -74,7 +74,7 @@ Set the listed environment variables (e.g. in .env.local) and restart the dev se
|
|
|
74
74
|
}
|
|
75
75
|
|
|
76
76
|
// src/version.ts
|
|
77
|
-
var CMSSY_CORE_VERSION = "16.
|
|
77
|
+
var CMSSY_CORE_VERSION = "16.9.0" ;
|
|
78
78
|
var CMSSY_USER_AGENT = `@cmssy/core/${CMSSY_CORE_VERSION}`;
|
|
79
79
|
|
|
80
80
|
// src/data/http.ts
|
package/dist/index.d.cts
CHANGED
|
@@ -26,7 +26,9 @@ interface RelationFieldOptions extends BaseFieldOptions {
|
|
|
26
26
|
sort?: string;
|
|
27
27
|
limit?: number;
|
|
28
28
|
}
|
|
29
|
-
type Only<O, Shape> = Shape &
|
|
29
|
+
type Only<O, Shape, Field extends string> = Shape & {
|
|
30
|
+
[Key in Exclude<keyof O, keyof Shape>]: `fields.${Field} has no option: ${Key & string}`;
|
|
31
|
+
};
|
|
30
32
|
type OptionValue<O> = O extends {
|
|
31
33
|
options: readonly (infer Option extends string)[];
|
|
32
34
|
} ? Option : string;
|
|
@@ -50,28 +52,28 @@ type PageSelectorValue<O> = O extends {
|
|
|
50
52
|
multiple: false;
|
|
51
53
|
} ? PageRef | undefined : PageRef[];
|
|
52
54
|
declare const fields: {
|
|
53
|
-
text: <const O extends Only<O, BaseFieldOptions>>(opts?: O) => TypedField<string, Declared<O>>;
|
|
54
|
-
textarea: <const O extends Only<O, BaseFieldOptions>>(opts?: O) => TypedField<string, Declared<O>>;
|
|
55
|
-
richText: <const O extends Only<O, BaseFieldOptions>>(opts?: O) => TypedField<string, Declared<O>>;
|
|
56
|
-
markdown: <const O extends Only<O, BaseFieldOptions>>(opts?: O) => TypedField<string, Declared<O>>;
|
|
57
|
-
number: <const O extends Only<O, BaseFieldOptions>>(opts?: O) => TypedField<number, Declared<O>>;
|
|
58
|
-
date: <const O extends Only<O, BaseFieldOptions>>(opts?: O) => TypedField<string, Declared<O>>;
|
|
59
|
-
datetime: <const O extends Only<O, BaseFieldOptions>>(opts?: O) => TypedField<string, Declared<O>>;
|
|
60
|
-
boolean: <const O extends Only<O, BaseFieldOptions>>(opts?: O) => TypedField<boolean, Declared<O>>;
|
|
61
|
-
color: <const O extends Only<O, BaseFieldOptions>>(opts?: O) => TypedField<string, Declared<O>>;
|
|
62
|
-
link: <const O extends Only<O, BaseFieldOptions>>(opts?: O) => TypedField<string, Declared<O>>;
|
|
63
|
-
url: <const O extends Only<O, BaseFieldOptions>>(opts?: O) => TypedField<string, Declared<O>>;
|
|
64
|
-
email: <const O extends Only<O, BaseFieldOptions>>(opts?: O) => TypedField<string, Declared<O>>;
|
|
65
|
-
json: <const O extends Only<O, BaseFieldOptions>>(opts?: O) => TypedField<_cmssy_types.JsonValue, Declared<O>>;
|
|
66
|
-
form: <const O extends Only<O, BaseFieldOptions>>(opts?: O) => TypedField<string, Declared<O>>;
|
|
67
|
-
table: <const O extends Only<O, TableFieldOptions>>(opts?: O) => TypedField<FieldTypeValueMap["table"], Declared<O>>;
|
|
68
|
-
select: <const O extends Only<O, ChoiceFieldOptions>>(opts: O) => TypedField<OptionValue<O>, Declared<O>>;
|
|
69
|
-
radio: <const O extends Only<O, ChoiceFieldOptions>>(opts: O) => TypedField<OptionValue<O>, Declared<O>>;
|
|
70
|
-
multiselect: <const O extends Only<O, ChoiceFieldOptions>>(opts: O) => TypedField<OptionValue<O>[], Declared<O>>;
|
|
71
|
-
media: <const O extends Only<O, MediaFieldOptions>>(opts?: O) => TypedField<MediaValue<O>, Declared<O>>;
|
|
72
|
-
pageSelector: <const O extends Only<O, PageSelectorFieldOptions>>(opts?: O) => TypedField<PageSelectorValue<O>, Declared<O>>;
|
|
73
|
-
repeater: <const O extends Only<O, RepeaterFieldOptions>>(opts: O) => TypedField<RepeaterValue<O>, Declared<O>>;
|
|
74
|
-
relation: <const O extends Only<O, RelationFieldOptions>>(opts: O) => TypedField<RelationValue<O>, Declared<O>>;
|
|
55
|
+
text: <const O extends Only<O, BaseFieldOptions, "text">>(opts?: O) => TypedField<string, Declared<O>>;
|
|
56
|
+
textarea: <const O extends Only<O, BaseFieldOptions, "textarea">>(opts?: O) => TypedField<string, Declared<O>>;
|
|
57
|
+
richText: <const O extends Only<O, BaseFieldOptions, "richText">>(opts?: O) => TypedField<string, Declared<O>>;
|
|
58
|
+
markdown: <const O extends Only<O, BaseFieldOptions, "markdown">>(opts?: O) => TypedField<string, Declared<O>>;
|
|
59
|
+
number: <const O extends Only<O, BaseFieldOptions, "number">>(opts?: O) => TypedField<number, Declared<O>>;
|
|
60
|
+
date: <const O extends Only<O, BaseFieldOptions, "date">>(opts?: O) => TypedField<string, Declared<O>>;
|
|
61
|
+
datetime: <const O extends Only<O, BaseFieldOptions, "datetime">>(opts?: O) => TypedField<string, Declared<O>>;
|
|
62
|
+
boolean: <const O extends Only<O, BaseFieldOptions, "boolean">>(opts?: O) => TypedField<boolean, Declared<O>>;
|
|
63
|
+
color: <const O extends Only<O, BaseFieldOptions, "color">>(opts?: O) => TypedField<string, Declared<O>>;
|
|
64
|
+
link: <const O extends Only<O, BaseFieldOptions, "link">>(opts?: O) => TypedField<string, Declared<O>>;
|
|
65
|
+
url: <const O extends Only<O, BaseFieldOptions, "url">>(opts?: O) => TypedField<string, Declared<O>>;
|
|
66
|
+
email: <const O extends Only<O, BaseFieldOptions, "email">>(opts?: O) => TypedField<string, Declared<O>>;
|
|
67
|
+
json: <const O extends Only<O, BaseFieldOptions, "json">>(opts?: O) => TypedField<_cmssy_types.JsonValue, Declared<O>>;
|
|
68
|
+
form: <const O extends Only<O, BaseFieldOptions, "form">>(opts?: O) => TypedField<string, Declared<O>>;
|
|
69
|
+
table: <const O extends Only<O, TableFieldOptions, "table">>(opts?: O) => TypedField<FieldTypeValueMap["table"], Declared<O>>;
|
|
70
|
+
select: <const O extends Only<O, ChoiceFieldOptions, "select">>(opts: O) => TypedField<OptionValue<O>, Declared<O>>;
|
|
71
|
+
radio: <const O extends Only<O, ChoiceFieldOptions, "radio">>(opts: O) => TypedField<OptionValue<O>, Declared<O>>;
|
|
72
|
+
multiselect: <const O extends Only<O, ChoiceFieldOptions, "multiselect">>(opts: O) => TypedField<OptionValue<O>[], Declared<O>>;
|
|
73
|
+
media: <const O extends Only<O, MediaFieldOptions, "media">>(opts?: O) => TypedField<MediaValue<O>, Declared<O>>;
|
|
74
|
+
pageSelector: <const O extends Only<O, PageSelectorFieldOptions, "pageSelector">>(opts?: O) => TypedField<PageSelectorValue<O>, Declared<O>>;
|
|
75
|
+
repeater: <const O extends Only<O, RepeaterFieldOptions, "repeater">>(opts: O) => TypedField<RepeaterValue<O>, Declared<O>>;
|
|
76
|
+
relation: <const O extends Only<O, RelationFieldOptions, "relation">>(opts: O) => TypedField<RelationValue<O>, Declared<O>>;
|
|
75
77
|
};
|
|
76
78
|
|
|
77
79
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -26,7 +26,9 @@ interface RelationFieldOptions extends BaseFieldOptions {
|
|
|
26
26
|
sort?: string;
|
|
27
27
|
limit?: number;
|
|
28
28
|
}
|
|
29
|
-
type Only<O, Shape> = Shape &
|
|
29
|
+
type Only<O, Shape, Field extends string> = Shape & {
|
|
30
|
+
[Key in Exclude<keyof O, keyof Shape>]: `fields.${Field} has no option: ${Key & string}`;
|
|
31
|
+
};
|
|
30
32
|
type OptionValue<O> = O extends {
|
|
31
33
|
options: readonly (infer Option extends string)[];
|
|
32
34
|
} ? Option : string;
|
|
@@ -50,28 +52,28 @@ type PageSelectorValue<O> = O extends {
|
|
|
50
52
|
multiple: false;
|
|
51
53
|
} ? PageRef | undefined : PageRef[];
|
|
52
54
|
declare const fields: {
|
|
53
|
-
text: <const O extends Only<O, BaseFieldOptions>>(opts?: O) => TypedField<string, Declared<O>>;
|
|
54
|
-
textarea: <const O extends Only<O, BaseFieldOptions>>(opts?: O) => TypedField<string, Declared<O>>;
|
|
55
|
-
richText: <const O extends Only<O, BaseFieldOptions>>(opts?: O) => TypedField<string, Declared<O>>;
|
|
56
|
-
markdown: <const O extends Only<O, BaseFieldOptions>>(opts?: O) => TypedField<string, Declared<O>>;
|
|
57
|
-
number: <const O extends Only<O, BaseFieldOptions>>(opts?: O) => TypedField<number, Declared<O>>;
|
|
58
|
-
date: <const O extends Only<O, BaseFieldOptions>>(opts?: O) => TypedField<string, Declared<O>>;
|
|
59
|
-
datetime: <const O extends Only<O, BaseFieldOptions>>(opts?: O) => TypedField<string, Declared<O>>;
|
|
60
|
-
boolean: <const O extends Only<O, BaseFieldOptions>>(opts?: O) => TypedField<boolean, Declared<O>>;
|
|
61
|
-
color: <const O extends Only<O, BaseFieldOptions>>(opts?: O) => TypedField<string, Declared<O>>;
|
|
62
|
-
link: <const O extends Only<O, BaseFieldOptions>>(opts?: O) => TypedField<string, Declared<O>>;
|
|
63
|
-
url: <const O extends Only<O, BaseFieldOptions>>(opts?: O) => TypedField<string, Declared<O>>;
|
|
64
|
-
email: <const O extends Only<O, BaseFieldOptions>>(opts?: O) => TypedField<string, Declared<O>>;
|
|
65
|
-
json: <const O extends Only<O, BaseFieldOptions>>(opts?: O) => TypedField<_cmssy_types.JsonValue, Declared<O>>;
|
|
66
|
-
form: <const O extends Only<O, BaseFieldOptions>>(opts?: O) => TypedField<string, Declared<O>>;
|
|
67
|
-
table: <const O extends Only<O, TableFieldOptions>>(opts?: O) => TypedField<FieldTypeValueMap["table"], Declared<O>>;
|
|
68
|
-
select: <const O extends Only<O, ChoiceFieldOptions>>(opts: O) => TypedField<OptionValue<O>, Declared<O>>;
|
|
69
|
-
radio: <const O extends Only<O, ChoiceFieldOptions>>(opts: O) => TypedField<OptionValue<O>, Declared<O>>;
|
|
70
|
-
multiselect: <const O extends Only<O, ChoiceFieldOptions>>(opts: O) => TypedField<OptionValue<O>[], Declared<O>>;
|
|
71
|
-
media: <const O extends Only<O, MediaFieldOptions>>(opts?: O) => TypedField<MediaValue<O>, Declared<O>>;
|
|
72
|
-
pageSelector: <const O extends Only<O, PageSelectorFieldOptions>>(opts?: O) => TypedField<PageSelectorValue<O>, Declared<O>>;
|
|
73
|
-
repeater: <const O extends Only<O, RepeaterFieldOptions>>(opts: O) => TypedField<RepeaterValue<O>, Declared<O>>;
|
|
74
|
-
relation: <const O extends Only<O, RelationFieldOptions>>(opts: O) => TypedField<RelationValue<O>, Declared<O>>;
|
|
55
|
+
text: <const O extends Only<O, BaseFieldOptions, "text">>(opts?: O) => TypedField<string, Declared<O>>;
|
|
56
|
+
textarea: <const O extends Only<O, BaseFieldOptions, "textarea">>(opts?: O) => TypedField<string, Declared<O>>;
|
|
57
|
+
richText: <const O extends Only<O, BaseFieldOptions, "richText">>(opts?: O) => TypedField<string, Declared<O>>;
|
|
58
|
+
markdown: <const O extends Only<O, BaseFieldOptions, "markdown">>(opts?: O) => TypedField<string, Declared<O>>;
|
|
59
|
+
number: <const O extends Only<O, BaseFieldOptions, "number">>(opts?: O) => TypedField<number, Declared<O>>;
|
|
60
|
+
date: <const O extends Only<O, BaseFieldOptions, "date">>(opts?: O) => TypedField<string, Declared<O>>;
|
|
61
|
+
datetime: <const O extends Only<O, BaseFieldOptions, "datetime">>(opts?: O) => TypedField<string, Declared<O>>;
|
|
62
|
+
boolean: <const O extends Only<O, BaseFieldOptions, "boolean">>(opts?: O) => TypedField<boolean, Declared<O>>;
|
|
63
|
+
color: <const O extends Only<O, BaseFieldOptions, "color">>(opts?: O) => TypedField<string, Declared<O>>;
|
|
64
|
+
link: <const O extends Only<O, BaseFieldOptions, "link">>(opts?: O) => TypedField<string, Declared<O>>;
|
|
65
|
+
url: <const O extends Only<O, BaseFieldOptions, "url">>(opts?: O) => TypedField<string, Declared<O>>;
|
|
66
|
+
email: <const O extends Only<O, BaseFieldOptions, "email">>(opts?: O) => TypedField<string, Declared<O>>;
|
|
67
|
+
json: <const O extends Only<O, BaseFieldOptions, "json">>(opts?: O) => TypedField<_cmssy_types.JsonValue, Declared<O>>;
|
|
68
|
+
form: <const O extends Only<O, BaseFieldOptions, "form">>(opts?: O) => TypedField<string, Declared<O>>;
|
|
69
|
+
table: <const O extends Only<O, TableFieldOptions, "table">>(opts?: O) => TypedField<FieldTypeValueMap["table"], Declared<O>>;
|
|
70
|
+
select: <const O extends Only<O, ChoiceFieldOptions, "select">>(opts: O) => TypedField<OptionValue<O>, Declared<O>>;
|
|
71
|
+
radio: <const O extends Only<O, ChoiceFieldOptions, "radio">>(opts: O) => TypedField<OptionValue<O>, Declared<O>>;
|
|
72
|
+
multiselect: <const O extends Only<O, ChoiceFieldOptions, "multiselect">>(opts: O) => TypedField<OptionValue<O>[], Declared<O>>;
|
|
73
|
+
media: <const O extends Only<O, MediaFieldOptions, "media">>(opts?: O) => TypedField<MediaValue<O>, Declared<O>>;
|
|
74
|
+
pageSelector: <const O extends Only<O, PageSelectorFieldOptions, "pageSelector">>(opts?: O) => TypedField<PageSelectorValue<O>, Declared<O>>;
|
|
75
|
+
repeater: <const O extends Only<O, RepeaterFieldOptions, "repeater">>(opts: O) => TypedField<RepeaterValue<O>, Declared<O>>;
|
|
76
|
+
relation: <const O extends Only<O, RelationFieldOptions, "relation">>(opts: O) => TypedField<RelationValue<O>, Declared<O>>;
|
|
75
77
|
};
|
|
76
78
|
|
|
77
79
|
/**
|
package/dist/index.js
CHANGED
|
@@ -73,7 +73,7 @@ Set the listed environment variables (e.g. in .env.local) and restart the dev se
|
|
|
73
73
|
}
|
|
74
74
|
|
|
75
75
|
// src/version.ts
|
|
76
|
-
var CMSSY_CORE_VERSION = "16.
|
|
76
|
+
var CMSSY_CORE_VERSION = "16.9.0" ;
|
|
77
77
|
var CMSSY_USER_AGENT = `@cmssy/core/${CMSSY_CORE_VERSION}`;
|
|
78
78
|
|
|
79
79
|
// src/data/http.ts
|
package/dist/internal/locale.cjs
CHANGED
package/dist/internal/locale.js
CHANGED
package/dist/internal.cjs
CHANGED
package/dist/internal.js
CHANGED