@relyio/sdk 0.3.0 → 0.4.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.d.ts CHANGED
@@ -1,9 +1,9 @@
1
- export { N as AdhocAggregateBlock, M as AdhocFetchBlock, L as AdhocQueryBuilder, K as AdhocQueryClient, W as AdhocQueryDefinition, X as AdhocQueryOptions, Z as AdhocQueryResult, P as AdhocSearchBlock, Q as AdhocSimilarBlock, O as AggregateMetric, _ as AssetClient, a8 as AssetEntryResponse, a5 as AssetFileBlock, $ as AssetFileBuilder, a6 as AssetFileExtracted, a0 as AssetUploadBuilder, a7 as AssetUrls, a2 as AssetVisibility, A as AutocompleteBuilder, t as AutocompleteResponse, s as AutocompleteSuggestion, y as BatchBuilder, B as BatchClient, z as BatchMethod, D as BatchOperation, G as BatchOperationResult, F as BatchOptions, J as BatchResponse, I as BatchSummary, j as ChildrenOptions, C as ClientSchema, b as ConditionalWriteOptions, ac as ConfirmInput, ad as ConfirmResult, i as ContentByIdBuilder, d as ContentClient, h as ContentQueryBuilder, ag as CreateAssetOptions, E as ExtendedQueryResult, a4 as FileBackend, am as FileErrorCode, a3 as FileStatus, an as FileUploadError, ap as FileValidationConstraints, ao as FileValidationError, U as FilterValue, V as FullTextConfig, H as HttpClient, ai as MultipartCreateResult, aj as MultipartPart, ak as MultipartTarget, a9 as PopulatedAssetReference, aa as PresignInput, ab as PresignResult, Y as QueryMetadata, ae as ResolveUrlInput, af as ResolveUrlResult, R as RetryableWriteOptions, n as SearchBuilder, m as SearchClient, x as SearchFields, w as SearchFilter, p as SearchMode, r as SearchResponse, q as SearchResultItem, S as SendOptions, g as SettingsClient, l as SettingsFetchOptions, o as SimilarBuilder, v as SimilarResponse, u as SimilarResult, f as SingletonClient, k as SingletonFetchOptions, a as TypedClientConfig, T as TypedRelyIOClient, al as UploadProgress, ah as WaitUntilReadyOptions, c as createClient, c as default, e as entityTagOf, a1 as isAssetEntry, aq as validateFile } from './index-Dx01iwaf.js';
1
+ export { W as AdhocAggregateBlock, V as AdhocFetchBlock, U as AdhocQueryBuilder, Q as AdhocQueryClient, a0 as AdhocQueryDefinition, a1 as AdhocQueryOptions, a3 as AdhocQueryResult, Y as AdhocSearchBlock, Z as AdhocSimilarBlock, X as AggregateMetric, a4 as AssetClient, ae as AssetEntryResponse, ab as AssetFileBlock, a5 as AssetFileBuilder, ac as AssetFileExtracted, a6 as AssetUploadBuilder, ad as AssetUrls, a8 as AssetVisibility, A as AutocompleteBuilder, z as AutocompleteResponse, y as AutocompleteSuggestion, J as BatchBuilder, I as BatchClient, K as BatchMethod, L as BatchOperation, N as BatchOperationResult, M as BatchOptions, P as BatchResponse, O as BatchSummary, h as Change, g as ChangesExpiredError, j as ChangesExpiredReason, i as ChangesOptions, p as ChildrenOptions, C as ClientSchema, d as ConditionalWriteOptions, ai as ConfirmInput, aj as ConfirmResult, o as ContentByIdBuilder, k as ContentClient, n as ContentQueryBuilder, am as CreateAssetOptions, E as ExtendedQueryResult, aa as FileBackend, aw as FileErrorCode, a9 as FileStatus, ax as FileUploadError, az as FileValidationConstraints, ay as FileValidationError, _ as FilterValue, $ as FullTextConfig, H as HttpClient, ao as MultipartCreateResult, ap as MultipartPart, aq as MultipartTarget, af as PopulatedAssetReference, ag as PresignInput, ah as PresignResult, a2 as QueryMetadata, R as Register, b as RegisteredSchema, ak as ResolveUrlInput, al as ResolveUrlResult, at as ResourceConflictError, au as ResourceExpiredError, as as ResourceNotFoundError, f as RetryableWriteOptions, t as SearchBuilder, s as SearchClient, G as SearchFields, F as SearchFilter, v as SearchMode, x as SearchResponse, w as SearchResultItem, S as SendOptions, m as SettingsClient, r as SettingsFetchOptions, u as SimilarBuilder, D as SimilarResponse, B as SimilarResult, l as SingletonClient, q as SingletonFetchOptions, a as TypedClientConfig, T as TypedRelyIOClient, ar as UploadProgress, an as WaitUntilReadyOptions, c as createClient, c as default, e as entityTagOf, a7 as isAssetEntry, av as isResourceNotFound, aA as validateFile } from './index-BzOFJJKS.js';
2
2
  export { fields } from './schema/index.js';
3
- import { S as SDKError } from './index-DuEhsGdE.js';
4
- export { a as ApiMethod, A as ApiPath, r as ApiResponse, b as ApiSuccessBody, B as BaseContent, v as BaseValidationError, o as CacheConfig, t as CacheStrategy, f as ContentQueryResult, j as ContentTypeSchema, C as CreateInput, i as CustomQuery, D as DebugConfig, E as Environment, k as FieldOptions, F as FieldTypeName, z as InvalidFieldTypeError, I as InvalidPayloadError, L as LogLevel, P as PerformanceMetrics, Q as QueryOptions, p as RealtimeConfig, m as RealtimeEvent, l as RealtimeEventType, R as RelyIOConfig, q as RequestConfig, y as RequiredFieldError, s as RetryConfig, x as SchemaValidationError, h as SettingsGroup, g as SingletonContent, e as SortOptions, n as SubscriptionOptions, U as UpdateInput, w as ValidationError, V as ValidationRule, u as ValidationViolation, c as WhereClause, d as WhereOperator, W as Wire } from './index-DuEhsGdE.js';
3
+ import { S as SDKError, B as BaseContent } from './index-FDak5ofk.js';
4
+ export { a as ApiMethod, A as ApiPath, t as ApiResponse, b as ApiSuccessBody, x as BaseValidationError, q as CacheConfig, v as CacheStrategy, g as ContentQueryResult, k as ContentTypeSchema, C as CreateInput, j as CustomQuery, D as DebugConfig, E as Environment, l as FieldOptions, F as FieldTypeName, H as InvalidFieldTypeError, I as InvalidPayloadError, L as LogLevel, M as MatchRouteOptions, P as PerformanceMetrics, Q as QueryOptions, r as RealtimeConfig, o as RealtimeEvent, n as RealtimeEventType, R as RelyIOConfig, s as RequestConfig, G as RequiredFieldError, u as RetryConfig, c as RouteMatch, z as SchemaValidationError, i as SettingsGroup, h as SingletonContent, f as SortOptions, p as SubscriptionOptions, U as UpdateInput, y as ValidationError, V as ValidationRule, w as ValidationViolation, d as WhereClause, e as WhereOperator, W as Wire, m as matchRoute } from './index-FDak5ofk.js';
5
5
  export { camelToSnake, createDeferred, debounce, deepClone, generateId, isBrowser, isNode, isPlainObject, isValidEmail, isValidUrl, mergeDeep, omit, pick, retry, sleep, snakeToCamel, throttle, toSafeString } from './utils/index.js';
