@sveltia/cms 0.117.1 → 0.117.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/README.md +5 -3
- package/dist/sveltia-cms.js +136 -136
- package/dist/sveltia-cms.js.map +1 -1
- package/dist/sveltia-cms.mjs +135 -135
- package/dist/sveltia-cms.mjs.map +1 -1
- package/package.json +1 -1
- package/schema/sveltia-cms.json +1 -5259
- package/types/public.d.ts +77 -14
package/types/public.d.ts
CHANGED
|
@@ -443,7 +443,7 @@ export type VariableFieldProps = {
|
|
|
443
443
|
/**
|
|
444
444
|
* Set of nested Object fields to be selected or added.
|
|
445
445
|
*/
|
|
446
|
-
types
|
|
446
|
+
types: VariableFieldType[];
|
|
447
447
|
/**
|
|
448
448
|
* Property name to store the type name in nested objects. Default:
|
|
449
449
|
* `type`.
|
|
@@ -706,6 +706,11 @@ export type ListFieldProps = {
|
|
|
706
706
|
* the document for details.
|
|
707
707
|
*/
|
|
708
708
|
default?: string[] | Record<string, any>[] | Record<string, any>;
|
|
709
|
+
};
|
|
710
|
+
/**
|
|
711
|
+
* Base properties for a complex List field with subfields or variable types.
|
|
712
|
+
*/
|
|
713
|
+
export type ComplexListFieldBaseProps = {
|
|
709
714
|
/**
|
|
710
715
|
* Whether to allow users to add new items to the list. Default:
|
|
711
716
|
* `true`.
|
|
@@ -753,14 +758,6 @@ export type ListFieldProps = {
|
|
|
753
758
|
* empty.
|
|
754
759
|
*/
|
|
755
760
|
minimize_collapsed?: boolean | "auto";
|
|
756
|
-
/**
|
|
757
|
-
* Single field to be included in a list item.
|
|
758
|
-
*/
|
|
759
|
-
field?: Field;
|
|
760
|
-
/**
|
|
761
|
-
* Set of fields to be included in a list item.
|
|
762
|
-
*/
|
|
763
|
-
fields?: Field[];
|
|
764
761
|
/**
|
|
765
762
|
* Whether to save the field value at the top-level of the data file
|
|
766
763
|
* without the field name. If the `single_file` i18n structure is enabled, the lists will still be
|
|
@@ -770,10 +767,52 @@ export type ListFieldProps = {
|
|
|
770
767
|
*/
|
|
771
768
|
root?: boolean;
|
|
772
769
|
};
|
|
770
|
+
/**
|
|
771
|
+
* Simple List field definition with primitive item types.
|
|
772
|
+
*/
|
|
773
|
+
export type SimpleListField = CommonFieldProps & StandardFieldProps & ListFieldProps;
|
|
774
|
+
/**
|
|
775
|
+
* Properties for a complex List field with subfields or variable types.
|
|
776
|
+
*/
|
|
777
|
+
export type ComplexListFieldProps = CommonFieldProps & StandardFieldProps & ListFieldProps & ComplexListFieldBaseProps & MultiValueFieldProps;
|
|
778
|
+
/**
|
|
779
|
+
* Properties for a List field with a single subfield.
|
|
780
|
+
*/
|
|
781
|
+
export type ListFieldSubFieldProps = {
|
|
782
|
+
/**
|
|
783
|
+
* Single field to be included in a list item.
|
|
784
|
+
*/
|
|
785
|
+
field: Field;
|
|
786
|
+
};
|
|
787
|
+
/**
|
|
788
|
+
* List field definition with a single subfield.
|
|
789
|
+
*/
|
|
790
|
+
export type ListFieldWithSubField = ComplexListFieldProps & ListFieldSubFieldProps;
|
|
791
|
+
/**
|
|
792
|
+
* Properties for a List field with multiple subfields.
|
|
793
|
+
*/
|
|
794
|
+
export type ListFieldSubFieldsProps = {
|
|
795
|
+
/**
|
|
796
|
+
* Set of fields to be included in a list item.
|
|
797
|
+
*/
|
|
798
|
+
fields: Field[];
|
|
799
|
+
};
|
|
800
|
+
/**
|
|
801
|
+
* List field definition with multiple subfields.
|
|
802
|
+
*/
|
|
803
|
+
export type ListFieldWithSubFields = ComplexListFieldProps & ListFieldSubFieldsProps;
|
|
804
|
+
/**
|
|
805
|
+
* List field definition with variable types.
|
|
806
|
+
*/
|
|
807
|
+
export type ListFieldWithTypes = ComplexListFieldProps & VariableFieldProps;
|
|
808
|
+
/**
|
|
809
|
+
* List field definition with complex items.
|
|
810
|
+
*/
|
|
811
|
+
export type ComplexListField = ListFieldWithSubField | ListFieldWithSubFields | ListFieldWithTypes;
|
|
773
812
|
/**
|
|
774
813
|
* List field definition.
|
|
775
814
|
*/
|
|
776
|
-
export type ListField =
|
|
815
|
+
export type ListField = SimpleListField | ComplexListField;
|
|
777
816
|
/**
|
|
778
817
|
* Map field properties.
|
|
779
818
|
*/
|
|
@@ -920,16 +959,32 @@ export type ObjectFieldProps = {
|
|
|
920
959
|
* Template of a label to be displayed on a collapsed object.
|
|
921
960
|
*/
|
|
922
961
|
summary?: string;
|
|
962
|
+
};
|
|
963
|
+
/**
|
|
964
|
+
* Base properties for a complex Object field with subfields or variable types.
|
|
965
|
+
*/
|
|
966
|
+
export type ComplexObjectFieldProps = CommonFieldProps & StandardFieldProps & ObjectFieldProps;
|
|
967
|
+
/**
|
|
968
|
+
* Properties for an Object field with multiple subfields.
|
|
969
|
+
*/
|
|
970
|
+
export type ObjectFieldSubFieldsProps = {
|
|
923
971
|
/**
|
|
924
|
-
* Set of fields to be included.
|
|
925
|
-
* is required.
|
|
972
|
+
* Set of fields to be included.
|
|
926
973
|
*/
|
|
927
|
-
fields
|
|
974
|
+
fields: Field[];
|
|
928
975
|
};
|
|
976
|
+
/**
|
|
977
|
+
* Object field definition with multiple subfields.
|
|
978
|
+
*/
|
|
979
|
+
export type ObjectFieldWithSubFields = ComplexObjectFieldProps & ObjectFieldSubFieldsProps;
|
|
980
|
+
/**
|
|
981
|
+
* Object field definition with variable types.
|
|
982
|
+
*/
|
|
983
|
+
export type ObjectFieldWithTypes = ComplexObjectFieldProps & VariableFieldProps;
|
|
929
984
|
/**
|
|
930
985
|
* Object field definition.
|
|
931
986
|
*/
|
|
932
|
-
export type ObjectField =
|
|
987
|
+
export type ObjectField = ObjectFieldWithSubFields | ObjectFieldWithTypes;
|
|
933
988
|
/**
|
|
934
989
|
* Entry filter options for a Relation field.
|
|
935
990
|
*/
|
|
@@ -1115,6 +1170,14 @@ export type MultiValueField = MediaField | RelationField | SelectField;
|
|
|
1115
1170
|
* Field types that have the `min` and `max` options.
|
|
1116
1171
|
*/
|
|
1117
1172
|
export type MinMaxValueField = MultiValueField | ListField | NumberField;
|
|
1173
|
+
/**
|
|
1174
|
+
* Field types that have subfields.
|
|
1175
|
+
*/
|
|
1176
|
+
export type FieldWithSubFields = ListFieldWithSubFields | ObjectFieldWithSubFields;
|
|
1177
|
+
/**
|
|
1178
|
+
* Field types that support variable types.
|
|
1179
|
+
*/
|
|
1180
|
+
export type FieldWithTypes = ListFieldWithTypes | ObjectFieldWithTypes;
|
|
1118
1181
|
/**
|
|
1119
1182
|
* Name of a built-in widget. Sveltia CMS supports all the built-in widgets provided by Decap CMS as
|
|
1120
1183
|
* well as some new widgets.
|