@cmssy/core 16.4.0 → 16.5.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 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.4.0" ;
77
+ var CMSSY_CORE_VERSION = "16.5.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
@@ -13,6 +13,9 @@ export { BlockMeta, BlockPropsSchema, BlockRect, BlockSchema, BuildBlockContextE
13
13
  type Declared<O> = O extends {
14
14
  required: true;
15
15
  } ? true : false;
16
+ type NotAnOption = "not an option this field accepts";
17
+ type OnlyKnown<O, Accepted> = Record<Exclude<keyof O, keyof Accepted>, NotAnOption>;
18
+ type Exact<O> = FieldOptions & OnlyKnown<O, FieldOptions>;
16
19
  type OptionValue<O> = O extends {
17
20
  options: readonly (infer Option extends string)[];
18
21
  } ? Option : string;
@@ -43,28 +46,28 @@ interface RelationFieldOptions extends Omit<FieldOptions, "options" | "itemSchem
43
46
  limit?: number;
44
47
  }
45
48
  declare const fields: {
46
- text: <const O extends FieldOptions>(opts?: O) => TypedField<string, Declared<O>>;
47
- textarea: <const O extends FieldOptions>(opts?: O) => TypedField<string, Declared<O>>;
48
- richText: <const O extends FieldOptions>(opts?: O) => TypedField<string, Declared<O>>;
49
- markdown: <const O extends FieldOptions>(opts?: O) => TypedField<string, Declared<O>>;
50
- number: <const O extends FieldOptions>(opts?: O) => TypedField<number, Declared<O>>;
51
- date: <const O extends FieldOptions>(opts?: O) => TypedField<string, Declared<O>>;
52
- datetime: <const O extends FieldOptions>(opts?: O) => TypedField<string, Declared<O>>;
53
- boolean: <const O extends FieldOptions>(opts?: O) => TypedField<boolean, Declared<O>>;
54
- color: <const O extends FieldOptions>(opts?: O) => TypedField<string, Declared<O>>;
55
- link: <const O extends FieldOptions>(opts?: O) => TypedField<string, Declared<O>>;
56
- url: <const O extends FieldOptions>(opts?: O) => TypedField<string, Declared<O>>;
57
- email: <const O extends FieldOptions>(opts?: O) => TypedField<string, Declared<O>>;
58
- table: <const O extends FieldOptions>(opts?: O) => TypedField<_cmssy_types.TableValue, Declared<O>>;
59
- json: <const O extends FieldOptions>(opts?: O) => TypedField<_cmssy_types.JsonValue, Declared<O>>;
60
- form: <const O extends FieldOptions>(opts?: O) => TypedField<string, Declared<O>>;
61
- select: <const O extends FieldOptions>(opts: O) => TypedField<OptionValue<O>, Declared<O>>;
62
- radio: <const O extends FieldOptions>(opts: O) => TypedField<OptionValue<O>, Declared<O>>;
63
- multiselect: <const O extends FieldOptions>(opts: O) => TypedField<OptionValue<O>[], Declared<O>>;
64
- media: <const O extends FieldOptions>(opts?: O) => TypedField<MediaValue<O>, Declared<O>>;
65
- pageSelector: <const O extends FieldOptions>(opts?: O) => TypedField<PageSelectorValue<O>, Declared<O>>;
66
- repeater: <const O extends FieldOptions>(opts: O) => TypedField<RepeaterValue<O>, Declared<O>>;
67
- relation: <const O extends RelationFieldOptions>(opts: O) => TypedField<RelationValue<O>, Declared<O>>;
49
+ text: <const O extends Exact<O>>(opts?: O) => TypedField<string, Declared<O>>;
50
+ textarea: <const O extends Exact<O>>(opts?: O) => TypedField<string, Declared<O>>;
51
+ richText: <const O extends Exact<O>>(opts?: O) => TypedField<string, Declared<O>>;
52
+ markdown: <const O extends Exact<O>>(opts?: O) => TypedField<string, Declared<O>>;
53
+ number: <const O extends Exact<O>>(opts?: O) => TypedField<number, Declared<O>>;
54
+ date: <const O extends Exact<O>>(opts?: O) => TypedField<string, Declared<O>>;
55
+ datetime: <const O extends Exact<O>>(opts?: O) => TypedField<string, Declared<O>>;
56
+ boolean: <const O extends Exact<O>>(opts?: O) => TypedField<boolean, Declared<O>>;
57
+ color: <const O extends Exact<O>>(opts?: O) => TypedField<string, Declared<O>>;
58
+ link: <const O extends Exact<O>>(opts?: O) => TypedField<string, Declared<O>>;
59
+ url: <const O extends Exact<O>>(opts?: O) => TypedField<string, Declared<O>>;
60
+ email: <const O extends Exact<O>>(opts?: O) => TypedField<string, Declared<O>>;
61
+ table: <const O extends Exact<O>>(opts?: O) => TypedField<_cmssy_types.TableValue, Declared<O>>;
62
+ json: <const O extends Exact<O>>(opts?: O) => TypedField<_cmssy_types.JsonValue, Declared<O>>;
63
+ form: <const O extends Exact<O>>(opts?: O) => TypedField<string, Declared<O>>;
64
+ select: <const O extends Exact<O>>(opts: O) => TypedField<OptionValue<O>, Declared<O>>;
65
+ radio: <const O extends Exact<O>>(opts: O) => TypedField<OptionValue<O>, Declared<O>>;
66
+ multiselect: <const O extends Exact<O>>(opts: O) => TypedField<OptionValue<O>[], Declared<O>>;
67
+ media: <const O extends Exact<O>>(opts?: O) => TypedField<MediaValue<O>, Declared<O>>;
68
+ pageSelector: <const O extends Exact<O>>(opts?: O) => TypedField<PageSelectorValue<O>, Declared<O>>;
69
+ repeater: <const O extends Exact<O>>(opts: O) => TypedField<RepeaterValue<O>, Declared<O>>;
70
+ relation: <const O extends RelationFieldOptions & OnlyKnown<O, RelationFieldOptions>>(opts: O) => TypedField<RelationValue<O>, Declared<O>>;
68
71
  };