6
- export { ax as AggregateBlock, G as AssetTypeConfig, K as AssetTypeDefinition, C as ComponentConfig, v as ComponentDefinition, w as ComponentMetadata, aw as FetchBlock, O as FileKindConfig, a3 as FileScanConfig, a2 as FileUploadConfig, aH as FilterDefinition, X as ImageExifConfig, N as ImageKindConfig, W as ImageSourceConfig, U as ImageUploadConfig, aF as IncludeDefinition, M as InferAssetType, aR as InferQueryParams, aQ as InferQueryResponse, t as InferSingleton, I as InferSingletonContentType, au as QueryConfig, av as QueryDefinition, h as SchemaAssetTypeNames, S as SchemaConfig, b as SchemaContentTypeNames, a as SchemaDefinition, f as SchemaLocaleCodes, e as SchemaQueryNames, g as SchemaSettingsGroupNames, c as SchemaSingletonNames, ay as SearchBlock, aG as SelectMapping, A as SettingsGroupConfig, B as SettingsGroupDefinition, az as SimilarBlock, r as SingletonContentTypeDefinition, s as SingletonMetadata, aD as SortCondition, Y as VariantDefinition, $ as VideoCaptionsConfig, a0 as VideoDownloadConfig, V as VideoKindConfig, _ as VideoPosterConfig, Z as VideoUploadConfig, a1 as VideoWatermarkConfig, aA as WhereCondition, F as defineAssetType, u as defineComponent, at as defineQuery, d as defineSchema, z as defineSettingsGroup, q as defineSingleton, p as defineSingletonContentType } from './define-schema-BD6HSPnG.js';
6
+ export { ax as AggregateBlock, G as AssetTypeConfig, K as AssetTypeDefinition, C as ComponentConfig, v as ComponentDefinition, w as ComponentMetadata, aw as FetchBlock, O as FileKindConfig, a3 as FileScanConfig, a2 as FileUploadConfig, aH as FilterDefinition, X as ImageExifConfig, N as ImageKindConfig, W as ImageSourceConfig, U as ImageUploadConfig, aF as IncludeDefinition, M as InferAssetType, aR as InferQueryParams, aQ as InferQueryResponse, t as InferSingleton, I as InferSingletonContentType, au as QueryConfig, av as QueryDefinition, h as SchemaAssetTypeNames, S as SchemaConfig, b as SchemaContentTypeNames, a as SchemaDefinition, f as SchemaLocaleCodes, e as SchemaQueryNames, g as SchemaSettingsGroupNames, c as SchemaSingletonNames, ay as SearchBlock, aG as SelectMapping, A as SettingsGroupConfig, B as SettingsGroupDefinition, az as SimilarBlock, r as SingletonContentTypeDefinition, s as SingletonMetadata, aD as SortCondition, Y as VariantDefinition, $ as VideoCaptionsConfig, a0 as VideoDownloadConfig, V as VideoKindConfig, _ as VideoPosterConfig, Z as VideoUploadConfig, a1 as VideoWatermarkConfig, aA as WhereCondition, F as defineAssetType, u as defineComponent, at as defineQuery, d as defineSchema, z as defineSettingsGroup, q as defineSingleton, p as defineSingletonContentType } from './define-schema-DzYXk4HL.js';
7
7
  export { n as BaseFieldConfig, x as ContentTypeConfig, y as ContentTypeConfigWithFields, z as ContentTypeConfigWithFieldsets, G as ContentTypeDefinition, H as EntryMetadata, c as FieldDefinition, b as FieldRule, o as FieldType, F as FieldUIConfig, w as Fieldset, J as InferContentType, K as LocalePublicationFields, L as LocalizationConfig, u as defineContentType, v as fieldset } from './define-content-type-CBfnTWSS.js';
8
8
 
