@cmssy/react 0.1.2 → 0.1.4

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
@@ -393,6 +393,12 @@ var SITE_CONFIG_QUERY = `query PublicSiteConfig($workspaceSlug: String!) {
393
393
  enabledFeatures
394
394
  notFoundPageId
395
395
  previewUrl
396
+ branding {
397
+ brandName
398
+ logoUrl
399
+ faviconUrl
400
+ ogImageUrl
401
+ }
396
402
  }
397
403
  }`;
398
404
  var MODEL_DEFINITIONS_QUERY = `query PublicModelDefinitions($workspaceId: String!) {
@@ -415,7 +421,9 @@ var FORM_QUERY = `query PublicForm($formId: ID!) {
415
421
  description
416
422
  fields {
417
423
  id name fieldType label placeholder helpText
418
- defaultValue options validation width order showIf
424
+ defaultValue width order showIf
425
+ options { value label disabled }
426
+ validation { required minLength maxLength minValue maxValue pattern customMessage }
419
427
  }
420
428
  settings {
421
429
  actionType submitButtonLabel successMessage errorMessage
package/dist/index.d.cts CHANGED
@@ -69,6 +69,12 @@ interface CmssyClient {
69
69
  }
70
70
  declare function createCmssyClient(config: CmssyClientConfig): CmssyClient;
71
71
 
72
+ interface CmssyBranding {
73
+ brandName: string | null;
74
+ logoUrl: string | null;
75
+ faviconUrl: string | null;
76
+ ogImageUrl: string | null;
77
+ }
72
78
  interface CmssySiteConfig {
73
79
  id: string;
74
80
  workspaceId: string;
@@ -78,8 +84,9 @@ interface CmssySiteConfig {
78
84
  enabledFeatures: string[];
79
85
  notFoundPageId: string | null;
80
86
  previewUrl: string | null;
87
+ branding: CmssyBranding | null;
81
88
  }
82
- declare const SITE_CONFIG_QUERY = "query PublicSiteConfig($workspaceSlug: String!) {\n publicSiteConfig(workspaceSlug: $workspaceSlug) {\n id\n workspaceId\n siteName\n defaultLanguage\n enabledLanguages\n enabledFeatures\n notFoundPageId\n previewUrl\n }\n}";
89
+ declare const SITE_CONFIG_QUERY = "query PublicSiteConfig($workspaceSlug: String!) {\n publicSiteConfig(workspaceSlug: $workspaceSlug) {\n id\n workspaceId\n siteName\n defaultLanguage\n enabledLanguages\n enabledFeatures\n notFoundPageId\n previewUrl\n branding {\n brandName\n logoUrl\n faviconUrl\n ogImageUrl\n }\n }\n}";
83
90
  interface CmssyModelDefinition {
84
91
  id: string;
85
92
  name: string;
@@ -148,7 +155,7 @@ interface SubmitFormInput {
148
155
  data: Record<string, unknown>;
149
156
  website?: string;
150
157
  }
151
- declare const FORM_QUERY = "query PublicForm($formId: ID!) {\n publicForm(formId: $formId) {\n id\n name\n slug\n description\n fields {\n id name fieldType label placeholder helpText\n defaultValue options validation width order showIf\n }\n settings {\n actionType submitButtonLabel successMessage errorMessage\n redirectUrl requireLogin enableCaptcha\n }\n }\n}";
158
+ declare const FORM_QUERY = "query PublicForm($formId: ID!) {\n publicForm(formId: $formId) {\n id\n name\n slug\n description\n fields {\n id name fieldType label placeholder helpText\n defaultValue width order showIf\n options { value label disabled }\n validation { required minLength maxLength minValue maxValue pattern customMessage }\n }\n settings {\n actionType submitButtonLabel successMessage errorMessage\n redirectUrl requireLogin enableCaptcha\n }\n }\n}";
152
159
  declare const SUBMIT_FORM_MUTATION = "mutation SubmitForm($formId: ID!, $input: SubmitFormInput!) {\n submitForm(formId: $formId, input: $input) {\n success message submissionId redirectUrl accessToken customer\n }\n}";
153
160
 
154
161
  interface CmssyBlockProps {
@@ -168,4 +175,4 @@ interface UnknownBlockProps {
168
175
  }
169
176
  declare function UnknownBlock({ type }: UnknownBlockProps): react_jsx_runtime.JSX.Element;
170
177
 
171
- export { AppToEditorMessage, BlockDefinition, BlockMap, CmssyBlock, CmssyBlockContext, type CmssyBlockProps, type CmssyClient, CmssyClientConfig, type CmssyFormDefinition, type CmssyFormField, type CmssyFormSettings, type CmssyFormSubmitResponse, CmssyLayoutGroup, type CmssyModelDefinition, type CmssyModelRecord, CmssyPageData, type CmssyRecordList, CmssyServerLayout, type CmssyServerLayoutProps, CmssyServerPage, type CmssyServerPageProps, type CmssySiteConfig, EditorToAppMessage, FORM_QUERY, FetchLike, type FieldControl, FieldDefinition, type GraphqlRequestOptions, MODEL_DEFINITIONS_QUERY, MODEL_RECORDS_QUERY, type PostTarget, type QueryScopedOptions, RawBlock, SITE_CONFIG_QUERY, SUBMIT_FORM_MUTATION, type SubmitFormInput, UnknownBlock, type UnknownBlockProps, createCmssyClient, fields, getBlockContentForLanguage, graphqlRequest, normalizeOrigin, parseEditorMessage, postToEditor };
178
+ export { AppToEditorMessage, BlockDefinition, BlockMap, CmssyBlock, CmssyBlockContext, type CmssyBlockProps, type CmssyBranding, type CmssyClient, CmssyClientConfig, type CmssyFormDefinition, type CmssyFormField, type CmssyFormSettings, type CmssyFormSubmitResponse, CmssyLayoutGroup, type CmssyModelDefinition, type CmssyModelRecord, CmssyPageData, type CmssyRecordList, CmssyServerLayout, type CmssyServerLayoutProps, CmssyServerPage, type CmssyServerPageProps, type CmssySiteConfig, EditorToAppMessage, FORM_QUERY, FetchLike, type FieldControl, FieldDefinition, type GraphqlRequestOptions, MODEL_DEFINITIONS_QUERY, MODEL_RECORDS_QUERY, type PostTarget, type QueryScopedOptions, RawBlock, SITE_CONFIG_QUERY, SUBMIT_FORM_MUTATION, type SubmitFormInput, UnknownBlock, type UnknownBlockProps, createCmssyClient, fields, getBlockContentForLanguage, graphqlRequest, normalizeOrigin, parseEditorMessage, postToEditor };
package/dist/index.d.ts CHANGED
@@ -69,6 +69,12 @@ interface CmssyClient {
69
69
  }
70
70
  declare function createCmssyClient(config: CmssyClientConfig): CmssyClient;
71
71
 
72
+ interface CmssyBranding {
73
+ brandName: string | null;
74
+ logoUrl: string | null;
75
+ faviconUrl: string | null;
76
+ ogImageUrl: string | null;
77
+ }
72
78
  interface CmssySiteConfig {
73
79
  id: string;
74
80
  workspaceId: string;
@@ -78,8 +84,9 @@ interface CmssySiteConfig {
78
84
  enabledFeatures: string[];
79
85
  notFoundPageId: string | null;
80
86
  previewUrl: string | null;
87
+ branding: CmssyBranding | null;
81
88
  }
82
- declare const SITE_CONFIG_QUERY = "query PublicSiteConfig($workspaceSlug: String!) {\n publicSiteConfig(workspaceSlug: $workspaceSlug) {\n id\n workspaceId\n siteName\n defaultLanguage\n enabledLanguages\n enabledFeatures\n notFoundPageId\n previewUrl\n }\n}";
89
+ declare const SITE_CONFIG_QUERY = "query PublicSiteConfig($workspaceSlug: String!) {\n publicSiteConfig(workspaceSlug: $workspaceSlug) {\n id\n workspaceId\n siteName\n defaultLanguage\n enabledLanguages\n enabledFeatures\n notFoundPageId\n previewUrl\n branding {\n brandName\n logoUrl\n faviconUrl\n ogImageUrl\n }\n }\n}";
83
90
  interface CmssyModelDefinition {
84
91
  id: string;
85
92
  name: string;
@@ -148,7 +155,7 @@ interface SubmitFormInput {
148
155
  data: Record<string, unknown>;
149
156
  website?: string;
150
157
  }
151
- declare const FORM_QUERY = "query PublicForm($formId: ID!) {\n publicForm(formId: $formId) {\n id\n name\n slug\n description\n fields {\n id name fieldType label placeholder helpText\n defaultValue options validation width order showIf\n }\n settings {\n actionType submitButtonLabel successMessage errorMessage\n redirectUrl requireLogin enableCaptcha\n }\n }\n}";
158
+ declare const FORM_QUERY = "query PublicForm($formId: ID!) {\n publicForm(formId: $formId) {\n id\n name\n slug\n description\n fields {\n id name fieldType label placeholder helpText\n defaultValue width order showIf\n options { value label disabled }\n validation { required minLength maxLength minValue maxValue pattern customMessage }\n }\n settings {\n actionType submitButtonLabel successMessage errorMessage\n redirectUrl requireLogin enableCaptcha\n }\n }\n}";
152
159
  declare const SUBMIT_FORM_MUTATION = "mutation SubmitForm($formId: ID!, $input: SubmitFormInput!) {\n submitForm(formId: $formId, input: $input) {\n success message submissionId redirectUrl accessToken customer\n }\n}";
153
160
 
154
161
  interface CmssyBlockProps {
@@ -168,4 +175,4 @@ interface UnknownBlockProps {
168
175
  }
169
176
  declare function UnknownBlock({ type }: UnknownBlockProps): react_jsx_runtime.JSX.Element;
170
177
 
171
- export { AppToEditorMessage, BlockDefinition, BlockMap, CmssyBlock, CmssyBlockContext, type CmssyBlockProps, type CmssyClient, CmssyClientConfig, type CmssyFormDefinition, type CmssyFormField, type CmssyFormSettings, type CmssyFormSubmitResponse, CmssyLayoutGroup, type CmssyModelDefinition, type CmssyModelRecord, CmssyPageData, type CmssyRecordList, CmssyServerLayout, type CmssyServerLayoutProps, CmssyServerPage, type CmssyServerPageProps, type CmssySiteConfig, EditorToAppMessage, FORM_QUERY, FetchLike, type FieldControl, FieldDefinition, type GraphqlRequestOptions, MODEL_DEFINITIONS_QUERY, MODEL_RECORDS_QUERY, type PostTarget, type QueryScopedOptions, RawBlock, SITE_CONFIG_QUERY, SUBMIT_FORM_MUTATION, type SubmitFormInput, UnknownBlock, type UnknownBlockProps, createCmssyClient, fields, getBlockContentForLanguage, graphqlRequest, normalizeOrigin, parseEditorMessage, postToEditor };
178
+ export { AppToEditorMessage, BlockDefinition, BlockMap, CmssyBlock, CmssyBlockContext, type CmssyBlockProps, type CmssyBranding, type CmssyClient, CmssyClientConfig, type CmssyFormDefinition, type CmssyFormField, type CmssyFormSettings, type CmssyFormSubmitResponse, CmssyLayoutGroup, type CmssyModelDefinition, type CmssyModelRecord, CmssyPageData, type CmssyRecordList, CmssyServerLayout, type CmssyServerLayoutProps, CmssyServerPage, type CmssyServerPageProps, type CmssySiteConfig, EditorToAppMessage, FORM_QUERY, FetchLike, type FieldControl, FieldDefinition, type GraphqlRequestOptions, MODEL_DEFINITIONS_QUERY, MODEL_RECORDS_QUERY, type PostTarget, type QueryScopedOptions, RawBlock, SITE_CONFIG_QUERY, SUBMIT_FORM_MUTATION, type SubmitFormInput, UnknownBlock, type UnknownBlockProps, createCmssyClient, fields, getBlockContentForLanguage, graphqlRequest, normalizeOrigin, parseEditorMessage, postToEditor };
package/dist/index.js CHANGED
@@ -391,6 +391,12 @@ var SITE_CONFIG_QUERY = `query PublicSiteConfig($workspaceSlug: String!) {
391
391
  enabledFeatures
392
392
  notFoundPageId
393
393
  previewUrl
394
+ branding {
395
+ brandName
396
+ logoUrl
397
+ faviconUrl
398
+ ogImageUrl
399
+ }
394
400
  }
395
401
  }`;
396
402
  var MODEL_DEFINITIONS_QUERY = `query PublicModelDefinitions($workspaceId: String!) {
@@ -413,7 +419,9 @@ var FORM_QUERY = `query PublicForm($formId: ID!) {
413
419
  description
414
420
  fields {
415
421
  id name fieldType label placeholder helpText
416
- defaultValue options validation width order showIf
422
+ defaultValue width order showIf
423
+ options { value label disabled }
424
+ validation { required minLength maxLength minValue maxValue pattern customMessage }
417
425
  }
418
426
  settings {
419
427
  actionType submitButtonLabel successMessage errorMessage
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cmssy/react",
3
- "version": "0.1.2",
3
+ "version": "0.1.4",
4
4
  "description": "React blocks, renderers, data client and editor bridge for cmssy headless sites",
5
5
  "keywords": [
6
6
  "cmssy",