@cloudcannon/configuration-types 0.0.21 → 0.0.23

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.
@@ -533,6 +533,86 @@
533
533
  },
534
534
  "type": "object"
535
535
  },
536
+ "BooleanInput": {
537
+ "additionalProperties": false,
538
+ "properties": {
539
+ "cascade": {
540
+ "description": "Specifies whether or not this input configuration should be merged with any matching, less specific configuration.",
541
+ "markdownDescription": "Specifies whether or not this input configuration should be merged with any matching, less\nspecific configuration.",
542
+ "type": "boolean"
543
+ },
544
+ "comment": {
545
+ "description": "Changes the subtext below the _Label_. Has no default. Supports a limited set of Markdown: links, bold, italic, subscript, superscript, and inline code elements are allowed.",
546
+ "markdownDescription": "Changes the subtext below the _Label_. Has no default. Supports a limited set of Markdown:\nlinks, bold, italic, subscript, superscript, and inline code elements are allowed.",
547
+ "type": "string"
548
+ },
549
+ "context": {
550
+ "additionalProperties": false,
551
+ "description": "Adds an expandable section of rich text below the input.",
552
+ "markdownDescription": "Adds an expandable section of rich text below the input.",
553
+ "properties": {
554
+ "content": {
555
+ "description": "The rich text content shown when opened. Supports a limited set of Markdown.",
556
+ "markdownDescription": "The rich text content shown when opened. Supports a limited set of Markdown.",
557
+ "type": "string"
558
+ },
559
+ "icon": {
560
+ "$ref": "#/definitions/Icon",
561
+ "description": "The icon shown when not open.",
562
+ "markdownDescription": "The icon shown when not open."
563
+ },
564
+ "open": {
565
+ "description": "Makes the content visible initially.",
566
+ "markdownDescription": "Makes the content visible initially.",
567
+ "type": "boolean"
568
+ },
569
+ "title": {
570
+ "description": "The text shown when not open. Defaults to \"Context\" if unset.",
571
+ "markdownDescription": "The text shown when not open. Defaults to \"Context\" if unset.",
572
+ "type": "string"
573
+ }
574
+ },
575
+ "type": "object"
576
+ },
577
+ "documentation": {
578
+ "$ref": "#/definitions/Documentation",
579
+ "description": "Provides a custom link for documentation for editors shown above input.",
580
+ "markdownDescription": "Provides a custom link for documentation for editors shown above input."
581
+ },
582
+ "hidden": {
583
+ "default": false,
584
+ "description": "Toggles the visibility of this input.",
585
+ "markdownDescription": "Toggles the visibility of this input.",
586
+ "type": [
587
+ "boolean",
588
+ "string"
589
+ ]
590
+ },
591
+ "instance_value": {
592
+ "$ref": "#/definitions/InstanceValue",
593
+ "description": "Controls if and how the value of this input is instantiated when created. This occurs when creating files, or adding array items containing the configured input.",
594
+ "markdownDescription": "Controls if and how the value of this input is instantiated when created. This occurs when\ncreating files, or adding array items containing the configured input."
595
+ },
596
+ "label": {
597
+ "description": "Optionally changes the text above this input.",
598
+ "markdownDescription": "Optionally changes the text above this input.",
599
+ "type": "string"
600
+ },
601
+ "type": {
602
+ "description": "Sets an input type, which controls how this input appears and behaves.",
603
+ "enum": [
604
+ "checkbox",
605
+ "switch"
606
+ ],
607
+ "markdownDescription": "Sets an input type, which controls how this input appears and behaves.",
608
+ "type": "string"
609
+ }
610
+ },
611
+ "required": [
612
+ "type"
613
+ ],
614
+ "type": "object"
615
+ },
536
616
  "ChoiceInput": {
537
617
  "additionalProperties": false,
538
618
  "properties": {
@@ -4065,6 +4145,9 @@
4065
4145
  {
4066
4146
  "$ref": "#/definitions/ColorInput"
4067
4147
  },
4148
+ {
4149
+ "$ref": "#/definitions/BooleanInput"
4150
+ },
4068
4151
  {
4069
4152
  "$ref": "#/definitions/NumberInput"
4070
4153
  },
@@ -4080,6 +4163,9 @@
4080
4163
  {
4081
4164
  "$ref": "#/definitions/DateInput"
4082
4165
  },
4166
+ {
4167
+ "$ref": "#/definitions/TimeInput"
4168
+ },
4083
4169
  {
4084
4170
  "$ref": "#/definitions/FileInput"
4085
4171
  },
@@ -7677,6 +7763,88 @@
7677
7763
  ],
7678
7764
  "type": "string"
7679
7765
  },