9
9
  /**
@@ -57,47 +57,6 @@ declare class InvalidApiKeyError extends SDKError {
57
57
  getUserMessage(): string;
58
58
  }
59
59
 
60
- /**
61
- * Content and resource errors.
62
- *
63
- * `ContentTypeNotFoundError` and `ContentNotFoundError` were deleted at API5.
64
- * The mapper reached them by sniffing `CONTENT_TYPE_NOT_FOUND` and
65
- * `CONTENT_NOT_FOUND`, neither of which is in the closed vocabulary, so neither
66
- * class was reachable. Both cases are `RESOURCE_NOT_FOUND`, whose declared
67
- * `details` are `{ kind, id? }` — the same two facts, from the one code a route
68
- * can actually declare.
69
- */
70
- declare class ResourceNotFoundError extends SDKError {
71
- readonly code = "RESOURCE_NOT_FOUND";
72
- readonly retryable = false;
73
- constructor(message?: string, statusCode?: number, cause?: Error, context?: Record<string, unknown>);
74
- getUserMessage(): string;
75
- }
76
- declare class ResourceConflictError extends SDKError {
77
- readonly code = "RESOURCE_CONFLICT";
78
- readonly retryable = false;
79
- constructor(message?: string, statusCode?: number, cause?: Error, context?: Record<string, unknown>);
80
- getUserMessage(): string;
81
- }
82
- declare class ResourceExpiredError extends SDKError {
83
- readonly code = "RESOURCE_EXPIRED";
84
- readonly retryable = false;
85
- constructor(message?: string, statusCode?: number, cause?: Error, context?: Record<string, unknown>);
86
- getUserMessage(): string;
87
- }
88
- /**
89
- * "Did the service say this resource does not exist?"
90
- *
91
- * Reads the **code**, not the status. Four contract codes are 4xx on a read and
92
- * only one of them means "not there"; the incumbent checked `statusCode === 404`
93
- * on the thrown value, and a second arm duck-typed a plain object for the same
94
- * number so a hand-written test double would pass. Both are the branch
95
- * `INV-API-CLIENT-IS-DERIVED` forbids where a code exists — and the second one
96
- * only existed because the tests faked the boundary (rule 20). They now stub
97
- * `fetch`, so the double is gone with the branch.
98
- */
99
- declare function isResourceNotFound(error: unknown): boolean;
100
-
101
60
  /**
102
61
  * One class per contract code that had none.
103
62
  *
@@ -499,6 +458,113 @@ declare const localeHelpers: {
499
458
  getAllLocalizedValues: typeof getAllLocalizedValues;
500
459
  };
501
460
 
461
+ /**
462
+ * The DOM↔field binding contract, as the one pure helper that emits it.
463
+ *
464
+ * Spread onto the element that renders a field, it stamps which entry, content type, field and
465
+ * locale produced that element, so an editing surface can find the field by scanning the DOM
466
+ * rather than by guessing (`INV-TB-BINDING`). The contract is `toolbar-spec.md` §DOM↔field; this
467
+ * file is its only implementation.
468
+ *
469
+ * **Frozen** (`INV-SS-BINDING-FROZEN`). The attribute set is exactly the five below. Adding,
470
+ * renaming or dropping one is a new contract, and a new contract is a bump of `data-relyio-v` — a
471
+ * page built against version 1 keeps being read as version 1 by any surface that scans it.
472
+ *
473
+ * **Pure** (`INV-TB-SDK-PURE`). It reads the entry it is handed and returns attributes. It imports
474
+ * nothing but the SDK's own types: no realtime, no AI, no first-party code, no framework. That is
475
+ * what lets it live in the customer SDK and run on a server render as happily as in a browser.
476
+ *
477
+ * **Every value comes from the entry.** The id, the content type and the locale are the ones the
478
+ * API reported in `_metadata` — the locale is the one the payload's field values were composed
479
+ * for. There is deliberately no `locale` argument: a caller-supplied locale could bind a node to a
480
+ * locale whose value it is not rendering, which is the silently inferred binding `INV-TB-BINDING`
481
+ * forbids.
482
+ */
483
+
484
+ /** The version of the binding contract this helper emits. */
485
+ declare const BINDING_VERSION = "1";
486
+ /** The attributes `relyioField` returns — the whole of binding contract version 1. */
487
+ interface RelyIOFieldAttributes {
488
+ /** The entry's id (`_metadata.id`). */
489
+ readonly 'data-relyio-entry': string;
490
+ /** The entry's content type (`_metadata.type`); every customer read is keyed by it. */
491
+ readonly 'data-relyio-type': string;
492
+ /** The field the element renders. */
493
+ readonly 'data-relyio-field': string;
494
+ /** The locale the entry's field values were composed for (`_metadata.locale`). */
495
+ readonly 'data-relyio-locale': string;
496
+ /** The binding contract's version. */
497
+ readonly 'data-relyio-v': typeof BINDING_VERSION;
498
+ }
499
+ /**
500
+ * The field names `relyioField` accepts for an entry of type `T`.
501
+ *
502
+ * A schema-typed entry narrows to its declared field names, so they autocomplete and a misspelt
503
+ * one does not compile. An entry with no declared fields — `BaseContent`, which is what an
504
+ * un-generated client returns — has none to narrow to, and `keyof` of it is `never`; that would
505
+ * make the helper uncallable for every untyped customer, so it accepts any field name instead.
506
+ */
507
+ type RelyIOFieldName<T extends BaseContent> = [Exclude<keyof T, '_metadata'>] extends [never] ? string : string & Exclude<keyof T, '_metadata'>;
508
+ /**
509
+ * Binding attributes for one field of one entry.
510
+ *
511
+ * @example
512
+ * ```tsx
513
+ * import { relyioField } from '@relyio/sdk'
514
+ *
515
+ * <h1 {...relyioField(post, 'title')}>{post.title}</h1>
516
+ * // → data-relyio-entry="6710f…" data-relyio-type="post" data-relyio-field="title"
517
+ * // data-relyio-locale="en-US" data-relyio-v="1"
518
+ * ```
519
+ *
520
+ * @throws {TypeError} when the entry's `_metadata` lacks its id, content type or locale. Every
521
+ * entry the API returns carries all three, so this is reached only by a value that was not read
522
+ * from RelyIO. It throws rather than emitting a partial binding: a node stamped with no locale, or
523
+ * none at all, is a binding a surface would have to guess the rest of.
524
+ */
525
+ declare function relyioField<T extends BaseContent>(entry: T, field: RelyIOFieldName<T>): RelyIOFieldAttributes;
526
+
527
+ /**
528
+ * The DOM event a preview surface dispatches when content on the page has changed, and the one
529
+ * spelling of its name (`sdk-surfaces-spec.md` decision 23: the toolbar emits, the framework
530
+ * listens).
531
+ *
532
+ * It is the same kind of seam as the binding attributes beside it: a string both sides read from the
533
+ * core, so the preview toolbar needs no Next dependency and `@relyio/next`'s `<RelyIORefresh />`
534
+ * needs no toolbar dependency. Neither restates the name.
535
+ *
536
+ * **Dispatched on `window`.** Listeners subscribe with
537
+ * `window.addEventListener(RELYIO_CHANGE_EVENT, …)`; the toolbar renders inside a shadow root, and
538
+ * `window` is the one target both sides reach without knowing where the other is mounted.
539
+ *
540
+ * **The name is a wire contract.** A page can run a toolbar and a framework package released at
541
+ * different times, so renaming it silently disconnects them. The `detail` a dispatch carries is
542
+ * the preview toolbar's to declare (SS4); a listener that only refreshes reads none of it.
543
+ */
544
+ declare const RELYIO_CHANGE_EVENT = "relyio:change";
545
+
546
+ /**
547
+ * The width ladder the delivery Worker snaps every rendered dimension to
548
+ * (`INV-SS-ONE-LADDER`, sdk-surfaces-spec decision 14).
549
+ *
550
+ * A dimension is clamped to a ceiling and snapped to a bucket, so "any width"
551
+ * cannot become "unboundedly many distinct transforms". A client that asks the
552
+ * Worker for `w=749` is served the `w=700` render anyway; snapping on this side
553
+ * first means an image loader emits the URL the edge cache already holds.
554
+ *
555
+ * This is a **copy**, and deliberately so: the core cannot import
556
+ * `@relyio/storage` or the Worker. `apps/edge/cdn/src/__tests__/ladder-parity.test.ts`
557
+ * holds the two equal — the constants, and what the Worker actually renders for
558
+ * a sweep of requested widths — so a divergence fails the gate rather than a
559
+ * cache.
560
+ */
561
+ declare const IMAGE_LADDER: {
562
+ readonly maxDimension: 5000;
563
+ readonly bucket: 100;
564
+ };
565
+ /** Clamp to the ceiling, then snap to the nearest bucket — never below one bucket. */
566
+ declare function snapToLadder(value: number): number;
567
+
502
568
  /**
503
569
  * RelyIO SDK - Main Entry Point
504
570
  *
@@ -535,4 +601,4 @@ declare const localeHelpers: {
535
601
 
536
602
  declare const VERSION = "__VERSION__";
537
603
 
538
- export { AuthenticationError, AuthorizationError, ConnectionError, ErrorMapper, InvalidApiKeyError, type LanguageSwitcherOption, type LanguageSwitcherOptions, type LocaleMetadata, type LocaleStatus, type LocalizedEntry, MethodNotAllowedError, MissingApiKeyError, NetworkError, PayloadTooLargeError, PlanFeatureUnavailableError, RateLimitError, ReadOnlyKeyError, ResourceConflictError, ResourceExpiredError, ResourceNotFoundError, SDKError, ServerError, ServiceIndeterminateError, TimeoutError, TransactionRolledBackError, type TranslationCompleteness, UnknownContractError, UsageQuotaExceededError, VERSION, buildLanguageSwitcher, estimateTranslationCompleteness, getAllLocalizedValues, getAvailableLocaleCodes, getDefaultLocale, getFallbackFields, getFieldFallbackLocale, getLocalizedField, getPublishedLocaleCodes, getRequestedLocale, hasLocale, isFieldFallback, isPublishedInLocale, isResourceNotFound, localeHelpers, needsTranslation };
604
+ export { AuthenticationError, AuthorizationError, BaseContent, ConnectionError, ErrorMapper, IMAGE_LADDER, InvalidApiKeyError, type LanguageSwitcherOption, type LanguageSwitcherOptions, type LocaleMetadata, type LocaleStatus, type LocalizedEntry, MethodNotAllowedError, MissingApiKeyError, NetworkError, PayloadTooLargeError, PlanFeatureUnavailableError, RELYIO_CHANGE_EVENT, RateLimitError, ReadOnlyKeyError, type RelyIOFieldAttributes, type RelyIOFieldName, SDKError, ServerError, ServiceIndeterminateError, TimeoutError, TransactionRolledBackError, type TranslationCompleteness, UnknownContractError, UsageQuotaExceededError, VERSION, buildLanguageSwitcher, estimateTranslationCompleteness, getAllLocalizedValues, getAvailableLocaleCodes, getDefaultLocale, getFallbackFields, getFieldFallbackLocale, getLocalizedField, getPublishedLocaleCodes, getRequestedLocale, hasLocale, isFieldFallback, isPublishedInLocale, localeHelpers, needsTranslation, relyioField, snapToLadder };
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
- export { defineAssetType, defineComponent, defineContentType, defineQuery, defineSchema, defineSettingsGroup, defineSingleton, defineSingletonContentType, fields, fieldset } from './chunk-LYRYCIX5.js';
2
- export { AdhocQueryBuilder, AdhocQueryClient, AssetClient, AssetFileBuilder, AssetUploadBuilder, AuthenticationError, AuthorizationError, AutocompleteBuilder, BaseValidationError, BatchBuilder, BatchClient, ConnectionError, ContentByIdBuilder, ContentClient, ContentQueryBuilder, ErrorMapper, FileUploadError, FileValidationError, HttpClient, InvalidApiKeyError, InvalidFieldTypeError, InvalidPayloadError, MethodNotAllowedError, MissingApiKeyError, NetworkError, PayloadTooLargeError, PlanFeatureUnavailableError, RateLimitError, ReadOnlyKeyError, RequiredFieldError, ResourceConflictError, ResourceExpiredError, ResourceNotFoundError, SDKError, SchemaValidationError, SearchBuilder, SearchClient, ServerError, ServiceIndeterminateError, SettingsClient, SimilarBuilder, SingletonClient, TimeoutError, TransactionRolledBackError, TypedRelyIOClient, UnknownContractError, UsageQuotaExceededError, ValidationError, createClient, createClient as default, entityTagOf, isAssetEntry, isResourceNotFound, validateFile } from './chunk-QIZOBT5F.js';
1
+ export { defineAssetType, defineComponent, defineContentType, defineQuery, defineSchema, defineSettingsGroup, defineSingleton, defineSingletonContentType, fields, fieldset } from './chunk-XY5KFEFY.js';
2
+ export { AdhocQueryBuilder, AdhocQueryClient, AssetClient, AssetFileBuilder, AssetUploadBuilder, AuthenticationError, AuthorizationError, AutocompleteBuilder, BaseValidationError, BatchBuilder, BatchClient, ChangesExpiredError, ConnectionError, ContentByIdBuilder, ContentClient, ContentQueryBuilder, ErrorMapper, FileUploadError, FileValidationError, HttpClient, InvalidApiKeyError, InvalidFieldTypeError, InvalidPayloadError, MethodNotAllowedError, MissingApiKeyError, NetworkError, PayloadTooLargeError, PlanFeatureUnavailableError, RateLimitError, ReadOnlyKeyError, RequiredFieldError, ResourceConflictError, ResourceExpiredError, ResourceNotFoundError, SDKError, SchemaValidationError, SearchBuilder, SearchClient, ServerError, ServiceIndeterminateError, SettingsClient, SimilarBuilder, SingletonClient, TimeoutError, TransactionRolledBackError, TypedRelyIOClient, UnknownContractError, UsageQuotaExceededError, ValidationError, createClient, createClient as default, entityTagOf, isAssetEntry, isResourceNotFound, matchRoute, validateFile } from './chunk-43VPZT2G.js';
3
3
  import './chunk-BBUB7C2Z.js';
4
4
  import './chunk-IY5LSKXU.js';
5
5
  export { camelToSnake, createDeferred, debounce, deepClone, generateId, isBrowser, isNode, isPlainObject, isValidEmail, isValidUrl, mergeDeep, omit, pick, retry, sleep, snakeToCamel, throttle, toSafeString } from './chunk-I3ESNANB.js';
@@ -141,9 +141,50 @@ var localeHelpers = {
141
141
  getAllLocalizedValues
142
142
  };
143
143
 
144
+ // src/binding/relyio-field.ts
145
+ var BINDING_VERSION = "1";
146
+ function relyioField(entry, field) {
147
+ const metadata = entry._metadata;
148
+ return {
149
+ "data-relyio-entry": requireMetadata(metadata, "id", field),
150
+ "data-relyio-type": requireMetadata(metadata, "type", field),
151
+ "data-relyio-field": field,
152
+ "data-relyio-locale": requireMetadata(metadata, "locale", field),
153
+ "data-relyio-v": BINDING_VERSION
154
+ };
155
+ }
156
+ __name(relyioField, "relyioField");
157
+ function requireMetadata(metadata, key, field) {
158
+ const value = metadata?.[key];
159
+ if (typeof value !== "string" || value.length === 0) {
160
+ throw new TypeError(
161
+ `relyioField(entry, '${field}'): the entry has no _metadata.${key}, so the field cannot be bound. Pass an entry as the RelyIO API returned it.`
162
+ );
163
+ }
164
+ return value;
165
+ }
166
+ __name(requireMetadata, "requireMetadata");
167
+
168
+ // src/binding/change-event.ts
169
+ var RELYIO_CHANGE_EVENT = "relyio:change";
170
+
171
+ // src/image/ladder.ts
172
+ var IMAGE_LADDER = {
173
+ maxDimension: 5e3,
174
+ bucket: 100
175
+ };
176
+ function snapToLadder(value) {
177
+ const clamped = Math.min(Math.max(value, 1), IMAGE_LADDER.maxDimension);
178
+ return Math.max(
179
+ IMAGE_LADDER.bucket,
180
+ Math.round(clamped / IMAGE_LADDER.bucket) * IMAGE_LADDER.bucket
181
+ );
182
+ }
183
+ __name(snapToLadder, "snapToLadder");
184
+
144
185
  // src/index.ts
145
186
  var VERSION = "__VERSION__";
146
187
 
147
- export { VERSION, buildLanguageSwitcher, estimateTranslationCompleteness, getAllLocalizedValues, getAvailableLocaleCodes, getDefaultLocale, getFallbackFields, getFieldFallbackLocale, getLocalizedField, getPublishedLocaleCodes, getRequestedLocale, hasLocale, isFieldFallback, isPublishedInLocale, localeHelpers, needsTranslation };
188
+ export { IMAGE_LADDER, RELYIO_CHANGE_EVENT, VERSION, buildLanguageSwitcher, estimateTranslationCompleteness, getAllLocalizedValues, getAvailableLocaleCodes, getDefaultLocale, getFallbackFields, getFieldFallbackLocale, getLocalizedField, getPublishedLocaleCodes, getRequestedLocale, hasLocale, isFieldFallback, isPublishedInLocale, localeHelpers, needsTranslation, relyioField, snapToLadder };
148
189
  //# sourceMappingURL=index.js.map
149
190
  //# sourceMappingURL=index.js.map
@@ -1,145 +1,145 @@
1
1
  'use strict';
2
2
 
3
- var chunkHMVGXUGR_cjs = require('../chunk-HMVGXUGR.cjs');
3
+ var chunkHAQELDZN_cjs = require('../chunk-HAQELDZN.cjs');
4
4
  require('../chunk-MWMSFIWN.cjs');
5
5
 
6
6
 
7
7
 
8
8
  Object.defineProperty(exports, "BUILT_IN_ROLES", {
9
9
  enumerable: true,
10
- get: function () { return chunkHMVGXUGR_cjs.BUILT_IN_ROLES; }
10
+ get: function () { return chunkHAQELDZN_cjs.BUILT_IN_ROLES; }
11
11
  });
12
12
  Object.defineProperty(exports, "BUILT_IN_ROLE_ACTIONS", {
13
13
  enumerable: true,
14
- get: function () { return chunkHMVGXUGR_cjs.BUILT_IN_ROLE_ACTIONS; }
14
+ get: function () { return chunkHAQELDZN_cjs.BUILT_IN_ROLE_ACTIONS; }
15
15
  });
16
16
  Object.defineProperty(exports, "ROLE_ACTIONS", {
17
17
  enumerable: true,
18
- get: function () { return chunkHMVGXUGR_cjs.ROLE_ACTIONS; }
18
+ get: function () { return chunkHAQELDZN_cjs.ROLE_ACTIONS; }
19
19
  });
20
20
  Object.defineProperty(exports, "buildFallbackChain", {
21
21
  enumerable: true,
22
- get: function () { return chunkHMVGXUGR_cjs.buildFallbackChain; }
22
+ get: function () { return chunkHAQELDZN_cjs.buildFallbackChain; }
23
23
  });
24
24
  Object.defineProperty(exports, "defineAssetType", {
25
25
  enumerable: true,
26
- get: function () { return chunkHMVGXUGR_cjs.defineAssetType; }
26
+ get: function () { return chunkHAQELDZN_cjs.defineAssetType; }
27
27
  });
28
28
  Object.defineProperty(exports, "defineComponent", {
29
29
  enumerable: true,
30
- get: function () { return chunkHMVGXUGR_cjs.defineComponent; }
30
+ get: function () { return chunkHAQELDZN_cjs.defineComponent; }
31
31
  });
32
32
  Object.defineProperty(exports, "defineContentType", {
33
33
  enumerable: true,
34
- get: function () { return chunkHMVGXUGR_cjs.defineContentType; }
34
+ get: function () { return chunkHAQELDZN_cjs.defineContentType; }
35
35
  });
36
36
  Object.defineProperty(exports, "defineContentTypeWorkflow", {
37
37
  enumerable: true,
38
- get: function () { return chunkHMVGXUGR_cjs.defineContentTypeWorkflow; }
38
+ get: function () { return chunkHAQELDZN_cjs.defineContentTypeWorkflow; }
39
39
  });
40
40
  Object.defineProperty(exports, "defineLocale", {
41
41
  enumerable: true,
42
- get: function () { return chunkHMVGXUGR_cjs.defineLocale; }
42
+ get: function () { return chunkHAQELDZN_cjs.defineLocale; }
43
43
  });
44
44
  Object.defineProperty(exports, "defineQuery", {
45
45
  enumerable: true,
46
- get: function () { return chunkHMVGXUGR_cjs.defineQuery; }
46
+ get: function () { return chunkHAQELDZN_cjs.defineQuery; }
47
47
  });
48
48
  Object.defineProperty(exports, "defineRole", {
49
49
  enumerable: true,
50
- get: function () { return chunkHMVGXUGR_cjs.defineRole; }
50
+ get: function () { return chunkHAQELDZN_cjs.defineRole; }
51
51
  });
52
52
  Object.defineProperty(exports, "defineSchema", {
53
53
  enumerable: true,
54
- get: function () { return chunkHMVGXUGR_cjs.defineSchema; }
54
+ get: function () { return chunkHAQELDZN_cjs.defineSchema; }
55
55
  });
56
56
  Object.defineProperty(exports, "defineSettingsGroup", {
57
57
  enumerable: true,
58
- get: function () { return chunkHMVGXUGR_cjs.defineSettingsGroup; }
58
+ get: function () { return chunkHAQELDZN_cjs.defineSettingsGroup; }
59
59
  });
60
60
  Object.defineProperty(exports, "defineSingleton", {
61
61
  enumerable: true,
62
- get: function () { return chunkHMVGXUGR_cjs.defineSingleton; }
62
+ get: function () { return chunkHAQELDZN_cjs.defineSingleton; }
63
63
  });
64
64
  Object.defineProperty(exports, "defineSingletonContentType", {
65
65
  enumerable: true,
66
- get: function () { return chunkHMVGXUGR_cjs.defineSingletonContentType; }
66
+ get: function () { return chunkHAQELDZN_cjs.defineSingletonContentType; }
67
67
  });
68
68
  Object.defineProperty(exports, "defineView", {
69
69
  enumerable: true,
70
- get: function () { return chunkHMVGXUGR_cjs.defineView; }
70
+ get: function () { return chunkHAQELDZN_cjs.defineView; }
71
71
  });
72
72
  Object.defineProperty(exports, "defineWorkflow", {
73
73
  enumerable: true,
74
- get: function () { return chunkHMVGXUGR_cjs.defineWorkflow; }
74
+ get: function () { return chunkHAQELDZN_cjs.defineWorkflow; }
75
75
  });
76
76
  Object.defineProperty(exports, "defineWorkflowStage", {
77
77
  enumerable: true,
78
- get: function () { return chunkHMVGXUGR_cjs.defineWorkflowStage; }
78
+ get: function () { return chunkHAQELDZN_cjs.defineWorkflowStage; }
79
79
  });
80
80
  Object.defineProperty(exports, "fields", {
81
81
  enumerable: true,
82
- get: function () { return chunkHMVGXUGR_cjs.fields; }
82
+ get: function () { return chunkHAQELDZN_cjs.fields; }
83
83
  });
84
84
  Object.defineProperty(exports, "fieldset", {
85
85
  enumerable: true,
86
- get: function () { return chunkHMVGXUGR_cjs.fieldset; }
86
+ get: function () { return chunkHAQELDZN_cjs.fieldset; }
87
87
  });
88
88
  Object.defineProperty(exports, "findDefaultLocale", {
89
89
  enumerable: true,
90
- get: function () { return chunkHMVGXUGR_cjs.findDefaultLocale; }
90
+ get: function () { return chunkHAQELDZN_cjs.findDefaultLocale; }
91
91
  });
92
92
  Object.defineProperty(exports, "findWorkflowStage", {
93
93
  enumerable: true,
94
- get: function () { return chunkHMVGXUGR_cjs.findWorkflowStage; }
94
+ get: function () { return chunkHAQELDZN_cjs.findWorkflowStage; }
95
95
  });
96
96
  Object.defineProperty(exports, "getActiveLocales", {
97
97
  enumerable: true,
98
- get: function () { return chunkHMVGXUGR_cjs.getActiveLocales; }
98
+ get: function () { return chunkHAQELDZN_cjs.getActiveLocales; }
99
99
  });
100
100
  Object.defineProperty(exports, "getBuiltInRoleActions", {
101
101
  enumerable: true,
102
- get: function () { return chunkHMVGXUGR_cjs.getBuiltInRoleActions; }
102
+ get: function () { return chunkHAQELDZN_cjs.getBuiltInRoleActions; }
103
103
  });
104
104
  Object.defineProperty(exports, "getFirstWorkflowStage", {
105
105
  enumerable: true,
106
- get: function () { return chunkHMVGXUGR_cjs.getFirstWorkflowStage; }
106
+ get: function () { return chunkHAQELDZN_cjs.getFirstWorkflowStage; }
107
107
  });
108
108
  Object.defineProperty(exports, "getLocaleCodes", {
109
109
  enumerable: true,
110
- get: function () { return chunkHMVGXUGR_cjs.getLocaleCodes; }
110
+ get: function () { return chunkHAQELDZN_cjs.getLocaleCodes; }
111
111
  });
112
112
  Object.defineProperty(exports, "getNextWorkflowStage", {
113
113
  enumerable: true,
114
- get: function () { return chunkHMVGXUGR_cjs.getNextWorkflowStage; }
114
+ get: function () { return chunkHAQELDZN_cjs.getNextWorkflowStage; }
115
115
  });
116
116
  Object.defineProperty(exports, "getWorkflowStageIds", {
117
117
  enumerable: true,
118
- get: function () { return chunkHMVGXUGR_cjs.getWorkflowStageIds; }
118
+ get: function () { return chunkHAQELDZN_cjs.getWorkflowStageIds; }
119
119
  });
120
120
  Object.defineProperty(exports, "isBuiltInRole", {
121
121
  enumerable: true,
122
- get: function () { return chunkHMVGXUGR_cjs.isBuiltInRole; }
122
+ get: function () { return chunkHAQELDZN_cjs.isBuiltInRole; }
123
123
  });
124
124
  Object.defineProperty(exports, "isFinalWorkflowStage", {
125
125
  enumerable: true,
126
- get: function () { return chunkHMVGXUGR_cjs.isFinalWorkflowStage; }
126
+ get: function () { return chunkHAQELDZN_cjs.isFinalWorkflowStage; }
127
127
  });
128
128
  Object.defineProperty(exports, "isLocaleDefinition", {
129
129
  enumerable: true,
130
- get: function () { return chunkHMVGXUGR_cjs.isLocaleDefinition; }
130
+ get: function () { return chunkHAQELDZN_cjs.isLocaleDefinition; }
131
131
  });
132
132
  Object.defineProperty(exports, "isRoleDefinition", {
133
133
  enumerable: true,
134
- get: function () { return chunkHMVGXUGR_cjs.isRoleDefinition; }
134
+ get: function () { return chunkHAQELDZN_cjs.isRoleDefinition; }
135
135
  });
136
136
  Object.defineProperty(exports, "isWorkflowDefinition", {
137
137
  enumerable: true,
138
- get: function () { return chunkHMVGXUGR_cjs.isWorkflowDefinition; }
138
+ get: function () { return chunkHAQELDZN_cjs.isWorkflowDefinition; }
139
139
  });
140
140
  Object.defineProperty(exports, "isWorkflowStageDefinition", {
141
141
  enumerable: true,
142
- get: function () { return chunkHMVGXUGR_cjs.isWorkflowStageDefinition; }
142
+ get: function () { return chunkHAQELDZN_cjs.isWorkflowStageDefinition; }
143
143
  });
144
144
  //# sourceMappingURL=index.cjs.map
145
145
  //# sourceMappingURL=index.cjs.map
@@ -1,4 +1,4 @@
1
- export { ax as AggregateBlock, am as AllScopeConfig, G as AssetTypeConfig, H as AssetTypeConfigWithFields, J as AssetTypeConfigWithFieldsets, K as AssetTypeDefinition, a8 as BUILT_IN_ROLES, aa as BUILT_IN_ROLE_ACTIONS, ab as BuiltInRole, aI as CachePolicy, aJ as CachePolicyObject, C as ComponentConfig, v as ComponentDefinition, w as ComponentMetadata, x as ComponentReusabilityMetadata, y as ComponentValidationMetadata, aj as ContentTypeScopeConfig, ak as ContentTypesScopeConfig, al as EntryTypeScopeConfig, aw as FetchBlock, ae as FieldVisibility, O as FileKindConfig, a3 as FileScanConfig, a2 as FileUploadConfig, aH as FilterDefinition, X as ImageExifConfig, Q as ImageFitMode, N as ImageKindConfig, R as ImageOutputFormat, W as ImageSourceConfig, P as ImageTransform, U as ImageUploadConfig, aF as IncludeDefinition, aL as IncludeSubQueries, aK as IncludeSubQuery, M as InferAssetType, aR as InferQueryParams, aQ as InferQueryResponse, E as InferSettingsGroup, t as InferSingleton, I as InferSingletonContentType, o as LocaleDefinition, L as LocaleOptions, aM as Parameterizable, aP as QueryCardinality, au as QueryConfig, av as QueryDefinition, aN as QueryParameter, aO as QueryParameterType, a9 as ROLE_ACTIONS, ad as ResourcePermission, ac as RoleAction, af as RoleConfig, ag as RoleDefinition, h as SchemaAssetTypeNames, S as SchemaConfig, b as SchemaContentTypeNames, a as SchemaDefinition, f as SchemaLocaleCodes, e as SchemaQueryNames, g as SchemaSettingsGroupNames, c as SchemaSingletonNames, ay as SearchBlock, aG as SelectMapping, A as SettingsGroupConfig, B as SettingsGroupDefinition, D as SettingsGroupMetadata, az as SimilarBlock, r as SingletonContentTypeDefinition, s as SingletonMetadata, aD as SortCondition, aE as SortDirection, T as TextDirection, Y as VariantDefinition, $ as VideoCaptionsConfig, a0 as VideoDownloadConfig, V as VideoKindConfig, _ as VideoPosterConfig, Z as VideoUploadConfig, a1 as VideoWatermarkConfig, ar as ViewConfig, as as ViewDefinition, aq as ViewFilter, ao as ViewFilterCondition, ap as ViewFilterGroup, an as ViewFilterOperator, ai as ViewScopeConfig, aA as WhereCondition, aC as WhereOperator, aB as WhereValue, n as buildFallbackChain, F as defineAssetType, u as defineComponent, i as defineLocale, at as defineQuery, a4 as defineRole, d as defineSchema, z as defineSettingsGroup, q as defineSingleton, p as defineSingletonContentType, ah as defineView, l as findDefaultLocale, m as getActiveLocales, a7 as getBuiltInRoleActions, k as getLocaleCodes, a6 as isBuiltInRole, j as isLocaleDefinition, a5 as isRoleDefinition } from '../define-schema-BfXeR6K8.cjs';
1
+ export { ax as AggregateBlock, am as AllScopeConfig, G as AssetTypeConfig, H as AssetTypeConfigWithFields, J as AssetTypeConfigWithFieldsets, K as AssetTypeDefinition, a8 as BUILT_IN_ROLES, aa as BUILT_IN_ROLE_ACTIONS, ab as BuiltInRole, aI as CachePolicy, aJ as CachePolicyObject, C as ComponentConfig, v as ComponentDefinition, w as ComponentMetadata, x as ComponentReusabilityMetadata, y as ComponentValidationMetadata, aj as ContentTypeScopeConfig, ak as ContentTypesScopeConfig, al as EntryTypeScopeConfig, aw as FetchBlock, ae as FieldVisibility, O as FileKindConfig, a3 as FileScanConfig, a2 as FileUploadConfig, aH as FilterDefinition, X as ImageExifConfig, Q as ImageFitMode, N as ImageKindConfig, R as ImageOutputFormat, W as ImageSourceConfig, P as ImageTransform, U as ImageUploadConfig, aF as IncludeDefinition, aL as IncludeSubQueries, aK as IncludeSubQuery, M as InferAssetType, aR as InferQueryParams, aQ as InferQueryResponse, E as InferSettingsGroup, t as InferSingleton, I as InferSingletonContentType, o as LocaleDefinition, L as LocaleOptions, aM as Parameterizable, aP as QueryCardinality, au as QueryConfig, av as QueryDefinition, aN as QueryParameter, aO as QueryParameterType, a9 as ROLE_ACTIONS, ad as ResourcePermission, ac as RoleAction, af as RoleConfig, ag as RoleDefinition, h as SchemaAssetTypeNames, S as SchemaConfig, b as SchemaContentTypeNames, a as SchemaDefinition, f as SchemaLocaleCodes, e as SchemaQueryNames, g as SchemaSettingsGroupNames, c as SchemaSingletonNames, ay as SearchBlock, aG as SelectMapping, A as SettingsGroupConfig, B as SettingsGroupDefinition, D as SettingsGroupMetadata, az as SimilarBlock, r as SingletonContentTypeDefinition, s as SingletonMetadata, aD as SortCondition, aE as SortDirection, T as TextDirection, Y as VariantDefinition, $ as VideoCaptionsConfig, a0 as VideoDownloadConfig, V as VideoKindConfig, _ as VideoPosterConfig, Z as VideoUploadConfig, a1 as VideoWatermarkConfig, ar as ViewConfig, as as ViewDefinition, aq as ViewFilter, ao as ViewFilterCondition, ap as ViewFilterGroup, an as ViewFilterOperator, ai as ViewScopeConfig, aA as WhereCondition, aC as WhereOperator, aB as WhereValue, n as buildFallbackChain, F as defineAssetType, u as defineComponent, i as defineLocale, at as defineQuery, a4 as defineRole, d as defineSchema, z as defineSettingsGroup, q as defineSingleton, p as defineSingletonContentType, ah as defineView, l as findDefaultLocale, m as getActiveLocales, a7 as getBuiltInRoleActions, k as getLocaleCodes, a6 as isBuiltInRole, j as isLocaleDefinition, a5 as isRoleDefinition } from '../define-schema-2xbHgtK-.cjs';
2
2
  import { F as FieldUIConfig, a as FieldAIConfig, b as FieldRule, L as LocalizationConfig, S as ShortTextConfig, c as FieldDefinition, d as LongTextConfig, R as RichTextConfig, e as SlugConfig, U as UrlConfig, E as EmailConfig, I as IntegerConfig, D as DecimalConfig, B as BooleanConfig, f as EnumConfig, g as DateConfig, h as DateTimeConfig, i as ReferenceConfig, T as TagsConfig, j as ListConfig, A as AIConfig, k as AllFieldTypes, l as AnyFieldDefinition, m as AssetAIConfig, n as BaseFieldConfig, C as ComponentFieldType, o as FieldType, p as ReadOnlyRule, q as RequirementRule, r as RuleCondition, s as RuleConditions, V as ValidationRule, t as VisibilityRule } from '../define-content-type-CBfnTWSS.cjs';
3
3
  export { x as ContentTypeConfig, y as ContentTypeConfigWithFields, z as ContentTypeConfigWithFieldsets, G as ContentTypeDefinition, a5 as ContentTypeWorkflowConfig, H as EntryMetadata, w as Fieldset, J as InferContentType, K as LocalePublicationFields, a0 as WorkflowAutoAssign, a3 as WorkflowConfig, a4 as WorkflowDefinition, $ as WorkflowEscalation, a1 as WorkflowStageConfig, a2 as WorkflowStageDefinition, u as defineContentType, O as defineContentTypeWorkflow, M as defineWorkflow, N as defineWorkflowStage, v as fieldset, X as findWorkflowStage, Z as getFirstWorkflowStage, Y as getNextWorkflowStage, W as getWorkflowStageIds, _ as isFinalWorkflowStage, P as isWorkflowDefinition, Q as isWorkflowStageDefinition } from '../define-content-type-CBfnTWSS.cjs';
4
4
 
@@ -1,4 +1,4 @@
1
- export { ax as AggregateBlock, am as AllScopeConfig, G as AssetTypeConfig, H as AssetTypeConfigWithFields, J as AssetTypeConfigWithFieldsets, K as AssetTypeDefinition, a8 as BUILT_IN_ROLES, aa as BUILT_IN_ROLE_ACTIONS, ab as BuiltInRole, aI as CachePolicy, aJ as CachePolicyObject, C as ComponentConfig, v as ComponentDefinition, w as ComponentMetadata, x as ComponentReusabilityMetadata, y as ComponentValidationMetadata, aj as ContentTypeScopeConfig, ak as ContentTypesScopeConfig, al as EntryTypeScopeConfig, aw as FetchBlock, ae as FieldVisibility, O as FileKindConfig, a3 as FileScanConfig, a2 as FileUploadConfig, aH as FilterDefinition, X as ImageExifConfig, Q as ImageFitMode, N as ImageKindConfig, R as ImageOutputFormat, W as ImageSourceConfig, P as ImageTransform, U as ImageUploadConfig, aF as IncludeDefinition, aL as IncludeSubQueries, aK as IncludeSubQuery, M as InferAssetType, aR as InferQueryParams, aQ as InferQueryResponse, E as InferSettingsGroup, t as InferSingleton, I as InferSingletonContentType, o as LocaleDefinition, L as LocaleOptions, aM as Parameterizable, aP as QueryCardinality, au as QueryConfig, av as QueryDefinition, aN as QueryParameter, aO as QueryParameterType, a9 as ROLE_ACTIONS, ad as ResourcePermission, ac as RoleAction, af as RoleConfig, ag as RoleDefinition, h as SchemaAssetTypeNames, S as SchemaConfig, b as SchemaContentTypeNames, a as SchemaDefinition, f as SchemaLocaleCodes, e as SchemaQueryNames, g as SchemaSettingsGroupNames, c as SchemaSingletonNames, ay as SearchBlock, aG as SelectMapping, A as SettingsGroupConfig, B as SettingsGroupDefinition, D as SettingsGroupMetadata, az as SimilarBlock, r as SingletonContentTypeDefinition, s as SingletonMetadata, aD as SortCondition, aE as SortDirection, T as TextDirection, Y as VariantDefinition, $ as VideoCaptionsConfig, a0 as VideoDownloadConfig, V as VideoKindConfig, _ as VideoPosterConfig, Z as VideoUploadConfig, a1 as VideoWatermarkConfig, ar as ViewConfig, as as ViewDefinition, aq as ViewFilter, ao as ViewFilterCondition, ap as ViewFilterGroup, an as ViewFilterOperator, ai as ViewScopeConfig, aA as WhereCondition, aC as WhereOperator, aB as WhereValue, n as buildFallbackChain, F as defineAssetType, u as defineComponent, i as defineLocale, at as defineQuery, a4 as defineRole, d as defineSchema, z as defineSettingsGroup, q as defineSingleton, p as defineSingletonContentType, ah as defineView, l as findDefaultLocale, m as getActiveLocales, a7 as getBuiltInRoleActions, k as getLocaleCodes, a6 as isBuiltInRole, j as isLocaleDefinition, a5 as isRoleDefinition } from '../define-schema-BD6HSPnG.js';
1
+ export { ax as AggregateBlock, am as AllScopeConfig, G as AssetTypeConfig, H as AssetTypeConfigWithFields, J as AssetTypeConfigWithFieldsets, K as AssetTypeDefinition, a8 as BUILT_IN_ROLES, aa as BUILT_IN_ROLE_ACTIONS, ab as BuiltInRole, aI as CachePolicy, aJ as CachePolicyObject, C as ComponentConfig, v as ComponentDefinition, w as ComponentMetadata, x as ComponentReusabilityMetadata, y as ComponentValidationMetadata, aj as ContentTypeScopeConfig, ak as ContentTypesScopeConfig, al as EntryTypeScopeConfig, aw as FetchBlock, ae as FieldVisibility, O as FileKindConfig, a3 as FileScanConfig, a2 as FileUploadConfig, aH as FilterDefinition, X as ImageExifConfig, Q as ImageFitMode, N as ImageKindConfig, R as ImageOutputFormat, W as ImageSourceConfig, P as ImageTransform, U as ImageUploadConfig, aF as IncludeDefinition, aL as IncludeSubQueries, aK as IncludeSubQuery, M as InferAssetType, aR as InferQueryParams, aQ as InferQueryResponse, E as InferSettingsGroup, t as InferSingleton, I as InferSingletonContentType, o as LocaleDefinition, L as LocaleOptions, aM as Parameterizable, aP as QueryCardinality, au as QueryConfig, av as QueryDefinition, aN as QueryParameter, aO as QueryParameterType, a9 as ROLE_ACTIONS, ad as ResourcePermission, ac as RoleAction, af as RoleConfig, ag as RoleDefinition, h as SchemaAssetTypeNames, S as SchemaConfig, b as SchemaContentTypeNames, a as SchemaDefinition, f as SchemaLocaleCodes, e as SchemaQueryNames, g as SchemaSettingsGroupNames, c as SchemaSingletonNames, ay as SearchBlock, aG as SelectMapping, A as SettingsGroupConfig, B as SettingsGroupDefinition, D as SettingsGroupMetadata, az as SimilarBlock, r as SingletonContentTypeDefinition, s as SingletonMetadata, aD as SortCondition, aE as SortDirection, T as TextDirection, Y as VariantDefinition, $ as VideoCaptionsConfig, a0 as VideoDownloadConfig, V as VideoKindConfig, _ as VideoPosterConfig, Z as VideoUploadConfig, a1 as VideoWatermarkConfig, ar as ViewConfig, as as ViewDefinition, aq as ViewFilter, ao as ViewFilterCondition, ap as ViewFilterGroup, an as ViewFilterOperator, ai as ViewScopeConfig, aA as WhereCondition, aC as WhereOperator, aB as WhereValue, n as buildFallbackChain, F as defineAssetType, u as defineComponent, i as defineLocale, at as defineQuery, a4 as defineRole, d as defineSchema, z as defineSettingsGroup, q as defineSingleton, p as defineSingletonContentType, ah as defineView, l as findDefaultLocale, m as getActiveLocales, a7 as getBuiltInRoleActions, k as getLocaleCodes, a6 as isBuiltInRole, j as isLocaleDefinition, a5 as isRoleDefinition } from '../define-schema-DzYXk4HL.js';
2
2
  import { F as FieldUIConfig, a as FieldAIConfig, b as FieldRule, L as LocalizationConfig, S as ShortTextConfig, c as FieldDefinition, d as LongTextConfig, R as RichTextConfig, e as SlugConfig, U as UrlConfig, E as EmailConfig, I as IntegerConfig, D as DecimalConfig, B as BooleanConfig, f as EnumConfig, g as DateConfig, h as DateTimeConfig, i as ReferenceConfig, T as TagsConfig, j as ListConfig, A as AIConfig, k as AllFieldTypes, l as AnyFieldDefinition, m as AssetAIConfig, n as BaseFieldConfig, C as ComponentFieldType, o as FieldType, p as ReadOnlyRule, q as RequirementRule, r as RuleCondition, s as RuleConditions, V as ValidationRule, t as VisibilityRule } from '../define-content-type-CBfnTWSS.js';
3
3
  export { x as ContentTypeConfig, y as ContentTypeConfigWithFields, z as ContentTypeConfigWithFieldsets, G as ContentTypeDefinition, a5 as ContentTypeWorkflowConfig, H as EntryMetadata, w as Fieldset, J as InferContentType, K as LocalePublicationFields, a0 as WorkflowAutoAssign, a3 as WorkflowConfig, a4 as WorkflowDefinition, $ as WorkflowEscalation, a1 as WorkflowStageConfig, a2 as WorkflowStageDefinition, u as defineContentType, O as defineContentTypeWorkflow, M as defineWorkflow, N as defineWorkflowStage, v as fieldset, X as findWorkflowStage, Z as getFirstWorkflowStage, Y as getNextWorkflowStage, W as getWorkflowStageIds, _ as isFinalWorkflowStage, P as isWorkflowDefinition, Q as isWorkflowStageDefinition } from '../define-content-type-CBfnTWSS.js';
4
4
 
@@ -1,4 +1,4 @@
1
- export { BUILT_IN_ROLES, BUILT_IN_ROLE_ACTIONS, ROLE_ACTIONS, buildFallbackChain, defineAssetType, defineComponent, defineContentType, defineContentTypeWorkflow, defineLocale, defineQuery, defineRole, defineSchema, defineSettingsGroup, defineSingleton, defineSingletonContentType, defineView, defineWorkflow, defineWorkflowStage, fields, fieldset, findDefaultLocale, findWorkflowStage, getActiveLocales, getBuiltInRoleActions, getFirstWorkflowStage, getLocaleCodes, getNextWorkflowStage, getWorkflowStageIds, isBuiltInRole, isFinalWorkflowStage, isLocaleDefinition, isRoleDefinition, isWorkflowDefinition, isWorkflowStageDefinition } from '../chunk-LYRYCIX5.js';
1
+ export { BUILT_IN_ROLES, BUILT_IN_ROLE_ACTIONS, ROLE_ACTIONS, buildFallbackChain, defineAssetType, defineComponent, defineContentType, defineContentTypeWorkflow, defineLocale, defineQuery, defineRole, defineSchema, defineSettingsGroup, defineSingleton, defineSingletonContentType, defineView, defineWorkflow, defineWorkflowStage, fields, fieldset, findDefaultLocale, findWorkflowStage, getActiveLocales, getBuiltInRoleActions, getFirstWorkflowStage, getLocaleCodes, getNextWorkflowStage, getWorkflowStageIds, isBuiltInRole, isFinalWorkflowStage, isLocaleDefinition, isRoleDefinition, isWorkflowDefinition, isWorkflowStageDefinition } from '../chunk-XY5KFEFY.js';
2
2
  import '../chunk-XQ4QHWZE.js';
3
3
  //# sourceMappingURL=index.js.map
4
4
  //# sourceMappingURL=index.js.map
@@ -1,2 +1,2 @@
1
- export { r as ApiResponse, B as BaseContent, o as CacheConfig, t as CacheStrategy, f as ContentQueryResult, j as ContentTypeSchema, C as CreateInput, i as CustomQuery, D as DebugConfig, E as Environment, J as FieldDefinition, k as FieldOptions, F as FieldTypeName, L as LogLevel, P as PerformanceMetrics, Q as QueryOptions, p as RealtimeConfig, m as RealtimeEvent, l as RealtimeEventType, R as RelyIOConfig, q as RequestConfig, s as RetryConfig, h as SettingsGroup, g as SingletonContent, e as SortOptions, n as SubscriptionOptions, U as UpdateInput, V as ValidationRule, u as ValidationViolation, c as WhereClause, d as WhereOperator } from '../index-ulOrcfPa.cjs';
1
+ export { t as ApiResponse, B as BaseContent, q as CacheConfig, v as CacheStrategy, g as ContentQueryResult, k as ContentTypeSchema, C as CreateInput, j as CustomQuery, D as DebugConfig, E as Environment, T as FieldDefinition, l as FieldOptions, F as FieldTypeName, L as LogLevel, P as PerformanceMetrics, Q as QueryOptions, r as RealtimeConfig, o as RealtimeEvent, n as RealtimeEventType, R as RelyIOConfig, s as RequestConfig, u as RetryConfig, i as SettingsGroup, h as SingletonContent, f as SortOptions, p as SubscriptionOptions, U as UpdateInput, V as ValidationRule, w as ValidationViolation, d as WhereClause, e as WhereOperator } from '../index-DFehx5sI.cjs';
2
2
  import '../define-content-type-CBfnTWSS.cjs';
@@ -1,2 +1,2 @@
1
- export { r as ApiResponse, B as BaseContent, o as CacheConfig, t as CacheStrategy, f as ContentQueryResult, j as ContentTypeSchema, C as CreateInput, i as CustomQuery, D as DebugConfig, E as Environment, J as FieldDefinition, k as FieldOptions, F as FieldTypeName, L as LogLevel, P as PerformanceMetrics, Q as QueryOptions, p as RealtimeConfig, m as RealtimeEvent, l as RealtimeEventType, R as RelyIOConfig, q as RequestConfig, s as RetryConfig, h as SettingsGroup, g as SingletonContent, e as SortOptions, n as SubscriptionOptions, U as UpdateInput, V as ValidationRule, u as ValidationViolation, c as WhereClause, d as WhereOperator } from '../index-DuEhsGdE.js';
1
+ export { t as ApiResponse, B as BaseContent, q as CacheConfig, v as CacheStrategy, g as ContentQueryResult, k as ContentTypeSchema, C as CreateInput, j as CustomQuery, D as DebugConfig, E as Environment, T as FieldDefinition, l as FieldOptions, F as FieldTypeName, L as LogLevel, P as PerformanceMetrics, Q as QueryOptions, r as RealtimeConfig, o as RealtimeEvent, n as RealtimeEventType, R as RelyIOConfig, s as RequestConfig, u as RetryConfig, i as SettingsGroup, h as SingletonContent, f as SortOptions, p as SubscriptionOptions, U as UpdateInput, V as ValidationRule, w as ValidationViolation, d as WhereClause, e as WhereOperator } from '../index-FDak5ofk.js';
2
2
  import '../define-content-type-CBfnTWSS.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@relyio/sdk",
3
- "version": "0.3.0",
3
+ "version": "0.4.0",
4
4
  "description": "RelyIO is coming soon — this package is not ready for general use yet.",
5
5
  "keywords": [
6
6
  "relyio"
@@ -37,11 +37,6 @@
37
37
  "import": "./dist/schema/index.js",
38
38
  "require": "./dist/schema/index.cjs"
39
39
  },
40
- "./react": {
41
- "types": "./dist/react/index.d.ts",
42
- "import": "./dist/react/index.js",
43
- "require": "./dist/react/index.cjs"
44
- },
45
40
  "./types": {
46
41
  "types": "./dist/types/index.d.ts",
47
42
  "import": "./dist/types/index.js",
@@ -75,7 +70,6 @@
75
70
  "@changesets/cli": "2.29.4",
76
71
  "@eslint/js": "9.39.5",
77
72
  "@types/node": "24.13.3",
78
- "@types/react": "19.2.18",
79
73
  "@typescript-eslint/eslint-plugin": "^8.18.1",
80
74
  "@typescript-eslint/parser": "^8.18.1",
81
75
  "@vitest/coverage-v8": "4.1.11",
@@ -91,19 +85,15 @@
91
85
  "typedoc": "^0.28.20",
92
86
  "typescript": "npm:@typescript/typescript6@6.0.2",
93
87
  "vitest": "4.1.11",
94
- "@relyio/api-contract": "0.1.0",
95
- "@relyio/eslint-config": "0.0.0"
88
+ "@relyio/eslint-config": "0.0.0",
89
+ "@relyio/api-contract": "0.1.0"
96
90
  },
97
91
  "peerDependencies": {
98
- "typescript": ">=4.9.0",
99
- "react": ">=18.0.0"
92
+ "typescript": ">=4.9.0"
100
93
  },
101
94
  "peerDependenciesMeta": {
102
95
  "typescript": {
103
96
  "optional": true
104
- },
105
- "react": {
106
- "optional": true
107
97
  }
108
98
  },
109
99
  "bundlesize": [
@@ -142,7 +132,7 @@
142
132
  "test:watch": "vitest --watch",
143
133
  "test:coverage": "vitest --coverage",
144
134
  "test:ui": "vitest --ui",
145
- "type:check": "tsc --noEmit",
135
+ "type:check": "tsc --noEmit && tsc --noEmit -p tsconfig.register-types.json",
146
136
  "codegen:openapi": "node ../../../scripts/emit-openapi-types.mjs ../../../apps/services/api/openapi-spec.json src/http/api-schema.ts",
147
137
  "lint:write": "relyio-lint --fix",
148
138
  "lint:check": "relyio-lint",
@@ -1,4 +0,0 @@
1
- 'use strict';
2
-
3
- //# sourceMappingURL=index.cjs.map
4
- //# sourceMappingURL=index.cjs.map
@@ -1,2 +0,0 @@
1
-
2
- export { }
@@ -1,2 +0,0 @@
1
-
2
- export { }
@@ -1,3 +0,0 @@
1
-
2
- //# sourceMappingURL=index.js.map
3
- //# sourceMappingURL=index.js.map