@cmssy/core 18.0.0 → 19.0.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/README.md +2 -1
- package/dist/index.cjs +20 -10
- package/dist/index.d.cts +5 -3
- package/dist/index.d.ts +5 -3
- package/dist/index.js +13 -13
- package/dist/internal/locale.cjs +4 -8
- package/dist/internal/locale.js +4 -8
- package/dist/internal.cjs +2 -8
- package/dist/internal.d.cts +1 -1
- package/dist/internal.d.ts +1 -1
- package/dist/internal.js +3 -9
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -38,7 +38,8 @@ cause.
|
|
|
38
38
|
|
|
39
39
|
`defineCmssyConfig`, `createCmssyClient`, `graphqlRequest` for the transport;
|
|
40
40
|
`fields` and `defineCmssyLayout` for block and layout definitions; `mediaUrl`,
|
|
41
|
-
`mediaUrls`, `mediaAlt`
|
|
41
|
+
`mediaUrls`, `mediaAlt`, `mediaType`, `mediaDuration` and the `MediaType`
|
|
42
|
+
vocabulary for media; `localizeHref`, `resolveCmssyLocale`,
|
|
42
43
|
`CMSSY_LOCALE_HEADER` for i18n; `applyCmssyCsp` and `verifyCmssyWebhook` for the
|
|
43
44
|
edges. Full signatures in
|
|
44
45
|
[docs/reference/sdk-api.md](https://github.com/cmssy-io/cmssy-sdk/blob/main/docs/reference/sdk-api.md).
|
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 = "
|
|
77
|
+
var CMSSY_CORE_VERSION = "19.0.0" ;
|
|
78
78
|
var CMSSY_USER_AGENT = `@cmssy/core/${CMSSY_CORE_VERSION}`;
|
|
79
79
|
|
|
80
80
|
// src/data/http.ts
|
|
@@ -429,8 +429,6 @@ function documentText(document2) {
|
|
|
429
429
|
"cmssy: could not read the query text off the given document"
|
|
430
430
|
);
|
|
431
431
|
}
|
|
432
|
-
|
|
433
|
-
// src/data/queries.ts
|
|
434
432
|
var SITE_CONFIG_QUERY = `query PublicSiteConfig($workspaceSlug: String!) {
|
|
435
433
|
public {
|
|
436
434
|
siteConfig(workspaceSlug: $workspaceSlug) {
|
|
@@ -443,11 +441,7 @@ var SITE_CONFIG_QUERY = `query PublicSiteConfig($workspaceSlug: String!) {
|
|
|
443
441
|
notFoundPageId
|
|
444
442
|
previewUrl
|
|
445
443
|
branding {
|
|
446
|
-
|
|
447
|
-
logoUrl
|
|
448
|
-
logoDarkUrl
|
|
449
|
-
faviconUrl
|
|
450
|
-
ogImageUrl
|
|
444
|
+
${types.brandingFieldNames.join("\n ")}
|
|
451
445
|
}
|
|
452
446
|
}
|
|
453
447
|
}
|
|
@@ -588,8 +582,6 @@ var fields = {
|
|
|
588
582
|
});
|
|
589
583
|
}
|
|
590
584
|
};
|
|
591
|
-
|
|
592
|
-
// src/media.ts
|
|
593
585
|
function mediaUrl(value) {
|
|
594
586
|
if (typeof value === "string") return value || null;
|
|
595
587
|
return value?.url ?? null;
|
|
@@ -601,6 +593,14 @@ function mediaUrls(value) {
|
|
|
601
593
|
function mediaAlt(value) {
|
|
602
594
|
return typeof value === "string" ? void 0 : value?.alt;
|
|
603
595
|
}
|
|
596
|
+
function mediaType(value) {
|
|
597
|
+
if (typeof value === "string") return void 0;
|
|
598
|
+
const type = value?.type;
|
|
599
|
+
return typeof type === "string" && types.mediaTypeValues.includes(type) ? type : void 0;
|
|
600
|
+
}
|
|
601
|
+
function mediaDuration(value) {
|
|
602
|
+
return typeof value === "string" ? void 0 : value?.duration;
|
|
603
|
+
}
|
|
604
604
|
function defineCmssyLayout(layout) {
|
|
605
605
|
const regions = layout.regions;
|
|
606
606
|
if (!Array.isArray(regions) || regions.length === 0) {
|
|
@@ -1109,10 +1109,18 @@ async function verifyCmssyWebhook(options) {
|
|
|
1109
1109
|
return parsed;
|
|
1110
1110
|
}
|
|
1111
1111
|
|
|
1112
|
+
Object.defineProperty(exports, "MediaType", {
|
|
1113
|
+
enumerable: true,
|
|
1114
|
+
get: function () { return types.MediaType; }
|
|
1115
|
+
});
|
|
1112
1116
|
Object.defineProperty(exports, "evaluateFieldConditionGroup", {
|
|
1113
1117
|
enumerable: true,
|
|
1114
1118
|
get: function () { return types.evaluateFieldConditionGroup; }
|
|
1115
1119
|
});
|
|
1120
|
+
Object.defineProperty(exports, "mediaTypeValues", {
|
|
1121
|
+
enumerable: true,
|
|
1122
|
+
get: function () { return types.mediaTypeValues; }
|
|
1123
|
+
});
|
|
1116
1124
|
exports.CMSSY_EDIT_HEADER = CMSSY_EDIT_HEADER;
|
|
1117
1125
|
exports.CMSSY_EDIT_QUERY_PARAM = CMSSY_EDIT_QUERY_PARAM;
|
|
1118
1126
|
exports.CMSSY_EDIT_TOKEN_HEADER = CMSSY_EDIT_TOKEN_HEADER;
|
|
@@ -1140,6 +1148,8 @@ exports.isVerifiedEditUrl = isVerifiedEditUrl;
|
|
|
1140
1148
|
exports.layoutRegionsToBridge = layoutRegionsToBridge;
|
|
1141
1149
|
exports.localizeHref = localizeHref;
|
|
1142
1150
|
exports.mediaAlt = mediaAlt;
|
|
1151
|
+
exports.mediaDuration = mediaDuration;
|
|
1152
|
+
exports.mediaType = mediaType;
|
|
1143
1153
|
exports.mediaUrl = mediaUrl;
|
|
1144
1154
|
exports.mediaUrls = mediaUrls;
|
|
1145
1155
|
exports.mintCmssyEditToken = mintCmssyEditToken;
|
package/dist/index.d.cts
CHANGED
|
@@ -2,8 +2,8 @@ export { A as AppToEditorMessage, B as BoundsMessage, C as ClickMessage, a as Cm
|
|
|
2
2
|
export { C as CMSSY_LOCALE_HEADER, G as GraphqlRequestOptions, g as graphqlRequest, l as localizeHref, r as resolveCmssyLocale } from './locale-JyBHqpAQ.cjs';
|
|
3
3
|
export { C as CMSSY_RATE_LIMIT_WINDOW_MS, a as CMSSY_RETRY_MODES, b as CmssyRequestError, c as CmssyRetryMode, D as DEFAULT_CMSSY_API_URL, F as FetchLike, d as FetchLikeResponse, e as FetchPageOptions, R as RetryOption, f as RetryPolicy } from './content-client-65N8ZRq9.cjs';
|
|
4
4
|
import * as _cmssy_types from '@cmssy/types';
|
|
5
|
-
import { FieldOptions, TypedField, FieldTypeValueMap, ResolvedMediaValue, PageRef, BlockPropsSchema, InferBlockContent, RelationMode, CmssyModelRecord, ResolvedMedia, BlockSchema, LayoutRegion, FieldDefinition, BlockMeta, VerifyCmssyWebhookOptions, CmssyWebhookEvent } from '@cmssy/types';
|
|
6
|
-
export { BlockMeta, BlockPropsSchema, BlockRect, BlockSchema, BuildBlockContextExtra, CmssyBlockAuthContext, CmssyBlockContext, CmssyBlockMember, CmssyBlockPage, CmssyBlockWorkspace, CmssyBranding, CmssyClientConfig, CmssyFormDefinition, CmssyFormField, CmssyFormSettings, CmssyFormSubmitResponse, CmssyLayoutGroup, CmssyLocaleContext, CmssyLocalizedValue, CmssyModelDefinition, CmssyModelRecord, CmssyPageData, CmssyPageMeta, CmssyPageSummary, CmssyRecordList, CmssySiteConfig, CmssyWebhookEvent, CmssyWebhookOrder, FieldCondition, FieldConditionGroup, FieldConditionLogic, FieldControl, FieldDefinition, FieldOptions, FieldType, FileFieldValue, InferBlockContent, LayoutRegion, LayoutRegionId, MediaTransform, RawBlock, RawLayoutBlock, ResolvedMedia, SubmitFormInput, TypedField, VerifyCmssyWebhookOptions, evaluateFieldConditionGroup } from '@cmssy/types';
|
|
5
|
+
import { FieldOptions, TypedField, FieldTypeValueMap, ResolvedMediaValue, PageRef, BlockPropsSchema, InferBlockContent, RelationMode, CmssyModelRecord, ResolvedMedia, MediaType, BlockSchema, LayoutRegion, FieldDefinition, BlockMeta, VerifyCmssyWebhookOptions, CmssyWebhookEvent } from '@cmssy/types';
|
|
6
|
+
export { BlockMeta, BlockPropsSchema, BlockRect, BlockSchema, BuildBlockContextExtra, CmssyBlockAuthContext, CmssyBlockContext, CmssyBlockMember, CmssyBlockPage, CmssyBlockWorkspace, CmssyBranding, CmssyClientConfig, CmssyFormDefinition, CmssyFormField, CmssyFormSettings, CmssyFormSubmitResponse, CmssyLayoutGroup, CmssyLocaleContext, CmssyLocalizedValue, CmssyModelDefinition, CmssyModelRecord, CmssyPageData, CmssyPageMeta, CmssyPageSummary, CmssyRecordList, CmssySiteConfig, CmssyWebhookEvent, CmssyWebhookOrder, FieldCondition, FieldConditionGroup, FieldConditionLogic, FieldControl, FieldDefinition, FieldOptions, FieldType, FileFieldValue, InferBlockContent, LayoutRegion, LayoutRegionId, MediaTransform, MediaType, RawBlock, RawLayoutBlock, ResolvedMedia, SubmitFormInput, TypedField, VerifyCmssyWebhookOptions, evaluateFieldConditionGroup, mediaTypeValues } from '@cmssy/types';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* Whether the content is guaranteed to carry the field. Only `required` says
|
|
@@ -87,6 +87,8 @@ type MediaLike = ResolvedMedia | string | null | undefined;
|
|
|
87
87
|
declare function mediaUrl(value: MediaLike): string | null;
|
|
88
88
|
declare function mediaUrls(value: readonly MediaLike[] | null | undefined): string[];
|
|
89
89
|
declare function mediaAlt(value: MediaLike): string | undefined;
|
|
90
|
+
declare function mediaType(value: MediaLike): MediaType | undefined;
|
|
91
|
+
declare function mediaDuration(value: MediaLike): number | undefined;
|
|
90
92
|
|
|
91
93
|
interface BlockManifestSource {
|
|
92
94
|
type: string;
|
|
@@ -153,4 +155,4 @@ declare class CmssyWebhookError extends Error {
|
|
|
153
155
|
}
|
|
154
156
|
declare function verifyCmssyWebhook(options: VerifyCmssyWebhookOptions): Promise<CmssyWebhookEvent>;
|
|
155
157
|
|
|
156
|
-
export { type BlockManifest, type BlockManifestBlock, type BlockManifestSource, CMSSY_EDIT_HEADER, CMSSY_EDIT_QUERY_PARAM, CMSSY_EDIT_TOKEN_HEADER, CMSSY_SECRET_QUERY_PARAM, CmssyWebhookError, type MediaLike, type MintCmssyEditTokenOptions, type VerifyCmssyEditTokenOptions, blocksToMeta, blocksToSchemas, buildBlockManifest, fields, isVerifiedEditUrl, layoutRegionsToBridge, mediaAlt, mediaUrl, mediaUrls, mintCmssyEditToken, propsToSchema, registryToManifestBlocks, verifyCmssyEditToken, verifyCmssyWebhook };
|
|
158
|
+
export { type BlockManifest, type BlockManifestBlock, type BlockManifestSource, CMSSY_EDIT_HEADER, CMSSY_EDIT_QUERY_PARAM, CMSSY_EDIT_TOKEN_HEADER, CMSSY_SECRET_QUERY_PARAM, CmssyWebhookError, type MediaLike, type MintCmssyEditTokenOptions, type VerifyCmssyEditTokenOptions, blocksToMeta, blocksToSchemas, buildBlockManifest, fields, isVerifiedEditUrl, layoutRegionsToBridge, mediaAlt, mediaDuration, mediaType, mediaUrl, mediaUrls, mintCmssyEditToken, propsToSchema, registryToManifestBlocks, verifyCmssyEditToken, verifyCmssyWebhook };
|
package/dist/index.d.ts
CHANGED
|
@@ -2,8 +2,8 @@ export { A as AppToEditorMessage, B as BoundsMessage, C as ClickMessage, a as Cm
|
|
|
2
2
|
export { C as CMSSY_LOCALE_HEADER, G as GraphqlRequestOptions, g as graphqlRequest, l as localizeHref, r as resolveCmssyLocale } from './locale-D9KI4bND.js';
|
|
3
3
|
export { C as CMSSY_RATE_LIMIT_WINDOW_MS, a as CMSSY_RETRY_MODES, b as CmssyRequestError, c as CmssyRetryMode, D as DEFAULT_CMSSY_API_URL, F as FetchLike, d as FetchLikeResponse, e as FetchPageOptions, R as RetryOption, f as RetryPolicy } from './content-client-65N8ZRq9.js';
|
|
4
4
|
import * as _cmssy_types from '@cmssy/types';
|
|
5
|
-
import { FieldOptions, TypedField, FieldTypeValueMap, ResolvedMediaValue, PageRef, BlockPropsSchema, InferBlockContent, RelationMode, CmssyModelRecord, ResolvedMedia, BlockSchema, LayoutRegion, FieldDefinition, BlockMeta, VerifyCmssyWebhookOptions, CmssyWebhookEvent } from '@cmssy/types';
|
|
6
|
-
export { BlockMeta, BlockPropsSchema, BlockRect, BlockSchema, BuildBlockContextExtra, CmssyBlockAuthContext, CmssyBlockContext, CmssyBlockMember, CmssyBlockPage, CmssyBlockWorkspace, CmssyBranding, CmssyClientConfig, CmssyFormDefinition, CmssyFormField, CmssyFormSettings, CmssyFormSubmitResponse, CmssyLayoutGroup, CmssyLocaleContext, CmssyLocalizedValue, CmssyModelDefinition, CmssyModelRecord, CmssyPageData, CmssyPageMeta, CmssyPageSummary, CmssyRecordList, CmssySiteConfig, CmssyWebhookEvent, CmssyWebhookOrder, FieldCondition, FieldConditionGroup, FieldConditionLogic, FieldControl, FieldDefinition, FieldOptions, FieldType, FileFieldValue, InferBlockContent, LayoutRegion, LayoutRegionId, MediaTransform, RawBlock, RawLayoutBlock, ResolvedMedia, SubmitFormInput, TypedField, VerifyCmssyWebhookOptions, evaluateFieldConditionGroup } from '@cmssy/types';
|
|
5
|
+
import { FieldOptions, TypedField, FieldTypeValueMap, ResolvedMediaValue, PageRef, BlockPropsSchema, InferBlockContent, RelationMode, CmssyModelRecord, ResolvedMedia, MediaType, BlockSchema, LayoutRegion, FieldDefinition, BlockMeta, VerifyCmssyWebhookOptions, CmssyWebhookEvent } from '@cmssy/types';
|
|
6
|
+
export { BlockMeta, BlockPropsSchema, BlockRect, BlockSchema, BuildBlockContextExtra, CmssyBlockAuthContext, CmssyBlockContext, CmssyBlockMember, CmssyBlockPage, CmssyBlockWorkspace, CmssyBranding, CmssyClientConfig, CmssyFormDefinition, CmssyFormField, CmssyFormSettings, CmssyFormSubmitResponse, CmssyLayoutGroup, CmssyLocaleContext, CmssyLocalizedValue, CmssyModelDefinition, CmssyModelRecord, CmssyPageData, CmssyPageMeta, CmssyPageSummary, CmssyRecordList, CmssySiteConfig, CmssyWebhookEvent, CmssyWebhookOrder, FieldCondition, FieldConditionGroup, FieldConditionLogic, FieldControl, FieldDefinition, FieldOptions, FieldType, FileFieldValue, InferBlockContent, LayoutRegion, LayoutRegionId, MediaTransform, MediaType, RawBlock, RawLayoutBlock, ResolvedMedia, SubmitFormInput, TypedField, VerifyCmssyWebhookOptions, evaluateFieldConditionGroup, mediaTypeValues } from '@cmssy/types';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* Whether the content is guaranteed to carry the field. Only `required` says
|
|
@@ -87,6 +87,8 @@ type MediaLike = ResolvedMedia | string | null | undefined;
|
|
|
87
87
|
declare function mediaUrl(value: MediaLike): string | null;
|
|
88
88
|
declare function mediaUrls(value: readonly MediaLike[] | null | undefined): string[];
|
|
89
89
|
declare function mediaAlt(value: MediaLike): string | undefined;
|
|
90
|
+
declare function mediaType(value: MediaLike): MediaType | undefined;
|
|
91
|
+
declare function mediaDuration(value: MediaLike): number | undefined;
|
|
90
92
|
|
|
91
93
|
interface BlockManifestSource {
|
|
92
94
|
type: string;
|
|
@@ -153,4 +155,4 @@ declare class CmssyWebhookError extends Error {
|
|
|
153
155
|
}
|
|
154
156
|
declare function verifyCmssyWebhook(options: VerifyCmssyWebhookOptions): Promise<CmssyWebhookEvent>;
|
|
155
157
|
|
|
156
|
-
export { type BlockManifest, type BlockManifestBlock, type BlockManifestSource, CMSSY_EDIT_HEADER, CMSSY_EDIT_QUERY_PARAM, CMSSY_EDIT_TOKEN_HEADER, CMSSY_SECRET_QUERY_PARAM, CmssyWebhookError, type MediaLike, type MintCmssyEditTokenOptions, type VerifyCmssyEditTokenOptions, blocksToMeta, blocksToSchemas, buildBlockManifest, fields, isVerifiedEditUrl, layoutRegionsToBridge, mediaAlt, mediaUrl, mediaUrls, mintCmssyEditToken, propsToSchema, registryToManifestBlocks, verifyCmssyEditToken, verifyCmssyWebhook };
|
|
158
|
+
export { type BlockManifest, type BlockManifestBlock, type BlockManifestSource, CMSSY_EDIT_HEADER, CMSSY_EDIT_QUERY_PARAM, CMSSY_EDIT_TOKEN_HEADER, CMSSY_SECRET_QUERY_PARAM, CmssyWebhookError, type MediaLike, type MintCmssyEditTokenOptions, type VerifyCmssyEditTokenOptions, blocksToMeta, blocksToSchemas, buildBlockManifest, fields, isVerifiedEditUrl, layoutRegionsToBridge, mediaAlt, mediaDuration, mediaType, mediaUrl, mediaUrls, mintCmssyEditToken, propsToSchema, registryToManifestBlocks, verifyCmssyEditToken, verifyCmssyWebhook };
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { LAYOUT_REGIONS_MAX, LAYOUT_REGION_ID_PATTERN, LAYOUT_REGION_LABEL_MAX } from '@cmssy/types';
|
|
2
|
-
export { evaluateFieldConditionGroup } from '@cmssy/types';
|
|
1
|
+
import { brandingFieldNames, mediaTypeValues, LAYOUT_REGIONS_MAX, LAYOUT_REGION_ID_PATTERN, LAYOUT_REGION_LABEL_MAX } from '@cmssy/types';
|
|
2
|
+
export { MediaType, evaluateFieldConditionGroup, mediaTypeValues } from '@cmssy/types';
|
|
3
3
|
|
|
4
4
|
// src/config.ts
|
|
5
5
|
var DEFAULT_CMSSY_EDITOR_ORIGINS = [
|
|
@@ -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 = "
|
|
76
|
+
var CMSSY_CORE_VERSION = "19.0.0" ;
|
|
77
77
|
var CMSSY_USER_AGENT = `@cmssy/core/${CMSSY_CORE_VERSION}`;
|
|
78
78
|
|
|
79
79
|
// src/data/http.ts
|
|
@@ -428,8 +428,6 @@ function documentText(document2) {
|
|
|
428
428
|
"cmssy: could not read the query text off the given document"
|
|
429
429
|
);
|
|
430
430
|
}
|
|
431
|
-
|
|
432
|
-
// src/data/queries.ts
|
|
433
431
|
var SITE_CONFIG_QUERY = `query PublicSiteConfig($workspaceSlug: String!) {
|
|
434
432
|
public {
|
|
435
433
|
siteConfig(workspaceSlug: $workspaceSlug) {
|
|
@@ -442,11 +440,7 @@ var SITE_CONFIG_QUERY = `query PublicSiteConfig($workspaceSlug: String!) {
|
|
|
442
440
|
notFoundPageId
|
|
443
441
|
previewUrl
|
|
444
442
|
branding {
|
|
445
|
-
|
|
446
|
-
logoUrl
|
|
447
|
-
logoDarkUrl
|
|
448
|
-
faviconUrl
|
|
449
|
-
ogImageUrl
|
|
443
|
+
${brandingFieldNames.join("\n ")}
|
|
450
444
|
}
|
|
451
445
|
}
|
|
452
446
|
}
|
|
@@ -587,8 +581,6 @@ var fields = {
|
|
|
587
581
|
});
|
|
588
582
|
}
|
|
589
583
|
};
|
|
590
|
-
|
|
591
|
-
// src/media.ts
|
|
592
584
|
function mediaUrl(value) {
|
|
593
585
|
if (typeof value === "string") return value || null;
|
|
594
586
|
return value?.url ?? null;
|
|
@@ -600,6 +592,14 @@ function mediaUrls(value) {
|
|
|
600
592
|
function mediaAlt(value) {
|
|
601
593
|
return typeof value === "string" ? void 0 : value?.alt;
|
|
602
594
|
}
|
|
595
|
+
function mediaType(value) {
|
|
596
|
+
if (typeof value === "string") return void 0;
|
|
597
|
+
const type = value?.type;
|
|
598
|
+
return typeof type === "string" && mediaTypeValues.includes(type) ? type : void 0;
|
|
599
|
+
}
|
|
600
|
+
function mediaDuration(value) {
|
|
601
|
+
return typeof value === "string" ? void 0 : value?.duration;
|
|
602
|
+
}
|
|
603
603
|
function defineCmssyLayout(layout) {
|
|
604
604
|
const regions = layout.regions;
|
|
605
605
|
if (!Array.isArray(regions) || regions.length === 0) {
|
|
@@ -1108,4 +1108,4 @@ async function verifyCmssyWebhook(options) {
|
|
|
1108
1108
|
return parsed;
|
|
1109
1109
|
}
|
|
1110
1110
|
|
|
1111
|
-
export { CMSSY_EDIT_HEADER, CMSSY_EDIT_QUERY_PARAM, CMSSY_EDIT_TOKEN_HEADER, CMSSY_LOCALE_HEADER, CMSSY_RATE_LIMIT_WINDOW_MS, CMSSY_RETRY_MODES, CMSSY_SECRET_QUERY_PARAM, CmssyRequestError, CmssyWebhookError, DEFAULT_CMSSY_API_URL, DEFAULT_CMSSY_EDITOR_ORIGINS, PROTOCOL_VERSION, SHORTCUT_ACTIONS, applyCmssyCsp, blocksToMeta, blocksToSchemas, buildBlockManifest, createCmssyClient, defineCmssyConfig, defineCmssyLayout, fields, graphqlRequest, isProtocolCompatible, isVerifiedEditUrl, layoutRegionsToBridge, localizeHref, mediaAlt, mediaUrl, mediaUrls, mintCmssyEditToken, normalizeOrigin, parseEditorMessage, postToEditor, propsToSchema, registryToManifestBlocks, resolveCmssyLocale, resolveEditorOrigin, verifyCmssyEditToken, verifyCmssyWebhook };
|
|
1111
|
+
export { CMSSY_EDIT_HEADER, CMSSY_EDIT_QUERY_PARAM, CMSSY_EDIT_TOKEN_HEADER, CMSSY_LOCALE_HEADER, CMSSY_RATE_LIMIT_WINDOW_MS, CMSSY_RETRY_MODES, CMSSY_SECRET_QUERY_PARAM, CmssyRequestError, CmssyWebhookError, DEFAULT_CMSSY_API_URL, DEFAULT_CMSSY_EDITOR_ORIGINS, PROTOCOL_VERSION, SHORTCUT_ACTIONS, applyCmssyCsp, blocksToMeta, blocksToSchemas, buildBlockManifest, createCmssyClient, defineCmssyConfig, defineCmssyLayout, fields, graphqlRequest, isProtocolCompatible, isVerifiedEditUrl, layoutRegionsToBridge, localizeHref, mediaAlt, mediaDuration, mediaType, mediaUrl, mediaUrls, mintCmssyEditToken, normalizeOrigin, parseEditorMessage, postToEditor, propsToSchema, registryToManifestBlocks, resolveCmssyLocale, resolveEditorOrigin, verifyCmssyEditToken, verifyCmssyWebhook };
|
package/dist/internal/locale.cjs
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
var types = require('@cmssy/types');
|
|
4
|
+
|
|
3
5
|
// src/version.ts
|
|
4
|
-
var CMSSY_CORE_VERSION = "
|
|
6
|
+
var CMSSY_CORE_VERSION = "19.0.0" ;
|
|
5
7
|
var CMSSY_USER_AGENT = `@cmssy/core/${CMSSY_CORE_VERSION}`;
|
|
6
8
|
|
|
7
9
|
// src/data/http.ts
|
|
@@ -208,8 +210,6 @@ async function graphqlRequest(config, query, variables, options = {}, label = "r
|
|
|
208
210
|
label
|
|
209
211
|
});
|
|
210
212
|
}
|
|
211
|
-
|
|
212
|
-
// src/data/queries.ts
|
|
213
213
|
var SITE_CONFIG_QUERY = `query PublicSiteConfig($workspaceSlug: String!) {
|
|
214
214
|
public {
|
|
215
215
|
siteConfig(workspaceSlug: $workspaceSlug) {
|
|
@@ -222,11 +222,7 @@ var SITE_CONFIG_QUERY = `query PublicSiteConfig($workspaceSlug: String!) {
|
|
|
222
222
|
notFoundPageId
|
|
223
223
|
previewUrl
|
|
224
224
|
branding {
|
|
225
|
-
|
|
226
|
-
logoUrl
|
|
227
|
-
logoDarkUrl
|
|
228
|
-
faviconUrl
|
|
229
|
-
ogImageUrl
|
|
225
|
+
${types.brandingFieldNames.join("\n ")}
|
|
230
226
|
}
|
|
231
227
|
}
|
|
232
228
|
}
|
package/dist/internal/locale.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import { brandingFieldNames } from '@cmssy/types';
|
|
2
|
+
|
|
1
3
|
// src/version.ts
|
|
2
|
-
var CMSSY_CORE_VERSION = "
|
|
4
|
+
var CMSSY_CORE_VERSION = "19.0.0" ;
|
|
3
5
|
var CMSSY_USER_AGENT = `@cmssy/core/${CMSSY_CORE_VERSION}`;
|
|
4
6
|
|
|
5
7
|
// src/data/http.ts
|
|
@@ -206,8 +208,6 @@ async function graphqlRequest(config, query, variables, options = {}, label = "r
|
|
|
206
208
|
label
|
|
207
209
|
});
|
|
208
210
|
}
|
|
209
|
-
|
|
210
|
-
// src/data/queries.ts
|
|
211
211
|
var SITE_CONFIG_QUERY = `query PublicSiteConfig($workspaceSlug: String!) {
|
|
212
212
|
public {
|
|
213
213
|
siteConfig(workspaceSlug: $workspaceSlug) {
|
|
@@ -220,11 +220,7 @@ var SITE_CONFIG_QUERY = `query PublicSiteConfig($workspaceSlug: String!) {
|
|
|
220
220
|
notFoundPageId
|
|
221
221
|
previewUrl
|
|
222
222
|
branding {
|
|
223
|
-
|
|
224
|
-
logoUrl
|
|
225
|
-
logoDarkUrl
|
|
226
|
-
faviconUrl
|
|
227
|
-
ogImageUrl
|
|
223
|
+
${brandingFieldNames.join("\n ")}
|
|
228
224
|
}
|
|
229
225
|
}
|
|
230
226
|
}
|
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 = "
|
|
6
|
+
var CMSSY_CORE_VERSION = "19.0.0" ;
|
|
7
7
|
var CMSSY_USER_AGENT = `@cmssy/core/${CMSSY_CORE_VERSION}`;
|
|
8
8
|
|
|
9
9
|
// src/data/http.ts
|
|
@@ -427,8 +427,6 @@ async function graphqlRequest(config, query, variables, options = {}, label = "r
|
|
|
427
427
|
label
|
|
428
428
|
});
|
|
429
429
|
}
|
|
430
|
-
|
|
431
|
-
// src/data/queries.ts
|
|
432
430
|
var SITE_CONFIG_QUERY = `query PublicSiteConfig($workspaceSlug: String!) {
|
|
433
431
|
public {
|
|
434
432
|
siteConfig(workspaceSlug: $workspaceSlug) {
|
|
@@ -441,11 +439,7 @@ var SITE_CONFIG_QUERY = `query PublicSiteConfig($workspaceSlug: String!) {
|
|
|
441
439
|
notFoundPageId
|
|
442
440
|
previewUrl
|
|
443
441
|
branding {
|
|
444
|
-
|
|
445
|
-
logoUrl
|
|
446
|
-
logoDarkUrl
|
|
447
|
-
faviconUrl
|
|
448
|
-
ogImageUrl
|
|
442
|
+
${types.brandingFieldNames.join("\n ")}
|
|
449
443
|
}
|
|
450
444
|
}
|
|
451
445
|
}
|
package/dist/internal.d.cts
CHANGED
|
@@ -7,7 +7,7 @@ import { Q as QueryScopedOptions } from './csp-BHjoSZ2p.cjs';
|
|
|
7
7
|
export { F as cmssyCspHeaders, G as isDevelopment, H as layoutRegionIds, J as resolveInitialTarget, K as toCspOrigin } from './csp-BHjoSZ2p.cjs';
|
|
8
8
|
export { localizedPath } from './internal/locale.cjs';
|
|
9
9
|
|
|
10
|
-
declare const SITE_CONFIG_QUERY
|
|
10
|
+
declare const SITE_CONFIG_QUERY: string;
|
|
11
11
|
declare const MODEL_DEFINITIONS_QUERY = "query PublicModelDefinitions($workspaceId: String!) {\n public {\n model {\n definitions(workspaceId: $workspaceId) {\n id name slug description icon color displayField recordCount\n }\n }\n }\n}";
|
|
12
12
|
declare const MODEL_RECORDS_QUERY = "query PublicModelRecords($workspaceId: String!, $modelSlug: String!, $filter: JSON, $sort: String, $locale: String, $limit: Int, $offset: Int, $populate: [String!]) {\n public {\n model {\n records(workspaceId: $workspaceId, modelSlug: $modelSlug, filter: $filter, sort: $sort, locale: $locale, limit: $limit, offset: $offset, populate: $populate) {\n items { id modelId data status createdAt updatedAt }\n total\n hasMore\n }\n }\n }\n}";
|
|
13
13
|
declare const FORM_QUERY = "query PublicForm($formId: ID!) {\n public {\n form {\n get(formId: $formId) {\n id\n name\n slug\n description\n fields {\n id name fieldType label placeholder helpText\n defaultValue width order showWhen requiredWhen\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\n }\n }\n }\n }\n}";
|
package/dist/internal.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ import { Q as QueryScopedOptions } from './csp-COFMUmsq.js';
|
|
|
7
7
|
export { F as cmssyCspHeaders, G as isDevelopment, H as layoutRegionIds, J as resolveInitialTarget, K as toCspOrigin } from './csp-COFMUmsq.js';
|
|
8
8
|
export { localizedPath } from './internal/locale.js';
|
|
9
9
|
|
|
10
|
-
declare const SITE_CONFIG_QUERY
|
|
10
|
+
declare const SITE_CONFIG_QUERY: string;
|
|
11
11
|
declare const MODEL_DEFINITIONS_QUERY = "query PublicModelDefinitions($workspaceId: String!) {\n public {\n model {\n definitions(workspaceId: $workspaceId) {\n id name slug description icon color displayField recordCount\n }\n }\n }\n}";
|
|
12
12
|
declare const MODEL_RECORDS_QUERY = "query PublicModelRecords($workspaceId: String!, $modelSlug: String!, $filter: JSON, $sort: String, $locale: String, $limit: Int, $offset: Int, $populate: [String!]) {\n public {\n model {\n records(workspaceId: $workspaceId, modelSlug: $modelSlug, filter: $filter, sort: $sort, locale: $locale, limit: $limit, offset: $offset, populate: $populate) {\n items { id modelId data status createdAt updatedAt }\n total\n hasMore\n }\n }\n }\n}";
|
|
13
13
|
declare const FORM_QUERY = "query PublicForm($formId: ID!) {\n public {\n form {\n get(formId: $formId) {\n id\n name\n slug\n description\n fields {\n id name fieldType label placeholder helpText\n defaultValue width order showWhen requiredWhen\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\n }\n }\n }\n }\n}";
|
package/dist/internal.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { DEFAULT_LAYOUT_REGIONS } from '@cmssy/types';
|
|
1
|
+
import { brandingFieldNames, DEFAULT_LAYOUT_REGIONS } from '@cmssy/types';
|
|
2
2
|
|
|
3
3
|
// src/version.ts
|
|
4
|
-
var CMSSY_CORE_VERSION = "
|
|
4
|
+
var CMSSY_CORE_VERSION = "19.0.0" ;
|
|
5
5
|
var CMSSY_USER_AGENT = `@cmssy/core/${CMSSY_CORE_VERSION}`;
|
|
6
6
|
|
|
7
7
|
// src/data/http.ts
|
|
@@ -425,8 +425,6 @@ async function graphqlRequest(config, query, variables, options = {}, label = "r
|
|
|
425
425
|
label
|
|
426
426
|
});
|
|
427
427
|
}
|
|
428
|
-
|
|
429
|
-
// src/data/queries.ts
|
|
430
428
|
var SITE_CONFIG_QUERY = `query PublicSiteConfig($workspaceSlug: String!) {
|
|
431
429
|
public {
|
|
432
430
|
siteConfig(workspaceSlug: $workspaceSlug) {
|
|
@@ -439,11 +437,7 @@ var SITE_CONFIG_QUERY = `query PublicSiteConfig($workspaceSlug: String!) {
|
|
|
439
437
|
notFoundPageId
|
|
440
438
|
previewUrl
|
|
441
439
|
branding {
|
|
442
|
-
|
|
443
|
-
logoUrl
|
|
444
|
-
logoDarkUrl
|
|
445
|
-
faviconUrl
|
|
446
|
-
ogImageUrl
|
|
440
|
+
${brandingFieldNames.join("\n ")}
|
|
447
441
|
}
|
|
448
442
|
}
|
|
449
443
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cmssy/core",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "19.0.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",
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
"vitest": "^2.1.0"
|
|
88
88
|
},
|
|
89
89
|
"dependencies": {
|
|
90
|
-
"@cmssy/types": "0.
|
|
90
|
+
"@cmssy/types": "0.58.0",
|
|
91
91
|
"jose": "^6.2.3"
|
|
92
92
|
},
|
|
93
93
|
"scripts": {
|