7766
+ "TimeInput": {
7767
+ "additionalProperties": false,
7768
+ "properties": {
7769
+ "cascade": {
7770
+ "description": "Specifies whether or not this input configuration should be merged with any matching, less specific configuration.",
7771
+ "markdownDescription": "Specifies whether or not this input configuration should be merged with any matching, less\nspecific configuration.",
7772
+ "type": "boolean"
7773
+ },
7774
+ "comment": {
7775
+ "description": "Changes the subtext below the _Label_. Has no default. Supports a limited set of Markdown: links, bold, italic, subscript, superscript, and inline code elements are allowed.",
7776
+ "markdownDescription": "Changes the subtext below the _Label_. Has no default. Supports a limited set of Markdown:\nlinks, bold, italic, subscript, superscript, and inline code elements are allowed.",
7777
+ "type": "string"
7778
+ },
7779
+ "context": {
7780
+ "additionalProperties": false,
7781
+ "description": "Adds an expandable section of rich text below the input.",
7782
+ "markdownDescription": "Adds an expandable section of rich text below the input.",
7783
+ "properties": {
7784
+ "content": {
7785
+ "description": "The rich text content shown when opened. Supports a limited set of Markdown.",
7786
+ "markdownDescription": "The rich text content shown when opened. Supports a limited set of Markdown.",
7787
+ "type": "string"
7788
+ },
7789
+ "icon": {
7790
+ "$ref": "#/definitions/Icon",
7791
+ "description": "The icon shown when not open.",
7792
+ "markdownDescription": "The icon shown when not open."
7793
+ },
7794
+ "open": {
7795
+ "description": "Makes the content visible initially.",
7796
+ "markdownDescription": "Makes the content visible initially.",
7797
+ "type": "boolean"
7798
+ },
7799
+ "title": {
7800
+ "description": "The text shown when not open. Defaults to \"Context\" if unset.",
7801
+ "markdownDescription": "The text shown when not open. Defaults to \"Context\" if unset.",
7802
+ "type": "string"
7803
+ }
7804
+ },
7805
+ "type": "object"
7806
+ },
7807
+ "documentation": {
7808
+ "$ref": "#/definitions/Documentation",
7809
+ "description": "Provides a custom link for documentation for editors shown above input.",
7810
+ "markdownDescription": "Provides a custom link for documentation for editors shown above input."
7811
+ },
7812
+ "hidden": {
7813
+ "default": false,
7814
+ "description": "Toggles the visibility of this input.",
7815
+ "markdownDescription": "Toggles the visibility of this input.",
7816
+ "type": [
7817
+ "boolean",
7818
+ "string"
7819
+ ]
7820
+ },
7821
+ "instance_value": {
7822
+ "$ref": "#/definitions/InstanceValue",
7823
+ "description": "Controls if and how the value of this input is instantiated when created. This occurs when creating files, or adding array items containing the configured input.",
7824
+ "markdownDescription": "Controls if and how the value of this input is instantiated when created. This occurs when\ncreating files, or adding array items containing the configured input."
7825
+ },
7826
+ "label": {
7827
+ "description": "Optionally changes the text above this input.",
7828
+ "markdownDescription": "Optionally changes the text above this input.",
7829
+ "type": "string"
7830
+ },
7831
+ "options": {
7832
+ "$ref": "#/definitions/WithEmptyTypeText",
7833
+ "description": "Options that are specific to Time inputs.",
7834
+ "markdownDescription": "Options that are specific to Time inputs."
7835
+ },
7836
+ "type": {
7837
+ "const": "time",
7838
+ "description": "Sets an input type, which controls how this input appears and behaves.",
7839
+ "markdownDescription": "Sets an input type, which controls how this input appears and behaves.",
7840
+ "type": "string"
7841
+ }
7842
+ },
7843
+ "required": [
7844
+ "type"
7845
+ ],
7846
+ "type": "object"
7847
+ },
7680
7848
  "Timezone": {
7681
7849
  "enum": [
7682
7850
  "Africa/Abidjan",
@@ -8343,7 +8511,20 @@
8343
8511
  "type": "string"
8344
8512
  },
8345
8513
  "options": {
8346
- "$ref": "#/definitions/WithEmptyTypeText",
8514
+ "anyOf": [
8515
+ {
8516
+ "$ref": "#/definitions/WithEmptyTypeText"
8517
+ },
8518
+ {
8519
+ "$ref": "#/definitions/WithEmptyTypeNumber"
8520
+ },
8521
+ {
8522
+ "$ref": "#/definitions/WithEmptyTypeObject"
8523
+ },
8524
+ {
8525
+ "$ref": "#/definitions/WithEmptyTypeArray"
8526
+ }
8527
+ ],
8347
8528
  "description": "Options that are specific to this `type` of input.",
8348
8529
  "markdownDescription": "Options that are specific to this `type` of input."
8349
8530
  },
@@ -8427,7 +8608,7 @@
8427
8608
  "markdownDescription": "Options that are specific to this `type` of input."
8428
8609
  },
