@cmssy/react 9.10.0 → 10.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/dist/index.cjs CHANGED
@@ -1,10 +1,11 @@
1
1
  'use strict';
2
2
 
3
3
  var core = require('@cmssy/core');
4
+ var types = require('@cmssy/types');
4
5
  var react = require('react');
6
+ var internal = require('@cmssy/core/internal');
5
7
  var blockErrorBoundary = require('@cmssy/react/block-error-boundary');
6
8
  var jsxRuntime = require('react/jsx-runtime');
7
- var types = require('@cmssy/types');
8
9
 
9
10
  // src/index.ts
10
11
 
@@ -175,7 +176,7 @@ function renderResolvedBlock(block, map, locale, defaultLocale, options = {}) {
175
176
  )
176
177
  );
177
178
  }
178
- const content = resolvedContent ?? core.getBlockContentForLanguage(
179
+ const content = resolvedContent ?? internal.getBlockContentForLanguage(
179
180
  block.content,
180
181
  locale,
181
182
  defaultLocale,
@@ -190,8 +191,8 @@ function renderResolvedBlock(block, map, locale, defaultLocale, options = {}) {
190
191
  editMode,
191
192
  children: react.createElement(Component, {
192
193
  content,
193
- style: core.asBucket(block.style),
194
- advanced: core.asBucket(block.advanced),
194
+ style: internal.asBucket(block.style),
195
+ advanced: internal.asBucket(block.advanced),
195
196
  context,
196
197
  data
197
198
  })
@@ -201,7 +202,7 @@ function renderResolvedBlock(block, map, locale, defaultLocale, options = {}) {
201
202
  }
202
203
  async function resolveBlocks(blocks, loaderMap, locale, defaultLocale, context, enabledLocales, options) {
203
204
  const contents = blocks.map(
204
- (block) => core.getBlockContentForLanguage(
205
+ (block) => internal.getBlockContentForLanguage(
205
206
  block.content,
206
207
  locale,
207
208
  defaultLocale,
@@ -209,7 +210,7 @@ async function resolveBlocks(blocks, loaderMap, locale, defaultLocale, context,
209
210
  )
210
211
  );
211
212
  if (options?.config && options.schemas) {
212
- await core.resolveRelationContent(
213
+ await internal.resolveRelationContent(
213
214
  options.config,
214
215
  blocks.map((block, i) => ({ type: block.type, content: contents[i] })),
215
216
  options.schemas,
@@ -249,7 +250,7 @@ async function resolveRenderLocale({
249
250
  }) {
250
251
  if (locale && defaultLocale) return { locale, defaultLocale, enabledLocales };
251
252
  if (config) {
252
- const site = await core.resolveSiteLocales(config);
253
+ const site = await internal.resolveSiteLocales(config);
253
254
  return {
254
255
  locale: locale ?? defaultLocale ?? site.defaultLocale,
255
256
  defaultLocale: defaultLocale ?? site.defaultLocale,
@@ -498,11 +499,11 @@ function CmssyBlock({
498
499
  )
499
500
  );
500
501
  }
501
- const base = resolvedContent ? { ...resolvedContent } : core.getBlockContentForLanguage(block.content, locale, defaultLocale);
502
+ const base = resolvedContent ? { ...resolvedContent } : internal.getBlockContentForLanguage(block.content, locale, defaultLocale);
502
503
  const content = patchedContent ? { ...base, ...patchedContent } : base;
503
- if (schema) core.normalizeRelationContent(content, schema, resolvedContent);
504
- const style = patchedStyle ? { ...core.asBucket(block.style), ...patchedStyle } : core.asBucket(block.style);
505
- const advanced = patchedAdvanced ? { ...core.asBucket(block.advanced), ...patchedAdvanced } : core.asBucket(block.advanced);
504
+ if (schema) internal.normalizeRelationContent(content, schema, resolvedContent);
505
+ const style = patchedStyle ? { ...internal.asBucket(block.style), ...patchedStyle } : internal.asBucket(block.style);
506
+ const advanced = patchedAdvanced ? { ...internal.asBucket(block.advanced), ...patchedAdvanced } : internal.asBucket(block.advanced);
506
507
  return wrap(
507
508
  /* @__PURE__ */ jsxRuntime.jsx(
508
509
  blockErrorBoundary.BlockErrorBoundary,
@@ -526,82 +527,22 @@ Object.defineProperty(exports, "CmssyRequestError", {
526
527
  enumerable: true,
527
528
  get: function () { return core.CmssyRequestError; }
528
529
  });
529
- Object.defineProperty(exports, "DEFAULT_CMSSY_API_URL", {
530
- enumerable: true,
531
- get: function () { return core.DEFAULT_CMSSY_API_URL; }
532
- });
533
- Object.defineProperty(exports, "FORM_QUERY", {
534
- enumerable: true,
535
- get: function () { return core.FORM_QUERY; }
536
- });
537
- Object.defineProperty(exports, "MODEL_DEFINITIONS_QUERY", {
538
- enumerable: true,
539
- get: function () { return core.MODEL_DEFINITIONS_QUERY; }
540
- });
541
- Object.defineProperty(exports, "MODEL_RECORDS_QUERY", {
542
- enumerable: true,
543
- get: function () { return core.MODEL_RECORDS_QUERY; }
544
- });
545
530
  Object.defineProperty(exports, "PROTOCOL_VERSION", {
546
531
  enumerable: true,
547
532
  get: function () { return core.PROTOCOL_VERSION; }
548
533
  });
549
- Object.defineProperty(exports, "SITE_CONFIG_QUERY", {
550
- enumerable: true,
551
- get: function () { return core.SITE_CONFIG_QUERY; }
552
- });
553
- Object.defineProperty(exports, "SUBMIT_FORM_MUTATION", {
554
- enumerable: true,
555
- get: function () { return core.SUBMIT_FORM_MUTATION; }
556
- });
557
534
  Object.defineProperty(exports, "buildBlockContext", {
558
535
  enumerable: true,
559
536
  get: function () { return core.buildBlockContext; }
560
537
  });
561
- Object.defineProperty(exports, "buildLocaleSwitchHref", {
562
- enumerable: true,
563
- get: function () { return core.buildLocaleSwitchHref; }
564
- });
565
- Object.defineProperty(exports, "collectFormIds", {
566
- enumerable: true,
567
- get: function () { return core.collectFormIds; }
568
- });
569
538
  Object.defineProperty(exports, "createCmssyClient", {
570
539
  enumerable: true,
571
540
  get: function () { return core.createCmssyClient; }
572
541
  });
573
- Object.defineProperty(exports, "fetchLayouts", {
574
- enumerable: true,
575
- get: function () { return core.fetchLayouts; }
576
- });
577
- Object.defineProperty(exports, "fetchPage", {
578
- enumerable: true,
579
- get: function () { return core.fetchPage; }
580
- });
581
- Object.defineProperty(exports, "fetchPageById", {
582
- enumerable: true,
583
- get: function () { return core.fetchPageById; }
584
- });
585
- Object.defineProperty(exports, "fetchPageMeta", {
586
- enumerable: true,
587
- get: function () { return core.fetchPageMeta; }
588
- });
589
- Object.defineProperty(exports, "fetchPages", {
590
- enumerable: true,
591
- get: function () { return core.fetchPages; }
592
- });
593
- Object.defineProperty(exports, "fetchSiteConfig", {
594
- enumerable: true,
595
- get: function () { return core.fetchSiteConfig; }
596
- });
597
542
  Object.defineProperty(exports, "fields", {
598
543
  enumerable: true,
599
544
  get: function () { return core.fields; }
600
545
  });
601
- Object.defineProperty(exports, "getBlockContentForLanguage", {
602
- enumerable: true,
603
- get: function () { return core.getBlockContentForLanguage; }
604
- });
605
546
  Object.defineProperty(exports, "graphqlRequest", {
606
547
  enumerable: true,
607
548
  get: function () { return core.graphqlRequest; }
@@ -610,22 +551,10 @@ Object.defineProperty(exports, "isProtocolCompatible", {
610
551
  enumerable: true,
611
552
  get: function () { return core.isProtocolCompatible; }
612
553
  });
613
- Object.defineProperty(exports, "localizeHref", {
614
- enumerable: true,
615
- get: function () { return core.localizeHref; }
616
- });
617
- Object.defineProperty(exports, "localizeHtmlLinks", {
618
- enumerable: true,
619
- get: function () { return core.localizeHtmlLinks; }
620
- });
621
554
  Object.defineProperty(exports, "normalizeOrigin", {
622
555
  enumerable: true,
623
556
  get: function () { return core.normalizeOrigin; }
624
557
  });
625
- Object.defineProperty(exports, "normalizeSlug", {
626
- enumerable: true,
627
- get: function () { return core.normalizeSlug; }
628
- });
629
558
  Object.defineProperty(exports, "parseEditorMessage", {
630
559
  enumerable: true,
631
560
  get: function () { return core.parseEditorMessage; }
@@ -634,30 +563,6 @@ Object.defineProperty(exports, "postToEditor", {
634
563
  enumerable: true,
635
564
  get: function () { return core.postToEditor; }
636
565
  });
637
- Object.defineProperty(exports, "resolveApiUrl", {
638
- enumerable: true,
639
- get: function () { return core.resolveApiUrl; }
640
- });
641
- Object.defineProperty(exports, "resolveForms", {
642
- enumerable: true,
643
- get: function () { return core.resolveForms; }
644
- });
645
- Object.defineProperty(exports, "resolvePublicUrl", {
646
- enumerable: true,
647
- get: function () { return core.resolvePublicUrl; }
648
- });
649
- Object.defineProperty(exports, "resolveSiteLocales", {
650
- enumerable: true,
651
- get: function () { return core.resolveSiteLocales; }
652
- });
653
- Object.defineProperty(exports, "resolveWorkspaceId", {
654
- enumerable: true,
655
- get: function () { return core.resolveWorkspaceId; }
656
- });
657
- Object.defineProperty(exports, "splitLocaleFromPath", {
658
- enumerable: true,
659
- get: function () { return core.splitLocaleFromPath; }
660
- });
661
566
  Object.defineProperty(exports, "evaluateFieldConditionGroup", {
662
567
  enumerable: true,
663
568
  get: function () { return types.evaluateFieldConditionGroup; }
package/dist/index.d.cts CHANGED
@@ -1,10 +1,10 @@
1
1
  import { CmssyPageData, CmssyClientConfig, CmssyFormDefinition, CmssyBlockAuthContext, CmssyBlockWorkspace, CmssyLayoutGroup, RawBlock, CmssyBlockContext } from '@cmssy/core';
2
- export { AppToEditorMessage, BlockMeta, BlockPropsSchema, BlockRect, BlockSchema, BoundsMessage, BuildBlockContextExtra, ClickMessage, CmssyAddress, CmssyBlockAuthContext, CmssyBlockContext, CmssyBlockMember, CmssyBlockWorkspace, CmssyBranding, CmssyCart, CmssyCartDiscount, CmssyCartItem, CmssyCartItemSnapshot, CmssyClient, CmssyClientConfig, CmssyFormDefinition, CmssyFormField, CmssyFormSettings, CmssyFormSubmitResponse, CmssyLayoutGroup, CmssyLayoutSettings, CmssyLocaleContext, CmssyLocalizedValue, CmssyModelDefinition, CmssyModelRecord, CmssyOrder, CmssyOrderDiscount, CmssyOrderItem, CmssyOrderTaxSummaryLine, CmssyPageData, CmssyPageMeta, CmssyPageSummary, CmssyPriceTier, CmssyProduct, CmssyProductVariant, CmssyRecordList, CmssyRequestError, CmssyShippingMethod, CmssySiteConfig, CmssySiteLocales, CmssyTaxSummaryLine, DEFAULT_CMSSY_API_URL, EditorToAppMessage, FORM_QUERY, FetchLike, FetchLikeResponse, FetchPageOptions, FieldControl, FieldDefinition, FieldType, GraphqlRequestOptions, InferBlockContent, MODEL_DEFINITIONS_QUERY, MODEL_RECORDS_QUERY, PROTOCOL_VERSION, ParentReadyMessage, PatchMessage, PostTarget, QueryScopedOptions, RawBlock, RawLayoutBlock, ReadyMessage, RetryPolicy, SITE_CONFIG_QUERY, SUBMIT_FORM_MUTATION, SelectMessage, SubmitFormInput, TypedField, buildBlockContext, buildLocaleSwitchHref, collectFormIds, createCmssyClient, fetchLayouts, fetchPage, fetchPageById, fetchPageMeta, fetchPages, fetchSiteConfig, fields, getBlockContentForLanguage, graphqlRequest, isProtocolCompatible, localizeHref, localizeHtmlLinks, normalizeOrigin, normalizeSlug, parseEditorMessage, postToEditor, resolveApiUrl, resolveForms, resolvePublicUrl, resolveSiteLocales, resolveWorkspaceId, splitLocaleFromPath } from '@cmssy/core';
2
+ export { AppToEditorMessage, BlockMeta, BlockPropsSchema, BlockRect, BlockSchema, BoundsMessage, BuildBlockContextExtra, ClickMessage, CmssyBlockAuthContext, CmssyBlockContext, CmssyBlockMember, CmssyBlockWorkspace, CmssyBranding, CmssyClient, CmssyClientConfig, CmssyFormDefinition, CmssyFormField, CmssyFormSettings, CmssyFormSubmitResponse, CmssyLayoutGroup, CmssyLayoutSettings, CmssyLocaleContext, CmssyLocalizedValue, CmssyModelDefinition, CmssyModelRecord, CmssyPageData, CmssyPageMeta, CmssyPageSummary, CmssyRecordList, CmssyRequestError, CmssySiteConfig, EditorToAppMessage, FetchLike, FetchLikeResponse, FetchPageOptions, FieldControl, FieldDefinition, FieldType, GraphqlRequestOptions, InferBlockContent, PROTOCOL_VERSION, ParentReadyMessage, PatchMessage, PostTarget, QueryScopedOptions, RawBlock, RawLayoutBlock, ReadyMessage, RetryPolicy, SelectMessage, SubmitFormInput, TypedField, buildBlockContext, createCmssyClient, fields, graphqlRequest, isProtocolCompatible, normalizeOrigin, parseEditorMessage, postToEditor } from '@cmssy/core';
3
3
  import { B as BlockDefinition, a as BlockMap } from './registry-Bfq4Pq18.cjs';
4
4
  export { b as BlockProps, c as blocksToMeta, d as blocksToSchemas, e as buildBlockMap, f as defineBlock } from './registry-Bfq4Pq18.cjs';
5
- import * as react_jsx_runtime from 'react/jsx-runtime';
6
5
  import { FieldDefinition } from '@cmssy/types';
7
6
  export { FieldCondition, FieldConditionGroup, FieldConditionLogic, evaluateFieldConditionGroup } from '@cmssy/types';
7
+ import * as react_jsx_runtime from 'react/jsx-runtime';
8
8
  import 'react';
9
9
 
10
10
  interface CmssyServerPageProps {
package/dist/index.d.ts CHANGED
@@ -1,10 +1,10 @@
1
1
  import { CmssyPageData, CmssyClientConfig, CmssyFormDefinition, CmssyBlockAuthContext, CmssyBlockWorkspace, CmssyLayoutGroup, RawBlock, CmssyBlockContext } from '@cmssy/core';
2
- export { AppToEditorMessage, BlockMeta, BlockPropsSchema, BlockRect, BlockSchema, BoundsMessage, BuildBlockContextExtra, ClickMessage, CmssyAddress, CmssyBlockAuthContext, CmssyBlockContext, CmssyBlockMember, CmssyBlockWorkspace, CmssyBranding, CmssyCart, CmssyCartDiscount, CmssyCartItem, CmssyCartItemSnapshot, CmssyClient, CmssyClientConfig, CmssyFormDefinition, CmssyFormField, CmssyFormSettings, CmssyFormSubmitResponse, CmssyLayoutGroup, CmssyLayoutSettings, CmssyLocaleContext, CmssyLocalizedValue, CmssyModelDefinition, CmssyModelRecord, CmssyOrder, CmssyOrderDiscount, CmssyOrderItem, CmssyOrderTaxSummaryLine, CmssyPageData, CmssyPageMeta, CmssyPageSummary, CmssyPriceTier, CmssyProduct, CmssyProductVariant, CmssyRecordList, CmssyRequestError, CmssyShippingMethod, CmssySiteConfig, CmssySiteLocales, CmssyTaxSummaryLine, DEFAULT_CMSSY_API_URL, EditorToAppMessage, FORM_QUERY, FetchLike, FetchLikeResponse, FetchPageOptions, FieldControl, FieldDefinition, FieldType, GraphqlRequestOptions, InferBlockContent, MODEL_DEFINITIONS_QUERY, MODEL_RECORDS_QUERY, PROTOCOL_VERSION, ParentReadyMessage, PatchMessage, PostTarget, QueryScopedOptions, RawBlock, RawLayoutBlock, ReadyMessage, RetryPolicy, SITE_CONFIG_QUERY, SUBMIT_FORM_MUTATION, SelectMessage, SubmitFormInput, TypedField, buildBlockContext, buildLocaleSwitchHref, collectFormIds, createCmssyClient, fetchLayouts, fetchPage, fetchPageById, fetchPageMeta, fetchPages, fetchSiteConfig, fields, getBlockContentForLanguage, graphqlRequest, isProtocolCompatible, localizeHref, localizeHtmlLinks, normalizeOrigin, normalizeSlug, parseEditorMessage, postToEditor, resolveApiUrl, resolveForms, resolvePublicUrl, resolveSiteLocales, resolveWorkspaceId, splitLocaleFromPath } from '@cmssy/core';
2
+ export { AppToEditorMessage, BlockMeta, BlockPropsSchema, BlockRect, BlockSchema, BoundsMessage, BuildBlockContextExtra, ClickMessage, CmssyBlockAuthContext, CmssyBlockContext, CmssyBlockMember, CmssyBlockWorkspace, CmssyBranding, CmssyClient, CmssyClientConfig, CmssyFormDefinition, CmssyFormField, CmssyFormSettings, CmssyFormSubmitResponse, CmssyLayoutGroup, CmssyLayoutSettings, CmssyLocaleContext, CmssyLocalizedValue, CmssyModelDefinition, CmssyModelRecord, CmssyPageData, CmssyPageMeta, CmssyPageSummary, CmssyRecordList, CmssyRequestError, CmssySiteConfig, EditorToAppMessage, FetchLike, FetchLikeResponse, FetchPageOptions, FieldControl, FieldDefinition, FieldType, GraphqlRequestOptions, InferBlockContent, PROTOCOL_VERSION, ParentReadyMessage, PatchMessage, PostTarget, QueryScopedOptions, RawBlock, RawLayoutBlock, ReadyMessage, RetryPolicy, SelectMessage, SubmitFormInput, TypedField, buildBlockContext, createCmssyClient, fields, graphqlRequest, isProtocolCompatible, normalizeOrigin, parseEditorMessage, postToEditor } from '@cmssy/core';
3
3
  import { B as BlockDefinition, a as BlockMap } from './registry-Bfq4Pq18.js';
4
4
  export { b as BlockProps, c as blocksToMeta, d as blocksToSchemas, e as buildBlockMap, f as defineBlock } from './registry-Bfq4Pq18.js';
5
- import * as react_jsx_runtime from 'react/jsx-runtime';
6
5
  import { FieldDefinition } from '@cmssy/types';
7
6
  export { FieldCondition, FieldConditionGroup, FieldConditionLogic, evaluateFieldConditionGroup } from '@cmssy/types';
7
+ import * as react_jsx_runtime from 'react/jsx-runtime';
8
8
  import 'react';
9
9
 
10
10
  interface CmssyServerPageProps {
package/dist/index.js CHANGED
@@ -1,9 +1,10 @@
1
- import { buildBlockContext, getBlockContentForLanguage, normalizeRelationContent, asBucket, resolveSiteLocales, resolveRelationContent } from '@cmssy/core';
2
- export { CmssyRequestError, DEFAULT_CMSSY_API_URL, FORM_QUERY, MODEL_DEFINITIONS_QUERY, MODEL_RECORDS_QUERY, PROTOCOL_VERSION, SITE_CONFIG_QUERY, SUBMIT_FORM_MUTATION, buildBlockContext, buildLocaleSwitchHref, collectFormIds, createCmssyClient, fetchLayouts, fetchPage, fetchPageById, fetchPageMeta, fetchPages, fetchSiteConfig, fields, getBlockContentForLanguage, graphqlRequest, isProtocolCompatible, localizeHref, localizeHtmlLinks, normalizeOrigin, normalizeSlug, parseEditorMessage, postToEditor, resolveApiUrl, resolveForms, resolvePublicUrl, resolveSiteLocales, resolveWorkspaceId, splitLocaleFromPath } from '@cmssy/core';
1
+ import { buildBlockContext } from '@cmssy/core';
2
+ export { CmssyRequestError, PROTOCOL_VERSION, buildBlockContext, createCmssyClient, fields, graphqlRequest, isProtocolCompatible, normalizeOrigin, parseEditorMessage, postToEditor } from '@cmssy/core';
3
+ export { evaluateFieldConditionGroup } from '@cmssy/types';
3
4
  import { createElement } from 'react';
5
+ import { getBlockContentForLanguage, normalizeRelationContent, asBucket, resolveSiteLocales, resolveRelationContent } from '@cmssy/core/internal';
4
6
  import { BlockErrorBoundary } from '@cmssy/react/block-error-boundary';
5
7
  import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
6
- export { evaluateFieldConditionGroup } from '@cmssy/types';
7
8
 
8
9
  // src/index.ts
9
10
 
@@ -0,0 +1,19 @@
1
+ "use client";
2
+ 'use strict';
3
+
4
+ var react = require('react');
5
+ var jsxRuntime = require('react/jsx-runtime');
6
+
7
+ var LocaleContext = react.createContext(null);
8
+ function CmssyLocaleProvider({
9
+ value,
10
+ children
11
+ }) {
12
+ return /* @__PURE__ */ jsxRuntime.jsx(LocaleContext.Provider, { value, children });
13
+ }
14
+ function useCmssyLocale() {
15
+ return react.useContext(LocaleContext);
16
+ }
17
+
18
+ exports.CmssyLocaleProvider = CmssyLocaleProvider;
19
+ exports.useCmssyLocale = useCmssyLocale;
@@ -0,0 +1,18 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { ReactNode } from 'react';
3
+ import { CmssyLocaleContext } from '@cmssy/core';
4
+
5
+ interface CmssyLocaleProviderProps {
6
+ value: CmssyLocaleContext;
7
+ children: ReactNode;
8
+ }
9
+ /**
10
+ * Exposes the active locale ({@link CmssyLocaleContext}) to client components
11
+ * below it (e.g. `CmssyLink`) so they can build locale-aware hrefs without
12
+ * prop-drilling. Wrap your root layout body with it.
13
+ */
14
+ declare function CmssyLocaleProvider({ value, children, }: CmssyLocaleProviderProps): react_jsx_runtime.JSX.Element;
15
+ /** Reads the active locale; returns null when no provider is mounted. */
16
+ declare function useCmssyLocale(): CmssyLocaleContext | null;
17
+
18
+ export { CmssyLocaleProvider, type CmssyLocaleProviderProps, useCmssyLocale };
@@ -0,0 +1,18 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { ReactNode } from 'react';
3
+ import { CmssyLocaleContext } from '@cmssy/core';
4
+
5
+ interface CmssyLocaleProviderProps {
6
+ value: CmssyLocaleContext;
7
+ children: ReactNode;
8
+ }
9
+ /**
10
+ * Exposes the active locale ({@link CmssyLocaleContext}) to client components
11
+ * below it (e.g. `CmssyLink`) so they can build locale-aware hrefs without
12
+ * prop-drilling. Wrap your root layout body with it.
13
+ */
14
+ declare function CmssyLocaleProvider({ value, children, }: CmssyLocaleProviderProps): react_jsx_runtime.JSX.Element;
15
+ /** Reads the active locale; returns null when no provider is mounted. */
16
+ declare function useCmssyLocale(): CmssyLocaleContext | null;
17
+
18
+ export { CmssyLocaleProvider, type CmssyLocaleProviderProps, useCmssyLocale };
@@ -0,0 +1,16 @@
1
+ "use client";
2
+ import { createContext, useContext } from 'react';
3
+ import { jsx } from 'react/jsx-runtime';
4
+
5
+ var LocaleContext = createContext(null);
6
+ function CmssyLocaleProvider({
7
+ value,
8
+ children
9
+ }) {
10
+ return /* @__PURE__ */ jsx(LocaleContext.Provider, { value, children });
11
+ }
12
+ function useCmssyLocale() {
13
+ return useContext(LocaleContext);
14
+ }
15
+
16
+ export { CmssyLocaleProvider, useCmssyLocale };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cmssy/react",
3
- "version": "9.10.0",
3
+ "version": "10.0.0",
4
4
  "description": "React blocks, renderers, data client and editor bridge for cmssy headless sites",
5
5
  "keywords": [
6
6
  "cmssy",
@@ -33,6 +33,11 @@
33
33
  "import": "./dist/client.js",
34
34
  "require": "./dist/client.cjs"
35
35
  },
36
+ "./internal": {
37
+ "types": "./dist/internal.d.ts",
38
+ "import": "./dist/internal.js",
39
+ "require": "./dist/internal.cjs"
40
+ },
36
41
  "./block-error-boundary": {
37
42
  "types": "./dist/block-error-boundary.d.ts",
38
43
  "import": "./dist/block-error-boundary.js",
@@ -62,7 +67,7 @@
62
67
  },
63
68
  "dependencies": {
64
69
  "@cmssy/types": "0.29.0",
65
- "@cmssy/core": "9.10.0"
70
+ "@cmssy/core": "10.0.0"
66
71
  },
67
72
  "scripts": {
68
73
  "build": "tsup",