69
72
 
70
73
  /**
package/dist/index.d.ts CHANGED
@@ -13,6 +13,9 @@ export { BlockMeta, BlockPropsSchema, BlockRect, BlockSchema, BuildBlockContextE
13
13
  type Declared<O> = O extends {
14
14
  required: true;
15
15
  } ? true : false;
16
+ type NotAnOption = "not an option this field accepts";
17
+ type OnlyKnown<O, Accepted> = Record<Exclude<keyof O, keyof Accepted>, NotAnOption>;
18
+ type Exact<O> = FieldOptions & OnlyKnown<O, FieldOptions>;
16
19
  type OptionValue<O> = O extends {
17
20
  options: readonly (infer Option extends string)[];
18
21
  } ? Option : string;
@@ -43,28 +46,28 @@ interface RelationFieldOptions extends Omit<FieldOptions, "options" | "itemSchem
43
46
  limit?: number;
44
47
  }
45
48
  declare const fields: {
46
- text: <const O extends FieldOptions>(opts?: O) => TypedField<string, Declared<O>>;
47
- textarea: <const O extends FieldOptions>(opts?: O) => TypedField<string, Declared<O>>;
48
- richText: <const O extends FieldOptions>(opts?: O) => TypedField<string, Declared<O>>;
49
- markdown: <const O extends FieldOptions>(opts?: O) => TypedField<string, Declared<O>>;
50
- number: <const O extends FieldOptions>(opts?: O) => TypedField<number, Declared<O>>;
51
- date: <const O extends FieldOptions>(opts?: O) => TypedField<string, Declared<O>>;
52
- datetime: <const O extends FieldOptions>(opts?: O) => TypedField<string, Declared<O>>;
53
- boolean: <const O extends FieldOptions>(opts?: O) => TypedField<boolean, Declared<O>>;
54
- color: <const O extends FieldOptions>(opts?: O) => TypedField<string, Declared<O>>;
55
- link: <const O extends FieldOptions>(opts?: O) => TypedField<string, Declared<O>>;
56
- url: <const O extends FieldOptions>(opts?: O) => TypedField<string, Declared<O>>;
57
- email: <const O extends FieldOptions>(opts?: O) => TypedField<string, Declared<O>>;
58
- table: <const O extends FieldOptions>(opts?: O) => TypedField<_cmssy_types.TableValue, Declared<O>>;
59
- json: <const O extends FieldOptions>(opts?: O) => TypedField<_cmssy_types.JsonValue, Declared<O>>;
60
- form: <const O extends FieldOptions>(opts?: O) => TypedField<string, Declared<O>>;
61
- select: <const O extends FieldOptions>(opts: O) => TypedField<OptionValue<O>, Declared<O>>;
62
- radio: <const O extends FieldOptions>(opts: O) => TypedField<OptionValue<O>, Declared<O>>;
63
- multiselect: <const O extends FieldOptions>(opts: O) => TypedField<OptionValue<O>[], Declared<O>>;
64
- media: <const O extends FieldOptions>(opts?: O) => TypedField<MediaValue<O>, Declared<O>>;
65
- pageSelector: <const O extends FieldOptions>(opts?: O) => TypedField<PageSelectorValue<O>, Declared<O>>;
66
- repeater: <const O extends FieldOptions>(opts: O) => TypedField<RepeaterValue<O>, Declared<O>>;
67
- relation: <const O extends RelationFieldOptions>(opts: O) => TypedField<RelationValue<O>, Declared<O>>;
49
+ text: <const O extends Exact<O>>(opts?: O) => TypedField<string, Declared<O>>;
50
+ textarea: <const O extends Exact<O>>(opts?: O) => TypedField<string, Declared<O>>;
51
+ richText: <const O extends Exact<O>>(opts?: O) => TypedField<string, Declared<O>>;
52
+ markdown: <const O extends Exact<O>>(opts?: O) => TypedField<string, Declared<O>>;
53
+ number: <const O extends Exact<O>>(opts?: O) => TypedField<number, Declared<O>>;
54
+ date: <const O extends Exact<O>>(opts?: O) => TypedField<string, Declared<O>>;
55
+ datetime: <const O extends Exact<O>>(opts?: O) => TypedField<string, Declared<O>>;
56
+ boolean: <const O extends Exact<O>>(opts?: O) => TypedField<boolean, Declared<O>>;
57
+ color: <const O extends Exact<O>>(opts?: O) => TypedField<string, Declared<O>>;
58
+ link: <const O extends Exact<O>>(opts?: O) => TypedField<string, Declared<O>>;
59
+ url: <const O extends Exact<O>>(opts?: O) => TypedField<string, Declared<O>>;
60
+ email: <const O extends Exact<O>>(opts?: O) => TypedField<string, Declared<O>>;
61
+ table: <const O extends Exact<O>>(opts?: O) => TypedField<_cmssy_types.TableValue, Declared<O>>;
62
+ json: <const O extends Exact<O>>(opts?: O) => TypedField<_cmssy_types.JsonValue, Declared<O>>;
63
+ form: <const O extends Exact<O>>(opts?: O) => TypedField<string, Declared<O>>;
64
+ select: <const O extends Exact<O>>(opts: O) => TypedField<OptionValue<O>, Declared<O>>;
65
+ radio: <const O extends Exact<O>>(opts: O) => TypedField<OptionValue<O>, Declared<O>>;
66
+ multiselect: <const O extends Exact<O>>(opts: O) => TypedField<OptionValue<O>[], Declared<O>>;
67
+ media: <const O extends Exact<O>>(opts?: O) => TypedField<MediaValue<O>, Declared<O>>;
68
+ pageSelector: <const O extends Exact<O>>(opts?: O) => TypedField<PageSelectorValue<O>, Declared<O>>;
69
+ repeater: <const O extends Exact<O>>(opts: O) => TypedField<RepeaterValue<O>, Declared<O>>;
70
+ relation: <const O extends RelationFieldOptions & OnlyKnown<O, RelationFieldOptions>>(opts: O) => TypedField<RelationValue<O>, Declared<O>>;
68
71
  };
69
72
 
70
73
  /**
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.4.0" ;
76
+ var CMSSY_CORE_VERSION = "16.5.0" ;
77
77
  var CMSSY_USER_AGENT = `@cmssy/core/${CMSSY_CORE_VERSION}`;
78
78
 
79
79
  // src/data/http.ts
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  // src/version.ts
4
- var CMSSY_CORE_VERSION = "16.4.0" ;
4
+ var CMSSY_CORE_VERSION = "16.5.0" ;
5
5
  var CMSSY_USER_AGENT = `@cmssy/core/${CMSSY_CORE_VERSION}`;
6
6
 
7
7
  // src/data/http.ts
@@ -1,5 +1,5 @@
1
1
  // src/version.ts
2
- var CMSSY_CORE_VERSION = "16.4.0" ;
2
+ var CMSSY_CORE_VERSION = "16.5.0" ;
3
3
  var CMSSY_USER_AGENT = `@cmssy/core/${CMSSY_CORE_VERSION}`;
4
4
 
5
5
  // src/data/http.ts
package/dist/internal.cjs CHANGED
@@ -3,7 +3,7 @@
3
3
  var types = require('@cmssy/types');
4
4
 
5
5
  // src/version.ts
6
- var CMSSY_CORE_VERSION = "16.4.0" ;
6
+ var CMSSY_CORE_VERSION = "16.5.0" ;
7
7
  var CMSSY_USER_AGENT = `@cmssy/core/${CMSSY_CORE_VERSION}`;
8
8
 
9
9
  // src/data/http.ts
package/dist/internal.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { DEFAULT_LAYOUT_REGIONS } from '@cmssy/types';
2
2
 
3
3
  // src/version.ts
4
- var CMSSY_CORE_VERSION = "16.4.0" ;
4
+ var CMSSY_CORE_VERSION = "16.5.0" ;
5
5
  var CMSSY_USER_AGENT = `@cmssy/core/${CMSSY_CORE_VERSION}`;
6
6
 
7
7
  // src/data/http.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cmssy/core",
3
- "version": "16.4.0",
3
+ "version": "16.5.0",
4
4
  "description": "Framework-agnostic cmssy gateway: GraphQL client, block/field system, editor protocol. No React, no Next.",
5
5
  "keywords": [
6
6
  "cmssy",