8429
8610
  "type": {
8430
- "const": "range",
8611
+ "const": "url",
8431
8612
  "description": "Sets an input type, which controls how this input appears and behaves.",
8432
8613
  "markdownDescription": "Sets an input type, which controls how this input appears and behaves.",
8433
8614
  "type": "string"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cloudcannon/configuration-types",
3
- "version": "0.0.21",
3
+ "version": "0.0.23",
4
4
  "description": "Contains TypeScript declarations and generates JSONSchema files for the CloudCannon configuration file.",
5
5
  "author": "CloudCannon <support@cloudcannon.com>",
6
6
  "license": "MIT",
@@ -796,6 +796,10 @@ export interface ColorInput extends BaseInput {
796
796
  options?: ColorInputOptions;
797
797
  }
798
798
 
799
+ export interface BooleanInput extends Omit<BaseInput, 'options'> {
800
+ type: 'checkbox' | 'switch';
801
+ }
802
+
799
803
  export interface NumberInputOptions extends WithEmptyTypeNumber {
800
804
  /**
801
805
  * The lowest value in the range of permitted values.
@@ -853,7 +857,7 @@ export interface RangeInput extends BaseInput {
853
857
  export interface UrlInputOptions extends WithEmptyTypeText, WithPaths {}
854
858
 
855
859
  export interface UrlInput extends BaseInput {
856
- type: 'range';
860
+ type: 'url';
857
861
  /**
858
862
  * Options that are specific to this `type` of input.
859
863
  */
@@ -901,6 +905,14 @@ export interface DateInput extends BaseInput {
901
905
  options?: DateInputOptions;
902
906
  }
903
907
 
908
+ export interface TimeInput extends BaseInput {
909
+ type: 'time';
910
+ /**
911
+ * Options that are specific to Time inputs.
912
+ */
913
+ options?: WithEmptyTypeText;
914
+ }
915
+
904
916
  export interface FileInputOptions extends WithEmptyTypeText, WithPaths {
905
917
  /**
906
918
  * Restricts which file types are available to select or upload to this input. Accepted format is
@@ -1111,10 +1123,6 @@ export interface ArrayInput extends BaseInput {
1111
1123
 
1112
1124
  export interface UnknownInput extends BaseInput {
1113
1125
  type?: 'auto' | undefined;
1114
- /**
1115
- * Options that are specific to this `type` of input.
1116
- */
1117
- options?: WithEmptyTypeText;
1118
1126
  }
1119
1127
 
1120
1128
  export type Input =
@@ -1123,11 +1131,13 @@ export type Input =
1123
1131
  | TextInput
1124
1132
  | CodeInput
1125
1133
  | ColorInput
1134
+ | BooleanInput
1126
1135
  | NumberInput
1127
1136
  | RangeInput
1128
1137
  | UrlInput
1129
1138
  | RichTextInput
1130
1139
  | DateInput
1140
+ | TimeInput
1131
1141
  | FileInput
1132
1142
  | ImageInput
1133
1143
  | SelectInput